@gardenfi/core 0.2.0-beta.72 → 0.2.0-beta.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +15 -14
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +55 -41
- package/dist/index100.cjs +1 -0
- package/dist/index100.js +37 -0
- package/dist/index101.cjs +1 -0
- package/dist/index101.js +369 -0
- package/dist/index102.cjs +1 -0
- package/dist/index102.js +23 -0
- package/dist/index103.cjs +1 -0
- package/dist/index103.js +58 -0
- package/dist/index104.cjs +1 -0
- package/dist/index104.js +5 -0
- package/dist/index105.cjs +1 -0
- package/dist/index105.js +51 -0
- package/dist/index106.cjs +1 -0
- package/dist/index106.js +28 -0
- package/dist/index107.cjs +1 -0
- package/dist/index107.js +4 -0
- package/dist/index108.cjs +1 -0
- package/dist/index108.js +4 -0
- package/dist/index109.cjs +1 -0
- package/dist/index109.js +64 -0
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +2 -2
- package/dist/index110.cjs +1 -0
- package/dist/index110.js +37 -0
- package/dist/index111.cjs +1 -0
- package/dist/index111.js +7 -0
- package/dist/index112.cjs +1 -0
- package/dist/index112.js +4 -0
- package/dist/index113.cjs +1 -0
- package/dist/index113.js +60 -0
- package/dist/index114.cjs +1 -0
- package/dist/index114.js +4 -0
- package/dist/index115.cjs +1 -0
- package/dist/index115.js +42 -0
- package/dist/index116.cjs +1 -0
- package/dist/index116.js +45 -0
- package/dist/index117.cjs +1 -0
- package/dist/index117.js +20 -0
- package/dist/index118.cjs +1 -0
- package/dist/index118.js +111 -0
- package/dist/index119.cjs +1 -0
- package/dist/index119.js +23 -0
- package/dist/index120.cjs +1 -0
- package/dist/index120.js +228 -0
- package/dist/index121.cjs +1 -0
- package/dist/index121.js +6 -0
- package/dist/index122.cjs +1 -0
- package/dist/index122.js +160 -0
- package/dist/index123.cjs +1 -0
- package/dist/index123.js +4 -0
- package/dist/index124.cjs +1 -0
- package/dist/index124.js +75 -0
- package/dist/index125.cjs +1 -0
- package/dist/index125.js +107 -0
- package/dist/index126.cjs +1 -0
- package/dist/index126.js +15 -0
- package/dist/index127.cjs +1 -0
- package/dist/index127.js +35 -0
- package/dist/index128.cjs +1 -0
- package/dist/index128.js +4 -0
- package/dist/index129.cjs +1 -0
- package/dist/index129.js +32 -0
- package/dist/index130.cjs +1 -0
- package/dist/index130.js +21 -0
- package/dist/index131.cjs +1 -0
- package/dist/index131.js +4 -0
- package/dist/index132.cjs +1 -0
- package/dist/index132.js +358 -0
- package/dist/index133.cjs +1 -0
- package/dist/index133.js +241 -0
- package/dist/index134.cjs +1 -0
- package/dist/index134.js +70 -0
- package/dist/index135.cjs +1 -0
- package/dist/index135.js +64 -0
- package/dist/index136.cjs +1 -0
- package/dist/index136.js +14 -0
- package/dist/index137.cjs +1 -0
- package/dist/index137.js +47 -0
- package/dist/index138.cjs +1 -0
- package/dist/index138.js +65 -0
- package/dist/index139.cjs +1 -0
- package/dist/index139.js +228 -0
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +2 -2
- package/dist/index140.cjs +1 -0
- package/dist/index140.js +5 -0
- package/dist/index141.cjs +1 -0
- package/dist/index141.js +171 -0
- package/dist/index142.cjs +1 -0
- package/dist/index142.js +30 -0
- package/dist/index143.cjs +1 -0
- package/dist/index143.js +23 -0
- package/dist/index144.cjs +1 -0
- package/dist/index144.js +72 -0
- package/dist/index145.cjs +1 -0
- package/dist/index145.js +130 -0
- package/dist/index146.cjs +1 -0
- package/dist/index146.js +9 -0
- package/dist/index147.cjs +1 -0
- package/dist/index147.js +4 -0
- package/dist/index148.cjs +1 -0
- package/dist/index148.js +28 -0
- package/dist/index149.cjs +1 -0
- package/dist/index149.js +4 -0
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +30 -136
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +25 -2
- package/dist/index18.cjs +1 -3
- package/dist/index18.js +29 -26
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +32 -17
- package/dist/index20.cjs +1 -2
- package/dist/index20.js +53 -25
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +6 -38
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +9 -199
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +138 -2
- package/dist/index24.js +2 -2
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +13 -2
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +36 -27
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +41 -14
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +26 -173
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +15 -22
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +24 -2
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +25 -34
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +54 -8
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +28 -2
- package/dist/index34.cjs +3 -6
- package/dist/index34.js +30 -949
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +17 -4
- package/dist/index36.cjs +2 -1
- package/dist/index36.js +23 -18
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +38 -29
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +197 -60
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +2 -33
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +2 -87
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +2 -49
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +12 -25
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +12 -2
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +4 -2
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +45 -19
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +38 -30
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +165 -360
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +13 -21
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +3 -54
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +17 -3
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +9 -70
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +175 -2
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +21 -57
- package/dist/index54.js +2 -2
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +34 -39
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +9 -43
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +34 -17
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +50 -103
- package/dist/index59.cjs +2 -1
- package/dist/index59.js +58 -19
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +3 -225
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +128 -4
- package/dist/index62.cjs +2 -1
- package/dist/index62.js +37 -152
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +9 -2
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +11 -13
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +12 -2
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +13 -32
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +7 -2
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +17 -355
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +75 -235
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +14 -67
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +17 -60
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +6 -11
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +20 -43
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +13 -62
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +2 -226
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +2 -3
- package/dist/index77.cjs +2 -1
- package/dist/index77.js +32 -166
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +5 -27
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +18 -19
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +30 -68
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +2 -128
- package/dist/index82.cjs +6 -1
- package/dist/index82.js +949 -9
- package/dist/index83.cjs +1 -1
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +61 -25
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +33 -2
- package/dist/index86.cjs +1 -0
- package/dist/index86.js +89 -0
- package/dist/index87.cjs +1 -0
- package/dist/index87.js +15 -0
- package/dist/index88.cjs +1 -0
- package/dist/index88.js +9 -0
- package/dist/index89.cjs +1 -0
- package/dist/index89.js +115 -0
- package/dist/index90.cjs +1 -0
- package/dist/index90.js +9 -0
- package/dist/index91.cjs +1 -0
- package/dist/index91.js +35 -0
- package/dist/index92.cjs +1 -0
- package/dist/index92.js +4 -0
- package/dist/index93.cjs +1 -0
- package/dist/index93.js +40 -0
- package/dist/index94.cjs +1 -0
- package/dist/index94.js +31 -0
- package/dist/index95.cjs +1 -0
- package/dist/index95.js +23 -0
- package/dist/index96.cjs +1 -0
- package/dist/index96.js +9 -0
- package/dist/index97.cjs +1 -0
- package/dist/index97.js +7 -0
- package/dist/index98.cjs +1 -0
- package/dist/index98.js +13 -0
- package/dist/index99.cjs +1 -0
- package/dist/index99.js +22 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/lib/utils.d.ts +3 -1
- package/package.json +1 -1
package/dist/index125.js
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { number as d, exists as k, bytes as B, output as A } from "./index129.js";
|
|
2
|
+
import { split as H, rotlBH as m, rotlSH as S, rotlBL as T, rotlSL as F } from "./index130.js";
|
|
3
|
+
import { wrapConstructor as X, Hash as E, u32 as U, isLE as x, byteSwap32 as I, toBytes as P } from "./index110.js";
|
|
4
|
+
const y = [], L = [], b = [], M = /* @__PURE__ */ BigInt(0), f = /* @__PURE__ */ BigInt(1), R = /* @__PURE__ */ BigInt(2), j = /* @__PURE__ */ BigInt(7), C = /* @__PURE__ */ BigInt(256), q = /* @__PURE__ */ BigInt(113);
|
|
5
|
+
for (let e = 0, t = f, s = 1, n = 0; e < 24; e++) {
|
|
6
|
+
[s, n] = [n, (2 * s + 3 * n) % 5], y.push(2 * (5 * n + s)), L.push((e + 1) * (e + 2) / 2 % 64);
|
|
7
|
+
let o = M;
|
|
8
|
+
for (let r = 0; r < 7; r++)
|
|
9
|
+
t = (t << f ^ (t >> j) * q) % C, t & R && (o ^= f << (f << /* @__PURE__ */ BigInt(r)) - f);
|
|
10
|
+
b.push(o);
|
|
11
|
+
}
|
|
12
|
+
const [v, z] = /* @__PURE__ */ H(b, !0), O = (e, t, s) => s > 32 ? m(e, t, s) : S(e, t, s), w = (e, t, s) => s > 32 ? T(e, t, s) : F(e, t, s);
|
|
13
|
+
function D(e, t = 24) {
|
|
14
|
+
const s = new Uint32Array(10);
|
|
15
|
+
for (let n = 24 - t; n < 24; n++) {
|
|
16
|
+
for (let i = 0; i < 10; i++)
|
|
17
|
+
s[i] = e[i] ^ e[i + 10] ^ e[i + 20] ^ e[i + 30] ^ e[i + 40];
|
|
18
|
+
for (let i = 0; i < 10; i += 2) {
|
|
19
|
+
const h = (i + 8) % 10, l = (i + 2) % 10, u = s[l], c = s[l + 1], _ = O(u, c, 1) ^ s[h], g = w(u, c, 1) ^ s[h + 1];
|
|
20
|
+
for (let a = 0; a < 50; a += 10)
|
|
21
|
+
e[i + a] ^= _, e[i + a + 1] ^= g;
|
|
22
|
+
}
|
|
23
|
+
let o = e[2], r = e[3];
|
|
24
|
+
for (let i = 0; i < 24; i++) {
|
|
25
|
+
const h = L[i], l = O(o, r, h), u = w(o, r, h), c = y[i];
|
|
26
|
+
o = e[c], r = e[c + 1], e[c] = l, e[c + 1] = u;
|
|
27
|
+
}
|
|
28
|
+
for (let i = 0; i < 50; i += 10) {
|
|
29
|
+
for (let h = 0; h < 10; h++)
|
|
30
|
+
s[h] = e[i + h];
|
|
31
|
+
for (let h = 0; h < 10; h++)
|
|
32
|
+
e[i + h] ^= ~s[(h + 2) % 10] & s[(h + 4) % 10];
|
|
33
|
+
}
|
|
34
|
+
e[0] ^= v[n], e[1] ^= z[n];
|
|
35
|
+
}
|
|
36
|
+
s.fill(0);
|
|
37
|
+
}
|
|
38
|
+
class p extends E {
|
|
39
|
+
// NOTE: we accept arguments in bytes instead of bits here.
|
|
40
|
+
constructor(t, s, n, o = !1, r = 24) {
|
|
41
|
+
if (super(), this.blockLen = t, this.suffix = s, this.outputLen = n, this.enableXOF = o, this.rounds = r, this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, d(n), 0 >= this.blockLen || this.blockLen >= 200)
|
|
42
|
+
throw new Error("Sha3 supports only keccak-f1600 function");
|
|
43
|
+
this.state = new Uint8Array(200), this.state32 = U(this.state);
|
|
44
|
+
}
|
|
45
|
+
keccak() {
|
|
46
|
+
x || I(this.state32), D(this.state32, this.rounds), x || I(this.state32), this.posOut = 0, this.pos = 0;
|
|
47
|
+
}
|
|
48
|
+
update(t) {
|
|
49
|
+
k(this);
|
|
50
|
+
const { blockLen: s, state: n } = this;
|
|
51
|
+
t = P(t);
|
|
52
|
+
const o = t.length;
|
|
53
|
+
for (let r = 0; r < o; ) {
|
|
54
|
+
const i = Math.min(s - this.pos, o - r);
|
|
55
|
+
for (let h = 0; h < i; h++)
|
|
56
|
+
n[this.pos++] ^= t[r++];
|
|
57
|
+
this.pos === s && this.keccak();
|
|
58
|
+
}
|
|
59
|
+
return this;
|
|
60
|
+
}
|
|
61
|
+
finish() {
|
|
62
|
+
if (this.finished)
|
|
63
|
+
return;
|
|
64
|
+
this.finished = !0;
|
|
65
|
+
const { state: t, suffix: s, pos: n, blockLen: o } = this;
|
|
66
|
+
t[n] ^= s, s & 128 && n === o - 1 && this.keccak(), t[o - 1] ^= 128, this.keccak();
|
|
67
|
+
}
|
|
68
|
+
writeInto(t) {
|
|
69
|
+
k(this, !1), B(t), this.finish();
|
|
70
|
+
const s = this.state, { blockLen: n } = this;
|
|
71
|
+
for (let o = 0, r = t.length; o < r; ) {
|
|
72
|
+
this.posOut >= n && this.keccak();
|
|
73
|
+
const i = Math.min(n - this.posOut, r - o);
|
|
74
|
+
t.set(s.subarray(this.posOut, this.posOut + i), o), this.posOut += i, o += i;
|
|
75
|
+
}
|
|
76
|
+
return t;
|
|
77
|
+
}
|
|
78
|
+
xofInto(t) {
|
|
79
|
+
if (!this.enableXOF)
|
|
80
|
+
throw new Error("XOF is not possible for this instance");
|
|
81
|
+
return this.writeInto(t);
|
|
82
|
+
}
|
|
83
|
+
xof(t) {
|
|
84
|
+
return d(t), this.xofInto(new Uint8Array(t));
|
|
85
|
+
}
|
|
86
|
+
digestInto(t) {
|
|
87
|
+
if (A(t, this), this.finished)
|
|
88
|
+
throw new Error("digest() was already called");
|
|
89
|
+
return this.writeInto(t), this.destroy(), t;
|
|
90
|
+
}
|
|
91
|
+
digest() {
|
|
92
|
+
return this.digestInto(new Uint8Array(this.outputLen));
|
|
93
|
+
}
|
|
94
|
+
destroy() {
|
|
95
|
+
this.destroyed = !0, this.state.fill(0);
|
|
96
|
+
}
|
|
97
|
+
_cloneInto(t) {
|
|
98
|
+
const { blockLen: s, suffix: n, outputLen: o, rounds: r, enableXOF: i } = this;
|
|
99
|
+
return t || (t = new p(s, n, o, i, r)), t.state32.set(this.state32), t.pos = this.pos, t.posOut = this.posOut, t.finished = this.finished, t.rounds = r, t.suffix = n, t.outputLen = o, t.enableXOF = i, t.destroyed = this.destroyed, t;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
const G = (e, t, s) => X(() => new p(t, e, s)), Q = /* @__PURE__ */ G(1, 136, 256 / 8);
|
|
103
|
+
export {
|
|
104
|
+
p as Keccak,
|
|
105
|
+
D as keccakP,
|
|
106
|
+
Q as keccak_256
|
|
107
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index131.cjs"),_=require("./index132.cjs"),t=require("./index133.cjs"),i=require("./index134.cjs"),s=require("./index135.cjs"),u=require("./index136.cjs"),n=require("./index137.cjs"),o=require("./index138.cjs");(function(a,e){e=a.exports=_.__require(),e.Stream=e,e.Readable=e,e.Writable=t.__require(),e.Duplex=i.__require(),e.Transform=s._stream_transform,e.PassThrough=u._stream_passthrough,e.finished=n.endOfStream,e.pipeline=o.pipeline_1})(r.__module,r.__module.exports);var l=r.__module.exports;exports.readableBrowserExports=l;
|
package/dist/index126.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { __module as e } from "./index131.js";
|
|
2
|
+
import { __require as m } from "./index132.js";
|
|
3
|
+
import { __require as i } from "./index133.js";
|
|
4
|
+
import { __require as _ } from "./index134.js";
|
|
5
|
+
import { _ as o } from "./index135.js";
|
|
6
|
+
import { _ as s } from "./index136.js";
|
|
7
|
+
import { e as t } from "./index137.js";
|
|
8
|
+
import { p as f } from "./index138.js";
|
|
9
|
+
(function(a, r) {
|
|
10
|
+
r = a.exports = m(), r.Stream = r, r.Readable = r, r.Writable = i(), r.Duplex = _(), r.Transform = o, r.PassThrough = s, r.finished = t, r.pipeline = f;
|
|
11
|
+
})(e, e.exports);
|
|
12
|
+
var w = e.exports;
|
|
13
|
+
export {
|
|
14
|
+
w as r
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index55.cjs");var n=a.safeBufferExports.Buffer;function f(t,i){this._block=n.alloc(t),this._finalSize=i,this._blockSize=t,this._len=0}f.prototype.update=function(t,i){typeof t=="string"&&(i=i||"utf8",t=n.from(t,i));for(var e=this._block,h=this._blockSize,s=t.length,r=this._len,l=0;l<s;){for(var c=r%h,_=Math.min(s-l,h-c),o=0;o<_;o++)e[c+o]=t[l+o];r+=_,l+=_,r%h===0&&this._update(e)}return this._len+=s,this};f.prototype.digest=function(t){var i=this._len%this._blockSize;this._block[i]=128,this._block.fill(0,i+1),i>=this._finalSize&&(this._update(this._block),this._block.fill(0));var e=this._len*8;if(e<=4294967295)this._block.writeUInt32BE(e,this._blockSize-4);else{var h=(e&4294967295)>>>0,s=(e-h)/4294967296;this._block.writeUInt32BE(s,this._blockSize-8),this._block.writeUInt32BE(h,this._blockSize-4)}this._update(this._block);var r=this._hash();return t?r.toString(t):r};f.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var b=f;exports.hash=b;
|
package/dist/index127.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { s as b } from "./index55.js";
|
|
2
|
+
var c = b.Buffer;
|
|
3
|
+
function e(t, i) {
|
|
4
|
+
this._block = c.alloc(t), this._finalSize = i, this._blockSize = t, this._len = 0;
|
|
5
|
+
}
|
|
6
|
+
e.prototype.update = function(t, i) {
|
|
7
|
+
typeof t == "string" && (i = i || "utf8", t = c.from(t, i));
|
|
8
|
+
for (var h = this._block, s = this._blockSize, f = t.length, r = this._len, o = 0; o < f; ) {
|
|
9
|
+
for (var a = r % s, _ = Math.min(f - o, s - a), l = 0; l < _; l++)
|
|
10
|
+
h[a + l] = t[o + l];
|
|
11
|
+
r += _, o += _, r % s === 0 && this._update(h);
|
|
12
|
+
}
|
|
13
|
+
return this._len += f, this;
|
|
14
|
+
};
|
|
15
|
+
e.prototype.digest = function(t) {
|
|
16
|
+
var i = this._len % this._blockSize;
|
|
17
|
+
this._block[i] = 128, this._block.fill(0, i + 1), i >= this._finalSize && (this._update(this._block), this._block.fill(0));
|
|
18
|
+
var h = this._len * 8;
|
|
19
|
+
if (h <= 4294967295)
|
|
20
|
+
this._block.writeUInt32BE(h, this._blockSize - 4);
|
|
21
|
+
else {
|
|
22
|
+
var s = (h & 4294967295) >>> 0, f = (h - s) / 4294967296;
|
|
23
|
+
this._block.writeUInt32BE(f, this._blockSize - 8), this._block.writeUInt32BE(s, this._blockSize - 4);
|
|
24
|
+
}
|
|
25
|
+
this._update(this._block);
|
|
26
|
+
var r = this._hash();
|
|
27
|
+
return t ? r.toString(t) : r;
|
|
28
|
+
};
|
|
29
|
+
e.prototype._update = function() {
|
|
30
|
+
throw new Error("_update must be implemented by subclass");
|
|
31
|
+
};
|
|
32
|
+
var u = e;
|
|
33
|
+
export {
|
|
34
|
+
u as h
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t={};module.exports=t;
|
package/dist/index128.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function i(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function n(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function o(e,...t){if(!n(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function s(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function u(e,t){o(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}exports.bytes=o;exports.exists=s;exports.isBytes=n;exports.number=i;exports.output=u;
|
package/dist/index129.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
function i(e) {
|
|
2
|
+
if (!Number.isSafeInteger(e) || e < 0)
|
|
3
|
+
throw new Error(`positive integer expected, not ${e}`);
|
|
4
|
+
}
|
|
5
|
+
function n(e) {
|
|
6
|
+
return e instanceof Uint8Array || e != null && typeof e == "object" && e.constructor.name === "Uint8Array";
|
|
7
|
+
}
|
|
8
|
+
function o(e, ...t) {
|
|
9
|
+
if (!n(e))
|
|
10
|
+
throw new Error("Uint8Array expected");
|
|
11
|
+
if (t.length > 0 && !t.includes(e.length))
|
|
12
|
+
throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`);
|
|
13
|
+
}
|
|
14
|
+
function f(e, t = !0) {
|
|
15
|
+
if (e.destroyed)
|
|
16
|
+
throw new Error("Hash instance has been destroyed");
|
|
17
|
+
if (t && e.finished)
|
|
18
|
+
throw new Error("Hash#digest() has already been called");
|
|
19
|
+
}
|
|
20
|
+
function s(e, t) {
|
|
21
|
+
o(e);
|
|
22
|
+
const r = t.outputLen;
|
|
23
|
+
if (e.length < r)
|
|
24
|
+
throw new Error(`digestInto() expects output buffer of length at least ${r}`);
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
o as bytes,
|
|
28
|
+
f as exists,
|
|
29
|
+
n as isBytes,
|
|
30
|
+
i as number,
|
|
31
|
+
s as output
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=BigInt(2**32-1),i=BigInt(32);function u(t,e=!1){return e?{h:Number(t&n),l:Number(t>>i&n)}:{h:Number(t>>i&n)|0,l:Number(t&n)|0}}function g(t,e=!1){let r=new Uint32Array(t.length),l=new Uint32Array(t.length);for(let o=0;o<t.length;o++){const{h:c,l:f}=u(t[o],e);[r[o],l[o]]=[c,f]}return[r,l]}const B=(t,e,r)=>t<<r|e>>>32-r,h=(t,e,r)=>e<<r|t>>>32-r,m=(t,e,r)=>e<<r-32|t>>>64-r,S=(t,e,r)=>t<<r-32|e>>>64-r;exports.fromBig=u;exports.rotlBH=m;exports.rotlBL=S;exports.rotlSH=B;exports.rotlSL=h;exports.split=g;
|
package/dist/index130.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const o = /* @__PURE__ */ BigInt(4294967295), i = /* @__PURE__ */ BigInt(32);
|
|
2
|
+
function f(t, r = !1) {
|
|
3
|
+
return r ? { h: Number(t & o), l: Number(t >> i & o) } : { h: Number(t >> i & o) | 0, l: Number(t & o) | 0 };
|
|
4
|
+
}
|
|
5
|
+
function h(t, r = !1) {
|
|
6
|
+
let n = new Uint32Array(t.length), l = new Uint32Array(t.length);
|
|
7
|
+
for (let e = 0; e < t.length; e++) {
|
|
8
|
+
const { h: c, l: u } = f(t[e], r);
|
|
9
|
+
[n[e], l[e]] = [c, u];
|
|
10
|
+
}
|
|
11
|
+
return [n, l];
|
|
12
|
+
}
|
|
13
|
+
const g = (t, r, n) => t << n | r >>> 32 - n, m = (t, r, n) => r << n | t >>> 32 - n, A = (t, r, n) => r << n - 32 | t >>> 64 - n, B = (t, r, n) => t << n - 32 | r >>> 64 - n;
|
|
14
|
+
export {
|
|
15
|
+
f as fromBig,
|
|
16
|
+
A as rotlBH,
|
|
17
|
+
B as rotlBL,
|
|
18
|
+
g as rotlSH,
|
|
19
|
+
m as rotlSL,
|
|
20
|
+
h as split
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
|
package/dist/index131.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("./index53.cjs"),ge=require("./index139.cjs"),_e=require("./index140.cjs");require("./index82.cjs");const ye=require("./index121.cjs"),ve=require("./index141.cjs"),we=require("./index142.cjs"),me=require("./index143.cjs");require("./index144.cjs");const Re=require("./index99.cjs"),Y=require("./index134.cjs");require("./index122.cjs");const Se=require("./index145.cjs"),Ee=require("./index146.cjs"),Me=require("./index83.cjs"),X=require("./index123.cjs"),Le=require("./index147.cjs");var x,$;function Te(){if($)return x;$=1,x=o;var l;o.ReadableState=W,ge.eventsExports.EventEmitter;var O=function(e,t){return e.listeners(t).length},c=_e.streamBrowser,_=Me.__exports.Buffer,z=(typeof V.commonjsGlobal<"u"?V.commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function J(r){return _.from(r)}function K(r){return _.isBuffer(r)||r instanceof z}var m=ye,n;m&&m.debuglog?n=m.debuglog("stream"):n=function(){};var Q=ve.__require(),R=we.destroy_1,Z=me.state,ee=Z.getHighWaterMark,y=Le.__exports.codes,re=y.ERR_INVALID_ARG_TYPE,te=y.ERR_STREAM_PUSH_AFTER_EOF,ie=y.ERR_METHOD_NOT_IMPLEMENTED,ne=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,s,S,E;Re.inherits_browserExports(o,c);var b=R.errorOrDestroy,M=["error","close","destroy","pause","resume"];function ae(r,e,t){if(typeof r.prependListener=="function")return r.prependListener(e,t);!r._events||!r._events[e]?r.on(e,t):Array.isArray(r._events[e])?r._events[e].unshift(t):r._events[e]=[t,r._events[e]]}function W(r,e,t){l=l||Y.__require(),r=r||{},typeof t!="boolean"&&(t=e instanceof l),this.objectMode=!!r.objectMode,t&&(this.objectMode=this.objectMode||!!r.readableObjectMode),this.highWaterMark=ee(this,r,"readableHighWaterMark",t),this.buffer=new Q,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=r.emitClose!==!1,this.autoDestroy=!!r.autoDestroy,this.destroyed=!1,this.defaultEncoding=r.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,r.encoding&&(s||(s=X.__exports.StringDecoder),this.decoder=new s(r.encoding),this.encoding=r.encoding)}function o(r){if(l=l||Y.__require(),!(this instanceof o))return new o(r);var e=this instanceof l;this._readableState=new W(r,this,e),this.readable=!0,r&&(typeof r.read=="function"&&(this._read=r.read),typeof r.destroy=="function"&&(this._destroy=r.destroy)),c.call(this)}Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),o.prototype.destroy=R.destroy,o.prototype._undestroy=R.undestroy,o.prototype._destroy=function(r,e){e(r)},o.prototype.push=function(r,e){var t=this._readableState,i;return t.objectMode?i=!0:typeof r=="string"&&(e=e||t.defaultEncoding,e!==t.encoding&&(r=_.from(r,e),e=""),i=!0),N(this,r,e,!1,i)},o.prototype.unshift=function(r){return N(this,r,null,!0,!1)};function N(r,e,t,i,f){n("readableAddChunk",e);var a=r._readableState;if(e===null)a.reading=!1,fe(r,a);else{var d;if(f||(d=oe(a,e)),d)b(r,d);else if(a.objectMode||e&&e.length>0)if(typeof e!="string"&&!a.objectMode&&Object.getPrototypeOf(e)!==_.prototype&&(e=J(e)),i)a.endEmitted?b(r,new ne):L(r,a,e,!0);else if(a.ended)b(r,new te);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!t?(e=a.decoder.write(e),a.objectMode||e.length!==0?L(r,a,e,!1):T(r,a)):L(r,a,e,!1)}else i||(a.reading=!1,T(r,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function L(r,e,t,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,r.emit("data",t)):(e.length+=e.objectMode?1:t.length,i?e.buffer.unshift(t):e.buffer.push(t),e.needReadable&&v(r)),T(r,e)}function oe(r,e){var t;return!K(e)&&typeof e!="string"&&e!==void 0&&!r.objectMode&&(t=new re("chunk",["string","Buffer","Uint8Array"],e)),t}o.prototype.isPaused=function(){return this._readableState.flowing===!1},o.prototype.setEncoding=function(r){s||(s=X.__exports.StringDecoder);var e=new s(r);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var t=this._readableState.buffer.head,i="";t!==null;)i+=e.write(t.data),t=t.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var P=1073741824;function de(r){return r>=P?r=P:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),r}function U(r,e){return r<=0||e.length===0&&e.ended?0:e.objectMode?1:r!==r?e.flowing&&e.length?e.buffer.head.data.length:e.length:(r>e.highWaterMark&&(e.highWaterMark=de(r)),r<=e.length?r:e.ended?e.length:(e.needReadable=!0,0))}o.prototype.read=function(r){n("read",r),r=parseInt(r,10);var e=this._readableState,t=r;if(r!==0&&(e.emittedReadable=!1),r===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return n("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?j(this):v(this),null;if(r=U(r,e),r===0&&e.ended)return e.length===0&&j(this),null;var i=e.needReadable;n("need readable",i),(e.length===0||e.length-r<e.highWaterMark)&&(i=!0,n("length less than watermark",i)),e.ended||e.reading?(i=!1,n("reading or ended",i)):i&&(n("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(r=U(t,e)));var f;return r>0?f=I(r,e):f=null,f===null?(e.needReadable=e.length<=e.highWaterMark,r=0):(e.length-=r,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),t!==r&&e.ended&&j(this)),f!==null&&this.emit("data",f),f};function fe(r,e){if(n("onEofChunk"),!e.ended){if(e.decoder){var t=e.decoder.end();t&&t.length&&(e.buffer.push(t),e.length+=e.objectMode?1:t.length)}e.ended=!0,e.sync?v(r):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,H(r)))}}function v(r){var e=r._readableState;n("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(n("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(H,r))}function H(r){var e=r._readableState;n("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(r.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,D(r)}function T(r,e){e.readingMore||(e.readingMore=!0,process.nextTick(le,r,e))}function le(r,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var t=e.length;if(n("maybeReadMore read 0"),r.read(0),t===e.length)break}e.readingMore=!1}o.prototype._read=function(r){b(this,new ie("_read()"))},o.prototype.pipe=function(r,e){var t=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=r;break;case 1:i.pipes=[i.pipes,r];break;default:i.pipes.push(r);break}i.pipesCount+=1,n("pipe count=%d opts=%j",i.pipesCount,e);var f=(!e||e.end!==!1)&&r!==process.stdout&&r!==process.stderr,a=f?u:g;i.endEmitted?process.nextTick(a):t.once("end",a),r.on("unpipe",d);function d(p,h){n("onunpipe"),p===t&&h&&h.hasUnpiped===!1&&(h.hasUnpiped=!0,be())}function u(){n("onend"),r.end()}var w=se(t);r.on("drain",w);var k=!1;function be(){n("cleanup"),r.removeListener("close",C),r.removeListener("finish",A),r.removeListener("drain",w),r.removeListener("error",q),r.removeListener("unpipe",d),t.removeListener("end",u),t.removeListener("end",g),t.removeListener("data",G),k=!0,i.awaitDrain&&(!r._writableState||r._writableState.needDrain)&&w()}t.on("data",G);function G(p){n("ondata");var h=r.write(p);n("dest.write",h),h===!1&&((i.pipesCount===1&&i.pipes===r||i.pipesCount>1&&F(i.pipes,r)!==-1)&&!k&&(n("false write response, pause",i.awaitDrain),i.awaitDrain++),t.pause())}function q(p){n("onerror",p),g(),r.removeListener("error",q),O(r,"error")===0&&b(r,p)}ae(r,"error",q);function C(){r.removeListener("finish",A),g()}r.once("close",C);function A(){n("onfinish"),r.removeListener("close",C),g()}r.once("finish",A);function g(){n("unpipe"),t.unpipe(r)}return r.emit("pipe",t),i.flowing||(n("pipe resume"),t.resume()),r};function se(r){return function(){var t=r._readableState;n("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&O(r,"data")&&(t.flowing=!0,D(r))}}o.prototype.unpipe=function(r){var e=this._readableState,t={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return r&&r!==e.pipes?this:(r||(r=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,r&&r.emit("unpipe",this,t),this);if(!r){var i=e.pipes,f=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<f;a++)i[a].emit("unpipe",this,{hasUnpiped:!1});return this}var d=F(e.pipes,r);return d===-1?this:(e.pipes.splice(d,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),r.emit("unpipe",this,t),this)},o.prototype.on=function(r,e){var t=c.prototype.on.call(this,r,e),i=this._readableState;return r==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):r==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,n("on readable",i.length,i.reading),i.length?v(this):i.reading||process.nextTick(ue,this)),t},o.prototype.addListener=o.prototype.on,o.prototype.removeListener=function(r,e){var t=c.prototype.removeListener.call(this,r,e);return r==="readable"&&process.nextTick(B,this),t},o.prototype.removeAllListeners=function(r){var e=c.prototype.removeAllListeners.apply(this,arguments);return(r==="readable"||r===void 0)&&process.nextTick(B,this),e};function B(r){var e=r._readableState;e.readableListening=r.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:r.listenerCount("data")>0&&r.resume()}function ue(r){n("readable nexttick read 0"),r.read(0)}o.prototype.resume=function(){var r=this._readableState;return r.flowing||(n("resume"),r.flowing=!r.readableListening,pe(this,r)),r.paused=!1,this};function pe(r,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(he,r,e))}function he(r,e){n("resume",e.reading),e.reading||r.read(0),e.resumeScheduled=!1,r.emit("resume"),D(r),e.flowing&&!e.reading&&r.read(0)}o.prototype.pause=function(){return n("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(n("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function D(r){var e=r._readableState;for(n("flow",e.flowing);e.flowing&&r.read()!==null;);}o.prototype.wrap=function(r){var e=this,t=this._readableState,i=!1;r.on("end",function(){if(n("wrapped end"),t.decoder&&!t.ended){var d=t.decoder.end();d&&d.length&&e.push(d)}e.push(null)}),r.on("data",function(d){if(n("wrapped data"),t.decoder&&(d=t.decoder.write(d)),!(t.objectMode&&d==null)&&!(!t.objectMode&&(!d||!d.length))){var u=e.push(d);u||(i=!0,r.pause())}});for(var f in r)this[f]===void 0&&typeof r[f]=="function"&&(this[f]=function(u){return function(){return r[u].apply(r,arguments)}}(f));for(var a=0;a<M.length;a++)r.on(M[a],this.emit.bind(this,M[a]));return this._read=function(d){n("wrapped _read",d),i&&(i=!1,r.resume())},this},typeof Symbol=="function"&&(o.prototype[Symbol.asyncIterator]=function(){return S===void 0&&(S=Se.__require()),S(this)}),Object.defineProperty(o.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(o.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(o.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),o._fromList=I,Object.defineProperty(o.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function I(r,e){if(e.length===0)return null;var t;return e.objectMode?t=e.buffer.shift():!r||r>=e.length?(e.decoder?t=e.buffer.join(""):e.buffer.length===1?t=e.buffer.first():t=e.buffer.concat(e.length),e.buffer.clear()):t=e.buffer.consume(r,e.decoder),t}function j(r){var e=r._readableState;n("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(ce,e,r))}function ce(r,e){if(n("endReadableNT",r.endEmitted,r.length),!r.endEmitted&&r.length===0&&(r.endEmitted=!0,e.readable=!1,e.emit("end"),r.autoDestroy)){var t=e._writableState;(!t||t.autoDestroy&&t.finished)&&e.destroy()}}typeof Symbol=="function"&&(o.from=function(r,e){return E===void 0&&(E=Ee.__require()),E(o,r,e)});function F(r,e){for(var t=0,i=r.length;t<i;t++)if(r[t]===e)return t;return-1}return x}exports.__require=Te;
|
package/dist/index132.js
ADDED
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import { commonjsGlobal as G } from "./index53.js";
|
|
2
|
+
import { e as ge } from "./index139.js";
|
|
3
|
+
import { s as _e } from "./index140.js";
|
|
4
|
+
import "./index82.js";
|
|
5
|
+
import me from "./index121.js";
|
|
6
|
+
import { __require as ye } from "./index141.js";
|
|
7
|
+
import { d as ve } from "./index142.js";
|
|
8
|
+
import { s as we } from "./index143.js";
|
|
9
|
+
import "./index144.js";
|
|
10
|
+
import { i as Re } from "./index99.js";
|
|
11
|
+
import { __require as $ } from "./index134.js";
|
|
12
|
+
import "./index122.js";
|
|
13
|
+
import { __require as Se } from "./index145.js";
|
|
14
|
+
import { __require as Ee } from "./index146.js";
|
|
15
|
+
import { __exports as Me } from "./index83.js";
|
|
16
|
+
import { __exports as Y } from "./index123.js";
|
|
17
|
+
import { __exports as Le } from "./index147.js";
|
|
18
|
+
var O, X;
|
|
19
|
+
function Ve() {
|
|
20
|
+
if (X) return O;
|
|
21
|
+
X = 1, O = o;
|
|
22
|
+
var l;
|
|
23
|
+
o.ReadableState = N, ge.EventEmitter;
|
|
24
|
+
var W = function(e, i) {
|
|
25
|
+
return e.listeners(i).length;
|
|
26
|
+
}, b = _e, _ = Me.Buffer, z = (typeof G < "u" ? G : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
|
|
27
|
+
};
|
|
28
|
+
function J(r) {
|
|
29
|
+
return _.from(r);
|
|
30
|
+
}
|
|
31
|
+
function K(r) {
|
|
32
|
+
return _.isBuffer(r) || r instanceof z;
|
|
33
|
+
}
|
|
34
|
+
var w = me, n;
|
|
35
|
+
w && w.debuglog ? n = w.debuglog("stream") : n = function() {
|
|
36
|
+
};
|
|
37
|
+
var Q = ye(), R = ve, Z = we, ee = Z.getHighWaterMark, m = Le.codes, re = m.ERR_INVALID_ARG_TYPE, ie = m.ERR_STREAM_PUSH_AFTER_EOF, te = m.ERR_METHOD_NOT_IMPLEMENTED, ne = m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, s, S, E;
|
|
38
|
+
Re(o, b);
|
|
39
|
+
var c = R.errorOrDestroy, M = ["error", "close", "destroy", "pause", "resume"];
|
|
40
|
+
function ae(r, e, i) {
|
|
41
|
+
if (typeof r.prependListener == "function") return r.prependListener(e, i);
|
|
42
|
+
!r._events || !r._events[e] ? r.on(e, i) : Array.isArray(r._events[e]) ? r._events[e].unshift(i) : r._events[e] = [i, r._events[e]];
|
|
43
|
+
}
|
|
44
|
+
function N(r, e, i) {
|
|
45
|
+
l = l || $(), r = r || {}, typeof i != "boolean" && (i = e instanceof l), this.objectMode = !!r.objectMode, i && (this.objectMode = this.objectMode || !!r.readableObjectMode), this.highWaterMark = ee(this, r, "readableHighWaterMark", i), this.buffer = new Q(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.paused = !0, this.emitClose = r.emitClose !== !1, this.autoDestroy = !!r.autoDestroy, this.destroyed = !1, this.defaultEncoding = r.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, r.encoding && (s || (s = Y.StringDecoder), this.decoder = new s(r.encoding), this.encoding = r.encoding);
|
|
46
|
+
}
|
|
47
|
+
function o(r) {
|
|
48
|
+
if (l = l || $(), !(this instanceof o)) return new o(r);
|
|
49
|
+
var e = this instanceof l;
|
|
50
|
+
this._readableState = new N(r, this, e), this.readable = !0, r && (typeof r.read == "function" && (this._read = r.read), typeof r.destroy == "function" && (this._destroy = r.destroy)), b.call(this);
|
|
51
|
+
}
|
|
52
|
+
Object.defineProperty(o.prototype, "destroyed", {
|
|
53
|
+
// making it explicit this property is not enumerable
|
|
54
|
+
// because otherwise some prototype manipulation in
|
|
55
|
+
// userland will fail
|
|
56
|
+
enumerable: !1,
|
|
57
|
+
get: function() {
|
|
58
|
+
return this._readableState === void 0 ? !1 : this._readableState.destroyed;
|
|
59
|
+
},
|
|
60
|
+
set: function(e) {
|
|
61
|
+
this._readableState && (this._readableState.destroyed = e);
|
|
62
|
+
}
|
|
63
|
+
}), o.prototype.destroy = R.destroy, o.prototype._undestroy = R.undestroy, o.prototype._destroy = function(r, e) {
|
|
64
|
+
e(r);
|
|
65
|
+
}, o.prototype.push = function(r, e) {
|
|
66
|
+
var i = this._readableState, t;
|
|
67
|
+
return i.objectMode ? t = !0 : typeof r == "string" && (e = e || i.defaultEncoding, e !== i.encoding && (r = _.from(r, e), e = ""), t = !0), q(this, r, e, !1, t);
|
|
68
|
+
}, o.prototype.unshift = function(r) {
|
|
69
|
+
return q(this, r, null, !0, !1);
|
|
70
|
+
};
|
|
71
|
+
function q(r, e, i, t, f) {
|
|
72
|
+
n("readableAddChunk", e);
|
|
73
|
+
var a = r._readableState;
|
|
74
|
+
if (e === null)
|
|
75
|
+
a.reading = !1, fe(r, a);
|
|
76
|
+
else {
|
|
77
|
+
var d;
|
|
78
|
+
if (f || (d = oe(a, e)), d)
|
|
79
|
+
c(r, d);
|
|
80
|
+
else if (a.objectMode || e && e.length > 0)
|
|
81
|
+
if (typeof e != "string" && !a.objectMode && Object.getPrototypeOf(e) !== _.prototype && (e = J(e)), t)
|
|
82
|
+
a.endEmitted ? c(r, new ne()) : L(r, a, e, !0);
|
|
83
|
+
else if (a.ended)
|
|
84
|
+
c(r, new ie());
|
|
85
|
+
else {
|
|
86
|
+
if (a.destroyed)
|
|
87
|
+
return !1;
|
|
88
|
+
a.reading = !1, a.decoder && !i ? (e = a.decoder.write(e), a.objectMode || e.length !== 0 ? L(r, a, e, !1) : T(r, a)) : L(r, a, e, !1);
|
|
89
|
+
}
|
|
90
|
+
else t || (a.reading = !1, T(r, a));
|
|
91
|
+
}
|
|
92
|
+
return !a.ended && (a.length < a.highWaterMark || a.length === 0);
|
|
93
|
+
}
|
|
94
|
+
function L(r, e, i, t) {
|
|
95
|
+
e.flowing && e.length === 0 && !e.sync ? (e.awaitDrain = 0, r.emit("data", i)) : (e.length += e.objectMode ? 1 : i.length, t ? e.buffer.unshift(i) : e.buffer.push(i), e.needReadable && y(r)), T(r, e);
|
|
96
|
+
}
|
|
97
|
+
function oe(r, e) {
|
|
98
|
+
var i;
|
|
99
|
+
return !K(e) && typeof e != "string" && e !== void 0 && !r.objectMode && (i = new re("chunk", ["string", "Buffer", "Uint8Array"], e)), i;
|
|
100
|
+
}
|
|
101
|
+
o.prototype.isPaused = function() {
|
|
102
|
+
return this._readableState.flowing === !1;
|
|
103
|
+
}, o.prototype.setEncoding = function(r) {
|
|
104
|
+
s || (s = Y.StringDecoder);
|
|
105
|
+
var e = new s(r);
|
|
106
|
+
this._readableState.decoder = e, this._readableState.encoding = this._readableState.decoder.encoding;
|
|
107
|
+
for (var i = this._readableState.buffer.head, t = ""; i !== null; )
|
|
108
|
+
t += e.write(i.data), i = i.next;
|
|
109
|
+
return this._readableState.buffer.clear(), t !== "" && this._readableState.buffer.push(t), this._readableState.length = t.length, this;
|
|
110
|
+
};
|
|
111
|
+
var P = 1073741824;
|
|
112
|
+
function de(r) {
|
|
113
|
+
return r >= P ? r = P : (r--, r |= r >>> 1, r |= r >>> 2, r |= r >>> 4, r |= r >>> 8, r |= r >>> 16, r++), r;
|
|
114
|
+
}
|
|
115
|
+
function U(r, e) {
|
|
116
|
+
return r <= 0 || e.length === 0 && e.ended ? 0 : e.objectMode ? 1 : r !== r ? e.flowing && e.length ? e.buffer.head.data.length : e.length : (r > e.highWaterMark && (e.highWaterMark = de(r)), r <= e.length ? r : e.ended ? e.length : (e.needReadable = !0, 0));
|
|
117
|
+
}
|
|
118
|
+
o.prototype.read = function(r) {
|
|
119
|
+
n("read", r), r = parseInt(r, 10);
|
|
120
|
+
var e = this._readableState, i = r;
|
|
121
|
+
if (r !== 0 && (e.emittedReadable = !1), r === 0 && e.needReadable && ((e.highWaterMark !== 0 ? e.length >= e.highWaterMark : e.length > 0) || e.ended))
|
|
122
|
+
return n("read: emitReadable", e.length, e.ended), e.length === 0 && e.ended ? C(this) : y(this), null;
|
|
123
|
+
if (r = U(r, e), r === 0 && e.ended)
|
|
124
|
+
return e.length === 0 && C(this), null;
|
|
125
|
+
var t = e.needReadable;
|
|
126
|
+
n("need readable", t), (e.length === 0 || e.length - r < e.highWaterMark) && (t = !0, n("length less than watermark", t)), e.ended || e.reading ? (t = !1, n("reading or ended", t)) : t && (n("do read"), e.reading = !0, e.sync = !0, e.length === 0 && (e.needReadable = !0), this._read(e.highWaterMark), e.sync = !1, e.reading || (r = U(i, e)));
|
|
127
|
+
var f;
|
|
128
|
+
return r > 0 ? f = I(r, e) : f = null, f === null ? (e.needReadable = e.length <= e.highWaterMark, r = 0) : (e.length -= r, e.awaitDrain = 0), e.length === 0 && (e.ended || (e.needReadable = !0), i !== r && e.ended && C(this)), f !== null && this.emit("data", f), f;
|
|
129
|
+
};
|
|
130
|
+
function fe(r, e) {
|
|
131
|
+
if (n("onEofChunk"), !e.ended) {
|
|
132
|
+
if (e.decoder) {
|
|
133
|
+
var i = e.decoder.end();
|
|
134
|
+
i && i.length && (e.buffer.push(i), e.length += e.objectMode ? 1 : i.length);
|
|
135
|
+
}
|
|
136
|
+
e.ended = !0, e.sync ? y(r) : (e.needReadable = !1, e.emittedReadable || (e.emittedReadable = !0, F(r)));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
function y(r) {
|
|
140
|
+
var e = r._readableState;
|
|
141
|
+
n("emitReadable", e.needReadable, e.emittedReadable), e.needReadable = !1, e.emittedReadable || (n("emitReadable", e.flowing), e.emittedReadable = !0, process.nextTick(F, r));
|
|
142
|
+
}
|
|
143
|
+
function F(r) {
|
|
144
|
+
var e = r._readableState;
|
|
145
|
+
n("emitReadable_", e.destroyed, e.length, e.ended), !e.destroyed && (e.length || e.ended) && (r.emit("readable"), e.emittedReadable = !1), e.needReadable = !e.flowing && !e.ended && e.length <= e.highWaterMark, D(r);
|
|
146
|
+
}
|
|
147
|
+
function T(r, e) {
|
|
148
|
+
e.readingMore || (e.readingMore = !0, process.nextTick(le, r, e));
|
|
149
|
+
}
|
|
150
|
+
function le(r, e) {
|
|
151
|
+
for (; !e.reading && !e.ended && (e.length < e.highWaterMark || e.flowing && e.length === 0); ) {
|
|
152
|
+
var i = e.length;
|
|
153
|
+
if (n("maybeReadMore read 0"), r.read(0), i === e.length)
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
e.readingMore = !1;
|
|
157
|
+
}
|
|
158
|
+
o.prototype._read = function(r) {
|
|
159
|
+
c(this, new te("_read()"));
|
|
160
|
+
}, o.prototype.pipe = function(r, e) {
|
|
161
|
+
var i = this, t = this._readableState;
|
|
162
|
+
switch (t.pipesCount) {
|
|
163
|
+
case 0:
|
|
164
|
+
t.pipes = r;
|
|
165
|
+
break;
|
|
166
|
+
case 1:
|
|
167
|
+
t.pipes = [t.pipes, r];
|
|
168
|
+
break;
|
|
169
|
+
default:
|
|
170
|
+
t.pipes.push(r);
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
t.pipesCount += 1, n("pipe count=%d opts=%j", t.pipesCount, e);
|
|
174
|
+
var f = (!e || e.end !== !1) && r !== process.stdout && r !== process.stderr, a = f ? u : g;
|
|
175
|
+
t.endEmitted ? process.nextTick(a) : i.once("end", a), r.on("unpipe", d);
|
|
176
|
+
function d(p, h) {
|
|
177
|
+
n("onunpipe"), p === i && h && h.hasUnpiped === !1 && (h.hasUnpiped = !0, ce());
|
|
178
|
+
}
|
|
179
|
+
function u() {
|
|
180
|
+
n("onend"), r.end();
|
|
181
|
+
}
|
|
182
|
+
var v = se(i);
|
|
183
|
+
r.on("drain", v);
|
|
184
|
+
var k = !1;
|
|
185
|
+
function ce() {
|
|
186
|
+
n("cleanup"), r.removeListener("close", j), r.removeListener("finish", x), r.removeListener("drain", v), r.removeListener("error", A), r.removeListener("unpipe", d), i.removeListener("end", u), i.removeListener("end", g), i.removeListener("data", V), k = !0, t.awaitDrain && (!r._writableState || r._writableState.needDrain) && v();
|
|
187
|
+
}
|
|
188
|
+
i.on("data", V);
|
|
189
|
+
function V(p) {
|
|
190
|
+
n("ondata");
|
|
191
|
+
var h = r.write(p);
|
|
192
|
+
n("dest.write", h), h === !1 && ((t.pipesCount === 1 && t.pipes === r || t.pipesCount > 1 && B(t.pipes, r) !== -1) && !k && (n("false write response, pause", t.awaitDrain), t.awaitDrain++), i.pause());
|
|
193
|
+
}
|
|
194
|
+
function A(p) {
|
|
195
|
+
n("onerror", p), g(), r.removeListener("error", A), W(r, "error") === 0 && c(r, p);
|
|
196
|
+
}
|
|
197
|
+
ae(r, "error", A);
|
|
198
|
+
function j() {
|
|
199
|
+
r.removeListener("finish", x), g();
|
|
200
|
+
}
|
|
201
|
+
r.once("close", j);
|
|
202
|
+
function x() {
|
|
203
|
+
n("onfinish"), r.removeListener("close", j), g();
|
|
204
|
+
}
|
|
205
|
+
r.once("finish", x);
|
|
206
|
+
function g() {
|
|
207
|
+
n("unpipe"), i.unpipe(r);
|
|
208
|
+
}
|
|
209
|
+
return r.emit("pipe", i), t.flowing || (n("pipe resume"), i.resume()), r;
|
|
210
|
+
};
|
|
211
|
+
function se(r) {
|
|
212
|
+
return function() {
|
|
213
|
+
var i = r._readableState;
|
|
214
|
+
n("pipeOnDrain", i.awaitDrain), i.awaitDrain && i.awaitDrain--, i.awaitDrain === 0 && W(r, "data") && (i.flowing = !0, D(r));
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
o.prototype.unpipe = function(r) {
|
|
218
|
+
var e = this._readableState, i = {
|
|
219
|
+
hasUnpiped: !1
|
|
220
|
+
};
|
|
221
|
+
if (e.pipesCount === 0) return this;
|
|
222
|
+
if (e.pipesCount === 1)
|
|
223
|
+
return r && r !== e.pipes ? this : (r || (r = e.pipes), e.pipes = null, e.pipesCount = 0, e.flowing = !1, r && r.emit("unpipe", this, i), this);
|
|
224
|
+
if (!r) {
|
|
225
|
+
var t = e.pipes, f = e.pipesCount;
|
|
226
|
+
e.pipes = null, e.pipesCount = 0, e.flowing = !1;
|
|
227
|
+
for (var a = 0; a < f; a++) t[a].emit("unpipe", this, {
|
|
228
|
+
hasUnpiped: !1
|
|
229
|
+
});
|
|
230
|
+
return this;
|
|
231
|
+
}
|
|
232
|
+
var d = B(e.pipes, r);
|
|
233
|
+
return d === -1 ? this : (e.pipes.splice(d, 1), e.pipesCount -= 1, e.pipesCount === 1 && (e.pipes = e.pipes[0]), r.emit("unpipe", this, i), this);
|
|
234
|
+
}, o.prototype.on = function(r, e) {
|
|
235
|
+
var i = b.prototype.on.call(this, r, e), t = this._readableState;
|
|
236
|
+
return r === "data" ? (t.readableListening = this.listenerCount("readable") > 0, t.flowing !== !1 && this.resume()) : r === "readable" && !t.endEmitted && !t.readableListening && (t.readableListening = t.needReadable = !0, t.flowing = !1, t.emittedReadable = !1, n("on readable", t.length, t.reading), t.length ? y(this) : t.reading || process.nextTick(ue, this)), i;
|
|
237
|
+
}, o.prototype.addListener = o.prototype.on, o.prototype.removeListener = function(r, e) {
|
|
238
|
+
var i = b.prototype.removeListener.call(this, r, e);
|
|
239
|
+
return r === "readable" && process.nextTick(H, this), i;
|
|
240
|
+
}, o.prototype.removeAllListeners = function(r) {
|
|
241
|
+
var e = b.prototype.removeAllListeners.apply(this, arguments);
|
|
242
|
+
return (r === "readable" || r === void 0) && process.nextTick(H, this), e;
|
|
243
|
+
};
|
|
244
|
+
function H(r) {
|
|
245
|
+
var e = r._readableState;
|
|
246
|
+
e.readableListening = r.listenerCount("readable") > 0, e.resumeScheduled && !e.paused ? e.flowing = !0 : r.listenerCount("data") > 0 && r.resume();
|
|
247
|
+
}
|
|
248
|
+
function ue(r) {
|
|
249
|
+
n("readable nexttick read 0"), r.read(0);
|
|
250
|
+
}
|
|
251
|
+
o.prototype.resume = function() {
|
|
252
|
+
var r = this._readableState;
|
|
253
|
+
return r.flowing || (n("resume"), r.flowing = !r.readableListening, pe(this, r)), r.paused = !1, this;
|
|
254
|
+
};
|
|
255
|
+
function pe(r, e) {
|
|
256
|
+
e.resumeScheduled || (e.resumeScheduled = !0, process.nextTick(he, r, e));
|
|
257
|
+
}
|
|
258
|
+
function he(r, e) {
|
|
259
|
+
n("resume", e.reading), e.reading || r.read(0), e.resumeScheduled = !1, r.emit("resume"), D(r), e.flowing && !e.reading && r.read(0);
|
|
260
|
+
}
|
|
261
|
+
o.prototype.pause = function() {
|
|
262
|
+
return n("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (n("pause"), this._readableState.flowing = !1, this.emit("pause")), this._readableState.paused = !0, this;
|
|
263
|
+
};
|
|
264
|
+
function D(r) {
|
|
265
|
+
var e = r._readableState;
|
|
266
|
+
for (n("flow", e.flowing); e.flowing && r.read() !== null; ) ;
|
|
267
|
+
}
|
|
268
|
+
o.prototype.wrap = function(r) {
|
|
269
|
+
var e = this, i = this._readableState, t = !1;
|
|
270
|
+
r.on("end", function() {
|
|
271
|
+
if (n("wrapped end"), i.decoder && !i.ended) {
|
|
272
|
+
var d = i.decoder.end();
|
|
273
|
+
d && d.length && e.push(d);
|
|
274
|
+
}
|
|
275
|
+
e.push(null);
|
|
276
|
+
}), r.on("data", function(d) {
|
|
277
|
+
if (n("wrapped data"), i.decoder && (d = i.decoder.write(d)), !(i.objectMode && d == null) && !(!i.objectMode && (!d || !d.length))) {
|
|
278
|
+
var u = e.push(d);
|
|
279
|
+
u || (t = !0, r.pause());
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
for (var f in r)
|
|
283
|
+
this[f] === void 0 && typeof r[f] == "function" && (this[f] = /* @__PURE__ */ function(u) {
|
|
284
|
+
return function() {
|
|
285
|
+
return r[u].apply(r, arguments);
|
|
286
|
+
};
|
|
287
|
+
}(f));
|
|
288
|
+
for (var a = 0; a < M.length; a++)
|
|
289
|
+
r.on(M[a], this.emit.bind(this, M[a]));
|
|
290
|
+
return this._read = function(d) {
|
|
291
|
+
n("wrapped _read", d), t && (t = !1, r.resume());
|
|
292
|
+
}, this;
|
|
293
|
+
}, typeof Symbol == "function" && (o.prototype[Symbol.asyncIterator] = function() {
|
|
294
|
+
return S === void 0 && (S = Se()), S(this);
|
|
295
|
+
}), Object.defineProperty(o.prototype, "readableHighWaterMark", {
|
|
296
|
+
// making it explicit this property is not enumerable
|
|
297
|
+
// because otherwise some prototype manipulation in
|
|
298
|
+
// userland will fail
|
|
299
|
+
enumerable: !1,
|
|
300
|
+
get: function() {
|
|
301
|
+
return this._readableState.highWaterMark;
|
|
302
|
+
}
|
|
303
|
+
}), Object.defineProperty(o.prototype, "readableBuffer", {
|
|
304
|
+
// making it explicit this property is not enumerable
|
|
305
|
+
// because otherwise some prototype manipulation in
|
|
306
|
+
// userland will fail
|
|
307
|
+
enumerable: !1,
|
|
308
|
+
get: function() {
|
|
309
|
+
return this._readableState && this._readableState.buffer;
|
|
310
|
+
}
|
|
311
|
+
}), Object.defineProperty(o.prototype, "readableFlowing", {
|
|
312
|
+
// making it explicit this property is not enumerable
|
|
313
|
+
// because otherwise some prototype manipulation in
|
|
314
|
+
// userland will fail
|
|
315
|
+
enumerable: !1,
|
|
316
|
+
get: function() {
|
|
317
|
+
return this._readableState.flowing;
|
|
318
|
+
},
|
|
319
|
+
set: function(e) {
|
|
320
|
+
this._readableState && (this._readableState.flowing = e);
|
|
321
|
+
}
|
|
322
|
+
}), o._fromList = I, Object.defineProperty(o.prototype, "readableLength", {
|
|
323
|
+
// making it explicit this property is not enumerable
|
|
324
|
+
// because otherwise some prototype manipulation in
|
|
325
|
+
// userland will fail
|
|
326
|
+
enumerable: !1,
|
|
327
|
+
get: function() {
|
|
328
|
+
return this._readableState.length;
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
function I(r, e) {
|
|
332
|
+
if (e.length === 0) return null;
|
|
333
|
+
var i;
|
|
334
|
+
return e.objectMode ? i = e.buffer.shift() : !r || r >= e.length ? (e.decoder ? i = e.buffer.join("") : e.buffer.length === 1 ? i = e.buffer.first() : i = e.buffer.concat(e.length), e.buffer.clear()) : i = e.buffer.consume(r, e.decoder), i;
|
|
335
|
+
}
|
|
336
|
+
function C(r) {
|
|
337
|
+
var e = r._readableState;
|
|
338
|
+
n("endReadable", e.endEmitted), e.endEmitted || (e.ended = !0, process.nextTick(be, e, r));
|
|
339
|
+
}
|
|
340
|
+
function be(r, e) {
|
|
341
|
+
if (n("endReadableNT", r.endEmitted, r.length), !r.endEmitted && r.length === 0 && (r.endEmitted = !0, e.readable = !1, e.emit("end"), r.autoDestroy)) {
|
|
342
|
+
var i = e._writableState;
|
|
343
|
+
(!i || i.autoDestroy && i.finished) && e.destroy();
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
typeof Symbol == "function" && (o.from = function(r, e) {
|
|
347
|
+
return E === void 0 && (E = Ee()), E(o, r, e);
|
|
348
|
+
});
|
|
349
|
+
function B(r, e) {
|
|
350
|
+
for (var i = 0, t = r.length; i < t; i++)
|
|
351
|
+
if (r[i] === e) return i;
|
|
352
|
+
return -1;
|
|
353
|
+
}
|
|
354
|
+
return O;
|
|
355
|
+
}
|
|
356
|
+
export {
|
|
357
|
+
Ve as __require
|
|
358
|
+
};
|