@abtnode/blocklet-services 1.16.52-beta-20251002-030549-0f91dab2 → 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 +49 -37
- 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-session.js +1 -1
- package/api/routes/user.js +177 -3
- package/api/services/auth/connect/invite.js +1 -1
- package/api/services/auth/connect/issue-passport.js +1 -1
- package/api/services/auth/connect/switch-passport.js +2 -1
- package/api/services/auth/session.js +35 -3
- 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-Cw0_MVFj.js → access-control-0wy7XAQb.js} +1 -1
- package/dist/assets/{actions-DbBJOD0d.js → actions-B4VXcSRp.js} +1 -1
- package/dist/assets/{add-component-core-B4fftW3o.js → add-component-core-BM7p_09p.js} +23 -23
- package/dist/assets/add-resource-DbQFT7Gg.js +1 -0
- package/dist/assets/{addon-CBAld8jW.js → addon-CUvC0k6Y.js} +1 -1
- package/dist/assets/{advanced-DPeAQM5T.js → advanced-BhCewgzQ.js} +3 -3
- package/dist/assets/{aigne-DD21HBlT.js → aigne-BQckonxP.js} +1 -1
- package/dist/assets/api-rC33aBSs.js +1 -0
- package/dist/assets/{appearance-CwcRjBdx.js → appearance-CjrhZWhd.js} +1 -1
- package/dist/assets/ar-CHd3xUx5.js +7 -0
- package/dist/assets/{arrow-down.svg-B1ffj_Bi.js → arrow-down.svg-f3YCmAji.js} +1 -1
- package/dist/assets/{audit-logs-CIL7B8dX.js → audit-logs-CASGp36e.js} +2 -2
- package/dist/assets/{authorize-DPXeAf_q.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-Ci1GnBqL.js → bind-account-D6KenxOW.js} +1 -1
- package/dist/assets/{branding-Y62inJ9A.js → branding-BVr5wVa5.js} +5 -5
- package/dist/assets/{branding-CGCnGFEE.js → branding-CHhPscOd.js} +2 -2
- package/dist/assets/branding-DLDF3ZZP.js +1 -0
- package/dist/assets/{bundle-avatar-BrBIjq4r.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-M75sOZuG.js → component-DWN2cI-c.js} +34 -34
- package/dist/assets/{config-Bshk_mlq.js → config-BgdQYz7Z.js} +2 -2
- package/dist/assets/{config-BASOtMEK.js → config-CPB45HHq.js} +4 -4
- package/dist/assets/{config-BOttfQk3.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-LpOyjg-M.js → confirm-BfJfcPyj.js} +1 -1
- package/dist/assets/{connect-A31Nzurl.js → connect-BbLXTlyu.js} +1 -1
- package/dist/assets/{connect-DEe_baYC.js → connect-ZcwxKVuN.js} +1 -1
- package/dist/assets/{connect-to-Cco6-qou.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-V3_sRk8l.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-B9OATbrX.js → domain-3JvbKqlt.js} +1 -1
- package/dist/assets/{domain-action-card-D-_-tvd3.js → domain-action-card-BixPviaZ.js} +2 -2
- package/dist/assets/domains-D8QMeppe.js +1 -0
- package/dist/assets/{email-BpimKMdd.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-XYv5fxqy.js → exchange-passport-BraV0EOe.js} +1 -1
- package/dist/assets/{form-CHueGgAz.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-CfnN-Pjf.js → fuel-Dwo_gklT.js} +1 -1
- package/dist/assets/gen-access-key-DuRApUI5.js +1 -0
- package/dist/assets/{gen-simple-access-key-EujuCaoZ.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-CSzo40aP.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-BC0KaiLK.js → index-AMzbVwE1.js} +1 -1
- package/dist/assets/{index-C_YGTMJ4.js → index-B3o5bPY9.js} +1 -1
- package/dist/assets/{index-DZkt7K0r.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-DOo8QRm-.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-IN8OKZ_V.js → index-CARCeLG0.js} +2 -2
- package/dist/assets/index-CX8XMi66.js +1 -0
- package/dist/assets/{index-CX0nBp11.js → index-CjUelepA.js} +1 -1
- package/dist/assets/{index-C-QPG4ba.js → index-Cv0WQg6r.js} +3 -3
- package/dist/assets/{index-D04UESXe.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-ZXxjnrfz.js → index-DXDOA6wf.js} +2 -2
- package/dist/assets/{index-iIT2_Y_I.js → index-DcGTEgwU.js} +4 -4
- package/dist/assets/index-DnsQF6x_.js +1 -0
- package/dist/assets/{index-COFNyzYu.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-BFZ5LKID.js → index-cc7PDHui.js} +1 -1
- package/dist/assets/{index-B0JZLMkR.js → index-d3X4O8S1.js} +4 -4
- package/dist/assets/{index-DxuK3aPg.js → index-g1J2WU69.js} +1 -1
- package/dist/assets/index-o5365tSi.js +124 -0
- package/dist/assets/{index-CmkQ05MW.js → index-pMD5HObM.js} +10 -10
- package/dist/assets/{index-Cs6DTc99.js → index-un8ZaNww.js} +5 -5
- package/dist/assets/{index-BA8N8sek.js → index-yINGgTD8.js} +6 -6
- package/dist/assets/{invitation-Bud5mQS8.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-BkRG9xZw.js → isURL-NLB1KXWU.js} +1 -1
- package/dist/assets/issue-passport-DEKfDU5Q.js +1 -0
- package/dist/assets/{item-CZxO50cp.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-Co0EA4cx.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-CiBZwE8j.js → layout-BCGFP2fM.js} +1 -1
- package/dist/assets/{list-CgUqi7mZ.js → list-CLnYaffq.js} +2 -2
- package/dist/assets/{list-CoRNWpJL.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-BLtV-mr3.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-BhX1vXuH.js → login-oauth-callback-DNSbhkTX.js} +1 -1
- package/dist/assets/{logo-uploader-x03Hv0sw.js → logo-uploader-CehwiZZl.js} +2 -2
- package/dist/assets/{lost-passport-DuQjRy5y.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-C2521tBf.js → open-window-5tX5UogI.js} +1 -1
- package/dist/assets/{over-due-invoice-payment-CeMW933U.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-CBQOM3AQ.js → passport-item-DybXmjDL.js} +1 -1
- package/dist/assets/{permission-BeuMG3nG.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-DAv6SG0v.js → security-D_vkAC2F.js} +1 -1
- package/dist/assets/session-tOfkTx-G.js +1 -0
- package/dist/assets/{setup-CWKcr-SA.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-DdStEDKL.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-DV76BAlD.js → step-actions-B_qluS-3.js} +1 -1
- package/dist/assets/{studio-D9ArZgZT.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-Dh7kcNdX.js → transfer-CuvzwKCQ.js} +1 -1
- package/dist/assets/{unsubscribe-DzDiAt1Q.js → unsubscribe-B1yTQQGf.js} +1 -1
- package/dist/assets/{use-app-logo-BiGG8tCg.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-BXusVv21.js → user-sessions-DkchVQBO.js} +1 -1
- package/dist/assets/{util-DQbvJ9cJ.js → util-B8Xud4vY.js} +1 -1
- package/dist/assets/{util-BKRDkFNf.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-CPHamZhf.js → wait-connect-CGOeOXHL.js} +1 -1
- package/dist/assets/{wizard-DXT-RVCl.js → wizard-B7NraPoW.js} +1 -1
- package/dist/assets/{wizard-components-CkjeNOkS.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-BQXiLbg6.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-CZfTjlD0.js +0 -1
- package/dist/assets/api-BUbloWod.js +0 -1
- package/dist/assets/ar-DDKSNNIB.js +0 -7
- package/dist/assets/branding-IhXI5Wue.js +0 -1
- package/dist/assets/button-BG8yGG9e.js +0 -1
- package/dist/assets/complete-DNXvjWOj.js +0 -39
- package/dist/assets/config-navigation-C_Stnyxb.js +0 -40
- package/dist/assets/config-space-Bh_yLAj-.js +0 -1
- package/dist/assets/dashboard-B757yKbJ.js +0 -106
- package/dist/assets/de-C5jW-Aco.js +0 -7
- package/dist/assets/domains-CHjbOYj6.js +0 -1
- package/dist/assets/engine-DyhSNCpN.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-ku3cDonU.js +0 -1
- package/dist/assets/get-safe-url-CbJcsvAc.js +0 -1
- package/dist/assets/hi-CeUu25BW.js +0 -5
- package/dist/assets/id-BugYMmLN.js +0 -7
- package/dist/assets/iframe-eYdxV3eX.js +0 -1
- package/dist/assets/index-82gv-l2w.js +0 -283
- package/dist/assets/index-Br6A9_4o.js +0 -124
- package/dist/assets/index-C0n4exuY.js +0 -1
- package/dist/assets/index-CjATIX5e.js +0 -1039
- package/dist/assets/index-Cza28Ou-.js +0 -7
- package/dist/assets/index-DRhj0EDS.js +0 -292
- package/dist/assets/index-Dn2eai8S.js +0 -113
- package/dist/assets/index-ZYd4RNU_.js +0 -1
- package/dist/assets/invite-BnTsj399.js +0 -1
- package/dist/assets/issue-passport-sL6P-Jy0.js +0 -1
- package/dist/assets/ja-DaREJWmX.js +0 -9
- package/dist/assets/ko-DGXdpX64.js +0 -9
- package/dist/assets/localization-DAfm9MKy.js +0 -1
- package/dist/assets/logger-CsgnUk8i.js +0 -1
- package/dist/assets/login-0UJlN7iP.js +0 -1
- package/dist/assets/overview-C-11gh2u.js +0 -85
- package/dist/assets/preferences-DvVN_OF0.js +0 -1
- package/dist/assets/profile-embed-BdpgwY58.js +0 -1
- package/dist/assets/pt-CIqefLTL.js +0 -5
- package/dist/assets/publish-resource-CERp8nCz.js +0 -1
- package/dist/assets/ru-B4h3WudR.js +0 -5
- package/dist/assets/runtime-CC0b3IOS.js +0 -1
- package/dist/assets/sdk-Dfotb8VE.js +0 -1
- package/dist/assets/session-p360wpOR.js +0 -1
- package/dist/assets/simple-select-BHPmFba3.js +0 -1
- package/dist/assets/start-gQWc3jOT.js +0 -187
- package/dist/assets/starting-progress-CxdsmebW.js +0 -40
- package/dist/assets/status-jCRFV0de.js +0 -1
- package/dist/assets/team-CxJqHuEA.js +0 -146
- package/dist/assets/th-BjttL5p9.js +0 -5
- package/dist/assets/traffic-BuZd517Z.js +0 -1
- package/dist/assets/user-center-Gvk90n3A.js +0 -126
- package/dist/assets/user-follower-D7rNbdJC.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-DQUa7V1E.js +0 -1
- package/dist/assets/zh-CWvcoHsp.js +0 -10
- package/dist/assets/zh-tw-D_73qm-O.js +0 -9
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./vendor-react-Dvs43sk9.js";import{j as C,bA as w}from"./vendor-mui-core-BIZOanxj.js";import{a as x,Q as G}from"./vendor-utils-CVwaKsP9.js";import{a7 as u,Y as B,W as k}from"./index-CjATIX5e.js";import{j as A}from"./vendor-hooks-BtDnIwBH.js";import{H as L}from"./vendor-ux-Cfhaj-oj.js";import{g as P,a as h,b as N}from"./spaces-DdStEDKL.js";function T(){const[r,c]=e.useState(null),{blocklet:a}=u();return e.useEffect(()=>{c(P(a))},[a]),{storageEndpoint:r}}const l=e.createContext({}),{Provider:_,Consumer:Y}=l;function b({children:r}){const[c,a]=e.useState(!1),[o,n]=e.useState(null),{blocklet:f,actions:{refreshBlocklet:i}}=u(),{storageEndpoint:s}=T(),{api:d}=B();A(async()=>{try{if(a(!0),x(s)){n(null);return}const t=await h(s);n(t)}catch(t){console.error(t),L.error(t.message)}finally{a(!1)}},[s]);const m=()=>{n(null),i()},E=async t=>{n(t),await p(t.endpoint),i()},p=async t=>{await d.configBlocklet({input:{did:[f.meta.did],configs:[{key:k.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:t}]}}),i()};e.useEffect(()=>{async function t(){if(!o)return;const g=await N(o.endpoint,o.name),S=G(o,{name:g});n(S)}t()},[]);const y=!!(s&&o);return C.jsx(_,{value:{loading:c,spaceGateway:o,deleteSpaceGateway:m,updateSpaceGateway:E,storageEndpoint:s,settingStorageEndpoint:p,hasStorageEndpoint:y},children:r})}b.propTypes={children:w.node.isRequired};function q(){return e.useContext(l)}export{b as C,q as u};
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/log-BLtV-mr3.js","assets/vendor-mui-core-BIZOanxj.js","assets/vendor-react-Dvs43sk9.js","assets/useLocalStorage-BzRs3x-K.js","assets/vendor-ux-Cfhaj-oj.js","assets/vendor-utils-CVwaKsP9.js","assets/vendor-hooks-BtDnIwBH.js","assets/lottie-web-4koyQiv_.js","assets/vendor-ux-DYcPPYq2.css","assets/index-CjATIX5e.js","assets/vendor-arcblock-BhtOu00C.js","assets/index-DrVXX4fX.css","assets/bundle-avatar-BrBIjq4r.js","assets/index-82gv-l2w.js","assets/index-BC0KaiLK.js","assets/user-sessions-BXusVv21.js","assets/index-BFZ5LKID.js","assets/index-6IwthDxj.js","assets/team-CxJqHuEA.js","assets/session-p360wpOR.js","assets/isURL-BkRG9xZw.js","assets/use-app-logo-BiGG8tCg.js","assets/index-DBs9Ljax.js","assets/did-address-CeTjTMC4.js","assets/Google-BMeng9mn.js","assets/cloneDeep-E2Pxqpbv.js","assets/permission-BeuMG3nG.js","assets/click-to-copy-CVHuu877.js","assets/index-ZYd4RNU_.js","assets/arrow-down.svg-B1ffj_Bi.js","assets/vendor-mui-x-DWX99wt-.js","assets/AdapterDayjs-CAaLcejt.js","assets/useAsync-DoI7Qt9M.js","assets/useAsync-DkQHu4t4.js","assets/index-DbXxI_D0.js","assets/confirm-LpOyjg-M.js","assets/index-Cs6DTc99.js","assets/util-BKRDkFNf.js","assets/base32-CgLd9kUN.js","assets/sdk-Dfotb8VE.js","assets/user-follower-D7rNbdJC.js","assets/use-mobile-BW9mTiYC.js","assets/actions-DbBJOD0d.js","assets/shorten-label-DAXPWCI6.js","assets/index-Cza28Ou-.js","assets/index.esm-JPZAjt0x.js","assets/table-tips-B1dFVdej.js","assets/index-DOo8QRm-.js","assets/empty-spinner-CkCqfxFX.js","assets/list-header-DlrmpNef.js","assets/question-mark-circle.svg-B4stD6SS.js","assets/useSetState-DFuQZPPV.js","assets/engine-DyhSNCpN.js","assets/api-BUbloWod.js","assets/react-beautiful-dnd.esm-9QLg1KOC.js","assets/raf-schd.esm-CHNehTG3.js","assets/wait-connect-CPHamZhf.js","assets/get-safe-url-CbJcsvAc.js","assets/item-CZxO50cp.js","assets/delete-confirm-V3_sRk8l.js","assets/index-BjcHj49D.js","assets/index-3xeMR-Qg.js","assets/index-gnjjKJuC.css","assets/index-BVRSxJRS.js","assets/overview-C-11gh2u.js","assets/keyboard-arrow-down-rounded-8U0_i9QO.js","assets/index-BojVbZw0.js","assets/useAsyncRetry-DNTidBXG.js","assets/status-jCRFV0de.js","assets/omit-r-0RLWOV.js","assets/spaces-DdStEDKL.js","assets/index-CmkQ05MW.js","assets/over-due-invoice-payment-CeMW933U.js","assets/use-mobile-B_fpUHD7.js","assets/domains-CHjbOYj6.js","assets/domain-action-card-D-_-tvd3.js","assets/util-DQbvJ9cJ.js","assets/index-DRhj0EDS.js","assets/passport-item-CBQOM3AQ.js","assets/edit.svg-DycWG9v3.js","assets/lock.svg-COUP8tyO.js","assets/appearance-CwcRjBdx.js","assets/audit-logs-CIL7B8dX.js","assets/index-Dn2eai8S.js","assets/section-CCfmWVdK.js","assets/required-BUAaYcMZ.js","assets/collapse-DhGi244c.js","assets/list-CoRNWpJL.js","assets/server-logo-notext.svg-CKQB0tIp.js","assets/traffic-BuZd517Z.js","assets/iframe-eYdxV3eX.js","assets/index-C_YGTMJ4.js","assets/base-chart-BbbiwJIa.js","assets/index-Dr9NaKfR.js","assets/config-navigation-C_Stnyxb.js","assets/index-BPy8_fa2.js","assets/createClass-BuhPvJV8.js","assets/simple-select-BHPmFba3.js","assets/index-B0JZLMkR.js","assets/index-IN8OKZ_V.js","assets/index-COFNyzYu.js","assets/index-DRYJ0xIl.js","assets/connect-to-Cco6-qou.js","assets/config-space-Bh_yLAj-.js","assets/switch-control-Bs2D4JNi.js","assets/index-ZXxjnrfz.js","assets/security-DAv6SG0v.js","assets/config-BOttfQk3.js","assets/branding-Y62inJ9A.js","assets/sanitize-mRppk1lK.js","assets/form-text-input-CqoNK3mi.js","assets/form-wrapper-DNqXvSru.js","assets/logo-uploader-x03Hv0sw.js","assets/advanced-DPeAQM5T.js","assets/runtime-CC0b3IOS.js","assets/index-BA8N8sek.js","assets/list-CgUqi7mZ.js","assets/index-CX0nBp11.js","assets/config-BASOtMEK.js","assets/observability-3BjnzXRV.js","assets/playground-BEhnKrD-.js","assets/component-M75sOZuG.js","assets/add-component-core-B4fftW3o.js","assets/launch-result-message-B0--4ubW.js","assets/page-header-DP0csqkR.js","assets/index-D04UESXe.js","assets/content-layout-CaGd-JXO.js","assets/search-4YYphs0l.js","assets/add-component-core-G0iZE90Q.css","assets/index-DZkt7K0r.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{c as tn,n as ht,H as F,T as U,aG as nn,aH as wo,a3 as So,M as on,O as rn,E as Et,v as jo,j as Co,p as ko,_}from"./vendor-ux-Cfhaj-oj.js";import{j as i,W as S,aZ as Eo,cJ as Io,d0 as _o,cc as To,dd as Lo,de as Do,cL as Ao,df as Po,d4 as Ro,dg as Mo,I as Ne,aQ as Oo,aR as No,aX as gt,a3 as Uo,M as zo,aO as Bo,a6 as V,aP as $o,bg as Fo,at as Ue,T as ee,bp as Vo,b6 as It,bq as _t,ak as I,D as pe,J as oe,ah as ze,ao as Ho,dh as Wo,aj as qo,di as sn,dj as an,dk as cn,am as de,a$ as _e,dl as Tt,U as Q,aN as ln,Y as un,bZ as Ko,dm as Go,dn as Qo,Q as Zo,dp as Xo}from"./vendor-mui-core-BIZOanxj.js";import{r as m,L as dn,i as fn,g as Jo,k as Yo,j as er}from"./vendor-react-Dvs43sk9.js";import{Y as Be,f as N,W as qe,ak as Ke,c as P,X as Lt,bD as tr,aq as nr,a7 as or,v as rr,bE as sr,bF as pn,ao as te,bG as mn,aM as ir,bH as ar,V as cr,b3 as lr,b4 as ur,bI as dr,b5 as fr,bJ as pr,bK as mr,aj as hr,bL as Ge,bM as gr,bN as xr,b2 as br,a as hn,B as gn,m as me,a5 as yr,k as vr,a9 as wr,n as Dt,bO as At,i as Sr,l as jr,r as Cr,p as se,o as kr,q as Er,P as Ir,I as _r,N as Tr,bw as Lr,_ as Dr,d as Pt,t as Ar}from"./index-CjATIX5e.js";import{aa as Pr,C as W,J as xn,Q as Rr}from"./vendor-utils-CVwaKsP9.js";import{o as Ae}from"./vendor-arcblock-BhtOu00C.js";import{u as Rt}from"./useLocalStorage-BzRs3x-K.js";import{f as xt}from"./index-DBs9Ljax.js";import{C as Mt}from"./confirm-LpOyjg-M.js";import{g as Ot}from"./get-safe-url-CbJcsvAc.js";import{u as bn}from"./session-p360wpOR.js";import{a as ae,l as Mr}from"./vendor-hooks-BtDnIwBH.js";import{j as Or,b as Nr,M as Ur,a as zr,T as Br,N as $r}from"./team-CxJqHuEA.js";import{D as Fr,u as yn}from"./useAsyncRetry-DNTidBXG.js";import{u as vn}from"./useSetState-DFuQZPPV.js";import{x as Vr,d as Hr}from"./index-CmkQ05MW.js";import{O as Wr}from"./over-due-invoice-payment-CeMW933U.js";import{u as qr}from"./use-mobile-B_fpUHD7.js";const wn=m.createContext({});function Sn({children:e,type:t="blocklets"}){const[n,r]=m.useState([]),o=m.useRef([]),s=l=>{if(!o.current.includes(l)){const u=[...o.current,l];r(u),o.current=u}},a=l=>{if(o.current.includes(l)){const u=o.current.filter(d=>d!==l);r(u),o.current=u}},c=l=>{const u=n.filter(p=>l.find(f=>f===p));Pr(u,n).forEach(p=>a(p))};return i.jsx(wn.Provider,{value:{type:t,deletingBlocklets:n,addDeletingDid:s,removeDeletingDid:a,matchDeletingDid:c},children:e})}Sn.propTypes={type:S.string,children:S.node.isRequired};function Xa(){return m.useContext(wn)}const Kr=e=>m.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},m.createElement("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"})),Y={Start:Eo,Stop:Io,Restart:_o,Reload:Mo,Remove:To,Config:Ro,Log:Po,Group:Ao,Cancel:Lo,Dashboard:Kr,Overview:Do},Gr=(e,t)=>{if(!e)return"";if(!t)return e;const n=new URL(e),r=new URLSearchParams(n.searchParams),o=new URL(W(n.origin,t));return o.search=r.toString(),o.toString()},Qr="internal",Zr="external";function jn({blocklet:e,onStart:t,onComplete:n,variant:r="menu",hasPermission:o=!1,getComponentUrl:s=null,useBlockletUrlEvaluation:a=()=>({loading:!1,recommendedUrl:window?.location?.href}),...c}){const l=Be(),[u,d]=m.useState(null),[p,f]=m.useState(null),[x,y]=m.useState(!1),[h,C]=m.useState(null),{t:v}=m.useContext(tn),[j]=Rt("skip-blocklet-setup",!1),{loading:g,recommendedUrl:E}=a(e),[k]=Rt("blocklet-type-filter",Qr),b=N.isInProgress(e.status),[T,M]=m.useState(!1);m.useEffect(()=>{if(!e?.controller)return;M(e?.controller?.status?.value===qe.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{try{const D=await l.api.getLauncherSession({input:{launcherSessionId:e?.controller?.launcherSessionId,launcherUrl:e?.controller?.launcherUrl}});if(D?.error){console.error("get launcher session failed",D.error);return}M([P.LAUNCH_SESSION_STATUS.overdue,P.LAUNCH_SESSION_STATUS.canceled,P.LAUNCH_SESSION_STATUS.terminated].includes(D?.launcherSession?.status))}catch(D){console.error("call getLauncherSession error",D)}})()},[]);const{inService:R}=l,O=(w,D,K=!1)=>async()=>{const G=async Se=>{t({action:w,blocklet:e}),y(!0),f(w);let je=!1;try{if(w==="remove")await D(Se);else if(w==="start"){if(!N.hasRunnableComponent(e)){F.error(v("blocklet.noComponent"));return}if(!R&&!j&&!e.settings?.initialized&&e.mode!==qe.BLOCKLET_MODES.DEVELOPMENT){if(!E||!Lt(E)){F.error(v("blocklet.gotoVisitError"));return}const z=tr(l.info),kt=new URL(E);kt.searchParams.set("serverUrl",z),window.open(Ot(kt.href,{allowDomains:null})),n({action:w,blocklet:e});return}const $=e.children.filter(z=>!N.isInProgress(z.status)&&z.status!=="running").map(z=>z.meta.did),J={did:e.meta.did,componentDids:$};await D({input:J})}else if(["stop","restart","reload"].includes(w)){const $=e.children.filter(z=>z.status==="running").map(z=>z.meta.did),J={did:e.meta.did,componentDids:$};await D({input:J})}else{const $={did:e.meta.did};await D({input:$})}w==="remove"?je=!0:await nr(1e3),w==="reload"&&F.success(v("blocklet.reloadSuccess")),C(null),n({action:w,blocklet:e})}catch($){const J=`Blocklet ${w} failed: ${xt($)}`;throw n({action:w,blocklet:e,error:new Error(J)}),new Error(J)}finally{je||y(!1)}},ve=()=>{y(!1),C(null)},we=N.getDisplayName(e,!0),yo=e.mode===qe.BLOCKLET_MODES.DEVELOPMENT?{description:()=>i.jsx(ee,{component:"div",children:i.jsx(ee,{gutterBottom:!0,children:v("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(Se,je)=>i.jsxs(ee,{component:"div",children:[i.jsx(ee,{gutterBottom:!0,children:v("blocklet.action.removeApplicationDescription")}),i.jsxs(Vo,{name:"removeType",value:Se.removeType,onChange:$=>je({...Se,removeType:$.target.value}),children:[i.jsx(It,{value:"backup",control:i.jsx(_t,{}),label:v("blocklet.action.removeApplicationAfterBackup")}),i.jsx(It,{value:"complete",control:i.jsx(_t,{}),label:v("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},vo={stop:{title:`${v("common.stop")} ${we}`,description:v("blocklet.action.stopDescription"),confirm:v("blocklet.action.confirmStop"),cancel:v("common.cancel"),onConfirm:G,onCancel:ve},restart:{title:`${v("common.restart")} ${we}`,description:v("blocklet.action.restartDescription"),confirm:v("blocklet.action.confirmRestart"),cancel:v("common.cancel"),onConfirm:G,onCancel:ve},remove:{title:`${v("common.remove")} ${we}`,confirm:v("blocklet.action.confirmRemove"),cancel:v("common.cancel"),onConfirm:G,onCancel:ve,...yo},cancelDownload:{title:`${v("common.cancel")}`,description:v("blocklet.action.cancelDownloadDescription",{name:we}),confirm:v("common.confirm"),cancel:v("common.cancel"),onConfirm:G,onCancel:ve}};K?C(vo[w]):await G()},We=!!u,po=w=>{try{w.stopPropagation(),w.preventDefault()}catch{}d(w.currentTarget)},mo=w=>{try{w.stopPropagation(),w.preventDefault()}catch{}d(null)},Ct=async(w,D)=>{try{D.stopPropagation(),D.preventDefault()}catch{}if(typeof w.handler=="function")try{y(!0),f(w.action),await w.handler()}catch(K){console.error(`Blocklet ${w.name} failed: `,K)}finally{y(!1),d(null)}else d(null)},ho=!R&&N.isDeletableBlocklet(e)?{action:"remove",icon:Y.Remove,name:v("common.remove"),handler:O("remove",async({removeType:w})=>{w==="backup"&&await l.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await l.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:b}:null,go={action:"remove",icon:({sx:w,...D})=>i.jsx(Y.Cancel,{sx:{...w,paddingRight:"2px",zoom:.95},...D}),name:v("common.cancel"),handler:O("cancelDownload",l.api.cancelDownloadBlocklet,!0)},xo=N.getAppMissingConfigs(e),bo=()=>{const w=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),D=s?.({mountPoint:w,blocklet:e});if(!D||!Lt(D)){F.error(v("blocklet.gotoVisitError"));return}const K=e?.site?.domainAliases;window.open(Ot(Gr(D,`${P.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`),{allowDomains:K?.map(G=>G.value)}))};let ye=[{action:"start",icon:Y.Start,inExternal:!0,name:v("common.start"),handler:O("start",l.api.startBlocklet),disabled:T||e.children.every(w=>w.status==="running")||Ke(e.status)||g||b},{action:"stop",icon:Y.Stop,inExternal:!0,name:v("common.stop"),handler:O("stop",l.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:Y.Restart,name:v("common.restart"),handler:O("restart",l.api.restartBlocklet,!0),disabled:T||e.status!=="running"},Ke(e.status)?go:ho,{separator:!0},R?null:{action:"dashboard",icon:({style:w,...D})=>i.jsx(Y.Dashboard,{...D,style:{...w,width:"26px",height:"26px",paddingRight:"3px"}}),name:v("sidebar.dashboard"),handler:bo}].filter(Boolean);return k===Zr&&(ye=ye.filter(w=>w.inExternal)),r==="menu"?i.jsxs(Nt,{"data-cy":"blocklet-actions",children:[i.jsx(Ne,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:po,size:"small",disabled:!o||!Ke(e.status)&&x,children:i.jsx(Oo,{})}),i.jsxs(No,{id:"actions-menu",anchorEl:u,keepMounted:!0,open:We,onClose:mo,PaperProps:{},children:[xo.length>0&&i.jsxs(gt,{style:{maxWidth:"400px"},severity:"error",children:[v("blocklet.config.missingRequired"),i.jsx("br",{}),i.jsx(dn,{to:`/blocklets/${e.meta.did}/components`,children:v("blocklet.config.gotoFix")})]}),ye.map((w,D)=>w.separator?i.jsx(Uo,{},`separator-${D}`):i.jsxs(zo,{dense:!0,onClick:K=>Ct(w,K),disabled:x||w.disabled,"data-cy":`${w.action}-blocklet`,children:[i.jsx(Bo,{style:{minWidth:24},children:p===w.action&&x?i.jsx(V,{size:16,sx:{marginRight:1}}):i.jsx(w.icon,{fontSize:"small"})}),i.jsx($o,{primary:w.name})]},w.name))]}),h&&i.jsx(Mt,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]}):i.jsxs(Nt,{"data-cy":"blocklet-actions",...c,children:[i.jsx(Fo,{children:ye.filter(w=>!w.separator&&!w.onlyInMenu).map(w=>i.jsxs(ht,{title:w.name,"data-cy":`${w.action}-blocklet`,onClick:()=>Ct(w),disabled:!!w.disabled||x,children:[p===w.action&&x?i.jsx(V,{size:16,sx:{marginRight:1}}):i.jsx(w.icon,{}),i.jsx("span",{className:"blocklet-action-text",children:w.name})]},w.name))}),h&&i.jsx(Mt,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]})}jn.propTypes={getComponentUrl:S.func,blocklet:S.object.isRequired,onStart:S.func.isRequired,onComplete:S.func.isRequired,variant:S.oneOf(["menu","group"]),hasPermission:S.bool,useBlockletUrlEvaluation:S.func};const Nt=Ue.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
|
-
`,Ut=m.memo(jn),Xr=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},Jr=(e,t,n)=>{const{hostname:r,href:o}=e;if(!t)return o;if(n){const a=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!a)return o;const c=a[0],u=((t.site?.domainAliases||[]).map(d=>d.value).filter(Boolean).find(d=>d.endsWith(P.DEFAULT_DID_DOMAIN))||"").replace(`.${P.DEFAULT_DID_DOMAIN}`,"");return u?o.replace(r,`${u}-${c}.${P.DEFAULT_IP_DOMAIN_SUFFIX}`):o}return o.replace(t.meta.bundleDid,t.appPid)};function Yr(){const{t:e}=U(),{api:t}=bn(),{blocklet:n}=or(),{inService:r}=Be(),[o,s]=m.useState(!1),[a,c]=m.useState(5),l=n&&n.structVersion!==P.APP_STRUCT_VERSION,u=()=>{try{if(n.status==="running"){F.error(e("blocklet.migrate.tip.running"));return}const f=Xr(n);if(f){F.error(e("blocklet.migrate.tip.duplicate",{name:f}));return}s(!0)}catch(f){F.error(xt(f))}},d=()=>{const f=Jr(window.location,n,r);setTimeout(()=>{window.location.href=f},5e3),c(5),setInterval(()=>{c(x=>x-1)},1e3)},p=()=>s(!1);return[l&&i.jsxs(gt,{severity:"warning",style:{margin:"12px 0"},children:[i.jsxs(I,{sx:{display:"flex",alignItems:"center"},children:[i.jsx(ht,{variant:"contained",size:"small",color:"primary",onClick:()=>u(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),i.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(f=>i.jsx(I,{sx:{display:"flex",alignItems:"center"},children:e(`blocklet.migrate.intro.${f}`)},f))]},"alert"),n&&i.jsx(rr,{popup:!0,open:o,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:sr(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:p},"connect")]}function es(){const e=pe();return[...e.breakpoints.keys].reverse().reduce((n,r)=>{const o=oe(e.breakpoints.up(r));return!n&&o?r:n},null)||"xs"}function ts(e){return i.jsx(ze,{...e,children:i.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 ns(e){return i.jsx(ze,{...e,children:i.jsx("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"})})}function os(e){return i.jsx(ze,{...e,children:i.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 rs(e){return i.jsx(ze,{...e,children:i.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 Ce={fontSize:20,marginInlineEnd:8},ss={success:i.jsx(ts,{style:Ce}),warning:i.jsx(ns,{style:Ce}),error:i.jsx(os,{style:Ce}),info:i.jsx(rs,{style:Ce})},is={xl:"400px",lg:"400px",md:"400px",sm:"300px"};function Cn({keyId:e,notification:t={},viewAllUrl:n,content:r=null},o){const s=pe(),a=ss[t.severity],{closeSnackbar:c}=nn(),l=()=>c(e),u=fn(),d=()=>{c(e),u(n)},p=ae(()=>Or(t),[t]),f=ae(()=>t?.activity,[t]),x=Nr({activity:f,users:[t?.actorInfo],actors:[t?.activity?.actor],extra:{linkColor:s.palette.primary.main,userDid:t?.receivers?.[0]?.did}}),y=es();return i.jsxs(I,{component:wo,ref:o,sx:[{...s.typography.body2,display:"flex",backgroundColor:s.palette.background.default,color:"#fff",alignItems:"center",pl:2.5,pr:2,py:.75,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)",width:is[y]},t.severity==="success"?{backgroundColor:`${Ho[600]} !important`}:{},t.severity==="error"?{backgroundColor:`${s.palette.error.dark} !important`}:{},t.severity==="info"?{backgroundColor:`${s.palette.primary.main} !important`}:{},t.severity==="warning"?{backgroundColor:`${Wo[700]} !important`}:{}],children:[i.jsxs(I,{sx:{display:"flex",alignItems:"center",py:1,flex:1},children:[a,i.jsx(cs,{onClick:d,sx:{flex:1},children:i.jsx(I,{children:p?i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"title",children:x}),f.meta?i.jsx(Ur,{meta:f.meta,type:f.type,sx:{display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:3,WebkitBoxOrient:"vertical",color:"#fff"}}):null]}):i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"title",children:t.title}),r||i.jsx("span",{className:"desc",children:t.description})]})})})]}),i.jsx(I,{sx:{display:"flex",alignItems:"center",ml:"auto",mr:-1,width:44},children:i.jsx(Ne,{"aria-label":"close",color:"inherit",onClick:l,size:"large",children:i.jsx(I,{component:qo,sx:{fontSize:20}})},"close")})]})}const as=m.forwardRef(Cn);Cn.propTypes={viewAllUrl:S.string.isRequired,keyId:S.number.isRequired,notification:S.object.isRequired,content:S.node};const cs=Ue.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
|
-
`;var L=function(t,n,r){return sn.call(n,"css")?i.jsx(an,cn(t,n),r):i.jsx(t,n,r)},ke=function(t,n,r){return sn.call(n,"css")?i.jsxs(an,cn(t,n),r):i.jsxs(t,n,r)};/**
|
|
33
|
-
* (c) Iconify
|
|
34
|
-
*
|
|
35
|
-
* For the full copyright and license information, please view the license.txt or license.gpl.txt
|
|
36
|
-
* files at https://github.com/iconify/iconify
|
|
37
|
-
*
|
|
38
|
-
* Licensed under MIT.
|
|
39
|
-
*
|
|
40
|
-
* @license MIT
|
|
41
|
-
* @version 3.1.1
|
|
42
|
-
*/const kn=Object.freeze({left:0,top:0,width:16,height:16}),Pe=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),he=Object.freeze({...kn,...Pe}),rt=Object.freeze({...he,body:"",hidden:!1});function ls(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 zt(e,t){const n=ls(e,t);for(const r in rt)r in Pe?r in e&&!(r in n)&&(n[r]=Pe[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function us(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function s(a){if(n[a])return o[a]=[];if(!(a in o)){o[a]=null;const c=r[a]&&r[a].parent,l=c&&s(c);l&&(o[a]=[c].concat(l))}return o[a]}return Object.keys(n).concat(Object.keys(r)).forEach(s),o}function ds(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let s={};function a(c){s=zt(r[c]||o[c],s)}return a(t),n.forEach(a),zt(e,s)}function fs(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=us(e);for(const o in r){const s=r[o];s&&(t(o,ds(e,o,s)),n.push(o))}return n}const ce=/^[a-z0-9]+(-[a-z0-9]+)*$/,re=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const c=o.pop(),l=o.pop(),u={provider:o.length>0?o[0]:r,prefix:l,name:c};return t&&!Te(u)?null:u}const s=o[0],a=s.split("-");if(a.length>1){const c={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!Te(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:s};return t&&!Te(c,n)?null:c}return null},Te=(e,t)=>e?!!((e.provider===""||e.provider.match(ce))&&(t&&e.prefix===""||e.prefix.match(ce))&&e.name.match(ce)):!1,ps={provider:"",aliases:{},not_found:{},...kn};function Qe(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function ms(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!Qe(e,ps))return null;const n=t.icons;for(const o in n){const s=n[o];if(!o.match(ce)||typeof s.body!="string"||!Qe(s,rt))return null}const r=t.aliases||Object.create(null);for(const o in r){const s=r[o],a=s.parent;if(!o.match(ce)||typeof a!="string"||!n[a]&&!r[a]||!Qe(s,rt))return null}return t}const Re=Object.create(null);function hs(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function B(e,t){const n=Re[e]||(Re[e]=Object.create(null));return n[t]||(n[t]=hs(e,t))}function bt(e,t){return ms(t)?fs(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function gs(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function xs(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(Re)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(Re[o]||{})).forEach(a=>{const c=B(o,a);n=n.concat(Object.keys(c.icons).map(l=>(o!==""?"@"+o+":":"")+a+":"+l))})}),n}let yt=!1;function bs(e){return yt}function ge(e){const t=typeof e=="string"?re(e,!0,yt):e;if(t){const n=B(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function ys(e,t){const n=re(e,!0,yt);if(!n)return!1;const r=B(n.provider,n.prefix);return gs(r,n.name,t)}function En(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const n=e.prefix;if(!Te({provider:t,prefix:n,name:"a"}))return!1;const r=B(t,n);return!!bt(r,e)}function vs(e){return!!ge(e)}function ws(e){const t=ge(e);return t?{...he,...t}:null}const In=Object.freeze({width:null,height:null}),_n=Object.freeze({...In,...Pe}),Ss=/(-?[0-9.]*[0-9]+[0-9.]*)/g,js=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function st(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(Ss);if(r===null||!r.length)return e;const o=[];let s=r.shift(),a=js.test(s);for(;;){if(a){const c=parseFloat(s);isNaN(c)?o.push(s):o.push(Math.ceil(c*t*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");a=!a}}const Cs=e=>e==="unset"||e==="undefined"||e==="none";function $e(e,t){const n={...he,...e},r={..._n,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(y=>{const h=[],C=y.hFlip,v=y.vFlip;let j=y.rotate;C?v?j+=2:(h.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),h.push("scale(-1 1)"),o.top=o.left=0):v&&(h.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),h.push("scale(1 -1)"),o.top=o.left=0);let g;switch(j<0&&(j-=Math.floor(j/4)*4),j=j%4,j){case 1:g=o.height/2+o.top,h.unshift("rotate(90 "+g.toString()+" "+g.toString()+")");break;case 2:h.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:g=o.width/2+o.left,h.unshift("rotate(-90 "+g.toString()+" "+g.toString()+")");break}j%2===1&&(o.left!==o.top&&(g=o.left,o.left=o.top,o.top=g),o.width!==o.height&&(g=o.width,o.width=o.height,o.height=g)),h.length&&(s='<g transform="'+h.join(" ")+'">'+s+"</g>")});const a=r.width,c=r.height,l=o.width,u=o.height;let d,p;a===null?(p=c===null?"1em":c==="auto"?u:c,d=st(p,l/u)):(d=a==="auto"?l:a,p=c===null?st(d,u/l):c==="auto"?u:c);const f={},x=(y,h)=>{Cs(h)||(f[y]=h.toString())};return x("width",d),x("height",p),f.viewBox=o.left.toString()+" "+o.top.toString()+" "+l.toString()+" "+u.toString(),{attributes:f,body:s}}const ks=/\sid="(\S+)"/g,Es="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Is=0;function Tn(e,t=Es){const n=[];let r;for(;r=ks.exec(e);)n.push(r[1]);if(!n.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const a=typeof t=="function"?t(s):t+(Is++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+a+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const Z={local:!0,session:!0},Ln={local:new Set,session:new Set};let vt=!1;function _s(e){vt=e}const Bt="iconify2",fe="iconify",Dn=fe+"-count",$t=fe+"-version",An=36e5,Ts=168;function it(e,t){try{return e.getItem(t)}catch{}}function wt(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Ft(e,t){try{e.removeItem(t)}catch{}}function at(e,t){return wt(e,Dn,t.toString())}function ct(e){return parseInt(it(e,Dn))||0}let Ee=typeof window>"u"?{}:window;function Pn(e){const t=e+"Storage";try{if(Ee&&Ee[t]&&typeof Ee[t].length=="number")return Ee[t]}catch{}Z[e]=!1}function Rn(e,t){const n=Pn(e);if(!n)return;const r=it(n,$t);if(r!==Bt){if(r){const c=ct(n);for(let l=0;l<c;l++)Ft(n,fe+l.toString())}wt(n,$t,Bt),at(n,0);return}const o=Math.floor(Date.now()/An)-Ts,s=c=>{const l=fe+c.toString(),u=it(n,l);if(typeof u=="string"){try{const d=JSON.parse(u);if(typeof d=="object"&&typeof d.cached=="number"&&d.cached>o&&typeof d.provider=="string"&&typeof d.data=="object"&&typeof d.data.prefix=="string"&&t(d,c))return!0}catch{}Ft(n,l)}};let a=ct(n);for(let c=a-1;c>=0;c--)s(c)||(c===a-1?(a--,at(n,a)):Ln[e].add(c))}function Mn(){if(!vt){_s(!0);for(const e in Z)Rn(e,t=>{const n=t.data,r=t.provider,o=n.prefix,s=B(r,o);if(!bt(s,n).length)return!1;const a=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,a):a,!0})}}function On(e,t){switch(e){case"local":case"session":Z[e]=t;break;case"all":for(const n in Z)Z[n]=t;break}}const lt=Object.create(null);function Nn(e,t){lt[e]=t}function ut(e){return lt[e]||lt[""]}function St(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 Fe=Object.create(null),ie=["https://api.simplesvg.com","https://api.unisvg.com"],Le=[];for(;ie.length>0;)ie.length===1||Math.random()>.5?Le.push(ie.shift()):Le.push(ie.pop());Fe[""]=St({resources:["https://api.iconify.design"].concat(Le)});function Un(e,t){const n=St(t);return n===null?!1:(Fe[e]=n,!0)}function Ve(e){return Fe[e]}function Ls(){return Object.keys(Fe)}const Ds=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Me=Ds();function As(e){Me=e}function Ps(){return Me}function Rs(e,t){const n=Ve(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(a=>{o=Math.max(o,a.length)});const s=t+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function Ms(e){return e===404}const Os=(e,t,n)=>{const r=[],o=Rs(e,t),s="icons";let a={type:s,provider:e,prefix:t,icons:[]},c=0;return n.forEach((l,u)=>{c+=l.length+1,c>=o&&u>0&&(r.push(a),a={type:s,provider:e,prefix:t,icons:[]},c=l.length),a.icons.push(l)}),r.push(a),r};function Ns(e){if(typeof e=="string"){const t=Ve(e);if(t)return t.path}return"/"}const Us=(e,t,n)=>{if(!Me){n("abort",424);return}let r=Ns(t.provider);switch(t.type){case"icons":{const s=t.prefix,c=t.icons.join(","),l=new URLSearchParams({icons:c});r+=s+".json?"+l.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;Me(e+r).then(s=>{const a=s.status;if(a!==200){setTimeout(()=>{n(Ms(a)?"abort":"next",a)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},zs={prepare:Os,send:Us};function Bs(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,a=o.prefix,c=o.name,l=n[s]||(n[s]=Object.create(null)),u=l[a]||(l[a]=B(s,a));let d;c in u.icons?d=t.loaded:a===""||u.missing.has(c)?d=t.missing:d=t.pending;const p={provider:s,prefix:a,name:c};d.push(p)}),t}function zn(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function $s(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,o=e.prefix;t.forEach(s=>{const a=s.icons,c=a.pending.length;a.pending=a.pending.filter(l=>{if(l.prefix!==o)return!0;const u=l.name;if(e.icons[u])a.loaded.push({provider:r,prefix:o,name:u});else if(e.missing.has(u))a.missing.push({provider:r,prefix:o,name:u});else return n=!0,!0;return!1}),a.pending.length!==c&&(n||zn([e],s.id),s.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),s.abort))})}))}let Fs=0;function Vs(e,t,n){const r=Fs++,o=zn.bind(null,n,r);if(!t.pending.length)return o;const s={id:r,icons:t,callback:e,abort:o};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(s)}),o}function Hs(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const s=typeof o=="string"?re(o,t,n):o;s&&r.push(s)}),r}var Ws={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function qs(e,t,n,r){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let a;if(e.random){let b=e.resources.slice(0);for(a=[];b.length>1;){const T=Math.floor(Math.random()*b.length);a.push(b[T]),b=b.slice(0,T).concat(b.slice(T+1))}a=a.concat(b)}else a=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let l="pending",u=0,d,p=null,f=[],x=[];typeof r=="function"&&x.push(r);function y(){p&&(clearTimeout(p),p=null)}function h(){l==="pending"&&(l="aborted"),y(),f.forEach(b=>{b.status==="pending"&&(b.status="aborted")}),f=[]}function C(b,T){T&&(x=[]),typeof b=="function"&&x.push(b)}function v(){return{startTime:c,payload:t,status:l,queriesSent:u,queriesPending:f.length,subscribe:C,abort:h}}function j(){l="failed",x.forEach(b=>{b(void 0,d)})}function g(){f.forEach(b=>{b.status==="pending"&&(b.status="aborted")}),f=[]}function E(b,T,M){const R=T!=="success";switch(f=f.filter(O=>O!==b),l){case"pending":break;case"failed":if(R||!e.dataAfterTimeout)return;break;default:return}if(T==="abort"){d=M,j();return}if(R){d=M,f.length||(a.length?k():j());return}if(y(),g(),!e.random){const O=e.resources.indexOf(b.resource);O!==-1&&O!==e.index&&(e.index=O)}l="completed",x.forEach(O=>{O(M)})}function k(){if(l!=="pending")return;y();const b=a.shift();if(b===void 0){if(f.length){p=setTimeout(()=>{y(),l==="pending"&&(g(),j())},e.timeout);return}j();return}const T={status:"pending",resource:b,callback:(M,R)=>{E(T,M,R)}};f.push(T),u++,p=setTimeout(k,e.rotate),n(b,t,T.callback)}return setTimeout(k),v}function Bn(e){const t={...Ws,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function o(c,l,u){const d=qs(t,c,l,(p,f)=>{r(),u&&u(p,f)});return n.push(d),d}function s(c){return n.find(l=>c(l))||null}return{query:o,find:s,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function Vt(){}const Ze=Object.create(null);function Ks(e){if(!Ze[e]){const t=Ve(e);if(!t)return;const n=Bn(t),r={config:t,redundancy:n};Ze[e]=r}return Ze[e]}function $n(e,t,n){let r,o;if(typeof e=="string"){const s=ut(e);if(!s)return n(void 0,424),Vt;o=s.send;const a=Ks(e);a&&(r=a.redundancy)}else{const s=St(e);if(s){r=Bn(s);const a=e.resources?e.resources[0]:"",c=ut(a);c&&(o=c.send)}}return!r||!o?(n(void 0,424),Vt):r.query(t,o,n)().abort}function Gs(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in Z)Rn(r,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function Qs(e,t){vt||Mn();function n(r){let o;if(!Z[r]||!(o=Pn(r)))return;const s=Ln[r];let a;if(s.size)s.delete(a=Array.from(s).shift());else if(a=ct(o),!at(o,a+1))return;const c={cached:Math.floor(Date.now()/An),provider:e.provider,data:t};return wt(o,fe+a.toString(),JSON.stringify(c))}t.lastModified&&!Gs(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Ht(){}function Zs(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,$s(e)}))}function Xs(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,o=e.iconsToLoad;delete e.iconsToLoad;let s;if(!o||!(s=ut(n)))return;s.prepare(n,r,o).forEach(c=>{$n(n,c,l=>{if(typeof l!="object")c.icons.forEach(u=>{e.missing.add(u)});else try{const u=bt(e,l);if(!u.length)return;const d=e.pendingIcons;d&&u.forEach(p=>{d.delete(p)}),Qs(e,l)}catch(u){console.error(u)}Zs(e)})})}))}const Js=e=>{const n=B(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},jt=(e,t)=>{const n=Hs(e,!0,bs()),r=Bs(n);if(!r.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(r.loaded,r.missing,r.pending,Ht)}),()=>{l=!1}}const o=Object.create(null),s=[];let a,c;return r.pending.forEach(l=>{const{provider:u,prefix:d}=l;if(d===c&&u===a)return;a=u,c=d,s.push(B(u,d));const p=o[u]||(o[u]=Object.create(null));p[d]||(p[d]=[])}),r.pending.forEach(l=>{const{provider:u,prefix:d,name:p}=l,f=B(u,d),x=f.pendingIcons||(f.pendingIcons=new Set);x.has(p)||(x.add(p),o[u][d].push(p))}),s.forEach(l=>{const{provider:u,prefix:d}=l;o[u][d].length&&Xs(l,o[u][d])}),t?Vs(t,r,s):Ht},Ys=e=>new Promise((t,n)=>{const r=typeof e=="string"?re(e,!0):e;if(!r){n(e);return}jt([r||e],o=>{if(o.length&&r){const s=ge(r);if(s){t({...he,...s});return}}n(e)})});function Fn(e,t){const n={...e};for(const r in t){const o=t[r],s=typeof o;r in In?(o===null||o&&(s==="string"||s==="number"))&&(n[r]=o):s===typeof n[r]&&(n[r]=r==="rotate"?o%4:o)}return n}const He={..._n,inline:!1},Xe="iconify",dt="iconify-inline",q="iconifyData"+Date.now();let X=[];function xe(e){for(let t=0;t<X.length;t++){const n=X[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function Vn(e,t=!1){let n=xe(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},X.push(n),n)}function ei(){if(document.documentElement)return Vn(document.documentElement);X.push({node:()=>document.documentElement})}function ti(e){X=X.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function be(){return X}function ni(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let le=null;const oi={childList:!0,subtree:!0,attributes:!0};function Hn(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,le&&le(e)}))}function ri(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let r=0;r<t.length;r++){const o=t[r];if(o.addedNodes&&o.addedNodes.length>0||o.type==="attributes"&&o.target[q]!==void 0){n.paused||Hn(e);return}}}function Wn(e,t){e.observer.instance.observe(t,oi)}function Oe(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(ri.bind(null,e)),Wn(e,n),t.paused||Hn(e))}function Wt(){be().forEach(Oe)}function qn(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 si(e){const t=le!==null;if(le!==e&&(le=e,t&&be().forEach(qn)),t){Wt();return}ni(Wt)}function ft(e){(e?[e]:be()).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 ii(e){if(e){const t=xe(e);t&&ft(t)}else ft()}function pt(e){(e?[e]:be()).forEach(t=>{if(!t.observer){Oe(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?Wn(t,r):Oe(t);else return}})}function ai(e){if(e){const t=xe(e);t&&pt(t)}else pt()}function Kn(e,t=!1){const n=Vn(e,t);return Oe(n),n}function Gn(e){const t=xe(e);t&&(qn(t),ti(e))}function ci(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,r=t.customisations;for(const o in He)if(n[o]!==r[o])return!0;return!1}function li(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return t}const ui=/[\s,]+/;function di(e,t){t.split(ui).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const fi=["width","height"],pi=["inline","hFlip","vFlip"];function mi(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function hi(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&re(t,!0);if(!n)return null;const r={...He,inline:e.classList&&e.classList.contains(dt)};fi.forEach(c=>{const l=e.getAttribute("data-"+c);l&&(r[c]=l)});const o=e.getAttribute("data-rotate");typeof o=="string"&&(r.rotate=li(o));const s=e.getAttribute("data-flip");typeof s=="string"&&di(r,s),pi.forEach(c=>{const l="data-"+c,u=mi(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 gi="svg."+Xe+", i."+Xe+", span."+Xe+", i."+dt+", span."+dt;function xi(e){const t=[];return e.querySelectorAll(gi).forEach(n=>{const r=n[q]||n.tagName.toLowerCase()!=="svg"?hi(n):null;r&&t.push({node:n,props:r})}),t}function Qn(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 ue;function bi(){try{ue=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{ue=null}}function yi(e){return ue===void 0&&bi(),ue?ue.createHTML(e):e}function Zn(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function Xn(e,t,n,r){const o=e.classList;if(r){const a=r.classList;Array.from(a).forEach(c=>{o.add(c)})}const s=[];return t.forEach(a=>{o.contains(a)?n.has(a)&&s.push(a):(o.add(a),s.push(a))}),n.forEach(a=>{t.has(a)||o.remove(a)}),s}function Jn(e,t,n){const r=e.style;(n||[]).forEach(s=>{r.removeProperty(s)});const o=[];for(const s in t)r.getPropertyValue(s)||(o.push(s),r.setProperty(s,t[s]));return o}function Yn(e,t,n){let r;try{r=document.createElement("span")}catch{return e}const o=t.customisations,s=$e(n,o),a=e[q],c=Qn(Tn(s.body),{"aria-hidden":"true",role:"img",...s.attributes});r.innerHTML=yi(c);const l=r.childNodes[0],u=e.attributes;for(let y=0;y<u.length;y++){const h=u.item(y),C=h.name;C!=="class"&&!l.hasAttribute(C)&&l.setAttribute(C,h.value)}const d=Zn(t.icon),p=Xn(l,d,new Set(a&&a.addedClasses),e),f=Jn(l,o.inline?{"vertical-align":"-0.125em"}:{},a&&a.addedStyles),x={...t,status:"loaded",addedClasses:p,addedStyles:f};return l[q]=x,e.parentNode&&e.parentNode.replaceChild(l,e),l}function vi(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function wi(e){return"data:image/svg+xml,"+vi(e)}function Si(e){return'url("'+wi(e)+'")'}const ji={display:"inline-block"},mt={"background-color":"currentColor"},eo={"background-color":"transparent"},qt={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Kt={"-webkit-mask":mt,mask:mt,background:eo};for(const e in Kt){const t=Kt[e];for(const n in qt)t[e+"-"+n]=qt[n]}function Gt(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function Ci(e,t,n,r){const o=t.customisations,s=$e(n,o),a=s.attributes,c=e[q],l=Qn(s.body,{...a,width:n.width+"",height:n.height+""}),u=Zn(t.icon),d=Xn(e,u,new Set(c&&c.addedClasses)),f={"--svg":Si(l),width:Gt(a.width),height:Gt(a.height),...ji,...r?mt:eo};o.inline&&(f["vertical-align"]="-0.125em");const x=Jn(e,f,c&&c.addedStyles),y={...t,status:"loaded",addedClasses:d,addedStyles:x};return e[q]=y,e}let Ie=!1;function ki(){Ie||(Ie=!0,setTimeout(()=>{Ie&&(Ie=!1,ne())}))}function ne(e,t=!1){const n=Object.create(null);function r(o,s){const{provider:a,prefix:c,name:l}=o,u=B(a,c),d=u.icons[l];if(d)return{status:"loaded",icon:d};if(u.missing.has(l))return{status:"missing"};if(s&&!Js(o)){const p=n[a]||(n[a]=Object.create(null));(p[c]||(p[c]=new Set)).add(l)}return{status:"loading"}}(e?[e]:be()).forEach(o=>{const s=typeof o.node=="function"?o.node():o.node;if(!s||!s.querySelectorAll)return;let a=!1,c=!1;function l(u,d,p){if(c||(c=!0,ft(o)),u.tagName.toUpperCase()!=="SVG"){const f=d.mode,x=f==="mask"||(f==="bg"?!1:f==="style"?p.body.indexOf("currentColor")!==-1:null);if(typeof x=="boolean"){Ci(u,d,{...he,...p},x);return}}Yn(u,d,p)}xi(s).forEach(({node:u,props:d})=>{const p=u[q];if(!p){const{status:x,icon:y}=r(d.icon,!0);if(y){l(u,d,y);return}a=a||x==="loading",u[q]={...d,status:x};return}let f;if(ci(p,d)){if(f=r(d.icon,p.name!==d.name),!f.icon){a=a||f.status==="loading",Object.assign(p,{...d,status:f.status});return}}else{if(p.status!=="loading")return;if(f=r(d.icon,!1),!f.icon){p.status=f.status;return}}l(u,d,f.icon)}),o.temporary&&!a?Gn(s):t&&a?Kn(s,!0):c&&o.observer&&pt(o)});for(const o in n){const s=n[o];for(const a in s){const c=s[a];jt(Array.from(c).map(l=>({provider:o,prefix:a,name:l})),ki)}}}function Ei(e){const t=xe(e);t?ne(t):ne({node:e,temporary:!0},!0)}function to(e,t,n=!1){const r=ge(e);if(!r)return null;const o=re(e),s=Fn(He,t||{}),a=Yn(document.createElement("span"),{name:e,icon:o,customisations:s},r);return n?a.outerHTML:a}function Ii(){return"3.1.1"}function _i(e,t){return to(e,t,!1)}function Ti(e,t){return to(e,t,!0)}function Li(e,t){const n=ge(e);if(!n)return null;const r=Fn(He,t||{});return $e(n,r)}function Di(e){e?Ei(e):ne()}if(typeof document<"u"&&typeof window<"u"){ei();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"||!En(r))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{si(ne),ne()})}function Ai(e,t){On(e,t!==!1)}function Pi(e){On(e,!0)}Nn("",zs);if(typeof document<"u"&&typeof window<"u"){Mn();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 o=t[n];if(typeof o!="object"||!o||o.resources===void 0)continue;Un(n,o)||console.error(r)}catch{console.error(r)}}}}const Ri={getAPIConfig:Ve,setAPIModule:Nn,sendAPIQuery:$n,setFetch:As,getFetch:Ps,listAPIProviders:Ls},Mi={_api:Ri,addAPIProvider:Un,loadIcons:jt,loadIcon:Ys,iconExists:vs,getIcon:ws,listIcons:xs,addIcon:ys,addCollection:En,replaceIDs:Tn,calculateSize:st,buildIcon:$e,getVersion:Ii,renderSVG:_i,renderHTML:Ti,renderIcon:Li,scan:Di,observe:Kn,stopObserving:Gn,pauseObserver:ii,resumeObserver:ai,enableCache:Ai,disableCache:Pi};try{self.Iconify===void 0&&(self.Iconify=Mi)}catch{}function no({children:e,style:t={},...n}){return i.jsx(So,{style:t,...n,children:e})}no.propTypes={children:S.any.isRequired,style:S.object};const A={yellow:"#FFCF71",grey:"#aaaaaa",reverse:"#444",running:"#34BE74",error:"#D0021B",primary:"#1DC1C7"},De={added:A.grey,waiting:A.yellow,downloading:A.yellow,extracting:A.yellow,downloaded:A.grey,installing:A.yellow,installed:A.grey,starting:A.yellow,running:A.running,stopping:A.yellow,stopped:A.reverse,error:A.error,upgrading:A.yellow,restarting:A.yellow,corrupted:A.error,deleting:A.yellow,resource:A.primary},Oi={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 Ni({isResource:e=!1,status:t,variant:n="tag",progress:r=0,...o}){const{t:s}=m.useContext(tn),a=N.isInProgress(t),c=e&&t==="stopped"?"resource":t,l=s(`blocklet.status.${c}`);return n==="pin"?i.jsx(de,{title:s("blocklet.statusTip",{status:l}),children:i.jsxs(I,{...o,sx:[{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center"},...Array.isArray(o.sx)?o.sx:[o.sx]],children:[i.jsx(I,{style:{opacity:.15},sx:{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:De[c]}}),i.jsx(I,{sx:{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:De[c]}})]})}):n==="dot"?i.jsx(de,{title:s("blocklet.statusTip",{status:l}),children:i.jsx(Fr,{color:De[c],...o})}):i.jsxs(no,{type:Oi[c],...o,children:[a&&i.jsx(V,{size:12,color:"inherit",style:{marginRight:5}}),l,c==="downloading"&&r?i.jsx("div",{style:{marginLeft:5},children:`${r} %`}):null]})}Ni.propTypes={status:S.string.isRequired,variant:S.oneOf(["dot","tag","pin"]),source:S.string,progress:S.number,isResource:S.bool};function oo({infos:e=[]}){const{t}=U(),n=new URL("https://community.arcblock.io/discussions/add");e.forEach(o=>{n.searchParams.set(o.label,o.value)});const r=e.map(o=>`* ${o.label}: ${o.value}`).join(`
|
|
43
|
-
`);return n.searchParams.set("report","server"),n.searchParams.set("context",`[Enter feedback here]
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
<!--
|
|
48
|
-
[Server Info]
|
|
49
|
-
${r}
|
|
50
|
-
* Page: ${window.location.href}
|
|
51
|
-
-->
|
|
52
|
-
`),L(I,{sx:{mx:{xs:0,md:2}},children:L(_e,{sx:{color:"text.primary"},target:"_blank",href:n.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}oo.propTypes={infos:S.arrayOf(S.shape({label:S.string,value:S.string}))};var Je,Qt;function Ui(){return Qt||(Qt=1,Je={year:{long:"year",short:"y"},day:{long:"day",short:"d"},hour:{long:"hour",short:"h"},minute:{long:"minute",short:"m"},second:{long:"second",short:"s"},millisecond:{long:"millisecond",short:"ms"},microsecond:{long:"microsecond",short:"µs"},nanosecond:{long:"nanosecond",short:"ns"}}),Je}var Ye,Zt;function zi(){return Zt||(Zt=1,Ye={year:{long:"年",short:"年"},day:{long:"天",short:"天"},hour:{long:"小时",short:"小时"},minute:{long:"分钟",short:"分"},second:{long:"秒钟",short:"秒"},millisecond:{long:"毫秒",short:"毫秒"},microsecond:{long:"微秒",short:"微秒"},nanosecond:{long:"纳秒",short:"纳秒"}}),Ye}var et,Xt;function ro(){if(Xt)return et;Xt=1;const e=new Map;return et={registerLang:(r,o)=>{e.set(r,o)},getLang:(r="en_US")=>e.get(r)||e.get("en_US")},et}var tt,Jt;function Bi(){return Jt||(Jt=1,tt=e=>{if(typeof e!="number")throw new TypeError("Expected a number");const t=e>0?Math.floor:Math.ceil;return{days:t(e/864e5),hours:t(e/36e5)%24,minutes:t(e/6e4)%60,seconds:t(e/1e3)%60,milliseconds:t(e)%1e3,microseconds:t(e*1e3)%1e3,nanoseconds:t(e*1e6)%1e3}}),tt}var nt,Yt;function $i(){if(Yt)return nt;Yt=1;const e=Bi(),{getLang:t}=ro(),n=(o,s)=>s===1?o:`${o}s`,r=1e-7;return nt=(o,s={})=>{if(!Number.isFinite(o))throw new TypeError("Expected a finite number");s.colonNotation&&(s.compact=!1,s.formatSubMilliseconds=!1,s.separateMilliseconds=!1,s.verbose=!1),s.compact&&(s.secondsDecimalDigits=0,s.millisecondsDecimalDigits=0);const a=t(s.locale),c=[],l=(p,f)=>{const x=Math.floor(p*10**f+r);return(Math.round(x)/10**f).toFixed(f)},u=(p,f,x)=>{if((c.length===0||!s.colonNotation)&&p===0&&!(s.colonNotation&&f==="minute"))return;const{long:y}=a[f]||t("en_US")[f],{short:h}=a[f]||t("en_US")[f];let C=(x||p||"0").toString(),v,j;if(s.colonNotation){v=c.length>0?":":"",j="";const g=C.includes(".")?C.split(".")[0].length:C.length,E=c.length>0?2:1;C="0".repeat(Math.max(0,E-g))+C}else v="",s.locale==="zh_CN"?Object.values(d).filter(g=>g>0).length>1?!d.days&&!d.hours&&d.minutes&&s.compact?j=y:j=h:d.minutes?j=y:j=h:j=s.verbose?` ${n(y,p)}`:h;c.push(v+C+j)},d=e(o);if(u(Math.trunc(d.days/365),"year"),u(d.days%365,"day"),u(d.hours,"hour"),u(d.minutes,"minute"),s.separateMilliseconds||s.formatSubMilliseconds||!s.colonNotation&&o<1e3)if(u(d.seconds,"second"),s.formatSubMilliseconds)u(d.milliseconds,"millisecond"),u(d.microseconds,"microsecond"),u(d.nanoseconds,"nanosecond");else{const p=d.milliseconds+d.microseconds/1e3+d.nanoseconds/1e6,f=typeof s.millisecondsDecimalDigits=="number"?s.millisecondsDecimalDigits:0,x=p>=1?Math.round(p):Math.ceil(p),y=f?p.toFixed(f):x;u(Number.parseFloat(y,10),"millisecond",y)}else{const p=o/1e3%60,f=typeof s.secondsDecimalDigits=="number"?s.secondsDecimalDigits:1,x=l(p,f),y=s.keepDecimalsOnWholeSeconds?x:x.replace(/\.0+$/,"");u(Number.parseFloat(y,10),"second",y)}if(c.length===0){const p=(a.millisecond||t("en_US").millisecond).long,f=(a.millisecond||t("en_US").millisecond).short;return s.locale==="zh_CN"?`0${s.verbose?`${p}`:f}`:`0${s.verbose?` ${p}s`:f}`}if(s.compact)return c[0];if(typeof s.unitCount=="number"){const p=s.colonNotation?"":" ";return c.slice(0,Math.max(s.unitCount,1)).join(p)}return s.colonNotation?c.join(""):c.join(" ")},nt}var ot,en;function Fi(){if(en)return ot;en=1;const e=Ui(),t=zi(),{registerLang:n}=ro(),r=$i();return n("en_US",e),n("zh_CN",t),r.registerLang=n,ot=r,ot}var Vi=Fi();const so=Jo(Vi);function H({children:e}){return oe(n=>n.breakpoints.down("md"))?i.jsx(de,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:i.jsx(I,{sx:{display:"flex",alignItems:"center",gap:1},children:i.jsx(Tt,{fontSize:"small"})})}):i.jsxs(I,{sx:{display:"flex",alignItems:"center",gap:1},children:[i.jsx(Tt,{fontSize:"small"}),e]})}H.propTypes={children:S.node.isRequired};const Hi="https://launcher.arcblock.io/",Wi=30*24*60*60*1e3;function io({launcherUrl:e,chainHost:t,nftId:n="",launcherSessionId:r="",retention:o=0,sx:s={},...a}){const{t:c,locale:l}=U(),u=Be(),[d,p]=vn({safeIframeRef:null,popoverAnchorEl:null}),f=m.useRef(null),x=pe(),y=oe(b=>b.breakpoints.down("md")),h=y?"mobile":"desktop",C=yn(async()=>{const[b,T]=await Promise.all([u.api.getLauncherSession({input:{launcherSessionId:r,launcherUrl:e}}),pn({launcherUrl:e||Hi,nftDid:n,launcherSessionId:r,locale:l,theme:x.palette.mode})]);if(b?.error)throw new Error(b.error);return{launcherSession:b.launcherSession,subscriptionURL:T}},[l]);if(C.loading)return i.jsx(Q,{label:i.jsxs(H,{children:[!y&&c("expiration.desktop.loading"),i.jsx(V,{size:16})]}),variant:"success",sx:{cursor:"pointer",...s},...a,retention:o});if(C.error)return console.error(C.error),i.jsx(Q,{label:i.jsx(H,{children:c(`expiration.${h}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...s},...a,retention:o,onClick:()=>C.retry()});const v=b=>{p({popoverAnchorEl:b.currentTarget})},j=()=>{p({popoverAnchorEl:null})},g=C.value?.launcherSession;let E="success";[P.LAUNCH_SESSION_STATUS.overdue,P.LAUNCH_SESSION_STATUS.canceled,P.LAUNCH_SESSION_STATUS.terminated].includes(C.value?.launcherSession?.status)&&(E="error");let k=null;if(g.expirationDate&&!g.subscription){const b=te(g.expirationDate).diff(te(),"ms");k=c(`expiration.${h}.tips.${E}`,{validity:so(b,{locale:mn(l),compact:!0,verbose:!0})}),b>0&&b<=Wi&&(E="warning")}return i.jsxs(i.Fragment,{children:[i.jsx(Q,{label:i.jsx(H,{children:k||g?.subscription?.product?.name||c("common.subscription")}),color:E,variant:E!=="success"?"contained":"outlined",sx:{cursor:"pointer",...s},...a,retention:o,onClick:v}),i.jsx(ln,{id:"popover-info",open:!!d.popoverAnchorEl,anchorEl:d.popoverAnchorEl,onClose:j,anchorOrigin:{vertical:"bottom",horizontal:"right"},sx:{"& .MuiPopover-paper":{minHeight:0}},transformOrigin:{vertical:"top",horizontal:"right"},children:i.jsx(I,{sx:{width:{xs:"360px",md:"450px"},display:"flex",flexDirection:"column"},children:i.jsx("iframe",{ref:f,title:c("common.subscription"),width:"100%",height:"600px",style:{border:0,maxHeight:"800px"},src:C.value?.subscriptionURL})})})]})}io.propTypes={chainHost:S.string.isRequired,nftId:S.string,launcherSessionId:S.string,sx:S.object,retention:S.number,launcherUrl:S.string.isRequired};const qi=30*24*60*60*1e3,Ki="https://launcher.arcblock.io/";function ao({launcherUrl:e,chainHost:t,nftId:n="",launcherSessionId:r="",sx:o={},retention:s=0,...a}){const{t:c,locale:l}=U(),[u,d]=vn({safeIframeRef:null,popoverAnchorEl:null}),p=m.useRef(null),f=oe(b=>b.breakpoints.down("md")),x=Be(),y=f?"mobile":"desktop",h=yn(async()=>{const[b,T]=await Promise.all([x.api.getLauncherSession({input:{launcherSessionId:r||n,launcherUrl:e}}),pn({launcherUrl:e||Ki,nftDid:n,launcherSessionId:r,locale:l})]);if(b?.error)throw new Error(b.error);return{launcherSession:b.launcherSession,subscriptionURL:T}},[l]);if(h.loading)return i.jsx(Q,{label:i.jsxs(H,{children:[!f&&c("expiration.desktop.loading"),i.jsx(V,{size:16})]}),variant:"success",sx:{cursor:"pointer",...o},...a,retention:s});if(h.error)return console.error(h.error),i.jsx(Q,{label:i.jsx(H,{children:c(`expiration.${y}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...o},...a,retention:s,onClick:()=>h.retry()});const C=h.value?.launcherSession?.expirationDate,v=te(C).isBefore(te()),j=te(C).diff(te(),"ms");let g="success";j<=qi&&(g="warning"),v&&(g="error");const E=b=>{d({popoverAnchorEl:b.currentTarget})},k=()=>{d({popoverAnchorEl:null})};return i.jsxs(i.Fragment,{children:[h.value?.launcherSession?.subscription&&i.jsx(Q,{label:i.jsx(H,{children:c("expiration.desktop.nextInvoice",{date:ir(C,l)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...o},...a,retention:s,onClick:E}),!h.value?.launcherSession?.subscription&&i.jsx(Q,{label:i.jsx(H,{children:c(`expiration.${y}.tips.${g}`,{validity:so(j,{locale:mn(l),compact:!0,verbose:!0})})}),color:g,variant:g!=="success"?"contained":"outlined",sx:{cursor:"pointer",...o},...a,retention:s,onClick:E}),i.jsx(ln,{id:"popover-info",open:!!u.popoverAnchorEl,anchorEl:u.popoverAnchorEl,onClose:k,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:i.jsx(I,{sx:{width:{xs:"360px",md:"450px"}},children:i.jsx("iframe",{ref:p,title:c("common.subscription"),width:"100%",height:"600px",style:{border:0},src:h.value?.subscriptionURL})})})]})}ao.propTypes={chainHost:S.string.isRequired,nftId:S.string,launcherSessionId:S.string,sx:S.object,retention:S.number,launcherUrl:S.string.isRequired};function co({meta:e={},fallbackUrl:t=Ge,invalidPathFallback:n=null,headerAddons:r=void 0,sessionManagerProps:o={showRole:!0,onLogout:()=>{window.location.href=Ge}},links:s=[],showDomainWarningDialog:a=!0,...c}){ar();const l=m.use(cr)?.session?.user,u=l?.role,{locale:d}=U()||{},p=m.useMemo(()=>{const j=Object.assign({},window.blocklet,e);try{return lr(j)}catch(g){return console.error("Failed to format blocklet info",g,j),j}},[e]),{localizedNav:f,flattened:x,matchedIndex:y}=m.useMemo(()=>{let j=ur(p?.navigation?.dashboard,d)||[];j=dr(j,u),j=fr(j,k=>{let b=null;return k.icon&&(k.icon.startsWith("http")||k.icon.startsWith("data:")?b=i.jsx(on,{src:k.icon}):b=i.jsx("iconify-icon",{height:"100%",width:"100%",icon:k.icon})),{id:k.id,title:k.title,url:k.link,icon:b,external:!0,children:k.items}},"items");const g=pr(j).filter(k=>!!k.url),E=mr(g.map(k=>k.url));return E!==-1&&(g[E].active=!0),{localizedNav:j,flattened:g,matchedIndex:E}},[p,d,u]),h=typeof s=="function"?s(f):[...f,...s],C=hr({meta:e});if(m.useLayoutEffect(()=>{l&&!x?.length&&t&&(window.location.href=t)},[t]),m.useLayoutEffect(()=>{l&&x?.length&&y===-1&&n&&n()},[n,x,y]),!p.appName)return null;const{appName:v}=p;return i.jsx(Vr,{title:v,fullWidth:!0,sidebarWidth:128,legacy:!1,links:h,...c,headerProps:{homeLink:Ge,logo:i.jsx("img",{src:C,alt:"logo"}),addons:i.jsx(gr,{formattedBlocklet:p,addons:r,sessionManagerProps:o,showDomainWarningDialog:a}),...c.headerProps}})}co.propTypes={meta:br,fallbackUrl:S.string,invalidPathFallback:S.func,headerAddons:S.oneOfType([S.func,S.node]),sessionManagerProps:xr,links:S.oneOfType([S.array,S.func]),showDomainWarningDialog:S.bool};const Gi={width:24,height:24,body:'<path fill="currentColor" d="M6.4 18L5 16.6L14.6 7H6V5h12v12h-2V8.4L6.4 18Z"/>'},Qi="/.well-known/service/onboard/bind-account";function lo({onFinished:e=()=>{},show:t=!1,onChangeVisible:n=()=>{},loadingText:r="",defaultPath:o=Qi,...s}){const[a,c]=m.useState(t),[l,u]=m.useState(!1),[d,p]=m.useState(()=>{const g=localStorage.getItem("wizard-current-url");return g?.includes("/.well-known/service/onboard")?g:o}),f=m.useRef(e),x=m.useRef(),y=m.useRef(null),{locale:h}=U(),C=pe(),v=oe(C.breakpoints.down("sm"));if(f.current=e,x.current=()=>{if(y.current?.contentWindow)try{const g=new URL(y.current.contentWindow.location.href).pathname;localStorage.setItem("wizard-current-url",g),p(g)}catch(g){p(o),console.warn("Failed to save wizard URL:",g)}localStorage.setItem("wizard-completed","true"),c(!1),n(!1)},m.useEffect(()=>{t!==a&&c(t)},[t]),m.useEffect(()=>{!a&&l&&u(!1)},[a]),m.useEffect(()=>{const g=E=>{if(E.origin!==window.location.origin)return;const{type:k,data:b}=E.data||{};switch(k){case"wizard.loaded":u(!0);break;case"wizard.finished":{c(!1),p(o),localStorage.removeItem("wizard-current-url"),localStorage.setItem("wizard-completed","true"),f.current?.(b);break}case"wizard.close":{x.current();break}}};return window.addEventListener("message",g),()=>{window.removeEventListener("message",g)}},[]),m.useEffect(()=>{localStorage.getItem("wizard-completed")||c(!0)},[]),!a)return null;const j=xn(W(window.location.origin,d),{locale:h});return i.jsxs(un,{id:"wizard-dialog",open:a,onClose:()=>x.current(),fullWidth:!0,maxWidth:v?!1:"md",fullScreen:v,...s,slotProps:Rr({},{paper:{sx:{margin:0,borderRadius:0,position:"relative",overflow:"hidden",...v?{borderRadius:0}:{borderRadius:1,height:"720px"}}}},s.slotProps),sx:{"& .MuiBackdrop-root":{backgroundColor:"rgba(0, 0, 0, 0.5)"},...s.sx},children:[i.jsx("iframe",{ref:y,id:"wizard-iframe",src:j,title:"Setup Wizard",style:{width:"100%",height:"100%",border:0,padding:0,margin:0,opacity:l?1:0,transition:"opacity 0.3s ease-in-out"},onLoad:()=>u(!0)}),l?null:i.jsx(I,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",justifyContent:"center",alignItems:"center",bgcolor:"background.paper"},children:i.jsxs(I,{sx:{display:"flex",alignItems:"center",flexDirection:"column",gap:1},children:[i.jsx(V,{}),typeof r=="string"?i.jsx(ee,{variant:"body1",children:r}):r]})})]})}lo.propTypes={onFinished:S.func,show:S.bool,onChangeVisible:S.func,loadingText:S.node,defaultPath:S.string,...un.propTypes};const Zi={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 21L21 6l-3-3L3 18l3 3m9-15l3 3M9 3a2 2 0 0 0 2 2a2 2 0 0 0-2 2a2 2 0 0 0-2-2a2 2 0 0 0 2-2m10 10a2 2 0 0 0 2 2a2 2 0 0 0-2 2a2 2 0 0 0-2-2a2 2 0 0 0 2-2"/>'};function Xi(){const{session:e}=hn(),[t,n]=m.useState(!1),[r,o]=m.useState(!1),{t:s}=U(),a=m.useMemo(()=>!!localStorage.getItem("wizard-finished"),[]);return m.useMemo(()=>e.user?.role&&gn.includes(e.user.role),[e])?i.jsxs(i.Fragment,{children:[i.jsx(de,{title:s("setup.wizardTooltip"),open:t,placement:"bottom",arrow:!0,children:i.jsx(Ne,{size:"small",onClick:()=>{o(!0),n(!1)},sx:{display:{xs:"none",md:"flex"},color:"text.secondary",...t&&{backgroundColor:"action.hover","@keyframes pulse":{"0%":{opacity:.8},"50%":{opacity:.5},"100%":{opacity:.8}},animation:"pulse 2s infinite"}},children:i.jsx(rn,{icon:Zi,height:20})})},`wizard-toggle-${t}`),i.jsx(lo,{show:r,loadingText:i.jsxs(I,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1,mt:2,maxWidth:"80vw"},children:[i.jsx(Et,{variant:"h4",sx:{fontWeight:"bold"},children:s("setup.wizardLoading")}),!a&&i.jsx(Et,{variant:"body2",sx:{textAlign:"center"},children:s("setup.wizardSubTitle")})]}),slotProps:{paper:{sx:{height:{xs:"100vh",md:"750px"}}}},onChangeVisible:l=>{o(l),!l&&r&&n(!0)},onClose:void 0,onFinished:()=>{o(!1),n(!1)}},"wizard-modal")]}):null}function Ji(){const{inFullPage:e,toggleFullPage:t}=Hr();return L(Ne,{onClick:t,children:e?L(Go,{sx:{transform:"scale(1.3)"}}):L(Qo,{sx:{transform:"scale(1.3)"}})})}function uo({children:e=null,title:t=""}){const{t:n}=U(),{loading:r,error:o,actions:{refreshBlocklet:s},env:a,blocklet:c}=me(),{info:l,imgPrefix:u}=yr(),d=Yo(),p=oe(E=>E.breakpoints.down("md")),f=pe(),{appId:x,version:y}=a,h=[{label:"App ID",value:x},{label:"App Version",value:y},{label:"App Bundle Name",value:c?.meta?.bundleName},{label:"Server Id",value:l.did},{label:"Server Version",value:l.version}],C=E=>{const k=Array.isArray(E)?E:[E];if(k.unshift(L(Xi,{})),p||k.unshift(L(Ji,{})),c){const b={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};wr(c)?k.unshift(L(io,{chainHost:c?.controller?.chainHost,nftId:c?.controller?.nftId,launcherSessionId:c?.controller?.launcherSessionId,launcherUrl:c?.controller?.launcherUrl,sx:b})):l.ownerNft&&l.launcher&&k.unshift(L(ao,{chainHost:l.launcher.chainHost,launcherUrl:l.launcher.url,nftId:l.ownerNft.did,launcherSessionId:l.ownerNft.launcherSessionId,sx:b}))}return k},v=zr({blocklet:c}),j={logo:v?L("img",{src:v,alt:"logo"}):null,brandAddon:L(I,{children:c&&ke(I,{component:"a",target:"_blank",href:window.blocklet.appUrl,rel:"noopener noreferrer",title:window.blocklet.appName,sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,py:.5,px:2,border:"1px solid",borderColor:"text.disabled",borderRadius:"30px",cursor:"pointer"},children:[L(de,{title:N.isRunning(c?.status)?void 0:n(`blocklet.status.${c?.status}`),children:L(I,{sx:{bgcolor:De[c?.status],width:8,height:8,borderRadius:"50%"}})}),L(I,{sx:{color:"text.secondary",maxWidth:p?66:240,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:N.getDisplayName(c)}),L(I,{component:rn,icon:Gi,sx:{color:"text.secondary"}})]})})};return ke(Yi,{legacy:!1,fullWidth:!0,headerAddons:C,headerProps:j,links:E=>E?.map(b=>(b.children=b.children?.map(T=>{if(T.id==="/team/aigne"){const M=u?W(u,"/aigne-hub.png"):"/aigne-hub.pg";return{...T,icon:L(on,{src:M,alt:"AIGNE Hub",style:f.palette.mode==="dark"?{filter:"invert(1)"}:{},fallback:T.icon})}}return T}),b)),title:t,footerProps:{addon:L(oo,{infos:h})},children:[!c&&r&&L(Ae,{relative:"parent",children:L(V,{})}),!c&&o&&ke(Ae,{relative:"parent",children:[ke(I,{sx:{display:"flex",alignItems:"center"},children:[L(Ko,{color:"error",sx:{marginRight:1}}),xt(o)]}),L(ht,{onClick:()=>s(),children:L("span",{style:{textDecoration:"underline"},children:n("common.retry")})})]}),!!c&&L(I,{sx:{flex:1,padding:p?2:3,display:"flex",flexDirection:"column"},children:L(jo,{FallbackComponent:vr,resetKeys:[d.pathname],children:e})})]})}uo.propTypes={children:S.any,title:S.string};const Yi=Ue(co)`
|
|
53
|
-
div.dashboard-content {
|
|
54
|
-
padding: 0;
|
|
55
|
-
}
|
|
56
|
-
.header-addons .locales {
|
|
57
|
-
max-height: 400px;
|
|
58
|
-
overflow-y: auto;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.header-brand-addon {
|
|
62
|
-
display: block;
|
|
63
|
-
}
|
|
64
|
-
`;function ea(){const{t:e,locale:t}=U(),{blocklet:n,launcherSession:r,refreshSubscription:o}=me(),{connectApi:s,session:a,api:c}=hn(),[l,u]=m.useState(!1),[d,p]=m.useState(""),[f,x]=Mr({subscriptionURL:"#"});if(m.useEffect(()=>{(Dt(n,r)||At(r))&&Sr({launcherSessionId:n?.controller?.launcherSessionId,launcherUrl:n?.controller?.launcherUrl,locale:t}).then(v=>{x({subscriptionURL:v})}).catch(v=>{console.error("get subscription url error:",v)})},[n,r]),m.useEffect(()=>{if(n.controller?.launcherUrl){const v=W(n.controller.launcherUrl,"__blocklet__.js?type=json");fetch(v).then(j=>j.json()).then(j=>{const g=j.componentMountPoints?.find(k=>k.did==="z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk")?.mountPoint,E=W(n.controller.launcherUrl,g);p(E)})}},[n.controller?.launcherUrl]),!n||!r)return"";let y=null,h="",C="error";return jr(r)?(y=Cr(r)?i.jsx(_e,{href:f.subscriptionURL,children:e("blocklet.manageSubscription")}):i.jsx(Zo,{variant:"text",color:"error",onClick:()=>u(!0),sx:{lineHeight:"inherit",fontSize:"inherit"},children:e("blocklet.payNow")}),h=e("blocklet.suspendedCausedByPastDue",{deadline:se(r?.reservedUntil,t)})):At(r)?(y=i.jsx(_e,{href:f.subscriptionURL,children:e("blocklet.manageSubscription")}),h=e("blocklet.willBeSuspendedSoon",{deadline:se((r?.subscription?.cancel_at||0)*1e3,t)}),C="warning"):Dt(n,r)?(y=i.jsx(_e,{href:f.subscriptionURL,children:e("blocklet.manageSubscription")}),h=e("blocklet.suspendedCausedByExpired",{deadline:se(r?.reservedUntil,t),canceledAt:se((r?.subscription?.canceled_at||0)*1e3,t)})):kr(n,r)&&(y=i.jsx(dn,{to:W(P.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),h=e("blocklet.suspendedCausedByTerminated",{canceledAt:se(r?.terminatedAt,t),deadline:Er(r?.terminatedAt,t)})),h?i.jsxs(i.Fragment,{children:[i.jsxs(gt,{severity:C,sx:{mb:1},children:[h,i.jsx(ee,{sx:{display:"inline-block",fontSize:"inherit",lineHeight:"inherit",ml:1,a:{textDecoration:"auto"},"& .MuiButtonBase-root":{p:0,minWidth:"auto"}},children:y})]}),l&&d&&r&&i.jsx(Ir,{session:a,connect:s,baseUrl:d,authToken:r.subscription.authToken,children:i.jsx(Wr,{dialogProps:{open:l,onClose:()=>u(!1)},subscriptionId:r.subscription.id,successToast:!0,onPaid:()=>{c.post("/blocklet/start?fromSetup=1"),o(),u(!1)}})})]}):null}const ta=m.lazy(()=>_(()=>import("./log-BLtV-mr3.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]))),na=m.lazy(()=>_(()=>import("./index-82gv-l2w.js"),__vite__mapDeps([13,2,1,5,4,6,7,8,9,10,11,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43]))),oa=m.lazy(()=>_(()=>import("./index-Cza28Ou-.js"),__vite__mapDeps([44,4,2,1,5,6,7,8,14,9,10,11,18,19,20,21,41,45,35,22,42,46]))),ra=m.lazy(()=>_(()=>import("./index-DOo8QRm-.js"),__vite__mapDeps([47,2,1,9,4,5,6,7,8,10,11,35,22,19,23,48,12,43,49,27,50,51,52,53,30,54,55,56,57,58,59,60,61,62,63]))),sa=m.lazy(()=>_(()=>import("./overview-C-11gh2u.js"),__vite__mapDeps([64,1,2,4,5,6,7,8,65,66,9,10,11,34,67,33,18,19,20,21,23,68,69,70,53,3,22,35,57,51,71,72,73]))),ia=m.lazy(()=>_(()=>import("./domains-CHjbOYj6.js"),__vite__mapDeps([74,2,4,1,5,6,7,8,9,10,11,75,51,26,19,67,33,35,22,42,59,27,32,34,76,52]))),aa=m.lazy(()=>_(()=>import("./index-DRhj0EDS.js"),__vite__mapDeps([77,2,6,5,1,4,7,8,9,10,11,23,18,19,20,21,78,14,37,38,41,17,26,24,25,79,35,22,49,51,80]))),ca=m.lazy(()=>_(()=>import("./appearance-CwcRjBdx.js"),__vite__mapDeps([81,5,2,9,1,4,6,7,8,10,11,41]))),la=m.lazy(()=>_(()=>import("./audit-logs-CIL7B8dX.js"),__vite__mapDeps([82,4,2,1,5,6,7,8,9,10,11,37,38,3,61,62,43,63,18,19,20,21]))),ua=m.lazy(()=>_(()=>import("./index-Dn2eai8S.js"),__vite__mapDeps([83,2,1,5,4,6,7,8,9,10,11,45,20,84,85,86,43,34,87,88,12,18,19,21,14,37,38,23,89,67,33,90,91,22,92,93,30,31,41]))),da=m.lazy(()=>_(()=>import("./config-navigation-C_Stnyxb.js"),__vite__mapDeps([94,2,1,4,5,6,7,8,9,10,11,69,25,95,96,45,97,18,19,20,21,53,98,54,55,90,22,3,35,57,67,33,51,71,72,73]))),fa=m.lazy(()=>_(()=>import("./index-IN8OKZ_V.js"),__vite__mapDeps([99,1,2,6,5,9,4,7,8,10,11,41,100,101,66,17,53,102,103,70,22,34,93,57,104,60,49]))),pa=m.lazy(()=>_(()=>import("./index-ZXxjnrfz.js"),__vite__mapDeps([105,4,2,1,5,6,7,8,9,10,11,45,104,60,84,85,65,34,38,41]))),ma=m.lazy(()=>_(()=>import("./security-DAv6SG0v.js"),__vite__mapDeps([106,4,2,1,5,6,7,8,9,10,11,45,97,18,19,20,21,107,41]))),ha=m.lazy(()=>_(()=>import("./branding-Y62inJ9A.js"),__vite__mapDeps([108,2,1,4,5,6,7,8,9,10,11,109,69,95,110,85,111,79,26,19,21,112,84]))),ga=m.lazy(()=>_(()=>import("./advanced-DPeAQM5T.js"),__vite__mapDeps([113,2,1,9,4,5,6,7,8,10,11,26,19,35,22,51,84,85,27,18,20,21,34,23,68,69]))),xa=m.lazy(()=>_(()=>import("./traffic-BuZd517Z.js").then(e=>e.t),__vite__mapDeps([89,2,9,1,4,5,6,7,8,10,11,67,33,90,91,22,92,93,30,31]))),ba=m.lazy(()=>_(()=>import("./runtime-CC0b3IOS.js"),__vite__mapDeps([114,2,1,4,5,6,7,8,9,10,11,101,92,93,12,3,22,35,57,19,18,20,21,67,33,51,71,72,73]))),ya=m.lazy(()=>_(()=>import("./index-BA8N8sek.js"),__vite__mapDeps([115,2,1,4,5,6,7,8,22,14,9,10,11,78,23,37,38,18,19,20,21,29,28,30,31,35,27,66,59,26,12,41,42,46]))),va=m.lazy(()=>_(()=>import("./list-CgUqi7mZ.js"),__vite__mapDeps([116,2,4,1,5,6,7,8,14,9,10,11,67,33,16,18,19,20,21,45,28,29,30,31,48,27,59,35,22,78,23,37,38,42,46,41]))),wa=m.lazy(()=>_(()=>import("./index-CX0nBp11.js"),__vite__mapDeps([117,2,4,1,5,6,7,8,9,10,11,53,46,41,18,19,20,21]))),Sa=m.lazy(()=>_(()=>import("./config-BASOtMEK.js").then(e=>e.c),__vite__mapDeps([118,2,1,6,5,20,9,4,7,8,10,11,84,85,111,110,79,56,57,95,22,14]))),ja=m.lazy(()=>_(()=>import("./observability-3BjnzXRV.js"),__vite__mapDeps([119,1,2]))),Ca=m.lazy(()=>_(()=>import("./playground-BEhnKrD-.js"),__vite__mapDeps([120,1,2]))),ka=m.lazy(()=>_(()=>import("./component-M75sOZuG.js"),__vite__mapDeps([121,1,2,5,4,6,7,8,9,10,11,22,104,60,26,19,30,91,96,55,109,69,95,27,17,122,58,59,35,57,23,56,123,124,52,103,70,53,85,125,24,25,111,112,86,61,62,118,20,84,110,79,14,3,34,76,41,126,102,100,101,66,127,128,80,90,12,42,18,21,67,33,51,71,72,73]))),Ea=m.lazy(()=>_(()=>import("./index-DZkt7K0r.js"),__vite__mapDeps([129,1,2,4,5,6,7,8,9,10,11]))),Ia=W(P.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications"),_a=e=>{const{enqueueSnackbar:t}=nn(),n=m.useCallback(r=>xn(Ia,{id:r.id,severity:r.severity||"all",componentDid:r.source==="system"?"system":r.componentDid||"all"}),[]);Lr(`${e}/${P.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,r=>{const o=n(r),{severity:s,description:a}=r||{},c=["error","warning"].includes(s)||r.sticky;r.source==="system"&&t(a,{variant:s,autoHideDuration:c?null:5e3,content:l=>i.jsx(as,{viewAllUrl:o,keyId:l,notification:r,content:i.jsx($r,{notification:r,minimal:!0,rows:0})})})},[],"user")};function fo({blocklet:e,isAdmin:t}){return t?i.jsx(ua,{blocklet:e}):i.jsx(Ar,{status:403})}fo.propTypes={blocklet:S.object.isRequired,isAdmin:S.bool.isRequired};const Ta=e=>{const{t}=U(),{blocklet:n,actions:{refreshBlocklet:r},client:o,did:s}=me(),a=n?.meta?.did,c=!n||Dr(n.status)?[]:N.getAppMissingConfigs(n),l={overview:[{label:t("common.overview"),value:"overview"},{label:i.jsx(Xo,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!c.length,children:t("common.components")}),labelText: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"}],aigne:[{label:t("setup.aigne.config"),value:"aigne-config"}],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.advancedConfig"),value:"advanced"}],integrations:[{label:"Webhooks",value:"webhooks",show:e},{label:t("common.accessKeys"),value:"access-keys"},{label:t("common.mcpServers"),value:"mcp-servers"}],developers:[{label:t("common.logs"),value:"logs",show:n?.children?.length&&n.structVersion===P.APP_STRUCT_VERSION},{label:t("common.performance"),value:"performance"},{label:t("common.docs"),value:"docs"}]},u={overview:sa,components:ka,members:i.jsx(na,{type:"blocklet",createPassportSvg:Pt}),passports:i.jsx(aa,{createPassportSvg:Pt}),settings:i.jsx(pa,{orientation:"vertical"}),security:i.jsx(ma,{}),"did-spaces":i.jsx(fa,{navOrientation:"horizontal"}),domains:ia,branding:i.jsx(ha,{blocklet:n,onUpdate:r}),theming:i.jsx(ca,{}),navigation:da,sitemap:i.jsx(ko,{children:t("common.comingSoon")}),notifications:i.jsx(fo,{blocklet:n,isAdmin:e}),"audit-logs":i.jsx(la,{scope:a,categories:["blocklet","team","security","certificates","gateway"]}),analytics:i.jsx(xa,{client:o,did:s}),advanced:i.jsx(ga,{blocklet:n,onUpdate:r}),webhooks:i.jsx(oa,{}),"access-keys":i.jsx(ya,{}),"mcp-servers":i.jsx(wa,{}),logs:ta,performance:i.jsx(ba,{client:o,did:s}),docs:Ea,publish:i.jsx(ra,{}),oauth:i.jsx(va,{}),"aigne-config":i.jsx(I,{sx:{maxWidth:1536},children:i.jsx(Sa,{})}),"aigne-observability":i.jsx(ja,{}),"aigne-playground":i.jsx(Ca,{})};return{tabGroups:l,renders:u}};function La(){const e=fn(),{tab:t="overview",subtab:n}=er(),{locale:r}=U(),{blocklet:o,refreshFlag:s}=me(),{session:a}=bn(),c=ae(()=>a?.user?.did,[a]),l=qr(),u=ae(()=>a.user?.role&&gn.includes(a.user.role),[a]);_a(c);const{tabGroups:d,renders:p}=Ta(u),f=g=>{e(`${P.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${t}/${g}`)},x=(d[t]||[]).filter(g=>g.show===void 0||g.show),y=(x||[]).find(g=>g.value===n)?.value||x?.[0]?.value||t,h=p[y]||p.overview,C=["overview"].includes(t),v=o?i.jsxs(Sn,{type:"components",children:[x.length>0&&i.jsxs(I,{sx:{mb:2,display:"flex",alignItems:"center",gap:2},children:[i.jsx(Co,{tabs:x,current:y,onChange:f,scrollButtons:"auto"}),C&&!l&&i.jsx(I,{sx:{flex:1,display:"flex",justifyContent:"flex-end"},children:i.jsx(I,{component:"div",className:"page-header",children:o?i.jsx(Ut,{className:"page-actions",hasPermission:!0,blocklet:o,onStart:()=>{},onComplete:({error:g}={})=>{g&&F.error(g.message)},variant:"group"}):null})})]}),i.jsx(I,{className:"page-content",children:i.jsx(m.Suspense,{fallback:i.jsx(Ae,{relative:"parent",children:i.jsx(V,{})}),children:m.isValidElement(h)?h:i.jsx(h,{blocklet:o})})})]}):i.jsx(Ae,{relative:"parent",children:i.jsx(V,{})}),j=ae(()=>{const g=window.blocklet?.navigation?.find(R=>R.id==="/team"&&R.section==="dashboard"),E=o?.meta?.title||"";let k="";if(g){const R=W(P.WELLKNOWN_BLOCKLET_ADMIN_PATH,t,t==="publish"?n:"");k=g.items.find(We=>We.link===R)?.title?.[r]||""}const b=x.find(R=>R.value===n),M=[b?.labelText||b?.label||x?.[0]?.labelText||x?.[0]?.label||"",k].filter(Boolean).join(" - ");return E?M?`${M} | ${E}`:E:M||""},[t,n,o,r]);return i.jsx(Tr,{children:i.jsx(Br,{children:i.jsx(uo,{title:j,children:i.jsxs(Aa,{children:[l&&C&&i.jsx(I,{component:"div",className:"page-header",sx:{mb:2},children:o?i.jsx(Ut,{className:"page-actions",hasPermission:!0,blocklet:o,onStart:()=>{},onComplete:({error:g}={})=>{g&&F.error(g.message)},variant:"group"}):null}),i.jsx(Yr,{}),i.jsx(ea,{}),v]})},`${s}`)})})}function Da(){const{blocklet:e}=me(),t=e?.meta?.did;return m.useEffect(()=>{const n=_r();return t&&n.connect(),()=>{t&&n.isConnected()&&n.disconnect()}},[t]),i.jsx(La,{})}const Aa=Ue.main`
|
|
65
|
-
.page-header {
|
|
66
|
-
display: flex;
|
|
67
|
-
justify-content: space-between;
|
|
68
|
-
align-items: center;
|
|
69
|
-
flex-wrap: wrap;
|
|
70
|
-
gap: 16px;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.page-title {
|
|
74
|
-
display: flex;
|
|
75
|
-
align-items: center;
|
|
76
|
-
|
|
77
|
-
.page-link {
|
|
78
|
-
font-size: 15px;
|
|
79
|
-
margin-top: 8px;
|
|
80
|
-
margin-left: 8px;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
@media (max-width: ${e=>e.theme.breakpoints.values.md}px) {
|
|
85
|
-
.page-header {
|
|
86
|
-
flex-direction: column;
|
|
87
|
-
align-items: flex-start;
|
|
88
|
-
.page-actions,
|
|
89
|
-
.MuiButtonGroup-root {
|
|
90
|
-
width: 100%;
|
|
91
|
-
}
|
|
92
|
-
.MuiButtonGroup-root {
|
|
93
|
-
.MuiButtonBase-root {
|
|
94
|
-
flex: 1;
|
|
95
|
-
}
|
|
96
|
-
.blocklet-action-text {
|
|
97
|
-
display: none;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.page-title {
|
|
103
|
-
margin-bottom: 15px;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
`,Ja=Object.freeze(Object.defineProperty({__proto__:null,default:Da},Symbol.toStringTag,{value:"Module"}));export{Ni as B,co as F,no as W,Y as b,Ja as d,so as p,Xa as u};
|