@cfxjs/sirius-next-common 0.1.33 → 0.1.35
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-27U3ZES6.js +212 -0
- package/dist/chunk-27U3ZES6.js.map +1 -0
- package/dist/chunk-2BYZ7YCR.js +63 -0
- package/dist/chunk-2BYZ7YCR.js.map +1 -0
- package/dist/chunk-2CYC4UWO.js +108 -0
- package/dist/chunk-2CYC4UWO.js.map +1 -0
- package/dist/chunk-2DTZKTKF.js +63 -0
- package/dist/chunk-2DTZKTKF.js.map +1 -0
- package/dist/chunk-2E3YJCV3.js +127 -0
- package/dist/chunk-2E3YJCV3.js.map +1 -0
- package/dist/chunk-2ICNULC2.js +254 -0
- package/dist/chunk-2ICNULC2.js.map +1 -0
- package/dist/chunk-2LPOU4PC.js +141 -0
- package/dist/chunk-2LPOU4PC.js.map +1 -0
- package/dist/chunk-2MSHBEWL.js +268 -0
- package/dist/chunk-2MSHBEWL.js.map +1 -0
- package/dist/chunk-2SCHWFIY.js +105 -0
- package/dist/chunk-2SCHWFIY.js.map +1 -0
- package/dist/chunk-3BYHQHWI.js +212 -0
- package/dist/chunk-3BYHQHWI.js.map +1 -0
- package/dist/chunk-3DTLHHIA.js +796 -0
- package/dist/chunk-3DTLHHIA.js.map +1 -0
- package/dist/chunk-3DYO4SUL.js +63 -0
- package/dist/chunk-3DYO4SUL.js.map +1 -0
- package/dist/chunk-3GT2MSFN.js +105 -0
- package/dist/chunk-3GT2MSFN.js.map +1 -0
- package/dist/chunk-3TE65Q5Q.js +105 -0
- package/dist/chunk-3TE65Q5Q.js.map +1 -0
- package/dist/chunk-3UE7QPSR.js +141 -0
- package/dist/chunk-3UE7QPSR.js.map +1 -0
- package/dist/chunk-43ZMPNVA.js +3629 -0
- package/dist/chunk-43ZMPNVA.js.map +1 -0
- package/dist/chunk-44PF4ZKF.js +63 -0
- package/dist/chunk-44PF4ZKF.js.map +1 -0
- package/dist/chunk-4AI26PND.js +150 -0
- package/dist/chunk-4AI26PND.js.map +1 -0
- package/dist/chunk-4JCWYUNH.js +275 -0
- package/dist/chunk-4JCWYUNH.js.map +1 -0
- package/dist/chunk-4LTDTOPU.js +49 -0
- package/dist/chunk-4LTDTOPU.js.map +1 -0
- package/dist/chunk-4N3GNHIP.js +108 -0
- package/dist/chunk-4N3GNHIP.js.map +1 -0
- package/dist/chunk-4OVKJTEK.js +254 -0
- package/dist/chunk-4OVKJTEK.js.map +1 -0
- package/dist/chunk-4RBTXO3A.js +108 -0
- package/dist/chunk-4RBTXO3A.js.map +1 -0
- package/dist/chunk-54S3AFTR.js +141 -0
- package/dist/chunk-54S3AFTR.js.map +1 -0
- package/dist/chunk-5G3TPHDI.js +49 -0
- package/dist/chunk-5G3TPHDI.js.map +1 -0
- package/dist/chunk-5HPBFAVS.js +108 -0
- package/dist/chunk-5HPBFAVS.js.map +1 -0
- package/dist/chunk-5MMGA5S5.js +108 -0
- package/dist/chunk-5MMGA5S5.js.map +1 -0
- package/dist/chunk-5O5QALCR.js +49 -0
- package/dist/chunk-5O5QALCR.js.map +1 -0
- package/dist/chunk-5PHY7B5Q.js +127 -0
- package/dist/chunk-5PHY7B5Q.js.map +1 -0
- package/dist/chunk-5QV6FSW5.js +108 -0
- package/dist/chunk-5QV6FSW5.js.map +1 -0
- package/dist/chunk-5TCARLKL.js +268 -0
- package/dist/chunk-5TCARLKL.js.map +1 -0
- package/dist/chunk-5VLX5LYF.js +796 -0
- package/dist/chunk-5VLX5LYF.js.map +1 -0
- package/dist/chunk-64PFHUWF.js +141 -0
- package/dist/chunk-64PFHUWF.js.map +1 -0
- package/dist/chunk-663WU3VG.js +127 -0
- package/dist/chunk-663WU3VG.js.map +1 -0
- package/dist/chunk-6A5P5KI3.js +141 -0
- package/dist/chunk-6A5P5KI3.js.map +1 -0
- package/dist/chunk-6CSRI3HH.js +141 -0
- package/dist/chunk-6CSRI3HH.js.map +1 -0
- package/dist/chunk-6ECE7EAG.js +63 -0
- package/dist/chunk-6ECE7EAG.js.map +1 -0
- package/dist/chunk-6JGJBJQ5.js +268 -0
- package/dist/chunk-6JGJBJQ5.js.map +1 -0
- package/dist/chunk-6LDWVWGX.js +3629 -0
- package/dist/chunk-6LDWVWGX.js.map +1 -0
- package/dist/chunk-6LZKERHY.js +273 -0
- package/dist/chunk-6LZKERHY.js.map +1 -0
- package/dist/chunk-6RTSZQPF.js +150 -0
- package/dist/chunk-6RTSZQPF.js.map +1 -0
- package/dist/chunk-6RUCML36.js +108 -0
- package/dist/chunk-6RUCML36.js.map +1 -0
- package/dist/chunk-6T7MFHX3.js +2324 -0
- package/dist/chunk-6T7MFHX3.js.map +1 -0
- package/dist/chunk-6ZC5J3YR.js +212 -0
- package/dist/chunk-6ZC5J3YR.js.map +1 -0
- package/dist/chunk-72ZLP3KN.js +3629 -0
- package/dist/chunk-72ZLP3KN.js.map +1 -0
- package/dist/chunk-7355VRDR.js +108 -0
- package/dist/chunk-7355VRDR.js.map +1 -0
- package/dist/chunk-73ACKXGM.js +254 -0
- package/dist/chunk-73ACKXGM.js.map +1 -0
- package/dist/chunk-7FHJMA3Z.js +212 -0
- package/dist/chunk-7FHJMA3Z.js.map +1 -0
- package/dist/chunk-7GW7YPXK.js +127 -0
- package/dist/chunk-7GW7YPXK.js.map +1 -0
- package/dist/chunk-7M5S36LE.js +2324 -0
- package/dist/chunk-7M5S36LE.js.map +1 -0
- package/dist/chunk-7MUTGZCN.js +63 -0
- package/dist/chunk-7MUTGZCN.js.map +1 -0
- package/dist/chunk-7NSYEE6O.js +127 -0
- package/dist/chunk-7NSYEE6O.js.map +1 -0
- package/dist/chunk-7OSWOC4R.js +3629 -0
- package/dist/chunk-7OSWOC4R.js.map +1 -0
- package/dist/chunk-7PGOPD6T.js +63 -0
- package/dist/chunk-7PGOPD6T.js.map +1 -0
- package/dist/chunk-A25FZPUD.js +268 -0
- package/dist/chunk-A25FZPUD.js.map +1 -0
- package/dist/chunk-A474G2N6.js +63 -0
- package/dist/chunk-A474G2N6.js.map +1 -0
- package/dist/chunk-A4KAYCOA.js +63 -0
- package/dist/chunk-A4KAYCOA.js.map +1 -0
- package/dist/chunk-AC3QYTOI.js +141 -0
- package/dist/chunk-AC3QYTOI.js.map +1 -0
- package/dist/chunk-APYD7IKG.js +49 -0
- package/dist/chunk-APYD7IKG.js.map +1 -0
- package/dist/chunk-ARALCU4G.js +150 -0
- package/dist/chunk-ARALCU4G.js.map +1 -0
- package/dist/chunk-AVY3BJ2X.js +127 -0
- package/dist/chunk-AVY3BJ2X.js.map +1 -0
- package/dist/chunk-AZ6RP3ME.js +278 -0
- package/dist/chunk-AZ6RP3ME.js.map +1 -0
- package/dist/chunk-B24CPBDV.js +150 -0
- package/dist/chunk-B24CPBDV.js.map +1 -0
- package/dist/chunk-B2SL7FHW.js +63 -0
- package/dist/chunk-B2SL7FHW.js.map +1 -0
- package/dist/chunk-BC6MQSTI.js +108 -0
- package/dist/chunk-BC6MQSTI.js.map +1 -0
- package/dist/chunk-BETECLYX.js +2324 -0
- package/dist/chunk-BETECLYX.js.map +1 -0
- package/dist/chunk-BEZT4KEG.js +273 -0
- package/dist/chunk-BEZT4KEG.js.map +1 -0
- package/dist/chunk-BGRIHUGF.js +127 -0
- package/dist/chunk-BGRIHUGF.js.map +1 -0
- package/dist/chunk-BGSOKXPS.js +3629 -0
- package/dist/chunk-BGSOKXPS.js.map +1 -0
- package/dist/chunk-BHHLS3OI.js +212 -0
- package/dist/chunk-BHHLS3OI.js.map +1 -0
- package/dist/chunk-BQU5GLOL.js +273 -0
- package/dist/chunk-BQU5GLOL.js.map +1 -0
- package/dist/chunk-BR2HJ226.js +150 -0
- package/dist/chunk-BR2HJ226.js.map +1 -0
- package/dist/chunk-BWWA4QW5.js +63 -0
- package/dist/chunk-BWWA4QW5.js.map +1 -0
- package/dist/chunk-BY6TBBZC.js +63 -0
- package/dist/chunk-BY6TBBZC.js.map +1 -0
- package/dist/chunk-BYNC3ECF.js +2324 -0
- package/dist/chunk-BYNC3ECF.js.map +1 -0
- package/dist/chunk-C35VFER4.js +141 -0
- package/dist/chunk-C35VFER4.js.map +1 -0
- package/dist/chunk-CGNWZ4SF.js +108 -0
- package/dist/chunk-CGNWZ4SF.js.map +1 -0
- package/dist/chunk-CLNWUZHH.js +108 -0
- package/dist/chunk-CLNWUZHH.js.map +1 -0
- package/dist/chunk-CN4VFYDL.js +212 -0
- package/dist/chunk-CN4VFYDL.js.map +1 -0
- package/dist/chunk-CVWVFYZG.js +127 -0
- package/dist/chunk-CVWVFYZG.js.map +1 -0
- package/dist/chunk-CWPEXIAP.js +212 -0
- package/dist/chunk-CWPEXIAP.js.map +1 -0
- package/dist/chunk-CX3RKYHL.js +141 -0
- package/dist/chunk-CX3RKYHL.js.map +1 -0
- package/dist/chunk-DAPOH6OL.js +127 -0
- package/dist/chunk-DAPOH6OL.js.map +1 -0
- package/dist/chunk-DDQPPG36.js +63 -0
- package/dist/chunk-DDQPPG36.js.map +1 -0
- package/dist/chunk-DFGPW4FH.js +141 -0
- package/dist/chunk-DFGPW4FH.js.map +1 -0
- package/dist/chunk-DGMKQGSS.js +255 -0
- package/dist/chunk-DGMKQGSS.js.map +1 -0
- package/dist/chunk-DH7E2QJY.js +63 -0
- package/dist/chunk-DH7E2QJY.js.map +1 -0
- package/dist/chunk-DJMQJGDU.js +127 -0
- package/dist/chunk-DJMQJGDU.js.map +1 -0
- package/dist/chunk-DNAOZ3CB.js +127 -0
- package/dist/chunk-DNAOZ3CB.js.map +1 -0
- package/dist/chunk-DRMEOOSC.js +268 -0
- package/dist/chunk-DRMEOOSC.js.map +1 -0
- package/dist/chunk-DSBTIIE2.js +63 -0
- package/dist/chunk-DSBTIIE2.js.map +1 -0
- package/dist/chunk-DX5EXIMK.js +2324 -0
- package/dist/chunk-DX5EXIMK.js.map +1 -0
- package/dist/chunk-DYGOHLN4.js +108 -0
- package/dist/chunk-DYGOHLN4.js.map +1 -0
- package/dist/chunk-DYH3CYMQ.js +63 -0
- package/dist/chunk-DYH3CYMQ.js.map +1 -0
- package/dist/chunk-DYTSBPL6.js +108 -0
- package/dist/chunk-DYTSBPL6.js.map +1 -0
- package/dist/chunk-DZBIZXJT.js +105 -0
- package/dist/chunk-DZBIZXJT.js.map +1 -0
- package/dist/chunk-EN2EIVJL.js +275 -0
- package/dist/chunk-EN2EIVJL.js.map +1 -0
- package/dist/chunk-ENJ2UI5Q.js +127 -0
- package/dist/chunk-ENJ2UI5Q.js.map +1 -0
- package/dist/chunk-EOYF4Z6B.js +212 -0
- package/dist/chunk-EOYF4Z6B.js.map +1 -0
- package/dist/chunk-EVMADMHS.js +108 -0
- package/dist/chunk-EVMADMHS.js.map +1 -0
- package/dist/chunk-EXHULFNH.js +212 -0
- package/dist/chunk-EXHULFNH.js.map +1 -0
- package/dist/chunk-EY6XUWRC.js +141 -0
- package/dist/chunk-EY6XUWRC.js.map +1 -0
- package/dist/chunk-F25QUZ3T.js +127 -0
- package/dist/chunk-F25QUZ3T.js.map +1 -0
- package/dist/chunk-F6PRHM5V.js +2324 -0
- package/dist/chunk-F6PRHM5V.js.map +1 -0
- package/dist/chunk-FAUXJQMT.js +141 -0
- package/dist/chunk-FAUXJQMT.js.map +1 -0
- package/dist/chunk-FGDJX3JA.js +277 -0
- package/dist/chunk-FGDJX3JA.js.map +1 -0
- package/dist/chunk-FRPZDVFW.js +141 -0
- package/dist/chunk-FRPZDVFW.js.map +1 -0
- package/dist/chunk-FS6ACKGM.js +141 -0
- package/dist/chunk-FS6ACKGM.js.map +1 -0
- package/dist/chunk-FWKC2BLZ.js +212 -0
- package/dist/chunk-FWKC2BLZ.js.map +1 -0
- package/dist/chunk-G2H5OP2H.js +49 -0
- package/dist/chunk-G2H5OP2H.js.map +1 -0
- package/dist/chunk-G3EGBV5J.js +108 -0
- package/dist/chunk-G3EGBV5J.js.map +1 -0
- package/dist/chunk-G4J7I73Y.js +37 -0
- package/dist/chunk-G4J7I73Y.js.map +1 -0
- package/dist/chunk-G7Z3HMEW.js +108 -0
- package/dist/chunk-G7Z3HMEW.js.map +1 -0
- package/dist/chunk-GMGE4NOB.js +105 -0
- package/dist/chunk-GMGE4NOB.js.map +1 -0
- package/dist/chunk-GMSFDN7D.js +3629 -0
- package/dist/chunk-GMSFDN7D.js.map +1 -0
- package/dist/chunk-GQC5LNVW.js +63 -0
- package/dist/chunk-GQC5LNVW.js.map +1 -0
- package/dist/chunk-GYYQP4DT.js +127 -0
- package/dist/chunk-GYYQP4DT.js.map +1 -0
- package/dist/chunk-GZBFBCQI.js +63 -0
- package/dist/chunk-GZBFBCQI.js.map +1 -0
- package/dist/chunk-HDKF3UAE.js +127 -0
- package/dist/chunk-HDKF3UAE.js.map +1 -0
- package/dist/chunk-HGLER5MY.js +796 -0
- package/dist/chunk-HGLER5MY.js.map +1 -0
- package/dist/chunk-HQ6KWJFH.js +49 -0
- package/dist/chunk-HQ6KWJFH.js.map +1 -0
- package/dist/chunk-HQQ5ZL6Q.js +49 -0
- package/dist/chunk-HQQ5ZL6Q.js.map +1 -0
- package/dist/chunk-HQZOZBRY.js +2324 -0
- package/dist/chunk-HQZOZBRY.js.map +1 -0
- package/dist/chunk-HRAKHATH.js +150 -0
- package/dist/chunk-HRAKHATH.js.map +1 -0
- package/dist/chunk-ICC54A7E.js +277 -0
- package/dist/chunk-ICC54A7E.js.map +1 -0
- package/dist/chunk-ILSVC4UY.js +3629 -0
- package/dist/chunk-ILSVC4UY.js.map +1 -0
- package/dist/chunk-IM2MIG5M.js +212 -0
- package/dist/chunk-IM2MIG5M.js.map +1 -0
- package/dist/chunk-IMAOZHSC.js +108 -0
- package/dist/chunk-IMAOZHSC.js.map +1 -0
- package/dist/chunk-IQIVBN66.js +273 -0
- package/dist/chunk-IQIVBN66.js.map +1 -0
- package/dist/chunk-IUQBQLM6.js +19 -0
- package/dist/chunk-IUQBQLM6.js.map +1 -0
- package/dist/chunk-IVS3J33K.js +212 -0
- package/dist/chunk-IVS3J33K.js.map +1 -0
- package/dist/chunk-J6D3CAR7.js +127 -0
- package/dist/chunk-J6D3CAR7.js.map +1 -0
- package/dist/chunk-JCKMXITS.js +212 -0
- package/dist/chunk-JCKMXITS.js.map +1 -0
- package/dist/chunk-JCRWKUQ5.js +796 -0
- package/dist/chunk-JCRWKUQ5.js.map +1 -0
- package/dist/chunk-JCT3BKSW.js +3629 -0
- package/dist/chunk-JCT3BKSW.js.map +1 -0
- package/dist/chunk-JDLXU3ZF.js +108 -0
- package/dist/chunk-JDLXU3ZF.js.map +1 -0
- package/dist/chunk-JH4ADQ7I.js +49 -0
- package/dist/chunk-JH4ADQ7I.js.map +1 -0
- package/dist/chunk-JHPVK6CS.js +127 -0
- package/dist/chunk-JHPVK6CS.js.map +1 -0
- package/dist/chunk-JL6ZIJUH.js +2324 -0
- package/dist/chunk-JL6ZIJUH.js.map +1 -0
- package/dist/chunk-JOJQXQLI.js +277 -0
- package/dist/chunk-JOJQXQLI.js.map +1 -0
- package/dist/chunk-K4SYGDQ7.js +63 -0
- package/dist/chunk-K4SYGDQ7.js.map +1 -0
- package/dist/chunk-K5Z6QUIM.js +141 -0
- package/dist/chunk-K5Z6QUIM.js.map +1 -0
- package/dist/chunk-KATJWNBU.js +212 -0
- package/dist/chunk-KATJWNBU.js.map +1 -0
- package/dist/chunk-KD6CGNYU.js +254 -0
- package/dist/chunk-KD6CGNYU.js.map +1 -0
- package/dist/chunk-KFSPN5LV.js +271 -0
- package/dist/chunk-KFSPN5LV.js.map +1 -0
- package/dist/chunk-KFUS56FH.js +796 -0
- package/dist/chunk-KFUS56FH.js.map +1 -0
- package/dist/chunk-KOOW3QLT.js +108 -0
- package/dist/chunk-KOOW3QLT.js.map +1 -0
- package/dist/chunk-KU5KDJJQ.js +212 -0
- package/dist/chunk-KU5KDJJQ.js.map +1 -0
- package/dist/chunk-L65LHFIO.js +141 -0
- package/dist/chunk-L65LHFIO.js.map +1 -0
- package/dist/chunk-LBVZAZ6U.js +63 -0
- package/dist/chunk-LBVZAZ6U.js.map +1 -0
- package/dist/chunk-LHMHEG43.js +796 -0
- package/dist/chunk-LHMHEG43.js.map +1 -0
- package/dist/chunk-LJW6ZBRN.js +273 -0
- package/dist/chunk-LJW6ZBRN.js.map +1 -0
- package/dist/chunk-LQPPJMCT.js +141 -0
- package/dist/chunk-LQPPJMCT.js.map +1 -0
- package/dist/chunk-LRWSKPWW.js +108 -0
- package/dist/chunk-LRWSKPWW.js.map +1 -0
- package/dist/chunk-LSPAPAC6.js +275 -0
- package/dist/chunk-LSPAPAC6.js.map +1 -0
- package/dist/chunk-LYXB4GLH.js +108 -0
- package/dist/chunk-LYXB4GLH.js.map +1 -0
- package/dist/chunk-M2B6MZSF.js +796 -0
- package/dist/chunk-M2B6MZSF.js.map +1 -0
- package/dist/chunk-M6WAUVRX.js +212 -0
- package/dist/chunk-M6WAUVRX.js.map +1 -0
- package/dist/chunk-M7ID5HPC.js +150 -0
- package/dist/chunk-M7ID5HPC.js.map +1 -0
- package/dist/chunk-MIVIXDFN.js +63 -0
- package/dist/chunk-MIVIXDFN.js.map +1 -0
- package/dist/chunk-MKRM77ER.js +127 -0
- package/dist/chunk-MKRM77ER.js.map +1 -0
- package/dist/chunk-MZAIX5H4.js +254 -0
- package/dist/chunk-MZAIX5H4.js.map +1 -0
- package/dist/chunk-N2A27HBQ.js +275 -0
- package/dist/chunk-N2A27HBQ.js.map +1 -0
- package/dist/chunk-N3VKT6PD.js +63 -0
- package/dist/chunk-N3VKT6PD.js.map +1 -0
- package/dist/chunk-N56EOFH7.js +212 -0
- package/dist/chunk-N56EOFH7.js.map +1 -0
- package/dist/chunk-NCDYCEFI.js +141 -0
- package/dist/chunk-NCDYCEFI.js.map +1 -0
- package/dist/chunk-NOLINMVX.js +63 -0
- package/dist/chunk-NOLINMVX.js.map +1 -0
- package/dist/chunk-NR6CZSCD.js +275 -0
- package/dist/chunk-NR6CZSCD.js.map +1 -0
- package/dist/chunk-NR7VYRLX.js +212 -0
- package/dist/chunk-NR7VYRLX.js.map +1 -0
- package/dist/chunk-NSIDPAOP.js +212 -0
- package/dist/chunk-NSIDPAOP.js.map +1 -0
- package/dist/chunk-NSXFJV7H.js +255 -0
- package/dist/chunk-NSXFJV7H.js.map +1 -0
- package/dist/chunk-NV7LKWOG.js +141 -0
- package/dist/chunk-NV7LKWOG.js.map +1 -0
- package/dist/chunk-NWY2GONC.js +268 -0
- package/dist/chunk-NWY2GONC.js.map +1 -0
- package/dist/chunk-O5TVIMND.js +127 -0
- package/dist/chunk-O5TVIMND.js.map +1 -0
- package/dist/chunk-O7RBLP5X.js +63 -0
- package/dist/chunk-O7RBLP5X.js.map +1 -0
- package/dist/chunk-OG2QBBAF.js +49 -0
- package/dist/chunk-OG2QBBAF.js.map +1 -0
- package/dist/chunk-OK3EPS2C.js +2324 -0
- package/dist/chunk-OK3EPS2C.js.map +1 -0
- package/dist/chunk-OLWGRNA6.js +254 -0
- package/dist/chunk-OLWGRNA6.js.map +1 -0
- package/dist/chunk-OQI2W7LB.js +108 -0
- package/dist/chunk-OQI2W7LB.js.map +1 -0
- package/dist/chunk-OS4E6J4B.js +268 -0
- package/dist/chunk-OS4E6J4B.js.map +1 -0
- package/dist/chunk-P2NXBCRI.js +108 -0
- package/dist/chunk-P2NXBCRI.js.map +1 -0
- package/dist/chunk-P6GKWD7Z.js +49 -0
- package/dist/chunk-P6GKWD7Z.js.map +1 -0
- package/dist/chunk-PH3Y26QE.js +275 -0
- package/dist/chunk-PH3Y26QE.js.map +1 -0
- package/dist/chunk-PJ2YHYMS.js +796 -0
- package/dist/chunk-PJ2YHYMS.js.map +1 -0
- package/dist/chunk-PK2FN4VI.js +796 -0
- package/dist/chunk-PK2FN4VI.js.map +1 -0
- package/dist/chunk-PKYF4ATF.js +127 -0
- package/dist/chunk-PKYF4ATF.js.map +1 -0
- package/dist/chunk-PLDMHO2P.js +284 -0
- package/dist/chunk-PLDMHO2P.js.map +1 -0
- package/dist/chunk-PQ5G5Y3F.js +269 -0
- package/dist/chunk-PQ5G5Y3F.js.map +1 -0
- package/dist/chunk-PRFI5PWG.js +3629 -0
- package/dist/chunk-PRFI5PWG.js.map +1 -0
- package/dist/chunk-PYYIF6GR.js +108 -0
- package/dist/chunk-PYYIF6GR.js.map +1 -0
- package/dist/chunk-Q35VQXCA.js +288 -0
- package/dist/chunk-Q35VQXCA.js.map +1 -0
- package/dist/chunk-Q4DBAKJC.js +127 -0
- package/dist/chunk-Q4DBAKJC.js.map +1 -0
- package/dist/chunk-Q7VF2XEQ.js +141 -0
- package/dist/chunk-Q7VF2XEQ.js.map +1 -0
- package/dist/chunk-QBGHXA67.js +141 -0
- package/dist/chunk-QBGHXA67.js.map +1 -0
- package/dist/chunk-QBMZ6QXX.js +212 -0
- package/dist/chunk-QBMZ6QXX.js.map +1 -0
- package/dist/chunk-QFBKNCBJ.js +141 -0
- package/dist/chunk-QFBKNCBJ.js.map +1 -0
- package/dist/chunk-QJIALKBF.js +141 -0
- package/dist/chunk-QJIALKBF.js.map +1 -0
- package/dist/chunk-QMUTPVWG.js +108 -0
- package/dist/chunk-QMUTPVWG.js.map +1 -0
- package/dist/chunk-QQB223M6.js +49 -0
- package/dist/chunk-QQB223M6.js.map +1 -0
- package/dist/chunk-R2PTF2HJ.js +2324 -0
- package/dist/chunk-R2PTF2HJ.js.map +1 -0
- package/dist/chunk-R2UDBW7V.js +141 -0
- package/dist/chunk-R2UDBW7V.js.map +1 -0
- package/dist/chunk-R6XUP4YU.js +105 -0
- package/dist/chunk-R6XUP4YU.js.map +1 -0
- package/dist/chunk-RBFAHNA3.js +127 -0
- package/dist/chunk-RBFAHNA3.js.map +1 -0
- package/dist/chunk-RBTYJWYS.js +141 -0
- package/dist/chunk-RBTYJWYS.js.map +1 -0
- package/dist/chunk-RCDRPUUW.js +212 -0
- package/dist/chunk-RCDRPUUW.js.map +1 -0
- package/dist/chunk-REVPMYRN.js +127 -0
- package/dist/chunk-REVPMYRN.js.map +1 -0
- package/dist/chunk-RFPY65DW.js +127 -0
- package/dist/chunk-RFPY65DW.js.map +1 -0
- package/dist/chunk-RJYSPPZR.js +105 -0
- package/dist/chunk-RJYSPPZR.js.map +1 -0
- package/dist/chunk-RK473OTT.js +141 -0
- package/dist/chunk-RK473OTT.js.map +1 -0
- package/dist/chunk-RNK6YLW4.js +275 -0
- package/dist/chunk-RNK6YLW4.js.map +1 -0
- package/dist/chunk-RP6FR5KI.js +63 -0
- package/dist/chunk-RP6FR5KI.js.map +1 -0
- package/dist/chunk-RPJ5IR43.js +277 -0
- package/dist/chunk-RPJ5IR43.js.map +1 -0
- package/dist/chunk-RU2M3L6Z.js +212 -0
- package/dist/chunk-RU2M3L6Z.js.map +1 -0
- package/dist/chunk-RU6VCNTG.js +127 -0
- package/dist/chunk-RU6VCNTG.js.map +1 -0
- package/dist/chunk-RUEFVGLB.js +275 -0
- package/dist/chunk-RUEFVGLB.js.map +1 -0
- package/dist/chunk-S6MO4YII.js +796 -0
- package/dist/chunk-S6MO4YII.js.map +1 -0
- package/dist/chunk-S7G36BAF.js +212 -0
- package/dist/chunk-S7G36BAF.js.map +1 -0
- package/dist/chunk-SGKB56KP.js +150 -0
- package/dist/chunk-SGKB56KP.js.map +1 -0
- package/dist/chunk-SGTG53XI.js +141 -0
- package/dist/chunk-SGTG53XI.js.map +1 -0
- package/dist/chunk-SJKGGE46.js +63 -0
- package/dist/chunk-SJKGGE46.js.map +1 -0
- package/dist/chunk-SOGN63YT.js +212 -0
- package/dist/chunk-SOGN63YT.js.map +1 -0
- package/dist/chunk-SOWNENZM.js +108 -0
- package/dist/chunk-SOWNENZM.js.map +1 -0
- package/dist/chunk-SPQO2KWH.js +796 -0
- package/dist/chunk-SPQO2KWH.js.map +1 -0
- package/dist/chunk-SSKS77V7.js +108 -0
- package/dist/chunk-SSKS77V7.js.map +1 -0
- package/dist/chunk-T23IRAHE.js +212 -0
- package/dist/chunk-T23IRAHE.js.map +1 -0
- package/dist/chunk-T6E2JX5B.js +49 -0
- package/dist/chunk-T6E2JX5B.js.map +1 -0
- package/dist/chunk-T7KFCASW.js +63 -0
- package/dist/chunk-T7KFCASW.js.map +1 -0
- package/dist/chunk-THG4N3FI.js +63 -0
- package/dist/chunk-THG4N3FI.js.map +1 -0
- package/dist/chunk-TUK6AZZO.js +150 -0
- package/dist/chunk-TUK6AZZO.js.map +1 -0
- package/dist/chunk-UAUID5ML.js +273 -0
- package/dist/chunk-UAUID5ML.js.map +1 -0
- package/dist/chunk-UCLF63CE.js +212 -0
- package/dist/chunk-UCLF63CE.js.map +1 -0
- package/dist/chunk-UCLFGGFU.js +276 -0
- package/dist/chunk-UCLFGGFU.js.map +1 -0
- package/dist/chunk-UD24DKE6.js +105 -0
- package/dist/chunk-UD24DKE6.js.map +1 -0
- package/dist/chunk-UFL43KWY.js +141 -0
- package/dist/chunk-UFL43KWY.js.map +1 -0
- package/dist/chunk-UMNQJFSG.js +3629 -0
- package/dist/chunk-UMNQJFSG.js.map +1 -0
- package/dist/chunk-UNMUTILO.js +105 -0
- package/dist/chunk-UNMUTILO.js.map +1 -0
- package/dist/chunk-UP54IQOK.js +105 -0
- package/dist/chunk-UP54IQOK.js.map +1 -0
- package/dist/chunk-UUJ5KHJI.js +105 -0
- package/dist/chunk-UUJ5KHJI.js.map +1 -0
- package/dist/chunk-UYXYA627.js +141 -0
- package/dist/chunk-UYXYA627.js.map +1 -0
- package/dist/chunk-VICWI4OU.js +108 -0
- package/dist/chunk-VICWI4OU.js.map +1 -0
- package/dist/chunk-VRBN7BUO.js +212 -0
- package/dist/chunk-VRBN7BUO.js.map +1 -0
- package/dist/chunk-VRKWQVK3.js +2324 -0
- package/dist/chunk-VRKWQVK3.js.map +1 -0
- package/dist/chunk-VSLAOZQD.js +212 -0
- package/dist/chunk-VSLAOZQD.js.map +1 -0
- package/dist/chunk-VSYBVVQG.js +108 -0
- package/dist/chunk-VSYBVVQG.js.map +1 -0
- package/dist/chunk-VUL3LBEC.js +2324 -0
- package/dist/chunk-VUL3LBEC.js.map +1 -0
- package/dist/chunk-VVQHCLKU.js +212 -0
- package/dist/chunk-VVQHCLKU.js.map +1 -0
- package/dist/chunk-VWQKIEMF.js +273 -0
- package/dist/chunk-VWQKIEMF.js.map +1 -0
- package/dist/chunk-VY2GZXYM.js +141 -0
- package/dist/chunk-VY2GZXYM.js.map +1 -0
- package/dist/chunk-VZ56KTEJ.js +127 -0
- package/dist/chunk-VZ56KTEJ.js.map +1 -0
- package/dist/chunk-W3L4ZQJJ.js +212 -0
- package/dist/chunk-W3L4ZQJJ.js.map +1 -0
- package/dist/chunk-WAO36MW5.js +63 -0
- package/dist/chunk-WAO36MW5.js.map +1 -0
- package/dist/chunk-WCOULWN4.js +150 -0
- package/dist/chunk-WCOULWN4.js.map +1 -0
- package/dist/chunk-WIFDOPMN.js +127 -0
- package/dist/chunk-WIFDOPMN.js.map +1 -0
- package/dist/chunk-WJYDNUZB.js +141 -0
- package/dist/chunk-WJYDNUZB.js.map +1 -0
- package/dist/chunk-WNRV6HEX.js +127 -0
- package/dist/chunk-WNRV6HEX.js.map +1 -0
- package/dist/chunk-WRJ773IL.js +127 -0
- package/dist/chunk-WRJ773IL.js.map +1 -0
- package/dist/chunk-WV7E5QWR.js +108 -0
- package/dist/chunk-WV7E5QWR.js.map +1 -0
- package/dist/chunk-WVIQHL36.js +288 -0
- package/dist/chunk-WVIQHL36.js.map +1 -0
- package/dist/chunk-WX6ECDMM.js +108 -0
- package/dist/chunk-WX6ECDMM.js.map +1 -0
- package/dist/chunk-XDRQWJU4.js +127 -0
- package/dist/chunk-XDRQWJU4.js.map +1 -0
- package/dist/chunk-XJYGT7M7.js +141 -0
- package/dist/chunk-XJYGT7M7.js.map +1 -0
- package/dist/chunk-XOZOZ2EK.js +3629 -0
- package/dist/chunk-XOZOZ2EK.js.map +1 -0
- package/dist/chunk-XSOHRWJR.js +19 -0
- package/dist/chunk-XSOHRWJR.js.map +1 -0
- package/dist/chunk-YH2WPBJA.js +150 -0
- package/dist/chunk-YH2WPBJA.js.map +1 -0
- package/dist/chunk-YHNYCAVM.js +212 -0
- package/dist/chunk-YHNYCAVM.js.map +1 -0
- package/dist/chunk-YKWBKP5W.js +63 -0
- package/dist/chunk-YKWBKP5W.js.map +1 -0
- package/dist/chunk-YRKENLA3.js +796 -0
- package/dist/chunk-YRKENLA3.js.map +1 -0
- package/dist/chunk-YUXO7TSK.js +272 -0
- package/dist/chunk-YUXO7TSK.js.map +1 -0
- package/dist/chunk-YVM525DY.js +105 -0
- package/dist/chunk-YVM525DY.js.map +1 -0
- package/dist/chunk-Z4PZFJT2.js +127 -0
- package/dist/chunk-Z4PZFJT2.js.map +1 -0
- package/dist/chunk-Z5U5Q34M.js +150 -0
- package/dist/chunk-Z5U5Q34M.js.map +1 -0
- package/dist/chunk-ZCBBFBGM.js +212 -0
- package/dist/chunk-ZCBBFBGM.js.map +1 -0
- package/dist/chunk-ZGP7RCSE.js +63 -0
- package/dist/chunk-ZGP7RCSE.js.map +1 -0
- package/dist/chunk-ZH2NXJHL.js +3629 -0
- package/dist/chunk-ZH2NXJHL.js.map +1 -0
- package/dist/chunk-ZHGPXPGH.js +278 -0
- package/dist/chunk-ZHGPXPGH.js.map +1 -0
- package/dist/chunk-ZLZWFEEQ.js +37 -0
- package/dist/chunk-ZLZWFEEQ.js.map +1 -0
- package/dist/chunk-ZM6PIKKI.js +275 -0
- package/dist/chunk-ZM6PIKKI.js.map +1 -0
- package/dist/chunk-ZNCI5EUG.js +108 -0
- package/dist/chunk-ZNCI5EUG.js.map +1 -0
- package/dist/chunk-ZYUWIV3D.js +63 -0
- package/dist/chunk-ZYUWIV3D.js.map +1 -0
- package/dist/chunk-ZZI5775T.js +127 -0
- package/dist/chunk-ZZI5775T.js.map +1 -0
- package/dist/components/AddressContainer/CoreAddressContainer.js +10 -11
- package/dist/components/AddressContainer/EVMAddressContainer.js +9 -10
- package/dist/components/AddressContainer/addressSwitcher.js +7 -8
- package/dist/components/AddressContainer/addressView.js +6 -7
- package/dist/components/AddressContainer/label.js +4 -4
- package/dist/components/Age/index.js +4 -4
- package/dist/components/Charts/PreviewChartTemplate.js +1 -1
- package/dist/components/Charts/StockChartTemplate.js +1 -1
- package/dist/components/CopyButton/index.js +3 -3
- package/dist/components/DownloadCSV/index.js +4 -4
- package/dist/components/GasPriceDropdown/index.js +2 -2
- package/dist/components/IncreasePercent/index.js +2 -2
- package/dist/components/InfoIconWithTooltip/index.js +3 -3
- package/dist/components/Modal/index.js +3 -3
- package/dist/components/NetworkIcon/index.js +2 -2
- package/dist/components/PhishingAddressContainer/index.js +4 -5
- package/dist/components/PhishingAddressContainer/index.js.map +1 -1
- package/dist/components/Price/index.js +3 -3
- package/dist/components/Radio/index.js +2 -2
- package/dist/components/Select/index.js +3 -3
- package/dist/components/Select/select.js +3 -3
- package/dist/components/Text/index.js +4 -4
- package/dist/components/Tooltip/index.js +3 -3
- package/dist/components/TransactionAction/coreTransactionAction.js +10 -11
- package/dist/components/TransactionAction/coreTransactionAction.js.map +1 -1
- package/dist/components/TransactionAction/evmTransactionAction.js +9 -10
- package/dist/components/TransactionAction/evmTransactionAction.js.map +1 -1
- package/dist/utils/address.d.ts +4 -5
- package/dist/utils/address.js +2 -4
- package/dist/utils/contractManagerTool.js +2 -2
- package/dist/utils/hooks/useENS.js +3 -4
- package/dist/utils/index.js +2 -2
- package/dist/utils/request.d.ts +6 -1
- package/dist/utils/request.js +7 -1
- package/dist/utils/request.types.d.ts +55 -0
- package/dist/utils/request.types.js +1 -0
- package/dist/utils/request.types.js.map +1 -0
- package/dist/utils/rpcRequest.js +31 -3
- package/dist/utils/rpcRequest.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RenderAddress
|
|
3
|
+
} from "./chunk-REVPMYRN.js";
|
|
4
|
+
import {
|
|
5
|
+
formatAddress,
|
|
6
|
+
isInnerContractAddress
|
|
7
|
+
} from "./chunk-5TCARLKL.js";
|
|
8
|
+
import {
|
|
9
|
+
Tooltip
|
|
10
|
+
} from "./chunk-OK3EPS2C.js";
|
|
11
|
+
import {
|
|
12
|
+
coreCorrespondsToEspace,
|
|
13
|
+
formatString,
|
|
14
|
+
getNetwork
|
|
15
|
+
} from "./chunk-S6MO4YII.js";
|
|
16
|
+
import {
|
|
17
|
+
getEnvConfig,
|
|
18
|
+
getTranslations,
|
|
19
|
+
useGlobalData
|
|
20
|
+
} from "./chunk-DQGLZCIG.js";
|
|
21
|
+
|
|
22
|
+
// src/components/AddressContainer/addressSwitcher.tsx
|
|
23
|
+
import { AlertTriangle, File } from "@zeit-ui/react-icons";
|
|
24
|
+
import InternalContractIcon from "./internal-contract-icon-ZH2RG3CU.png";
|
|
25
|
+
import ContractIcon from "./contract-icon-P3W2HUAA.png";
|
|
26
|
+
import VerifiedIcon from "./verified-VJRHZNN7.png";
|
|
27
|
+
import isMeIcon from "./me-SIV36SR7.png";
|
|
28
|
+
import { isPosAddress } from "@cfx-kit/dapp-utils/dist/address";
|
|
29
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
30
|
+
var ContractCreatedAddress = (props) => {
|
|
31
|
+
const { contractCreated = "", outputType, t, isFull } = props;
|
|
32
|
+
const translations = getTranslations();
|
|
33
|
+
const contractAddress = formatAddress(contractCreated, outputType);
|
|
34
|
+
const customProps = {
|
|
35
|
+
content: t(translations.transaction.contractCreation),
|
|
36
|
+
alias: t(translations.transaction.contractCreation),
|
|
37
|
+
hrefAddress: contractAddress,
|
|
38
|
+
cfxAddress: contractAddress,
|
|
39
|
+
maxWidth: 160
|
|
40
|
+
};
|
|
41
|
+
const mergedProps = { ...props, ...customProps };
|
|
42
|
+
return RenderAddress({
|
|
43
|
+
...mergedProps,
|
|
44
|
+
prefix: /* @__PURE__ */ jsx("div", { className: `mr-[2px] flex-shrink-0 ${isFull ? "icon" : ""}`, children: /* @__PURE__ */ jsx(Tooltip, { title: mergedProps.content, children: /* @__PURE__ */ jsx("div", { className: "relative w-[16px] h-[16px]", children: /* @__PURE__ */ jsx(
|
|
45
|
+
"img",
|
|
46
|
+
{
|
|
47
|
+
className: "w-[16px] h-[16px] align-bottom mb-[3px]",
|
|
48
|
+
src: ContractIcon,
|
|
49
|
+
alt: mergedProps.content
|
|
50
|
+
}
|
|
51
|
+
) }) }) })
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
var CoreHexAddress = (props) => {
|
|
55
|
+
const { value, t, isFull, maxWidth } = props;
|
|
56
|
+
const { globalData } = useGlobalData();
|
|
57
|
+
const ENV_CONFIG = getEnvConfig();
|
|
58
|
+
const translations = getTranslations();
|
|
59
|
+
const hexAddress = formatAddress(value, "hex");
|
|
60
|
+
const network = getNetwork(
|
|
61
|
+
globalData?.networks,
|
|
62
|
+
coreCorrespondsToEspace(ENV_CONFIG.ENV_NETWORK_ID)
|
|
63
|
+
);
|
|
64
|
+
const url = `${network.url}/address/${hexAddress}`;
|
|
65
|
+
return RenderAddress({
|
|
66
|
+
cfxAddress: hexAddress,
|
|
67
|
+
hoverValue: hexAddress,
|
|
68
|
+
link: url,
|
|
69
|
+
isFull,
|
|
70
|
+
maxWidth,
|
|
71
|
+
suffixSize: 0,
|
|
72
|
+
prefix: /* @__PURE__ */ jsx("div", { className: "mr-[2px] flex-shrink-0", children: /* @__PURE__ */ jsx(Tooltip, { title: t(translations.general.eSpaceAddress), children: /* @__PURE__ */ jsx(File, { size: 16, color: "#17B38A" }) }) })
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
var InvalidAddress = (props) => {
|
|
76
|
+
const {
|
|
77
|
+
value,
|
|
78
|
+
alias,
|
|
79
|
+
t,
|
|
80
|
+
isFull,
|
|
81
|
+
maxWidth,
|
|
82
|
+
isFullNameTag,
|
|
83
|
+
hideAliasPrefixInHover
|
|
84
|
+
} = props;
|
|
85
|
+
const translations = getTranslations();
|
|
86
|
+
const tip = t(translations.general.invalidAddress);
|
|
87
|
+
return RenderAddress({
|
|
88
|
+
cfxAddress: value,
|
|
89
|
+
alias,
|
|
90
|
+
hoverValue: `${tip}: ${value}`,
|
|
91
|
+
content: alias ? formatString(alias, "tag") : value,
|
|
92
|
+
link: false,
|
|
93
|
+
isFull,
|
|
94
|
+
isFullNameTag,
|
|
95
|
+
maxWidth,
|
|
96
|
+
style: { color: "#e00909" },
|
|
97
|
+
prefix: /* @__PURE__ */ jsx("div", { className: "mr-[2px] flex-shrink-0", children: /* @__PURE__ */ jsx(Tooltip, { title: tip, children: /* @__PURE__ */ jsx(AlertTriangle, { size: 16, color: "#e00909" }) }) }),
|
|
98
|
+
hideAliasPrefixInHover
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
var ContractAddress = (props) => {
|
|
102
|
+
const { showIcon, verify, t, cfxAddress, isFull } = props;
|
|
103
|
+
const translations = getTranslations();
|
|
104
|
+
const isInnerContract = cfxAddress && isInnerContractAddress(cfxAddress);
|
|
105
|
+
const typeText = t(
|
|
106
|
+
isInnerContract ? translations.general.internalContract : verify ? translations.general.verifiedContract : translations.general.unverifiedContract
|
|
107
|
+
);
|
|
108
|
+
return RenderAddress({
|
|
109
|
+
...props,
|
|
110
|
+
prefix: showIcon ? /* @__PURE__ */ jsx("div", { className: `mr-[2px] flex-shrink-0 ${isFull ? "icon" : ""}`, children: /* @__PURE__ */ jsx(Tooltip, { title: typeText, children: /* @__PURE__ */ jsx("div", { className: "relative w-[16px] h-[16px]", children: isInnerContract ? /* @__PURE__ */ jsx(
|
|
111
|
+
"img",
|
|
112
|
+
{
|
|
113
|
+
className: "w-[16px] h-[16px] align-bottom mb-[5px]",
|
|
114
|
+
src: InternalContractIcon,
|
|
115
|
+
alt: typeText
|
|
116
|
+
}
|
|
117
|
+
) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
118
|
+
/* @__PURE__ */ jsx(
|
|
119
|
+
"img",
|
|
120
|
+
{
|
|
121
|
+
className: "w-[16px] h-[16px] align-bottom mb-[5px]",
|
|
122
|
+
src: ContractIcon,
|
|
123
|
+
alt: typeText
|
|
124
|
+
}
|
|
125
|
+
),
|
|
126
|
+
verify ? /* @__PURE__ */ jsx(
|
|
127
|
+
"img",
|
|
128
|
+
{
|
|
129
|
+
className: "w-[8px] h-[8px] absolute bottom-[-1px] right-[1px]",
|
|
130
|
+
src: VerifiedIcon,
|
|
131
|
+
alt: ""
|
|
132
|
+
}
|
|
133
|
+
) : /* @__PURE__ */ jsx(Fragment, {})
|
|
134
|
+
] }) }) }) }) : /* @__PURE__ */ jsx(Fragment, {})
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
var MyAddress = (props) => {
|
|
138
|
+
const { isFull } = props;
|
|
139
|
+
return RenderAddress({
|
|
140
|
+
...props,
|
|
141
|
+
suffix: /* @__PURE__ */ jsx("div", { className: "mr-[2px] flex-shrink-0", children: /* @__PURE__ */ jsx(
|
|
142
|
+
"img",
|
|
143
|
+
{
|
|
144
|
+
className: "w-[38.5px] h-[16px] ml-[3px] align-bottom",
|
|
145
|
+
src: isMeIcon,
|
|
146
|
+
alt: "is me",
|
|
147
|
+
style: {
|
|
148
|
+
marginBottom: isFull ? "6px" : "4px"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
) })
|
|
152
|
+
});
|
|
153
|
+
};
|
|
154
|
+
var PosAddress = (props) => {
|
|
155
|
+
const {
|
|
156
|
+
alias,
|
|
157
|
+
isFull,
|
|
158
|
+
isFullNameTag,
|
|
159
|
+
maxWidth,
|
|
160
|
+
t,
|
|
161
|
+
link,
|
|
162
|
+
isMe,
|
|
163
|
+
hideAliasPrefixInHover
|
|
164
|
+
} = props;
|
|
165
|
+
const value = props.value;
|
|
166
|
+
if (!value) {
|
|
167
|
+
return /* @__PURE__ */ jsx(Fragment, { children: "--" });
|
|
168
|
+
}
|
|
169
|
+
if (isMe) {
|
|
170
|
+
return MyAddress(props);
|
|
171
|
+
}
|
|
172
|
+
const translations = getTranslations();
|
|
173
|
+
const content = alias ? formatString(alias, "tag") : formatString(value, "posAddress");
|
|
174
|
+
if (!isPosAddress(value)) {
|
|
175
|
+
const tip = t(translations.general.invalidPosAddress);
|
|
176
|
+
return RenderAddress({
|
|
177
|
+
cfxAddress: value,
|
|
178
|
+
alias,
|
|
179
|
+
hoverValue: `${tip}: ${value}`,
|
|
180
|
+
content,
|
|
181
|
+
link: false,
|
|
182
|
+
isFull,
|
|
183
|
+
isFullNameTag,
|
|
184
|
+
maxWidth,
|
|
185
|
+
style: { color: "#e00909" },
|
|
186
|
+
prefix: /* @__PURE__ */ jsx("div", { className: "mr-[2px] flex-shrink-0", children: /* @__PURE__ */ jsx(Tooltip, { title: tip, children: /* @__PURE__ */ jsx(AlertTriangle, { size: 16, color: "#e00909" }) }) }),
|
|
187
|
+
type: "pos",
|
|
188
|
+
hideAliasPrefixInHover
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
return RenderAddress({
|
|
192
|
+
cfxAddress: value,
|
|
193
|
+
alias,
|
|
194
|
+
link,
|
|
195
|
+
isFull,
|
|
196
|
+
isFullNameTag,
|
|
197
|
+
maxWidth,
|
|
198
|
+
type: "pos",
|
|
199
|
+
content,
|
|
200
|
+
hideAliasPrefixInHover
|
|
201
|
+
});
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
export {
|
|
205
|
+
ContractCreatedAddress,
|
|
206
|
+
CoreHexAddress,
|
|
207
|
+
InvalidAddress,
|
|
208
|
+
ContractAddress,
|
|
209
|
+
MyAddress,
|
|
210
|
+
PosAddress
|
|
211
|
+
};
|
|
212
|
+
//# sourceMappingURL=chunk-27U3ZES6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/AddressContainer/addressSwitcher.tsx"],"sourcesContent":["import { WithTranslation } from 'react-i18next';\nimport { AlertTriangle, File } from '@zeit-ui/react-icons';\nimport InternalContractIcon from '../../images/internal-contract-icon.png';\nimport ContractIcon from '../../images/contract-icon.png';\nimport VerifiedIcon from '../../images/verified.png';\nimport isMeIcon from '../../images/me.png';\nimport { Tooltip } from '../Tooltip';\nimport { isPosAddress } from '@cfx-kit/dapp-utils/dist/address';\nimport { formatAddress, isInnerContractAddress } from '../../utils/address';\nimport { getTranslations, getEnvConfig, useGlobalData } from '../../store';\nimport { getNetwork, formatString, coreCorrespondsToEspace } from 'src/utils';\nimport { Props } from './types';\nimport { RenderAddress } from './addressView';\n\n// common\nexport const ContractCreatedAddress = (\n props: Props & WithTranslation & { outputType: 'hex' | 'base32' },\n) => {\n const { contractCreated = '', outputType, t, isFull } = props;\n\n const translations = getTranslations();\n\n const contractAddress = formatAddress(contractCreated, outputType);\n\n const customProps = {\n content: t(translations.transaction.contractCreation),\n alias: t(translations.transaction.contractCreation),\n hrefAddress: contractAddress,\n cfxAddress: contractAddress,\n maxWidth: 160,\n };\n\n const mergedProps = { ...props, ...customProps };\n return RenderAddress({\n ...mergedProps,\n prefix: (\n <div className={`mr-[2px] flex-shrink-0 ${isFull ? 'icon' : ''}`}>\n <Tooltip title={mergedProps.content}>\n <div className=\"relative w-[16px] h-[16px]\">\n <img\n className=\"w-[16px] h-[16px] align-bottom mb-[3px]\"\n src={ContractIcon}\n alt={mergedProps.content}\n />\n </div>\n </Tooltip>\n </div>\n ),\n });\n};\n\n// core\nexport const CoreHexAddress = (props: Props & WithTranslation) => {\n const { value, t, isFull, maxWidth } = props;\n const { globalData } = useGlobalData();\n\n const ENV_CONFIG = getEnvConfig();\n const translations = getTranslations();\n const hexAddress = formatAddress(value, 'hex');\n const network = getNetwork(\n globalData?.networks,\n coreCorrespondsToEspace(ENV_CONFIG.ENV_NETWORK_ID),\n );\n const url = `${network.url}/address/${hexAddress}`;\n\n return RenderAddress({\n cfxAddress: hexAddress,\n hoverValue: hexAddress,\n link: url,\n isFull,\n maxWidth,\n suffixSize: 0,\n prefix: (\n <div className=\"mr-[2px] flex-shrink-0\">\n <Tooltip title={t((translations as any).general.eSpaceAddress)}>\n <File size={16} color=\"#17B38A\" />\n </Tooltip>\n </div>\n ),\n });\n};\n\n// common\nexport const InvalidAddress = (props: Props & WithTranslation) => {\n const {\n value,\n alias,\n t,\n isFull,\n maxWidth,\n isFullNameTag,\n hideAliasPrefixInHover,\n } = props;\n\n const translations = getTranslations();\n\n const tip = t(translations.general.invalidAddress);\n\n return RenderAddress({\n cfxAddress: value,\n alias,\n hoverValue: `${tip}: ${value}`,\n content: alias ? formatString(alias, 'tag') : value,\n link: false,\n isFull,\n isFullNameTag,\n maxWidth,\n style: { color: '#e00909' },\n prefix: (\n <div className=\"mr-[2px] flex-shrink-0\">\n <Tooltip title={tip}>\n <AlertTriangle size={16} color=\"#e00909\" />\n </Tooltip>\n </div>\n ),\n hideAliasPrefixInHover,\n });\n};\n\n// common\nexport const ContractAddress = (props: Props & WithTranslation) => {\n const { showIcon, verify, t, cfxAddress, isFull } = props;\n\n const translations = getTranslations();\n\n const isInnerContract = cfxAddress && isInnerContractAddress(cfxAddress);\n\n const typeText = t(\n isInnerContract\n ? translations.general.internalContract\n : verify\n ? translations.general.verifiedContract\n : translations.general.unverifiedContract,\n );\n\n return RenderAddress({\n ...props,\n prefix: showIcon ? (\n <div className={`mr-[2px] flex-shrink-0 ${isFull ? 'icon' : ''}`}>\n <Tooltip title={typeText}>\n <div className=\"relative w-[16px] h-[16px]\">\n {isInnerContract ? (\n <img\n className=\"w-[16px] h-[16px] align-bottom mb-[5px]\"\n src={InternalContractIcon}\n alt={typeText}\n />\n ) : (\n <>\n <img\n className=\"w-[16px] h-[16px] align-bottom mb-[5px]\"\n src={ContractIcon}\n alt={typeText}\n />\n {verify ? (\n <img\n className=\"w-[8px] h-[8px] absolute bottom-[-1px] right-[1px]\"\n src={VerifiedIcon}\n alt={''}\n />\n ) : (\n <></>\n )}\n </>\n )}\n </div>\n </Tooltip>\n </div>\n ) : (\n <></>\n ),\n });\n};\n\n// common\nexport const MyAddress = (props: Props & WithTranslation) => {\n const { isFull } = props;\n return RenderAddress({\n ...props,\n suffix: (\n <div className=\"mr-[2px] flex-shrink-0\">\n <img\n className=\"w-[38.5px] h-[16px] ml-[3px] align-bottom\"\n src={isMeIcon}\n alt=\"is me\"\n style={{\n marginBottom: isFull ? '6px' : '4px',\n }}\n />\n </div>\n ),\n });\n};\n\n// core\nexport const PosAddress = (props: Props & WithTranslation) => {\n const {\n alias,\n isFull,\n isFullNameTag,\n maxWidth,\n t,\n link,\n isMe,\n hideAliasPrefixInHover,\n } = props;\n const value = props.value;\n if (!value) {\n return <>--</>;\n }\n if (isMe) {\n return MyAddress(props);\n }\n const translations = getTranslations();\n const content = alias\n ? formatString(alias, 'tag')\n : formatString(value, 'posAddress');\n if (!isPosAddress(value)) {\n const tip = t(translations.general.invalidPosAddress);\n return RenderAddress({\n cfxAddress: value,\n alias,\n hoverValue: `${tip}: ${value}`,\n content,\n link: false,\n isFull,\n isFullNameTag,\n maxWidth,\n style: { color: '#e00909' },\n prefix: (\n <div className=\"mr-[2px] flex-shrink-0\">\n <Tooltip title={tip}>\n <AlertTriangle size={16} color=\"#e00909\" />\n </Tooltip>\n </div>\n ),\n type: 'pos',\n hideAliasPrefixInHover,\n });\n }\n\n return RenderAddress({\n cfxAddress: value,\n alias,\n link,\n isFull,\n isFullNameTag,\n maxWidth,\n type: 'pos',\n content,\n hideAliasPrefixInHover,\n });\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,eAAe,YAAY;AACpC,OAAO,0BAA0B;AACjC,OAAO,kBAAkB;AACzB,OAAO,kBAAkB;AACzB,OAAO,cAAc;AAErB,SAAS,oBAAoB;AAgCjB,SA0HM,UA1HN,KA6GE,YA7GF;AAxBL,IAAM,yBAAyB,CACpC,UACG;AACH,QAAM,EAAE,kBAAkB,IAAI,YAAY,GAAG,OAAO,IAAI;AAExD,QAAM,eAAe,gBAAgB;AAErC,QAAM,kBAAkB,cAAc,iBAAiB,UAAU;AAEjE,QAAM,cAAc;AAAA,IAClB,SAAS,EAAE,aAAa,YAAY,gBAAgB;AAAA,IACpD,OAAO,EAAE,aAAa,YAAY,gBAAgB;AAAA,IAClD,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,UAAU;AAAA,E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k-PQ5G5Y3F.js";
|
|
4
|
+
import {
|
|
5
|
+
apiPrefix
|
|
6
|
+
} from "./chunk-7RH7LJYB.js";
|
|
7
|
+
import {
|
|
8
|
+
sendRequestENSInfo
|
|
9
|
+
} from "./chunk-BTGKYV55.js";
|
|
10
|
+
import {
|
|
11
|
+
useENSStore
|
|
12
|
+
} from "./chunk-DQGLZCIG.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-2BYZ7YCR.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) {\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|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ContractAddress,
|
|
3
|
+
ContractCreatedAddress,
|
|
4
|
+
InvalidAddress,
|
|
5
|
+
MyAddress
|
|
6
|
+
} from "./chunk-VRBN7BUO.js";
|
|
7
|
+
import {
|
|
8
|
+
RenderAddress
|
|
9
|
+
} from "./chunk-CVWVFYZG.js";
|
|
10
|
+
import {
|
|
11
|
+
convertCheckSum,
|
|
12
|
+
formatAddress,
|
|
13
|
+
isEvmAddress,
|
|
14
|
+
isZeroAddress
|
|
15
|
+
} from "./chunk-RUEFVGLB.js";
|
|
16
|
+
import {
|
|
17
|
+
getLabelInfo
|
|
18
|
+
} from "./chunk-JH4ADQ7I.js";
|
|
19
|
+
import {
|
|
20
|
+
getTranslations,
|
|
21
|
+
useGlobalData
|
|
22
|
+
} from "./chunk-DQGLZCIG.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-2CYC4UWO.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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AAA,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
|
+
isCoreMainOrTestAddress
|
|
3
|
+
} from "./chunk-BQU5GLOL.js";
|
|
4
|
+
import {
|
|
5
|
+
apiPrefix
|
|
6
|
+
} from "./chunk-7RH7LJYB.js";
|
|
7
|
+
import {
|
|
8
|
+
sendRequestENSInfo
|
|
9
|
+
} from "./chunk-73ACKXGM.js";
|
|
10
|
+
import {
|
|
11
|
+
useENSStore
|
|
12
|
+
} from "./chunk-DQGLZCIG.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-2DTZKTKF.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,127 @@
|
|
|
1
|
+
import {
|
|
2
|
+
convertCheckSum
|
|
3
|
+
} from "./chunk-6LZKERHY.js";
|
|
4
|
+
import {
|
|
5
|
+
Text
|
|
6
|
+
} from "./chunk-2SCHWFIY.js";
|
|
7
|
+
import {
|
|
8
|
+
getTranslations
|
|
9
|
+
} from "./chunk-DQGLZCIG.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-2E3YJCV3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/AddressContainer/addressView.tsx"],"sourcesContent":["import { Translation } from 'react-i18next';\nimport { Text } from '../Text';\nimport { convertCheckSum } from '../../utils/address';\nimport { getTranslations } from '../../store';\nimport { TooltipContent, RenderAddressProps } from './types';\nimport { shortenAddress } from '@cfx-kit/dapp-utils/dist/address';\n\nconst defaultPCMaxWidth = 138;\n\n// common\nconst renderTooltipContent = (tooltipContent: TooltipContent) => {\n return Object.entries(tooltipContent)\n .map(([key, { label, value, hideLabel }]) => {\n if (value) {\n return (\n <div key={key}>\n {!hideLabel && (\n <span>\n <Translation>{t => t(label)}</Translation>\n </span>\n )}\n {value}\n </div>\n );\n }\n return null;\n })\n .filter(Boolean);\n};\n\n// common\nconst convertLink = ({\n link,\n type,\n hrefAddress,\n cfxAddress,\n}: RenderAddressProps) => {\n if (typeof link === 'string') {\n return link;\n }\n\n const address = hrefAddress || cfxAddress;\n\n if (address && typeof address === 'string') {\n const pathname = window.location.pathname.toLowerCase();\n const addressLower = address.toLowerCase();\n if (pathname.includes('/address/' + addressLower)) {\n return false;\n }\n\n if (type === 'pow') {\n return `/address/${address}`;\n }\n\n if (type === 'pos') {\n return `/pos/accounts/${address}`;\n }\n }\n\n return false;\n};\n\n// common\nexport const RenderAddress = ({\n cfxAddress,\n alias,\n hoverValue,\n hrefAddress,\n content,\n link = '',\n isFull = false,\n isFullNameTag = false,\n style = {},\n maxWidth,\n prefix = null,\n suffix = null,\n type = 'pow',\n addressLabel = '',\n ENSLabel = '',\n nametag = '',\n hideAliasPrefixInHover = false,\n}: RenderAddressProps) => {\n const translations = getTranslations();\n\n const name = content || ENSLabel || nametag || addressLabel || alias;\n\n const defaultStyle = {\n maxWidth: `${(name && isFullNameTag) || isFull ? 'auto' : (maxWidth || defaultPCMaxWidth) + 'px'}`,\n };\n\n const href = convertLink({ link, type, hrefAddress, cfxAddress });\n\n const Wrapper = href ? 'a' : 'div';\n\n const tooltipContent: TooltipContent = {\n ENSLabel: {\n label: (translations as any)?.ens?.tip,\n value: ENSLabel,\n },\n nametag: {\n label: translations?.nametag?.tip,\n value: nametag,\n },\n addressLabel: {\n label: translations?.profile.address.myNameTag,\n value: addressLabel,\n },\n alias: {\n label: translations?.profile.address.publicNameTag,\n value: alias,\n hideLabel: hideAliasPrefixInHover,\n },\n };\n\n const checksumAddress = convertCheckSum(cfxAddress);\n\n const cfxAddressLabel =\n typeof cfxAddress === 'string' && !isFull\n ? shortenAddress(checksumAddress!)\n : checksumAddress;\n\n return (\n <div className=\"inline-flex\">\n {prefix}\n <Text\n tag=\"span\"\n hoverValue={\n <>\n {renderTooltipContent(tooltipContent)}\n <div>{hoverValue || checksumAddress}</div>\n </>\n }\n >\n <Wrapper\n className=\"block relative align-bottom cursor-default truncate\"\n style={{ ...defaultStyle, ...style }}\n {...(href ? { href: String(href) } : {})}\n >\n {name || cfxAddressLabel}\n </Wrapper>\n </Text>\n {suffix}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;AAAA,SAAS,mBAAmB;AAK5B,SAAS,sBAAsB;AAUrB,SAgHA,UA7GM,KAHN;AARV,IAAM,oBAAoB;AAG1B,IAAM,uBAAuB,CAAC,mBAAmC;AAC/D,SAAO,OAAO,QAAQ,cAAc,EACjC,IAAI,CAAC,CAAC,KAAK,EAAE,OAAO,OAAO,UAAU,CAAC,MAAM;AAC3C,QAAI,OAAO;AACT,aACE,qBAAC,SACE;AAAA,SAAC,aACA,oBAAC,UACC,8BAAC,eAAa,iBAAK,EAAE,KAAK,GAAE,GAC9B;AAAA,QAED;AAAA,WANO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