@abtnode/blocklet-services 1.16.52-beta-20251003-083412-fdfc4e36 → 1.16.52-beta-20251005-235515-42ad5caf
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/libs/connect/session.js +16 -1
- package/api/middlewares/check-running.js +9 -8
- package/api/middlewares/ensure-org-enabled.js +17 -0
- package/api/routes/blocklet.js +3 -3
- package/api/routes/user.js +175 -1
- package/api/services/auth/connect/switch-passport.js +2 -1
- package/api/services/auth/session.js +30 -0
- package/dist/assets/{AdapterDayjs-CAaLcejt.js → AdapterDayjs-wck-CfDF.js} +1 -1
- package/dist/assets/{Google-BMeng9mn.js → Google-BFauCF2k.js} +1 -1
- package/dist/assets/{access-control-BbcaXOFy.js → access-control-0wy7XAQb.js} +1 -1
- package/dist/assets/{actions-DbBJOD0d.js → actions-B4VXcSRp.js} +1 -1
- package/dist/assets/{add-component-core--Z5nF5rL.js → add-component-core-BM7p_09p.js} +23 -23
- package/dist/assets/add-resource-DbQFT7Gg.js +1 -0
- package/dist/assets/{addon-CnJnEleb.js → addon-CUvC0k6Y.js} +1 -1
- package/dist/assets/{advanced-DlEH3ib_.js → advanced-BhCewgzQ.js} +3 -3
- package/dist/assets/{aigne-CnGxZFk3.js → aigne-BQckonxP.js} +1 -1
- package/dist/assets/api-rC33aBSs.js +1 -0
- package/dist/assets/{appearance-DKR3ZZ-t.js → appearance-CjrhZWhd.js} +1 -1
- package/dist/assets/ar-CHd3xUx5.js +7 -0
- package/dist/assets/{arrow-down.svg-B_TkYBj9.js → arrow-down.svg-f3YCmAji.js} +1 -1
- package/dist/assets/{audit-logs-CY22RcFd.js → audit-logs-CASGp36e.js} +2 -2
- package/dist/assets/{authorize-DoJw-6hl.js → authorize-CkVYs-vE.js} +1 -1
- package/dist/assets/{base-chart-BbbiwJIa.js → base-chart-UFWO9a3P.js} +1 -1
- package/dist/assets/{base32-CgLd9kUN.js → base32-Cyneng4p.js} +1 -1
- package/dist/assets/{bind-account-CKozG7iQ.js → bind-account-D6KenxOW.js} +1 -1
- package/dist/assets/{branding-T8GaJvdM.js → branding-BVr5wVa5.js} +5 -5
- package/dist/assets/{branding-DqgDW-Pg.js → branding-CHhPscOd.js} +2 -2
- package/dist/assets/branding-DLDF3ZZP.js +1 -0
- package/dist/assets/{bundle-avatar-BALJ_pZQ.js → bundle-avatar-BpummNxa.js} +1 -1
- package/dist/assets/button-DGHIlhos.js +1 -0
- package/dist/assets/{click-to-copy-CVHuu877.js → click-to-copy-B379bwP3.js} +1 -1
- package/dist/assets/{cloneDeep-E2Pxqpbv.js → cloneDeep-LRq4Ya2k.js} +1 -1
- package/dist/assets/{collapse-DhGi244c.js → collapse-DJGzUM1Q.js} +1 -1
- package/dist/assets/complete-CQkeXJPL.js +39 -0
- package/dist/assets/{component-tJC1J22-.js → component-DWN2cI-c.js} +34 -34
- package/dist/assets/{config-CuaqTz1E.js → config-BgdQYz7Z.js} +2 -2
- package/dist/assets/{config-DkBKIb7u.js → config-CPB45HHq.js} +4 -4
- package/dist/assets/{config-CiixR7JW.js → config-CRxOjKmb.js} +1 -1
- package/dist/assets/config-navigation-D1TBA90f.js +40 -0
- package/dist/assets/config-space-DpOC6rFp.js +1 -0
- package/dist/assets/{confirm-BUTyrkJR.js → confirm-BfJfcPyj.js} +1 -1
- package/dist/assets/{connect-C2T5mJpT.js → connect-BbLXTlyu.js} +1 -1
- package/dist/assets/{connect-CwCzBgdq.js → connect-ZcwxKVuN.js} +1 -1
- package/dist/assets/{connect-to-C62UBG81.js → connect-to-Skv-ek56.js} +1 -1
- package/dist/assets/{content-layout-CaGd-JXO.js → content-layout-B9tc9LCL.js} +1 -1
- package/dist/assets/create-passport-svg-DosyhcHP.js +1 -0
- package/dist/assets/{createClass-BuhPvJV8.js → createClass-HFwzUuOB.js} +1 -1
- package/dist/assets/dashboard-DJ6Tc_2L.js +106 -0
- package/dist/assets/de-CD44Obtw.js +7 -0
- package/dist/assets/{delete-confirm-zH2oZyqM.js → delete-confirm-DNg1Z1xV.js} +1 -1
- package/dist/assets/{did-address-CeTjTMC4.js → did-address-Dbg_LiWL.js} +1 -1
- package/dist/assets/{domain-BmzmdNfA.js → domain-3JvbKqlt.js} +1 -1
- package/dist/assets/{domain-action-card-BM27YVmt.js → domain-action-card-BixPviaZ.js} +2 -2
- package/dist/assets/domains-D8QMeppe.js +1 -0
- package/dist/assets/{email-vdkECdsC.js → email-C6m1mnbN.js} +1 -1
- package/dist/assets/{empty-spinner-CkCqfxFX.js → empty-spinner-LXNYl6_1.js} +1 -1
- package/dist/assets/engine-DkWTqqhM.js +1 -0
- package/dist/assets/es-DNFAt0y7.js +9 -0
- package/dist/assets/{exchange-passport-DdKgNabQ.js → exchange-passport-BraV0EOe.js} +1 -1
- package/dist/assets/{form-DD1zzF-R.js → form-BIoto8u8.js} +1 -1
- package/dist/assets/form-text-input-BgpOkOYh.js +11 -0
- package/dist/assets/{form-wrapper-DNqXvSru.js → form-wrapper-Dt1iJZge.js} +1 -1
- package/dist/assets/fr-C9xE9tD4.js +7 -0
- package/dist/assets/{fuel-h75SX900.js → fuel-Dwo_gklT.js} +1 -1
- package/dist/assets/gen-access-key-DuRApUI5.js +1 -0
- package/dist/assets/{gen-simple-access-key-Bq7DCyW7.js → gen-simple-access-key-xXyYChfi.js} +1 -1
- package/dist/assets/get-safe-url-HFT553nb.js +1 -0
- package/dist/assets/hi-D_0DFJcS.js +5 -0
- package/dist/assets/{home-B3HQdfZf.js → home-D0rR9_38.js} +1 -1
- package/dist/assets/id-BgJjfH2L.js +7 -0
- package/dist/assets/iframe-COascK-f.js +1 -0
- package/dist/assets/{index-Dr9NaKfR.js → index-3ePiAFIp.js} +1 -1
- package/dist/assets/{index-BjcHj49D.js → index-A5fXAFXl.js} +1 -1
- package/dist/assets/{index-BtHqqZ50.js → index-AMzbVwE1.js} +1 -1
- package/dist/assets/{index-C_YGTMJ4.js → index-B3o5bPY9.js} +1 -1
- package/dist/assets/{index-Chi1YHs4.js → index-BAMrdOx5.js} +1 -1
- package/dist/assets/{index-BVRSxJRS.js → index-BO080WnZ.js} +1 -1
- package/dist/assets/index-BU5Qj_Uf.js +93 -0
- package/dist/assets/index-BiMTr9N1.js +6 -0
- package/dist/assets/index-BkMwz7Ha.js +281 -0
- package/dist/assets/{index-CZkVe8t1.js → index-BoF74OVD.js} +12 -12
- package/dist/assets/{index-6IwthDxj.js → index-BrrIKxMS.js} +1 -1
- package/dist/assets/{index-3xeMR-Qg.js → index-Bx-RW9vi.js} +1 -1
- package/dist/assets/{index-CKsy2_Ph.js → index-CARCeLG0.js} +2 -2
- package/dist/assets/index-CX8XMi66.js +1 -0
- package/dist/assets/{index-BzFZ1zhO.js → index-CjUelepA.js} +1 -1
- package/dist/assets/{index-BNDipwdR.js → index-Cv0WQg6r.js} +3 -3
- package/dist/assets/{index-BiLQGAIi.js → index-DKQpQSIL.js} +2 -2
- package/dist/assets/index-DKp1VidC.js +7 -0
- package/dist/assets/index-DOTZtBXk.js +113 -0
- package/dist/assets/{index-ImKSuLO2.js → index-DXDOA6wf.js} +2 -2
- package/dist/assets/{index-CmjYsAgT.js → index-DcGTEgwU.js} +4 -4
- package/dist/assets/index-DnsQF6x_.js +1 -0
- package/dist/assets/{index-BYry2QZ3.js → index-Ds4S1_JK.js} +3 -3
- package/dist/assets/index-DsZw1jDU.js +1039 -0
- package/dist/assets/{index-DbXxI_D0.js → index-IYdn8PnM.js} +1 -1
- package/dist/assets/index-Z8qCN0P1.js +200 -0
- package/dist/assets/{index-CzlhyS8_.js → index-cc7PDHui.js} +1 -1
- package/dist/assets/{index-BluBXQJ4.js → index-d3X4O8S1.js} +4 -4
- package/dist/assets/{index-KJrnzKIu.js → index-g1J2WU69.js} +1 -1
- package/dist/assets/index-o5365tSi.js +124 -0
- package/dist/assets/{index-CD_JYNBB.js → index-pMD5HObM.js} +10 -10
- package/dist/assets/{index-C2DPoZpQ.js → index-un8ZaNww.js} +5 -5
- package/dist/assets/{index-CGXZRmKt.js → index-yINGgTD8.js} +6 -6
- package/dist/assets/{invitation-CMi0GWFt.js → invitation-HIuSHONR.js} +7 -7
- package/dist/assets/invitations-Bol3LHDV.js +3 -0
- package/dist/assets/invite--kfNCB-y.js +1 -0
- package/dist/assets/{isURL-CSKc4kTl.js → isURL-NLB1KXWU.js} +1 -1
- package/dist/assets/issue-passport-DEKfDU5Q.js +1 -0
- package/dist/assets/{item-DsH8hlQV.js → item-8d2bomfb.js} +1 -1
- package/dist/assets/ja-SFs9TI5a.js +9 -0
- package/dist/assets/ko-CHdBh-EI.js +9 -0
- package/dist/assets/{landing-page-CAdZF71_.js → landing-page-BKWBeaB2.js} +1 -1
- package/dist/assets/{launch-result-message-B0--4ubW.js → launch-result-message-DW948RfZ.js} +1 -1
- package/dist/assets/{layout-CN4YohUY.js → layout-BCGFP2fM.js} +1 -1
- package/dist/assets/{list-Bf1rfvw3.js → list-CLnYaffq.js} +2 -2
- package/dist/assets/{list-2lBZBVJD.js → list-CjwYZK4C.js} +2 -2
- package/dist/assets/{list-header-DlrmpNef.js → list-header-DMpz8A8v.js} +1 -1
- package/dist/assets/localization-D4M90esB.js +1 -0
- package/dist/assets/{log-CKMWqM_9.js → log-CwhRn7dG.js} +1 -1
- package/dist/assets/logger-GZGSMwyW.js +1 -0
- package/dist/assets/login-D6vdg4tV.js +1 -0
- package/dist/assets/{login-oauth-callback-B4wL5LK5.js → login-oauth-callback-DNSbhkTX.js} +1 -1
- package/dist/assets/{logo-uploader-CgW-ljTo.js → logo-uploader-CehwiZZl.js} +2 -2
- package/dist/assets/{lost-passport-BiaJ8Qil.js → lost-passport-JcRjjJMu.js} +3 -3
- package/dist/assets/{observability-3BjnzXRV.js → observability-pdEZhjSl.js} +1 -1
- package/dist/assets/{omit-r-0RLWOV.js → omit-BQZKecPT.js} +1 -1
- package/dist/assets/{open-window-BAToG1Zw.js → open-window-5tX5UogI.js} +1 -1
- package/dist/assets/{over-due-invoice-payment-D4EbV_XU.js → over-due-invoice-payment-BQTpVcW4.js} +1 -1
- package/dist/assets/overview-8cijjh6D.js +85 -0
- package/dist/assets/{page-header-DP0csqkR.js → page-header-DvSb4Cmz.js} +1 -1
- package/dist/assets/passport-dBKTMShn.js +1 -0
- package/dist/assets/{passport-item-DTKCI96Q.js → passport-item-DybXmjDL.js} +1 -1
- package/dist/assets/{permission-DWlLl3B8.js → permission-DPZmpN88.js} +1 -1
- package/dist/assets/{playground-BEhnKrD-.js → playground-C0bWoIDS.js} +1 -1
- package/dist/assets/preferences-CSIWwAIC.js +1 -0
- package/dist/assets/profile-embed-Dxmu0kHv.js +1 -0
- package/dist/assets/pt-BJowi6tZ.js +5 -0
- package/dist/assets/publish-resource-BEWgZsl5.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-9QLg1KOC.js → react-beautiful-dnd.esm-BbVphn6n.js} +1 -1
- package/dist/assets/{react-stripe.esm-DWiCVD55.js → react-stripe.esm-C51Uah32.js} +1 -1
- package/dist/assets/{required-BUAaYcMZ.js → required-BT8zXV8U.js} +1 -1
- package/dist/assets/ru-DTjDV3Pw.js +5 -0
- package/dist/assets/runtime-Dw23IX1l.js +1 -0
- package/dist/assets/{sanitize-mRppk1lK.js → sanitize-C5jEFDvG.js} +1 -1
- package/dist/assets/sdk-BIWRdmX9.js +1 -0
- package/dist/assets/{section-CCfmWVdK.js → section-ZPKr6_ii.js} +1 -1
- package/dist/assets/{security-D--MQBTg.js → security-D_vkAC2F.js} +1 -1
- package/dist/assets/session-tOfkTx-G.js +1 -0
- package/dist/assets/{setup-BS5cDalg.js → setup-eJiK00ap.js} +1 -1
- package/dist/assets/{shorten-label-DAXPWCI6.js → shorten-label-DVy6K5I7.js} +1 -1
- package/dist/assets/simple-select-BeAlThKq.js +1 -0
- package/dist/assets/{spaces-6iUrdnzs.js → spaces-f3sezu1Y.js} +1 -1
- package/dist/assets/start-tshF2U2D.js +187 -0
- package/dist/assets/starting-progress-CNhbI5kz.js +40 -0
- package/dist/assets/status-aauXt2lH.js +1 -0
- package/dist/assets/{step-actions-3Nz2nPoP.js → step-actions-B_qluS-3.js} +1 -1
- package/dist/assets/{studio-C6g9y1mS.js → studio-ahebVj52.js} +1 -1
- package/dist/assets/{switch-control-Bs2D4JNi.js → switch-control-B8BKalcv.js} +1 -1
- package/dist/assets/{table-tips-B1dFVdej.js → table-tips-CIe4hASP.js} +1 -1
- package/dist/assets/team-DJZO6TyJ.js +146 -0
- package/dist/assets/th-A3GLGlJ1.js +5 -0
- package/dist/assets/traffic-Dh4U8pnc.js +1 -0
- package/dist/assets/{transfer-B90XYpQX.js → transfer-CuvzwKCQ.js} +1 -1
- package/dist/assets/{unsubscribe-DBJXxz9h.js → unsubscribe-B1yTQQGf.js} +1 -1
- package/dist/assets/{use-app-logo-Cs4SrcDi.js → use-app-logo-CqD9SoXr.js} +1 -1
- package/dist/assets/{use-mobile-BW9mTiYC.js → use-mobile-BQQpAf3i.js} +1 -1
- package/dist/assets/{use-mobile-B_fpUHD7.js → use-mobile-D6YQgajG.js} +1 -1
- package/dist/assets/{use-server-logo-R848M-JH.js → use-server-logo-ClR4qaF0.js} +1 -1
- package/dist/assets/{use-window-close-Dk0lXOqo.js → use-window-close-CLNOz9Uq.js} +1 -1
- package/dist/assets/{useAsync-DkQHu4t4.js → useAsync-DVtDVEv6.js} +1 -1
- package/dist/assets/{useAsync-DoI7Qt9M.js → useAsync-fWwm3Jbj.js} +1 -1
- package/dist/assets/{useAsyncRetry-DNTidBXG.js → useAsyncRetry-EEjDgDMR.js} +1 -1
- package/dist/assets/{useLocalStorage-BzRs3x-K.js → useLocalStorage-BPSCf_zz.js} +1 -1
- package/dist/assets/user-center-DDfna1uE.js +126 -0
- package/dist/assets/user-follower-Cc-51q-9.js +32 -0
- package/dist/assets/{user-sessions-DqMaEduy.js → user-sessions-DkchVQBO.js} +1 -1
- package/dist/assets/{util-C8ahPkmT.js → util-B8Xud4vY.js} +1 -1
- package/dist/assets/{util-CRzq0bMY.js → util-D8KMfML_.js} +1 -1
- package/dist/assets/{vendor-arcblock-BhtOu00C.js → vendor-arcblock-CSGgL93G.js} +1 -1
- package/dist/assets/{vendor-hooks-BtDnIwBH.js → vendor-hooks-BlA8TRnZ.js} +2 -2
- package/dist/assets/vendor-mui-core-DRxbhqaK.js +250 -0
- package/dist/assets/{vendor-mui-x-DWX99wt-.js → vendor-mui-x-Qp6zkx78.js} +1 -1
- package/dist/assets/{vendor-utils-CVwaKsP9.js → vendor-utils-CUDP56Ff.js} +1 -1
- package/dist/assets/{vendor-ux-Cfhaj-oj.js → vendor-ux-CDOuCaX1.js} +3 -3
- package/dist/assets/vi-DGXwnYQW.js +5 -0
- package/dist/assets/{wait-connect-E47qTAaT.js → wait-connect-CGOeOXHL.js} +1 -1
- package/dist/assets/{wizard-2kfr1LiF.js → wizard-B7NraPoW.js} +1 -1
- package/dist/assets/{wizard-components-De0Ol72d.js → wizard-components-Bl0PwqPC.js} +7 -7
- package/dist/assets/wrap-locale-BQiQiZG-.js +1 -0
- package/dist/assets/zh-CJ0qBy8e.js +10 -0
- package/dist/assets/{zh-Du23hKEW.js → zh-DQ2rCoQ5.js} +1 -1
- package/dist/assets/zh-tw-Cs-zRk58.js +9 -0
- package/dist/index.html +6 -6
- package/dist/service-worker.js +1 -1
- package/package.json +32 -32
- package/dist/assets/add-resource-DRGO7kDY.js +0 -1
- package/dist/assets/api-BUbloWod.js +0 -1
- package/dist/assets/ar-DDKSNNIB.js +0 -7
- package/dist/assets/branding-Dc9wDqPm.js +0 -1
- package/dist/assets/button-BG8yGG9e.js +0 -1
- package/dist/assets/complete-Td6_SOPf.js +0 -39
- package/dist/assets/config-navigation-BFl1_q-j.js +0 -40
- package/dist/assets/config-space-B8dCR8jO.js +0 -1
- package/dist/assets/dashboard-B0Fy6SmC.js +0 -106
- package/dist/assets/de-C5jW-Aco.js +0 -7
- package/dist/assets/domains-CEkJn9DL.js +0 -1
- package/dist/assets/engine-CCa9THLZ.js +0 -1
- package/dist/assets/es-DnE5Se03.js +0 -9
- package/dist/assets/form-text-input-CqoNK3mi.js +0 -11
- package/dist/assets/fr-BpXortYf.js +0 -7
- package/dist/assets/gen-access-key-BZebBcUZ.js +0 -1
- package/dist/assets/get-safe-url-CeMtySPx.js +0 -1
- package/dist/assets/hi-CeUu25BW.js +0 -5
- package/dist/assets/id-BugYMmLN.js +0 -7
- package/dist/assets/iframe-ASQIizLx.js +0 -1
- package/dist/assets/index-6B51asLP.js +0 -292
- package/dist/assets/index-BIIL1VhU.js +0 -1039
- package/dist/assets/index-BlTmYBsg.js +0 -124
- package/dist/assets/index-CmsJ8Fn7.js +0 -1
- package/dist/assets/index-DBJZdu-W.js +0 -113
- package/dist/assets/index-Dn4pwRtk.js +0 -1
- package/dist/assets/index-DwQNuuxR.js +0 -283
- package/dist/assets/index-ajyKTkxP.js +0 -7
- package/dist/assets/invite-DpA2tJ_s.js +0 -1
- package/dist/assets/issue-passport-B0QyEUjC.js +0 -1
- package/dist/assets/ja-DaREJWmX.js +0 -9
- package/dist/assets/ko-DGXdpX64.js +0 -9
- package/dist/assets/localization-D12SXxDi.js +0 -1
- package/dist/assets/logger-CsgnUk8i.js +0 -1
- package/dist/assets/login-y-09uRl4.js +0 -1
- package/dist/assets/overview-C734Rasc.js +0 -85
- package/dist/assets/preferences-DTgCHjY9.js +0 -1
- package/dist/assets/profile-embed-4R2fOO01.js +0 -1
- package/dist/assets/pt-CIqefLTL.js +0 -5
- package/dist/assets/publish-resource-CHMkx0I2.js +0 -1
- package/dist/assets/ru-B4h3WudR.js +0 -5
- package/dist/assets/runtime-CUzpUEb5.js +0 -1
- package/dist/assets/sdk-CxjuM-ya.js +0 -1
- package/dist/assets/session-B_RHNjCZ.js +0 -1
- package/dist/assets/simple-select-BHPmFba3.js +0 -1
- package/dist/assets/start-ByPfhiAj.js +0 -187
- package/dist/assets/starting-progress-CxdsmebW.js +0 -40
- package/dist/assets/status-DA0S9WgZ.js +0 -1
- package/dist/assets/team-CcIOrTIk.js +0 -146
- package/dist/assets/th-BjttL5p9.js +0 -5
- package/dist/assets/traffic-KIPRLJPY.js +0 -1
- package/dist/assets/user-center-bNIwz7Mp.js +0 -126
- package/dist/assets/user-follower-UoHvZnoE.js +0 -32
- package/dist/assets/vendor-mui-core-BIZOanxj.js +0 -250
- package/dist/assets/vi-C-IhikR1.js +0 -5
- package/dist/assets/wrap-locale-Ck3zJtU5.js +0 -1
- package/dist/assets/zh-CWvcoHsp.js +0 -10
- package/dist/assets/zh-tw-D_73qm-O.js +0 -9
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import{D as V,J as q,j as t,a6 as G,aY as X,ak as c,aZ as Q,at as z,aT as J,P as Y,a_ as Z,a$ as ee,W as y}from"./vendor-mui-core-BIZOanxj.js";import{r as g,L as H}from"./vendor-react-Dvs43sk9.js";import{l as te,a as E}from"./vendor-hooks-BtDnIwBH.js";import{C as R}from"./vendor-utils-CVwaKsP9.js";import{T as F,H as U,o as ne,n as P,$ as oe,M as re}from"./vendor-ux-Cfhaj-oj.js";import{W as se}from"./did-address-CeTjTMC4.js";import{o as ie,s as ae}from"./vendor-arcblock-BhtOu00C.js";import{e as L,f as _,h as W,i as le,j as ce,l as T,S as de,c as D,a as pe,m as me,n as ue,o as he,P as ge,p as S,q as fe,r as A}from"./index-BIIL1VhU.js";import{H as xe}from"./addon-CnJnEleb.js";import{u as be}from"./use-server-logo-R848M-JH.js";import{g as M}from"./get-safe-url-CeMtySPx.js";import{O as ke}from"./over-due-invoice-payment-D4EbV_XU.js";import{p as je,S as ye,P as we}from"./starting-progress-CxdsmebW.js";import"./lottie-web-4koyQiv_.js";import"./question-mark-circle.svg-B4stD6SS.js";import"./server-logo-notext.svg-CKQB0tIp.js";import"./use-mobile-BW9mTiYC.js";function K({appInfo:e,...r}){const[n,s]=g.useState(!1),l=q(f=>f.breakpoints.down("md"))?32:48;return n?t.jsx(oe,{did:e.publisher,size:l}):t.jsx(re,{src:e.icon,alt:e.title,width:l,height:l,...r,onError:()=>s(!0)})}K.propTypes={appInfo:y.object.isRequired};const B=(e,r)=>_.findComponentByIdV2(e,r)||e;function Fe(){const{t:e,locale:r}=F(),[n,s]=te({blocklet:null,component:null,launcherSession:null,loading:!1,starting:!1,manageSubscriptionURL:"",restart:!1}),a=localStorage.getItem("blocklet-server-url"),l=be({onClick:()=>{a&&window.open(M(a,{allowDomains:null}))}}),f=new URL(window.location.href),w=f.searchParams.get("componentId"),$=V(),j=q(o=>o.breakpoints.down("md")),x=()=>{const o=f.searchParams.get("redirect")||"/";window.location.href=M(decodeURIComponent(o))},b=()=>{const o=setInterval(()=>{L.get("/blocklet/detail?nocache=1").then(({data:i})=>{s(N=>({...N,blocklet:i}));const d=B(i,w);if(d.status==="running"){x();return}d.status!=="starting"&&!n.restart&&(s({blocklet:i,starting:!1}),i!==d&&s({component:d}),clearInterval(o))}).catch(i=>{s({loading:!1,restart:!1}),U.error(i.message)})},3e3)},C=()=>{s({restart:!0,starting:!0,loading:!0}),setTimeout(()=>{b()},10)};g.useEffect(()=>{s({loading:!0}),L.get("/blocklet/detail?nocache=1").then(({data:o})=>{const i=B(o,w);if(s({blocklet:o,loading:!1}),i.status==="running"){x();return}s({blocklet:o}),o!==i&&s({component:i}),i.status==="starting"&&(s({starting:!0}),b())}).catch(o=>{s({loading:!1}),U.error(o.message)})},[]);const u=g.useCallback(()=>{s({loading:!0,starting:!0});const o=n.blocklet;if(!o)return;const i={did:o?.meta.did};o.children.length>0&&(i.componentDids=o.children.map(d=>d.meta.did)),W.startBlocklet({input:i}).then(({blocklet:d})=>{s(N=>({...N,blocklet:d})),b()}).catch(d=>{U.error(d.message),s({loading:!1,starting:!1})})},[n.component,n.blocklet]);g.useEffect(()=>{n.blocklet?.controller&&(le({launcherUrl:n.blocklet.controller.launcherUrl,launcherSessionId:n.blocklet.controller.launcherSessionId,locale:r}).then(o=>{s({manageSubscriptionURL:o})}).catch(o=>{console.error("get manage subscription url error",o)}),W.getLauncherSession({input:{launcherSessionId:n.blocklet.controller.launcherSessionId,launcherUrl:n.blocklet.controller.launcherUrl}}).then(o=>{s({launcherSession:o.launcherSession})}).catch(o=>{console.error("get launcher session error",o)}))},[n.blocklet?.controller]);const p=E(()=>n.blocklet?.children?.length,[n.blocklet]),m=E(()=>n.blocklet?.children?.filter(o=>o.status==="running")?.length||0,[n.blocklet]),k=E(()=>p?m?Math.round(Math.max(m/p,.15)*100):5:0,[m,p]);if(!n.blocklet)return t.jsx(ie,{children:t.jsx(G,{})});const h={icon:`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/blocklet/logo`,title:_.getDisplayName(n.blocklet),publisher:n.blocklet.appDid},I=ne(je,n.starting?{width:`${k}%`,"&::after":{width:`${k}%`},"&::before":{width:`${k}%`,animation:"shimmer 1s infinite cubic-bezier(0.4, 0.0, 0.2, 1)","@keyframes shimmer":{"0%":{width:0},"100%":{width:`${k}%`}}}}:{}),v=ce(n.blocklet)||T(n.launcherSession);return t.jsxs(Se,{children:[t.jsx(X,{styles:ve}),t.jsxs("header",{className:"root-header",children:[j?null:t.jsx("div",{className:"left",children:l}),t.jsx(ae,{sx:{background:j?$.palette.background.default:"transparent",display:"flex",alignItems:"center",justifyContent:"flex-end"},children:t.jsx(xe,{SessionContext:de})})]}),t.jsxs(Pe,{elevation:0,children:[t.jsxs(_e,{children:[t.jsx(K,{appInfo:h}),t.jsxs("div",{className:"app-info_content",children:[t.jsx(c,{className:"app-info_name",children:h.title}),t.jsx(se,{size:14,className:"app-info_did",did:h.publisher})]})]}),(n.restart||!v)&&t.jsxs(t.Fragment,{children:[t.jsxs(c,{className:"title-box",children:[t.jsx(c,{className:"icon",children:t.jsx(Q,{})}),t.jsx(c,{className:"title",children:e("blocklet.startApplication")})]}),t.jsx(c,{className:"sub-title",children:n.starting?t.jsx(ye,{blocklets:n.blocklet?.children??[]}):e("blocklet.startDescription",{name:n.component?_.getDisplayName(n.component,!0):_.getDisplayName(n.blocklet)})}),t.jsx(c,{sx:{mt:8,display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:t.jsx(we,{blocklets:n.blocklet?.children??[],status:n.starting?"starting":"",children:t.jsx(P,{sx:I,disabled:n.loading||n.starting,variant:"contained",color:"primary",size:"large",loading:n.starting,onClick:()=>u(),children:t.jsx("span",{style:{position:"relative",zIndex:2},children:n.starting?`(${m}/${p}) ${e("blocklet.starting")}`:e("blocklet.start")})})})})]}),v&&!n.restart&&t.jsx(O,{blocklet:n.blocklet,launcherSession:n.launcherSession,manageSubscriptionURL:n.manageSubscriptionURL,handleRestart:C}),t.jsx(c,{sx:{mt:5},children:t.jsx(H,{className:"footer-link",to:`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/overview`,children:e("blocklet.dashboard")})})]})]})}function O({blocklet:e,launcherSession:r,manageSubscriptionURL:n,handleRestart:s}){const{t:a,locale:l}=F(),{connectApi:f,session:w}=pe(),{refreshSubscription:$}=me(),[j,x]=g.useState(!1),[b,C]=g.useState("");if(g.useEffect(()=>{if(e?.controller?.launcherUrl&&T(r)){const k=R(e.controller.launcherUrl,"__blocklet__.js?type=json");fetch(k).then(h=>h.json()).then(h=>{const I=h.componentMountPoints?.find(o=>o.did==="z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk")?.mountPoint,v=R(e.controller.launcherUrl,I);C(v)})}},[e?.controller?.launcherUrl,r]),!e||!r)return"";const u=T(r),p=!u&&ue(e,r),m=!u&&he(e,r);return!p&&!m&&!u?"":t.jsxs(t.Fragment,{children:[j&&b&&r&&t.jsx(ge,{session:w,connect:f,baseUrl:b,authToken:r.subscription.authToken,children:t.jsx(ke,{dialogProps:{open:j,onClose:()=>x(!1)},subscriptionId:r.subscription.id,successToast:!0,onPaid:()=>{L.post("/blocklet/start?fromSetup=1"),$(),s(),x(!1)}})}),t.jsxs(c,{className:"title-box",children:[t.jsx(Z,{className:"icon-error"}),t.jsxs(c,{className:"title error",children:[p&&a("blocklet.suspended"),m&&a("blocklet.terminated"),u&&a("blocklet.suspended")]})]}),t.jsxs(c,{className:"sub-title",children:[p&&a("blocklet.suspendedCausedByExpired",{deadline:S(r?.reservedUntil,l),canceledAt:S((r?.subscription?.canceled_at||0)*1e3,l)}),m&&a("blocklet.suspendedCausedByTerminated",{canceledAt:S(r?.terminatedAt,l),deadline:fe(r?.terminatedAt,l)}),u&&a("blocklet.suspendedCausedByPastDue",{deadline:S(r?.reservedUntil,l)})]}),t.jsxs(c,{sx:{mt:8},children:[u&&!A(r)&&t.jsx(P,{style:{minWidth:200},variant:"contained",color:"primary",size:"large",onClick:()=>x(!0),children:a("blocklet.payNow")}),(p||A(r))&&t.jsx(P,{component:ee,style:{minWidth:200},variant:"contained",color:"primary",size:"large",target:"_blank",href:n||"#",children:a("blocklet.manageSubscription")}),m&&t.jsx(P,{component:H,to:R(D.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin/did-spaces"),style:{minWidth:200},variant:"contained",color:"primary",size:"large",children:a("common.backup")})]})]})}O.propTypes={blocklet:y.object.isRequired,launcherSession:y.object.isRequired,manageSubscriptionURL:y.string.isRequired,handleRestart:y.func.isRequired};const ve=J`
|
|
2
|
-
html,
|
|
3
|
-
body,
|
|
4
|
-
#app,
|
|
5
|
-
#app > .wrapper {
|
|
6
|
-
height: 100%;
|
|
7
|
-
}
|
|
8
|
-
`,Se=z.div`
|
|
9
|
-
width: 100vw;
|
|
10
|
-
height: 100%;
|
|
11
|
-
background: ${({theme:e})=>e.palette.mode==="dark"?e.palette.background.default:e.palette.grey[100]};
|
|
12
|
-
display: flex;
|
|
13
|
-
justify-content: center;
|
|
14
|
-
align-items: center;
|
|
15
|
-
|
|
16
|
-
.root-header {
|
|
17
|
-
position: fixed;
|
|
18
|
-
z-index: 200;
|
|
19
|
-
top: 0;
|
|
20
|
-
display: flex;
|
|
21
|
-
width: 100%;
|
|
22
|
-
height: 68px;
|
|
23
|
-
align-items: center;
|
|
24
|
-
justify-content: flex-end;
|
|
25
|
-
padding: 24px;
|
|
26
|
-
max-width: 1245px;
|
|
27
|
-
|
|
28
|
-
${e=>e.theme.breakpoints.down("md")} {
|
|
29
|
-
padding: 14px 16px;
|
|
30
|
-
height: 56px;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.left {
|
|
34
|
-
margin-top: 4px;
|
|
35
|
-
margin-right: auto;
|
|
36
|
-
${e=>e.theme.breakpoints.down("md")} {
|
|
37
|
-
margin-top: 0%;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.right {
|
|
42
|
-
display: flex;
|
|
43
|
-
align-items: center;
|
|
44
|
-
${e=>e.theme.breakpoints.down("md")} {
|
|
45
|
-
button,
|
|
46
|
-
a {
|
|
47
|
-
padding-left: 8px;
|
|
48
|
-
padding-right: 8px;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
`,Pe=z(Y)`
|
|
54
|
-
width: 80vw;
|
|
55
|
-
max-width: 1245px;
|
|
56
|
-
height: 80vh;
|
|
57
|
-
box-sizing: border-box;
|
|
58
|
-
padding: 32px;
|
|
59
|
-
&.MuiPaper-rounded {
|
|
60
|
-
border-radius: 8px;
|
|
61
|
-
}
|
|
62
|
-
position: relative;
|
|
63
|
-
display: flex;
|
|
64
|
-
justify-content: center;
|
|
65
|
-
align-items: center;
|
|
66
|
-
flex-direction: column;
|
|
67
|
-
|
|
68
|
-
${e=>e.theme.breakpoints.down("md")} {
|
|
69
|
-
width: 100vw;
|
|
70
|
-
height: 100%;
|
|
71
|
-
left: 0;
|
|
72
|
-
top: 0;
|
|
73
|
-
padding: 32px 0;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.MuiIconButton-root {
|
|
77
|
-
svg {
|
|
78
|
-
fill: #888;
|
|
79
|
-
}
|
|
80
|
-
&.Mui-disabled {
|
|
81
|
-
opacity: 0.4;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.title-box {
|
|
86
|
-
display: flex;
|
|
87
|
-
align-items: center;
|
|
88
|
-
${e=>e.theme.breakpoints.down("md")} {
|
|
89
|
-
margin-top: 60px;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.icon {
|
|
94
|
-
display: inline-flex;
|
|
95
|
-
justify-content: center;
|
|
96
|
-
align-items: center;
|
|
97
|
-
width: 32px;
|
|
98
|
-
height: 32px;
|
|
99
|
-
border-radius: 100%;
|
|
100
|
-
background-color: ${e=>e.theme.palette.primary.main};
|
|
101
|
-
color: ${e=>e.theme.palette.common.white};
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.icon-error {
|
|
105
|
-
width: 32px;
|
|
106
|
-
height: 32px;
|
|
107
|
-
color: ${e=>e.theme.palette.error.main};
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.title {
|
|
111
|
-
margin-left: 12px;
|
|
112
|
-
color: ${e=>e.theme.palette.primary.main};
|
|
113
|
-
font-size: 24px;
|
|
114
|
-
font-weight: bolder;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.error {
|
|
118
|
-
color: ${e=>e.theme.palette.error.main};
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.sub-title {
|
|
122
|
-
margin-top: 24px;
|
|
123
|
-
color: ${e=>e.theme.palette.grey[700]};
|
|
124
|
-
font-size: 16px;
|
|
125
|
-
max-width: 460px;
|
|
126
|
-
text-align: center;
|
|
127
|
-
word-break: break-word;
|
|
128
|
-
hyphens: auto;
|
|
129
|
-
|
|
130
|
-
${e=>e.theme.breakpoints.down("md")} {
|
|
131
|
-
padding: 0 32px;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.footer-link {
|
|
136
|
-
color: ${e=>e.theme.palette.primary.main};
|
|
137
|
-
}
|
|
138
|
-
`,_e=z.div`
|
|
139
|
-
display: flex;
|
|
140
|
-
align-items: center;
|
|
141
|
-
position: absolute;
|
|
142
|
-
left: 24px;
|
|
143
|
-
right: 24px;
|
|
144
|
-
top: 24px;
|
|
145
|
-
font-size: 16px;
|
|
146
|
-
font-weight: 500;
|
|
147
|
-
color: #222;
|
|
148
|
-
|
|
149
|
-
/* 禁止 app icon shrink */
|
|
150
|
-
> *:first-child {
|
|
151
|
-
flex: 0 0 auto;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.app-info_content {
|
|
155
|
-
padding-left: 16px;
|
|
156
|
-
overflow: hidden;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.app-info_name {
|
|
160
|
-
max-width: 100%;
|
|
161
|
-
padding-right: 32px;
|
|
162
|
-
line-height: 1;
|
|
163
|
-
white-space: nowrap;
|
|
164
|
-
overflow: hidden;
|
|
165
|
-
text-overflow: ellipsis;
|
|
166
|
-
font-weight: bold;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.app-info_did {
|
|
170
|
-
transform: translate(0, 2px);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.app-info_did .did-address__text {
|
|
174
|
-
color: #666;
|
|
175
|
-
font-size: 14px;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
${e=>e.theme.breakpoints.down("md")} {
|
|
179
|
-
top: 12px;
|
|
180
|
-
.app-info_did {
|
|
181
|
-
transform: translate(0, 0);
|
|
182
|
-
}
|
|
183
|
-
.app-info_did .did-address__text {
|
|
184
|
-
font-size: 12px;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
`;export{Fe as default};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import{j as o,b1 as f,at as w,ao as S,T as j,W as d}from"./vendor-mui-core-BIZOanxj.js";import{r as a}from"./vendor-react-Dvs43sk9.js";import{a as m,h as C}from"./vendor-hooks-BtDnIwBH.js";import{T as h}from"./vendor-ux-Cfhaj-oj.js";const R=1e3;function x({blocklet:t}){const{meta:u}=t,{t:i}=h(),[l,s]=a.useState("starting"),[p,e]=a.useState(t.status),r=m(()=>{const c=u.title||u.name;return{starting:i("blocklet.startingProgress.starting",{name:c}),running:i("blocklet.startingProgress.success",{name:c}),stopped:i("blocklet.startingProgress.failed",{name:c}),error:i("blocklet.startingProgress.failed",{name:c})}},[i,u]);a.useEffect(()=>{p!==t.status&&(s(t.status),e(""))},[t.status,p]),C(()=>{e(t.status),t.status==="running"&&s(t.status)});const n=m(()=>l==="running"?S[600]:["stopped","error"].includes(l)?"error":"primary",[l]);return o.jsx(j,{display:"flex",alignItems:"center",fontSize:14,lineHeight:1,gap:1,color:n,children:r[l]})}x.propTypes={blocklet:d.object.isRequired};function I({blocklets:t=[],children:u,debounce:i=!0,status:l=""}){const[s,p]=a.useState(null),[e,r]=a.useState(0),n=a.useRef(null),c=a.useRef(!1);a.useEffect(()=>{if(s&&n.current){const g=n.current.style.display;n.current.style.display="flex",r(n.current.offsetHeight),n.current.style.display=g}},[s,t]);const b=a.useMemo(()=>l==="starting"?o.jsx(f,{ref:n,display:"flex",flexDirection:"column",gap:.5,maxHeight:200,sx:{overflowY:"auto",p:2,display:s?"flex":"none",position:"fixed",top:s?s.getBoundingClientRect().top-10-e:0,left:s?s.getBoundingClientRect().left+s.offsetWidth/2:0,transform:"translateX(-50%)",backgroundColor:"white",boxShadow:"0px 2px 4px rgba(0,0,0,0.1)",borderRadius:"4px",zIndex:1300},children:t.map(g=>o.jsx(x,{blocklet:g},g.meta.did))}):null,[t,s,e,l]),y=g=>{(c.current||!i)&&(p(g.currentTarget),c.current=!1)},v=()=>{p(null),l==="starting"&&(c.current=!0)};return o.jsxs(o.Fragment,{children:[o.jsx("span",{onMouseEnter:y,onMouseLeave:v,style:{cursor:"pointer"},children:u}),b]})}I.propTypes={blocklets:d.array.isRequired,children:d.node.isRequired,debounce:d.bool,status:d.string};function P({blocklets:t=[]}){const{t:u}=h(),[i,l]=a.useState(0),s=m(()=>t.length===0?[]:t.map(e=>{const r=e.meta.title||e.meta.name;return e.status==="running"?null:`${u("blocklet.startingProgress.starting",{name:r})}`}).filter(Boolean),[t,u]);if(a.useEffect(()=>{if(!s.length)return;let e=0;const r=setInterval(()=>{e++,e>=s.length&&(e=0),l(e)},R);return()=>{clearInterval(r)}},[s]),t.length===0)return null;const p=e=>{let r="message-before";return i===e?r="show-message":i<e&&(r="message-after"),r};return o.jsx(z,{direction:"column",alignItems:"center",justifyContent:"center",gap:1,children:o.jsx("div",{className:"waiter-message",children:s.map((e,r)=>{const n=p(r);return o.jsxs("div",{children:[o.jsx("span",{className:`message-block ${n}`,children:e}),o.jsx("span",{className:`placeholder-message ${n}`,children:e})]},r)})})})}P.propTypes={blocklets:d.array.isRequired};const z=w(f)`
|
|
2
|
-
.waiter-message {
|
|
3
|
-
position: relative;
|
|
4
|
-
width: 100%;
|
|
5
|
-
font-size: 16px;
|
|
6
|
-
text-align: center;
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
color: ${({theme:t})=>t.palette.primary.main};
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
.message-block {
|
|
11
|
-
position: absolute;
|
|
12
|
-
left: 0;
|
|
13
|
-
width: 100%;
|
|
14
|
-
opacity: 0;
|
|
15
|
-
transition: all ease 0.3s;
|
|
16
|
-
user-select: none;
|
|
17
|
-
&.message-before {
|
|
18
|
-
transform: translate(-20px, 0);
|
|
19
|
-
}
|
|
20
|
-
&.message-after {
|
|
21
|
-
transform: translate(20px, 0);
|
|
22
|
-
}
|
|
23
|
-
&.show-message {
|
|
24
|
-
transform: translate(0, 0);
|
|
25
|
-
opacity: 1;
|
|
26
|
-
user-select: text;
|
|
27
|
-
z-index: 2;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.placeholder-message {
|
|
32
|
-
user-select: none;
|
|
33
|
-
display: none;
|
|
34
|
-
opacity: 0;
|
|
35
|
-
&.show-message {
|
|
36
|
-
display: block;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
`,k={minWidth:200,position:"relative",overflow:"hidden","&::after":{content:'""',position:"absolute",top:0,left:0,height:"100%",backgroundColor:"rgba(0, 0, 0, 0.1)",transition:"width 0.8s cubic-bezier(0.4, 0, 0.2, 1)",zIndex:0,borderRadius:1},"&::before":{content:'""',position:"absolute",top:0,left:"0",height:"100%",background:"linear-gradient(90deg, rgba(212,249,248,0.01) 0%, rgba(212,249,248,0.05) 100%)",zIndex:1,pointerEvents:"none",transition:"width 0.8s cubic-bezier(0.68, -0.6, 0.32, 1.6) 0s",borderRadius:1},"&.Mui-disabled":{backgroundColor:"primary.main",color:"white"},"& .MuiCircularProgress-root":{color:"primary.contrastText",zIndex:2}};export{I as P,P as S,k as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as b}from"./vendor-react-Dvs43sk9.js";import{j as p,a6 as P,am as $,bY as j,bZ as k,W as w}from"./vendor-mui-core-BIZOanxj.js";import{l as q}from"./vendor-hooks-BtDnIwBH.js";import{B as d}from"./vendor-utils-CVwaKsP9.js";import{r as x}from"./omit-r-0RLWOV.js";import{ay as R,az as V}from"./index-BIIL1VhU.js";import{K as E,T as K}from"./vendor-ux-Cfhaj-oj.js";var a={},h;function T(){if(h)return a;h=1;var u=a&&a.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.signResponse=l,a.verifyResponse=S,a.verifyVault=_;const m=u(x),v=u(R()),n=V(),s=E();function l(e,c){const o=(0,v.default)(e),y=c.sign(o);return{...e,$signature:y}}function S(e,c){return e.$signature?Promise.resolve(c.verify((0,v.default)((0,m.default)(e,"$signature")),e.$signature)):Promise.resolve(!1)}async function _(e,c,o=!1){if(!Array.isArray(e)||e.length===0){if(o)throw new Error("vaults list is empty");return""}for(let t=1;t<e.length;t++)if(e[t].at<=e[t-1].at){if(o)throw new Error("vaults are not in ascending order");return""}if(new Set(e.map(t=>t.did)).size!==e.length){if(o)throw new Error("vaults list has duplicate vaults");return""}for(let t=0;t<e.length;t++){const r=e[t];if(!(0,s.isFromPublicKey)(r.did,r.pk)){if(o)throw new Error(`vault did and pk mismatch: ${r.did}(${r.pk})`);return""}let f=d.from(`vault:${c}`);for(let i=0;i<=t;i++)f=d.concat([f,d.from(`:${e[i].did}`)]);if(!r.approverSig){if(o)throw new Error(`vault approve signature missing for ${r.did}`);return""}try{let i;if(t>0){const g=e[t-1];i=(0,n.fromPublicKey)(g.pk,(0,s.toTypeInfo)(g.did))}else{if(!r.approverPk||!r.approverDid||!(0,s.isFromPublicKey)(r.approverDid,r.approverPk)){if(o)throw new Error(`approver config missing for ${r.did}`);return""}i=(0,n.fromPublicKey)(r.approverPk,(0,s.toTypeInfo)(r.approverDid))}if(await i.verify(f,r.approverSig)===!1){if(o)throw new Error(`signature verify failed for ${r.did}`);return""}}catch(i){if(console.error(i),o)throw new Error(`vault approve verify failed: ${i.message}`);return""}if(!r.sig){if(o)throw new Error(`vault commit signature missing for ${r.did}`);return""}try{const i=(0,n.fromPublicKey)(r.pk,(0,s.toTypeInfo)(r.did));if(r.approverSig&&(f=d.concat([f,d.from(`:${r.approverSig}`)])),await i.verify(f,r.sig)===!1){if(o)throw new Error(`commit signature verify failed for ${r.did}`);return""}}catch(i){if(console.error(i),o)throw new Error(`vault commit verify failed: ${i.message}`);return""}}return e[e.length-1].did}return a}var D=T();function I({vaults:u,appPid:m}){const{t:v}=K(),[n,s]=q({verified:!1,verifying:!0,error:""});return b.useEffect(()=>{D.verifyVault(u,m,!0).then(l=>{s({verified:!!l,verifying:!1})}).catch(l=>{s({verified:!1,verifying:!1,error:l.message})})},[u,m,s]),n.verifying?p.jsx(P,{}):n.verified?p.jsx($,{title:v("blocklet.config.vault.verified"),children:p.jsx(j,{fontSize:"small",color:"success"})}):p.jsx($,{title:n.error,children:p.jsx(k,{color:"error"})})}I.propTypes={vaults:w.array.isRequired,appPid:w.string.isRequired};export{I as V};
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import{r as k,a as Fe,d as ze,g as qe}from"./vendor-react-Dvs43sk9.js";import{j as n,a$ as ae,W as f,s as le,T as M,ak as j,Q as Be,P as Ge,D as A,at as F,J as z,a3 as ye,b7 as be,am as Ve,bd as Ke,d5 as Qe,d6 as Xe,ar as Ye}from"./vendor-mui-core-BIZOanxj.js";import{a as _,b as ue}from"./vendor-hooks-BtDnIwBH.js";import{c as B,bs as Z,bt as ee,bu as ve,bv as Je,aj as Ze,m as et,f as tt,W as X,bw as ne,h as Y,be as nt}from"./index-BIIL1VhU.js";import{a as O,J as ce,C as G,a6 as rt,a7 as st}from"./vendor-utils-CVwaKsP9.js";import{u as it}from"./session-B_RHNjCZ.js";import{O as ot,w as at,a as lt,M as V,f as de,c as ct,T as we,H as dt}from"./vendor-ux-Cfhaj-oj.js";import{i as pt}from"./isURL-CSKc4kTl.js";import{u as ut}from"./use-app-logo-Cs4SrcDi.js";const ht={dividerColor:"rgba(239, 241, 245, 1)"},tn=e=>{if(!e||!e.length)return[];const t=[];let s=null,r=[];if(e.forEach(i=>{if(!i.activity||!i.activity.type||!s){s&&(r.length===1?t.push(r[0]):(s.items=r,t.push(s))),i.activity&&i.activity.type?(s=i,r=[i]):(t.push(i),s=null,r=[]);return}const p=r[0].activity,o=p.type,u=p.target?.type,x=p.target?.id,v=i.activity.type,g=i.activity.target?.type,L=i.activity.target?.id;if(o&&v&&o===v&&(!p.target&&!i.activity.target||p.target&&i.activity.target&&u===g&&x===L))r.push(i);else{if(r.length===1)t.push(r[0]);else{const b=Object.assign({},s,{items:r});t.push(b)}s=i,r=[i]}}),s)if(r.length===1)t.push(r[0]);else{const i=Object.assign({},s,{items:r});t.push(i)}return t},mt=e=>!O(e.activity)&&!!e.activity.type&&!!e.activity.actor,nn=e=>mt(e)&&!!e.actorInfo&&!!e.actorInfo.did,je=e=>{if(!e)return null;const{meta:t,target:s,actor:r}=e||{};let i=s?.id;return s?.type==="user"&&(i=ce(G(B.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:r})),{metaLink:t?.id,targetLink:i}},ke=e=>pt(e),H={COMMENT:"comment",LIKE:"like",FOLLOW:"follow",TIPS:"tips",MENTION:"mention",ASSIGN:"assign",UN_ASSIGN:"un_assign"},ft={[H.COMMENT]:(e,t,s)=>t>1?n.jsxs(n.Fragment,{children:["have left ",t," comments on ",s?"your":"the"," ",e,":"]}):n.jsxs(n.Fragment,{children:["has commented on ",s?"your":"the"," ",e,":"]}),[H.LIKE]:(e,t,s)=>t>1?n.jsxs(n.Fragment,{children:["have liked ",s?"your":"the"," ",e,":"]}):n.jsxs(n.Fragment,{children:["have liked ",s?"your":"the"," ",e,":"]}),[H.FOLLOW]:(e,t)=>t>1?n.jsx(n.Fragment,{children:"have followed you"}):n.jsx(n.Fragment,{children:"has followed you"}),[H.TIPS]:(e,t,s)=>t>1?n.jsxs(n.Fragment,{children:["left tips for ",s?"your":"the"," ",e,":"]}):n.jsxs(n.Fragment,{children:["left a tip for ",s?"your":"the"," ",e,":"]}),[H.MENTION]:(e,t,s)=>t>1?n.jsxs(n.Fragment,{children:["have mentioned you in ",s?"your":"the"," ",e,":"]}):n.jsxs(n.Fragment,{children:["mentioned you in ",s?"your":"the"," ",e,":"]}),[H.ASSIGN]:()=>n.jsx(n.Fragment,{children:"has assigned you a task: "}),[H.UN_ASSIGN]:()=>n.jsx(n.Fragment,{children:"has revoked your task assignment: "})},$=k.memo(function({user:t,color:s="text.secondary"}){const r=ce(G(B.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:t.did});return n.jsx(ae,{href:r,color:s,target:"_blank",onClick:i=>{i.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none"},children:t.fullName||"System"})});$.propTypes={user:f.shape({did:f.string.isRequired,fullName:f.string.isRequired}).isRequired,color:f.string};$.displayName="UserLink";function rn({activity:e,users:t,actors:s,extra:r={},mountPoint:i=""}){const{session:p}=it()||{},{type:o,target:u}=e||{},{type:x,author:v}=u||{},{linkColor:g="text.secondary"}=r||{},L=_(()=>v?(p?.user?.did||r?.userDid)===v:!0,[p,v]),C=_(()=>{if(!Array.isArray(t))return new Map;const y=new Map;return t.forEach(T=>{T?.did&&!y.has(T.did)&&y.set(T.did,T)}),y},[t]),b=_(()=>Array.isArray(s)?[...new Set(s)].map(T=>T?C.get(T)||{did:T,fullName:"System"}:null):[],[s,C]),E=ue(()=>{if(!Array.isArray(b)||b.length===0)return null;if(b.length===1)return n.jsx($,{user:b[0],color:g});const y=b.slice(0,-1),T=b[b.length-1];if(b.length===2)return n.jsxs(n.Fragment,{children:[n.jsx($,{user:y[0],color:g})," and ",n.jsx($,{user:T,color:g})]});const a=b.length>3,h=a?b.slice(0,2):y;return n.jsxs(n.Fragment,{children:[h.map((c,d)=>n.jsxs(Fe.Fragment,{children:[n.jsx($,{user:c,color:g}),d<h.length-1?", ":""]},c.did)),a?`, and ${b.length-2} others`:n.jsxs(n.Fragment,{children:[", and ",n.jsx($,{user:T,color:g})]})]})}),N=ue(()=>{const y=ft[o];return y?y(x==="doc"?"document":x,t.length,L):null}),I=_(()=>{const y=E(),T=N();return!y||!T?null:n.jsxs(n.Fragment,{children:[y," ",T]})},[o,x,b,E,N]),w=_(()=>{if(!e)return null;const y=je(e);return y?.targetLink?ke(y?.targetLink)?y?.targetLink:G(i,y.targetLink):null},[e,i]);return!o||O(u)?null:n.jsxs(n.Fragment,{children:[I," ",n.jsx(ae,{href:w,color:"primary",target:"_blank",sx:{textDecoration:"none"},onClick:y=>{y.customPreventRedirect=!0},children:u.name||u.desc})]})}const gt={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 7L7 17M8 7h9v9"/>'};Te.propTypes={meta:f.object.isRequired};const xt=le(Ge)(({theme:e})=>({maxWidth:320,display:"flex",flexDirection:"column",gap:e.spacing(1.5),padding:e.spacing(2),marginTop:e.spacing(1),borderRadius:e.spacing(1),border:`1px solid ${e.palette.divider}`,boxShadow:"none"})),yt=le(j)(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:e.spacing(1),marginBottom:e.spacing(1)})),bt=le(j)({display:"flex",justifyContent:"space-between",alignItems:"center"});function Te({meta:e}){const{amount:t,symbol:s,chainId:r}=e,i=()=>{window.open(`https://explorer.arcblock.io/chain/${r}`,"_blank")};return n.jsxs(xt,{children:[n.jsxs(yt,{children:[n.jsx("img",{alt:"ArcBlock Beta",src:"https://bbqat7g5cg33cyr4pdrd6foycgzfb5xxeh2se7gcqkq.did.abtnet.io/payment-kit/methods/arcblock.png",width:32,height:32,style:{borderRadius:16}}),n.jsx(M,{variant:"h5",sx:{color:"text.primary"},children:"ArcBlock"})]}),n.jsxs(bt,{children:[n.jsxs(j,{sx:{display:"flex",alignItems:"baseline",gap:1},children:[n.jsxs(M,{component:"span",variant:"h5",sx:{color:"text.primary",fontWeight:"bold"},children:["+ ",t]}),n.jsx(M,{component:"span",variant:"subtitle2",sx:{color:"text.secondary"},children:s})]}),n.jsx(Be,{variant:"outlined",size:"small",color:"secondary",endIcon:n.jsx(ot,{icon:gt}),onClick:i,sx:{borderRadius:4},children:"View on Chain"})]})]})}vt.propTypes={meta:f.object.isRequired,type:f.string.isRequired,hideTips:f.bool,sx:f.object};function vt({meta:e,type:t,hideTips:s=!1,sx:r={}}){return O(e)?null:t==="tips"&&!s?n.jsx(Te,{meta:e}):n.jsx(M,{variant:"subtitle2",component:"p",sx:[{fontSize:16,color:"text.secondary",wordBreak:"break-all"},...Array.isArray(r)?r:[r]],children:e.content})}var re,he;function wt(){if(he)return re;he=1;var e=ze();function t(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var s=t(e);function r(){return r=Object.assign?Object.assign.bind():function(a){for(var h=1;h<arguments.length;h++){var c=arguments[h];for(var d in c)({}).hasOwnProperty.call(c,d)&&(a[d]=c[d])}return a},r.apply(null,arguments)}function i(a,h){a.prototype=Object.create(h.prototype),a.prototype.constructor=a,o(a,h)}function p(a,h){if(a==null)return{};var c={};for(var d in a)if({}.hasOwnProperty.call(a,d)){if(h.indexOf(d)!==-1)continue;c[d]=a[d]}return c}function o(a,h){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(c,d){return c.__proto__=d,c},o(a,h)}var u={position:"absolute",bottom:0,left:0,height:0,overflow:"hidden","padding-top":0,"padding-bottom":0,border:"none"},x=["box-sizing","width","font-size","font-weight","font-family","font-style","letter-spacing","text-indent","white-space","word-break","overflow-wrap","padding-left","padding-right"];function v(a,h){if(!a||typeof a!="object")return a;var c={};return Object.keys(a).forEach(function(d){h.indexOf(d)>-1||(c[d]=a[d])}),c}var g=["component","className","unsafeHTML"];function L(a,h){if(h!=="letters"&&h!=="words")throw new Error("Unsupported options basedOn: "+h);if(a.nodeType===Node.TEXT_NODE){var c=document.createDocumentFragment(),d;switch(h){case"words":d=a.textContent.split(/\b|(?=\W)/);break;case"letters":d=Array.from(a.textContent);break}d.forEach(function(R){c.appendChild(C(R))}),a.parentNode.replaceChild(c,a)}else if(a.nodeType===Node.ELEMENT_NODE)for(var l=[].slice.call(a.childNodes),m=l.length,S=0;S<m;S++)L(l[S],h)}function C(a){var h=document.createElement("span");return h.className="LinesEllipsis-unit",h.textContent=a,h}function b(a){a.parentNode.replaceChild(document.createTextNode(a.textContent),a)}function E(a,h){if(!(!h.contains(a)||a===h)){for(;a.nextElementSibling;)a.parentNode.removeChild(a.nextElementSibling);E(a.parentNode,h)}}function N(a){for(var h=a;h=h.parentNode;)if(/p|div|main|section|h\d|ul|ol|li/.test(h.tagName.toLowerCase()))return h}function I(a){return!!(a.offsetHeight&&(a.offsetWidth||/\S/.test(a.textContent)))}var w={component:"div",unsafeHTML:"",maxLine:1,ellipsis:"…",ellipsisHTML:void 0,className:"",basedOn:void 0,onReflow:function(){},winWidth:void 0},y=Object.keys(w),T=function(a){function h(d){var l;return l=a.call(this,d)||this,l.props=r({},w,d),l.state={html:d.unsafeHTML,clamped:!1},l.canvas=null,l.maxLine=0,l.nlUnits=[],l}i(h,a);var c=h.prototype;return c.componentDidMount=function(){this.initCanvas(),this.reflow(this.props)},c.componentDidUpdate=function(l){l.winWidth!==this.props.winWidth&&this.copyStyleToCanvas(),this.props!==l&&this.reflow(this.props)},c.componentWillUnmount=function(){this.canvas.parentNode.removeChild(this.canvas),this.canvas=null},c.setState=function(l,m){return typeof l.clamped<"u"&&(this.clamped=l.clamped),a.prototype.setState.call(this,l,m)},c.initCanvas=function(){if(!this.canvas){var l=this.canvas=document.createElement("div");l.className="LinesEllipsis-canvas "+this.props.className,l.setAttribute("aria-hidden","true"),this.copyStyleToCanvas(),Object.keys(u).forEach(function(m){l.style[m]=u[m]}),document.body.appendChild(l)}},c.copyStyleToCanvas=function(){var l=this,m=window.getComputedStyle(this.target);x.forEach(function(S){l.canvas.style[S]=m[S]})},c.reflow=function(l){this.maxLine=+l.maxLine||1,this.canvas.innerHTML=l.unsafeHTML;var m=l.basedOn||(/^[\x00-\x7F]+$/.test(l.unsafeHTML)?"words":"letters");L(this.canvas,m);var S=this.putEllipsis(this.calcIndexes()),R={clamped:S,html:this.canvas.innerHTML};this.setState(R,l.onReflow.bind(this,R))},c.calcIndexes=function(){var l=[0],m=this.nlUnits=Array.from(this.canvas.querySelectorAll(".LinesEllipsis-unit")),S=m.length;if(!m.length)return l;var R=m.find(I);if(!R)return l;for(var P=1,Q=R.offsetTop,U=1;U<S&&!(I(m[U])&&m[U].offsetTop-Q>1&&(P++,l.push(U),Q=m[U].offsetTop,P>this.maxLine));U++);return l},c.putEllipsis=function(l){if(l.length<=this.maxLine)return!1;this.nlUnits=this.nlUnits.slice(0,l[this.maxLine]);var m=this.nlUnits.pop(),S=this.makeEllipsisSpan();do E(m,this.canvas),N(m).appendChild(S),m=this.nlUnits.pop();while(m&&(!I(m)||S.offsetHeight>m.offsetHeight||S.offsetTop>m.offsetTop));return m&&b(m),this.nlUnits.forEach(b),!0},c.makeEllipsisSpan=function(){var l=this.props,m=l.ellipsisHTML,S=l.ellipsis,R=document.createElement("span");R.appendChild(document.createElement("wbr"));var P=document.createElement("span");return P.className="LinesEllipsis-ellipsis",m?P.innerHTML=m:P.textContent=S,R.appendChild(P),R},c.isClamped=function(){return this.clamped},c.render=function(){var l=this,m=this.state,S=m.html,R=m.clamped,P=this.props,Q=P.component,U=P.className,$e=P.unsafeHTML,Oe=p(P,g);return s.default.createElement(Q,r({className:"LinesEllipsis "+(R?"LinesEllipsis--clamped":"")+" "+U,ref:function(We){return l.target=We}},v(Oe,y)),s.default.createElement("div",{dangerouslySetInnerHTML:{__html:R?S:$e}}))},h}(s.default.PureComponent);return re=T,re}var jt=wt();const kt=qe(jt),Tt=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},St=e=>e.every(t=>t.type==="text"),Ct=e=>e.every(t=>t.type==="image"),Lt=e=>rt(e,2).map(t=>({type:"combined",items:t})).filter(t=>(t.items||[]).every(s=>s?.data?.text?.trim?.())),Et=e=>{if(!e.length||e.length<=1)return!1;const t=e[0].type;return e.every(s=>s.type===t)},Rt=(e,t)=>{try{const s=at.toTypeInfo(e);if(!(s.role!==void 0&&s.role!==lt.types.RoleType.ACCOUNT))return;const i=G(B.WELLKNOWN_SERVICE_PATH_PREFIX,"user");return ce(i,{did:e,locale:t})}catch(s){console.error(s);return}},sn=(e,t)=>t?.componentMountPoints?.find(r=>r.did===e)?.mountPoint,on=(e,t)=>{if(!e)return null;if(e.actions?.length===1)return e.actions[0].link||null;const s=je(e.activity),r=s?.metaLink||s?.targetLink;if(r)return ke(r)?r:G(t,r);if(e.attachments?.length===1){const i=e.attachments[0];if(i.type==="link")return i.data?.url||null}return null},me=e=>{const{receivers:t=[]}=e;return t.length?t.every(s=>s.read):!0};function Nt(e){const t=e.getBoundingClientRect(),s=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,i=t.height,p=t.width;let o=0;t.top>=0&&t.bottom<=r?o=i:t.top<0&&t.bottom>0&&t.bottom<=r?o=t.bottom:t.top>=0&&t.top<r&&t.bottom>r?o=r-t.top:t.top<0&&t.bottom>r&&(o=r);let u=0;return t.left>=0&&t.right<=s?u=p:t.left<0&&t.right>0&&t.right<=s?u=t.right:t.left>=0&&t.left<s&&t.right>s?u=s-t.left:t.left<0&&t.right>s&&(u=s),o*u/(i*p)>=.5}const an=e=>{if(!e)return[];const t=[],s=5,r=Array.from(e.querySelectorAll(".notification-row")),i=r.length;for(let p=0;p<i;p+=s){const o=r.slice(p,p+s);let u=!0;for(const x of o){const v=x.id;if(Nt(x))t.push(v);else{u=!1;break}}if(!u)break}return t},It=e=>{const t=[];return e&&(e.items?.length?e.items.forEach(s=>{me(s)||t.push(s)}):me(e)||t.push(e)),t},ln=(e,t)=>{let s=[];return t.length&&t.forEach(r=>{const i=e.get(r);i&&(s=s.concat(It(i)))}),s},W=(e,t)=>({...e,...t?{filter:"invert(1)"}:{}}),K=e=>{if(!e)return null;try{return new URL(e).protocol!=="https:"?(console.warn("Image URL must use HTTPS protocol:",e),null):`${B.WELLKNOWN_SERVICE_PATH_PREFIX}/proxy?url=${encodeURIComponent(e)}`}catch(t){return console.warn("Invalid image URL format:",e,t),null}};function Se({attachment:e}){const{data:t}=e,s=A();let r="";try{r=new URL(t.url).host}catch{r=t.url}return n.jsxs(ae,{target:"_blank",rel:"noopener noreferrer",href:t.url,className:"link",style:{wordBreak:"break-all"},onClick:i=>{i.customPreventRedirect=!0},children:[!!r&&n.jsx("span",{className:"url",children:r}),!!t.title&&n.jsx(j,{className:"title",style:{whiteSpace:"unset"},children:t.title}),!!t.description&&n.jsx(j,{className:"description",style:{whiteSpace:"unset",color:s.palette.text.secondary},children:t.description}),!!t.image&&n.jsx(V,{src:Z.getImagePath(t.image),alt:t.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"},fallback:K(Z.getImagePath(t.image))})]})}Se.propTypes={attachment:f.object.isRequired};function Ce({attachment:e}){const{data:t}=e;return n.jsx(V,{src:Z.getImagePath(t.url),alt:t.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"},sx:{".Img-root":{height:256}},fallback:K(Z.getImagePath(t.url))})}Ce.propTypes={attachment:f.object.isRequired};function Le({attachment:e,...t}){const{data:s}=e,r=s.color?.toLowerCase()||t.color,i=s.size||t.size,p=s.fontWeight||t.fontWeight||400;let o="14px";return i==="small"?o="12px":i==="normal"?o="14px":i==="big"?o="16px":i==="large"&&(o="18px"),n.jsx(Pt,{className:"title",style:{fontSize:o,color:r,whiteSpace:"unset",fontWeight:p},children:s.text})}Le.propTypes={attachment:f.object.isRequired};const Pt=F.span`
|
|
2
|
-
width: 100%;
|
|
3
|
-
display: -webkit-box;
|
|
4
|
-
-webkit-box-orient: vertical;
|
|
5
|
-
-webkit-line-clamp: 2;
|
|
6
|
-
overflow: hidden;
|
|
7
|
-
text-overflow: ellipsis;
|
|
8
|
-
white-space: normal;
|
|
9
|
-
word-break: break-word;
|
|
10
|
-
`;var se,fe;function Mt(){return fe||(fe=1,se={getChainHost:s=>{const r="explorer.arcblockio.cn";return s&&{beta:"beta.abtnetwork.io",main:"main.abtnetwork.io"}[s]||r},getUrlHost:s=>{try{return new URL(s).host}catch{return s}}}),se}var q=Mt(),ie,ge;function Dt(){return ge||(ge=1,ie={linkStyle:{color:"#2754C5",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",fontSize:"14px",textDecoration:"underline"},actionsStyle:{margin:"20px -8px 0px"},actionStyle:{color:"#4598fa",fontSize:14,border:"1px solid #4598fa",display:"inline-block",borderRadius:"4px",margin:"8px",marginTop:"8px",marginBottom:"8px",marginLeft:"8px",marginRight:"8px"},assetStyle:{backgroundColor:"#f6f6f6",borderRadius:"8px",padding:"8px"},remarkStyle:{color:"#9397a1",fontSize:"12px",margin:0,whiteSpace:"pre-line!important"},summaryStyle:{color:"#49c3ad",fontWeight:700},titleStyle:{marginBottom:"6px"},severityColorMap:{normal:"#C4C5CA",success:"#25C99B",error:"#F16E6E",warning:"#DE9E37"},attachmentsStyle:{borderLeft:"2px solid transparent",paddingLeft:"20px"},h1Style:{color:"#333",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",fontSize:"24px",fontWeight:"bold",margin:"40px 0",padding:"0"},footerStyle:{color:"#898989",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",fontSize:"12px",lineHeight:"22px",margin:0}}),ie}var te=Dt();Ee.propTypes={locale:f.string,data:f.object.isRequired};function Ee({locale:e="en",data:t}){const s={zh:"来自",en:"from"}[e]||"from",r={zh:"接收",en:"Received"}[e]||"Received",p=`https://${q.getUrlHost(t.chainHost)||q.getChainHost(t.chainId)}/explorer/tokens/${t.address}/tx`,o=A(),u=o.palette.mode==="dark";let x=t.amount;t.decimal&&(x=t.amount/10**t.decimal);const v=_(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return n.jsx("a",{href:p,target:"_blank",rel:"noreferrer",onClick:g=>{g.customPreventRedirect=!0},children:n.jsxs(j,{sx:{display:"flex",flexDirection:"column"},children:[n.jsxs(j,{sx:v,children:[n.jsx(M,{component:"div",sx:{fontWeight:700,color:o.palette.text.primary},children:r}),n.jsxs(M,{component:"div",align:"right",style:W(te.summaryStyle,u),sx:{flex:1},children:["+",x," ",t.symbol]})]}),n.jsxs(j,{sx:v,children:[n.jsx(M,{component:"div",style:W({...te.remarkStyle,fontSize:14},u),children:s}),n.jsx(j,{sx:{maxWidth:260,fontSize:14},children:n.jsx(de,{did:t.address,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]})]})})}Re.propTypes={locale:f.string,data:f.object.isRequired};function Re({locale:e="en",data:t}){const s={zh:"接收",en:"Received"}[e]||"Received",r={zh:"来自",en:"from"}[e]||"from",i=q.getUrlHost(t.chainHost)||q.getChainHost(t.chainId),p=t.did||t?.credential?.issuer?.id||"",o=`https://${i}/explorer/assets/${p}`,x=A().palette.mode==="dark",v=_(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return n.jsx(j,{sx:{pr:1},children:n.jsx("a",{href:o,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block"},onClick:g=>{g.customPreventRedirect=!0},rel:"noreferrer",children:n.jsxs(j,{sx:{display:"flex",flexDirection:"column"},children:[n.jsxs(j,{sx:v,children:[n.jsx(M,{component:"div",sx:{fontWeight:700,color:"text.primary"},children:s}),n.jsx(M,{component:"div",align:"right",style:W(te.summaryStyle,x),children:"+1 Asset"})]}),p?n.jsxs(j,{sx:v,children:[n.jsx(M,{component:"div",style:W({...te.remarkStyle,fontSize:14},x),children:r}),n.jsx(j,{sx:{maxWidth:260,fontSize:14},children:n.jsx(de,{did:p,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]}):null]})})})}Ne.propTypes={data:f.object.isRequired,locale:f.string};function Ne({data:e,locale:t="en"}){const r=A().palette.mode==="dark";return n.jsxs("a",{href:e.url,target:"_blank",style:{display:"flex",textDecoration:"none",color:"initial"},onClick:i=>{i.customPreventRedirect=!0},rel:"noreferrer",children:[n.jsx(V,{className:"image",src:e.logo,width:50,height:50,alt:"",fallback:K(e.logo)}),n.jsxs("div",{style:{flex:1,marginLeft:"10px"},children:[n.jsx("div",{style:W({marginBottom:"6px"},r),children:e.title}),n.jsx(j,{sx:{maxWidth:260,fontSize:10},children:n.jsx(de,{did:e.appDID,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:t})})]})]})}Ie.propTypes={locale:f.string,data:f.object.isRequired};function Ie({locale:e="en",data:t}){const s=q.getChainHost(t.chainId),r=`https://${s}/explorer/txs/${t.hash}`,i={zh:"交易详情",en:"Transaction Details"}[e]||"Transaction Details",p={zh:"交易哈希",en:"Transaction Hash"}[e]||"Transaction Hash",o=A(),u=o.palette.mode==="dark";return n.jsxs("a",{href:r,target:"_blank",style:W({textDecoration:"none",color:"initial",display:"block",fontSize:14},u),onClick:x=>{x.customPreventRedirect=!0},rel:"noreferrer",children:[n.jsx("h6",{style:{color:o.palette.text.secondary,margin:0},children:s}),n.jsx("p",{style:{color:o.palette.warning.main,margin:0},children:i}),n.jsxs("div",{style:{wordBreak:"break-all"},children:[p,": ",t.hash]})]})}function Pe({attachment:e,...t}){const{local:s}=k.useContext(ct),r=z(p=>p.breakpoints.down("md")),i=A();return n.jsxs(Ut,{...t,isMd:r,children:[e.type==="link"&&n.jsx(Se,{attachment:e,...t,isMd:r}),e.type==="image"&&n.jsx(Ce,{attachment:e,isMd:r}),e.type==="text"&&n.jsx(Le,{attachment:e,isMd:r}),e.type==="token"&&n.jsx(Ee,{data:e.data,local:s,isMd:r}),e.type==="asset"||e.type==="vc"?n.jsx(Re,{data:e.data,local:s,isMd:r}):null,e.type==="dapp"&&n.jsx(Ne,{data:e.data,local:s,isMd:r}),e.type==="transaction"&&n.jsx(Ie,{data:e.data,local:s,...t,isMd:r}),e.type==="divider"&&n.jsx(ye,{sx:{mb:1,mt:1},style:{color:i.palette.divider}})]})}const Ut=F.div`
|
|
11
|
-
display: ${({sx:e={}})=>e.display||"flex"};
|
|
12
|
-
flex-direction: ${({sx:e={}})=>e.flexDirection||"column"};
|
|
13
|
-
gap: ${({sx:e={}})=>e.gap||1};
|
|
14
|
-
width: ${({isMd:e=!1})=>e?"100%":"auto"};
|
|
15
|
-
&:last-child {
|
|
16
|
-
margin-bottom: 0;
|
|
17
|
-
}
|
|
18
|
-
`;Pe.propTypes={attachment:f.object.isRequired};function Me({data:e,...t}){const{items:s}=e;return n.jsx(At,{...t,children:s.map(r=>n.jsxs(be,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128},children:[n.jsxs(j,{sx:{display:"flex",alignItems:"center",gap:1},children:[r.icon?n.jsx(V,{src:r.icon,alt:r.title,style:{width:16,height:16},fallback:K(r.icon)}):null,n.jsxs(j,{className:"metric-name",sx:{display:"flex",alignItems:"center"},children:[r.title,r.subtitle?n.jsx(Ve,{title:r.subtitle,arrow:!0,placement:"top",children:n.jsx(Ke,{fontSize:"small",sx:{fontSize:14,ml:.5}})}):null]})]}),n.jsxs(j,{className:"metric-number",sx:{color:r.content_color||"rgba(3, 7, 18, 1)"},children:[r.content,r.sub_content?n.jsxs("span",{className:"sub-content",style:{color:r.sub_content_color||"rgba(156, 163, 175, 1)"},children:["(",r.sub_content,")"]}):null]})]},r.title))})}const At=F(j)`
|
|
19
|
-
display: flex;
|
|
20
|
-
justify-content: flex-start;
|
|
21
|
-
flex-wrap: wrap;
|
|
22
|
-
gap: 16px;
|
|
23
|
-
.metric-number {
|
|
24
|
-
font-size: 18px;
|
|
25
|
-
font-weight: 600;
|
|
26
|
-
.sub-content {
|
|
27
|
-
font-size: 12px;
|
|
28
|
-
font-weight: 400;
|
|
29
|
-
margin-left: 4px;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
.metric-name {
|
|
33
|
-
font-size: 14px;
|
|
34
|
-
color: rgba(156, 163, 175, 1);
|
|
35
|
-
}
|
|
36
|
-
`;Me.propTypes={data:f.object.isRequired};function De({data:e}){const{items:t}=e,s=z(o=>o.breakpoints.down("sm")),r=z(o=>o.breakpoints.down("md")),i=z(o=>o.breakpoints.down("lg")),p=()=>s?1:r?3:i?4:6;return n.jsx(Qe,{variant:"quilted",cols:p(),gap:8,rowHeight:128,sx:{margin:0},children:t.map(o=>{const u=o.cover||o.display;return u?n.jsx("a",{href:o.link,target:"_blank",rel:"noopener noreferrer",children:n.jsx(Xe,{children:n.jsx(V,{src:u,alt:o.title||"",style:{borderRadius:"8px"},fallback:K(u)})})},u):null})})}De.propTypes={data:f.object.isRequired};function Ue({data:e,feedType:t="data-tracker",...s}){return n.jsxs(Ht,{...s,children:[t==="data-tracker"&&e.type==="table"&&n.jsx(Me,{data:e}),(t==="graphic"||t==="gallery")&&n.jsx(De,{data:e})]})}const Ht=F.div`
|
|
37
|
-
display: flex;
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
width: 100%;
|
|
40
|
-
margin-bottom: 4px;
|
|
41
|
-
&:last-child {
|
|
42
|
-
margin-bottom: 0;
|
|
43
|
-
}
|
|
44
|
-
`;Ue.propTypes={data:f.object.isRequired,feedType:f.string};J.propTypes={data:f.object.isRequired,style:f.object};function J({data:e,style:t={}}){const r=A().palette.mode==="dark";return n.jsx(M,{style:W({color:r&&e.darkModeColor?e.darkModeColor:e.color||"initial",margin:0,whiteSpace:"pre-line!important",...t},r),children:e.text})}function Ae({data:e}){const t=[];for(let s=0;s<e?.length;s+=2){const r=e[s],i=e[s+1];r&&i?t.push(n.jsxs(xe,{children:[n.jsx("td",{className:"label-col",children:n.jsx(J,{data:r.data,style:{whiteSpace:"nowrap",fontSize:"14px"}})}),n.jsx("td",{className:"value-col",children:n.jsx(J,{data:i.data,style:{wordBreak:"break-all",textAlign:"right",fontSize:"14px"}})})]},s)):r&&t.push(n.jsx(xe,{children:n.jsx("td",{className:"label-col",children:n.jsx(J,{data:r.data,style:{fontSize:"14px"}})})},s))}return n.jsx("table",{style:{width:"100%"},children:n.jsx("tbody",{children:t})})}Ae.propTypes={data:f.array.isRequired};const xe=F.tr`
|
|
45
|
-
display: flex;
|
|
46
|
-
flex-direction: row;
|
|
47
|
-
justify-content: flex-start;
|
|
48
|
-
align-items: center;
|
|
49
|
-
font-size: 14px;
|
|
50
|
-
gap: ${({theme:e})=>e.spacing(1)};
|
|
51
|
-
padding: ${({theme:e})=>e.spacing(1)} 0;
|
|
52
|
-
border-bottom: 1px solid ${({theme:e})=>e.palette.divider};
|
|
53
|
-
|
|
54
|
-
&:last-child {
|
|
55
|
-
border-bottom: none;
|
|
56
|
-
padding-bottom: 0;
|
|
57
|
-
}
|
|
58
|
-
&:first-child {
|
|
59
|
-
padding-top: 0;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.label-col {
|
|
63
|
-
min-width: 130px;
|
|
64
|
-
flex-shrink: 0;
|
|
65
|
-
}
|
|
66
|
-
.value-col {
|
|
67
|
-
flex: 1;
|
|
68
|
-
}
|
|
69
|
-
`;function He({notification:e,severity:t,showSke:s=!0}){const{attachments:r,data:i,...p}=e,o=z(g=>g.breakpoints.down("md"));if((!r||!r.length)&&O(i))return null;const u=Tt(t),x=(g,L=!1)=>{if(!g&&!Array.isArray(g))return null;let C=g,b={},E="horizontal";L&&St(g)&&(C=Lt(g),E="vertical",b={display:"flex",gap:8,flexDirection:"row",justifyContent:"flex-start",flexWrap:"wrap",height:"100%",width:o||C.length===1?"100%":"28%"});const N=Et(C);return n.jsx(j,{sx:{width:"100%",display:"flex",gap:1,flexDirection:L?"row":"column",justifyContent:"flex-start",alignItems:L?"center":"unset",flexWrap:"wrap"},children:C.map((I,w)=>I.type==="section"?n.jsx(Ae,{data:I.fields},w):n.jsxs(k.Fragment,{children:[n.jsx(Pe,{attachment:I,style:b,...p}),!(o&&E==="vertical")&&N&&C.length>1&&w!==C.length-1?n.jsx(ye,{orientation:E,style:{color:ht.dividerColor},sx:E==="vertical"?{ml:2,mr:2,height:32}:{}}):null]},w))})},v=Ct(r);return n.jsx(_t,{children:n.jsxs("div",{className:"message-in-list",children:[r.length>0&&n.jsx("div",{className:"message-container",style:o?{width:"100%"}:{},children:v?x(r):n.jsx(be,{variant:"outlined",className:"attachment-card",sx:{px:o?1:2,py:1.5,borderRadius:"8px",minWidth:128,borderColor:u},children:x(r)})}),!O(i)&&n.jsx("div",{className:"message-container",children:n.jsx("div",{className:"data-container",children:n.jsx(Ue,{data:i,feedType:e.feedType})})}),r.length===0&&O(i)&&s&&n.jsx(Ye,{className:"attach-ske",style:{marginTop:10},variant:"rectangular",height:150})]})})}const _t=F.div`
|
|
70
|
-
display: flex;
|
|
71
|
-
flex-direction: column;
|
|
72
|
-
.message-in-list {
|
|
73
|
-
padding: ${({theme:e})=>`${e.spacing(1.5)} ${e.spacing(1.5)} ${e.spacing(1.5)} 0`};
|
|
74
|
-
display: flex;
|
|
75
|
-
border-radius: 8px;
|
|
76
|
-
}
|
|
77
|
-
.message-title {
|
|
78
|
-
color: #25292f;
|
|
79
|
-
font-size: 18px;
|
|
80
|
-
font-weight: bold;
|
|
81
|
-
word-break: break-all;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.attach-ske {
|
|
85
|
-
position: relative;
|
|
86
|
-
margin-left: 10px;
|
|
87
|
-
&::after {
|
|
88
|
-
content: '';
|
|
89
|
-
position: absolute;
|
|
90
|
-
left: -10px;
|
|
91
|
-
top: 0;
|
|
92
|
-
height: 100%;
|
|
93
|
-
width: 4px;
|
|
94
|
-
background-color: ${e=>e.leftLineColor};
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.message-body {
|
|
99
|
-
color: #25292f;
|
|
100
|
-
font-size: 16px;
|
|
101
|
-
word-break: break-all;
|
|
102
|
-
white-space: pre-line;
|
|
103
|
-
}
|
|
104
|
-
.message-container {
|
|
105
|
-
display: flex;
|
|
106
|
-
flex-direction: column;
|
|
107
|
-
justify-content: flex-start;
|
|
108
|
-
.data-container,
|
|
109
|
-
.attachment-container {
|
|
110
|
-
display: flex;
|
|
111
|
-
flex-direction: column;
|
|
112
|
-
width: 100%;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
.actions-container {
|
|
116
|
-
margin-top: 10px;
|
|
117
|
-
.actions-item {
|
|
118
|
-
margin-right: 8px;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
`;He.propTypes={severity:f.string.isRequired,notification:f.object.isRequired,showSke:f.bool};const oe=e=>Je.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),$t=async(e,t)=>{const{type:s,did:r}=e;return ve.isSameAddr(s,"did")?await Rt(r,t)||ee.getLink(e):ee.getLink(e)};function Ot(e){return new TextEncoder().encode(e).length>=1e4}const Wt=async(e,t,s=!0)=>{let r=e;Ot(e)&&(r=e.slice(0,1e4));const i=ee.toTextList(r);return await Promise.all(i.map(async o=>{if(o instanceof ee.Link){if(s){const u=await $t(o,t),{type:x,chainId:v,did:g}=o;return ve.isSameAddr(x,"dapp")?`<em style="font-weight:bold;" data-type="${x}" data-chain-id="${v}" data-did="${g}">${o.text}</em>`:u?`<a target="_blank" rel="noopener noreferrer" style="color:#4598fa;font-weight:bold;" href="${u}">${o.text}</a>`:`<em style="font-weight:bold;" data-type="${x}" data-chain-id="${v}" data-did="${g}">${o.text}</em>`}return o.text}return o})).then(o=>o.join(""))};_e.propTypes={notification:f.object,rows:f.number,minimal:f.bool};function _e({notification:e,rows:t=2,minimal:s=!1}){const[r,i]=k.useState(!1),[p,o]=k.useState(""),{t:u,locale:x}=we(),{palette:v}=A(),g=k.useMemo(()=>{const{attachments:w}=e||{};if(!w)return!1;try{return w.length>0}catch{return!1}},[e]),L=k.useMemo(()=>{const{blocks:w}=e||{};if(!w)return!1;try{return w.length>0}catch{return!1}},[e]),C=k.useMemo(()=>{const{description:w}=e||{};return!!w},[e]),b=k.useMemo(()=>{const{data:w}=e||{};return!O(w)},[e]),E=k.useMemo(()=>g||L||C||b,[g,L,C,b]);if(k.useEffect(()=>{Wt(e?.description??"",x).then(w=>{o(w)})},[e?.description,x]),!E)return null;const N=()=>t===0?"":r?`<span class='toggle-btn' data-name='toggle-expanded'>${u("common.collapse")}</span>`:`...<span class='toggle-btn' data-name='toggle-expanded'>${u("common.expand")}</span>`,I=w=>{const{target:y}=w;y.getAttribute("data-name")==="toggle-expanded"&&(i(!r),w.customPreventRedirect=!0)};return n.jsxs(Ft,{color:s?v.common.white:"",children:[n.jsx(j,{className:"text-container",component:"div",onClick:I,children:p&&(!r&&t>0?n.jsx(kt,{innerRef:()=>{},onReflow:()=>{},basedOn:"letters",component:"article",unsafeHTML:oe(p),maxLine:t,ellipsisHTML:oe(N())}):n.jsx(M,{component:"div",className:`content ${t===0?"ellipsis":""}`,style:{whiteSpace:"pre-line!important"},dangerouslySetInnerHTML:{__html:oe(`${p}${N()}`)}}))}),!s&&(g||b)?n.jsx(He,{severity:e.severity,notification:e}):null]})}const Ft=F(j)`
|
|
122
|
-
width: 100%;
|
|
123
|
-
color: ${e=>e.color?e.color:e.theme.palette.text.secondary};
|
|
124
|
-
.text-container {
|
|
125
|
-
word-wrap: break-word;
|
|
126
|
-
word-break: break-all;
|
|
127
|
-
color: ${e=>e.color?e.color:e.theme.palette.text.secondary};
|
|
128
|
-
.toggle-btn {
|
|
129
|
-
display: inline-block;
|
|
130
|
-
white-space: nowrap;
|
|
131
|
-
cursor: pointer;
|
|
132
|
-
margin-left: 4px;
|
|
133
|
-
color: ${e=>e.theme.palette.secondary.main};
|
|
134
|
-
}
|
|
135
|
-
.content.ellipsis {
|
|
136
|
-
overflow: hidden;
|
|
137
|
-
text-overflow: ellipsis;
|
|
138
|
-
word-break: break-all;
|
|
139
|
-
display: block;
|
|
140
|
-
display: -webkit-box;
|
|
141
|
-
-webkit-box-orient: vertical;
|
|
142
|
-
-webkit-line-clamp: 2;
|
|
143
|
-
line-height: 1.25;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
`,cn=k.memo(_e);function dn({blocklet:e,square:t}={}){const{logoUrl:s,logoDarkUrl:r,rectLogoUrl:i,rectLogoDarkUrl:p}=ut({blocklet:e}),o=k.useMemo(()=>({appLogo:s,appLogoDark:r,appLogoRect:i,appLogoRectDark:p}),[s,r,i,p]);return Ze({meta:o,square:t})}const pe=k.createContext({}),{Provider:pn,Consumer:un}=pe;function hn(){return k.useContext(pe)}const{Provider:zt,Consumer:mn}=pe,{did:D,appId:qt}=window.env;function fn({children:e}){const{t,locale:s}=we(),{blocklet:r}=et(),[i,p]=k.useState([]),[o,u]=k.useState([]),[x,v]=k.useState([]),g=tt.getDisplayName(r),L=(r?.environments||[]).find(c=>c.key===X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR)?.value||"auto",C=r?.trustedPassports||[],b=r?.trustedFactories||[],E=r?.enablePassportIssuance!==!1,N=async()=>{try{const c=await Y.doBatchQuery({getRoles:{input:{teamDid:D}},getPermissions:{input:{teamDid:D}},getInvitations:{input:{teamDid:D}}}),d=(c.getRoles.roles||[]).filter(l=>!B.RBAC_CONFIG.roles.some(m=>m.name===l.name&&(!m.passport||m.ci))).map(l=>(l.hasDescription=!!l.description,l.hasDescription||(l.description=t("team.passport.description",{teamName:g,title:l.title})),l));u(st(d,[l=>nt(l.name)],["desc"])),v(c.getPermissions.permissions||[]),p(c.getInvitations.invitations||[])}catch(c){dt.error(c.message)}},I=({did:c}={})=>{const d={teamDid:D,user:{did:c}};return Y.getUser({input:d})},w=({query:c,paging:d}={})=>{const l={teamDid:D};return d&&(l.paging=d),c&&(l.query=c),l.sort={lastLoginAt:-1},Y.getUsers({input:l})},y=()=>Y.getUsersCountPerRole({input:{teamDid:D}}),T=()=>N();k.useEffect(()=>{r?.meta?.did&&N()},[r?.meta?.did]),k.useEffect(()=>{u(c=>c.map(d=>(d.hasDescription||(d.description=t("team.passport.description",{teamName:g,title:d.title})),{...d})))},[t,s]);const a=c=>{c.teamDid===D&&N()};ne(X.TeamEvents.userAdded,a,[D]),ne(X.TeamEvents.userRemoved,a,[D]),ne(X.TeamEvents.userUpdated,a,[D]);const h={teamDid:D,teamIssuerDid:qt,teamName:g,invitations:i,roles:o,permissions:x,trustedPassports:C,trustedFactories:b,isNodeTeam:!1,enablePassportIssuance:E,refresh:T,passportColor:L,endpoint:window.location.origin,blocklet:r,api:{getUser:I,getUsers:w,getUsersCountPerRole:y}};return n.jsx(zt,{value:h,children:e})}export{vt as M,cn as N,fn as T,dn as a,rn as b,nn as c,gt as d,an as e,ln as f,je as g,me as h,ke as i,mt as j,sn as k,It as l,tn as m,on as n,hn as u};
|