@lombard.finance/sdk 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -65
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +680 -2881
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/sdk/apiConfig.ts +1 -1
- package/src/sdk/generateDepositBtcAddress/generateDepositBtcAddress.stories.tsx +1 -1
- package/src/sdk/generateDepositBtcAddress/generateDepositBtcAddress.ts +4 -4
- package/src/sdk/getDepositBtcAddress/getDepositBtcAddress.stories.tsx +1 -1
- package/src/sdk/getDepositBtcAddress/getDepositBtcAddress.ts +8 -8
- package/src/sdk/getLBTCExchangeRate/index.ts +1 -1
- package/src/sdk/getNetworkFeeSignature/getNetworkFeeSignature.ts +3 -3
- package/src/sdk/internalTypes.ts +2 -0
- package/src/sdk/utils/getChainNameById.ts +6 -0
- package/src/web3Sdk/const.ts +2 -0
- package/src/web3Sdk/signNetworkFee/signNetworkFee.stories.tsx +3 -4
- package/src/web3Sdk/signNetworkFee/signNetworkFee.ts +9 -3
- package/dist/style.css +0 -1
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import * as
|
|
8
|
-
import { initEccLib as
|
|
9
|
-
const
|
|
1
|
+
var he = Object.defineProperty;
|
|
2
|
+
var ge = (e, t, n) => t in e ? he(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var A = (e, t, n) => (ge(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
|
+
import R from "axios";
|
|
5
|
+
import v from "bignumber.js";
|
|
6
|
+
import ye, { Web3 as re, utils as w } from "web3";
|
|
7
|
+
import * as we from "@bitcoin-js/tiny-secp256k1-asmjs";
|
|
8
|
+
import { initEccLib as Ee, payments as Ae, networks as oe, address as ve } from "bitcoinjs-lib";
|
|
9
|
+
const c = {
|
|
10
10
|
prod: "prod",
|
|
11
11
|
testnet: "testnet",
|
|
12
12
|
stage: "stage"
|
|
13
|
-
},
|
|
13
|
+
}, a = {
|
|
14
14
|
ethereum: 1,
|
|
15
15
|
holesky: 17e3,
|
|
16
16
|
binanceSmartChain: 56,
|
|
@@ -20,2461 +20,255 @@ const pe = {
|
|
|
20
20
|
baseTestnet: 84532,
|
|
21
21
|
berachainBartioTestnet: 80084,
|
|
22
22
|
corn: 21e6
|
|
23
|
-
},
|
|
24
|
-
baseApiUrl: "https://
|
|
23
|
+
}, _ = c.prod, o = "0x0000000000000000000000000000000000000000", Re = {
|
|
24
|
+
baseApiUrl: "https://staging.prod.lombard.finance",
|
|
25
25
|
claimerApiUrl: "https://claimer.staging.lombard.finance"
|
|
26
|
-
},
|
|
26
|
+
}, Ce = {
|
|
27
27
|
baseApiUrl: "https://gastald-testnet.prod.lombard.finance",
|
|
28
28
|
claimerApiUrl: "https://claimer.staging.lombard.finance"
|
|
29
|
-
},
|
|
29
|
+
}, Se = {
|
|
30
30
|
baseApiUrl: "https://mainnet.prod.lombard.finance",
|
|
31
31
|
claimerApiUrl: ""
|
|
32
|
-
},
|
|
33
|
-
switch (
|
|
34
|
-
case
|
|
35
|
-
return
|
|
36
|
-
case
|
|
37
|
-
return
|
|
32
|
+
}, C = (e = _) => {
|
|
33
|
+
switch (e) {
|
|
34
|
+
case c.prod:
|
|
35
|
+
return Se;
|
|
36
|
+
case c.testnet:
|
|
37
|
+
return Ce;
|
|
38
38
|
default:
|
|
39
|
-
return
|
|
39
|
+
return Re;
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
function
|
|
43
|
-
return typeof
|
|
44
|
-
var
|
|
45
|
-
return ((
|
|
46
|
-
})(
|
|
47
|
-
}
|
|
48
|
-
function
|
|
49
|
-
return
|
|
50
|
-
}
|
|
51
|
-
function
|
|
52
|
-
return
|
|
53
|
-
}
|
|
54
|
-
const
|
|
55
|
-
eth: "DESTINATION_BLOCKCHAIN_ETHEREUM"
|
|
42
|
+
function S(e) {
|
|
43
|
+
return typeof e == "string" ? e : ((n) => {
|
|
44
|
+
var s;
|
|
45
|
+
return ((s = n == null ? void 0 : n.data) == null ? void 0 : s.message) && typeof n.data.message == "string";
|
|
46
|
+
})(e) ? e.data.message : e instanceof Error ? Ie(e) : _e(e);
|
|
47
|
+
}
|
|
48
|
+
function Ie(e) {
|
|
49
|
+
return e.response ? e.response.data.message : e.message;
|
|
50
|
+
}
|
|
51
|
+
function _e(e) {
|
|
52
|
+
return e != null && e.message ? e.message : "Unknown error";
|
|
53
|
+
}
|
|
54
|
+
const Z = {
|
|
55
|
+
eth: "DESTINATION_BLOCKCHAIN_ETHEREUM",
|
|
56
|
+
base: "DESTINATION_BLOCKCHAIN_BASE",
|
|
57
|
+
bsc: "DESTINATION_BLOCKCHAIN_BSC"
|
|
56
58
|
};
|
|
57
|
-
function
|
|
58
|
-
switch (
|
|
59
|
-
case
|
|
60
|
-
case
|
|
61
|
-
case
|
|
62
|
-
return
|
|
59
|
+
function K(e) {
|
|
60
|
+
switch (e) {
|
|
61
|
+
case a.holesky:
|
|
62
|
+
case a.sepolia:
|
|
63
|
+
case a.ethereum:
|
|
64
|
+
return Z.eth;
|
|
65
|
+
case a.base:
|
|
66
|
+
case a.baseTestnet:
|
|
67
|
+
return Z.base;
|
|
68
|
+
case a.binanceSmartChain:
|
|
69
|
+
case a.binanceSmartChainTestnet:
|
|
70
|
+
return Z.bsc;
|
|
63
71
|
default:
|
|
64
|
-
throw new Error(`Unknown chain ID: ${
|
|
72
|
+
throw new Error(`Unknown chain ID: ${e}`);
|
|
65
73
|
}
|
|
66
74
|
}
|
|
67
|
-
const
|
|
68
|
-
async function
|
|
69
|
-
address:
|
|
70
|
-
chainId:
|
|
71
|
-
signature:
|
|
72
|
-
env:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
const xe = "sanctioned_address", De = "api/v1/address/generate", Me = "destination address is under sanctions";
|
|
76
|
+
async function Vt({
|
|
77
|
+
address: e,
|
|
78
|
+
chainId: t,
|
|
79
|
+
signature: n,
|
|
80
|
+
env: s,
|
|
81
|
+
referrerCode: i,
|
|
82
|
+
partnerId: r,
|
|
83
|
+
captchaToken: p = ""
|
|
76
84
|
}) {
|
|
77
|
-
const { baseApiUrl:
|
|
78
|
-
to_address:
|
|
79
|
-
to_address_signature:
|
|
80
|
-
to_chain:
|
|
81
|
-
referrer_code:
|
|
82
|
-
|
|
85
|
+
const { baseApiUrl: u } = C(s), d = K(t), h = {
|
|
86
|
+
to_address: e,
|
|
87
|
+
to_address_signature: n,
|
|
88
|
+
to_chain: d,
|
|
89
|
+
referrer_code: i,
|
|
90
|
+
partner_id: r,
|
|
83
91
|
nonce: 0,
|
|
84
92
|
captcha: p
|
|
85
93
|
};
|
|
86
94
|
try {
|
|
87
|
-
const { data:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
{ baseURL:
|
|
95
|
+
const { data: l } = await R.post(
|
|
96
|
+
De,
|
|
97
|
+
h,
|
|
98
|
+
{ baseURL: u }
|
|
91
99
|
);
|
|
92
|
-
return
|
|
93
|
-
} catch (
|
|
94
|
-
const
|
|
95
|
-
if (
|
|
96
|
-
return
|
|
97
|
-
throw new Error(
|
|
100
|
+
return l.address;
|
|
101
|
+
} catch (l) {
|
|
102
|
+
const g = S(l);
|
|
103
|
+
if (Ne(g))
|
|
104
|
+
return xe;
|
|
105
|
+
throw new Error(g);
|
|
98
106
|
}
|
|
99
107
|
}
|
|
100
|
-
function
|
|
101
|
-
return !!
|
|
108
|
+
function Ne(e) {
|
|
109
|
+
return !!e.includes(Me);
|
|
102
110
|
}
|
|
103
|
-
const
|
|
104
|
-
async function
|
|
105
|
-
address:
|
|
106
|
-
chainId:
|
|
107
|
-
env:
|
|
108
|
-
|
|
111
|
+
const Pe = "api/v1/address";
|
|
112
|
+
async function $t({
|
|
113
|
+
address: e,
|
|
114
|
+
chainId: t,
|
|
115
|
+
env: n,
|
|
116
|
+
partnerId: s
|
|
109
117
|
}) {
|
|
110
|
-
const
|
|
111
|
-
address:
|
|
112
|
-
chainId:
|
|
113
|
-
env:
|
|
114
|
-
|
|
115
|
-
}),
|
|
116
|
-
if (!
|
|
118
|
+
const i = await Ue({
|
|
119
|
+
address: e,
|
|
120
|
+
chainId: t,
|
|
121
|
+
env: n,
|
|
122
|
+
partnerId: s
|
|
123
|
+
}), r = Oe(i);
|
|
124
|
+
if (!r)
|
|
117
125
|
throw new Error("No address");
|
|
118
|
-
return
|
|
126
|
+
return r.btc_address;
|
|
119
127
|
}
|
|
120
|
-
function
|
|
121
|
-
if (!
|
|
128
|
+
function Oe(e) {
|
|
129
|
+
if (!e.length)
|
|
122
130
|
return;
|
|
123
|
-
const
|
|
124
|
-
return
|
|
131
|
+
const t = e.reduce((n, s) => n.created_at < s.created_at ? s : n, e[0]);
|
|
132
|
+
return t.deprecated ? void 0 : t;
|
|
125
133
|
}
|
|
126
|
-
async function
|
|
127
|
-
address:
|
|
128
|
-
chainId:
|
|
129
|
-
env:
|
|
130
|
-
|
|
134
|
+
async function Ue({
|
|
135
|
+
address: e,
|
|
136
|
+
chainId: t,
|
|
137
|
+
env: n,
|
|
138
|
+
partnerId: s
|
|
131
139
|
}) {
|
|
132
|
-
const { baseApiUrl:
|
|
133
|
-
to_address:
|
|
134
|
-
to_blockchain:
|
|
140
|
+
const { baseApiUrl: i } = C(n), r = K(t), p = {
|
|
141
|
+
to_address: e,
|
|
142
|
+
to_blockchain: r,
|
|
135
143
|
limit: 1,
|
|
136
144
|
offset: 0,
|
|
137
145
|
asc: !1,
|
|
138
|
-
|
|
139
|
-
}, { data:
|
|
140
|
-
baseURL:
|
|
141
|
-
params:
|
|
146
|
+
partnerId: s
|
|
147
|
+
}, { data: u } = await R.get(Pe, {
|
|
148
|
+
baseURL: i,
|
|
149
|
+
params: p
|
|
142
150
|
});
|
|
143
|
-
return (
|
|
151
|
+
return (u == null ? void 0 : u.addresses) || [];
|
|
144
152
|
}
|
|
145
|
-
const
|
|
146
|
-
function
|
|
147
|
-
return +
|
|
153
|
+
const Fe = 8, Y = 10 ** Fe;
|
|
154
|
+
function X(e) {
|
|
155
|
+
return +e / Y;
|
|
148
156
|
}
|
|
149
|
-
function
|
|
150
|
-
return Math.floor(+
|
|
157
|
+
function ce(e) {
|
|
158
|
+
return Math.floor(+e * Y);
|
|
151
159
|
}
|
|
152
|
-
function
|
|
153
|
-
switch (
|
|
160
|
+
function Be(e, t = _) {
|
|
161
|
+
switch (e) {
|
|
154
162
|
case "DESTINATION_BLOCKCHAIN_ETHEREUM":
|
|
155
|
-
return
|
|
163
|
+
return t === c.prod ? a.ethereum : a.sepolia;
|
|
156
164
|
default:
|
|
157
|
-
return
|
|
165
|
+
return a.ethereum;
|
|
158
166
|
}
|
|
159
167
|
}
|
|
160
|
-
var
|
|
161
|
-
async function
|
|
162
|
-
address:
|
|
163
|
-
env:
|
|
168
|
+
var Le = /* @__PURE__ */ ((e) => (e.NOTARIZATION_STATUS_UNSPECIFIED = "NOTARIZATION_STATUS_UNSPECIFIED", e.NOTARIZATION_STATUS_PENDING = "NOTARIZATION_STATUS_PENDING", e.NOTARIZATION_STATUS_SUBMITTED = "NOTARIZATION_STATUS_SUBMITTED", e.NOTARIZATION_STATUS_SESSION_APPROVED = "NOTARIZATION_STATUS_SESSION_APPROVED", e.NOTARIZATION_STATUS_FAILED = "NOTARIZATION_STATUS_FAILED", e))(Le || {}), Ge = /* @__PURE__ */ ((e) => (e.SESSION_STATE_UNSPECIFIED = "SESSION_STATE_UNSPECIFIED", e.SESSION_STATE_PENDING = "SESSION_STATE_PENDING", e.SESSION_STATE_COMPLETED = "SESSION_STATE_COMPLETED", e.SESSION_STATE_EXPIRED = "SESSION_STATE_EXPIRED", e))(Ge || {});
|
|
169
|
+
async function Ht({
|
|
170
|
+
address: e,
|
|
171
|
+
env: t
|
|
164
172
|
}) {
|
|
165
|
-
const { baseApiUrl:
|
|
166
|
-
`api/v1/address/outputs-v2/${
|
|
167
|
-
{ baseURL:
|
|
173
|
+
const { baseApiUrl: n } = C(t), { data: s } = await R.get(
|
|
174
|
+
`api/v1/address/outputs-v2/${e}`,
|
|
175
|
+
{ baseURL: n }
|
|
168
176
|
);
|
|
169
|
-
return ((
|
|
170
|
-
}
|
|
171
|
-
function
|
|
172
|
-
return (
|
|
173
|
-
txid:
|
|
174
|
-
index:
|
|
175
|
-
blockHeight:
|
|
176
|
-
blockTime:
|
|
177
|
-
value: new
|
|
178
|
-
address:
|
|
179
|
-
chainId:
|
|
180
|
-
claimedTxId:
|
|
181
|
-
rawPayload:
|
|
182
|
-
signature:
|
|
183
|
-
isRestricted: !!
|
|
184
|
-
notarizationWaitDur:
|
|
185
|
-
payload:
|
|
186
|
-
sessionId:
|
|
187
|
-
notarizationStatus:
|
|
188
|
-
sessionState:
|
|
177
|
+
return ((s == null ? void 0 : s.outputs) ?? []).map(ke(t));
|
|
178
|
+
}
|
|
179
|
+
function ke(e) {
|
|
180
|
+
return (t) => ({
|
|
181
|
+
txid: t.txid,
|
|
182
|
+
index: t.index ?? 0,
|
|
183
|
+
blockHeight: t.block_height ? Number(t.block_height) : void 0,
|
|
184
|
+
blockTime: t.block_time ? Number(t.block_time) : void 0,
|
|
185
|
+
value: new v(X(t.value)),
|
|
186
|
+
address: t.address,
|
|
187
|
+
chainId: Be(t.to_chain, e),
|
|
188
|
+
claimedTxId: t.claim_tx,
|
|
189
|
+
rawPayload: t.raw_payload,
|
|
190
|
+
signature: t.proof,
|
|
191
|
+
isRestricted: !!t.sanctioned,
|
|
192
|
+
notarizationWaitDur: t.notarization_wait_dur ? Number(t.notarization_wait_dur) : void 0,
|
|
193
|
+
payload: t.payload_hash,
|
|
194
|
+
sessionId: t.session_id,
|
|
195
|
+
notarizationStatus: t.notarization_status,
|
|
196
|
+
sessionState: t.session_state
|
|
189
197
|
});
|
|
190
198
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
197
|
-
*
|
|
198
|
-
* This source code is licensed under the MIT license found in the
|
|
199
|
-
* LICENSE file in the root directory of this source tree.
|
|
200
|
-
*/
|
|
201
|
-
var Xn;
|
|
202
|
-
function oa() {
|
|
203
|
-
if (Xn)
|
|
204
|
-
return x;
|
|
205
|
-
Xn = 1;
|
|
206
|
-
var t = Symbol.for("react.element"), a = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), c = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), E = Symbol.for("react.context"), A = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), $ = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), U = Symbol.iterator;
|
|
207
|
-
function Q(i) {
|
|
208
|
-
return i === null || typeof i != "object" ? null : (i = U && i[U] || i["@@iterator"], typeof i == "function" ? i : null);
|
|
209
|
-
}
|
|
210
|
-
var ie = { isMounted: function() {
|
|
211
|
-
return !1;
|
|
212
|
-
}, enqueueForceUpdate: function() {
|
|
213
|
-
}, enqueueReplaceState: function() {
|
|
214
|
-
}, enqueueSetState: function() {
|
|
215
|
-
} }, de = Object.assign, he = {};
|
|
216
|
-
function B(i, f, R) {
|
|
217
|
-
this.props = i, this.context = f, this.refs = he, this.updater = R || ie;
|
|
218
|
-
}
|
|
219
|
-
B.prototype.isReactComponent = {}, B.prototype.setState = function(i, f) {
|
|
220
|
-
if (typeof i != "object" && typeof i != "function" && i != null)
|
|
221
|
-
throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
|
|
222
|
-
this.updater.enqueueSetState(this, i, f, "setState");
|
|
223
|
-
}, B.prototype.forceUpdate = function(i) {
|
|
224
|
-
this.updater.enqueueForceUpdate(this, i, "forceUpdate");
|
|
225
|
-
};
|
|
226
|
-
function ue() {
|
|
227
|
-
}
|
|
228
|
-
ue.prototype = B.prototype;
|
|
229
|
-
function V(i, f, R) {
|
|
230
|
-
this.props = i, this.context = f, this.refs = he, this.updater = R || ie;
|
|
231
|
-
}
|
|
232
|
-
var ee = V.prototype = new ue();
|
|
233
|
-
ee.constructor = V, de(ee, B.prototype), ee.isPureReactComponent = !0;
|
|
234
|
-
var se = Array.isArray, H = Object.prototype.hasOwnProperty, te = { current: null }, ge = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
235
|
-
function Re(i, f, R) {
|
|
236
|
-
var N, I = {}, W = null, G = null;
|
|
237
|
-
if (f != null)
|
|
238
|
-
for (N in f.ref !== void 0 && (G = f.ref), f.key !== void 0 && (W = "" + f.key), f)
|
|
239
|
-
H.call(f, N) && !ge.hasOwnProperty(N) && (I[N] = f[N]);
|
|
240
|
-
var j = arguments.length - 2;
|
|
241
|
-
if (j === 1)
|
|
242
|
-
I.children = R;
|
|
243
|
-
else if (1 < j) {
|
|
244
|
-
for (var k = Array(j), X = 0; X < j; X++)
|
|
245
|
-
k[X] = arguments[X + 2];
|
|
246
|
-
I.children = k;
|
|
247
|
-
}
|
|
248
|
-
if (i && i.defaultProps)
|
|
249
|
-
for (N in j = i.defaultProps, j)
|
|
250
|
-
I[N] === void 0 && (I[N] = j[N]);
|
|
251
|
-
return { $$typeof: t, type: i, key: W, ref: G, props: I, _owner: te.current };
|
|
252
|
-
}
|
|
253
|
-
function Ie(i, f) {
|
|
254
|
-
return { $$typeof: t, type: i.type, key: f, ref: i.ref, props: i.props, _owner: i._owner };
|
|
255
|
-
}
|
|
256
|
-
function Oe(i) {
|
|
257
|
-
return typeof i == "object" && i !== null && i.$$typeof === t;
|
|
258
|
-
}
|
|
259
|
-
function at(i) {
|
|
260
|
-
var f = { "=": "=0", ":": "=2" };
|
|
261
|
-
return "$" + i.replace(/[=:]/g, function(R) {
|
|
262
|
-
return f[R];
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
var De = /\/+/g;
|
|
266
|
-
function oe(i, f) {
|
|
267
|
-
return typeof i == "object" && i !== null && i.key != null ? at("" + i.key) : f.toString(36);
|
|
268
|
-
}
|
|
269
|
-
function ce(i, f, R, N, I) {
|
|
270
|
-
var W = typeof i;
|
|
271
|
-
(W === "undefined" || W === "boolean") && (i = null);
|
|
272
|
-
var G = !1;
|
|
273
|
-
if (i === null)
|
|
274
|
-
G = !0;
|
|
275
|
-
else
|
|
276
|
-
switch (W) {
|
|
277
|
-
case "string":
|
|
278
|
-
case "number":
|
|
279
|
-
G = !0;
|
|
280
|
-
break;
|
|
281
|
-
case "object":
|
|
282
|
-
switch (i.$$typeof) {
|
|
283
|
-
case t:
|
|
284
|
-
case a:
|
|
285
|
-
G = !0;
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
if (G)
|
|
289
|
-
return G = i, I = I(G), i = N === "" ? "." + oe(G, 0) : N, se(I) ? (R = "", i != null && (R = i.replace(De, "$&/") + "/"), ce(I, f, R, "", function(X) {
|
|
290
|
-
return X;
|
|
291
|
-
})) : I != null && (Oe(I) && (I = Ie(I, R + (!I.key || G && G.key === I.key ? "" : ("" + I.key).replace(De, "$&/") + "/") + i)), f.push(I)), 1;
|
|
292
|
-
if (G = 0, N = N === "" ? "." : N + ":", se(i))
|
|
293
|
-
for (var j = 0; j < i.length; j++) {
|
|
294
|
-
W = i[j];
|
|
295
|
-
var k = N + oe(W, j);
|
|
296
|
-
G += ce(W, f, R, k, I);
|
|
297
|
-
}
|
|
298
|
-
else if (k = Q(i), typeof k == "function")
|
|
299
|
-
for (i = k.call(i), j = 0; !(W = i.next()).done; )
|
|
300
|
-
W = W.value, k = N + oe(W, j++), G += ce(W, f, R, k, I);
|
|
301
|
-
else if (W === "object")
|
|
302
|
-
throw f = String(i), Error("Objects are not valid as a React child (found: " + (f === "[object Object]" ? "object with keys {" + Object.keys(i).join(", ") + "}" : f) + "). If you meant to render a collection of children, use an array instead.");
|
|
303
|
-
return G;
|
|
304
|
-
}
|
|
305
|
-
function ne(i, f, R) {
|
|
306
|
-
if (i == null)
|
|
307
|
-
return i;
|
|
308
|
-
var N = [], I = 0;
|
|
309
|
-
return ce(i, N, "", "", function(W) {
|
|
310
|
-
return f.call(R, W, I++);
|
|
311
|
-
}), N;
|
|
312
|
-
}
|
|
313
|
-
function ve(i) {
|
|
314
|
-
if (i._status === -1) {
|
|
315
|
-
var f = i._result;
|
|
316
|
-
f = f(), f.then(function(R) {
|
|
317
|
-
(i._status === 0 || i._status === -1) && (i._status = 1, i._result = R);
|
|
318
|
-
}, function(R) {
|
|
319
|
-
(i._status === 0 || i._status === -1) && (i._status = 2, i._result = R);
|
|
320
|
-
}), i._status === -1 && (i._status = 0, i._result = f);
|
|
321
|
-
}
|
|
322
|
-
if (i._status === 1)
|
|
323
|
-
return i._result.default;
|
|
324
|
-
throw i._result;
|
|
325
|
-
}
|
|
326
|
-
var g = { current: null }, Te = { transition: null }, Me = { ReactCurrentDispatcher: g, ReactCurrentBatchConfig: Te, ReactCurrentOwner: te };
|
|
327
|
-
return x.Children = { map: ne, forEach: function(i, f, R) {
|
|
328
|
-
ne(i, function() {
|
|
329
|
-
f.apply(this, arguments);
|
|
330
|
-
}, R);
|
|
331
|
-
}, count: function(i) {
|
|
332
|
-
var f = 0;
|
|
333
|
-
return ne(i, function() {
|
|
334
|
-
f++;
|
|
335
|
-
}), f;
|
|
336
|
-
}, toArray: function(i) {
|
|
337
|
-
return ne(i, function(f) {
|
|
338
|
-
return f;
|
|
339
|
-
}) || [];
|
|
340
|
-
}, only: function(i) {
|
|
341
|
-
if (!Oe(i))
|
|
342
|
-
throw Error("React.Children.only expected to receive a single React element child.");
|
|
343
|
-
return i;
|
|
344
|
-
} }, x.Component = B, x.Fragment = u, x.Profiler = p, x.PureComponent = V, x.StrictMode = c, x.Suspense = C, x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Me, x.cloneElement = function(i, f, R) {
|
|
345
|
-
if (i == null)
|
|
346
|
-
throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + i + ".");
|
|
347
|
-
var N = de({}, i.props), I = i.key, W = i.ref, G = i._owner;
|
|
348
|
-
if (f != null) {
|
|
349
|
-
if (f.ref !== void 0 && (W = f.ref, G = te.current), f.key !== void 0 && (I = "" + f.key), i.type && i.type.defaultProps)
|
|
350
|
-
var j = i.type.defaultProps;
|
|
351
|
-
for (k in f)
|
|
352
|
-
H.call(f, k) && !ge.hasOwnProperty(k) && (N[k] = f[k] === void 0 && j !== void 0 ? j[k] : f[k]);
|
|
353
|
-
}
|
|
354
|
-
var k = arguments.length - 2;
|
|
355
|
-
if (k === 1)
|
|
356
|
-
N.children = R;
|
|
357
|
-
else if (1 < k) {
|
|
358
|
-
j = Array(k);
|
|
359
|
-
for (var X = 0; X < k; X++)
|
|
360
|
-
j[X] = arguments[X + 2];
|
|
361
|
-
N.children = j;
|
|
362
|
-
}
|
|
363
|
-
return { $$typeof: t, type: i.type, key: I, ref: W, props: N, _owner: G };
|
|
364
|
-
}, x.createContext = function(i) {
|
|
365
|
-
return i = { $$typeof: E, _currentValue: i, _currentValue2: i, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, i.Provider = { $$typeof: h, _context: i }, i.Consumer = i;
|
|
366
|
-
}, x.createElement = Re, x.createFactory = function(i) {
|
|
367
|
-
var f = Re.bind(null, i);
|
|
368
|
-
return f.type = i, f;
|
|
369
|
-
}, x.createRef = function() {
|
|
370
|
-
return { current: null };
|
|
371
|
-
}, x.forwardRef = function(i) {
|
|
372
|
-
return { $$typeof: A, render: i };
|
|
373
|
-
}, x.isValidElement = Oe, x.lazy = function(i) {
|
|
374
|
-
return { $$typeof: S, _payload: { _status: -1, _result: i }, _init: ve };
|
|
375
|
-
}, x.memo = function(i, f) {
|
|
376
|
-
return { $$typeof: $, type: i, compare: f === void 0 ? null : f };
|
|
377
|
-
}, x.startTransition = function(i) {
|
|
378
|
-
var f = Te.transition;
|
|
379
|
-
Te.transition = {};
|
|
380
|
-
try {
|
|
381
|
-
i();
|
|
382
|
-
} finally {
|
|
383
|
-
Te.transition = f;
|
|
384
|
-
}
|
|
385
|
-
}, x.unstable_act = function() {
|
|
386
|
-
throw Error("act(...) is not supported in production builds of React.");
|
|
387
|
-
}, x.useCallback = function(i, f) {
|
|
388
|
-
return g.current.useCallback(i, f);
|
|
389
|
-
}, x.useContext = function(i) {
|
|
390
|
-
return g.current.useContext(i);
|
|
391
|
-
}, x.useDebugValue = function() {
|
|
392
|
-
}, x.useDeferredValue = function(i) {
|
|
393
|
-
return g.current.useDeferredValue(i);
|
|
394
|
-
}, x.useEffect = function(i, f) {
|
|
395
|
-
return g.current.useEffect(i, f);
|
|
396
|
-
}, x.useId = function() {
|
|
397
|
-
return g.current.useId();
|
|
398
|
-
}, x.useImperativeHandle = function(i, f, R) {
|
|
399
|
-
return g.current.useImperativeHandle(i, f, R);
|
|
400
|
-
}, x.useInsertionEffect = function(i, f) {
|
|
401
|
-
return g.current.useInsertionEffect(i, f);
|
|
402
|
-
}, x.useLayoutEffect = function(i, f) {
|
|
403
|
-
return g.current.useLayoutEffect(i, f);
|
|
404
|
-
}, x.useMemo = function(i, f) {
|
|
405
|
-
return g.current.useMemo(i, f);
|
|
406
|
-
}, x.useReducer = function(i, f, R) {
|
|
407
|
-
return g.current.useReducer(i, f, R);
|
|
408
|
-
}, x.useRef = function(i) {
|
|
409
|
-
return g.current.useRef(i);
|
|
410
|
-
}, x.useState = function(i) {
|
|
411
|
-
return g.current.useState(i);
|
|
412
|
-
}, x.useSyncExternalStore = function(i, f, R) {
|
|
413
|
-
return g.current.useSyncExternalStore(i, f, R);
|
|
414
|
-
}, x.useTransition = function() {
|
|
415
|
-
return g.current.useTransition();
|
|
416
|
-
}, x.version = "18.2.0", x;
|
|
417
|
-
}
|
|
418
|
-
var dt = { exports: {} };
|
|
419
|
-
/**
|
|
420
|
-
* @license React
|
|
421
|
-
* react.development.js
|
|
422
|
-
*
|
|
423
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
424
|
-
*
|
|
425
|
-
* This source code is licensed under the MIT license found in the
|
|
426
|
-
* LICENSE file in the root directory of this source tree.
|
|
427
|
-
*/
|
|
428
|
-
dt.exports;
|
|
429
|
-
var Qn;
|
|
430
|
-
function ua() {
|
|
431
|
-
return Qn || (Qn = 1, function(t, a) {
|
|
432
|
-
process.env.NODE_ENV !== "production" && function() {
|
|
433
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
434
|
-
var u = "18.2.0", c = Symbol.for("react.element"), p = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), A = Symbol.for("react.profiler"), C = Symbol.for("react.provider"), $ = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), U = Symbol.for("react.suspense"), Q = Symbol.for("react.suspense_list"), ie = Symbol.for("react.memo"), de = Symbol.for("react.lazy"), he = Symbol.for("react.offscreen"), B = Symbol.iterator, ue = "@@iterator";
|
|
435
|
-
function V(e) {
|
|
436
|
-
if (e === null || typeof e != "object")
|
|
437
|
-
return null;
|
|
438
|
-
var n = B && e[B] || e[ue];
|
|
439
|
-
return typeof n == "function" ? n : null;
|
|
440
|
-
}
|
|
441
|
-
var ee = {
|
|
442
|
-
/**
|
|
443
|
-
* @internal
|
|
444
|
-
* @type {ReactComponent}
|
|
445
|
-
*/
|
|
446
|
-
current: null
|
|
447
|
-
}, se = {
|
|
448
|
-
transition: null
|
|
449
|
-
}, H = {
|
|
450
|
-
current: null,
|
|
451
|
-
// Used to reproduce behavior of `batchedUpdates` in legacy mode.
|
|
452
|
-
isBatchingLegacy: !1,
|
|
453
|
-
didScheduleLegacyUpdate: !1
|
|
454
|
-
}, te = {
|
|
455
|
-
/**
|
|
456
|
-
* @internal
|
|
457
|
-
* @type {ReactComponent}
|
|
458
|
-
*/
|
|
459
|
-
current: null
|
|
460
|
-
}, ge = {}, Re = null;
|
|
461
|
-
function Ie(e) {
|
|
462
|
-
Re = e;
|
|
463
|
-
}
|
|
464
|
-
ge.setExtraStackFrame = function(e) {
|
|
465
|
-
Re = e;
|
|
466
|
-
}, ge.getCurrentStack = null, ge.getStackAddendum = function() {
|
|
467
|
-
var e = "";
|
|
468
|
-
Re && (e += Re);
|
|
469
|
-
var n = ge.getCurrentStack;
|
|
470
|
-
return n && (e += n() || ""), e;
|
|
471
|
-
};
|
|
472
|
-
var Oe = !1, at = !1, De = !1, oe = !1, ce = !1, ne = {
|
|
473
|
-
ReactCurrentDispatcher: ee,
|
|
474
|
-
ReactCurrentBatchConfig: se,
|
|
475
|
-
ReactCurrentOwner: te
|
|
476
|
-
};
|
|
477
|
-
ne.ReactDebugCurrentFrame = ge, ne.ReactCurrentActQueue = H;
|
|
478
|
-
function ve(e) {
|
|
479
|
-
{
|
|
480
|
-
for (var n = arguments.length, s = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++)
|
|
481
|
-
s[o - 1] = arguments[o];
|
|
482
|
-
Te("warn", e, s);
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
function g(e) {
|
|
486
|
-
{
|
|
487
|
-
for (var n = arguments.length, s = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++)
|
|
488
|
-
s[o - 1] = arguments[o];
|
|
489
|
-
Te("error", e, s);
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
function Te(e, n, s) {
|
|
493
|
-
{
|
|
494
|
-
var o = ne.ReactDebugCurrentFrame, d = o.getStackAddendum();
|
|
495
|
-
d !== "" && (n += "%s", s = s.concat([d]));
|
|
496
|
-
var T = s.map(function(b) {
|
|
497
|
-
return String(b);
|
|
498
|
-
});
|
|
499
|
-
T.unshift("Warning: " + n), Function.prototype.apply.call(console[e], console, T);
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
var Me = {};
|
|
503
|
-
function i(e, n) {
|
|
504
|
-
{
|
|
505
|
-
var s = e.constructor, o = s && (s.displayName || s.name) || "ReactClass", d = o + "." + n;
|
|
506
|
-
if (Me[d])
|
|
507
|
-
return;
|
|
508
|
-
g("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", n, o), Me[d] = !0;
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
var f = {
|
|
512
|
-
/**
|
|
513
|
-
* Checks whether or not this composite component is mounted.
|
|
514
|
-
* @param {ReactClass} publicInstance The instance we want to test.
|
|
515
|
-
* @return {boolean} True if mounted, false otherwise.
|
|
516
|
-
* @protected
|
|
517
|
-
* @final
|
|
518
|
-
*/
|
|
519
|
-
isMounted: function(e) {
|
|
520
|
-
return !1;
|
|
521
|
-
},
|
|
522
|
-
/**
|
|
523
|
-
* Forces an update. This should only be invoked when it is known with
|
|
524
|
-
* certainty that we are **not** in a DOM transaction.
|
|
525
|
-
*
|
|
526
|
-
* You may want to call this when you know that some deeper aspect of the
|
|
527
|
-
* component's state has changed but `setState` was not called.
|
|
528
|
-
*
|
|
529
|
-
* This will not invoke `shouldComponentUpdate`, but it will invoke
|
|
530
|
-
* `componentWillUpdate` and `componentDidUpdate`.
|
|
531
|
-
*
|
|
532
|
-
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
533
|
-
* @param {?function} callback Called after component is updated.
|
|
534
|
-
* @param {?string} callerName name of the calling function in the public API.
|
|
535
|
-
* @internal
|
|
536
|
-
*/
|
|
537
|
-
enqueueForceUpdate: function(e, n, s) {
|
|
538
|
-
i(e, "forceUpdate");
|
|
539
|
-
},
|
|
540
|
-
/**
|
|
541
|
-
* Replaces all of the state. Always use this or `setState` to mutate state.
|
|
542
|
-
* You should treat `this.state` as immutable.
|
|
543
|
-
*
|
|
544
|
-
* There is no guarantee that `this.state` will be immediately updated, so
|
|
545
|
-
* accessing `this.state` after calling this method may return the old value.
|
|
546
|
-
*
|
|
547
|
-
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
548
|
-
* @param {object} completeState Next state.
|
|
549
|
-
* @param {?function} callback Called after component is updated.
|
|
550
|
-
* @param {?string} callerName name of the calling function in the public API.
|
|
551
|
-
* @internal
|
|
552
|
-
*/
|
|
553
|
-
enqueueReplaceState: function(e, n, s, o) {
|
|
554
|
-
i(e, "replaceState");
|
|
555
|
-
},
|
|
556
|
-
/**
|
|
557
|
-
* Sets a subset of the state. This only exists because _pendingState is
|
|
558
|
-
* internal. This provides a merging strategy that is not available to deep
|
|
559
|
-
* properties which is confusing. TODO: Expose pendingState or don't use it
|
|
560
|
-
* during the merge.
|
|
561
|
-
*
|
|
562
|
-
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
563
|
-
* @param {object} partialState Next partial state to be merged with state.
|
|
564
|
-
* @param {?function} callback Called after component is updated.
|
|
565
|
-
* @param {?string} Name of the calling function in the public API.
|
|
566
|
-
* @internal
|
|
567
|
-
*/
|
|
568
|
-
enqueueSetState: function(e, n, s, o) {
|
|
569
|
-
i(e, "setState");
|
|
570
|
-
}
|
|
571
|
-
}, R = Object.assign, N = {};
|
|
572
|
-
Object.freeze(N);
|
|
573
|
-
function I(e, n, s) {
|
|
574
|
-
this.props = e, this.context = n, this.refs = N, this.updater = s || f;
|
|
575
|
-
}
|
|
576
|
-
I.prototype.isReactComponent = {}, I.prototype.setState = function(e, n) {
|
|
577
|
-
if (typeof e != "object" && typeof e != "function" && e != null)
|
|
578
|
-
throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
|
|
579
|
-
this.updater.enqueueSetState(this, e, n, "setState");
|
|
580
|
-
}, I.prototype.forceUpdate = function(e) {
|
|
581
|
-
this.updater.enqueueForceUpdate(this, e, "forceUpdate");
|
|
582
|
-
};
|
|
583
|
-
{
|
|
584
|
-
var W = {
|
|
585
|
-
isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
|
|
586
|
-
replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
|
|
587
|
-
}, G = function(e, n) {
|
|
588
|
-
Object.defineProperty(I.prototype, e, {
|
|
589
|
-
get: function() {
|
|
590
|
-
ve("%s(...) is deprecated in plain JavaScript React classes. %s", n[0], n[1]);
|
|
591
|
-
}
|
|
592
|
-
});
|
|
593
|
-
};
|
|
594
|
-
for (var j in W)
|
|
595
|
-
W.hasOwnProperty(j) && G(j, W[j]);
|
|
596
|
-
}
|
|
597
|
-
function k() {
|
|
598
|
-
}
|
|
599
|
-
k.prototype = I.prototype;
|
|
600
|
-
function X(e, n, s) {
|
|
601
|
-
this.props = e, this.context = n, this.refs = N, this.updater = s || f;
|
|
602
|
-
}
|
|
603
|
-
var Ce = X.prototype = new k();
|
|
604
|
-
Ce.constructor = X, R(Ce, I.prototype), Ce.isPureReactComponent = !0;
|
|
605
|
-
function Jt() {
|
|
606
|
-
var e = {
|
|
607
|
-
current: null
|
|
608
|
-
};
|
|
609
|
-
return Object.seal(e), e;
|
|
610
|
-
}
|
|
611
|
-
var ft = Array.isArray;
|
|
612
|
-
function Ye(e) {
|
|
613
|
-
return ft(e);
|
|
614
|
-
}
|
|
615
|
-
function Kt(e) {
|
|
616
|
-
{
|
|
617
|
-
var n = typeof Symbol == "function" && Symbol.toStringTag, s = n && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
618
|
-
return s;
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
function qe(e) {
|
|
622
|
-
try {
|
|
623
|
-
return Ne(e), !1;
|
|
624
|
-
} catch {
|
|
625
|
-
return !0;
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
function Ne(e) {
|
|
629
|
-
return "" + e;
|
|
630
|
-
}
|
|
631
|
-
function ke(e) {
|
|
632
|
-
if (qe(e))
|
|
633
|
-
return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Kt(e)), Ne(e);
|
|
634
|
-
}
|
|
635
|
-
function yt(e, n, s) {
|
|
636
|
-
var o = e.displayName;
|
|
637
|
-
if (o)
|
|
638
|
-
return o;
|
|
639
|
-
var d = n.displayName || n.name || "";
|
|
640
|
-
return d !== "" ? s + "(" + d + ")" : s;
|
|
641
|
-
}
|
|
642
|
-
function Fe(e) {
|
|
643
|
-
return e.displayName || "Context";
|
|
644
|
-
}
|
|
645
|
-
function Ee(e) {
|
|
646
|
-
if (e == null)
|
|
647
|
-
return null;
|
|
648
|
-
if (typeof e.tag == "number" && g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
649
|
-
return e.displayName || e.name || null;
|
|
650
|
-
if (typeof e == "string")
|
|
651
|
-
return e;
|
|
652
|
-
switch (e) {
|
|
653
|
-
case h:
|
|
654
|
-
return "Fragment";
|
|
655
|
-
case p:
|
|
656
|
-
return "Portal";
|
|
657
|
-
case A:
|
|
658
|
-
return "Profiler";
|
|
659
|
-
case E:
|
|
660
|
-
return "StrictMode";
|
|
661
|
-
case U:
|
|
662
|
-
return "Suspense";
|
|
663
|
-
case Q:
|
|
664
|
-
return "SuspenseList";
|
|
665
|
-
}
|
|
666
|
-
if (typeof e == "object")
|
|
667
|
-
switch (e.$$typeof) {
|
|
668
|
-
case $:
|
|
669
|
-
var n = e;
|
|
670
|
-
return Fe(n) + ".Consumer";
|
|
671
|
-
case C:
|
|
672
|
-
var s = e;
|
|
673
|
-
return Fe(s._context) + ".Provider";
|
|
674
|
-
case S:
|
|
675
|
-
return yt(e, e.render, "ForwardRef");
|
|
676
|
-
case ie:
|
|
677
|
-
var o = e.displayName || null;
|
|
678
|
-
return o !== null ? o : Ee(e.type) || "Memo";
|
|
679
|
-
case de: {
|
|
680
|
-
var d = e, T = d._payload, b = d._init;
|
|
681
|
-
try {
|
|
682
|
-
return Ee(b(T));
|
|
683
|
-
} catch {
|
|
684
|
-
return null;
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
return null;
|
|
689
|
-
}
|
|
690
|
-
var Ue = Object.prototype.hasOwnProperty, He = {
|
|
691
|
-
key: !0,
|
|
692
|
-
ref: !0,
|
|
693
|
-
__self: !0,
|
|
694
|
-
__source: !0
|
|
695
|
-
}, mt, ht, ze;
|
|
696
|
-
ze = {};
|
|
697
|
-
function it(e) {
|
|
698
|
-
if (Ue.call(e, "ref")) {
|
|
699
|
-
var n = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
700
|
-
if (n && n.isReactWarning)
|
|
701
|
-
return !1;
|
|
702
|
-
}
|
|
703
|
-
return e.ref !== void 0;
|
|
704
|
-
}
|
|
705
|
-
function Se(e) {
|
|
706
|
-
if (Ue.call(e, "key")) {
|
|
707
|
-
var n = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
708
|
-
if (n && n.isReactWarning)
|
|
709
|
-
return !1;
|
|
710
|
-
}
|
|
711
|
-
return e.key !== void 0;
|
|
712
|
-
}
|
|
713
|
-
function Zt(e, n) {
|
|
714
|
-
var s = function() {
|
|
715
|
-
mt || (mt = !0, g("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", n));
|
|
716
|
-
};
|
|
717
|
-
s.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
718
|
-
get: s,
|
|
719
|
-
configurable: !0
|
|
720
|
-
});
|
|
721
|
-
}
|
|
722
|
-
function vt(e, n) {
|
|
723
|
-
var s = function() {
|
|
724
|
-
ht || (ht = !0, g("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", n));
|
|
725
|
-
};
|
|
726
|
-
s.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
727
|
-
get: s,
|
|
728
|
-
configurable: !0
|
|
729
|
-
});
|
|
730
|
-
}
|
|
731
|
-
function bt(e) {
|
|
732
|
-
if (typeof e.ref == "string" && te.current && e.__self && te.current.stateNode !== e.__self) {
|
|
733
|
-
var n = Ee(te.current.type);
|
|
734
|
-
ze[n] || (g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', n, e.ref), ze[n] = !0);
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
var je = function(e, n, s, o, d, T, b) {
|
|
738
|
-
var _ = {
|
|
739
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
740
|
-
$$typeof: c,
|
|
741
|
-
// Built-in properties that belong on the element
|
|
742
|
-
type: e,
|
|
743
|
-
key: n,
|
|
744
|
-
ref: s,
|
|
745
|
-
props: b,
|
|
746
|
-
// Record the component responsible for creating this element.
|
|
747
|
-
_owner: T
|
|
748
|
-
};
|
|
749
|
-
return _._store = {}, Object.defineProperty(_._store, "validated", {
|
|
750
|
-
configurable: !1,
|
|
751
|
-
enumerable: !1,
|
|
752
|
-
writable: !0,
|
|
753
|
-
value: !1
|
|
754
|
-
}), Object.defineProperty(_, "_self", {
|
|
755
|
-
configurable: !1,
|
|
756
|
-
enumerable: !1,
|
|
757
|
-
writable: !1,
|
|
758
|
-
value: o
|
|
759
|
-
}), Object.defineProperty(_, "_source", {
|
|
760
|
-
configurable: !1,
|
|
761
|
-
enumerable: !1,
|
|
762
|
-
writable: !1,
|
|
763
|
-
value: d
|
|
764
|
-
}), Object.freeze && (Object.freeze(_.props), Object.freeze(_)), _;
|
|
765
|
-
};
|
|
766
|
-
function Xt(e, n, s) {
|
|
767
|
-
var o, d = {}, T = null, b = null, _ = null, D = null;
|
|
768
|
-
if (n != null) {
|
|
769
|
-
it(n) && (b = n.ref, bt(n)), Se(n) && (ke(n.key), T = "" + n.key), _ = n.__self === void 0 ? null : n.__self, D = n.__source === void 0 ? null : n.__source;
|
|
770
|
-
for (o in n)
|
|
771
|
-
Ue.call(n, o) && !He.hasOwnProperty(o) && (d[o] = n[o]);
|
|
772
|
-
}
|
|
773
|
-
var L = arguments.length - 2;
|
|
774
|
-
if (L === 1)
|
|
775
|
-
d.children = s;
|
|
776
|
-
else if (L > 1) {
|
|
777
|
-
for (var Y = Array(L), q = 0; q < L; q++)
|
|
778
|
-
Y[q] = arguments[q + 2];
|
|
779
|
-
Object.freeze && Object.freeze(Y), d.children = Y;
|
|
780
|
-
}
|
|
781
|
-
if (e && e.defaultProps) {
|
|
782
|
-
var J = e.defaultProps;
|
|
783
|
-
for (o in J)
|
|
784
|
-
d[o] === void 0 && (d[o] = J[o]);
|
|
785
|
-
}
|
|
786
|
-
if (T || b) {
|
|
787
|
-
var Z = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
788
|
-
T && Zt(d, Z), b && vt(d, Z);
|
|
789
|
-
}
|
|
790
|
-
return je(e, T, b, _, D, te.current, d);
|
|
791
|
-
}
|
|
792
|
-
function Qt(e, n) {
|
|
793
|
-
var s = je(e.type, n, e.ref, e._self, e._source, e._owner, e.props);
|
|
794
|
-
return s;
|
|
795
|
-
}
|
|
796
|
-
function en(e, n, s) {
|
|
797
|
-
if (e == null)
|
|
798
|
-
throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + e + ".");
|
|
799
|
-
var o, d = R({}, e.props), T = e.key, b = e.ref, _ = e._self, D = e._source, L = e._owner;
|
|
800
|
-
if (n != null) {
|
|
801
|
-
it(n) && (b = n.ref, L = te.current), Se(n) && (ke(n.key), T = "" + n.key);
|
|
802
|
-
var Y;
|
|
803
|
-
e.type && e.type.defaultProps && (Y = e.type.defaultProps);
|
|
804
|
-
for (o in n)
|
|
805
|
-
Ue.call(n, o) && !He.hasOwnProperty(o) && (n[o] === void 0 && Y !== void 0 ? d[o] = Y[o] : d[o] = n[o]);
|
|
806
|
-
}
|
|
807
|
-
var q = arguments.length - 2;
|
|
808
|
-
if (q === 1)
|
|
809
|
-
d.children = s;
|
|
810
|
-
else if (q > 1) {
|
|
811
|
-
for (var J = Array(q), Z = 0; Z < q; Z++)
|
|
812
|
-
J[Z] = arguments[Z + 2];
|
|
813
|
-
d.children = J;
|
|
814
|
-
}
|
|
815
|
-
return je(e.type, T, b, _, D, L, d);
|
|
816
|
-
}
|
|
817
|
-
function Ae(e) {
|
|
818
|
-
return typeof e == "object" && e !== null && e.$$typeof === c;
|
|
819
|
-
}
|
|
820
|
-
var gt = ".", tn = ":";
|
|
821
|
-
function nn(e) {
|
|
822
|
-
var n = /[=:]/g, s = {
|
|
823
|
-
"=": "=0",
|
|
824
|
-
":": "=2"
|
|
825
|
-
}, o = e.replace(n, function(d) {
|
|
826
|
-
return s[d];
|
|
827
|
-
});
|
|
828
|
-
return "$" + o;
|
|
829
|
-
}
|
|
830
|
-
var Je = !1, Tt = /\/+/g;
|
|
831
|
-
function we(e) {
|
|
832
|
-
return e.replace(Tt, "$&/");
|
|
833
|
-
}
|
|
834
|
-
function Le(e, n) {
|
|
835
|
-
return typeof e == "object" && e !== null && e.key != null ? (ke(e.key), nn("" + e.key)) : n.toString(36);
|
|
836
|
-
}
|
|
837
|
-
function Pe(e, n, s, o, d) {
|
|
838
|
-
var T = typeof e;
|
|
839
|
-
(T === "undefined" || T === "boolean") && (e = null);
|
|
840
|
-
var b = !1;
|
|
841
|
-
if (e === null)
|
|
842
|
-
b = !0;
|
|
843
|
-
else
|
|
844
|
-
switch (T) {
|
|
845
|
-
case "string":
|
|
846
|
-
case "number":
|
|
847
|
-
b = !0;
|
|
848
|
-
break;
|
|
849
|
-
case "object":
|
|
850
|
-
switch (e.$$typeof) {
|
|
851
|
-
case c:
|
|
852
|
-
case p:
|
|
853
|
-
b = !0;
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
if (b) {
|
|
857
|
-
var _ = e, D = d(_), L = o === "" ? gt + Le(_, 0) : o;
|
|
858
|
-
if (Ye(D)) {
|
|
859
|
-
var Y = "";
|
|
860
|
-
L != null && (Y = we(L) + "/"), Pe(D, n, Y, "", function(Fr) {
|
|
861
|
-
return Fr;
|
|
862
|
-
});
|
|
863
|
-
} else
|
|
864
|
-
D != null && (Ae(D) && (D.key && (!_ || _.key !== D.key) && ke(D.key), D = Qt(
|
|
865
|
-
D,
|
|
866
|
-
// Keep both the (mapped) and old keys if they differ, just as
|
|
867
|
-
// traverseAllChildren used to do for objects as children
|
|
868
|
-
s + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
|
|
869
|
-
(D.key && (!_ || _.key !== D.key) ? (
|
|
870
|
-
// $FlowFixMe Flow incorrectly thinks existing element's key can be a number
|
|
871
|
-
// eslint-disable-next-line react-internal/safe-string-coercion
|
|
872
|
-
we("" + D.key) + "/"
|
|
873
|
-
) : "") + L
|
|
874
|
-
)), n.push(D));
|
|
875
|
-
return 1;
|
|
876
|
-
}
|
|
877
|
-
var q, J, Z = 0, ae = o === "" ? gt : o + tn;
|
|
878
|
-
if (Ye(e))
|
|
879
|
-
for (var Ot = 0; Ot < e.length; Ot++)
|
|
880
|
-
q = e[Ot], J = ae + Le(q, Ot), Z += Pe(q, n, s, J, d);
|
|
881
|
-
else {
|
|
882
|
-
var vn = V(e);
|
|
883
|
-
if (typeof vn == "function") {
|
|
884
|
-
var Hn = e;
|
|
885
|
-
vn === Hn.entries && (Je || ve("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), Je = !0);
|
|
886
|
-
for (var Nr = vn.call(Hn), zn, kr = 0; !(zn = Nr.next()).done; )
|
|
887
|
-
q = zn.value, J = ae + Le(q, kr++), Z += Pe(q, n, s, J, d);
|
|
888
|
-
} else if (T === "object") {
|
|
889
|
-
var Jn = String(e);
|
|
890
|
-
throw new Error("Objects are not valid as a React child (found: " + (Jn === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : Jn) + "). If you meant to render a collection of children, use an array instead.");
|
|
891
|
-
}
|
|
892
|
-
}
|
|
893
|
-
return Z;
|
|
894
|
-
}
|
|
895
|
-
function $e(e, n, s) {
|
|
896
|
-
if (e == null)
|
|
897
|
-
return e;
|
|
898
|
-
var o = [], d = 0;
|
|
899
|
-
return Pe(e, o, "", "", function(T) {
|
|
900
|
-
return n.call(s, T, d++);
|
|
901
|
-
}), o;
|
|
902
|
-
}
|
|
903
|
-
function rn(e) {
|
|
904
|
-
var n = 0;
|
|
905
|
-
return $e(e, function() {
|
|
906
|
-
n++;
|
|
907
|
-
}), n;
|
|
908
|
-
}
|
|
909
|
-
function Et(e, n, s) {
|
|
910
|
-
$e(e, function() {
|
|
911
|
-
n.apply(this, arguments);
|
|
912
|
-
}, s);
|
|
913
|
-
}
|
|
914
|
-
function an(e) {
|
|
915
|
-
return $e(e, function(n) {
|
|
916
|
-
return n;
|
|
917
|
-
}) || [];
|
|
918
|
-
}
|
|
919
|
-
function _t(e) {
|
|
920
|
-
if (!Ae(e))
|
|
921
|
-
throw new Error("React.Children.only expected to receive a single React element child.");
|
|
922
|
-
return e;
|
|
923
|
-
}
|
|
924
|
-
function Rt(e) {
|
|
925
|
-
var n = {
|
|
926
|
-
$$typeof: $,
|
|
927
|
-
// As a workaround to support multiple concurrent renderers, we categorize
|
|
928
|
-
// some renderers as primary and others as secondary. We only expect
|
|
929
|
-
// there to be two concurrent renderers at most: React Native (primary) and
|
|
930
|
-
// Fabric (secondary); React DOM (primary) and React ART (secondary).
|
|
931
|
-
// Secondary renderers store their context values on separate fields.
|
|
932
|
-
_currentValue: e,
|
|
933
|
-
_currentValue2: e,
|
|
934
|
-
// Used to track how many concurrent renderers this context currently
|
|
935
|
-
// supports within in a single renderer. Such as parallel server rendering.
|
|
936
|
-
_threadCount: 0,
|
|
937
|
-
// These are circular
|
|
938
|
-
Provider: null,
|
|
939
|
-
Consumer: null,
|
|
940
|
-
// Add these to use same hidden class in VM as ServerContext
|
|
941
|
-
_defaultValue: null,
|
|
942
|
-
_globalName: null
|
|
943
|
-
};
|
|
944
|
-
n.Provider = {
|
|
945
|
-
$$typeof: C,
|
|
946
|
-
_context: n
|
|
947
|
-
};
|
|
948
|
-
var s = !1, o = !1, d = !1;
|
|
949
|
-
{
|
|
950
|
-
var T = {
|
|
951
|
-
$$typeof: $,
|
|
952
|
-
_context: n
|
|
953
|
-
};
|
|
954
|
-
Object.defineProperties(T, {
|
|
955
|
-
Provider: {
|
|
956
|
-
get: function() {
|
|
957
|
-
return o || (o = !0, g("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")), n.Provider;
|
|
958
|
-
},
|
|
959
|
-
set: function(b) {
|
|
960
|
-
n.Provider = b;
|
|
961
|
-
}
|
|
962
|
-
},
|
|
963
|
-
_currentValue: {
|
|
964
|
-
get: function() {
|
|
965
|
-
return n._currentValue;
|
|
966
|
-
},
|
|
967
|
-
set: function(b) {
|
|
968
|
-
n._currentValue = b;
|
|
969
|
-
}
|
|
970
|
-
},
|
|
971
|
-
_currentValue2: {
|
|
972
|
-
get: function() {
|
|
973
|
-
return n._currentValue2;
|
|
974
|
-
},
|
|
975
|
-
set: function(b) {
|
|
976
|
-
n._currentValue2 = b;
|
|
977
|
-
}
|
|
978
|
-
},
|
|
979
|
-
_threadCount: {
|
|
980
|
-
get: function() {
|
|
981
|
-
return n._threadCount;
|
|
982
|
-
},
|
|
983
|
-
set: function(b) {
|
|
984
|
-
n._threadCount = b;
|
|
985
|
-
}
|
|
986
|
-
},
|
|
987
|
-
Consumer: {
|
|
988
|
-
get: function() {
|
|
989
|
-
return s || (s = !0, g("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")), n.Consumer;
|
|
990
|
-
}
|
|
991
|
-
},
|
|
992
|
-
displayName: {
|
|
993
|
-
get: function() {
|
|
994
|
-
return n.displayName;
|
|
995
|
-
},
|
|
996
|
-
set: function(b) {
|
|
997
|
-
d || (ve("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", b), d = !0);
|
|
998
|
-
}
|
|
999
|
-
}
|
|
1000
|
-
}), n.Consumer = T;
|
|
1001
|
-
}
|
|
1002
|
-
return n._currentRenderer = null, n._currentRenderer2 = null, n;
|
|
1003
|
-
}
|
|
1004
|
-
var Be = -1, st = 0, ot = 1, sn = 2;
|
|
1005
|
-
function on(e) {
|
|
1006
|
-
if (e._status === Be) {
|
|
1007
|
-
var n = e._result, s = n();
|
|
1008
|
-
if (s.then(function(T) {
|
|
1009
|
-
if (e._status === st || e._status === Be) {
|
|
1010
|
-
var b = e;
|
|
1011
|
-
b._status = ot, b._result = T;
|
|
1012
|
-
}
|
|
1013
|
-
}, function(T) {
|
|
1014
|
-
if (e._status === st || e._status === Be) {
|
|
1015
|
-
var b = e;
|
|
1016
|
-
b._status = sn, b._result = T;
|
|
1017
|
-
}
|
|
1018
|
-
}), e._status === Be) {
|
|
1019
|
-
var o = e;
|
|
1020
|
-
o._status = st, o._result = s;
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
if (e._status === ot) {
|
|
1024
|
-
var d = e._result;
|
|
1025
|
-
return d === void 0 && g(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
1026
|
-
|
|
1027
|
-
Your code should look like:
|
|
1028
|
-
const MyComponent = lazy(() => import('./MyComponent'))
|
|
1029
|
-
|
|
1030
|
-
Did you accidentally put curly braces around the import?`, d), "default" in d || g(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
1031
|
-
|
|
1032
|
-
Your code should look like:
|
|
1033
|
-
const MyComponent = lazy(() => import('./MyComponent'))`, d), d.default;
|
|
1034
|
-
} else
|
|
1035
|
-
throw e._result;
|
|
1036
|
-
}
|
|
1037
|
-
function un(e) {
|
|
1038
|
-
var n = {
|
|
1039
|
-
// We use these fields to store the result.
|
|
1040
|
-
_status: Be,
|
|
1041
|
-
_result: e
|
|
1042
|
-
}, s = {
|
|
1043
|
-
$$typeof: de,
|
|
1044
|
-
_payload: n,
|
|
1045
|
-
_init: on
|
|
1046
|
-
};
|
|
1047
|
-
{
|
|
1048
|
-
var o, d;
|
|
1049
|
-
Object.defineProperties(s, {
|
|
1050
|
-
defaultProps: {
|
|
1051
|
-
configurable: !0,
|
|
1052
|
-
get: function() {
|
|
1053
|
-
return o;
|
|
1054
|
-
},
|
|
1055
|
-
set: function(T) {
|
|
1056
|
-
g("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."), o = T, Object.defineProperty(s, "defaultProps", {
|
|
1057
|
-
enumerable: !0
|
|
1058
|
-
});
|
|
1059
|
-
}
|
|
1060
|
-
},
|
|
1061
|
-
propTypes: {
|
|
1062
|
-
configurable: !0,
|
|
1063
|
-
get: function() {
|
|
1064
|
-
return d;
|
|
1065
|
-
},
|
|
1066
|
-
set: function(T) {
|
|
1067
|
-
g("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."), d = T, Object.defineProperty(s, "propTypes", {
|
|
1068
|
-
enumerable: !0
|
|
1069
|
-
});
|
|
1070
|
-
}
|
|
1071
|
-
}
|
|
1072
|
-
});
|
|
1073
|
-
}
|
|
1074
|
-
return s;
|
|
1075
|
-
}
|
|
1076
|
-
function cn(e) {
|
|
1077
|
-
e != null && e.$$typeof === ie ? g("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : typeof e != "function" ? g("forwardRef requires a render function but was given %s.", e === null ? "null" : typeof e) : e.length !== 0 && e.length !== 2 && g("forwardRef render functions accept exactly two parameters: props and ref. %s", e.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."), e != null && (e.defaultProps != null || e.propTypes != null) && g("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
|
|
1078
|
-
var n = {
|
|
1079
|
-
$$typeof: S,
|
|
1080
|
-
render: e
|
|
1081
|
-
};
|
|
1082
|
-
{
|
|
1083
|
-
var s;
|
|
1084
|
-
Object.defineProperty(n, "displayName", {
|
|
1085
|
-
enumerable: !1,
|
|
1086
|
-
configurable: !0,
|
|
1087
|
-
get: function() {
|
|
1088
|
-
return s;
|
|
1089
|
-
},
|
|
1090
|
-
set: function(o) {
|
|
1091
|
-
s = o, !e.name && !e.displayName && (e.displayName = o);
|
|
1092
|
-
}
|
|
1093
|
-
});
|
|
1094
|
-
}
|
|
1095
|
-
return n;
|
|
1096
|
-
}
|
|
1097
|
-
var r;
|
|
1098
|
-
r = Symbol.for("react.module.reference");
|
|
1099
|
-
function l(e) {
|
|
1100
|
-
return !!(typeof e == "string" || typeof e == "function" || e === h || e === A || ce || e === E || e === U || e === Q || oe || e === he || Oe || at || De || typeof e == "object" && e !== null && (e.$$typeof === de || e.$$typeof === ie || e.$$typeof === C || e.$$typeof === $ || e.$$typeof === S || // This needs to include all possible module reference object
|
|
1101
|
-
// types supported by any Flight configuration anywhere since
|
|
1102
|
-
// we don't know which Flight build this will end up being used
|
|
1103
|
-
// with.
|
|
1104
|
-
e.$$typeof === r || e.getModuleId !== void 0));
|
|
1105
|
-
}
|
|
1106
|
-
function m(e, n) {
|
|
1107
|
-
l(e) || g("memo: The first argument must be a component. Instead received: %s", e === null ? "null" : typeof e);
|
|
1108
|
-
var s = {
|
|
1109
|
-
$$typeof: ie,
|
|
1110
|
-
type: e,
|
|
1111
|
-
compare: n === void 0 ? null : n
|
|
1112
|
-
};
|
|
1113
|
-
{
|
|
1114
|
-
var o;
|
|
1115
|
-
Object.defineProperty(s, "displayName", {
|
|
1116
|
-
enumerable: !1,
|
|
1117
|
-
configurable: !0,
|
|
1118
|
-
get: function() {
|
|
1119
|
-
return o;
|
|
1120
|
-
},
|
|
1121
|
-
set: function(d) {
|
|
1122
|
-
o = d, !e.name && !e.displayName && (e.displayName = d);
|
|
1123
|
-
}
|
|
1124
|
-
});
|
|
1125
|
-
}
|
|
1126
|
-
return s;
|
|
1127
|
-
}
|
|
1128
|
-
function v() {
|
|
1129
|
-
var e = ee.current;
|
|
1130
|
-
return e === null && g(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
1131
|
-
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
1132
|
-
2. You might be breaking the Rules of Hooks
|
|
1133
|
-
3. You might have more than one copy of React in the same app
|
|
1134
|
-
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`), e;
|
|
1135
|
-
}
|
|
1136
|
-
function M(e) {
|
|
1137
|
-
var n = v();
|
|
1138
|
-
if (e._context !== void 0) {
|
|
1139
|
-
var s = e._context;
|
|
1140
|
-
s.Consumer === e ? g("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?") : s.Provider === e && g("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?");
|
|
1141
|
-
}
|
|
1142
|
-
return n.useContext(e);
|
|
1143
|
-
}
|
|
1144
|
-
function F(e) {
|
|
1145
|
-
var n = v();
|
|
1146
|
-
return n.useState(e);
|
|
1147
|
-
}
|
|
1148
|
-
function O(e, n, s) {
|
|
1149
|
-
var o = v();
|
|
1150
|
-
return o.useReducer(e, n, s);
|
|
1151
|
-
}
|
|
1152
|
-
function P(e) {
|
|
1153
|
-
var n = v();
|
|
1154
|
-
return n.useRef(e);
|
|
1155
|
-
}
|
|
1156
|
-
function re(e, n) {
|
|
1157
|
-
var s = v();
|
|
1158
|
-
return s.useEffect(e, n);
|
|
1159
|
-
}
|
|
1160
|
-
function z(e, n) {
|
|
1161
|
-
var s = v();
|
|
1162
|
-
return s.useInsertionEffect(e, n);
|
|
1163
|
-
}
|
|
1164
|
-
function K(e, n) {
|
|
1165
|
-
var s = v();
|
|
1166
|
-
return s.useLayoutEffect(e, n);
|
|
1167
|
-
}
|
|
1168
|
-
function le(e, n) {
|
|
1169
|
-
var s = v();
|
|
1170
|
-
return s.useCallback(e, n);
|
|
1171
|
-
}
|
|
1172
|
-
function xe(e, n) {
|
|
1173
|
-
var s = v();
|
|
1174
|
-
return s.useMemo(e, n);
|
|
1175
|
-
}
|
|
1176
|
-
function wt(e, n, s) {
|
|
1177
|
-
var o = v();
|
|
1178
|
-
return o.useImperativeHandle(e, n, s);
|
|
1179
|
-
}
|
|
1180
|
-
function be(e, n) {
|
|
1181
|
-
{
|
|
1182
|
-
var s = v();
|
|
1183
|
-
return s.useDebugValue(e, n);
|
|
1184
|
-
}
|
|
1185
|
-
}
|
|
1186
|
-
function pr() {
|
|
1187
|
-
var e = v();
|
|
1188
|
-
return e.useTransition();
|
|
1189
|
-
}
|
|
1190
|
-
function dr(e) {
|
|
1191
|
-
var n = v();
|
|
1192
|
-
return n.useDeferredValue(e);
|
|
1193
|
-
}
|
|
1194
|
-
function fr() {
|
|
1195
|
-
var e = v();
|
|
1196
|
-
return e.useId();
|
|
1197
|
-
}
|
|
1198
|
-
function yr(e, n, s) {
|
|
1199
|
-
var o = v();
|
|
1200
|
-
return o.useSyncExternalStore(e, n, s);
|
|
1201
|
-
}
|
|
1202
|
-
var ut = 0, An, Pn, xn, In, On, Dn, Mn;
|
|
1203
|
-
function Nn() {
|
|
1204
|
-
}
|
|
1205
|
-
Nn.__reactDisabledLog = !0;
|
|
1206
|
-
function mr() {
|
|
1207
|
-
{
|
|
1208
|
-
if (ut === 0) {
|
|
1209
|
-
An = console.log, Pn = console.info, xn = console.warn, In = console.error, On = console.group, Dn = console.groupCollapsed, Mn = console.groupEnd;
|
|
1210
|
-
var e = {
|
|
1211
|
-
configurable: !0,
|
|
1212
|
-
enumerable: !0,
|
|
1213
|
-
value: Nn,
|
|
1214
|
-
writable: !0
|
|
1215
|
-
};
|
|
1216
|
-
Object.defineProperties(console, {
|
|
1217
|
-
info: e,
|
|
1218
|
-
log: e,
|
|
1219
|
-
warn: e,
|
|
1220
|
-
error: e,
|
|
1221
|
-
group: e,
|
|
1222
|
-
groupCollapsed: e,
|
|
1223
|
-
groupEnd: e
|
|
1224
|
-
});
|
|
1225
|
-
}
|
|
1226
|
-
ut++;
|
|
1227
|
-
}
|
|
1228
|
-
}
|
|
1229
|
-
function hr() {
|
|
1230
|
-
{
|
|
1231
|
-
if (ut--, ut === 0) {
|
|
1232
|
-
var e = {
|
|
1233
|
-
configurable: !0,
|
|
1234
|
-
enumerable: !0,
|
|
1235
|
-
writable: !0
|
|
1236
|
-
};
|
|
1237
|
-
Object.defineProperties(console, {
|
|
1238
|
-
log: R({}, e, {
|
|
1239
|
-
value: An
|
|
1240
|
-
}),
|
|
1241
|
-
info: R({}, e, {
|
|
1242
|
-
value: Pn
|
|
1243
|
-
}),
|
|
1244
|
-
warn: R({}, e, {
|
|
1245
|
-
value: xn
|
|
1246
|
-
}),
|
|
1247
|
-
error: R({}, e, {
|
|
1248
|
-
value: In
|
|
1249
|
-
}),
|
|
1250
|
-
group: R({}, e, {
|
|
1251
|
-
value: On
|
|
1252
|
-
}),
|
|
1253
|
-
groupCollapsed: R({}, e, {
|
|
1254
|
-
value: Dn
|
|
1255
|
-
}),
|
|
1256
|
-
groupEnd: R({}, e, {
|
|
1257
|
-
value: Mn
|
|
1258
|
-
})
|
|
1259
|
-
});
|
|
1260
|
-
}
|
|
1261
|
-
ut < 0 && g("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
1262
|
-
}
|
|
1263
|
-
}
|
|
1264
|
-
var ln = ne.ReactCurrentDispatcher, pn;
|
|
1265
|
-
function Ct(e, n, s) {
|
|
1266
|
-
{
|
|
1267
|
-
if (pn === void 0)
|
|
1268
|
-
try {
|
|
1269
|
-
throw Error();
|
|
1270
|
-
} catch (d) {
|
|
1271
|
-
var o = d.stack.trim().match(/\n( *(at )?)/);
|
|
1272
|
-
pn = o && o[1] || "";
|
|
1273
|
-
}
|
|
1274
|
-
return `
|
|
1275
|
-
` + pn + e;
|
|
1276
|
-
}
|
|
1277
|
-
}
|
|
1278
|
-
var dn = !1, St;
|
|
1279
|
-
{
|
|
1280
|
-
var vr = typeof WeakMap == "function" ? WeakMap : Map;
|
|
1281
|
-
St = new vr();
|
|
1282
|
-
}
|
|
1283
|
-
function kn(e, n) {
|
|
1284
|
-
if (!e || dn)
|
|
1285
|
-
return "";
|
|
1286
|
-
{
|
|
1287
|
-
var s = St.get(e);
|
|
1288
|
-
if (s !== void 0)
|
|
1289
|
-
return s;
|
|
1290
|
-
}
|
|
1291
|
-
var o;
|
|
1292
|
-
dn = !0;
|
|
1293
|
-
var d = Error.prepareStackTrace;
|
|
1294
|
-
Error.prepareStackTrace = void 0;
|
|
1295
|
-
var T;
|
|
1296
|
-
T = ln.current, ln.current = null, mr();
|
|
1297
|
-
try {
|
|
1298
|
-
if (n) {
|
|
1299
|
-
var b = function() {
|
|
1300
|
-
throw Error();
|
|
1301
|
-
};
|
|
1302
|
-
if (Object.defineProperty(b.prototype, "props", {
|
|
1303
|
-
set: function() {
|
|
1304
|
-
throw Error();
|
|
1305
|
-
}
|
|
1306
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
1307
|
-
try {
|
|
1308
|
-
Reflect.construct(b, []);
|
|
1309
|
-
} catch (ae) {
|
|
1310
|
-
o = ae;
|
|
1311
|
-
}
|
|
1312
|
-
Reflect.construct(e, [], b);
|
|
1313
|
-
} else {
|
|
1314
|
-
try {
|
|
1315
|
-
b.call();
|
|
1316
|
-
} catch (ae) {
|
|
1317
|
-
o = ae;
|
|
1318
|
-
}
|
|
1319
|
-
e.call(b.prototype);
|
|
1320
|
-
}
|
|
1321
|
-
} else {
|
|
1322
|
-
try {
|
|
1323
|
-
throw Error();
|
|
1324
|
-
} catch (ae) {
|
|
1325
|
-
o = ae;
|
|
1326
|
-
}
|
|
1327
|
-
e();
|
|
1328
|
-
}
|
|
1329
|
-
} catch (ae) {
|
|
1330
|
-
if (ae && o && typeof ae.stack == "string") {
|
|
1331
|
-
for (var _ = ae.stack.split(`
|
|
1332
|
-
`), D = o.stack.split(`
|
|
1333
|
-
`), L = _.length - 1, Y = D.length - 1; L >= 1 && Y >= 0 && _[L] !== D[Y]; )
|
|
1334
|
-
Y--;
|
|
1335
|
-
for (; L >= 1 && Y >= 0; L--, Y--)
|
|
1336
|
-
if (_[L] !== D[Y]) {
|
|
1337
|
-
if (L !== 1 || Y !== 1)
|
|
1338
|
-
do
|
|
1339
|
-
if (L--, Y--, Y < 0 || _[L] !== D[Y]) {
|
|
1340
|
-
var q = `
|
|
1341
|
-
` + _[L].replace(" at new ", " at ");
|
|
1342
|
-
return e.displayName && q.includes("<anonymous>") && (q = q.replace("<anonymous>", e.displayName)), typeof e == "function" && St.set(e, q), q;
|
|
1343
|
-
}
|
|
1344
|
-
while (L >= 1 && Y >= 0);
|
|
1345
|
-
break;
|
|
1346
|
-
}
|
|
1347
|
-
}
|
|
1348
|
-
} finally {
|
|
1349
|
-
dn = !1, ln.current = T, hr(), Error.prepareStackTrace = d;
|
|
1350
|
-
}
|
|
1351
|
-
var J = e ? e.displayName || e.name : "", Z = J ? Ct(J) : "";
|
|
1352
|
-
return typeof e == "function" && St.set(e, Z), Z;
|
|
1353
|
-
}
|
|
1354
|
-
function br(e, n, s) {
|
|
1355
|
-
return kn(e, !1);
|
|
1356
|
-
}
|
|
1357
|
-
function gr(e) {
|
|
1358
|
-
var n = e.prototype;
|
|
1359
|
-
return !!(n && n.isReactComponent);
|
|
1360
|
-
}
|
|
1361
|
-
function At(e, n, s) {
|
|
1362
|
-
if (e == null)
|
|
1363
|
-
return "";
|
|
1364
|
-
if (typeof e == "function")
|
|
1365
|
-
return kn(e, gr(e));
|
|
1366
|
-
if (typeof e == "string")
|
|
1367
|
-
return Ct(e);
|
|
1368
|
-
switch (e) {
|
|
1369
|
-
case U:
|
|
1370
|
-
return Ct("Suspense");
|
|
1371
|
-
case Q:
|
|
1372
|
-
return Ct("SuspenseList");
|
|
1373
|
-
}
|
|
1374
|
-
if (typeof e == "object")
|
|
1375
|
-
switch (e.$$typeof) {
|
|
1376
|
-
case S:
|
|
1377
|
-
return br(e.render);
|
|
1378
|
-
case ie:
|
|
1379
|
-
return At(e.type, n, s);
|
|
1380
|
-
case de: {
|
|
1381
|
-
var o = e, d = o._payload, T = o._init;
|
|
1382
|
-
try {
|
|
1383
|
-
return At(T(d), n, s);
|
|
1384
|
-
} catch {
|
|
1385
|
-
}
|
|
1386
|
-
}
|
|
1387
|
-
}
|
|
1388
|
-
return "";
|
|
1389
|
-
}
|
|
1390
|
-
var Fn = {}, Un = ne.ReactDebugCurrentFrame;
|
|
1391
|
-
function Pt(e) {
|
|
1392
|
-
if (e) {
|
|
1393
|
-
var n = e._owner, s = At(e.type, e._source, n ? n.type : null);
|
|
1394
|
-
Un.setExtraStackFrame(s);
|
|
1395
|
-
} else
|
|
1396
|
-
Un.setExtraStackFrame(null);
|
|
1397
|
-
}
|
|
1398
|
-
function Tr(e, n, s, o, d) {
|
|
1399
|
-
{
|
|
1400
|
-
var T = Function.call.bind(Ue);
|
|
1401
|
-
for (var b in e)
|
|
1402
|
-
if (T(e, b)) {
|
|
1403
|
-
var _ = void 0;
|
|
1404
|
-
try {
|
|
1405
|
-
if (typeof e[b] != "function") {
|
|
1406
|
-
var D = Error((o || "React class") + ": " + s + " type `" + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[b] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
1407
|
-
throw D.name = "Invariant Violation", D;
|
|
1408
|
-
}
|
|
1409
|
-
_ = e[b](n, b, o, s, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
1410
|
-
} catch (L) {
|
|
1411
|
-
_ = L;
|
|
1412
|
-
}
|
|
1413
|
-
_ && !(_ instanceof Error) && (Pt(d), g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", o || "React class", s, b, typeof _), Pt(null)), _ instanceof Error && !(_.message in Fn) && (Fn[_.message] = !0, Pt(d), g("Failed %s type: %s", s, _.message), Pt(null));
|
|
1414
|
-
}
|
|
1415
|
-
}
|
|
1416
|
-
}
|
|
1417
|
-
function Ke(e) {
|
|
1418
|
-
if (e) {
|
|
1419
|
-
var n = e._owner, s = At(e.type, e._source, n ? n.type : null);
|
|
1420
|
-
Ie(s);
|
|
1421
|
-
} else
|
|
1422
|
-
Ie(null);
|
|
1423
|
-
}
|
|
1424
|
-
var fn;
|
|
1425
|
-
fn = !1;
|
|
1426
|
-
function jn() {
|
|
1427
|
-
if (te.current) {
|
|
1428
|
-
var e = Ee(te.current.type);
|
|
1429
|
-
if (e)
|
|
1430
|
-
return `
|
|
1431
|
-
|
|
1432
|
-
Check the render method of \`` + e + "`.";
|
|
1433
|
-
}
|
|
1434
|
-
return "";
|
|
1435
|
-
}
|
|
1436
|
-
function Er(e) {
|
|
1437
|
-
if (e !== void 0) {
|
|
1438
|
-
var n = e.fileName.replace(/^.*[\\\/]/, ""), s = e.lineNumber;
|
|
1439
|
-
return `
|
|
1440
|
-
|
|
1441
|
-
Check your code at ` + n + ":" + s + ".";
|
|
1442
|
-
}
|
|
1443
|
-
return "";
|
|
1444
|
-
}
|
|
1445
|
-
function _r(e) {
|
|
1446
|
-
return e != null ? Er(e.__source) : "";
|
|
1447
|
-
}
|
|
1448
|
-
var Ln = {};
|
|
1449
|
-
function Rr(e) {
|
|
1450
|
-
var n = jn();
|
|
1451
|
-
if (!n) {
|
|
1452
|
-
var s = typeof e == "string" ? e : e.displayName || e.name;
|
|
1453
|
-
s && (n = `
|
|
1454
|
-
|
|
1455
|
-
Check the top-level render call using <` + s + ">.");
|
|
1456
|
-
}
|
|
1457
|
-
return n;
|
|
1458
|
-
}
|
|
1459
|
-
function $n(e, n) {
|
|
1460
|
-
if (!(!e._store || e._store.validated || e.key != null)) {
|
|
1461
|
-
e._store.validated = !0;
|
|
1462
|
-
var s = Rr(n);
|
|
1463
|
-
if (!Ln[s]) {
|
|
1464
|
-
Ln[s] = !0;
|
|
1465
|
-
var o = "";
|
|
1466
|
-
e && e._owner && e._owner !== te.current && (o = " It was passed a child from " + Ee(e._owner.type) + "."), Ke(e), g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', s, o), Ke(null);
|
|
1467
|
-
}
|
|
1468
|
-
}
|
|
1469
|
-
}
|
|
1470
|
-
function Bn(e, n) {
|
|
1471
|
-
if (typeof e == "object") {
|
|
1472
|
-
if (Ye(e))
|
|
1473
|
-
for (var s = 0; s < e.length; s++) {
|
|
1474
|
-
var o = e[s];
|
|
1475
|
-
Ae(o) && $n(o, n);
|
|
1476
|
-
}
|
|
1477
|
-
else if (Ae(e))
|
|
1478
|
-
e._store && (e._store.validated = !0);
|
|
1479
|
-
else if (e) {
|
|
1480
|
-
var d = V(e);
|
|
1481
|
-
if (typeof d == "function" && d !== e.entries)
|
|
1482
|
-
for (var T = d.call(e), b; !(b = T.next()).done; )
|
|
1483
|
-
Ae(b.value) && $n(b.value, n);
|
|
1484
|
-
}
|
|
1485
|
-
}
|
|
1486
|
-
}
|
|
1487
|
-
function Wn(e) {
|
|
1488
|
-
{
|
|
1489
|
-
var n = e.type;
|
|
1490
|
-
if (n == null || typeof n == "string")
|
|
1491
|
-
return;
|
|
1492
|
-
var s;
|
|
1493
|
-
if (typeof n == "function")
|
|
1494
|
-
s = n.propTypes;
|
|
1495
|
-
else if (typeof n == "object" && (n.$$typeof === S || // Note: Memo only checks outer props here.
|
|
1496
|
-
// Inner props are checked in the reconciler.
|
|
1497
|
-
n.$$typeof === ie))
|
|
1498
|
-
s = n.propTypes;
|
|
1499
|
-
else
|
|
1500
|
-
return;
|
|
1501
|
-
if (s) {
|
|
1502
|
-
var o = Ee(n);
|
|
1503
|
-
Tr(s, e.props, "prop", o, e);
|
|
1504
|
-
} else if (n.PropTypes !== void 0 && !fn) {
|
|
1505
|
-
fn = !0;
|
|
1506
|
-
var d = Ee(n);
|
|
1507
|
-
g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", d || "Unknown");
|
|
1508
|
-
}
|
|
1509
|
-
typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved && g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
1510
|
-
}
|
|
1511
|
-
}
|
|
1512
|
-
function wr(e) {
|
|
1513
|
-
{
|
|
1514
|
-
for (var n = Object.keys(e.props), s = 0; s < n.length; s++) {
|
|
1515
|
-
var o = n[s];
|
|
1516
|
-
if (o !== "children" && o !== "key") {
|
|
1517
|
-
Ke(e), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", o), Ke(null);
|
|
1518
|
-
break;
|
|
1519
|
-
}
|
|
1520
|
-
}
|
|
1521
|
-
e.ref !== null && (Ke(e), g("Invalid attribute `ref` supplied to `React.Fragment`."), Ke(null));
|
|
1522
|
-
}
|
|
1523
|
-
}
|
|
1524
|
-
function Vn(e, n, s) {
|
|
1525
|
-
var o = l(e);
|
|
1526
|
-
if (!o) {
|
|
1527
|
-
var d = "";
|
|
1528
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (d += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
1529
|
-
var T = _r(n);
|
|
1530
|
-
T ? d += T : d += jn();
|
|
1531
|
-
var b;
|
|
1532
|
-
e === null ? b = "null" : Ye(e) ? b = "array" : e !== void 0 && e.$$typeof === c ? (b = "<" + (Ee(e.type) || "Unknown") + " />", d = " Did you accidentally export a JSX literal instead of a component?") : b = typeof e, g("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, d);
|
|
1533
|
-
}
|
|
1534
|
-
var _ = Xt.apply(this, arguments);
|
|
1535
|
-
if (_ == null)
|
|
1536
|
-
return _;
|
|
1537
|
-
if (o)
|
|
1538
|
-
for (var D = 2; D < arguments.length; D++)
|
|
1539
|
-
Bn(arguments[D], e);
|
|
1540
|
-
return e === h ? wr(_) : Wn(_), _;
|
|
1541
|
-
}
|
|
1542
|
-
var Gn = !1;
|
|
1543
|
-
function Cr(e) {
|
|
1544
|
-
var n = Vn.bind(null, e);
|
|
1545
|
-
return n.type = e, Gn || (Gn = !0, ve("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")), Object.defineProperty(n, "type", {
|
|
1546
|
-
enumerable: !1,
|
|
1547
|
-
get: function() {
|
|
1548
|
-
return ve("Factory.type is deprecated. Access the class directly before passing it to createFactory."), Object.defineProperty(this, "type", {
|
|
1549
|
-
value: e
|
|
1550
|
-
}), e;
|
|
1551
|
-
}
|
|
1552
|
-
}), n;
|
|
1553
|
-
}
|
|
1554
|
-
function Sr(e, n, s) {
|
|
1555
|
-
for (var o = en.apply(this, arguments), d = 2; d < arguments.length; d++)
|
|
1556
|
-
Bn(arguments[d], o.type);
|
|
1557
|
-
return Wn(o), o;
|
|
1558
|
-
}
|
|
1559
|
-
function Ar(e, n) {
|
|
1560
|
-
var s = se.transition;
|
|
1561
|
-
se.transition = {};
|
|
1562
|
-
var o = se.transition;
|
|
1563
|
-
se.transition._updatedFibers = /* @__PURE__ */ new Set();
|
|
1564
|
-
try {
|
|
1565
|
-
e();
|
|
1566
|
-
} finally {
|
|
1567
|
-
if (se.transition = s, s === null && o._updatedFibers) {
|
|
1568
|
-
var d = o._updatedFibers.size;
|
|
1569
|
-
d > 10 && ve("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."), o._updatedFibers.clear();
|
|
1570
|
-
}
|
|
1571
|
-
}
|
|
1572
|
-
}
|
|
1573
|
-
var Yn = !1, xt = null;
|
|
1574
|
-
function Pr(e) {
|
|
1575
|
-
if (xt === null)
|
|
1576
|
-
try {
|
|
1577
|
-
var n = ("require" + Math.random()).slice(0, 7), s = t && t[n];
|
|
1578
|
-
xt = s.call(t, "timers").setImmediate;
|
|
1579
|
-
} catch {
|
|
1580
|
-
xt = function(d) {
|
|
1581
|
-
Yn === !1 && (Yn = !0, typeof MessageChannel > "u" && g("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));
|
|
1582
|
-
var T = new MessageChannel();
|
|
1583
|
-
T.port1.onmessage = d, T.port2.postMessage(void 0);
|
|
1584
|
-
};
|
|
1585
|
-
}
|
|
1586
|
-
return xt(e);
|
|
1587
|
-
}
|
|
1588
|
-
var Ze = 0, qn = !1;
|
|
1589
|
-
function xr(e) {
|
|
1590
|
-
{
|
|
1591
|
-
var n = Ze;
|
|
1592
|
-
Ze++, H.current === null && (H.current = []);
|
|
1593
|
-
var s = H.isBatchingLegacy, o;
|
|
1594
|
-
try {
|
|
1595
|
-
if (H.isBatchingLegacy = !0, o = e(), !s && H.didScheduleLegacyUpdate) {
|
|
1596
|
-
var d = H.current;
|
|
1597
|
-
d !== null && (H.didScheduleLegacyUpdate = !1, hn(d));
|
|
1598
|
-
}
|
|
1599
|
-
} catch (J) {
|
|
1600
|
-
throw It(n), J;
|
|
1601
|
-
} finally {
|
|
1602
|
-
H.isBatchingLegacy = s;
|
|
1603
|
-
}
|
|
1604
|
-
if (o !== null && typeof o == "object" && typeof o.then == "function") {
|
|
1605
|
-
var T = o, b = !1, _ = {
|
|
1606
|
-
then: function(J, Z) {
|
|
1607
|
-
b = !0, T.then(function(ae) {
|
|
1608
|
-
It(n), Ze === 0 ? yn(ae, J, Z) : J(ae);
|
|
1609
|
-
}, function(ae) {
|
|
1610
|
-
It(n), Z(ae);
|
|
1611
|
-
});
|
|
1612
|
-
}
|
|
1613
|
-
};
|
|
1614
|
-
return !qn && typeof Promise < "u" && Promise.resolve().then(function() {
|
|
1615
|
-
}).then(function() {
|
|
1616
|
-
b || (qn = !0, g("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"));
|
|
1617
|
-
}), _;
|
|
1618
|
-
} else {
|
|
1619
|
-
var D = o;
|
|
1620
|
-
if (It(n), Ze === 0) {
|
|
1621
|
-
var L = H.current;
|
|
1622
|
-
L !== null && (hn(L), H.current = null);
|
|
1623
|
-
var Y = {
|
|
1624
|
-
then: function(J, Z) {
|
|
1625
|
-
H.current === null ? (H.current = [], yn(D, J, Z)) : J(D);
|
|
1626
|
-
}
|
|
1627
|
-
};
|
|
1628
|
-
return Y;
|
|
1629
|
-
} else {
|
|
1630
|
-
var q = {
|
|
1631
|
-
then: function(J, Z) {
|
|
1632
|
-
J(D);
|
|
1633
|
-
}
|
|
1634
|
-
};
|
|
1635
|
-
return q;
|
|
1636
|
-
}
|
|
1637
|
-
}
|
|
1638
|
-
}
|
|
1639
|
-
}
|
|
1640
|
-
function It(e) {
|
|
1641
|
-
e !== Ze - 1 && g("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "), Ze = e;
|
|
1642
|
-
}
|
|
1643
|
-
function yn(e, n, s) {
|
|
1644
|
-
{
|
|
1645
|
-
var o = H.current;
|
|
1646
|
-
if (o !== null)
|
|
1647
|
-
try {
|
|
1648
|
-
hn(o), Pr(function() {
|
|
1649
|
-
o.length === 0 ? (H.current = null, n(e)) : yn(e, n, s);
|
|
1650
|
-
});
|
|
1651
|
-
} catch (d) {
|
|
1652
|
-
s(d);
|
|
1653
|
-
}
|
|
1654
|
-
else
|
|
1655
|
-
n(e);
|
|
1656
|
-
}
|
|
1657
|
-
}
|
|
1658
|
-
var mn = !1;
|
|
1659
|
-
function hn(e) {
|
|
1660
|
-
if (!mn) {
|
|
1661
|
-
mn = !0;
|
|
1662
|
-
var n = 0;
|
|
1663
|
-
try {
|
|
1664
|
-
for (; n < e.length; n++) {
|
|
1665
|
-
var s = e[n];
|
|
1666
|
-
do
|
|
1667
|
-
s = s(!0);
|
|
1668
|
-
while (s !== null);
|
|
1669
|
-
}
|
|
1670
|
-
e.length = 0;
|
|
1671
|
-
} catch (o) {
|
|
1672
|
-
throw e = e.slice(n + 1), o;
|
|
1673
|
-
} finally {
|
|
1674
|
-
mn = !1;
|
|
1675
|
-
}
|
|
1676
|
-
}
|
|
1677
|
-
}
|
|
1678
|
-
var Ir = Vn, Or = Sr, Dr = Cr, Mr = {
|
|
1679
|
-
map: $e,
|
|
1680
|
-
forEach: Et,
|
|
1681
|
-
count: rn,
|
|
1682
|
-
toArray: an,
|
|
1683
|
-
only: _t
|
|
1684
|
-
};
|
|
1685
|
-
a.Children = Mr, a.Component = I, a.Fragment = h, a.Profiler = A, a.PureComponent = X, a.StrictMode = E, a.Suspense = U, a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ne, a.cloneElement = Or, a.createContext = Rt, a.createElement = Ir, a.createFactory = Dr, a.createRef = Jt, a.forwardRef = cn, a.isValidElement = Ae, a.lazy = un, a.memo = m, a.startTransition = Ar, a.unstable_act = xr, a.useCallback = le, a.useContext = M, a.useDebugValue = be, a.useDeferredValue = dr, a.useEffect = re, a.useId = fr, a.useImperativeHandle = wt, a.useInsertionEffect = z, a.useLayoutEffect = K, a.useMemo = xe, a.useReducer = O, a.useRef = P, a.useState = F, a.useSyncExternalStore = yr, a.useTransition = pr, a.version = u, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
1686
|
-
}();
|
|
1687
|
-
}(dt, dt.exports)), dt.exports;
|
|
1688
|
-
}
|
|
1689
|
-
var er;
|
|
1690
|
-
function Rn() {
|
|
1691
|
-
return er || (er = 1, process.env.NODE_ENV === "production" ? Dt.exports = oa() : Dt.exports = ua()), Dt.exports;
|
|
1692
|
-
}
|
|
1693
|
-
/**
|
|
1694
|
-
* @license React
|
|
1695
|
-
* react-jsx-runtime.production.min.js
|
|
1696
|
-
*
|
|
1697
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1698
|
-
*
|
|
1699
|
-
* This source code is licensed under the MIT license found in the
|
|
1700
|
-
* LICENSE file in the root directory of this source tree.
|
|
1701
|
-
*/
|
|
1702
|
-
var tr;
|
|
1703
|
-
function ca() {
|
|
1704
|
-
if (tr)
|
|
1705
|
-
return ct;
|
|
1706
|
-
tr = 1;
|
|
1707
|
-
var t = Rn(), a = Symbol.for("react.element"), u = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, p = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, h = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
1708
|
-
function E(A, C, $) {
|
|
1709
|
-
var S, U = {}, Q = null, ie = null;
|
|
1710
|
-
$ !== void 0 && (Q = "" + $), C.key !== void 0 && (Q = "" + C.key), C.ref !== void 0 && (ie = C.ref);
|
|
1711
|
-
for (S in C)
|
|
1712
|
-
c.call(C, S) && !h.hasOwnProperty(S) && (U[S] = C[S]);
|
|
1713
|
-
if (A && A.defaultProps)
|
|
1714
|
-
for (S in C = A.defaultProps, C)
|
|
1715
|
-
U[S] === void 0 && (U[S] = C[S]);
|
|
1716
|
-
return { $$typeof: a, type: A, key: Q, ref: ie, props: U, _owner: p.current };
|
|
1717
|
-
}
|
|
1718
|
-
return ct.Fragment = u, ct.jsx = E, ct.jsxs = E, ct;
|
|
1719
|
-
}
|
|
1720
|
-
var lt = {};
|
|
1721
|
-
/**
|
|
1722
|
-
* @license React
|
|
1723
|
-
* react-jsx-runtime.development.js
|
|
1724
|
-
*
|
|
1725
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1726
|
-
*
|
|
1727
|
-
* This source code is licensed under the MIT license found in the
|
|
1728
|
-
* LICENSE file in the root directory of this source tree.
|
|
1729
|
-
*/
|
|
1730
|
-
var nr;
|
|
1731
|
-
function la() {
|
|
1732
|
-
return nr || (nr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
1733
|
-
var t = Rn(), a = Symbol.for("react.element"), u = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), E = Symbol.for("react.provider"), A = Symbol.for("react.context"), C = Symbol.for("react.forward_ref"), $ = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), U = Symbol.for("react.memo"), Q = Symbol.for("react.lazy"), ie = Symbol.for("react.offscreen"), de = Symbol.iterator, he = "@@iterator";
|
|
1734
|
-
function B(r) {
|
|
1735
|
-
if (r === null || typeof r != "object")
|
|
1736
|
-
return null;
|
|
1737
|
-
var l = de && r[de] || r[he];
|
|
1738
|
-
return typeof l == "function" ? l : null;
|
|
1739
|
-
}
|
|
1740
|
-
var ue = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
1741
|
-
function V(r) {
|
|
1742
|
-
{
|
|
1743
|
-
for (var l = arguments.length, m = new Array(l > 1 ? l - 1 : 0), v = 1; v < l; v++)
|
|
1744
|
-
m[v - 1] = arguments[v];
|
|
1745
|
-
ee("error", r, m);
|
|
1746
|
-
}
|
|
1747
|
-
}
|
|
1748
|
-
function ee(r, l, m) {
|
|
1749
|
-
{
|
|
1750
|
-
var v = ue.ReactDebugCurrentFrame, M = v.getStackAddendum();
|
|
1751
|
-
M !== "" && (l += "%s", m = m.concat([M]));
|
|
1752
|
-
var F = m.map(function(O) {
|
|
1753
|
-
return String(O);
|
|
1754
|
-
});
|
|
1755
|
-
F.unshift("Warning: " + l), Function.prototype.apply.call(console[r], console, F);
|
|
1756
|
-
}
|
|
1757
|
-
}
|
|
1758
|
-
var se = !1, H = !1, te = !1, ge = !1, Re = !1, Ie;
|
|
1759
|
-
Ie = Symbol.for("react.module.reference");
|
|
1760
|
-
function Oe(r) {
|
|
1761
|
-
return !!(typeof r == "string" || typeof r == "function" || r === c || r === h || Re || r === p || r === $ || r === S || ge || r === ie || se || H || te || typeof r == "object" && r !== null && (r.$$typeof === Q || r.$$typeof === U || r.$$typeof === E || r.$$typeof === A || r.$$typeof === C || // This needs to include all possible module reference object
|
|
1762
|
-
// types supported by any Flight configuration anywhere since
|
|
1763
|
-
// we don't know which Flight build this will end up being used
|
|
1764
|
-
// with.
|
|
1765
|
-
r.$$typeof === Ie || r.getModuleId !== void 0));
|
|
1766
|
-
}
|
|
1767
|
-
function at(r, l, m) {
|
|
1768
|
-
var v = r.displayName;
|
|
1769
|
-
if (v)
|
|
1770
|
-
return v;
|
|
1771
|
-
var M = l.displayName || l.name || "";
|
|
1772
|
-
return M !== "" ? m + "(" + M + ")" : m;
|
|
1773
|
-
}
|
|
1774
|
-
function De(r) {
|
|
1775
|
-
return r.displayName || "Context";
|
|
1776
|
-
}
|
|
1777
|
-
function oe(r) {
|
|
1778
|
-
if (r == null)
|
|
1779
|
-
return null;
|
|
1780
|
-
if (typeof r.tag == "number" && V("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
|
|
1781
|
-
return r.displayName || r.name || null;
|
|
1782
|
-
if (typeof r == "string")
|
|
1783
|
-
return r;
|
|
1784
|
-
switch (r) {
|
|
1785
|
-
case c:
|
|
1786
|
-
return "Fragment";
|
|
1787
|
-
case u:
|
|
1788
|
-
return "Portal";
|
|
1789
|
-
case h:
|
|
1790
|
-
return "Profiler";
|
|
1791
|
-
case p:
|
|
1792
|
-
return "StrictMode";
|
|
1793
|
-
case $:
|
|
1794
|
-
return "Suspense";
|
|
1795
|
-
case S:
|
|
1796
|
-
return "SuspenseList";
|
|
1797
|
-
}
|
|
1798
|
-
if (typeof r == "object")
|
|
1799
|
-
switch (r.$$typeof) {
|
|
1800
|
-
case A:
|
|
1801
|
-
var l = r;
|
|
1802
|
-
return De(l) + ".Consumer";
|
|
1803
|
-
case E:
|
|
1804
|
-
var m = r;
|
|
1805
|
-
return De(m._context) + ".Provider";
|
|
1806
|
-
case C:
|
|
1807
|
-
return at(r, r.render, "ForwardRef");
|
|
1808
|
-
case U:
|
|
1809
|
-
var v = r.displayName || null;
|
|
1810
|
-
return v !== null ? v : oe(r.type) || "Memo";
|
|
1811
|
-
case Q: {
|
|
1812
|
-
var M = r, F = M._payload, O = M._init;
|
|
1813
|
-
try {
|
|
1814
|
-
return oe(O(F));
|
|
1815
|
-
} catch {
|
|
1816
|
-
return null;
|
|
1817
|
-
}
|
|
1818
|
-
}
|
|
1819
|
-
}
|
|
1820
|
-
return null;
|
|
1821
|
-
}
|
|
1822
|
-
var ce = Object.assign, ne = 0, ve, g, Te, Me, i, f, R;
|
|
1823
|
-
function N() {
|
|
1824
|
-
}
|
|
1825
|
-
N.__reactDisabledLog = !0;
|
|
1826
|
-
function I() {
|
|
1827
|
-
{
|
|
1828
|
-
if (ne === 0) {
|
|
1829
|
-
ve = console.log, g = console.info, Te = console.warn, Me = console.error, i = console.group, f = console.groupCollapsed, R = console.groupEnd;
|
|
1830
|
-
var r = {
|
|
1831
|
-
configurable: !0,
|
|
1832
|
-
enumerable: !0,
|
|
1833
|
-
value: N,
|
|
1834
|
-
writable: !0
|
|
1835
|
-
};
|
|
1836
|
-
Object.defineProperties(console, {
|
|
1837
|
-
info: r,
|
|
1838
|
-
log: r,
|
|
1839
|
-
warn: r,
|
|
1840
|
-
error: r,
|
|
1841
|
-
group: r,
|
|
1842
|
-
groupCollapsed: r,
|
|
1843
|
-
groupEnd: r
|
|
1844
|
-
});
|
|
1845
|
-
}
|
|
1846
|
-
ne++;
|
|
1847
|
-
}
|
|
1848
|
-
}
|
|
1849
|
-
function W() {
|
|
1850
|
-
{
|
|
1851
|
-
if (ne--, ne === 0) {
|
|
1852
|
-
var r = {
|
|
1853
|
-
configurable: !0,
|
|
1854
|
-
enumerable: !0,
|
|
1855
|
-
writable: !0
|
|
1856
|
-
};
|
|
1857
|
-
Object.defineProperties(console, {
|
|
1858
|
-
log: ce({}, r, {
|
|
1859
|
-
value: ve
|
|
1860
|
-
}),
|
|
1861
|
-
info: ce({}, r, {
|
|
1862
|
-
value: g
|
|
1863
|
-
}),
|
|
1864
|
-
warn: ce({}, r, {
|
|
1865
|
-
value: Te
|
|
1866
|
-
}),
|
|
1867
|
-
error: ce({}, r, {
|
|
1868
|
-
value: Me
|
|
1869
|
-
}),
|
|
1870
|
-
group: ce({}, r, {
|
|
1871
|
-
value: i
|
|
1872
|
-
}),
|
|
1873
|
-
groupCollapsed: ce({}, r, {
|
|
1874
|
-
value: f
|
|
1875
|
-
}),
|
|
1876
|
-
groupEnd: ce({}, r, {
|
|
1877
|
-
value: R
|
|
1878
|
-
})
|
|
1879
|
-
});
|
|
1880
|
-
}
|
|
1881
|
-
ne < 0 && V("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
1882
|
-
}
|
|
1883
|
-
}
|
|
1884
|
-
var G = ue.ReactCurrentDispatcher, j;
|
|
1885
|
-
function k(r, l, m) {
|
|
1886
|
-
{
|
|
1887
|
-
if (j === void 0)
|
|
1888
|
-
try {
|
|
1889
|
-
throw Error();
|
|
1890
|
-
} catch (M) {
|
|
1891
|
-
var v = M.stack.trim().match(/\n( *(at )?)/);
|
|
1892
|
-
j = v && v[1] || "";
|
|
1893
|
-
}
|
|
1894
|
-
return `
|
|
1895
|
-
` + j + r;
|
|
1896
|
-
}
|
|
1897
|
-
}
|
|
1898
|
-
var X = !1, Ce;
|
|
1899
|
-
{
|
|
1900
|
-
var Jt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
1901
|
-
Ce = new Jt();
|
|
1902
|
-
}
|
|
1903
|
-
function ft(r, l) {
|
|
1904
|
-
if (!r || X)
|
|
1905
|
-
return "";
|
|
1906
|
-
{
|
|
1907
|
-
var m = Ce.get(r);
|
|
1908
|
-
if (m !== void 0)
|
|
1909
|
-
return m;
|
|
1910
|
-
}
|
|
1911
|
-
var v;
|
|
1912
|
-
X = !0;
|
|
1913
|
-
var M = Error.prepareStackTrace;
|
|
1914
|
-
Error.prepareStackTrace = void 0;
|
|
1915
|
-
var F;
|
|
1916
|
-
F = G.current, G.current = null, I();
|
|
1917
|
-
try {
|
|
1918
|
-
if (l) {
|
|
1919
|
-
var O = function() {
|
|
1920
|
-
throw Error();
|
|
1921
|
-
};
|
|
1922
|
-
if (Object.defineProperty(O.prototype, "props", {
|
|
1923
|
-
set: function() {
|
|
1924
|
-
throw Error();
|
|
1925
|
-
}
|
|
1926
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
1927
|
-
try {
|
|
1928
|
-
Reflect.construct(O, []);
|
|
1929
|
-
} catch (be) {
|
|
1930
|
-
v = be;
|
|
1931
|
-
}
|
|
1932
|
-
Reflect.construct(r, [], O);
|
|
1933
|
-
} else {
|
|
1934
|
-
try {
|
|
1935
|
-
O.call();
|
|
1936
|
-
} catch (be) {
|
|
1937
|
-
v = be;
|
|
1938
|
-
}
|
|
1939
|
-
r.call(O.prototype);
|
|
1940
|
-
}
|
|
1941
|
-
} else {
|
|
1942
|
-
try {
|
|
1943
|
-
throw Error();
|
|
1944
|
-
} catch (be) {
|
|
1945
|
-
v = be;
|
|
1946
|
-
}
|
|
1947
|
-
r();
|
|
1948
|
-
}
|
|
1949
|
-
} catch (be) {
|
|
1950
|
-
if (be && v && typeof be.stack == "string") {
|
|
1951
|
-
for (var P = be.stack.split(`
|
|
1952
|
-
`), re = v.stack.split(`
|
|
1953
|
-
`), z = P.length - 1, K = re.length - 1; z >= 1 && K >= 0 && P[z] !== re[K]; )
|
|
1954
|
-
K--;
|
|
1955
|
-
for (; z >= 1 && K >= 0; z--, K--)
|
|
1956
|
-
if (P[z] !== re[K]) {
|
|
1957
|
-
if (z !== 1 || K !== 1)
|
|
1958
|
-
do
|
|
1959
|
-
if (z--, K--, K < 0 || P[z] !== re[K]) {
|
|
1960
|
-
var le = `
|
|
1961
|
-
` + P[z].replace(" at new ", " at ");
|
|
1962
|
-
return r.displayName && le.includes("<anonymous>") && (le = le.replace("<anonymous>", r.displayName)), typeof r == "function" && Ce.set(r, le), le;
|
|
1963
|
-
}
|
|
1964
|
-
while (z >= 1 && K >= 0);
|
|
1965
|
-
break;
|
|
1966
|
-
}
|
|
1967
|
-
}
|
|
1968
|
-
} finally {
|
|
1969
|
-
X = !1, G.current = F, W(), Error.prepareStackTrace = M;
|
|
1970
|
-
}
|
|
1971
|
-
var xe = r ? r.displayName || r.name : "", wt = xe ? k(xe) : "";
|
|
1972
|
-
return typeof r == "function" && Ce.set(r, wt), wt;
|
|
1973
|
-
}
|
|
1974
|
-
function Ye(r, l, m) {
|
|
1975
|
-
return ft(r, !1);
|
|
1976
|
-
}
|
|
1977
|
-
function Kt(r) {
|
|
1978
|
-
var l = r.prototype;
|
|
1979
|
-
return !!(l && l.isReactComponent);
|
|
1980
|
-
}
|
|
1981
|
-
function qe(r, l, m) {
|
|
1982
|
-
if (r == null)
|
|
1983
|
-
return "";
|
|
1984
|
-
if (typeof r == "function")
|
|
1985
|
-
return ft(r, Kt(r));
|
|
1986
|
-
if (typeof r == "string")
|
|
1987
|
-
return k(r);
|
|
1988
|
-
switch (r) {
|
|
1989
|
-
case $:
|
|
1990
|
-
return k("Suspense");
|
|
1991
|
-
case S:
|
|
1992
|
-
return k("SuspenseList");
|
|
1993
|
-
}
|
|
1994
|
-
if (typeof r == "object")
|
|
1995
|
-
switch (r.$$typeof) {
|
|
1996
|
-
case C:
|
|
1997
|
-
return Ye(r.render);
|
|
1998
|
-
case U:
|
|
1999
|
-
return qe(r.type, l, m);
|
|
2000
|
-
case Q: {
|
|
2001
|
-
var v = r, M = v._payload, F = v._init;
|
|
2002
|
-
try {
|
|
2003
|
-
return qe(F(M), l, m);
|
|
2004
|
-
} catch {
|
|
2005
|
-
}
|
|
2006
|
-
}
|
|
2007
|
-
}
|
|
2008
|
-
return "";
|
|
2009
|
-
}
|
|
2010
|
-
var Ne = Object.prototype.hasOwnProperty, ke = {}, yt = ue.ReactDebugCurrentFrame;
|
|
2011
|
-
function Fe(r) {
|
|
2012
|
-
if (r) {
|
|
2013
|
-
var l = r._owner, m = qe(r.type, r._source, l ? l.type : null);
|
|
2014
|
-
yt.setExtraStackFrame(m);
|
|
2015
|
-
} else
|
|
2016
|
-
yt.setExtraStackFrame(null);
|
|
2017
|
-
}
|
|
2018
|
-
function Ee(r, l, m, v, M) {
|
|
2019
|
-
{
|
|
2020
|
-
var F = Function.call.bind(Ne);
|
|
2021
|
-
for (var O in r)
|
|
2022
|
-
if (F(r, O)) {
|
|
2023
|
-
var P = void 0;
|
|
2024
|
-
try {
|
|
2025
|
-
if (typeof r[O] != "function") {
|
|
2026
|
-
var re = Error((v || "React class") + ": " + m + " type `" + O + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[O] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
2027
|
-
throw re.name = "Invariant Violation", re;
|
|
2028
|
-
}
|
|
2029
|
-
P = r[O](l, O, v, m, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
2030
|
-
} catch (z) {
|
|
2031
|
-
P = z;
|
|
2032
|
-
}
|
|
2033
|
-
P && !(P instanceof Error) && (Fe(M), V("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", v || "React class", m, O, typeof P), Fe(null)), P instanceof Error && !(P.message in ke) && (ke[P.message] = !0, Fe(M), V("Failed %s type: %s", m, P.message), Fe(null));
|
|
2034
|
-
}
|
|
2035
|
-
}
|
|
2036
|
-
}
|
|
2037
|
-
var Ue = Array.isArray;
|
|
2038
|
-
function He(r) {
|
|
2039
|
-
return Ue(r);
|
|
2040
|
-
}
|
|
2041
|
-
function mt(r) {
|
|
2042
|
-
{
|
|
2043
|
-
var l = typeof Symbol == "function" && Symbol.toStringTag, m = l && r[Symbol.toStringTag] || r.constructor.name || "Object";
|
|
2044
|
-
return m;
|
|
2045
|
-
}
|
|
2046
|
-
}
|
|
2047
|
-
function ht(r) {
|
|
2048
|
-
try {
|
|
2049
|
-
return ze(r), !1;
|
|
2050
|
-
} catch {
|
|
2051
|
-
return !0;
|
|
2052
|
-
}
|
|
2053
|
-
}
|
|
2054
|
-
function ze(r) {
|
|
2055
|
-
return "" + r;
|
|
2056
|
-
}
|
|
2057
|
-
function it(r) {
|
|
2058
|
-
if (ht(r))
|
|
2059
|
-
return V("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", mt(r)), ze(r);
|
|
2060
|
-
}
|
|
2061
|
-
var Se = ue.ReactCurrentOwner, Zt = {
|
|
2062
|
-
key: !0,
|
|
2063
|
-
ref: !0,
|
|
2064
|
-
__self: !0,
|
|
2065
|
-
__source: !0
|
|
2066
|
-
}, vt, bt, je;
|
|
2067
|
-
je = {};
|
|
2068
|
-
function Xt(r) {
|
|
2069
|
-
if (Ne.call(r, "ref")) {
|
|
2070
|
-
var l = Object.getOwnPropertyDescriptor(r, "ref").get;
|
|
2071
|
-
if (l && l.isReactWarning)
|
|
2072
|
-
return !1;
|
|
2073
|
-
}
|
|
2074
|
-
return r.ref !== void 0;
|
|
2075
|
-
}
|
|
2076
|
-
function Qt(r) {
|
|
2077
|
-
if (Ne.call(r, "key")) {
|
|
2078
|
-
var l = Object.getOwnPropertyDescriptor(r, "key").get;
|
|
2079
|
-
if (l && l.isReactWarning)
|
|
2080
|
-
return !1;
|
|
2081
|
-
}
|
|
2082
|
-
return r.key !== void 0;
|
|
2083
|
-
}
|
|
2084
|
-
function en(r, l) {
|
|
2085
|
-
if (typeof r.ref == "string" && Se.current && l && Se.current.stateNode !== l) {
|
|
2086
|
-
var m = oe(Se.current.type);
|
|
2087
|
-
je[m] || (V('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', oe(Se.current.type), r.ref), je[m] = !0);
|
|
2088
|
-
}
|
|
2089
|
-
}
|
|
2090
|
-
function Ae(r, l) {
|
|
2091
|
-
{
|
|
2092
|
-
var m = function() {
|
|
2093
|
-
vt || (vt = !0, V("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", l));
|
|
2094
|
-
};
|
|
2095
|
-
m.isReactWarning = !0, Object.defineProperty(r, "key", {
|
|
2096
|
-
get: m,
|
|
2097
|
-
configurable: !0
|
|
2098
|
-
});
|
|
2099
|
-
}
|
|
2100
|
-
}
|
|
2101
|
-
function gt(r, l) {
|
|
2102
|
-
{
|
|
2103
|
-
var m = function() {
|
|
2104
|
-
bt || (bt = !0, V("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", l));
|
|
2105
|
-
};
|
|
2106
|
-
m.isReactWarning = !0, Object.defineProperty(r, "ref", {
|
|
2107
|
-
get: m,
|
|
2108
|
-
configurable: !0
|
|
2109
|
-
});
|
|
2110
|
-
}
|
|
2111
|
-
}
|
|
2112
|
-
var tn = function(r, l, m, v, M, F, O) {
|
|
2113
|
-
var P = {
|
|
2114
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
2115
|
-
$$typeof: a,
|
|
2116
|
-
// Built-in properties that belong on the element
|
|
2117
|
-
type: r,
|
|
2118
|
-
key: l,
|
|
2119
|
-
ref: m,
|
|
2120
|
-
props: O,
|
|
2121
|
-
// Record the component responsible for creating this element.
|
|
2122
|
-
_owner: F
|
|
2123
|
-
};
|
|
2124
|
-
return P._store = {}, Object.defineProperty(P._store, "validated", {
|
|
2125
|
-
configurable: !1,
|
|
2126
|
-
enumerable: !1,
|
|
2127
|
-
writable: !0,
|
|
2128
|
-
value: !1
|
|
2129
|
-
}), Object.defineProperty(P, "_self", {
|
|
2130
|
-
configurable: !1,
|
|
2131
|
-
enumerable: !1,
|
|
2132
|
-
writable: !1,
|
|
2133
|
-
value: v
|
|
2134
|
-
}), Object.defineProperty(P, "_source", {
|
|
2135
|
-
configurable: !1,
|
|
2136
|
-
enumerable: !1,
|
|
2137
|
-
writable: !1,
|
|
2138
|
-
value: M
|
|
2139
|
-
}), Object.freeze && (Object.freeze(P.props), Object.freeze(P)), P;
|
|
2140
|
-
};
|
|
2141
|
-
function nn(r, l, m, v, M) {
|
|
2142
|
-
{
|
|
2143
|
-
var F, O = {}, P = null, re = null;
|
|
2144
|
-
m !== void 0 && (it(m), P = "" + m), Qt(l) && (it(l.key), P = "" + l.key), Xt(l) && (re = l.ref, en(l, M));
|
|
2145
|
-
for (F in l)
|
|
2146
|
-
Ne.call(l, F) && !Zt.hasOwnProperty(F) && (O[F] = l[F]);
|
|
2147
|
-
if (r && r.defaultProps) {
|
|
2148
|
-
var z = r.defaultProps;
|
|
2149
|
-
for (F in z)
|
|
2150
|
-
O[F] === void 0 && (O[F] = z[F]);
|
|
2151
|
-
}
|
|
2152
|
-
if (P || re) {
|
|
2153
|
-
var K = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
|
|
2154
|
-
P && Ae(O, K), re && gt(O, K);
|
|
2155
|
-
}
|
|
2156
|
-
return tn(r, P, re, M, v, Se.current, O);
|
|
2157
|
-
}
|
|
2158
|
-
}
|
|
2159
|
-
var Je = ue.ReactCurrentOwner, Tt = ue.ReactDebugCurrentFrame;
|
|
2160
|
-
function we(r) {
|
|
2161
|
-
if (r) {
|
|
2162
|
-
var l = r._owner, m = qe(r.type, r._source, l ? l.type : null);
|
|
2163
|
-
Tt.setExtraStackFrame(m);
|
|
2164
|
-
} else
|
|
2165
|
-
Tt.setExtraStackFrame(null);
|
|
2166
|
-
}
|
|
2167
|
-
var Le;
|
|
2168
|
-
Le = !1;
|
|
2169
|
-
function Pe(r) {
|
|
2170
|
-
return typeof r == "object" && r !== null && r.$$typeof === a;
|
|
2171
|
-
}
|
|
2172
|
-
function $e() {
|
|
2173
|
-
{
|
|
2174
|
-
if (Je.current) {
|
|
2175
|
-
var r = oe(Je.current.type);
|
|
2176
|
-
if (r)
|
|
2177
|
-
return `
|
|
2178
|
-
|
|
2179
|
-
Check the render method of \`` + r + "`.";
|
|
2180
|
-
}
|
|
2181
|
-
return "";
|
|
2182
|
-
}
|
|
2183
|
-
}
|
|
2184
|
-
function rn(r) {
|
|
2185
|
-
{
|
|
2186
|
-
if (r !== void 0) {
|
|
2187
|
-
var l = r.fileName.replace(/^.*[\\\/]/, ""), m = r.lineNumber;
|
|
2188
|
-
return `
|
|
2189
|
-
|
|
2190
|
-
Check your code at ` + l + ":" + m + ".";
|
|
2191
|
-
}
|
|
2192
|
-
return "";
|
|
2193
|
-
}
|
|
2194
|
-
}
|
|
2195
|
-
var Et = {};
|
|
2196
|
-
function an(r) {
|
|
2197
|
-
{
|
|
2198
|
-
var l = $e();
|
|
2199
|
-
if (!l) {
|
|
2200
|
-
var m = typeof r == "string" ? r : r.displayName || r.name;
|
|
2201
|
-
m && (l = `
|
|
2202
|
-
|
|
2203
|
-
Check the top-level render call using <` + m + ">.");
|
|
2204
|
-
}
|
|
2205
|
-
return l;
|
|
2206
|
-
}
|
|
2207
|
-
}
|
|
2208
|
-
function _t(r, l) {
|
|
2209
|
-
{
|
|
2210
|
-
if (!r._store || r._store.validated || r.key != null)
|
|
2211
|
-
return;
|
|
2212
|
-
r._store.validated = !0;
|
|
2213
|
-
var m = an(l);
|
|
2214
|
-
if (Et[m])
|
|
2215
|
-
return;
|
|
2216
|
-
Et[m] = !0;
|
|
2217
|
-
var v = "";
|
|
2218
|
-
r && r._owner && r._owner !== Je.current && (v = " It was passed a child from " + oe(r._owner.type) + "."), we(r), V('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', m, v), we(null);
|
|
2219
|
-
}
|
|
2220
|
-
}
|
|
2221
|
-
function Rt(r, l) {
|
|
2222
|
-
{
|
|
2223
|
-
if (typeof r != "object")
|
|
2224
|
-
return;
|
|
2225
|
-
if (He(r))
|
|
2226
|
-
for (var m = 0; m < r.length; m++) {
|
|
2227
|
-
var v = r[m];
|
|
2228
|
-
Pe(v) && _t(v, l);
|
|
2229
|
-
}
|
|
2230
|
-
else if (Pe(r))
|
|
2231
|
-
r._store && (r._store.validated = !0);
|
|
2232
|
-
else if (r) {
|
|
2233
|
-
var M = B(r);
|
|
2234
|
-
if (typeof M == "function" && M !== r.entries)
|
|
2235
|
-
for (var F = M.call(r), O; !(O = F.next()).done; )
|
|
2236
|
-
Pe(O.value) && _t(O.value, l);
|
|
2237
|
-
}
|
|
2238
|
-
}
|
|
2239
|
-
}
|
|
2240
|
-
function Be(r) {
|
|
2241
|
-
{
|
|
2242
|
-
var l = r.type;
|
|
2243
|
-
if (l == null || typeof l == "string")
|
|
2244
|
-
return;
|
|
2245
|
-
var m;
|
|
2246
|
-
if (typeof l == "function")
|
|
2247
|
-
m = l.propTypes;
|
|
2248
|
-
else if (typeof l == "object" && (l.$$typeof === C || // Note: Memo only checks outer props here.
|
|
2249
|
-
// Inner props are checked in the reconciler.
|
|
2250
|
-
l.$$typeof === U))
|
|
2251
|
-
m = l.propTypes;
|
|
2252
|
-
else
|
|
2253
|
-
return;
|
|
2254
|
-
if (m) {
|
|
2255
|
-
var v = oe(l);
|
|
2256
|
-
Ee(m, r.props, "prop", v, r);
|
|
2257
|
-
} else if (l.PropTypes !== void 0 && !Le) {
|
|
2258
|
-
Le = !0;
|
|
2259
|
-
var M = oe(l);
|
|
2260
|
-
V("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", M || "Unknown");
|
|
2261
|
-
}
|
|
2262
|
-
typeof l.getDefaultProps == "function" && !l.getDefaultProps.isReactClassApproved && V("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
2263
|
-
}
|
|
2264
|
-
}
|
|
2265
|
-
function st(r) {
|
|
2266
|
-
{
|
|
2267
|
-
for (var l = Object.keys(r.props), m = 0; m < l.length; m++) {
|
|
2268
|
-
var v = l[m];
|
|
2269
|
-
if (v !== "children" && v !== "key") {
|
|
2270
|
-
we(r), V("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", v), we(null);
|
|
2271
|
-
break;
|
|
2272
|
-
}
|
|
2273
|
-
}
|
|
2274
|
-
r.ref !== null && (we(r), V("Invalid attribute `ref` supplied to `React.Fragment`."), we(null));
|
|
2275
|
-
}
|
|
2276
|
-
}
|
|
2277
|
-
function ot(r, l, m, v, M, F) {
|
|
2278
|
-
{
|
|
2279
|
-
var O = Oe(r);
|
|
2280
|
-
if (!O) {
|
|
2281
|
-
var P = "";
|
|
2282
|
-
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (P += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
2283
|
-
var re = rn(M);
|
|
2284
|
-
re ? P += re : P += $e();
|
|
2285
|
-
var z;
|
|
2286
|
-
r === null ? z = "null" : He(r) ? z = "array" : r !== void 0 && r.$$typeof === a ? (z = "<" + (oe(r.type) || "Unknown") + " />", P = " Did you accidentally export a JSX literal instead of a component?") : z = typeof r, V("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", z, P);
|
|
2287
|
-
}
|
|
2288
|
-
var K = nn(r, l, m, M, F);
|
|
2289
|
-
if (K == null)
|
|
2290
|
-
return K;
|
|
2291
|
-
if (O) {
|
|
2292
|
-
var le = l.children;
|
|
2293
|
-
if (le !== void 0)
|
|
2294
|
-
if (v)
|
|
2295
|
-
if (He(le)) {
|
|
2296
|
-
for (var xe = 0; xe < le.length; xe++)
|
|
2297
|
-
Rt(le[xe], r);
|
|
2298
|
-
Object.freeze && Object.freeze(le);
|
|
2299
|
-
} else
|
|
2300
|
-
V("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
2301
|
-
else
|
|
2302
|
-
Rt(le, r);
|
|
2303
|
-
}
|
|
2304
|
-
return r === c ? st(K) : Be(K), K;
|
|
2305
|
-
}
|
|
2306
|
-
}
|
|
2307
|
-
function sn(r, l, m) {
|
|
2308
|
-
return ot(r, l, m, !0);
|
|
2309
|
-
}
|
|
2310
|
-
function on(r, l, m) {
|
|
2311
|
-
return ot(r, l, m, !1);
|
|
2312
|
-
}
|
|
2313
|
-
var un = on, cn = sn;
|
|
2314
|
-
lt.Fragment = c, lt.jsx = un, lt.jsxs = cn;
|
|
2315
|
-
}()), lt;
|
|
2316
|
-
}
|
|
2317
|
-
process.env.NODE_ENV === "production" ? Tn.exports = ca() : Tn.exports = la();
|
|
2318
|
-
var _e = Tn.exports;
|
|
2319
|
-
function pa({
|
|
2320
|
-
color: t = "text-primary",
|
|
2321
|
-
size: a = "sm",
|
|
2322
|
-
className: u
|
|
2323
|
-
}) {
|
|
2324
|
-
return /* @__PURE__ */ _e.jsx(
|
|
2325
|
-
"div",
|
|
2326
|
-
{
|
|
2327
|
-
className: [
|
|
2328
|
-
"spinner-border",
|
|
2329
|
-
t,
|
|
2330
|
-
a === "sm" ? "spinner-border-sm" : "",
|
|
2331
|
-
u || ""
|
|
2332
|
-
].join(" "),
|
|
2333
|
-
role: "status",
|
|
2334
|
-
children: /* @__PURE__ */ _e.jsx("span", { className: "visually-hidden", children: "Loading..." })
|
|
2335
|
-
}
|
|
2336
|
-
);
|
|
2337
|
-
}
|
|
2338
|
-
const da = ({
|
|
2339
|
-
primary: t = !0,
|
|
2340
|
-
size: a = "medium",
|
|
2341
|
-
children: u,
|
|
2342
|
-
isLoading: c,
|
|
2343
|
-
...p
|
|
2344
|
-
}) => /* @__PURE__ */ _e.jsxs(
|
|
2345
|
-
"button",
|
|
2346
|
-
{
|
|
2347
|
-
type: "button",
|
|
2348
|
-
className: [
|
|
2349
|
-
"btn",
|
|
2350
|
-
a === "small" ? "btn-sm" : "",
|
|
2351
|
-
a === "large" ? "btn-lg" : "",
|
|
2352
|
-
t ? "btn-primary" : "btn-secondary"
|
|
2353
|
-
].join(" "),
|
|
2354
|
-
...p,
|
|
2355
|
-
children: [
|
|
2356
|
-
u,
|
|
2357
|
-
c && /* @__PURE__ */ _e.jsx(pa, { color: "text-light", className: "ms-2" })
|
|
2358
|
-
]
|
|
2359
|
-
}
|
|
2360
|
-
);
|
|
2361
|
-
function fa({
|
|
2362
|
-
text: t,
|
|
2363
|
-
withFormatting: a = !0
|
|
2364
|
-
}) {
|
|
2365
|
-
const u = t && a ? JSON.stringify(t, null, 2) : t;
|
|
2366
|
-
return t == null ? null : /* @__PURE__ */ _e.jsx("pre", { className: "card my-3 code-block--max-height", children: /* @__PURE__ */ _e.jsx("code", { className: "card-body", children: u }) });
|
|
2367
|
-
}
|
|
2368
|
-
var pt = Rn();
|
|
2369
|
-
function ya(t, a = [], u = !0) {
|
|
2370
|
-
const [c, p] = pt.useState(null), [h, E] = pt.useState(null), [A, C] = pt.useState(!1), $ = pt.useCallback(async () => {
|
|
2371
|
-
C(!0), E(null), p(null);
|
|
2372
|
-
try {
|
|
2373
|
-
const S = await t();
|
|
2374
|
-
p(S);
|
|
2375
|
-
} catch (S) {
|
|
2376
|
-
console.error(S);
|
|
2377
|
-
const U = Ve(S);
|
|
2378
|
-
E(U);
|
|
2379
|
-
} finally {
|
|
2380
|
-
C(!1);
|
|
2381
|
-
}
|
|
2382
|
-
}, [t, ...a]);
|
|
2383
|
-
return pt.useEffect(() => {
|
|
2384
|
-
u && $();
|
|
2385
|
-
}, [u, $, ...a]), { data: c, error: h, isLoading: A, refetch: $ };
|
|
2386
|
-
}
|
|
2387
|
-
const ma = 2e-4;
|
|
2388
|
-
async function ha({
|
|
2389
|
-
env: t,
|
|
2390
|
-
chainId: a = y.ethereum,
|
|
2391
|
-
amount: u = 1
|
|
199
|
+
const We = 2e-4;
|
|
200
|
+
async function Jt({
|
|
201
|
+
env: e,
|
|
202
|
+
chainId: t = a.ethereum,
|
|
203
|
+
amount: n = 1
|
|
2392
204
|
}) {
|
|
2393
|
-
const { baseApiUrl:
|
|
2394
|
-
`api/v1/exchange/rate/${
|
|
2395
|
-
{ baseURL:
|
|
2396
|
-
),
|
|
2397
|
-
return { exchangeRate: +
|
|
2398
|
-
}
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
chainId: y.ethereum
|
|
2404
|
-
}
|
|
2405
|
-
};
|
|
2406
|
-
function Ti(t) {
|
|
2407
|
-
const { data: a, error: u, isLoading: c, refetch: p } = ya(
|
|
2408
|
-
() => ha(t),
|
|
2409
|
-
[t],
|
|
2410
|
-
!1
|
|
2411
|
-
);
|
|
2412
|
-
return /* @__PURE__ */ _e.jsxs(_e.Fragment, { children: [
|
|
2413
|
-
/* @__PURE__ */ _e.jsx(da, { onClick: p, disabled: c, isLoading: c, children: "Get LBTC Exchange Rate" }),
|
|
2414
|
-
/* @__PURE__ */ _e.jsx(fa, { text: u || a })
|
|
2415
|
-
] });
|
|
2416
|
-
}
|
|
2417
|
-
async function Ei({
|
|
2418
|
-
address: t,
|
|
2419
|
-
chainId: a,
|
|
2420
|
-
env: u
|
|
205
|
+
const { baseApiUrl: s } = C(e), i = K(t), { data: r } = await R.get(
|
|
206
|
+
`api/v1/exchange/rate/${i}`,
|
|
207
|
+
{ baseURL: s, params: { amount: n } }
|
|
208
|
+
), p = new v(We).multipliedBy(Y).toFixed();
|
|
209
|
+
return { exchangeRate: +r.amount_out, minAmount: +p };
|
|
210
|
+
}
|
|
211
|
+
async function jt({
|
|
212
|
+
address: e,
|
|
213
|
+
chainId: t,
|
|
214
|
+
env: n
|
|
2421
215
|
}) {
|
|
2422
|
-
const { claimerApiUrl:
|
|
216
|
+
const { claimerApiUrl: s } = C(n);
|
|
2423
217
|
try {
|
|
2424
|
-
const { data:
|
|
2425
|
-
`${
|
|
218
|
+
const { data: i } = await R.get(
|
|
219
|
+
`${s}/claimer/v1/mintwithfee/get-user-signature`,
|
|
2426
220
|
{
|
|
2427
221
|
params: {
|
|
2428
|
-
user_destination_address:
|
|
2429
|
-
chain_id:
|
|
222
|
+
user_destination_address: e,
|
|
223
|
+
chain_id: t
|
|
2430
224
|
}
|
|
2431
225
|
}
|
|
2432
226
|
);
|
|
2433
227
|
return {
|
|
2434
|
-
expirationDate:
|
|
2435
|
-
hasSignature:
|
|
2436
|
-
isDelayed:
|
|
228
|
+
expirationDate: i == null ? void 0 : i.expiration_date,
|
|
229
|
+
hasSignature: i == null ? void 0 : i.has_signature,
|
|
230
|
+
isDelayed: i == null ? void 0 : i.is_delayed
|
|
2437
231
|
};
|
|
2438
|
-
} catch (
|
|
2439
|
-
const
|
|
2440
|
-
throw new Error(
|
|
232
|
+
} catch (i) {
|
|
233
|
+
const r = S(i);
|
|
234
|
+
throw new Error(r);
|
|
2441
235
|
}
|
|
2442
236
|
}
|
|
2443
|
-
async function
|
|
2444
|
-
signature:
|
|
2445
|
-
typedData:
|
|
2446
|
-
address:
|
|
2447
|
-
env:
|
|
237
|
+
async function qt({
|
|
238
|
+
signature: e,
|
|
239
|
+
typedData: t,
|
|
240
|
+
address: n,
|
|
241
|
+
env: s
|
|
2448
242
|
}) {
|
|
2449
|
-
const { claimerApiUrl:
|
|
243
|
+
const { claimerApiUrl: i } = C(s);
|
|
2450
244
|
try {
|
|
2451
|
-
const { data:
|
|
2452
|
-
`${
|
|
245
|
+
const { data: r } = await R.post(
|
|
246
|
+
`${i}/claimer/v1/mintwithfee/save-user-signature`,
|
|
2453
247
|
null,
|
|
2454
248
|
{
|
|
2455
249
|
params: {
|
|
2456
|
-
typed_data:
|
|
2457
|
-
signature:
|
|
2458
|
-
user_destination_address:
|
|
250
|
+
typed_data: t,
|
|
251
|
+
signature: e,
|
|
252
|
+
user_destination_address: n
|
|
2459
253
|
}
|
|
2460
254
|
}
|
|
2461
255
|
);
|
|
2462
|
-
return
|
|
2463
|
-
} catch (
|
|
2464
|
-
const
|
|
2465
|
-
throw new Error(
|
|
256
|
+
return r.status;
|
|
257
|
+
} catch (r) {
|
|
258
|
+
const p = S(r);
|
|
259
|
+
throw new Error(p);
|
|
2466
260
|
}
|
|
2467
261
|
}
|
|
2468
|
-
const
|
|
2469
|
-
[
|
|
2470
|
-
[
|
|
2471
|
-
[
|
|
2472
|
-
[
|
|
2473
|
-
[
|
|
2474
|
-
[
|
|
262
|
+
const N = {
|
|
263
|
+
[a.ethereum]: "https://rpc.ankr.com/eth",
|
|
264
|
+
[a.holesky]: "https://rpc.ankr.com/eth_holesky",
|
|
265
|
+
[a.sepolia]: "https://rpc.ankr.com/eth_sepolia",
|
|
266
|
+
[a.base]: "https://rpc.ankr.com/base",
|
|
267
|
+
[a.baseTestnet]: "https://rpc.ankr.com/base_sepolia",
|
|
268
|
+
[a.binanceSmartChain]: "https://rpc.ankr.com/bsc"
|
|
2475
269
|
};
|
|
2476
|
-
async function
|
|
2477
|
-
const
|
|
270
|
+
async function Ve(e) {
|
|
271
|
+
const n = await (await fetch(e, {
|
|
2478
272
|
method: "POST",
|
|
2479
273
|
headers: {
|
|
2480
274
|
"Content-Type": "application/json"
|
|
@@ -2485,15 +279,15 @@ async function va(t) {
|
|
|
2485
279
|
method: "eth_maxPriorityFeePerGas",
|
|
2486
280
|
params: []
|
|
2487
281
|
})
|
|
2488
|
-
})).json(),
|
|
2489
|
-
return new
|
|
2490
|
-
}
|
|
2491
|
-
const
|
|
2492
|
-
class
|
|
2493
|
-
constructor({ chainId:
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
this.chainId =
|
|
282
|
+
})).json(), s = ye.utils.hexToNumber(n == null ? void 0 : n.result);
|
|
283
|
+
return new v(Number(s));
|
|
284
|
+
}
|
|
285
|
+
const $e = 2, He = 25e3;
|
|
286
|
+
class q {
|
|
287
|
+
constructor({ chainId: t, rpcUrlConfig: n }) {
|
|
288
|
+
A(this, "chainId");
|
|
289
|
+
A(this, "rpcConfig");
|
|
290
|
+
this.chainId = t, this.rpcConfig = { ...N, ...n };
|
|
2497
291
|
}
|
|
2498
292
|
/**
|
|
2499
293
|
* Returns web3 instance for read operations.
|
|
@@ -2502,8 +296,8 @@ class zt {
|
|
|
2502
296
|
* @returns {Web3} Web3 instance.
|
|
2503
297
|
*/
|
|
2504
298
|
getReadWeb3() {
|
|
2505
|
-
const
|
|
2506
|
-
return
|
|
299
|
+
const t = this.getRpcUrl(), n = new re(), s = new re.providers.HttpProvider(t);
|
|
300
|
+
return n.setProvider(s), n;
|
|
2507
301
|
}
|
|
2508
302
|
/**
|
|
2509
303
|
* Retrieves the RPC URL based on the current chain ID.
|
|
@@ -2511,13 +305,13 @@ class zt {
|
|
|
2511
305
|
* @throws Error if the RPC URL for the current chain ID is not found.
|
|
2512
306
|
*/
|
|
2513
307
|
getRpcUrl() {
|
|
2514
|
-
var
|
|
2515
|
-
const { chainId:
|
|
2516
|
-
if (!
|
|
308
|
+
var s;
|
|
309
|
+
const { chainId: t } = this, n = (s = this.rpcConfig) == null ? void 0 : s[t];
|
|
310
|
+
if (!n)
|
|
2517
311
|
throw console.error(
|
|
2518
|
-
`You might need to add the rpcConfig for the ${
|
|
2519
|
-
), new Error(`RPC URL for chainId ${
|
|
2520
|
-
return
|
|
312
|
+
`You might need to add the rpcConfig for the ${t} chain ID when creating the provider.`
|
|
313
|
+
), new Error(`RPC URL for chainId ${t} not found`);
|
|
314
|
+
return n;
|
|
2521
315
|
}
|
|
2522
316
|
/**
|
|
2523
317
|
* Calculates max fees for transaction. Thess values are available for networks
|
|
@@ -2528,13 +322,13 @@ class zt {
|
|
|
2528
322
|
* @returns {Promise<IGetMaxFeesResult>} Max fees for transaction.
|
|
2529
323
|
*/
|
|
2530
324
|
async getMaxFees() {
|
|
2531
|
-
const
|
|
2532
|
-
|
|
2533
|
-
|
|
325
|
+
const t = this.getReadWeb3(), n = this.getRpcUrl(), [s, i] = await Promise.all([
|
|
326
|
+
t.eth.getBlock("latest"),
|
|
327
|
+
Ve(n)
|
|
2534
328
|
]);
|
|
2535
|
-
return !(
|
|
2536
|
-
maxFeePerGas: +new
|
|
2537
|
-
maxPriorityFeePerGas: +
|
|
329
|
+
return !(s != null && s.baseFeePerGas) && typeof (s == null ? void 0 : s.baseFeePerGas) != "bigint" ? {} : {
|
|
330
|
+
maxFeePerGas: +new v(s.baseFeePerGas.toString(10)).multipliedBy($e).plus(i),
|
|
331
|
+
maxPriorityFeePerGas: +i
|
|
2538
332
|
};
|
|
2539
333
|
}
|
|
2540
334
|
/**
|
|
@@ -2544,9 +338,9 @@ class zt {
|
|
|
2544
338
|
* @returns {Promise<BigNumber>} Safe gas price.
|
|
2545
339
|
*/
|
|
2546
340
|
async getSafeGasPriceWei() {
|
|
2547
|
-
const
|
|
2548
|
-
return new
|
|
2549
|
-
|
|
341
|
+
const t = await this.getReadWeb3().eth.getGasPrice();
|
|
342
|
+
return new v(t.toString(10)).plus(
|
|
343
|
+
He
|
|
2550
344
|
);
|
|
2551
345
|
}
|
|
2552
346
|
/**
|
|
@@ -2557,18 +351,18 @@ class zt {
|
|
|
2557
351
|
* @param {string} address - The address of the contract.
|
|
2558
352
|
* @returns {Contract<AbiType>} The contract instance.
|
|
2559
353
|
*/
|
|
2560
|
-
createContract(
|
|
2561
|
-
const
|
|
2562
|
-
return new
|
|
354
|
+
createContract(t, n) {
|
|
355
|
+
const s = this.getReadWeb3();
|
|
356
|
+
return new s.eth.Contract(t, n);
|
|
2563
357
|
}
|
|
2564
358
|
}
|
|
2565
|
-
class
|
|
2566
|
-
constructor({ provider:
|
|
2567
|
-
super({ chainId:
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
this.web3 = new
|
|
359
|
+
class I extends q {
|
|
360
|
+
constructor({ provider: n, account: s, chainId: i, rpcUrlConfig: r }) {
|
|
361
|
+
super({ chainId: i, rpcUrlConfig: r });
|
|
362
|
+
A(this, "web3");
|
|
363
|
+
A(this, "account");
|
|
364
|
+
A(this, "rpcConfig", N);
|
|
365
|
+
this.web3 = new ye(n), this.account = s, this.chainId = i, this.rpcConfig = { ...N, ...r };
|
|
2572
366
|
}
|
|
2573
367
|
/**
|
|
2574
368
|
* Signs a message using the current provider and account.
|
|
@@ -2576,11 +370,11 @@ class rt extends zt {
|
|
|
2576
370
|
* @param message - The message to be signed.
|
|
2577
371
|
* @returns A promise that resolves to the signed message as a string.
|
|
2578
372
|
*/
|
|
2579
|
-
async signMessage(
|
|
2580
|
-
const { account:
|
|
373
|
+
async signMessage(n) {
|
|
374
|
+
const { account: s } = this, i = `0x${Buffer.from(n, "utf8").toString("hex")}`;
|
|
2581
375
|
return this.web3.currentProvider.request({
|
|
2582
376
|
method: "personal_sign",
|
|
2583
|
-
params: [
|
|
377
|
+
params: [i, s]
|
|
2584
378
|
});
|
|
2585
379
|
}
|
|
2586
380
|
/**
|
|
@@ -2592,119 +386,119 @@ class rt extends zt {
|
|
|
2592
386
|
* @param {ISendOptions} sendOptions - Options for sending transaction.
|
|
2593
387
|
* @returns {Promise<IWeb3SendResult>} Promise with transaction hash and receipt promise.
|
|
2594
388
|
*/
|
|
2595
|
-
async sendTransactionAsync(
|
|
2596
|
-
const { chainId:
|
|
2597
|
-
data:
|
|
2598
|
-
estimate:
|
|
2599
|
-
estimateFee:
|
|
2600
|
-
extendedGasLimit:
|
|
2601
|
-
gasLimit:
|
|
2602
|
-
value:
|
|
2603
|
-
gasLimitMultiplier:
|
|
2604
|
-
} =
|
|
2605
|
-
let { nonce:
|
|
2606
|
-
|
|
2607
|
-
const
|
|
2608
|
-
from:
|
|
2609
|
-
to:
|
|
2610
|
-
value:
|
|
2611
|
-
data:
|
|
2612
|
-
nonce:
|
|
2613
|
-
chainId:
|
|
389
|
+
async sendTransactionAsync(n, s, i) {
|
|
390
|
+
const { chainId: r, web3: p } = this, u = this.getReadWeb3(), {
|
|
391
|
+
data: d,
|
|
392
|
+
estimate: h = !1,
|
|
393
|
+
estimateFee: l = !1,
|
|
394
|
+
extendedGasLimit: g,
|
|
395
|
+
gasLimit: x = "0",
|
|
396
|
+
value: fe = "0",
|
|
397
|
+
gasLimitMultiplier: Te = 1
|
|
398
|
+
} = i;
|
|
399
|
+
let { nonce: D } = i;
|
|
400
|
+
D || (D = await u.eth.getTransactionCount(n)), console.log(`Nonce: ${D}`);
|
|
401
|
+
const y = {
|
|
402
|
+
from: n,
|
|
403
|
+
to: s,
|
|
404
|
+
value: w.numberToHex(fe),
|
|
405
|
+
data: d,
|
|
406
|
+
nonce: D,
|
|
407
|
+
chainId: w.numberToHex(r)
|
|
2614
408
|
};
|
|
2615
|
-
if (
|
|
409
|
+
if (h)
|
|
2616
410
|
try {
|
|
2617
|
-
const
|
|
2618
|
-
Number(
|
|
411
|
+
const T = await u.eth.estimateGas(y), M = Math.round(
|
|
412
|
+
Number(T) * Te
|
|
2619
413
|
);
|
|
2620
|
-
|
|
2621
|
-
} catch (
|
|
414
|
+
g ? y.gas = w.numberToHex(M + g) : y.gas = w.numberToHex(M);
|
|
415
|
+
} catch (T) {
|
|
2622
416
|
throw new Error(
|
|
2623
|
-
|
|
417
|
+
T.message ?? "Failed to estimate gas limit for transaction."
|
|
2624
418
|
);
|
|
2625
419
|
}
|
|
2626
420
|
else
|
|
2627
|
-
|
|
2628
|
-
const { maxFeePerGas:
|
|
2629
|
-
if (
|
|
2630
|
-
const
|
|
2631
|
-
|
|
421
|
+
y.gas = w.numberToHex(x);
|
|
422
|
+
const { maxFeePerGas: ne, maxPriorityFeePerGas: ae } = l ? await this.getMaxFees().catch(() => i) : i;
|
|
423
|
+
if (ae !== void 0 && (y.maxPriorityFeePerGas = w.numberToHex(ae)), ne !== void 0 && (y.maxFeePerGas = w.numberToHex(ne)), !y.maxFeePerGas && !y.maxPriorityFeePerGas) {
|
|
424
|
+
const T = await this.getSafeGasPriceWei();
|
|
425
|
+
y.gasPrice = T.toString(10);
|
|
2632
426
|
}
|
|
2633
|
-
if (!
|
|
2634
|
-
const
|
|
2635
|
-
|
|
427
|
+
if (!y.maxFeePerGas && !y.maxPriorityFeePerGas) {
|
|
428
|
+
const T = await this.getSafeGasPriceWei();
|
|
429
|
+
y.gasPrice = T.toString(10);
|
|
2636
430
|
}
|
|
2637
|
-
return console.log("Sending transaction via Web3: ",
|
|
2638
|
-
const
|
|
2639
|
-
|
|
2640
|
-
console.log(`Just signed transaction has is: ${
|
|
2641
|
-
receiptPromise:
|
|
2642
|
-
transactionHash:
|
|
431
|
+
return console.log("Sending transaction via Web3: ", y), new Promise((T, M) => {
|
|
432
|
+
const se = p.eth.sendTransaction(y);
|
|
433
|
+
se.once("transactionHash", async (ie) => {
|
|
434
|
+
console.log(`Just signed transaction has is: ${ie}`), T({
|
|
435
|
+
receiptPromise: se,
|
|
436
|
+
transactionHash: ie
|
|
2643
437
|
});
|
|
2644
|
-
}).catch(
|
|
438
|
+
}).catch(M);
|
|
2645
439
|
});
|
|
2646
440
|
}
|
|
2647
|
-
createContract(
|
|
2648
|
-
return new this.web3.eth.Contract(
|
|
441
|
+
createContract(n, s) {
|
|
442
|
+
return new this.web3.eth.Contract(n, s);
|
|
2649
443
|
}
|
|
2650
444
|
}
|
|
2651
|
-
function
|
|
2652
|
-
switch (
|
|
2653
|
-
case
|
|
445
|
+
function Q(e) {
|
|
446
|
+
switch (e) {
|
|
447
|
+
case a.ethereum:
|
|
2654
448
|
return 1.3;
|
|
2655
|
-
case
|
|
2656
|
-
case
|
|
449
|
+
case a.holesky:
|
|
450
|
+
case a.sepolia:
|
|
2657
451
|
return 1.5;
|
|
2658
452
|
default:
|
|
2659
453
|
return 1.3;
|
|
2660
454
|
}
|
|
2661
455
|
}
|
|
2662
|
-
function
|
|
2663
|
-
return Object.values(
|
|
456
|
+
function ee(e) {
|
|
457
|
+
return Object.values(a).includes(e);
|
|
2664
458
|
}
|
|
2665
|
-
const
|
|
2666
|
-
[
|
|
2667
|
-
[
|
|
2668
|
-
[
|
|
2669
|
-
[
|
|
2670
|
-
[
|
|
2671
|
-
[
|
|
459
|
+
const Je = {
|
|
460
|
+
[a.holesky]: "0xED7bfd5C1790576105Af4649817f6d35A75CD818",
|
|
461
|
+
[a.ethereum]: o,
|
|
462
|
+
[a.binanceSmartChainTestnet]: "0x731eFa688F3679688cf60A3993b8658138953ED6",
|
|
463
|
+
[a.binanceSmartChain]: o,
|
|
464
|
+
[a.sepolia]: "0xc47e4b3124597fdf8dd07843d4a7052f2ee80c30",
|
|
465
|
+
[a.base]: o,
|
|
2672
466
|
// TODO: Add baseTestnet address
|
|
2673
|
-
[
|
|
2674
|
-
[
|
|
2675
|
-
[
|
|
2676
|
-
},
|
|
2677
|
-
[
|
|
2678
|
-
[
|
|
2679
|
-
[
|
|
2680
|
-
[
|
|
2681
|
-
[
|
|
2682
|
-
[
|
|
2683
|
-
[
|
|
2684
|
-
[
|
|
2685
|
-
[
|
|
2686
|
-
},
|
|
2687
|
-
[
|
|
2688
|
-
[
|
|
2689
|
-
[
|
|
2690
|
-
[
|
|
2691
|
-
[
|
|
2692
|
-
[
|
|
2693
|
-
[
|
|
2694
|
-
[
|
|
2695
|
-
[
|
|
467
|
+
[a.baseTestnet]: o,
|
|
468
|
+
[a.berachainBartioTestnet]: "0xc47e4b3124597FDF8DD07843D4a7052F2eE80C30",
|
|
469
|
+
[a.corn]: o
|
|
470
|
+
}, je = {
|
|
471
|
+
[a.holesky]: "0x38A13AB20D15ffbE5A7312d2336EF1552580a4E2",
|
|
472
|
+
[a.ethereum]: o,
|
|
473
|
+
[a.binanceSmartChainTestnet]: "0x107Fc7d90484534704dD2A9e24c7BD45DB4dD1B5",
|
|
474
|
+
[a.binanceSmartChain]: o,
|
|
475
|
+
[a.sepolia]: "0xc47e4b3124597fdf8dd07843d4a7052f2ee80c30",
|
|
476
|
+
[a.base]: o,
|
|
477
|
+
[a.baseTestnet]: o,
|
|
478
|
+
[a.berachainBartioTestnet]: "0xc47e4b3124597FDF8DD07843D4a7052F2eE80C30",
|
|
479
|
+
[a.corn]: o
|
|
480
|
+
}, qe = {
|
|
481
|
+
[a.ethereum]: "0x8236a87084f8b84306f72007f36f2618a5634494",
|
|
482
|
+
[a.holesky]: o,
|
|
483
|
+
[a.sepolia]: o,
|
|
484
|
+
[a.binanceSmartChainTestnet]: o,
|
|
485
|
+
[a.binanceSmartChain]: "0xecAc9C5F704e954931349Da37F60E39f515c11c1",
|
|
486
|
+
[a.base]: "0xecAc9C5F704e954931349Da37F60E39f515c11c1",
|
|
487
|
+
[a.baseTestnet]: o,
|
|
488
|
+
[a.berachainBartioTestnet]: o,
|
|
489
|
+
[a.corn]: "0xecAc9C5F704e954931349Da37F60E39f515c11c1"
|
|
2696
490
|
};
|
|
2697
|
-
function
|
|
2698
|
-
switch (
|
|
2699
|
-
case
|
|
2700
|
-
return
|
|
2701
|
-
case
|
|
2702
|
-
return
|
|
491
|
+
function Ze(e = _) {
|
|
492
|
+
switch (e) {
|
|
493
|
+
case c.prod:
|
|
494
|
+
return qe;
|
|
495
|
+
case c.testnet:
|
|
496
|
+
return je;
|
|
2703
497
|
default:
|
|
2704
|
-
return
|
|
498
|
+
return Je;
|
|
2705
499
|
}
|
|
2706
500
|
}
|
|
2707
|
-
const
|
|
501
|
+
const ze = [
|
|
2708
502
|
{
|
|
2709
503
|
constant: !0,
|
|
2710
504
|
inputs: [],
|
|
@@ -2925,7 +719,7 @@ const wa = [
|
|
|
2925
719
|
name: "Transfer",
|
|
2926
720
|
type: "event"
|
|
2927
721
|
}
|
|
2928
|
-
],
|
|
722
|
+
], Xe = [
|
|
2929
723
|
{
|
|
2930
724
|
inputs: [],
|
|
2931
725
|
stateMutability: "nonpayable",
|
|
@@ -4685,7 +2479,7 @@ const wa = [
|
|
|
4685
2479
|
stateMutability: "nonpayable",
|
|
4686
2480
|
type: "function"
|
|
4687
2481
|
}
|
|
4688
|
-
],
|
|
2482
|
+
], Ke = [
|
|
4689
2483
|
{
|
|
4690
2484
|
inputs: [
|
|
4691
2485
|
{
|
|
@@ -5535,89 +3329,89 @@ const wa = [
|
|
|
5535
3329
|
type: "function"
|
|
5536
3330
|
}
|
|
5537
3331
|
];
|
|
5538
|
-
function
|
|
5539
|
-
switch (
|
|
3332
|
+
function Ye(e) {
|
|
3333
|
+
switch (e) {
|
|
5540
3334
|
case "LBTC":
|
|
5541
|
-
return
|
|
3335
|
+
return Xe;
|
|
5542
3336
|
default:
|
|
5543
|
-
return
|
|
3337
|
+
return ze;
|
|
5544
3338
|
}
|
|
5545
3339
|
}
|
|
5546
|
-
function
|
|
5547
|
-
const
|
|
5548
|
-
if (!
|
|
5549
|
-
throw new Error(`This chain ${
|
|
5550
|
-
const
|
|
5551
|
-
if (!
|
|
5552
|
-
throw new Error(`Token address for chain ${
|
|
5553
|
-
const
|
|
5554
|
-
return
|
|
5555
|
-
}
|
|
5556
|
-
function
|
|
5557
|
-
spender:
|
|
5558
|
-
amount:
|
|
5559
|
-
env:
|
|
5560
|
-
...
|
|
3340
|
+
function E(e, t) {
|
|
3341
|
+
const n = Ze(t), { chainId: s } = e;
|
|
3342
|
+
if (!ee(s))
|
|
3343
|
+
throw new Error(`This chain ${s} is not supported`);
|
|
3344
|
+
const i = n[s];
|
|
3345
|
+
if (!i)
|
|
3346
|
+
throw new Error(`Token address for chain ${s} is not defined`);
|
|
3347
|
+
const r = Ye("LBTC"), p = e.createContract(r, i);
|
|
3348
|
+
return p.options.address || (p.options.address = i), p;
|
|
3349
|
+
}
|
|
3350
|
+
function Zt({
|
|
3351
|
+
spender: e,
|
|
3352
|
+
amount: t,
|
|
3353
|
+
env: n,
|
|
3354
|
+
...s
|
|
5561
3355
|
}) {
|
|
5562
|
-
const
|
|
5563
|
-
return
|
|
5564
|
-
|
|
5565
|
-
|
|
3356
|
+
const i = new I(s), r = E(i, n), p = ce(t), u = r.methods.approve(e, p);
|
|
3357
|
+
return i.sendTransactionAsync(
|
|
3358
|
+
i.account,
|
|
3359
|
+
r.options.address,
|
|
5566
3360
|
{
|
|
5567
|
-
data:
|
|
3361
|
+
data: u.encodeABI(),
|
|
5568
3362
|
estimate: !0,
|
|
5569
3363
|
estimateFee: !0,
|
|
5570
|
-
gasLimitMultiplier:
|
|
3364
|
+
gasLimitMultiplier: Q(i.chainId)
|
|
5571
3365
|
}
|
|
5572
3366
|
);
|
|
5573
3367
|
}
|
|
5574
|
-
const
|
|
5575
|
-
async function
|
|
5576
|
-
data:
|
|
5577
|
-
proofSignature:
|
|
5578
|
-
env:
|
|
5579
|
-
...
|
|
3368
|
+
const Qe = "insufficient funds", et = "Insufficient funds for transfer. Make sure you have enough ETH to cover the gas cost.", pe = (e) => e.startsWith("0x") ? e : "0x" + e;
|
|
3369
|
+
async function zt({
|
|
3370
|
+
data: e,
|
|
3371
|
+
proofSignature: t,
|
|
3372
|
+
env: n,
|
|
3373
|
+
...s
|
|
5580
3374
|
}) {
|
|
5581
|
-
const
|
|
3375
|
+
const i = new I(s), r = E(i, n), p = r.methods.mint(pe(e), pe(t));
|
|
5582
3376
|
try {
|
|
5583
|
-
return await
|
|
5584
|
-
|
|
5585
|
-
|
|
3377
|
+
return await i.sendTransactionAsync(
|
|
3378
|
+
i.account,
|
|
3379
|
+
r.options.address,
|
|
5586
3380
|
{
|
|
5587
|
-
data:
|
|
3381
|
+
data: p.encodeABI(),
|
|
5588
3382
|
estimate: !0,
|
|
5589
3383
|
estimateFee: !0,
|
|
5590
|
-
gasLimitMultiplier:
|
|
3384
|
+
gasLimitMultiplier: Q(i.chainId)
|
|
5591
3385
|
}
|
|
5592
3386
|
);
|
|
5593
|
-
} catch (
|
|
5594
|
-
console.log("error",
|
|
5595
|
-
const
|
|
5596
|
-
throw
|
|
3387
|
+
} catch (u) {
|
|
3388
|
+
console.log("error", u);
|
|
3389
|
+
const d = S(u);
|
|
3390
|
+
throw d.includes(Qe) ? new Error(et) : new Error(d);
|
|
5597
3391
|
}
|
|
5598
3392
|
}
|
|
5599
|
-
const
|
|
5600
|
-
class
|
|
5601
|
-
constructor(
|
|
5602
|
-
super(
|
|
3393
|
+
const tt = 208, nt = 4001, at = 4100, st = 4200, it = 4900, rt = 4901, P = -32700, O = -32600, U = -32601, F = -32602, B = -32603, L = -32e3, G = -32001, k = -32002, W = -32003, V = -32004, $ = -32005, H = -32006;
|
|
3394
|
+
class le extends Error {
|
|
3395
|
+
constructor(t, n) {
|
|
3396
|
+
super(t), Array.isArray(n) ? this.cause = new z(n) : this.cause = n, this.name = this.constructor.name, typeof Error.captureStackTrace == "function" ? Error.captureStackTrace(new.target.constructor) : this.stack = new Error().stack;
|
|
5603
3397
|
}
|
|
5604
3398
|
/**
|
|
5605
3399
|
* @deprecated Use the `cause` property instead.
|
|
5606
3400
|
*/
|
|
5607
3401
|
get innerError() {
|
|
5608
|
-
return this.cause instanceof
|
|
3402
|
+
return this.cause instanceof z ? this.cause.errors : this.cause;
|
|
5609
3403
|
}
|
|
5610
3404
|
/**
|
|
5611
3405
|
* @deprecated Use the `cause` property instead.
|
|
5612
3406
|
*/
|
|
5613
|
-
set innerError(
|
|
5614
|
-
Array.isArray(
|
|
3407
|
+
set innerError(t) {
|
|
3408
|
+
Array.isArray(t) ? this.cause = new z(t) : this.cause = t;
|
|
5615
3409
|
}
|
|
5616
|
-
static convertToString(
|
|
5617
|
-
if (
|
|
3410
|
+
static convertToString(t, n = !1) {
|
|
3411
|
+
if (t == null)
|
|
5618
3412
|
return "undefined";
|
|
5619
|
-
const
|
|
5620
|
-
return
|
|
3413
|
+
const s = JSON.stringify(t, (i, r) => typeof r == "bigint" ? r.toString() : r);
|
|
3414
|
+
return n && ["bigint", "string"].includes(typeof t) ? s.replace(/['\\"]+/g, "") : s;
|
|
5621
3415
|
}
|
|
5622
3416
|
toJSON() {
|
|
5623
3417
|
return {
|
|
@@ -5630,81 +3424,81 @@ class ur extends Error {
|
|
|
5630
3424
|
};
|
|
5631
3425
|
}
|
|
5632
3426
|
}
|
|
5633
|
-
class
|
|
5634
|
-
constructor(
|
|
5635
|
-
super(`Multiple errors occurred: [${
|
|
3427
|
+
class z extends le {
|
|
3428
|
+
constructor(t) {
|
|
3429
|
+
super(`Multiple errors occurred: [${t.map((n) => n.message).join("], [")}]`), this.code = tt, this.errors = t;
|
|
5636
3430
|
}
|
|
5637
3431
|
}
|
|
5638
|
-
const
|
|
3432
|
+
const ot = "An Rpc error has occured with a code of *code*", m = {
|
|
5639
3433
|
// EIP-1474 & JSON RPC 2.0
|
|
5640
3434
|
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1474.md
|
|
5641
|
-
[
|
|
3435
|
+
[P]: {
|
|
5642
3436
|
message: "Parse error",
|
|
5643
3437
|
description: "Invalid JSON"
|
|
5644
3438
|
},
|
|
5645
|
-
[
|
|
3439
|
+
[O]: {
|
|
5646
3440
|
message: "Invalid request",
|
|
5647
3441
|
description: "JSON is not a valid request object "
|
|
5648
3442
|
},
|
|
5649
|
-
[
|
|
3443
|
+
[U]: {
|
|
5650
3444
|
message: "Method not found",
|
|
5651
3445
|
description: "Method does not exist "
|
|
5652
3446
|
},
|
|
5653
|
-
[
|
|
3447
|
+
[F]: {
|
|
5654
3448
|
message: "Invalid params",
|
|
5655
3449
|
description: "Invalid method parameters"
|
|
5656
3450
|
},
|
|
5657
|
-
[
|
|
3451
|
+
[B]: {
|
|
5658
3452
|
message: "Internal error",
|
|
5659
3453
|
description: "Internal JSON-RPC error"
|
|
5660
3454
|
},
|
|
5661
|
-
[
|
|
3455
|
+
[L]: {
|
|
5662
3456
|
message: "Invalid input",
|
|
5663
3457
|
description: "Missing or invalid parameters"
|
|
5664
3458
|
},
|
|
5665
|
-
[
|
|
3459
|
+
[G]: {
|
|
5666
3460
|
message: "Resource not found",
|
|
5667
3461
|
description: "Requested resource not found"
|
|
5668
3462
|
},
|
|
5669
|
-
[
|
|
3463
|
+
[k]: {
|
|
5670
3464
|
message: "Resource unavailable",
|
|
5671
3465
|
description: "Requested resource not available"
|
|
5672
3466
|
},
|
|
5673
|
-
[
|
|
3467
|
+
[W]: {
|
|
5674
3468
|
message: "Transaction rejected",
|
|
5675
3469
|
description: "Transaction creation failed"
|
|
5676
3470
|
},
|
|
5677
|
-
[
|
|
3471
|
+
[V]: {
|
|
5678
3472
|
message: "Method not supported",
|
|
5679
3473
|
description: "Method is not implemented"
|
|
5680
3474
|
},
|
|
5681
|
-
[
|
|
3475
|
+
[$]: {
|
|
5682
3476
|
message: "Limit exceeded",
|
|
5683
3477
|
description: "Request exceeds defined limit"
|
|
5684
3478
|
},
|
|
5685
|
-
[
|
|
3479
|
+
[H]: {
|
|
5686
3480
|
message: "JSON-RPC version not supported",
|
|
5687
3481
|
description: "Version of JSON-RPC protocol is not supported"
|
|
5688
3482
|
},
|
|
5689
3483
|
// EIP-1193
|
|
5690
3484
|
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1193.md#provider-errors
|
|
5691
|
-
[
|
|
3485
|
+
[nt]: {
|
|
5692
3486
|
name: "User Rejected Request",
|
|
5693
3487
|
message: "The user rejected the request."
|
|
5694
3488
|
},
|
|
5695
|
-
[
|
|
3489
|
+
[at]: {
|
|
5696
3490
|
name: "Unauthorized",
|
|
5697
3491
|
message: "The requested method and/or account has not been authorized by the user."
|
|
5698
3492
|
},
|
|
5699
|
-
[
|
|
3493
|
+
[st]: {
|
|
5700
3494
|
name: "Unsupported Method",
|
|
5701
3495
|
message: "The Provider does not support the requested method."
|
|
5702
3496
|
},
|
|
5703
|
-
[
|
|
3497
|
+
[it]: {
|
|
5704
3498
|
name: "Disconnected",
|
|
5705
3499
|
message: "The Provider is disconnected from all chains."
|
|
5706
3500
|
},
|
|
5707
|
-
[
|
|
3501
|
+
[rt]: {
|
|
5708
3502
|
name: "Chain Disconnected",
|
|
5709
3503
|
message: "The Provider is not connected to the requested chain."
|
|
5710
3504
|
},
|
|
@@ -5791,272 +3585,273 @@ const Fa = "An Rpc error has occured with a code of *code*", fe = {
|
|
|
5791
3585
|
message: "For private use, and thus can't be registered. Such codes can be used by prior agreements between WebSocket applications. The interpretation of these codes is undefined by the WebSocket protocol."
|
|
5792
3586
|
}
|
|
5793
3587
|
};
|
|
5794
|
-
class
|
|
5795
|
-
constructor(
|
|
5796
|
-
super(
|
|
3588
|
+
class b extends le {
|
|
3589
|
+
constructor(t, n) {
|
|
3590
|
+
super(n ?? ot.replace("*code*", t.error.code.toString())), this.code = t.error.code, this.id = t.id, this.jsonrpc = t.jsonrpc, this.jsonRpcError = t.error;
|
|
5797
3591
|
}
|
|
5798
3592
|
toJSON() {
|
|
5799
3593
|
return Object.assign(Object.assign({}, super.toJSON()), { error: this.jsonRpcError, id: this.id, jsonRpc: this.jsonrpc });
|
|
5800
3594
|
}
|
|
5801
3595
|
}
|
|
5802
|
-
class
|
|
5803
|
-
constructor(
|
|
5804
|
-
super(
|
|
3596
|
+
class pt extends b {
|
|
3597
|
+
constructor(t) {
|
|
3598
|
+
super(t, m[P].message), this.code = P;
|
|
5805
3599
|
}
|
|
5806
3600
|
}
|
|
5807
|
-
class
|
|
5808
|
-
constructor(
|
|
5809
|
-
super(
|
|
3601
|
+
class ut extends b {
|
|
3602
|
+
constructor(t) {
|
|
3603
|
+
super(t, m[O].message), this.code = O;
|
|
5810
3604
|
}
|
|
5811
3605
|
}
|
|
5812
|
-
class
|
|
5813
|
-
constructor(
|
|
5814
|
-
super(
|
|
3606
|
+
class dt extends b {
|
|
3607
|
+
constructor(t) {
|
|
3608
|
+
super(t, m[U].message), this.code = U;
|
|
5815
3609
|
}
|
|
5816
3610
|
}
|
|
5817
|
-
class
|
|
5818
|
-
constructor(
|
|
5819
|
-
super(
|
|
3611
|
+
class yt extends b {
|
|
3612
|
+
constructor(t) {
|
|
3613
|
+
super(t, m[F].message), this.code = F;
|
|
5820
3614
|
}
|
|
5821
3615
|
}
|
|
5822
|
-
class
|
|
5823
|
-
constructor(
|
|
5824
|
-
super(
|
|
3616
|
+
class ct extends b {
|
|
3617
|
+
constructor(t) {
|
|
3618
|
+
super(t, m[B].message), this.code = B;
|
|
5825
3619
|
}
|
|
5826
3620
|
}
|
|
5827
|
-
class
|
|
5828
|
-
constructor(
|
|
5829
|
-
super(
|
|
3621
|
+
class lt extends b {
|
|
3622
|
+
constructor(t) {
|
|
3623
|
+
super(t, m[L].message), this.code = L;
|
|
5830
3624
|
}
|
|
5831
3625
|
}
|
|
5832
|
-
class
|
|
5833
|
-
constructor(
|
|
5834
|
-
super(
|
|
3626
|
+
class mt extends b {
|
|
3627
|
+
constructor(t) {
|
|
3628
|
+
super(t, m[V].message), this.code = V;
|
|
5835
3629
|
}
|
|
5836
3630
|
}
|
|
5837
|
-
class
|
|
5838
|
-
constructor(
|
|
5839
|
-
super(
|
|
3631
|
+
class bt extends b {
|
|
3632
|
+
constructor(t) {
|
|
3633
|
+
super(t, m[k].message), this.code = k;
|
|
5840
3634
|
}
|
|
5841
3635
|
}
|
|
5842
|
-
class
|
|
5843
|
-
constructor(
|
|
5844
|
-
super(
|
|
3636
|
+
class ft extends b {
|
|
3637
|
+
constructor(t) {
|
|
3638
|
+
super(t, m[G].message), this.code = G;
|
|
5845
3639
|
}
|
|
5846
3640
|
}
|
|
5847
|
-
class
|
|
5848
|
-
constructor(
|
|
5849
|
-
super(
|
|
3641
|
+
class Tt extends b {
|
|
3642
|
+
constructor(t) {
|
|
3643
|
+
super(t, m[H].message), this.code = H;
|
|
5850
3644
|
}
|
|
5851
3645
|
}
|
|
5852
|
-
class
|
|
5853
|
-
constructor(
|
|
5854
|
-
super(
|
|
3646
|
+
class ht extends b {
|
|
3647
|
+
constructor(t) {
|
|
3648
|
+
super(t, m[W].message), this.code = W;
|
|
5855
3649
|
}
|
|
5856
3650
|
}
|
|
5857
|
-
class
|
|
5858
|
-
constructor(
|
|
5859
|
-
super(
|
|
3651
|
+
class gt extends b {
|
|
3652
|
+
constructor(t) {
|
|
3653
|
+
super(t, m[$].message), this.code = $;
|
|
5860
3654
|
}
|
|
5861
3655
|
}
|
|
5862
|
-
const
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
error:
|
|
3656
|
+
const f = /* @__PURE__ */ new Map();
|
|
3657
|
+
f.set(P, { error: pt });
|
|
3658
|
+
f.set(O, {
|
|
3659
|
+
error: ut
|
|
5866
3660
|
});
|
|
5867
|
-
|
|
5868
|
-
error:
|
|
3661
|
+
f.set(U, {
|
|
3662
|
+
error: dt
|
|
5869
3663
|
});
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
error:
|
|
3664
|
+
f.set(F, { error: yt });
|
|
3665
|
+
f.set(B, { error: ct });
|
|
3666
|
+
f.set(L, { error: lt });
|
|
3667
|
+
f.set(V, {
|
|
3668
|
+
error: mt
|
|
5875
3669
|
});
|
|
5876
|
-
|
|
5877
|
-
error:
|
|
3670
|
+
f.set(k, {
|
|
3671
|
+
error: bt
|
|
5878
3672
|
});
|
|
5879
|
-
|
|
5880
|
-
error:
|
|
3673
|
+
f.set(W, {
|
|
3674
|
+
error: ht
|
|
5881
3675
|
});
|
|
5882
|
-
|
|
5883
|
-
error:
|
|
3676
|
+
f.set(G, {
|
|
3677
|
+
error: ft
|
|
5884
3678
|
});
|
|
5885
|
-
|
|
5886
|
-
error:
|
|
3679
|
+
f.set(H, {
|
|
3680
|
+
error: Tt
|
|
5887
3681
|
});
|
|
5888
|
-
|
|
5889
|
-
const
|
|
5890
|
-
var
|
|
5891
|
-
(function(
|
|
5892
|
-
|
|
5893
|
-
})(
|
|
5894
|
-
var
|
|
5895
|
-
(function(
|
|
5896
|
-
|
|
5897
|
-
})(
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
var
|
|
5901
|
-
(function(
|
|
5902
|
-
|
|
5903
|
-
})(
|
|
5904
|
-
var
|
|
5905
|
-
(function(
|
|
5906
|
-
|
|
5907
|
-
})(
|
|
5908
|
-
const
|
|
5909
|
-
[
|
|
5910
|
-
[
|
|
5911
|
-
[
|
|
5912
|
-
[
|
|
5913
|
-
[
|
|
5914
|
-
[
|
|
5915
|
-
[
|
|
5916
|
-
[
|
|
5917
|
-
[
|
|
5918
|
-
},
|
|
5919
|
-
[
|
|
5920
|
-
[
|
|
5921
|
-
[
|
|
5922
|
-
[
|
|
5923
|
-
[
|
|
5924
|
-
[
|
|
5925
|
-
[
|
|
5926
|
-
[
|
|
5927
|
-
[
|
|
5928
|
-
},
|
|
5929
|
-
[
|
|
5930
|
-
[
|
|
5931
|
-
[
|
|
5932
|
-
[
|
|
5933
|
-
[
|
|
5934
|
-
[
|
|
5935
|
-
[
|
|
5936
|
-
[
|
|
5937
|
-
[
|
|
3682
|
+
f.set($, { error: gt });
|
|
3683
|
+
const wt = (e) => typeof e == "string" && /^((-)?0x[0-9a-f]+|(0x))$/i.test(e);
|
|
3684
|
+
var J;
|
|
3685
|
+
(function(e) {
|
|
3686
|
+
e.NUMBER = "NUMBER_NUMBER", e.HEX = "NUMBER_HEX", e.STR = "NUMBER_STR", e.BIGINT = "NUMBER_BIGINT";
|
|
3687
|
+
})(J || (J = {}));
|
|
3688
|
+
var j;
|
|
3689
|
+
(function(e) {
|
|
3690
|
+
e.HEX = "BYTES_HEX", e.UINT8ARRAY = "BYTES_UINT8ARRAY";
|
|
3691
|
+
})(j || (j = {}));
|
|
3692
|
+
J.BIGINT, j.HEX;
|
|
3693
|
+
J.HEX, j.HEX;
|
|
3694
|
+
var ue;
|
|
3695
|
+
(function(e) {
|
|
3696
|
+
e.EARLIEST = "earliest", e.LATEST = "latest", e.PENDING = "pending", e.SAFE = "safe", e.FINALIZED = "finalized";
|
|
3697
|
+
})(ue || (ue = {}));
|
|
3698
|
+
var de;
|
|
3699
|
+
(function(e) {
|
|
3700
|
+
e.chainstart = "chainstart", e.frontier = "frontier", e.homestead = "homestead", e.dao = "dao", e.tangerineWhistle = "tangerineWhistle", e.spuriousDragon = "spuriousDragon", e.byzantium = "byzantium", e.constantinople = "constantinople", e.petersburg = "petersburg", e.istanbul = "istanbul", e.muirGlacier = "muirGlacier", e.berlin = "berlin", e.london = "london", e.altair = "altair", e.arrowGlacier = "arrowGlacier", e.grayGlacier = "grayGlacier", e.bellatrix = "bellatrix", e.merge = "merge", e.capella = "capella", e.shanghai = "shanghai";
|
|
3701
|
+
})(de || (de = {}));
|
|
3702
|
+
const Et = {
|
|
3703
|
+
[a.holesky]: "0x3a0c40c84b5034ed9a98a9a47a02af2b0885246f",
|
|
3704
|
+
[a.sepolia]: o,
|
|
3705
|
+
[a.ethereum]: o,
|
|
3706
|
+
[a.binanceSmartChainTestnet]: o,
|
|
3707
|
+
[a.binanceSmartChain]: o,
|
|
3708
|
+
[a.base]: o,
|
|
3709
|
+
[a.baseTestnet]: o,
|
|
3710
|
+
[a.berachainBartioTestnet]: o,
|
|
3711
|
+
[a.corn]: o
|
|
3712
|
+
}, At = {
|
|
3713
|
+
[a.holesky]: "0x3a0c40c84b5034ed9a98a9a47a02af2b0885246f",
|
|
3714
|
+
[a.sepolia]: o,
|
|
3715
|
+
[a.ethereum]: o,
|
|
3716
|
+
[a.binanceSmartChainTestnet]: o,
|
|
3717
|
+
[a.binanceSmartChain]: o,
|
|
3718
|
+
[a.base]: o,
|
|
3719
|
+
[a.baseTestnet]: o,
|
|
3720
|
+
[a.berachainBartioTestnet]: o,
|
|
3721
|
+
[a.corn]: o
|
|
3722
|
+
}, vt = {
|
|
3723
|
+
[a.holesky]: o,
|
|
3724
|
+
[a.sepolia]: o,
|
|
3725
|
+
[a.ethereum]: "0xc750eCAC7250E0D18ecE2C7a5F130E3A765dc260",
|
|
3726
|
+
[a.binanceSmartChainTestnet]: o,
|
|
3727
|
+
[a.binanceSmartChain]: o,
|
|
3728
|
+
[a.base]: o,
|
|
3729
|
+
[a.baseTestnet]: o,
|
|
3730
|
+
[a.berachainBartioTestnet]: o,
|
|
3731
|
+
[a.corn]: o
|
|
5938
3732
|
};
|
|
5939
|
-
function
|
|
5940
|
-
switch (
|
|
5941
|
-
case
|
|
5942
|
-
return
|
|
5943
|
-
case
|
|
5944
|
-
return
|
|
3733
|
+
function Rt(e = _) {
|
|
3734
|
+
switch (e) {
|
|
3735
|
+
case c.prod:
|
|
3736
|
+
return vt;
|
|
3737
|
+
case c.testnet:
|
|
3738
|
+
return At;
|
|
5945
3739
|
default:
|
|
5946
|
-
return
|
|
3740
|
+
return Et;
|
|
5947
3741
|
}
|
|
5948
3742
|
}
|
|
5949
|
-
function
|
|
5950
|
-
const
|
|
5951
|
-
if (!
|
|
5952
|
-
throw new Error(`This chain ${
|
|
5953
|
-
const
|
|
5954
|
-
if (!
|
|
3743
|
+
function Ct(e, t) {
|
|
3744
|
+
const n = Rt(t), { chainId: s } = e;
|
|
3745
|
+
if (!ee(s))
|
|
3746
|
+
throw new Error(`This chain ${s} is not supported`);
|
|
3747
|
+
const i = n[s];
|
|
3748
|
+
if (!i)
|
|
5955
3749
|
throw new Error("The address for bascule module is not defined");
|
|
5956
|
-
const
|
|
5957
|
-
return
|
|
3750
|
+
const r = e.createContract(Ke, i);
|
|
3751
|
+
return r.options.address || (r.options.address = i), r;
|
|
5958
3752
|
}
|
|
5959
|
-
const
|
|
5960
|
-
var
|
|
5961
|
-
async function
|
|
5962
|
-
txId:
|
|
5963
|
-
env:
|
|
5964
|
-
...
|
|
3753
|
+
const St = "No deposit ID provided. Please provide a deposit ID as an argument.", It = "Invalid deposit ID. Expected a 0x-prefixed 32-byte hex string.";
|
|
3754
|
+
var _t = /* @__PURE__ */ ((e) => (e[e.UNREPORTED = 0] = "UNREPORTED", e[e.REPORTED = 1] = "REPORTED", e[e.WITHDRAWN = 2] = "WITHDRAWN", e))(_t || {});
|
|
3755
|
+
async function Xt({
|
|
3756
|
+
txId: e,
|
|
3757
|
+
env: t,
|
|
3758
|
+
...n
|
|
5965
3759
|
}) {
|
|
5966
|
-
if (!
|
|
5967
|
-
throw new Error(
|
|
5968
|
-
if (!
|
|
5969
|
-
throw new Error(
|
|
5970
|
-
const
|
|
3760
|
+
if (!e)
|
|
3761
|
+
throw new Error(St);
|
|
3762
|
+
if (!wt(e))
|
|
3763
|
+
throw new Error(It);
|
|
3764
|
+
const s = new I(n), i = Ct(s, t);
|
|
5971
3765
|
try {
|
|
5972
|
-
const
|
|
5973
|
-
return Number(
|
|
5974
|
-
} catch (
|
|
5975
|
-
const
|
|
5976
|
-
throw new Error(
|
|
3766
|
+
const r = await i.methods.depositHistory(Buffer.from(e.replace(/^0x/, ""), "hex")).call();
|
|
3767
|
+
return Number(r);
|
|
3768
|
+
} catch (r) {
|
|
3769
|
+
const p = S(r);
|
|
3770
|
+
throw new Error(p);
|
|
5977
3771
|
}
|
|
5978
3772
|
}
|
|
5979
|
-
const
|
|
5980
|
-
function
|
|
5981
|
-
if (!
|
|
5982
|
-
throw new Error(`This chain ${
|
|
5983
|
-
const
|
|
5984
|
-
if (!
|
|
5985
|
-
throw new Error(`RPC URL for chainId ${
|
|
5986
|
-
return
|
|
5987
|
-
}
|
|
5988
|
-
async function
|
|
5989
|
-
chainId:
|
|
5990
|
-
bakeGasEstimate:
|
|
5991
|
-
rpcUrl:
|
|
3773
|
+
const me = (e) => e in [a.ethereum, a.base, a.binanceSmartChain] ? c.prod : c.stage;
|
|
3774
|
+
function be(e, t) {
|
|
3775
|
+
if (!ee(e))
|
|
3776
|
+
throw new Error(`This chain ${e} is not supported`);
|
|
3777
|
+
const n = t ? { [e]: t } : N;
|
|
3778
|
+
if (!n[e])
|
|
3779
|
+
throw new Error(`RPC URL for chainId ${e} not found`);
|
|
3780
|
+
return n;
|
|
3781
|
+
}
|
|
3782
|
+
async function Kt({
|
|
3783
|
+
chainId: e,
|
|
3784
|
+
bakeGasEstimate: t = 0,
|
|
3785
|
+
rpcUrl: n
|
|
5992
3786
|
}) {
|
|
5993
|
-
const
|
|
5994
|
-
return
|
|
3787
|
+
const s = be(e, n), i = new q({ chainId: e, rpcUrlConfig: s }), r = me(e), u = await E(i, r).methods.getMintFee().call(), d = new v(X(u.toString(10)));
|
|
3788
|
+
return t ? d.plus(X(t)) : d;
|
|
5995
3789
|
}
|
|
5996
|
-
async function
|
|
5997
|
-
env:
|
|
5998
|
-
rpcUrl:
|
|
5999
|
-
chainId:
|
|
3790
|
+
async function Yt({
|
|
3791
|
+
env: e,
|
|
3792
|
+
rpcUrl: t,
|
|
3793
|
+
chainId: n
|
|
6000
3794
|
}) {
|
|
6001
|
-
const
|
|
6002
|
-
return (await
|
|
3795
|
+
const s = { [n]: t }, i = new q({ chainId: n, rpcUrlConfig: s });
|
|
3796
|
+
return (await E(i, e).methods.totalSupply().call()).toString();
|
|
6003
3797
|
}
|
|
6004
|
-
async function
|
|
6005
|
-
owner:
|
|
6006
|
-
rpcUrl:
|
|
6007
|
-
chainId:
|
|
3798
|
+
async function Qt({
|
|
3799
|
+
owner: e,
|
|
3800
|
+
rpcUrl: t,
|
|
3801
|
+
chainId: n
|
|
6008
3802
|
}) {
|
|
6009
|
-
const
|
|
3803
|
+
const s = be(n, t), i = new q({ chainId: n, rpcUrlConfig: s }), r = me(n), p = E(i, r);
|
|
6010
3804
|
try {
|
|
6011
|
-
return (await
|
|
6012
|
-
} catch (
|
|
6013
|
-
const
|
|
6014
|
-
throw new Error(
|
|
3805
|
+
return (await p.methods.nonces(e).call()).toString();
|
|
3806
|
+
} catch (u) {
|
|
3807
|
+
const d = S(u);
|
|
3808
|
+
throw new Error(d);
|
|
6015
3809
|
}
|
|
6016
3810
|
}
|
|
6017
|
-
const
|
|
6018
|
-
[
|
|
6019
|
-
[
|
|
6020
|
-
[
|
|
6021
|
-
[
|
|
6022
|
-
},
|
|
6023
|
-
...
|
|
6024
|
-
},
|
|
6025
|
-
...
|
|
6026
|
-
[
|
|
6027
|
-
[
|
|
3811
|
+
const te = {
|
|
3812
|
+
[a.sepolia]: "0xe3748bF0Ec0A76767539eE28610B3367e35fe2C2",
|
|
3813
|
+
[a.berachainBartioTestnet]: "0x1977013acaf27856ac8048C42EE2ed0134d53895",
|
|
3814
|
+
[a.corn]: o,
|
|
3815
|
+
[a.ethereum]: o
|
|
3816
|
+
}, xt = {
|
|
3817
|
+
...te
|
|
3818
|
+
}, Dt = {
|
|
3819
|
+
...te,
|
|
3820
|
+
[a.corn]: "0xfc7B20D9B59A8A466f4fC3d34aA69a7D98e71d7A",
|
|
3821
|
+
[a.ethereum]: "0x6bc15d7930839ec18a57f6f7df72ae1b439d077f"
|
|
6028
3822
|
};
|
|
6029
|
-
function
|
|
6030
|
-
switch (
|
|
6031
|
-
case
|
|
6032
|
-
return
|
|
6033
|
-
case
|
|
6034
|
-
return
|
|
3823
|
+
function en(e = _) {
|
|
3824
|
+
switch (e) {
|
|
3825
|
+
case c.prod:
|
|
3826
|
+
return Dt;
|
|
3827
|
+
case c.testnet:
|
|
3828
|
+
return xt;
|
|
6035
3829
|
default:
|
|
6036
|
-
return
|
|
3830
|
+
return te;
|
|
6037
3831
|
}
|
|
6038
3832
|
}
|
|
6039
|
-
async function
|
|
6040
|
-
const
|
|
6041
|
-
return
|
|
3833
|
+
async function tn(e) {
|
|
3834
|
+
const t = new I(e), n = `destination chain id is ${e.chainId}`;
|
|
3835
|
+
return t.signMessage(n);
|
|
6042
3836
|
}
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
3837
|
+
const Mt = 24 * 60 * 60;
|
|
3838
|
+
function Nt({
|
|
3839
|
+
chainId: e,
|
|
3840
|
+
verifyingContract: t,
|
|
3841
|
+
fee: n,
|
|
3842
|
+
expiry: s
|
|
6048
3843
|
}) {
|
|
6049
3844
|
return {
|
|
6050
3845
|
domain: {
|
|
6051
3846
|
name: "Lombard Staked Bitcoin",
|
|
6052
3847
|
version: "1",
|
|
6053
|
-
chainId:
|
|
6054
|
-
verifyingContract:
|
|
3848
|
+
chainId: e,
|
|
3849
|
+
verifyingContract: t
|
|
6055
3850
|
},
|
|
6056
3851
|
message: {
|
|
6057
|
-
chainId:
|
|
6058
|
-
fee:
|
|
6059
|
-
expiry:
|
|
3852
|
+
chainId: e,
|
|
3853
|
+
fee: n,
|
|
3854
|
+
expiry: s
|
|
6060
3855
|
},
|
|
6061
3856
|
primaryType: "feeApproval",
|
|
6062
3857
|
types: {
|
|
@@ -6074,104 +3869,108 @@ function si({
|
|
|
6074
3869
|
}
|
|
6075
3870
|
};
|
|
6076
3871
|
}
|
|
6077
|
-
const
|
|
6078
|
-
async function
|
|
6079
|
-
address:
|
|
6080
|
-
provider:
|
|
6081
|
-
fee:
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
3872
|
+
const Pt = "Failed to obtain a valid signature. The response is undefined or invalid.";
|
|
3873
|
+
async function nn({
|
|
3874
|
+
address: e,
|
|
3875
|
+
provider: t,
|
|
3876
|
+
fee: n,
|
|
3877
|
+
chainId: s,
|
|
3878
|
+
env: i,
|
|
3879
|
+
expiry: r = Date.now() + Mt
|
|
6085
3880
|
}) {
|
|
6086
|
-
var
|
|
6087
|
-
const
|
|
6088
|
-
provider:
|
|
6089
|
-
account:
|
|
6090
|
-
chainId:
|
|
6091
|
-
}),
|
|
6092
|
-
|
|
6093
|
-
|
|
3881
|
+
var g, x;
|
|
3882
|
+
const p = new I({
|
|
3883
|
+
provider: t,
|
|
3884
|
+
account: e,
|
|
3885
|
+
chainId: s
|
|
3886
|
+
}), d = E(p, i).options.address, h = JSON.stringify(
|
|
3887
|
+
Nt({
|
|
3888
|
+
chainId: s,
|
|
3889
|
+
verifyingContract: d,
|
|
3890
|
+
fee: n,
|
|
3891
|
+
expiry: r.toString()
|
|
3892
|
+
})
|
|
3893
|
+
), l = await ((x = (g = p.web3) == null ? void 0 : g.currentProvider) == null ? void 0 : x.request({
|
|
6094
3894
|
method: "eth_signTypedData_v4",
|
|
6095
|
-
params: [
|
|
3895
|
+
params: [e, h]
|
|
6096
3896
|
}));
|
|
6097
|
-
if (typeof
|
|
6098
|
-
return { signature:
|
|
6099
|
-
if (!(
|
|
6100
|
-
throw new Error(
|
|
6101
|
-
return { signature:
|
|
6102
|
-
}
|
|
6103
|
-
|
|
6104
|
-
function
|
|
6105
|
-
var
|
|
6106
|
-
const
|
|
6107
|
-
address:
|
|
6108
|
-
network:
|
|
6109
|
-
}).output) == null ? void 0 :
|
|
6110
|
-
if (!
|
|
3897
|
+
if (typeof l == "string")
|
|
3898
|
+
return { signature: l, typedData: h };
|
|
3899
|
+
if (!(l != null && l.result))
|
|
3900
|
+
throw new Error(Pt);
|
|
3901
|
+
return { signature: l.result, typedData: h };
|
|
3902
|
+
}
|
|
3903
|
+
Ee(we);
|
|
3904
|
+
function Ot(e, t = c.prod) {
|
|
3905
|
+
var r;
|
|
3906
|
+
const n = Ut(e), i = (r = Ae[n]({
|
|
3907
|
+
address: e,
|
|
3908
|
+
network: t === c.prod ? oe.bitcoin : oe.testnet
|
|
3909
|
+
}).output) == null ? void 0 : r.toString("hex");
|
|
3910
|
+
if (!i)
|
|
6111
3911
|
throw new Error("Output script is not found.");
|
|
6112
|
-
return `0x${
|
|
3912
|
+
return `0x${i}`;
|
|
6113
3913
|
}
|
|
6114
|
-
function
|
|
6115
|
-
const
|
|
6116
|
-
if (
|
|
3914
|
+
function Ut(e) {
|
|
3915
|
+
const t = ve.fromBech32(e);
|
|
3916
|
+
if (t.version === 1 && t.data.length === 32)
|
|
6117
3917
|
return "p2tr";
|
|
6118
|
-
if (
|
|
3918
|
+
if (t.version === 0 && t.data.length === 20)
|
|
6119
3919
|
return "p2wpkh";
|
|
6120
|
-
if (
|
|
3920
|
+
if (Ft(e))
|
|
6121
3921
|
return "p2wsh";
|
|
6122
3922
|
throw new Error("Address type is not supported.");
|
|
6123
3923
|
}
|
|
6124
|
-
function
|
|
6125
|
-
return (
|
|
3924
|
+
function Ft(e) {
|
|
3925
|
+
return (e.startsWith("bc1") || e.startsWith("tb1")) && e.length === 62;
|
|
6126
3926
|
}
|
|
6127
|
-
function
|
|
6128
|
-
btcAddress:
|
|
6129
|
-
amount:
|
|
6130
|
-
env:
|
|
6131
|
-
...
|
|
3927
|
+
function an({
|
|
3928
|
+
btcAddress: e,
|
|
3929
|
+
amount: t,
|
|
3930
|
+
env: n,
|
|
3931
|
+
...s
|
|
6132
3932
|
}) {
|
|
6133
|
-
const
|
|
6134
|
-
return
|
|
6135
|
-
|
|
6136
|
-
|
|
3933
|
+
const i = new I(s), r = E(i, n), p = Ot(e, n), u = ce(t), d = r.methods.redeem(p, u);
|
|
3934
|
+
return i.sendTransactionAsync(
|
|
3935
|
+
i.account,
|
|
3936
|
+
r.options.address,
|
|
6137
3937
|
{
|
|
6138
|
-
data:
|
|
3938
|
+
data: d.encodeABI(),
|
|
6139
3939
|
estimate: !0,
|
|
6140
3940
|
estimateFee: !0,
|
|
6141
|
-
gasLimitMultiplier:
|
|
3941
|
+
gasLimitMultiplier: Q(i.chainId)
|
|
6142
3942
|
}
|
|
6143
3943
|
);
|
|
6144
3944
|
}
|
|
6145
3945
|
export {
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
Di as unstakeLBTC
|
|
3946
|
+
_t as BasculeDepositStatus,
|
|
3947
|
+
Le as ENotarizationStatus,
|
|
3948
|
+
Ge as ESessionState,
|
|
3949
|
+
a as OChainId,
|
|
3950
|
+
c as OEnv,
|
|
3951
|
+
xe as SANCTIONED_ADDRESS,
|
|
3952
|
+
Y as SATOSHI_SCALE,
|
|
3953
|
+
Zt as approveLBTC,
|
|
3954
|
+
zt as claimLBTC,
|
|
3955
|
+
X as fromSatoshi,
|
|
3956
|
+
Vt as generateDepositBtcAddress,
|
|
3957
|
+
C as getApiConfig,
|
|
3958
|
+
Xt as getBasculeDepositStatus,
|
|
3959
|
+
$t as getDepositBtcAddress,
|
|
3960
|
+
Ue as getDepositBtcAddresses,
|
|
3961
|
+
Ht as getDepositsByAddress,
|
|
3962
|
+
Jt as getLBTCExchangeRate,
|
|
3963
|
+
Kt as getLBTCMintingFee,
|
|
3964
|
+
Yt as getLBTCTotalSupply,
|
|
3965
|
+
Ze as getLbtcAddressConfig,
|
|
3966
|
+
en as getLbtcOFTAdapterAddressConfig,
|
|
3967
|
+
jt as getNetworkFeeSignature,
|
|
3968
|
+
Qt as getPermitNonce,
|
|
3969
|
+
ee as isValidChain,
|
|
3970
|
+
tn as signLbtcDestionationAddr,
|
|
3971
|
+
nn as signNetworkFee,
|
|
3972
|
+
qt as storeNetworkFeeSignature,
|
|
3973
|
+
ce as toSatoshi,
|
|
3974
|
+
an as unstakeLBTC
|
|
6176
3975
|
};
|
|
6177
3976
|
//# sourceMappingURL=index.js.map
|