@gardenfi/core 0.2.0-beta.12 → 0.2.0-beta.13
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 +6 -6
- package/dist/index.js +459 -442
- package/dist/src/lib/evm/htlc/evmHTLC.d.ts +54 -54
- package/dist/src/lib/utils.d.ts +17157 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var nt = (e, t, r) =>
|
|
1
|
+
var _i = Object.defineProperty;
|
|
2
|
+
var gi = (e, t, r) => t in e ? _i(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var nt = (e, t, r) => gi(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
4
|
import { Ok as se, Err as H, Fetcher as Ht, trim0x as ze } from "@catalogfi/utils";
|
|
5
|
-
import { EthereumLocalnet as
|
|
6
|
-
import { Url as
|
|
7
|
-
import { getContract as
|
|
8
|
-
import * as
|
|
5
|
+
import { EthereumLocalnet as wi, ArbitrumLocalnet as mi, Orderbook as vi, isMainnet as kt, isBitcoin as Lt, getBlockchainType as Ot, BlockchainType as We } from "@gardenfi/orderbook";
|
|
6
|
+
import { Url as An, fetchEVMBlockNumber as xr, with0x as Dt, checkAllowanceAndApprove as xi, Authorization as Wr, MemoryStorage as Ei, sleep as Bi, fetchBitcoinBlockNumber as qr } from "@gardenfi/utils";
|
|
7
|
+
import { createWalletClient as Kr, http as Gr, getContract as Ri, sha256 as Ft } from "viem";
|
|
8
|
+
import * as Vr from "varuint-bitcoin";
|
|
9
9
|
import * as ft from "tiny-secp256k1";
|
|
10
|
-
import { Urgency as
|
|
10
|
+
import { Urgency as Jr } from "@catalogfi/wallets";
|
|
11
11
|
import * as de from "bitcoinjs-lib";
|
|
12
|
-
import { crypto as
|
|
12
|
+
import { crypto as Si } from "bitcoinjs-lib";
|
|
13
13
|
var Er = /* @__PURE__ */ ((e) => (e[e.evm = 14400] = "evm", e[e.btc = 288] = "btc", e))(Er || {}), Re = /* @__PURE__ */ ((e) => (e.Idle = "Idle", e.Initiate = "Initiate", e.Redeem = "Redeem", e.Refund = "Refund", e))(Re || {});
|
|
14
14
|
function Vt(e) {
|
|
15
15
|
return {
|
|
@@ -19,7 +19,7 @@ function Vt(e) {
|
|
|
19
19
|
...e
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const Ai = /* @__PURE__ */ Vt({
|
|
23
23
|
id: 42161,
|
|
24
24
|
name: "Arbitrum One",
|
|
25
25
|
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -41,7 +41,7 @@ const Ri = /* @__PURE__ */ Vt({
|
|
|
41
41
|
blockCreated: 7654707
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
}),
|
|
44
|
+
}), Ii = /* @__PURE__ */ Vt({
|
|
45
45
|
id: 421614,
|
|
46
46
|
name: "Arbitrum Sepolia",
|
|
47
47
|
nativeCurrency: {
|
|
@@ -68,7 +68,7 @@ const Ri = /* @__PURE__ */ Vt({
|
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
testnet: !0
|
|
71
|
-
}),
|
|
71
|
+
}), Ti = /* @__PURE__ */ Vt({
|
|
72
72
|
id: 1,
|
|
73
73
|
name: "Ethereum",
|
|
74
74
|
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -97,7 +97,7 @@ const Ri = /* @__PURE__ */ Vt({
|
|
|
97
97
|
blockCreated: 14353601
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
}),
|
|
100
|
+
}), Ci = /* @__PURE__ */ Vt({
|
|
101
101
|
id: 11155111,
|
|
102
102
|
name: "Sepolia",
|
|
103
103
|
nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -132,24 +132,24 @@ function Br(e) {
|
|
|
132
132
|
function it(e, t) {
|
|
133
133
|
if (!e) throw new Error(t);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function ki(e) {
|
|
136
136
|
return Buffer.concat([
|
|
137
137
|
Uint8Array.from([192]),
|
|
138
|
-
|
|
138
|
+
Li(e)
|
|
139
139
|
]);
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
const t =
|
|
143
|
-
return
|
|
141
|
+
function Li(e) {
|
|
142
|
+
const t = Vr.encodingLength(e.length), r = Buffer.allocUnsafe(t);
|
|
143
|
+
return Vr.encode(e.length, r), Buffer.concat([r, e]);
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function Oi(e, t) {
|
|
146
146
|
if (e.compare(t) > 0) {
|
|
147
147
|
const r = e;
|
|
148
148
|
e = t, t = r;
|
|
149
149
|
}
|
|
150
150
|
return [e, t];
|
|
151
151
|
}
|
|
152
|
-
const Mt = (e) => e.length === 64 ? e : e.slice(2),
|
|
152
|
+
const Mt = (e) => e.length === 64 ? e : e.slice(2), Fi = (e) => {
|
|
153
153
|
if (!e) return !1;
|
|
154
154
|
try {
|
|
155
155
|
const t = Buffer.from(e, "hex");
|
|
@@ -157,23 +157,40 @@ const Mt = (e) => e.length === 64 ? e : e.slice(2), Li = (e) => {
|
|
|
157
157
|
} catch {
|
|
158
158
|
return !1;
|
|
159
159
|
}
|
|
160
|
-
},
|
|
161
|
-
ethereum:
|
|
162
|
-
ethereum_arbitrum:
|
|
163
|
-
ethereum_sepolia:
|
|
164
|
-
arbitrum_sepolia:
|
|
165
|
-
ethereum_localnet:
|
|
166
|
-
arbitrum_localnet:
|
|
167
|
-
},
|
|
160
|
+
}, Mi = {
|
|
161
|
+
ethereum: Ti,
|
|
162
|
+
ethereum_arbitrum: Ai,
|
|
163
|
+
ethereum_sepolia: Ci,
|
|
164
|
+
arbitrum_sepolia: Ii,
|
|
165
|
+
ethereum_localnet: wi,
|
|
166
|
+
arbitrum_localnet: mi
|
|
167
|
+
}, Xs = async (e, t) => {
|
|
168
168
|
var a;
|
|
169
|
-
const r =
|
|
169
|
+
const r = Mi[e];
|
|
170
170
|
if (r)
|
|
171
171
|
try {
|
|
172
|
-
|
|
172
|
+
if (r.id === ((a = t.chain) == null ? void 0 : a.id))
|
|
173
|
+
return se({ message: "Already on the network", walletClient: t });
|
|
174
|
+
await t.switchChain({ id: r.id });
|
|
175
|
+
const o = Kr({
|
|
176
|
+
account: t.account,
|
|
177
|
+
chain: r,
|
|
178
|
+
transport: Gr()
|
|
179
|
+
});
|
|
180
|
+
return se({ message: "Switched chain", walletClient: o });
|
|
173
181
|
} catch (o) {
|
|
174
|
-
if (
|
|
182
|
+
if (Pi(o))
|
|
175
183
|
try {
|
|
176
|
-
|
|
184
|
+
await t.addChain({ chain: r });
|
|
185
|
+
const f = Kr({
|
|
186
|
+
account: t.account,
|
|
187
|
+
chain: r,
|
|
188
|
+
transport: Gr()
|
|
189
|
+
});
|
|
190
|
+
return se({
|
|
191
|
+
message: "Added network",
|
|
192
|
+
walletClient: f
|
|
193
|
+
});
|
|
177
194
|
} catch {
|
|
178
195
|
return H("Failed to add network");
|
|
179
196
|
}
|
|
@@ -182,9 +199,9 @@ const Mt = (e) => e.length === 64 ? e : e.slice(2), Li = (e) => {
|
|
|
182
199
|
}
|
|
183
200
|
else
|
|
184
201
|
return H("Chain not supported");
|
|
185
|
-
},
|
|
202
|
+
}, Pi = (e) => typeof e == "object" && e !== null && "code" in e && e.code === 4902;
|
|
186
203
|
var ae = /* @__PURE__ */ ((e) => (e.Created = "Created", e.Matched = "Matched", e.InitiateDetected = "InitiateDetected", e.Initiated = "Initiated", e.CounterPartyInitiateDetected = "CounterPartyInitiateDetected", e.CounterPartyInitiated = "CounterPartyInitiated", e.RedeemDetected = "RedeemDetected", e.Redeemed = "Redeemed", e.CounterPartyRedeemDetected = "CounterPartyRedeemDetected", e.CounterPartyRedeemed = "CounterPartyRedeemed", e.Completed = "Completed", e.CounterPartySwapExpired = "CounterPartySwapExpired", e.Expired = "Expired", e.RefundDetected = "RefundDetected", e.Refunded = "Refunded", e.CounterPartyRefundDetected = "CounterPartyRefundDetected", e.CounterPartyRefunded = "CounterPartyRefunded", e.Cancelled = "Cancelled", e))(ae || {}), Z = /* @__PURE__ */ ((e) => (e.Idle = "Idle", e.InitiateDetected = "InitiateDetected", e.Initiated = "Initiated", e.RedeemDetected = "RedeemDetected", e.Redeemed = "Redeemed", e.RefundDetected = "RefundDetected", e.Refunded = "Refunded", e.Expired = "Expired", e))(Z || {});
|
|
187
|
-
const
|
|
204
|
+
const Ni = (e, t, r) => {
|
|
188
205
|
const a = Rr(
|
|
189
206
|
e.source_swap,
|
|
190
207
|
t
|
|
@@ -203,8 +220,8 @@ const Mi = (e, t, r) => {
|
|
|
203
220
|
if (t > r) return Z.Expired;
|
|
204
221
|
}
|
|
205
222
|
return e.initiate_tx_hash ? e.initiate_block_number ? Z.Initiated : Z.InitiateDetected : Z.Idle;
|
|
206
|
-
},
|
|
207
|
-
switch (
|
|
223
|
+
}, Di = (e, t, r) => {
|
|
224
|
+
switch (Ni(
|
|
208
225
|
e,
|
|
209
226
|
t,
|
|
210
227
|
r
|
|
@@ -218,7 +235,7 @@ const Mi = (e, t, r) => {
|
|
|
218
235
|
default:
|
|
219
236
|
return Re.Idle;
|
|
220
237
|
}
|
|
221
|
-
},
|
|
238
|
+
}, Ui = [
|
|
222
239
|
{
|
|
223
240
|
inputs: [
|
|
224
241
|
{
|
|
@@ -611,9 +628,9 @@ const Mi = (e, t, r) => {
|
|
|
611
628
|
type: "function"
|
|
612
629
|
}
|
|
613
630
|
];
|
|
614
|
-
class
|
|
631
|
+
class $i {
|
|
615
632
|
constructor(t, r, a) {
|
|
616
|
-
this.url = new
|
|
633
|
+
this.url = new An("/relayer", r), this.auth = a, this.order = t;
|
|
617
634
|
}
|
|
618
635
|
async init(t, r) {
|
|
619
636
|
if (!t.account) return H("No account found");
|
|
@@ -635,11 +652,11 @@ class Di {
|
|
|
635
652
|
try {
|
|
636
653
|
const m = await this.auth.getToken();
|
|
637
654
|
if (m.error) return H(m.error);
|
|
638
|
-
const v =
|
|
655
|
+
const v = Ri({
|
|
639
656
|
address: Dt(this.order.source_swap.asset),
|
|
640
|
-
abi:
|
|
657
|
+
abi: Ui,
|
|
641
658
|
client: t
|
|
642
|
-
}), A = await v.read.token(), C = await
|
|
659
|
+
}), A = await v.read.token(), C = await xi(
|
|
643
660
|
Number(w),
|
|
644
661
|
A,
|
|
645
662
|
this.order.source_swap.asset,
|
|
@@ -712,28 +729,28 @@ class Di {
|
|
|
712
729
|
}
|
|
713
730
|
}
|
|
714
731
|
}
|
|
715
|
-
const
|
|
732
|
+
const Hi = Buffer.from(
|
|
716
733
|
"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
|
|
717
734
|
"hex"
|
|
718
|
-
),
|
|
735
|
+
), ji = Buffer.from(
|
|
719
736
|
"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
|
|
720
737
|
"hex"
|
|
721
|
-
),
|
|
738
|
+
), Wi = Buffer.concat([Hi, ji]), qi = Buffer.from(
|
|
722
739
|
"0250929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0",
|
|
723
740
|
"hex"
|
|
724
|
-
),
|
|
741
|
+
), Yr = {
|
|
725
742
|
failedToCreateInternalPubkey: "failed to create internal pubkey",
|
|
726
743
|
failedToTweakPubkey: "failed to tweak pubkey"
|
|
727
744
|
};
|
|
728
|
-
function
|
|
729
|
-
const e =
|
|
730
|
-
Buffer.concat([Buffer.from("04", "hex"),
|
|
745
|
+
function Ki() {
|
|
746
|
+
const e = Si.sha256(Buffer.from("GardenHTLC", "utf-8")), t = ft.pointMultiply(
|
|
747
|
+
Buffer.concat([Buffer.from("04", "hex"), Wi]),
|
|
731
748
|
e
|
|
732
749
|
);
|
|
733
750
|
if (!t)
|
|
734
|
-
throw new Error(
|
|
735
|
-
const r = ft.pointAdd(
|
|
736
|
-
if (!r) throw new Error(
|
|
751
|
+
throw new Error(Yr.failedToCreateInternalPubkey);
|
|
752
|
+
const r = ft.pointAdd(qi, t);
|
|
753
|
+
if (!r) throw new Error(Yr.failedToCreateInternalPubkey);
|
|
737
754
|
return Br(Buffer.from(r));
|
|
738
755
|
}
|
|
739
756
|
const be = {
|
|
@@ -756,7 +773,7 @@ class jt {
|
|
|
756
773
|
* Note: redeemerAddress and initiatorAddress should be x-only public key without 02 or 03 prefix
|
|
757
774
|
*/
|
|
758
775
|
constructor(t, r, a, o, f, c, u) {
|
|
759
|
-
this.secretHash = a, this.redeemerPubkey = o, this.initiatorPubkey = f, this.expiry = c, this.signer = t, this.network = u, this.internalPubkey =
|
|
776
|
+
this.secretHash = a, this.redeemerPubkey = o, this.initiatorPubkey = f, this.expiry = c, this.signer = t, this.network = u, this.internalPubkey = Ki(), this.initiateAmount = r;
|
|
760
777
|
}
|
|
761
778
|
/**
|
|
762
779
|
* Creates a GardenHTLC instance
|
|
@@ -815,7 +832,7 @@ class jt {
|
|
|
815
832
|
if (u === 0) throw new Error(`${o} ${be.notFunded}`);
|
|
816
833
|
for (let p = 0; p < c.length; p++)
|
|
817
834
|
a.addInput(Buffer.from(c[p].txid, "hex").reverse(), c[p].vout);
|
|
818
|
-
return r ?? (r = await f.suggestFee(o, u,
|
|
835
|
+
return r ?? (r = await f.suggestFee(o, u, Jr.MEDIUM)), a.addOutput(
|
|
819
836
|
de.address.toOutputScript(t, this.network),
|
|
820
837
|
u - r
|
|
821
838
|
), { tx: a, usedUtxos: c };
|
|
@@ -837,7 +854,7 @@ class jt {
|
|
|
837
854
|
return t ?? (t = await (await this.signer.getProvider()).suggestFee(
|
|
838
855
|
await this.signer.getAddress(),
|
|
839
856
|
this.initiateAmount,
|
|
840
|
-
|
|
857
|
+
Jr.MEDIUM
|
|
841
858
|
)), await this.signer.send(this.address(), this.initiateAmount, t);
|
|
842
859
|
}
|
|
843
860
|
/**
|
|
@@ -1005,7 +1022,7 @@ class jt {
|
|
|
1005
1022
|
*/
|
|
1006
1023
|
leafHash(t) {
|
|
1007
1024
|
let r = this.redeemLeaf();
|
|
1008
|
-
return t === 0 && (r = this.refundLeaf()), t === 2 && (r = this.instantRefundLeaf()), de.crypto.taggedHash("TapLeaf",
|
|
1025
|
+
return t === 0 && (r = this.refundLeaf()), t === 2 && (r = this.instantRefundLeaf()), de.crypto.taggedHash("TapLeaf", ki(r));
|
|
1009
1026
|
}
|
|
1010
1027
|
refundLeaf() {
|
|
1011
1028
|
return de.script.fromASM(
|
|
@@ -1076,7 +1093,7 @@ class jt {
|
|
|
1076
1093
|
);
|
|
1077
1094
|
switch (t) {
|
|
1078
1095
|
case 1: {
|
|
1079
|
-
const f =
|
|
1096
|
+
const f = Oi(
|
|
1080
1097
|
o,
|
|
1081
1098
|
a
|
|
1082
1099
|
);
|
|
@@ -1102,7 +1119,7 @@ function or(e, t) {
|
|
|
1102
1119
|
r.push(e);
|
|
1103
1120
|
return r;
|
|
1104
1121
|
}
|
|
1105
|
-
class
|
|
1122
|
+
class Gi {
|
|
1106
1123
|
constructor(t, r) {
|
|
1107
1124
|
this.order = t, this.store = r;
|
|
1108
1125
|
}
|
|
@@ -1131,13 +1148,13 @@ class qi {
|
|
|
1131
1148
|
this.store.removeItem(`${t}_${this.order.create_order.create_id}`);
|
|
1132
1149
|
}
|
|
1133
1150
|
}
|
|
1134
|
-
class
|
|
1151
|
+
class Zs {
|
|
1135
1152
|
constructor(t) {
|
|
1136
|
-
if (this.eventListeners = /* @__PURE__ */ new Map(), this.getOrderThreshold = 20, this.pendingOrdersCount = 0, this.useRelay = !0, this.orderBook = new
|
|
1153
|
+
if (this.eventListeners = /* @__PURE__ */ new Map(), this.getOrderThreshold = 20, this.pendingOrdersCount = 0, this.useRelay = !0, this.orderBook = new vi({
|
|
1137
1154
|
url: t.orderbookURl,
|
|
1138
1155
|
walletClient: t.wallets.evmWallet,
|
|
1139
1156
|
auth: t.auth
|
|
1140
|
-
}), this.quote = t.quote, this.secretManager = t.secretManager, this.wallets = t.wallets, this.orderbookUrl = t.orderbookURl, this.auth = t.auth, this.store = new
|
|
1157
|
+
}), this.quote = t.quote, this.secretManager = t.secretManager, this.wallets = t.wallets, this.orderbookUrl = t.orderbookURl, this.auth = t.auth, this.store = new Ei(), !t.wallets.evmWallet.account)
|
|
1141
1158
|
throw new Error("Account not found in evmWallet");
|
|
1142
1159
|
this.evmAddress = t.wallets.evmWallet.account.address;
|
|
1143
1160
|
}
|
|
@@ -1220,7 +1237,7 @@ class Qs {
|
|
|
1220
1237
|
return this.wallets.evmWallet.account ? se(this.wallets.evmWallet.account.address) : H("EVM Wallet not found");
|
|
1221
1238
|
case We.Bitcoin: {
|
|
1222
1239
|
const o = await ((a = this.wallets.btcWallet) == null ? void 0 : a.getPublicKey());
|
|
1223
|
-
return !o || !
|
|
1240
|
+
return !o || !Fi(o) ? H("Invalid btc public key") : se(o);
|
|
1224
1241
|
}
|
|
1225
1242
|
default:
|
|
1226
1243
|
return H("Unsupported chain");
|
|
@@ -1243,7 +1260,7 @@ class Qs {
|
|
|
1243
1260
|
async pollOrder(t) {
|
|
1244
1261
|
let r = await this.orderBook.getOrder(t, !0), a = 0;
|
|
1245
1262
|
for (; a < this.getOrderThreshold; ) {
|
|
1246
|
-
if (await
|
|
1263
|
+
if (await Bi(1e3), a++, r.error) {
|
|
1247
1264
|
if (!r.error.includes("result is undefined"))
|
|
1248
1265
|
return H(r.error);
|
|
1249
1266
|
} else if (r.val && r.val.create_order.create_id.toLowerCase() === t.toLowerCase())
|
|
@@ -1286,18 +1303,18 @@ class Qs {
|
|
|
1286
1303
|
);
|
|
1287
1304
|
return;
|
|
1288
1305
|
}
|
|
1289
|
-
const A =
|
|
1306
|
+
const A = Di(
|
|
1290
1307
|
c,
|
|
1291
1308
|
v.val.source,
|
|
1292
1309
|
v.val.destination
|
|
1293
|
-
), C = new
|
|
1310
|
+
), C = new Gi(c, this.store);
|
|
1294
1311
|
if (C.get(A)) continue;
|
|
1295
1312
|
switch (Ot(c.destination_swap.chain)) {
|
|
1296
1313
|
case We.EVM:
|
|
1297
1314
|
switch (A) {
|
|
1298
1315
|
case Re.Redeem: {
|
|
1299
1316
|
console.log("executing evm redeem...");
|
|
1300
|
-
const S = new
|
|
1317
|
+
const S = new $i(
|
|
1301
1318
|
c,
|
|
1302
1319
|
this.orderbookUrl,
|
|
1303
1320
|
this.auth
|
|
@@ -1425,7 +1442,7 @@ class Qs {
|
|
|
1425
1442
|
}
|
|
1426
1443
|
}
|
|
1427
1444
|
var Ke = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1428
|
-
function
|
|
1445
|
+
function Vi(e) {
|
|
1429
1446
|
if (e.__esModule) return e;
|
|
1430
1447
|
var t = e.default;
|
|
1431
1448
|
if (typeof t == "function") {
|
|
@@ -1444,7 +1461,7 @@ function Ki(e) {
|
|
|
1444
1461
|
});
|
|
1445
1462
|
}), r;
|
|
1446
1463
|
}
|
|
1447
|
-
var
|
|
1464
|
+
var In = {}, ut = {}, ct = {};
|
|
1448
1465
|
Object.defineProperty(ct, "__esModule", { value: !0 });
|
|
1449
1466
|
ct.testnet = ct.bitcoin = void 0;
|
|
1450
1467
|
ct.bitcoin = {
|
|
@@ -1471,7 +1488,7 @@ ct.testnet = {
|
|
|
1471
1488
|
scriptHash: 196,
|
|
1472
1489
|
wif: 239
|
|
1473
1490
|
};
|
|
1474
|
-
var
|
|
1491
|
+
var Tn = {}, Et = {
|
|
1475
1492
|
Array: function(e) {
|
|
1476
1493
|
return e != null && e.constructor === Array;
|
|
1477
1494
|
},
|
|
@@ -1498,48 +1515,48 @@ var An = {}, Et = {
|
|
|
1498
1515
|
}
|
|
1499
1516
|
};
|
|
1500
1517
|
Et.Null = Et.Nil;
|
|
1501
|
-
for (var
|
|
1502
|
-
Et[
|
|
1518
|
+
for (var zr in Et)
|
|
1519
|
+
Et[zr].toJSON = (function(e) {
|
|
1503
1520
|
return e;
|
|
1504
|
-
}).bind(null,
|
|
1521
|
+
}).bind(null, zr);
|
|
1505
1522
|
var Mr = Et, Qe = Mr;
|
|
1506
|
-
function
|
|
1523
|
+
function Cn(e) {
|
|
1507
1524
|
return e.name || e.toString().match(/function (.*?)\s*\(/)[1];
|
|
1508
1525
|
}
|
|
1509
1526
|
function Pr(e) {
|
|
1510
|
-
return Qe.Nil(e) ? "" :
|
|
1527
|
+
return Qe.Nil(e) ? "" : Cn(e.constructor);
|
|
1511
1528
|
}
|
|
1512
|
-
function
|
|
1529
|
+
function Ji(e) {
|
|
1513
1530
|
return Qe.Function(e) ? "" : Qe.String(e) ? JSON.stringify(e) : e && Qe.Object(e) ? "" : e;
|
|
1514
1531
|
}
|
|
1515
1532
|
function Nr(e, t) {
|
|
1516
1533
|
Error.captureStackTrace && Error.captureStackTrace(e, t);
|
|
1517
1534
|
}
|
|
1518
1535
|
function Wt(e) {
|
|
1519
|
-
return Qe.Function(e) ? e.toJSON ? e.toJSON() :
|
|
1536
|
+
return Qe.Function(e) ? e.toJSON ? e.toJSON() : Cn(e) : Qe.Array(e) ? "Array" : e && Qe.Object(e) ? "Object" : e !== void 0 ? e : "";
|
|
1520
1537
|
}
|
|
1521
|
-
function
|
|
1522
|
-
var a =
|
|
1538
|
+
function kn(e, t, r) {
|
|
1539
|
+
var a = Ji(t);
|
|
1523
1540
|
return "Expected " + Wt(e) + ", got" + (r !== "" ? " " + r : "") + (a !== "" ? " " + a : "");
|
|
1524
1541
|
}
|
|
1525
1542
|
function Pe(e, t, r) {
|
|
1526
|
-
r = r || Pr(t), this.message =
|
|
1543
|
+
r = r || Pr(t), this.message = kn(e, t, r), Nr(this, Pe), this.__type = e, this.__value = t, this.__valueTypeName = r;
|
|
1527
1544
|
}
|
|
1528
1545
|
Pe.prototype = Object.create(Error.prototype);
|
|
1529
1546
|
Pe.prototype.constructor = Pe;
|
|
1530
|
-
function
|
|
1547
|
+
function Yi(e, t, r, a, o) {
|
|
1531
1548
|
var f = '" of type ';
|
|
1532
|
-
return t === "key" && (f = '" with key type '),
|
|
1549
|
+
return t === "key" && (f = '" with key type '), kn('property "' + Wt(r) + f + Wt(e), a, o);
|
|
1533
1550
|
}
|
|
1534
1551
|
function ot(e, t, r, a, o) {
|
|
1535
|
-
e ? (o = o || Pr(a), this.message =
|
|
1552
|
+
e ? (o = o || Pr(a), this.message = Yi(e, r, t, a, o)) : this.message = 'Unexpected property "' + t + '"', Nr(this, Pe), this.__label = r, this.__property = t, this.__type = e, this.__value = a, this.__valueTypeName = o;
|
|
1536
1553
|
}
|
|
1537
1554
|
ot.prototype = Object.create(Error.prototype);
|
|
1538
1555
|
ot.prototype.constructor = Pe;
|
|
1539
|
-
function
|
|
1556
|
+
function zi(e, t) {
|
|
1540
1557
|
return new Pe(e, {}, t);
|
|
1541
1558
|
}
|
|
1542
|
-
function
|
|
1559
|
+
function Qi(e, t, r) {
|
|
1543
1560
|
return e instanceof ot ? (t = t + "." + e.__property, e = new ot(
|
|
1544
1561
|
e.__type,
|
|
1545
1562
|
t,
|
|
@@ -1554,18 +1571,18 @@ function Yi(e, t, r) {
|
|
|
1554
1571
|
e.__valueTypeName
|
|
1555
1572
|
)), Nr(e), e;
|
|
1556
1573
|
}
|
|
1557
|
-
var
|
|
1574
|
+
var Ln = {
|
|
1558
1575
|
TfTypeError: Pe,
|
|
1559
1576
|
TfPropertyTypeError: ot,
|
|
1560
|
-
tfCustomError:
|
|
1561
|
-
tfSubError:
|
|
1577
|
+
tfCustomError: zi,
|
|
1578
|
+
tfSubError: Qi,
|
|
1562
1579
|
tfJSON: Wt,
|
|
1563
1580
|
getValueTypeName: Pr
|
|
1564
|
-
}, sr,
|
|
1565
|
-
function
|
|
1566
|
-
if (
|
|
1567
|
-
|
|
1568
|
-
var e = Mr, t =
|
|
1581
|
+
}, sr, Qr;
|
|
1582
|
+
function Xi() {
|
|
1583
|
+
if (Qr) return sr;
|
|
1584
|
+
Qr = 1;
|
|
1585
|
+
var e = Mr, t = Ln;
|
|
1569
1586
|
function r(E) {
|
|
1570
1587
|
return Buffer.isBuffer(E);
|
|
1571
1588
|
}
|
|
@@ -1645,7 +1662,7 @@ function zi() {
|
|
|
1645
1662
|
}).bind(null, P);
|
|
1646
1663
|
return sr = O, sr;
|
|
1647
1664
|
}
|
|
1648
|
-
var Rt =
|
|
1665
|
+
var Rt = Ln, fe = Mr, Fe = Rt.tfJSON, On = Rt.TfTypeError, Fn = Rt.TfPropertyTypeError, yt = Rt.tfSubError, Zi = Rt.getValueTypeName, Me = {
|
|
1649
1666
|
arrayOf: function(t, r) {
|
|
1650
1667
|
t = ke(t), r = r || {};
|
|
1651
1668
|
function a(o, f) {
|
|
@@ -1714,7 +1731,7 @@ var Rt = Cn, fe = Mr, Fe = Rt.tfJSON, kn = Rt.TfTypeError, Ln = Rt.TfPropertyTyp
|
|
|
1714
1731
|
if (c) {
|
|
1715
1732
|
for (u in f)
|
|
1716
1733
|
if (!r[u])
|
|
1717
|
-
throw new
|
|
1734
|
+
throw new Fn(void 0, u);
|
|
1718
1735
|
}
|
|
1719
1736
|
return !0;
|
|
1720
1737
|
}
|
|
@@ -1754,7 +1771,7 @@ var Rt = Cn, fe = Mr, Fe = Rt.tfJSON, kn = Rt.TfTypeError, Ln = Rt.TfPropertyTyp
|
|
|
1754
1771
|
},
|
|
1755
1772
|
quacksLike: function(t) {
|
|
1756
1773
|
function r(a) {
|
|
1757
|
-
return t ===
|
|
1774
|
+
return t === Zi(a);
|
|
1758
1775
|
}
|
|
1759
1776
|
return r.toJSON = function() {
|
|
1760
1777
|
return t;
|
|
@@ -1801,7 +1818,7 @@ function ke(e) {
|
|
|
1801
1818
|
function _e(e, t, r, a) {
|
|
1802
1819
|
if (fe.Function(e)) {
|
|
1803
1820
|
if (e(t, r)) return !0;
|
|
1804
|
-
throw new
|
|
1821
|
+
throw new On(a || e, t);
|
|
1805
1822
|
}
|
|
1806
1823
|
return _e(ke(e), t, r);
|
|
1807
1824
|
}
|
|
@@ -1809,15 +1826,15 @@ for (var qe in fe)
|
|
|
1809
1826
|
_e[qe] = fe[qe];
|
|
1810
1827
|
for (qe in Me)
|
|
1811
1828
|
_e[qe] = Me[qe];
|
|
1812
|
-
var
|
|
1813
|
-
for (qe in
|
|
1814
|
-
_e[qe] =
|
|
1829
|
+
var Xr = Xi();
|
|
1830
|
+
for (qe in Xr)
|
|
1831
|
+
_e[qe] = Xr[qe];
|
|
1815
1832
|
_e.compile = ke;
|
|
1816
|
-
_e.TfTypeError =
|
|
1817
|
-
_e.TfPropertyTypeError =
|
|
1818
|
-
var
|
|
1833
|
+
_e.TfTypeError = On;
|
|
1834
|
+
_e.TfPropertyTypeError = Fn;
|
|
1835
|
+
var ea = _e;
|
|
1819
1836
|
(function(e) {
|
|
1820
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.maybe = e.Boolean = e.Array = e.Buffer256bit = e.Network = e.typeforce = void 0, e.typeforce =
|
|
1837
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.maybe = e.Boolean = e.Array = e.Buffer256bit = e.Network = e.typeforce = void 0, e.typeforce = ea, e.Network = e.typeforce.compile({
|
|
1821
1838
|
messagePrefix: e.typeforce.oneOf(
|
|
1822
1839
|
e.typeforce.Buffer,
|
|
1823
1840
|
e.typeforce.String
|
|
@@ -1830,17 +1847,17 @@ var Xi = _e;
|
|
|
1830
1847
|
scriptHash: e.typeforce.UInt8,
|
|
1831
1848
|
wif: e.typeforce.UInt8
|
|
1832
1849
|
}), e.Buffer256bit = e.typeforce.BufferN(32), e.Array = e.typeforce.Array, e.Boolean = e.typeforce.Boolean, e.maybe = e.typeforce.maybe;
|
|
1833
|
-
})(
|
|
1850
|
+
})(Tn);
|
|
1834
1851
|
var Sr = { exports: {} }, Ar = { exports: {} }, ht = {}, Jt = {};
|
|
1835
|
-
Jt.byteLength =
|
|
1836
|
-
Jt.toByteArray =
|
|
1837
|
-
Jt.fromByteArray =
|
|
1838
|
-
var Le = [], Be = [],
|
|
1839
|
-
for (var at = 0,
|
|
1852
|
+
Jt.byteLength = na;
|
|
1853
|
+
Jt.toByteArray = aa;
|
|
1854
|
+
Jt.fromByteArray = fa;
|
|
1855
|
+
var Le = [], Be = [], ta = typeof Uint8Array < "u" ? Uint8Array : Array, fr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
1856
|
+
for (var at = 0, ra = fr.length; at < ra; ++at)
|
|
1840
1857
|
Le[at] = fr[at], Be[fr.charCodeAt(at)] = at;
|
|
1841
1858
|
Be[45] = 62;
|
|
1842
1859
|
Be[95] = 63;
|
|
1843
|
-
function
|
|
1860
|
+
function Mn(e) {
|
|
1844
1861
|
var t = e.length;
|
|
1845
1862
|
if (t % 4 > 0)
|
|
1846
1863
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
@@ -1849,30 +1866,30 @@ function On(e) {
|
|
|
1849
1866
|
var a = r === t ? 0 : 4 - r % 4;
|
|
1850
1867
|
return [r, a];
|
|
1851
1868
|
}
|
|
1852
|
-
function
|
|
1853
|
-
var t =
|
|
1869
|
+
function na(e) {
|
|
1870
|
+
var t = Mn(e), r = t[0], a = t[1];
|
|
1854
1871
|
return (r + a) * 3 / 4 - a;
|
|
1855
1872
|
}
|
|
1856
|
-
function
|
|
1873
|
+
function ia(e, t, r) {
|
|
1857
1874
|
return (t + r) * 3 / 4 - r;
|
|
1858
1875
|
}
|
|
1859
|
-
function
|
|
1860
|
-
var t, r =
|
|
1876
|
+
function aa(e) {
|
|
1877
|
+
var t, r = Mn(e), a = r[0], o = r[1], f = new ta(ia(e, a, o)), c = 0, u = o > 0 ? a - 4 : a, p;
|
|
1861
1878
|
for (p = 0; p < u; p += 4)
|
|
1862
1879
|
t = Be[e.charCodeAt(p)] << 18 | Be[e.charCodeAt(p + 1)] << 12 | Be[e.charCodeAt(p + 2)] << 6 | Be[e.charCodeAt(p + 3)], f[c++] = t >> 16 & 255, f[c++] = t >> 8 & 255, f[c++] = t & 255;
|
|
1863
1880
|
return o === 2 && (t = Be[e.charCodeAt(p)] << 2 | Be[e.charCodeAt(p + 1)] >> 4, f[c++] = t & 255), o === 1 && (t = Be[e.charCodeAt(p)] << 10 | Be[e.charCodeAt(p + 1)] << 4 | Be[e.charCodeAt(p + 2)] >> 2, f[c++] = t >> 8 & 255, f[c++] = t & 255), f;
|
|
1864
1881
|
}
|
|
1865
|
-
function
|
|
1882
|
+
function oa(e) {
|
|
1866
1883
|
return Le[e >> 18 & 63] + Le[e >> 12 & 63] + Le[e >> 6 & 63] + Le[e & 63];
|
|
1867
1884
|
}
|
|
1868
|
-
function
|
|
1885
|
+
function sa(e, t, r) {
|
|
1869
1886
|
for (var a, o = [], f = t; f < r; f += 3)
|
|
1870
|
-
a = (e[f] << 16 & 16711680) + (e[f + 1] << 8 & 65280) + (e[f + 2] & 255), o.push(
|
|
1887
|
+
a = (e[f] << 16 & 16711680) + (e[f + 1] << 8 & 65280) + (e[f + 2] & 255), o.push(oa(a));
|
|
1871
1888
|
return o.join("");
|
|
1872
1889
|
}
|
|
1873
|
-
function
|
|
1890
|
+
function fa(e) {
|
|
1874
1891
|
for (var t, r = e.length, a = r % 3, o = [], f = 16383, c = 0, u = r - a; c < u; c += f)
|
|
1875
|
-
o.push(
|
|
1892
|
+
o.push(sa(e, c, c + f > u ? u : c + f));
|
|
1876
1893
|
return a === 1 ? (t = e[r - 1], o.push(
|
|
1877
1894
|
Le[t >> 2] + Le[t << 4 & 63] + "=="
|
|
1878
1895
|
)) : a === 2 && (t = (e[r - 2] << 8) + e[r - 1], o.push(
|
|
@@ -2878,16 +2895,16 @@ Dr.write = function(e, t, r, a, o, f) {
|
|
|
2878
2895
|
return r.SlowBuffer(c);
|
|
2879
2896
|
};
|
|
2880
2897
|
})(Ar, Ar.exports);
|
|
2881
|
-
var me = Ar.exports, ur = 65536,
|
|
2882
|
-
function
|
|
2898
|
+
var me = Ar.exports, ur = 65536, ua = 4294967295;
|
|
2899
|
+
function ca() {
|
|
2883
2900
|
throw new Error(`Secure random number generation is not supported by this browser.
|
|
2884
2901
|
Use Chrome, Firefox or Internet Explorer 11`);
|
|
2885
2902
|
}
|
|
2886
|
-
var
|
|
2887
|
-
qt && qt.getRandomValues ? Sr.exports =
|
|
2888
|
-
function
|
|
2889
|
-
if (e >
|
|
2890
|
-
var r =
|
|
2903
|
+
var la = me.Buffer, qt = Ke.crypto || Ke.msCrypto;
|
|
2904
|
+
qt && qt.getRandomValues ? Sr.exports = ha : Sr.exports = ca;
|
|
2905
|
+
function ha(e, t) {
|
|
2906
|
+
if (e > ua) throw new RangeError("requested too many random bytes");
|
|
2907
|
+
var r = la.allocUnsafe(e);
|
|
2891
2908
|
if (e > 0)
|
|
2892
2909
|
if (e > ur)
|
|
2893
2910
|
for (var a = 0; a < e; a += ur)
|
|
@@ -2898,7 +2915,7 @@ function ca(e, t) {
|
|
|
2898
2915
|
t(null, r);
|
|
2899
2916
|
}) : r;
|
|
2900
2917
|
}
|
|
2901
|
-
var
|
|
2918
|
+
var da = Sr.exports, Ir = { exports: {} };
|
|
2902
2919
|
typeof Object.create == "function" ? Ir.exports = function(t, r) {
|
|
2903
2920
|
r && (t.super_ = r, t.prototype = Object.create(r.prototype, {
|
|
2904
2921
|
constructor: {
|
|
@@ -2916,7 +2933,7 @@ typeof Object.create == "function" ? Ir.exports = function(t, r) {
|
|
|
2916
2933
|
a.prototype = r.prototype, t.prototype = new a(), t.prototype.constructor = t;
|
|
2917
2934
|
}
|
|
2918
2935
|
};
|
|
2919
|
-
var pe = Ir.exports, Tr = { exports: {} }, Ur = { exports: {} }, st = typeof Reflect == "object" ? Reflect : null,
|
|
2936
|
+
var pe = Ir.exports, Tr = { exports: {} }, Ur = { exports: {} }, st = typeof Reflect == "object" ? Reflect : null, Zr = st && typeof st.apply == "function" ? st.apply : function(t, r, a) {
|
|
2920
2937
|
return Function.prototype.apply.call(t, r, a);
|
|
2921
2938
|
}, Ut;
|
|
2922
2939
|
st && typeof st.ownKeys == "function" ? Ut = st.ownKeys : Object.getOwnPropertySymbols ? Ut = function(t) {
|
|
@@ -2924,22 +2941,22 @@ st && typeof st.ownKeys == "function" ? Ut = st.ownKeys : Object.getOwnPropertyS
|
|
|
2924
2941
|
} : Ut = function(t) {
|
|
2925
2942
|
return Object.getOwnPropertyNames(t);
|
|
2926
2943
|
};
|
|
2927
|
-
function
|
|
2944
|
+
function pa(e) {
|
|
2928
2945
|
console && console.warn && console.warn(e);
|
|
2929
2946
|
}
|
|
2930
|
-
var
|
|
2947
|
+
var Pn = Number.isNaN || function(t) {
|
|
2931
2948
|
return t !== t;
|
|
2932
2949
|
};
|
|
2933
2950
|
function V() {
|
|
2934
2951
|
V.init.call(this);
|
|
2935
2952
|
}
|
|
2936
2953
|
Ur.exports = V;
|
|
2937
|
-
Ur.exports.once =
|
|
2954
|
+
Ur.exports.once = ga;
|
|
2938
2955
|
V.EventEmitter = V;
|
|
2939
2956
|
V.prototype._events = void 0;
|
|
2940
2957
|
V.prototype._eventsCount = 0;
|
|
2941
2958
|
V.prototype._maxListeners = void 0;
|
|
2942
|
-
var
|
|
2959
|
+
var en = 10;
|
|
2943
2960
|
function Yt(e) {
|
|
2944
2961
|
if (typeof e != "function")
|
|
2945
2962
|
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof e);
|
|
@@ -2947,27 +2964,27 @@ function Yt(e) {
|
|
|
2947
2964
|
Object.defineProperty(V, "defaultMaxListeners", {
|
|
2948
2965
|
enumerable: !0,
|
|
2949
2966
|
get: function() {
|
|
2950
|
-
return
|
|
2967
|
+
return en;
|
|
2951
2968
|
},
|
|
2952
2969
|
set: function(e) {
|
|
2953
|
-
if (typeof e != "number" || e < 0 ||
|
|
2970
|
+
if (typeof e != "number" || e < 0 || Pn(e))
|
|
2954
2971
|
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + e + ".");
|
|
2955
|
-
|
|
2972
|
+
en = e;
|
|
2956
2973
|
}
|
|
2957
2974
|
});
|
|
2958
2975
|
V.init = function() {
|
|
2959
2976
|
(this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
|
|
2960
2977
|
};
|
|
2961
2978
|
V.prototype.setMaxListeners = function(t) {
|
|
2962
|
-
if (typeof t != "number" || t < 0 ||
|
|
2979
|
+
if (typeof t != "number" || t < 0 || Pn(t))
|
|
2963
2980
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + t + ".");
|
|
2964
2981
|
return this._maxListeners = t, this;
|
|
2965
2982
|
};
|
|
2966
|
-
function
|
|
2983
|
+
function Nn(e) {
|
|
2967
2984
|
return e._maxListeners === void 0 ? V.defaultMaxListeners : e._maxListeners;
|
|
2968
2985
|
}
|
|
2969
2986
|
V.prototype.getMaxListeners = function() {
|
|
2970
|
-
return
|
|
2987
|
+
return Nn(this);
|
|
2971
2988
|
};
|
|
2972
2989
|
V.prototype.emit = function(t) {
|
|
2973
2990
|
for (var r = [], a = 1; a < arguments.length; a++) r.push(arguments[a]);
|
|
@@ -2987,13 +3004,13 @@ V.prototype.emit = function(t) {
|
|
|
2987
3004
|
if (p === void 0)
|
|
2988
3005
|
return !1;
|
|
2989
3006
|
if (typeof p == "function")
|
|
2990
|
-
|
|
3007
|
+
Zr(p, this, r);
|
|
2991
3008
|
else
|
|
2992
|
-
for (var w = p.length, m =
|
|
2993
|
-
|
|
3009
|
+
for (var w = p.length, m = jn(p, w), a = 0; a < w; ++a)
|
|
3010
|
+
Zr(m[a], this, r);
|
|
2994
3011
|
return !0;
|
|
2995
3012
|
};
|
|
2996
|
-
function
|
|
3013
|
+
function Dn(e, t, r, a) {
|
|
2997
3014
|
var o, f, c;
|
|
2998
3015
|
if (Yt(r), f = e._events, f === void 0 ? (f = e._events = /* @__PURE__ */ Object.create(null), e._eventsCount = 0) : (f.newListener !== void 0 && (e.emit(
|
|
2999
3016
|
"newListener",
|
|
@@ -3001,33 +3018,33 @@ function Pn(e, t, r, a) {
|
|
|
3001
3018
|
r.listener ? r.listener : r
|
|
3002
3019
|
), f = e._events), c = f[t]), c === void 0)
|
|
3003
3020
|
c = f[t] = r, ++e._eventsCount;
|
|
3004
|
-
else if (typeof c == "function" ? c = f[t] = a ? [r, c] : [c, r] : a ? c.unshift(r) : c.push(r), o =
|
|
3021
|
+
else if (typeof c == "function" ? c = f[t] = a ? [r, c] : [c, r] : a ? c.unshift(r) : c.push(r), o = Nn(e), o > 0 && c.length > o && !c.warned) {
|
|
3005
3022
|
c.warned = !0;
|
|
3006
3023
|
var u = new Error("Possible EventEmitter memory leak detected. " + c.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
3007
|
-
u.name = "MaxListenersExceededWarning", u.emitter = e, u.type = t, u.count = c.length,
|
|
3024
|
+
u.name = "MaxListenersExceededWarning", u.emitter = e, u.type = t, u.count = c.length, pa(u);
|
|
3008
3025
|
}
|
|
3009
3026
|
return e;
|
|
3010
3027
|
}
|
|
3011
3028
|
V.prototype.addListener = function(t, r) {
|
|
3012
|
-
return
|
|
3029
|
+
return Dn(this, t, r, !1);
|
|
3013
3030
|
};
|
|
3014
3031
|
V.prototype.on = V.prototype.addListener;
|
|
3015
3032
|
V.prototype.prependListener = function(t, r) {
|
|
3016
|
-
return
|
|
3033
|
+
return Dn(this, t, r, !0);
|
|
3017
3034
|
};
|
|
3018
|
-
function
|
|
3035
|
+
function ba() {
|
|
3019
3036
|
if (!this.fired)
|
|
3020
3037
|
return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
|
|
3021
3038
|
}
|
|
3022
|
-
function
|
|
3023
|
-
var a = { fired: !1, wrapFn: void 0, target: e, type: t, listener: r }, o =
|
|
3039
|
+
function Un(e, t, r) {
|
|
3040
|
+
var a = { fired: !1, wrapFn: void 0, target: e, type: t, listener: r }, o = ba.bind(a);
|
|
3024
3041
|
return o.listener = r, a.wrapFn = o, o;
|
|
3025
3042
|
}
|
|
3026
3043
|
V.prototype.once = function(t, r) {
|
|
3027
|
-
return Yt(r), this.on(t,
|
|
3044
|
+
return Yt(r), this.on(t, Un(this, t, r)), this;
|
|
3028
3045
|
};
|
|
3029
3046
|
V.prototype.prependOnceListener = function(t, r) {
|
|
3030
|
-
return Yt(r), this.prependListener(t,
|
|
3047
|
+
return Yt(r), this.prependListener(t, Un(this, t, r)), this;
|
|
3031
3048
|
};
|
|
3032
3049
|
V.prototype.removeListener = function(t, r) {
|
|
3033
3050
|
var a, o, f, c, u;
|
|
@@ -3045,7 +3062,7 @@ V.prototype.removeListener = function(t, r) {
|
|
|
3045
3062
|
}
|
|
3046
3063
|
if (f < 0)
|
|
3047
3064
|
return this;
|
|
3048
|
-
f === 0 ? a.shift() :
|
|
3065
|
+
f === 0 ? a.shift() : ya(a, f), a.length === 1 && (o[t] = a[0]), o.removeListener !== void 0 && this.emit("removeListener", t, u || r);
|
|
3049
3066
|
}
|
|
3050
3067
|
return this;
|
|
3051
3068
|
};
|
|
@@ -3069,24 +3086,24 @@ V.prototype.removeAllListeners = function(t) {
|
|
|
3069
3086
|
this.removeListener(t, r[o]);
|
|
3070
3087
|
return this;
|
|
3071
3088
|
};
|
|
3072
|
-
function
|
|
3089
|
+
function $n(e, t, r) {
|
|
3073
3090
|
var a = e._events;
|
|
3074
3091
|
if (a === void 0)
|
|
3075
3092
|
return [];
|
|
3076
3093
|
var o = a[t];
|
|
3077
|
-
return o === void 0 ? [] : typeof o == "function" ? r ? [o.listener || o] : [o] : r ?
|
|
3094
|
+
return o === void 0 ? [] : typeof o == "function" ? r ? [o.listener || o] : [o] : r ? _a(o) : jn(o, o.length);
|
|
3078
3095
|
}
|
|
3079
3096
|
V.prototype.listeners = function(t) {
|
|
3080
|
-
return
|
|
3097
|
+
return $n(this, t, !0);
|
|
3081
3098
|
};
|
|
3082
3099
|
V.prototype.rawListeners = function(t) {
|
|
3083
|
-
return
|
|
3100
|
+
return $n(this, t, !1);
|
|
3084
3101
|
};
|
|
3085
3102
|
V.listenerCount = function(e, t) {
|
|
3086
|
-
return typeof e.listenerCount == "function" ? e.listenerCount(t) :
|
|
3103
|
+
return typeof e.listenerCount == "function" ? e.listenerCount(t) : Hn.call(e, t);
|
|
3087
3104
|
};
|
|
3088
|
-
V.prototype.listenerCount =
|
|
3089
|
-
function
|
|
3105
|
+
V.prototype.listenerCount = Hn;
|
|
3106
|
+
function Hn(e) {
|
|
3090
3107
|
var t = this._events;
|
|
3091
3108
|
if (t !== void 0) {
|
|
3092
3109
|
var r = t[e];
|
|
@@ -3100,22 +3117,22 @@ function Un(e) {
|
|
|
3100
3117
|
V.prototype.eventNames = function() {
|
|
3101
3118
|
return this._eventsCount > 0 ? Ut(this._events) : [];
|
|
3102
3119
|
};
|
|
3103
|
-
function
|
|
3120
|
+
function jn(e, t) {
|
|
3104
3121
|
for (var r = new Array(t), a = 0; a < t; ++a)
|
|
3105
3122
|
r[a] = e[a];
|
|
3106
3123
|
return r;
|
|
3107
3124
|
}
|
|
3108
|
-
function
|
|
3125
|
+
function ya(e, t) {
|
|
3109
3126
|
for (; t + 1 < e.length; t++)
|
|
3110
3127
|
e[t] = e[t + 1];
|
|
3111
3128
|
e.pop();
|
|
3112
3129
|
}
|
|
3113
|
-
function
|
|
3130
|
+
function _a(e) {
|
|
3114
3131
|
for (var t = new Array(e.length), r = 0; r < t.length; ++r)
|
|
3115
3132
|
t[r] = e[r].listener || e[r];
|
|
3116
3133
|
return t;
|
|
3117
3134
|
}
|
|
3118
|
-
function
|
|
3135
|
+
function ga(e, t) {
|
|
3119
3136
|
return new Promise(function(r, a) {
|
|
3120
3137
|
function o(c) {
|
|
3121
3138
|
e.removeListener(t, f), a(c);
|
|
@@ -3123,13 +3140,13 @@ function ya(e, t) {
|
|
|
3123
3140
|
function f() {
|
|
3124
3141
|
typeof e.removeListener == "function" && e.removeListener("error", o), r([].slice.call(arguments));
|
|
3125
3142
|
}
|
|
3126
|
-
|
|
3143
|
+
Wn(e, t, f, { once: !0 }), t !== "error" && wa(e, o, { once: !0 });
|
|
3127
3144
|
});
|
|
3128
3145
|
}
|
|
3129
|
-
function
|
|
3130
|
-
typeof e.on == "function" &&
|
|
3146
|
+
function wa(e, t, r) {
|
|
3147
|
+
typeof e.on == "function" && Wn(e, "error", t, r);
|
|
3131
3148
|
}
|
|
3132
|
-
function
|
|
3149
|
+
function Wn(e, t, r, a) {
|
|
3133
3150
|
if (typeof e.on == "function")
|
|
3134
3151
|
a.once ? e.once(t, r) : e.on(t, r);
|
|
3135
3152
|
else if (typeof e.addEventListener == "function")
|
|
@@ -3139,15 +3156,15 @@ function Hn(e, t, r, a) {
|
|
|
3139
3156
|
else
|
|
3140
3157
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof e);
|
|
3141
3158
|
}
|
|
3142
|
-
var
|
|
3143
|
-
const
|
|
3159
|
+
var qn = Ur.exports, Kn = qn.EventEmitter;
|
|
3160
|
+
const ma = {}, va = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3144
3161
|
__proto__: null,
|
|
3145
|
-
default:
|
|
3146
|
-
}, Symbol.toStringTag, { value: "Module" })), $r = /* @__PURE__ */
|
|
3147
|
-
var cr,
|
|
3148
|
-
function
|
|
3149
|
-
if (
|
|
3150
|
-
|
|
3162
|
+
default: ma
|
|
3163
|
+
}, Symbol.toStringTag, { value: "Module" })), $r = /* @__PURE__ */ Vi(va);
|
|
3164
|
+
var cr, tn;
|
|
3165
|
+
function xa() {
|
|
3166
|
+
if (tn) return cr;
|
|
3167
|
+
tn = 1;
|
|
3151
3168
|
function e(R, k) {
|
|
3152
3169
|
var S = Object.keys(R);
|
|
3153
3170
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -3309,52 +3326,52 @@ function ma() {
|
|
|
3309
3326
|
}]), R;
|
|
3310
3327
|
}(), cr;
|
|
3311
3328
|
}
|
|
3312
|
-
function
|
|
3329
|
+
function Ea(e, t) {
|
|
3313
3330
|
var r = this, a = this._readableState && this._readableState.destroyed, o = this._writableState && this._writableState.destroyed;
|
|
3314
3331
|
return a || o ? (t ? t(e) : e && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0, process.nextTick(Cr, this, e)) : process.nextTick(Cr, this, e)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this._writableState.destroyed = !0), this._destroy(e || null, function(f) {
|
|
3315
|
-
!t && f ? r._writableState ? r._writableState.errorEmitted ? process.nextTick($t, r) : (r._writableState.errorEmitted = !0, process.nextTick(
|
|
3332
|
+
!t && f ? r._writableState ? r._writableState.errorEmitted ? process.nextTick($t, r) : (r._writableState.errorEmitted = !0, process.nextTick(rn, r, f)) : process.nextTick(rn, r, f) : t ? (process.nextTick($t, r), t(f)) : process.nextTick($t, r);
|
|
3316
3333
|
}), this);
|
|
3317
3334
|
}
|
|
3318
|
-
function
|
|
3335
|
+
function rn(e, t) {
|
|
3319
3336
|
Cr(e, t), $t(e);
|
|
3320
3337
|
}
|
|
3321
3338
|
function $t(e) {
|
|
3322
3339
|
e._writableState && !e._writableState.emitClose || e._readableState && !e._readableState.emitClose || e.emit("close");
|
|
3323
3340
|
}
|
|
3324
|
-
function
|
|
3341
|
+
function Ba() {
|
|
3325
3342
|
this._readableState && (this._readableState.destroyed = !1, this._readableState.reading = !1, this._readableState.ended = !1, this._readableState.endEmitted = !1), this._writableState && (this._writableState.destroyed = !1, this._writableState.ended = !1, this._writableState.ending = !1, this._writableState.finalCalled = !1, this._writableState.prefinished = !1, this._writableState.finished = !1, this._writableState.errorEmitted = !1);
|
|
3326
3343
|
}
|
|
3327
3344
|
function Cr(e, t) {
|
|
3328
3345
|
e.emit("error", t);
|
|
3329
3346
|
}
|
|
3330
|
-
function
|
|
3347
|
+
function Ra(e, t) {
|
|
3331
3348
|
var r = e._readableState, a = e._writableState;
|
|
3332
3349
|
r && r.autoDestroy || a && a.autoDestroy ? e.destroy(t) : e.emit("error", t);
|
|
3333
3350
|
}
|
|
3334
|
-
var
|
|
3335
|
-
destroy:
|
|
3336
|
-
undestroy:
|
|
3337
|
-
errorOrDestroy:
|
|
3351
|
+
var Gn = {
|
|
3352
|
+
destroy: Ea,
|
|
3353
|
+
undestroy: Ba,
|
|
3354
|
+
errorOrDestroy: Ra
|
|
3338
3355
|
}, Ze = {};
|
|
3339
|
-
function
|
|
3356
|
+
function Sa(e, t) {
|
|
3340
3357
|
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, e.__proto__ = t;
|
|
3341
3358
|
}
|
|
3342
|
-
var
|
|
3359
|
+
var Vn = {};
|
|
3343
3360
|
function Se(e, t, r) {
|
|
3344
3361
|
r || (r = Error);
|
|
3345
3362
|
function a(f, c, u) {
|
|
3346
3363
|
return typeof t == "string" ? t : t(f, c, u);
|
|
3347
3364
|
}
|
|
3348
3365
|
var o = /* @__PURE__ */ function(f) {
|
|
3349
|
-
|
|
3366
|
+
Sa(c, f);
|
|
3350
3367
|
function c(u, p, w) {
|
|
3351
3368
|
return f.call(this, a(u, p, w)) || this;
|
|
3352
3369
|
}
|
|
3353
3370
|
return c;
|
|
3354
3371
|
}(r);
|
|
3355
|
-
o.prototype.name = r.name, o.prototype.code = e,
|
|
3372
|
+
o.prototype.name = r.name, o.prototype.code = e, Vn[e] = o;
|
|
3356
3373
|
}
|
|
3357
|
-
function
|
|
3374
|
+
function nn(e, t) {
|
|
3358
3375
|
if (Array.isArray(e)) {
|
|
3359
3376
|
var r = e.length;
|
|
3360
3377
|
return e = e.map(function(a) {
|
|
@@ -3363,13 +3380,13 @@ function tn(e, t) {
|
|
|
3363
3380
|
} else
|
|
3364
3381
|
return "of ".concat(t, " ").concat(String(e));
|
|
3365
3382
|
}
|
|
3366
|
-
function
|
|
3383
|
+
function Aa(e, t, r) {
|
|
3367
3384
|
return e.substr(0, t.length) === t;
|
|
3368
3385
|
}
|
|
3369
|
-
function
|
|
3386
|
+
function Ia(e, t, r) {
|
|
3370
3387
|
return (r === void 0 || r > e.length) && (r = e.length), e.substring(r - t.length, r) === t;
|
|
3371
3388
|
}
|
|
3372
|
-
function
|
|
3389
|
+
function Ta(e, t, r) {
|
|
3373
3390
|
return typeof r != "number" && (r = 0), r + t.length > e.length ? !1 : e.indexOf(t, r) !== -1;
|
|
3374
3391
|
}
|
|
3375
3392
|
Se("ERR_INVALID_OPT_VALUE", function(e, t) {
|
|
@@ -3377,13 +3394,13 @@ Se("ERR_INVALID_OPT_VALUE", function(e, t) {
|
|
|
3377
3394
|
}, TypeError);
|
|
3378
3395
|
Se("ERR_INVALID_ARG_TYPE", function(e, t, r) {
|
|
3379
3396
|
var a;
|
|
3380
|
-
typeof t == "string" &&
|
|
3397
|
+
typeof t == "string" && Aa(t, "not ") ? (a = "must not be", t = t.replace(/^not /, "")) : a = "must be";
|
|
3381
3398
|
var o;
|
|
3382
|
-
if (
|
|
3383
|
-
o = "The ".concat(e, " ").concat(a, " ").concat(
|
|
3399
|
+
if (Ia(e, " argument"))
|
|
3400
|
+
o = "The ".concat(e, " ").concat(a, " ").concat(nn(t, "type"));
|
|
3384
3401
|
else {
|
|
3385
|
-
var f =
|
|
3386
|
-
o = 'The "'.concat(e, '" ').concat(f, " ").concat(a, " ").concat(
|
|
3402
|
+
var f = Ta(e, ".") ? "property" : "argument";
|
|
3403
|
+
o = 'The "'.concat(e, '" ').concat(f, " ").concat(a, " ").concat(nn(t, "type"));
|
|
3387
3404
|
}
|
|
3388
3405
|
return o += ". Received type ".concat(typeof r), o;
|
|
3389
3406
|
}, TypeError);
|
|
@@ -3403,26 +3420,26 @@ Se("ERR_UNKNOWN_ENCODING", function(e) {
|
|
|
3403
3420
|
return "Unknown encoding: " + e;
|
|
3404
3421
|
}, TypeError);
|
|
3405
3422
|
Se("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event");
|
|
3406
|
-
Ze.codes =
|
|
3407
|
-
var
|
|
3408
|
-
function
|
|
3423
|
+
Ze.codes = Vn;
|
|
3424
|
+
var Ca = Ze.codes.ERR_INVALID_OPT_VALUE;
|
|
3425
|
+
function ka(e, t, r) {
|
|
3409
3426
|
return e.highWaterMark != null ? e.highWaterMark : t ? e[r] : null;
|
|
3410
3427
|
}
|
|
3411
|
-
function
|
|
3412
|
-
var o =
|
|
3428
|
+
function La(e, t, r, a) {
|
|
3429
|
+
var o = ka(t, a, r);
|
|
3413
3430
|
if (o != null) {
|
|
3414
3431
|
if (!(isFinite(o) && Math.floor(o) === o) || o < 0) {
|
|
3415
3432
|
var f = a ? r : "highWaterMark";
|
|
3416
|
-
throw new
|
|
3433
|
+
throw new Ca(f, o);
|
|
3417
3434
|
}
|
|
3418
3435
|
return Math.floor(o);
|
|
3419
3436
|
}
|
|
3420
3437
|
return e.objectMode ? 16 : 16 * 1024;
|
|
3421
3438
|
}
|
|
3422
|
-
var
|
|
3423
|
-
getHighWaterMark:
|
|
3424
|
-
},
|
|
3425
|
-
function
|
|
3439
|
+
var Jn = {
|
|
3440
|
+
getHighWaterMark: La
|
|
3441
|
+
}, Oa = Fa;
|
|
3442
|
+
function Fa(e, t) {
|
|
3426
3443
|
if (lr("noDeprecation"))
|
|
3427
3444
|
return e;
|
|
3428
3445
|
var r = !1;
|
|
@@ -3445,10 +3462,10 @@ function lr(e) {
|
|
|
3445
3462
|
var t = Ke.localStorage[e];
|
|
3446
3463
|
return t == null ? !1 : String(t).toLowerCase() === "true";
|
|
3447
3464
|
}
|
|
3448
|
-
var hr,
|
|
3449
|
-
function
|
|
3450
|
-
if (
|
|
3451
|
-
|
|
3465
|
+
var hr, an;
|
|
3466
|
+
function Yn() {
|
|
3467
|
+
if (an) return hr;
|
|
3468
|
+
an = 1, hr = N;
|
|
3452
3469
|
function e(_) {
|
|
3453
3470
|
var y = this;
|
|
3454
3471
|
this.next = null, this.entry = null, this.finish = function() {
|
|
@@ -3458,8 +3475,8 @@ function Vn() {
|
|
|
3458
3475
|
var t;
|
|
3459
3476
|
N.WritableState = E;
|
|
3460
3477
|
var r = {
|
|
3461
|
-
deprecate:
|
|
3462
|
-
}, a =
|
|
3478
|
+
deprecate: Oa
|
|
3479
|
+
}, a = Kn, o = ht.Buffer, f = (typeof Ke < "u" ? Ke : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
|
|
3463
3480
|
};
|
|
3464
3481
|
function c(_) {
|
|
3465
3482
|
return o.from(_);
|
|
@@ -3467,7 +3484,7 @@ function Vn() {
|
|
|
3467
3484
|
function u(_) {
|
|
3468
3485
|
return o.isBuffer(_) || _ instanceof f;
|
|
3469
3486
|
}
|
|
3470
|
-
var p =
|
|
3487
|
+
var p = Gn, w = Jn, m = w.getHighWaterMark, v = Ze.codes, A = v.ERR_INVALID_ARG_TYPE, C = v.ERR_METHOD_NOT_IMPLEMENTED, R = v.ERR_MULTIPLE_CALLBACK, k = v.ERR_STREAM_CANNOT_PIPE, S = v.ERR_STREAM_DESTROYED, T = v.ERR_STREAM_NULL_VALUES, L = v.ERR_STREAM_WRITE_AFTER_END, F = v.ERR_UNKNOWN_ENCODING, O = p.errorOrDestroy;
|
|
3471
3488
|
pe(N, a);
|
|
3472
3489
|
function P() {
|
|
3473
3490
|
}
|
|
@@ -3672,17 +3689,17 @@ function Vn() {
|
|
|
3672
3689
|
y(_);
|
|
3673
3690
|
}, hr;
|
|
3674
3691
|
}
|
|
3675
|
-
var dr,
|
|
3692
|
+
var dr, on;
|
|
3676
3693
|
function lt() {
|
|
3677
|
-
if (
|
|
3678
|
-
|
|
3694
|
+
if (on) return dr;
|
|
3695
|
+
on = 1;
|
|
3679
3696
|
var e = Object.keys || function(w) {
|
|
3680
3697
|
var m = [];
|
|
3681
3698
|
for (var v in w) m.push(v);
|
|
3682
3699
|
return m;
|
|
3683
3700
|
};
|
|
3684
3701
|
dr = c;
|
|
3685
|
-
var t =
|
|
3702
|
+
var t = Qn(), r = Yn();
|
|
3686
3703
|
pe(c, t);
|
|
3687
3704
|
for (var a = e(r.prototype), o = 0; o < a.length; o++) {
|
|
3688
3705
|
var f = a[o];
|
|
@@ -3736,7 +3753,7 @@ function lt() {
|
|
|
3736
3753
|
}
|
|
3737
3754
|
}), dr;
|
|
3738
3755
|
}
|
|
3739
|
-
var Kt = {}, Hr = me.Buffer,
|
|
3756
|
+
var Kt = {}, Hr = me.Buffer, sn = Hr.isEncoding || function(e) {
|
|
3740
3757
|
switch (e = "" + e, e && e.toLowerCase()) {
|
|
3741
3758
|
case "hex":
|
|
3742
3759
|
case "utf8":
|
|
@@ -3754,7 +3771,7 @@ var Kt = {}, Hr = me.Buffer, an = Hr.isEncoding || function(e) {
|
|
|
3754
3771
|
return !1;
|
|
3755
3772
|
}
|
|
3756
3773
|
};
|
|
3757
|
-
function
|
|
3774
|
+
function Ma(e) {
|
|
3758
3775
|
if (!e) return "utf8";
|
|
3759
3776
|
for (var t; ; )
|
|
3760
3777
|
switch (e) {
|
|
@@ -3778,27 +3795,27 @@ function Oa(e) {
|
|
|
3778
3795
|
e = ("" + e).toLowerCase(), t = !0;
|
|
3779
3796
|
}
|
|
3780
3797
|
}
|
|
3781
|
-
function
|
|
3782
|
-
var t =
|
|
3783
|
-
if (typeof t != "string" && (Hr.isEncoding ===
|
|
3798
|
+
function Pa(e) {
|
|
3799
|
+
var t = Ma(e);
|
|
3800
|
+
if (typeof t != "string" && (Hr.isEncoding === sn || !sn(e))) throw new Error("Unknown encoding: " + e);
|
|
3784
3801
|
return t || e;
|
|
3785
3802
|
}
|
|
3786
3803
|
Kt.StringDecoder = St;
|
|
3787
3804
|
function St(e) {
|
|
3788
|
-
this.encoding =
|
|
3805
|
+
this.encoding = Pa(e);
|
|
3789
3806
|
var t;
|
|
3790
3807
|
switch (this.encoding) {
|
|
3791
3808
|
case "utf16le":
|
|
3792
|
-
this.text =
|
|
3809
|
+
this.text = ja, this.end = Wa, t = 4;
|
|
3793
3810
|
break;
|
|
3794
3811
|
case "utf8":
|
|
3795
|
-
this.fillLast =
|
|
3812
|
+
this.fillLast = Ua, t = 4;
|
|
3796
3813
|
break;
|
|
3797
3814
|
case "base64":
|
|
3798
|
-
this.text =
|
|
3815
|
+
this.text = qa, this.end = Ka, t = 3;
|
|
3799
3816
|
break;
|
|
3800
3817
|
default:
|
|
3801
|
-
this.write =
|
|
3818
|
+
this.write = Ga, this.end = Va;
|
|
3802
3819
|
return;
|
|
3803
3820
|
}
|
|
3804
3821
|
this.lastNeed = 0, this.lastTotal = 0, this.lastChar = Hr.allocUnsafe(t);
|
|
@@ -3813,8 +3830,8 @@ St.prototype.write = function(e) {
|
|
|
3813
3830
|
r = 0;
|
|
3814
3831
|
return r < e.length ? t ? t + this.text(e, r) : this.text(e, r) : t || "";
|
|
3815
3832
|
};
|
|
3816
|
-
St.prototype.end =
|
|
3817
|
-
St.prototype.text =
|
|
3833
|
+
St.prototype.end = Ha;
|
|
3834
|
+
St.prototype.text = $a;
|
|
3818
3835
|
St.prototype.fillLast = function(e) {
|
|
3819
3836
|
if (this.lastNeed <= e.length)
|
|
3820
3837
|
return e.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal);
|
|
@@ -3823,13 +3840,13 @@ St.prototype.fillLast = function(e) {
|
|
|
3823
3840
|
function pr(e) {
|
|
3824
3841
|
return e <= 127 ? 0 : e >> 5 === 6 ? 2 : e >> 4 === 14 ? 3 : e >> 3 === 30 ? 4 : e >> 6 === 2 ? -1 : -2;
|
|
3825
3842
|
}
|
|
3826
|
-
function
|
|
3843
|
+
function Na(e, t, r) {
|
|
3827
3844
|
var a = t.length - 1;
|
|
3828
3845
|
if (a < r) return 0;
|
|
3829
3846
|
var o = pr(t[a]);
|
|
3830
3847
|
return o >= 0 ? (o > 0 && (e.lastNeed = o - 1), o) : --a < r || o === -2 ? 0 : (o = pr(t[a]), o >= 0 ? (o > 0 && (e.lastNeed = o - 2), o) : --a < r || o === -2 ? 0 : (o = pr(t[a]), o >= 0 ? (o > 0 && (o === 2 ? o = 0 : e.lastNeed = o - 3), o) : 0));
|
|
3831
3848
|
}
|
|
3832
|
-
function
|
|
3849
|
+
function Da(e, t, r) {
|
|
3833
3850
|
if ((t[0] & 192) !== 128)
|
|
3834
3851
|
return e.lastNeed = 0, "�";
|
|
3835
3852
|
if (e.lastNeed > 1 && t.length > 1) {
|
|
@@ -3839,25 +3856,25 @@ function Pa(e, t, r) {
|
|
|
3839
3856
|
return e.lastNeed = 2, "�";
|
|
3840
3857
|
}
|
|
3841
3858
|
}
|
|
3842
|
-
function
|
|
3843
|
-
var t = this.lastTotal - this.lastNeed, r =
|
|
3859
|
+
function Ua(e) {
|
|
3860
|
+
var t = this.lastTotal - this.lastNeed, r = Da(this, e);
|
|
3844
3861
|
if (r !== void 0) return r;
|
|
3845
3862
|
if (this.lastNeed <= e.length)
|
|
3846
3863
|
return e.copy(this.lastChar, t, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal);
|
|
3847
3864
|
e.copy(this.lastChar, t, 0, e.length), this.lastNeed -= e.length;
|
|
3848
3865
|
}
|
|
3849
|
-
function
|
|
3850
|
-
var r =
|
|
3866
|
+
function $a(e, t) {
|
|
3867
|
+
var r = Na(this, e, t);
|
|
3851
3868
|
if (!this.lastNeed) return e.toString("utf8", t);
|
|
3852
3869
|
this.lastTotal = r;
|
|
3853
3870
|
var a = e.length - (r - this.lastNeed);
|
|
3854
3871
|
return e.copy(this.lastChar, 0, a), e.toString("utf8", t, a);
|
|
3855
3872
|
}
|
|
3856
|
-
function
|
|
3873
|
+
function Ha(e) {
|
|
3857
3874
|
var t = e && e.length ? this.write(e) : "";
|
|
3858
3875
|
return this.lastNeed ? t + "�" : t;
|
|
3859
3876
|
}
|
|
3860
|
-
function
|
|
3877
|
+
function ja(e, t) {
|
|
3861
3878
|
if ((e.length - t) % 2 === 0) {
|
|
3862
3879
|
var r = e.toString("utf16le", t);
|
|
3863
3880
|
if (r) {
|
|
@@ -3869,7 +3886,7 @@ function $a(e, t) {
|
|
|
3869
3886
|
}
|
|
3870
3887
|
return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = e[e.length - 1], e.toString("utf16le", t, e.length - 1);
|
|
3871
3888
|
}
|
|
3872
|
-
function
|
|
3889
|
+
function Wa(e) {
|
|
3873
3890
|
var t = e && e.length ? this.write(e) : "";
|
|
3874
3891
|
if (this.lastNeed) {
|
|
3875
3892
|
var r = this.lastTotal - this.lastNeed;
|
|
@@ -3877,22 +3894,22 @@ function Ha(e) {
|
|
|
3877
3894
|
}
|
|
3878
3895
|
return t;
|
|
3879
3896
|
}
|
|
3880
|
-
function
|
|
3897
|
+
function qa(e, t) {
|
|
3881
3898
|
var r = (e.length - t) % 3;
|
|
3882
3899
|
return r === 0 ? e.toString("base64", t) : (this.lastNeed = 3 - r, this.lastTotal = 3, r === 1 ? this.lastChar[0] = e[e.length - 1] : (this.lastChar[0] = e[e.length - 2], this.lastChar[1] = e[e.length - 1]), e.toString("base64", t, e.length - r));
|
|
3883
3900
|
}
|
|
3884
|
-
function
|
|
3901
|
+
function Ka(e) {
|
|
3885
3902
|
var t = e && e.length ? this.write(e) : "";
|
|
3886
3903
|
return this.lastNeed ? t + this.lastChar.toString("base64", 0, 3 - this.lastNeed) : t;
|
|
3887
3904
|
}
|
|
3888
|
-
function
|
|
3905
|
+
function Ga(e) {
|
|
3889
3906
|
return e.toString(this.encoding);
|
|
3890
3907
|
}
|
|
3891
|
-
function
|
|
3908
|
+
function Va(e) {
|
|
3892
3909
|
return e && e.length ? this.write(e) : "";
|
|
3893
3910
|
}
|
|
3894
|
-
var
|
|
3895
|
-
function
|
|
3911
|
+
var fn = Ze.codes.ERR_STREAM_PREMATURE_CLOSE;
|
|
3912
|
+
function Ja(e) {
|
|
3896
3913
|
var t = !1;
|
|
3897
3914
|
return function() {
|
|
3898
3915
|
if (!t) {
|
|
@@ -3903,14 +3920,14 @@ function Ga(e) {
|
|
|
3903
3920
|
}
|
|
3904
3921
|
};
|
|
3905
3922
|
}
|
|
3906
|
-
function
|
|
3923
|
+
function Ya() {
|
|
3907
3924
|
}
|
|
3908
|
-
function
|
|
3925
|
+
function za(e) {
|
|
3909
3926
|
return e.setHeader && typeof e.abort == "function";
|
|
3910
3927
|
}
|
|
3911
|
-
function
|
|
3912
|
-
if (typeof t == "function") return
|
|
3913
|
-
t || (t = {}), r =
|
|
3928
|
+
function zn(e, t, r) {
|
|
3929
|
+
if (typeof t == "function") return zn(e, null, t);
|
|
3930
|
+
t || (t = {}), r = Ja(r || Ya);
|
|
3914
3931
|
var a = t.readable || t.readable !== !1 && e.readable, o = t.writable || t.writable !== !1 && e.writable, f = function() {
|
|
3915
3932
|
e.writable || u();
|
|
3916
3933
|
}, c = e._writableState && e._writableState.finished, u = function() {
|
|
@@ -3922,20 +3939,20 @@ function Jn(e, t, r) {
|
|
|
3922
3939
|
}, v = function() {
|
|
3923
3940
|
var R;
|
|
3924
3941
|
if (a && !p)
|
|
3925
|
-
return (!e._readableState || !e._readableState.ended) && (R = new
|
|
3942
|
+
return (!e._readableState || !e._readableState.ended) && (R = new fn()), r.call(e, R);
|
|
3926
3943
|
if (o && !c)
|
|
3927
|
-
return (!e._writableState || !e._writableState.ended) && (R = new
|
|
3944
|
+
return (!e._writableState || !e._writableState.ended) && (R = new fn()), r.call(e, R);
|
|
3928
3945
|
}, A = function() {
|
|
3929
3946
|
e.req.on("finish", u);
|
|
3930
3947
|
};
|
|
3931
|
-
return
|
|
3948
|
+
return za(e) ? (e.on("complete", u), e.on("abort", v), e.req ? A() : e.on("request", A)) : o && !e._writableState && (e.on("end", f), e.on("close", f)), e.on("end", w), e.on("finish", u), t.error !== !1 && e.on("error", m), e.on("close", v), function() {
|
|
3932
3949
|
e.removeListener("complete", u), e.removeListener("abort", v), e.removeListener("request", A), e.req && e.req.removeListener("finish", u), e.removeListener("end", f), e.removeListener("close", f), e.removeListener("finish", u), e.removeListener("end", w), e.removeListener("error", m), e.removeListener("close", v);
|
|
3933
3950
|
};
|
|
3934
3951
|
}
|
|
3935
|
-
var jr =
|
|
3936
|
-
function
|
|
3937
|
-
if (
|
|
3938
|
-
|
|
3952
|
+
var jr = zn, br, un;
|
|
3953
|
+
function Qa() {
|
|
3954
|
+
if (un) return br;
|
|
3955
|
+
un = 1;
|
|
3939
3956
|
var e;
|
|
3940
3957
|
function t(F, O, P) {
|
|
3941
3958
|
return O = r(O), O in F ? Object.defineProperty(F, O, { value: P, enumerable: !0, configurable: !0, writable: !0 }) : F[O] = P, F;
|
|
@@ -4058,21 +4075,21 @@ function Ya() {
|
|
|
4058
4075
|
};
|
|
4059
4076
|
return br = L, br;
|
|
4060
4077
|
}
|
|
4061
|
-
var yr,
|
|
4062
|
-
function
|
|
4063
|
-
return
|
|
4078
|
+
var yr, cn;
|
|
4079
|
+
function Xa() {
|
|
4080
|
+
return cn || (cn = 1, yr = function() {
|
|
4064
4081
|
throw new Error("Readable.from is not available in the browser");
|
|
4065
4082
|
}), yr;
|
|
4066
4083
|
}
|
|
4067
|
-
var _r,
|
|
4068
|
-
function
|
|
4069
|
-
if (
|
|
4070
|
-
|
|
4084
|
+
var _r, ln;
|
|
4085
|
+
function Qn() {
|
|
4086
|
+
if (ln) return _r;
|
|
4087
|
+
ln = 1, _r = U;
|
|
4071
4088
|
var e;
|
|
4072
|
-
U.ReadableState = N,
|
|
4089
|
+
U.ReadableState = N, qn.EventEmitter;
|
|
4073
4090
|
var t = function(d, B) {
|
|
4074
4091
|
return d.listeners(B).length;
|
|
4075
|
-
}, r =
|
|
4092
|
+
}, r = Kn, a = ht.Buffer, o = (typeof Ke < "u" ? Ke : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
|
|
4076
4093
|
};
|
|
4077
4094
|
function f(h) {
|
|
4078
4095
|
return a.from(h);
|
|
@@ -4083,7 +4100,7 @@ function Yn() {
|
|
|
4083
4100
|
var u = $r, p;
|
|
4084
4101
|
u && u.debuglog ? p = u.debuglog("stream") : p = function() {
|
|
4085
4102
|
};
|
|
4086
|
-
var w =
|
|
4103
|
+
var w = xa(), m = Gn, v = Jn, A = v.getHighWaterMark, C = Ze.codes, R = C.ERR_INVALID_ARG_TYPE, k = C.ERR_STREAM_PUSH_AFTER_EOF, S = C.ERR_METHOD_NOT_IMPLEMENTED, T = C.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, L, F, O;
|
|
4087
4104
|
pe(U, r);
|
|
4088
4105
|
var P = m.errorOrDestroy, E = ["error", "close", "destroy", "pause", "resume"];
|
|
4089
4106
|
function j(h, d, B) {
|
|
@@ -4340,7 +4357,7 @@ function Yn() {
|
|
|
4340
4357
|
p("wrapped _read", G), M && (M = !1, h.resume());
|
|
4341
4358
|
}, this;
|
|
4342
4359
|
}, typeof Symbol == "function" && (U.prototype[Symbol.asyncIterator] = function() {
|
|
4343
|
-
return F === void 0 && (F =
|
|
4360
|
+
return F === void 0 && (F = Qa()), F(this);
|
|
4344
4361
|
}), Object.defineProperty(U.prototype, "readableHighWaterMark", {
|
|
4345
4362
|
// making it explicit this property is not enumerable
|
|
4346
4363
|
// because otherwise some prototype manipulation in
|
|
@@ -4393,7 +4410,7 @@ function Yn() {
|
|
|
4393
4410
|
}
|
|
4394
4411
|
}
|
|
4395
4412
|
typeof Symbol == "function" && (U.from = function(h, d) {
|
|
4396
|
-
return O === void 0 && (O =
|
|
4413
|
+
return O === void 0 && (O = Xa()), O(U, h, d);
|
|
4397
4414
|
});
|
|
4398
4415
|
function W(h, d) {
|
|
4399
4416
|
for (var B = 0, M = h.length; B < M; B++)
|
|
@@ -4402,14 +4419,14 @@ function Yn() {
|
|
|
4402
4419
|
}
|
|
4403
4420
|
return _r;
|
|
4404
4421
|
}
|
|
4405
|
-
var
|
|
4422
|
+
var Xn = Ne, zt = Ze.codes, Za = zt.ERR_METHOD_NOT_IMPLEMENTED, eo = zt.ERR_MULTIPLE_CALLBACK, to = zt.ERR_TRANSFORM_ALREADY_TRANSFORMING, ro = zt.ERR_TRANSFORM_WITH_LENGTH_0, Qt = lt();
|
|
4406
4423
|
pe(Ne, Qt);
|
|
4407
|
-
function
|
|
4424
|
+
function no(e, t) {
|
|
4408
4425
|
var r = this._transformState;
|
|
4409
4426
|
r.transforming = !1;
|
|
4410
4427
|
var a = r.writecb;
|
|
4411
4428
|
if (a === null)
|
|
4412
|
-
return this.emit("error", new
|
|
4429
|
+
return this.emit("error", new eo());
|
|
4413
4430
|
r.writechunk = null, r.writecb = null, t != null && this.push(t), a(e);
|
|
4414
4431
|
var o = this._readableState;
|
|
4415
4432
|
o.reading = !1, (o.needReadable || o.length < o.highWaterMark) && this._read(o.highWaterMark);
|
|
@@ -4417,25 +4434,25 @@ function to(e, t) {
|
|
|
4417
4434
|
function Ne(e) {
|
|
4418
4435
|
if (!(this instanceof Ne)) return new Ne(e);
|
|
4419
4436
|
Qt.call(this, e), this._transformState = {
|
|
4420
|
-
afterTransform:
|
|
4437
|
+
afterTransform: no.bind(this),
|
|
4421
4438
|
needTransform: !1,
|
|
4422
4439
|
transforming: !1,
|
|
4423
4440
|
writecb: null,
|
|
4424
4441
|
writechunk: null,
|
|
4425
4442
|
writeencoding: null
|
|
4426
|
-
}, this._readableState.needReadable = !0, this._readableState.sync = !1, e && (typeof e.transform == "function" && (this._transform = e.transform), typeof e.flush == "function" && (this._flush = e.flush)), this.on("prefinish",
|
|
4443
|
+
}, this._readableState.needReadable = !0, this._readableState.sync = !1, e && (typeof e.transform == "function" && (this._transform = e.transform), typeof e.flush == "function" && (this._flush = e.flush)), this.on("prefinish", io);
|
|
4427
4444
|
}
|
|
4428
|
-
function
|
|
4445
|
+
function io() {
|
|
4429
4446
|
var e = this;
|
|
4430
4447
|
typeof this._flush == "function" && !this._readableState.destroyed ? this._flush(function(t, r) {
|
|
4431
|
-
|
|
4432
|
-
}) :
|
|
4448
|
+
hn(e, t, r);
|
|
4449
|
+
}) : hn(this, null, null);
|
|
4433
4450
|
}
|
|
4434
4451
|
Ne.prototype.push = function(e, t) {
|
|
4435
4452
|
return this._transformState.needTransform = !1, Qt.prototype.push.call(this, e, t);
|
|
4436
4453
|
};
|
|
4437
4454
|
Ne.prototype._transform = function(e, t, r) {
|
|
4438
|
-
r(new
|
|
4455
|
+
r(new Za("_transform()"));
|
|
4439
4456
|
};
|
|
4440
4457
|
Ne.prototype._write = function(e, t, r) {
|
|
4441
4458
|
var a = this._transformState;
|
|
@@ -4453,37 +4470,37 @@ Ne.prototype._destroy = function(e, t) {
|
|
|
4453
4470
|
t(r);
|
|
4454
4471
|
});
|
|
4455
4472
|
};
|
|
4456
|
-
function
|
|
4473
|
+
function hn(e, t, r) {
|
|
4457
4474
|
if (t) return e.emit("error", t);
|
|
4458
|
-
if (r != null && e.push(r), e._writableState.length) throw new
|
|
4459
|
-
if (e._transformState.transforming) throw new
|
|
4475
|
+
if (r != null && e.push(r), e._writableState.length) throw new ro();
|
|
4476
|
+
if (e._transformState.transforming) throw new to();
|
|
4460
4477
|
return e.push(null);
|
|
4461
4478
|
}
|
|
4462
|
-
var
|
|
4463
|
-
pe(Bt,
|
|
4479
|
+
var ao = Bt, Zn = Xn;
|
|
4480
|
+
pe(Bt, Zn);
|
|
4464
4481
|
function Bt(e) {
|
|
4465
4482
|
if (!(this instanceof Bt)) return new Bt(e);
|
|
4466
|
-
|
|
4483
|
+
Zn.call(this, e);
|
|
4467
4484
|
}
|
|
4468
4485
|
Bt.prototype._transform = function(e, t, r) {
|
|
4469
4486
|
r(null, e);
|
|
4470
4487
|
};
|
|
4471
4488
|
var gr;
|
|
4472
|
-
function
|
|
4489
|
+
function oo(e) {
|
|
4473
4490
|
var t = !1;
|
|
4474
4491
|
return function() {
|
|
4475
4492
|
t || (t = !0, e.apply(void 0, arguments));
|
|
4476
4493
|
};
|
|
4477
4494
|
}
|
|
4478
|
-
var
|
|
4479
|
-
function
|
|
4495
|
+
var ei = Ze.codes, so = ei.ERR_MISSING_ARGS, fo = ei.ERR_STREAM_DESTROYED;
|
|
4496
|
+
function dn(e) {
|
|
4480
4497
|
if (e) throw e;
|
|
4481
4498
|
}
|
|
4482
|
-
function
|
|
4499
|
+
function uo(e) {
|
|
4483
4500
|
return e.setHeader && typeof e.abort == "function";
|
|
4484
4501
|
}
|
|
4485
|
-
function
|
|
4486
|
-
a =
|
|
4502
|
+
function co(e, t, r, a) {
|
|
4503
|
+
a = oo(a);
|
|
4487
4504
|
var o = !1;
|
|
4488
4505
|
e.on("close", function() {
|
|
4489
4506
|
o = !0;
|
|
@@ -4497,48 +4514,48 @@ function fo(e, t, r, a) {
|
|
|
4497
4514
|
var f = !1;
|
|
4498
4515
|
return function(c) {
|
|
4499
4516
|
if (!o && !f) {
|
|
4500
|
-
if (f = !0,
|
|
4517
|
+
if (f = !0, uo(e)) return e.abort();
|
|
4501
4518
|
if (typeof e.destroy == "function") return e.destroy();
|
|
4502
|
-
a(c || new
|
|
4519
|
+
a(c || new fo("pipe"));
|
|
4503
4520
|
}
|
|
4504
4521
|
};
|
|
4505
4522
|
}
|
|
4506
|
-
function
|
|
4523
|
+
function pn(e) {
|
|
4507
4524
|
e();
|
|
4508
4525
|
}
|
|
4509
|
-
function
|
|
4526
|
+
function lo(e, t) {
|
|
4510
4527
|
return e.pipe(t);
|
|
4511
4528
|
}
|
|
4512
|
-
function
|
|
4513
|
-
return !e.length || typeof e[e.length - 1] != "function" ?
|
|
4529
|
+
function ho(e) {
|
|
4530
|
+
return !e.length || typeof e[e.length - 1] != "function" ? dn : e.pop();
|
|
4514
4531
|
}
|
|
4515
|
-
function
|
|
4532
|
+
function po() {
|
|
4516
4533
|
for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
|
|
4517
4534
|
t[r] = arguments[r];
|
|
4518
|
-
var a =
|
|
4535
|
+
var a = ho(t);
|
|
4519
4536
|
if (Array.isArray(t[0]) && (t = t[0]), t.length < 2)
|
|
4520
|
-
throw new
|
|
4537
|
+
throw new so("streams");
|
|
4521
4538
|
var o, f = t.map(function(c, u) {
|
|
4522
4539
|
var p = u < t.length - 1, w = u > 0;
|
|
4523
|
-
return
|
|
4524
|
-
o || (o = m), m && f.forEach(
|
|
4540
|
+
return co(c, p, w, function(m) {
|
|
4541
|
+
o || (o = m), m && f.forEach(pn), !p && (f.forEach(pn), a(o));
|
|
4525
4542
|
});
|
|
4526
4543
|
});
|
|
4527
|
-
return t.reduce(
|
|
4544
|
+
return t.reduce(lo);
|
|
4528
4545
|
}
|
|
4529
|
-
var
|
|
4546
|
+
var bo = po;
|
|
4530
4547
|
(function(e, t) {
|
|
4531
|
-
t = e.exports =
|
|
4548
|
+
t = e.exports = Qn(), t.Stream = t, t.Readable = t, t.Writable = Yn(), t.Duplex = lt(), t.Transform = Xn, t.PassThrough = ao, t.finished = jr, t.pipeline = bo;
|
|
4532
4549
|
})(Tr, Tr.exports);
|
|
4533
|
-
var
|
|
4534
|
-
function
|
|
4550
|
+
var yo = Tr.exports, Gt = me.Buffer, ti = yo.Transform, _o = pe;
|
|
4551
|
+
function go(e, t) {
|
|
4535
4552
|
if (!Gt.isBuffer(e) && typeof e != "string")
|
|
4536
4553
|
throw new TypeError(t + " must be a string or a buffer");
|
|
4537
4554
|
}
|
|
4538
4555
|
function Ge(e) {
|
|
4539
|
-
|
|
4556
|
+
ti.call(this), this._block = Gt.allocUnsafe(e), this._blockSize = e, this._blockOffset = 0, this._length = [0, 0, 0, 0], this._finalized = !1;
|
|
4540
4557
|
}
|
|
4541
|
-
|
|
4558
|
+
_o(Ge, ti);
|
|
4542
4559
|
Ge.prototype._transform = function(e, t, r) {
|
|
4543
4560
|
var a = null;
|
|
4544
4561
|
try {
|
|
@@ -4558,7 +4575,7 @@ Ge.prototype._flush = function(e) {
|
|
|
4558
4575
|
e(t);
|
|
4559
4576
|
};
|
|
4560
4577
|
Ge.prototype.update = function(e, t) {
|
|
4561
|
-
if (
|
|
4578
|
+
if (go(e, "Data"), this._finalized) throw new Error("Digest already called");
|
|
4562
4579
|
Gt.isBuffer(e) || (e = Gt.from(e, t));
|
|
4563
4580
|
for (var r = this._block, a = 0; this._blockOffset + e.length - a >= this._blockSize; ) {
|
|
4564
4581
|
for (var o = this._blockOffset; o < this._blockSize; ) r[o++] = e[a++];
|
|
@@ -4583,19 +4600,19 @@ Ge.prototype.digest = function(e) {
|
|
|
4583
4600
|
Ge.prototype._digest = function() {
|
|
4584
4601
|
throw new Error("_digest is not implemented");
|
|
4585
4602
|
};
|
|
4586
|
-
var
|
|
4603
|
+
var ri = Ge, wo = pe, ni = ri, mo = me.Buffer, vo = new Array(16);
|
|
4587
4604
|
function Xt() {
|
|
4588
|
-
|
|
4605
|
+
ni.call(this, 64), this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878;
|
|
4589
4606
|
}
|
|
4590
|
-
|
|
4607
|
+
wo(Xt, ni);
|
|
4591
4608
|
Xt.prototype._update = function() {
|
|
4592
|
-
for (var e =
|
|
4609
|
+
for (var e = vo, t = 0; t < 16; ++t) e[t] = this._block.readInt32LE(t * 4);
|
|
4593
4610
|
var r = this._a, a = this._b, o = this._c, f = this._d;
|
|
4594
4611
|
r = ue(r, a, o, f, e[0], 3614090360, 7), f = ue(f, r, a, o, e[1], 3905402710, 12), o = ue(o, f, r, a, e[2], 606105819, 17), a = ue(a, o, f, r, e[3], 3250441966, 22), r = ue(r, a, o, f, e[4], 4118548399, 7), f = ue(f, r, a, o, e[5], 1200080426, 12), o = ue(o, f, r, a, e[6], 2821735955, 17), a = ue(a, o, f, r, e[7], 4249261313, 22), r = ue(r, a, o, f, e[8], 1770035416, 7), f = ue(f, r, a, o, e[9], 2336552879, 12), o = ue(o, f, r, a, e[10], 4294925233, 17), a = ue(a, o, f, r, e[11], 2304563134, 22), r = ue(r, a, o, f, e[12], 1804603682, 7), f = ue(f, r, a, o, e[13], 4254626195, 12), o = ue(o, f, r, a, e[14], 2792965006, 17), a = ue(a, o, f, r, e[15], 1236535329, 22), r = ce(r, a, o, f, e[1], 4129170786, 5), f = ce(f, r, a, o, e[6], 3225465664, 9), o = ce(o, f, r, a, e[11], 643717713, 14), a = ce(a, o, f, r, e[0], 3921069994, 20), r = ce(r, a, o, f, e[5], 3593408605, 5), f = ce(f, r, a, o, e[10], 38016083, 9), o = ce(o, f, r, a, e[15], 3634488961, 14), a = ce(a, o, f, r, e[4], 3889429448, 20), r = ce(r, a, o, f, e[9], 568446438, 5), f = ce(f, r, a, o, e[14], 3275163606, 9), o = ce(o, f, r, a, e[3], 4107603335, 14), a = ce(a, o, f, r, e[8], 1163531501, 20), r = ce(r, a, o, f, e[13], 2850285829, 5), f = ce(f, r, a, o, e[2], 4243563512, 9), o = ce(o, f, r, a, e[7], 1735328473, 14), a = ce(a, o, f, r, e[12], 2368359562, 20), r = le(r, a, o, f, e[5], 4294588738, 4), f = le(f, r, a, o, e[8], 2272392833, 11), o = le(o, f, r, a, e[11], 1839030562, 16), a = le(a, o, f, r, e[14], 4259657740, 23), r = le(r, a, o, f, e[1], 2763975236, 4), f = le(f, r, a, o, e[4], 1272893353, 11), o = le(o, f, r, a, e[7], 4139469664, 16), a = le(a, o, f, r, e[10], 3200236656, 23), r = le(r, a, o, f, e[13], 681279174, 4), f = le(f, r, a, o, e[0], 3936430074, 11), o = le(o, f, r, a, e[3], 3572445317, 16), a = le(a, o, f, r, e[6], 76029189, 23), r = le(r, a, o, f, e[9], 3654602809, 4), f = le(f, r, a, o, e[12], 3873151461, 11), o = le(o, f, r, a, e[15], 530742520, 16), a = le(a, o, f, r, e[2], 3299628645, 23), r = he(r, a, o, f, e[0], 4096336452, 6), f = he(f, r, a, o, e[7], 1126891415, 10), o = he(o, f, r, a, e[14], 2878612391, 15), a = he(a, o, f, r, e[5], 4237533241, 21), r = he(r, a, o, f, e[12], 1700485571, 6), f = he(f, r, a, o, e[3], 2399980690, 10), o = he(o, f, r, a, e[10], 4293915773, 15), a = he(a, o, f, r, e[1], 2240044497, 21), r = he(r, a, o, f, e[8], 1873313359, 6), f = he(f, r, a, o, e[15], 4264355552, 10), o = he(o, f, r, a, e[6], 2734768916, 15), a = he(a, o, f, r, e[13], 1309151649, 21), r = he(r, a, o, f, e[4], 4149444226, 6), f = he(f, r, a, o, e[11], 3174756917, 10), o = he(o, f, r, a, e[2], 718787259, 15), a = he(a, o, f, r, e[9], 3951481745, 21), this._a = this._a + r | 0, this._b = this._b + a | 0, this._c = this._c + o | 0, this._d = this._d + f | 0;
|
|
4595
4612
|
};
|
|
4596
4613
|
Xt.prototype._digest = function() {
|
|
4597
4614
|
this._block[this._blockOffset++] = 128, this._blockOffset > 56 && (this._block.fill(0, this._blockOffset, 64), this._update(), this._blockOffset = 0), this._block.fill(0, this._blockOffset, 56), this._block.writeUInt32LE(this._length[0], 56), this._block.writeUInt32LE(this._length[1], 60), this._update();
|
|
4598
|
-
var e =
|
|
4615
|
+
var e = mo.allocUnsafe(16);
|
|
4599
4616
|
return e.writeInt32LE(this._a, 0), e.writeInt32LE(this._b, 4), e.writeInt32LE(this._c, 8), e.writeInt32LE(this._d, 12), e;
|
|
4600
4617
|
};
|
|
4601
4618
|
function Zt(e, t) {
|
|
@@ -4613,7 +4630,7 @@ function le(e, t, r, a, o, f, c) {
|
|
|
4613
4630
|
function he(e, t, r, a, o, f, c) {
|
|
4614
4631
|
return Zt(e + (r ^ (t | ~a)) + o + f | 0, c) + t | 0;
|
|
4615
4632
|
}
|
|
4616
|
-
var
|
|
4633
|
+
var xo = Xt, wr = ht.Buffer, Eo = pe, ii = ri, Bo = new Array(16), _t = [
|
|
4617
4634
|
0,
|
|
4618
4635
|
1,
|
|
4619
4636
|
2,
|
|
@@ -4939,14 +4956,14 @@ var mo = Xt, wr = ht.Buffer, vo = pe, ri = ei, xo = new Array(16), _t = [
|
|
|
4939
4956
|
11
|
|
4940
4957
|
], vt = [0, 1518500249, 1859775393, 2400959708, 2840853838], xt = [1352829926, 1548603684, 1836072691, 2053994217, 0];
|
|
4941
4958
|
function er() {
|
|
4942
|
-
|
|
4959
|
+
ii.call(this, 64), this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520;
|
|
4943
4960
|
}
|
|
4944
|
-
|
|
4961
|
+
Eo(er, ii);
|
|
4945
4962
|
er.prototype._update = function() {
|
|
4946
|
-
for (var e =
|
|
4963
|
+
for (var e = Bo, t = 0; t < 16; ++t) e[t] = this._block.readInt32LE(t * 4);
|
|
4947
4964
|
for (var r = this._a | 0, a = this._b | 0, o = this._c | 0, f = this._d | 0, c = this._e | 0, u = this._a | 0, p = this._b | 0, w = this._c | 0, m = this._d | 0, v = this._e | 0, A = 0; A < 80; A += 1) {
|
|
4948
4965
|
var C, R;
|
|
4949
|
-
A < 16 ? (C =
|
|
4966
|
+
A < 16 ? (C = bn(r, a, o, f, c, e[_t[A]], vt[0], wt[A]), R = wn(u, p, w, m, v, e[gt[A]], xt[0], mt[A])) : A < 32 ? (C = yn(r, a, o, f, c, e[_t[A]], vt[1], wt[A]), R = gn(u, p, w, m, v, e[gt[A]], xt[1], mt[A])) : A < 48 ? (C = _n(r, a, o, f, c, e[_t[A]], vt[2], wt[A]), R = _n(u, p, w, m, v, e[gt[A]], xt[2], mt[A])) : A < 64 ? (C = gn(r, a, o, f, c, e[_t[A]], vt[3], wt[A]), R = yn(u, p, w, m, v, e[gt[A]], xt[3], mt[A])) : (C = wn(r, a, o, f, c, e[_t[A]], vt[4], wt[A]), R = bn(u, p, w, m, v, e[gt[A]], xt[4], mt[A])), r = c, c = f, f = Xe(o, 10), o = a, a = C, u = v, v = m, m = Xe(w, 10), w = p, p = R;
|
|
4950
4967
|
}
|
|
4951
4968
|
var k = this._b + o + m | 0;
|
|
4952
4969
|
this._b = this._c + f + v | 0, this._c = this._d + c + u | 0, this._d = this._e + r + p | 0, this._e = this._a + a + w | 0, this._a = k;
|
|
@@ -4959,27 +4976,27 @@ er.prototype._digest = function() {
|
|
|
4959
4976
|
function Xe(e, t) {
|
|
4960
4977
|
return e << t | e >>> 32 - t;
|
|
4961
4978
|
}
|
|
4962
|
-
function
|
|
4979
|
+
function bn(e, t, r, a, o, f, c, u) {
|
|
4963
4980
|
return Xe(e + (t ^ r ^ a) + f + c | 0, u) + o | 0;
|
|
4964
4981
|
}
|
|
4965
|
-
function
|
|
4982
|
+
function yn(e, t, r, a, o, f, c, u) {
|
|
4966
4983
|
return Xe(e + (t & r | ~t & a) + f + c | 0, u) + o | 0;
|
|
4967
4984
|
}
|
|
4968
|
-
function
|
|
4985
|
+
function _n(e, t, r, a, o, f, c, u) {
|
|
4969
4986
|
return Xe(e + ((t | ~r) ^ a) + f + c | 0, u) + o | 0;
|
|
4970
4987
|
}
|
|
4971
|
-
function
|
|
4988
|
+
function gn(e, t, r, a, o, f, c, u) {
|
|
4972
4989
|
return Xe(e + (t & a | r & ~a) + f + c | 0, u) + o | 0;
|
|
4973
4990
|
}
|
|
4974
|
-
function
|
|
4991
|
+
function wn(e, t, r, a, o, f, c, u) {
|
|
4975
4992
|
return Xe(e + (t ^ (r | ~a)) + f + c | 0, u) + o | 0;
|
|
4976
4993
|
}
|
|
4977
|
-
var
|
|
4994
|
+
var Ro = er, ai = { exports: {} }, oi = me.Buffer;
|
|
4978
4995
|
function tr(e, t) {
|
|
4979
|
-
this._block =
|
|
4996
|
+
this._block = oi.alloc(e), this._finalSize = t, this._blockSize = e, this._len = 0;
|
|
4980
4997
|
}
|
|
4981
4998
|
tr.prototype.update = function(e, t) {
|
|
4982
|
-
typeof e == "string" && (t = t || "utf8", e =
|
|
4999
|
+
typeof e == "string" && (t = t || "utf8", e = oi.from(e, t));
|
|
4983
5000
|
for (var r = this._block, a = this._blockSize, o = e.length, f = this._len, c = 0; c < o; ) {
|
|
4984
5001
|
for (var u = f % a, p = Math.min(o - c, a - u), w = 0; w < p; w++)
|
|
4985
5002
|
r[u + w] = e[c + w];
|
|
@@ -5004,80 +5021,80 @@ tr.prototype.digest = function(e) {
|
|
|
5004
5021
|
tr.prototype._update = function() {
|
|
5005
5022
|
throw new Error("_update must be implemented by subclass");
|
|
5006
5023
|
};
|
|
5007
|
-
var dt = tr,
|
|
5024
|
+
var dt = tr, So = pe, si = dt, Ao = me.Buffer, Io = [
|
|
5008
5025
|
1518500249,
|
|
5009
5026
|
1859775393,
|
|
5010
5027
|
-1894007588,
|
|
5011
5028
|
-899497514
|
|
5012
|
-
],
|
|
5029
|
+
], To = new Array(80);
|
|
5013
5030
|
function At() {
|
|
5014
|
-
this.init(), this._w =
|
|
5031
|
+
this.init(), this._w = To, si.call(this, 64, 56);
|
|
5015
5032
|
}
|
|
5016
|
-
|
|
5033
|
+
So(At, si);
|
|
5017
5034
|
At.prototype.init = function() {
|
|
5018
5035
|
return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this;
|
|
5019
5036
|
};
|
|
5020
|
-
function
|
|
5037
|
+
function Co(e) {
|
|
5021
5038
|
return e << 5 | e >>> 27;
|
|
5022
5039
|
}
|
|
5023
|
-
function
|
|
5040
|
+
function ko(e) {
|
|
5024
5041
|
return e << 30 | e >>> 2;
|
|
5025
5042
|
}
|
|
5026
|
-
function
|
|
5043
|
+
function Lo(e, t, r, a) {
|
|
5027
5044
|
return e === 0 ? t & r | ~t & a : e === 2 ? t & r | t & a | r & a : t ^ r ^ a;
|
|
5028
5045
|
}
|
|
5029
5046
|
At.prototype._update = function(e) {
|
|
5030
5047
|
for (var t = this._w, r = this._a | 0, a = this._b | 0, o = this._c | 0, f = this._d | 0, c = this._e | 0, u = 0; u < 16; ++u) t[u] = e.readInt32BE(u * 4);
|
|
5031
5048
|
for (; u < 80; ++u) t[u] = t[u - 3] ^ t[u - 8] ^ t[u - 14] ^ t[u - 16];
|
|
5032
5049
|
for (var p = 0; p < 80; ++p) {
|
|
5033
|
-
var w = ~~(p / 20), m =
|
|
5034
|
-
c = f, f = o, o =
|
|
5050
|
+
var w = ~~(p / 20), m = Co(r) + Lo(w, a, o, f) + c + t[p] + Io[w] | 0;
|
|
5051
|
+
c = f, f = o, o = ko(a), a = r, r = m;
|
|
5035
5052
|
}
|
|
5036
5053
|
this._a = r + this._a | 0, this._b = a + this._b | 0, this._c = o + this._c | 0, this._d = f + this._d | 0, this._e = c + this._e | 0;
|
|
5037
5054
|
};
|
|
5038
5055
|
At.prototype._hash = function() {
|
|
5039
|
-
var e =
|
|
5056
|
+
var e = Ao.allocUnsafe(20);
|
|
5040
5057
|
return e.writeInt32BE(this._a | 0, 0), e.writeInt32BE(this._b | 0, 4), e.writeInt32BE(this._c | 0, 8), e.writeInt32BE(this._d | 0, 12), e.writeInt32BE(this._e | 0, 16), e;
|
|
5041
5058
|
};
|
|
5042
|
-
var
|
|
5059
|
+
var Oo = At, Fo = pe, fi = dt, Mo = me.Buffer, Po = [
|
|
5043
5060
|
1518500249,
|
|
5044
5061
|
1859775393,
|
|
5045
5062
|
-1894007588,
|
|
5046
5063
|
-899497514
|
|
5047
|
-
],
|
|
5064
|
+
], No = new Array(80);
|
|
5048
5065
|
function It() {
|
|
5049
|
-
this.init(), this._w =
|
|
5066
|
+
this.init(), this._w = No, fi.call(this, 64, 56);
|
|
5050
5067
|
}
|
|
5051
|
-
|
|
5068
|
+
Fo(It, fi);
|
|
5052
5069
|
It.prototype.init = function() {
|
|
5053
5070
|
return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this;
|
|
5054
5071
|
};
|
|
5055
|
-
function
|
|
5072
|
+
function Do(e) {
|
|
5056
5073
|
return e << 1 | e >>> 31;
|
|
5057
5074
|
}
|
|
5058
|
-
function
|
|
5075
|
+
function Uo(e) {
|
|
5059
5076
|
return e << 5 | e >>> 27;
|
|
5060
5077
|
}
|
|
5061
|
-
function
|
|
5078
|
+
function $o(e) {
|
|
5062
5079
|
return e << 30 | e >>> 2;
|
|
5063
5080
|
}
|
|
5064
|
-
function
|
|
5081
|
+
function Ho(e, t, r, a) {
|
|
5065
5082
|
return e === 0 ? t & r | ~t & a : e === 2 ? t & r | t & a | r & a : t ^ r ^ a;
|
|
5066
5083
|
}
|
|
5067
5084
|
It.prototype._update = function(e) {
|
|
5068
5085
|
for (var t = this._w, r = this._a | 0, a = this._b | 0, o = this._c | 0, f = this._d | 0, c = this._e | 0, u = 0; u < 16; ++u) t[u] = e.readInt32BE(u * 4);
|
|
5069
|
-
for (; u < 80; ++u) t[u] =
|
|
5086
|
+
for (; u < 80; ++u) t[u] = Do(t[u - 3] ^ t[u - 8] ^ t[u - 14] ^ t[u - 16]);
|
|
5070
5087
|
for (var p = 0; p < 80; ++p) {
|
|
5071
|
-
var w = ~~(p / 20), m =
|
|
5072
|
-
c = f, f = o, o =
|
|
5088
|
+
var w = ~~(p / 20), m = Uo(r) + Ho(w, a, o, f) + c + t[p] + Po[w] | 0;
|
|
5089
|
+
c = f, f = o, o = $o(a), a = r, r = m;
|
|
5073
5090
|
}
|
|
5074
5091
|
this._a = r + this._a | 0, this._b = a + this._b | 0, this._c = o + this._c | 0, this._d = f + this._d | 0, this._e = c + this._e | 0;
|
|
5075
5092
|
};
|
|
5076
5093
|
It.prototype._hash = function() {
|
|
5077
|
-
var e =
|
|
5094
|
+
var e = Mo.allocUnsafe(20);
|
|
5078
5095
|
return e.writeInt32BE(this._a | 0, 0), e.writeInt32BE(this._b | 0, 4), e.writeInt32BE(this._c | 0, 8), e.writeInt32BE(this._d | 0, 12), e.writeInt32BE(this._e | 0, 16), e;
|
|
5079
5096
|
};
|
|
5080
|
-
var
|
|
5097
|
+
var jo = It, Wo = pe, ui = dt, qo = me.Buffer, Ko = [
|
|
5081
5098
|
1116352408,
|
|
5082
5099
|
1899447441,
|
|
5083
5100
|
3049323471,
|
|
@@ -5142,58 +5159,58 @@ var $o = It, Ho = pe, si = dt, jo = me.Buffer, Wo = [
|
|
|
5142
5159
|
2756734187,
|
|
5143
5160
|
3204031479,
|
|
5144
5161
|
3329325298
|
|
5145
|
-
],
|
|
5162
|
+
], Go = new Array(64);
|
|
5146
5163
|
function Tt() {
|
|
5147
|
-
this.init(), this._w =
|
|
5164
|
+
this.init(), this._w = Go, ui.call(this, 64, 56);
|
|
5148
5165
|
}
|
|
5149
|
-
|
|
5166
|
+
Wo(Tt, ui);
|
|
5150
5167
|
Tt.prototype.init = function() {
|
|
5151
5168
|
return this._a = 1779033703, this._b = 3144134277, this._c = 1013904242, this._d = 2773480762, this._e = 1359893119, this._f = 2600822924, this._g = 528734635, this._h = 1541459225, this;
|
|
5152
5169
|
};
|
|
5153
|
-
function
|
|
5170
|
+
function Vo(e, t, r) {
|
|
5154
5171
|
return r ^ e & (t ^ r);
|
|
5155
5172
|
}
|
|
5156
|
-
function
|
|
5173
|
+
function Jo(e, t, r) {
|
|
5157
5174
|
return e & t | r & (e | t);
|
|
5158
5175
|
}
|
|
5159
|
-
function
|
|
5176
|
+
function Yo(e) {
|
|
5160
5177
|
return (e >>> 2 | e << 30) ^ (e >>> 13 | e << 19) ^ (e >>> 22 | e << 10);
|
|
5161
5178
|
}
|
|
5162
|
-
function
|
|
5179
|
+
function zo(e) {
|
|
5163
5180
|
return (e >>> 6 | e << 26) ^ (e >>> 11 | e << 21) ^ (e >>> 25 | e << 7);
|
|
5164
5181
|
}
|
|
5165
|
-
function
|
|
5182
|
+
function Qo(e) {
|
|
5166
5183
|
return (e >>> 7 | e << 25) ^ (e >>> 18 | e << 14) ^ e >>> 3;
|
|
5167
5184
|
}
|
|
5168
|
-
function
|
|
5185
|
+
function Xo(e) {
|
|
5169
5186
|
return (e >>> 17 | e << 15) ^ (e >>> 19 | e << 13) ^ e >>> 10;
|
|
5170
5187
|
}
|
|
5171
5188
|
Tt.prototype._update = function(e) {
|
|
5172
5189
|
for (var t = this._w, r = this._a | 0, a = this._b | 0, o = this._c | 0, f = this._d | 0, c = this._e | 0, u = this._f | 0, p = this._g | 0, w = this._h | 0, m = 0; m < 16; ++m) t[m] = e.readInt32BE(m * 4);
|
|
5173
|
-
for (; m < 64; ++m) t[m] =
|
|
5190
|
+
for (; m < 64; ++m) t[m] = Xo(t[m - 2]) + t[m - 7] + Qo(t[m - 15]) + t[m - 16] | 0;
|
|
5174
5191
|
for (var v = 0; v < 64; ++v) {
|
|
5175
|
-
var A = w +
|
|
5192
|
+
var A = w + zo(c) + Vo(c, u, p) + Ko[v] + t[v] | 0, C = Yo(r) + Jo(r, a, o) | 0;
|
|
5176
5193
|
w = p, p = u, u = c, c = f + A | 0, f = o, o = a, a = r, r = A + C | 0;
|
|
5177
5194
|
}
|
|
5178
5195
|
this._a = r + this._a | 0, this._b = a + this._b | 0, this._c = o + this._c | 0, this._d = f + this._d | 0, this._e = c + this._e | 0, this._f = u + this._f | 0, this._g = p + this._g | 0, this._h = w + this._h | 0;
|
|
5179
5196
|
};
|
|
5180
5197
|
Tt.prototype._hash = function() {
|
|
5181
|
-
var e =
|
|
5198
|
+
var e = qo.allocUnsafe(32);
|
|
5182
5199
|
return e.writeInt32BE(this._a, 0), e.writeInt32BE(this._b, 4), e.writeInt32BE(this._c, 8), e.writeInt32BE(this._d, 12), e.writeInt32BE(this._e, 16), e.writeInt32BE(this._f, 20), e.writeInt32BE(this._g, 24), e.writeInt32BE(this._h, 28), e;
|
|
5183
5200
|
};
|
|
5184
|
-
var
|
|
5201
|
+
var ci = Tt, Zo = pe, es = ci, ts = dt, rs = me.Buffer, ns = new Array(64);
|
|
5185
5202
|
function rr() {
|
|
5186
|
-
this.init(), this._w =
|
|
5203
|
+
this.init(), this._w = ns, ts.call(this, 64, 56);
|
|
5187
5204
|
}
|
|
5188
|
-
|
|
5205
|
+
Zo(rr, es);
|
|
5189
5206
|
rr.prototype.init = function() {
|
|
5190
5207
|
return this._a = 3238371032, this._b = 914150663, this._c = 812702999, this._d = 4144912697, this._e = 4290775857, this._f = 1750603025, this._g = 1694076839, this._h = 3204075428, this;
|
|
5191
5208
|
};
|
|
5192
5209
|
rr.prototype._hash = function() {
|
|
5193
|
-
var e =
|
|
5210
|
+
var e = rs.allocUnsafe(28);
|
|
5194
5211
|
return e.writeInt32BE(this._a, 0), e.writeInt32BE(this._b, 4), e.writeInt32BE(this._c, 8), e.writeInt32BE(this._d, 12), e.writeInt32BE(this._e, 16), e.writeInt32BE(this._f, 20), e.writeInt32BE(this._g, 24), e;
|
|
5195
5212
|
};
|
|
5196
|
-
var
|
|
5213
|
+
var is = rr, as = pe, li = dt, os = me.Buffer, mn = [
|
|
5197
5214
|
1116352408,
|
|
5198
5215
|
3609767458,
|
|
5199
5216
|
1899447441,
|
|
@@ -5354,36 +5371,36 @@ var rs = rr, ns = pe, ui = dt, is = me.Buffer, gn = [
|
|
|
5354
5371
|
987167468,
|
|
5355
5372
|
1816402316,
|
|
5356
5373
|
1246189591
|
|
5357
|
-
],
|
|
5374
|
+
], ss = new Array(160);
|
|
5358
5375
|
function Ct() {
|
|
5359
|
-
this.init(), this._w =
|
|
5376
|
+
this.init(), this._w = ss, li.call(this, 128, 112);
|
|
5360
5377
|
}
|
|
5361
|
-
|
|
5378
|
+
as(Ct, li);
|
|
5362
5379
|
Ct.prototype.init = function() {
|
|
5363
5380
|
return this._ah = 1779033703, this._bh = 3144134277, this._ch = 1013904242, this._dh = 2773480762, this._eh = 1359893119, this._fh = 2600822924, this._gh = 528734635, this._hh = 1541459225, this._al = 4089235720, this._bl = 2227873595, this._cl = 4271175723, this._dl = 1595750129, this._el = 2917565137, this._fl = 725511199, this._gl = 4215389547, this._hl = 327033209, this;
|
|
5364
5381
|
};
|
|
5365
|
-
function
|
|
5382
|
+
function vn(e, t, r) {
|
|
5366
5383
|
return r ^ e & (t ^ r);
|
|
5367
5384
|
}
|
|
5368
|
-
function
|
|
5385
|
+
function xn(e, t, r) {
|
|
5369
5386
|
return e & t | r & (e | t);
|
|
5370
5387
|
}
|
|
5371
|
-
function
|
|
5388
|
+
function En(e, t) {
|
|
5372
5389
|
return (e >>> 28 | t << 4) ^ (t >>> 2 | e << 30) ^ (t >>> 7 | e << 25);
|
|
5373
5390
|
}
|
|
5374
|
-
function
|
|
5391
|
+
function Bn(e, t) {
|
|
5375
5392
|
return (e >>> 14 | t << 18) ^ (e >>> 18 | t << 14) ^ (t >>> 9 | e << 23);
|
|
5376
5393
|
}
|
|
5377
|
-
function
|
|
5394
|
+
function fs(e, t) {
|
|
5378
5395
|
return (e >>> 1 | t << 31) ^ (e >>> 8 | t << 24) ^ e >>> 7;
|
|
5379
5396
|
}
|
|
5380
|
-
function
|
|
5397
|
+
function us(e, t) {
|
|
5381
5398
|
return (e >>> 1 | t << 31) ^ (e >>> 8 | t << 24) ^ (e >>> 7 | t << 25);
|
|
5382
5399
|
}
|
|
5383
|
-
function
|
|
5400
|
+
function cs(e, t) {
|
|
5384
5401
|
return (e >>> 19 | t << 13) ^ (t >>> 29 | e << 3) ^ e >>> 6;
|
|
5385
5402
|
}
|
|
5386
|
-
function
|
|
5403
|
+
function ls(e, t) {
|
|
5387
5404
|
return (e >>> 19 | t << 13) ^ (t >>> 29 | e << 3) ^ (e >>> 6 | t << 26);
|
|
5388
5405
|
}
|
|
5389
5406
|
function oe(e, t) {
|
|
@@ -5393,14 +5410,14 @@ Ct.prototype._update = function(e) {
|
|
|
5393
5410
|
for (var t = this._w, r = this._ah | 0, a = this._bh | 0, o = this._ch | 0, f = this._dh | 0, c = this._eh | 0, u = this._fh | 0, p = this._gh | 0, w = this._hh | 0, m = this._al | 0, v = this._bl | 0, A = this._cl | 0, C = this._dl | 0, R = this._el | 0, k = this._fl | 0, S = this._gl | 0, T = this._hl | 0, L = 0; L < 32; L += 2)
|
|
5394
5411
|
t[L] = e.readInt32BE(L * 4), t[L + 1] = e.readInt32BE(L * 4 + 4);
|
|
5395
5412
|
for (; L < 160; L += 2) {
|
|
5396
|
-
var F = t[L - 30], O = t[L - 15 * 2 + 1], P =
|
|
5413
|
+
var F = t[L - 30], O = t[L - 15 * 2 + 1], P = fs(F, O), E = us(O, F);
|
|
5397
5414
|
F = t[L - 2 * 2], O = t[L - 2 * 2 + 1];
|
|
5398
|
-
var j =
|
|
5415
|
+
var j = cs(F, O), N = ls(O, F), U = t[L - 7 * 2], re = t[L - 7 * 2 + 1], Ae = t[L - 16 * 2], De = t[L - 16 * 2 + 1], ie = E + re | 0, ge = P + U + oe(ie, E) | 0;
|
|
5399
5416
|
ie = ie + N | 0, ge = ge + j + oe(ie, N) | 0, ie = ie + De | 0, ge = ge + Ae + oe(ie, De) | 0, t[L] = ge, t[L + 1] = ie;
|
|
5400
5417
|
}
|
|
5401
5418
|
for (var we = 0; we < 160; we += 2) {
|
|
5402
5419
|
ge = t[we], ie = t[we + 1];
|
|
5403
|
-
var Ve =
|
|
5420
|
+
var Ve = xn(r, a, o), Ie = xn(m, v, A), Ue = En(r, m), Te = En(m, r), $e = Bn(c, R), z = Bn(R, c), ne = mn[we], ve = mn[we + 1], He = vn(c, u, p), Oe = vn(R, k, S), _ = T + z | 0, y = w + $e + oe(_, T) | 0;
|
|
5404
5421
|
_ = _ + Oe | 0, y = y + He + oe(_, Oe) | 0, _ = _ + ve | 0, y = y + ne + oe(_, ve) | 0, _ = _ + ie | 0, y = y + ge + oe(_, ie) | 0;
|
|
5405
5422
|
var I = Te + Ie | 0, D = Ue + Ve + oe(I, Te) | 0;
|
|
5406
5423
|
w = p, T = S, p = u, S = k, u = c, k = R, R = C + _ | 0, c = f + y + oe(R, C) | 0, f = o, C = A, o = a, A = v, a = r, v = m, m = _ + I | 0, r = y + D + oe(m, _) | 0;
|
|
@@ -5408,46 +5425,46 @@ Ct.prototype._update = function(e) {
|
|
|
5408
5425
|
this._al = this._al + m | 0, this._bl = this._bl + v | 0, this._cl = this._cl + A | 0, this._dl = this._dl + C | 0, this._el = this._el + R | 0, this._fl = this._fl + k | 0, this._gl = this._gl + S | 0, this._hl = this._hl + T | 0, this._ah = this._ah + r + oe(this._al, m) | 0, this._bh = this._bh + a + oe(this._bl, v) | 0, this._ch = this._ch + o + oe(this._cl, A) | 0, this._dh = this._dh + f + oe(this._dl, C) | 0, this._eh = this._eh + c + oe(this._el, R) | 0, this._fh = this._fh + u + oe(this._fl, k) | 0, this._gh = this._gh + p + oe(this._gl, S) | 0, this._hh = this._hh + w + oe(this._hl, T) | 0;
|
|
5409
5426
|
};
|
|
5410
5427
|
Ct.prototype._hash = function() {
|
|
5411
|
-
var e =
|
|
5428
|
+
var e = os.allocUnsafe(64);
|
|
5412
5429
|
function t(r, a, o) {
|
|
5413
5430
|
e.writeInt32BE(r, o), e.writeInt32BE(a, o + 4);
|
|
5414
5431
|
}
|
|
5415
5432
|
return t(this._ah, this._al, 0), t(this._bh, this._bl, 8), t(this._ch, this._cl, 16), t(this._dh, this._dl, 24), t(this._eh, this._el, 32), t(this._fh, this._fl, 40), t(this._gh, this._gl, 48), t(this._hh, this._hl, 56), e;
|
|
5416
5433
|
};
|
|
5417
|
-
var
|
|
5434
|
+
var hi = Ct, hs = pe, ds = hi, ps = dt, bs = me.Buffer, ys = new Array(160);
|
|
5418
5435
|
function nr() {
|
|
5419
|
-
this.init(), this._w =
|
|
5436
|
+
this.init(), this._w = ys, ps.call(this, 128, 112);
|
|
5420
5437
|
}
|
|
5421
|
-
|
|
5438
|
+
hs(nr, ds);
|
|
5422
5439
|
nr.prototype.init = function() {
|
|
5423
5440
|
return this._ah = 3418070365, this._bh = 1654270250, this._ch = 2438529370, this._dh = 355462360, this._eh = 1731405415, this._fh = 2394180231, this._gh = 3675008525, this._hh = 1203062813, this._al = 3238371032, this._bl = 914150663, this._cl = 812702999, this._dl = 4144912697, this._el = 4290775857, this._fl = 1750603025, this._gl = 1694076839, this._hl = 3204075428, this;
|
|
5424
5441
|
};
|
|
5425
5442
|
nr.prototype._hash = function() {
|
|
5426
|
-
var e =
|
|
5443
|
+
var e = bs.allocUnsafe(48);
|
|
5427
5444
|
function t(r, a, o) {
|
|
5428
5445
|
e.writeInt32BE(r, o), e.writeInt32BE(a, o + 4);
|
|
5429
5446
|
}
|
|
5430
5447
|
return t(this._ah, this._al, 0), t(this._bh, this._bl, 8), t(this._ch, this._cl, 16), t(this._dh, this._dl, 24), t(this._eh, this._el, 32), t(this._fh, this._fl, 40), e;
|
|
5431
5448
|
};
|
|
5432
|
-
var
|
|
5449
|
+
var _s = nr, et = ai.exports = function(t) {
|
|
5433
5450
|
t = t.toLowerCase();
|
|
5434
5451
|
var r = et[t];
|
|
5435
5452
|
if (!r) throw new Error(t + " is not supported (we accept pull requests)");
|
|
5436
5453
|
return new r();
|
|
5437
5454
|
};
|
|
5438
|
-
et.sha =
|
|
5439
|
-
et.sha1 =
|
|
5440
|
-
et.sha224 =
|
|
5441
|
-
et.sha256 =
|
|
5442
|
-
et.sha384 =
|
|
5443
|
-
et.sha512 =
|
|
5444
|
-
var
|
|
5455
|
+
et.sha = Oo;
|
|
5456
|
+
et.sha1 = jo;
|
|
5457
|
+
et.sha224 = is;
|
|
5458
|
+
et.sha256 = ci;
|
|
5459
|
+
et.sha384 = _s;
|
|
5460
|
+
et.sha512 = hi;
|
|
5461
|
+
var gs = ai.exports, di = me.Buffer, pi = $r.Transform, ws = Kt.StringDecoder, ms = pe;
|
|
5445
5462
|
function Ce(e) {
|
|
5446
|
-
|
|
5463
|
+
pi.call(this), this.hashMode = typeof e == "string", this.hashMode ? this[e] = this._finalOrDigest : this.final = this._finalOrDigest, this._final && (this.__final = this._final, this._final = null), this._decoder = null, this._encoding = null;
|
|
5447
5464
|
}
|
|
5448
|
-
|
|
5465
|
+
ms(Ce, pi);
|
|
5449
5466
|
Ce.prototype.update = function(e, t, r) {
|
|
5450
|
-
typeof e == "string" && (e =
|
|
5467
|
+
typeof e == "string" && (e = di.from(e, t));
|
|
5451
5468
|
var a = this._update(e);
|
|
5452
5469
|
return this.hashMode ? this : (r && (a = this._toString(a, r)), a);
|
|
5453
5470
|
};
|
|
@@ -5482,29 +5499,29 @@ Ce.prototype._flush = function(e) {
|
|
|
5482
5499
|
e(t);
|
|
5483
5500
|
};
|
|
5484
5501
|
Ce.prototype._finalOrDigest = function(e) {
|
|
5485
|
-
var t = this.__final() ||
|
|
5502
|
+
var t = this.__final() || di.alloc(0);
|
|
5486
5503
|
return e && (t = this._toString(t, e, !0)), t;
|
|
5487
5504
|
};
|
|
5488
5505
|
Ce.prototype._toString = function(e, t, r) {
|
|
5489
|
-
if (this._decoder || (this._decoder = new
|
|
5506
|
+
if (this._decoder || (this._decoder = new ws(t), this._encoding = t), this._encoding !== t) throw new Error("can't switch encodings");
|
|
5490
5507
|
var a = this._decoder.write(e);
|
|
5491
5508
|
return r && (a += this._decoder.end()), a;
|
|
5492
5509
|
};
|
|
5493
|
-
var
|
|
5510
|
+
var vs = Ce, xs = pe, Es = xo, Bs = Ro, Rs = gs, bi = vs;
|
|
5494
5511
|
function ir(e) {
|
|
5495
|
-
|
|
5512
|
+
bi.call(this, "digest"), this._hash = e;
|
|
5496
5513
|
}
|
|
5497
|
-
|
|
5514
|
+
xs(ir, bi);
|
|
5498
5515
|
ir.prototype._update = function(e) {
|
|
5499
5516
|
this._hash.update(e);
|
|
5500
5517
|
};
|
|
5501
5518
|
ir.prototype._final = function() {
|
|
5502
5519
|
return this._hash.digest();
|
|
5503
5520
|
};
|
|
5504
|
-
var
|
|
5505
|
-
return t = t.toLowerCase(), t === "md5" ? new
|
|
5521
|
+
var Ss = function(t) {
|
|
5522
|
+
return t = t.toLowerCase(), t === "md5" ? new Es() : t === "rmd160" || t === "ripemd160" ? new Bs() : new ir(Rs(t));
|
|
5506
5523
|
}, Nt = me.Buffer;
|
|
5507
|
-
function
|
|
5524
|
+
function As(e) {
|
|
5508
5525
|
if (e.length >= 255)
|
|
5509
5526
|
throw new TypeError("Alphabet too long");
|
|
5510
5527
|
for (var t = new Uint8Array(256), r = 0; r < t.length; r++)
|
|
@@ -5573,10 +5590,10 @@ function Rs(e) {
|
|
|
5573
5590
|
decode: A
|
|
5574
5591
|
};
|
|
5575
5592
|
}
|
|
5576
|
-
var
|
|
5593
|
+
var Is = As, Ts = Is, Cs = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", ks = Ts(Cs), mr = ks, Ls = me.Buffer, Os = function(e) {
|
|
5577
5594
|
function t(f) {
|
|
5578
5595
|
var c = e(f);
|
|
5579
|
-
return mr.encode(
|
|
5596
|
+
return mr.encode(Ls.concat([
|
|
5580
5597
|
f,
|
|
5581
5598
|
c
|
|
5582
5599
|
], f.length + 4));
|
|
@@ -5601,13 +5618,13 @@ var Ss = Rs, As = Ss, Is = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrst
|
|
|
5601
5618
|
decode: o,
|
|
5602
5619
|
decodeUnsafe: a
|
|
5603
5620
|
};
|
|
5604
|
-
},
|
|
5605
|
-
function
|
|
5606
|
-
var t =
|
|
5607
|
-
return
|
|
5621
|
+
}, Rn = Ss, Fs = Os;
|
|
5622
|
+
function Ms(e) {
|
|
5623
|
+
var t = Rn("sha256").update(e).digest();
|
|
5624
|
+
return Rn("sha256").update(t).digest();
|
|
5608
5625
|
}
|
|
5609
|
-
var
|
|
5610
|
-
function
|
|
5626
|
+
var Ps = Fs(Ms), kr = Ps;
|
|
5627
|
+
function yi(e, t) {
|
|
5611
5628
|
if (t !== void 0 && e[0] !== t) throw new Error("Invalid network version");
|
|
5612
5629
|
if (e.length === 33)
|
|
5613
5630
|
return {
|
|
@@ -5627,10 +5644,10 @@ function Lr(e, t, r) {
|
|
|
5627
5644
|
var a = new Buffer(r ? 34 : 33);
|
|
5628
5645
|
return a.writeUInt8(e, 0), t.copy(a, 1), r && (a[33] = 1), a;
|
|
5629
5646
|
}
|
|
5630
|
-
function
|
|
5631
|
-
return
|
|
5647
|
+
function Ns(e, t) {
|
|
5648
|
+
return yi(kr.decode(e), t);
|
|
5632
5649
|
}
|
|
5633
|
-
function
|
|
5650
|
+
function Ds(e, t, r) {
|
|
5634
5651
|
return typeof e == "number" ? kr.encode(Lr(e, t, r)) : kr.encode(
|
|
5635
5652
|
Lr(
|
|
5636
5653
|
e.version,
|
|
@@ -5639,16 +5656,16 @@ function Ps(e, t, r) {
|
|
|
5639
5656
|
)
|
|
5640
5657
|
);
|
|
5641
5658
|
}
|
|
5642
|
-
var
|
|
5643
|
-
decode:
|
|
5644
|
-
decodeRaw:
|
|
5645
|
-
encode:
|
|
5659
|
+
var Us = {
|
|
5660
|
+
decode: Ns,
|
|
5661
|
+
decodeRaw: yi,
|
|
5662
|
+
encode: Ds,
|
|
5646
5663
|
encodeRaw: Lr
|
|
5647
5664
|
}, ar = {};
|
|
5648
5665
|
Object.defineProperty(ar, "__esModule", { value: !0 });
|
|
5649
5666
|
ar.testEcc = void 0;
|
|
5650
5667
|
const $ = (e) => Buffer.from(e, "hex");
|
|
5651
|
-
function
|
|
5668
|
+
function $s(e) {
|
|
5652
5669
|
Y(
|
|
5653
5670
|
e.isPoint(
|
|
5654
5671
|
$("0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798")
|
|
@@ -5838,7 +5855,7 @@ function Ds(e) {
|
|
|
5838
5855
|
)
|
|
5839
5856
|
);
|
|
5840
5857
|
}
|
|
5841
|
-
ar.testEcc =
|
|
5858
|
+
ar.testEcc = $s;
|
|
5842
5859
|
function Y(e) {
|
|
5843
5860
|
if (!e) throw new Error("ecc library invalid");
|
|
5844
5861
|
}
|
|
@@ -5846,14 +5863,14 @@ Object.defineProperty(ut, "__esModule", { value: !0 });
|
|
|
5846
5863
|
ut.ECPairFactory = ut.networks = void 0;
|
|
5847
5864
|
const Or = ct;
|
|
5848
5865
|
ut.networks = Or;
|
|
5849
|
-
const ye =
|
|
5866
|
+
const ye = Tn, Hs = da, Sn = Us, js = ar, vr = ye.typeforce.maybe(
|
|
5850
5867
|
ye.typeforce.compile({
|
|
5851
5868
|
compressed: ye.maybe(ye.Boolean),
|
|
5852
5869
|
network: ye.maybe(ye.Network)
|
|
5853
5870
|
})
|
|
5854
|
-
),
|
|
5855
|
-
function
|
|
5856
|
-
(0,
|
|
5871
|
+
), Ws = (e) => e.length === 32 ? e : e.slice(1, 33);
|
|
5872
|
+
function qs(e) {
|
|
5873
|
+
(0, js.testEcc)(e);
|
|
5857
5874
|
function t(u) {
|
|
5858
5875
|
return e.isPoint(u);
|
|
5859
5876
|
}
|
|
@@ -5866,7 +5883,7 @@ function js(e) {
|
|
|
5866
5883
|
return ye.typeforce(e.isPoint, u), ye.typeforce(vr, p), new c(void 0, u, p);
|
|
5867
5884
|
}
|
|
5868
5885
|
function o(u, p) {
|
|
5869
|
-
const w =
|
|
5886
|
+
const w = Sn.decode(u), m = w.version;
|
|
5870
5887
|
if (ye.Array(p)) {
|
|
5871
5888
|
if (p = p.filter((v) => m === v.wif).pop(), !p) throw new Error("Unknown network version");
|
|
5872
5889
|
} else if (p = p || Or.bitcoin, m !== p.wif) throw new Error("Invalid network version");
|
|
@@ -5877,7 +5894,7 @@ function js(e) {
|
|
|
5877
5894
|
}
|
|
5878
5895
|
function f(u) {
|
|
5879
5896
|
ye.typeforce(vr, u), u === void 0 && (u = {});
|
|
5880
|
-
const p = u.rng ||
|
|
5897
|
+
const p = u.rng || Hs;
|
|
5881
5898
|
let w;
|
|
5882
5899
|
do
|
|
5883
5900
|
w = p(32), ye.typeforce(ye.Buffer256bit, w);
|
|
@@ -5905,7 +5922,7 @@ function js(e) {
|
|
|
5905
5922
|
}
|
|
5906
5923
|
toWIF() {
|
|
5907
5924
|
if (!this.__D) throw new Error("Missing private key");
|
|
5908
|
-
return
|
|
5925
|
+
return Sn.encode(this.network.wif, this.__D, this.compressed);
|
|
5909
5926
|
}
|
|
5910
5927
|
tweak(p) {
|
|
5911
5928
|
return this.privateKey ? this.tweakFromPrivateKey(p) : this.tweakFromPublicKey(p);
|
|
@@ -5938,7 +5955,7 @@ function js(e) {
|
|
|
5938
5955
|
return e.verifySchnorr(p, this.publicKey.subarray(1, 33), w);
|
|
5939
5956
|
}
|
|
5940
5957
|
tweakFromPublicKey(p) {
|
|
5941
|
-
const w =
|
|
5958
|
+
const w = Ws(this.publicKey), m = e.xOnlyPointAddTweak(w, p);
|
|
5942
5959
|
if (!m || m.xOnlyPubkey === null)
|
|
5943
5960
|
throw new Error("Cannot tweak public key!");
|
|
5944
5961
|
const v = Buffer.from([
|
|
@@ -5966,7 +5983,7 @@ function js(e) {
|
|
|
5966
5983
|
makeRandom: f
|
|
5967
5984
|
};
|
|
5968
5985
|
}
|
|
5969
|
-
ut.ECPairFactory =
|
|
5986
|
+
ut.ECPairFactory = qs;
|
|
5970
5987
|
(function(e) {
|
|
5971
5988
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.networks = e.ECPairFactory = e.default = void 0;
|
|
5972
5989
|
var t = ut;
|
|
@@ -5986,7 +6003,7 @@ ut.ECPairFactory = js;
|
|
|
5986
6003
|
return t.networks;
|
|
5987
6004
|
}
|
|
5988
6005
|
});
|
|
5989
|
-
})(
|
|
6006
|
+
})(In);
|
|
5990
6007
|
class Fr {
|
|
5991
6008
|
constructor(t) {
|
|
5992
6009
|
this.privKey = t;
|
|
@@ -6034,15 +6051,15 @@ class Fr {
|
|
|
6034
6051
|
return se({ secret: a, secretHash: o });
|
|
6035
6052
|
}
|
|
6036
6053
|
signMessage(t) {
|
|
6037
|
-
const r =
|
|
6054
|
+
const r = In.ECPairFactory(ft), a = "Garden.fi" + t.toString(), o = Buffer.from(a, "utf8"), f = Ft(o), c = Buffer.from(ze(this.privKey), "hex");
|
|
6038
6055
|
if (c.length !== 32)
|
|
6039
6056
|
throw new Error("Invalid private key length. Expected 32 bytes.");
|
|
6040
6057
|
return r.fromPrivateKey(c).sign(Buffer.from(ze(f), "hex")).toString("hex");
|
|
6041
6058
|
}
|
|
6042
6059
|
}
|
|
6043
|
-
class
|
|
6060
|
+
class tf {
|
|
6044
6061
|
constructor(t) {
|
|
6045
|
-
this.quoteUrl = new
|
|
6062
|
+
this.quoteUrl = new An("/quote", t);
|
|
6046
6063
|
}
|
|
6047
6064
|
async getQuote(t, r, a = !1) {
|
|
6048
6065
|
try {
|
|
@@ -6071,12 +6088,12 @@ class Zs {
|
|
|
6071
6088
|
}
|
|
6072
6089
|
}
|
|
6073
6090
|
export {
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6091
|
+
$i as EvmRelay,
|
|
6092
|
+
Zs as Garden,
|
|
6093
|
+
Ni as ParseOrderStatus,
|
|
6077
6094
|
Rr as ParseSwapStatus,
|
|
6078
|
-
|
|
6095
|
+
tf as Quote,
|
|
6079
6096
|
Fr as SecretManager,
|
|
6080
|
-
|
|
6081
|
-
|
|
6097
|
+
Di as parseAction,
|
|
6098
|
+
Xs as switchOrAddNetwork
|
|
6082
6099
|
};
|