@cfxjs/sirius-next-common 0.0.8 → 0.0.9-patch.1
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/chunk-26BGPSLL.js +141 -0
- package/dist/chunk-26BGPSLL.js.map +1 -0
- package/dist/chunk-2D3FHQMA.js +212 -0
- package/dist/chunk-2D3FHQMA.js.map +1 -0
- package/dist/chunk-2GMSPXII.js +212 -0
- package/dist/chunk-2GMSPXII.js.map +1 -0
- package/dist/chunk-2KKN5I7Z.js +108 -0
- package/dist/chunk-2KKN5I7Z.js.map +1 -0
- package/dist/chunk-2KZQEDWJ.js +63 -0
- package/dist/chunk-2KZQEDWJ.js.map +1 -0
- package/dist/chunk-2LXJPD6E.js +141 -0
- package/dist/chunk-2LXJPD6E.js.map +1 -0
- package/dist/chunk-2MQDR6YX.js +63 -0
- package/dist/chunk-2MQDR6YX.js.map +1 -0
- package/dist/chunk-2NX2L2RI.js +875 -0
- package/dist/chunk-2NX2L2RI.js.map +1 -0
- package/dist/chunk-2Q4BOUN5.js +143 -0
- package/dist/chunk-2Q4BOUN5.js.map +1 -0
- package/dist/chunk-2QCODSHF.js +108 -0
- package/dist/chunk-2QCODSHF.js.map +1 -0
- package/dist/chunk-363U57H2.js +108 -0
- package/dist/chunk-363U57H2.js.map +1 -0
- package/dist/chunk-37YTMWL5.js +127 -0
- package/dist/chunk-37YTMWL5.js.map +1 -0
- package/dist/chunk-3AVURPM5.js +108 -0
- package/dist/chunk-3AVURPM5.js.map +1 -0
- package/dist/chunk-3D4DD2UA.js +141 -0
- package/dist/chunk-3D4DD2UA.js.map +1 -0
- package/dist/chunk-3DSBII47.js +58 -0
- package/dist/chunk-3DSBII47.js.map +1 -0
- package/dist/chunk-3EYF446K.js +3629 -0
- package/dist/chunk-3EYF446K.js.map +1 -0
- package/dist/chunk-3FE7I3KQ.js +101 -0
- package/dist/chunk-3FE7I3KQ.js.map +1 -0
- package/dist/chunk-3Z26LHYR.js +128 -0
- package/dist/chunk-3Z26LHYR.js.map +1 -0
- package/dist/chunk-43RJJ6FE.js +3629 -0
- package/dist/chunk-43RJJ6FE.js.map +1 -0
- package/dist/chunk-4A3R7D6E.js +127 -0
- package/dist/chunk-4A3R7D6E.js.map +1 -0
- package/dist/chunk-4CHUPYY3.js +108 -0
- package/dist/chunk-4CHUPYY3.js.map +1 -0
- package/dist/chunk-4DOOVZYQ.js +127 -0
- package/dist/chunk-4DOOVZYQ.js.map +1 -0
- package/dist/chunk-4EWR72ZL.js +127 -0
- package/dist/chunk-4EWR72ZL.js.map +1 -0
- package/dist/chunk-4GX5DBPW.js +108 -0
- package/dist/chunk-4GX5DBPW.js.map +1 -0
- package/dist/chunk-4K7JRPVX.js +108 -0
- package/dist/chunk-4K7JRPVX.js.map +1 -0
- package/dist/chunk-4LUXUY33.js +212 -0
- package/dist/chunk-4LUXUY33.js.map +1 -0
- package/dist/chunk-4PRRUA3K.js +212 -0
- package/dist/chunk-4PRRUA3K.js.map +1 -0
- package/dist/chunk-4VMXIEIU.js +63 -0
- package/dist/chunk-4VMXIEIU.js.map +1 -0
- package/dist/chunk-4VU6H4HE.js +141 -0
- package/dist/chunk-4VU6H4HE.js.map +1 -0
- package/dist/chunk-4WGHU5GK.js +211 -0
- package/dist/chunk-4WGHU5GK.js.map +1 -0
- package/dist/chunk-4XIFV7FM.js +212 -0
- package/dist/chunk-4XIFV7FM.js.map +1 -0
- package/dist/chunk-4ZV6PYNB.js +100 -0
- package/dist/chunk-4ZV6PYNB.js.map +1 -0
- package/dist/chunk-52AANUOT.js +108 -0
- package/dist/chunk-52AANUOT.js.map +1 -0
- package/dist/chunk-557Y4PWU.js +100 -0
- package/dist/chunk-557Y4PWU.js.map +1 -0
- package/dist/chunk-5HDGGTJ6.js +127 -0
- package/dist/chunk-5HDGGTJ6.js.map +1 -0
- package/dist/chunk-5IPKZP5U.js +108 -0
- package/dist/chunk-5IPKZP5U.js.map +1 -0
- package/dist/chunk-5KZCV745.js +213 -0
- package/dist/chunk-5KZCV745.js.map +1 -0
- package/dist/chunk-5N2JN63A.js +213 -0
- package/dist/chunk-5N2JN63A.js.map +1 -0
- package/dist/chunk-5NS2U723.js +108 -0
- package/dist/chunk-5NS2U723.js.map +1 -0
- package/dist/chunk-5TRFE737.js +127 -0
- package/dist/chunk-5TRFE737.js.map +1 -0
- package/dist/chunk-65X53DMW.js +47 -0
- package/dist/chunk-65X53DMW.js.map +1 -0
- package/dist/chunk-6DOIQYVP.js +223 -0
- package/dist/chunk-6DOIQYVP.js.map +1 -0
- package/dist/chunk-6IYWU6KW.js +141 -0
- package/dist/chunk-6IYWU6KW.js.map +1 -0
- package/dist/chunk-6MM34SOW.js +108 -0
- package/dist/chunk-6MM34SOW.js.map +1 -0
- package/dist/chunk-6R3YL2BS.js +211 -0
- package/dist/chunk-6R3YL2BS.js.map +1 -0
- package/dist/chunk-6U2DN3LG.js +141 -0
- package/dist/chunk-6U2DN3LG.js.map +1 -0
- package/dist/chunk-6VG6W7P4.js +126 -0
- package/dist/chunk-6VG6W7P4.js.map +1 -0
- package/dist/chunk-7CRUFCGX.js +211 -0
- package/dist/chunk-7CRUFCGX.js.map +1 -0
- package/dist/chunk-7HT2BVQG.js +127 -0
- package/dist/chunk-7HT2BVQG.js.map +1 -0
- package/dist/chunk-7JJQSXBV.js +141 -0
- package/dist/chunk-7JJQSXBV.js.map +1 -0
- package/dist/chunk-7NJ4VOJB.js +108 -0
- package/dist/chunk-7NJ4VOJB.js.map +1 -0
- package/dist/chunk-7OAWG2IZ.js +44 -0
- package/dist/chunk-7OAWG2IZ.js.map +1 -0
- package/dist/chunk-7QSEQLE4.js +212 -0
- package/dist/chunk-7QSEQLE4.js.map +1 -0
- package/dist/chunk-7S3BOXGS.js +212 -0
- package/dist/chunk-7S3BOXGS.js.map +1 -0
- package/dist/chunk-7SH3YCJ7.js +875 -0
- package/dist/chunk-7SH3YCJ7.js.map +1 -0
- package/dist/chunk-7Z3HADG2.js +141 -0
- package/dist/chunk-7Z3HADG2.js.map +1 -0
- package/dist/chunk-A7RMNSCW.js +250 -0
- package/dist/chunk-A7RMNSCW.js.map +1 -0
- package/dist/chunk-AAQMTCV5.js +875 -0
- package/dist/chunk-AAQMTCV5.js.map +1 -0
- package/dist/chunk-ABXVKRIH.js +63 -0
- package/dist/chunk-ABXVKRIH.js.map +1 -0
- package/dist/chunk-ACLZEBHM.js +251 -0
- package/dist/chunk-ACLZEBHM.js.map +1 -0
- package/dist/chunk-AEF5YUNM.js +212 -0
- package/dist/chunk-AEF5YUNM.js.map +1 -0
- package/dist/chunk-AHY4G53B.js +212 -0
- package/dist/chunk-AHY4G53B.js.map +1 -0
- package/dist/chunk-AIEBC7N6.js +211 -0
- package/dist/chunk-AIEBC7N6.js.map +1 -0
- package/dist/chunk-AMXXTGCE.js +143 -0
- package/dist/chunk-AMXXTGCE.js.map +1 -0
- package/dist/chunk-ANXMM5LH.js +2296 -0
- package/dist/chunk-ANXMM5LH.js.map +1 -0
- package/dist/chunk-ASADUYXC.js +141 -0
- package/dist/chunk-ASADUYXC.js.map +1 -0
- package/dist/chunk-BDSJ5P63.js +49 -0
- package/dist/chunk-BDSJ5P63.js.map +1 -0
- package/dist/chunk-BGTUC3AF.js +141 -0
- package/dist/chunk-BGTUC3AF.js.map +1 -0
- package/dist/chunk-BJ5IIEVM.js +141 -0
- package/dist/chunk-BJ5IIEVM.js.map +1 -0
- package/dist/chunk-BPRHSATO.js +127 -0
- package/dist/chunk-BPRHSATO.js.map +1 -0
- package/dist/chunk-BSSE7DI3.js +257 -0
- package/dist/chunk-BSSE7DI3.js.map +1 -0
- package/dist/chunk-C2TFELML.js +257 -0
- package/dist/chunk-C2TFELML.js.map +1 -0
- package/dist/chunk-CBLGPZ6N.js +108 -0
- package/dist/chunk-CBLGPZ6N.js.map +1 -0
- package/dist/chunk-CDRAINRR.js +143 -0
- package/dist/chunk-CDRAINRR.js.map +1 -0
- package/dist/chunk-CDYJDIZL.js +100 -0
- package/dist/chunk-CDYJDIZL.js.map +1 -0
- package/dist/chunk-CKLBKRDB.js +212 -0
- package/dist/chunk-CKLBKRDB.js.map +1 -0
- package/dist/chunk-CNBENNSA.js +141 -0
- package/dist/chunk-CNBENNSA.js.map +1 -0
- package/dist/chunk-CTAGQUXS.js +213 -0
- package/dist/chunk-CTAGQUXS.js.map +1 -0
- package/dist/chunk-CZNTYDII.js +141 -0
- package/dist/chunk-CZNTYDII.js.map +1 -0
- package/dist/chunk-D246WRFL.js +108 -0
- package/dist/chunk-D246WRFL.js.map +1 -0
- package/dist/chunk-D3CVJAPF.js +143 -0
- package/dist/chunk-D3CVJAPF.js.map +1 -0
- package/dist/chunk-DBEZZTKI.js +63 -0
- package/dist/chunk-DBEZZTKI.js.map +1 -0
- package/dist/chunk-DI4EC4C5.js +108 -0
- package/dist/chunk-DI4EC4C5.js.map +1 -0
- package/dist/chunk-DMYFV67U.js +108 -0
- package/dist/chunk-DMYFV67U.js.map +1 -0
- package/dist/chunk-DOTVUBGL.js +37 -0
- package/dist/chunk-DOTVUBGL.js.map +1 -0
- package/dist/chunk-DOYWQVTM.js +2296 -0
- package/dist/chunk-DOYWQVTM.js.map +1 -0
- package/dist/chunk-DPSCMWIB.js +49 -0
- package/dist/chunk-DPSCMWIB.js.map +1 -0
- package/dist/chunk-DRM4YQL3.js +108 -0
- package/dist/chunk-DRM4YQL3.js.map +1 -0
- package/dist/chunk-DVZP6PO3.js +257 -0
- package/dist/chunk-DVZP6PO3.js.map +1 -0
- package/dist/chunk-EE5JCC2N.js +3629 -0
- package/dist/chunk-EE5JCC2N.js.map +1 -0
- package/dist/chunk-EED2CWB3.js +141 -0
- package/dist/chunk-EED2CWB3.js.map +1 -0
- package/dist/chunk-EOMPNXYW.js +141 -0
- package/dist/chunk-EOMPNXYW.js.map +1 -0
- package/dist/chunk-ESE4IOXB.js +101 -0
- package/dist/chunk-ESE4IOXB.js.map +1 -0
- package/dist/chunk-EVCNR7M7.js +150 -0
- package/dist/chunk-EVCNR7M7.js.map +1 -0
- package/dist/chunk-EXVWVGQ3.js +108 -0
- package/dist/chunk-EXVWVGQ3.js.map +1 -0
- package/dist/chunk-EY4IMAYQ.js +108 -0
- package/dist/chunk-EY4IMAYQ.js.map +1 -0
- package/dist/chunk-F4H73EBR.js +2296 -0
- package/dist/chunk-F4H73EBR.js.map +1 -0
- package/dist/chunk-F5GW75SB.js +37 -0
- package/dist/chunk-F5GW75SB.js.map +1 -0
- package/dist/chunk-FB2DC3ZK.js +250 -0
- package/dist/chunk-FB2DC3ZK.js.map +1 -0
- package/dist/chunk-FF7ZGRIB.js +108 -0
- package/dist/chunk-FF7ZGRIB.js.map +1 -0
- package/dist/chunk-FGNBG722.js +108 -0
- package/dist/chunk-FGNBG722.js.map +1 -0
- package/dist/chunk-FJ4YMYZH.js +257 -0
- package/dist/chunk-FJ4YMYZH.js.map +1 -0
- package/dist/chunk-FJNLD4NH.js +150 -0
- package/dist/chunk-FJNLD4NH.js.map +1 -0
- package/dist/chunk-FLS3MUW7.js +252 -0
- package/dist/chunk-FLS3MUW7.js.map +1 -0
- package/dist/chunk-FPG5UDK3.js +212 -0
- package/dist/chunk-FPG5UDK3.js.map +1 -0
- package/dist/chunk-FPPTWXIF.js +108 -0
- package/dist/chunk-FPPTWXIF.js.map +1 -0
- package/dist/chunk-G5EM47DR.js +127 -0
- package/dist/chunk-G5EM47DR.js.map +1 -0
- package/dist/chunk-G6DGYERB.js +108 -0
- package/dist/chunk-G6DGYERB.js.map +1 -0
- package/dist/chunk-GFXXZQRQ.js +150 -0
- package/dist/chunk-GFXXZQRQ.js.map +1 -0
- package/dist/chunk-GIG7IMSP.js +141 -0
- package/dist/chunk-GIG7IMSP.js.map +1 -0
- package/dist/chunk-GSJZA53J.js +213 -0
- package/dist/chunk-GSJZA53J.js.map +1 -0
- package/dist/chunk-GUCQ4F2G.js +49 -0
- package/dist/chunk-GUCQ4F2G.js.map +1 -0
- package/dist/chunk-GX6VTQVX.js +211 -0
- package/dist/chunk-GX6VTQVX.js.map +1 -0
- package/dist/chunk-GZNIZX63.js +108 -0
- package/dist/chunk-GZNIZX63.js.map +1 -0
- package/dist/chunk-H4SQSFJ7.js +63 -0
- package/dist/chunk-H4SQSFJ7.js.map +1 -0
- package/dist/chunk-HFFYGGBO.js +252 -0
- package/dist/chunk-HFFYGGBO.js.map +1 -0
- package/dist/chunk-HGM2CICP.js +212 -0
- package/dist/chunk-HGM2CICP.js.map +1 -0
- package/dist/chunk-HLR7FF2K.js +211 -0
- package/dist/chunk-HLR7FF2K.js.map +1 -0
- package/dist/chunk-HP3DEVBA.js +141 -0
- package/dist/chunk-HP3DEVBA.js.map +1 -0
- package/dist/chunk-HTAWLIFJ.js +3629 -0
- package/dist/chunk-HTAWLIFJ.js.map +1 -0
- package/dist/chunk-HTZUI3AR.js +212 -0
- package/dist/chunk-HTZUI3AR.js.map +1 -0
- package/dist/chunk-HZGDXEM3.js +63 -0
- package/dist/chunk-HZGDXEM3.js.map +1 -0
- package/dist/chunk-ICBCEIZZ.js +212 -0
- package/dist/chunk-ICBCEIZZ.js.map +1 -0
- package/dist/chunk-IEJJYHZZ.js +108 -0
- package/dist/chunk-IEJJYHZZ.js.map +1 -0
- package/dist/chunk-IEXGTZFG.js +37 -0
- package/dist/chunk-IEXGTZFG.js.map +1 -0
- package/dist/chunk-ILJFYWLB.js +353 -0
- package/dist/chunk-ILJFYWLB.js.map +1 -0
- package/dist/chunk-IM3YUUBE.js +257 -0
- package/dist/chunk-IM3YUUBE.js.map +1 -0
- package/dist/chunk-IODNITVN.js +127 -0
- package/dist/chunk-IODNITVN.js.map +1 -0
- package/dist/chunk-IRJC5VRG.js +212 -0
- package/dist/chunk-IRJC5VRG.js.map +1 -0
- package/dist/chunk-ISLACP6M.js +63 -0
- package/dist/chunk-ISLACP6M.js.map +1 -0
- package/dist/chunk-ITM2OXYW.js +143 -0
- package/dist/chunk-ITM2OXYW.js.map +1 -0
- package/dist/chunk-IWOZXJJF.js +108 -0
- package/dist/chunk-IWOZXJJF.js.map +1 -0
- package/dist/chunk-IZG7VX7U.js +3629 -0
- package/dist/chunk-IZG7VX7U.js.map +1 -0
- package/dist/chunk-IZPKXC5T.js +108 -0
- package/dist/chunk-IZPKXC5T.js.map +1 -0
- package/dist/chunk-J77O43SY.js +263 -0
- package/dist/chunk-J77O43SY.js.map +1 -0
- package/dist/chunk-JDIUA4L5.js +141 -0
- package/dist/chunk-JDIUA4L5.js.map +1 -0
- package/dist/chunk-JFXEBKE5.js +141 -0
- package/dist/chunk-JFXEBKE5.js.map +1 -0
- package/dist/chunk-JKFK7BHM.js +108 -0
- package/dist/chunk-JKFK7BHM.js.map +1 -0
- package/dist/chunk-JLDIEGDJ.js +38 -0
- package/dist/chunk-JLDIEGDJ.js.map +1 -0
- package/dist/chunk-JO5SBPNS.js +109 -0
- package/dist/chunk-JO5SBPNS.js.map +1 -0
- package/dist/chunk-JOQA6SDG.js +38 -0
- package/dist/chunk-JOQA6SDG.js.map +1 -0
- package/dist/chunk-JUKLHM7G.js +108 -0
- package/dist/chunk-JUKLHM7G.js.map +1 -0
- package/dist/chunk-K7DXQUWY.js +141 -0
- package/dist/chunk-K7DXQUWY.js.map +1 -0
- package/dist/chunk-KBVUDACJ.js +212 -0
- package/dist/chunk-KBVUDACJ.js.map +1 -0
- package/dist/chunk-KC2DY22D.js +141 -0
- package/dist/chunk-KC2DY22D.js.map +1 -0
- package/dist/chunk-KDYHX27X.js +108 -0
- package/dist/chunk-KDYHX27X.js.map +1 -0
- package/dist/chunk-KGJUIHQK.js +127 -0
- package/dist/chunk-KGJUIHQK.js.map +1 -0
- package/dist/chunk-KIKGZIYW.js +63 -0
- package/dist/chunk-KIKGZIYW.js.map +1 -0
- package/dist/chunk-KJU5OLS3.js +150 -0
- package/dist/chunk-KJU5OLS3.js.map +1 -0
- package/dist/chunk-KM2ZAN4M.js +257 -0
- package/dist/chunk-KM2ZAN4M.js.map +1 -0
- package/dist/chunk-KY2ZDGIF.js +141 -0
- package/dist/chunk-KY2ZDGIF.js.map +1 -0
- package/dist/chunk-KYCICVKS.js +141 -0
- package/dist/chunk-KYCICVKS.js.map +1 -0
- package/dist/chunk-KZZPBI6J.js +108 -0
- package/dist/chunk-KZZPBI6J.js.map +1 -0
- package/dist/chunk-L5CUEXS7.js +108 -0
- package/dist/chunk-L5CUEXS7.js.map +1 -0
- package/dist/chunk-L6SPTHRK.js +63 -0
- package/dist/chunk-L6SPTHRK.js.map +1 -0
- package/dist/chunk-L7CPEX5Q.js +212 -0
- package/dist/chunk-L7CPEX5Q.js.map +1 -0
- package/dist/chunk-L7LRX5XU.js +2296 -0
- package/dist/chunk-L7LRX5XU.js.map +1 -0
- package/dist/chunk-LKVGVLCW.js +844 -0
- package/dist/chunk-LKVGVLCW.js.map +1 -0
- package/dist/chunk-LQYA5NK2.js +108 -0
- package/dist/chunk-LQYA5NK2.js.map +1 -0
- package/dist/chunk-M2YX7FI7.js +141 -0
- package/dist/chunk-M2YX7FI7.js.map +1 -0
- package/dist/chunk-M2ZETO4K.js +127 -0
- package/dist/chunk-M2ZETO4K.js.map +1 -0
- package/dist/chunk-M6MAOPX3.js +108 -0
- package/dist/chunk-M6MAOPX3.js.map +1 -0
- package/dist/chunk-M7IWXN2K.js +211 -0
- package/dist/chunk-M7IWXN2K.js.map +1 -0
- package/dist/chunk-MEOSGIZR.js +127 -0
- package/dist/chunk-MEOSGIZR.js.map +1 -0
- package/dist/chunk-MFUFGYIO.js +127 -0
- package/dist/chunk-MFUFGYIO.js.map +1 -0
- package/dist/chunk-MRTDMFMC.js +257 -0
- package/dist/chunk-MRTDMFMC.js.map +1 -0
- package/dist/chunk-MRUU7EZF.js +212 -0
- package/dist/chunk-MRUU7EZF.js.map +1 -0
- package/dist/chunk-MV35VQI2.js +37 -0
- package/dist/chunk-MV35VQI2.js.map +1 -0
- package/dist/chunk-MWUMNQPB.js +63 -0
- package/dist/chunk-MWUMNQPB.js.map +1 -0
- package/dist/chunk-MZXB5IJP.js +141 -0
- package/dist/chunk-MZXB5IJP.js.map +1 -0
- package/dist/chunk-N4GMCDSM.js +224 -0
- package/dist/chunk-N4GMCDSM.js.map +1 -0
- package/dist/chunk-NB7U63VS.js +141 -0
- package/dist/chunk-NB7U63VS.js.map +1 -0
- package/dist/chunk-NF5DG7TF.js +3629 -0
- package/dist/chunk-NF5DG7TF.js.map +1 -0
- package/dist/chunk-NGAB4S4A.js +63 -0
- package/dist/chunk-NGAB4S4A.js.map +1 -0
- package/dist/chunk-NJ3KYZJZ.js +141 -0
- package/dist/chunk-NJ3KYZJZ.js.map +1 -0
- package/dist/chunk-NPOOQ65V.js +127 -0
- package/dist/chunk-NPOOQ65V.js.map +1 -0
- package/dist/chunk-NQNVZ2Y2.js +127 -0
- package/dist/chunk-NQNVZ2Y2.js.map +1 -0
- package/dist/chunk-NRTH44GV.js +63 -0
- package/dist/chunk-NRTH44GV.js.map +1 -0
- package/dist/chunk-NSN2ONFI.js +212 -0
- package/dist/chunk-NSN2ONFI.js.map +1 -0
- package/dist/chunk-NW5PDW5B.js +143 -0
- package/dist/chunk-NW5PDW5B.js.map +1 -0
- package/dist/chunk-NZFOINXV.js +212 -0
- package/dist/chunk-NZFOINXV.js.map +1 -0
- package/dist/chunk-O4IEY4EN.js +876 -0
- package/dist/chunk-O4IEY4EN.js.map +1 -0
- package/dist/chunk-O6RHDLE7.js +141 -0
- package/dist/chunk-O6RHDLE7.js.map +1 -0
- package/dist/chunk-OGSXDW7D.js +108 -0
- package/dist/chunk-OGSXDW7D.js.map +1 -0
- package/dist/chunk-OHYGCU53.js +141 -0
- package/dist/chunk-OHYGCU53.js.map +1 -0
- package/dist/chunk-OLV63UML.js +127 -0
- package/dist/chunk-OLV63UML.js.map +1 -0
- package/dist/chunk-ORR54EIG.js +212 -0
- package/dist/chunk-ORR54EIG.js.map +1 -0
- package/dist/chunk-OUK5KBFP.js +129 -0
- package/dist/chunk-OUK5KBFP.js.map +1 -0
- package/dist/chunk-OWG2UJNF.js +150 -0
- package/dist/chunk-OWG2UJNF.js.map +1 -0
- package/dist/chunk-OXSSHXEW.js +875 -0
- package/dist/chunk-OXSSHXEW.js.map +1 -0
- package/dist/chunk-P53JJSIX.js +212 -0
- package/dist/chunk-P53JJSIX.js.map +1 -0
- package/dist/chunk-PJOGAA4H.js +141 -0
- package/dist/chunk-PJOGAA4H.js.map +1 -0
- package/dist/chunk-PTADNY4J.js +212 -0
- package/dist/chunk-PTADNY4J.js.map +1 -0
- package/dist/chunk-Q3VVCDVP.js +127 -0
- package/dist/chunk-Q3VVCDVP.js.map +1 -0
- package/dist/chunk-QF5ASUBG.js +3629 -0
- package/dist/chunk-QF5ASUBG.js.map +1 -0
- package/dist/chunk-QFZXB4CD.js +108 -0
- package/dist/chunk-QFZXB4CD.js.map +1 -0
- package/dist/chunk-QJN22YYL.js +128 -0
- package/dist/chunk-QJN22YYL.js.map +1 -0
- package/dist/chunk-QKA7H4EX.js +37 -0
- package/dist/chunk-QKA7H4EX.js.map +1 -0
- package/dist/chunk-QKQG47IV.js +82 -0
- package/dist/chunk-QKQG47IV.js.map +1 -0
- package/dist/chunk-QMBWCVMY.js +108 -0
- package/dist/chunk-QMBWCVMY.js.map +1 -0
- package/dist/chunk-QS2I4PG7.js +212 -0
- package/dist/chunk-QS2I4PG7.js.map +1 -0
- package/dist/chunk-QTN7QLML.js +63 -0
- package/dist/chunk-QTN7QLML.js.map +1 -0
- package/dist/chunk-QYKEGDLO.js +224 -0
- package/dist/chunk-QYKEGDLO.js.map +1 -0
- package/dist/chunk-RDJOMUZH.js +211 -0
- package/dist/chunk-RDJOMUZH.js.map +1 -0
- package/dist/chunk-RGPLJJ2Y.js +141 -0
- package/dist/chunk-RGPLJJ2Y.js.map +1 -0
- package/dist/chunk-RJTRSA4P.js +49 -0
- package/dist/chunk-RJTRSA4P.js.map +1 -0
- package/dist/chunk-RQXQFLB4.js +63 -0
- package/dist/chunk-RQXQFLB4.js.map +1 -0
- package/dist/chunk-RS3YOF5F.js +108 -0
- package/dist/chunk-RS3YOF5F.js.map +1 -0
- package/dist/chunk-RTUI55OW.js +212 -0
- package/dist/chunk-RTUI55OW.js.map +1 -0
- package/dist/chunk-RVARUZVC.js +27 -0
- package/dist/chunk-RVARUZVC.js.map +1 -0
- package/dist/chunk-RVFAWL3I.js +141 -0
- package/dist/chunk-RVFAWL3I.js.map +1 -0
- package/dist/chunk-RYKWAX5X.js +63 -0
- package/dist/chunk-RYKWAX5X.js.map +1 -0
- package/dist/chunk-S5CR7IEA.js +2296 -0
- package/dist/chunk-S5CR7IEA.js.map +1 -0
- package/dist/chunk-S6N5P5OD.js +212 -0
- package/dist/chunk-S6N5P5OD.js.map +1 -0
- package/dist/chunk-SA2LSZDP.js +252 -0
- package/dist/chunk-SA2LSZDP.js.map +1 -0
- package/dist/chunk-SGICH6RI.js +213 -0
- package/dist/chunk-SGICH6RI.js.map +1 -0
- package/dist/chunk-SIX7XLAC.js +49 -0
- package/dist/chunk-SIX7XLAC.js.map +1 -0
- package/dist/chunk-SIZI2YWP.js +212 -0
- package/dist/chunk-SIZI2YWP.js.map +1 -0
- package/dist/chunk-SKRS6PSA.js +141 -0
- package/dist/chunk-SKRS6PSA.js.map +1 -0
- package/dist/chunk-SLWMHHRZ.js +141 -0
- package/dist/chunk-SLWMHHRZ.js.map +1 -0
- package/dist/chunk-SSOJ2LOM.js +141 -0
- package/dist/chunk-SSOJ2LOM.js.map +1 -0
- package/dist/chunk-SVU7AMXV.js +141 -0
- package/dist/chunk-SVU7AMXV.js.map +1 -0
- package/dist/chunk-THZXOHDJ.js +141 -0
- package/dist/chunk-THZXOHDJ.js.map +1 -0
- package/dist/chunk-TLC6WXQ6.js +37 -0
- package/dist/chunk-TLC6WXQ6.js.map +1 -0
- package/dist/chunk-TOTKLZTZ.js +49 -0
- package/dist/chunk-TOTKLZTZ.js.map +1 -0
- package/dist/chunk-TSAG437R.js +49 -0
- package/dist/chunk-TSAG437R.js.map +1 -0
- package/dist/chunk-TTEMP3QU.js +108 -0
- package/dist/chunk-TTEMP3QU.js.map +1 -0
- package/dist/chunk-TXNXFHTS.js +63 -0
- package/dist/chunk-TXNXFHTS.js.map +1 -0
- package/dist/chunk-U7OZK37L.js +63 -0
- package/dist/chunk-U7OZK37L.js.map +1 -0
- package/dist/chunk-UB7MM3A3.js +108 -0
- package/dist/chunk-UB7MM3A3.js.map +1 -0
- package/dist/chunk-UBBJF27D.js +127 -0
- package/dist/chunk-UBBJF27D.js.map +1 -0
- package/dist/chunk-UF4HNAIE.js +108 -0
- package/dist/chunk-UF4HNAIE.js.map +1 -0
- package/dist/chunk-UF7UWXSC.js +127 -0
- package/dist/chunk-UF7UWXSC.js.map +1 -0
- package/dist/chunk-UHLTNS5S.js +2296 -0
- package/dist/chunk-UHLTNS5S.js.map +1 -0
- package/dist/chunk-ULTQZ5FS.js +63 -0
- package/dist/chunk-ULTQZ5FS.js.map +1 -0
- package/dist/chunk-URVGL7OD.js +2296 -0
- package/dist/chunk-URVGL7OD.js.map +1 -0
- package/dist/chunk-USQFD6IR.js +63 -0
- package/dist/chunk-USQFD6IR.js.map +1 -0
- package/dist/chunk-UVPSXDVG.js +100 -0
- package/dist/chunk-UVPSXDVG.js.map +1 -0
- package/dist/chunk-UVURDTXJ.js +212 -0
- package/dist/chunk-UVURDTXJ.js.map +1 -0
- package/dist/chunk-V2QIYGY7.js +127 -0
- package/dist/chunk-V2QIYGY7.js.map +1 -0
- package/dist/chunk-VCE2DP4V.js +100 -0
- package/dist/chunk-VCE2DP4V.js.map +1 -0
- package/dist/chunk-VGCTU7HB.js +127 -0
- package/dist/chunk-VGCTU7HB.js.map +1 -0
- package/dist/chunk-VR7OODCZ.js +150 -0
- package/dist/chunk-VR7OODCZ.js.map +1 -0
- package/dist/chunk-VVJ7Z3KU.js +143 -0
- package/dist/chunk-VVJ7Z3KU.js.map +1 -0
- package/dist/chunk-VVVHFBW7.js +127 -0
- package/dist/chunk-VVVHFBW7.js.map +1 -0
- package/dist/chunk-VXOIIFIY.js +37 -0
- package/dist/chunk-VXOIIFIY.js.map +1 -0
- package/dist/chunk-W3A6JEOD.js +224 -0
- package/dist/chunk-W3A6JEOD.js.map +1 -0
- package/dist/chunk-W4BQSWJN.js +212 -0
- package/dist/chunk-W4BQSWJN.js.map +1 -0
- package/dist/chunk-WJK2VUHR.js +65 -0
- package/dist/chunk-WJK2VUHR.js.map +1 -0
- package/dist/chunk-WPBZEYKB.js +212 -0
- package/dist/chunk-WPBZEYKB.js.map +1 -0
- package/dist/chunk-WV2RUP2Y.js +141 -0
- package/dist/chunk-WV2RUP2Y.js.map +1 -0
- package/dist/chunk-WXVV7KLP.js +127 -0
- package/dist/chunk-WXVV7KLP.js.map +1 -0
- package/dist/chunk-X3BV2HV3.js +212 -0
- package/dist/chunk-X3BV2HV3.js.map +1 -0
- package/dist/chunk-X6E5Y3LR.js +141 -0
- package/dist/chunk-X6E5Y3LR.js.map +1 -0
- package/dist/chunk-X6FBYNQG.js +108 -0
- package/dist/chunk-X6FBYNQG.js.map +1 -0
- package/dist/chunk-X73K44QV.js +49 -0
- package/dist/chunk-X73K44QV.js.map +1 -0
- package/dist/chunk-XC4OHJZG.js +250 -0
- package/dist/chunk-XC4OHJZG.js.map +1 -0
- package/dist/chunk-XDDZHBM4.js +101 -0
- package/dist/chunk-XDDZHBM4.js.map +1 -0
- package/dist/chunk-XEPPP6D4.js +252 -0
- package/dist/chunk-XEPPP6D4.js.map +1 -0
- package/dist/chunk-XG6O7CXO.js +141 -0
- package/dist/chunk-XG6O7CXO.js.map +1 -0
- package/dist/chunk-XN5HKZNZ.js +63 -0
- package/dist/chunk-XN5HKZNZ.js.map +1 -0
- package/dist/chunk-XPL5VFRD.js +224 -0
- package/dist/chunk-XPL5VFRD.js.map +1 -0
- package/dist/chunk-XSIVI53W.js +212 -0
- package/dist/chunk-XSIVI53W.js.map +1 -0
- package/dist/chunk-XU42NMC2.js +37 -0
- package/dist/chunk-XU42NMC2.js.map +1 -0
- package/dist/chunk-XWKRVTOF.js +141 -0
- package/dist/chunk-XWKRVTOF.js.map +1 -0
- package/dist/chunk-XWZ4TDO5.js +108 -0
- package/dist/chunk-XWZ4TDO5.js.map +1 -0
- package/dist/chunk-XX4L6GVN.js +63 -0
- package/dist/chunk-XX4L6GVN.js.map +1 -0
- package/dist/chunk-XXGZMUVM.js +63 -0
- package/dist/chunk-XXGZMUVM.js.map +1 -0
- package/dist/chunk-Y4HM4Z3B.js +108 -0
- package/dist/chunk-Y4HM4Z3B.js.map +1 -0
- package/dist/chunk-Y5QJD3KW.js +108 -0
- package/dist/chunk-Y5QJD3KW.js.map +1 -0
- package/dist/chunk-YNFLM23N.js +108 -0
- package/dist/chunk-YNFLM23N.js.map +1 -0
- package/dist/chunk-YPRAHGPU.js +150 -0
- package/dist/chunk-YPRAHGPU.js.map +1 -0
- package/dist/chunk-YURQ7MSJ.js +108 -0
- package/dist/chunk-YURQ7MSJ.js.map +1 -0
- package/dist/chunk-YVSUXU5I.js +141 -0
- package/dist/chunk-YVSUXU5I.js.map +1 -0
- package/dist/chunk-YXEH4FU4.js +141 -0
- package/dist/chunk-YXEH4FU4.js.map +1 -0
- package/dist/chunk-Z4Q3W7CZ.js +868 -0
- package/dist/chunk-Z4Q3W7CZ.js.map +1 -0
- package/dist/chunk-ZAKHKJLN.js +65 -0
- package/dist/chunk-ZAKHKJLN.js.map +1 -0
- package/dist/chunk-ZE2A3A2S.js +224 -0
- package/dist/chunk-ZE2A3A2S.js.map +1 -0
- package/dist/chunk-ZFHH2EIQ.js +126 -0
- package/dist/chunk-ZFHH2EIQ.js.map +1 -0
- package/dist/chunk-ZL4VSCCE.js +224 -0
- package/dist/chunk-ZL4VSCCE.js.map +1 -0
- package/dist/chunk-ZN3N7CZK.js +141 -0
- package/dist/chunk-ZN3N7CZK.js.map +1 -0
- package/dist/chunk-ZOZ75ANX.js +2296 -0
- package/dist/chunk-ZOZ75ANX.js.map +1 -0
- package/dist/chunk-ZPSNQP7M.js +141 -0
- package/dist/chunk-ZPSNQP7M.js.map +1 -0
- package/dist/chunk-ZW4AXQU4.js +141 -0
- package/dist/chunk-ZW4AXQU4.js.map +1 -0
- package/dist/chunk-ZX3CUM6K.js +212 -0
- package/dist/chunk-ZX3CUM6K.js.map +1 -0
- package/dist/components/AddressContainer/CoreAddressContainer.js +11 -11
- package/dist/components/AddressContainer/EVMAddressContainer.js +9 -9
- package/dist/components/AddressContainer/addressSwitcher.js +7 -7
- package/dist/components/AddressContainer/addressView.js +6 -6
- package/dist/components/AddressContainer/label.js +3 -3
- package/dist/components/Charts/PreviewChartTemplate.js +2 -2
- package/dist/components/Charts/StockChartTemplate.js +2 -2
- package/dist/components/CopyButton/index.js +2 -2
- package/dist/components/CountDown/index.js +3 -3
- package/dist/components/DownloadCSV/index.js +3 -3
- package/dist/components/GasPriceDropdown/index.d.ts +5 -2
- package/dist/components/GasPriceDropdown/index.js +9 -7
- package/dist/components/GasPriceDropdown/index.js.map +1 -1
- package/dist/components/IncreasePercent/Icons.d.ts +6 -0
- package/dist/components/IncreasePercent/Icons.js +9 -0
- package/dist/components/IncreasePercent/Icons.js.map +1 -0
- package/dist/components/IncreasePercent/index.d.ts +20 -0
- package/dist/components/IncreasePercent/index.js +42 -0
- package/dist/components/IncreasePercent/index.js.map +1 -0
- package/dist/components/InfoIconWithTooltip/index.js +2 -2
- package/dist/components/Modal/index.js +2 -2
- package/dist/components/Price/index.js +2 -2
- package/dist/components/Select/index.js +2 -2
- package/dist/components/Select/select.js +2 -2
- package/dist/components/Text/index.js +3 -3
- package/dist/components/Tooltip/index.js +2 -2
- package/dist/components/TransactionAction/coreTransactionAction.js +11 -11
- package/dist/components/TransactionAction/evmTransactionAction.js +10 -10
- package/dist/utils/address.d.ts +23 -20
- package/dist/utils/address.js +7 -3
- package/dist/utils/hooks/useENS.js +5 -5
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/request.js +2 -2
- package/dist/utils/rpcRequest.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {
|
|
2
|
+
publishRequestError
|
|
3
|
+
} from "./chunk-LKVGVLCW.js";
|
|
4
|
+
|
|
5
|
+
// src/utils/rpcRequest.ts
|
|
6
|
+
var request = async (method, ...args) => {
|
|
7
|
+
const CFX = window.CFX;
|
|
8
|
+
try {
|
|
9
|
+
const [namespace, m] = method.split("_");
|
|
10
|
+
if (namespace && m && typeof CFX[namespace][m] === "function") {
|
|
11
|
+
return await CFX[namespace][m](...args);
|
|
12
|
+
} else {
|
|
13
|
+
throw new Error(
|
|
14
|
+
`Method ${m} is not a function in namespace ${namespace}`
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
} catch (e) {
|
|
18
|
+
if (e instanceof Error) {
|
|
19
|
+
publishRequestError(e, "rpc");
|
|
20
|
+
} else {
|
|
21
|
+
console.error("Unexpected error", e);
|
|
22
|
+
}
|
|
23
|
+
throw e;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
var getAccount = async (...args) => {
|
|
27
|
+
try {
|
|
28
|
+
return request("cfx_getAccount", ...args);
|
|
29
|
+
} catch (e) {
|
|
30
|
+
throw e;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export {
|
|
35
|
+
getAccount
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=chunk-TLC6WXQ6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/rpcRequest.ts"],"sourcesContent":["import { publishRequestError } from './index';\n\nconst request = async <T>(method: string, ...args: any[]): Promise<T> => {\n const CFX = (window as any).CFX;\n\n try {\n const [namespace, m] = method.split('_');\n // 断言 CFX[namespace][m] 为一个函数,并调用它\n if (namespace && m && typeof CFX[namespace][m] === 'function') {\n return await CFX[namespace][m](...args);\n } else {\n throw new Error(\n `Method ${m} is not a function in namespace ${namespace}`,\n );\n }\n } catch (e: unknown) {\n if (e instanceof Error) {\n publishRequestError(e, 'rpc');\n } else {\n console.error('Unexpected error', e);\n }\n throw e;\n }\n};\n\nexport const getAccount = async (...args: any[]) => {\n try {\n return request('cfx_getAccount', ...args);\n } catch (e) {\n throw e;\n }\n};\n"],"mappings":";;;;;AAEA,IAAM,UAAU,OAAU,WAAmB,SAA4B;AACvE,QAAM,MAAO,OAAe;AAE5B,MAAI;AACF,UAAM,CAAC,WAAW,CAAC,IAAI,OAAO,MAAM,GAAG;AAEvC,QAAI,aAAa,KAAK,OAAO,IAAI,SAAS,EAAE,CAAC,MAAM,YAAY;AAC7D,aAAO,MAAM,IAAI,SAAS,EAAE,CAAC,EAAE,GAAG,IAAI;AAAA,IACxC,OAAO;AACL,YAAM,IAAI;AAAA,QACR,UAAU,oCAAoC;AAAA,MAChD;AAAA,IACF;AAAA,EACF,SAAS,GAAP;AACA,QAAI,aAAa,OAAO;AACtB,0BAAoB,GAAG,KAAK;AAAA,IAC9B,OAAO;AACL,cAAQ,MAAM,oBAAoB,CAAC;AAAA,IACrC;AACA,UAAM;AAAA,EACR;AACF;AAEO,IAAM,aAAa,UAAU,SAAgB;AAClD,MAAI;AACF,WAAO,QAAQ,kBAAkB,GAAG,IAAI;AAAA,EAC1C,SAAS,GAAP;AACA,UAAM;AAAA,EACR;AACF;","names":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Tooltip
|
|
3
|
+
} from "./chunk-UHLTNS5S.js";
|
|
4
|
+
import {
|
|
5
|
+
getTranslations
|
|
6
|
+
} from "./chunk-QKQG47IV.js";
|
|
7
|
+
|
|
8
|
+
// src/components/AddressContainer/label.tsx
|
|
9
|
+
import { Translation } from "react-i18next";
|
|
10
|
+
import { Bookmark, Hash } from "@zeit-ui/react-icons";
|
|
11
|
+
import ICON_ENS from "./logo-cns-7CXISC6I.svg";
|
|
12
|
+
import { jsx } from "react/jsx-runtime";
|
|
13
|
+
var getLabelInfo = (label, type) => {
|
|
14
|
+
const translations = getTranslations();
|
|
15
|
+
if (label) {
|
|
16
|
+
let trans = "";
|
|
17
|
+
let icon = null;
|
|
18
|
+
if (type === "tag") {
|
|
19
|
+
trans = translations.profile.tip.label;
|
|
20
|
+
icon = /* @__PURE__ */ jsx(Bookmark, { color: "var(--theme-color-gray2)", size: 16 });
|
|
21
|
+
} else if (type === "ens") {
|
|
22
|
+
trans = translations.ens.label;
|
|
23
|
+
icon = /* @__PURE__ */ jsx(
|
|
24
|
+
"img",
|
|
25
|
+
{
|
|
26
|
+
src: ICON_ENS,
|
|
27
|
+
className: "w-[16px] h-[16px] mb-[3px] mr-[2px]",
|
|
28
|
+
alt: ""
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
} else if (type === "nametag") {
|
|
32
|
+
trans = translations.nametag.label;
|
|
33
|
+
icon = /* @__PURE__ */ jsx(Hash, { color: "var(--theme-color-gray2)", size: 16 });
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
label,
|
|
37
|
+
icon: /* @__PURE__ */ jsx("span", { className: "mr-[2px]", children: /* @__PURE__ */ jsx(Tooltip, { title: /* @__PURE__ */ jsx(Translation, { children: (t) => t(trans) }), children: icon }) })
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
label: "",
|
|
42
|
+
icon: null
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export {
|
|
47
|
+
getLabelInfo
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=chunk-TOTKLZTZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/AddressContainer/label.tsx"],"sourcesContent":["import { Translation } from 'react-i18next';\nimport { Bookmark, Hash } from '@zeit-ui/react-icons';\nimport { Tooltip } from '../Tooltip';\nimport { getTranslations } from '../../store';\nimport ICON_ENS from '../../images/logo-cns.svg';\n\nexport const getLabelInfo = (label: string, type: string) => {\n const translations = getTranslations();\n if (label) {\n let trans: string = '';\n let icon: React.ReactNode = null;\n\n if (type === 'tag') {\n trans = translations.profile.tip.label;\n icon = <Bookmark color=\"var(--theme-color-gray2)\" size={16} />;\n } else if (type === 'ens') {\n trans = (translations as any).ens.label;\n icon = (\n <img\n src={ICON_ENS}\n className=\"w-[16px] h-[16px] mb-[3px] mr-[2px]\"\n alt=\"\"\n />\n );\n // nametag from official operational staff\n } else if (type === 'nametag') {\n trans = translations.nametag.label;\n icon = <Hash color=\"var(--theme-color-gray2)\" size={16} />;\n }\n\n return {\n label,\n icon: (\n <span className=\"mr-[2px]\">\n <Tooltip title={<Translation>{t => t(trans)}</Translation>}>\n {icon}\n </Tooltip>\n </span>\n ),\n };\n }\n\n return {\n label: '',\n icon: null,\n };\n};\n"],"mappings":";;;;;;;;AAAA,SAAS,mBAAmB;AAC5B,SAAS,UAAU,YAAY;AAG/B,OAAO,cAAc;AAUR;AARN,IAAM,eAAe,CAAC,OAAe,SAAiB;AAC3D,QAAM,eAAe,gBAAgB;AACrC,MAAI,OAAO;AACT,QAAI,QAAgB;AACpB,QAAI,OAAwB;AAE5B,QAAI,SAAS,OAAO;AAClB,cAAQ,aAAa,QAAQ,IAAI;AACjC,aAAO,oBAAC,YAAS,OAAM,4BAA2B,MAAM,IAAI;AAAA,IAC9D,WAAW,SAAS,OAAO;AACzB,cAAS,aAAqB,IAAI;AAClC,aACE;AAAA,QAAC;AAAA;AAAA,UACC,KAAK;AAAA,UACL,WAAU;AAAA,UACV,KAAI;AAAA;AAAA,MACN;AAAA,IAGJ,WAAW,SAAS,WAAW;AAC7B,cAAQ,aAAa,QAAQ;AAC7B,aAAO,oBAAC,QAAK,OAAM,4BAA2B,MAAM,IAAI;AAAA,IAC1D;AAEA,WAAO;AAAA,MACL;AAAA,MACA,MACE,oBAAC,UAAK,WAAU,YACd,8BAAC,WAAQ,OAAO,oBAAC,eAAa,iBAAK,EAAE,KAAK,GAAE,GACzC,gBACH,GACF;AAAA,IAEJ;AAAA,EACF;AAEA,SAAO;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,EACR;AACF;","names":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Tooltip
|
|
3
|
+
} from "./chunk-F4H73EBR.js";
|
|
4
|
+
import {
|
|
5
|
+
getTranslations
|
|
6
|
+
} from "./chunk-QKQG47IV.js";
|
|
7
|
+
|
|
8
|
+
// src/components/AddressContainer/label.tsx
|
|
9
|
+
import { Translation } from "react-i18next";
|
|
10
|
+
import { Bookmark, Hash } from "@zeit-ui/react-icons";
|
|
11
|
+
import ICON_ENS from "./logo-cns-7CXISC6I.svg";
|
|
12
|
+
import { jsx } from "react/jsx-runtime";
|
|
13
|
+
var getLabelInfo = (label, type) => {
|
|
14
|
+
const translations = getTranslations();
|
|
15
|
+
if (label) {
|
|
16
|
+
let trans = "";
|
|
17
|
+
let icon = null;
|
|
18
|
+
if (type === "tag") {
|
|
19
|
+
trans = translations.profile.tip.label;
|
|
20
|
+
icon = /* @__PURE__ */ jsx(Bookmark, { color: "var(--theme-color-gray2)", size: 16 });
|
|
21
|
+
} else if (type === "ens") {
|
|
22
|
+
trans = translations.ens.label;
|
|
23
|
+
icon = /* @__PURE__ */ jsx(
|
|
24
|
+
"img",
|
|
25
|
+
{
|
|
26
|
+
src: ICON_ENS,
|
|
27
|
+
className: "w-[16px] h-[16px] mb-[3px] mr-[2px]",
|
|
28
|
+
alt: ""
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
} else if (type === "nametag") {
|
|
32
|
+
trans = translations.nametag.label;
|
|
33
|
+
icon = /* @__PURE__ */ jsx(Hash, { color: "var(--theme-color-gray2)", size: 16 });
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
label,
|
|
37
|
+
icon: /* @__PURE__ */ jsx("span", { className: "mr-[2px]", children: /* @__PURE__ */ jsx(Tooltip, { title: /* @__PURE__ */ jsx(Translation, { children: (t) => t(trans) }), children: icon }) })
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
label: "",
|
|
42
|
+
icon: null
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export {
|
|
47
|
+
getLabelInfo
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=chunk-TSAG437R.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/AddressContainer/label.tsx"],"sourcesContent":["import { Translation } from 'react-i18next';\nimport { Bookmark, Hash } from '@zeit-ui/react-icons';\nimport { Tooltip } from '../Tooltip';\nimport { getTranslations } from '../../store';\nimport ICON_ENS from '../../images/logo-cns.svg';\n\nexport const getLabelInfo = (label: string, type: string) => {\n const translations = getTranslations();\n if (label) {\n let trans: string = '';\n let icon: React.ReactNode = null;\n\n if (type === 'tag') {\n trans = translations.profile.tip.label;\n icon = <Bookmark color=\"var(--theme-color-gray2)\" size={16} />;\n } else if (type === 'ens') {\n trans = (translations as any).ens.label;\n icon = (\n <img\n src={ICON_ENS}\n className=\"w-[16px] h-[16px] mb-[3px] mr-[2px]\"\n alt=\"\"\n />\n );\n // nametag from official operational staff\n } else if (type === 'nametag') {\n trans = translations.nametag.label;\n icon = <Hash color=\"var(--theme-color-gray2)\" size={16} />;\n }\n\n return {\n label,\n icon: (\n <span className=\"mr-[2px]\">\n <Tooltip title={<Translation>{t => t(trans)}</Translation>}>\n {icon}\n </Tooltip>\n </span>\n ),\n };\n }\n\n return {\n label: '',\n icon: null,\n };\n};\n"],"mappings":";;;;;;;;AAAA,SAAS,mBAAmB;AAC5B,SAAS,UAAU,YAAY;AAG/B,OAAO,cAAc;AAUR;AARN,IAAM,eAAe,CAAC,OAAe,SAAiB;AAC3D,QAAM,eAAe,gBAAgB;AACrC,MAAI,OAAO;AACT,QAAI,QAAgB;AACpB,QAAI,OAAwB;AAE5B,QAAI,SAAS,OAAO;AAClB,cAAQ,aAAa,QAAQ,IAAI;AACjC,aAAO,oBAAC,YAAS,OAAM,4BAA2B,MAAM,IAAI;AAAA,IAC9D,WAAW,SAAS,OAAO;AACzB,cAAS,aAAqB,IAAI;AAClC,aACE;AAAA,QAAC;AAAA;AAAA,UACC,KAAK;AAAA,UACL,WAAU;AAAA,UACV,KAAI;AAAA;AAAA,MACN;AAAA,IAGJ,WAAW,SAAS,WAAW;AAC7B,cAAQ,aAAa,QAAQ;AAC7B,aAAO,oBAAC,QAAK,OAAM,4BAA2B,MAAM,IAAI;AAAA,IAC1D;AAEA,WAAO;AAAA,MACL;AAAA,MACA,MACE,oBAAC,UAAK,WAAU,YACd,8BAAC,WAAQ,OAAO,oBAAC,eAAa,iBAAK,EAAE,KAAK,GAAE,GACzC,gBACH,GACF;AAAA,IAEJ;AAAA,EACF;AAEA,SAAO;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,EACR;AACF;","names":[]}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ContractAddress,
|
|
3
|
+
ContractCreatedAddress,
|
|
4
|
+
InvalidAddress,
|
|
5
|
+
MyAddress
|
|
6
|
+
} from "./chunk-HTZUI3AR.js";
|
|
7
|
+
import {
|
|
8
|
+
RenderAddress
|
|
9
|
+
} from "./chunk-5HDGGTJ6.js";
|
|
10
|
+
import {
|
|
11
|
+
convertCheckSum,
|
|
12
|
+
formatAddress,
|
|
13
|
+
isEvmAddress,
|
|
14
|
+
isZeroAddress
|
|
15
|
+
} from "./chunk-N4GMCDSM.js";
|
|
16
|
+
import {
|
|
17
|
+
getLabelInfo
|
|
18
|
+
} from "./chunk-72WUTI2U.js";
|
|
19
|
+
import {
|
|
20
|
+
getTranslations,
|
|
21
|
+
useGlobalData
|
|
22
|
+
} from "./chunk-HRW4BUP4.js";
|
|
23
|
+
|
|
24
|
+
// src/components/AddressContainer/EVMAddressContainer.tsx
|
|
25
|
+
import { memo } from "react";
|
|
26
|
+
import { withTranslation } from "react-i18next";
|
|
27
|
+
import _ from "lodash";
|
|
28
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
29
|
+
var parseProps = (props, globalData) => {
|
|
30
|
+
const { alias, t, showAddressLabel, showNametag, nametagInfo } = props;
|
|
31
|
+
const value = props.value || "";
|
|
32
|
+
const cfxAddress = formatAddress(value, "hex");
|
|
33
|
+
const translations = getTranslations();
|
|
34
|
+
let aliasLabel = alias;
|
|
35
|
+
if (!alias && isZeroAddress(cfxAddress)) {
|
|
36
|
+
aliasLabel = t(translations.general.zeroAddress);
|
|
37
|
+
}
|
|
38
|
+
let officalNametag = null;
|
|
39
|
+
let addressLabel = null;
|
|
40
|
+
if (cfxAddress && showAddressLabel) {
|
|
41
|
+
const addressLabels = globalData?.["CONFLUX_SCAN_ADDRESS_LABELS" /* addressLabel */];
|
|
42
|
+
const gAddressLabel = addressLabels?.[convertCheckSum(cfxAddress)] || addressLabels?.[cfxAddress.toLocaleLowerCase()];
|
|
43
|
+
if (gAddressLabel) {
|
|
44
|
+
const { label } = getLabelInfo(gAddressLabel, "tag");
|
|
45
|
+
addressLabel = label;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (cfxAddress && showNametag) {
|
|
49
|
+
const nametags = nametagInfo?.[convertCheckSum(cfxAddress)] || nametagInfo?.[cfxAddress.toLocaleLowerCase()];
|
|
50
|
+
if (nametags) {
|
|
51
|
+
const nametag = nametags?.nametag ?? "";
|
|
52
|
+
const { label } = getLabelInfo(nametag, "nametag");
|
|
53
|
+
officalNametag = label;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
alias: aliasLabel,
|
|
58
|
+
nametag: officalNametag,
|
|
59
|
+
addressLabel,
|
|
60
|
+
cfxAddress
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
var EVMAddressContainer = withTranslation()(
|
|
64
|
+
memo((props) => {
|
|
65
|
+
const { globalData } = useGlobalData();
|
|
66
|
+
if (!props.value && !props.contractCreated) {
|
|
67
|
+
return /* @__PURE__ */ jsx(Fragment, { children: "--" });
|
|
68
|
+
}
|
|
69
|
+
const defaultProps = {
|
|
70
|
+
isFull: false,
|
|
71
|
+
isFullNameTag: false,
|
|
72
|
+
link: true,
|
|
73
|
+
isMe: false,
|
|
74
|
+
showIcon: true,
|
|
75
|
+
verify: false,
|
|
76
|
+
showAddressLabel: true,
|
|
77
|
+
showENSLabel: true,
|
|
78
|
+
showNametag: true
|
|
79
|
+
};
|
|
80
|
+
const mergeDefaultProps = _.assign({}, defaultProps, props);
|
|
81
|
+
const mergeParseProps = _.merge(
|
|
82
|
+
{},
|
|
83
|
+
mergeDefaultProps,
|
|
84
|
+
parseProps(mergeDefaultProps, globalData)
|
|
85
|
+
);
|
|
86
|
+
if (!mergeParseProps.value && mergeParseProps.contractCreated) {
|
|
87
|
+
return ContractCreatedAddress({
|
|
88
|
+
...mergeParseProps,
|
|
89
|
+
outputType: "hex"
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
if (!isEvmAddress(mergeParseProps.value)) {
|
|
93
|
+
return InvalidAddress(mergeParseProps);
|
|
94
|
+
}
|
|
95
|
+
if (mergeParseProps.isContract) {
|
|
96
|
+
return ContractAddress(mergeParseProps);
|
|
97
|
+
}
|
|
98
|
+
if (mergeParseProps.isMe) {
|
|
99
|
+
return MyAddress(mergeParseProps);
|
|
100
|
+
}
|
|
101
|
+
return RenderAddress(mergeParseProps);
|
|
102
|
+
})
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
export {
|
|
106
|
+
EVMAddressContainer
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=chunk-TTEMP3QU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/AddressContainer/EVMAddressContainer.tsx"],"sourcesContent":["import { memo } from 'react';\nimport { WithTranslation, withTranslation } from 'react-i18next';\nimport _ from 'lodash';\nimport {\n formatAddress,\n isEvmAddress,\n isZeroAddress,\n convertCheckSum,\n} from '../../utils/address';\nimport { useGlobalData, getTranslations } from '../../store';\nimport { LOCALSTORAGE_KEYS_MAP } from '../../utils/constants';\nimport { getLabelInfo } from './label';\n\nimport { RenderAddress } from './addressView';\nimport {\n ContractCreatedAddress,\n InvalidAddress,\n ContractAddress,\n MyAddress,\n} from './addressSwitcher';\nimport { GlobalDataType } from 'src/store/types';\nimport { EVMAddressContainerProps } from './types';\n\nconst parseProps = (\n props: EVMAddressContainerProps & WithTranslation,\n globalData: GlobalDataType,\n) => {\n const { alias, t, showAddressLabel, showNametag, nametagInfo } = props;\n const value: string = props.value || '';\n const cfxAddress = formatAddress(value, 'hex');\n\n const translations = getTranslations();\n\n let aliasLabel = alias;\n if (!alias && isZeroAddress(cfxAddress)) {\n aliasLabel = t(translations.general.zeroAddress);\n }\n\n // official name tag\n let officalNametag: React.ReactNode = null;\n // private name tag\n let addressLabel: React.ReactNode = null;\n\n if (cfxAddress && showAddressLabel) {\n // global private name tag\n const addressLabels = globalData?.[LOCALSTORAGE_KEYS_MAP.addressLabel];\n const gAddressLabel =\n addressLabels?.[convertCheckSum(cfxAddress)] ||\n addressLabels?.[cfxAddress.toLocaleLowerCase()];\n\n if (gAddressLabel) {\n const { label } = getLabelInfo(gAddressLabel, 'tag');\n addressLabel = label;\n }\n }\n\n if (cfxAddress && showNametag) {\n const nametags =\n nametagInfo?.[convertCheckSum(cfxAddress)] ||\n nametagInfo?.[cfxAddress.toLocaleLowerCase()];\n\n if (nametags) {\n const nametag = nametags?.nametag ?? '';\n const { label } = getLabelInfo(nametag, 'nametag');\n officalNametag = label;\n }\n }\n\n return {\n alias: aliasLabel,\n nametag: officalNametag,\n addressLabel,\n cfxAddress,\n };\n};\n\nexport const EVMAddressContainer = withTranslation()(\n memo((props: EVMAddressContainerProps & WithTranslation) => {\n const { globalData } = useGlobalData();\n\n // If a txn receipt has no 'to' address or 'contractCreated', show -- for temp\n if (!props.value && !props.contractCreated) {\n return <>--</>;\n }\n\n const defaultProps = {\n isFull: false,\n isFullNameTag: false,\n link: true,\n isMe: false,\n showIcon: true,\n verify: false,\n showAddressLabel: true,\n showENSLabel: true,\n showNametag: true,\n };\n\n const mergeDefaultProps = _.assign({}, defaultProps, props);\n\n const mergeParseProps = _.merge(\n {},\n mergeDefaultProps,\n parseProps(mergeDefaultProps, globalData),\n );\n\n if (!mergeParseProps.value && mergeParseProps.contractCreated) {\n return ContractCreatedAddress({\n ...mergeParseProps,\n outputType: 'hex',\n });\n }\n\n if (!isEvmAddress(mergeParseProps.value)) {\n return InvalidAddress(mergeParseProps);\n }\n\n if (mergeParseProps.isContract) {\n return ContractAddress(mergeParseProps);\n }\n\n if (mergeParseProps.isMe) {\n return MyAddress(mergeParseProps);\n }\n\n return RenderAddress(mergeParseProps);\n }),\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,YAAY;AACrB,SAA0B,uBAAuB;AACjD,OAAO,OAAO;AAgFD;AA3Db,IAAM,aAAa,CACjB,OACA,eACG;AACH,QAAM,EAAE,OAAO,GAAG,kBAAkB,aAAa,YAAY,IAAI;AACjE,QAAM,QAAgB,MAAM,SAAS;AACrC,QAAM,aAAa,cAAc,OAAO,KAAK;AAE7C,QAAM,eAAe,gBAAgB;AAErC,MAAI,aAAa;AACjB,MAAI,CAAC,SAAS,cAAc,UAAU,GAAG;AACvC,iBAAa,EAAE,aAAa,QAAQ,WAAW;AAAA,EACjD;AAGA,MAAI,iBAAkC;AAEtC,MAAI,eAAgC;AAEpC,MAAI,cAAc,kBAAkB;AAElC,UAAM,gBAAgB,6DAA+C;AACrE,UAAM,gBACJ,gBAAgB,gBAAgB,UAAU,CAAC,KAC3C,gBAAgB,WAAW,kBAAkB,CAAC;AAEhD,QAAI,eAAe;AACjB,YAAM,EAAE,MAAM,IAAI,aAAa,eAAe,KAAK;AACnD,qBAAe;AAAA,IACjB;AAAA,EACF;AAEA,MAAI,cAAc,aAAa;AAC7B,UAAM,WACJ,cAAc,gBAAgB,UAAU,CAAC,KACzC,cAAc,WAAW,kBAAkB,CAAC;AAE9C,QAAI,UAAU;AACZ,YAAM,UAAU,UAAU,WAAW;AACrC,YAAM,EAAE,MAAM,IAAI,aAAa,SAAS,SAAS;AACjD,uBAAiB;AAAA,IACnB;AAAA,EACF;AAEA,SAAO;AAAA,IACL,OAAO;AAAA,IACP,SAAS;AAAA,IACT;AAAA,IACA;AAAA,EACF;AACF;AAEO,IAAM,sBAAsB,gBAAgB;AAAA,EACjD,KAAK,CAAC,UAAsD;AAC1D,UAAM,EAAE,WAAW,IAAI,cAAc;AAGrC,QAAI,CAAC,MAAM,SAAS,CAAC,MAAM,iBAAiB;AAC1C,aAAO,gCAAE,gBAAE;AAAA,IACb;AAEA,UAAM,eAAe;AAAA,MACnB,QAAQ;AAAA,MACR,eAAe;AAAA,MACf,MAAM;AAAA,MACN,MAAM;AAAA,MACN,UAAU;AAAA,MACV,QAAQ;AAAA,MACR,kBAAkB;AAAA,MAClB,cAAc;AAAA,MACd,aAAa;AAAA,IACf;AAEA,UAAM,oBAAoB,EAAE,OAAO,CAAC,GAAG,cAAc,KAAK;AAE1D,UAAM,kBAAkB,EAAE;AAAA,MACxB,CAAC;AAAA,MACD;AAAA,MACA,WAAW,mBAAmB,UAAU;AAAA,IAC1C;AAEA,QAAI,CAAC,gBAAgB,SAAS,gBAAgB,iBAAiB;AAC7D,aAAO,uBAAuB;AAAA,QAC5B,GAAG;AAAA,QACH,YAAY;AAAA,MACd,CAAC;AAAA,IACH;AAEA,QAAI,CAAC,aAAa,gBAAgB,KAAK,GAAG;AACxC,aAAO,eAAe,eAAe;AAAA,IACvC;AAEA,QAAI,gBAAgB,YAAY;AAC9B,aAAO,gBAAgB,eAAe;AAAA,IACxC;AAEA,QAAI,gBAAgB,MAAM;AACxB,aAAO,UAAU,eAAe;AAAA,IAClC;AAEA,WAAO,cAAc,eAAe;AAAA,EACtC,CAAC;AACH;","names":[]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {
|
|
2
|
+
sendRequestENSInfo
|
|
3
|
+
} from "./chunk-AMXXTGCE.js";
|
|
4
|
+
import {
|
|
5
|
+
isCoreMainOrTestAddress
|
|
6
|
+
} from "./chunk-A7RMNSCW.js";
|
|
7
|
+
import {
|
|
8
|
+
apiPrefix
|
|
9
|
+
} from "./chunk-ADPYV4OL.js";
|
|
10
|
+
import {
|
|
11
|
+
useENSStore
|
|
12
|
+
} from "./chunk-HRW4BUP4.js";
|
|
13
|
+
|
|
14
|
+
// src/utils/hooks/useENS.ts
|
|
15
|
+
import { useEffect } from "react";
|
|
16
|
+
import useSWR from "swr";
|
|
17
|
+
var ensUrl = (ens, value) => {
|
|
18
|
+
if (!value)
|
|
19
|
+
return null;
|
|
20
|
+
if (typeof value === "string" && ens[value])
|
|
21
|
+
return null;
|
|
22
|
+
let url = null;
|
|
23
|
+
if (typeof value === "string" && isCoreMainOrTestAddress(value)) {
|
|
24
|
+
url = `${apiPrefix}/ens/reverse/match?address=${value}`;
|
|
25
|
+
} else if (Array.isArray(value) && value.length) {
|
|
26
|
+
const validAddresses = value.filter(
|
|
27
|
+
(v) => typeof v === "string" && isCoreMainOrTestAddress(v) && !ens[v]
|
|
28
|
+
);
|
|
29
|
+
if (validAddresses.length === 0)
|
|
30
|
+
return null;
|
|
31
|
+
const baseUrl = `${apiPrefix}/ens/reverse/match?`;
|
|
32
|
+
const maxQueryLength = 1800 - baseUrl.length;
|
|
33
|
+
const query = validAddresses.reduce((acc, curr, index) => {
|
|
34
|
+
const newPart = `${index === 0 ? "" : "&"}address=${curr}`;
|
|
35
|
+
if (acc.length + newPart.length > maxQueryLength) {
|
|
36
|
+
return acc;
|
|
37
|
+
}
|
|
38
|
+
return acc + newPart;
|
|
39
|
+
}, "");
|
|
40
|
+
if (query) {
|
|
41
|
+
url = baseUrl + query;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return url;
|
|
45
|
+
};
|
|
46
|
+
var useENS = (address) => {
|
|
47
|
+
const { ens, setENS } = useENSStore();
|
|
48
|
+
const url = ensUrl(ens, address);
|
|
49
|
+
const { data } = useSWR(url, () => sendRequestENSInfo(url), {
|
|
50
|
+
revalidateOnFocus: false
|
|
51
|
+
});
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
if (data) {
|
|
54
|
+
setENS(data);
|
|
55
|
+
}
|
|
56
|
+
}, [data]);
|
|
57
|
+
return { ens };
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export {
|
|
61
|
+
useENS
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=chunk-TXNXFHTS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/hooks/useENS.ts"],"sourcesContent":["import { useEffect } from 'react';\nimport useSWR from 'swr';\nimport { sendRequestENSInfo } from 'src/utils/request';\nimport { useENSStore } from '../../store';\nimport { ENSType } from '../../store/types';\nimport { isCoreMainOrTestAddress } from '../address';\nimport { apiPrefix } from '../constants';\n\nconst ensUrl = (ens: ENSType, value: string | null | string[]) => {\n if (!value) return null;\n if (typeof value === 'string' && ens[value]) return null;\n\n let url = null;\n\n if (typeof value === 'string' && isCoreMainOrTestAddress(value)) {\n url = `${apiPrefix}/ens/reverse/match?address=${value}`;\n } else if (Array.isArray(value) && value.length) {\n const validAddresses = value.filter(\n v => typeof v === 'string' && isCoreMainOrTestAddress(v) && !ens[v],\n );\n if (validAddresses.length === 0) return null;\n\n const baseUrl = `${apiPrefix}/ens/reverse/match?`;\n const maxQueryLength = 1800 - baseUrl.length;\n\n const query = validAddresses.reduce((acc, curr, index) => {\n const newPart = `${index === 0 ? '' : '&'}address=${curr}`;\n if (acc.length + newPart.length > maxQueryLength) {\n return acc;\n }\n return acc + newPart;\n }, '');\n\n if (query) {\n url = baseUrl + query;\n }\n }\n\n return url;\n};\n\nexport const useENS = (address: string | null | string[]) => {\n const { ens, setENS } = useENSStore();\n\n const url = ensUrl(ens, address);\n\n const { data } = useSWR(url, () => sendRequestENSInfo(url), {\n revalidateOnFocus: false,\n });\n\n useEffect(() => {\n if (data) {\n setENS(data);\n }\n }, [data]);\n\n return { ens };\n};\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,iBAAiB;AAC1B,OAAO,YAAY;AAOnB,IAAM,SAAS,CAAC,KAAc,UAAoC;AAChE,MAAI,CAAC;AAAO,WAAO;AACnB,MAAI,OAAO,UAAU,YAAY,IAAI,KAAK;AAAG,WAAO;AAEpD,MAAI,MAAM;AAEV,MAAI,OAAO,UAAU,YAAY,wBAAwB,KAAK,GAAG;AAC/D,UAAM,GAAG,uCAAuC;AAAA,EAClD,WAAW,MAAM,QAAQ,KAAK,KAAK,MAAM,QAAQ;AAC/C,UAAM,iBAAiB,MAAM;AAAA,MAC3B,OAAK,OAAO,MAAM,YAAY,wBAAwB,CAAC,KAAK,CAAC,IAAI,CAAC;AAAA,IACpE;AACA,QAAI,eAAe,WAAW;AAAG,aAAO;AAExC,UAAM,UAAU,GAAG;AACnB,UAAM,iBAAiB,OAAO,QAAQ;AAEtC,UAAM,QAAQ,eAAe,OAAO,CAAC,KAAK,MAAM,UAAU;AACxD,YAAM,UAAU,GAAG,UAAU,IAAI,KAAK,cAAc;AACpD,UAAI,IAAI,SAAS,QAAQ,SAAS,gBAAgB;AAChD,eAAO;AAAA,MACT;AACA,aAAO,MAAM;AAAA,IACf,GAAG,EAAE;AAEL,QAAI,OAAO;AACT,YAAM,UAAU;AAAA,IAClB;AAAA,EACF;AAEA,SAAO;AACT;AAEO,IAAM,SAAS,CAAC,YAAsC;AAC3D,QAAM,EAAE,KAAK,OAAO,IAAI,YAAY;AAEpC,QAAM,MAAM,OAAO,KAAK,OAAO;AAE/B,QAAM,EAAE,KAAK,IAAI,OAAO,KAAK,MAAM,mBAAmB,GAAG,GAAG;AAAA,IAC1D,mBAAmB;AAAA,EACrB,CAAC;AAED,YAAU,MAAM;AACd,QAAI,MAAM;AACR,aAAO,IAAI;AAAA,IACb;AAAA,EACF,GAAG,CAAC,IAAI,CAAC;AAET,SAAO,EAAE,IAAI;AACf;","names":[]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {
|
|
2
|
+
sendRequestENSInfo
|
|
3
|
+
} from "./chunk-NEARJYPS.js";
|
|
4
|
+
import {
|
|
5
|
+
isCoreMainOrTestAddress
|
|
6
|
+
} from "./chunk-N4GMCDSM.js";
|
|
7
|
+
import {
|
|
8
|
+
apiPrefix
|
|
9
|
+
} from "./chunk-ADPYV4OL.js";
|
|
10
|
+
import {
|
|
11
|
+
useENSStore
|
|
12
|
+
} from "./chunk-HRW4BUP4.js";
|
|
13
|
+
|
|
14
|
+
// src/utils/hooks/useENS.ts
|
|
15
|
+
import { useEffect } from "react";
|
|
16
|
+
import useSWR from "swr";
|
|
17
|
+
var ensUrl = (ens, value) => {
|
|
18
|
+
if (!value)
|
|
19
|
+
return null;
|
|
20
|
+
if (typeof value === "string" && ens[value])
|
|
21
|
+
return null;
|
|
22
|
+
let url = null;
|
|
23
|
+
if (typeof value === "string" && isCoreMainOrTestAddress(value)) {
|
|
24
|
+
url = `${apiPrefix}/ens/reverse/match?address=${value}`;
|
|
25
|
+
} else if (Array.isArray(value) && value.length) {
|
|
26
|
+
const validAddresses = value.filter(
|
|
27
|
+
(v) => typeof v === "string" && isCoreMainOrTestAddress(v) && !ens[v]
|
|
28
|
+
);
|
|
29
|
+
if (validAddresses.length === 0)
|
|
30
|
+
return null;
|
|
31
|
+
const baseUrl = `${apiPrefix}/ens/reverse/match?`;
|
|
32
|
+
const maxQueryLength = 1800 - baseUrl.length;
|
|
33
|
+
const query = validAddresses.reduce((acc, curr, index) => {
|
|
34
|
+
const newPart = `${index === 0 ? "" : "&"}address=${curr}`;
|
|
35
|
+
if (acc.length + newPart.length > maxQueryLength) {
|
|
36
|
+
return acc;
|
|
37
|
+
}
|
|
38
|
+
return acc + newPart;
|
|
39
|
+
}, "");
|
|
40
|
+
if (query) {
|
|
41
|
+
url = baseUrl + query;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return url;
|
|
45
|
+
};
|
|
46
|
+
var useENS = (address) => {
|
|
47
|
+
const { ens, setENS } = useENSStore();
|
|
48
|
+
const url = ensUrl(ens, address);
|
|
49
|
+
const { data } = useSWR(url, () => sendRequestENSInfo(url), {
|
|
50
|
+
revalidateOnFocus: false
|
|
51
|
+
});
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
if (data) {
|
|
54
|
+
setENS(data);
|
|
55
|
+
}
|
|
56
|
+
}, [data]);
|
|
57
|
+
return { ens };
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export {
|
|
61
|
+
useENS
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=chunk-U7OZK37L.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/hooks/useENS.ts"],"sourcesContent":["import { useEffect } from 'react';\nimport useSWR from 'swr';\nimport { sendRequestENSInfo } from 'src/utils/request';\nimport { useENSStore } from '../../store';\nimport { ENSType } from '../../store/types';\nimport { isCoreMainOrTestAddress } from '../address';\nimport { apiPrefix } from '../constants';\n\nconst ensUrl = (ens: ENSType, value: string | null | string[]) => {\n if (!value) return null;\n if (typeof value === 'string' && ens[value]) return null;\n\n let url = null;\n\n if (typeof value === 'string' && isCoreMainOrTestAddress(value)) {\n url = `${apiPrefix}/ens/reverse/match?address=${value}`;\n } else if (Array.isArray(value) && value.length) {\n const validAddresses = value.filter(\n v => typeof v === 'string' && isCoreMainOrTestAddress(v) && !ens[v],\n );\n if (validAddresses.length === 0) return null;\n\n const baseUrl = `${apiPrefix}/ens/reverse/match?`;\n const maxQueryLength = 1800 - baseUrl.length;\n\n const query = validAddresses.reduce((acc, curr, index) => {\n const newPart = `${index === 0 ? '' : '&'}address=${curr}`;\n if (acc.length + newPart.length > maxQueryLength) {\n return acc;\n }\n return acc + newPart;\n }, '');\n\n if (query) {\n url = baseUrl + query;\n }\n }\n\n return url;\n};\n\nexport const useENS = (address: string | null | string[]) => {\n const { ens, setENS } = useENSStore();\n\n const url = ensUrl(ens, address);\n\n const { data } = useSWR(url, () => sendRequestENSInfo(url), {\n revalidateOnFocus: false,\n });\n\n useEffect(() => {\n if (data) {\n setENS(data);\n }\n }, [data]);\n\n return { ens };\n};\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,iBAAiB;AAC1B,OAAO,YAAY;AAOnB,IAAM,SAAS,CAAC,KAAc,UAAoC;AAChE,MAAI,CAAC;AAAO,WAAO;AACnB,MAAI,OAAO,UAAU,YAAY,IAAI,KAAK;AAAG,WAAO;AAEpD,MAAI,MAAM;AAEV,MAAI,OAAO,UAAU,YAAY,wBAAwB,KAAK,GAAG;AAC/D,UAAM,GAAG,uCAAuC;AAAA,EAClD,WAAW,MAAM,QAAQ,KAAK,KAAK,MAAM,QAAQ;AAC/C,UAAM,iBAAiB,MAAM;AAAA,MAC3B,OAAK,OAAO,MAAM,YAAY,wBAAwB,CAAC,KAAK,CAAC,IAAI,CAAC;AAAA,IACpE;AACA,QAAI,eAAe,WAAW;AAAG,aAAO;AAExC,UAAM,UAAU,GAAG;AACnB,UAAM,iBAAiB,OAAO,QAAQ;AAEtC,UAAM,QAAQ,eAAe,OAAO,CAAC,KAAK,MAAM,UAAU;AACxD,YAAM,UAAU,GAAG,UAAU,IAAI,KAAK,cAAc;AACpD,UAAI,IAAI,SAAS,QAAQ,SAAS,gBAAgB;AAChD,eAAO;AAAA,MACT;AACA,aAAO,MAAM;AAAA,IACf,GAAG,EAAE;AAEL,QAAI,OAAO;AACT,YAAM,UAAU;AAAA,IAClB;AAAA,EACF;AAEA,SAAO;AACT;AAEO,IAAM,SAAS,CAAC,YAAsC;AAC3D,QAAM,EAAE,KAAK,OAAO,IAAI,YAAY;AAEpC,QAAM,MAAM,OAAO,KAAK,OAAO;AAE/B,QAAM,EAAE,KAAK,IAAI,OAAO,KAAK,MAAM,mBAAmB,GAAG,GAAG;AAAA,IAC1D,mBAAmB;AAAA,EACrB,CAAC;AAED,YAAU,MAAM;AACd,QAAI,MAAM;AACR,aAAO,IAAI;AAAA,IACb;AAAA,EACF,GAAG,CAAC,IAAI,CAAC;AAET,SAAO,EAAE,IAAI;AACf;","names":[]}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ContractAddress,
|
|
3
|
+
ContractCreatedAddress,
|
|
4
|
+
InvalidAddress,
|
|
5
|
+
MyAddress
|
|
6
|
+
} from "./chunk-4WGHU5GK.js";
|
|
7
|
+
import {
|
|
8
|
+
RenderAddress
|
|
9
|
+
} from "./chunk-WXVV7KLP.js";
|
|
10
|
+
import {
|
|
11
|
+
convertCheckSum,
|
|
12
|
+
formatAddress,
|
|
13
|
+
isEvmAddress,
|
|
14
|
+
isZeroAddress
|
|
15
|
+
} from "./chunk-XC4OHJZG.js";
|
|
16
|
+
import {
|
|
17
|
+
getLabelInfo
|
|
18
|
+
} from "./chunk-SIX7XLAC.js";
|
|
19
|
+
import {
|
|
20
|
+
getTranslations,
|
|
21
|
+
useGlobalData
|
|
22
|
+
} from "./chunk-QKQG47IV.js";
|
|
23
|
+
|
|
24
|
+
// src/components/AddressContainer/EVMAddressContainer.tsx
|
|
25
|
+
import { memo } from "react";
|
|
26
|
+
import { withTranslation } from "react-i18next";
|
|
27
|
+
import _ from "lodash";
|
|
28
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
29
|
+
var parseProps = (props, globalData) => {
|
|
30
|
+
const { alias, t, showAddressLabel, showNametag, nametagInfo } = props;
|
|
31
|
+
const value = props.value || "";
|
|
32
|
+
const cfxAddress = formatAddress(value, "hex");
|
|
33
|
+
const translations = getTranslations();
|
|
34
|
+
let aliasLabel = alias;
|
|
35
|
+
if (!alias && isZeroAddress(cfxAddress)) {
|
|
36
|
+
aliasLabel = t(translations.general.zeroAddress);
|
|
37
|
+
}
|
|
38
|
+
let officalNametag = null;
|
|
39
|
+
let addressLabel = null;
|
|
40
|
+
if (cfxAddress && showAddressLabel) {
|
|
41
|
+
const addressLabels = globalData?.["CONFLUX_SCAN_ADDRESS_LABELS" /* addressLabel */];
|
|
42
|
+
const gAddressLabel = addressLabels?.[convertCheckSum(cfxAddress)] || addressLabels?.[cfxAddress.toLowerCase()];
|
|
43
|
+
if (gAddressLabel) {
|
|
44
|
+
const { label } = getLabelInfo(gAddressLabel, "tag");
|
|
45
|
+
addressLabel = label;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (cfxAddress && showNametag) {
|
|
49
|
+
const nametags = nametagInfo?.[convertCheckSum(cfxAddress)] || nametagInfo?.[cfxAddress.toLowerCase()];
|
|
50
|
+
if (nametags) {
|
|
51
|
+
const nametag = nametags?.nametag ?? "";
|
|
52
|
+
const { label } = getLabelInfo(nametag, "nametag");
|
|
53
|
+
officalNametag = label;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
alias: aliasLabel,
|
|
58
|
+
nametag: officalNametag,
|
|
59
|
+
addressLabel,
|
|
60
|
+
cfxAddress
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
var EVMAddressContainer = withTranslation()(
|
|
64
|
+
memo((props) => {
|
|
65
|
+
const { globalData } = useGlobalData();
|
|
66
|
+
if (!props.value && !props.contractCreated) {
|
|
67
|
+
return /* @__PURE__ */ jsx(Fragment, { children: "--" });
|
|
68
|
+
}
|
|
69
|
+
const defaultProps = {
|
|
70
|
+
isFull: false,
|
|
71
|
+
isFullNameTag: false,
|
|
72
|
+
link: true,
|
|
73
|
+
isMe: false,
|
|
74
|
+
showIcon: true,
|
|
75
|
+
verify: false,
|
|
76
|
+
showAddressLabel: true,
|
|
77
|
+
showENSLabel: true,
|
|
78
|
+
showNametag: true
|
|
79
|
+
};
|
|
80
|
+
const mergeDefaultProps = _.assign({}, defaultProps, props);
|
|
81
|
+
const mergeParseProps = _.merge(
|
|
82
|
+
{},
|
|
83
|
+
mergeDefaultProps,
|
|
84
|
+
parseProps(mergeDefaultProps, globalData)
|
|
85
|
+
);
|
|
86
|
+
if (!mergeParseProps.value && mergeParseProps.contractCreated) {
|
|
87
|
+
return ContractCreatedAddress({
|
|
88
|
+
...mergeParseProps,
|
|
89
|
+
outputType: "hex"
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
if (!isEvmAddress(mergeParseProps.value)) {
|
|
93
|
+
return InvalidAddress(mergeParseProps);
|
|
94
|
+
}
|
|
95
|
+
if (mergeParseProps.isContract) {
|
|
96
|
+
return ContractAddress(mergeParseProps);
|
|
97
|
+
}
|
|
98
|
+
if (mergeParseProps.isMe) {
|
|
99
|
+
return MyAddress(mergeParseProps);
|
|
100
|
+
}
|
|
101
|
+
return RenderAddress(mergeParseProps);
|
|
102
|
+
})
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
export {
|
|
106
|
+
EVMAddressContainer
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=chunk-UB7MM3A3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/AddressContainer/EVMAddressContainer.tsx"],"sourcesContent":["import { memo } from 'react';\nimport { WithTranslation, withTranslation } from 'react-i18next';\nimport _ from 'lodash';\nimport {\n formatAddress,\n isEvmAddress,\n isZeroAddress,\n convertCheckSum,\n} from '../../utils/address';\nimport { useGlobalData, getTranslations } from '../../store';\nimport { LOCALSTORAGE_KEYS_MAP } from '../../utils/constants';\nimport { getLabelInfo } from './label';\n\nimport { RenderAddress } from './addressView';\nimport {\n ContractCreatedAddress,\n InvalidAddress,\n ContractAddress,\n MyAddress,\n} from './addressSwitcher';\nimport { GlobalDataType } from 'src/store/types';\nimport { EVMAddressContainerProps } from './types';\n\nconst parseProps = (\n props: EVMAddressContainerProps & WithTranslation,\n globalData: GlobalDataType,\n) => {\n const { alias, t, showAddressLabel, showNametag, nametagInfo } = props;\n const value: string = props.value || '';\n const cfxAddress = formatAddress(value, 'hex');\n\n const translations = getTranslations();\n\n let aliasLabel = alias;\n if (!alias && isZeroAddress(cfxAddress)) {\n aliasLabel = t(translations.general.zeroAddress);\n }\n\n // official name tag\n let officalNametag: React.ReactNode = null;\n // private name tag\n let addressLabel: React.ReactNode = null;\n\n if (cfxAddress && showAddressLabel) {\n // global private name tag\n const addressLabels = globalData?.[LOCALSTORAGE_KEYS_MAP.addressLabel];\n const gAddressLabel =\n addressLabels?.[convertCheckSum(cfxAddress)] ||\n addressLabels?.[cfxAddress.toLowerCase()];\n\n if (gAddressLabel) {\n const { label } = getLabelInfo(gAddressLabel, 'tag');\n addressLabel = label;\n }\n }\n\n if (cfxAddress && showNametag) {\n const nametags =\n nametagInfo?.[convertCheckSum(cfxAddress)] ||\n nametagInfo?.[cfxAddress.toLowerCase()];\n\n if (nametags) {\n const nametag = nametags?.nametag ?? '';\n const { label } = getLabelInfo(nametag, 'nametag');\n officalNametag = label;\n }\n }\n\n return {\n alias: aliasLabel,\n nametag: officalNametag,\n addressLabel,\n cfxAddress,\n };\n};\n\nexport const EVMAddressContainer = withTranslation()(\n memo((props: EVMAddressContainerProps & WithTranslation) => {\n const { globalData } = useGlobalData();\n\n // If a txn receipt has no 'to' address or 'contractCreated', show -- for temp\n if (!props.value && !props.contractCreated) {\n return <>--</>;\n }\n\n const defaultProps = {\n isFull: false,\n isFullNameTag: false,\n link: true,\n isMe: false,\n showIcon: true,\n verify: false,\n showAddressLabel: true,\n showENSLabel: true,\n showNametag: true,\n };\n\n const mergeDefaultProps = _.assign({}, defaultProps, props);\n\n const mergeParseProps = _.merge(\n {},\n mergeDefaultProps,\n parseProps(mergeDefaultProps, globalData),\n );\n\n if (!mergeParseProps.value && mergeParseProps.contractCreated) {\n return ContractCreatedAddress({\n ...mergeParseProps,\n outputType: 'hex',\n });\n }\n\n if (!isEvmAddress(mergeParseProps.value)) {\n return InvalidAddress(mergeParseProps);\n }\n\n if (mergeParseProps.isContract) {\n return ContractAddress(mergeParseProps);\n }\n\n if (mergeParseProps.isMe) {\n return MyAddress(mergeParseProps);\n }\n\n return RenderAddress(mergeParseProps);\n }),\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,YAAY;AACrB,SAA0B,uBAAuB;AACjD,OAAO,OAAO;AAgFD;AA3Db,IAAM,aAAa,CACjB,OACA,eACG;AACH,QAAM,EAAE,OAAO,GAAG,kBAAkB,aAAa,YAAY,IAAI;AACjE,QAAM,QAAgB,MAAM,SAAS;AACrC,QAAM,aAAa,cAAc,OAAO,KAAK;AAE7C,QAAM,eAAe,gBAAgB;AAErC,MAAI,aAAa;AACjB,MAAI,CAAC,SAAS,cAAc,UAAU,GAAG;AACvC,iBAAa,EAAE,aAAa,QAAQ,WAAW;AAAA,EACjD;AAGA,MAAI,iBAAkC;AAEtC,MAAI,eAAgC;AAEpC,MAAI,cAAc,kBAAkB;AAElC,UAAM,gBAAgB,6DAA+C;AACrE,UAAM,gBACJ,gBAAgB,gBAAgB,UAAU,CAAC,KAC3C,gBAAgB,WAAW,YAAY,CAAC;AAE1C,QAAI,eAAe;AACjB,YAAM,EAAE,MAAM,IAAI,aAAa,eAAe,KAAK;AACnD,qBAAe;AAAA,IACjB;AAAA,EACF;AAEA,MAAI,cAAc,aAAa;AAC7B,UAAM,WACJ,cAAc,gBAAgB,UAAU,CAAC,KACzC,cAAc,WAAW,YAAY,CAAC;AAExC,QAAI,UAAU;AACZ,YAAM,UAAU,UAAU,WAAW;AACrC,YAAM,EAAE,MAAM,IAAI,aAAa,SAAS,SAAS;AACjD,uBAAiB;AAAA,IACnB;AAAA,EACF;AAEA,SAAO;AAAA,IACL,OAAO;AAAA,IACP,SAAS;AAAA,IACT;AAAA,IACA;AAAA,EACF;AACF;AAEO,IAAM,sBAAsB,gBAAgB;AAAA,EACjD,KAAK,CAAC,UAAsD;AAC1D,UAAM,EAAE,WAAW,IAAI,cAAc;AAGrC,QAAI,CAAC,MAAM,SAAS,CAAC,MAAM,iBAAiB;AAC1C,aAAO,gCAAE,gBAAE;AAAA,IACb;AAEA,UAAM,eAAe;AAAA,MACnB,QAAQ;AAAA,MACR,eAAe;AAAA,MACf,MAAM;AAAA,MACN,MAAM;AAAA,MACN,UAAU;AAAA,MACV,QAAQ;AAAA,MACR,kBAAkB;AAAA,MAClB,cAAc;AAAA,MACd,aAAa;AAAA,IACf;AAEA,UAAM,oBAAoB,EAAE,OAAO,CAAC,GAAG,cAAc,KAAK;AAE1D,UAAM,kBAAkB,EAAE;AAAA,MACxB,CAAC;AAAA,MACD;AAAA,MACA,WAAW,mBAAmB,UAAU;AAAA,IAC1C;AAEA,QAAI,CAAC,gBAAgB,SAAS,gBAAgB,iBAAiB;AAC7D,aAAO,uBAAuB;AAAA,QAC5B,GAAG;AAAA,QACH,YAAY;AAAA,MACd,CAAC;AAAA,IACH;AAEA,QAAI,CAAC,aAAa,gBAAgB,KAAK,GAAG;AACxC,aAAO,eAAe,eAAe;AAAA,IACvC;AAEA,QAAI,gBAAgB,YAAY;AAC9B,aAAO,gBAAgB,eAAe;AAAA,IACxC;AAEA,QAAI,gBAAgB,MAAM;AACxB,aAAO,UAAU,eAAe;AAAA,IAClC;AAEA,WAAO,cAAc,eAAe;AAAA,EACtC,CAAC;AACH;","names":[]}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import {
|
|
2
|
+
convertCheckSum
|
|
3
|
+
} from "./chunk-ZE2A3A2S.js";
|
|
4
|
+
import {
|
|
5
|
+
Text
|
|
6
|
+
} from "./chunk-BTDA5B5P.js";
|
|
7
|
+
import {
|
|
8
|
+
getTranslations
|
|
9
|
+
} from "./chunk-HRW4BUP4.js";
|
|
10
|
+
|
|
11
|
+
// src/components/AddressContainer/addressView.tsx
|
|
12
|
+
import { Translation } from "react-i18next";
|
|
13
|
+
import { shortenAddress } from "@cfx-kit/dapp-utils/dist/address";
|
|
14
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
var defaultPCMaxWidth = 138;
|
|
16
|
+
var renderTooltipContent = (tooltipContent) => {
|
|
17
|
+
return Object.entries(tooltipContent).map(([key, { label, value, hideLabel }]) => {
|
|
18
|
+
if (value) {
|
|
19
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
20
|
+
!hideLabel && /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(Translation, { children: (t) => t(label) }) }),
|
|
21
|
+
value
|
|
22
|
+
] }, key);
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
}).filter(Boolean);
|
|
26
|
+
};
|
|
27
|
+
var convertLink = ({
|
|
28
|
+
link,
|
|
29
|
+
type,
|
|
30
|
+
hrefAddress,
|
|
31
|
+
cfxAddress
|
|
32
|
+
}) => {
|
|
33
|
+
if (typeof link === "string") {
|
|
34
|
+
return link;
|
|
35
|
+
}
|
|
36
|
+
const address = hrefAddress || cfxAddress;
|
|
37
|
+
if (address && typeof address === "string") {
|
|
38
|
+
const pathname = window.location.pathname.toLowerCase();
|
|
39
|
+
const addressLower = address.toLowerCase();
|
|
40
|
+
if (pathname.includes("/address/" + addressLower)) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
if (type === "pow") {
|
|
44
|
+
return `/address/${address}`;
|
|
45
|
+
}
|
|
46
|
+
if (type === "pos") {
|
|
47
|
+
return `/pos/accounts/${address}`;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return false;
|
|
51
|
+
};
|
|
52
|
+
var RenderAddress = ({
|
|
53
|
+
cfxAddress,
|
|
54
|
+
alias,
|
|
55
|
+
hoverValue,
|
|
56
|
+
hrefAddress,
|
|
57
|
+
content,
|
|
58
|
+
link = "",
|
|
59
|
+
isFull = false,
|
|
60
|
+
isFullNameTag = false,
|
|
61
|
+
style = {},
|
|
62
|
+
maxWidth,
|
|
63
|
+
prefix = null,
|
|
64
|
+
suffix = null,
|
|
65
|
+
type = "pow",
|
|
66
|
+
addressLabel = "",
|
|
67
|
+
ENSLabel = "",
|
|
68
|
+
nametag = "",
|
|
69
|
+
hideAliasPrefixInHover = false
|
|
70
|
+
}) => {
|
|
71
|
+
const translations = getTranslations();
|
|
72
|
+
const name = content || ENSLabel || nametag || addressLabel || alias;
|
|
73
|
+
const defaultStyle = {
|
|
74
|
+
maxWidth: `${name && isFullNameTag || isFull ? "auto" : (maxWidth || defaultPCMaxWidth) + "px"}`
|
|
75
|
+
};
|
|
76
|
+
const href = convertLink({ link, type, hrefAddress, cfxAddress });
|
|
77
|
+
const Wrapper = href ? "a" : "div";
|
|
78
|
+
const tooltipContent = {
|
|
79
|
+
ENSLabel: {
|
|
80
|
+
label: translations?.ens?.tip,
|
|
81
|
+
value: ENSLabel
|
|
82
|
+
},
|
|
83
|
+
nametag: {
|
|
84
|
+
label: translations?.nametag?.tip,
|
|
85
|
+
value: nametag
|
|
86
|
+
},
|
|
87
|
+
addressLabel: {
|
|
88
|
+
label: translations?.profile.address.myNameTag,
|
|
89
|
+
value: addressLabel
|
|
90
|
+
},
|
|
91
|
+
alias: {
|
|
92
|
+
label: translations?.profile.address.publicNameTag,
|
|
93
|
+
value: alias,
|
|
94
|
+
hideLabel: hideAliasPrefixInHover
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const checksumAddress = convertCheckSum(cfxAddress);
|
|
98
|
+
const cfxAddressLabel = typeof cfxAddress === "string" && !isFull ? shortenAddress(checksumAddress) : checksumAddress;
|
|
99
|
+
return /* @__PURE__ */ jsxs("div", { className: "inline-flex", children: [
|
|
100
|
+
prefix,
|
|
101
|
+
/* @__PURE__ */ jsx(
|
|
102
|
+
Text,
|
|
103
|
+
{
|
|
104
|
+
tag: "span",
|
|
105
|
+
hoverValue: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
106
|
+
renderTooltipContent(tooltipContent),
|
|
107
|
+
/* @__PURE__ */ jsx("div", { children: hoverValue || checksumAddress })
|
|
108
|
+
] }),
|
|
109
|
+
children: /* @__PURE__ */ jsx(
|
|
110
|
+
Wrapper,
|
|
111
|
+
{
|
|
112
|
+
className: "block relative align-bottom cursor-default truncate",
|
|
113
|
+
style: { ...defaultStyle, ...style },
|
|
114
|
+
...href ? { href: String(href) } : {},
|
|
115
|
+
children: name || cfxAddressLabel
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
suffix
|
|
121
|
+
] });
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export {
|
|
125
|
+
RenderAddress
|
|
126
|
+
};
|
|
127
|
+
//# sourceMappingURL=chunk-UBBJF27D.js.map
|