@abtnode/blocklet-services 1.16.41-beta-20250325-154552-2bf78c26 → 1.16.41-beta-20250329-232306-53c45e3b

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 (258) hide show
  1. package/api/emails/_components/actions.js +9 -0
  2. package/api/emails/{components → _components}/article.js +1 -1
  3. package/api/emails/{components → _components}/asset.js +2 -2
  4. package/api/emails/{components → _components}/attachments.js +15 -13
  5. package/api/emails/{components → _components}/compose.js +2 -2
  6. package/api/emails/_components/content.js +15 -0
  7. package/api/emails/{components → _components}/footer.js +1 -1
  8. package/api/emails/{components → _components}/powered-by.js +1 -1
  9. package/api/emails/{components → _components}/token.js +2 -2
  10. package/api/emails/{components → _components}/transaction.js +1 -1
  11. package/api/emails/{pages → _templates}/notification.js +10 -10
  12. package/api/emails/_templates/verify-code-body.js +49 -0
  13. package/api/emails/_templates/verify-code.js +37 -0
  14. package/api/index.js +59 -71
  15. package/api/libs/auth/utils.js +20 -1
  16. package/api/libs/connect/session.js +55 -3
  17. package/api/libs/email.js +48 -16
  18. package/api/middlewares/body-parser.js +10 -0
  19. package/api/routes/blocklet.js +17 -4
  20. package/api/routes/federated.js +36 -13
  21. package/api/routes/mcp.js +87 -0
  22. package/api/routes/user-session.js +16 -1
  23. package/api/routes/user.js +442 -40
  24. package/api/services/auth/connect/issue-passport.js +4 -3
  25. package/api/services/auth/connect/receive-transfer-app-owner.js +17 -1
  26. package/api/services/auth/connect/verify-destroy.js +20 -0
  27. package/api/services/auth/connect/verify-elevated.js +20 -0
  28. package/api/services/auth/index.js +0 -2
  29. package/api/services/auth/session.js +1 -1
  30. package/api/services/kyc/index.js +1 -1
  31. package/api/services/mcp/server.js +37 -0
  32. package/api/services/notification/queue.js +5 -4
  33. package/api/services/studio/index.js +4 -0
  34. package/api/util/federated.js +16 -0
  35. package/dist/assets/{ArrowDropDown-DH8_DBvh.js → ArrowDropDown-odHjNJIs.js} +1 -1
  36. package/dist/assets/{CheckCircle-W4GlzCdu.js → CheckCircle-BqOSvJMp.js} +1 -1
  37. package/dist/assets/{ChevronLeft-B2SRhM5v.js → ChevronLeft-Dv7rlUf5.js} +1 -1
  38. package/dist/assets/{ChevronRight-ZvmzY6T1.js → ChevronRight-CWeJn1iz.js} +1 -1
  39. package/dist/assets/{Community-DxXfm8O3.js → Community-CMFBTMi_.js} +1 -1
  40. package/dist/assets/{DeleteOutline-ClZd2kP1.js → DeleteOutline-Cr-TyrUV.js} +1 -1
  41. package/dist/assets/{Done-DAdEZjfp.js → Done-C1TA1wbA.js} +1 -1
  42. package/dist/assets/{Download-fAYCJ3Zn.js → Download-DxhnUTM_.js} +1 -1
  43. package/dist/assets/{EditIcon-jPGouFji.js → EditIcon-Bgmg6UE0.js} +1 -1
  44. package/dist/assets/{Email-Cj6caJ_8.js → Email-BphlAPta.js} +1 -1
  45. package/dist/assets/{Error-DzDuzV0d.js → Error-pXXvJFxN.js} +1 -1
  46. package/dist/assets/{ExpandLess-CSwVcrV9.js → ExpandLess-Dc_dI20M.js} +1 -1
  47. package/dist/assets/{Google-DaNgbmbg.js → Google-DNUuYFIA.js} +1 -1
  48. package/dist/assets/{Holiday-1uY1QmAp.js → Holiday-DKefG3Bb.js} +1 -1
  49. package/dist/assets/{InfoOutlined-o8YCo8qy.js → InfoOutlined-CEUhR4DY.js} +1 -1
  50. package/dist/assets/{Launch-B5cUT_sx.js → Launch-BUTOr3cR.js} +1 -1
  51. package/dist/assets/{LaunchOutlined-CqJ3-tbE.js → LaunchOutlined-QHq-RUJt.js} +1 -1
  52. package/dist/assets/{Location-C1pAq6lI.js → Location-BuaxMxu4.js} +1 -1
  53. package/dist/assets/{LockIcon-CydBoNUN.js → LockIcon-CQ1tExIY.js} +1 -1
  54. package/dist/assets/{Meeting-tZebh2B1.js → Meeting-Cs60QtvP.js} +1 -1
  55. package/dist/assets/{MoreHoriz-C_oNEMFs.js → MoreHoriz-D1SOL47a.js} +1 -1
  56. package/dist/assets/{OffSick-BYC1oqk1.js → OffSick-DinPaelp.js} +1 -1
  57. package/dist/assets/{Phone-DIzOgVDd.js → Phone-BmouKMyi.js} +1 -1
  58. package/dist/assets/{PlayArrow-BVARrWHX.js → PlayArrow-D7cGSxeN.js} +1 -1
  59. package/dist/assets/{QuestionMarkCircle-B5JWLChh.js → QuestionMarkCircle-Dt9XJWEe.js} +1 -1
  60. package/dist/assets/{ServerLogo-DIfW0NaH.js → ServerLogo-B33ZRE5q.js} +1 -1
  61. package/dist/assets/{Timezone-D7zhOyHu.js → Timezone-CyMhRxlx.js} +1 -1
  62. package/dist/assets/{ViewList-93ffk7kT.js → ViewList-vu1qOJ6P.js} +1 -1
  63. package/dist/assets/{WorkingRemotely-0VF9S3Zo.js → WorkingRemotely-BP_VIHeM.js} +1 -1
  64. package/dist/assets/access-control-CpxcJItK.js +14 -0
  65. package/dist/assets/{actions-D-igEkC_.js → actions-4oGfCMlR.js} +1 -1
  66. package/dist/assets/add-component-core-CE0nArG4.js +761 -0
  67. package/dist/assets/add-resource-BYM4JwzE.js +1 -0
  68. package/dist/assets/{addon-DKPnFM-d.js → addon-B9bb2bvM.js} +1 -1
  69. package/dist/assets/analytics-BXLe73MI.js +11 -0
  70. package/dist/assets/api-D9Yi7Zdr.js +1 -0
  71. package/dist/assets/appearance-DX7SoW1u.js +1 -0
  72. package/dist/assets/ar-2k9jaPIk.js +3 -0
  73. package/dist/assets/{audit-logs-BQlJ8qXs.js → audit-logs-D8H5E0fC.js} +3 -3
  74. package/dist/assets/{base32-CUcA0Dp2.js → base32-BNpDT-6Q.js} +1 -1
  75. package/dist/assets/{branding-DxSd76KG.js → branding-BW1rhy8d.js} +2 -2
  76. package/dist/assets/bundle-avatar-DHwmIozH.js +1 -0
  77. package/dist/assets/button-CNnuiac8.js +1 -0
  78. package/dist/assets/{click-to-copy-DiELz5Xb.js → click-to-copy-B0HMuCN_.js} +1 -1
  79. package/dist/assets/complete-BNf0-iqY.js +45 -0
  80. package/dist/assets/{component-DXUL6eiU.js → component-1r0VSsqq.js} +2 -2
  81. package/dist/assets/{config-CCTS8ZgJ.js → config-BeD5_8kr.js} +2 -2
  82. package/dist/assets/config-CqHmZdZv.js +1 -0
  83. package/dist/assets/{config-navigation-DH0a1AcG.js → config-navigation-DtN0_qFZ.js} +3 -3
  84. package/dist/assets/{config-space-CDBT30Fy.js → config-space-DlwZewcm.js} +1 -1
  85. package/dist/assets/{confirm-H5SukzMZ.js → confirm-DmMN-34s.js} +2 -2
  86. package/dist/assets/connect-BfSOEYV-.js +1 -0
  87. package/dist/assets/{connect-BQBuxZq7.js → connect-CC9dcVMV.js} +1 -1
  88. package/dist/assets/{connect-to-DqrgfOZi.js → connect-to-CzffwD9G.js} +1 -1
  89. package/dist/assets/{content-layout-CIzNOca5.js → content-layout-7vu3yv_f.js} +1 -1
  90. package/dist/assets/dashboard-C_Q4TjPa.js +216 -0
  91. package/dist/assets/de-B9cLhykn.js +3 -0
  92. package/dist/assets/{delete-confirm-CdzeQQ8r.js → delete-confirm-BTaU_6Kx.js} +1 -1
  93. package/dist/assets/did-address-BC-0j4Pt.js +1 -0
  94. package/dist/assets/{domain-B79dyXvl.js → domain-CLMRXecU.js} +1 -1
  95. package/dist/assets/{domain-action-card-DB2tCUnz.js → domain-action-card-DwQ7Q8wY.js} +2 -2
  96. package/dist/assets/domains-DF7TtN5q.js +1 -0
  97. package/dist/assets/{email-DArp9y3R.js → email-mj0bVFDS.js} +2 -2
  98. package/dist/assets/es-BoQohonz.js +3 -0
  99. package/dist/assets/{exchange-passport-CcBW-4OT.js → exchange-passport--DeUPzbW.js} +1 -1
  100. package/dist/assets/form-text-input-BYF6lVnE.js +11 -0
  101. package/dist/assets/fr-doSYAOrt.js +3 -0
  102. package/dist/assets/{fuel-BXqPbUK0.js → fuel-D-kOZuF6.js} +1 -1
  103. package/dist/assets/{fullpage-BAGs-W5J.js → fullpage-DO8Hcbkl.js} +1 -1
  104. package/dist/assets/{get-safe-url-Bs400iLS.js → get-safe-url-BKl2A9x2.js} +1 -1
  105. package/dist/assets/{get-safe-url-DtTGgWbn.js → get-safe-url-QFq5JNoE.js} +1 -1
  106. package/dist/assets/hi-B_BwhpD8.js +1 -0
  107. package/dist/assets/{home-C9GJ4K7b.js → home-CpnMpXiw.js} +1 -1
  108. package/dist/assets/id-BgYIZCvk.js +3 -0
  109. package/dist/assets/{iframe-_xmo1lin.js → iframe-B9mCpo4I.js} +1 -1
  110. package/dist/assets/{index-BHs362aB.js → index-79U1RPaq.js} +1 -1
  111. package/dist/assets/{index-CfSdyisA.js → index-B4Q2DAdn.js} +11 -11
  112. package/dist/assets/index-BJ2lJo7L.js +346 -0
  113. package/dist/assets/{index-Ca7t5vsG.js → index-BMSA5TdD.js} +1 -1
  114. package/dist/assets/{index-B8YUhcxT.js → index-BVOYP6aR.js} +2 -2
  115. package/dist/assets/{index-Dz061vzT.js → index-BZvVDfZ4.js} +1 -1
  116. package/dist/assets/index-BsUr7wGb.js +104 -0
  117. package/dist/assets/index-C44fECmB.js +138 -0
  118. package/dist/assets/{index-CHdEjF6N.js → index-CGK3FEjY.js} +2 -2
  119. package/dist/assets/{index-Cr3r3Dk2.js → index-CJCg9yIK.js} +1 -1
  120. package/dist/assets/index-CmKAznDh.js +109 -0
  121. package/dist/assets/{index-G1H3TvXv.js → index-Ct7s2LPI.js} +3 -3
  122. package/dist/assets/{index-cfNltkU-.js → index-DQ_RzIwU.js} +2 -2
  123. package/dist/assets/{index-Dq2tckVf.js → index-D_wVtHmh.js} +1 -1
  124. package/dist/assets/{index-CyBY00Un.js → index-DqC2o5PB.js} +1 -1
  125. package/dist/assets/index-DyTFEgKr.js +1 -0
  126. package/dist/assets/index-eCY24sH9.js +137 -0
  127. package/dist/assets/{index-CHtbhPPM.js → index-fWGZM-oP.js} +1 -1
  128. package/dist/assets/index-gTQQ3SoE.js +290 -0
  129. package/dist/assets/index-gcSQTx25.js +1 -0
  130. package/dist/assets/{index-rEtARSUO.js → index-m8CaSxXx.js} +1 -1
  131. package/dist/assets/{index-BI7HW_KL.js → index-u-lA6P_E.js} +1 -1
  132. package/dist/assets/invitation-B8Qx_pFq.js +176 -0
  133. package/dist/assets/invite-BBaF_vyc.js +1 -0
  134. package/dist/assets/{issue-passport-D2H1iXFG.js → issue-passport-DC-ly7xg.js} +1 -1
  135. package/dist/assets/{item-BZnflB1r.js → item-BSGXym2I.js} +1 -1
  136. package/dist/assets/ja-FMMLI8YD.js +3 -0
  137. package/dist/assets/ko-C0kmRXYE.js +3 -0
  138. package/dist/assets/{launch-result-message-JdCxLBHF.js → launch-result-message-ByEG8r_7.js} +1 -1
  139. package/dist/assets/{layout-BKTXvgtN.js → layout-BqhTD729.js} +1 -1
  140. package/dist/assets/list-BHs8uNT5.js +200 -0
  141. package/dist/assets/{list-header-C3JMIP96.js → list-header-BmTDmRY0.js} +1 -1
  142. package/dist/assets/localization-daPAWMzR.js +1 -0
  143. package/dist/assets/{log-DSC3nDef.js → log-o_Cadt8j.js} +7 -7
  144. package/dist/assets/{login-B_V3KWS7.js → login-BQozrLDm.js} +1 -1
  145. package/dist/assets/{login-oauth-callback-GH6m7W6J.js → login-oauth-callback-D7lIww1c.js} +1 -1
  146. package/dist/assets/{logo-uploader-B-xodQLr.js → logo-uploader-CUQ3aWZJ.js} +3 -3
  147. package/dist/assets/{lost-passport-BY5kSBj4.js → lost-passport-DkETH2Lu.js} +3 -3
  148. package/dist/assets/{omit-Ci0YZl3b.js → omit-DZNQhOf-.js} +1 -1
  149. package/dist/assets/{open-window-BZb1m3jN.js → open-window-BOl-kTC2.js} +1 -1
  150. package/dist/assets/{overview-5mVt0_gG.js → overview-Bxm05EH6.js} +1 -1
  151. package/dist/assets/{page-header-Mpx7DhlL.js → page-header-Dm1v9v5q.js} +1 -1
  152. package/dist/assets/{permission-EnWLSYpS.js → permission-B5jnw9r2.js} +1 -1
  153. package/dist/assets/{preferences-BzIch5vg.js → preferences-uri2RXdB.js} +1 -1
  154. package/dist/assets/profile-embed-DnIQcD-H.js +1 -0
  155. package/dist/assets/pt-C2UJZK-O.js +1 -0
  156. package/dist/assets/publish-resource-V53U1NNv.js +1 -0
  157. package/dist/assets/{react-beautiful-dnd.esm-DMqCPytx.js → react-beautiful-dnd.esm-B9MfX9Xl.js} +1 -1
  158. package/dist/assets/{relative-time-DmrCbKZi.js → relative-time-RQnsWZQc.js} +1 -1
  159. package/dist/assets/ru-DDA5s4-r.js +1 -0
  160. package/dist/assets/sdk-BKSsfgrc.js +1 -0
  161. package/dist/assets/{session-hH9Eluc3.js → session-6ZeN-aF2.js} +1 -1
  162. package/dist/assets/{setup-BQ9DJQAR.js → setup-7Gq9K_8k.js} +3 -3
  163. package/dist/assets/{shorten-label-Blq5nIR4.js → shorten-label-DkFTGSoy.js} +1 -1
  164. package/dist/assets/simple-select-CqakAZFe.js +1 -0
  165. package/dist/assets/{slicedToArray-0JAP92RR.js → slicedToArray-BuQur6Mi.js} +2 -2
  166. package/dist/assets/{start-Cqxem84z.js → start-BSUY3DBl.js} +1 -1
  167. package/dist/assets/{status-BEcCvVw5.js → status-C52-BFuY.js} +1 -1
  168. package/dist/assets/{step-actions-D1R71ufh.js → step-actions-CA74dwgt.js} +1 -1
  169. package/dist/assets/{studio-CWSkuYqL.js → studio-CAnZfyBM.js} +1 -1
  170. package/dist/assets/{switch-control-j36Oahia.js → switch-control-BBlLGjaH.js} +1 -1
  171. package/dist/assets/th-DmqOUn4C.js +1 -0
  172. package/dist/assets/{traffic-G34OrdMK.js → traffic-CJDIGmp5.js} +3 -3
  173. package/dist/assets/{transfer-CN7lhztm.js → transfer-cG2e24sz.js} +1 -1
  174. package/dist/assets/{unsubscribe-DO25Mrza.js → unsubscribe-afXXIHEf.js} +1 -1
  175. package/dist/assets/{use-mobile-Cz1u01jc.js → use-mobile-CUT5hy9q.js} +1 -1
  176. package/dist/assets/{useAsync-C8pcYSnj.js → useAsync-DM8qaMe4.js} +1 -1
  177. package/dist/assets/{useAsyncRetry-Hh30zerD.js → useAsyncRetry-B7SbzXVI.js} +1 -1
  178. package/dist/assets/{useLocalStorage-CBIpQ2Ch.js → useLocalStorage-Dd4pybDP.js} +1 -1
  179. package/dist/assets/user-center-T8Xw464s.js +67 -0
  180. package/dist/assets/{util-0vNCtiZj.js → util-C_BCTHfw.js} +1 -1
  181. package/dist/assets/{util-BfC763vn.js → util-YyWTpLT7.js} +1 -1
  182. package/dist/assets/vendor-arcblock-DvaaLvvM.js +2361 -0
  183. package/dist/assets/{vendor-hooks-CBQlROWx.js → vendor-hooks-sw5wvnca.js} +2 -2
  184. package/dist/assets/vendor-mui-core-DxqV1NVn.js +266 -0
  185. package/dist/assets/{vendor-mui-x-Bv7Ku5uo.js → vendor-mui-x-BjL1xCkk.js} +1 -1
  186. package/dist/assets/{vendor-utils-C7-Bj8sT.js → vendor-utils-DR57WNxP.js} +7 -7
  187. package/dist/assets/{vendor-ux-did-connect-BH_4FkUq.js → vendor-ux-did-connect-Bciw9Ypu.js} +56 -56
  188. package/dist/assets/vi-Cf__CtPD.js +1 -0
  189. package/dist/assets/wrap-locale-CX50Vz0w.js +1 -0
  190. package/dist/assets/zh-NXspK2yu.js +4 -0
  191. package/dist/assets/zh-tw-DYYDVX5I.js +3 -0
  192. package/dist/index.html +6 -6
  193. package/dist/service-worker.js +2 -2
  194. package/package.json +41 -36
  195. package/api/emails/components/actions.js +0 -9
  196. package/api/emails/components/content.js +0 -15
  197. package/dist/assets/ExternalIssuerIcon-D0E4reWK.js +0 -1
  198. package/dist/assets/access-control-DjkJ52P9.js +0 -13
  199. package/dist/assets/add-component-core-CcInVCBe.js +0 -765
  200. package/dist/assets/add-resource-Bcw4sA7r.js +0 -1
  201. package/dist/assets/analytics-Co9lkVsN.js +0 -11
  202. package/dist/assets/api-tckMpb-p.js +0 -1
  203. package/dist/assets/ar-2G9aaruy.js +0 -3
  204. package/dist/assets/bundle-avatar-BwOOmJKx.js +0 -1
  205. package/dist/assets/button-DmhvlTQK.js +0 -1
  206. package/dist/assets/complete-ClE81Ny0.js +0 -45
  207. package/dist/assets/config-Bn72hRZH.js +0 -1
  208. package/dist/assets/connect-CWgAo1rD.js +0 -1
  209. package/dist/assets/dashboard-Bqm_hK4M.js +0 -218
  210. package/dist/assets/de-DuOaMdcm.js +0 -3
  211. package/dist/assets/did-address-xFa47-Qp.js +0 -1
  212. package/dist/assets/domains-A7coEqfv.js +0 -1
  213. package/dist/assets/es-B_z4kZV7.js +0 -3
  214. package/dist/assets/form-text-input-CFoWUNjT.js +0 -11
  215. package/dist/assets/fr-U4jlLji5.js +0 -3
  216. package/dist/assets/hi-CgWMOeSW.js +0 -1
  217. package/dist/assets/id-DcVdw_iD.js +0 -3
  218. package/dist/assets/index-BAJ44Gvx.js +0 -104
  219. package/dist/assets/index-BGBHkKrL.js +0 -109
  220. package/dist/assets/index-BPRjg-Ha.js +0 -346
  221. package/dist/assets/index-CJi_sgz3.js +0 -137
  222. package/dist/assets/index-CscSMswD.js +0 -1
  223. package/dist/assets/index-CvTkROvr.js +0 -1
  224. package/dist/assets/index-Dkv68xvd.js +0 -138
  225. package/dist/assets/index-DuWgtqAp.js +0 -134
  226. package/dist/assets/invitation-D8ocHjTZ.js +0 -176
  227. package/dist/assets/invite-CtafhjzX.js +0 -1
  228. package/dist/assets/ja-CqyNiw8I.js +0 -3
  229. package/dist/assets/ko-CwboHZNL.js +0 -3
  230. package/dist/assets/list-BiMW09TE.js +0 -195
  231. package/dist/assets/localization-B4PX_18r.js +0 -1
  232. package/dist/assets/login-bg-CBktcoss.jpg +0 -0
  233. package/dist/assets/profile-embed-BAeyCzz5.js +0 -1
  234. package/dist/assets/pt-UQ_ShTDa.js +0 -1
  235. package/dist/assets/publish-resource-OFt0IRNl.js +0 -1
  236. package/dist/assets/ru-BJ0AXHkS.js +0 -1
  237. package/dist/assets/sdk-B1fQwlHL.js +0 -1
  238. package/dist/assets/simple-select-DZdEq8ET.js +0 -1
  239. package/dist/assets/th-CxA-Ohjf.js +0 -1
  240. package/dist/assets/user-center-He8jbYsT.js +0 -79
  241. package/dist/assets/vendor-arcblock-CxRF9kO4.js +0 -2361
  242. package/dist/assets/vendor-mui-core-ClwXKILA.js +0 -266
  243. package/dist/assets/vi-Dp8eof12.js +0 -1
  244. package/dist/assets/wrap-locale-BI93VtNG.js +0 -1
  245. package/dist/assets/zh-D2dwMdph.js +0 -4
  246. package/dist/assets/zh-tw-9pjBCUZn.js +0 -3
  247. /package/api/emails/{components → _components}/copyright.js +0 -0
  248. /package/api/emails/{components → _components}/dapp.js +0 -0
  249. /package/api/emails/{components → _components}/header.js +0 -0
  250. /package/api/emails/{components → _components}/layout.js +0 -0
  251. /package/api/emails/{libs → _libs}/chain.js +0 -0
  252. /package/api/emails/{libs → _libs}/config.js +0 -0
  253. /package/api/emails/{libs → _libs}/constant.js +0 -0
  254. /package/api/emails/{libs → _libs}/explorer-url.js +0 -0
  255. /package/api/emails/{libs → _libs}/func.js +0 -0
  256. /package/api/emails/{libs → _libs}/highlight.js +0 -0
  257. /package/api/emails/{libs → _libs}/style.js +0 -0
  258. /package/api/emails/{libs → _libs}/util.js +0 -0
