@cfxjs/sirius-next-common 0.1.35 → 0.1.36

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.
Files changed (446) hide show
  1. package/dist/chunk-2KIA7SM5.js +283 -0
  2. package/dist/chunk-2KIA7SM5.js.map +1 -0
  3. package/dist/chunk-2MVOPDKC.js +293 -0
  4. package/dist/chunk-2MVOPDKC.js.map +1 -0
  5. package/dist/chunk-2SD7XVS3.js +63 -0
  6. package/dist/chunk-2SD7XVS3.js.map +1 -0
  7. package/dist/chunk-2XYHVY3K.js +63 -0
  8. package/dist/chunk-2XYHVY3K.js.map +1 -0
  9. package/dist/chunk-2YI45EVS.js +141 -0
  10. package/dist/chunk-2YI45EVS.js.map +1 -0
  11. package/dist/chunk-353FBQGP.js +108 -0
  12. package/dist/chunk-353FBQGP.js.map +1 -0
  13. package/dist/chunk-36HGUBTU.js +127 -0
  14. package/dist/chunk-36HGUBTU.js.map +1 -0
  15. package/dist/chunk-376CSTQC.js +63 -0
  16. package/dist/chunk-376CSTQC.js.map +1 -0
  17. package/dist/chunk-3H2ZBKI3.js +212 -0
  18. package/dist/chunk-3H2ZBKI3.js.map +1 -0
  19. package/dist/chunk-3NQG7C6E.js +108 -0
  20. package/dist/chunk-3NQG7C6E.js.map +1 -0
  21. package/dist/chunk-4AL3F7NV.js +63 -0
  22. package/dist/chunk-4AL3F7NV.js.map +1 -0
  23. package/dist/chunk-4FBZ7HWS.js +63 -0
  24. package/dist/chunk-4FBZ7HWS.js.map +1 -0
  25. package/dist/chunk-4FKVBLAY.js +108 -0
  26. package/dist/chunk-4FKVBLAY.js.map +1 -0
  27. package/dist/chunk-4NDMEQGR.js +63 -0
  28. package/dist/chunk-4NDMEQGR.js.map +1 -0
  29. package/dist/chunk-4QJEGIPC.js +796 -0
  30. package/dist/chunk-4QJEGIPC.js.map +1 -0
  31. package/dist/chunk-4YTMW6GI.js +108 -0
  32. package/dist/chunk-4YTMW6GI.js.map +1 -0
  33. package/dist/chunk-574XKMZK.js +127 -0
  34. package/dist/chunk-574XKMZK.js.map +1 -0
  35. package/dist/chunk-5CQLUTBV.js +49 -0
  36. package/dist/chunk-5CQLUTBV.js.map +1 -0
  37. package/dist/chunk-5K7UO3LW.js +108 -0
  38. package/dist/chunk-5K7UO3LW.js.map +1 -0
  39. package/dist/chunk-5RPFJLOI.js +141 -0
  40. package/dist/chunk-5RPFJLOI.js.map +1 -0
  41. package/dist/chunk-5TAPU2ZE.js +291 -0
  42. package/dist/chunk-5TAPU2ZE.js.map +1 -0
  43. package/dist/chunk-6JS5W55K.js +127 -0
  44. package/dist/chunk-6JS5W55K.js.map +1 -0
  45. package/dist/chunk-6KNLHBN5.js +141 -0
  46. package/dist/chunk-6KNLHBN5.js.map +1 -0
  47. package/dist/chunk-6NX4BHDJ.js +141 -0
  48. package/dist/chunk-6NX4BHDJ.js.map +1 -0
  49. package/dist/chunk-6OAV4IVF.js +284 -0
  50. package/dist/chunk-6OAV4IVF.js.map +1 -0
  51. package/dist/chunk-72AV4UB3.js +290 -0
  52. package/dist/chunk-72AV4UB3.js.map +1 -0
  53. package/dist/chunk-7423KPGQ.js +63 -0
  54. package/dist/chunk-7423KPGQ.js.map +1 -0
  55. package/dist/chunk-7AOOJUYX.js +212 -0
  56. package/dist/chunk-7AOOJUYX.js.map +1 -0
  57. package/dist/chunk-7L2RA5IK.js +49 -0
  58. package/dist/chunk-7L2RA5IK.js.map +1 -0
  59. package/dist/chunk-7LQB5JCP.js +108 -0
  60. package/dist/chunk-7LQB5JCP.js.map +1 -0
  61. package/dist/chunk-7M7VEA5B.js +284 -0
  62. package/dist/chunk-7M7VEA5B.js.map +1 -0
  63. package/dist/chunk-A3657UZ7.js +108 -0
  64. package/dist/chunk-A3657UZ7.js.map +1 -0
  65. package/dist/chunk-A6P2YHYB.js +108 -0
  66. package/dist/chunk-A6P2YHYB.js.map +1 -0
  67. package/dist/chunk-A7K6NGFZ.js +150 -0
  68. package/dist/chunk-A7K6NGFZ.js.map +1 -0
  69. package/dist/chunk-ADJVLOE4.js +295 -0
  70. package/dist/chunk-ADJVLOE4.js.map +1 -0
  71. package/dist/chunk-AIQ2UBC2.js +284 -0
  72. package/dist/chunk-AIQ2UBC2.js.map +1 -0
  73. package/dist/chunk-ALLKEYU2.js +63 -0
  74. package/dist/chunk-ALLKEYU2.js.map +1 -0
  75. package/dist/chunk-AUTSZO6X.js +290 -0
  76. package/dist/chunk-AUTSZO6X.js.map +1 -0
  77. package/dist/chunk-AUWJGZPI.js +127 -0
  78. package/dist/chunk-AUWJGZPI.js.map +1 -0
  79. package/dist/chunk-AYD3HJZF.js +796 -0
  80. package/dist/chunk-AYD3HJZF.js.map +1 -0
  81. package/dist/chunk-B45UNRU2.js +127 -0
  82. package/dist/chunk-B45UNRU2.js.map +1 -0
  83. package/dist/chunk-B527FZFT.js +108 -0
  84. package/dist/chunk-B527FZFT.js.map +1 -0
  85. package/dist/chunk-BEPCRPPI.js +45 -0
  86. package/dist/chunk-BEPCRPPI.js.map +1 -0
  87. package/dist/chunk-BHHZCWKJ.js +141 -0
  88. package/dist/chunk-BHHZCWKJ.js.map +1 -0
  89. package/dist/chunk-BIZKI7IP.js +150 -0
  90. package/dist/chunk-BIZKI7IP.js.map +1 -0
  91. package/dist/chunk-BVIUV7LQ.js +290 -0
  92. package/dist/chunk-BVIUV7LQ.js.map +1 -0
  93. package/dist/chunk-BXR4FLVL.js +212 -0
  94. package/dist/chunk-BXR4FLVL.js.map +1 -0
  95. package/dist/chunk-BY3YF547.js +284 -0
  96. package/dist/chunk-BY3YF547.js.map +1 -0
  97. package/dist/chunk-C4MRUKWN.js +127 -0
  98. package/dist/chunk-C4MRUKWN.js.map +1 -0
  99. package/dist/chunk-CBJDT2JH.js +127 -0
  100. package/dist/chunk-CBJDT2JH.js.map +1 -0
  101. package/dist/chunk-CMF5AYGR.js +290 -0
  102. package/dist/chunk-CMF5AYGR.js.map +1 -0
  103. package/dist/chunk-CU4VIKEL.js +212 -0
  104. package/dist/chunk-CU4VIKEL.js.map +1 -0
  105. package/dist/chunk-CYFX26GP.js +3629 -0
  106. package/dist/chunk-CYFX26GP.js.map +1 -0
  107. package/dist/chunk-D7NNOVQY.js +127 -0
  108. package/dist/chunk-D7NNOVQY.js.map +1 -0
  109. package/dist/chunk-DA364DMG.js +141 -0
  110. package/dist/chunk-DA364DMG.js.map +1 -0
  111. package/dist/chunk-DR6NL7ET.js +130 -0
  112. package/dist/chunk-DR6NL7ET.js.map +1 -0
  113. package/dist/chunk-E6N6EFFW.js +141 -0
  114. package/dist/chunk-E6N6EFFW.js.map +1 -0
  115. package/dist/chunk-E7SUIRVI.js +63 -0
  116. package/dist/chunk-E7SUIRVI.js.map +1 -0
  117. package/dist/chunk-EY6NBWLM.js +108 -0
  118. package/dist/chunk-EY6NBWLM.js.map +1 -0
  119. package/dist/chunk-F2EPCZWK.js +63 -0
  120. package/dist/chunk-F2EPCZWK.js.map +1 -0
  121. package/dist/chunk-F4PFUG36.js +212 -0
  122. package/dist/chunk-F4PFUG36.js.map +1 -0
  123. package/dist/chunk-F6GBGTNG.js +63 -0
  124. package/dist/chunk-F6GBGTNG.js.map +1 -0
  125. package/dist/chunk-FOX4XRLH.js +127 -0
  126. package/dist/chunk-FOX4XRLH.js.map +1 -0
  127. package/dist/chunk-FVFHHX7P.js +130 -0
  128. package/dist/chunk-FVFHHX7P.js.map +1 -0
  129. package/dist/chunk-G5LRQOH6.js +141 -0
  130. package/dist/chunk-G5LRQOH6.js.map +1 -0
  131. package/dist/chunk-GC3CBRNH.js +63 -0
  132. package/dist/chunk-GC3CBRNH.js.map +1 -0
  133. package/dist/chunk-GSQTH7WW.js +108 -0
  134. package/dist/chunk-GSQTH7WW.js.map +1 -0
  135. package/dist/chunk-GX5FHBTN.js +141 -0
  136. package/dist/chunk-GX5FHBTN.js.map +1 -0
  137. package/dist/chunk-HLJJOOGU.js +63 -0
  138. package/dist/chunk-HLJJOOGU.js.map +1 -0
  139. package/dist/chunk-HNVXPCV4.js +63 -0
  140. package/dist/chunk-HNVXPCV4.js.map +1 -0
  141. package/dist/chunk-HW27DN22.js +49 -0
  142. package/dist/chunk-HW27DN22.js.map +1 -0
  143. package/dist/chunk-HYUTXKYU.js +3629 -0
  144. package/dist/chunk-HYUTXKYU.js.map +1 -0
  145. package/dist/chunk-I7HRM722.js +212 -0
  146. package/dist/chunk-I7HRM722.js.map +1 -0
  147. package/dist/chunk-IA25UNZZ.js +141 -0
  148. package/dist/chunk-IA25UNZZ.js.map +1 -0
  149. package/dist/chunk-IBMP5SCX.js +141 -0
  150. package/dist/chunk-IBMP5SCX.js.map +1 -0
  151. package/dist/chunk-IFMYLJEP.js +127 -0
  152. package/dist/chunk-IFMYLJEP.js.map +1 -0
  153. package/dist/chunk-IHGBU43N.js +63 -0
  154. package/dist/chunk-IHGBU43N.js.map +1 -0
  155. package/dist/chunk-ILC4RRWU.js +212 -0
  156. package/dist/chunk-ILC4RRWU.js.map +1 -0
  157. package/dist/chunk-ITAVTA3W.js +130 -0
  158. package/dist/chunk-ITAVTA3W.js.map +1 -0
  159. package/dist/chunk-JI6VGCU4.js +108 -0
  160. package/dist/chunk-JI6VGCU4.js.map +1 -0
  161. package/dist/chunk-JIVR34UF.js +108 -0
  162. package/dist/chunk-JIVR34UF.js.map +1 -0
  163. package/dist/chunk-JJ4K6ZJO.js +108 -0
  164. package/dist/chunk-JJ4K6ZJO.js.map +1 -0
  165. package/dist/chunk-JJGSIAZJ.js +127 -0
  166. package/dist/chunk-JJGSIAZJ.js.map +1 -0
  167. package/dist/chunk-JK54QGX5.js +63 -0
  168. package/dist/chunk-JK54QGX5.js.map +1 -0
  169. package/dist/chunk-JUV5BY6S.js +212 -0
  170. package/dist/chunk-JUV5BY6S.js.map +1 -0
  171. package/dist/chunk-JVDOTIWK.js +63 -0
  172. package/dist/chunk-JVDOTIWK.js.map +1 -0
  173. package/dist/chunk-JWEGZT6Y.js +127 -0
  174. package/dist/chunk-JWEGZT6Y.js.map +1 -0
  175. package/dist/chunk-KGIYTDWO.js +212 -0
  176. package/dist/chunk-KGIYTDWO.js.map +1 -0
  177. package/dist/chunk-KKXM6DVT.js +292 -0
  178. package/dist/chunk-KKXM6DVT.js.map +1 -0
  179. package/dist/chunk-KOD3PEV3.js +212 -0
  180. package/dist/chunk-KOD3PEV3.js.map +1 -0
  181. package/dist/chunk-KQUGFRVE.js +796 -0
  182. package/dist/chunk-KQUGFRVE.js.map +1 -0
  183. package/dist/chunk-KWJ73Y2D.js +294 -0
  184. package/dist/chunk-KWJ73Y2D.js.map +1 -0
  185. package/dist/chunk-L6BFE632.js +127 -0
  186. package/dist/chunk-L6BFE632.js.map +1 -0
  187. package/dist/chunk-LVNT62YR.js +292 -0
  188. package/dist/chunk-LVNT62YR.js.map +1 -0
  189. package/dist/chunk-LWMEGN6S.js +294 -0
  190. package/dist/chunk-LWMEGN6S.js.map +1 -0
  191. package/dist/chunk-LZZ7NIR4.js +293 -0
  192. package/dist/chunk-LZZ7NIR4.js.map +1 -0
  193. package/dist/chunk-MCP23ZPY.js +285 -0
  194. package/dist/chunk-MCP23ZPY.js.map +1 -0
  195. package/dist/chunk-MGLRAR2D.js +212 -0
  196. package/dist/chunk-MGLRAR2D.js.map +1 -0
  197. package/dist/chunk-MJZVUA2T.js +212 -0
  198. package/dist/chunk-MJZVUA2T.js.map +1 -0
  199. package/dist/chunk-MK27NKQR.js +2324 -0
  200. package/dist/chunk-MK27NKQR.js.map +1 -0
  201. package/dist/chunk-MNVZLYD2.js +108 -0
  202. package/dist/chunk-MNVZLYD2.js.map +1 -0
  203. package/dist/chunk-MPKSCMSQ.js +127 -0
  204. package/dist/chunk-MPKSCMSQ.js.map +1 -0
  205. package/dist/chunk-MZ6URSWK.js +108 -0
  206. package/dist/chunk-MZ6URSWK.js.map +1 -0
  207. package/dist/chunk-MZTA3L4X.js +150 -0
  208. package/dist/chunk-MZTA3L4X.js.map +1 -0
  209. package/dist/chunk-ND2CSITG.js +127 -0
  210. package/dist/chunk-ND2CSITG.js.map +1 -0
  211. package/dist/chunk-NEYIY22U.js +284 -0
  212. package/dist/chunk-NEYIY22U.js.map +1 -0
  213. package/dist/chunk-NFOLFLWA.js +150 -0
  214. package/dist/chunk-NFOLFLWA.js.map +1 -0
  215. package/dist/chunk-NFS5YLSJ.js +108 -0
  216. package/dist/chunk-NFS5YLSJ.js.map +1 -0
  217. package/dist/chunk-NIUVCEJO.js +212 -0
  218. package/dist/chunk-NIUVCEJO.js.map +1 -0
  219. package/dist/chunk-NKKWDQOM.js +2324 -0
  220. package/dist/chunk-NKKWDQOM.js.map +1 -0
  221. package/dist/chunk-NNHMECSG.js +141 -0
  222. package/dist/chunk-NNHMECSG.js.map +1 -0
  223. package/dist/chunk-NPV3ZP6T.js +141 -0
  224. package/dist/chunk-NPV3ZP6T.js.map +1 -0
  225. package/dist/chunk-NQTJEBIJ.js +290 -0
  226. package/dist/chunk-NQTJEBIJ.js.map +1 -0
  227. package/dist/chunk-NTOFGIYH.js +108 -0
  228. package/dist/chunk-NTOFGIYH.js.map +1 -0
  229. package/dist/chunk-NXBI6ED2.js +212 -0
  230. package/dist/chunk-NXBI6ED2.js.map +1 -0
  231. package/dist/chunk-OHN4J5DW.js +141 -0
  232. package/dist/chunk-OHN4J5DW.js.map +1 -0
  233. package/dist/chunk-ON6XCYGT.js +283 -0
  234. package/dist/chunk-ON6XCYGT.js.map +1 -0
  235. package/dist/chunk-ONMNA33N.js +45 -0
  236. package/dist/chunk-ONMNA33N.js.map +1 -0
  237. package/dist/chunk-ONSETHR4.js +105 -0
  238. package/dist/chunk-ONSETHR4.js.map +1 -0
  239. package/dist/chunk-OWAB7CCQ.js +127 -0
  240. package/dist/chunk-OWAB7CCQ.js.map +1 -0
  241. package/dist/chunk-P2CMBBPI.js +289 -0
  242. package/dist/chunk-P2CMBBPI.js.map +1 -0
  243. package/dist/chunk-P2UEWOEU.js +127 -0
  244. package/dist/chunk-P2UEWOEU.js.map +1 -0
  245. package/dist/chunk-P3DMJU7D.js +141 -0
  246. package/dist/chunk-P3DMJU7D.js.map +1 -0
  247. package/dist/chunk-PFGTCJPQ.js +141 -0
  248. package/dist/chunk-PFGTCJPQ.js.map +1 -0
  249. package/dist/chunk-PFSXXJYL.js +108 -0
  250. package/dist/chunk-PFSXXJYL.js.map +1 -0
  251. package/dist/chunk-PK7M6K76.js +212 -0
  252. package/dist/chunk-PK7M6K76.js.map +1 -0
  253. package/dist/chunk-PSTNJU66.js +288 -0
  254. package/dist/chunk-PSTNJU66.js.map +1 -0
  255. package/dist/chunk-PVIOYLIT.js +108 -0
  256. package/dist/chunk-PVIOYLIT.js.map +1 -0
  257. package/dist/chunk-PXSXWN7G.js +63 -0
  258. package/dist/chunk-PXSXWN7G.js.map +1 -0
  259. package/dist/chunk-Q6GDS4KG.js +141 -0
  260. package/dist/chunk-Q6GDS4KG.js.map +1 -0
  261. package/dist/chunk-QBLVQYVY.js +212 -0
  262. package/dist/chunk-QBLVQYVY.js.map +1 -0
  263. package/dist/chunk-QBV2D5NU.js +284 -0
  264. package/dist/chunk-QBV2D5NU.js.map +1 -0
  265. package/dist/chunk-QDUOI6ZD.js +212 -0
  266. package/dist/chunk-QDUOI6ZD.js.map +1 -0
  267. package/dist/chunk-QJH74FQI.js +108 -0
  268. package/dist/chunk-QJH74FQI.js.map +1 -0
  269. package/dist/chunk-QJXSCYDA.js +212 -0
  270. package/dist/chunk-QJXSCYDA.js.map +1 -0
  271. package/dist/chunk-QJYLL4XT.js +3629 -0
  272. package/dist/chunk-QJYLL4XT.js.map +1 -0
  273. package/dist/chunk-QOKNGZ72.js +141 -0
  274. package/dist/chunk-QOKNGZ72.js.map +1 -0
  275. package/dist/chunk-QONMQY4Z.js +63 -0
  276. package/dist/chunk-QONMQY4Z.js.map +1 -0
  277. package/dist/chunk-QPRZL6LO.js +49 -0
  278. package/dist/chunk-QPRZL6LO.js.map +1 -0
  279. package/dist/chunk-QQXDVN7O.js +105 -0
  280. package/dist/chunk-QQXDVN7O.js.map +1 -0
  281. package/dist/chunk-QXMEJLR4.js +290 -0
  282. package/dist/chunk-QXMEJLR4.js.map +1 -0
  283. package/dist/chunk-R2DOYAW4.js +141 -0
  284. package/dist/chunk-R2DOYAW4.js.map +1 -0
  285. package/dist/chunk-R65VACGY.js +212 -0
  286. package/dist/chunk-R65VACGY.js.map +1 -0
  287. package/dist/chunk-RDDTVGAP.js +108 -0
  288. package/dist/chunk-RDDTVGAP.js.map +1 -0
  289. package/dist/chunk-RKEZGAXK.js +63 -0
  290. package/dist/chunk-RKEZGAXK.js.map +1 -0
  291. package/dist/chunk-RKSFAP6Z.js +141 -0
  292. package/dist/chunk-RKSFAP6Z.js.map +1 -0
  293. package/dist/chunk-RSUVHVRY.js +108 -0
  294. package/dist/chunk-RSUVHVRY.js.map +1 -0
  295. package/dist/chunk-S24ORVD5.js +294 -0
  296. package/dist/chunk-S24ORVD5.js.map +1 -0
  297. package/dist/chunk-SCSMAKMH.js +63 -0
  298. package/dist/chunk-SCSMAKMH.js.map +1 -0
  299. package/dist/chunk-SDDB2F2F.js +108 -0
  300. package/dist/chunk-SDDB2F2F.js.map +1 -0
  301. package/dist/chunk-SJCQAQX4.js +796 -0
  302. package/dist/chunk-SJCQAQX4.js.map +1 -0
  303. package/dist/chunk-STZGQGGZ.js +212 -0
  304. package/dist/chunk-STZGQGGZ.js.map +1 -0
  305. package/dist/chunk-T43YVODW.js +277 -0
  306. package/dist/chunk-T43YVODW.js.map +1 -0
  307. package/dist/chunk-T53TBWIB.js +212 -0
  308. package/dist/chunk-T53TBWIB.js.map +1 -0
  309. package/dist/chunk-T5UZYLJ5.js +212 -0
  310. package/dist/chunk-T5UZYLJ5.js.map +1 -0
  311. package/dist/chunk-T7N6FTNW.js +127 -0
  312. package/dist/chunk-T7N6FTNW.js.map +1 -0
  313. package/dist/chunk-TFZDMOYM.js +105 -0
  314. package/dist/chunk-TFZDMOYM.js.map +1 -0
  315. package/dist/chunk-TWWB7FGO.js +141 -0
  316. package/dist/chunk-TWWB7FGO.js.map +1 -0
  317. package/dist/chunk-U5JCZGW6.js +130 -0
  318. package/dist/chunk-U5JCZGW6.js.map +1 -0
  319. package/dist/chunk-UAFLNWEA.js +212 -0
  320. package/dist/chunk-UAFLNWEA.js.map +1 -0
  321. package/dist/chunk-UE2UX7T6.js +212 -0
  322. package/dist/chunk-UE2UX7T6.js.map +1 -0
  323. package/dist/chunk-UENBCJ2Z.js +108 -0
  324. package/dist/chunk-UENBCJ2Z.js.map +1 -0
  325. package/dist/chunk-UII32QDY.js +108 -0
  326. package/dist/chunk-UII32QDY.js.map +1 -0
  327. package/dist/chunk-ULWSG4PL.js +127 -0
  328. package/dist/chunk-ULWSG4PL.js.map +1 -0
  329. package/dist/chunk-UR2UYNPF.js +286 -0
  330. package/dist/chunk-UR2UYNPF.js.map +1 -0
  331. package/dist/chunk-V3HJ66PP.js +105 -0
  332. package/dist/chunk-V3HJ66PP.js.map +1 -0
  333. package/dist/chunk-VFBMMG3M.js +141 -0
  334. package/dist/chunk-VFBMMG3M.js.map +1 -0
  335. package/dist/chunk-VOIYIVZF.js +2324 -0
  336. package/dist/chunk-VOIYIVZF.js.map +1 -0
  337. package/dist/chunk-VUEVN22O.js +212 -0
  338. package/dist/chunk-VUEVN22O.js.map +1 -0
  339. package/dist/chunk-W74PEWES.js +108 -0
  340. package/dist/chunk-W74PEWES.js.map +1 -0
  341. package/dist/chunk-WKADYA3X.js +141 -0
  342. package/dist/chunk-WKADYA3X.js.map +1 -0
  343. package/dist/chunk-WT6J7YEJ.js +127 -0
  344. package/dist/chunk-WT6J7YEJ.js.map +1 -0
  345. package/dist/chunk-WW2QYYHP.js +289 -0
  346. package/dist/chunk-WW2QYYHP.js.map +1 -0
  347. package/dist/chunk-XAQTA6XL.js +108 -0
  348. package/dist/chunk-XAQTA6XL.js.map +1 -0
  349. package/dist/chunk-XC4PADOS.js +212 -0
  350. package/dist/chunk-XC4PADOS.js.map +1 -0
  351. package/dist/chunk-XCR37CPQ.js +63 -0
  352. package/dist/chunk-XCR37CPQ.js.map +1 -0
  353. package/dist/chunk-XFQNDZFW.js +292 -0
  354. package/dist/chunk-XFQNDZFW.js.map +1 -0
  355. package/dist/chunk-XGRJYI4P.js +63 -0
  356. package/dist/chunk-XGRJYI4P.js.map +1 -0
  357. package/dist/chunk-XHBEHDIK.js +63 -0
  358. package/dist/chunk-XHBEHDIK.js.map +1 -0
  359. package/dist/chunk-XKWXQVAQ.js +63 -0
  360. package/dist/chunk-XKWXQVAQ.js.map +1 -0
  361. package/dist/chunk-XMV22YIZ.js +63 -0
  362. package/dist/chunk-XMV22YIZ.js.map +1 -0
  363. package/dist/chunk-XOK7DPQQ.js +127 -0
  364. package/dist/chunk-XOK7DPQQ.js.map +1 -0
  365. package/dist/chunk-XQ4MCRX6.js +127 -0
  366. package/dist/chunk-XQ4MCRX6.js.map +1 -0
  367. package/dist/chunk-XVT7XSTZ.js +141 -0
  368. package/dist/chunk-XVT7XSTZ.js.map +1 -0
  369. package/dist/chunk-YAUITW33.js +141 -0
  370. package/dist/chunk-YAUITW33.js.map +1 -0
  371. package/dist/chunk-YEUH2K6Z.js +56 -0
  372. package/dist/chunk-YEUH2K6Z.js.map +1 -0
  373. package/dist/chunk-YGPVJ5XR.js +212 -0
  374. package/dist/chunk-YGPVJ5XR.js.map +1 -0
  375. package/dist/chunk-YJX5YXE3.js +2324 -0
  376. package/dist/chunk-YJX5YXE3.js.map +1 -0
  377. package/dist/chunk-YPGJQF7B.js +212 -0
  378. package/dist/chunk-YPGJQF7B.js.map +1 -0
  379. package/dist/chunk-ZHQRGXFP.js +141 -0
  380. package/dist/chunk-ZHQRGXFP.js.map +1 -0
  381. package/dist/chunk-ZJIBJEEY.js +127 -0
  382. package/dist/chunk-ZJIBJEEY.js.map +1 -0
  383. package/dist/chunk-ZL2SUXFQ.js +127 -0
  384. package/dist/chunk-ZL2SUXFQ.js.map +1 -0
  385. package/dist/chunk-ZN5L7CIN.js +3629 -0
  386. package/dist/chunk-ZN5L7CIN.js.map +1 -0
  387. package/dist/chunk-ZS5PA2VF.js +141 -0
  388. package/dist/chunk-ZS5PA2VF.js.map +1 -0
  389. package/dist/chunk-ZVEEIEJJ.js +141 -0
  390. package/dist/chunk-ZVEEIEJJ.js.map +1 -0
  391. package/dist/chunk-ZZPL5FV7.js +45 -0
  392. package/dist/chunk-ZZPL5FV7.js.map +1 -0
  393. package/dist/components/AddressContainer/CoreAddressContainer.js +11 -10
  394. package/dist/components/AddressContainer/EVMAddressContainer.js +10 -9
  395. package/dist/components/AddressContainer/addressSwitcher.js +8 -7
  396. package/dist/components/AddressContainer/addressView.js +7 -6
  397. package/dist/components/AddressContainer/label.js +5 -4
  398. package/dist/components/Age/index.js +5 -4
  399. package/dist/components/Age/index.js.map +1 -1
  400. package/dist/components/Charts/PreviewChartTemplate.js +2 -1
  401. package/dist/components/Charts/PreviewChartTemplate.js.map +1 -1
  402. package/dist/components/Charts/StockChartTemplate.js +2 -1
  403. package/dist/components/Charts/StockChartTemplate.js.map +1 -1
  404. package/dist/components/CopyButton/index.js +4 -3
  405. package/dist/components/CopyButton/index.js.map +1 -1
  406. package/dist/components/DownloadCSV/index.js +5 -4
  407. package/dist/components/DownloadCSV/index.js.map +1 -1
  408. package/dist/components/EOACodeIcon/index.d.ts +2 -0
  409. package/dist/components/EOACodeIcon/index.js +1 -0
  410. package/dist/components/EOACodeIcon/index.js.map +1 -0
  411. package/dist/components/GasPriceDropdown/index.js +4 -3
  412. package/dist/components/GasPriceDropdown/index.js.map +1 -1
  413. package/dist/components/IncreasePercent/index.js +3 -2
  414. package/dist/components/IncreasePercent/index.js.map +1 -1
  415. package/dist/components/InfoIconWithTooltip/index.js +4 -3
  416. package/dist/components/InfoIconWithTooltip/index.js.map +1 -1
  417. package/dist/components/Modal/index.js +4 -3
  418. package/dist/components/NetworkIcon/index.js +3 -2
  419. package/dist/components/NetworkIcon/index.js.map +1 -1
  420. package/dist/components/PhishingAddressContainer/index.js +5 -4
  421. package/dist/components/PhishingAddressContainer/index.js.map +1 -1
  422. package/dist/components/Price/index.js +4 -3
  423. package/dist/components/Price/index.js.map +1 -1
  424. package/dist/components/Radio/index.js +3 -2
  425. package/dist/components/Radio/index.js.map +1 -1
  426. package/dist/components/Select/index.js +4 -3
  427. package/dist/components/Select/index.js.map +1 -1
  428. package/dist/components/Select/select.js +4 -3
  429. package/dist/components/SkeletonContainer/index.js +1 -1
  430. package/dist/components/Text/index.js +5 -4
  431. package/dist/components/Tooltip/index.js +4 -3
  432. package/dist/components/TransactionAction/coreTransactionAction.js +11 -10
  433. package/dist/components/TransactionAction/coreTransactionAction.js.map +1 -1
  434. package/dist/components/TransactionAction/evmTransactionAction.js +10 -9
  435. package/dist/components/TransactionAction/evmTransactionAction.js.map +1 -1
  436. package/dist/utils/address.d.ts +2 -1
  437. package/dist/utils/address.js +5 -2
  438. package/dist/utils/cache.js +3 -52
  439. package/dist/utils/cache.js.map +1 -1
  440. package/dist/utils/contractManagerTool.js +3 -2
  441. package/dist/utils/contractManagerTool.js.map +1 -1
  442. package/dist/utils/hooks/useENS.js +4 -3
  443. package/dist/utils/index.js +3 -2
  444. package/dist/utils/request.js +2 -1
  445. package/dist/utils/request.types.d.ts +1 -1
  446. package/package.json +2 -2
