@multiversx/sdk-dapp-liquidity 1.0.12 → 1.0.14
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/ConstantsUtil-BinYIDR2.mjs +8 -0
- package/ConstantsUtil-CbnVdQ5P.js +8 -0
- package/add-D-ECcdUh.mjs +19 -0
- package/add-Diz8heiY.js +20 -0
- package/all-wallets-_iOQf3bl.js +11 -0
- package/all-wallets-puIIQy3Y.mjs +10 -0
- package/app-store-BGTKFL27.js +22 -0
- package/app-store-Bsf7w3pv.mjs +21 -0
- package/apple-Cw8e8IGH.mjs +22 -0
- package/apple-DF7n_Yzl.js +23 -0
- package/arrow-bottom-Cp2C4fQv.mjs +12 -0
- package/arrow-bottom-DTvIR3s3.js +13 -0
- package/arrow-bottom-circle-CN6i5mHz.mjs +15 -0
- package/arrow-bottom-circle-CzPwiwWH.js +16 -0
- package/arrow-left-9VFYHQSW.js +13 -0
- package/arrow-left-BDQHoEvX.mjs +12 -0
- package/arrow-right-BxkuSpWU.mjs +12 -0
- package/arrow-right-DBLQ6w92.js +13 -0
- package/arrow-top-BiQd5Aey.js +13 -0
- package/arrow-top-BrLVX4Rj.mjs +12 -0
- package/bank-B7EC6Kdz.mjs +18 -0
- package/bank-CvPn9sfV.js +19 -0
- package/{bignumber-CKZkoo0g.mjs → bignumber-2Z7uapuD.mjs} +6 -6
- package/{bignumber-B8vjg9qn.js → bignumber-D1Wl54dL.js} +6 -6
- package/bin-BXO1kNZh.js +9 -0
- package/bin-CwiYVJ1L.mjs +8 -0
- package/bitcoin-C3kBVar_.mjs +17 -0
- package/bitcoin-DAvQGpeP.js +3251 -0
- package/bitcoin-dNBGbS2B.mjs +3251 -0
- package/bitcoin-k6bvmzMA.js +18 -0
- package/browser-ShRLuKKz.mjs +18 -0
- package/browser-t7nfT7HL.js +19 -0
- package/card-BJg5bdoM.mjs +18 -0
- package/card-hxUDXttT.js +19 -0
- package/checkmark-BpR0Yy93.mjs +15 -0
- package/checkmark-D9AVWgl5.js +16 -0
- package/checkmark-bold-D3Xcby1U.mjs +12 -0
- package/checkmark-bold-De02hde8.js +13 -0
- package/chevron-bottom-DcBf7T5F.js +13 -0
- package/chevron-bottom-DfGpWIz7.mjs +12 -0
- package/chevron-left-BKvYVnUo.js +13 -0
- package/chevron-left-DGSG9WJQ.mjs +12 -0
- package/chevron-right-BLgYIEeO.js +13 -0
- package/chevron-right-C2nsTx_Y.mjs +12 -0
- package/chevron-top-CwFOEFy8.js +13 -0
- package/chevron-top-vk-9DvUU.mjs +12 -0
- package/chrome-store-4H_ie3vA.mjs +65 -0
- package/chrome-store-BWarxVMl.js +66 -0
- package/circle-BtqWJU0_.mjs +8 -0
- package/circle-DYjG6o7-.js +9 -0
- package/clock-Ba5SM-pl.mjs +12 -0
- package/clock-DPzNREdU.js +13 -0
- package/close-CJHKFOyp.mjs +12 -0
- package/close-DDWnJdJe.js +13 -0
- package/coinPlaceholder-Cbba3D1H.mjs +12 -0
- package/coinPlaceholder-DdxQIc2D.js +13 -0
- package/compass-CugCxeSC.js +13 -0
- package/compass-DbN5DkTl.mjs +12 -0
- package/copy-CHSZprYJ.mjs +19 -0
- package/copy-En5h5Uhu.js +20 -0
- package/cursor-DCRkvEhr.mjs +7 -0
- package/cursor-DnEQtrUK.js +8 -0
- package/cursor-transparent-CU8lk-xg.js +17 -0
- package/cursor-transparent-CliETg4d.mjs +16 -0
- package/desktop-BgD7aypB.js +14 -0
- package/desktop-Cg5I32-p.mjs +13 -0
- package/disconnect-CCyMbAdw.js +13 -0
- package/disconnect-Cp2vRWB2.mjs +12 -0
- package/discord-B1d-qeSk.mjs +21 -0
- package/discord-BEB5klec.js +22 -0
- package/email-CorlePKz.js +873 -0
- package/email-Znno7H8_.mjs +878 -0
- package/embedded-wallet-B9ro9Tel.js +549 -0
- package/embedded-wallet-CnTWeseG.mjs +552 -0
- package/ethereum-BRcsRjUU.mjs +14 -0
- package/ethereum-CZ_xe09e.js +15 -0
- package/etherscan-BZKGpKp8.mjs +10 -0
- package/etherscan-DtLi-C3z.js +11 -0
- package/exclamation-triangle-BLNnBLEc.js +9 -0
- package/exclamation-triangle-CFThXxRT.mjs +8 -0
- package/extension-CwUepr-W.mjs +12 -0
- package/extension-DOD67G1k.js +13 -0
- package/external-link-CZkQS5XK.js +13 -0
- package/external-link-ClYNKSPt.mjs +12 -0
- package/facebook-CFjrd4my.mjs +30 -0
- package/facebook-CbE6K6AK.js +31 -0
- package/farcaster-Ba7_C-Vm.js +17 -0
- package/farcaster-DyVJtVS9.mjs +16 -0
- package/filters-CpHaFNjT.mjs +12 -0
- package/filters-w5LC-r6e.js +13 -0
- package/github-CeO70C3E.mjs +22 -0
- package/github-uLFBWAa5.js +23 -0
- package/google-CyOdUlbw.mjs +22 -0
- package/google-ILGK-opP.js +23 -0
- package/help-circle-Dh3dRNoB.mjs +16 -0
- package/help-circle-HUMbz_KN.js +17 -0
- package/id-Cy3Qkrvb.js +17 -0
- package/id-D-Q0uPFM.mjs +16 -0
- package/if-defined-CJ5EZLw2.js +815 -0
- package/if-defined-DjC5UMfF.mjs +815 -0
- package/image-BTGOf8bb.mjs +8 -0
- package/image-WFQO5bWa.js +9 -0
- package/index--O5ypTeK.mjs +70 -0
- package/index--Vg7VI9t.js +173 -0
- package/index-2iRSO1sa.mjs +9964 -0
- package/index-42Rpweo5.mjs +95 -0
- package/index-70kjE43k.mjs +90 -0
- package/index-8VyNYS01.js +273 -0
- package/index-B-dx8l0g.mjs +82 -0
- package/index-BB0nW9RB.mjs +198 -0
- package/index-BBwuv2SS.js +97 -0
- package/index-BIe-kofv.mjs +273 -0
- package/index-BQf6VHil.js +278 -0
- package/index-BWIZXhFv.mjs +630 -0
- package/index-BXkamf-I.js +337 -0
- package/index-BYTxCmKH.js +64 -0
- package/index-BYoOxo0S.js +218 -0
- package/index-Ba0tVdql.js +200 -0
- package/index-BdOAPWyt.mjs +210 -0
- package/index-BirWzf8c.mjs +71 -0
- package/index-BnCJUHtW.mjs +346 -0
- package/index-BuL2FC61.mjs +216 -0
- package/index-BxSUTfaY.js +88 -0
- package/index-C49C5Rxf.js +743 -0
- package/index-CNMDBpW7.js +346 -0
- package/index-CP0CGjqQ.mjs +263 -0
- package/index-CQaHcTZM.mjs +86 -0
- package/index-CRGXQei1.js +178 -0
- package/index-CSykUIfV.mjs +176 -0
- package/index-CWIHaLkQ.mjs +101 -0
- package/index-CZSDJd0P.mjs +1070 -0
- package/index-CZaV8JgR.mjs +49 -0
- package/index-CZjdy6QP.js +101 -0
- package/index-C_lIGGlC.js +632 -0
- package/index-CcgeRPs2.mjs +57 -0
- package/index-CeY_DRuc.js +566 -0
- package/index-ChFNkSxT.js +92 -0
- package/index-CkjZc20w.js +677 -0
- package/index-CtFcWwAd.js +72 -0
- package/index-D0mOfznC.mjs +362 -0
- package/index-DAtWLY21.js +84 -0
- package/index-DEs8H3w2.js +262 -0
- package/index-DLnxotbC.mjs +566 -0
- package/index-DN4fGDgg.mjs +743 -0
- package/index-DT_mc1hV.mjs +335 -0
- package/index-DZEwxUMS.js +59 -0
- package/index-DaRH_4bD.js +9939 -0
- package/index-Daok2ZKn.js +73 -0
- package/index-DomzHmwk.js +210 -0
- package/index-Dx7NyDyv.mjs +101 -0
- package/index-DyGir6_2.mjs +675 -0
- package/index-GglJmM2C.js +2237 -0
- package/index-H5b7UTeJ.mjs +173 -0
- package/index-NNZ1lNuc.mjs +168 -0
- package/index-RJd-gQcv.mjs +2235 -0
- package/index-dnFzVpGy.js +103 -0
- package/index-kwVLu8EV.js +168 -0
- package/index-miQwZPmn.js +51 -0
- package/index-oCj_SpOa.mjs +62 -0
- package/index-pNK-h_x9.js +1069 -0
- package/index-r6Kre1rx.js +362 -0
- package/index-xBD0nXoB.mjs +276 -0
- package/index.js +3 -3
- package/index.mjs +3 -3
- package/info-BKNAiN0k.js +8 -0
- package/info-DQE0s-A4.mjs +7 -0
- package/info-circle-C3uTocjH.js +17 -0
- package/info-circle-CIn6yeQo.mjs +16 -0
- package/lightbulb-CB-BmIop.js +8 -0
- package/lightbulb-Gv7IbnzO.mjs +7 -0
- package/mail-CFYm95wn.mjs +12 -0
- package/mail-GEwk-Fzr.js +13 -0
- package/mobile-CZ7ZBfa5.js +14 -0
- package/mobile-OIbnpFsU.mjs +13 -0
- package/more-C8N_RV55.mjs +15 -0
- package/more-CiQpPZwq.js +16 -0
- package/network-placeholder-CxEcczEx.mjs +18 -0
- package/network-placeholder-DwR8E8hP.js +19 -0
- package/nftPlaceholder-BFexVcGX.js +13 -0
- package/nftPlaceholder-MiYL110I.mjs +12 -0
- package/off-BNiMlpUU.mjs +8 -0
- package/off-iJHSK3Z7.js +9 -0
- package/onramp-Bs8HHFFY.js +1474 -0
- package/onramp-C6fuQfX7.mjs +1480 -0
- package/package.json +11 -11
- package/play-store-B4ssIYUA.js +37 -0
- package/play-store-D6nmQXhX.mjs +36 -0
- package/plus-Bh7z7Oc0.js +18 -0
- package/plus-C8ioZuCD.mjs +17 -0
- package/qr-code-CSVwaBLf.mjs +10 -0
- package/qr-code-YgtXPokK.js +11 -0
- package/react-BWxe90Ar.mjs +6342 -0
- package/react-BzZcQig5.js +6342 -0
- package/react-C_wTMVq_.js +23003 -0
- package/react-M-DnxvZl.mjs +23003 -0
- package/reactjs/components/BridgeForm/BridgeForm.js +2 -1
- package/reactjs/components/BridgeForm/BridgeForm.mjs +2 -1
- package/reactjs/components/Connect/BridgeAccountDisplay.js +3 -2
- package/reactjs/components/Connect/BridgeAccountDisplay.mjs +3 -2
- package/reactjs/components/Connect/CustomConnectButton.js +3 -2
- package/reactjs/components/Connect/CustomConnectButton.mjs +3 -2
- package/reactjs/components/Connect/SwitchChainButton.js +4 -3
- package/reactjs/components/Connect/SwitchChainButton.mjs +4 -3
- package/reactjs/components/DisplayAmount/DisplayAmount.js +1 -1
- package/reactjs/components/DisplayAmount/DisplayAmount.mjs +1 -1
- package/reactjs/components/TokenSelector/components/TokenItem.js +1 -1
- package/reactjs/components/TokenSelector/components/TokenItem.mjs +1 -1
- package/reactjs/hooks/useAccount.d.ts +4 -4
- package/reactjs/hooks/useAccount.js +3 -2
- package/reactjs/hooks/useAccount.mjs +3 -2
- package/reactjs/hooks/useGetChainId.js +1 -1
- package/reactjs/hooks/useGetChainId.mjs +1 -1
- package/reactjs/index.js +3 -3
- package/reactjs/index.mjs +3 -3
- package/reactjs/init/init.js +4 -3
- package/reactjs/init/init.mjs +4 -3
- package/reactjs/init/tests/init.spec.js +2 -2
- package/reactjs/init/tests/init.spec.mjs +2 -2
- package/reactjs/queries/useGetEvmTokensBalances.query.js +3 -2
- package/reactjs/queries/useGetEvmTokensBalances.query.mjs +3 -2
- package/reactjs/reexports.js +3 -3
- package/reactjs/reexports.mjs +3 -3
- package/reactjs/utils/getCleanStringAmount.js +1 -1
- package/reactjs/utils/getCleanStringAmount.mjs +1 -1
- package/reactjs/utils/hasEnoughFunds.js +1 -1
- package/reactjs/utils/hasEnoughFunds.mjs +1 -1
- package/reactjs/utils/isStringFloat.js +1 -1
- package/reactjs/utils/isStringFloat.mjs +1 -1
- package/reactjs/utils/roundAmount.js +1 -1
- package/reactjs/utils/roundAmount.mjs +1 -1
- package/receive-CK0hRQPr.js +212 -0
- package/receive-CQcD6bZf.mjs +212 -0
- package/recycle-horizontal--x5cMoTE.js +14 -0
- package/recycle-horizontal-QI0xtDHK.mjs +13 -0
- package/ref-CqxfRkBm.mjs +41 -0
- package/ref-FGI2cUQB.js +41 -0
- package/refresh-CFNHjhDi.js +13 -0
- package/refresh-CSOC1NUY.mjs +12 -0
- package/reown-logo-BfU5xFX5.js +17 -0
- package/reown-logo-CZAEp1jU.mjs +16 -0
- package/search-Do_rb-9-.mjs +12 -0
- package/search-V9CGMHkm.js +13 -0
- package/send-D-5G7tDL.mjs +1204 -0
- package/send-D4yYsIHV.mjs +19 -0
- package/send-DoiSHLsX.js +1202 -0
- package/send-_jfNFrys.js +20 -0
- package/socials-BL7-97fT.mjs +758 -0
- package/socials-DF0CK9cN.js +756 -0
- package/solana-BQ0Jh8lh.js +18 -0
- package/solana-YAkDp6j_.mjs +17 -0
- package/swapHorizontal-DOIo-Ccx.mjs +12 -0
- package/swapHorizontal-OHKtz4Gu.js +13 -0
- package/swapHorizontalBold-D7QmFj-c.js +13 -0
- package/swapHorizontalBold-DDroA0Af.mjs +12 -0
- package/swapHorizontalMedium-CU_v0kFz.mjs +20 -0
- package/swapHorizontalMedium-D-yMmtml.js +21 -0
- package/swapHorizontalRoundedBold-CHvbmnjw.js +13 -0
- package/swapHorizontalRoundedBold-DXMH0sgK.mjs +12 -0
- package/swapVertical-CH7fTK6w.js +13 -0
- package/swapVertical-HJZ6rFcr.mjs +12 -0
- package/swaps-CETflhdU.js +1952 -0
- package/swaps-DRUV6d3p.mjs +1954 -0
- package/telegram-CsCauOwj.mjs +20 -0
- package/telegram-DKEcF_Tq.js +21 -0
- package/three-dots-B-7hr8Nl.js +10 -0
- package/three-dots-LNZ_fjP7.mjs +9 -0
- package/transactions-BTTsGV2W.mjs +37 -0
- package/transactions-mpNNlClw.js +37 -0
- package/twitch-CCWVT2ij.js +23 -0
- package/twitch-Dg1CCQvd.mjs +22 -0
- package/twitterIcon-BjR09Cj9.mjs +10 -0
- package/twitterIcon-CeEs0iDJ.js +11 -0
- package/verify-B8WZq7kt.mjs +12 -0
- package/verify-filled-BeqC1imk.mjs +12 -0
- package/verify-filled-C-mv3ApD.js +13 -0
- package/verify-yATdPqt-.js +13 -0
- package/w3m-modal-3GziKj7h.js +1254 -0
- package/w3m-modal-81Z5PngE.mjs +1255 -0
- package/wallet-BMXEH23x.js +13 -0
- package/wallet-CNAVQCfm.mjs +12 -0
- package/wallet-placeholder-CQ-7CmVN.mjs +18 -0
- package/wallet-placeholder-CdoQy2e6.js +19 -0
- package/walletconnect-ACr-R1QZ.mjs +38 -0
- package/walletconnect-BWSkiS2F.js +39 -0
- package/warning-circle-CYnuYwpt.js +17 -0
- package/warning-circle-HV2lOiCj.mjs +16 -0
- package/x-CW5dozRj.js +17 -0
- package/x-Cgm2OFpL.mjs +16 -0
- package/x-mark-CR8SpZvu.js +8 -0
- package/x-mark-u0KJjUJ1.mjs +7 -0
- package/index-B4Eq5P3w.mjs +0 -91
- package/index-C4WV9nam.js +0 -329
- package/index-CWMcKi_X.js +0 -107
- package/index-D8E0O3qL.mjs +0 -68744
- package/index-DJ8CdHSw.mjs +0 -107
- package/index-nigVQYBu.js +0 -68665
- package/react-C43nEIqn.js +0 -3133
- package/react-DKUsVej7.js +0 -50
- package/react-Dp0H8q2z.mjs +0 -50
- package/react-wMhOUFOm.mjs +0 -3133
- package/w3m-modal-DLyg7Voy.js +0 -356
- package/w3m-modal-hC-B8qZP.mjs +0 -356
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { i, c as resetStyles, e as elementStyles, f as i$1, x } from "./bitcoin-dNBGbS2B.mjs";
|
|
2
|
+
import { n, c as customElement, o } from "./if-defined-DjC5UMfF.mjs";
|
|
3
|
+
const styles = i`
|
|
4
|
+
button {
|
|
5
|
+
padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs);
|
|
6
|
+
border-radius: var(--wui-border-radius-3xs);
|
|
7
|
+
background-color: transparent;
|
|
8
|
+
color: var(--wui-color-accent-100);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
button:disabled {
|
|
12
|
+
background-color: transparent;
|
|
13
|
+
color: var(--wui-color-gray-glass-015);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
button:hover {
|
|
17
|
+
background-color: var(--wui-color-gray-glass-005);
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
var __decorate = function(decorators, target, key, desc) {
|
|
21
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
22
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
23
|
+
else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
24
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
25
|
+
};
|
|
26
|
+
let WuiLink = class WuiLink2 extends i$1 {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments);
|
|
29
|
+
this.tabIdx = void 0;
|
|
30
|
+
this.disabled = false;
|
|
31
|
+
this.color = "inherit";
|
|
32
|
+
}
|
|
33
|
+
render() {
|
|
34
|
+
return x`
|
|
35
|
+
<button ?disabled=${this.disabled} tabindex=${o(this.tabIdx)}>
|
|
36
|
+
<slot name="iconLeft"></slot>
|
|
37
|
+
<wui-text variant="small-600" color=${this.color}>
|
|
38
|
+
<slot></slot>
|
|
39
|
+
</wui-text>
|
|
40
|
+
<slot name="iconRight"></slot>
|
|
41
|
+
</button>
|
|
42
|
+
`;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
WuiLink.styles = [resetStyles, elementStyles, styles];
|
|
46
|
+
__decorate([
|
|
47
|
+
n()
|
|
48
|
+
], WuiLink.prototype, "tabIdx", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
n({ type: Boolean })
|
|
51
|
+
], WuiLink.prototype, "disabled", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
n()
|
|
54
|
+
], WuiLink.prototype, "color", void 0);
|
|
55
|
+
WuiLink = __decorate([
|
|
56
|
+
customElement("wui-link")
|
|
57
|
+
], WuiLink);
|
|
@@ -0,0 +1,566 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
const ifDefined = require("./if-defined-CJ5EZLw2.js");
|
|
4
|
+
const bitcoin = require("./bitcoin-DAvQGpeP.js");
|
|
5
|
+
require("./index-DAtWLY21.js");
|
|
6
|
+
var dayjs_min = { exports: {} };
|
|
7
|
+
(function(module2, exports2) {
|
|
8
|
+
!function(t, e) {
|
|
9
|
+
module2.exports = e();
|
|
10
|
+
}(bitcoin.commonjsGlobal, function() {
|
|
11
|
+
var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) {
|
|
12
|
+
var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
|
|
13
|
+
return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
|
|
14
|
+
} }, m = function(t2, e2, n2) {
|
|
15
|
+
var r2 = String(t2);
|
|
16
|
+
return !r2 || r2.length >= e2 ? t2 : "" + Array(e2 + 1 - r2.length).join(n2) + t2;
|
|
17
|
+
}, v = { s: m, z: function(t2) {
|
|
18
|
+
var e2 = -t2.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60;
|
|
19
|
+
return (e2 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0");
|
|
20
|
+
}, m: function t2(e2, n2) {
|
|
21
|
+
if (e2.date() < n2.date()) return -t2(n2, e2);
|
|
22
|
+
var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, c), s2 = n2 - i2 < 0, u2 = e2.clone().add(r2 + (s2 ? -1 : 1), c);
|
|
23
|
+
return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
|
|
24
|
+
}, a: function(t2) {
|
|
25
|
+
return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
|
|
26
|
+
}, p: function(t2) {
|
|
27
|
+
return { M: c, y: h, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: f }[t2] || String(t2 || "").toLowerCase().replace(/s$/, "");
|
|
28
|
+
}, u: function(t2) {
|
|
29
|
+
return void 0 === t2;
|
|
30
|
+
} }, g = "en", D = {};
|
|
31
|
+
D[g] = M;
|
|
32
|
+
var p = "$isDayjsObject", S = function(t2) {
|
|
33
|
+
return t2 instanceof _ || !(!t2 || !t2[p]);
|
|
34
|
+
}, w = function t2(e2, n2, r2) {
|
|
35
|
+
var i2;
|
|
36
|
+
if (!e2) return g;
|
|
37
|
+
if ("string" == typeof e2) {
|
|
38
|
+
var s2 = e2.toLowerCase();
|
|
39
|
+
D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2);
|
|
40
|
+
var u2 = e2.split("-");
|
|
41
|
+
if (!i2 && u2.length > 1) return t2(u2[0]);
|
|
42
|
+
} else {
|
|
43
|
+
var a2 = e2.name;
|
|
44
|
+
D[a2] = e2, i2 = a2;
|
|
45
|
+
}
|
|
46
|
+
return !r2 && i2 && (g = i2), i2 || !r2 && g;
|
|
47
|
+
}, O = function(t2, e2) {
|
|
48
|
+
if (S(t2)) return t2.clone();
|
|
49
|
+
var n2 = "object" == typeof e2 ? e2 : {};
|
|
50
|
+
return n2.date = t2, n2.args = arguments, new _(n2);
|
|
51
|
+
}, b = v;
|
|
52
|
+
b.l = w, b.i = S, b.w = function(t2, e2) {
|
|
53
|
+
return O(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
|
|
54
|
+
};
|
|
55
|
+
var _ = function() {
|
|
56
|
+
function M2(t2) {
|
|
57
|
+
this.$L = w(t2.locale, null, true), this.parse(t2), this.$x = this.$x || t2.x || {}, this[p] = true;
|
|
58
|
+
}
|
|
59
|
+
var m2 = M2.prototype;
|
|
60
|
+
return m2.parse = function(t2) {
|
|
61
|
+
this.$d = function(t3) {
|
|
62
|
+
var e2 = t3.date, n2 = t3.utc;
|
|
63
|
+
if (null === e2) return /* @__PURE__ */ new Date(NaN);
|
|
64
|
+
if (b.u(e2)) return /* @__PURE__ */ new Date();
|
|
65
|
+
if (e2 instanceof Date) return new Date(e2);
|
|
66
|
+
if ("string" == typeof e2 && !/Z$/i.test(e2)) {
|
|
67
|
+
var r2 = e2.match($);
|
|
68
|
+
if (r2) {
|
|
69
|
+
var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3);
|
|
70
|
+
return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return new Date(e2);
|
|
74
|
+
}(t2), this.init();
|
|
75
|
+
}, m2.init = function() {
|
|
76
|
+
var t2 = this.$d;
|
|
77
|
+
this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds();
|
|
78
|
+
}, m2.$utils = function() {
|
|
79
|
+
return b;
|
|
80
|
+
}, m2.isValid = function() {
|
|
81
|
+
return !(this.$d.toString() === l);
|
|
82
|
+
}, m2.isSame = function(t2, e2) {
|
|
83
|
+
var n2 = O(t2);
|
|
84
|
+
return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
|
|
85
|
+
}, m2.isAfter = function(t2, e2) {
|
|
86
|
+
return O(t2) < this.startOf(e2);
|
|
87
|
+
}, m2.isBefore = function(t2, e2) {
|
|
88
|
+
return this.endOf(e2) < O(t2);
|
|
89
|
+
}, m2.$g = function(t2, e2, n2) {
|
|
90
|
+
return b.u(t2) ? this[e2] : this.set(n2, t2);
|
|
91
|
+
}, m2.unix = function() {
|
|
92
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
93
|
+
}, m2.valueOf = function() {
|
|
94
|
+
return this.$d.getTime();
|
|
95
|
+
}, m2.startOf = function(t2, e2) {
|
|
96
|
+
var n2 = this, r2 = !!b.u(e2) || e2, f2 = b.p(t2), l2 = function(t3, e3) {
|
|
97
|
+
var i2 = b.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
|
|
98
|
+
return r2 ? i2 : i2.endOf(a);
|
|
99
|
+
}, $2 = function(t3, e3) {
|
|
100
|
+
return b.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
|
|
101
|
+
}, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
|
|
102
|
+
switch (f2) {
|
|
103
|
+
case h:
|
|
104
|
+
return r2 ? l2(1, 0) : l2(31, 11);
|
|
105
|
+
case c:
|
|
106
|
+
return r2 ? l2(1, M3) : l2(0, M3 + 1);
|
|
107
|
+
case o:
|
|
108
|
+
var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
|
|
109
|
+
return l2(r2 ? m3 - D2 : m3 + (6 - D2), M3);
|
|
110
|
+
case a:
|
|
111
|
+
case d:
|
|
112
|
+
return $2(v2 + "Hours", 0);
|
|
113
|
+
case u:
|
|
114
|
+
return $2(v2 + "Minutes", 1);
|
|
115
|
+
case s:
|
|
116
|
+
return $2(v2 + "Seconds", 2);
|
|
117
|
+
case i:
|
|
118
|
+
return $2(v2 + "Milliseconds", 3);
|
|
119
|
+
default:
|
|
120
|
+
return this.clone();
|
|
121
|
+
}
|
|
122
|
+
}, m2.endOf = function(t2) {
|
|
123
|
+
return this.startOf(t2, false);
|
|
124
|
+
}, m2.$set = function(t2, e2) {
|
|
125
|
+
var n2, o2 = b.p(t2), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = f2 + "Date", n2[d] = f2 + "Date", n2[c] = f2 + "Month", n2[h] = f2 + "FullYear", n2[u] = f2 + "Hours", n2[s] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2;
|
|
126
|
+
if (o2 === c || o2 === h) {
|
|
127
|
+
var y2 = this.clone().set(d, 1);
|
|
128
|
+
y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
|
|
129
|
+
} else l2 && this.$d[l2]($2);
|
|
130
|
+
return this.init(), this;
|
|
131
|
+
}, m2.set = function(t2, e2) {
|
|
132
|
+
return this.clone().$set(t2, e2);
|
|
133
|
+
}, m2.get = function(t2) {
|
|
134
|
+
return this[b.p(t2)]();
|
|
135
|
+
}, m2.add = function(r2, f2) {
|
|
136
|
+
var d2, l2 = this;
|
|
137
|
+
r2 = Number(r2);
|
|
138
|
+
var $2 = b.p(f2), y2 = function(t2) {
|
|
139
|
+
var e2 = O(l2);
|
|
140
|
+
return b.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
|
|
141
|
+
};
|
|
142
|
+
if ($2 === c) return this.set(c, this.$M + r2);
|
|
143
|
+
if ($2 === h) return this.set(h, this.$y + r2);
|
|
144
|
+
if ($2 === a) return y2(1);
|
|
145
|
+
if ($2 === o) return y2(7);
|
|
146
|
+
var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
|
|
147
|
+
return b.w(m3, this);
|
|
148
|
+
}, m2.subtract = function(t2, e2) {
|
|
149
|
+
return this.add(-1 * t2, e2);
|
|
150
|
+
}, m2.format = function(t2) {
|
|
151
|
+
var e2 = this, n2 = this.$locale();
|
|
152
|
+
if (!this.isValid()) return n2.invalidDate || l;
|
|
153
|
+
var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h2 = function(t3, n3, i3, s3) {
|
|
154
|
+
return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3);
|
|
155
|
+
}, d2 = function(t3) {
|
|
156
|
+
return b.s(s2 % 12 || 12, t3, "0");
|
|
157
|
+
}, $2 = f2 || function(t3, e3, n3) {
|
|
158
|
+
var r3 = t3 < 12 ? "AM" : "PM";
|
|
159
|
+
return n3 ? r3.toLowerCase() : r3;
|
|
160
|
+
};
|
|
161
|
+
return r2.replace(y, function(t3, r3) {
|
|
162
|
+
return r3 || function(t4) {
|
|
163
|
+
switch (t4) {
|
|
164
|
+
case "YY":
|
|
165
|
+
return String(e2.$y).slice(-2);
|
|
166
|
+
case "YYYY":
|
|
167
|
+
return b.s(e2.$y, 4, "0");
|
|
168
|
+
case "M":
|
|
169
|
+
return a2 + 1;
|
|
170
|
+
case "MM":
|
|
171
|
+
return b.s(a2 + 1, 2, "0");
|
|
172
|
+
case "MMM":
|
|
173
|
+
return h2(n2.monthsShort, a2, c2, 3);
|
|
174
|
+
case "MMMM":
|
|
175
|
+
return h2(c2, a2);
|
|
176
|
+
case "D":
|
|
177
|
+
return e2.$D;
|
|
178
|
+
case "DD":
|
|
179
|
+
return b.s(e2.$D, 2, "0");
|
|
180
|
+
case "d":
|
|
181
|
+
return String(e2.$W);
|
|
182
|
+
case "dd":
|
|
183
|
+
return h2(n2.weekdaysMin, e2.$W, o2, 2);
|
|
184
|
+
case "ddd":
|
|
185
|
+
return h2(n2.weekdaysShort, e2.$W, o2, 3);
|
|
186
|
+
case "dddd":
|
|
187
|
+
return o2[e2.$W];
|
|
188
|
+
case "H":
|
|
189
|
+
return String(s2);
|
|
190
|
+
case "HH":
|
|
191
|
+
return b.s(s2, 2, "0");
|
|
192
|
+
case "h":
|
|
193
|
+
return d2(1);
|
|
194
|
+
case "hh":
|
|
195
|
+
return d2(2);
|
|
196
|
+
case "a":
|
|
197
|
+
return $2(s2, u2, true);
|
|
198
|
+
case "A":
|
|
199
|
+
return $2(s2, u2, false);
|
|
200
|
+
case "m":
|
|
201
|
+
return String(u2);
|
|
202
|
+
case "mm":
|
|
203
|
+
return b.s(u2, 2, "0");
|
|
204
|
+
case "s":
|
|
205
|
+
return String(e2.$s);
|
|
206
|
+
case "ss":
|
|
207
|
+
return b.s(e2.$s, 2, "0");
|
|
208
|
+
case "SSS":
|
|
209
|
+
return b.s(e2.$ms, 3, "0");
|
|
210
|
+
case "Z":
|
|
211
|
+
return i2;
|
|
212
|
+
}
|
|
213
|
+
return null;
|
|
214
|
+
}(t3) || i2.replace(":", "");
|
|
215
|
+
});
|
|
216
|
+
}, m2.utcOffset = function() {
|
|
217
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
218
|
+
}, m2.diff = function(r2, d2, l2) {
|
|
219
|
+
var $2, y2 = this, M3 = b.p(d2), m3 = O(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() {
|
|
220
|
+
return b.m(y2, m3);
|
|
221
|
+
};
|
|
222
|
+
switch (M3) {
|
|
223
|
+
case h:
|
|
224
|
+
$2 = D2() / 12;
|
|
225
|
+
break;
|
|
226
|
+
case c:
|
|
227
|
+
$2 = D2();
|
|
228
|
+
break;
|
|
229
|
+
case f:
|
|
230
|
+
$2 = D2() / 3;
|
|
231
|
+
break;
|
|
232
|
+
case o:
|
|
233
|
+
$2 = (g2 - v2) / 6048e5;
|
|
234
|
+
break;
|
|
235
|
+
case a:
|
|
236
|
+
$2 = (g2 - v2) / 864e5;
|
|
237
|
+
break;
|
|
238
|
+
case u:
|
|
239
|
+
$2 = g2 / n;
|
|
240
|
+
break;
|
|
241
|
+
case s:
|
|
242
|
+
$2 = g2 / e;
|
|
243
|
+
break;
|
|
244
|
+
case i:
|
|
245
|
+
$2 = g2 / t;
|
|
246
|
+
break;
|
|
247
|
+
default:
|
|
248
|
+
$2 = g2;
|
|
249
|
+
}
|
|
250
|
+
return l2 ? $2 : b.a($2);
|
|
251
|
+
}, m2.daysInMonth = function() {
|
|
252
|
+
return this.endOf(c).$D;
|
|
253
|
+
}, m2.$locale = function() {
|
|
254
|
+
return D[this.$L];
|
|
255
|
+
}, m2.locale = function(t2, e2) {
|
|
256
|
+
if (!t2) return this.$L;
|
|
257
|
+
var n2 = this.clone(), r2 = w(t2, e2, true);
|
|
258
|
+
return r2 && (n2.$L = r2), n2;
|
|
259
|
+
}, m2.clone = function() {
|
|
260
|
+
return b.w(this.$d, this);
|
|
261
|
+
}, m2.toDate = function() {
|
|
262
|
+
return new Date(this.valueOf());
|
|
263
|
+
}, m2.toJSON = function() {
|
|
264
|
+
return this.isValid() ? this.toISOString() : null;
|
|
265
|
+
}, m2.toISOString = function() {
|
|
266
|
+
return this.$d.toISOString();
|
|
267
|
+
}, m2.toString = function() {
|
|
268
|
+
return this.$d.toUTCString();
|
|
269
|
+
}, M2;
|
|
270
|
+
}(), k = _.prototype;
|
|
271
|
+
return O.prototype = k, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach(function(t2) {
|
|
272
|
+
k[t2[1]] = function(e2) {
|
|
273
|
+
return this.$g(e2, t2[0], t2[1]);
|
|
274
|
+
};
|
|
275
|
+
}), O.extend = function(t2, e2) {
|
|
276
|
+
return t2.$i || (t2(e2, _, O), t2.$i = true), O;
|
|
277
|
+
}, O.locale = w, O.isDayjs = S, O.unix = function(t2) {
|
|
278
|
+
return O(1e3 * t2);
|
|
279
|
+
}, O.en = D[g], O.Ls = D, O.p = {}, O;
|
|
280
|
+
});
|
|
281
|
+
})(dayjs_min);
|
|
282
|
+
var dayjs_minExports = dayjs_min.exports;
|
|
283
|
+
const dayjs = /* @__PURE__ */ bitcoin.getDefaultExportFromCjs(dayjs_minExports);
|
|
284
|
+
var en = { exports: {} };
|
|
285
|
+
(function(module2, exports2) {
|
|
286
|
+
!function(e, n) {
|
|
287
|
+
module2.exports = n();
|
|
288
|
+
}(bitcoin.commonjsGlobal, function() {
|
|
289
|
+
return { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(e) {
|
|
290
|
+
var n = ["th", "st", "nd", "rd"], t = e % 100;
|
|
291
|
+
return "[" + e + (n[(t - 20) % 10] || n[t] || n[0]) + "]";
|
|
292
|
+
} };
|
|
293
|
+
});
|
|
294
|
+
})(en);
|
|
295
|
+
var enExports = en.exports;
|
|
296
|
+
const englishLocale = /* @__PURE__ */ bitcoin.getDefaultExportFromCjs(enExports);
|
|
297
|
+
var relativeTime$1 = { exports: {} };
|
|
298
|
+
(function(module2, exports2) {
|
|
299
|
+
!function(r, e) {
|
|
300
|
+
module2.exports = e();
|
|
301
|
+
}(bitcoin.commonjsGlobal, function() {
|
|
302
|
+
return function(r, e, t) {
|
|
303
|
+
r = r || {};
|
|
304
|
+
var n = e.prototype, o = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
|
|
305
|
+
function i(r2, e2, t2, o2) {
|
|
306
|
+
return n.fromToBase(r2, e2, t2, o2);
|
|
307
|
+
}
|
|
308
|
+
t.en.relativeTime = o, n.fromToBase = function(e2, n2, i2, d2, u) {
|
|
309
|
+
for (var f, a, s, l = i2.$locale().relativeTime || o, h = r.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], m = h.length, c = 0; c < m; c += 1) {
|
|
310
|
+
var y = h[c];
|
|
311
|
+
y.d && (f = d2 ? t(e2).diff(i2, y.d, true) : i2.diff(e2, y.d, true));
|
|
312
|
+
var p = (r.rounding || Math.round)(Math.abs(f));
|
|
313
|
+
if (s = f > 0, p <= y.r || !y.r) {
|
|
314
|
+
p <= 1 && c > 0 && (y = h[c - 1]);
|
|
315
|
+
var v = l[y.l];
|
|
316
|
+
u && (p = u("" + p)), a = "string" == typeof v ? v.replace("%d", p) : v(p, n2, y.l, s);
|
|
317
|
+
break;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
if (n2) return a;
|
|
321
|
+
var M = s ? l.future : l.past;
|
|
322
|
+
return "function" == typeof M ? M(a) : M.replace("%s", a);
|
|
323
|
+
}, n.to = function(r2, e2) {
|
|
324
|
+
return i(r2, e2, this, true);
|
|
325
|
+
}, n.from = function(r2, e2) {
|
|
326
|
+
return i(r2, e2, this);
|
|
327
|
+
};
|
|
328
|
+
var d = function(r2) {
|
|
329
|
+
return r2.$u ? t.utc() : t();
|
|
330
|
+
};
|
|
331
|
+
n.toNow = function(r2) {
|
|
332
|
+
return this.to(d(this), r2);
|
|
333
|
+
}, n.fromNow = function(r2) {
|
|
334
|
+
return this.from(d(this), r2);
|
|
335
|
+
};
|
|
336
|
+
};
|
|
337
|
+
});
|
|
338
|
+
})(relativeTime$1);
|
|
339
|
+
var relativeTimeExports = relativeTime$1.exports;
|
|
340
|
+
const relativeTime = /* @__PURE__ */ bitcoin.getDefaultExportFromCjs(relativeTimeExports);
|
|
341
|
+
var updateLocale$1 = { exports: {} };
|
|
342
|
+
(function(module2, exports2) {
|
|
343
|
+
!function(e, n) {
|
|
344
|
+
module2.exports = n();
|
|
345
|
+
}(bitcoin.commonjsGlobal, function() {
|
|
346
|
+
return function(e, n, t) {
|
|
347
|
+
t.updateLocale = function(e2, n2) {
|
|
348
|
+
var o = t.Ls[e2];
|
|
349
|
+
if (o) return (n2 ? Object.keys(n2) : []).forEach(function(e3) {
|
|
350
|
+
o[e3] = n2[e3];
|
|
351
|
+
}), o;
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
});
|
|
355
|
+
})(updateLocale$1);
|
|
356
|
+
var updateLocaleExports = updateLocale$1.exports;
|
|
357
|
+
const updateLocale = /* @__PURE__ */ bitcoin.getDefaultExportFromCjs(updateLocaleExports);
|
|
358
|
+
dayjs.extend(relativeTime);
|
|
359
|
+
dayjs.extend(updateLocale);
|
|
360
|
+
const localeObject = {
|
|
361
|
+
...englishLocale,
|
|
362
|
+
name: "en-web3-modal",
|
|
363
|
+
relativeTime: {
|
|
364
|
+
future: "in %s",
|
|
365
|
+
past: "%s ago",
|
|
366
|
+
s: "%d sec",
|
|
367
|
+
m: "1 min",
|
|
368
|
+
mm: "%d min",
|
|
369
|
+
h: "1 hr",
|
|
370
|
+
hh: "%d hrs",
|
|
371
|
+
d: "1 d",
|
|
372
|
+
dd: "%d d",
|
|
373
|
+
M: "1 mo",
|
|
374
|
+
MM: "%d mo",
|
|
375
|
+
y: "1 yr",
|
|
376
|
+
yy: "%d yr"
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
const MONTH_NAMES = [
|
|
380
|
+
"January",
|
|
381
|
+
"February",
|
|
382
|
+
"March",
|
|
383
|
+
"April",
|
|
384
|
+
"May",
|
|
385
|
+
"June",
|
|
386
|
+
"July",
|
|
387
|
+
"August",
|
|
388
|
+
"September",
|
|
389
|
+
"October",
|
|
390
|
+
"November",
|
|
391
|
+
"December"
|
|
392
|
+
];
|
|
393
|
+
dayjs.locale("en-web3-modal", localeObject);
|
|
394
|
+
const DateUtil = {
|
|
395
|
+
getMonthNameByIndex(monthIndex) {
|
|
396
|
+
return MONTH_NAMES[monthIndex];
|
|
397
|
+
},
|
|
398
|
+
getYear(date = (/* @__PURE__ */ new Date()).toISOString()) {
|
|
399
|
+
return dayjs(date).year();
|
|
400
|
+
},
|
|
401
|
+
getRelativeDateFromNow(date) {
|
|
402
|
+
return dayjs(date).locale("en-web3-modal").fromNow(true);
|
|
403
|
+
},
|
|
404
|
+
formatDate(date, format = "DD MMM") {
|
|
405
|
+
return dayjs(date).format(format);
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
const FLOAT_FIXED_VALUE = 3;
|
|
409
|
+
const plusTypes = ["receive", "deposit", "borrow", "claim"];
|
|
410
|
+
const minusTypes = ["withdraw", "repay", "burn"];
|
|
411
|
+
const TransactionUtil = {
|
|
412
|
+
getTransactionGroupTitle(year, month) {
|
|
413
|
+
const currentYear = DateUtil.getYear();
|
|
414
|
+
const monthName = DateUtil.getMonthNameByIndex(month);
|
|
415
|
+
const isCurrentYear = year === currentYear;
|
|
416
|
+
const groupTitle = isCurrentYear ? monthName : `${monthName} ${year}`;
|
|
417
|
+
return groupTitle;
|
|
418
|
+
},
|
|
419
|
+
getTransactionImages(transfers) {
|
|
420
|
+
const [transfer, secondTransfer] = transfers;
|
|
421
|
+
const isAllNFT = Boolean(transfer) && (transfers == null ? void 0 : transfers.every((item) => Boolean(item.nft_info)));
|
|
422
|
+
const haveMultipleTransfers = (transfers == null ? void 0 : transfers.length) > 1;
|
|
423
|
+
const haveTwoTransfers = (transfers == null ? void 0 : transfers.length) === 2;
|
|
424
|
+
if (haveTwoTransfers && !isAllNFT) {
|
|
425
|
+
return [this.getTransactionImage(secondTransfer), this.getTransactionImage(transfer)];
|
|
426
|
+
}
|
|
427
|
+
if (haveMultipleTransfers) {
|
|
428
|
+
return transfers.map((item) => this.getTransactionImage(item));
|
|
429
|
+
}
|
|
430
|
+
return [this.getTransactionImage(transfer)];
|
|
431
|
+
},
|
|
432
|
+
getTransactionImage(transfer) {
|
|
433
|
+
return {
|
|
434
|
+
type: TransactionUtil.getTransactionTransferTokenType(transfer),
|
|
435
|
+
url: TransactionUtil.getTransactionImageURL(transfer)
|
|
436
|
+
};
|
|
437
|
+
},
|
|
438
|
+
getTransactionImageURL(transfer) {
|
|
439
|
+
var _a, _b, _c, _d, _e;
|
|
440
|
+
let imageURL = void 0;
|
|
441
|
+
const isNFT = Boolean(transfer == null ? void 0 : transfer.nft_info);
|
|
442
|
+
const isFungible = Boolean(transfer == null ? void 0 : transfer.fungible_info);
|
|
443
|
+
if (transfer && isNFT) {
|
|
444
|
+
imageURL = (_c = (_b = (_a = transfer == null ? void 0 : transfer.nft_info) == null ? void 0 : _a.content) == null ? void 0 : _b.preview) == null ? void 0 : _c.url;
|
|
445
|
+
} else if (transfer && isFungible) {
|
|
446
|
+
imageURL = (_e = (_d = transfer == null ? void 0 : transfer.fungible_info) == null ? void 0 : _d.icon) == null ? void 0 : _e.url;
|
|
447
|
+
}
|
|
448
|
+
return imageURL;
|
|
449
|
+
},
|
|
450
|
+
getTransactionTransferTokenType(transfer) {
|
|
451
|
+
if (transfer == null ? void 0 : transfer.fungible_info) {
|
|
452
|
+
return "FUNGIBLE";
|
|
453
|
+
} else if (transfer == null ? void 0 : transfer.nft_info) {
|
|
454
|
+
return "NFT";
|
|
455
|
+
}
|
|
456
|
+
return void 0;
|
|
457
|
+
},
|
|
458
|
+
getTransactionDescriptions(transaction) {
|
|
459
|
+
var _a, _b, _c;
|
|
460
|
+
const type = (_a = transaction == null ? void 0 : transaction.metadata) == null ? void 0 : _a.operationType;
|
|
461
|
+
const transfers = transaction == null ? void 0 : transaction.transfers;
|
|
462
|
+
const haveTransfer = ((_b = transaction == null ? void 0 : transaction.transfers) == null ? void 0 : _b.length) > 0;
|
|
463
|
+
const haveMultipleTransfers = ((_c = transaction == null ? void 0 : transaction.transfers) == null ? void 0 : _c.length) > 1;
|
|
464
|
+
const isFungible = haveTransfer && (transfers == null ? void 0 : transfers.every((transfer) => Boolean(transfer == null ? void 0 : transfer.fungible_info)));
|
|
465
|
+
const [firstTransfer, secondTransfer] = transfers;
|
|
466
|
+
let firstDescription = this.getTransferDescription(firstTransfer);
|
|
467
|
+
let secondDescription = this.getTransferDescription(secondTransfer);
|
|
468
|
+
if (!haveTransfer) {
|
|
469
|
+
const isSendOrReceive = type === "send" || type === "receive";
|
|
470
|
+
if (isSendOrReceive && isFungible) {
|
|
471
|
+
firstDescription = ifDefined.UiHelperUtil.getTruncateString({
|
|
472
|
+
string: transaction == null ? void 0 : transaction.metadata.sentFrom,
|
|
473
|
+
charsStart: 4,
|
|
474
|
+
charsEnd: 6,
|
|
475
|
+
truncate: "middle"
|
|
476
|
+
});
|
|
477
|
+
secondDescription = ifDefined.UiHelperUtil.getTruncateString({
|
|
478
|
+
string: transaction == null ? void 0 : transaction.metadata.sentTo,
|
|
479
|
+
charsStart: 4,
|
|
480
|
+
charsEnd: 6,
|
|
481
|
+
truncate: "middle"
|
|
482
|
+
});
|
|
483
|
+
return [firstDescription, secondDescription];
|
|
484
|
+
}
|
|
485
|
+
return [transaction.metadata.status];
|
|
486
|
+
}
|
|
487
|
+
if (haveMultipleTransfers) {
|
|
488
|
+
return transfers.map((item) => this.getTransferDescription(item)).reverse();
|
|
489
|
+
}
|
|
490
|
+
let prefix = "";
|
|
491
|
+
if (plusTypes.includes(type)) {
|
|
492
|
+
prefix = "+";
|
|
493
|
+
} else if (minusTypes.includes(type)) {
|
|
494
|
+
prefix = "-";
|
|
495
|
+
}
|
|
496
|
+
firstDescription = prefix.concat(firstDescription);
|
|
497
|
+
return [firstDescription];
|
|
498
|
+
},
|
|
499
|
+
getTransferDescription(transfer) {
|
|
500
|
+
var _a;
|
|
501
|
+
let description = "";
|
|
502
|
+
if (!transfer) {
|
|
503
|
+
return description;
|
|
504
|
+
}
|
|
505
|
+
if (transfer == null ? void 0 : transfer.nft_info) {
|
|
506
|
+
description = ((_a = transfer == null ? void 0 : transfer.nft_info) == null ? void 0 : _a.name) || "-";
|
|
507
|
+
} else if (transfer == null ? void 0 : transfer.fungible_info) {
|
|
508
|
+
description = this.getFungibleTransferDescription(transfer) || "-";
|
|
509
|
+
}
|
|
510
|
+
return description;
|
|
511
|
+
},
|
|
512
|
+
getFungibleTransferDescription(transfer) {
|
|
513
|
+
var _a;
|
|
514
|
+
if (!transfer) {
|
|
515
|
+
return null;
|
|
516
|
+
}
|
|
517
|
+
const quantity = this.getQuantityFixedValue(transfer == null ? void 0 : transfer.quantity.numeric);
|
|
518
|
+
const description = [quantity, (_a = transfer == null ? void 0 : transfer.fungible_info) == null ? void 0 : _a.symbol].join(" ").trim();
|
|
519
|
+
return description;
|
|
520
|
+
},
|
|
521
|
+
getQuantityFixedValue(value) {
|
|
522
|
+
if (!value) {
|
|
523
|
+
return null;
|
|
524
|
+
}
|
|
525
|
+
const parsedValue = parseFloat(value);
|
|
526
|
+
return parsedValue.toFixed(FLOAT_FIXED_VALUE);
|
|
527
|
+
}
|
|
528
|
+
};
|
|
529
|
+
const styles = bitcoin.i`
|
|
530
|
+
:host > wui-flex:first-child {
|
|
531
|
+
column-gap: var(--wui-spacing-s);
|
|
532
|
+
padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs);
|
|
533
|
+
width: 100%;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
wui-flex {
|
|
537
|
+
display: flex;
|
|
538
|
+
flex: 1;
|
|
539
|
+
}
|
|
540
|
+
`;
|
|
541
|
+
var __decorate = function(decorators, target, key, desc) {
|
|
542
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
543
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
544
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
545
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
546
|
+
};
|
|
547
|
+
let WuiTransactionListItemLoader = class WuiTransactionListItemLoader2 extends bitcoin.i$1 {
|
|
548
|
+
render() {
|
|
549
|
+
return bitcoin.x`
|
|
550
|
+
<wui-flex alignItems="center">
|
|
551
|
+
<wui-shimmer width="40px" height="40px"></wui-shimmer>
|
|
552
|
+
<wui-flex flexDirection="column" gap="2xs">
|
|
553
|
+
<wui-shimmer width="72px" height="16px" borderRadius="4xs"></wui-shimmer>
|
|
554
|
+
<wui-shimmer width="148px" height="14px" borderRadius="4xs"></wui-shimmer>
|
|
555
|
+
</wui-flex>
|
|
556
|
+
<wui-shimmer width="24px" height="12px" borderRadius="5xs"></wui-shimmer>
|
|
557
|
+
</wui-flex>
|
|
558
|
+
`;
|
|
559
|
+
}
|
|
560
|
+
};
|
|
561
|
+
WuiTransactionListItemLoader.styles = [bitcoin.resetStyles, styles];
|
|
562
|
+
WuiTransactionListItemLoader = __decorate([
|
|
563
|
+
ifDefined.customElement("wui-transaction-list-item-loader")
|
|
564
|
+
], WuiTransactionListItemLoader);
|
|
565
|
+
exports.DateUtil = DateUtil;
|
|
566
|
+
exports.TransactionUtil = TransactionUtil;
|