@abtnode/blocklet-services 1.16.44-beta-20250513-030435-c2d99062 → 1.16.44-beta-20250518-020443-77ba168f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/index.js +3 -1
- package/api/libs/connect/session.js +22 -9
- package/api/libs/image.js +1 -2
- package/api/libs/open-graph/index.js +1 -2
- package/api/libs/push-kit/index.js +1 -0
- package/api/middlewares/check-federated-cors-call.js +2 -2
- package/api/middlewares/check-permission.js +10 -3
- package/api/routes/blocklet.js +1 -1
- package/api/routes/csp-proxy.js +67 -0
- package/api/routes/federated.js +30 -25
- package/api/routes/oauth/client.js +2 -2
- package/api/routes/openembed.js +1 -1
- package/api/routes/user-session.js +1 -2
- package/api/routes/user.js +9 -6
- package/api/services/auth/connect/connect-to-did-spaces-for-user.js +1 -1
- package/api/services/auth/connect/pre-setup.js +2 -1
- package/api/services/auth/connect/setup.js +31 -4
- package/api/services/image/index.js +1 -1
- package/api/services/notification/queue.js +27 -4
- package/api/socket/channel/did.js +14 -7
- package/api/util/federated.js +5 -1
- package/api/util/index.js +6 -0
- package/api/util/user-util.js +1 -1
- package/dist/assets/{AdapterDayjs-BD9H1lZ-.js → AdapterDayjs-YbaNvT9I.js} +1 -1
- package/dist/assets/{ArrowDropDown-BrO-zDlb.js → ArrowDropDown-xgs4N3Rf.js} +1 -1
- package/dist/assets/{CheckCircle-Ds4QI0ey.js → CheckCircle-JXD6tKIa.js} +1 -1
- package/dist/assets/{ChevronLeft-CnQaQ-rc.js → ChevronLeft-D0eko_T8.js} +1 -1
- package/dist/assets/{ChevronRight-a_2_x6Ew.js → ChevronRight-CQY9Ni7X.js} +1 -1
- package/dist/assets/{Community-DW6DJTIs.js → Community-BCL2L7ib.js} +1 -1
- package/dist/assets/{DeleteOutline-CFN4r-OG.js → DeleteOutline-BEGOj_wq.js} +1 -1
- package/dist/assets/{Done-DqSE6KPe.js → Done-BUJJNjlP.js} +1 -1
- package/dist/assets/{Download-C_LRKzbG.js → Download-DdZEsxmZ.js} +1 -1
- package/dist/assets/{Edit-CbR4eoK8.js → Edit-vxeVwrqO.js} +1 -1
- package/dist/assets/{EditIcon-DxUWMw59.js → EditIcon-Dffk7mPL.js} +1 -1
- package/dist/assets/{Email-DWueGk7t.js → Email-CdSNK0eA.js} +1 -1
- package/dist/assets/{Error-jEHdDLNk.js → Error-C-RD4e9g.js} +1 -1
- package/dist/assets/{ExpandLess-CkoEHpgk.js → ExpandLess-CmqG9SE7.js} +1 -1
- package/dist/assets/{Google-DHEolkW-.js → Google-B7PA4qF8.js} +1 -1
- package/dist/assets/{Holiday-Dwvo6QkZ.js → Holiday-enHMZqEf.js} +1 -1
- package/dist/assets/{InfoOutlined-DkG0jjos.js → InfoOutlined-BIr5nkjV.js} +1 -1
- package/dist/assets/{Launch-B-2Jomi6.js → Launch-KvZQI_SA.js} +1 -1
- package/dist/assets/{LaunchOutlined-CXNijfqX.js → LaunchOutlined-ClxZU_tj.js} +1 -1
- package/dist/assets/{Location-DUEOr9J2.js → Location-By12Z3Te.js} +1 -1
- package/dist/assets/{LockIcon-Cjg8jV1E.js → LockIcon-98CKEIBe.js} +1 -1
- package/dist/assets/{Meeting-CJaI_cKm.js → Meeting-CLeFWDkY.js} +1 -1
- package/dist/assets/{MoreHoriz-B6KdR0Y8.js → MoreHoriz-H8rabTmY.js} +1 -1
- package/dist/assets/{OffSick-C9VqqjrN.js → OffSick-dUm363rs.js} +1 -1
- package/dist/assets/{Phone-DcHUzCa-.js → Phone--BSu-btI.js} +1 -1
- package/dist/assets/{PlayArrow-BToG9L6q.js → PlayArrow-CmxnItFZ.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-BPVDAm8U.js → QuestionMarkCircle-DTf-Tya5.js} +1 -1
- package/dist/assets/{ServerLogo-s6cfhx92.js → ServerLogo-CEsILJl5.js} +1 -1
- package/dist/assets/{Timezone-B-Ho_Uno.js → Timezone-YZ0dMUEr.js} +1 -1
- package/dist/assets/{TuneOutlined-BR2H7Mxj.js → TuneOutlined-DmhFMgM-.js} +1 -1
- package/dist/assets/{ViewList-D8vtMKQz.js → ViewList-DXk3qGFU.js} +1 -1
- package/dist/assets/{WorkingRemotely-lJ6DUMCR.js → WorkingRemotely-BX7rgbEY.js} +1 -1
- package/dist/assets/{access-control-Din7doVd.js → access-control-DupKwlXi.js} +1 -1
- package/dist/assets/{actions-BjTeIzgS.js → actions-V9hjjowb.js} +1 -1
- package/dist/assets/{add-component-core-5x4gTem5.js → add-component-core-hWyA0oyr.js} +16 -16
- package/dist/assets/add-resource-BE6wXeqY.js +1 -0
- package/dist/assets/addon-DtaZ0TB3.js +14 -0
- package/dist/assets/{advanced-CN6mCSES.js → advanced-EG10mbK7.js} +1 -1
- package/dist/assets/appearance-Czknho-C.js +1 -0
- package/dist/assets/ar-2yn9i2dw.js +7 -0
- package/dist/assets/audit-logs-WqpwTrlM.js +35 -0
- package/dist/assets/{authorize-D2LCmekq.js → authorize-DEmcifx9.js} +1 -1
- package/dist/assets/{base32-_zEVBJUg.js → base32-BPfgmw66.js} +1 -1
- package/dist/assets/blocklet-default-logo-Bspnu_ws.png +0 -0
- package/dist/assets/{branding-CwhhJRKu.js → branding-CJx0esf8.js} +2 -2
- package/dist/assets/{branding-B6AmOMI6.js → branding-DFhJVvNX.js} +2 -2
- package/dist/assets/{bundle-avatar-CDJRatFg.js → bundle-avatar-BbIyJr7P.js} +1 -1
- package/dist/assets/button-m03GMAJs.js +1 -0
- package/dist/assets/click-to-copy-DmYkL7Ui.js +1 -0
- package/dist/assets/{collapse-QV_2gdtM.js → collapse-FsvH0gRe.js} +1 -1
- package/dist/assets/complete-C834qh46.js +39 -0
- package/dist/assets/{component-Cb3m5qUw.js → component-BK7TQ5JB.js} +8 -8
- package/dist/assets/{config-kGXJEkFJ.js → config-Cc-40NNR.js} +2 -2
- package/dist/assets/{config-LE_EJolF.js → config-Dl_53WnU.js} +1 -1
- package/dist/assets/{config-navigation-CKVyFhfH.js → config-navigation-DH93rn-r.js} +3 -3
- package/dist/assets/config-space-CxEu1ku3.js +1 -0
- package/dist/assets/confirm-DFwkkng7.js +7 -0
- package/dist/assets/{connect-HAC-YfHh.js → connect-CX2tLgwf.js} +1 -1
- package/dist/assets/{connect-BMn4CxDk.js → connect-tnlrEGOa.js} +1 -1
- package/dist/assets/connect-to-jqzhxL2-.js +1 -0
- package/dist/assets/{content-layout-BzF-fNQz.js → content-layout--sy9JlYZ.js} +1 -1
- package/dist/assets/dashboard-Dc5xtJBc.js +239 -0
- package/dist/assets/de-CEKbJD3-.js +7 -0
- package/dist/assets/delete-confirm-cVLum8Er.js +1 -0
- package/dist/assets/{did-address-DjwPl1uy.js → did-address-BI9LYTx-.js} +1 -1
- package/dist/assets/domain-7fDuc1TD.js +9 -0
- package/dist/assets/domain-action-card-CoP_GfSR.js +28 -0
- package/dist/assets/domains-CGg1il1q.js +1 -0
- package/dist/assets/{dot-BA3EvSrh.js → dot-BB5occkV.js} +2 -2
- package/dist/assets/{email-CHR0EOis.js → email-9P_7A90f.js} +2 -2
- package/dist/assets/{empty-spinner-n0_Ehns5.js → empty-spinner-BZw_ShnT.js} +1 -1
- package/dist/assets/{es-BuUaHPig.js → es-dvMygD-W.js} +3 -3
- package/dist/assets/{exchange-passport-D0iIXJxD.js → exchange-passport-CfsGf2j7.js} +1 -1
- package/dist/assets/fr-BvFd5xp9.js +7 -0
- package/dist/assets/{fuel-nMTHNcy-.js → fuel-DOrn9jKI.js} +1 -1
- package/dist/assets/{gen-access-key-DH4wNzRm.js → gen-access-key-Ddbn2A92.js} +1 -1
- package/dist/assets/get-safe-url-BcH2iukm.js +1 -0
- package/dist/assets/get-safe-url-OaLLn0UN.js +1 -0
- package/dist/assets/hi-C51yBXa5.js +5 -0
- package/dist/assets/{home-DzCwBE8F.js → home-CJ28zTIJ.js} +1 -1
- package/dist/assets/id-B1Mq_eQI.js +7 -0
- package/dist/assets/{iframe-DW7zzzTG.js → iframe-D0kv9-rE.js} +1 -1
- package/dist/assets/index-8eXqqyHQ.js +5 -0
- package/dist/assets/{index-BuXc3Oag.js → index-BBKe69-Z.js} +2 -2
- package/dist/assets/index-BEVde8cE.js +1 -0
- package/dist/assets/index-BQ8PIDUu.js +99 -0
- package/dist/assets/index-BXdw6keY.js +1 -0
- package/dist/assets/{index-BDYaw77z.js → index-BdH_4Yfe.js} +1 -1
- package/dist/assets/{index-B_-kynzD.js → index-Bi8r1T8R.js} +17 -17
- package/dist/assets/{index-CIkPfxzG.js → index-BiIZw9KG.js} +58 -58
- package/dist/assets/index-BmR2oN4p.js +113 -0
- package/dist/assets/{index-BCtmnJeV.js → index-BoYbZj00.js} +18 -14
- package/dist/assets/index-C26jJx3Z.js +55 -0
- package/dist/assets/index-C2sWzOOC.js +4 -0
- package/dist/assets/{index-BYCeMwoO.js → index-C849wD9b.js} +1 -1
- package/dist/assets/{index-BLGGjT7N.js → index-CeU2W9XY.js} +8 -8
- package/dist/assets/{index-DcUhenm6.js → index-CmQOzzP8.js} +1 -1
- package/dist/assets/{index-CPfvVvHv.js → index-D-mbJPLJ.js} +12 -12
- package/dist/assets/{index-enM9Y412.js → index-D3iGbfL9.js} +1 -1
- package/dist/assets/index-DK8EXxrQ.js +6 -0
- package/dist/assets/index-DPmpjBeE.js +241 -0
- package/dist/assets/{index-B8r-LrrM.js → index-DbsXFWms.js} +1 -1
- package/dist/assets/{index-CxwBhS0_.js → index-DfO-sKO8.js} +1 -1
- package/dist/assets/{index-BIPRCLBG.js → index-DoCu_ga_.js} +2 -2
- package/dist/assets/{index-ftkgQlGr.js → index-DwswX2WL.js} +1 -1
- package/dist/assets/{index-BA8C83iz.js → index-DxVAvQEw.js} +4 -4
- package/dist/assets/index-d-GNQQ24.js +1 -0
- package/dist/assets/{invitation-DzT9Qa0A.js → invitation-DmNSx8lT.js} +4 -4
- package/dist/assets/invite-BRV4-5NB.js +1 -0
- package/dist/assets/issue-passport-DVYjG5SL.js +1 -0
- package/dist/assets/item-F_qGx0RW.js +2 -0
- package/dist/assets/ja-CCKVmbEX.js +7 -0
- package/dist/assets/ko-A_w8tIEg.js +7 -0
- package/dist/assets/{landing-page-Due4o1uF.js → landing-page-CUrvCtHZ.js} +1 -1
- package/dist/assets/{launch-result-message-DIYoykBK.js → launch-result-message-Eea5FZDm.js} +1 -1
- package/dist/assets/{layout-BcLfVSqs.js → layout-Dkaou_pj.js} +2 -2
- package/dist/assets/list-CUP3NH6M.js +236 -0
- package/dist/assets/list-Dq129hfR.js +2 -0
- package/dist/assets/list-header-DNFbdM3a.js +1 -0
- package/dist/assets/localization-Cl5vfs2R.js +1 -0
- package/dist/assets/{log-Iko0jLNA.js → log-C_uY3dq9.js} +2 -3
- package/dist/assets/logger-BYg6vYBA.js +1 -0
- package/dist/assets/{login-4Yq_pPSw.js → login-D8Wk5up1.js} +1 -1
- package/dist/assets/login-oauth-callback-DMou-vp-.js +1 -0
- package/dist/assets/{logo-uploader-Cnkdgyfv.js → logo-uploader-CHTXjHOW.js} +3 -3
- package/dist/assets/{lost-passport-D5jMtgH_.js → lost-passport-DlnOD9y-.js} +2 -2
- package/dist/assets/{open-window--2G6Qjbq.js → open-window-CuyFfntO.js} +1 -1
- package/dist/assets/overview-B451HiB6.js +85 -0
- package/dist/assets/{page-header-xyZktwBS.js → page-header-DpNvpd52.js} +4 -4
- package/dist/assets/{passport-item-DH3_49G1.js → passport-item-BWCHjFYy.js} +1 -1
- package/dist/assets/{permission-BH1TY_tz.js → permission-Cnn9EYOW.js} +1 -1
- package/dist/assets/preferences-Cqm2olsT.js +1 -0
- package/dist/assets/profile-embed-CcuuyEXm.js +1 -0
- package/dist/assets/pt-7HHecjdA.js +5 -0
- package/dist/assets/publish-resource-BdSfAE92.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-7PS2VwOi.js → react-beautiful-dnd.esm-cfY5JZV6.js} +1 -1
- package/dist/assets/ru-Bw8FVC4M.js +5 -0
- package/dist/assets/runtime-BKK1_RAt.js +1 -0
- package/dist/assets/sdk-CXaHNlMH.js +1 -0
- package/dist/assets/{section-Cv4udilp.js → section-C1TPQFRq.js} +1 -1
- package/dist/assets/{security-CX01lhxW.js → security-C8vye2TA.js} +4 -4
- package/dist/assets/{session-CHdTc1We.js → session-B2z_IWIe.js} +1 -1
- package/dist/assets/setup-CS2QWFMb.js +30 -0
- package/dist/assets/{shorten-label-Cng55547.js → shorten-label-Bf7YQUd6.js} +1 -1
- package/dist/assets/{simple-select-CP_Svi_D.js → simple-select-DwWEI_ZU.js} +1 -1
- package/dist/assets/{slicedToArray-C7EPqaHf.js → slicedToArray-BSaY8ui4.js} +1 -1
- package/dist/assets/{spaces-BVG-t3ND.js → spaces-DMMN97uo.js} +1 -1
- package/dist/assets/{start-CMRQU8Px.js → start-6o3_Gxa0.js} +3 -3
- package/dist/assets/{starting-progress-CiLZpNpg.js → starting-progress-DeFtXRb_.js} +1 -1
- package/dist/assets/status-C73nIKwK.js +1 -0
- package/dist/assets/{step-actions-BfGTFkaB.js → step-actions-CqbOBcvS.js} +1 -1
- package/dist/assets/{studio-DikseKRr.js → studio-CiFHrC57.js} +1 -1
- package/dist/assets/{switch-control-C5i52ixk.js → switch-control-DnNP5DPe.js} +1 -1
- package/dist/assets/table-tips-hNIkakER.js +1 -0
- package/dist/assets/th-DyW-mYrC.js +5 -0
- package/dist/assets/traffic-B7XP49Y5.js +35 -0
- package/dist/assets/{transfer-BnR8fjLW.js → transfer-BfUTfR-d.js} +1 -1
- package/dist/assets/{unsubscribe-rUE2LcLN.js → unsubscribe-Bf4dBSoS.js} +1 -1
- package/dist/assets/{use-blocklet-logo-Phq7jasP.js → use-blocklet-logo-Bv56-gH-.js} +1 -1
- package/dist/assets/{use-mobile-Boa_xu9A.js → use-mobile-JEGQfLZ2.js} +1 -1
- package/dist/assets/{use-mobile-DyX6Fl8Z.js → use-mobile-ZAS6Si4t.js} +1 -1
- package/dist/assets/{useAsync-DV3NyLhI.js → useAsync-DnXpD472.js} +1 -1
- package/dist/assets/{useLocalStorage-DVnkpneF.js → useLocalStorage-BRd3tKN9.js} +1 -1
- package/dist/assets/user-center-Ck0gNc-m.js +76 -0
- package/dist/assets/{util-CEAObyfj.js → util-CVjZG67N.js} +1 -1
- package/dist/assets/{util-Btd7aQEC.js → util-DWicJSOi.js} +1 -1
- package/dist/assets/{vendor-arcblock-uz9DVywv.js → vendor-arcblock-DPRICUXM.js} +109 -109
- package/dist/assets/{vendor-hooks-rDgu5KV9.js → vendor-hooks-Zkb4Ilbj.js} +1 -1
- package/dist/assets/{vendor-mui-core-D_bnq77o.js → vendor-mui-core-Bh-qMRq3.js} +1 -1
- package/dist/assets/{vendor-mui-x-R-0SFz4c.js → vendor-mui-x-CQTjfcpn.js} +1 -1
- package/dist/assets/{vendor-ux-did-connect-DHrruicZ.js → vendor-ux-did-connect-Ck9lzrbN.js} +73 -73
- package/dist/assets/vi-bzer6J4H.js +5 -0
- package/dist/assets/wrap-locale-HcPVeI43.js +1 -0
- package/dist/assets/zh-Cti0XXui.js +8 -0
- package/dist/assets/zh-tw-BLcDG99i.js +7 -0
- package/dist/images/all-done-dark.svg +68 -0
- package/dist/images/all-done-light.svg +60 -0
- package/dist/index.html +5 -5
- package/dist/service-worker.js +1 -1
- package/package.json +48 -47
- package/dist/assets/add-resource-BrZnm53f.js +0 -1
- package/dist/assets/addon--u4EErgw.js +0 -14
- package/dist/assets/appearance-Bowm1Shj.js +0 -1
- package/dist/assets/ar-Blzb8h2o.js +0 -7
- package/dist/assets/audit-logs-DczjqamJ.js +0 -35
- package/dist/assets/button-D8hoY4xw.js +0 -1
- package/dist/assets/click-to-copy-CFiGx48J.js +0 -1
- package/dist/assets/complete-CKhw9u_z.js +0 -45
- package/dist/assets/config-space-CogRdhoQ.js +0 -1
- package/dist/assets/confirm-SdqBW-ti.js +0 -7
- package/dist/assets/connect-to-eNQDY2rc.js +0 -1
- package/dist/assets/dashboard-BYxl5V9e.js +0 -239
- package/dist/assets/de-BxI5dM9K.js +0 -7
- package/dist/assets/delete-confirm-CKF_eljP.js +0 -1
- package/dist/assets/domain-DotN6lCb.js +0 -9
- package/dist/assets/domain-action-card-DHH9PLRG.js +0 -24
- package/dist/assets/domains-BV2pykxi.js +0 -1
- package/dist/assets/format-error-BrmqJs5a.js +0 -2
- package/dist/assets/fr-DezMACmP.js +0 -7
- package/dist/assets/get-safe-url-B5RJTMjC.js +0 -1
- package/dist/assets/get-safe-url-Bk6PlU7n.js +0 -1
- package/dist/assets/hi-ClbEozhq.js +0 -5
- package/dist/assets/id-CXYm-1K3.js +0 -7
- package/dist/assets/index-8CHxrfFP.js +0 -1
- package/dist/assets/index-B54lTbup.js +0 -99
- package/dist/assets/index-BCNchyGN.js +0 -141
- package/dist/assets/index-BJxv6GA4.js +0 -4
- package/dist/assets/index-CYeNo51G.js +0 -113
- package/dist/assets/index-CfxcUIhC.js +0 -1
- package/dist/assets/index-Ctzl9JDw.js +0 -55
- package/dist/assets/index-D7eC9ptO.js +0 -6
- package/dist/assets/index-D9KfgDPN.js +0 -241
- package/dist/assets/invite-CQPeUOT4.js +0 -1
- package/dist/assets/issue-passport-BYhvmLsl.js +0 -1
- package/dist/assets/item-D942q-4T.js +0 -2
- package/dist/assets/ja-B5V7b8Cm.js +0 -7
- package/dist/assets/ko-DP9up1nF.js +0 -7
- package/dist/assets/list-BiJWMg_P.js +0 -236
- package/dist/assets/list-DKUSPdB6.js +0 -2
- package/dist/assets/list-header-HqBQs1yn.js +0 -1
- package/dist/assets/localization-BUDtnbyU.js +0 -1
- package/dist/assets/logger-BLZgTs_U.js +0 -1
- package/dist/assets/login-oauth-callback-DZaPZfnA.js +0 -1
- package/dist/assets/overview-CaQ-tV1t.js +0 -85
- package/dist/assets/preferences-CfmnTXfl.js +0 -1
- package/dist/assets/profile-embed-ZtzRYgXv.js +0 -1
- package/dist/assets/pt-CG45pWr4.js +0 -5
- package/dist/assets/publish-resource-BtFRgv4P.js +0 -1
- package/dist/assets/ru-0VhRQc7t.js +0 -5
- package/dist/assets/runtime-B0207zk1.js +0 -1
- package/dist/assets/sdk-9eXJSWHG.js +0 -1
- package/dist/assets/setup-DIAgbS7c.js +0 -30
- package/dist/assets/status-DSQPLYSp.js +0 -1
- package/dist/assets/th-DwH8cjcw.js +0 -5
- package/dist/assets/traffic-ClE631in.js +0 -35
- package/dist/assets/user-center-D25Vw-wP.js +0 -76
- package/dist/assets/vi-CcmTJggB.js +0 -5
- package/dist/assets/wrap-locale-CPW6a0PM.js +0 -1
- package/dist/assets/zh-C2MKZFZw.js +0 -8
- package/dist/assets/zh-tw-mW-UVEHx.js +0 -7
- package/dist/images/all-done.png +0 -0
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/log-Iko0jLNA.js","assets/vendor-mui-core-D_bnq77o.js","assets/vendor-react-DEoibe3W.js","assets/useLocalStorage-DVnkpneF.js","assets/vendor-ux-did-connect-DHrruicZ.js","assets/vendor-utils-rHXShPKm.js","assets/vendor-hooks-rDgu5KV9.js","assets/lottie-web-jYmAQWuC.js","assets/vendor-ux-did-connect-DpSGLE7B.css","assets/index-CIkPfxzG.js","assets/vendor-arcblock-uz9DVywv.js","assets/index-DOq-_YXu.css","assets/Download-C_LRKzbG.js","assets/bundle-avatar-CDJRatFg.js","assets/log-D33dFtt_.css","assets/index-BLGGjT7N.js","assets/ViewList-D8vtMKQz.js","assets/index-BIPRCLBG.js","assets/Phone-DcHUzCa-.js","assets/Location-DUEOr9J2.js","assets/Email-DWueGk7t.js","assets/Timezone-B-Ho_Uno.js","assets/index-CPfvVvHv.js","assets/did-address-DjwPl1uy.js","assets/permission-BH1TY_tz.js","assets/session-CHdTc1We.js","assets/click-to-copy-CFiGx48J.js","assets/index-CxwBhS0_.js","assets/vendor-mui-x-R-0SFz4c.js","assets/AdapterDayjs-BD9H1lZ-.js","assets/format-error-BrmqJs5a.js","assets/useAsync-DV3NyLhI.js","assets/index-enM9Y412.js","assets/DeleteOutline-CFN4r-OG.js","assets/confirm-SdqBW-ti.js","assets/util-CEAObyfj.js","assets/base32-_zEVBJUg.js","assets/sdk-9eXJSWHG.js","assets/actions-BjTeIzgS.js","assets/MoreHoriz-B6KdR0Y8.js","assets/shorten-label-Cng55547.js","assets/PlayArrow-BToG9L6q.js","assets/get-safe-url-B5RJTMjC.js","assets/use-blocklet-logo-Phq7jasP.js","assets/InfoOutlined-DkG0jjos.js","assets/dot-BA3EvSrh.js","assets/useSetState-CWq0AVWn.js","assets/use-mobile-DyX6Fl8Z.js","assets/index-BCNchyGN.js","assets/ExpandLess-CkoEHpgk.js","assets/index-D9KfgDPN.js","assets/Error-jEHdDLNk.js","assets/empty-spinner-n0_Ehns5.js","assets/list-header-HqBQs1yn.js","assets/QuestionMarkCircle-BPVDAm8U.js","assets/index-DVQCgvFb.js","assets/index-BYCeMwoO.js","assets/api-BjteVZFg.js","assets/ChevronRight-a_2_x6Ew.js","assets/react-beautiful-dnd.esm-7PS2VwOi.js","assets/raf-schd.esm-B3j6BePR.js","assets/item-D942q-4T.js","assets/Launch-B-2Jomi6.js","assets/Done-DqSE6KPe.js","assets/delete-confirm-CKF_eljP.js","assets/ArrowDropDown-BrO-zDlb.js","assets/index-B8r-LrrM.js","assets/index-C0Iiqot3.css","assets/index-BDYaw77z.js","assets/overview-CaQ-tV1t.js","assets/keyboard-arrow-down-rounded-DadBVmpO.js","assets/status-DSQPLYSp.js","assets/omit-D2k92RIF.js","assets/spaces-BVG-t3ND.js","assets/domains-BV2pykxi.js","assets/domain-action-card-DHH9PLRG.js","assets/util-Btd7aQEC.js","assets/CheckCircle-Ds4QI0ey.js","assets/index-BCtmnJeV.js","assets/passport-item-DH3_49G1.js","assets/Google-DHEolkW-.js","assets/cloneDeep-UpFQ2VNg.js","assets/EditIcon-DxUWMw59.js","assets/LockIcon-Cjg8jV1E.js","assets/appearance-Bowm1Shj.js","assets/audit-logs-DczjqamJ.js","assets/index-CYeNo51G.js","assets/collapse-QV_2gdtM.js","assets/section-Cv4udilp.js","assets/list-BiJWMg_P.js","assets/traffic-ClE631in.js","assets/iframe-DW7zzzTG.js","assets/LaunchOutlined-CXNijfqX.js","assets/ChevronLeft-CnQaQ-rc.js","assets/index-DcUhenm6.js","assets/use-mobile-Boa_xu9A.js","assets/config-navigation-CKVyFhfH.js","assets/index-Bs1kxR8_.js","assets/slicedToArray-C7EPqaHf.js","assets/simple-select-CP_Svi_D.js","assets/index-D7eC9ptO.js","assets/connect-to-eNQDY2rc.js","assets/config-space-CogRdhoQ.js","assets/index-ftkgQlGr.js","assets/switch-control-C5i52ixk.js","assets/index-Ctzl9JDw.js","assets/security-CX01lhxW.js","assets/config-LE_EJolF.js","assets/branding-B6AmOMI6.js","assets/logo-uploader-Cnkdgyfv.js","assets/advanced-CN6mCSES.js","assets/runtime-B0207zk1.js","assets/index-B54lTbup.js","assets/Edit-CbR4eoK8.js","assets/list-DKUSPdB6.js","assets/component-Cb3m5qUw.js","assets/TuneOutlined-BR2H7Mxj.js","assets/add-component-core-5x4gTem5.js","assets/launch-result-message-DIYoykBK.js","assets/page-header-xyZktwBS.js","assets/index-BuXc3Oag.js","assets/content-layout-BzF-fNQz.js","assets/add-component-core-D-IRi6XF.css","assets/index-CfxcUIhC.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{c as ie,u as An,p as os,h as Ge,f as $n,g as is,E as as,i as cs,H as ls,_ as R,R as us}from"./vendor-arcblock-uz9DVywv.js";import{H as x,j as o,a9 as B,ah as G,I as Ct,aq as ds,ak as Mn,X as _t,q as ps,b5 as fs,ab as ne,b6 as hs,bx as ms,T as z,bv as gs,bt as dn,bw as pn,aa as C,bJ as xs,v as Z,a6 as et,bK as vs,e as ee,ae as ys,bf as bs,ap as It,bL as On,ad as Ce,bM as ws,ar as js,ai as Ss,bN as Nn,bO as zn,bP as Un,E as ae,b4 as Bn,y as Cs,bh as _s}from"./vendor-mui-core-D_bnq77o.js";import{r as g,L as Hn,f as Vn,u as Is,l as ks}from"./vendor-react-DEoibe3W.js";import{r as H,b4 as Ts,b2 as kt,b5 as Es,B as Tt,j as $,a3 as fn,_ as Q,u as J,ao as Ps,m as Fn,k as Ls,d as Rs,h as Ds,aJ as As,Y as Et,b6 as $s,b7 as Ms,I as Os,C as Ke,b8 as Ns,b9 as zs,as as Us,a0 as Bs}from"./vendor-ux-did-connect-DHrruicZ.js";import{z as tt,f as N,A as it,B as Hs,b as Vs,C as Fs,D as qs,E as qn,t as he,F as Wn,G as Ws,n as ve,H as Gs,I as Ks,u as Qs,j as hn,g as Zs,J as mn,h as Xs,l as at,k as Js,m as Ys,K as eo,O as to,L as Be,e as Me,M as no,Q as ro,R as so,N as oo,T as io,c as gn}from"./index-CIkPfxzG.js";import{af as ao,A as me,ag as co,z as Gn,b as He,ah as lo}from"./vendor-utils-rHXShPKm.js";import{_ as xn}from"./useLocalStorage-DVnkpneF.js";import{C as vn}from"./confirm-SdqBW-ti.js";import{d as uo}from"./PlayArrow-BToG9L6q.js";import{g as yn}from"./get-safe-url-B5RJTMjC.js";import{f as Pt}from"./format-error-BrmqJs5a.js";import{u as Kn}from"./session-CHdTc1We.js";import{f as ge,w as po}from"./vendor-hooks-rDgu5KV9.js";import{i as fo,u as ho,M as mo,c as _e,s as Qe,H as go,p as Qn,a as xo}from"./use-blocklet-logo-Phq7jasP.js";import{d as vo}from"./InfoOutlined-DkG0jjos.js";import{_ as Zn,D as yo}from"./dot-BA3EvSrh.js";import{_ as Xn}from"./useSetState-CWq0AVWn.js";import{u as bo}from"./use-mobile-DyX6Fl8Z.js";const Jn=g.createContext({});function Lt({children:e,type:t}){const[n,r]=g.useState([]),s=g.useRef([]),i=l=>{if(!s.current.includes(l)){const u=[...s.current,l];r(u),s.current=u}},a=l=>{if(s.current.includes(l)){const u=s.current.filter(d=>d!==l);r(u),s.current=u}},c=l=>{const u=n.filter(f=>l.find(p=>p===f));ao(u,n).forEach(f=>a(f))};return o.jsx(Jn.Provider,{value:{type:t,deletingBlocklets:n,addDeletingDid:i,removeDeletingDid:a,matchDeletingDid:c},children:e})}Lt.propTypes={type:x.string,children:x.node.isRequired};Lt.defaultProps={type:"blocklets"};function cl(){return g.useContext(Jn)}var Rt={},wo=B;Object.defineProperty(Rt,"__esModule",{value:!0});var Yn=Rt.default=void 0,jo=wo(H()),So=o;Yn=Rt.default=(0,jo.default)((0,So.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var Dt={},Co=B;Object.defineProperty(Dt,"__esModule",{value:!0});var er=Dt.default=void 0,_o=Co(H()),Io=o;er=Dt.default=(0,_o.default)((0,Io.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 At={},ko=B;Object.defineProperty(At,"__esModule",{value:!0});var tr=At.default=void 0,To=ko(H()),Eo=o;tr=At.default=(0,To.default)((0,Eo.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 $t={},Po=B;Object.defineProperty($t,"__esModule",{value:!0});var nr=$t.default=void 0,Lo=Po(H()),Ro=o;nr=$t.default=(0,Lo.default)((0,Ro.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 Mt={},Do=B;Object.defineProperty(Mt,"__esModule",{value:!0});var rr=Mt.default=void 0,Ao=Do(H()),$o=o;rr=Mt.default=(0,Ao.default)((0,$o.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 Ot={},Mo=B;Object.defineProperty(Ot,"__esModule",{value:!0});var sr=Ot.default=void 0,Oo=Mo(H()),No=o;sr=Ot.default=(0,Oo.default)((0,No.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 Nt={},zo=B;Object.defineProperty(Nt,"__esModule",{value:!0});var or=Nt.default=void 0,Uo=zo(H()),Bo=o;or=Nt.default=(0,Uo.default)((0,Bo.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 zt=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"})})};zt.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};zt.displayName="dashboard";var Ut={},Ho=B;Object.defineProperty(Ut,"__esModule",{value:!0});var ir=Ut.default=void 0,Vo=Ho(H()),Fo=o;ir=Ut.default=(0,Vo.default)((0,Fo.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 fe={Start:uo,Stop:Yn,Restart:er,Reload:tr,Remove:Ts,Config:nr,Log:rr,Group:sr,Cancel:or,Dashboard:zt,Overview:ir},qo=(e,t)=>{if(!e)return"";const n=new URL(e),r=new URLSearchParams(n.searchParams),s=new URL(me(n.origin,t));return s.search=r.toString(),s.toString()},Wo="internal",Go="external";function Bt({blocklet:e,onStart:t,onComplete:n,variant:r,hasPermission:s,getComponentUrl:i,useBlockletUrlEvaluation:a,...c}){const l=tt(),[u,d]=g.useState(null),[f,p]=g.useState(null),[w,y]=g.useState(!1),[m,_]=g.useState(null),{t:h}=g.useContext(kt),[j]=xn("skip-blocklet-setup",!1),{loading:v,recommendedUrl:D}=a(e),[M]=xn("blocklet-type-filter",Wo),S=N.isInProgress(e.status),[T,I]=g.useState(!1);g.useEffect(()=>{var A,U;if(!(e!=null&&e.controller))return;I(((U=(A=e==null?void 0:e.controller)==null?void 0:A.status)==null?void 0:U.value)===ie.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var F,Y,se;try{const q=await l.api.getLauncherSession({input:{launcherSessionId:(F=e==null?void 0:e.controller)==null?void 0:F.launcherSessionId,launcherUrl:(Y=e==null?void 0:e.controller)==null?void 0:Y.launcherUrl}});if(q!=null&&q.error){console.error("get launcher session failed",q.error);return}I([$.LAUNCH_SESSION_STATUS.overdue,$.LAUNCH_SESSION_STATUS.canceled,$.LAUNCH_SESSION_STATUS.terminated].includes((se=q==null?void 0:q.launcherSession)==null?void 0:se.status))}catch(q){console.error("call getLauncherSession error",q)}})()},[]);const{inService:E}=l,k=(b,A,U=!1)=>async()=>{const F=async De=>{var $e;t({action:b,blocklet:e}),y(!0),p(b);let Ae=!1;try{if(b==="remove")await A(De);else if(b==="start"){if(!N.hasRunnableComponent(e)){Q.error(h("blocklet.noComponent"));return}if(!E&&!j&&!(($e=e.settings)!=null&&$e.initialized)&&e.mode!==ie.BLOCKLET_MODES.DEVELOPMENT){if(!D||!fn(D)){Q.error(h("blocklet.gotoVisitError"));return}const K=Hs(l.info),un=new URL(D);un.searchParams.set("serverUrl",K),window.open(yn(un.href,{allowDomains:null})),n({action:b,blocklet:e});return}const oe=e.children.filter(K=>!N.isInProgress(K.status)&&K.status!=="running").map(K=>K.meta.did),pe={did:e.meta.did,componentDids:oe};await A({input:pe})}else if(["stop","restart","reload"].includes(b)){const oe=e.children.filter(K=>K.status==="running").map(K=>K.meta.did),pe={did:e.meta.did,componentDids:oe};await A({input:pe})}else{const oe={did:e.meta.did};await A({input:oe})}b==="remove"?Ae=!0:await Vs(1e3),b==="reload"&&Q.success(h("blocklet.reloadSuccess")),_(null),n({action:b,blocklet:e})}catch(oe){const pe=`Blocklet ${b} failed: ${Pt(oe)}`;throw n({action:b,blocklet:e,error:new Error(pe)}),new Error(pe)}finally{Ae||y(!1)}},Y=()=>{y(!1),_(null)},se=N.getDisplayName(e,!0),q=e.mode===ie.BLOCKLET_MODES.DEVELOPMENT?{description:()=>o.jsx(z,{component:"div",children:o.jsx(z,{gutterBottom:!0,children:h("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(De,Ae)=>o.jsxs(z,{component:"div",children:[o.jsx(z,{gutterBottom:!0,children:h("blocklet.action.removeApplicationDescription")}),o.jsxs(gs,{name:"removeType",value:De.removeType,onChange:$e=>Ae({...De,removeType:$e.target.value}),children:[o.jsx(dn,{value:"backup",control:o.jsx(pn,{}),label:h("blocklet.action.removeApplicationAfterBackup")}),o.jsx(dn,{value:"complete",control:o.jsx(pn,{}),label:h("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},ss={stop:{title:`${h("common.stop")} ${se}`,description:h("blocklet.action.stopDescription"),confirm:h("blocklet.action.confirmStop"),cancel:h("common.cancel"),onConfirm:F,onCancel:Y},restart:{title:`${h("common.restart")} ${se}`,description:h("blocklet.action.restartDescription"),confirm:h("blocklet.action.confirmRestart"),cancel:h("common.cancel"),onConfirm:F,onCancel:Y},remove:{title:`${h("common.remove")} ${se}`,confirm:h("blocklet.action.confirmRemove"),cancel:h("common.cancel"),onConfirm:F,onCancel:Y,...q},cancelDownload:{title:`${h("common.cancel")}`,description:h("blocklet.action.cancelDownloadDescription",{name:se}),confirm:h("common.confirm"),cancel:h("common.cancel"),onConfirm:F,onCancel:Y}};U?_(ss[b]):await F()},P=!!u,de=b=>{try{b.stopPropagation(),b.preventDefault()}catch{}d(b.currentTarget)},V=b=>{try{b.stopPropagation(),b.preventDefault()}catch{}d(null)},Le=async(b,A)=>{try{A.stopPropagation(),A.preventDefault()}catch{}if(typeof b.handler=="function")try{y(!0),p(b.action),await b.handler()}catch(U){console.error(`Blocklet ${b.name} failed: `,U)}finally{y(!1),d(null)}else d(null)},es=!E&&N.isDeletableBlocklet(e)?{action:"remove",icon:fe.Remove,name:h("common.remove"),handler:k("remove",async({removeType:b})=>{b==="backup"&&await l.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await l.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:S}:null,ts={action:"remove",icon:({sx:b,...A})=>o.jsx(fe.Cancel,{sx:{...b,paddingRight:"2px",zoom:.95},...A}),name:h("common.cancel"),handler:k("cancelDownload",l.api.cancelDownloadBlocklet,!0)},ns=N.getAppMissingConfigs(e),rs=()=>{var F;const b=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),A=i==null?void 0:i({mountPoint:b,blocklet:e});if(!A||!fn(A)){Q.error(h("blocklet.gotoVisitError"));return}const U=(F=e==null?void 0:e.site)==null?void 0:F.domainAliases;window.open(yn(qo(A,".well-known/service/admin"),{allowDomains:U==null?void 0:U.map(Y=>Y.value)}))};let Re=[{action:"start",icon:fe.Start,inExternal:!0,name:h("common.start"),handler:k("start",l.api.startBlocklet),disabled:T||e.children.every(b=>b.status==="running")||it(e.status)||v||S},{action:"stop",icon:fe.Stop,inExternal:!0,name:h("common.stop"),handler:k("stop",l.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:fe.Restart,name:h("common.restart"),handler:k("restart",l.api.restartBlocklet,!0),disabled:T||e.status!=="running"},it(e.status)?ts:es,{separator:!0},E?null:{action:"dashboard",icon:({style:b,...A})=>o.jsx(fe.Dashboard,{...A,style:{...b,width:"26px",height:"26px",paddingRight:"3px"}}),name:h("sidebar.dashboard"),handler:rs}].filter(Boolean);return M===Go&&(Re=Re.filter(b=>b.inExternal)),r==="menu"?o.jsxs(bn,{"data-cy":"blocklet-actions",children:[o.jsx(Ct,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:de,size:"small",disabled:!s||!it(e.status)&&w,children:o.jsx(Es,{})}),o.jsxs(ds,{id:"actions-menu",anchorEl:u,keepMounted:!0,open:P,onClose:V,PaperProps:{},children:[ns.length>0&&o.jsxs(Mn,{style:{maxWidth:"400px"},severity:"error",children:[h("blocklet.config.missingRequired"),o.jsx("br",{}),o.jsx(Hn,{to:`/blocklets/${e.meta.did}/components`,children:h("blocklet.config.gotoFix")})]}),Re.map((b,A)=>b.separator?o.jsx(_t,{},`separator-${A}`):o.jsxs(ps,{dense:!0,onClick:U=>Le(b,U),disabled:w||b.disabled,"data-cy":`${b.action}-blocklet`,children:[o.jsx(fs,{style:{minWidth:24},children:f===b.action&&w?o.jsx(ne,{size:16,sx:{marginRight:1}}):o.jsx(b.icon,{fontSize:"small"})}),o.jsx(hs,{primary:b.name})]},b.name))]}),m&&o.jsx(vn,{title:m.title,description:m.description,confirm:m.confirm,cancel:m.cancel,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel})]}):o.jsxs(bn,{"data-cy":"blocklet-actions",...c,children:[o.jsx(ms,{children:Re.filter(b=>!b.separator&&!b.onlyInMenu).map(b=>o.jsxs(Tt,{title:b.name,"data-cy":`${b.action}-blocklet`,onClick:()=>Le(b),disabled:!!b.disabled||w,children:[f===b.action&&w?o.jsx(ne,{size:16,sx:{marginRight:1}}):o.jsx(b.icon,{}),o.jsx("span",{className:"blocklet-action-text",children:b.name})]},b.name))}),m&&o.jsx(vn,{title:m.title,description:m.description,confirm:m.confirm,cancel:m.cancel,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel})]})}Bt.propTypes={getComponentUrl:x.func,blocklet:x.object.isRequired,onStart:x.func.isRequired,onComplete:x.func.isRequired,variant:x.oneOf(["menu","group"]),hasPermission:x.bool,useBlockletUrlEvaluation:x.func};Bt.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 bn=G.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
|
-
`,wn=g.memo(Bt),Ko=e=>{const t={};let n=null;return N.forEachBlockletSync(e,r=>{t[r.meta.bundleDid]?n=N.getDisplayName(r,!0):r.meta.bundleDid&&(t[r.meta.bundleDid]=!0)}),n},Qo=(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],d=((((i=t.site)==null?void 0:i.domainAliases)||[]).map(f=>f.value).filter(Boolean).find(f=>f.endsWith($.DEFAULT_DID_DOMAIN))||"").replace(`.${$.DEFAULT_DID_DOMAIN}`,"");return d?s.replace(r,`${d}-${l}.${$.DEFAULT_IP_DOMAIN_SUFFIX}`):s}return s.replace(t.meta.bundleDid,t.appPid)};function ar(){const{t:e}=J(),{api:t}=Kn(),{blocklet:n}=Fs(),{inService:r}=tt(),[s,i]=g.useState(!1),[a,c]=g.useState(5),l=n&&n.structVersion!==$.APP_STRUCT_VERSION,u=()=>{try{if(n.status==="running"){Q.error(e("blocklet.migrate.tip.running"));return}const p=Ko(n);if(p){Q.error(e("blocklet.migrate.tip.duplicate",{name:p}));return}i(!0)}catch(p){Q.error(Pt(p))}},d=()=>{const p=Qo(window.location,n,r);setTimeout(()=>{window.location.href=p},5e3),c(5),setInterval(()=>{c(w=>w-1)},1e3)},f=()=>i(!1);return[l&&o.jsxs(Mn,{severity:"warning",style:{margin:"12px 0"},children:[o.jsxs(C,{display:"flex",alignItems:"center",children:[o.jsx(Tt,{variant:"contained",size:"small",color:"primary",onClick:()=>u(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),o.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(p=>o.jsx(C,{display:"flex",alignItems:"center",children:e(`blocklet.migrate.intro.${p}`)},p))]},"alert"),n&&o.jsx(Ps,{popup:!0,open:s,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:5*60*1e3,onSuccess:d,extraParams:{appDid:n.appDid,did:n.meta.did,wt:qs(n,!0),title:N.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:f},"connect")]}ar.propTypes={};function Zo(){const e=xs();return[...e.breakpoints.keys].reverse().reduce((n,r)=>{const s=Z(e.breakpoints.up(r));return!n&&s?r:n},null)||"xs"}function Xo(e){return o.jsx(et,{...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 Jo(e){return o.jsx(et,{...e,children:o.jsx("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"})})}function Yo(e){return o.jsx(et,{...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 ei(e){return o.jsx(et,{...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 Oe={fontSize:20,marginInlineEnd:8},ti={success:o.jsx(Xo,{style:Oe}),warning:o.jsx(Jo,{style:Oe}),error:o.jsx(Yo,{style:Oe}),info:o.jsx(ei,{style:Oe})},ni=vs(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:`${ys[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:`${bs[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 Ht({keyId:e,notification:t={},viewAllUrl:n,content:r},s){var _,h,j;const i=ni({breakpoint:Zo()}),a=ee(),c=[i.contentRoot,i.lessPadding,i[t.severity]].join(" "),l=ti[t.severity],{closeSnackbar:u}=Fn(),d=()=>u(e),f=Vn(),p=()=>{u(e),f(n)},w=ge(()=>fo(t),[t]),y=ge(()=>t==null?void 0:t.activity,[t]),m=ho({activity:y,users:[t==null?void 0:t.actorInfo],actors:[(_=t==null?void 0:t.activity)==null?void 0:_.actor],extra:{linkColor:a.palette.primary.main,userDid:(j=(h=t==null?void 0:t.receivers)==null?void 0:h[0])==null?void 0:j.did}});return o.jsxs(Ls,{ref:s,className:c,children:[o.jsxs("div",{className:i.message,children:[l,o.jsx(si,{onClick:p,style:{width:"calc(100% - 30px)"},children:o.jsx(C,{children:w?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"title",children:m}),y.meta?o.jsx(mo,{meta:y.meta,type:y.type,sx:{display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:3,WebkitBoxOrient:"vertical",color:"#fff"}}):null]}):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(Ct,{"aria-label":"close",color:"inherit",onClick:d,size:"large",children:o.jsx(Rs,{className:i.icon})},"close")})]})}const ri=g.forwardRef(Ht);Ht.propTypes={viewAllUrl:x.string.isRequired,keyId:x.number.isRequired,notification:x.object.isRequired,content:x.node};Ht.defaultProps={content:null};const si=G.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 cr({attachment:e}){const{data:t}=e,n=ee();let r="";try{r=new URL(t.url).host}catch{r=t.url}return o.jsxs(It,{target:"_blank",rel:"noopener noreferrer",href:t.url,className:"link",style:{wordBreak:"break-all"},onClick:s=>{s.customPreventRedirect=!0},children:[!!r&&o.jsx("span",{className:"url",children:r}),!!t.title&&o.jsx(C,{className:"title",style:{whiteSpace:"unset"},children:t.title}),!!t.description&&o.jsx(C,{className:"description",style:{whiteSpace:"unset",color:n.palette.text.secondary},children:t.description}),!!t.image&&o.jsx("img",{src:An.getImagePath(t.image),alt:t.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})]})}cr.propTypes={attachment:x.object.isRequired};function lr({attachment:e}){const{data:t}=e;return o.jsx("img",{src:An.getImagePath(t.url),alt:t.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})}lr.propTypes={attachment:x.object.isRequired};function ur({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(oi,{className:"title",style:{fontSize:a,color:r,whiteSpace:"unset",fontWeight:i},children:n.text})}ur.propTypes={attachment:x.object.isRequired};const oi=G.span`
|
|
33
|
-
width: 100%;
|
|
34
|
-
display: -webkit-box;
|
|
35
|
-
-webkit-box-orient: vertical;
|
|
36
|
-
-webkit-line-clamp: 2;
|
|
37
|
-
overflow: hidden;
|
|
38
|
-
text-overflow: ellipsis;
|
|
39
|
-
white-space: normal;
|
|
40
|
-
word-break: break-word;
|
|
41
|
-
`,ii=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},ai=e=>e.every(t=>t.type==="text"),ci=e=>e.every(t=>t.type==="image"),li=e=>co(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)})),ui=e=>{if(!e.length||e.length<=1)return!1;const t=e[0].type;return e.every(n=>n.type===t)},di=(e,t)=>{try{const n=Ds.toTypeInfo(e);if(!(n.role!==void 0&&n.role!==As.types.RoleType.ACCOUNT))return;const s=me($.WELLKNOWN_SERVICE_PATH_PREFIX,"user");return Gn(s,{did:e,locale:t})}catch(n){console.error(n);return}},le=(e,t)=>({...e,...t?{filter:"invert(1)"}:{}});Vt.propTypes={locale:x.string,data:x.object.isRequired};Vt.defaultProps={locale:"en"};function Vt({locale:e="en",data:t}){const n={zh:"来自",en:"from"}[e]||"from",r={zh:"接收",en:"Received"}[e]||"Received",i=`https://${_e.getUrlHost(t.chainHost)||_e.getChainHost(t.chainId)}/explorer/tokens/${t.address}/tx`,a=ee(),c=a.palette.mode==="dark";let l=t.amount;t.decimal&&(l=t.amount/10**t.decimal);const u=ge(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return o.jsx("a",{href:i,target:"_blank",rel:"noreferrer",onClick:d=>{d.customPreventRedirect=!0},children:o.jsxs(C,{display:"flex",flexDirection:"column",children:[o.jsxs(C,{sx:u,children:[o.jsx(z,{component:"div",sx:{fontWeight:700,color:a.palette.text.primary},children:r}),o.jsxs(z,{component:"div",align:"right",style:le(Qe.summaryStyle,c),flex:1,children:["+",l," ",t.symbol]})]}),o.jsxs(C,{sx:u,children:[o.jsx(z,{component:"div",style:le({...Qe.remarkStyle,fontSize:14},c),children:n}),o.jsx(C,{maxWidth:260,fontSize:14,children:o.jsx(Et,{did:t.address,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]})]})})}Ft.propTypes={locale:x.string,data:x.object.isRequired};Ft.defaultProps={locale:"en"};function Ft({locale:e,data:t}){var d,f;const n={zh:"接收",en:"Received"}[e]||"Received",r={zh:"来自",en:"from"}[e]||"from",s=_e.getUrlHost(t.chainHost)||_e.getChainHost(t.chainId),i=t.did||((f=(d=t==null?void 0:t.credential)==null?void 0:d.issuer)==null?void 0:f.id)||"",a=`https://${s}/explorer/assets/${i}`,l=ee().palette.mode==="dark",u=ge(()=>({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:p=>{p.customPreventRedirect=!0},rel:"noreferrer",children:o.jsxs(C,{display:"flex",flexDirection:"column",children:[o.jsxs(C,{sx:u,children:[o.jsx(z,{component:"div",sx:{fontWeight:700,color:"text.primary"},children:n}),o.jsx(z,{component:"div",align:"right",style:le(Qe.summaryStyle,l),children:"+1 Asset"})]}),i?o.jsxs(C,{sx:u,children:[o.jsx(z,{component:"div",style:le({...Qe.remarkStyle,fontSize:14},l),children:r}),o.jsx(C,{maxWidth:260,fontSize:14,children:o.jsx(Et,{did:i,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]}):null]})})})}dr.propTypes={data:x.object.isRequired,locale:x.string};function dr({data:e,locale:t="en"}){const r=ee().palette.mode==="dark";return o.jsxs("a",{href:e.url,target:"_blank",style:{display:"flex",textDecoration:"none",color:"initial"},onClick:s=>{s.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:le({marginBottom:"6px"},r),children:e.title}),o.jsx(C,{maxWidth:260,fontSize:10,children:o.jsx(Et,{did:e.appDID,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:t})})]})]})}qt.propTypes={locale:x.string,data:x.object.isRequired};qt.defaultProps={locale:"en"};function qt({locale:e,data:t}){const n=_e.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",a=ee(),c=a.palette.mode==="dark";return o.jsxs("a",{href:r,target:"_blank",style:le({textDecoration:"none",color:"initial",display:"block",fontSize:14},c),onClick:l=>{l.customPreventRedirect=!0},rel:"noreferrer",children:[o.jsx("h6",{style:{color:a.palette.text.secondary,margin:0},children:n}),o.jsx("p",{style:{color:a.palette.warning.main,margin:0},children:s}),o.jsxs("div",{style:{wordBreak:"break-all"},children:[i,": ",t.hash]})]})}function pr({attachment:e,...t}){const{local:n}=g.useContext(kt),r=Z(i=>i.breakpoints.down("md")),s=ee();return o.jsxs(pi,{...t,isMd:r,children:[e.type==="link"&&o.jsx(cr,{attachment:e,...t,isMd:r}),e.type==="image"&&o.jsx(lr,{attachment:e,isMd:r}),e.type==="text"&&o.jsx(ur,{attachment:e,isMd:r}),e.type==="token"&&o.jsx(Vt,{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(dr,{data:e.data,local:n,isMd:r}),e.type==="transaction"&&o.jsx(qt,{data:e.data,local:n,...t,isMd:r}),e.type==="divider"&&o.jsx(_t,{sx:{mb:1,mt:1},style:{color:s.palette.divider}})]})}const pi=G.div`
|
|
42
|
-
display: ${({sx:e={}})=>e.display||"flex"};
|
|
43
|
-
flex-direction: ${({sx:e={}})=>e.flexDirection||"column"};
|
|
44
|
-
gap: ${({sx:e={}})=>e.gap||1};
|
|
45
|
-
width: ${({isMd:e=!1})=>e?"100%":"auto"};
|
|
46
|
-
&:last-child {
|
|
47
|
-
margin-bottom: 0;
|
|
48
|
-
}
|
|
49
|
-
`;pr.propTypes={attachment:x.object.isRequired};function fr({data:e,...t}){const{items:n}=e;return o.jsx(fi,{...t,children:n.map(r=>o.jsxs(On,{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(Ce,{title:r.subtitle,arrow:!0,placement:"top",children:o.jsx(vo,{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 fi=G(C)`
|
|
50
|
-
display: flex;
|
|
51
|
-
justify-content: flex-start;
|
|
52
|
-
flex-wrap: wrap;
|
|
53
|
-
gap: 16px;
|
|
54
|
-
.metric-number {
|
|
55
|
-
font-size: 18px;
|
|
56
|
-
font-weight: 600;
|
|
57
|
-
.sub-content {
|
|
58
|
-
font-size: 12px;
|
|
59
|
-
font-weight: 400;
|
|
60
|
-
margin-left: 4px;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
.metric-name {
|
|
64
|
-
font-size: 14px;
|
|
65
|
-
color: rgba(156, 163, 175, 1);
|
|
66
|
-
}
|
|
67
|
-
`;fr.propTypes={data:x.object.isRequired};function hr({data:e}){const{items:t}=e,n=Z(a=>a.breakpoints.down("sm")),r=Z(a=>a.breakpoints.down("md")),s=Z(a=>a.breakpoints.down("lg")),i=()=>n?1:r?3:s?4:6;return o.jsx(ws,{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(js,{children:o.jsx("img",{src:c,alt:a.title||"",style:{borderRadius:"8px"}})})},c):null})})}hr.propTypes={data:x.object.isRequired};function Wt({data:e,feedType:t,...n}){return o.jsxs(hi,{...n,children:[t==="data-tracker"&&e.type==="table"&&o.jsx(fr,{data:e}),(t==="graphic"||t==="gallery")&&o.jsx(hr,{data:e})]})}const hi=G.div`
|
|
68
|
-
display: flex;
|
|
69
|
-
flex-direction: column;
|
|
70
|
-
width: 100%;
|
|
71
|
-
margin-bottom: 4px;
|
|
72
|
-
&:last-child {
|
|
73
|
-
margin-bottom: 0;
|
|
74
|
-
}
|
|
75
|
-
`;Wt.propTypes={data:x.object.isRequired,feedType:x.string};Wt.defaultProps={feedType:"data-tracker"};Ve.propTypes={data:x.object.isRequired,style:x.object};function Ve({data:e,style:t={}}){const r=ee().palette.mode==="dark";return o.jsx(z,{style:le({color:r&&e.darkModeColor?e.darkModeColor:e.color||"initial",margin:0,whiteSpace:"pre-line!important",...t},r),children:e.text})}function mr({data:e}){const t=[];for(let n=0;n<(e==null?void 0:e.length);n+=2){const r=e[n],s=e[n+1];r&&s?t.push(o.jsxs(jn,{children:[o.jsx("td",{className:"label-col",children:o.jsx(Ve,{data:r.data,style:{whiteSpace:"nowrap"}})}),o.jsx("td",{className:"value-col",children:o.jsx(Ve,{data:s.data,style:{wordBreak:"break-all"}})})]},n)):r&&t.push(o.jsx(jn,{children:o.jsx("td",{className:"label-col",children:o.jsx(Ve,{data:r.data})})},n))}return o.jsx("table",{style:{width:"100%"},children:o.jsx("tbody",{children:t})})}mr.propTypes={data:x.array.isRequired};const jn=G.tr`
|
|
76
|
-
display: flex;
|
|
77
|
-
flex-direction: row;
|
|
78
|
-
justify-content: flex-start;
|
|
79
|
-
align-items: center;
|
|
80
|
-
gap: ${({theme:e})=>e.spacing(1)};
|
|
81
|
-
.label-col {
|
|
82
|
-
min-width: 130px;
|
|
83
|
-
flex-shrink: 0;
|
|
84
|
-
}
|
|
85
|
-
.value-col {
|
|
86
|
-
flex: 1;
|
|
87
|
-
}
|
|
88
|
-
`;function Gt({notification:e,severity:t,showSke:n=!0}){const{attachments:r,data:s,...i}=e,a=Z(d=>d.breakpoints.down("md"));if((!r||!r.length)&&He(s))return null;const c=ii(t),l=(d,f=!1)=>{if(!d&&!Array.isArray(d))return null;let p=d,w={},y="horizontal";f&&ai(d)&&(p=li(d),y="vertical",w={display:"flex",gap:8,flexDirection:"row",justifyContent:"flex-start",flexWrap:"wrap",height:"100%",width:a||p.length===1?"100%":"28%"});const m=ui(p);return o.jsx(C,{sx:{width:"100%",display:"flex",gap:1,flexDirection:f?"row":"column",justifyContent:"flex-start",alignItems:f?"center":"unset",flexWrap:"wrap"},children:p.map((_,h)=>_.type==="section"?o.jsx(mr,{data:_.fields},h):o.jsxs(g.Fragment,{children:[o.jsx(pr,{attachment:_,style:w,...i}),!(a&&y==="vertical")&&m&&p.length>1&&h!==p.length-1?o.jsx(_t,{orientation:y,style:{color:$s.dividerColor},sx:y==="vertical"?{ml:2,mr:2,height:32}:{}}):null]},h))})},u=ci(r);return o.jsx(mi,{children:o.jsxs("div",{className:"message-in-list",children:[r.length>0&&o.jsx("div",{className:"message-container",style:a?{width:"100%"}:{},children:u?l(r):o.jsx(On,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128,borderColor:c},children:l(r)})}),!He(s)&&o.jsx("div",{className:"message-container",children:o.jsx("div",{className:"data-container",children:o.jsx(Wt,{data:s,feedType:e.feedType})})}),r.length===0&&He(s)&&n&&o.jsx(Ss,{className:"attach-ske",style:{marginTop:10},variant:"rectangular",height:150})]})})}const mi=G.div`
|
|
89
|
-
display: flex;
|
|
90
|
-
flex-direction: column;
|
|
91
|
-
.message-in-list {
|
|
92
|
-
padding: 8px 8px 8px 0;
|
|
93
|
-
display: flex;
|
|
94
|
-
border-radius: 8px;
|
|
95
|
-
}
|
|
96
|
-
.message-title {
|
|
97
|
-
color: #25292f;
|
|
98
|
-
font-size: 18px;
|
|
99
|
-
font-weight: bold;
|
|
100
|
-
word-break: break-all;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.attach-ske {
|
|
104
|
-
position: relative;
|
|
105
|
-
margin-left: 10px;
|
|
106
|
-
&::after {
|
|
107
|
-
content: '';
|
|
108
|
-
position: absolute;
|
|
109
|
-
left: -10px;
|
|
110
|
-
top: 0;
|
|
111
|
-
height: 100%;
|
|
112
|
-
width: 4px;
|
|
113
|
-
background-color: ${e=>e.leftLineColor};
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.message-body {
|
|
118
|
-
color: #25292f;
|
|
119
|
-
font-size: 16px;
|
|
120
|
-
word-break: break-all;
|
|
121
|
-
white-space: pre-line;
|
|
122
|
-
}
|
|
123
|
-
.message-container {
|
|
124
|
-
display: flex;
|
|
125
|
-
flex-direction: column;
|
|
126
|
-
justify-content: flex-start;
|
|
127
|
-
.data-container,
|
|
128
|
-
.attachment-container {
|
|
129
|
-
display: flex;
|
|
130
|
-
flex-direction: column;
|
|
131
|
-
width: 100%;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
.actions-container {
|
|
135
|
-
margin-top: 10px;
|
|
136
|
-
.actions-item {
|
|
137
|
-
margin-right: 8px;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
`;Gt.propTypes={severity:x.string.isRequired,notification:x.object.isRequired,showSke:x.bool};Gt.defaultProps={showSke:!0};const ct=e=>os.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),gi=async(e,t)=>{const{type:n,did:r}=e;return $n.isSameAddr(n,"did")?await di(r,t)||Ge.getLink(e):Ge.getLink(e)},xi=async(e,t,n=!0)=>{const r=Ge.toTextList(e);return await Promise.all(r.map(async i=>{if(i instanceof Ge.Link){if(n){const a=await gi(i,t),{type:c,chainId:l,did:u}=i;return $n.isSameAddr(c,"dapp")?`<em style="font-weight:bold;" data-type="${c}" data-chain-id="${l}" data-did="${u}">${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="${u}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))};gr.propTypes={notification:x.object,rows:x.number,minimal:x.bool};function gr({notification:e,rows:t=2,minimal:n=!1}){const[r,s]=g.useState(!1),[i,a]=g.useState(""),{t:c,locale:l}=J(),{palette:u}=ee(),d=g.useMemo(()=>{const{attachments:h}=e||{};if(!h)return!1;try{return h.length>0}catch{return!1}},[e]),f=g.useMemo(()=>{const{blocks:h}=e||{};if(!h)return!1;try{return h.length>0}catch{return!1}},[e]),p=g.useMemo(()=>{const{description:h}=e||{};return!!h},[e]),w=g.useMemo(()=>{const{data:h}=e||{};return!He(h)},[e]),y=g.useMemo(()=>d||f||p||w,[d,f,p,w]);if(g.useEffect(()=>{xi((e==null?void 0:e.description)??"",l).then(h=>{a(h)})},[e==null?void 0:e.description,l]),!y)return null;const m=()=>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=>{const{target:j}=h;j.getAttribute("data-name")==="toggle-expanded"&&(s(!r),h.customPreventRedirect=!0)};return o.jsxs(vi,{color:n?u.primary.contrastText:"",children:[o.jsx(C,{className:"text-container",component:"div",onClick:_,children:i&&(!r&&t>0?o.jsx(go,{basedOn:"letters",unsafeHTML:ct(i),maxLine:t,ellipsisHTML:ct(m())}):o.jsx(z,{component:"div",className:`content ${t===0?"ellipsis":""}`,style:{whiteSpace:"pre-line!important"},dangerouslySetInnerHTML:{__html:ct(`${i}${m()}`)}}))}),!n&&(d||w)?o.jsx(Gt,{severity:e.severity,notification:e}):null]})}const vi=G(C)`
|
|
141
|
-
width: 100%;
|
|
142
|
-
color: ${e=>e.color?e.color:e.theme.palette.text.secondary};
|
|
143
|
-
.text-container {
|
|
144
|
-
word-wrap: break-word;
|
|
145
|
-
word-break: break-all;
|
|
146
|
-
color: ${e=>e.color?e.color:e.theme.palette.text.secondary};
|
|
147
|
-
.toggle-btn {
|
|
148
|
-
display: inline-block;
|
|
149
|
-
white-space: nowrap;
|
|
150
|
-
cursor: pointer;
|
|
151
|
-
margin-left: 4px;
|
|
152
|
-
color: ${e=>e.theme.palette.secondary.main};
|
|
153
|
-
}
|
|
154
|
-
.content.ellipsis {
|
|
155
|
-
overflow: hidden;
|
|
156
|
-
text-overflow: ellipsis;
|
|
157
|
-
word-break: break-all;
|
|
158
|
-
display: block;
|
|
159
|
-
display: -webkit-box;
|
|
160
|
-
-webkit-box-orient: vertical;
|
|
161
|
-
-webkit-line-clamp: 2;
|
|
162
|
-
line-height: 1.25;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
`,yi=g.memo(gr);var L=function(t,n,r){return Nn.call(n,"css")?o.jsx(zn,Un(t,n),r):o.jsx(t,n,r)},Ne=function(t,n,r){return Nn.call(n,"css")?o.jsxs(zn,Un(t,n),r):o.jsxs(t,n,r)};/**
|
|
166
|
-
* (c) Iconify
|
|
167
|
-
*
|
|
168
|
-
* For the full copyright and license information, please view the license.txt or license.gpl.txt
|
|
169
|
-
* files at https://github.com/iconify/iconify
|
|
170
|
-
*
|
|
171
|
-
* Licensed under MIT.
|
|
172
|
-
*
|
|
173
|
-
* @license MIT
|
|
174
|
-
* @version 3.1.1
|
|
175
|
-
*/const xr=Object.freeze({left:0,top:0,width:16,height:16}),Ze=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ke=Object.freeze({...xr,...Ze}),pt=Object.freeze({...ke,body:"",hidden:!1});function bi(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 Sn(e,t){const n=bi(e,t);for(const r in pt)r in Ze?r in e&&!(r in n)&&(n[r]=Ze[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function wi(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 ji(e,t,n){const r=e.icons,s=e.aliases||Object.create(null);let i={};function a(c){i=Sn(r[c]||s[c],i)}return a(t),n.forEach(a),Sn(e,i)}function Si(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=wi(e);for(const s in r){const i=r[s];i&&(t(s,ji(e,s,i)),n.push(s))}return n}const we=/^[a-z0-9]+(-[a-z0-9]+)*$/,ye=(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(),u={provider:s.length>0?s[0]:r,prefix:l,name:c};return t&&!Fe(u)?null:u}const i=s[0],a=i.split("-");if(a.length>1){const c={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!Fe(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:i};return t&&!Fe(c,n)?null:c}return null},Fe=(e,t)=>e?!!((e.provider===""||e.provider.match(we))&&(t&&e.prefix===""||e.prefix.match(we))&&e.name.match(we)):!1,Ci={provider:"",aliases:{},not_found:{},...xr};function lt(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function _i(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!lt(e,Ci))return null;const n=t.icons;for(const s in n){const i=n[s];if(!s.match(we)||typeof i.body!="string"||!lt(i,pt))return null}const r=t.aliases||Object.create(null);for(const s in r){const i=r[s],a=i.parent;if(!s.match(we)||typeof a!="string"||!n[a]&&!r[a]||!lt(i,pt))return null}return t}const Xe=Object.create(null);function Ii(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function X(e,t){const n=Xe[e]||(Xe[e]=Object.create(null));return n[t]||(n[t]=Ii(e,t))}function Kt(e,t){return _i(t)?Si(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function ki(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function Ti(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(Xe)).forEach(s=>{(typeof s=="string"&&typeof t=="string"?[t]:Object.keys(Xe[s]||{})).forEach(a=>{const c=X(s,a);n=n.concat(Object.keys(c.icons).map(l=>(s!==""?"@"+s+":":"")+a+":"+l))})}),n}let Qt=!1;function Ei(e){return Qt}function Te(e){const t=typeof e=="string"?ye(e,!0,Qt):e;if(t){const n=X(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Pi(e,t){const n=ye(e,!0,Qt);if(!n)return!1;const r=X(n.provider,n.prefix);return ki(r,n.name,t)}function vr(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const n=e.prefix;if(!Fe({provider:t,prefix:n,name:"a"}))return!1;const r=X(t,n);return!!Kt(r,e)}function Li(e){return!!Te(e)}function Ri(e){const t=Te(e);return t?{...ke,...t}:null}const yr=Object.freeze({width:null,height:null}),br=Object.freeze({...yr,...Ze}),Di=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ai=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ft(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(Di);if(r===null||!r.length)return e;const s=[];let i=r.shift(),a=Ai.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 $i=e=>e==="unset"||e==="undefined"||e==="none";function nt(e,t){const n={...ke,...e},r={...br,...t},s={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,r].forEach(y=>{const m=[],_=y.hFlip,h=y.vFlip;let j=y.rotate;_?h?j+=2:(m.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),m.push("scale(-1 1)"),s.top=s.left=0):h&&(m.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),m.push("scale(1 -1)"),s.top=s.left=0);let v;switch(j<0&&(j-=Math.floor(j/4)*4),j=j%4,j){case 1:v=s.height/2+s.top,m.unshift("rotate(90 "+v.toString()+" "+v.toString()+")");break;case 2:m.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:v=s.width/2+s.left,m.unshift("rotate(-90 "+v.toString()+" "+v.toString()+")");break}j%2===1&&(s.left!==s.top&&(v=s.left,s.left=s.top,s.top=v),s.width!==s.height&&(v=s.width,s.width=s.height,s.height=v)),m.length&&(i='<g transform="'+m.join(" ")+'">'+i+"</g>")});const a=r.width,c=r.height,l=s.width,u=s.height;let d,f;a===null?(f=c===null?"1em":c==="auto"?u:c,d=ft(f,l/u)):(d=a==="auto"?l:a,f=c===null?ft(d,u/l):c==="auto"?u:c);const p={},w=(y,m)=>{$i(m)||(p[y]=m.toString())};return w("width",d),w("height",f),p.viewBox=s.left.toString()+" "+s.top.toString()+" "+l.toString()+" "+u.toString(),{attributes:p,body:i}}const Mi=/\sid="(\S+)"/g,Oi="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Ni=0;function wr(e,t=Oi){const n=[];let r;for(;r=Mi.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+(Ni++).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},jr={local:new Set,session:new Set};let Zt=!1;function zi(e){Zt=e}const Cn="iconify2",Ie="iconify",Sr=Ie+"-count",_n=Ie+"-version",Cr=36e5,Ui=168;function ht(e,t){try{return e.getItem(t)}catch{}}function Xt(e,t,n){try{return e.setItem(t,n),!0}catch{}}function In(e,t){try{e.removeItem(t)}catch{}}function mt(e,t){return Xt(e,Sr,t.toString())}function gt(e){return parseInt(ht(e,Sr))||0}let ze=typeof window>"u"?{}:window;function _r(e){const t=e+"Storage";try{if(ze&&ze[t]&&typeof ze[t].length=="number")return ze[t]}catch{}ce[e]=!1}function Ir(e,t){const n=_r(e);if(!n)return;const r=ht(n,_n);if(r!==Cn){if(r){const c=gt(n);for(let l=0;l<c;l++)In(n,Ie+l.toString())}Xt(n,_n,Cn),mt(n,0);return}const s=Math.floor(Date.now()/Cr)-Ui,i=c=>{const l=Ie+c.toString(),u=ht(n,l);if(typeof u=="string"){try{const d=JSON.parse(u);if(typeof d=="object"&&typeof d.cached=="number"&&d.cached>s&&typeof d.provider=="string"&&typeof d.data=="object"&&typeof d.data.prefix=="string"&&t(d,c))return!0}catch{}In(n,l)}};let a=gt(n);for(let c=a-1;c>=0;c--)i(c)||(c===a-1?(a--,mt(n,a)):jr[e].add(c))}function kr(){if(!Zt){zi(!0);for(const e in ce)Ir(e,t=>{const n=t.data,r=t.provider,s=n.prefix,i=X(r,s);if(!Kt(i,n).length)return!1;const a=n.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,a):a,!0})}}function Tr(e,t){switch(e){case"local":case"session":ce[e]=t;break;case"all":for(const n in ce)ce[n]=t;break}}const xt=Object.create(null);function Er(e,t){xt[e]=t}function vt(e){return xt[e]||xt[""]}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 rt=Object.create(null),be=["https://api.simplesvg.com","https://api.unisvg.com"],qe=[];for(;be.length>0;)be.length===1||Math.random()>.5?qe.push(be.shift()):qe.push(be.pop());rt[""]=Jt({resources:["https://api.iconify.design"].concat(qe)});function Pr(e,t){const n=Jt(t);return n===null?!1:(rt[e]=n,!0)}function st(e){return rt[e]}function Bi(){return Object.keys(rt)}const Hi=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Je=Hi();function Vi(e){Je=e}function Fi(){return Je}function qi(e,t){const n=st(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 Wi(e){return e===404}const Gi=(e,t,n)=>{const r=[],s=qi(e,t),i="icons";let a={type:i,provider:e,prefix:t,icons:[]},c=0;return n.forEach((l,u)=>{c+=l.length+1,c>=s&&u>0&&(r.push(a),a={type:i,provider:e,prefix:t,icons:[]},c=l.length),a.icons.push(l)}),r.push(a),r};function Ki(e){if(typeof e=="string"){const t=st(e);if(t)return t.path}return"/"}const Qi=(e,t,n)=>{if(!Je){n("abort",424);return}let r=Ki(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;Je(e+r).then(i=>{const a=i.status;if(a!==200){setTimeout(()=>{n(Wi(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)})},Zi={prepare:Gi,send:Qi};function Xi(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)),u=l[a]||(l[a]=X(i,a));let d;c in u.icons?d=t.loaded:a===""||u.missing.has(c)?d=t.missing:d=t.pending;const f={provider:i,prefix:a,name:c};d.push(f)}),t}function Lr(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(s=>s.id!==t))})}function Ji(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 u=l.name;if(e.icons[u])a.loaded.push({provider:r,prefix:s,name:u});else if(e.missing.has(u))a.missing.push({provider:r,prefix:s,name:u});else return n=!0,!0;return!1}),a.pending.length!==c&&(n||Lr([e],i.id),i.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),i.abort))})}))}let Yi=0;function ea(e,t,n){const r=Yi++,s=Lr.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 ta(e,t=!0,n=!1){const r=[];return e.forEach(s=>{const i=typeof s=="string"?ye(s,t,n):s;i&&r.push(i)}),r}var na={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ra(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 S=e.resources.slice(0);for(a=[];S.length>1;){const T=Math.floor(Math.random()*S.length);a.push(S[T]),S=S.slice(0,T).concat(S.slice(T+1))}a=a.concat(S)}else a=e.resources.slice(i).concat(e.resources.slice(0,i));const c=Date.now();let l="pending",u=0,d,f=null,p=[],w=[];typeof r=="function"&&w.push(r);function y(){f&&(clearTimeout(f),f=null)}function m(){l==="pending"&&(l="aborted"),y(),p.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),p=[]}function _(S,T){T&&(w=[]),typeof S=="function"&&w.push(S)}function h(){return{startTime:c,payload:t,status:l,queriesSent:u,queriesPending:p.length,subscribe:_,abort:m}}function j(){l="failed",w.forEach(S=>{S(void 0,d)})}function v(){p.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),p=[]}function D(S,T,I){const E=T!=="success";switch(p=p.filter(k=>k!==S),l){case"pending":break;case"failed":if(E||!e.dataAfterTimeout)return;break;default:return}if(T==="abort"){d=I,j();return}if(E){d=I,p.length||(a.length?M():j());return}if(y(),v(),!e.random){const k=e.resources.indexOf(S.resource);k!==-1&&k!==e.index&&(e.index=k)}l="completed",w.forEach(k=>{k(I)})}function M(){if(l!=="pending")return;y();const S=a.shift();if(S===void 0){if(p.length){f=setTimeout(()=>{y(),l==="pending"&&(v(),j())},e.timeout);return}j();return}const T={status:"pending",resource:S,callback:(I,E)=>{D(T,I,E)}};p.push(T),u++,f=setTimeout(M,e.rotate),n(S,t,T.callback)}return setTimeout(M),h}function Rr(e){const t={...na,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function s(c,l,u){const d=ra(t,c,l,(f,p)=>{r(),u&&u(f,p)});return n.push(d),d}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 kn(){}const ut=Object.create(null);function sa(e){if(!ut[e]){const t=st(e);if(!t)return;const n=Rr(t),r={config:t,redundancy:n};ut[e]=r}return ut[e]}function Dr(e,t,n){let r,s;if(typeof e=="string"){const i=vt(e);if(!i)return n(void 0,424),kn;s=i.send;const a=sa(e);a&&(r=a.redundancy)}else{const i=Jt(e);if(i){r=Rr(i);const a=e.resources?e.resources[0]:"",c=vt(a);c&&(s=c.send)}}return!r||!s?(n(void 0,424),kn):r.query(t,s,n)().abort}function oa(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in ce)Ir(r,s=>{const i=s.data;return s.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===t});return!0}function ia(e,t){Zt||kr();function n(r){let s;if(!ce[r]||!(s=_r(r)))return;const i=jr[r];let a;if(i.size)i.delete(a=Array.from(i).shift());else if(a=gt(s),!mt(s,a+1))return;const c={cached:Math.floor(Date.now()/Cr),provider:e.provider,data:t};return Xt(s,Ie+a.toString(),JSON.stringify(c))}t.lastModified&&!oa(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Tn(){}function aa(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Ji(e)}))}function ca(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=vt(n)))return;i.prepare(n,r,s).forEach(c=>{Dr(n,c,l=>{if(typeof l!="object")c.icons.forEach(u=>{e.missing.add(u)});else try{const u=Kt(e,l);if(!u.length)return;const d=e.pendingIcons;d&&u.forEach(f=>{d.delete(f)}),ia(e,l)}catch(u){console.error(u)}aa(e)})})}))}const la=e=>{const n=X(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},Yt=(e,t)=>{const n=ta(e,!0,Ei()),r=Xi(n);if(!r.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(r.loaded,r.missing,r.pending,Tn)}),()=>{l=!1}}const s=Object.create(null),i=[];let a,c;return r.pending.forEach(l=>{const{provider:u,prefix:d}=l;if(d===c&&u===a)return;a=u,c=d,i.push(X(u,d));const f=s[u]||(s[u]=Object.create(null));f[d]||(f[d]=[])}),r.pending.forEach(l=>{const{provider:u,prefix:d,name:f}=l,p=X(u,d),w=p.pendingIcons||(p.pendingIcons=new Set);w.has(f)||(w.add(f),s[u][d].push(f))}),i.forEach(l=>{const{provider:u,prefix:d}=l;s[u][d].length&&ca(l,s[u][d])}),t?ea(t,r,i):Tn},ua=e=>new Promise((t,n)=>{const r=typeof e=="string"?ye(e,!0):e;if(!r){n(e);return}Yt([r||e],s=>{if(s.length&&r){const i=Te(r);if(i){t({...ke,...i});return}}n(e)})});function Ar(e,t){const n={...e};for(const r in t){const s=t[r],i=typeof s;r in yr?(s===null||s&&(i==="string"||i==="number"))&&(n[r]=s):i===typeof n[r]&&(n[r]=r==="rotate"?s%4:s)}return n}const ot={...br,inline:!1},dt="iconify",yt="iconify-inline",re="iconifyData"+Date.now();let ue=[];function Ee(e){for(let t=0;t<ue.length;t++){const n=ue[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function $r(e,t=!1){let n=Ee(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},ue.push(n),n)}function da(){if(document.documentElement)return $r(document.documentElement);ue.push({node:()=>document.documentElement})}function pa(e){ue=ue.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function Pe(){return ue}function fa(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let je=null;const ha={childList:!0,subtree:!0,attributes:!0};function Mr(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,je&&je(e)}))}function ma(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[re]!==void 0){n.paused||Mr(e);return}}}function Or(e,t){e.observer.instance.observe(t,ha)}function Ye(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(ma.bind(null,e)),Or(e,n),t.paused||Mr(e))}function En(){Pe().forEach(Ye)}function Nr(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 ga(e){const t=je!==null;if(je!==e&&(je=e,t&&Pe().forEach(Nr)),t){En();return}fa(En)}function bt(e){(e?[e]:Pe()).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 xa(e){if(e){const t=Ee(e);t&&bt(t)}else bt()}function wt(e){(e?[e]:Pe()).forEach(t=>{if(!t.observer){Ye(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?Or(t,r):Ye(t);else return}})}function va(e){if(e){const t=Ee(e);t&&wt(t)}else wt()}function zr(e,t=!1){const n=$r(e,t);return Ye(n),n}function Ur(e){const t=Ee(e);t&&(Nr(t),pa(e))}function ya(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,r=t.customisations;for(const s in ot)if(n[s]!==r[s])return!0;return!1}function ba(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 wa=/[\s,]+/;function ja(e,t){t.split(wa).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Sa=["width","height"],Ca=["inline","hFlip","vFlip"];function _a(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function Ia(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&ye(t,!0);if(!n)return null;const r={...ot,inline:e.classList&&e.classList.contains(yt)};Sa.forEach(c=>{const l=e.getAttribute("data-"+c);l&&(r[c]=l)});const s=e.getAttribute("data-rotate");typeof s=="string"&&(r.rotate=ba(s));const i=e.getAttribute("data-flip");typeof i=="string"&&ja(r,i),Ca.forEach(c=>{const l="data-"+c,u=_a(e.getAttribute(l),l);typeof u=="boolean"&&(r[c]=u)});const a=e.getAttribute("data-mode");return{name:t,icon:n,customisations:r,mode:a}}const ka="svg."+dt+", i."+dt+", span."+dt+", i."+yt+", span."+yt;function Ta(e){const t=[];return e.querySelectorAll(ka).forEach(n=>{const r=n[re]||n.tagName.toLowerCase()!=="svg"?Ia(n):null;r&&t.push({node:n,props:r})}),t}function Br(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 Se;function Ea(){try{Se=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Se=null}}function Pa(e){return Se===void 0&&Ea(),Se?Se.createHTML(e):e}function Hr(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function Vr(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 Fr(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 qr(e,t,n){let r;try{r=document.createElement("span")}catch{return e}const s=t.customisations,i=nt(n,s),a=e[re],c=Br(wr(i.body),{"aria-hidden":"true",role:"img",...i.attributes});r.innerHTML=Pa(c);const l=r.childNodes[0],u=e.attributes;for(let y=0;y<u.length;y++){const m=u.item(y),_=m.name;_!=="class"&&!l.hasAttribute(_)&&l.setAttribute(_,m.value)}const d=Hr(t.icon),f=Vr(l,d,new Set(a&&a.addedClasses),e),p=Fr(l,s.inline?{"vertical-align":"-0.125em"}:{},a&&a.addedStyles),w={...t,status:"loaded",addedClasses:f,addedStyles:p};return l[re]=w,e.parentNode&&e.parentNode.replaceChild(l,e),l}function La(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Ra(e){return"data:image/svg+xml,"+La(e)}function Da(e){return'url("'+Ra(e)+'")'}const Aa={display:"inline-block"},jt={"background-color":"currentColor"},Wr={"background-color":"transparent"},Pn={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Ln={"-webkit-mask":jt,mask:jt,background:Wr};for(const e in Ln){const t=Ln[e];for(const n in Pn)t[e+"-"+n]=Pn[n]}function Rn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function $a(e,t,n,r){const s=t.customisations,i=nt(n,s),a=i.attributes,c=e[re],l=Br(i.body,{...a,width:n.width+"",height:n.height+""}),u=Hr(t.icon),d=Vr(e,u,new Set(c&&c.addedClasses)),p={"--svg":Da(l),width:Rn(a.width),height:Rn(a.height),...Aa,...r?jt:Wr};s.inline&&(p["vertical-align"]="-0.125em");const w=Fr(e,p,c&&c.addedStyles),y={...t,status:"loaded",addedClasses:d,addedStyles:w};return e[re]=y,e}let Ue=!1;function Ma(){Ue||(Ue=!0,setTimeout(()=>{Ue&&(Ue=!1,xe())}))}function xe(e,t=!1){const n=Object.create(null);function r(s,i){const{provider:a,prefix:c,name:l}=s,u=X(a,c),d=u.icons[l];if(d)return{status:"loaded",icon:d};if(u.missing.has(l))return{status:"missing"};if(i&&!la(s)){const f=n[a]||(n[a]=Object.create(null));(f[c]||(f[c]=new Set)).add(l)}return{status:"loading"}}(e?[e]:Pe()).forEach(s=>{const i=typeof s.node=="function"?s.node():s.node;if(!i||!i.querySelectorAll)return;let a=!1,c=!1;function l(u,d,f){if(c||(c=!0,bt(s)),u.tagName.toUpperCase()!=="SVG"){const p=d.mode,w=p==="mask"||(p==="bg"?!1:p==="style"?f.body.indexOf("currentColor")!==-1:null);if(typeof w=="boolean"){$a(u,d,{...ke,...f},w);return}}qr(u,d,f)}Ta(i).forEach(({node:u,props:d})=>{const f=u[re];if(!f){const{status:w,icon:y}=r(d.icon,!0);if(y){l(u,d,y);return}a=a||w==="loading",u[re]={...d,status:w};return}let p;if(ya(f,d)){if(p=r(d.icon,f.name!==d.name),!p.icon){a=a||p.status==="loading",Object.assign(f,{...d,status:p.status});return}}else{if(f.status!=="loading")return;if(p=r(d.icon,!1),!p.icon){f.status=p.status;return}}l(u,d,p.icon)}),s.temporary&&!a?Ur(i):t&&a?zr(i,!0):c&&s.observer&&wt(s)});for(const s in n){const i=n[s];for(const a in i){const c=i[a];Yt(Array.from(c).map(l=>({provider:s,prefix:a,name:l})),Ma)}}}function Oa(e){const t=Ee(e);t?xe(t):xe({node:e,temporary:!0},!0)}function Gr(e,t,n=!1){const r=Te(e);if(!r)return null;const s=ye(e),i=Ar(ot,t||{}),a=qr(document.createElement("span"),{name:e,icon:s,customisations:i},r);return n?a.outerHTML:a}function Na(){return"3.1.1"}function za(e,t){return Gr(e,t,!1)}function Ua(e,t){return Gr(e,t,!0)}function Ba(e,t){const n=Te(e);if(!n)return null;const r=Ar(ot,t||{});return nt(n,r)}function Ha(e){e?Oa(e):xe()}if(typeof document<"u"&&typeof window<"u"){da();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"||!vr(r))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{ga(xe),xe()})}function Va(e,t){Tr(e,t!==!1)}function Fa(e){Tr(e,!0)}Er("",Zi);if(typeof document<"u"&&typeof window<"u"){kr();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;Pr(n,s)||console.error(r)}catch{console.error(r)}}}}const qa={getAPIConfig:st,setAPIModule:Er,sendAPIQuery:Dr,setFetch:Vi,getFetch:Fi,listAPIProviders:Bi},Wa={_api:qa,addAPIProvider:Pr,loadIcons:Yt,loadIcon:ua,iconExists:Li,getIcon:Ri,listIcons:Ti,addIcon:Pi,addCollection:vr,replaceIDs:wr,calculateSize:ft,buildIcon:nt,getVersion:Na,renderSVG:za,renderHTML:Ua,renderIcon:Ba,scan:Ha,observe:zr,stopObserving:Ur,pauseObserver:xa,resumeObserver:va,enableCache:Va,disableCache:Fa};try{self.Iconify===void 0&&(self.Iconify=Wa)}catch{}var en={},Ga=B;Object.defineProperty(en,"__esModule",{value:!0});var Kr=en.default=void 0,Ka=Ga(H()),Qa=o;Kr=en.default=(0,Ka.default)((0,Qa.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 tn({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(`
|
|
176
|
-
`);return n.searchParams.set("report","server"),n.searchParams.set("context",`[Enter feedback here]
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
<!--
|
|
181
|
-
[Server Info]
|
|
182
|
-
${r}
|
|
183
|
-
* Page: ${window.location.href}
|
|
184
|
-
-->
|
|
185
|
-
`),L(C,{sx:{mx:{xs:0,md:2}},children:L(It,{sx:{color:"text.primary"},target:"_blank",href:n.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}tn.propTypes={infos:x.arrayOf(x.shape({label:x.string,value:x.string}))};tn.defaultProps={infos:[]};var nn={},Za=B;Object.defineProperty(nn,"__esModule",{value:!0});var St=nn.default=void 0,Xa=Za(H()),Dn=o;St=nn.default=(0,Xa.default)([(0,Dn.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,Dn.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");function te({children:e}){return Z(n=>n.breakpoints.down("md"))?o.jsx(Ce,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:o.jsx(C,{sx:{display:"flex",alignItems:"center",gap:1},children:o.jsx(St,{fontSize:"small"})})}):o.jsxs(C,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.jsx(St,{fontSize:"small"}),e]})}te.propTypes={children:x.node.isRequired};const Ja="https://launcher.arcblock.io/",Ya=30*24*60*60*1e3;function rn({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...s}){var M,S,T,I,E,k;const{t:i,locale:a}=J(),c=tt(),[l,u]=Xn({safeIframeRef:null,popoverAnchorEl:null}),d=g.useRef(null),f=Z(P=>P.breakpoints.down("md")),{sx:p={},...w}=s,y=f?"mobile":"desktop",m=Zn(async()=>{const[P,de]=await Promise.all([c.api.getLauncherSession({input:{launcherSessionId:r,launcherUrl:e}}),qn({launcherUrl:e||Ja,nftDid:n,launcherSessionId:r,locale:a})]);if(P!=null&&P.error)throw new Error(P.error);return{launcherSession:P.launcherSession,subscriptionURL:de}},[a]);if(m.loading)return o.jsx(ae,{label:o.jsxs(te,{children:[!f&&i("expiration.desktop.loading"),o.jsx(ne,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...w});if(m.error)return console.error(m.error),o.jsx(ae,{label:o.jsx(te,{children:i(`expiration.${y}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...w,onClick:()=>m.retry()});const _=P=>{u({popoverAnchorEl:P.currentTarget})},h=()=>{u({popoverAnchorEl:null})},j=(M=m.value)==null?void 0:M.launcherSession;let v="success";[$.LAUNCH_SESSION_STATUS.overdue,$.LAUNCH_SESSION_STATUS.canceled,$.LAUNCH_SESSION_STATUS.terminated].includes((T=(S=m.value)==null?void 0:S.launcherSession)==null?void 0:T.status)&&(v="error");let D=null;if(j.expirationDate&&!j.subscription){const P=he(j.expirationDate).diff(he(),"ms");D=i(`expiration.${y}.tips.${v}`,{validity:Qn(P,{locale:Wn(a),compact:!0,verbose:!0})}),P>0&&P<=Ya&&(v="warning")}return o.jsxs(o.Fragment,{children:[o.jsx(ae,{label:o.jsx(te,{children:D||((E=(I=j==null?void 0:j.subscription)==null?void 0:I.product)==null?void 0:E.name)||i("common.subscription")}),color:v,variant:v!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...w,onClick:_}),o.jsx(Bn,{id:"popover-info",open:!!l.popoverAnchorEl,anchorEl:l.popoverAnchorEl,onClose:h,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:(k=m.value)==null?void 0:k.subscriptionURL})})})]})}rn.propTypes={chainHost:x.string.isRequired,nftId:x.string,launcherSessionId:x.string,sx:x.object,retention:x.number,launcherUrl:x.string.isRequired};rn.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};const ec=30*24*60*60*1e3,tc="https://launcher.arcblock.io/";function sn({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...s}){var S,T,I,E,k,P,de;const{t:i,locale:a}=J(),[c,l]=Xn({safeIframeRef:null,popoverAnchorEl:null}),u=g.useRef(null),d=Z(V=>V.breakpoints.down("md")),f=tt(),{sx:p={},...w}=s,y=d?"mobile":"desktop",m=Zn(async()=>{const[V,Le]=await Promise.all([f.api.getLauncherSession({input:{launcherSessionId:r||n,launcherUrl:e}}),qn({launcherUrl:e||tc,nftDid:n,launcherSessionId:r,locale:a})]);if(V!=null&&V.error)throw new Error(V.error);return{launcherSession:V.launcherSession,subscriptionURL:Le}},[a]);if(m.loading)return o.jsx(ae,{label:o.jsxs(te,{children:[!d&&i("expiration.desktop.loading"),o.jsx(ne,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...w});if(m.error)return console.error(m.error),o.jsx(ae,{label:o.jsx(te,{children:i(`expiration.${y}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...w,onClick:()=>m.retry()});const _=(T=(S=m.value)==null?void 0:S.launcherSession)==null?void 0:T.expirationDate,h=he(_).isBefore(he()),j=he(_).diff(he(),"ms");let v="success";j<=ec&&(v="warning"),h&&(v="error");const D=V=>{l({popoverAnchorEl:V.currentTarget})},M=()=>{l({popoverAnchorEl:null})};return o.jsxs(o.Fragment,{children:[((E=(I=m.value)==null?void 0:I.launcherSession)==null?void 0:E.subscription)&&o.jsx(ae,{label:o.jsx(te,{children:i("expiration.desktop.nextInvoice",{date:Ws(_,a)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...p},...w,onClick:D}),!((P=(k=m.value)==null?void 0:k.launcherSession)!=null&&P.subscription)&&o.jsx(ae,{label:o.jsx(te,{children:i(`expiration.${y}.tips.${v}`,{validity:Qn(j,{locale:Wn(a),compact:!0,verbose:!0})})}),color:v,variant:v!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...w,onClick:D}),o.jsx(Bn,{id:"popover-info",open:!!c.popoverAnchorEl,anchorEl:c.popoverAnchorEl,onClose:M,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:(de=m.value)==null?void 0:de.subscriptionURL})})})]})}sn.propTypes={chainHost:x.string.isRequired,nftId:x.string,launcherSessionId:x.string,sx:x.object,retention:x.number,launcherUrl:x.string.isRequired};sn.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};var on={},nc=B;Object.defineProperty(on,"__esModule",{value:!0});var Qr=on.default=void 0,rc=nc(H()),sc=o;Qr=on.default=(0,rc.default)((0,sc.jsx)("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"}),"Fullscreen");var an={},oc=B;Object.defineProperty(an,"__esModule",{value:!0});var Zr=an.default=void 0,ic=oc(H()),ac=o;Zr=an.default=(0,ic.default)((0,ac.jsx)("path",{d:"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"}),"FullscreenExit");const cc={width:24,height:24,body:'<path fill="currentColor" d="M6.4 18L5 16.6L14.6 7H6V5h12v12h-2V8.4L6.4 18Z"/>'};function cn({children:e,style:t,...n}){return o.jsx(Ms,{style:t,...n,children:e})}cn.propTypes={children:x.any.isRequired,style:x.object};cn.defaultProps={style:{}};const O={yellow:"#FFCF71",grey:"#aaaaaa",reverse:"#444",success:"#3ab39d",running:"#34BE74",error:"#D0021B",primary:"#1DC1C7"},We={added:O.grey,waiting:O.yellow,downloading:O.yellow,extracting:O.yellow,downloaded:O.grey,installing:O.yellow,installed:O.grey,starting:O.yellow,running:O.running,stopping:O.yellow,stopped:O.reverse,error:O.error,upgrading:O.yellow,restarting:O.yellow,corrupted:O.error,deleting:O.yellow,resource:O.primary},lc={added:"primary",waiting:"info",downloading:"info",extracting:"info",downloaded:"primary",installing:"info",installed:"primary",starting:"info",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"info",restarting:"info",corrupted:"error",deleting:"warning",resource:"primary"};function Xr({isResource:e,status:t,variant:n,source:r,progress:s,...i}){const{t:a}=g.useContext(kt),c=N.isInProgress(t),l=e&&t==="stopped"?"resource":t,u=a(`blocklet.status.${l}`);return n==="pin"?o.jsx(Ce,{title:a("blocklet.statusTip",{status:u}),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:We[l],style:{opacity:.15}}),o.jsx(C,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:We[l]})]})}):n==="dot"?o.jsx(Ce,{title:a("blocklet.statusTip",{status:u}),children:o.jsx(yo,{color:We[l],...i})}):o.jsxs(cn,{type:lc[l],...i,children:[c&&o.jsx(ne,{size:12,color:"inherit",style:{marginRight:5}}),u,l==="downloading"&&s?o.jsx("div",{style:{marginLeft:5},children:`${s} %`}):null]})}Xr.propTypes={status:x.string.isRequired,variant:x.oneOf(["dot","tag","pin"]),source:x.string,progress:x.number,isResource:x.bool};Xr.defaultProps={isResource:!1,variant:"tag",source:"",progress:0};function uc(){const{inFullPage:e,toggleFullPage:t}=cs();return L(Ct,{onClick:t,children:e?L(Zr,{sx:{transform:"scale(1.3)"}}):L(Qr,{sx:{transform:"scale(1.3)"}})})}function ln({children:e}){var _;const{t}=J(),{loading:n,error:r,actions:{refreshBlocklet:s},env:i,blocklet:a}=ve(),{info:c}=Gs(),l=Is(),u=Z(h=>h.breakpoints.down("md")),{appId:d,version:f}=i,p=[{label:"App ID",value:d},{label:"App Version",value:f},{label:"App Bundle Name",value:(_=a==null?void 0:a.meta)==null?void 0:_.bundleName},{label:"Server Id",value:c.did},{label:"Server Version",value:c.version}],w=h=>{var v,D,M,S;const j=Array.isArray(h)?h:[h];if(u||j.unshift(L(uc,{})),a){const T={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};Ks(a)?j.unshift(L(rn,{chainHost:(v=a==null?void 0:a.controller)==null?void 0:v.chainHost,nftId:(D=a==null?void 0:a.controller)==null?void 0:D.nftId,launcherSessionId:(M=a==null?void 0:a.controller)==null?void 0:M.launcherSessionId,launcherUrl:(S=a==null?void 0:a.controller)==null?void 0:S.launcherUrl,sx:T})):c.ownerNft&&c.launcher&&j.unshift(L(sn,{chainHost:c.launcher.chainHost,launcherUrl:c.launcher.url,nftId:c.ownerNft.did,launcherSessionId:c.ownerNft.launcherSessionId,sx:T}))}return j},y=xo({blocklet:a}),m={logo:y?L("img",{src:y,alt:"logo"}):null,brandAddon:L(C,{children:a&&Ne(C,{component:"a",target:"_blank",href:window.blocklet.appUrl,rel:"noopener noreferrer",title:window.blocklet.appName,display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,sx:{py:1,px:2,border:"1px solid",borderColor:"text.disabled",borderRadius:"30px",cursor:"pointer"},children:[L(Ce,{title:N.isRunning(a==null?void 0:a.status)?void 0:t(`blocklet.status.${a==null?void 0:a.status}`),children:L(C,{sx:{width:8,height:8,borderRadius:"50%"},bgcolor:We[a==null?void 0:a.status]})}),L(C,{sx:{lineHeight:1,color:"text.secondary",maxWidth:u?66:240,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:N.getDisplayName(a)}),L(C,{component:Os,icon:cc,sx:{color:"text.secondary"}})]})})};return Ne(dc,{legacy:!1,fullWidth:!0,headerAddons:w,headerProps:m,footerProps:{addon:L(tn,{infos:p})},children:[!a&&n&&L(Ke,{relative:"parent",children:L(ne,{})}),!a&&r&&Ne(Ke,{relative:"parent",children:[Ne(C,{display:"flex",alignItems:"center",children:[L(Kr,{color:"error",sx:{marginRight:1}}),Pt(r)]}),L(Tt,{onClick:()=>s(),children:L("span",{style:{textDecoration:"underline"},children:t("common.retry")})})]}),!!a&&L(C,{flex:1,padding:u?2:3,display:"flex",flexDirection:"column",children:L(Ns,{FallbackComponent:as,resetKeys:[l.pathname],children:e})})]})}ln.propTypes={children:x.any};ln.defaultProps={children:null};const dc=G(is)`
|
|
186
|
-
div.dashboard-content {
|
|
187
|
-
padding: 0;
|
|
188
|
-
}
|
|
189
|
-
.header-addons .locales {
|
|
190
|
-
max-height: 400px;
|
|
191
|
-
overflow-y: auto;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.header-brand-addon {
|
|
195
|
-
display: block;
|
|
196
|
-
}
|
|
197
|
-
`;function pc(){var _;const{t:e,locale:t}=J(),{blocklet:n,launcherSession:r,refreshSubscription:s}=ve(),{connectApi:i,session:a,api:c}=Qs(),[l,u]=g.useState(!1),[d,f]=g.useState(""),[p,w]=po({subscriptionURL:"#"});if(g.useEffect(()=>{var h,j;hn(n,r)&&Zs({launcherSessionId:(h=n==null?void 0:n.controller)==null?void 0:h.launcherSessionId,launcherUrl:(j=n==null?void 0:n.controller)==null?void 0:j.launcherUrl,locale:t}).then(v=>{w({subscriptionURL:v})}).catch(v=>{console.error("get subscription url error:",v)})},[n,r]),g.useEffect(()=>{var h;if((h=n.controller)!=null&&h.launcherUrl){const j=me(n.controller.launcherUrl,"__blocklet__.js?type=json");fetch(j).then(v=>v.json()).then(v=>{var S,T;const D=(T=(S=v.componentMountPoints)==null?void 0:S.find(I=>I.did==="z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk"))==null?void 0:T.mountPoint,M=me(n.controller.launcherUrl,D);f(M)})}},[(_=n.controller)==null?void 0:_.launcherUrl]),!mn(r)&&(!n||!r||!Xs(n)||r.status===$.LAUNCH_SESSION_STATUS.installed))return"";let y=null,m="";return mn(r)?(y=o.jsx(Cs,{onClick:()=>u(!0),children:e("blocklet.paynow")}),m=e("blocklet.suspendedCausedByExpired",{deadline:at(r==null?void 0:r.reservedUntil,t)})):hn(n,r)?(y=o.jsx(It,{href:p.subscriptionURL,children:e("blocklet.manageSubscription")}),m=e("blocklet.suspendedCausedByExpired",{deadline:at(r==null?void 0:r.reservedUntil,t)})):Js(n,r)&&(y=o.jsx(Hn,{to:me($.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),m=e("blocklet.suspendedCausedByTerminated",{canceledAt:at(r==null?void 0:r.terminatedAt,t),deadline:Ys(r==null?void 0:r.terminatedAt,t)})),o.jsxs(C,{component:zs,type:"error",sx:{"&> .alert-content":{display:"block"}},children:[l&&d&&r&&o.jsx(eo,{session:a,connect:i,baseUrl:d,authToken:r.subscription.authToken,children:o.jsx(to,{dialogProps:{open:l,onClose:()=>u(!1)},subscriptionId:r.subscription.id,successToast:!0,onPaid:()=>{c.post("/blocklet/start?fromSetup=1"),s(),u(!1)}})}),m,o.jsx(z,{component:"span",sx:{marginLeft:"4px"},children:y})]})}const Jr=g.createContext({});function ll(){return g.useContext(Jr)}const{Provider:fc,Consumer:ul}=Jr,{did:W,appId:hc}=window.env;function mc({children:e}){var S,T;const{t,locale:n}=J(),{blocklet:r}=ve(),[s,i]=g.useState([]),[a,c]=g.useState([]),[l,u]=g.useState([]),d=N.getDisplayName(r),f=((S=((r==null?void 0:r.environments)||[]).find(I=>I.key===ie.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR))==null?void 0:S.value)||"auto",p=(r==null?void 0:r.trustedPassports)||[],w=(r==null?void 0:r.trustedFactories)||[],y=(r==null?void 0:r.enablePassportIssuance)!==!1,m=async()=>{try{const I=await Me.doBatchQuery({getRoles:{input:{teamDid:W}},getPermissions:{input:{teamDid:W}},getInvitations:{input:{teamDid:W}}}),E=(I.getRoles.roles||[]).filter(k=>!$.RBAC_CONFIG.roles.some(P=>P.name===k.name&&(!P.passport||P.ci))).map(k=>(k.hasDescription=!!k.description,k.hasDescription||(k.description=t("team.passport.description",{teamName:d,title:k.title})),k));c(lo(E,[k=>no(k.name)],["desc"])),u(I.getPermissions.permissions||[]),i(I.getInvitations.invitations||[])}catch(I){Q.error(I.message)}},_=({did:I}={})=>{const E={teamDid:W,user:{did:I}};return Me.getUser({input:E})},h=({query:I,paging:E}={})=>{const k={teamDid:W};return E&&(k.paging=E),I&&(k.query=I),k.sort={lastLoginAt:-1},Me.getUsers({input:k})},j=()=>Me.getUsersCountPerRole({input:{teamDid:W}}),v=()=>m();g.useEffect(()=>{var I;(I=r==null?void 0:r.meta)!=null&&I.did&&m()},[(T=r==null?void 0:r.meta)==null?void 0:T.did]),g.useEffect(()=>{c(I=>I.map(E=>(E.hasDescription||(E.description=t("team.passport.description",{teamName:d,title:E.title})),{...E})))},[t,n]);const D=I=>{I.teamDid===W&&m()};Be(ie.TeamEvents.userAdded,D,[W]),Be(ie.TeamEvents.userRemoved,D,[W]),Be(ie.TeamEvents.userUpdated,D,[W]);const M={teamDid:W,teamIssuerDid:hc,teamName:d,invitations:s,roles:a,permissions:l,trustedPassports:p,trustedFactories:w,isNodeTeam:!1,enablePassportIssuance:y,refresh:v,passportColor:f,endpoint:window.location.origin,blocklet:r,api:{getUser:_,getUsers:h,getUsersCountPerRole:j}};return o.jsx(fc,{value:M,children:e})}const gc=g.lazy(()=>R(()=>import("./log-Iko0jLNA.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]))),xc=g.lazy(()=>R(()=>import("./index-BLGGjT7N.js"),__vite__mapDeps([15,2,1,5,4,6,7,8,10,16,9,11,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,3,41,42,43,44,45,46,47]))),vc=g.lazy(()=>R(()=>import("./index-BCNchyGN.js"),__vite__mapDeps([48,4,2,5,1,6,7,8,44,10,9,11,49,34,30,38,39,3,41,42,25,43,45,31,46,47]))),yc=g.lazy(()=>R(()=>import("./index-D9KfgDPN.js"),__vite__mapDeps([50,2,1,9,10,4,5,6,7,8,11,51,34,30,25,23,52,13,40,53,12,26,54,46,55,56,57,58,28,33,59,60,61,62,63,64,42,65,66,67,68]))),bc=g.lazy(()=>R(()=>import("./overview-CaQ-tV1t.js"),__vite__mapDeps([69,1,2,4,5,6,7,8,10,44,70,43,25,9,11,32,45,31,23,71,72,73,57,3,34,30,41,42,46,47]))),wc=g.lazy(()=>R(()=>import("./domains-BV2pykxi.js"),__vite__mapDeps([74,2,4,5,1,6,7,8,9,10,11,75,49,24,25,45,31,34,30,38,39,64,26,76,46,44,32,77]))),jc=g.lazy(()=>R(()=>import("./index-BCtmnJeV.js"),__vite__mapDeps([78,2,6,5,1,4,7,8,9,10,11,23,79,17,18,19,20,21,35,36,24,25,80,81,82,34,30,53,46,83,3,41,42,43,44,45,31,47]))),Sc=g.lazy(()=>R(()=>import("./appearance-Bowm1Shj.js"),__vite__mapDeps([84,5,2,4,1,6,7,8,9,10,11]))),Cc=g.lazy(()=>R(()=>import("./audit-logs-DczjqamJ.js"),__vite__mapDeps([85,4,2,5,1,6,7,8,35,36,3,9,10,11,66,67,44,40,68,34,30,41,42,25,43,45,31,46,47]))),_c=g.lazy(()=>R(()=>import("./index-CYeNo51G.js"),__vite__mapDeps([86,2,1,5,4,6,7,8,9,10,11,43,25,87,88,40,32,89,56,13,44,77,17,18,19,20,21,35,36,23,90,45,31,91,92,93,58,94,30,28,29,95,3,34,41,42,46,47]))),Ic=g.lazy(()=>R(()=>import("./config-navigation-CKVyFhfH.js"),__vite__mapDeps([96,2,4,5,1,6,7,8,72,81,10,97,9,11,98,99,65,57,43,25,59,60,91,30,3,34,41,42,44,45,31,46,47]))),kc=g.lazy(()=>R(()=>import("./index-D7eC9ptO.js"),__vite__mapDeps([100,1,2,6,5,10,4,7,8,9,11,95,57,101,102,73,33,30,32,103,39,42,104,53,3,34,41,25,43,44,45,31,46,47]))),Tc=g.lazy(()=>R(()=>import("./index-Ctzl9JDw.js"),__vite__mapDeps([105,4,2,5,1,6,7,8,10,9,11,104,88,70,32,36,95]))),Ec=g.lazy(()=>R(()=>import("./security-CX01lhxW.js"),__vite__mapDeps([106,4,2,5,1,6,7,8,9,10,11,99,107,95,3,34,30,41,42,25,43,44,45,31,46,47]))),Pc=g.lazy(()=>R(()=>import("./branding-B6AmOMI6.js"),__vite__mapDeps([108,2,1,4,5,6,7,8,10,63,109,55,82,65,9,11,24,25,43,88]))),Lc=g.lazy(()=>R(()=>import("./advanced-CN6mCSES.js"),__vite__mapDeps([110,2,1,9,10,4,5,6,7,8,11,24,25,34,30,46,88,26,32,23,71,72,3,41,42,43,44,45,31,47]))),Rc=g.lazy(()=>R(()=>import("./traffic-ClE631in.js").then(e=>e.t),__vite__mapDeps([90,2,9,1,10,4,5,6,7,8,11,45,31,91,92,93,58,94,30,28,29]))),Dc=g.lazy(()=>R(()=>import("./runtime-B0207zk1.js"),__vite__mapDeps([111,2,1,43,6,5,4,7,8,10,25,9,11,103,13,3,34,30,41,42,44,45,31,46,47]))),Ac=g.lazy(()=>R(()=>import("./index-B54lTbup.js"),__vite__mapDeps([112,2,4,5,1,6,7,8,113,79,17,10,18,19,20,21,23,35,36,9,11,27,28,29,34,30,26,64,24,25,13,38,39,3,41,42,43,44,45,31,46,47]))),$c=g.lazy(()=>R(()=>import("./list-DKUSPdB6.js"),__vite__mapDeps([114,2,4,5,1,6,7,8,10,113,45,31,22,9,11,52,26,64,34,30,79,17,18,19,20,21,23,35,36,38,39,3,41,42,25,43,44,46,47]))),Mc=g.lazy(()=>R(()=>import("./component-Cb3m5qUw.js"),__vite__mapDeps([115,1,2,5,4,6,7,8,10,9,11,116,104,24,25,113,98,94,60,26,58,93,65,30,117,61,62,63,33,64,34,42,23,118,119,102,73,57,109,55,120,87,80,81,66,67,97,32,3,76,95,121,101,122,83,44,91,13,41,38,39,43,45,31,46,47]))),Oc=g.lazy(()=>R(()=>import("./index-CfxcUIhC.js"),__vite__mapDeps([123,1,2,9,10,4,5,6,7,8,11]))),Nc=me($.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications"),zc=e=>{const{enqueueSnackbar:t}=Fn(),n=g.useCallback(r=>Gn(Nc,{id:r.id,severity:r.severity||"all",componentDid:r.source==="system"?"system":r.componentDid||"all"}),[]);Be(`${e}/${$.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,r=>{const s=n(r),{severity:i,description:a}=r||{},c=["error","warning"].includes(i)||r.sticky;r.source==="system"&&t(a,{variant:i,autoHideDuration:c?null:5e3,content:l=>o.jsx(ri,{viewAllUrl:s,keyId:l,notification:r,content:o.jsx(yi,{notification:r,minimal:!0,rows:0})})})},[],"user")};function Yr({blocklet:e,isAdmin:t}){return t?o.jsx(_c,{blocklet:e}):o.jsx(us,{status:403})}Yr.propTypes={blocklet:x.object.isRequired,isAdmin:x.bool.isRequired};const Uc=e=>{var d,f;const{t}=J(),{blocklet:n,actions:{refreshBlocklet:r},client:s,did:i}=ve(),a=(d=n==null?void 0:n.meta)==null?void 0:d.did,c=!n||io(n.status)?[]:N.getAppMissingConfigs(n),l={overview:[{label:t("common.overview"),value:"overview"},{label:o.jsx(_s,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!c.length,children:t("common.components")}),value:"components"}],"did-connect":[{label:t("common.members"),value:"members"},{label:t("team.member.passports"),value:"passports"},{label:t("common.setting"),value:"settings"},{label:t("common.security"),value:"security"},{label:t("oauth.client.tab"),value:"oauth"}],website:[{label:t("common.domains"),value:"domains"},{label:t("common.branding"),value:"branding"},{label:t("common.theming"),value:"theming"},{label:t("common.navigation"),value:"navigation"}],operations:[{label:t("common.notificationRecords"),value:"notifications",show:e},{label:t("common.analytics"),value:"analytics"},{label:t("common.auditLogs"),value:"audit-logs"},{label:t("common.advanced"),value:"advanced"}],integrations:[{label:"Webhooks",value:"webhooks",show:e},{label:t("common.accessKeys"),value:"access-keys"}],developers:[{label:t("common.logs"),value:"logs",show:((f=n==null?void 0:n.children)==null?void 0:f.length)&&n.structVersion===$.APP_STRUCT_VERSION},{label:t("common.performance"),value:"performance"},{label:t("common.docs"),value:"docs"}]},u={overview:bc,components:Mc,members:o.jsx(xc,{type:"blocklet",createPassportSvg:gn}),passports:o.jsx(jc,{createPassportSvg:gn}),settings:o.jsx(Tc,{orientation:"vertical"}),security:o.jsx(Ec,{}),"did-spaces":o.jsx(kc,{navOrientation:"horizontal"}),domains:wc,branding:o.jsx(Pc,{blocklet:n,onUpdate:r}),theming:o.jsx(Sc,{}),navigation:Ic,sitemap:o.jsx(Bs,{children:t("common.comingSoon")}),notifications:o.jsx(Yr,{blocklet:n,isAdmin:e}),"audit-logs":o.jsx(Cc,{scope:a,categories:["blocklet","team","security","certificates","gateway"]}),analytics:o.jsx(Rc,{client:s,did:i}),advanced:o.jsx(Lc,{blocklet:n,onUpdate:r}),webhooks:o.jsx(vc,{}),"access-keys":o.jsx(Ac,{}),logs:gc,performance:o.jsx(Dc,{client:s,did:i}),docs:Oc,publish:o.jsx(yc,{}),oauth:o.jsx($c,{})};return{tabGroups:l,renders:u}};function Bc(){var h,j;const e=Vn(),{tab:t="overview",subtab:n}=ks(),{blocklet:r,refreshFlag:s}=ve(),{session:i}=Kn(),a=ge(()=>{var v;return(v=i==null?void 0:i.user)==null?void 0:v.did},[i]),c=bo(),l=ge(()=>{var v;return((v=i.user)==null?void 0:v.role)&&so.includes(i.user.role)},[i]);zc(a);const{tabGroups:u,renders:d}=Uc(l),f=v=>{e(`${$.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${t}/${v}`)},p=(u[t]||[]).filter(v=>v.show===void 0||v.show),w=((h=(p||[]).find(v=>v.value===n))==null?void 0:h.value)||((j=p==null?void 0:p[0])==null?void 0:j.value)||t,y=d[w]||d.overview,m=["overview"].includes(t),_=r?o.jsxs(Lt,{type:"components",children:[p.length>0&&o.jsxs(C,{mb:2,display:"flex",alignItems:"center",gap:2,children:[o.jsx(C,{flex:1,children:o.jsx(Us,{tabs:p,current:w,onChange:f,scrollButtons:"auto"})}),m&&!c&&o.jsx(C,{component:"div",className:"page-header",children:r?o.jsx(wn,{className:"page-actions",hasPermission:!0,blocklet:r,onStart:()=>{},onComplete:({error:v}={})=>{v&&Q.error(v.message)},variant:"group"}):null})]}),o.jsx(C,{className:"page-content",children:o.jsx(g.Suspense,{fallback:o.jsx(Ke,{relative:"parent",children:o.jsx(ne,{})}),children:g.isValidElement(y)?y:o.jsx(y,{blocklet:r})})})]}):o.jsx(Ke,{relative:"parent",children:o.jsx(ne,{})});return o.jsx(oo,{children:o.jsx(mc,{children:o.jsx(ln,{children:o.jsxs(Vc,{children:[c&&m&&o.jsx(C,{component:"div",className:"page-header",mb:2,children:r?o.jsx(wn,{className:"page-actions",hasPermission:!0,blocklet:r,onStart:()=>{},onComplete:({error:v}={})=>{v&&Q.error(v.message)},variant:"group"}):null}),o.jsx(ar,{}),o.jsx(pc,{}),_]})},`${s}`)})})}function Hc(){var r;const{blocklet:e}=ve(),{t}=J(),n=(r=e==null?void 0:e.meta)==null?void 0:r.did;return g.useEffect(()=>{const s=ro();return n&&s.connect(),()=>{n&&s.isConnected()&&s.disconnect()}},[n]),o.jsxs(o.Fragment,{children:[o.jsx(ls,{children:o.jsx("title",{children:t("pageTitle.dashboard")})}),o.jsx(Bc,{})]})}const Vc=G.main`
|
|
198
|
-
.page-header {
|
|
199
|
-
display: flex;
|
|
200
|
-
justify-content: space-between;
|
|
201
|
-
align-items: center;
|
|
202
|
-
flex-wrap: wrap;
|
|
203
|
-
gap: 16px;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.page-title {
|
|
207
|
-
display: flex;
|
|
208
|
-
align-items: center;
|
|
209
|
-
|
|
210
|
-
.page-link {
|
|
211
|
-
font-size: 15px;
|
|
212
|
-
margin-top: 8px;
|
|
213
|
-
margin-left: 8px;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
@media (max-width: ${e=>e.theme.breakpoints.values.md}px) {
|
|
218
|
-
.page-header {
|
|
219
|
-
flex-direction: column;
|
|
220
|
-
align-items: flex-start;
|
|
221
|
-
.page-actions,
|
|
222
|
-
.MuiButtonGroup-root {
|
|
223
|
-
width: 100%;
|
|
224
|
-
}
|
|
225
|
-
.MuiButtonGroup-root {
|
|
226
|
-
.MuiButtonBase-root {
|
|
227
|
-
flex: 1;
|
|
228
|
-
}
|
|
229
|
-
.blocklet-action-text {
|
|
230
|
-
display: none;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.page-title {
|
|
236
|
-
margin-bottom: 15px;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
`,dl=Object.freeze(Object.defineProperty({__proto__:null,default:Hc},Symbol.toStringTag,{value:"Module"}));export{Xr as B,cn as W,er as a,nr as b,Yn as c,Kr as d,sr as e,fe as f,cl as g,dl as h,ll as u};
|