UNPKG

@seven.io/client

Version:
207 lines (206 loc) 15.8 kB
import { p as M } from "./index-BOkPqsAO.js"; import { c as q, r as Y, a as k } from "./index-etwqi8r-.js"; function V(F, v) { for (var _ = 0; _ < v.length; _++) { const p = v[_]; if (typeof p != "string" && !Array.isArray(p)) { for (const x in p) if (x !== "default" && !(x in F)) { const b = Object.getOwnPropertyDescriptor(p, x); b && Object.defineProperty(F, x, b.get ? b : { enumerable: !0, get: () => p[x] }); } } } return Object.freeze(Object.defineProperty(F, Symbol.toStringTag, { value: "Module" })); } var R = { exports: {} }, I; function m() { return I || (I = 1, function(F) { (function() { var v = "input is invalid type", _ = "finalize already called", p = typeof window == "object", x = p ? window : {}; x.JS_MD5_NO_WINDOW && (p = !1); var b = !p && typeof self == "object", S = !x.JS_MD5_NO_NODE_JS && typeof M == "object" && M.versions && M.versions.node; S ? x = q : b && (x = self); var P = !x.JS_MD5_NO_COMMON_JS && !0 && F.exports, y = !x.JS_MD5_NO_ARRAY_BUFFER && typeof ArrayBuffer < "u", n = "0123456789abcdef".split(""), H = [128, 32768, 8388608, -2147483648], c = [0, 8, 16, 24], w = ["hex", "array", "digest", "buffer", "arrayBuffer", "base64"], d = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), u = [], N; if (y) { var D = new ArrayBuffer(68); N = new Uint8Array(D), u = new Uint32Array(D); } var O = Array.isArray; (x.JS_MD5_NO_NODE_JS || !O) && (O = function(t) { return Object.prototype.toString.call(t) === "[object Array]"; }); var B = ArrayBuffer.isView; y && (x.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW || !B) && (B = function(t) { return typeof t == "object" && t.buffer && t.buffer.constructor === ArrayBuffer; }); var U = function(t) { var e = typeof t; if (e === "string") return [t, !0]; if (e !== "object" || t === null) throw new Error(v); if (y && t.constructor === ArrayBuffer) return [new Uint8Array(t), !1]; if (!O(t) && !B(t)) throw new Error(v); return [t, !1]; }, z = function(t) { return function(e) { return new o(!0).update(e)[t](); }; }, W = function() { var t = z("hex"); S && (t = T(t)), t.create = function() { return new o(); }, t.update = function(r) { return t.create().update(r); }; for (var e = 0; e < w.length; ++e) { var i = w[e]; t[i] = z(i); } return t; }, T = function(t) { var e = Y(), i = k().Buffer, r; i.from && !x.JS_MD5_NO_BUFFER_FROM ? r = i.from : r = function(h) { return new i(h); }; var a = function(h) { if (typeof h == "string") return e.createHash("md5").update(h, "utf8").digest("hex"); if (h == null) throw new Error(v); return h.constructor === ArrayBuffer && (h = new Uint8Array(h)), O(h) || B(h) || h.constructor === i ? e.createHash("md5").update(r(h)).digest("hex") : t(h); }; return a; }, j = function(t) { return function(e, i) { return new E(e, !0).update(i)[t](); }; }, K = function() { var t = j("hex"); t.create = function(r) { return new E(r); }, t.update = function(r, a) { return t.create(r).update(a); }; for (var e = 0; e < w.length; ++e) { var i = w[e]; t[i] = j(i); } return t; }; function o(t) { if (t) u[0] = u[16] = u[1] = u[2] = u[3] = u[4] = u[5] = u[6] = u[7] = u[8] = u[9] = u[10] = u[11] = u[12] = u[13] = u[14] = u[15] = 0, this.blocks = u, this.buffer8 = N; else if (y) { var e = new ArrayBuffer(68); this.buffer8 = new Uint8Array(e), this.blocks = new Uint32Array(e); } else this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; this.h0 = this.h1 = this.h2 = this.h3 = this.start = this.bytes = this.hBytes = 0, this.finalized = this.hashed = !1, this.first = !0; } o.prototype.update = function(t) { if (this.finalized) throw new Error(_); var e = U(t); t = e[0]; for (var i = e[1], r, a = 0, h, f = t.length, s = this.blocks, l = this.buffer8; a < f; ) { if (this.hashed && (this.hashed = !1, s[0] = s[16], s[16] = s[1] = s[2] = s[3] = s[4] = s[5] = s[6] = s[7] = s[8] = s[9] = s[10] = s[11] = s[12] = s[13] = s[14] = s[15] = 0), i) if (y) for (h = this.start; a < f && h < 64; ++a) r = t.charCodeAt(a), r < 128 ? l[h++] = r : r < 2048 ? (l[h++] = 192 | r >>> 6, l[h++] = 128 | r & 63) : r < 55296 || r >= 57344 ? (l[h++] = 224 | r >>> 12, l[h++] = 128 | r >>> 6 & 63, l[h++] = 128 | r & 63) : (r = 65536 + ((r & 1023) << 10 | t.charCodeAt(++a) & 1023), l[h++] = 240 | r >>> 18, l[h++] = 128 | r >>> 12 & 63, l[h++] = 128 | r >>> 6 & 63, l[h++] = 128 | r & 63); else for (h = this.start; a < f && h < 64; ++a) r = t.charCodeAt(a), r < 128 ? s[h >>> 2] |= r << c[h++ & 3] : r < 2048 ? (s[h >>> 2] |= (192 | r >>> 6) << c[h++ & 3], s[h >>> 2] |= (128 | r & 63) << c[h++ & 3]) : r < 55296 || r >= 57344 ? (s[h >>> 2] |= (224 | r >>> 12) << c[h++ & 3], s[h >>> 2] |= (128 | r >>> 6 & 63) << c[h++ & 3], s[h >>> 2] |= (128 | r & 63) << c[h++ & 3]) : (r = 65536 + ((r & 1023) << 10 | t.charCodeAt(++a) & 1023), s[h >>> 2] |= (240 | r >>> 18) << c[h++ & 3], s[h >>> 2] |= (128 | r >>> 12 & 63) << c[h++ & 3], s[h >>> 2] |= (128 | r >>> 6 & 63) << c[h++ & 3], s[h >>> 2] |= (128 | r & 63) << c[h++ & 3]); else if (y) for (h = this.start; a < f && h < 64; ++a) l[h++] = t[a]; else for (h = this.start; a < f && h < 64; ++a) s[h >>> 2] |= t[a] << c[h++ & 3]; this.lastByteIndex = h, this.bytes += h - this.start, h >= 64 ? (this.start = h - 64, this.hash(), this.hashed = !0) : this.start = h; } return this.bytes > 4294967295 && (this.hBytes += this.bytes / 4294967296 << 0, this.bytes = this.bytes % 4294967296), this; }, o.prototype.finalize = function() { if (!this.finalized) { this.finalized = !0; var t = this.blocks, e = this.lastByteIndex; t[e >>> 2] |= H[e & 3], e >= 56 && (this.hashed || this.hash(), t[0] = t[16], t[16] = t[1] = t[2] = t[3] = t[4] = t[5] = t[6] = t[7] = t[8] = t[9] = t[10] = t[11] = t[12] = t[13] = t[14] = t[15] = 0), t[14] = this.bytes << 3, t[15] = this.hBytes << 3 | this.bytes >>> 29, this.hash(); } }, o.prototype.hash = function() { var t, e, i, r, a, h, f = this.blocks; this.first ? (t = f[0] - 680876937, t = (t << 7 | t >>> 25) - 271733879 << 0, r = (-1732584194 ^ t & 2004318071) + f[1] - 117830708, r = (r << 12 | r >>> 20) + t << 0, i = (-271733879 ^ r & (t ^ -271733879)) + f[2] - 1126478375, i = (i << 17 | i >>> 15) + r << 0, e = (t ^ i & (r ^ t)) + f[3] - 1316259209, e = (e << 22 | e >>> 10) + i << 0) : (t = this.h0, e = this.h1, i = this.h2, r = this.h3, t += (r ^ e & (i ^ r)) + f[0] - 680876936, t = (t << 7 | t >>> 25) + e << 0, r += (i ^ t & (e ^ i)) + f[1] - 389564586, r = (r << 12 | r >>> 20) + t << 0, i += (e ^ r & (t ^ e)) + f[2] + 606105819, i = (i << 17 | i >>> 15) + r << 0, e += (t ^ i & (r ^ t)) + f[3] - 1044525330, e = (e << 22 | e >>> 10) + i << 0), t += (r ^ e & (i ^ r)) + f[4] - 176418897, t = (t << 7 | t >>> 25) + e << 0, r += (i ^ t & (e ^ i)) + f[5] + 1200080426, r = (r << 12 | r >>> 20) + t << 0, i += (e ^ r & (t ^ e)) + f[6] - 1473231341, i = (i << 17 | i >>> 15) + r << 0, e += (t ^ i & (r ^ t)) + f[7] - 45705983, e = (e << 22 | e >>> 10) + i << 0, t += (r ^ e & (i ^ r)) + f[8] + 1770035416, t = (t << 7 | t >>> 25) + e << 0, r += (i ^ t & (e ^ i)) + f[9] - 1958414417, r = (r << 12 | r >>> 20) + t << 0, i += (e ^ r & (t ^ e)) + f[10] - 42063, i = (i << 17 | i >>> 15) + r << 0, e += (t ^ i & (r ^ t)) + f[11] - 1990404162, e = (e << 22 | e >>> 10) + i << 0, t += (r ^ e & (i ^ r)) + f[12] + 1804603682, t = (t << 7 | t >>> 25) + e << 0, r += (i ^ t & (e ^ i)) + f[13] - 40341101, r = (r << 12 | r >>> 20) + t << 0, i += (e ^ r & (t ^ e)) + f[14] - 1502002290, i = (i << 17 | i >>> 15) + r << 0, e += (t ^ i & (r ^ t)) + f[15] + 1236535329, e = (e << 22 | e >>> 10) + i << 0, t += (i ^ r & (e ^ i)) + f[1] - 165796510, t = (t << 5 | t >>> 27) + e << 0, r += (e ^ i & (t ^ e)) + f[6] - 1069501632, r = (r << 9 | r >>> 23) + t << 0, i += (t ^ e & (r ^ t)) + f[11] + 643717713, i = (i << 14 | i >>> 18) + r << 0, e += (r ^ t & (i ^ r)) + f[0] - 373897302, e = (e << 20 | e >>> 12) + i << 0, t += (i ^ r & (e ^ i)) + f[5] - 701558691, t = (t << 5 | t >>> 27) + e << 0, r += (e ^ i & (t ^ e)) + f[10] + 38016083, r = (r << 9 | r >>> 23) + t << 0, i += (t ^ e & (r ^ t)) + f[15] - 660478335, i = (i << 14 | i >>> 18) + r << 0, e += (r ^ t & (i ^ r)) + f[4] - 405537848, e = (e << 20 | e >>> 12) + i << 0, t += (i ^ r & (e ^ i)) + f[9] + 568446438, t = (t << 5 | t >>> 27) + e << 0, r += (e ^ i & (t ^ e)) + f[14] - 1019803690, r = (r << 9 | r >>> 23) + t << 0, i += (t ^ e & (r ^ t)) + f[3] - 187363961, i = (i << 14 | i >>> 18) + r << 0, e += (r ^ t & (i ^ r)) + f[8] + 1163531501, e = (e << 20 | e >>> 12) + i << 0, t += (i ^ r & (e ^ i)) + f[13] - 1444681467, t = (t << 5 | t >>> 27) + e << 0, r += (e ^ i & (t ^ e)) + f[2] - 51403784, r = (r << 9 | r >>> 23) + t << 0, i += (t ^ e & (r ^ t)) + f[7] + 1735328473, i = (i << 14 | i >>> 18) + r << 0, e += (r ^ t & (i ^ r)) + f[12] - 1926607734, e = (e << 20 | e >>> 12) + i << 0, a = e ^ i, t += (a ^ r) + f[5] - 378558, t = (t << 4 | t >>> 28) + e << 0, r += (a ^ t) + f[8] - 2022574463, r = (r << 11 | r >>> 21) + t << 0, h = r ^ t, i += (h ^ e) + f[11] + 1839030562, i = (i << 16 | i >>> 16) + r << 0, e += (h ^ i) + f[14] - 35309556, e = (e << 23 | e >>> 9) + i << 0, a = e ^ i, t += (a ^ r) + f[1] - 1530992060, t = (t << 4 | t >>> 28) + e << 0, r += (a ^ t) + f[4] + 1272893353, r = (r << 11 | r >>> 21) + t << 0, h = r ^ t, i += (h ^ e) + f[7] - 155497632, i = (i << 16 | i >>> 16) + r << 0, e += (h ^ i) + f[10] - 1094730640, e = (e << 23 | e >>> 9) + i << 0, a = e ^ i, t += (a ^ r) + f[13] + 681279174, t = (t << 4 | t >>> 28) + e << 0, r += (a ^ t) + f[0] - 358537222, r = (r << 11 | r >>> 21) + t << 0, h = r ^ t, i += (h ^ e) + f[3] - 722521979, i = (i << 16 | i >>> 16) + r << 0, e += (h ^ i) + f[6] + 76029189, e = (e << 23 | e >>> 9) + i << 0, a = e ^ i, t += (a ^ r) + f[9] - 640364487, t = (t << 4 | t >>> 28) + e << 0, r += (a ^ t) + f[12] - 421815835, r = (r << 11 | r >>> 21) + t << 0, h = r ^ t, i += (h ^ e) + f[15] + 530742520, i = (i << 16 | i >>> 16) + r << 0, e += (h ^ i) + f[2] - 995338651, e = (e << 23 | e >>> 9) + i << 0, t += (i ^ (e | ~r)) + f[0] - 198630844, t = (t << 6 | t >>> 26) + e << 0, r += (e ^ (t | ~i)) + f[7] + 1126891415, r = (r << 10 | r >>> 22) + t << 0, i += (t ^ (r | ~e)) + f[14] - 1416354905, i = (i << 15 | i >>> 17) + r << 0, e += (r ^ (i | ~t)) + f[5] - 57434055, e = (e << 21 | e >>> 11) + i << 0, t += (i ^ (e | ~r)) + f[12] + 1700485571, t = (t << 6 | t >>> 26) + e << 0, r += (e ^ (t | ~i)) + f[3] - 1894986606, r = (r << 10 | r >>> 22) + t << 0, i += (t ^ (r | ~e)) + f[10] - 1051523, i = (i << 15 | i >>> 17) + r << 0, e += (r ^ (i | ~t)) + f[1] - 2054922799, e = (e << 21 | e >>> 11) + i << 0, t += (i ^ (e | ~r)) + f[8] + 1873313359, t = (t << 6 | t >>> 26) + e << 0, r += (e ^ (t | ~i)) + f[15] - 30611744, r = (r << 10 | r >>> 22) + t << 0, i += (t ^ (r | ~e)) + f[6] - 1560198380, i = (i << 15 | i >>> 17) + r << 0, e += (r ^ (i | ~t)) + f[13] + 1309151649, e = (e << 21 | e >>> 11) + i << 0, t += (i ^ (e | ~r)) + f[4] - 145523070, t = (t << 6 | t >>> 26) + e << 0, r += (e ^ (t | ~i)) + f[11] - 1120210379, r = (r << 10 | r >>> 22) + t << 0, i += (t ^ (r | ~e)) + f[2] + 718787259, i = (i << 15 | i >>> 17) + r << 0, e += (r ^ (i | ~t)) + f[9] - 343485551, e = (e << 21 | e >>> 11) + i << 0, this.first ? (this.h0 = t + 1732584193 << 0, this.h1 = e - 271733879 << 0, this.h2 = i - 1732584194 << 0, this.h3 = r + 271733878 << 0, this.first = !1) : (this.h0 = this.h0 + t << 0, this.h1 = this.h1 + e << 0, this.h2 = this.h2 + i << 0, this.h3 = this.h3 + r << 0); }, o.prototype.hex = function() { this.finalize(); var t = this.h0, e = this.h1, i = this.h2, r = this.h3; return n[t >>> 4 & 15] + n[t & 15] + n[t >>> 12 & 15] + n[t >>> 8 & 15] + n[t >>> 20 & 15] + n[t >>> 16 & 15] + n[t >>> 28 & 15] + n[t >>> 24 & 15] + n[e >>> 4 & 15] + n[e & 15] + n[e >>> 12 & 15] + n[e >>> 8 & 15] + n[e >>> 20 & 15] + n[e >>> 16 & 15] + n[e >>> 28 & 15] + n[e >>> 24 & 15] + n[i >>> 4 & 15] + n[i & 15] + n[i >>> 12 & 15] + n[i >>> 8 & 15] + n[i >>> 20 & 15] + n[i >>> 16 & 15] + n[i >>> 28 & 15] + n[i >>> 24 & 15] + n[r >>> 4 & 15] + n[r & 15] + n[r >>> 12 & 15] + n[r >>> 8 & 15] + n[r >>> 20 & 15] + n[r >>> 16 & 15] + n[r >>> 28 & 15] + n[r >>> 24 & 15]; }, o.prototype.toString = o.prototype.hex, o.prototype.digest = function() { this.finalize(); var t = this.h0, e = this.h1, i = this.h2, r = this.h3; return [ t & 255, t >>> 8 & 255, t >>> 16 & 255, t >>> 24 & 255, e & 255, e >>> 8 & 255, e >>> 16 & 255, e >>> 24 & 255, i & 255, i >>> 8 & 255, i >>> 16 & 255, i >>> 24 & 255, r & 255, r >>> 8 & 255, r >>> 16 & 255, r >>> 24 & 255 ]; }, o.prototype.array = o.prototype.digest, o.prototype.arrayBuffer = function() { this.finalize(); var t = new ArrayBuffer(16), e = new Uint32Array(t); return e[0] = this.h0, e[1] = this.h1, e[2] = this.h2, e[3] = this.h3, t; }, o.prototype.buffer = o.prototype.arrayBuffer, o.prototype.base64 = function() { for (var t, e, i, r = "", a = this.array(), h = 0; h < 15; ) t = a[h++], e = a[h++], i = a[h++], r += d[t >>> 2] + d[(t << 4 | e >>> 4) & 63] + d[(e << 2 | i >>> 6) & 63] + d[i & 63]; return t = a[h], r += d[t >>> 2] + d[t << 4 & 63] + "==", r; }; function E(t, e) { var i, r = U(t); if (t = r[0], r[1]) { var a = [], h = t.length, f = 0, s; for (i = 0; i < h; ++i) s = t.charCodeAt(i), s < 128 ? a[f++] = s : s < 2048 ? (a[f++] = 192 | s >>> 6, a[f++] = 128 | s & 63) : s < 55296 || s >= 57344 ? (a[f++] = 224 | s >>> 12, a[f++] = 128 | s >>> 6 & 63, a[f++] = 128 | s & 63) : (s = 65536 + ((s & 1023) << 10 | t.charCodeAt(++i) & 1023), a[f++] = 240 | s >>> 18, a[f++] = 128 | s >>> 12 & 63, a[f++] = 128 | s >>> 6 & 63, a[f++] = 128 | s & 63); t = a; } t.length > 64 && (t = new o(!0).update(t).array()); var l = [], C = []; for (i = 0; i < 64; ++i) { var J = t[i] || 0; l[i] = 92 ^ J, C[i] = 54 ^ J; } o.call(this, e), this.update(C), this.oKeyPad = l, this.inner = !0, this.sharedMemory = e; } E.prototype = new o(), E.prototype.finalize = function() { if (o.prototype.finalize.call(this), this.inner) { this.inner = !1; var t = this.array(); o.call(this, this.sharedMemory), this.update(this.oKeyPad), this.update(t), o.prototype.finalize.call(this); } }; var A = W(); A.md5 = A, A.md5.hmac = K(), P ? F.exports = A : x.md5 = A; })(); }(R)), R.exports; } var X = m(); const Z = /* @__PURE__ */ V({ __proto__: null }, [X]); export { Z as m };