@@ -0,0 +1,108 @@
1
+ import {
2
+ ContractAddress,
3
+ ContractCreatedAddress,
4
+ InvalidAddress,
5
+ MyAddress
6
+ } from "./chunk-3H2ZBKI3.js";
7
+ import {
8
+ RenderAddress
9
+ } from "./chunk-XOK7DPQQ.js";
10
+ import {
11
+ convertCheckSum,
12
+ formatAddress,
13
+ isEvmAddress,
14
+ isZeroAddress
15
+ } from "./chunk-NEYIY22U.js";
16
+ import {
17
+ getLabelInfo
18
+ } from "./chunk-HW27DN22.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-MNVZLYD2.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,EAA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,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-72AV4UB3.js";
4
+ import {
5
+ Text
6
+ } from "./chunk-R6XUP4YU.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-MPKSCMSQ.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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MAAM,MAAM,aAAa,WAAW,CAAC;AAEhE,QAAM,UAAU,OAAO,MAAM;AAE7B,QAAM,iBAAiC;AAAA,IACrC,UAAU;AAAA,MACR,OAAQ,cAAsB,KAAK;AAAA,MACnC,OAAO;AAAA,IACT;AAAA,IACA,SAAS;AAAA,MACP,OAAO,cAAc,SAAS;AAAA,MAC9B,OAAO;AAAA,IACT;AAAA,IACA,cAAc;AAAA,MACZ,OAAO,cAAc,QAAQ,QAAQ;AAAA,MACrC,OAAO;AAAA,IACT;AAAA,IACA,OAAO;AAAA,MACL,OAAO,cAAc,QAAQ,QAAQ;AAAA,MACrC,OAAO;AAAA,MACP,WAAW;AAAA,IACb;AAAA,EACF;AAEA,QAAM,kBAAkB,gBAAgB,UAAU;AAElD,QAAM,kBACJ,OAAO,eAAe,YAAY,CAAC,SAC/B,eAAe,eAAgB,IAC/B;AAEN,SACE,qBAAC,SAAI,WAAU,eACZ;AAAA;AAAA,IACD;AAAA,MAAC;AAAA;AAAA,QACC,KAAI;AAAA,QACJ,YACE,iCACG;AAAA,+BAAqB,cAAc;AAAA,UACpC,oBAAC,SAAK,wBAAc,iBAAgB;AAAA,WACtC;AAAA,QAGF;AAAA,UAAC;AAAA;AAAA,YACC,WAAU;AAAA,YACV,OAAO,EAAE,GAAG,cAAc,GAAG,MAAM;AAAA,YAClC,GAAI,OAAO,EAAE,MAAM,OAAO,IAAI,EAAE,IAAI,CAAC;AAAA,YAErC,kBAAQ;AAAA;AAAA,QACX;AAAA;AAAA,IACF;AAAA,IACC;AAAA,KACH;AAEJ;","names":[]}
@@ -0,0 +1,108 @@
1
+ import {
2
+ ContractAddress,
3
+ ContractCreatedAddress,
4
+ InvalidAddress,
5
+ MyAddress
6
+ } from "./chunk-ILC4RRWU.js";
7
+ import {
8
+ RenderAddress
9
+ } from "./chunk-AUWJGZPI.js";
10
+ import {
11
+ convertCheckSum,
12
+ formatAddress,
13
+ isEvmAddress,
14
+ isZeroAddress
15
+ } from "./chunk-WW2QYYHP.js";
16
+ import {
17
+ getLabelInfo
18
+ } from "./chunk-P6GKWD7Z.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-MZ6URSWK.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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AE;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,150 @@
1
+ import {
2
+ Spin
3
+ } from "./chunk-XCKMXAL2.js";
4
+ import {
5
+ cn
6
+ } from "./chunk-4QJEGIPC.js";
7
+
8
+ // src/components/Modal/index.tsx
9
+ import { useEffect, useCallback, useMemo } from "react";
10
+ import ReactDOM from "react-dom";
11
+ import { X } from "lucide-react";
12
+ import { jsx, jsxs } from "react/jsx-runtime";
13
+ var Backdrop = ({
14
+ onClick,
15
+ children,
16
+ className
17
+ }) => /* @__PURE__ */ jsx("div", { className, onClick, children });
18
+ var ModalContent = ({
19
+ containerClassName,
20
+ closable,
21
+ onClose,
22
+ children,
23
+ loading,
24
+ modalStyles
25
+ }) => /* @__PURE__ */ jsx(
26
+ "div",
27
+ {
28
+ className: cn("relative bg-[#FFF] rounded shadow-lg", containerClassName),
29
+ tabIndex: -1,
30
+ style: modalStyles,
31
+ children: /* @__PURE__ */ jsxs(Spin, { spinning: loading, children: [
32
+ closable && /* @__PURE__ */ jsx(X, { className: "h-4 w-4 absolute right-5 top-5", onClick: onClose }),
33
+ /* @__PURE__ */ jsx("div", { className: "p-4", children })
34
+ ] })
35
+ }
36
+ );
37
+ var useEventListener = (eventName, handler, active) => {
38
+ useEffect(() => {
39
+ if (active) {
40
+ const eventListener = (event) => handler(event);
41
+ document.addEventListener(eventName, eventListener);
42
+ return () => {
43
+ document.removeEventListener(eventName, eventListener);
44
+ };
45
+ }
46
+ }, [eventName, handler, active]);
47
+ };
48
+ var Modal = ({
49
+ open,
50
+ closeOnEsc = true,
51
+ closable = true,
52
+ preventScroll = true,
53
+ backdropClassName = "",
54
+ containerClassName = "",
55
+ onOpen = () => {
56
+ },
57
+ onClose,
58
+ children,
59
+ width = "600px",
60
+ maskClosable = true,
61
+ centered = true,
62
+ loading = false
63
+ }) => {
64
+ useEffect(() => {
65
+ if (open) {
66
+ onOpen?.();
67
+ if (preventScroll) {
68
+ document.body.style.overflow = "hidden";
69
+ }
70
+ } else {
71
+ if (preventScroll) {
72
+ document.body.style.overflow = "";
73
+ }
74
+ }
75
+ return () => {
76
+ if (preventScroll) {
77
+ document.body.style.overflow = "";
78
+ }
79
+ };
80
+ }, [open, onOpen, preventScroll]);
81
+ const handleKeyDown = useCallback(
82
+ (event) => {
83
+ if (event.key === "Escape" && closeOnEsc && onClose) {
84
+ onClose?.();
85
+ }
86
+ },
87
+ [closeOnEsc, onClose]
88
+ );
89
+ const handleClickOutside = useCallback(() => {
90
+ if (onClose && maskClosable) {
91
+ onClose?.();
92
+ }
93
+ }, [onClose, maskClosable]);
94
+ const handleBackdropClick = useCallback(
95
+ (event) => {
96
+ if (maskClosable && event.target === event.currentTarget && onClose) {
97
+ onClose?.();
98
+ }
99
+ },
100
+ [maskClosable, onClose]
101
+ );
102
+ const modalStyles = useMemo(
103
+ () => ({
104
+ width: typeof width === "string" ? width : `${width}px`,
105
+ margin: centered ? "auto" : void 0
106
+ }),
107
+ [width, centered]
108
+ );
109
+ useEventListener(
110
+ "keydown",
111
+ handleKeyDown,
112
+ open && closeOnEsc
113
+ );
114
+ useEventListener(
115
+ "mousedown",
116
+ handleClickOutside,
117
+ open && maskClosable
118
+ );
119
+ if (!open)
120
+ return null;
121
+ return ReactDOM.createPortal(
122
+ /* @__PURE__ */ jsx(
123
+ Backdrop,
124
+ {
125
+ onClick: handleBackdropClick,
126
+ className: cn(
127
+ "fixed inset-0 bg-[#000] bg-opacity-25 flex items-center justify-center z-10000",
128
+ backdropClassName
129
+ ),
130
+ children: /* @__PURE__ */ jsx(
131
+ ModalContent,
132
+ {
133
+ containerClassName,
134
+ closable,
135
+ onClose,
136
+ children,
137
+ loading,
138
+ modalStyles
139
+ }
140
+ )
141
+ }
142
+ ),
143
+ document.body
144
+ );
145
+ };
146
+
147
+ export {
148
+ Modal
149
+ };
150
+ //# sourceMappingURL=chunk-MZTA3L4X.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Modal/index.tsx"],"sourcesContent":["import React, { useEffect, useCallback, useMemo } from 'react';\nimport ReactDOM from 'react-dom';\nimport { X } from 'lucide-react';\nimport { Spin } from '../Spin';\nimport { cn } from '../../utils';\n\ninterface ModalProps {\n open: boolean;\n closeOnEsc?: boolean;\n closable?: boolean;\n preventScroll?: boolean;\n backdropClassName?: string;\n containerClassName?: string;\n onOpen?: () => void;\n onClose?: () => void;\n children?: React.ReactNode;\n width?: string | number;\n maskClosable?: boolean;\n centered?: boolean;\n loading?: boolean;\n}\n\ninterface ModalContentProps {\n containerClassName: string;\n closable: boolean;\n onClose?: VoidFunction;\n children?: React.ReactNode;\n loading?: boolean;\n modalStyles: React.CSSProperties;\n}\n\ninterface BackdropProps {\n onClick: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;\n className: string;\n children?: React.ReactNode;\n}\n\nconst Backdrop: React.FC<BackdropProps> = ({\n onClick,\n children,\n className,\n}) => (\n <div className={className} onClick={onClick}>\n {children}\n </div>\n);\n\nconst ModalContent = ({\n containerClassName,\n closable,\n onClose,\n children,\n loading,\n modalStyles,\n}: ModalContentProps) => (\n <div\n className={cn('relative bg-[#FFF] rounded shadow-lg', containerClassName)}\n tabIndex={-1}\n style={modalStyles}\n >\n <Spin spinning={loading}>\n {closable && (\n <X className=\"h-4 w-4 absolute right-5 top-5\" onClick={onClose} />\n )}\n <div className=\"p-4\">{children}</div>\n </Spin>\n </div>\n);\n\nconst useEventListener = (\n eventName: string,\n handler: (event: Event) => void,\n active: boolean,\n) => {\n useEffect(() => {\n if (active) {\n const eventListener = (event: Event) => handler(event);\n\n document.addEventListener(eventName, eventListener);\n return () => {\n document.removeEventListener(eventName, eventListener);\n };\n }\n }, [eventName, handler, active]);\n};\n\nconst Modal: React.FC<ModalProps> = ({\n open,\n closeOnEsc = true,\n closable = true,\n preventScroll = true,\n backdropClassName = '',\n containerClassName = '',\n onOpen = () => {},\n onClose,\n children,\n width = '600px',\n maskClosable = true,\n centered = true,\n loading = false,\n}) => {\n useEffect(() => {\n if (open) {\n onOpen?.();\n if (preventScroll) {\n document.body.style.overflow = 'hidden';\n }\n } else {\n if (preventScroll) {\n document.body.style.overflow = '';\n }\n }\n return () => {\n if (preventScroll) {\n document.body.style.overflow = '';\n }\n };\n }, [open, onOpen, preventScroll]);\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if (event.key === 'Escape' && closeOnEsc && onClose) {\n onClose?.();\n }\n },\n [closeOnEsc, onClose],\n );\n\n const handleClickOutside = useCallback(() => {\n if (onClose && maskClosable) {\n onClose?.();\n }\n }, [onClose, maskClosable]);\n\n const handleBackdropClick = useCallback(\n (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => {\n if (maskClosable && event.target === event.currentTarget && onClose) {\n onClose?.();\n }\n },\n [maskClosable, onClose],\n );\n\n const modalStyles: React.CSSProperties = useMemo(\n () => ({\n width: typeof width === 'string' ? width : `${width}px`,\n margin: centered ? 'auto' : undefined,\n }),\n [width, centered],\n );\n\n useEventListener(\n 'keydown',\n handleKeyDown as (event: Event) => void,\n open && closeOnEsc,\n );\n useEventListener(\n 'mousedown',\n handleClickOutside as (event: Event) => void,\n open && maskClosable,\n );\n\n if (!open) return null;\n\n return ReactDOM.createPortal(\n <Backdrop\n onClick={handleBackdropClick}\n className={cn(\n 'fixed inset-0 bg-[#000] bg-opacity-25 flex items-center justify-center z-10000',\n backdropClassName,\n )}\n >\n <ModalContent\n containerClassName={containerClassName}\n closable={closable}\n onClose={onClose}\n children={children}\n loading={loading}\n modalStyles={modalStyles}\n />\n </Backdrop>,\n document.body,\n );\n};\n\nexport { Modal };\n"],"mappings":";;;;;;;;AAAA,SAAgB,WAAW,aAAa,eAAe;AACvD,OAAO,cAAc;AACrB,SAAS,SAAS;AAwChB,cAkBE,YAlBF;AALF,IAAM,WAAoC,CAAC;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AACF,MACE,oBAAC,SAAI,WAAsB,SACxB,UACH;AAGF,IAAM,eAAe,CAAC;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MACE;AAAA,EAAC;AAAA;AAAA,IACC,WAAW,GAAG,wCAAwC,kBAAkB;AAAA,IACxE,UAAU;AAAA,IACV,OAAO;AAAA,IAEP,+BAAC,QAAK,UAAU,SACb;AAAA,kBACC,oBAAC,KAAE,WAAU,kCAAiC,SAAS,SAAS;AAAA,MAElE,oBAAC,SAAI,WAAU,OAAO,UAAS;AAAA,OACjC;AAAA;AACF;AAGF,IAAM,mBAAmB,CACvB,WACA,SACA,WACG;AACH,YAAU,MAAM;AACd,QAAI,QAAQ;AACV,YAAM,gBAAgB,CAAC,UAAiB,QAAQ,KAAK;AAErD,eAAS,iBAAiB,WAAW,aAAa;AAClD,aAAO,MAAM;AACX,iBAAS,oBAAoB,WAAW,aAAa;A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AAA,MAC9C,QAAQ,WAAW,SAAS;AAAA,IAC9B;AAAA,IACA,CAAC,OAAO,QAAQ;AAAA,EAClB;AAEA;AAAA,IACE;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,EACV;AACA;AAAA,IACE;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,EACV;AAEA,MAAI,CAAC;AAAM,WAAO;AAElB,SAAO,SAAS;AAAA,IACd;AAAA,MAAC;AAAA;AAAA,QACC,SAAS;AAAA,QACT,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACF;AAAA;AAAA,IACF;AAAA,IACA,SAAS;AAAA,EACX;AACF;","names":[]}
@@ -0,0 +1,127 @@
1
+ import {
2
+ convertCheckSum
3
+ } from "./chunk-ADJVLOE4.js";
4
+ import {
5
+ Text
6
+ } from "./chunk-QQXDVN7O.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-ND2CSITG.js.map