@@ -0,0 +1,216 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/overview-Bxm05EH6.js","assets/vendor-mui-core-DxqV1NVn.js","assets/vendor-react-DoD83n6N.js","assets/vendor-ux-did-connect-Bciw9Ypu.js","assets/vendor-utils-DR57WNxP.js","assets/vendor-hooks-sw5wvnca.js","assets/lottie-web-B6s7dDoL.js","assets/vendor-ux-did-connect-DhgPdlEj.css","assets/vendor-arcblock-DvaaLvvM.js","assets/InfoOutlined-CEUhR4DY.js","assets/status-C52-BFuY.js","assets/omit-DZNQhOf-.js","assets/index-BZvVDfZ4.js","assets/index-BsUr7wGb.js","assets/did-address-BC-0j4Pt.js","assets/useLocalStorage-Dd4pybDP.js","assets/confirm-DmMN-34s.js","assets/format-error-LAoTjvJe.js","assets/PlayArrow-D7cGSxeN.js","assets/get-safe-url-QFq5JNoE.js","assets/index-DyTFEgKr.js","assets/session-6ZeN-aF2.js","assets/useAsyncRetry-B7SbzXVI.js","assets/useAsync-DM8qaMe4.js","assets/useSetState-BL3ktMon.js","assets/domains-DF7TtN5q.js","assets/domain-action-card-DwQ7Q8wY.js","assets/ExpandLess-Dc_dI20M.js","assets/permission-B5jnw9r2.js","assets/actions-4oGfCMlR.js","assets/MoreHoriz-D1SOL47a.js","assets/delete-confirm-BTaU_6Kx.js","assets/click-to-copy-B0HMuCN_.js","assets/shorten-label-DkFTGSoy.js","assets/util-C_BCTHfw.js","assets/CheckCircle-BqOSvJMp.js","assets/index-BJ2lJo7L.js","assets/index-tUQxVYYQ.js","assets/ViewList-vu1qOJ6P.js","assets/DeleteOutline-Cr-TyrUV.js","assets/util-YyWTpLT7.js","assets/base32-BNpDT-6Q.js","assets/sdk-BKSsfgrc.js","assets/index-u-lA6P_E.js","assets/index-gTQQ3SoE.js","assets/Google-DNUuYFIA.js","assets/EditIcon-Bgmg6UE0.js","assets/list-header-BmTDmRY0.js","assets/LockIcon-CQ1tExIY.js","assets/index-eCY24sH9.js","assets/iframe-B9mCpo4I.js","assets/config-CqHmZdZv.js","assets/form-text-input-BYF6lVnE.js","assets/Done-C1TA1wbA.js","assets/logo-uploader-CUQ3aWZJ.js","assets/ArrowDropDown-odHjNJIs.js","assets/ChevronRight-CWeJn1iz.js","assets/bundle-avatar-DHwmIozH.js","assets/index.esm-CWepf7I_.js","assets/switch-control-BBlLGjaH.js","assets/simple-select-CqakAZFe.js","assets/appearance-DX7SoW1u.js","assets/audit-logs-D8H5E0fC.js","assets/index-m8CaSxXx.js","assets/index-D4PP6P2d.css","assets/relative-time-RQnsWZQc.js","assets/index-fWGZM-oP.js","assets/index-CmKAznDh.js","assets/list-BHs8uNT5.js","assets/index-D_wVtHmh.js","assets/traffic-CJDIGmp5.js","assets/LaunchOutlined-QHq-RUJt.js","assets/ChevronLeft-Dv7rlUf5.js","assets/index-BMSA5TdD.js","assets/vendor-mui-x-BjL1xCkk.js","assets/log-o_Cadt8j.js","assets/Download-DxhnUTM_.js","assets/log-D33dFtt_.css","assets/index-B4Q2DAdn.js","assets/Error-pXXvJFxN.js","assets/react-beautiful-dnd.esm-B9MfX9Xl.js","assets/raf-schd.esm-GV-XhwE0.js","assets/QuestionMarkCircle-Dt9XJWEe.js","assets/api-D9Yi7Zdr.js","assets/item-BSGXym2I.js","assets/Launch-BUTOr3cR.js","assets/config-navigation-DtN0_qFZ.js","assets/slicedToArray-BuQur6Mi.js","assets/index-CJCg9yIK.js","assets/index-CGK3FEjY.js","assets/use-mobile-CUT5hy9q.js","assets/connect-to-CzffwD9G.js","assets/config-space-DlwZewcm.js","assets/index-79U1RPaq.js","assets/index-C44fECmB.js","assets/component-1r0VSsqq.js","assets/add-component-core-CE0nArG4.js","assets/launch-result-message-ByEG8r_7.js","assets/page-header-Dm1v9v5q.js","assets/index-BVOYP6aR.js","assets/content-layout-7vu3yv_f.js","assets/add-component-core-D-IRi6XF.css","assets/analytics-BXLe73MI.js"])))=>i.map(i=>d[i]);
2
+ import{p as Xr,D as Yr,E as es,u as ts,H as ns,_ as M,R as rs}from"./vendor-arcblock-DvaaLvvM.js";import{a2 as H,j as o,E as m,aa as te,I as vt,aj as ss,ad as Rn,al as yt,ak as os,b3 as is,a3 as re,b4 as as,br as cs,T as z,bA as ls,bp as ln,bB as un,a4 as C,a5 as ze,bC as us,t as Q,$ as Ke,bD as ds,a6 as fs,bE as ps,ai as bt,bF as Pn,bG as hs,am as ms,ab as gs,bH as Dn,bI as An,bJ as $n,A as ae,b2 as On,bh as xs}from"./vendor-mui-core-DxqV1NVn.js";import{r as F,a$ as vs,aZ as jt,b0 as ys,B as wt,p as O,$ as dn,W as Y,u as J,am as bs,b1 as js,b2 as Mn,j as St,b3 as ws,f as Ss,Q as Ct,G as Cs,U as _s,C as Ue,b4 as Is,b5 as Es,aq as Ls}from"./vendor-ux-did-connect-Bciw9Ypu.js";import{A as Qe,f as B,h as ee,B as et,C as Ts,b as ks,D as Rs,E as Ps,F as Nn,G as Bn,v as fe,H as zn,I as Ds,o as we,J as As,K as $s,k as fn,g as Os,j as Ms,m as pn,l as Ns,n as Bs,L as Oe,e as Pe,M as zs,O as Us,Q as hn,N as Hs,c as mn}from"./index-BsUr7wGb.js";import{r as x,L as Un,k as Hn,u as Fs,l as Vs}from"./vendor-react-DoD83n6N.js";import{f as pe,v as qs}from"./vendor-hooks-sw5wvnca.js";import{y as _t,a9 as Ws,aa as Gs,z as Me,x as Ks}from"./vendor-utils-DR57WNxP.js";import{_ as gn}from"./useLocalStorage-Dd4pybDP.js";import{C as xn}from"./confirm-DmMN-34s.js";import{d as Qs}from"./PlayArrow-D7cGSxeN.js";import{g as vn}from"./get-safe-url-QFq5JNoE.js";import{f as It}from"./format-error-LAoTjvJe.js";import{i as Zs,u as Js,M as Xs,c as be,s as He,H as Ys,h as Fe,f as Fn,p as Vn,B as eo}from"./index-DyTFEgKr.js";import{u as qn}from"./session-6ZeN-aF2.js";import{D as to,_ as Wn}from"./useAsyncRetry-B7SbzXVI.js";import{d as no}from"./InfoOutlined-CEUhR4DY.js";import{_ as Gn}from"./useSetState-BL3ktMon.js";var Et={},ro=H;Object.defineProperty(Et,"__esModule",{value:!0});var Kn=Et.default=void 0,so=ro(F()),oo=o;Kn=Et.default=(0,so.default)((0,oo.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var Lt={},io=H;Object.defineProperty(Lt,"__esModule",{value:!0});var Qn=Lt.default=void 0,ao=io(F()),co=o;Qn=Lt.default=(0,ao.default)((0,co.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var Tt={},lo=H;Object.defineProperty(Tt,"__esModule",{value:!0});var Zn=Tt.default=void 0,uo=lo(F()),fo=o;Zn=Tt.default=(0,uo.default)((0,fo.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var kt={},po=H;Object.defineProperty(kt,"__esModule",{value:!0});var Jn=kt.default=void 0,ho=po(F()),mo=o;Jn=kt.default=(0,ho.default)((0,mo.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var Rt={},go=H;Object.defineProperty(Rt,"__esModule",{value:!0});var Xn=Rt.default=void 0,xo=go(F()),vo=o;Xn=Rt.default=(0,xo.default)((0,vo.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt");var Pt={},yo=H;Object.defineProperty(Pt,"__esModule",{value:!0});var Yn=Pt.default=void 0,bo=yo(F()),jo=o;Yn=Pt.default=(0,bo.default)((0,jo.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var Dt={},wo=H;Object.defineProperty(Dt,"__esModule",{value:!0});var er=Dt.default=void 0,So=wo(F()),Co=o;er=Dt.default=(0,So.default)((0,Co.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9"}),"NotInterested");var At=function(e){return o.jsx("svg",{...e,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.32989 8.20744C11.2787 6.82349 13.6098 6.08 16 6.08C18.3902 6.08 20.7213 6.82349 22.6701 8.20744C24.6189 9.59139 26.089 11.5473 26.8766 13.804C27.6642 16.0607 27.7304 18.5066 27.0659 20.8026C26.4419 22.9587 25.2026 24.8823 23.5044 26.3404H8.49555C6.79735 24.8823 5.55809 22.9587 4.9341 20.8026C4.26961 18.5066 4.33575 16.0607 5.12337 13.804C5.91098 11.5473 7.38107 9.59139 9.32989 8.20744ZM16 3.52C13.0786 3.52 10.2295 4.42871 7.84764 6.1202C5.46575 7.81169 3.66898 10.2022 2.70634 12.9604C1.7437 15.7187 1.66286 18.708 2.47501 21.5143C3.28717 24.3205 4.95211 26.8046 7.23909 28.6224C7.46554 28.8024 7.74628 28.9004 8.03554 28.9004H23.9644C24.2537 28.9004 24.5344 28.8024 24.7609 28.6224C27.0479 26.8046 28.7128 24.3205 29.5249 21.5143C30.3371 18.708 30.2563 15.7187 29.2936 12.9604C28.331 10.2022 26.5342 7.81169 24.1523 6.1202C21.7704 4.42871 18.9214 3.52 16 3.52ZM21.8829 13.5921C22.3827 13.0923 22.3827 12.2818 21.8829 11.7819C21.383 11.2821 20.5725 11.2821 20.0727 11.7819L17.868 13.9866C17.3072 13.7012 16.6724 13.5404 16 13.5404C13.7221 13.5404 11.8755 15.3869 11.8755 17.6648C11.8755 19.9427 13.7221 21.7892 16 21.7892C18.2779 21.7892 20.1244 19.9427 20.1244 17.6648C20.1244 16.9924 19.9635 16.3576 19.6782 15.7968L21.8829 13.5921ZM14.4355 17.6648C14.4355 16.8008 15.136 16.1004 16 16.1004C16.864 16.1004 17.5644 16.8008 17.5644 17.6648C17.5644 18.5288 16.864 19.2292 16 19.2292C15.136 19.2292 14.4355 18.5288 14.4355 17.6648Z",fill:"currentColor"})})};At.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};At.displayName="dashboard";var $t={},_o=H;Object.defineProperty($t,"__esModule",{value:!0});var tr=$t.default=void 0,Io=_o(F()),Eo=o;tr=$t.default=(0,Io.default)((0,Eo.jsx)("path",{d:"m18.25 7.6-5.5-3.18c-.46-.27-1.04-.27-1.5 0L5.75 7.6c-.46.27-.75.76-.75 1.3v6.35c0 .54.29 1.03.75 1.3l5.5 3.18c.46.27 1.04.27 1.5 0l5.5-3.18c.46-.27.75-.76.75-1.3V8.9c0-.54-.29-1.03-.75-1.3M7 14.96v-4.62l4 2.32v4.61zm5-4.03L8 8.61l4-2.31 4 2.31zm1 6.34v-4.61l4-2.32v4.62zM7 2H3.5C2.67 2 2 2.67 2 3.5V7h2V4h3zm10 0h3.5c.83 0 1.5.67 1.5 1.5V7h-2V4h-3zM7 22H3.5c-.83 0-1.5-.67-1.5-1.5V17h2v3h3zm10 0h3.5c.83 0 1.5-.67 1.5-1.5V17h-2v3h-3z"}),"ViewInAr");const de={Start:Qs,Stop:Kn,Restart:Qn,Reload:Zn,Remove:vs,Config:Jn,Log:Xn,Group:Yn,Cancel:er,Dashboard:At,Overview:tr},Lo=(e,t)=>{if(!e)return"";const n=new URL(e),r=new URLSearchParams(n.searchParams),s=new URL(_t(n.origin,t));return s.search=r.toString(),s.toString()},To="internal",ko="external";function Ot({blocklet:e,onStart:t,onComplete:n,variant:r,hasPermission:s,getComponentUrl:i,useBlockletUrlEvaluation:a,...c}){const l=Qe(),[d,u]=x.useState(null),[p,f]=x.useState(null),[g,w]=x.useState(!1),[h,S]=x.useState(null),{t:b}=x.useContext(jt),[T]=gn("skip-blocklet-setup",!1),{loading:I,recommendedUrl:R}=a(e),[D]=gn("blocklet-type-filter",To),j=B.isInProgress(e.status),[E,v]=x.useState(!1);x.useEffect(()=>{var P,U;if(!(e!=null&&e.controller))return;v(((U=(P=e==null?void 0:e.controller)==null?void 0:P.status)==null?void 0:U.value)===ee.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var q,X,oe;try{const W=await l.api.getLauncherSession({input:{launcherSessionId:(q=e==null?void 0:e.controller)==null?void 0:q.launcherSessionId,launcherUrl:(X=e==null?void 0:e.controller)==null?void 0:X.launcherUrl}});if(W!=null&&W.error){console.error("get launcher session failed",W.error);return}v([O.LAUNCH_SESSION_STATUS.overdue,O.LAUNCH_SESSION_STATUS.canceled,O.LAUNCH_SESSION_STATUS.terminated].includes((oe=W==null?void 0:W.launcherSession)==null?void 0:oe.status))}catch(W){console.error("call getLauncherSession error",W)}})()},[]);const{inService:_}=l,L=(y,P,U=!1)=>async()=>{const q=async Te=>{var Re;t({action:y,blocklet:e}),w(!0),f(y);let ke=!1;try{if(y==="remove")await P(Te);else if(y==="start"){if(!B.hasRunnableComponent(e)){Y.error(b("blocklet.noComponent"));return}if(!_&&!T&&!((Re=e.settings)!=null&&Re.initialized)&&e.mode!==ee.BLOCKLET_MODES.DEVELOPMENT){if(!R||!dn(R)){Y.error(b("blocklet.gotoVisitError"));return}const K=Ts(l.info),cn=new URL(R);cn.searchParams.set("serverUrl",K),window.open(vn(cn.href,{allowDomains:null})),n({action:y,blocklet:e});return}const ie=e.children.filter(K=>!B.isInProgress(K.status)&&K.status!=="running").map(K=>K.meta.did),ue={did:e.meta.did,componentDids:ie};await P({input:ue})}else if(["stop","restart","reload"].includes(y)){const ie=e.children.filter(K=>K.status==="running").map(K=>K.meta.did),ue={did:e.meta.did,componentDids:ie};await P({input:ue})}else{const ie={did:e.meta.did};await P({input:ie})}y==="remove"?ke=!0:await ks(1e3),y==="reload"&&Y.success(b("blocklet.reloadSuccess")),S(null),n({action:y,blocklet:e})}catch(ie){const ue=`Blocklet ${y} failed: ${It(ie)}`;throw n({action:y,blocklet:e,error:new Error(ue)}),new Error(ue)}finally{ke||w(!1)}},X=()=>{w(!1),S(null)},oe=B.getDisplayName(e,!0),W=e.mode===ee.BLOCKLET_MODES.DEVELOPMENT?{description:()=>o.jsx(z,{component:"div",children:o.jsx(z,{gutterBottom:!0,children:b("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(Te,ke)=>o.jsxs(z,{component:"div",children:[o.jsx(z,{gutterBottom:!0,children:b("blocklet.action.removeApplicationDescription")}),o.jsxs(ls,{name:"removeType",value:Te.removeType,onChange:Re=>ke({...Te,removeType:Re.target.value}),children:[o.jsx(ln,{value:"backup",control:o.jsx(un,{}),label:b("blocklet.action.removeApplicationAfterBackup")}),o.jsx(ln,{value:"complete",control:o.jsx(un,{}),label:b("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},Jr={stop:{title:`${b("common.stop")} ${oe}`,description:b("blocklet.action.stopDescription"),confirm:b("blocklet.action.confirmStop"),cancel:b("common.cancel"),onConfirm:q,onCancel:X},restart:{title:`${b("common.restart")} ${oe}`,description:b("blocklet.action.restartDescription"),confirm:b("blocklet.action.confirmRestart"),cancel:b("common.cancel"),onConfirm:q,onCancel:X},remove:{title:`${b("common.remove")} ${oe}`,confirm:b("blocklet.action.confirmRemove"),cancel:b("common.cancel"),onConfirm:q,onCancel:X,...W},cancelDownload:{title:`${b("common.cancel")}`,description:b("blocklet.action.cancelDownloadDescription",{name:oe}),confirm:b("common.confirm"),cancel:b("common.cancel"),onConfirm:q,onCancel:X}};U?S(Jr[y]):await q()},k=!!d,V=y=>{try{y.stopPropagation(),y.preventDefault()}catch{}u(y.currentTarget)},N=y=>{try{y.stopPropagation(),y.preventDefault()}catch{}u(null)},Ee=async(y,P)=>{try{P.stopPropagation(),P.preventDefault()}catch{}if(typeof y.handler=="function")try{w(!0),f(y.action),await y.handler()}catch(U){console.error(`Blocklet ${y.name} failed: `,U)}finally{w(!1),u(null)}else u(null)},Gr=!_&&B.isDeletableBlocklet(e)?{action:"remove",icon:de.Remove,name:b("common.remove"),handler:L("remove",async({removeType:y})=>{y==="backup"&&await l.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await l.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:j}:null,Kr={action:"remove",icon:({sx:y,...P})=>o.jsx(de.Cancel,{sx:{...y,paddingRight:"2px",zoom:.95},...P}),name:b("common.cancel"),handler:L("cancelDownload",l.api.cancelDownloadBlocklet,!0)},Qr=B.getAppMissingConfigs(e),Zr=()=>{var q;const y=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),P=i==null?void 0:i({mountPoint:y,blocklet:e});if(!P||!dn(P)){Y.error(b("blocklet.gotoVisitError"));return}const U=(q=e==null?void 0:e.site)==null?void 0:q.domainAliases;window.open(vn(Lo(P,".well-known/service/admin"),{allowDomains:U==null?void 0:U.map(X=>X.value)}))};let Le=[{action:"start",icon:de.Start,inExternal:!0,name:b("common.start"),handler:L("start",l.api.startBlocklet),disabled:E||e.children.every(y=>y.status==="running")||et(e.status)||I||j},{action:"stop",icon:de.Stop,inExternal:!0,name:b("common.stop"),handler:L("stop",l.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:de.Restart,name:b("common.restart"),handler:L("restart",l.api.restartBlocklet,!0),disabled:E||e.status!=="running"},et(e.status)?Kr:Gr,{separator:!0},_?null:{action:"dashboard",icon:({style:y,...P})=>o.jsx(de.Dashboard,{...P,style:{...y,width:"26px",height:"26px",paddingRight:"3px"}}),name:b("sidebar.dashboard"),handler:Zr}].filter(Boolean);return D===ko&&(Le=Le.filter(y=>y.inExternal)),r==="menu"?o.jsxs(yn,{"data-cy":"blocklet-actions",children:[o.jsx(vt,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:V,size:"small",disabled:!s||!et(e.status)&&g,children:o.jsx(ys,{})}),o.jsxs(ss,{id:"actions-menu",anchorEl:d,keepMounted:!0,open:k,onClose:N,PaperProps:{},children:[Qr.length>0&&o.jsxs(Rn,{style:{maxWidth:"400px"},severity:"error",children:[b("blocklet.config.missingRequired"),o.jsx("br",{}),o.jsx(Un,{to:`/blocklets/${e.meta.did}/components`,children:b("blocklet.config.gotoFix")})]}),Le.map((y,P)=>y.separator?o.jsx(yt,{},`separator-${P}`):o.jsxs(os,{dense:!0,onClick:U=>Ee(y,U),disabled:g||y.disabled,"data-cy":`${y.action}-blocklet`,children:[o.jsx(is,{style:{minWidth:24},children:p===y.action&&g?o.jsx(re,{size:16,sx:{marginRight:1}}):o.jsx(y.icon,{fontSize:"small"})}),o.jsx(as,{primary:y.name})]},y.name))]}),h&&o.jsx(xn,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]}):o.jsxs(yn,{"data-cy":"blocklet-actions",...c,children:[o.jsx(cs,{children:Le.filter(y=>!y.separator&&!y.onlyInMenu).map(y=>o.jsxs(wt,{title:y.name,"data-cy":`${y.action}-blocklet`,onClick:()=>Ee(y),disabled:!!y.disabled||g,children:[p===y.action&&g?o.jsx(re,{size:16,sx:{marginRight:1}}):o.jsx(y.icon,{}),o.jsx("span",{className:"blocklet-action-text",children:y.name})]},y.name))}),h&&o.jsx(xn,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]})}Ot.propTypes={getComponentUrl:m.func,blocklet:m.object.isRequired,onStart:m.func.isRequired,onComplete:m.func.isRequired,variant:m.oneOf(["menu","group"]),hasPermission:m.bool,useBlockletUrlEvaluation:m.func};Ot.defaultProps={getComponentUrl:null,variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e;return{loading:!1,recommendedUrl:(e=window==null?void 0:window.location)==null?void 0:e.href}}};const yn=te.div`
3
+ display: flex;
4
+ align-items: center;
5
+
6
+ @media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
7
+ .MuiButton-root {
8
+ padding: 4px;
9
+ font-size: 10px;
10
+ }
11
+ }
12
+ `,Ro=x.memo(Ot),Po=e=>{const t={};let n=null;return B.forEachBlockletSync(e,r=>{t[r.meta.bundleDid]?n=B.getDisplayName(r,!0):r.meta.bundleDid&&(t[r.meta.bundleDid]=!0)}),n},Do=(e,t,n)=>{var i;const{hostname:r,href:s}=e;if(!t)return s;if(n){const c=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!c)return s;const l=c[0],u=((((i=t.site)==null?void 0:i.domainAliases)||[]).map(p=>p.value).filter(Boolean).find(p=>p.endsWith(O.DEFAULT_DID_DOMAIN))||"").replace(`.${O.DEFAULT_DID_DOMAIN}`,"");return u?s.replace(r,`${u}-${l}.${O.DEFAULT_IP_DOMAIN_SUFFIX}`):s}return s.replace(t.meta.bundleDid,t.appPid)};function nr(){const{t:e}=J(),{api:t}=qn(),{blocklet:n}=Rs(),{inService:r}=Qe(),[s,i]=x.useState(!1),[a,c]=x.useState(5),l=n&&n.structVersion!==O.APP_STRUCT_VERSION,d=()=>{try{if(n.status==="running"){Y.error(e("blocklet.migrate.tip.running"));return}const f=Po(n);if(f){Y.error(e("blocklet.migrate.tip.duplicate",{name:f}));return}i(!0)}catch(f){Y.error(It(f))}},u=()=>{const f=Do(window.location,n,r);setTimeout(()=>{window.location.href=f},5e3),c(5),setInterval(()=>{c(g=>g-1)},1e3)},p=()=>i(!1);return[l&&o.jsxs(Rn,{severity:"warning",style:{margin:"12px 0"},children:[o.jsxs(C,{display:"flex",alignItems:"center",children:[o.jsx(wt,{variant:"contained",size:"small",color:"primary",onClick:()=>d(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),o.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(f=>o.jsx(C,{display:"flex",alignItems:"center",children:e(`blocklet.migrate.intro.${f}`)},f))]},"alert"),n&&o.jsx(bs,{popup:!0,open:s,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:5*60*1e3,onSuccess:u,extraParams:{appDid:n.appDid,did:n.meta.did,wt:Ps(n,!0),title:B.getDisplayName(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:a>=0?e("blocklet.migrate.success",{sec:a}):"Redirecting..."},onClose:p},"connect")]}nr.propTypes={};function Mt({children:e,style:t,...n}){return o.jsx(js,{style:t,...n,children:e})}Mt.propTypes={children:m.any.isRequired,style:m.object};Mt.defaultProps={style:{}};const A={yellow:"#FFCF71",grey:"#aaaaaa",reverse:"#444",success:"#3ab39d",running:"#34BE74",error:"#D0021B",primary:"#1DC1C7"};function Nt({isResource:e,status:t,variant:n,source:r,progress:s,...i}){const{t:a}=x.useContext(jt),c={added:"primary",waiting:"warning",downloading:"warning",extracting:"warning",downloaded:"primary",installing:"warning",installed:"primary",starting:"warning",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"warning",restarting:"warning",corrupted:"error",deleting:"warning",resource:"primary"},l={added:A.grey,waiting:A.yellow,downloading:A.yellow,extracting:A.yellow,downloaded:A.grey,installing:A.yellow,installed:A.grey,starting:A.yellow,running:A.running,stopping:A.yellow,stopped:A.reverse,error:A.error,upgrading:A.yellow,restarting:A.yellow,corrupted:A.error,deleting:A.yellow,resource:A.primary},d=B.isInProgress(t),u=e&&t==="stopped"?"resource":t,p=a(`blocklet.status.${u}`);return n==="pin"?o.jsx(ze,{title:a("blocklet.statusTip",{status:p}),children:o.jsxs(C,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",...i,children:[o.jsx(C,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:l[u],style:{opacity:.15}}),o.jsx(C,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:l[u]})]})}):n==="dot"?o.jsx(ze,{title:a("blocklet.statusTip",{status:p}),children:o.jsx(to,{color:l[u],...i})}):o.jsxs(Mt,{type:c[u],...i,children:[d&&o.jsx(re,{size:12,color:"inherit",style:{marginRight:5}}),p,u==="downloading"&&s?o.jsx("div",{style:{marginLeft:5},children:`${s} %`}):null]})}Nt.propTypes={status:m.string.isRequired,variant:m.oneOf(["dot","tag","pin"]),source:m.string,progress:m.number,isResource:m.bool};Nt.defaultProps={isResource:!1,variant:"tag",source:"",progress:0};const rr=x.createContext({});function Bt({children:e,type:t}){const[n,r]=x.useState([]),s=x.useRef([]),i=l=>{if(!s.current.includes(l)){const d=[...s.current,l];r(d),s.current=d}},a=l=>{if(s.current.includes(l)){const d=s.current.filter(u=>u!==l);r(d),s.current=d}},c=l=>{const d=n.filter(p=>l.find(f=>f===p));Ws(d,n).forEach(p=>a(p))};return o.jsx(rr.Provider,{value:{type:t,deletingBlocklets:n,addDeletingDid:i,removeDeletingDid:a,matchDeletingDid:c},children:e})}Bt.propTypes={type:m.string,children:m.node.isRequired};Bt.defaultProps={type:"blocklets"};function Dc(){return x.useContext(rr)}function Ao(){const e=us();return[...e.breakpoints.keys].reverse().reduce((n,r)=>{const s=Q(e.breakpoints.up(r));return!n&&s?r:n},null)||"xs"}function $o(e){return o.jsx(Ke,{...e,children:o.jsx("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z"})})}function Oo(e){return o.jsx(Ke,{...e,children:o.jsx("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"})})}function Mo(e){return o.jsx(Ke,{...e,children:o.jsx("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2, 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12, 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"})})}function No(e){return o.jsx(Ke,{...e,children:o.jsx("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12A10,10 0 0,0 12,2Z"})})}const De={fontSize:20,marginInlineEnd:8},Bo={success:o.jsx($o,{style:De}),warning:o.jsx(Oo,{style:De}),error:o.jsx(Mo,{style:De}),info:o.jsx(No,{style:De})},zo=ds(e=>{const t={xl:"400px",lg:"400px",md:"400px",sm:"300px"},n=e.palette.background.default;return{lessPadding:{paddingLeft:8*2.5},contentRoot:{...e.typography.body2,display:"flex",backgroundColor:n,color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},success:r=>({backgroundColor:`${fs[600]} !important`,width:t[r.breakpoint]}),error:r=>({backgroundColor:`${e.palette.error.dark} !important`,width:t[r.breakpoint]}),info:r=>({backgroundColor:`${e.palette.primary.main} !important`,width:t[r.breakpoint]}),warning:r=>({backgroundColor:`${ps[700]} !important`,width:t[r.breakpoint]}),icon:{fontSize:20},message:{display:"flex",alignItems:"center",padding:"8px 0",flex:1,width:0},action:{display:"flex",alignItems:"center",marginLeft:"auto",marginRight:-8,width:44}}});function zt({keyId:e,notification:t={},viewAllUrl:n,content:r},s){const i=zo({breakpoint:Ao()}),a=[i.contentRoot,i.lessPadding,i[t.severity]].join(" "),c=Bo[t.severity],{closeSnackbar:l}=Mn(),d=()=>l(e),u=Hn(),p=()=>{l(e),u(n)},f=pe(()=>Zs(t),[t]),g=pe(()=>t==null?void 0:t.activity,[t]),w=Js({activity:g,users:[t==null?void 0:t.actorInfo],extra:{linkColor:St.primaryBase}});return o.jsxs(ws,{ref:s,className:a,children:[o.jsxs("div",{className:i.message,children:[c,o.jsx(Ho,{onClick:p,style:{width:"calc(100% - 30px)"},children:o.jsx(C,{onClick:h=>h.stopPropagation(),children:f?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"title",children:w}),o.jsx(Xs,{meta:g.meta,type:g.type,sx:{display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:3,WebkitBoxOrient:"vertical",color:"#fff"}})]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"title",children:t.title}),r||o.jsx("span",{className:"desc",children:t.description})]})})})]}),o.jsx("div",{className:i.action,children:o.jsx(vt,{"aria-label":"close",color:"inherit",onClick:d,size:"large",children:o.jsx(Ss,{className:i.icon})},"close")})]})}const Uo=x.forwardRef(zt);zt.propTypes={viewAllUrl:m.string.isRequired,keyId:m.number.isRequired,notification:m.object.isRequired,content:m.node};zt.defaultProps={content:null};const Ho=te.div`
13
+ cursor: pointer;
14
+ display: flex;
15
+ flex-direction: column;
16
+ .title {
17
+ overflow: hidden;
18
+ text-overflow: ellipsis;
19
+ display: -webkit-box;
20
+ -webkit-line-clamp: 1;
21
+ -webkit-box-orient: vertical;
22
+ font-weight: bold;
23
+ }
24
+ .desc {
25
+ overflow: hidden;
26
+ text-overflow: ellipsis;
27
+ display: -webkit-box;
28
+ -webkit-line-clamp: 3;
29
+ -webkit-box-orient: vertical;
30
+ word-break: break-word;
31
+ }
32
+ `;function sr({attachment:e}){const{data:t}=e;let n="";try{n=new URL(t.url).host}catch{n=t.url}return o.jsxs(bt,{target:"_blank",rel:"noopener noreferrer",href:t.url,className:"link",style:{wordBreak:"break-all"},onClick:r=>{r.customPreventRedirect=!0},children:[!!n&&o.jsx("span",{className:"url",children:n}),!!t.title&&o.jsx(C,{className:"title",style:{whiteSpace:"unset"},children:t.title}),!!t.description&&o.jsx(C,{className:"description",style:{whiteSpace:"unset",color:"rgba(75, 85, 99, 1)"},children:t.description}),!!t.image&&o.jsx("img",{src:Nn.getImagePath(t.image),alt:t.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})]})}sr.propTypes={attachment:m.object.isRequired};function or({attachment:e}){const{data:t}=e;return o.jsx("img",{src:Nn.getImagePath(t.url),alt:t.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})}or.propTypes={attachment:m.object.isRequired};function Ut({attachment:e,...t}){var c;const{data:n}=e,r=((c=n.color)==null?void 0:c.toLowerCase())||t.color,s=n.size||t.size,i=n.fontWeight||t.fontWeight||400;let a="14px";return s==="small"?a="12px":s==="normal"?a="14px":s==="big"?a="16px":s==="large"&&(a="18px"),o.jsx("span",{className:"title",style:{fontSize:a,color:r,whiteSpace:"unset",fontWeight:i},children:n.text})}Ut.propTypes={attachment:m.object.isRequired};Ht.propTypes={locale:m.string,data:m.object.isRequired};Ht.defaultProps={locale:"en"};function Ht({locale:e="en",data:t}){const n={zh:"来自",en:"from"}[e]||"from",r={zh:"接收",en:"Received"}[e]||"Received",i=`https://${be.getUrlHost(t.chainHost)||be.getChainHost(t.chainId)}/explorer/tokens/${t.address}/tx`;let a=t.amount;t.decimal&&(a=t.amount/10**t.decimal);const c=pe(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return o.jsx("a",{href:i,target:"_blank",rel:"noreferrer",onClick:l=>{l.customPreventRedirect=!0},children:o.jsxs(C,{display:"flex",flexDirection:"column",children:[o.jsxs(C,{sx:c,children:[o.jsx(z,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:r}),o.jsxs(z,{component:"div",align:"right",style:He.summaryStyle,flex:1,children:["+",a," ",t.symbol]})]}),o.jsxs(C,{sx:c,children:[o.jsx(z,{component:"div",style:{...He.remarkStyle,fontSize:14},children:n}),o.jsx(C,{sx:{maxWidth:"252px",fontSize:"14px"},children:o.jsx(Ct,{did:t.address,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]})]})})}Ft.propTypes={locale:m.string,data:m.object.isRequired};Ft.defaultProps={locale:"en"};function Ft({locale:e,data:t}){var l,d;const n={zh:"接收",en:"Received"}[e]||"Received",r={zh:"来自",en:"from"}[e]||"from",s=be.getUrlHost(t.chainHost)||be.getChainHost(t.chainId),i=t.did||((d=(l=t==null?void 0:t.credential)==null?void 0:l.issuer)==null?void 0:d.id)||"",a=`https://${s}/explorer/assets/${i}`,c=pe(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return o.jsx(C,{sx:{pr:1},children:o.jsx("a",{href:a,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block"},onClick:u=>{u.customPreventRedirect=!0},rel:"noreferrer",children:o.jsxs(C,{display:"flex",flexDirection:"column",children:[o.jsxs(C,{sx:c,children:[o.jsx(z,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:n}),o.jsx(z,{component:"div",align:"right",style:He.summaryStyle,children:"+1 Asset"})]}),i?o.jsxs(C,{sx:c,children:[o.jsx(z,{component:"div",style:{...He.remarkStyle,fontSize:14},children:r}),o.jsx(C,{sx:{maxWidth:"252px",fontSize:"14px"},children:o.jsx(Ct,{did:i,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]}):null]})})})}ir.propTypes={data:m.object.isRequired,locale:m.string};function ir({data:e,locale:t="en"}){return o.jsxs("a",{href:e.url,target:"_blank",style:{display:"flex",textDecoration:"none",color:"initial"},onClick:n=>{n.customPreventRedirect=!0},rel:"noreferrer",children:[o.jsx("img",{className:"image",src:e.logo,width:50,height:50,alt:""}),o.jsxs("div",{style:{flex:1,marginLeft:"10px"},children:[o.jsx("div",{style:{marginBottom:"6px"},children:e.title}),o.jsx("div",{style:{color:"#a5a5a5",fontSize:10,maxWidth:"252px"},children:o.jsx(Ct,{did:e.appDID,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:t})})]})]})}Vt.propTypes={locale:m.string,data:m.object.isRequired};Vt.defaultProps={locale:"en"};function Vt({locale:e,data:t}){const n=be.getChainHost(t.chainId),r=`https://${n}/explorer/txs/${t.hash}`,s={zh:"交易详情",en:"Transaction Details"}[e]||"Transaction Details",i={zh:"交易哈希",en:"Transaction Hash"}[e]||"Transaction Hash";return o.jsxs("a",{href:r,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block",fontSize:14},onClick:a=>{a.customPreventRedirect=!0},rel:"noreferrer",children:[o.jsx("h6",{style:{color:"#a5a5a5",margin:0},children:n}),o.jsx("p",{style:{color:"#4598fa",margin:0},children:s}),o.jsxs("div",{style:{wordBreak:"break-all"},children:[i,": ",t.hash]})]})}function ar({data:e,isMd:t=!1}){return o.jsx(C,{display:"flex",flexDirection:t?"row":"column",justifyContent:"space-between",sx:{width:t?"100%":"auto",flexWrap:"nowrap",gap:1},children:e.items.map((n,r)=>o.jsx(Ut,{attachment:n,color:r===0?"rgba(156, 163, 175, 1)":"",size:r===0?"normal":"big",fontWeight:r===0?400:600,sx:Cs(r===0?{flexShrink:0}:{flex:1})},r))})}ar.propTypes={data:m.array.isRequired,isMd:m.bool};function cr({attachment:e,...t}){const{local:n}=x.useContext(jt),r=Q(s=>s.breakpoints.down("md"));return o.jsxs(Fo,{"data-testid":"attachment-preview",...t,isMd:r,children:[e.type==="link"&&o.jsx(sr,{attachment:e,...t,isMd:r}),e.type==="image"&&o.jsx(or,{attachment:e,isMd:r}),e.type==="text"&&o.jsx(Ut,{attachment:e,isMd:r}),e.type==="token"&&o.jsx(Ht,{data:e.data,local:n,isMd:r}),e.type==="asset"||e.type==="vc"?o.jsx(Ft,{data:e.data,local:n,isMd:r}):null,e.type==="dapp"&&o.jsx(ir,{data:e.data,local:n,isMd:r}),e.type==="transaction"&&o.jsx(Vt,{data:e.data,local:n,...t,isMd:r}),e.type==="divider"&&o.jsx(yt,{sx:{mb:1,mt:1},style:{color:St.dividerColor}}),e.type==="combined"&&o.jsx(ar,{data:e,isMd:r})]})}const Fo=te.div`
33
+ display: ${({sx:e={}})=>e.display||"flex"};
34
+ flex-direction: ${({sx:e={}})=>e.flexDirection||"column"};
35
+ gap: ${({sx:e={}})=>e.gap||1};
36
+ width: ${({isMd:e=!1})=>e?"100%":"auto"};
37
+ &:last-child {
38
+ margin-bottom: 0;
39
+ }
40
+ `;cr.propTypes={attachment:m.object.isRequired};function lr({data:e,...t}){const{items:n}=e;return o.jsx(Vo,{...t,children:n.map(r=>o.jsxs(Pn,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128},children:[o.jsxs(C,{display:"flex",alignItems:"center",gap:1,children:[r.icon?o.jsx("img",{src:r.icon,alt:r.title,style:{width:16,height:16}}):null,o.jsxs(C,{className:"metric-name",display:"flex",alignItems:"center",children:[r.title,r.subtitle?o.jsx(ze,{title:r.subtitle,arrow:!0,placement:"top",children:o.jsx(no,{fontSize:"small",sx:{fontSize:14,ml:.5}})}):null]})]}),o.jsxs(C,{className:"metric-number",sx:{color:r.content_color||"rgba(3, 7, 18, 1)"},children:[r.content,r.sub_content?o.jsxs("span",{className:"sub-content",style:{color:r.sub_content_color||"rgba(156, 163, 175, 1)"},children:["(",r.sub_content,")"]}):null]})]},r.title))})}const Vo=te(C)`
41
+ display: flex;
42
+ justify-content: flex-start;
43
+ flex-wrap: wrap;
44
+ gap: 16px;
45
+ .metric-number {
46
+ font-size: 18px;
47
+ font-weight: 600;
48
+ .sub-content {
49
+ font-size: 12px;
50
+ font-weight: 400;
51
+ margin-left: 4px;
52
+ }
53
+ }
54
+ .metric-name {
55
+ font-size: 14px;
56
+ color: rgba(156, 163, 175, 1);
57
+ }
58
+ `;lr.propTypes={data:m.object.isRequired};function ur({data:e}){const{items:t}=e,n=Q(a=>a.breakpoints.down("sm")),r=Q(a=>a.breakpoints.down("md")),s=Q(a=>a.breakpoints.down("lg")),i=()=>n?1:r?3:s?4:6;return o.jsx(hs,{variant:"quilted",cols:i(),gap:8,rowHeight:128,sx:{margin:0},children:t.map(a=>{const c=a.cover||a.display;return c?o.jsx("a",{href:a.link,target:"_blank",rel:"noopener noreferrer",children:o.jsx(ms,{children:o.jsx("img",{src:c,alt:a.title||"",style:{borderRadius:"8px"}})})},c):null})})}ur.propTypes={data:m.object.isRequired};function qt({data:e,feedType:t,...n}){return o.jsxs(qo,{...n,children:[t==="data-tracker"&&e.type==="table"&&o.jsx(lr,{data:e}),(t==="graphic"||t==="gallery")&&o.jsx(ur,{data:e})]})}const qo=te.div`
59
+ display: flex;
60
+ flex-direction: column;
61
+ width: 100%;
62
+ margin-bottom: 4px;
63
+ &:last-child {
64
+ margin-bottom: 0;
65
+ }
66
+ `;qt.propTypes={data:m.object.isRequired,feedType:m.string};qt.defaultProps={feedType:"data-tracker"};const Wo=e=>{let t="rgba(0, 0, 0, 0.12)";return e==="warning"?t="#DE9E37":e==="error"?t="#F16E6E":t="rgba(0, 0, 0, 0.12)",t},Go=e=>e.every(t=>t.type==="text"),Ko=e=>e.every(t=>t.type==="image"),Qo=e=>Gs(e,2).map(t=>({type:"combined",items:t})).filter(t=>(t.items||[]).every(n=>{var r,s,i;return(i=(s=(r=n==null?void 0:n.data)==null?void 0:r.text)==null?void 0:s.trim)==null?void 0:i.call(s)})),Zo=e=>{if(!e.length||e.length<=1)return!1;const t=e[0].type;return e.every(n=>n.type===t)},Jo=async(e,t)=>{const r=new _s().user;if(r)try{return await r.getUserPublicInfo({did:e})?await r.getProfileUrl({did:e,locale:t}):void 0}catch(s){console.error(s);return}};function Wt({notification:e,severity:t,showSke:n=!0}){const{attachments:r,data:s,...i}=e,a=Q(u=>u.breakpoints.down("md"));if((!r||!r.length)&&Me(s))return null;const c=Wo(t),l=(u,p=!1)=>{if(!u&&!Array.isArray(u))return null;let f=u,g={},w="horizontal";p&&Go(u)&&(f=Qo(u),w="vertical",g={display:"flex",gap:8,flexDirection:"row",justifyContent:"flex-start",flexWrap:"wrap",height:"100%"});const h=Zo(f);return o.jsx(C,{sx:{width:"100%",display:"flex",gap:1,flexDirection:p?"row":"column",justifyContent:"flex-start",alignItems:p?"center":"unset",flexWrap:"wrap"},children:f.map((S,b)=>S.type==="section"?o.jsx(x.Fragment,{children:l(S.fields,!0)},b):o.jsxs(x.Fragment,{children:[o.jsx(cr,{attachment:S,sx:g,...i}),!(a&&w==="vertical")&&h&&f.length>1&&b!==f.length-1?o.jsx(yt,{orientation:w,style:{color:St.dividerColor},sx:w==="vertical"?{ml:2,mr:2,height:32}:{}}):null]},b))})},d=Ko(r);return o.jsx(Xo,{children:o.jsxs("div",{className:"message-in-list",children:[r.length>0&&o.jsx("div",{className:"message-container",style:a?{width:"100%"}:{},children:d?l(r):o.jsx(Pn,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128,borderColor:c},children:l(r)})}),!Me(s)&&o.jsx("div",{className:"message-container",children:o.jsx("div",{className:"data-container",children:o.jsx(qt,{data:s,feedType:e.feedType})})}),r.length===0&&Me(s)&&n&&o.jsx(gs,{className:"attach-ske",style:{marginTop:10},variant:"rectangular",height:150})]})})}const Xo=te.div`
67
+ display: flex;
68
+ flex-direction: column;
69
+ .message-in-list {
70
+ padding: 8px 8px 8px 0;
71
+ display: flex;
72
+ border-radius: 8px;
73
+ }
74
+ .message-title {
75
+ color: #25292f;
76
+ font-size: 18px;
77
+ font-weight: bold;
78
+ word-break: break-all;
79
+ }
80
+
81
+ .attach-ske {
82
+ position: relative;
83
+ margin-left: 10px;
84
+ &::after {
85
+ content: '';
86
+ position: absolute;
87
+ left: -10px;
88
+ top: 0;
89
+ height: 100%;
90
+ width: 4px;
91
+ background-color: ${e=>e.leftLineColor};
92
+ }
93
+ }
94
+
95
+ .message-body {
96
+ color: #25292f;
97
+ font-size: 16px;
98
+ word-break: break-all;
99
+ white-space: pre-line;
100
+ }
101
+ .message-container {
102
+ display: flex;
103
+ flex-direction: column;
104
+ justify-content: flex-start;
105
+ .data-container,
106
+ .attachment-container {
107
+ display: flex;
108
+ flex-direction: column;
109
+ width: 100%;
110
+ }
111
+ }
112
+ .actions-container {
113
+ margin-top: 10px;
114
+ .actions-item {
115
+ margin-right: 8px;
116
+ }
117
+ }
118
+ `;Wt.propTypes={severity:m.string.isRequired,notification:m.object.isRequired,showSke:m.bool};Wt.defaultProps={showSke:!0};const tt=e=>Xr.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),Yo=async(e,t)=>{const{type:n,did:r}=e;return Fn.isSameAddr(n,"did")?await Jo(r,t)||Fe.getLink(e):Fe.getLink(e)},ei=async(e,t,n=!0)=>{const r=Fe.toTextList(e);return await Promise.all(r.map(async i=>{if(i instanceof Fe.Link){if(n){const a=await Yo(i,t),{type:c,chainId:l,did:d}=i;return Fn.isSameAddr(c,"dapp")?`<em style="font-weight:bold;" data-type="${c}" data-chain-id="${l}" data-did="${d}">${i.text}</em>`:a?`<a target="_blank" rel="noopener noreferrer" style="color:#4598fa;font-weight:bold;" href="${a}">${i.text}</a>`:`<em style="font-weight:bold;" data-type="${c}" data-chain-id="${l}" data-did="${d}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))};dr.propTypes={notification:m.object,rows:m.number,minimal:m.bool};function dr({notification:e,rows:t=2,minimal:n=!1}){const[r,s]=x.useState(!1),[i,a]=x.useState(""),{t:c,locale:l}=J(),d=x.useMemo(()=>{const{attachments:S}=e||{};if(!S)return!1;try{return S.length>0}catch{return!1}},[e]),u=x.useMemo(()=>{const{blocks:S}=e||{};if(!S)return!1;try{return S.length>0}catch{return!1}},[e]),p=x.useMemo(()=>{const{description:S}=e||{};return!!S},[e]),f=x.useMemo(()=>{const{data:S}=e||{};return!Me(S)},[e]),g=x.useMemo(()=>d||u||p||f,[d,u,p,f]);if(x.useEffect(()=>{ei((e==null?void 0:e.description)??"",l).then(S=>{a(S)})},[e==null?void 0:e.description,l]),!g)return null;const w=()=>t===0?"":r?`<span class='toggle-btn' data-name='toggle-expanded'>${c("common.collapse")}</span>`:`...<span class='toggle-btn' data-name='toggle-expanded'>${c("common.expand")}</span>`,h=S=>{const{target:b}=S;b.getAttribute("data-name")==="toggle-expanded"&&(s(!r),S.customPreventRedirect=!0)};return o.jsxs(ti,{color:n?"#fff":"",children:[o.jsx(C,{className:"text-container",component:"div",onClick:h,children:i&&(!r&&t>0?o.jsx(Ys,{basedOn:"letters",unsafeHTML:tt(i),maxLine:t,ellipsisHTML:tt(w())}):o.jsx(z,{component:"div",className:`content ${t===0?"ellipsis":""}`,style:{whiteSpace:"pre-line!important"},dangerouslySetInnerHTML:{__html:tt(`${i}${w()}`)}}))}),!n&&(d||f)?o.jsx(Wt,{severity:e.severity,notification:e}):null]})}const ti=te(C)`
119
+ width: 100%;
120
+ color: ${e=>e.color?e.color:"rgba(75, 85, 99, 1)"};
121
+ .text-container {
122
+ word-wrap: break-word;
123
+ word-break: break-all;
124
+ color: ${e=>e.color?e.color:"rgba(75, 85, 99, 1)"};
125
+ .toggle-btn {
126
+ display: inline-block;
127
+ white-space: nowrap;
128
+ cursor: pointer;
129
+ margin-left: 4px;
130
+ color: rgba(59, 130, 246, 1);
131
+ }
132
+ .content.ellipsis {
133
+ overflow: hidden;
134
+ text-overflow: ellipsis;
135
+ word-break: break-all;
136
+ display: block;
137
+ display: -webkit-box;
138
+ -webkit-box-orient: vertical;
139
+ -webkit-line-clamp: 2;
140
+ }
141
+ }
142
+ `,ni=x.memo(dr);function $(e,t,n){return Dn.call(t,"css")?o.jsx(An,$n(e,t),n):o.jsx(e,t,n)}function nt(e,t,n){return Dn.call(t,"css")?o.jsxs(An,$n(e,t),n):o.jsxs(e,t,n)}/**
143
+ * (c) Iconify
144
+ *
145
+ * For the full copyright and license information, please view the license.txt or license.gpl.txt
146
+ * files at https://github.com/iconify/iconify
147
+ *
148
+ * Licensed under MIT.
149
+ *
150
+ * @license MIT
151
+ * @version 3.1.1
152
+ */const fr=Object.freeze({left:0,top:0,width:16,height:16}),Ve=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Se=Object.freeze({...fr,...Ve}),it=Object.freeze({...Se,body:"",hidden:!1});function ri(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function bn(e,t){const n=ri(e,t);for(const r in it)r in Ve?r in e&&!(r in n)&&(n[r]=Ve[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function si(e,t){const n=e.icons,r=e.aliases||Object.create(null),s=Object.create(null);function i(a){if(n[a])return s[a]=[];if(!(a in s)){s[a]=null;const c=r[a]&&r[a].parent,l=c&&i(c);l&&(s[a]=[c].concat(l))}return s[a]}return Object.keys(n).concat(Object.keys(r)).forEach(i),s}function oi(e,t,n){const r=e.icons,s=e.aliases||Object.create(null);let i={};function a(c){i=bn(r[c]||s[c],i)}return a(t),n.forEach(a),bn(e,i)}function ii(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(s=>{t(s,null),n.push(s)});const r=si(e);for(const s in r){const i=r[s];i&&(t(s,oi(e,s,i)),n.push(s))}return n}const xe=/^[a-z0-9]+(-[a-z0-9]+)*$/,me=(e,t,n,r="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;r=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const c=s.pop(),l=s.pop(),d={provider:s.length>0?s[0]:r,prefix:l,name:c};return t&&!Ne(d)?null:d}const i=s[0],a=i.split("-");if(a.length>1){const c={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!Ne(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:i};return t&&!Ne(c,n)?null:c}return null},Ne=(e,t)=>e?!!((e.provider===""||e.provider.match(xe))&&(t&&e.prefix===""||e.prefix.match(xe))&&e.name.match(xe)):!1,ai={provider:"",aliases:{},not_found:{},...fr};function rt(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function ci(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!rt(e,ai))return null;const n=t.icons;for(const s in n){const i=n[s];if(!s.match(xe)||typeof i.body!="string"||!rt(i,it))return null}const r=t.aliases||Object.create(null);for(const s in r){const i=r[s],a=i.parent;if(!s.match(xe)||typeof a!="string"||!n[a]&&!r[a]||!rt(i,it))return null}return t}const qe=Object.create(null);function li(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Z(e,t){const n=qe[e]||(qe[e]=Object.create(null));return n[t]||(n[t]=li(e,t))}function Gt(e,t){return ci(t)?ii(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function ui(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function di(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(qe)).forEach(s=>{(typeof s=="string"&&typeof t=="string"?[t]:Object.keys(qe[s]||{})).forEach(a=>{const c=Z(s,a);n=n.concat(Object.keys(c.icons).map(l=>(s!==""?"@"+s+":":"")+a+":"+l))})}),n}let Kt=!1;function fi(e){return Kt}function Ce(e){const t=typeof e=="string"?me(e,!0,Kt):e;if(t){const n=Z(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function pi(e,t){const n=me(e,!0,Kt);if(!n)return!1;const r=Z(n.provider,n.prefix);return ui(r,n.name,t)}function pr(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const n=e.prefix;if(!Ne({provider:t,prefix:n,name:"a"}))return!1;const r=Z(t,n);return!!Gt(r,e)}function hi(e){return!!Ce(e)}function mi(e){const t=Ce(e);return t?{...Se,...t}:null}const hr=Object.freeze({width:null,height:null}),mr=Object.freeze({...hr,...Ve}),gi=/(-?[0-9.]*[0-9]+[0-9.]*)/g,xi=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function at(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(gi);if(r===null||!r.length)return e;const s=[];let i=r.shift(),a=xi.test(i);for(;;){if(a){const c=parseFloat(i);isNaN(c)?s.push(i):s.push(Math.ceil(c*t*n)/n)}else s.push(i);if(i=r.shift(),i===void 0)return s.join("");a=!a}}const vi=e=>e==="unset"||e==="undefined"||e==="none";function Ze(e,t){const n={...Se,...e},r={...mr,...t},s={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,r].forEach(w=>{const h=[],S=w.hFlip,b=w.vFlip;let T=w.rotate;S?b?T+=2:(h.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),h.push("scale(-1 1)"),s.top=s.left=0):b&&(h.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),h.push("scale(1 -1)"),s.top=s.left=0);let I;switch(T<0&&(T-=Math.floor(T/4)*4),T=T%4,T){case 1:I=s.height/2+s.top,h.unshift("rotate(90 "+I.toString()+" "+I.toString()+")");break;case 2:h.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:I=s.width/2+s.left,h.unshift("rotate(-90 "+I.toString()+" "+I.toString()+")");break}T%2===1&&(s.left!==s.top&&(I=s.left,s.left=s.top,s.top=I),s.width!==s.height&&(I=s.width,s.width=s.height,s.height=I)),h.length&&(i='<g transform="'+h.join(" ")+'">'+i+"</g>")});const a=r.width,c=r.height,l=s.width,d=s.height;let u,p;a===null?(p=c===null?"1em":c==="auto"?d:c,u=at(p,l/d)):(u=a==="auto"?l:a,p=c===null?at(u,d/l):c==="auto"?d:c);const f={},g=(w,h)=>{vi(h)||(f[w]=h.toString())};return g("width",u),g("height",p),f.viewBox=s.left.toString()+" "+s.top.toString()+" "+l.toString()+" "+d.toString(),{attributes:f,body:i}}const yi=/\sid="(\S+)"/g,bi="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let ji=0;function gr(e,t=bi){const n=[];let r;for(;r=yi.exec(e);)n.push(r[1]);if(!n.length)return e;const s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(i=>{const a=typeof t=="function"?t(i):t+(ji++).toString(),c=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+a+s+"$3")}),e=e.replace(new RegExp(s,"g"),""),e}const ce={local:!0,session:!0},xr={local:new Set,session:new Set};let Qt=!1;function wi(e){Qt=e}const jn="iconify2",je="iconify",vr=je+"-count",wn=je+"-version",yr=36e5,Si=168;function ct(e,t){try{return e.getItem(t)}catch{}}function Zt(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Sn(e,t){try{e.removeItem(t)}catch{}}function lt(e,t){return Zt(e,vr,t.toString())}function ut(e){return parseInt(ct(e,vr))||0}let Ae=typeof window>"u"?{}:window;function br(e){const t=e+"Storage";try{if(Ae&&Ae[t]&&typeof Ae[t].length=="number")return Ae[t]}catch{}ce[e]=!1}function jr(e,t){const n=br(e);if(!n)return;const r=ct(n,wn);if(r!==jn){if(r){const c=ut(n);for(let l=0;l<c;l++)Sn(n,je+l.toString())}Zt(n,wn,jn),lt(n,0);return}const s=Math.floor(Date.now()/yr)-Si,i=c=>{const l=je+c.toString(),d=ct(n,l);if(typeof d=="string"){try{const u=JSON.parse(d);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>s&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&t(u,c))return!0}catch{}Sn(n,l)}};let a=ut(n);for(let c=a-1;c>=0;c--)i(c)||(c===a-1?(a--,lt(n,a)):xr[e].add(c))}function wr(){if(!Qt){wi(!0);for(const e in ce)jr(e,t=>{const n=t.data,r=t.provider,s=n.prefix,i=Z(r,s);if(!Gt(i,n).length)return!1;const a=n.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,a):a,!0})}}function Sr(e,t){switch(e){case"local":case"session":ce[e]=t;break;case"all":for(const n in ce)ce[n]=t;break}}const dt=Object.create(null);function Cr(e,t){dt[e]=t}function ft(e){return dt[e]||dt[""]}function Jt(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Je=Object.create(null),ge=["https://api.simplesvg.com","https://api.unisvg.com"],Be=[];for(;ge.length>0;)ge.length===1||Math.random()>.5?Be.push(ge.shift()):Be.push(ge.pop());Je[""]=Jt({resources:["https://api.iconify.design"].concat(Be)});function _r(e,t){const n=Jt(t);return n===null?!1:(Je[e]=n,!0)}function Xe(e){return Je[e]}function Ci(){return Object.keys(Je)}const _i=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let We=_i();function Ii(e){We=e}function Ei(){return We}function Li(e,t){const n=Xe(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let s=0;n.resources.forEach(a=>{s=Math.max(s,a.length)});const i=t+".json?icons=";r=n.maxURL-s-n.path.length-i.length}return r}function Ti(e){return e===404}const ki=(e,t,n)=>{const r=[],s=Li(e,t),i="icons";let a={type:i,provider:e,prefix:t,icons:[]},c=0;return n.forEach((l,d)=>{c+=l.length+1,c>=s&&d>0&&(r.push(a),a={type:i,provider:e,prefix:t,icons:[]},c=l.length),a.icons.push(l)}),r.push(a),r};function Ri(e){if(typeof e=="string"){const t=Xe(e);if(t)return t.path}return"/"}const Pi=(e,t,n)=>{if(!We){n("abort",424);return}let r=Ri(t.provider);switch(t.type){case"icons":{const i=t.prefix,c=t.icons.join(","),l=new URLSearchParams({icons:c});r+=i+".json?"+l.toString();break}case"custom":{const i=t.uri;r+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let s=503;We(e+r).then(i=>{const a=i.status;if(a!==200){setTimeout(()=>{n(Ti(a)?"abort":"next",a)});return}return s=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?n("abort",i):n("next",s)});return}setTimeout(()=>{n("success",i)})}).catch(()=>{n("next",s)})},Di={prepare:ki,send:Pi};function Ai(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((s,i)=>s.provider!==i.provider?s.provider.localeCompare(i.provider):s.prefix!==i.prefix?s.prefix.localeCompare(i.prefix):s.name.localeCompare(i.name));let r={provider:"",prefix:"",name:""};return e.forEach(s=>{if(r.name===s.name&&r.prefix===s.prefix&&r.provider===s.provider)return;r=s;const i=s.provider,a=s.prefix,c=s.name,l=n[i]||(n[i]=Object.create(null)),d=l[a]||(l[a]=Z(i,a));let u;c in d.icons?u=t.loaded:a===""||d.missing.has(c)?u=t.missing:u=t.pending;const p={provider:i,prefix:a,name:c};u.push(p)}),t}function Ir(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(s=>s.id!==t))})}function $i(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,s=e.prefix;t.forEach(i=>{const a=i.icons,c=a.pending.length;a.pending=a.pending.filter(l=>{if(l.prefix!==s)return!0;const d=l.name;if(e.icons[d])a.loaded.push({provider:r,prefix:s,name:d});else if(e.missing.has(d))a.missing.push({provider:r,prefix:s,name:d});else return n=!0,!0;return!1}),a.pending.length!==c&&(n||Ir([e],i.id),i.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),i.abort))})}))}let Oi=0;function Mi(e,t,n){const r=Oi++,s=Ir.bind(null,n,r);if(!t.pending.length)return s;const i={id:r,icons:t,callback:e,abort:s};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(i)}),s}function Ni(e,t=!0,n=!1){const r=[];return e.forEach(s=>{const i=typeof s=="string"?me(s,t,n):s;i&&r.push(i)}),r}var Bi={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function zi(e,t,n,r){const s=e.resources.length,i=e.random?Math.floor(Math.random()*s):e.index;let a;if(e.random){let j=e.resources.slice(0);for(a=[];j.length>1;){const E=Math.floor(Math.random()*j.length);a.push(j[E]),j=j.slice(0,E).concat(j.slice(E+1))}a=a.concat(j)}else a=e.resources.slice(i).concat(e.resources.slice(0,i));const c=Date.now();let l="pending",d=0,u,p=null,f=[],g=[];typeof r=="function"&&g.push(r);function w(){p&&(clearTimeout(p),p=null)}function h(){l==="pending"&&(l="aborted"),w(),f.forEach(j=>{j.status==="pending"&&(j.status="aborted")}),f=[]}function S(j,E){E&&(g=[]),typeof j=="function"&&g.push(j)}function b(){return{startTime:c,payload:t,status:l,queriesSent:d,queriesPending:f.length,subscribe:S,abort:h}}function T(){l="failed",g.forEach(j=>{j(void 0,u)})}function I(){f.forEach(j=>{j.status==="pending"&&(j.status="aborted")}),f=[]}function R(j,E,v){const _=E!=="success";switch(f=f.filter(L=>L!==j),l){case"pending":break;case"failed":if(_||!e.dataAfterTimeout)return;break;default:return}if(E==="abort"){u=v,T();return}if(_){u=v,f.length||(a.length?D():T());return}if(w(),I(),!e.random){const L=e.resources.indexOf(j.resource);L!==-1&&L!==e.index&&(e.index=L)}l="completed",g.forEach(L=>{L(v)})}function D(){if(l!=="pending")return;w();const j=a.shift();if(j===void 0){if(f.length){p=setTimeout(()=>{w(),l==="pending"&&(I(),T())},e.timeout);return}T();return}const E={status:"pending",resource:j,callback:(v,_)=>{R(E,v,_)}};f.push(E),d++,p=setTimeout(D,e.rotate),n(j,t,E.callback)}return setTimeout(D),b}function Er(e){const t={...Bi,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function s(c,l,d){const u=zi(t,c,l,(p,f)=>{r(),d&&d(p,f)});return n.push(u),u}function i(c){return n.find(l=>c(l))||null}return{query:s,find:i,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function Cn(){}const st=Object.create(null);function Ui(e){if(!st[e]){const t=Xe(e);if(!t)return;const n=Er(t),r={config:t,redundancy:n};st[e]=r}return st[e]}function Lr(e,t,n){let r,s;if(typeof e=="string"){const i=ft(e);if(!i)return n(void 0,424),Cn;s=i.send;const a=Ui(e);a&&(r=a.redundancy)}else{const i=Jt(e);if(i){r=Er(i);const a=e.resources?e.resources[0]:"",c=ft(a);c&&(s=c.send)}}return!r||!s?(n(void 0,424),Cn):r.query(t,s,n)().abort}function Hi(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in ce)jr(r,s=>{const i=s.data;return s.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===t});return!0}function Fi(e,t){Qt||wr();function n(r){let s;if(!ce[r]||!(s=br(r)))return;const i=xr[r];let a;if(i.size)i.delete(a=Array.from(i).shift());else if(a=ut(s),!lt(s,a+1))return;const c={cached:Math.floor(Date.now()/yr),provider:e.provider,data:t};return Zt(s,je+a.toString(),JSON.stringify(c))}t.lastModified&&!Hi(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function _n(){}function Vi(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,$i(e)}))}function qi(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,s=e.iconsToLoad;delete e.iconsToLoad;let i;if(!s||!(i=ft(n)))return;i.prepare(n,r,s).forEach(c=>{Lr(n,c,l=>{if(typeof l!="object")c.icons.forEach(d=>{e.missing.add(d)});else try{const d=Gt(e,l);if(!d.length)return;const u=e.pendingIcons;u&&d.forEach(p=>{u.delete(p)}),Fi(e,l)}catch(d){console.error(d)}Vi(e)})})}))}const Wi=e=>{const n=Z(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},Xt=(e,t)=>{const n=Ni(e,!0,fi()),r=Ai(n);if(!r.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(r.loaded,r.missing,r.pending,_n)}),()=>{l=!1}}const s=Object.create(null),i=[];let a,c;return r.pending.forEach(l=>{const{provider:d,prefix:u}=l;if(u===c&&d===a)return;a=d,c=u,i.push(Z(d,u));const p=s[d]||(s[d]=Object.create(null));p[u]||(p[u]=[])}),r.pending.forEach(l=>{const{provider:d,prefix:u,name:p}=l,f=Z(d,u),g=f.pendingIcons||(f.pendingIcons=new Set);g.has(p)||(g.add(p),s[d][u].push(p))}),i.forEach(l=>{const{provider:d,prefix:u}=l;s[d][u].length&&qi(l,s[d][u])}),t?Mi(t,r,i):_n},Gi=e=>new Promise((t,n)=>{const r=typeof e=="string"?me(e,!0):e;if(!r){n(e);return}Xt([r||e],s=>{if(s.length&&r){const i=Ce(r);if(i){t({...Se,...i});return}}n(e)})});function Tr(e,t){const n={...e};for(const r in t){const s=t[r],i=typeof s;r in hr?(s===null||s&&(i==="string"||i==="number"))&&(n[r]=s):i===typeof n[r]&&(n[r]=r==="rotate"?s%4:s)}return n}const Ye={...mr,inline:!1},ot="iconify",pt="iconify-inline",se="iconifyData"+Date.now();let le=[];function _e(e){for(let t=0;t<le.length;t++){const n=le[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function kr(e,t=!1){let n=_e(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},le.push(n),n)}function Ki(){if(document.documentElement)return kr(document.documentElement);le.push({node:()=>document.documentElement})}function Qi(e){le=le.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function Ie(){return le}function Zi(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let ve=null;const Ji={childList:!0,subtree:!0,attributes:!0};function Rr(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,ve&&ve(e)}))}function Xi(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let r=0;r<t.length;r++){const s=t[r];if(s.addedNodes&&s.addedNodes.length>0||s.type==="attributes"&&s.target[se]!==void 0){n.paused||Rr(e);return}}}function Pr(e,t){e.observer.instance.observe(t,Ji)}function Ge(e){let t=e.observer;if(t&&t.instance)return;const n=typeof e.node=="function"?e.node():e.node;!n||!window||(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(Xi.bind(null,e)),Pr(e,n),t.paused||Rr(e))}function In(){Ie().forEach(Ge)}function Dr(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function Yi(e){const t=ve!==null;if(ve!==e&&(ve=e,t&&Ie().forEach(Dr)),t){In();return}Zi(In)}function ht(e){(e?[e]:Ie()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const n=t.observer;if(n.paused++,n.paused>1||!n.instance)return;n.instance.disconnect()})}function ea(e){if(e){const t=_e(e);t&&ht(t)}else ht()}function mt(e){(e?[e]:Ie()).forEach(t=>{if(!t.observer){Ge(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const r=typeof t.node=="function"?t.node():t.node;if(r)n.instance?Pr(t,r):Ge(t);else return}})}function ta(e){if(e){const t=_e(e);t&&mt(t)}else mt()}function Ar(e,t=!1){const n=kr(e,t);return Ge(n),n}function $r(e){const t=_e(e);t&&(Dr(t),Qi(e))}function na(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,r=t.customisations;for(const s in Ye)if(n[s]!==r[s])return!0;return!1}function ra(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(s){for(;s<0;)s+=4;return s%4}if(n===""){const s=parseInt(e);return isNaN(s)?0:r(s)}else if(n!==e){let s=0;switch(n){case"%":s=25;break;case"deg":s=90}if(s){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/s,i%1===0?r(i):0)}}return t}const sa=/[\s,]+/;function oa(e,t){t.split(sa).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const ia=["width","height"],aa=["inline","hFlip","vFlip"];function ca(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function la(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&me(t,!0);if(!n)return null;const r={...Ye,inline:e.classList&&e.classList.contains(pt)};ia.forEach(c=>{const l=e.getAttribute("data-"+c);l&&(r[c]=l)});const s=e.getAttribute("data-rotate");typeof s=="string"&&(r.rotate=ra(s));const i=e.getAttribute("data-flip");typeof i=="string"&&oa(r,i),aa.forEach(c=>{const l="data-"+c,d=ca(e.getAttribute(l),l);typeof d=="boolean"&&(r[c]=d)});const a=e.getAttribute("data-mode");return{name:t,icon:n,customisations:r,mode:a}}const ua="svg."+ot+", i."+ot+", span."+ot+", i."+pt+", span."+pt;function da(e){const t=[];return e.querySelectorAll(ua).forEach(n=>{const r=n[se]||n.tagName.toLowerCase()!=="svg"?la(n):null;r&&t.push({node:n,props:r})}),t}function Or(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}let ye;function fa(){try{ye=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{ye=null}}function pa(e){return ye===void 0&&fa(),ye?ye.createHTML(e):e}function Mr(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function Nr(e,t,n,r){const s=e.classList;if(r){const a=r.classList;Array.from(a).forEach(c=>{s.add(c)})}const i=[];return t.forEach(a=>{s.contains(a)?n.has(a)&&i.push(a):(s.add(a),i.push(a))}),n.forEach(a=>{t.has(a)||s.remove(a)}),i}function Br(e,t,n){const r=e.style;(n||[]).forEach(i=>{r.removeProperty(i)});const s=[];for(const i in t)r.getPropertyValue(i)||(s.push(i),r.setProperty(i,t[i]));return s}function zr(e,t,n){let r;try{r=document.createElement("span")}catch{return e}const s=t.customisations,i=Ze(n,s),a=e[se],c=Or(gr(i.body),{"aria-hidden":"true",role:"img",...i.attributes});r.innerHTML=pa(c);const l=r.childNodes[0],d=e.attributes;for(let w=0;w<d.length;w++){const h=d.item(w),S=h.name;S!=="class"&&!l.hasAttribute(S)&&l.setAttribute(S,h.value)}const u=Mr(t.icon),p=Nr(l,u,new Set(a&&a.addedClasses),e),f=Br(l,s.inline?{"vertical-align":"-0.125em"}:{},a&&a.addedStyles),g={...t,status:"loaded",addedClasses:p,addedStyles:f};return l[se]=g,e.parentNode&&e.parentNode.replaceChild(l,e),l}function ha(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ma(e){return"data:image/svg+xml,"+ha(e)}function ga(e){return'url("'+ma(e)+'")'}const xa={display:"inline-block"},gt={"background-color":"currentColor"},Ur={"background-color":"transparent"},En={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Ln={"-webkit-mask":gt,mask:gt,background:Ur};for(const e in Ln){const t=Ln[e];for(const n in En)t[e+"-"+n]=En[n]}function Tn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function va(e,t,n,r){const s=t.customisations,i=Ze(n,s),a=i.attributes,c=e[se],l=Or(i.body,{...a,width:n.width+"",height:n.height+""}),d=Mr(t.icon),u=Nr(e,d,new Set(c&&c.addedClasses)),f={"--svg":ga(l),width:Tn(a.width),height:Tn(a.height),...xa,...r?gt:Ur};s.inline&&(f["vertical-align"]="-0.125em");const g=Br(e,f,c&&c.addedStyles),w={...t,status:"loaded",addedClasses:u,addedStyles:g};return e[se]=w,e}let $e=!1;function ya(){$e||($e=!0,setTimeout(()=>{$e&&($e=!1,he())}))}function he(e,t=!1){const n=Object.create(null);function r(s,i){const{provider:a,prefix:c,name:l}=s,d=Z(a,c),u=d.icons[l];if(u)return{status:"loaded",icon:u};if(d.missing.has(l))return{status:"missing"};if(i&&!Wi(s)){const p=n[a]||(n[a]=Object.create(null));(p[c]||(p[c]=new Set)).add(l)}return{status:"loading"}}(e?[e]:Ie()).forEach(s=>{const i=typeof s.node=="function"?s.node():s.node;if(!i||!i.querySelectorAll)return;let a=!1,c=!1;function l(d,u,p){if(c||(c=!0,ht(s)),d.tagName.toUpperCase()!=="SVG"){const f=u.mode,g=f==="mask"||(f==="bg"?!1:f==="style"?p.body.indexOf("currentColor")!==-1:null);if(typeof g=="boolean"){va(d,u,{...Se,...p},g);return}}zr(d,u,p)}da(i).forEach(({node:d,props:u})=>{const p=d[se];if(!p){const{status:g,icon:w}=r(u.icon,!0);if(w){l(d,u,w);return}a=a||g==="loading",d[se]={...u,status:g};return}let f;if(na(p,u)){if(f=r(u.icon,p.name!==u.name),!f.icon){a=a||f.status==="loading",Object.assign(p,{...u,status:f.status});return}}else{if(p.status!=="loading")return;if(f=r(u.icon,!1),!f.icon){p.status=f.status;return}}l(d,u,f.icon)}),s.temporary&&!a?$r(i):t&&a?Ar(i,!0):c&&s.observer&&mt(s)});for(const s in n){const i=n[s];for(const a in i){const c=i[a];Xt(Array.from(c).map(l=>({provider:s,prefix:a,name:l})),ya)}}}function ba(e){const t=_e(e);t?he(t):he({node:e,temporary:!0},!0)}function Hr(e,t,n=!1){const r=Ce(e);if(!r)return null;const s=me(e),i=Tr(Ye,t||{}),a=zr(document.createElement("span"),{name:e,icon:s,customisations:i},r);return n?a.outerHTML:a}function ja(){return"3.1.1"}function wa(e,t){return Hr(e,t,!1)}function Sa(e,t){return Hr(e,t,!0)}function Ca(e,t){const n=Ce(e);if(!n)return null;const r=Tr(Ye,t||{});return Ze(n,r)}function _a(e){e?ba(e):he()}if(typeof document<"u"&&typeof window<"u"){Ki();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!pr(r))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{Yi(he),he()})}function Ia(e,t){Sr(e,t!==!1)}function Ea(e){Sr(e,!0)}Cr("",Di);if(typeof document<"u"&&typeof window<"u"){wr();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const r="IconifyProviders["+n+"] is invalid.";try{const s=t[n];if(typeof s!="object"||!s||s.resources===void 0)continue;_r(n,s)||console.error(r)}catch{console.error(r)}}}}const La={getAPIConfig:Xe,setAPIModule:Cr,sendAPIQuery:Lr,setFetch:Ii,getFetch:Ei,listAPIProviders:Ci},Ta={_api:La,addAPIProvider:_r,loadIcons:Xt,loadIcon:Gi,iconExists:hi,getIcon:mi,listIcons:di,addIcon:pi,addCollection:pr,replaceIDs:gr,calculateSize:at,buildIcon:Ze,getVersion:ja,renderSVG:wa,renderHTML:Sa,renderIcon:Ca,scan:_a,observe:Ar,stopObserving:$r,pauseObserver:ea,resumeObserver:ta,enableCache:Ia,disableCache:Ea};try{self.Iconify===void 0&&(self.Iconify=Ta)}catch{}var Yt={},ka=H;Object.defineProperty(Yt,"__esModule",{value:!0});var Fr=Yt.default=void 0,Ra=ka(F()),Pa=o;Fr=Yt.default=(0,Ra.default)((0,Pa.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline");function en({infos:e}){const{t}=J(),n=new URL("https://community.arcblock.io/discussions/add");e.forEach(s=>{n.searchParams.set(s.label,s.value)});const r=e.map(s=>`* ${s.label}: ${s.value}`).join(`
153
+ `);return n.searchParams.set("report","server"),n.searchParams.set("context",`[Enter feedback here]
154
+
155
+
156
+
157
+ <!--
158
+ [Server Info]
159
+ ${r}
160
+ * Page: ${window.location.href}
161
+ -->
162
+ `),$(C,{sx:{mx:{xs:0,md:2}},children:$(bt,{sx:{color:"text.primary"},target:"_blank",href:n.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}en.propTypes={infos:m.arrayOf(m.shape({label:m.string,value:m.string}))};en.defaultProps={infos:[]};var tn={},Da=H;Object.defineProperty(tn,"__esModule",{value:!0});var xt=tn.default=void 0,Aa=Da(F()),kn=o;xt=tn.default=(0,Aa.default)([(0,kn.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,kn.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");function ne({children:e}){return Q(n=>n.breakpoints.down("md"))?o.jsx(ze,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:o.jsx(C,{sx:{display:"flex",alignItems:"center",gap:1},children:o.jsx(xt,{fontSize:"small"})})}):o.jsxs(C,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.jsx(xt,{fontSize:"small"}),e]})}ne.propTypes={children:m.node.isRequired};const $a="https://launcher.arcblock.io/",Oa=30*24*60*60*1e3;function nn({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...s}){var D,j,E,v,_,L;const{t:i,locale:a}=J(),c=Qe(),[l,d]=Gn({safeIframeRef:null,popoverAnchorEl:null}),u=x.useRef(null),p=Q(k=>k.breakpoints.down("md")),{sx:f={},...g}=s,w=p?"mobile":"desktop",h=Wn(async()=>{const[k,V]=await Promise.all([c.api.getLauncherSession({input:{launcherSessionId:r,launcherUrl:e}}),Bn({launcherUrl:e||$a,nftDid:n,launcherSessionId:r,locale:a})]);if(k!=null&&k.error)throw new Error(k.error);return{launcherSession:k.launcherSession,subscriptionURL:V}},[a]);if(h.loading)return o.jsx(ae,{label:o.jsxs(ne,{children:[!p&&i("expiration.desktop.loading"),o.jsx(re,{size:16})]}),variant:"success",sx:{cursor:"pointer",...f},...g});if(h.error)return console.error(h.error),o.jsx(ae,{label:o.jsx(ne,{children:i(`expiration.${w}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...f},...g,onClick:()=>h.retry()});const S=k=>{d({popoverAnchorEl:k.currentTarget})},b=()=>{d({popoverAnchorEl:null})},T=(D=h.value)==null?void 0:D.launcherSession;let I="success";[O.LAUNCH_SESSION_STATUS.overdue,O.LAUNCH_SESSION_STATUS.canceled,O.LAUNCH_SESSION_STATUS.terminated].includes((E=(j=h.value)==null?void 0:j.launcherSession)==null?void 0:E.status)&&(I="error");let R=null;if(T.expirationDate&&!T.subscription){const k=fe(T.expirationDate).diff(fe(),"ms");R=i(`expiration.${w}.tips.${I}`,{validity:Vn(k,{locale:zn(a),compact:!0,verbose:!0})}),k>0&&k<=Oa&&(I="warning")}return o.jsxs(o.Fragment,{children:[o.jsx(ae,{label:o.jsx(ne,{children:R||((_=(v=T==null?void 0:T.subscription)==null?void 0:v.product)==null?void 0:_.name)||i("common.subscription")}),color:I,variant:I!=="success"?"contained":"outlined",sx:{cursor:"pointer",...f},...g,onClick:S}),o.jsx(On,{id:"popover-info",open:!!l.popoverAnchorEl,anchorEl:l.popoverAnchorEl,onClose:b,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:o.jsx(C,{sx:{width:{xs:"360px",md:"450px"}},children:o.jsx("iframe",{ref:u,title:i("common.subscription"),width:"100%",height:"600px",style:{border:0},src:(L=h.value)==null?void 0:L.subscriptionURL})})})]})}nn.propTypes={chainHost:m.string.isRequired,nftId:m.string,launcherSessionId:m.string,sx:m.object,retention:m.number,launcherUrl:m.string.isRequired};nn.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};const Ma=30*24*60*60*1e3,Na="https://launcher.arcblock.io/";function rn({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...s}){var j,E,v,_,L,k,V;const{t:i,locale:a}=J(),[c,l]=Gn({safeIframeRef:null,popoverAnchorEl:null}),d=x.useRef(null),u=Q(N=>N.breakpoints.down("md")),p=Qe(),{sx:f={},...g}=s,w=u?"mobile":"desktop",h=Wn(async()=>{const[N,Ee]=await Promise.all([p.api.getLauncherSession({input:{launcherSessionId:r||n,launcherUrl:e}}),Bn({launcherUrl:e||Na,nftDid:n,launcherSessionId:r,locale:a})]);if(N!=null&&N.error)throw new Error(N.error);return{launcherSession:N.launcherSession,subscriptionURL:Ee}},[a]);if(h.loading)return o.jsx(ae,{label:o.jsxs(ne,{children:[!u&&i("expiration.desktop.loading"),o.jsx(re,{size:16})]}),variant:"success",sx:{cursor:"pointer",...f},...g});if(h.error)return console.error(h.error),o.jsx(ae,{label:o.jsx(ne,{children:i(`expiration.${w}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...f},...g,onClick:()=>h.retry()});const S=(E=(j=h.value)==null?void 0:j.launcherSession)==null?void 0:E.expirationDate,b=fe(S).isBefore(fe()),T=fe(S).diff(fe(),"ms");let I="success";T<=Ma&&(I="warning"),b&&(I="error");const R=N=>{l({popoverAnchorEl:N.currentTarget})},D=()=>{l({popoverAnchorEl:null})};return o.jsxs(o.Fragment,{children:[((_=(v=h.value)==null?void 0:v.launcherSession)==null?void 0:_.subscription)&&o.jsx(ae,{label:o.jsx(ne,{children:i("expiration.desktop.nextInvoice",{date:Ds(S,a)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...f},...g,onClick:R}),!((k=(L=h.value)==null?void 0:L.launcherSession)!=null&&k.subscription)&&o.jsx(ae,{label:o.jsx(ne,{children:i(`expiration.${w}.tips.${I}`,{validity:Vn(T,{locale:zn(a),compact:!0,verbose:!0})})}),color:I,variant:I!=="success"?"contained":"outlined",sx:{cursor:"pointer",...f},...g,onClick:R}),o.jsx(On,{id:"popover-info",open:!!c.popoverAnchorEl,anchorEl:c.popoverAnchorEl,onClose:D,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:o.jsx(C,{sx:{width:{xs:"360px",md:"450px"}},children:o.jsx("iframe",{ref:d,title:i("common.subscription"),width:"100%",height:"600px",style:{border:0},src:(V=h.value)==null?void 0:V.subscriptionURL})})})]})}rn.propTypes={chainHost:m.string.isRequired,nftId:m.string,launcherSessionId:m.string,sx:m.object,retention:m.number,launcherUrl:m.string.isRequired};rn.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};var sn={},Ba=H;Object.defineProperty(sn,"__esModule",{value:!0});var Vr=sn.default=void 0,za=Ba(F()),Ua=o;Vr=sn.default=(0,za.default)((0,Ua.jsx)("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"}),"Fullscreen");var on={},Ha=H;Object.defineProperty(on,"__esModule",{value:!0});var qr=on.default=void 0,Fa=Ha(F()),Va=o;qr=on.default=(0,Fa.default)((0,Va.jsx)("path",{d:"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"}),"FullscreenExit");function qa(){const{inFullPage:e,toggleFullPage:t}=ts();return $(vt,{onClick:t,children:e?$(qr,{sx:{transform:"scale(1.3)"}}):$(Vr,{sx:{transform:"scale(1.3)"}})})}function an({children:e}){var I,R,D;const{t}=J(),{loading:n,error:r,actions:{refreshBlocklet:s},env:i,blocklet:a}=we(),{info:c}=As(),l=Fs(),d=Q(j=>j.breakpoints.down("md")),[u,p]=x.useState(null),{appId:f,version:g}=i,w=[{label:"App ID",value:f},{label:"App Version",value:g},{label:"App Bundle Name",value:(I=a==null?void 0:a.meta)==null?void 0:I.bundleName},{label:"Server Id",value:c.did},{label:"Server Version",value:c.version}],h=j=>{var v,_,L,k;const E=Array.isArray(j)?j:[j];if(d||E.unshift($(qa,{})),a){const V={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};$s(a)?E.unshift($(nn,{chainHost:(v=a==null?void 0:a.controller)==null?void 0:v.chainHost,nftId:(_=a==null?void 0:a.controller)==null?void 0:_.nftId,launcherSessionId:(L=a==null?void 0:a.controller)==null?void 0:L.launcherSessionId,launcherUrl:(k=a==null?void 0:a.controller)==null?void 0:k.launcherUrl,sx:V})):c.ownerNft&&c.launcher&&E.unshift($(rn,{chainHost:c.launcher.chainHost,launcherUrl:c.launcher.url,nftId:c.ownerNft.did,launcherSessionId:c.ownerNft.launcherSessionId,sx:V}))}return E},S=(R=((a==null?void 0:a.environments)||[]).find(j=>j.key===ee.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE))==null?void 0:R.value,b=(D=((a==null?void 0:a.environments)||[]).find(j=>j.key===ee.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))==null?void 0:D.value;return x.useEffect(()=>{if(d)p(null);else{const{appLogo:j,appLogoRect:E}=window.blocklet??{};(E||j)&&p(`${E||j}&v=${Date.now()}`)}},[S,b,d]),nt(Wa,{legacy:!1,fullWidth:!0,headerAddons:h,headerProps:{logo:u?$("img",{src:u,alt:"logo"}):null},footerProps:{addon:$(en,{infos:w})},children:[!a&&n&&$(Ue,{relative:"parent",children:$(re,{})}),!a&&r&&nt(Ue,{relative:"parent",children:[nt(C,{display:"flex",alignItems:"center",children:[$(Fr,{color:"error",sx:{marginRight:1}}),It(r)]}),$(wt,{onClick:()=>s(),children:$("span",{style:{textDecoration:"underline"},children:t("common.retry")})})]}),!!a&&$(C,{flex:1,padding:d?2:3,display:"flex",flexDirection:"column",children:$(Is,{FallbackComponent:es,resetKeys:[l.pathname],children:e})})]})}an.propTypes={children:m.any};an.defaultProps={children:null};const Wa=te(Yr)`
163
+ div.dashboard-content {
164
+ padding: 0;
165
+ }
166
+ .header-addons .locales {
167
+ max-height: 400px;
168
+ overflow-y: auto;
169
+ }
170
+ `;function Ga(){const{t:e,locale:t}=J(),{blocklet:n,launcherSession:r}=we(),[s,i]=qs({subscriptionURL:"#"});if(x.useEffect(()=>{var l,d;fn(n,r)&&Os({launcherSessionId:(l=n==null?void 0:n.controller)==null?void 0:l.launcherSessionId,launcherUrl:(d=n==null?void 0:n.controller)==null?void 0:d.launcherUrl,locale:t}).then(u=>{i({subscriptionURL:u})}).catch(u=>{console.error("get subscription url error:",u)})},[n,r]),!n||!r||!Ms(n)||r.status===O.LAUNCH_SESSION_STATUS.installed)return"";let a=null,c="";return fn(n,r)?(a=o.jsx(bt,{href:s.subscriptionURL,children:e("blocklet.manageSubscription")}),c=e("blocklet.suspendedCausedByExpired",{deadline:pn(r==null?void 0:r.reservedUntil,t)})):Ns(n,r)&&(a=o.jsx(Un,{to:_t(O.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),c=e("blocklet.suspendedCausedByTerminated",{canceledAt:pn(r==null?void 0:r.terminatedAt,t),deadline:Bs(r==null?void 0:r.terminatedAt,t)})),o.jsxs(C,{component:Es,type:"error",sx:{"&> .alert-content":{display:"block"}},children:[c,o.jsx(z,{component:"span",sx:{marginLeft:"4px"},children:a})]})}const Wr=x.createContext({});function Ac(){return x.useContext(Wr)}const{Provider:Ka,Consumer:$c}=Wr,{did:G,appId:Qa}=window.env;function Za({children:e}){var j,E;const{t,locale:n}=J(),{blocklet:r}=we(),[s,i]=x.useState([]),[a,c]=x.useState([]),[l,d]=x.useState([]),u=B.getDisplayName(r),p=((j=((r==null?void 0:r.environments)||[]).find(v=>v.key===ee.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR))==null?void 0:j.value)||"auto",f=(r==null?void 0:r.trustedPassports)||[],g=(r==null?void 0:r.trustedFactories)||[],w=(r==null?void 0:r.enablePassportIssuance)!==!1,h=async()=>{try{const v=await Pe.doBatchQuery({getRoles:{input:{teamDid:G}},getPermissions:{input:{teamDid:G}},getInvitations:{input:{teamDid:G}}});c((v.getRoles.roles||[]).filter(_=>!O.RBAC_CONFIG.roles.some(L=>L.name===_.name&&(!L.passport||L.ci))).map(_=>(_.hasDescription=!!_.description,_.hasDescription||(_.description=t("team.passport.description",{teamName:u,title:_.title})),_))),d(v.getPermissions.permissions||[]),i(v.getInvitations.invitations||[])}catch(v){Y.error(v.message)}},S=({did:v}={})=>{const _={teamDid:G,user:{did:v}};return Pe.getUser({input:_})},b=({query:v,paging:_}={})=>{const L={teamDid:G};return _&&(L.paging=_),v&&(L.query=v),L.sort={lastLoginAt:-1},Pe.getUsers({input:L})},T=()=>Pe.getUsersCountPerRole({input:{teamDid:G}}),I=()=>h();x.useEffect(()=>{var v;(v=r==null?void 0:r.meta)!=null&&v.did&&h()},[(E=r==null?void 0:r.meta)==null?void 0:E.did]),x.useEffect(()=>{c(v=>v.map(_=>(_.hasDescription||(_.description=t("team.passport.description",{teamName:u,title:_.title})),{..._})))},[t,n]);const R=v=>{v.teamDid===G&&h()};Oe(ee.TeamEvents.userAdded,R,[G]),Oe(ee.TeamEvents.userRemoved,R,[G]),Oe(ee.TeamEvents.userUpdated,R,[G]);const D={teamDid:G,teamIssuerDid:Qa,teamName:u,invitations:s,roles:a,permissions:l,trustedPassports:f,trustedFactories:g,isNodeTeam:!1,enablePassportIssuance:w,refresh:I,passportColor:p,endpoint:window.location.origin,blocklet:r,api:{getUser:S,getUsers:b,getUsersCountPerRole:T}};return o.jsx(Ka,{value:D,children:e})}const Ja=x.lazy(()=>M(()=>import("./overview-Bxm05EH6.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]))),Xa=x.lazy(()=>M(()=>import("./domains-DF7TtN5q.js"),__vite__mapDeps([25,2,3,4,1,5,6,7,13,8,26,27,28,21,22,23,16,17,29,30,31,32,33,34,24,9,12,35]))),Ya=x.lazy(()=>M(()=>import("./index-BJ2lJo7L.js"),__vite__mapDeps([36,2,1,4,37,3,5,6,7,8,38,13,14,28,21,32,17,23,12,39,16,40,41,42,43,29,30,33,15,18,19,20,22,9,24]))),ec=x.lazy(()=>M(()=>import("./index-gTQQ3SoE.js"),__vite__mapDeps([44,2,5,4,1,3,6,7,37,13,8,14,40,41,28,21,45,46,16,17,47,24,48,15,18,19,20,22,23,9]))),tc=x.lazy(()=>M(()=>import("./index-eCY24sH9.js"),__vite__mapDeps([49,2,1,50,8,3,4,5,6,7,51,52,53,54,37,46,55,56,13,57,20,28,21,16,17,24,32,12,14,10,11,58,59,41,60,15,18,19,22,23,9]))),nc=x.lazy(()=>M(()=>import("./appearance-DX7SoW1u.js"),__vite__mapDeps([61,50,2,8,1,3,4,5,6,7,13]))),rc=x.lazy(()=>M(()=>import("./audit-logs-D8H5E0fC.js"),__vite__mapDeps([62,3,2,4,1,5,6,7,40,41,15,13,8,63,64,9,65,20,33,66,16,17,18,19,21,22,23,24]))),sc=x.lazy(()=>M(()=>import("./index-CmKAznDh.js"),__vite__mapDeps([67,2,1,4,3,5,6,7,13,8,33,12,68,69,57,20,65,9,35,40,41,14,70,22,23,50,71,72,56,73,17,74,15,16,18,19,21,24]))),oc=x.lazy(()=>M(()=>import("./log-o_Cadt8j.js"),__vite__mapDeps([75,1,2,15,3,4,5,6,7,13,8,76,57,77]))),ic=x.lazy(()=>M(()=>import("./index-B4Q2DAdn.js"),__vite__mapDeps([78,2,1,13,8,3,4,5,6,7,79,16,17,21,14,80,81,57,33,47,76,32,82,24,37,69,43,83,56,74,39,84,85,53,31,19,55,63,64,66]))),ac=x.lazy(()=>M(()=>import("./config-navigation-DtN0_qFZ.js"),__vite__mapDeps([86,2,3,4,1,5,6,7,87,8,13,58,11,45,88,60,83,20,17,15,16,18,19,21,22,23,9,24]))),cc=x.lazy(()=>M(()=>import("./index-CGK3FEjY.js"),__vite__mapDeps([89,1,2,5,4,13,8,3,6,7,90,83,91,92,39,17,12,93,30,19,59,47,15,16,18,20,21,22,23,9,24]))),lc=x.lazy(()=>M(()=>import("./index-C44fECmB.js"),__vite__mapDeps([94,3,2,4,1,5,6,7,9,13,8,58,27,16,17,29,30,15,18,19,20,21,22,23,24]))),uc=x.lazy(()=>M(()=>import("./component-1r0VSsqq.js"),__vite__mapDeps([95,1,2,4,3,5,6,7,8,52,53,54,37,46,55,13,59,28,21,87,73,81,32,56,72,17,96,84,85,39,31,33,16,19,14,97,98,92,83,99,45,63,64,88,12,15,34,90,100,91,101,48,9,57,18,29,30,20,22,23,24]))),dc=x.lazy(()=>M(()=>import("./analytics-BXLe73MI.js"),__vite__mapDeps([102,1,2,3,4,5,6,7,70,13,8,22,23,50,71,72,56,73,17,74,20,93,57,47,15,16,18,19,21,9,24]))),fc=_t(O.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications");function pc(){var D,j,E;const e=Hn(),{tab:t="overview"}=Vs(),{blocklet:n,actions:{refreshBlocklet:r}}=we(),{t:s}=J(),{session:i}=qn(),a=pe(()=>{var v;return(v=i==null?void 0:i.user)==null?void 0:v.did},[i]),{enqueueSnackbar:c}=Mn(),l=pe(()=>{var v;return((v=i.user)==null?void 0:v.role)&&Us.includes(i.user.role)},[i]),d=(D=n==null?void 0:n.meta)==null?void 0:D.did,u=v=>{e(`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${v}`)},p=()=>{r()},f=!n||hn(n.status)?[]:B.getAppMissingConfigs(n),g=[{label:s("common.overview"),value:"overview"},{label:o.jsx(xs,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!f.length,children:s("common.components")}),value:"components"},{label:s("common.domains"),value:"domains"}];hn(n==null?void 0:n.status)||(g.push({label:s("common.configuration"),value:"configuration"}),g.push({label:s("common.appearance"),value:"appearance"})),g.push({label:s("common.auditLogs"),value:"audit-logs"}),l&&g.push({label:s("common.notificationRecords"),value:"notifications"}),n&&((j=n.children)!=null&&j.length)&&n.structVersion===O.APP_STRUCT_VERSION&&g.push({label:s("common.logs"),value:"logs"}),g.push({label:s("common.configNavigation"),value:"navigation"}),["admin","owner"].includes((E=i.user)==null?void 0:E.role)&&g.push({label:"Webhooks",value:"webhooks"});const w=o.jsx(rc,{scope:d,categories:["blocklet","team","security","certificates","gateway"]}),h=x.useCallback(v=>Ks(fc,{id:v.id,severity:v.severity||"all",componentDid:v.source==="system"?"system":v.componentDid||"all"}),[]);Oe(`${a}/${O.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,v=>{const _=h(v),{severity:L,description:k}=v||{},V=["error","warning"].includes(L)||v.sticky;c(k,{variant:L,autoHideDuration:V?null:5e3,content:N=>o.jsx(Uo,{viewAllUrl:_,keyId:N,notification:v,content:o.jsx(ni,{notification:v,minimal:!0,rows:0})})})},[],"user");const S=x.useCallback(()=>l?o.jsx(sc,{blocklet:n}):o.jsx(rs,{status:403}),[n,l]),b={overview:o.jsx(Ja,{}),domains:o.jsx(Xa,{}),members:o.jsx(C,{mt:-5,children:o.jsx(Ya,{type:"blocklet",createPassportSvg:mn})}),passports:o.jsx(C,{mt:-3,children:o.jsx(ec,{createPassportSvg:mn})}),components:uc,configuration:o.jsx(tc,{blocklet:n,onUpdate:p}),appearance:o.jsx(nc,{}),"audit-logs":w,notifications:S,logs:oc,navigation:ac,"did-spaces":o.jsx(C,{mt:-3,children:o.jsx(cc,{navOrientation:"horizontal"})}),analytics:o.jsx(C,{mt:-5,children:o.jsx(dc,{})}),publish:o.jsx(C,{mt:-3,children:o.jsx(ic,{})}),webhooks:o.jsx(lc,{})},T=b[t]||b.overview,I=!["members","passports","analytics","publish","did-spaces"].includes(t),R=n?o.jsxs(Bt,{type:"components",children:[I&&o.jsx(C,{pt:3,children:o.jsx(Ls,{tabs:g,current:t,onChange:u,scrollButtons:"auto"})}),o.jsx("div",{className:"page-content",children:o.jsx(x.Suspense,{fallback:o.jsx(Ue,{relative:"parent",children:o.jsx(re,{})}),children:x.isValidElement(T)?T:o.jsx(T,{blocklet:n})})})]}):o.jsx(Ue,{relative:"parent",children:o.jsx(re,{})});return o.jsx(Hs,{children:o.jsx(Za,{children:o.jsx(an,{children:o.jsxs(mc,{children:[I&&o.jsxs(C,{component:"div",className:"page-header",children:[o.jsxs(z,{component:"h6",variant:"h6",className:"page-title",color:"textPrimary",children:[n?o.jsx(eo,{blocklet:n,style:{marginRight:16}}):null,n?o.jsxs(C,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,children:[o.jsx(C,{children:B.getDisplayName(n)}),(n==null?void 0:n.status)!=="unknown"&&o.jsx(Nt,{size:"12px",status:n.status,source:n.source,progress:n.progress})]}):`${s("common.blocklet")} ${s("common.detail")}`]}),n?o.jsx(Ro,{className:"page-actions",hasPermission:!0,blocklet:n,onStart:()=>{},onComplete:({error:v}={})=>{v&&Y.error(v.message)},variant:"group"}):null]}),o.jsx(nr,{}),o.jsx(Ga,{}),R]})})})})}function hc(){var r;const{blocklet:e}=we(),{t}=J(),n=(r=e==null?void 0:e.meta)==null?void 0:r.did;return x.useEffect(()=>{const s=zs();return n&&s.connect(),()=>{n&&s.isConnected()&&s.disconnect()}},[n]),o.jsxs(o.Fragment,{children:[o.jsx(ns,{children:o.jsx("title",{children:t("pageTitle.dashboard")})}),o.jsx(pc,{})]})}const mc=te.main`
171
+ .page-header {
172
+ display: flex;
173
+ justify-content: space-between;
174
+ align-items: center;
175
+ flex-wrap: wrap;
176
+ gap: 16px;
177
+ }
178
+
179
+ .page-title {
180
+ display: flex;
181
+ align-items: center;
182
+
183
+ .page-link {
184
+ font-size: 15px;
185
+ margin-top: 8px;
186
+ margin-left: 8px;
187
+ }
188
+ }
189
+
190
+ .page-content {
191
+ margin-top: 24px;
192
+ }
193
+
194
+ @media (max-width: ${e=>e.theme.breakpoints.values.md}px) {
195
+ .page-header {
196
+ flex-direction: column;
197
+ align-items: flex-start;
198
+ .page-actions,
199
+ .MuiButtonGroup-root {
200
+ width: 100%;
201
+ }
202
+ .MuiButtonGroup-root {
203
+ .MuiButtonBase-root {
204
+ flex: 1;
205
+ }
206
+ .blocklet-action-text {
207
+ display: none;
208
+ }
209
+ }
210
+ }
211
+
212
+ .page-title {
213
+ margin-bottom: 15px;
214
+ }
215
+ }
216
+ `,Oc=Object.freeze(Object.defineProperty({__proto__:null,default:hc},Symbol.toStringTag,{value:"Module"}));export{Nt as B,Mt as W,Yn as a,Qn as b,Kn as c,Fr as d,de as e,Dc as f,Oc as g,Ac as u};