@abtnode/blocklet-services 1.17.8-beta-20260113-015027-32a1cec4 → 1.17.8-beta-20260115-003043-5e15c08a
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/dist/assets/AdapterDayjs-BI3dme25.js +3 -0
- package/dist/assets/{Community-3AO97CCq.js → Community-BiwM1i9F.js} +1 -1
- package/dist/assets/Google-BMSeyXdi.js +27 -0
- package/dist/assets/{Holiday-CqSw2e8m.js → Holiday-BfArn73w.js} +1 -1
- package/dist/assets/LottiePlayer.modern-CeQuigIa.js +1 -0
- package/dist/assets/{Meeting-DKbNRI16.js → Meeting-QV3KsWwx.js} +1 -1
- package/dist/assets/{OffSick-BvEREz3_.js → OffSick-DP4yfBRj.js} +1 -1
- package/dist/assets/{WorkingRemotely-DNtYHcSB.js → WorkingRemotely-DTxVm_VO.js} +1 -1
- package/dist/assets/access-control-CSfPgD_B.js +14 -0
- package/dist/assets/actions-Dktj9pEF.js +1 -0
- package/dist/assets/actions-Ng-YRTer.js +64 -0
- package/dist/assets/add-component-core-D4DUnQj0.css +1 -0
- package/dist/assets/add-component-core-DOIm-W83.js +645 -0
- package/dist/assets/add-resource-_wuuBiJJ.js +1 -0
- package/dist/assets/addon-N_sS-Sx6.js +14 -0
- package/dist/assets/advanced-BhbxG-_n.js +14 -0
- package/dist/assets/aigne-DElJAbjP.js +10 -0
- package/dist/assets/api-B8JXuhVp.js +1 -0
- package/dist/assets/appearance-D71HSeGD.js +1 -0
- package/dist/assets/{arrow-down.svg-7ME6T1BL.js → arrow-down.svg-Dz9H9vM-.js} +1 -1
- package/dist/assets/audit-logs-Ci_HlT4m.js +35 -0
- package/dist/assets/authorize-DQERA3Vv.js +1 -0
- package/dist/assets/{base-chart-DT--nPCU.js → base-chart-DWXZOkNE.js} +1 -1
- package/dist/assets/{base32-z3esjJBn.js → base32-Cpvj2sD4.js} +1 -1
- package/dist/assets/bind-account-BIzFrnLk.js +1 -0
- package/dist/assets/{branding-_XszRU-Z.js → branding-BHJqY7Mz.js} +5 -5
- package/dist/assets/branding-D-ShZ8m2.js +1 -0
- package/dist/assets/branding-DAdwbyWZ.js +40 -0
- package/dist/assets/bundle-avatar-sDqev1Fh.js +1 -0
- package/dist/assets/button-B_Qd9K_t.js +1 -0
- package/dist/assets/click-to-copy-RBTqACSW.js +1 -0
- package/dist/assets/cloneDeep-YxES7wNt.js +1 -0
- package/dist/assets/{collapse-D72lnPa9.js → collapse-DWmyzfnW.js} +1 -1
- package/dist/assets/{complete-CEvsz8uU.js → complete-D6XDZtnV.js} +3 -3
- package/dist/assets/component-B2qSKMGx.js +457 -0
- package/dist/assets/{config-6tpm84_l.js → config-Ca5tnO9j.js} +1 -1
- package/dist/assets/config-fYkZxdEr.js +53 -0
- package/dist/assets/config-navigation-BEYJ5bSz.js +34 -0
- package/dist/assets/{config-CwlqBQNt.js → config-oF-A1tKe.js} +2 -2
- package/dist/assets/config-space-HmsYCb6s.js +1 -0
- package/dist/assets/confirm-DQYDHHdS.js +7 -0
- package/dist/assets/connect-BeWeBwCA.js +5 -0
- package/dist/assets/connect-COLwEMSx.js +5 -0
- package/dist/assets/{connect-BV6BUhDJ.css → connect-D0pbMu9_.css} +1 -1
- package/dist/assets/connect-to-C3ac4B-g.js +1 -0
- package/dist/assets/connect-ydb7rKXe.js +1 -0
- package/dist/assets/{content-layout-Dtfb5X6M.js → content-layout-CanSZTqf.js} +1 -1
- package/dist/assets/{create-passport-svg-DeDfPZeD.js → create-passport-svg-De1vqcmo.js} +1 -1
- package/dist/assets/{createClass-07c4wbGU.js → createClass-CRUn7w67.js} +1 -1
- package/dist/assets/dashboard-BZiea8Z_.js +93 -0
- package/dist/assets/{delete-confirm-DiU5PO2T.js → delete-confirm-CpaOkuin.js} +1 -1
- package/dist/assets/did-address-DRYM96gB.js +1 -0
- package/dist/assets/domain-D9Kc4Rgt.js +9 -0
- package/dist/assets/domain-action-card-ugKl692S.js +28 -0
- package/dist/assets/domains-B9b2gmbn.js +1 -0
- package/dist/assets/{edit.svg-CTE5eATX.js → edit.svg-BGhTyO6h.js} +1 -1
- package/dist/assets/{email-DXdzQLls.js → email-DDyG3qPR.js} +2 -2
- package/dist/assets/{empty-spinner-BClWI15N.js → empty-spinner-ChYvCNCV.js} +1 -1
- package/dist/assets/engine-L1SEogaX.js +1 -0
- package/dist/assets/exchange-passport-DoiXZo5M.js +1 -0
- package/dist/assets/fallback-CZRO9TTQ.js +1 -0
- package/dist/assets/{form-DhecYoSJ.js → form--iZWaH7Y.js} +3 -3
- package/dist/assets/form-text-input-Cs-LuCu0.js +11 -0
- package/dist/assets/{form-wrapper-pwkkz4we.js → form-wrapper-EixE0Jkw.js} +1 -1
- package/dist/assets/fuel-C85y6XSK.js +32 -0
- package/dist/assets/gen-access-key-DxF-VBeV.js +1 -0
- package/dist/assets/gen-simple-access-key-Cxq1_uy6.js +1 -0
- package/dist/assets/get-safe-url-D4zRnTpF.js +1 -0
- package/dist/assets/home-EzPPxjBW.js +1 -0
- package/dist/assets/{iframe-CqiUrjUO.js → iframe-C5nvJ0m0.js} +1 -1
- package/dist/assets/index-2AyCotIy.js +1 -0
- package/dist/assets/index-B2PeJoug.js +81 -0
- package/dist/assets/index-B3ArnS-X.js +6 -0
- package/dist/assets/index-B3fG443w.js +1 -0
- package/dist/assets/index-BM9QepzF.js +269 -0
- package/dist/assets/index-BQFgfBFX.js +88 -0
- package/dist/assets/index-Ba_SJ3UV.js +7 -0
- package/dist/assets/index-BbO4pSmm.js +1 -0
- package/dist/assets/{index-POuATgdm.js → index-BoJbHOhC.js} +1 -1
- package/dist/assets/index-BuucS_rQ.js +11 -0
- package/dist/assets/index-Bwibx9MU.js +1 -0
- package/dist/assets/{index-DlifV2p1.js → index-C9V4aWeM.js} +6 -6
- package/dist/assets/{index-uexcv8C-.js → index-CL5ZGYlc.js} +7 -7
- package/dist/assets/index-Ca33rdd_.js +832 -0
- package/dist/assets/index-Ca5zgzpl.js +1 -0
- package/dist/assets/{index-D-O_eFad.js → index-CbZQvtgh.js} +1 -1
- package/dist/assets/index-CiCryHDZ.js +50 -0
- package/dist/assets/{index-D88DUiSg.js → index-Cw8Yly1u.js} +3 -3
- package/dist/assets/{index-BSZ3mQac.js → index-CxOxF1pg.js} +1 -1
- package/dist/assets/index-D1Fa760B.js +40 -0
- package/dist/assets/index-D29L5UKE.js +2 -0
- package/dist/assets/{index-gohmHhDq.js → index-D3fA5iF-.js} +7 -7
- package/dist/assets/index-D4_8N2le.js +4 -0
- package/dist/assets/index-DCxNOCc2.js +50 -0
- package/dist/assets/{index-DUnMyyWn.js → index-DGU5RA0-.js} +16 -16
- package/dist/assets/index-DVOweIMx.js +124 -0
- package/dist/assets/index-D_ymA2Th.js +120 -0
- package/dist/assets/index-Ddl9fWMP.js +1 -0
- package/dist/assets/index-DvQIPWQ6.js +53 -0
- package/dist/assets/index-Dxb3MonW.js +6 -0
- package/dist/assets/index-VlFqUdI2.js +57 -0
- package/dist/assets/index-_3Fxot8G.css +1 -0
- package/dist/assets/index-_bvucGkF.js +16 -0
- package/dist/assets/index-_uJPC7_n.js +102 -0
- package/dist/assets/index-ed1TwQco.css +1 -0
- package/dist/assets/{index-_tncRnTu.js → index-jIvFgWDS.js} +1 -1
- package/dist/assets/index-p0MfrvgW.js +161 -0
- package/dist/assets/{index-m1ZQT0sU.js → index-qpadg6GT.js} +1 -1
- package/dist/assets/{index-Cdaohlhu.js → index-r7svI4rK.js} +7 -7
- package/dist/assets/index-sb6EjUcD.js +1 -0
- package/dist/assets/{index-BnOC3Ium.js → index-zkaWHEAS.js} +1 -1
- package/dist/assets/index.esm-C4tuRtuv.js +1 -0
- package/dist/assets/info-outline-rounded-DVdLJtdi.js +1 -0
- package/dist/assets/{invitation-DSs7YT3_.js → invitation-CUluW5mi.js} +6 -6
- package/dist/assets/invitations-gJ3uAWGN.js +3 -0
- package/dist/assets/invite-zC3nU84H.js +1 -0
- package/dist/assets/isEmail-BwGDo3Ws.js +1 -0
- package/dist/assets/isIP-BBY240SU.js +1 -0
- package/dist/assets/isURL-CpQHQuaa.js +2 -0
- package/dist/assets/issue-passport-B_pYDft0.js +1 -0
- package/dist/assets/item-DoUn7xhc.js +1 -0
- package/dist/assets/joi-browser.min-CUdv8seQ.js +1 -0
- package/dist/assets/joi-browser.min-eEVeW7LC.js +1 -0
- package/dist/assets/landing-page-BJAji-kI.js +1 -0
- package/dist/assets/{launch-result-message-C04PaKk0.js → launch-result-message-B2nhmkKt.js} +1 -1
- package/dist/assets/layout-CydCBGqn.js +29 -0
- package/dist/assets/{lexend-latin-400-normal-3dY8zrhQ.woff → lexend-latin-400-normal-CHypAkT3.woff} +0 -0
- package/dist/assets/lexend-latin-400-normal-CwRJVcUA.woff2 +0 -0
- package/dist/assets/{lexend-latin-600-normal-DGqCKODV.woff → lexend-latin-600-normal-DSBzZxpA.woff} +0 -0
- package/dist/assets/lexend-latin-600-normal-DdvlkEkX.woff2 +0 -0
- package/dist/assets/lexend-latin-ext-400-normal-D38JI5AK.woff2 +0 -0
- package/dist/assets/{lexend-latin-ext-400-normal-DdRy0ZnY.woff → lexend-latin-ext-400-normal-D9P7pMo-.woff} +0 -0
- package/dist/assets/{lexend-latin-ext-600-normal-DBcy3Oce.woff → lexend-latin-ext-600-normal-BXtyp5LP.woff} +0 -0
- package/dist/assets/lexend-latin-ext-600-normal-hDcqLAH9.woff2 +0 -0
- package/dist/assets/list-BIwaCPhs.js +103 -0
- package/dist/assets/list-CO8Xp7iX.js +2 -0
- package/dist/assets/{list-header-wJF4c6BN.js → list-header-DQZTNnUc.js} +1 -1
- package/dist/assets/localization-BYdi6ljV.js +1 -0
- package/dist/assets/{lock.svg-CiT4rEpi.js → lock.svg-BOhdQlHW.js} +1 -1
- package/dist/assets/log-JZXyzrRA.js +459 -0
- package/dist/assets/logger-BMHd-C1S.js +1 -0
- package/dist/assets/login-CU5Tw5QB.js +1 -0
- package/dist/assets/login-method-item-KhJ672kA.js +1 -0
- package/dist/assets/login-oauth-callback-Bz7N73Sg.js +1 -0
- package/dist/assets/{logo-uploader-D5E5QaRF.js → logo-uploader-DjKJkvts.js} +2 -2
- package/dist/assets/{lost-passport-CUtEI06a.js → lost-passport-CyJVtH1V.js} +3 -3
- package/dist/assets/lottie-react.esm-DRhh9vvb.js +256 -0
- package/dist/assets/lottie-web-DPAbO4kJ.js +2 -0
- package/dist/assets/metadata-CkzdOpl3.js +55 -0
- package/dist/assets/nav-menu-5M0Q4jYU.js +1 -0
- package/dist/assets/omit-Dq0FLBY8.js +1 -0
- package/dist/assets/open-window-DphH3aTv.js +1 -0
- package/dist/assets/over-due-invoice-payment-DD_j5vb4.js +1 -0
- package/dist/assets/overview-CGIG2I_w.js +116 -0
- package/dist/assets/{page-header-BZv-tfgN.js → page-header-B0HpJClf.js} +1 -1
- package/dist/assets/passkey-rounded-_WDHIZVd.js +1 -0
- package/dist/assets/passport-DKYg_d4G.js +1 -0
- package/dist/assets/{passport-item-D53yZ-cF.js → passport-item-CjcqN_g-.js} +1 -1
- package/dist/assets/{permission-DC8i_y8F.js → permission-DhyiLNfC.js} +1 -1
- package/dist/assets/preferences-DHjRWgwZ.js +1 -0
- package/dist/assets/profile-embed-Gc79_Dhj.js +1 -0
- package/dist/assets/provider-icon-DX-QfJQN.js +1 -0
- package/dist/assets/publish-resource-vCC9AfJK.js +1 -0
- package/dist/assets/purify.es-HRjpPm7y.js +2 -0
- package/dist/assets/{question-mark-circle.svg-GhTaklFN.js → question-mark-circle.svg-B0bcUgC5.js} +1 -1
- package/dist/assets/{raf-schd.esm-XXBRsnmf.js → raf-schd.esm-BZ-2sjAE.js} +1 -1
- package/dist/assets/react-beautiful-dnd.esm-bkXlrjYw.js +54 -0
- package/dist/assets/{react-stripe.esm-5Snjx_mn.js → react-stripe.esm-BBCEegrE.js} +2 -2
- package/dist/assets/{required-DHjZE3-Y.js → required-11pmtzQr.js} +2 -2
- package/dist/assets/{revoke.svg-DUoaRyPZ.js → revoke.svg-BF_gJc34.js} +1 -1
- package/dist/assets/runtime-BjKYEBG_.js +1 -0
- package/dist/assets/sanitize-Bzl4lTuH.js +2 -0
- package/dist/assets/sdk-CXEy5Pgp.js +1 -0
- package/dist/assets/{section-CenHBXqj.js → section-ewv0pNWr.js} +1 -1
- package/dist/assets/{security-BMslI5IZ.js → security-Xrnc8Gqe.js} +4 -4
- package/dist/assets/{server-logo-notext.svg-BLAdvsmP.js → server-logo-notext.svg-CtPRYaCm.js} +1 -1
- package/dist/assets/session-lE2gmzzF.js +1 -0
- package/dist/assets/setup-p5LUFpYK.js +24 -0
- package/dist/assets/{shorten-label-DXFyDHDr.js → shorten-label-1iJcvGQT.js} +1 -1
- package/dist/assets/{simple-select-DtCsUIHR.js → simple-select-BKXEgxog.js} +1 -1
- package/dist/assets/{spaces-D3H6AchN.js → spaces-Ckljlc4d.js} +1 -1
- package/dist/assets/start-BE-C9MhV.js +187 -0
- package/dist/assets/{starting-progress-Y3UjFmoX.js → starting-progress-DC-J-5Os.js} +2 -2
- package/dist/assets/status-DR5t3VVx.js +1 -0
- package/dist/assets/{step-actions-BNFJWVZI.js → step-actions-CArEuzNw.js} +2 -2
- package/dist/assets/studio-BEzAGvQT.js +6 -0
- package/dist/assets/{switch-C49IloVU.js → switch-CmVFEdik.js} +1 -1
- package/dist/assets/switch-control-DbLHF-NB.js +18 -0
- package/dist/assets/{table-tips-DMrnJF8e.js → table-tips-DQIh1EQR.js} +1 -1
- package/dist/assets/team-7-48iuwj.js +146 -0
- package/dist/assets/theme-mode-toggle-BltDSXhy.js +1 -0
- package/dist/assets/traffic-Dwd2RNqG.js +1 -0
- package/dist/assets/transfer-BwnSX6wY.js +16 -0
- package/dist/assets/ua-parser-D6QF1h5N.js +1 -0
- package/dist/assets/unsubscribe-CP0mTwWi.js +1 -0
- package/dist/assets/{use-app-logo-hIHAHSSI.js → use-app-logo-BzsLZwwK.js} +1 -1
- package/dist/assets/use-blocklet-logo-BWPJOOVd.js +1 -0
- package/dist/assets/{use-mobile-Bz2ML4Gk.js → use-mobile-BSL5RsRd.js} +1 -1
- package/dist/assets/use-mobile-DgmmfWdl.js +1 -0
- package/dist/assets/{use-mobile-_vjPRYx2.js → use-mobile-TAIHvgoJ.js} +1 -1
- package/dist/assets/{use-server-logo-Da86xnyt.js → use-server-logo-BLcfNvrR.js} +1 -1
- package/dist/assets/use-window-close-D2_118dJ.js +1 -0
- package/dist/assets/useAsync-CkKfnulP.js +1 -0
- package/dist/assets/{useAsync-D6IP8T2e.js → useAsync-DfiOQMQ_.js} +1 -1
- package/dist/assets/{useAsyncRetry-B_bXUXWM.js → useAsyncRetry-B-Txlvk6.js} +1 -1
- package/dist/assets/{useLocalStorage-Brr2PSz9.js → useLocalStorage-D6axLnAi.js} +1 -1
- package/dist/assets/{useSetState-L-f8mSga.js → useSetState-CUbypYGT.js} +1 -1
- package/dist/assets/user-center-DBscV1le.js +72 -0
- package/dist/assets/{user-follower-DVX8m-Zk.js → user-follower-Di51icra.js} +1 -1
- package/dist/assets/{util-GXkeqbBQ.js → util-DCHBQZpP.js} +1 -1
- package/dist/assets/util-ad0rjUA1.js +1 -0
- package/dist/assets/{vendor-arcblock-BCP2x3BR.js → vendor-arcblock-ivFYo5vP.js} +9 -9
- package/dist/assets/vendor-hooks-DAZ1H6Va.js +1 -0
- package/dist/assets/vendor-mui-core-D7t4vMS5.js +227 -0
- package/dist/assets/vendor-mui-x-BpPw6UfF.js +14 -0
- package/dist/assets/vendor-react-DX7tU9aY.js +2 -0
- package/dist/assets/vendor-utils-BzQg432x.js +23 -0
- package/dist/assets/vendor-ux-Dl3wVbv_.js +1003 -0
- package/dist/assets/{wait-connect-CLe9IfYi.js → wait-connect-DOIonmAv.js} +1 -1
- package/dist/assets/wallet-hidden-topbar-DKISAPb3.js +68 -0
- package/dist/assets/wizard-CrkxQgBY.js +8 -0
- package/dist/assets/{wizard-components-C10frai0.js → wizard-components-BzPyRFRt.js} +2 -2
- package/dist/assets/wrap-locale-BJF_SaOe.js +1 -0
- package/dist/assets/zh-DQQBhbva.js +1 -0
- package/dist/index.html +1 -1
- package/package.json +47 -47
- package/dist/assets/AdapterDayjs-C1bdndja.js +0 -3
- package/dist/assets/Google-BI3aC5vK.js +0 -27
- package/dist/assets/access-control-BL-PuDiR.js +0 -14
- package/dist/assets/actions-m1acuA78.js +0 -1
- package/dist/assets/add-component-core-BzMN094F.js +0 -768
- package/dist/assets/add-component-core-G0iZE90Q.css +0 -1
- package/dist/assets/add-resource-BRF-rYME.js +0 -1
- package/dist/assets/addon-yDIBSjIk.js +0 -14
- package/dist/assets/advanced-DEE0XFtQ.js +0 -14
- package/dist/assets/aigne-9evgyH7b.js +0 -10
- package/dist/assets/api-B24x7kOD.js +0 -1
- package/dist/assets/appearance-C8B414U2.js +0 -1
- package/dist/assets/audit-logs-qNutRhHx.js +0 -35
- package/dist/assets/authorize-CZSHuYdu.js +0 -1
- package/dist/assets/bind-account-QxLU_sxt.js +0 -1
- package/dist/assets/branding-Bk26INk9.js +0 -40
- package/dist/assets/branding-tR0gcoY_.js +0 -1
- package/dist/assets/bundle-avatar-2AQWR0ld.js +0 -1
- package/dist/assets/button-LwkniwV9.js +0 -1
- package/dist/assets/click-to-copy-Dk6ZAJOw.js +0 -1
- package/dist/assets/cloneDeep-rgNCMFod.js +0 -1
- package/dist/assets/component-BrZ1DWiw.js +0 -573
- package/dist/assets/config-cdtQwn5t.js +0 -53
- package/dist/assets/config-navigation-CZ9V7otK.js +0 -40
- package/dist/assets/config-space-CZRqkXsR.js +0 -1
- package/dist/assets/confirm-Ch-CAgUO.js +0 -7
- package/dist/assets/connect-BNkv99fz.js +0 -5
- package/dist/assets/connect-CadBIZOq.js +0 -5
- package/dist/assets/connect-i7rkK26L.js +0 -1
- package/dist/assets/connect-to-lX3lujSp.js +0 -1
- package/dist/assets/dashboard-CmJOnF0g.js +0 -103
- package/dist/assets/did-address-Cq16cwTy.js +0 -1
- package/dist/assets/domain-DHqSA0zl.js +0 -9
- package/dist/assets/domain-action-card-BsNaII7k.js +0 -28
- package/dist/assets/domains-BQ_Of9Oo.js +0 -1
- package/dist/assets/engine-D18zeIE7.js +0 -1
- package/dist/assets/exchange-passport-NOgYhNpm.js +0 -1
- package/dist/assets/form-text-input-BsCymY_c.js +0 -11
- package/dist/assets/fuel-DgzL5KSX.js +0 -32
- package/dist/assets/gen-access-key-BxnyhhCR.js +0 -1
- package/dist/assets/gen-simple-access-key-BJI-4yOF.js +0 -1
- package/dist/assets/get-safe-url-BVTaUfvO.js +0 -1
- package/dist/assets/home-Bibhtg_U.js +0 -1
- package/dist/assets/index-0ZSFNH-D.js +0 -1
- package/dist/assets/index-B5LvOF-F.css +0 -9
- package/dist/assets/index-BB8sYq-N.js +0 -16
- package/dist/assets/index-BhpNA6ar.js +0 -102
- package/dist/assets/index-BszSKE9L.js +0 -1
- package/dist/assets/index-CHkWO9t3.js +0 -120
- package/dist/assets/index-CaQuyP_U.js +0 -74
- package/dist/assets/index-CdsI3g5U.js +0 -1
- package/dist/assets/index-CsYL8tps.js +0 -1
- package/dist/assets/index-D8NN8LDz.js +0 -62
- package/dist/assets/index-DI4CWTXR.js +0 -1039
- package/dist/assets/index-DRYJ0xIl.js +0 -7
- package/dist/assets/index-D_ckidZn.js +0 -7
- package/dist/assets/index-DzdHYw6g.js +0 -4
- package/dist/assets/index-Ge2WhAk1.js +0 -124
- package/dist/assets/index-KUC3HPt0.js +0 -1
- package/dist/assets/index-TBM4hzrY.js +0 -81
- package/dist/assets/index-WjASWJcO.js +0 -93
- package/dist/assets/index-fC-FqmP3.js +0 -176
- package/dist/assets/index-gnjjKJuC.css +0 -1
- package/dist/assets/index-hBDzzv6I.js +0 -6
- package/dist/assets/index-iX-pnOjy.js +0 -1
- package/dist/assets/index-jILCQaR3.js +0 -11
- package/dist/assets/index-m_xRKGyG.js +0 -281
- package/dist/assets/index-mt_AKU_F.js +0 -77
- package/dist/assets/index-oucqu2vy.js +0 -41
- package/dist/assets/index-u9tqiWy4.js +0 -6
- package/dist/assets/index.esm-Co8ZxFyk.js +0 -1
- package/dist/assets/info-outline-rounded-BLwoUxyI.js +0 -1
- package/dist/assets/invitations-DK7oD-E6.js +0 -3
- package/dist/assets/invite-CdWfDz--.js +0 -1
- package/dist/assets/isURL-DMMDDAKA.js +0 -2
- package/dist/assets/issue-passport-yIqheTA0.js +0 -1
- package/dist/assets/item-BV3WfK17.js +0 -1
- package/dist/assets/landing-page-BDAr8Hmo.js +0 -1
- package/dist/assets/layout-DzZv-Jny.js +0 -29
- package/dist/assets/lexend-latin-400-normal-LvJAK7uG.woff2 +0 -0
- package/dist/assets/lexend-latin-600-normal-VdgXozci.woff2 +0 -0
- package/dist/assets/lexend-latin-ext-400-normal-BlThJp1_.woff2 +0 -0
- package/dist/assets/lexend-latin-ext-600-normal-rzWO8Q-F.woff2 +0 -0
- package/dist/assets/list-B6eMSw29.js +0 -2
- package/dist/assets/list-BWd3aUjb.js +0 -103
- package/dist/assets/localization-oLJXrcTA.js +0 -1
- package/dist/assets/log-BskdQbRf.js +0 -459
- package/dist/assets/logger-DhW79f4a.js +0 -1
- package/dist/assets/login-CfL0Uf6Y.js +0 -1
- package/dist/assets/login-oauth-callback-_6XAZMOE.js +0 -1
- package/dist/assets/lottie-react.esm-E4oo1jhL.js +0 -269
- package/dist/assets/lottie-web-4koyQiv_.js +0 -9
- package/dist/assets/omit-BeaKJrg9.js +0 -1
- package/dist/assets/open-window-Bi6zVDJd.js +0 -1
- package/dist/assets/over-due-invoice-payment-B7FQEnNH.js +0 -1
- package/dist/assets/overview-C7QghcRT.js +0 -116
- package/dist/assets/passport-B_eTMTmZ.js +0 -1
- package/dist/assets/preferences-DzDUGj-O.js +0 -1
- package/dist/assets/profile-embed-B3QUDkbU.js +0 -1
- package/dist/assets/provider-icon-D15U0Izg.js +0 -1
- package/dist/assets/publish-resource-DCIlLUPS.js +0 -1
- package/dist/assets/react-beautiful-dnd.esm-BwIgGfYj.js +0 -61
- package/dist/assets/runtime-BHekBabT.js +0 -1
- package/dist/assets/sanitize-yX1j-ggS.js +0 -2
- package/dist/assets/sdk-CJUhxOGJ.js +0 -1
- package/dist/assets/session-CZpDtsCZ.js +0 -1
- package/dist/assets/setup-CCvGdFDO.js +0 -24
- package/dist/assets/start-SeWUP0mo.js +0 -187
- package/dist/assets/status-MSXp_buG.js +0 -1
- package/dist/assets/studio-CRjDRBty.js +0 -6
- package/dist/assets/switch-control-npfWE_aC.js +0 -18
- package/dist/assets/team-YWd-FRKh.js +0 -146
- package/dist/assets/traffic-0IuWlrAD.js +0 -1
- package/dist/assets/transfer-DRS2VUAN.js +0 -16
- package/dist/assets/ua-parser-DP5omx3I.js +0 -1
- package/dist/assets/unsubscribe-xDow2Z6m.js +0 -1
- package/dist/assets/use-window-close-DUJmRIjM.js +0 -1
- package/dist/assets/useAsync-D0xh4Var.js +0 -1
- package/dist/assets/user-center-COnqQuqE.js +0 -125
- package/dist/assets/util-Dee1Ybp3.js +0 -1
- package/dist/assets/vendor-hooks-DQAdyHrE.js +0 -7
- package/dist/assets/vendor-mui-core-CKKG_1TN.js +0 -250
- package/dist/assets/vendor-mui-x-DHGvg6Bj.js +0 -31
- package/dist/assets/vendor-react-CTtPmzVP.js +0 -37
- package/dist/assets/vendor-utils-CUs2ebe7.js +0 -213
- package/dist/assets/vendor-ux-DjXlxcvL.js +0 -1560
- package/dist/assets/wizard-8Tk0iyxY.js +0 -8
- package/dist/assets/wrap-locale-CxYp8fAf.js +0 -1
- package/dist/assets/zh-BRjrClew.js +0 -1
|
@@ -0,0 +1,645 @@
|
|
|
1
|
+
import{X as _,j as l,a7 as Le,aT as pe,al as F,G as He,T as Y,L as tt,bK as zr,a6 as Kr,I as $o,cx as Fo,U as Wo,ct as _a,b$ as Ra,aN as qo,F as La,A as xn,bh as Da,bi as Na,bj as Ma,c1 as Aa,b4 as Uo,W as Ba,aM as $a,cO as Fa,cP as Wa,cp as qa,cF as Ua,M as Vr,an as zo,ar as za,b3 as ye,bX as Ka,bZ as Va,a9 as Ko,ae as Vo,aW as Ha,ak as Ho,R as Wt,Z as Ga,c6 as Go,p as Xo,aV as Xa,as as Ze,cQ as Ya,cR as Qa,a_ as li,V as ci,ai as Ja,b_ as Za,Q as el,N as tl,P as nl,aj as rl,ao as Yo,C as ui,aG as il,cS as ol}from"./vendor-mui-core-D7t4vMS5.js";import{r as O,g as Qo,j as sl,u as al,e as ll,a as Ae,m as cl}from"./vendor-react-DX7tU9aY.js";import{S as ul,s as Jo,A as dl}from"./item-DoUn7xhc.js";import{b4 as ke,aO as Hr,Z as Zo,W as Ce,Y as je,bO as hl,ar as fl,Q as wn,bP as di,l as ut,a1 as es,U as hn,bc as ts,af as pl,aP as ml,v as yr,bQ as gl}from"./vendor-ux-Dl3wVbv_.js";import{W as wt,o as Ve,c as yl,b2 as vl,aA as bl,aD as xl,b3 as wl,b4 as ns,b5 as Sl,b6 as kl,z as jl,X as Tl,w as rs,b7 as Cl,b8 as El,aj as Ol,b9 as Pl,V as Sn,ba as is,aY as os,aL as hi,bb as Il,aS as _l,bc as Rl,G as et,bd as Ll,be as Qt,bf as fi,bg as Dl}from"./index-Ca33rdd_.js";import{j as pi,o as Nl,T as Ml,L as Al,P as Bl}from"./vendor-arcblock-ivFYo5vP.js";import{u as mi}from"./launch-result-message-B2nhmkKt.js";import{a as vr}from"./page-header-B0HpJClf.js";import{e as Se,B as $l,z as lt,F as kn,D as gi,a4 as ss,g as Jt,$ as Fl,aa as Wl,x as ql,o as Nn,ab as Ul,ak as zl,al as Kl,am as Vl,a as Rt,an as Hl,b as Gl}from"./vendor-utils-BzQg432x.js";import{f as br}from"./index-DBs9Ljax.js";import{e as Xl}from"./engine-L1SEogaX.js";import{u as Yl,C as Ql}from"./config-space-HmsYCb6s.js";import{R as Zt}from"./required-11pmtzQr.js";import{S as Jl}from"./index-BuucS_rQ.js";import{s as as,h as Zl,w as ec,f as tc,a as nc,b as rc,M as ic}from"./index-DvQIPWQ6.js";import{r as qt,a as oc,b as sc,u as ls,i as ac,v as lc}from"./vendor-hooks-DAZ1H6Va.js";import{g as cc}from"./get-safe-url-D4zRnTpF.js";import{r as cs,A as uc}from"./config-fYkZxdEr.js";import{r as Gr}from"./joi-browser.min-CUdv8seQ.js";import{r as jn}from"./index-sb6EjUcD.js";import{r as dc}from"./index-jIvFgWDS.js";import{r as hc}from"./cloneDeep-YxES7wNt.js";import{u as Xr}from"./useLocalStorage-D6axLnAi.js";import{v as yi}from"./index-CxOxF1pg.js";import{u as fc}from"./session-lE2gmzzF.js";import{W as pc}from"./did-address-DRYM96gB.js";import{R as mc}from"./login-method-item-KhJ672kA.js";import{d as gc}from"./passkey-rounded-_WDHIZVd.js";import{a as vi}from"./api-B8JXuhVp.js";import{v as yc,e as vc}from"./util-ad0rjUA1.js";import{u as us}from"./use-mobile-BSL5RsRd.js";import{C as bc}from"./content-layout-CanSZTqf.js";import{C as xc,D as wc,a as Sc}from"./connect-to-C3ac4B-g.js";import{k as Tn}from"./fallback-CZRO9TTQ.js";import{d as Mn}from"./search-4YYphs0l.js";const $p="blocklet-add-component-registry",Fp="server-add-registry",Wp=e=>`resource-${e}-add-registry`;function ds(e){const{info:t}=wt();return O.useMemo(()=>!e||!e.docker?.image||e.docker?.image&&e.docker?.runBaseScript?!0:window.blocklet?window.blocklet.enableDocker&&window.blocklet.enableDockerNetwork:t.enableDocker&&t.enableDockerNetwork,[e,t])}function hs({disabled:e=!1,children:t,onConfirm:n}){return O.useEffect(()=>{if(e)return()=>{};const r=s=>{s.code==="Enter"&&(s.metaKey===!0||s.ctrlKey===!0)&&(s.preventDefault(),s.stopPropagation(),n())};return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[e,n]),t}hs.propTypes={disabled:_.bool,children:_.any.isRequired,onConfirm:_.func.isRequired};function fs({onContinue:e,nextDisabled:t=!1,launching:n=!1,texts:r={listenName:"",launchingText:"",buttonNext:""},description:s=""}){const[i,o]=O.useState(!1);return l.jsxs(l.Fragment,{children:[l.jsx(kc,{children:l.jsxs(hs,{disabled:t,onConfirm:e,children:[l.jsx("div",{className:"eula-trigger",onClick:()=>o(a=>!a),children:r.listenName}),l.jsx(ke,{disabled:t,color:"primary",variant:"contained",className:"next-button",onClick:e,children:n?l.jsxs(l.Fragment,{children:[l.jsx(Le,{size:14}),r.launchingText]}):r.buttonNext})]})}),l.jsx(Hr,{open:i,title:r.listenName,onClose:()=>o(!1),children:s})]})}fs.propTypes={onContinue:_.func.isRequired,nextDisabled:_.bool,launching:_.bool,description:_.any,texts:_.object};const kc=pe.div`
|
|
2
|
+
margin: 0 auto;
|
|
3
|
+
display: flex;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
align-items: center;
|
|
6
|
+
|
|
7
|
+
@media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.eula-trigger {
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
text-decoration: underline;
|
|
14
|
+
${e=>e.theme.breakpoints.up("md")} {
|
|
15
|
+
padding-right: 24px;
|
|
16
|
+
}
|
|
17
|
+
${e=>e.theme.breakpoints.down("md")} {
|
|
18
|
+
padding: 16px;
|
|
19
|
+
}
|
|
20
|
+
font-size: 14px;
|
|
21
|
+
white-space: nowrap;
|
|
22
|
+
&:hover {
|
|
23
|
+
color: ${e=>e.theme.palette.primary.main};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.next-button {
|
|
28
|
+
min-width: 200px;
|
|
29
|
+
}
|
|
30
|
+
`,jc={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var en={exports:{}},An,bi;function Tc(){if(bi)return An;bi=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,a=/^\s+|\s+$/g,u=`
|
|
31
|
+
`,d="/",h="*",f="",y="comment",g="declaration";An=function(m,x){if(typeof m!="string")throw new TypeError("First argument must be a string");if(!m)return[];x=x||{};var c=1,w=1;function S(D){var j=D.match(t);j&&(c+=j.length);var N=D.lastIndexOf(u);w=~N?D.length-N:w+D.length}function b(){var D={line:c,column:w};return function(j){return j.position=new p(D),A(),j}}function p(D){this.start=D,this.end={line:c,column:w},this.source=x.source}p.prototype.content=m;function k(D){var j=new Error(x.source+":"+c+":"+w+": "+D);if(j.reason=D,j.filename=x.source,j.line=c,j.column=w,j.source=m,!x.silent)throw j}function E(D){var j=D.exec(m);if(j){var N=j[0];return S(N),m=m.slice(N.length),j}}function A(){E(n)}function B(D){var j;for(D=D||[];j=L();)j!==!1&&D.push(j);return D}function L(){var D=b();if(!(d!=m.charAt(0)||h!=m.charAt(1))){for(var j=2;f!=m.charAt(j)&&(h!=m.charAt(j)||d!=m.charAt(j+1));)++j;if(j+=2,f===m.charAt(j-1))return k("End of comment missing");var N=m.slice(2,j-2);return w+=2,S(N),m=m.slice(j),w+=2,D({type:y,comment:N})}}function P(){var D=b(),j=E(r);if(j){if(L(),!E(s))return k("property missing ':'");var N=E(i),T=D({type:g,property:v(j[0].replace(e,f)),value:N?v(N[0].replace(e,f)):f});return E(o),T}}function I(){var D=[];B(D);for(var j;j=P();)j!==!1&&(D.push(j),B(D));return D}return A(),I()};function v(m){return m?m.replace(a,f):f}return An}var xi;function Cc(){if(xi)return en.exports;xi=1;var e=Tc();function t(n,r){var s=null;if(!n||typeof n!="string")return s;for(var i,o=e(n),a=typeof r=="function",u,d,h=0,f=o.length;h<f;h++)i=o[h],u=i.property,d=i.value,a?r(u,d,i):d&&(s||(s={}),s[u]=d);return s}return en.exports=t,en.exports.default=t,en.exports}var Ec=Cc();const Oc=Qo(Ec),Pc={}.hasOwnProperty;function Ic(e,t,n){if(typeof e!="function")throw new TypeError("h is not a function");const r=Rc(e),s=Nc(e),i=Dc(e);let o,a;if(typeof n=="string"||typeof n=="boolean"?(o=n,n={}):(n||(n={}),o=n.prefix),t&&t.type==="root"){const u=t.children[0];a=t.children.length===1&&u.type==="element"?u:{type:"element",tagName:"div",properties:{},children:t.children}}else if(t&&t.type==="element")a=t;else throw new Error("Expected root or element, not `"+(t&&t.type||t)+"`");return ps(e,a,{schema:n.space==="svg"?as:Zl,prefix:o==null?r||s||i?"h-":void 0:typeof o=="string"?o:o?"h-":void 0,key:0,react:r,vue:s,vdom:i,hyperscript:Lc(e)})}function ps(e,t,n){const r=n.schema;let s=r,i=t.tagName;const o={},a=[];let u=-1,d;r.space==="html"&&i.toLowerCase()==="svg"&&(s=as,n.schema=s);for(d in t.properties)t.properties&&Pc.call(t.properties,d)&&_c(o,d,t.properties[d],n,i);if(n.vdom&&(s.space==="html"?i=i.toUpperCase():s.space&&(o.namespace=ec[s.space])),n.prefix&&(n.key++,o.key=n.prefix+n.key),t.children)for(;++u<t.children.length;){const h=t.children[u];h.type==="element"?a.push(ps(e,h,n)):h.type==="text"&&a.push(h.value)}return n.schema=r,a.length>0?e.call(t,i,o,a):e.call(t,i,o)}function _c(e,t,n,r,s){const i=tc(r.schema,t);let o;n==null||typeof n=="number"&&Number.isNaN(n)||n===!1&&(r.vue||r.vdom||r.hyperscript)||!n&&i.boolean&&(r.vue||r.vdom||r.hyperscript)||(Array.isArray(n)&&(n=i.commaSeparated?nc(n):rc(n)),i.boolean&&r.hyperscript&&(n=""),i.property==="style"&&typeof n=="string"&&(r.react||r.vue||r.vdom)&&(n=Mc(n,s)),r.vue?i.property!=="style"&&(o="attrs"):i.mustUseProperty||(r.vdom?i.property!=="style"&&(o="attributes"):r.hyperscript&&(o="attrs")),o?e[o]=Object.assign(e[o]||{},{[i.attribute]:n}):i.space&&r.react?e[jc[i.property]||i.property]=n:e[i.attribute]=n)}function Rc(e){const t=e("div",{});return!!(t&&("_owner"in t||"_store"in t)&&(t.key===void 0||t.key===null))}function Lc(e){return"context"in e&&"cleanup"in e}function Dc(e){return e("div",{}).type==="VirtualNode"}function Nc(e){const t=e("div",{});return!!(t&&t.context&&t.context._isVue)}function Mc(e,t){const n={};try{Oc(e,(r,s)=>{r.slice(0,4)==="-ms-"&&(r="ms-"+r.slice(4)),n[r.replace(/-([a-z])/g,(i,o)=>o.toUpperCase())]=s})}catch(r){const s=r;throw s.message=t+"[style]"+s.message.slice(9),s}return n}var Bn,wi;function Ac(){if(wi)return Bn;wi=1,Bn=e;function e(o){if(typeof o=="string")return s(o);if(o==null)return i;if(typeof o=="object")return("length"in o?r:n)(o);if(typeof o=="function")return o;throw new Error("Expected function, string, or object as test")}function t(o){for(var a=[],u=o.length,d=-1;++d<u;)a[d]=e(o[d]);return a}function n(o){return a;function a(u){var d;for(d in o)if(u[d]!==o[d])return!1;return!0}}function r(o){var a=t(o),u=a.length;return d;function d(){for(var h=-1;++h<u;)if(a[h].apply(this,arguments))return!0;return!1}}function s(o){return a;function a(u){return!!(u&&u.type===o)}}function i(){return!0}return Bn}var $n,Si;function Bc(){if(Si)return $n;Si=1,$n=s;var e=Ac(),t=!0,n="skip",r=!1;s.CONTINUE=t,s.SKIP=n,s.EXIT=r;function s(o,a,u,d){var h;typeof a=="function"&&typeof u!="function"&&(d=u,u=a,a=null),h=e(a),f(o,null,[]);function f(g,v,m){var x=[],c;return(!a||h(g,v,m[m.length-1]||null))&&(x=i(u(g,m)),x[0]===r)?x:g.children&&x[0]!==n?(c=i(y(g.children,m.concat(g))),c[0]===r?c:x):x}function y(g,v){for(var m=-1,x=d?-1:1,c=(d?g.length:m)+x,w;c>m&&c<g.length;){if(w=f(g[c],c,v),w[0]===r)return w;c=typeof w[1]=="number"?w[1]:c+x}}}function i(o){return o!==null&&typeof o=="object"&&"length"in o?o:typeof o=="number"?[t,o]:[o]}return $n}var Fn,ki;function $c(){if(ki)return Fn;ki=1,Fn=s;var e=Bc(),t=e.CONTINUE,n=e.SKIP,r=e.EXIT;s.CONTINUE=t,s.SKIP=n,s.EXIT=r;function s(i,o,a,u){typeof o=="function"&&typeof a!="function"&&(u=a,a=o,o=null),e(i,o,d,u);function d(h,f){var y=f[f.length-1],g=y?y.children.indexOf(h):null;return a(h,g,y)}}return Fn}var Wn,ji;function Fc(){if(ji)return Wn;ji=1;var e=$c(),t=Object.prototype.hasOwnProperty,n={align:"text-align",valign:"vertical-align",height:"height",width:"width"};Wn=function(o){return e(o,"element",r),o};function r(i){if(!(i.tagName!=="tr"&&i.tagName!=="td"&&i.tagName!=="th")){var o,a;for(o in n)!t.call(n,o)||i.properties[o]===void 0||(a=n[o],s(i,a,i.properties[o]),delete i.properties[o])}}function s(i,o,a){var u=(i.properties.style||"").trim();u&&!/;\s*/.test(u)&&(u+=";"),u&&(u+=" ");var d=u+o+": "+a+";";i.properties.style=d}return Wn}var Wc=Fc();const qc=Qo(Wc);function Uc(e){const t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}const zc={}.hasOwnProperty,Kc=new Set(["table","thead","tbody","tfoot","tr"]);function Vc(e){if(!e||typeof e.createElement!="function")throw new TypeError("createElement is not a function");const t=e.createElement,n=e.fixTableCellAlign!==!1;Object.assign(this,{Compiler:r});function r(i){let o=Ic(s,n?qc(i):i,e.prefix);return i.type==="root"?(o=o&&typeof o=="object"&&"type"in o&&"props"in o&&o.type==="div"&&(i.children.length!==1||i.children[0].type!=="element")?o.props.children:[o],t(e.Fragment||"div",{},o)):o}function s(i,o,a){if(a&&Kc.has(i)&&(a=a.filter(u=>!Uc(u))),e.components&&zc.call(e.components,i)){const u=e.components[i];return e.passNode&&typeof u=="function"&&(o=Object.assign({node:this},o)),t(u,o,a)}return t(i,o,a)}}function ms({children:e}){return l.jsx(Hc,{children:e})}const Ti="source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace !important",Hc=pe(F)`
|
|
32
|
+
.highlight pre,
|
|
33
|
+
pre {
|
|
34
|
+
border-radius: 5px;
|
|
35
|
+
}
|
|
36
|
+
code {
|
|
37
|
+
font-family: ${Ti};
|
|
38
|
+
}
|
|
39
|
+
pre code {
|
|
40
|
+
font-size: 14px;
|
|
41
|
+
font-family: ${Ti};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
h1,
|
|
45
|
+
h2,
|
|
46
|
+
h3,
|
|
47
|
+
h4,
|
|
48
|
+
h5,
|
|
49
|
+
h6 {
|
|
50
|
+
font-weight: 700 !important;
|
|
51
|
+
font-size: 1.2rem !important;
|
|
52
|
+
line-height: 1.5 !important;
|
|
53
|
+
margin-bottom: 16px;
|
|
54
|
+
margin-top: 24px;
|
|
55
|
+
border-bottom: initial !important;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.CodeMirror pre {
|
|
59
|
+
background-color: ${e=>e.theme.palette.grey[50]} !important;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.anchor {
|
|
63
|
+
display: none;
|
|
64
|
+
}
|
|
65
|
+
`;ms.propTypes={children:_.any.isRequired};function gs({infoList:e=[]}){return l.jsx(F,{className:"info-table",sx:{display:"grid",gridTemplateColumns:{xs:"1fr",md:"max-content 1fr"},columnGap:4,rowGap:1.5},children:e.map(t=>l.jsxs(l.Fragment,{children:[l.jsx(F,{component:"span",sx:{fontWeight:"bold",whiteSpace:"nowrap"},children:t.key}),l.jsx(F,{component:"span",sx:{marginTop:{xs:-1,md:0}},children:t.value})]}))})}gs.propTypes={infoList:_.arrayOf(_.shape({key:_.string,value:_.string}))};const Gc=e=>e.payment?(e.payment.price||[]).map(t=>t.value||0).every(t=>t===0):!0,Xc=new Vc({createElement:O.createElement}).Compiler,Ne={zh:{appinfo:{name:"应用名",version:"版本号",author:"开发者",description:"描述",community:"社区地址",documentation:"文档手册",support:"服务支持",overview:"概述",requirements:"节点版本要求"}},en:{appinfo:{name:"Name",version:"Version",author:"Author",description:"Description",community:"Community",documentation:"Documentation",support:"Support",overview:"Overview",requirements:"Server requirements"}}};function ys({blockletMeta:e,locale:t,handleDescEle:n=""}){const{data:r}=e,s=He(),{registryUrl:i,did:o}=r,a=Ve.getDisplayName({meta:r}),u=qt(()=>i&&o?fetch(pi(i,"/api/blocklets",o,"readme")).then(m=>m.json()):null,{refreshDeps:[i,o]}),d=oc(()=>u.data?u.data[t]||u.data.en||u.data[Object.keys(u.data)[0]]:"",[u]),h=r&&r.htmlAst?Xc(r.htmlAst):"",f=Gc(r);let y=Se(r,"owner.fullName");if(y){const m=Se(r,"owner.did");m&&(y=l.jsxs(F,{sx:{display:"flex",alignItems:"center",gap:1},children:[y,l.jsx(Zo,{sx:{lineHeight:"initial","&::before":{content:'"("'},"&::after":{content:'")"'}},did:m,compact:!0,size:14,locale:t})]}))}else y=Se(r,"author.name");const g=[{key:Se(Ne[t],"appinfo.name"),value:Ve.getDisplayName({meta:r})},{key:Se(Ne[t],"appinfo.version"),value:r.version},{key:Se(Ne[t],"appinfo.author"),value:y},{type:"description",key:Se(Ne[t],"appinfo.description"),value:r.description}];r.requirements&&g.push({key:Se(Ne[t],"appinfo.requirements"),value:r.requirements.server}),r.community&&g.push({key:Se(Ne[t],"appinfo.community"),value:l.jsx("a",{href:r.community,target:"_blank",rel:"noreferrer",children:r.community})}),r.documentation&&g.push({key:Se(Ne[t],"appinfo.documentation"),value:l.jsx("a",{href:r.documentation,target:"_blank",rel:"noreferrer",children:r.documentation})}),r.support&&g.push({key:Se(Ne[t],"appinfo.support"),value:l.jsx("a",{href:`mailto:${r.support}`,target:"_blank",rel:"noreferrer",children:r.support})}),h&&g.push({key:Se(Ne[t],"appinfo.overview"),value:""});let v;return t==="zh"?v=l.jsxs(l.Fragment,{children:[f?l.jsxs("p",{children:["您可以免费使用 ",l.jsx("b",{children:a}),";"]}):l.jsxs("p",{children:["您需要购买才能使用 ",l.jsx("b",{children:a}),";"]}),l.jsx("p",{children:"在应用启动前,需要选择您的节点;"}),l.jsx("p",{children:"如果您没有节点,我们会引导您创建新的节点;"}),l.jsx("p",{children:"下面为该应用的信息:"})]}):v=l.jsxs(l.Fragment,{children:[f?l.jsxs("p",{children:["You can use ",l.jsx("b",{children:a})," for free;"]}):l.jsxs("p",{children:["You need to purchase before launch ",l.jsx("b",{children:a}),";"]}),l.jsx("p",{children:"Before the blocklet starts, you need to select your Blocklet Server; "}),l.jsx("p",{children:"If you do not have any Blocklet Server, we will guide you to create a new one; "}),l.jsx("p",{children:"Below is the information for the blocklet: "})]}),l.jsxs(Qc,{children:[n||v,l.jsx(gs,{infoList:g}),d?l.jsxs("div",{className:"app-overview",children:[l.jsx(Y,{variant:"h5",gutterBottom:!0,children:Se(Ne[t],"appinfo.overview")}),l.jsx(ms,{children:l.jsx(Yc,{component:"div",className:"content-wrapper post-content",children:l.jsx(ic,{source:d,wrapperElement:{"data-color-mode":s.palette.mode},urlTransform:(m,x,c)=>m.startsWith("/")?pi(i,m):m})})})]}):h?l.jsx("div",{className:"app-overview",children:h}):null]})}const Yc=pe(Y)`
|
|
66
|
+
width: 100%;
|
|
67
|
+
word-wrap: break-word;
|
|
68
|
+
word-break: break-word;
|
|
69
|
+
line-height: 1.5em;
|
|
70
|
+
min-height: 10vh;
|
|
71
|
+
margin-bottom: 40px !important;
|
|
72
|
+
|
|
73
|
+
.alert-content {
|
|
74
|
+
max-width: 100%;
|
|
75
|
+
p:last-of-type {
|
|
76
|
+
margin-bottom: 0;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
iframe {
|
|
81
|
+
width: 100% !important;
|
|
82
|
+
}
|
|
83
|
+
`,Qc=pe.div`
|
|
84
|
+
.info-table {
|
|
85
|
+
a {
|
|
86
|
+
word-break: break-all;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
.app-overview {
|
|
90
|
+
font-size: 16px;
|
|
91
|
+
margin: 16px 0 0 16px;
|
|
92
|
+
h1 {
|
|
93
|
+
margin: 8px 0;
|
|
94
|
+
font-size: 20px;
|
|
95
|
+
}
|
|
96
|
+
h2 {
|
|
97
|
+
margin: 8px 0;
|
|
98
|
+
font-size: 18px;
|
|
99
|
+
}
|
|
100
|
+
ul {
|
|
101
|
+
display: block;
|
|
102
|
+
list-style-type: disc;
|
|
103
|
+
padding-left: 2em;
|
|
104
|
+
li {
|
|
105
|
+
display: list-item;
|
|
106
|
+
list-style: disc;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
blockquote {
|
|
110
|
+
margin-left: 2em;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
.wmde-markdown[data-color-mode='dark'] {
|
|
114
|
+
background: transparent;
|
|
115
|
+
}
|
|
116
|
+
`;ys.propTypes={blockletMeta:_.object.isRequired,locale:_.string.isRequired,handleDescEle:_.node};function Jc({...e}){return l.jsxs("div",{...e,style:{width:"100%"},children:[l.jsx("h3",{children:"End User License Agreement for Application"}),l.jsxs("p",{children:["Blocklet Server License Agreement ",yl.COPYRIGHT_OWNER," version 2020-08-28"]}),l.jsx("p",{children:"BLOCKLET SERVER LICENSE AGREEMENT"}),l.jsx("p",{children:"暂无"})]})}function Zc(e){return`${e.bundleSource?.store||e.meta.homepage}/assets/${e.meta?.did}/${e.meta?.logo||"logo.png"}?v=${e.meta?.version}`}function vs({installRelated:e=!1,meta:t=null,show:n=!1,onClose:r,components:s,loading:i}){const{t:o}=Ce(),a=tt(f=>f.breakpoints.down("md"));if(!n)return null;const u=!i&&s.length===0,d=!i&&s.length!==0,h=40;return l.jsxs(Hr,{title:o("blocklet.component.relatedComponents",{name:t.title}),maxWidth:!1,fullWidth:!1,onClose:(f,y)=>{y!=="backdropClick"&&r(!1)},PaperProps:{style:a?{width:"100%",height:window.innerHeight}:{maxWidth:500,minWidth:300,width:"80%"}},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:[i&&l.jsx(F,{sx:{marginTop:4,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"},children:l.jsx(F,{component:je,icon:"line-md:loading-loop",sx:{color:"primary.main",fontSize:32}})}),u&&l.jsx(F,{sx:{textAlign:"center"},children:o("blocklet.component.noDependencies",{name:t.title})}),d&&l.jsx(F,{sx:{marginBottom:2},children:s.map(f=>{if(!f.meta)return null;const{required:y}=f;let g;return e||y?g=1:g=.5,l.jsxs(F,{sx:{opacity:g,padding:"10px 0px",paddingBottom:.5,marginTop:0,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[l.jsx("img",{style:{width:h,height:h,minWidth:h,minHeight:h},src:Zc(f),alt:f.meta.title}),l.jsxs(F,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",flex:1,marginLeft:2},children:[l.jsxs(F,{sx:{display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"center",fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{window.open(cc(`${f.bundleSource?.store||f.meta.homepage}/blocklets/${f.meta.did}`,{allowDomains:null}),"_blank")},children:[f.meta.title,l.jsx(F,{sx:{display:y?"inline-block":"none",fontSize:"12px",fontWeight:"bold",marginLeft:1},children:o("blocklet.component.required")}),l.jsxs(F,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[f.meta.version,l.jsx(F,{className:"link-icon",icon:"fluent:open-20-filled",component:je,sx:{color:"primary.main",fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.1s"}})]})]}),l.jsx(F,{sx:{marginTop:0,opacity:.7},children:f.meta.description})]})]},f.meta.did)})})]})}vs.propTypes={meta:_.object,show:_.bool,onClose:_.func.isRequired,installRelated:_.func,components:_.array.isRequired,loading:_.bool.isRequired};function eu(e){return e&&e.registryUrl&&e.did?`${e.registryUrl}/api/blocklets/${e?.did}/blocklet.json`:""}function tu(e){const{api:t}=wt(),[n]=sl(),r=n.get("blocklet_meta_url")||eu(e),[s,i]=O.useState([]),[o,a]=O.useState(!1);return O.useEffect(()=>{!r||e?.inputUrl||(a(!0),t.getDynamicComponents({input:{url:r}}).then(u=>{i(u.components)}).finally(()=>{a(!1)}))},[r]),{components:s,loading:o}}function bs({installRelated:e=!0,onChangeInstallRelated:t=null,meta:n,onClickNext:r=null,handleDescEle:s=""}){const i=al(),{t:o,locale:a}=Ce(),[u,d]=O.useState(!1),{components:h,loading:f}=tu(n),y=ds(n),g=r||(()=>{i(`/launch-blocklet/install${window.location.search}`)}),v=()=>{d(!0)},m=()=>{d(!1)};return l.jsxs(nu,{children:[l.jsx("div",{className:"app-content",children:l.jsx("div",{className:"agreement",children:l.jsx("div",{className:"agreement-content",children:y?l.jsx(ys,{blockletMeta:{data:n},locale:a,handleDescEle:s}):l.jsx(F,{sx:{p:3},children:l.jsx(Y,{children:o("launchBlocklet.dockerBlockletCantInstall")})})})})}),l.jsxs(F,{className:"agreement-bottom",sx:{"> .agreement-loading":{color:"primary.main"}},children:[f?l.jsx(je,{className:"agreement-loading",icon:"line-md:loading-loop",style:{fontSize:42,transform:"scale(0.6)"}}):null,y&&t&&h?.length?l.jsxs(F,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"},children:[l.jsx(zr,{sx:{mr:.5},checked:e,onChange:x=>t(x.currentTarget.checked),control:l.jsx(Kr,{}),label:l.jsx("span",{children:o("launchBlocklet.installRelatedComponents")})}),l.jsx(F,{sx:{"> button svg":{color:"primary.main"}},children:l.jsx($o,{size:"small",onClick:v,children:l.jsx(je,{icon:"octicon:package-dependencies-16"})})})]}):null,l.jsx("div",{className:"button-container","data-cy":"agree-all",children:y?l.jsx(fs,{onContinue:g,description:l.jsx(Jc,{}),texts:{listenName:o("launchBlocklet.license"),buttonNext:o("launchBlocklet.next")}}):null})]}),l.jsx(vs,{installRelated:e,meta:n,show:u,onClose:m,components:h,loading:f})]})}bs.propTypes={meta:_.object.isRequired,onClickNext:_.func,handleDescEle:_.node,installRelated:_.bool,onChangeInstallRelated:_.func};const nu=pe.div`
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-direction: column;
|
|
119
|
+
align-items: center;
|
|
120
|
+
width: 100%;
|
|
121
|
+
height: 100%;
|
|
122
|
+
flex: 1;
|
|
123
|
+
.app-content {
|
|
124
|
+
padding: 2px 24px 24px;
|
|
125
|
+
${e=>e.theme.breakpoints.down("md")} {
|
|
126
|
+
padding-top: 10px;
|
|
127
|
+
}
|
|
128
|
+
width: 100%;
|
|
129
|
+
flex: 1;
|
|
130
|
+
letter-spacing: normal;
|
|
131
|
+
}
|
|
132
|
+
.agreement {
|
|
133
|
+
position: relative;
|
|
134
|
+
display: flex;
|
|
135
|
+
flex-direction: column;
|
|
136
|
+
width: 100%;
|
|
137
|
+
height: 100%;
|
|
138
|
+
border: 1px solid ${e=>e.theme.palette.grey[100]};
|
|
139
|
+
border-radius: 12px;
|
|
140
|
+
${e=>e.theme.breakpoints.up("md")} {
|
|
141
|
+
margin-top: 24px;
|
|
142
|
+
}
|
|
143
|
+
${e=>e.theme.breakpoints.down("md")} {
|
|
144
|
+
margin-top: 16px;
|
|
145
|
+
}
|
|
146
|
+
.agreement-content {
|
|
147
|
+
position: absolute;
|
|
148
|
+
left: 0;
|
|
149
|
+
top: 0;
|
|
150
|
+
width: 100%;
|
|
151
|
+
height: 100%;
|
|
152
|
+
font-size: 14px;
|
|
153
|
+
overflow-y: auto;
|
|
154
|
+
${e=>e.theme.breakpoints.up("md")} {
|
|
155
|
+
padding: 0 24px;
|
|
156
|
+
}
|
|
157
|
+
${e=>e.theme.breakpoints.down("md")} {
|
|
158
|
+
padding: 0 16px;
|
|
159
|
+
}
|
|
160
|
+
&:after {
|
|
161
|
+
display: block;
|
|
162
|
+
content: '';
|
|
163
|
+
height: 24px;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
.agreement-bottom {
|
|
168
|
+
display: flex;
|
|
169
|
+
width: 100%;
|
|
170
|
+
padding: 24px;
|
|
171
|
+
${e=>e.theme.breakpoints.up("md")} {
|
|
172
|
+
flex-direction: row;
|
|
173
|
+
align-items: center;
|
|
174
|
+
margin-left: auto;
|
|
175
|
+
}
|
|
176
|
+
${e=>e.theme.breakpoints.down("md")} {
|
|
177
|
+
flex-direction: column;
|
|
178
|
+
align-items: center;
|
|
179
|
+
padding-top: 0;
|
|
180
|
+
padding-bottom: 16px;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
.button-container {
|
|
184
|
+
${e=>e.theme.breakpoints.up("md")} {
|
|
185
|
+
margin-left: auto;
|
|
186
|
+
}
|
|
187
|
+
${e=>e.theme.breakpoints.down("md")} {
|
|
188
|
+
padding-top: 0;
|
|
189
|
+
padding-bottom: 16px;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
`;var Re={},tn={exports:{}},qn={exports:{}},Ci;function xs(){if(Ci)return qn.exports;Ci=1;var e=qn.exports={github:{protocols:["git","http","git+ssh","git+https","ssh","https"],domain:"github.com",treepath:"tree",filetemplate:"https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}",bugstemplate:"https://{domain}/{user}/{project}/issues",gittemplate:"git://{auth@}{domain}/{user}/{project}.git{#committish}",tarballtemplate:"https://codeload.{domain}/{user}/{project}/tar.gz/{committish}"},bitbucket:{protocols:["git+ssh","git+https","ssh","https"],domain:"bitbucket.org",treepath:"src",tarballtemplate:"https://{domain}/{user}/{project}/get/{committish}.tar.gz"},gitlab:{protocols:["git+ssh","git+https","ssh","https"],domain:"gitlab.com",treepath:"tree",bugstemplate:"https://{domain}/{user}/{project}/issues",httpstemplate:"git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}",tarballtemplate:"https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}",pathmatch:/^\/([^/]+)\/((?!.*(\/-\/|\/repository(\/[^/]+)?\/archive\.tar\.gz)).*?)(?:\.git|\/)?$/},gist:{protocols:["git","git+ssh","git+https","ssh","https"],domain:"gist.github.com",pathmatch:/^[/](?:([^/]+)[/])?([a-z0-9]{7,})(?:[.]git)?$/,filetemplate:"https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}",bugstemplate:"https://{domain}/{project}",gittemplate:"git://{domain}/{project}.git{#committish}",sshtemplate:"git@{domain}:/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{project}.git{#committish}",browsetemplate:"https://{domain}/{project}{/committish}",browsefiletemplate:"https://{domain}/{project}{/committish}{#path}",docstemplate:"https://{domain}/{project}{/committish}",httpstemplate:"git+https://{domain}/{project}.git{#committish}",shortcuttemplate:"{type}:{project}{#committish}",pathtemplate:"{project}{#committish}",tarballtemplate:"https://codeload.github.com/gist/{project}/tar.gz/{committish}",hashformat:function(r){return"file-"+n(r)}}},t={sshtemplate:"git@{domain}:{user}/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{user}/{project}.git{#committish}",browsetemplate:"https://{domain}/{user}/{project}{/tree/committish}",browsefiletemplate:"https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}",docstemplate:"https://{domain}/{user}/{project}{/tree/committish}#readme",httpstemplate:"git+https://{auth@}{domain}/{user}/{project}.git{#committish}",filetemplate:"https://{domain}/{user}/{project}/raw/{committish}/{path}",shortcuttemplate:"{type}:{user}/{project}{#committish}",pathtemplate:"{user}/{project}{#committish}",pathmatch:/^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/,hashformat:n};Object.keys(e).forEach(function(r){Object.keys(t).forEach(function(s){e[r][s]||(e[r][s]=t[s])}),e[r].protocols_re=RegExp("^("+e[r].protocols.map(function(s){return s.replace(/([\\+*{}()[\]$^|])/g,"\\$1")}).join("|")+"):$")});function n(r){return r.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-")}return qn.exports}var Un,Ei;function ru(){if(Ei)return Un;Ei=1;var e=xs(),t=Object.assign||function(s,i){if(i===null||typeof i!="object")return s;const o=Object.keys(i);let a=o.length;for(;a--;)s[o[a]]=i[o[a]];return s};Un=n;function n(r,s,i,o,a,u,d){var h=this;h.type=r,Object.keys(e[r]).forEach(function(f){h[f]=e[r][f]}),h.user=s,h.auth=i,h.project=o,h.committish=a,h.default=u,h.opts=d||{}}return n.prototype.hash=function(){return this.committish?"#"+this.committish:""},n.prototype._fill=function(r,s){if(r){var i=t({},s);i.path=i.path?i.path.replace(/^[/]+/g,""):"",s=t(t({},this.opts),s);var o=this;Object.keys(this).forEach(function(g){o[g]!=null&&i[g]==null&&(i[g]=o[g])});var a=i.auth,u=i.committish,d=i.fragment,h=i.path,f=i.project;Object.keys(i).forEach(function(g){var v=i[g];(g==="path"||g==="project")&&typeof v=="string"?i[g]=v.split("/").map(function(m){return encodeURIComponent(m)}).join("/"):g!=="domain"&&(i[g]=encodeURIComponent(v))}),i["auth@"]=a?a+"@":"",i["#fragment"]=d?"#"+this.hashformat(d):"",i.fragment=i.fragment?i.fragment:"",i["#path"]=h?"#"+this.hashformat(h):"",i["/path"]=i.path?"/"+i.path:"",i.projectPath=f.split("/").map(encodeURIComponent).join("/"),s.noCommittish?(i["#committish"]="",i["/tree/committish"]="",i["/committish"]="",i.committish=""):(i["#committish"]=u?"#"+u:"",i["/tree/committish"]=i.committish?"/"+i.treepath+"/"+i.committish:"",i["/committish"]=i.committish?"/"+i.committish:"",i.committish=i.committish||"master");var y=r;return Object.keys(i).forEach(function(g){y=y.replace(new RegExp("[{]"+g+"[}]","g"),i[g])}),s.noGitPlus?y.replace(/^git[+]/,""):y}},n.prototype.ssh=function(r){return this._fill(this.sshtemplate,r)},n.prototype.sshurl=function(r){return this._fill(this.sshurltemplate,r)},n.prototype.browse=function(r,s,i){return typeof r=="string"?(typeof s!="string"&&(i=s,s=null),this._fill(this.browsefiletemplate,t({fragment:s,path:r},i))):this._fill(this.browsetemplate,r)},n.prototype.docs=function(r){return this._fill(this.docstemplate,r)},n.prototype.bugs=function(r){return this._fill(this.bugstemplate,r)},n.prototype.https=function(r){return this._fill(this.httpstemplate,r)},n.prototype.git=function(r){return this._fill(this.gittemplate,r)},n.prototype.shortcut=function(r){return this._fill(this.shortcuttemplate,r)},n.prototype.path=function(r){return this._fill(this.pathtemplate,r)},n.prototype.tarball=function(r){var s=t({},r,{noCommittish:!1});return this._fill(this.tarballtemplate,s)},n.prototype.file=function(r,s){return this._fill(this.filetemplate,t({path:r},s))},n.prototype.getDefaultRepresentation=function(){return this.default},n.prototype.toString=function(r){return this.default&&typeof this[this.default]=="function"?this[this.default](r):this.sshurl(r)},Un}var zn,Oi;function iu(){return Oi||(Oi=1,zn=function(e){e.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}),zn}var Kn,Pi;function ou(){if(Pi)return Kn;Pi=1,Kn=e,e.Node=s,e.create=e;function e(i){var o=this;if(o instanceof e||(o=new e),o.tail=null,o.head=null,o.length=0,i&&typeof i.forEach=="function")i.forEach(function(d){o.push(d)});else if(arguments.length>0)for(var a=0,u=arguments.length;a<u;a++)o.push(arguments[a]);return o}e.prototype.removeNode=function(i){if(i.list!==this)throw new Error("removing node which does not belong to this list");var o=i.next,a=i.prev;return o&&(o.prev=a),a&&(a.next=o),i===this.head&&(this.head=o),i===this.tail&&(this.tail=a),i.list.length--,i.next=null,i.prev=null,i.list=null,o},e.prototype.unshiftNode=function(i){if(i!==this.head){i.list&&i.list.removeNode(i);var o=this.head;i.list=this,i.next=o,o&&(o.prev=i),this.head=i,this.tail||(this.tail=i),this.length++}},e.prototype.pushNode=function(i){if(i!==this.tail){i.list&&i.list.removeNode(i);var o=this.tail;i.list=this,i.prev=o,o&&(o.next=i),this.tail=i,this.head||(this.head=i),this.length++}},e.prototype.push=function(){for(var i=0,o=arguments.length;i<o;i++)n(this,arguments[i]);return this.length},e.prototype.unshift=function(){for(var i=0,o=arguments.length;i<o;i++)r(this,arguments[i]);return this.length},e.prototype.pop=function(){if(this.tail){var i=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,i}},e.prototype.shift=function(){if(this.head){var i=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,i}},e.prototype.forEach=function(i,o){o=o||this;for(var a=this.head,u=0;a!==null;u++)i.call(o,a.value,u,this),a=a.next},e.prototype.forEachReverse=function(i,o){o=o||this;for(var a=this.tail,u=this.length-1;a!==null;u--)i.call(o,a.value,u,this),a=a.prev},e.prototype.get=function(i){for(var o=0,a=this.head;a!==null&&o<i;o++)a=a.next;if(o===i&&a!==null)return a.value},e.prototype.getReverse=function(i){for(var o=0,a=this.tail;a!==null&&o<i;o++)a=a.prev;if(o===i&&a!==null)return a.value},e.prototype.map=function(i,o){o=o||this;for(var a=new e,u=this.head;u!==null;)a.push(i.call(o,u.value,this)),u=u.next;return a},e.prototype.mapReverse=function(i,o){o=o||this;for(var a=new e,u=this.tail;u!==null;)a.push(i.call(o,u.value,this)),u=u.prev;return a},e.prototype.reduce=function(i,o){var a,u=this.head;if(arguments.length>1)a=o;else if(this.head)u=this.head.next,a=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var d=0;u!==null;d++)a=i(a,u.value,d),u=u.next;return a},e.prototype.reduceReverse=function(i,o){var a,u=this.tail;if(arguments.length>1)a=o;else if(this.tail)u=this.tail.prev,a=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var d=this.length-1;u!==null;d--)a=i(a,u.value,d),u=u.prev;return a},e.prototype.toArray=function(){for(var i=new Array(this.length),o=0,a=this.head;a!==null;o++)i[o]=a.value,a=a.next;return i},e.prototype.toArrayReverse=function(){for(var i=new Array(this.length),o=0,a=this.tail;a!==null;o++)i[o]=a.value,a=a.prev;return i},e.prototype.slice=function(i,o){o=o||this.length,o<0&&(o+=this.length),i=i||0,i<0&&(i+=this.length);var a=new e;if(o<i||o<0)return a;i<0&&(i=0),o>this.length&&(o=this.length);for(var u=0,d=this.head;d!==null&&u<i;u++)d=d.next;for(;d!==null&&u<o;u++,d=d.next)a.push(d.value);return a},e.prototype.sliceReverse=function(i,o){o=o||this.length,o<0&&(o+=this.length),i=i||0,i<0&&(i+=this.length);var a=new e;if(o<i||o<0)return a;i<0&&(i=0),o>this.length&&(o=this.length);for(var u=this.length,d=this.tail;d!==null&&u>o;u--)d=d.prev;for(;d!==null&&u>i;u--,d=d.prev)a.push(d.value);return a},e.prototype.splice=function(i,o,...a){i>this.length&&(i=this.length-1),i<0&&(i=this.length+i);for(var u=0,d=this.head;d!==null&&u<i;u++)d=d.next;for(var h=[],u=0;d&&u<o;u++)h.push(d.value),d=this.removeNode(d);d===null&&(d=this.tail),d!==this.head&&d!==this.tail&&(d=d.prev);for(var u=0;u<a.length;u++)d=t(this,d,a[u]);return h},e.prototype.reverse=function(){for(var i=this.head,o=this.tail,a=i;a!==null;a=a.prev){var u=a.prev;a.prev=a.next,a.next=u}return this.head=o,this.tail=i,this};function t(i,o,a){var u=o===i.head?new s(a,null,o,i):new s(a,o,o.next,i);return u.next===null&&(i.tail=u),u.prev===null&&(i.head=u),i.length++,u}function n(i,o){i.tail=new s(o,i.tail,null,i),i.head||(i.head=i.tail),i.length++}function r(i,o){i.head=new s(o,null,i.head,i),i.tail||(i.tail=i.head),i.length++}function s(i,o,a,u){if(!(this instanceof s))return new s(i,o,a,u);this.list=u,this.value=i,o?(o.next=this,this.prev=o):this.prev=null,a?(a.prev=this,this.next=a):this.next=null}try{iu()(e)}catch{}return Kn}var Vn,Ii;function su(){if(Ii)return Vn;Ii=1;const e=ou(),t=Symbol("max"),n=Symbol("length"),r=Symbol("lengthCalculator"),s=Symbol("allowStale"),i=Symbol("maxAge"),o=Symbol("dispose"),a=Symbol("noDisposeOnSet"),u=Symbol("lruList"),d=Symbol("cache"),h=Symbol("updateAgeOnGet"),f=()=>1;class y{constructor(b){if(typeof b=="number"&&(b={max:b}),b||(b={}),b.max&&(typeof b.max!="number"||b.max<0))throw new TypeError("max must be a non-negative number");this[t]=b.max||1/0;const p=b.length||f;if(this[r]=typeof p!="function"?f:p,this[s]=b.stale||!1,b.maxAge&&typeof b.maxAge!="number")throw new TypeError("maxAge must be a number");this[i]=b.maxAge||0,this[o]=b.dispose,this[a]=b.noDisposeOnSet||!1,this[h]=b.updateAgeOnGet||!1,this.reset()}set max(b){if(typeof b!="number"||b<0)throw new TypeError("max must be a non-negative number");this[t]=b||1/0,m(this)}get max(){return this[t]}set allowStale(b){this[s]=!!b}get allowStale(){return this[s]}set maxAge(b){if(typeof b!="number")throw new TypeError("maxAge must be a non-negative number");this[i]=b,m(this)}get maxAge(){return this[i]}set lengthCalculator(b){typeof b!="function"&&(b=f),b!==this[r]&&(this[r]=b,this[n]=0,this[u].forEach(p=>{p.length=this[r](p.value,p.key),this[n]+=p.length})),m(this)}get lengthCalculator(){return this[r]}get length(){return this[n]}get itemCount(){return this[u].length}rforEach(b,p){p=p||this;for(let k=this[u].tail;k!==null;){const E=k.prev;w(this,b,k,p),k=E}}forEach(b,p){p=p||this;for(let k=this[u].head;k!==null;){const E=k.next;w(this,b,k,p),k=E}}keys(){return this[u].toArray().map(b=>b.key)}values(){return this[u].toArray().map(b=>b.value)}reset(){this[o]&&this[u]&&this[u].length&&this[u].forEach(b=>this[o](b.key,b.value)),this[d]=new Map,this[u]=new e,this[n]=0}dump(){return this[u].map(b=>v(this,b)?!1:{k:b.key,v:b.value,e:b.now+(b.maxAge||0)}).toArray().filter(b=>b)}dumpLru(){return this[u]}set(b,p,k){if(k=k||this[i],k&&typeof k!="number")throw new TypeError("maxAge must be a number");const E=k?Date.now():0,A=this[r](p,b);if(this[d].has(b)){if(A>this[t])return x(this,this[d].get(b)),!1;const P=this[d].get(b).value;return this[o]&&(this[a]||this[o](b,P.value)),P.now=E,P.maxAge=k,P.value=p,this[n]+=A-P.length,P.length=A,this.get(b),m(this),!0}const B=new c(b,p,A,E,k);return B.length>this[t]?(this[o]&&this[o](b,p),!1):(this[n]+=B.length,this[u].unshift(B),this[d].set(b,this[u].head),m(this),!0)}has(b){if(!this[d].has(b))return!1;const p=this[d].get(b).value;return!v(this,p)}get(b){return g(this,b,!0)}peek(b){return g(this,b,!1)}pop(){const b=this[u].tail;return b?(x(this,b),b.value):null}del(b){x(this,this[d].get(b))}load(b){this.reset();const p=Date.now();for(let k=b.length-1;k>=0;k--){const E=b[k],A=E.e||0;if(A===0)this.set(E.k,E.v);else{const B=A-p;B>0&&this.set(E.k,E.v,B)}}}prune(){this[d].forEach((b,p)=>g(this,p,!1))}}const g=(S,b,p)=>{const k=S[d].get(b);if(k){const E=k.value;if(v(S,E)){if(x(S,k),!S[s])return}else p&&(S[h]&&(k.value.now=Date.now()),S[u].unshiftNode(k));return E.value}},v=(S,b)=>{if(!b||!b.maxAge&&!S[i])return!1;const p=Date.now()-b.now;return b.maxAge?p>b.maxAge:S[i]&&p>S[i]},m=S=>{if(S[n]>S[t])for(let b=S[u].tail;S[n]>S[t]&&b!==null;){const p=b.prev;x(S,b),b=p}},x=(S,b)=>{if(b){const p=b.value;S[o]&&S[o](p.key,p.value),S[n]-=p.length,S[d].delete(p.key),S[u].removeNode(b)}};class c{constructor(b,p,k,E,A){this.key=b,this.value=p,this.length=k,this.now=E,this.maxAge=A||0}}const w=(S,b,p,k)=>{let E=p.value;v(S,E)&&(x(S,p),S[s]||(E=void 0)),E&&b.call(k,E.value,E.key,S)};return Vn=y,Vn}var _i;function au(){if(_i)return tn.exports;_i=1;var e=vl,t=xs(),n=tn.exports=ru(),r=su(),s=new r({max:1e3}),i={"git+ssh:":"sshurl","git+https:":"https","ssh:":"sshurl","git:":"git"};function o(y){return i[y]||y.slice(0,-1)}var a={"git:":!0,"https:":!0,"git+https:":!0,"http:":!0,"git+http:":!0};tn.exports.fromUrl=function(y,g){if(typeof y=="string"){var v=y+JSON.stringify(g||{});return s.has(v)||s.set(v,u(y,g)),s.get(v)}};function u(y,g){if(!(y==null||y==="")){var v=h(d(y)?"github:"+y:y),m=f(v),x=v.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/),c=Object.keys(t).map(function(w){try{var S=t[w],b=null;m.auth&&a[m.protocol]&&(b=m.auth);var p=m.hash?decodeURIComponent(m.hash.substr(1)):null,k=null,E=null,A=null;if(x&&x[1]===w)k=x[2]&&decodeURIComponent(x[2]),E=decodeURIComponent(x[3].replace(/\.git$/,"")),A="shortcut";else{if(m.host&&m.host!==S.domain&&m.host.replace(/^www[.]/,"")!==S.domain||!S.protocols_re.test(m.protocol)||!m.path)return;var B=S.pathmatch,L=m.path.match(B);if(!L)return;L[1]!==null&&L[1]!==void 0&&(k=decodeURIComponent(L[1].replace(/^:/,""))),E=decodeURIComponent(L[2]),A=o(m.protocol)}return new n(w,k,b,E,p,A,g)}catch(P){if(!(P instanceof URIError))throw P}}).filter(function(w){return w});if(c.length===1)return c[0]}}function d(y){return/^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(y)}function h(y){var g=e.parse(y);return g.protocol==="gist:"&&g.host&&!g.path?g.protocol+"/"+g.host:y}function f(y){var g=y.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/);if(!g){var v=e.parse(y);if(v.auth){const x=y.match(/[^@]+@[^:/]+/);if(x){var m=new e.URL(x[0]);v.auth=m.username||"",m.password&&(v.auth+=":"+m.password)}}return v}return{protocol:"git+ssh:",slashes:!0,auth:g[1],host:g[2],port:null,hostname:g[2],hash:g[4],search:null,query:null,pathname:"/"+g[3],path:"/"+g[3],href:"git+ssh://"+g[1]+"@"+g[2]+"/"+g[3]+(g[4]||"")}}return tn.exports}var Qe={},W={},Hn,Ri;function lu(){return Ri||(Ri=1,Hn={charsWide:["ᄀ-ᇹ"," -〿","ぁ-ゔ","゙-ゞ","ァ-ヾ","ㄱ-ㆎ","㆐-㆟","㈀-㈜","㈠-㉃","㉠-㊰","㋀-㍶","㍻-㏝","㏠-㏾","一-龥","가-힣","-","豈-鶴"],charsFullWidth:["︰-﹄","﹉-﹒","﹔-﹫","!-~","¢-₩"]}),Hn}var Gn,Li;function cu(){if(Li)return Gn;Li=1;const{charsWide:e,charsFullWidth:t}=lu(),n=new RegExp(`[${e.join("")}${t.join("")}]`,"g");return Gn={default:s=>s.replace(n,"xx").length,charsRegex:n},Gn}var Xn,Di;function uu(){return Di||(Di=1,Xn=function(t){if(typeof t!="string"||t==="")return!1;for(var n;n=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(n[2])return!0;t=t.slice(n.index+n[0].length)}return!1}),Xn}var Yn,Ni;function du(){if(Ni)return Yn;Ni=1;var e=uu(),t={"{":"}","(":")","[":"]"},n=function(s){if(s[0]==="!")return!0;for(var i=0,o=-2,a=-2,u=-2,d=-2,h=-2;i<s.length;){if(s[i]==="*"||s[i+1]==="?"&&/[\].+)]/.test(s[i])||a!==-1&&s[i]==="["&&s[i+1]!=="]"&&(a<i&&(a=s.indexOf("]",i)),a>i&&(h===-1||h>a||(h=s.indexOf("\\",i),h===-1||h>a)))||u!==-1&&s[i]==="{"&&s[i+1]!=="}"&&(u=s.indexOf("}",i),u>i&&(h=s.indexOf("\\",i),h===-1||h>u))||d!==-1&&s[i]==="("&&s[i+1]==="?"&&/[:!=]/.test(s[i+2])&&s[i+3]!==")"&&(d=s.indexOf(")",i),d>i&&(h=s.indexOf("\\",i),h===-1||h>d))||o!==-1&&s[i]==="("&&s[i+1]!=="|"&&(o<i&&(o=s.indexOf("|",i)),o!==-1&&s[o+1]!==")"&&(d=s.indexOf(")",o),d>o&&(h=s.indexOf("\\",o),h===-1||h>d))))return!0;if(s[i]==="\\"){var f=s[i+1];i+=2;var y=t[f];if(y){var g=s.indexOf(y,i);g!==-1&&(i=g+1)}if(s[i]==="!")return!0}else i++}return!1},r=function(s){if(s[0]==="!")return!0;for(var i=0;i<s.length;){if(/[*?{}()[\]]/.test(s[i]))return!0;if(s[i]==="\\"){var o=s[i+1];i+=2;var a=t[o];if(a){var u=s.indexOf(a,i);u!==-1&&(i=u+1)}if(s[i]==="!")return!0}else i++}return!1};return Yn=function(i,o){if(typeof i!="string"||i==="")return!1;if(e(i))return!0;var a=n;return o&&o.strict===!1&&(a=r),a(i)},Yn}var Qn,Mi;function hu(){if(Mi)return Qn;Mi=1;const e=Gr(),t=hl(),n="semver",r={base:e.string(),type:"semverRange",validate:function(o,{error:a}){return t.validRange(o)?{value:o}:{errors:a(`${n}.valid`)}},messages:{[`${n}.valid`]:"{{#label}} needs to be a valid semver range"}},s={};return s.compare={method:!1,validate:function(o,a,{exp:u},{name:d}){return t[d](o,u)?o:a.error(`${n}.${d}`,{exp:u})},args:[{name:"exp",assert:t.valid,message:"needs to be a valid semver expression"}]},["gt","gte","lt","lte","eq","neq"].forEach(function(o){s[o]={method:function(a){return this.$_addRule({name:o,method:"compare",args:{exp:a}})}}}),s.cmp={method:function(o,a){return this.$_addRule({name:"cmp",args:{cmp:o,exp:a}})},validate:function(o,a,{cmp:u,exp:d}){return t.cmp(o,u,d)?o:a.error(`${n}.cmp`,{cmp:u,exp:d})},args:[{name:"cmp",assert:o=>["===","!==","","=","==","!=",">",">=","<","<="].includes(o),message:"needs to be a valid comparator"},{name:"exp",assert:t.valid,message:"needs to be a valid semver expression"}]},s.compareRange={method:!1,validate:function(o,a,{rng:u},{name:d}){return t[d](o,u)?o:a.error(`${n}.${d}`,{rng:u})},args:[{name:"rng",assert:t.validRange,message:"needs to be a valid semver range"}]},["satisfies","gtr","ltr"].forEach(function(o){s[o]={method:function(a){return this.$_addRule({name:o,method:"compareRange",args:{rng:a}})}}}),s.outside={method:function(o,a){return this.$_addRule({name:"outside",args:{hilo:o,rng:a}})},validate:function(o,a,{hilo:u,rng:d}){return t.outside(o,d,u)?o:a.error(`${n}.outside`,{hilo:u,rng:d})},args:[{name:"hilo",assert:o=>[">","<"].includes(o),message:"needs to be a valid comparator"},{name:"rng",assert:t.validRange,message:"needs to be a valid semver range"}]},Qn={semver:{base:e.string(),type:"semver",validate:function(o,{error:a}){return t.valid(o)?{value:o}:{errors:a(`${n}.valid`)}},messages:{[`${n}.valid`]:"{{#label}} needs to be a valid semver expression",[`${n}.gt`]:"{{#label}} needs to be greater than {{#exp}}",[`${n}.gte`]:"{{#label}} needs to be greater than or equal to {{#exp}}",[`${n}.lt`]:"{{#label}} needs to be less than {{#exp}}",[`${n}.lte`]:"{{#label}} needs to be less than or equal to {{#exp}}",[`${n}.eq`]:"{{#label}} needs to be logically equivalent to {{#exp}}",[`${n}.neq`]:"{{#label}} needs to be logically different than {{#exp}}",[`${n}.cmp`]:"{{#label}} needs to satisfy {{#cmp}} on {{#exp}}",[`${n}.satisfies`]:"{{#label}} needs to satisfy {{#rng}}",[`${n}.gtr`]:"{{#label}} needs to be greater than range {{#rng}}",[`${n}.ltr`]:"{{#label}} needs to be less than range {{#rng}}",[`${n}.outside`]:"{{#label}} needs to be {{#hilo}} than range {{#rng}}"},rules:s},semverRange:r},Qn}function fu(e){if(typeof e!="string"||e.trim()!==e)return!1;try{new Function(e,"var "+e)}catch{return!1}return!0}const pu=Object.freeze(Object.defineProperty({__proto__:null,default:fu},Symbol.toStringTag,{value:"Module"})),mu=ll(pu);var le={},Ai;function gu(){if(Ai)return le;Ai=1;const e=Gr();function t(P){return P&&typeof P=="object"&&"default"in P?P.default:P}const n=t(e),r={"-a":"--attach","-d":"--detach","-e":"--env","-h":"--hostname","-i":"--interactive","-it":"-it","-rm":"-rm","-m":"--memory","-p":"--publish","-P":"--publish-all","-l":"--label","-n":"--name","-q":"--quiet","-x":"--x-registry","-t":"--tty","-u":"--user","-v":"--volume","-w":"--workdir","-cgroupns":"--cgroupns","-cpus":"--cpus","-g":"--gpus","-ip6":"--ip6","--read-only":"--read-only","--add-host":"--add-host","--attach":"--attach","--blkio-weight":"--blkio-weight","--blkio-weight-device":"--blkio-weight-device","--cap-add":"--cap-add","--cap-drop":"--cap-drop","--cgroup-parent":"--cgroup-parent","--cidfile":"--cidfile","--cpu-period":"--cpu-period","--cpu-quota":"--cpu-quota","--cpu-rt-period":"--cpu-rt-period","--cpu-rt-runtime":"--cpu-rt-runtime","--cpu-shares":"--cpu-shares","--cpus":"--cpus","--cpuset-cpus":"--cpuset-cpus","--cpuset-mems":"--cpuset-mems","--detach":"--detach","--detach-keys":"--detach-keys","--device":"--device","--device-cgroup-rule":"--device-cgroup-rule","--device-read-bps":"--device-read-bps","--device-read-iops":"--device-read-iops","--device-write-bps":"--device-write-bps","--device-write-iops":"--device-write-iops","--disable-content-trust":"--disable-content-trust","--dns":"--dns","--dns-opt":"--dns-opt","--dns-search":"--dns-search","--domainname":"--domainname","--entrypoint":"--entrypoint","--env":"--env","--env-file":"--env-file","--expose":"--expose","--gpus":"--gpus","--group-add":"--group-add","--health-cmd":"--health-cmd","--health-interval":"--health-interval","--health-retries":"--health-retries","--health-start-period":"--health-start-period","--health-timeout":"--health-timeout","--help":"--help","--hostname":"--hostname","--init":"--init","--interactive":"--interactive","--ip":"--ip","--ip6":"--ip6","--ipc":"--ipc","--isolation":"--isolation","--kernel-memory":"--kernel-memory","--label":"--label","--label-file":"--label-file","--link":"--link","--link-local-ip":"--link-local-ip","--log-driver":"--log-driver","--log-opt":"--log-opt","--mac-address":"--mac-address","--memory":"--memory","--memory-reservation":"--memory-reservation","--memory-swap":"--memory-swap","--memory-swappiness":"--memory-swappiness","--mount":"--mount","--name":"--name","--network":"--network","--network-alias":"--network-alias","--no-healthcheck":"--no-healthcheck","--oom-kill-disable":"--oom-kill-disable","--oom-score-adj":"--oom-score-adj","--pid":"--pid","--pids-limit":"--pids-limit","--platform":"--platform","--privileged":"--privileged","--publish":"--publish","--publish-all":"--publish-all","--pull":"--pull","--restart":"--restart","--rm":"--rm","--runtime":"--runtime","--security-opt":"--security-opt","--shm-size":"--shm-size","--stop-signal":"--stop-signal","--stop-timeout":"--stop-timeout","--storage-opt":"--storage-opt","--sysctl":"--sysctl","--tmpfs":"--tmpfs","--tty":"--tty","--ulimit":"--ulimit","--user":"--user","--userns":"--userns","--uts":"--uts","--volume":"--volume","--volume-driver":"--volume-driver","--volumes-from":"--volumes-from","--workdir":"--workdir"},s={"--env":!0,"--publish":!0,"--volume":!0,"--attach":!0,"--quiet":!0,"--entrypoint":!0,"--workdir":!0,"--cidfile":!0,"--detach-keys":!0,"--disable-content-trust":!0,"--domainname":!0,"--expose":!0,"--ip":!0,"--link-local-ip":!0,"--platform":!0},i={"-rm":!0,"--name":!0,"--label":!0,"--network":!0,"--user":!0},o={"--volume":!0,"--publish":!0},a=new Set(["--publish","--volume"]),u=P=>{const[I]=P.split(":");return I?.startsWith("/")||I?.startsWith("./")||I?.startsWith("../")||I?.startsWith("~")||I?.startsWith("$BLOCKLET")};function d(P){return P.map(I=>{if(I.key!=="--volume"||I.value.startsWith("$BLOCKLET_APP_DIR/")||I.value.startsWith("$BLOCKLET_DATA_DIR/"))return I;const[D,...j]=I.value.split(":");if(!D||!u(I.value))return I;const N=D.startsWith("/")?`$BLOCKLET_DATA_DIR${D}`:`$BLOCKLET_DATA_DIR/${D}`;return{...I,value:[N,...j].join(":")}})}function h(P){let I=!0;return P.find(j=>j.key==="--publish"&&j.type==="web")?P.map(j=>{if(j.key==="--publish"){const N={...j,type:I?"docker":j.type};return I=j.type==="web",N}return j}):P.map(j=>{if(j.key==="--publish"){const N={...j,type:I?"web":"docker"};return I=!1,N}return j})}function f(P){if(!P)return{dockerArgs:[],dockerEnvs:[],dockerImage:"",dockerCommand:""};if(P=P.trim(),P.startsWith("$ docker run")&&(P=P.replace("$ docker run","docker run")),!P.startsWith("docker run"))return{dockerArgs:[],dockerEnvs:[],dockerImage:"",dockerCommand:""};const D=P.replace(/\\\n/g,"").replace(/\n/g," ").trim().match(/(?:[^\s"']+|'[^']*'|"[^"]*")+/g);if(!D)return{dockerArgs:[],dockerEnvs:[],dockerImage:"",dockerCommand:""};const j=[],N=[];let T=0,z="",Q="";const R=[];for(;T<D.length;){const U=D[T];if(!U){T++;continue}if(U==="docker"||U==="run"){T++;continue}if((U==="-e"||U==="--env")&&T+1<D.length){const ne=D[T+1]||"",[G,...Z]=ne.split("=");if(G){const ee=Z.join("=").replace(/^['"]|['"]$/g,"");N.push({key:G,value:ee})}T+=2;continue}if(U.startsWith("-")&&R.length===0){const ne=U.indexOf("=");let G=U,Z=null;ne!==-1&&(G=U.substring(0,ne),Z=U.substring(ne+1).replace(/^['"]|['"]$/g,""));const ee=r[G];if(!ee){T+=2;continue}if(ee==="--publish"){let Ie="";if(Z)Ie=Z,j.push({key:ee,value:Ie});else if(T+1<D.length&&!(D[T+1]||"").startsWith("-")){Ie=(D[T+1]||"").replace(/^['"]|['"]$/g,""),j.push({key:ee,value:Ie}),T+=2;continue}else{j.push({key:ee,value:"true"}),T++;continue}T++;continue}if(Z!==null){j.push({key:ee,value:Z}),T++;continue}else if(T+1<D.length&&!(D[T+1]||"").startsWith("-")){const Ie=(D[T+1]||"").replace(/^['"]|['"]$/g,"");j.push({key:ee,value:Ie}),T+=2;continue}else{j.push({key:ee,value:"true"}),T++;continue}}R.push(U),T++}z=R[0]||"",Q=R.slice(1).join(" ");const X=[];for(const U of j)U.name="",U.path="",U.prefix="",U.protocol="",U.proxyBehavior="service",U.type="docker",!(a.has(U.key)&&U.value==="true")&&X.push(U);for(const U of N)U.custom="",U.description="",U.secure=!1,U.shared=!1,U.required=!1;return{dockerArgs:h(d(X)),dockerEnvs:N,dockerImage:z,dockerCommand:Q}}function y({dockerArgs:P,dockerEnvs:I,dockerImage:D,dockerCommand:j}){if(P.length===0&&I.length===0&&!D)return"";const N=["docker run \\"],T=new Set(["--publish","--volume","--expose","--device","--mount","--label","--cap-add","--cap-drop","--add-host","--dns","--network-alias","--sysctl","--ulimit","--network"]);for(const z of P){const{key:Q,value:R}=z;if(T.has(Q))if(R==="true")N.push(` ${Q} \\`);else{const X=/[\s"']/g.test(R)?`"${R}"`:R;N.push(` ${Q} ${X} \\`)}else if(!N.some(X=>X.startsWith(` ${Q}`)))if(R==="true")N.push(` ${Q} \\`);else{const X=/[\s"']/g.test(R)?`"${R}"`:R;N.push(` ${Q} ${X} \\`)}}for(const z of I){const{key:Q,value:R}=z,X=/["']/g.test(R)?R:`"${R}"`;N.push(` -e ${Q}=${X} \\`)}return D&&N.push(` ${D} \\`),j&&N.push(` ${j} \\`),N[N.length-1]?.endsWith(" \\")&&(N[N.length-1]=(N[N.length-1]||"").slice(0,-2)),N.join(`
|
|
193
|
+
`)}const g={"--volume":P=>{const[I]=P.split(":");return I?u(P)&&!P.startsWith("$BLOCKLET_APP_DIR/")&&!P.startsWith("$BLOCKLET_DATA_DIR/")?"Volume must start with $BLOCKLET_APP_DIR or $BLOCKLET_DATA_DIR":P.indexOf("..")>-1?'Volume cannot contain ".."':"":"Volume must start with key:value"}},v=P=>P.replace(/^[-]+/,"").replace(/-([a-z])/g,(j,N)=>N.toUpperCase()),m=P=>`--${P.replace(/([A-Z])/g,"-$1").toLowerCase()}`,x=[" -- ","~","&","|",">","<","{","}","[","]",";","$","!","*","%","&&","||",","],c=["rm ","sudo "];function w(P){if(P==="")return;if(/(\n|\\n|\\\n|\t|\\t|\\\t)/.test(P))throw new Error("Docker CMD is invalid");const D=P.toLocaleLowerCase();if(c.some(N=>D.indexOf(N)!==-1))throw new Error("Docker CMD is invalid");if(x.some(N=>P.indexOf(N)!==-1))throw new Error("Docker CMD is invalid");if(!/^(?:(?:[a-zA-Z0-9\-_.\/:=\s]+)|(?:\@{1,2}[a-zA-Z_][a-zA-Z0-9_]*))+$/.test(P))throw new Error("Docker CMD is invalid")}const S=Array.from(new Set(Object.keys(s).map(v))),b=["publish","volume"],p=n.object({workdir:n.string().trim().optional(),image:n.string().trim().regex(/^[^\s]+$/).optional(),shell:n.string().trim().optional(),volumes:n.array().items(n.string().trim()).optional(),script:n.string().trim().optional(),installNodeModules:n.boolean().optional(),skipWrapDockerfile:n.boolean().optional(),tmpfs:n.string().trim().optional(),command:n.string().allow("").default("").optional().custom((P,I)=>{try{return w(P),P}catch(D){return I.error("any.invalid",{message:D.message})}},"Docker CMD validation"),runBaseScript:n.boolean().optional(),...S.reduce((P,I)=>{const D=g[m(I)];return b.includes(I)?(P[I]=n.array().items(n.string().trim()).optional(),D?P[I]=n.array().items(n.string().trim().custom((j,N)=>{const T=D(j);return T?N.message(T):j})).optional():P[I]=n.array().items(n.string().trim()).optional(),P):(D?P[I]=n.string().trim().custom((j,N)=>{const T=D(j);return T?N.message(T):j}).optional():P[I]=n.string().trim().optional(),P)},{})}).optional(),k=P=>{const I=/^(?:[a-zA-Z0-9.-]+(?::[0-9]+)?\/)?(?:[a-z0-9]+(?:[._-][a-z0-9]+)*\/)?[a-z0-9]+(?:[._-][a-z0-9]+)*(:[a-zA-Z0-9_.-]+)?$/;return n.string().trim().regex(I).required().validate(P)},E=(P,I,D)=>{const j={};D.forEach(T=>{const z=v(T.key);b.includes(z)?j[z]=[...j[z]||[],T.value]:j[z]=T.value});const{error:N}=k(P);if(N)return{error:N,value:j};try{w(P)}catch(T){return{error:T,value:j}}return j.image=P,j.command=I||"",p.validate(j)};function A(P,I){const D=JSON.parse(JSON.stringify(I)),j=new Map;let N=1;const T=[];return D.forEach(z=>{if(z.key==="--publish"){const R=z.value.split(":");let X="127.0.0.1",U="",ne="";R.length===2?[U,ne]=R:R.length===3?[X,U,ne]=R:R.length===1&&(ne=R[0]||"");let G=j.get(U||"");if(G||(G=`$BLOCKLET_PORT_${N++}`,j.set(U||"",G)),!T.find(Z=>Z.port===U)){const Z=z.type||"docker",ee=`${P.replace(/\W/g,"-")}-${T.length+1}`;T.push({type:Z,proxyBehavior:z.proxyBehavior||"",name:ee,path:`/${ee}`,port:U||ne,containerPort:Number(ne)||0,hostIP:X,prefix:Z==="docker"?`/${ee}`:z.prefix||"*"})}}}),T}function B(P,I=!1){const D=[];if(!P)return D;for(const j of P){const N={name:j.key,default:j.value===`$${j.key}`?"":j.value,secure:j.secure!==void 0?j.secure:!1,shared:j.shared!==void 0?j.shared:!1,required:j.required!==void 0?j.required:!1,description:j.description||j.key};I||(N.custom=j.custom||""),D.push(N)}return D}function L(P,I){const D=JSON.parse(JSON.stringify(P));return I.split(".").map(N=>{const T=N.match(/(.+)\[(.+?)\]/);return T?[T[1],T[2]]:N}).flat().filter(Boolean).reduce((N,T)=>{if(!N||!T)return;const z=T?.match(/(.+?)=(.+)/);if(Array.isArray(N)&&z){const[,R,X]=z;return R&&X&&(N=N.find(U=>{const ne=Object.keys(U).find(G=>G.toLowerCase()===R.toLowerCase());return ne&&U[ne]===X})),N}const Q=Object.keys(N).find(R=>R.toLowerCase()===T.toLowerCase());return Q?N[Q]:void 0},D)}return le.addBlockletPrefixVolume=d,le.allowDockerArgs=s,le.autoSetDockerArgs=i,le.dockerArgsToCamelCase=v,le.dockerArgsValidator=g,le.dockerBuildCommand=y,le.dockerCamelCaseToDash=m,le.dockerCmdValidator=w,le.dockerParseCommand=f,le.dockerParseEnvironments=B,le.dockerParsePublishPorts=A,le.dockerSchema=p,le.getObjByPath=L,le.isVolumePath=u,le.multiValueArgs=b,le.notAllowUseCustomDockerArgs=o,le.parseDockerArgsToSchema=E,le.whiteDockerArgs=r,le}var Ot={},Bi;function yu(){if(Bi)return Ot;Bi=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.toBlockletDid=void 0;const e=xl(),t=bl(),n=jn(),r=s=>{if((0,n.isValid)(s))return s;const i=(0,t.toHex)($l.from(typeof s=="string"?s.trim():s));return(0,n.fromPublicKey)(i,{role:e.types.RoleType.ROLE_ANY})};return Ot.toBlockletDid=r,Ot}var Me={},$i;function vu(){if($i)return Me;$i=1;var e=Me&&Me.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Me,"__esModule",{value:!0}),Me.didExtension=Me.fileExtension=void 0;const t=e(cs),n=e(dc()),r=jn(),s=o=>({type:"file",base:o.string(),validate(a,{error:u}){return a&&typeof a=="string"?{value:a}:{errors:u("file.empty",{file:a})}},messages:{"file.empty":'file "{{#file}}" must be non-empty string',"file.enoent":'file "{{#file}}" does not exist',"file.error.generic":'file could not be read. message: "{{#message}}"'},rules:{exists:{multi:!1,method({baseDir:a=null,canSkip:u=()=>!1}={}){return this.$_addRule({name:"exists",args:{baseDir:a,canSkip:u}})},args:[{name:"baseDir",assert:a=>t.default.existsSync(a),message:"baseDir must exist"},{name:"canSkip",assert:a=>typeof a=="function",message:"canSkip must be a function"}],validate(a,{error:u},{baseDir:d,canSkip:h}={}){if(typeof h=="function"&&h(d,a))return a;try{return t.default.statSync(n.default.join(d,a)),a}catch(f){return f.code==="ENOENT"?u("file.enoent",{file:a}):u("file.error.generic",{message:f.message})}}}}});Me.fileExtension=s;const i=o=>({type:"DID",base:o.string(),validate(a,{error:u}){return!a||typeof a!="string"?{errors:u("did.empty",{did:a})}:(0,r.isValid)(a)===!1?{errors:u("did.invalid",{did:a})}:{value:a}},messages:{"did.empty":'did "{{#did}}" must be non-empty string',"did.invalid":'did "{{#did}}" is not valid'}});return Me.didExtension=i,Me.default={fileExtension:s,didExtension:i},Me}var Pt={},Jn={exports:{}};const bu=["assert","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","module","net","os","path","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","tty","url","util","v8","vm","zlib"];var Fi;function xu(){if(Fi)return Jn.exports;Fi=1;var e=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"),t=bu,n=["node_modules","favicon.ico"],r=Jn.exports=function(i){var o=[],a=[];if(i===null)return a.push("name cannot be null"),s(o,a);if(i===void 0)return a.push("name cannot be undefined"),s(o,a);if(typeof i!="string")return a.push("name must be a string"),s(o,a);if(i.length||a.push("name length must be greater than zero"),i.match(/^\./)&&a.push("name cannot start with a period"),i.match(/^_/)&&a.push("name cannot start with an underscore"),i.trim()!==i&&a.push("name cannot contain leading or trailing spaces"),n.forEach(function(f){i.toLowerCase()===f&&a.push(f+" is a blacklisted name")}),t.forEach(function(f){i.toLowerCase()===f&&o.push(f+" is a core module name")}),i.length>214&&o.push("name can no longer contain more than 214 characters"),i.toLowerCase()!==i&&o.push("name can no longer contain capital letters"),/[~'!()*]/.test(i.split("/").slice(-1)[0])&&o.push(`name can no longer contain special characters ("~'!()*")`),encodeURIComponent(i)!==i){var u=i.match(e);if(u){var d=u[1],h=u[2];if(encodeURIComponent(d)===d&&encodeURIComponent(h)===h)return s(o,a)}a.push("name can only contain URL-friendly characters")}return s(o,a)};r.scopedPackagePattern=e;var s=function(i,o){var a={validForNewPackages:o.length===0&&i.length===0,validForOldPackages:o.length===0,warnings:i,errors:o};return a.warnings.length||delete a.warnings,a.errors.length||delete a.errors,a};return Jn.exports}var Wi;function ws(){return Wi||(Wi=1,(function(e){var t=Pt&&Pt.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.validateName=e.validateNewDid=void 0;const n=jn(),r=t(xu()),s=32,i=a=>{if((0,n.toTypeInfo)(a).role!==n.types.RoleType.ROLE_BLOCKLET)throw new Error("Blocklet DID's type must be ROLE_BLOCKLET")};e.validateNewDid=i;const o=(a,{checkDid:u=!0}={})=>{if((0,n.isValid)(a))u&&(0,e.validateNewDid)(a);else{const{validForNewPackages:d,errors:h=[],warnings:f=[]}=(0,r.default)(a);if(!d)throw new Error(h[0]||f[0]);if(a.length>s)throw new Error("Blocklet name is too long")}};e.validateName=o,e.default={validateName:e.validateName,validateNewDid:e.validateNewDid}})(Pt)),Pt}var qi;function Ss(){if(qi)return W;qi=1;var e=W&&W.__importDefault||function(M){return M&&M.__esModule?M:{default:M}};Object.defineProperty(W,"__esModule",{value:!0}),W.Joi=W.eventsSchema=W.installBlockletDescriptionSchema=W.installBlockletTitleSchema=W.resourceBundleSchema=W.authConfigSchema=W.cacheableSchema=W.statsSchema=W.titleSchema=W.themeSchema=W.signatureSchema=W.serviceSchema=W.scriptsSchema=W.personSchema=W.navigationSchema=W.navigationItemSchema=W.updateMountPointSchema=W.mountPointSchema=W.logoSchema=W.interfaceSchema=W.environmentNameSchema=W.environmentSchema=W.engineSchema=W.endpointSchema=W.distSchema=W.descriptionSchema=W.createBlockletSchema=W.componentSchema=W.blockletNameSchema=W.blockletMetaSchema=void 0;const t=e(cs),n=e(Gr()),r=e(cu()),s=e(du()),i=hu(),o=e(mu),a=wl(),u=jn(),d=gu(),h=ns(),f=yu(),y=vu(),g=ws(),v=Sl(),m=r.default.default,x="/.well-known",c=n.default.extend(i.semver).extend(i.semverRange).extend(y.fileExtension).extend(y.didExtension);W.Joi=c;const w=(M,V)=>(0,v.checkLink)(M)?M:V.message(`Invalid navigation link: ${M}
|
|
194
|
+
|
|
195
|
+
A valid navigation link should be a relative url which start with '/' or a absolute url, such as:
|
|
196
|
+
- /en/home
|
|
197
|
+
- /zh/home
|
|
198
|
+
- https://www.arcblock.io
|
|
199
|
+
`),S=(M,V)=>!M||(0,o.default)(M)?M:V.message(`Invalid navigation id: ${M}
|
|
200
|
+
|
|
201
|
+
A valid navigation id is should follow the rules of javascript variables, such as:
|
|
202
|
+
- foo
|
|
203
|
+
- fooBar
|
|
204
|
+
- foo123
|
|
205
|
+
|
|
206
|
+
see detail in https://www.npmjs.com/package/is-var-name
|
|
207
|
+
`),b=c.string().trim().min(1).custom(M=>{if(m(M)>h.MAX_TITLE_LENGTH)throw new Error(`title length should not exceed ${h.MAX_TITLE_LENGTH} (see: https://www.npmjs.com/package/cjk-length)`);return M}).meta({className:"TTitle"});W.titleSchema=b;const p=c.string().trim().min(3).max(160).meta({className:"TDescription"});W.descriptionSchema=p;const k=c.string().trim().min(3).max(20).messages({"*":"Title length must be between 3 and 20 characters"}).meta({className:"TInstallBlockletTitle"});W.installBlockletTitleSchema=k;const E=c.string().trim().min(3).max(80).messages({"*":"Description length must be between 3 and 80 characters"}).meta({className:"TInstallBlockletDescription"});W.installBlockletDescriptionSchema=E;const A=c.string().uri({scheme:["http","https"],allowRelative:!0}).allow("").custom((M,V)=>M.includes(a.WELLKNOWN_BLOCKLET_LOGO_PATH)?V.message(`logo url should not include ${a.WELLKNOWN_BLOCKLET_LOGO_PATH}`):M).meta({className:"TLogo"});W.logoSchema=A;const B=c.string().trim().min(1),L=B.meta({className:"TMountPoint"}).custom((M,V)=>(0,v.isValidUrlPath)(M)?M:V.message(`mountPoint cannot contain such characters space $*+~()'"!:@\\`));W.mountPointSchema=L;const P=B.meta({className:"TUpdateMountPoint"}).custom(M=>(0,v.urlPathFriendly)(M));W.updateMountPointSchema=P;const I=c.string().custom(M=>((0,g.validateName)(M),M)).meta({className:"TBlockletName"});W.blockletNameSchema=I;const D=[],j=c.string().trim().min(1).max(50).required().custom((M,V)=>M.startsWith("BLOCKLET")&&!D.includes(M)?V.message("Env name can not start with BLOCKLET_"):M.startsWith("COMPONENT")?V.message("Env name can not start with COMPONENT_"):M.startsWith("ABTNODE")?V.message("Env name can not start with ABTNODE_"):/[^\w]/.test(M)?V.message('Env name can include only numbers or letters or "_"'):M).meta({className:"TEnvironmentName",unknownType:"any"});W.environmentNameSchema=j;const N=c.object({name:j.required(),description:c.string().trim().required(),default:c.string().optional().allow("").default(""),required:c.boolean().default(!1),secure:c.boolean().default(!1),validation:c.string().optional(),shared:c.boolean().default(M=>M.secure?!1:void 0)}).custom((M,V)=>M.secure&&M.default?V.message(`Cannot declare default value for secure env ${M.name}`):M).meta({className:"TEnvironment",unknownType:"any"});W.environmentSchema=N;const T=c.object({dev:c.string().trim().min(1),e2eDev:c.string().trim().min(1),preFlight:c.string().trim().min(1),preInstall:c.string().trim().min(1),postInstall:c.string().trim().min(1),preStart:c.string().trim().min(1),postStart:c.string().trim().min(1),preStop:c.string().trim().min(1),preUninstall:c.string().trim().min(1),preConfig:c.string().trim().min(1)}).rename("pre-flight","preFlight").rename("pre-install","preInstall").rename("post-install","postInstall").rename("pre-start","preStart").rename("post-start","postStart").rename("pre-stop","preStop").rename("pre-uninstall","preUninstall").rename("pre-config","preConfig").optional().meta({className:"TScripts",unknownType:"any"});W.scriptsSchema=T;const z=c.object({name:c.string().required().trim(),config:c.object().optional().default({})}).unknown(!0).meta({className:"TService",unknownType:"any"});W.serviceSchema=z;const Q=c.object({type:c.string().trim(!0).min(1).required(),path:c.string().required(),meta:c.object({vcType:c.string(),payable:c.boolean(),params:c.array().items({name:c.string().required().trim(),description:c.string().required().trim()})})}).meta({className:"TEndpoint",unknownType:"any"});W.endpointSchema=Q;const R=c.string().trim().custom((M,V)=>{const de=M.split("/").filter(Boolean);return de.length===0?V.message("cacheable path must be a valid pathname that is not /"):`/${de.join("/")}`}).meta({className:"TPathPrefix",unknownType:"any"});W.cacheableSchema=R;const X=c.object({type:c.string().lowercase().valid(...h.BLOCKLET_INTERFACE_TYPES).required(),name:c.string().trim().required(),path:c.string().trim().default("/"),prefix:c.string().trim().min(1).default(h.BLOCKLET_DYNAMIC_PATH_PREFIX),containerPort:c.number().port().optional(),hostIP:c.string().trim().ip({version:["ipv4","ipv6"]}).optional(),protocol:c.string().lowercase().valid(...h.BLOCKLET_INTERFACE_PROTOCOLS).default("http"),port:c.alternatives().try(c.string().uppercase().default(h.BLOCKLET_DEFAULT_PORT_NAME),c.object({internal:c.string().uppercase().required(),external:c.number().port().required()})).default(h.BLOCKLET_DEFAULT_PORT_NAME),cacheable:c.array().items(R).unique(),services:c.array().items(z).unique("name"),endpoints:c.array().items(Q).unique("type"),pageGroups:c.array().items(c.string().min(1).max(255).trim()).unique(),proxyBehavior:c.string().valid("service","direct").default("service").optional()}).meta({className:"TInterface",unknownType:"any"});W.interfaceSchema=X;const U=c.alternatives().try(c.string().required(),c.object({url:c.string().uri({scheme:["http","https","file"]}).required(),name:I.required(),version:c.alternatives().try(c.string().valid("latest"),c.semverRange().valid())}),c.object({store:c.string().uri({scheme:["http","https"]}).required(),name:I.required(),version:c.alternatives().try(c.string().valid("latest"),c.semverRange().valid()).default("latest")})),ne=c.object({platform:c.string().valid(...h.BLOCKLET_PLATFORMS).optional(),interpreter:c.string().valid("binary","node","blocklet","bun").default("node"),source:U,args:c.array().items(c.string()).optional().default([])}).meta({className:"TEngine",unknownType:"any"});W.engineSchema=ne;const G=c.object({name:c.string().min(1).required(),email:c.string().email({tlds:!1}).optional(),url:c.string().uri().optional()}).meta({className:"TPerson",unknownType:"any"});W.personSchema=G;const Z=c.object({tarball:c.alternatives().try(c.string().uri(),c.string()).required(),integrity:c.string().required(),size:c.number().optional()}).meta({className:"TDist",unknownType:"any"});W.distSchema=Z;const ee=c.object({downloads:c.number().integer().greater(-1),star:c.number().default(0),purchases:c.number().default(0)}).meta({className:"TStats",unknownType:"any"});W.statsSchema=ee;const Ge={source:c.alternatives().try(c.object({url:c.alternatives().try(c.string().uri(),c.array().items(c.string().uri()).min(1)).required(),version:c.alternatives().try(c.string().valid("latest"),c.semverRange().valid())}),c.object({store:c.string().uri({scheme:["http","https"]}),name:I.required(),version:c.alternatives().try(c.string().valid("latest"),c.semverRange().valid()).default("latest")})).required(),required:c.boolean(),title:b,description:p,mountPoint:L,name:I},rt=(M,V)=>c.object(M).custom((de,xe)=>!V&&de.source&&de.source.name&&!de.source.store?xe.message(`missing 'store' in source of component ${de.name}`):de),Xe=rt(Ge).meta({className:"TComponent",unknownType:"any"});W.componentSchema=Xe;const te=rt(Ge,!0),K=({checkStore:M}={})=>{const V=[Xe,te];return c.array().items(M?V[0]:V[1]).optional().default([])},oe=c.object({type:c.string().required(),name:c.string().required(),signer:c.string().required(),pk:c.string().required(),created:c.string().isoDate().required(),sig:c.string().required(),excludes:c.array().items(c.string()).optional(),appended:c.array().items(c.string()).optional(),delegatee:c.string(),delegateePk:c.string(),delegation:c.string()}).meta({className:"TSignature",unknownType:"any"});W.signatureSchema=oe;const ue=["en","zh","fr","ru","ar","es","de","pt","ja","hi"],se={id:c.string().custom(S),title:c.alternatives().try(c.string().min(1).max(h.MAX_TITLE_LENGTH),c.object().min(1).pattern(c.string().valid(...ue),c.string().min(1).max(h.MAX_TITLE_LENGTH))).required(),description:c.alternatives().try(c.string().min(1).max(h.MAX_DESCRIPTION_LENGTH),c.object().min(1).pattern(c.string().valid(...ue),c.string().min(1).max(h.MAX_DESCRIPTION_LENGTH))),link:c.alternatives().try(c.string().custom(w),c.object().min(1).pattern(c.string().valid(...ue),c.string().custom(w))),component:c.string().min(1),section:c.array().items(c.string().valid("header","footer","bottom","social","dashboard","sessionManager","userCenter","bottomNavigation")).single(),role:c.array().items(c.string().min(1)).single(),icon:c.string().min(1),visible:c.boolean(),private:c.boolean()},dt=c.object({...se,items:c.array().items(c.object({...se}).rename("child","component"))}).rename("child","component").meta({className:"TNavigationItem",unknownType:"any"});W.navigationItemSchema=dt;const it=c.array().items(dt).unique((M,V)=>M.id&&V.id?M.id===V.id:!1).meta({className:"TNavigation",unknownType:"any"});W.navigationSchema=it;const ot=c.object({background:c.alternatives().try(c.string().min(1),c.object({header:c.string().min(1),footer:c.string().min(1),default:c.string().min(1)}).min(1))}).meta({className:"TTheme",unknownType:"any"});W.themeSchema=ot;const ht=c.object({whoCanAccess:c.string().valid("owner","invited","all"),profileFields:c.array().items(c.string().valid("fullName","email","avatar","phone")).unique(),ignoreUrls:c.array().items(c.string().min(1)),allowSwitchProfile:c.boolean(),blockUnauthenticated:c.boolean(),blockUnauthorized:c.boolean()}).options({stripUnknown:!0}).meta({className:"TAuthConfig",unknownType:"any"});W.authConfigSchema=ht;const ft=c.object({type:c.string().trim().min(1).required(),description:c.string().trim().min(1)}),kt=c.object({did:c.DID().trim().required(),type:c.string().trim().min(1).required(),public:c.boolean()}).meta({className:"TResourceBundle",unknownType:"any"});W.resourceBundleSchema=kt;const me=c.array().items(c.object({type:c.string().trim().min(1).max(128).pattern(/^(?!blocklet\.)[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/).message('Event type must be in format of "[noun.]verb" like "post.published" or "post.comment.published", and prefix "blocklet." is reserved').required(),description:c.string().trim().min(1).max(256).required()})).unique("type").meta({className:"TEvent",unknownType:"any"});W.eventsSchema=me;const jt={did:c.DID().trim().required(),version:c.semver().valid().required(),name:c.string().optional(),description:p.required(),group:c.string().valid(...h.BLOCKLET_GROUPS),main:c.string().trim(),title:b.optional().allow(""),logo:c.string().trim().optional(),specVersion:c.semver().valid().gte("1.0.0").optional(),author:G.optional(),contributors:c.array().items(G).optional(),maintainers:c.array().items(G).optional(),community:c.string().uri().optional().allow("").default(""),documentation:c.string().uri().optional().allow("").default(""),homepage:c.string().uri().optional().allow("").default(""),license:c.string().optional().allow("").default(""),support:c.alternatives().try(c.string().uri(),c.string().email({tlds:!1})).optional(),nftFactory:c.DID().optional().allow("").default(""),payment:c.object({price:c.array().max(1).items(c.object({value:c.number().greater(0).required(),address:c.DID().required()})).default([]),share:c.array().max(4).items(c.object({name:c.string().required(),address:c.DID().required(),value:c.number().greater(0).max(1).required()})).default([]).custom(M=>{if(M.length===0)return M;const V=M.reduce((de,xe)=>de+xe.value,0);if(V!==1)throw new Error(`Invalid blocklet payment share config: total share must be 1, got ${V}`);return M},"invalid blocklet share"),componentPrice:c.array().items(c.object({parentPriceRange:c.array().items(c.number()).custom((M,V)=>M.length!==2?V.message("length of range should be 2"):M[0]<0?V.message("the first value should not less than 0 in range"):M[1]<=M[0]?V.message("the second value should greater than the first value in range"):M),type:c.string().valid("fixed","percentage").required(),value:c.number().greater(0).required()})).single()}).default({price:[],share:[]}),keywords:c.alternatives().try(c.string().trim().min(1),c.array().items(c.string().min(1))).optional(),tags:c.alternatives().try(c.string().trim().min(1),c.array().items(c.string().min(1))).optional(),gitHash:c.string().optional().allow(""),repository:c.alternatives().try(c.string().min(1),c.object({type:c.string().valid("git","https","svn").required(),url:c.string().uri().required(),directory:c.string()})).optional(),timeout:c.object({start:c.number().min(10).max(600),script:c.number().min(1).max(1800)}).default({start:60}),requirements:c.object({abtnode:c.semverRange().valid(),server:c.semverRange().valid(),os:c.alternatives().try(c.string().valid("*",...h.BLOCKLET_PLATFORMS),c.array().items(c.string().valid(...h.BLOCKLET_PLATFORMS)).min(1)),cpu:c.alternatives().try(c.string().valid("*",...h.BLOCKLET_ARCHITECTURES),c.array().items(c.string().valid(...h.BLOCKLET_ARCHITECTURES)).min(1)),fuels:c.array().items(c.object({endpoint:c.string().trim().required(),address:c.string().trim(),value:c.string().trim().required(),reason:c.string().trim().required()})),nodejs:c.semverRange().valid(),aigne:c.boolean().optional()}).default({server:h.BLOCKLET_LATEST_REQUIREMENT_SERVER,os:"*",cpu:"*",nodejs:"*"}),interfaces:c.array().items(X).unique("name").custom((M,V)=>{if(M.filter(_e=>_e.type===h.BLOCKLET_INTERFACE_TYPE_WEB).length>1)return V.message(`Only one ${h.BLOCKLET_INTERFACE_TYPE_WEB} interface can be declared`);const xe=M.filter(_e=>_e.type===h.BLOCKLET_INTERFACE_TYPE_WELLKNOWN);for(const _e of xe)if(!_e.prefix.startsWith(x))return V.message(`Wellknown path prefix must start with: ${x}`);return M}).default([]),environments:c.array().items(N).default([]).optional().custom((M,V)=>{if(M&&M.length){const de=M.filter((xe,_e)=>M.findIndex(st=>st.name===xe.name)!==_e);if(de.length)return V.message(`find duplicate environment names ${de.map(xe=>xe.name).join(", ")}`)}return M}),scripts:T,capabilities:c.object({clusterMode:c.boolean(),didSpace:c.string().valid(...Object.values(h.BLOCKLET_APP_SPACE_REQUIREMENT)).optional(),navigation:c.boolean().default(!0),serverless:c.boolean().optional(),component:c.boolean(),sitemap:c.boolean().optional(),mcp:c.boolean().optional(),singleton:c.boolean().optional()}).default({}),files:c.array().items(c.string().trim()).optional(),resource:c.object({exportApi:c.string().trim(),bundles:c.array().items(kt),types:c.array().items(ft).max(10)}),engine:c.alternatives().try(ne,c.array().items(ne)).optional(),screenshots:c.array().items(c.string().min(1)).optional().default([]),videos:c.array().items(c.string().pattern(/^https:\/\/(www\.)?(youtube\.com|youtu\.be|vimeo\.com)\/[\w\-/?&=]+/).message("Each video URL must be a valid YouTube or Vimeo link")).max(3).optional(),logoUrl:c.string().optional().allow(""),dist:Z.optional(),stats:ee.optional(),htmlAst:c.any().optional(),path:c.string().optional(),signatures:c.array().items(oe).optional(),lastPublishedAt:c.string().isoDate().optional().allow(null),components:K(),navigation:it,theme:ot,copyright:c.object({owner:c.string().min(1),year:c.alternatives().try(c.string(),c.number())}),bundleName:c.string(),bundleDid:c.DID().trim(),storeId:c.string(),events:me.optional()},Ut=c.object(jt).options({stripUnknown:!0,noDefaults:!1}).meta({className:"TBlockletMeta",unknownType:"any"});W.blockletMetaSchema=Ut;const Tt=(M,{ensureFiles:V=!1,ensureDist:de=!1,ensureComponentStore:xe=!0,ensureName:_e=!1,skipValidateDidName:st=!1,...Pn}={})=>((!M||!t.default.existsSync(M))&&(V=!1),c.object({...jt,owner:c.object({avatar:c.string().optional(),did:c.DID().trim().required(),fullName:c.string().trim().required(),email:c.string().optional().allow(null).empty("").default("")}).optional(),logo:V?c.file().trim().exists({baseDir:M}).optional():c.string().trim().optional(),files:c.array().items(V?c.file().exists({baseDir:M,canSkip:(ae,Be)=>[h.BLOCKLET_ENTRY_FILE,h.BLOCKLET_BUNDLE_FILE].includes(Be)||(0,s.default)(Be)}):c.string().trim()).optional(),dist:de?Z.required():Z.optional(),components:K({checkStore:xe}),name:_e?c.string().optional():c.string().required(),egress:c.boolean().optional().default(!0),docker:d.dockerSchema}).options({stripUnknown:!0,noDefaults:!1,...Pn}).rename("children","components").custom((ae,Be)=>{const{did:q,name:H,docker:J}=ae;if(J){const{image:he,dockerfile:Ee,network:$e}=J;if(he&&Ee)return Be.message("Image and dockerfile cannot be set at the same time");if($e)return Be.message("ExportPorts and network cannot be set at the same time");Ee&&(ae.files||(ae.files=[]),ae.files.push(Ee))}let re;if((0,u.isValid)(q))try{return(0,g.validateNewDid)(q),ae}catch(he){re=he}if(H){(0,g.validateName)(H,{checkDid:!st});const he=(0,f.toBlockletDid)(H);return he!==q?Be.message(`The did of name "${H}" should be "${he}"`):ae}return re?Be.message(re.message):ae}));return W.createBlockletSchema=Tt,W.default={blockletNameSchema:I,componentSchema:Xe,endpointSchema:Q,serviceSchema:z,createBlockletSchema:Tt,interfaceSchema:X,environmentSchema:N,environmentNameSchema:j,scriptsSchema:T,personSchema:G,distSchema:Z,titleSchema:b,descriptionSchema:p,logoSchema:A,navigationSchema:it,themeSchema:ot,mountPointSchema:L,updateMountPointSchema:P,authConfigSchema:ht,resourceBundleSchema:kt,installBlockletTitleSchema:k,installBlockletDescriptionSchema:E,eventsSchema:me,Joi:c},W}var be={},Ui;function wu(){if(Ui)return be;Ui=1;var e=be&&be.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(be,"__esModule",{value:!0}),be.setService=be.findService=be.getDefaultServiceConfig=be.getServiceConfig=void 0;const t=e(hc),n=Ss(),r={},s=d=>{r[d.name]={validate:d.schema.validate.bind(d.schema),defaultConfig:d.default}};be.setService=s,s({name:"auth",schema:n.authConfigSchema,default:{}});const i=d=>{if(!d)throw new Error("service name should not be empty");const h=r[d];if(!h)throw new Error(`service ${d} does not exist`);return h},o=(d,h,{validate:f}={})=>{const y=i(d),g=(0,t.default)(h||{}),{value:v,error:m}=y.validate(g);if(f&&m)throw new Error(`Invalid blocklet service config: ${m.details.map(x=>x.message).join(", ")}`);return v};be.getServiceConfig=o;const a=d=>{const{defaultConfig:h}=i(d);return h};be.getDefaultServiceConfig=a;const u=(d,h)=>{const f=[h];return(d||[]).find(y=>f.includes(y.name))};return be.findService=u,be.default={getServiceConfig:o,getDefaultServiceConfig:a,findService:u,setService:s},be}var zi;function Su(){if(zi)return Qe;zi=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.fixAndValidateService=Qe.validateMeta=void 0;const e=Ss(),t=wu(),n=s=>(!s.interfaces||!s.interfaces.length||s.interfaces.forEach(i=>{i.services&&i.services.length&&i.services.forEach(o=>{o.config=(0,t.getServiceConfig)(o.name,o.config,{validate:!0})})}),s);Qe.fixAndValidateService=n;const r=(s,{ensureFiles:i=!1,ensureDist:o=!1,ensureComponentStore:a=!0,ensureName:u=!1,skipValidateDidName:d=!1,schemaOptions:h={}}={})=>{const f=(0,e.createBlockletSchema)(null,{ensureFiles:i,ensureDist:o,ensureComponentStore:a,ensureName:u,skipValidateDidName:d,...h}),{value:y,error:g}=f.validate(s);if(g)throw new Error(`Invalid blocklet meta: ${g.details.map(v=>v.message).join(", ")}`);return y};return Qe.validateMeta=r,Qe.default=r,Qe}var Ki;function ku(){return Ki||(Ki=1,(function(e){var t=Re&&Re.__createBinding||(Object.create?(function(p,k,E,A){A===void 0&&(A=E);var B=Object.getOwnPropertyDescriptor(k,E);(!B||("get"in B?!k.__esModule:B.writable||B.configurable))&&(B={enumerable:!0,get:function(){return k[E]}}),Object.defineProperty(p,A,B)}):(function(p,k,E,A){A===void 0&&(A=E),p[A]=k[E]})),n=Re&&Re.__setModuleDefault||(Object.create?(function(p,k){Object.defineProperty(p,"default",{enumerable:!0,value:k})}):function(p,k){p.default=k}),r=Re&&Re.__importStar||(function(){var p=function(k){return p=Object.getOwnPropertyNames||function(E){var A=[];for(var B in E)Object.prototype.hasOwnProperty.call(E,B)&&(A[A.length]=B);return A},p(k)};return function(k){if(k&&k.__esModule)return k;var E={};if(k!=null)for(var A=p(k),B=0;B<A.length;B++)A[B]!=="default"&&t(E,k,A[B]);return n(E,k),E}})(),s=Re&&Re.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.fixService=e.fixInterfaces=e.parsePerson=e.formatPerson=e.fixName=e.fixTags=e.fixPerson=e.fixKeywords=e.fixFiles=e.fixRepository=e.fixRequired=void 0;const i=s(kl),o=r(au()),a=ns(),u=Su();Object.defineProperty(e,"fixService",{enumerable:!0,get:function(){return u.fixAndValidateService}});const d=ws(),h=(p,k)=>{p.description||(p.description=`Blocklet from ${k}`),p.version||(p.version=a.BLOCKLET_DEFAULT_VERSION)};e.fixRequired=h;const f=p=>{if(p.repository&&(typeof p.repository=="string"&&(p.repository={type:"git",url:p.repository}),p.repository.url)){const k=o.fromUrl(p.repository.url);k&&(p.repository.url=k.getDefaultRepresentation()==="shortcut"?k.https():k.toString())}};e.fixRepository=f;const y=p=>{Array.isArray(p.files)?p.files&&(p.files=p.files.filter(k=>!(!k||typeof k!="string"))):delete p.files};e.fixFiles=y;const g=p=>{typeof p.keywords=="string"&&(p.keywords=p.keywords.split(/,\s+/)),p.keywords&&!Array.isArray(p.keywords)?delete p.keywords:p.keywords&&(p.keywords=p.keywords.filter(k=>!(typeof k!="string"||!k)))};e.fixKeywords=g;const v=p=>{typeof p.tags=="string"&&(p.tags=p.tags.split(/,\s+/)),p.tags&&!Array.isArray(p.tags)?delete p.tags:p.tags&&(p.tags=p.tags.filter(k=>!(typeof k!="string"||!k)))};e.fixTags=v;const m=(p,k)=>(p.author&&(p.author=k(p.author)),["maintainers","contributors"].forEach(E=>{Array.isArray(p[E])&&(p[E]=p[E].map(k))}),p),x=p=>{if(!p)return"";if(typeof p=="string")return p;const k=p.name||"",E=p.url||p.web,A=E?` (${E})`:"",B=p.email||p.mail,L=B?` <${B}>`:"";return k+L+A};e.formatPerson=x;const c=p=>{if(typeof p!="string")return p;const k=p.match(/^([^(<]+)/),E=p.match(/\(([^)]+)\)/),A=p.match(/<([^>]+)>/),B={};return k&&k[0].trim()&&(B.name=k[0].trim()),A&&([,B.email]=A),E&&([,B.url]=E),B};e.parsePerson=c;const w=p=>(m(p,x),m(p,c),p);e.fixPerson=w;const S=(p,k=!0)=>{if(Array.isArray(p.interfaces)||(p.interfaces=[]),p.interfaces.length)return p.interfaces.forEach(L=>{L.type===a.BLOCKLET_INTERFACE_TYPE_WEB&&(L.protocol="http")}),p;const A=(0,i.default)(p,"capabilities.dynamicPathPrefix",!0)?a.BLOCKLET_DYNAMIC_PATH_PREFIX:"/",B=({type:L="web",name:P,path:I="/",protocol:D="http",port:j=a.BLOCKLET_DEFAULT_PORT_NAME})=>{p.interfaces.push({type:L,name:P,path:I,prefix:A,port:j,protocol:D})};return[a.BLOCKLET_INTERFACE_PUBLIC].forEach(L=>{p[L]&&B({name:L,path:p[L]})}),Array.isArray(p.exposeServices)&&p.exposeServices.forEach(L=>{B({type:"service",name:L.protocol,protocol:L.protocol,port:{internal:`BLOCKLET_${L.protocol}_PORT`.toUpperCase(),external:L.port}})}),k&&(delete p.publicUrl,delete p.adminUrl,delete p.configUrl,delete p.docUrl,delete p.exposeServices,p.capabilities&&delete p.capabilities.dynamicPathPrefix),p};e.fixInterfaces=S;const b=p=>{const{did:k}=p;try{(0,d.validateNewDid)(k),p.name=k}catch{}return p};e.fixName=b,e.default={fixRequired:h,fixRepository:f,fixFiles:y,fixKeywords:g,fixPerson:w,fixTags:v,fixName:b,formatPerson:x,parsePerson:c,fixInterfaces:S,fixService:u.fixAndValidateService}})(Re)),Re}var ju=ku();function ks({owner:e,locale:t}){return l.jsxs(F,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.fullName,e.did?l.jsx(Zo,{sx:{lineHeight:"initial","&::before":{content:'"("'},"&::after":{content:'")"'}},did:e.did,compact:!0,size:14,locale:t}):null]})}ks.propTypes={owner:_.object.isRequired,locale:_.string.isRequired};const Tu="install-blocklet-from-URL",js=()=>{const[e,t]=Xr(Tu,"[]",{raw:!0}),n=s=>{const i=s.trim(),o=JSON.parse(e),a=o.findIndex(u=>u===i);a!==0&&(a>0&&o.splice(a,1),o.length>=10&&o.splice(9),o.unshift(i),t(JSON.stringify(o)))},r=s=>{if(!s)return;const i=JSON.parse(e),o=s.trim(),a=i.findIndex(u=>u===o);a>-1&&(i.splice(a,1),t(JSON.stringify(i)))};return{urls:e?JSON.parse(e):[],addUrlRecord:n,removeUrlRecord:r}};function Ts({value:e="",onValueChange:t=()=>{},children:n=null,helperText:r=""}){const{urls:s,removeUrlRecord:i}=js(),o=(a,u)=>{a.preventDefault(),a.stopPropagation(),i(u)};return l.jsxs(F,{children:[l.jsx(Fo,{freeSolo:!0,options:s,inputValue:e,onInputChange:(a,u)=>{t(u)},disableClearable:!0,popupIcon:null,renderInput:a=>Ae.cloneElement(n,{...a}),renderOption:(a,u)=>O.createElement(Wo,{...a,key:u,secondaryAction:l.jsx($o,{edge:"end","aria-label":"delete",onClick:d=>o(d,u),children:l.jsx(_a,{})})},l.jsx(Ra,{role:void 0,dense:!0,sx:{paddingLeft:0,paddingRight:30,"&:hover":{backgroundColor:"transparent"}},children:l.jsx(qo,{primary:u,sx:{"& span":{display:"block",width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}})})),slotProps:{listbox:{sx:{maxHeight:300,overflow:"auto"}}}}),l.jsx(La,{style:{margin:0},children:r})]})}Ts.propTypes={onValueChange:_.func,children:_.node,value:_.string,helperText:_.string};function Cs({onClick:e}){const{t}=Ce();return l.jsx(mc,{title:t("launchBlocklet.withoutWallet"),icon:l.jsx(je,{icon:gc,fontSize:"1em"}),onClick:e})}Cs.propTypes={onClick:_.func.isRequired};function Es({defaultUrl:e="",onCancel:t,onSuccess:n,onError:r=()=>{},mode:s="install",handleText:i={}}){const{api:o}=wt(),{api:a,session:u}=fc(),[d,h]=O.useState(!1),[f,y]=O.useState(""),{t:g,locale:v}=Ce(),m={dist:{}},{encryptKey:x}=jl(),[c,w]=O.useState(e),[S,b]=O.useState(e?1:0),[p,k]=O.useState(m),[E,A]=O.useState(!1),[B,L]=O.useState(""),[P]=Xr("instant-blocklet-install",!1),[I,D]=O.useState({}),j=s==="component",N=j?!0:!e,{addUrlRecord:T}=js(),z=O.useMemo(()=>(u.user?.connectedAccounts||[]).some(ue=>ue.provider===fl.WALLET),[u.user]),Q=O.useMemo(()=>{let K=c.trim();return!K.startsWith("https://")&&!K.startsWith("http://")&&!K.startsWith("file://")&&(K=`file://${K}`),K},[c]),R=async()=>{k(m),y(null),h(!0);const K=Q;try{const oe=decodeURIComponent(K);try{new URL(oe)}catch{throw new Error("Invalid URL")}const{meta:ue,inStore:se,registryUrl:dt}=await o.getBlockletMetaFromUrl({input:{url:oe}});k(ue),D({inStore:se,registryUrl:dt,inputUrl:K}),T(K)}catch(oe){console.error(oe);const ue=`Blocklet Install failed: ${br(oe)}`;y(ue),r(oe)}finally{h(!1)}},X=()=>{if(j){n({meta:p,...I}),t();return}if(P){h(!0),A(!0);return}const K=lt(window?.env?.apiPrefix??"/","/launch-blocklet/install");window.location.href=kn(K,{blocklet_meta_url:decodeURIComponent(Q.trim()),from:"url"})},U=()=>{h(!1),A(!1),n({meta:p,...I}),t()},ne=()=>{h(!1),A(!1)};O.useEffect(()=>{e&&R()},[e]);const G=O.useMemo(()=>({title:p.title,wt:Tl(p),blockletMetaUrl:decodeURIComponent(c.trim())}),[p,c]),Z=O.useCallback(async()=>{if(z||P){L("");return}const K=new URL(window.location.href);K.pathname=lt(window?.env?.apiPrefix??"/","/api/did/launch-free-blocklet-by-session/token"),K.searchParams.set("_ek_",x),Object.keys(G).forEach(ue=>{K.searchParams.set(ue,G[ue])});const{data:oe}=await a.get(K.href);oe.url?L(oe.url):L("")},[z,G,a,x,P]);O.useEffect(()=>{Z()},[Z]);const ee=O.useMemo(()=>z&&B?{...G,nw:B,skipMigrateAccount:!0}:G,[G,B,z]),Ie=[{name:g("common.name"),value:Ve.getDisplayName({meta:p},!0)},{name:g("common.version"),value:p.version},{name:g("common.did"),value:p.did?l.jsx(pc,{did:p.did}):null},{name:g("common.author"),value:p.owner?l.jsx(ks,{owner:p.owner,locale:v}):ju.formatPerson(p.author)},{name:g("blocklet.dist.downloadLink"),value:p.dist.tarball}],Ge=()=>d?l.jsx("div",{style:{height:200,width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:l.jsx(Le,{})}):p.did?l.jsx("div",{style:{paddingLeft:"10%"},children:Ie.map(K=>K.name===g("common.did")?l.jsx(yi,{valueComponent:"div",nameWidth:120,name:K.name,nameFormatter:()=>g("common.did"),children:K.value},K.name):l.jsx(yi,{valueComponent:"div",nameWidth:120,name:K.name,children:K.value},K.name))}):null,rt=sc(async()=>{let K=p.title;u.user&&(K=`${u.user.fullName}'s ${p.title}`);try{U(),await o.launchBlockletWithoutWallet({input:{title:K,blockletMetaUrl:decodeURIComponent(c.trim()),type:"store",storeUrl:I.registryUrl,onlyRequired:!0}})}catch(oe){console.error("launchBlockletWithoutWallet error:",oe),wn.error(br(oe),{autoHideDuration:3e3})}}),Xe=[{label:g("blocklet.fromUrl.step0"),body:l.jsx(Y,{component:"div",children:l.jsx(Ts,{style:{marginBottom:32},value:c,helperText:g("blocklet.fromUrl.description"),onValueChange:K=>{y(null),w(K)},children:l.jsx(xn,{label:g("blocklet.fromUrl.label"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"blocklet-url-input",fullWidth:!0,autoFocus:!0,margin:"dense",value:c,onChange:K=>{y(null),w(K.target.value)},disabled:d,onKeyPress:K=>{K.key==="Enter"&&(K.preventDefault(),R(),b(1))}})})}),cancel:g("common.cancel"),confirm:g("common.next"),onCancel:t,onConfirm:()=>{R(),b(1)}},{label:g("blocklet.fromUrl.step1"),body:Ge(),cancel:g(N?"common.pre":"common.cancel"),confirm:i?.confirm||g("blocklet.fromUrl.confirm"),onCancel:()=>{N?b(K=>K-1):t()},onConfirm:()=>{X()}}],te=Xe[S];return l.jsxs(l.Fragment,{children:[l.jsxs(Hr,{title:i?.title||g("blocklet.fromUrl.title"),fullWidth:!0,maxWidth:"md",onClose:()=>te.onCancel(),showCloseButton:S===0,disableEscapeKeyDown:!0,open:!0,actions:l.jsxs(l.Fragment,{children:[te.cancel&&l.jsx(ke,{onClick:K=>{K.stopPropagation(),y(null),te.onCancel()},color:"inherit",children:te.cancel||g("common.cancel")}),l.jsxs(ke,{onClick:K=>{K.stopPropagation(),te.onConfirm()},color:"primary","data-cy":"install-blocklet-next-step",disabled:d||!c||f,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[d&&S===0&&l.jsx(Le,{size:16}),te.confirm]})]}),children:[N&&l.jsx(Da,{alternativeLabel:!0,activeStep:S,children:Xe.map(({label:K})=>l.jsx(Na,{children:l.jsx(Ma,{children:K})},K))}),l.jsx(Aa,{component:"div",style:{marginTop:24},children:te.body}),!!f&&l.jsx(Uo,{severity:"error",style:{width:"100%",marginTop:8},children:f})]}),p&&E&&l.jsx(rs,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:!z&&!P?"bind-wallet":"launch-free-blocklet-by-session",checkFn:a.get,checkTimeout:300*1e3,onSuccess:U,extraParams:ee,messages:{title:g("setup.keyPair.title"),scan:g("setup.keyPair.scan"),confirm:g("setup.keyPair.confirm"),success:g("setup.keyPair.success")},onClose:ne,customItems:P?[]:[l.jsx(Cs,{onClick:rt})]})]})}Es.propTypes={defaultUrl:_.string,onCancel:_.func.isRequired,onSuccess:_.func.isRequired,onError:_.func,mode:_.oneOf(["install","component"]),handleText:_.object};const Cu={meta:_.object.isRequired,onCancel:_.func.isRequired};function Os({action:e,onSelect:t,onNext:n}){const{t:r}=Ce(),s=[{action:"purchase",title:r("store.purchase.purchase.title"),description:r("store.purchase.purchase.description")},{action:"verify",title:r("store.purchase.verify.title"),description:r("store.purchase.verify.description")}];return l.jsxs(l.Fragment,{children:[l.jsx(Ba,{children:s.map(i=>l.jsxs(Wo,{button:!0,selected:e===i.action,onClick:()=>t(i.action),children:[l.jsx($a,{sx:{minWidth:48},children:i.action==="purchase"?l.jsx(Fa,{style:{color:e==="purchase"?di.primary.main:"#AAA",fontSize:32}}):l.jsx(Wa,{style:{color:e==="verify"?di.primary.main:"#AAA",fontSize:32}})}),l.jsx(qo,{primary:i.title,secondary:i.description})]},i.action))}),n&&l.jsx(ke,{fullWidth:!0,disabled:!e,variant:"contained",color:"primary",style:{marginTop:16},onClick:n,children:r("common.next")})]})}Os.propTypes={action:_.oneOf(["both","purchase","verify"]).isRequired,onSelect:_.func.isRequired,onNext:_.func.isRequired};function Ps({meta:e,onCancel:t,mode:n,handlePaySuccess:r=()=>{}}){const{t:s,locale:i}=Ce(),{info:o}=wt(),a=Cl(o),[u,d]=O.useState(null),h=new URL(e?.registryUrl).origin,f=Ve.getDisplayName({meta:e}),y=async(v,m)=>{const x=({downloadTokenList:S})=>{r({downloadTokenList:S})},c=S=>{wn.error(S),t(S)};function w(S){return Ol(()=>vi.get(S).then(async({data:b})=>{const p=b?.downloadTokenList;if(b.status==="succeed"){if(p&&p.length)await x({downloadTokenList:p});else return await c(s("blocklet.component.missDownloadTokenTip")),!0;return!0}return b.status==="error"?(console.error("vc error: ",b),await c(b?.error),!0):!1}),{interval:1e3})}if(n==="purchase"&&u){const{statusUrl:S}=El(u);await w(S)}else await x({downloadTokenList:v.downloadTokenList&&m(v.downloadTokenList)})};if(O.useEffect(()=>{if(n==="purchase"){const v=new URL(h);v.pathname="/api/did/verify-purchase-blocklet/token",v.searchParams.set("serverDid",o.did),v.searchParams.set("blockletDid",e?.did);try{vi.get(v.href).then(({data:m})=>{const x=`${m.url}`;d(x)})}catch(m){console.error("get next workflow url error: ",m)}}return()=>{d(null)}},[n]),n==="purchase"&&!u)return"";const g={verify:{action:"verify-purchase-blocklet",checkFn:gi.create({baseURL:h}).get,extraParams:{serverDid:o.did,blockletDid:e?.did},messages:{title:s("store.purchase.verify.auth.title",{name:f}),scan:s("store.purchase.verify.auth.scan"),confirm:s("store.purchase.verify.auth.confirm"),success:s("store.purchase.verify.auth.success")}},purchase:{action:"acquire-asset",checkFn:gi.create({baseURL:lt(h,"/store")}).get,extraParams:{factory:e.nftFactory,nw:u},messages:{title:s("store.purchase.auth.title",{name:f}),scan:s("store.purchase.auth.scan"),confirm:s("store.purchase.auth.confirm"),success:l.jsxs(l.Fragment,{children:[l.jsx("p",{children:s("store.purchase.auth.success")}),l.jsx("p",{children:s("blocklet.component.purchaseComponentSecondCheckTip")})]})}}};return l.jsx(rs,{open:!0,locale:i,popup:!1,saveConnect:!1,className:"connect",baseUrl:h,onSuccess:y,cancelWhenScanned:t,onClose:t,checkTimeout:60*5e3,webWalletUrl:a,disableClose:!0,showDownload:!1,...g[n]})}Ps.propTypes={...Cu,handlePaySuccess:_.func,mode:_.oneOf(["verify","purchase"]).isRequired};function Is({ref:e=null,mode:t,...n}){const[r,s]=O.useState(t!=="both"?t:"verify"),[i,o]=O.useState(t!=="both"?2:1),a=d=>{d!==r&&s(d)},u=()=>{r&&i!==2&&o(2)};return O.useImperativeHandle(e,()=>({onNext:u,getCurrentStep:()=>i})),i===1?l.jsx("div",{style:{maxWidth:520},children:l.jsx(Os,{action:r,onNext:null,onSelect:a})}):l.jsx(Ps,{...n,mode:r})}Is.propTypes={mode:_.oneOf(["both","verify","purchase"]).isRequired,ref:_.any};function Eu({...e}){return l.jsx(ke,{className:"bottom-button",variant:"contained",color:"primary",...e})}function _s({blocklet:e=null,onStartNow:t=()=>{},children:n=null,disabled:r=!1}){const{t:s}=Ce(),i=us();return!e||Pl(e.meta)?l.jsx(Ou,{children:n}):l.jsxs(Pu,{isMobile:i,children:[l.jsx(Eu,{className:"start-now",variant:"contained",color:"primary",disabled:r,onClick:()=>t(),children:s("setup.startNow")}),l.jsx(F,{sx:{display:"flex",alignItems:"center"},children:n})]})}_s.propTypes={blocklet:_.object,onStartNow:_.func,children:_.any,disabled:_.bool};const Ou=pe(F)`
|
|
208
|
+
width: 100%;
|
|
209
|
+
margin-top: auto;
|
|
210
|
+
padding-top: 24px;
|
|
211
|
+
display: flex;
|
|
212
|
+
align-items: center;
|
|
213
|
+
justify-content: center;
|
|
214
|
+
.bottom-button {
|
|
215
|
+
min-width: 200px;
|
|
216
|
+
}
|
|
217
|
+
${e=>e.theme.breakpoints.down("md")} {
|
|
218
|
+
.bottom-button {
|
|
219
|
+
width: 100%;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
`,Pu=pe(F)`
|
|
223
|
+
padding-top: 24px;
|
|
224
|
+
margin-top: auto;
|
|
225
|
+
width: 100%;
|
|
226
|
+
display: flex;
|
|
227
|
+
align-items: center;
|
|
228
|
+
justify-content: space-between;
|
|
229
|
+
.start-now {
|
|
230
|
+
min-width: 140px;
|
|
231
|
+
}
|
|
232
|
+
.bottom-button {
|
|
233
|
+
min-width: 120px;
|
|
234
|
+
}
|
|
235
|
+
${e=>e.theme.breakpoints.down("lg")} {
|
|
236
|
+
width: 100%;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
${e=>e.theme.breakpoints.down("md")} {
|
|
240
|
+
.start-now {
|
|
241
|
+
min-width: inherit;
|
|
242
|
+
}
|
|
243
|
+
.bottom-button {
|
|
244
|
+
min-width: 100px;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
${e=>e.isMobile} {
|
|
249
|
+
justify-content: space-between;
|
|
250
|
+
gap: '32px',
|
|
251
|
+
}}
|
|
252
|
+
`;function Rs({blockletMeta:e,onEndpointUpdate:t=()=>{}}){const n=us(),{blocklet:r}=Sn(),{updateSpaceGateway:s,loading:i,hasStorageEndpoint:o}=Yl();return O.useEffect(()=>{t?.()},[r]),i?l.jsx(Nl,{relative:"parent",children:l.jsx(Le,{})}):l.jsxs(Iu,{children:[l.jsx(F,{sx:{width:n?"360px":"720px"},children:o?l.jsx(xc,{}):l.jsx(wc,{})}),e?.capabilities?.didSpace==="required"&&l.jsx(_s,{mt:8,children:l.jsx(Sc,{onConnect:s})})]})}Rs.propTypes={blockletMeta:_.any.isRequired,onEndpointUpdate:qa.func};const Iu=pe(bc)`
|
|
253
|
+
height: 100%;
|
|
254
|
+
overflow-y: auto;
|
|
255
|
+
padding-bottom: 32px;
|
|
256
|
+
overflow-x: hidden;
|
|
257
|
+
`;function Ls({onChange:e=()=>{},loading:t=!1,children:n,extra:r="",stores:s=[],storageKey:i=""}){const{t:o}=Ce(),{info:a,inService:u}=wt(),{blocklet:d}=Sn(),[h,f]=O.useState(!1),y=O.useRef(null),[g,v]=O.useState(),[m,x]=Xr(i||"tmp"),[c,w]=i?[m,x]:[g,v],{storeList:S,teamDid:b}=is({fromBlocklet:u,blocklet:d,nodeInfo:a}),p=ss([...s.map(E=>({...E,protected:!0})),...S],"url"),k=c&&p.find(E=>c===E.url)||p[0];return l.jsxs(l.Fragment,{children:[l.jsxs(_u,{children:[l.jsx(ke,{ref:y,color:"primary","data-cy":"add-component-select-store",endIcon:l.jsx(Ua,{color:"primary"}),onClick:()=>{f(!0)},style:{padding:"0 2px"},children:l.jsx(Y,{color:"primary",children:k.name})}),l.jsx(Y,{color:"primary",children:r})]}),l.jsxs(xn,{id:"mui-registry-select",select:!0,autoComplete:"off",variant:"outlined",name:"did",helperText:o("blocklet.component.selectRegistryTip"),"data-cy":"component-registry-select",fullWidth:!0,value:k,autoFocus:!0,onChange:E=>{const A=E.target.value;w(A.url),e(A)},style:{display:"none"},margin:"normal",slotProps:{select:{open:h,MenuProps:{anchorEl:y.current},renderValue:E=>E?.name,onClose:()=>{f(!1)}}},children:[p?.map(E=>l.jsx(Vr,{sx:{width:"400px",maxWidth:"90vw"},value:E,"data-cy":E.url,children:l.jsx(ul,{teamDid:b,store:E,onDelete:()=>{c===E.url&&w(p[0]?.url)}})},E.url)),!Jo.isInServerlessMode(a)&&l.jsx(dl,{disabled:t,storeList:p,teamDid:b,onAdd:E=>{w(E)}})]}),n({currentRegistry:k})]})}Ls.propTypes={onChange:_.func,loading:_.bool,children:_.any.isRequired,extra:_.node,storageKey:_.string,stores:_.arrayOf(_.shape({name:_.string.isRequired,url:_.string.isRequired}))};const _u=pe.div`
|
|
258
|
+
display: flex;
|
|
259
|
+
justify-content: space-between;
|
|
260
|
+
align-items: center;
|
|
261
|
+
margin-bottom: 16px;
|
|
262
|
+
|
|
263
|
+
span {
|
|
264
|
+
font-size: 16px;
|
|
265
|
+
color: ${e=>e.theme.palette.text.primary};
|
|
266
|
+
// font-weight: bold;
|
|
267
|
+
}
|
|
268
|
+
`,Ru=ut("div")`
|
|
269
|
+
background-color: transparent !important;
|
|
270
|
+
& > :not(.Mui-disabled) {
|
|
271
|
+
position: relative;
|
|
272
|
+
z-index: 1;
|
|
273
|
+
&::before {
|
|
274
|
+
content: '';
|
|
275
|
+
position: absolute;
|
|
276
|
+
height: 100%;
|
|
277
|
+
width: 100%;
|
|
278
|
+
left: 0;
|
|
279
|
+
top: 0;
|
|
280
|
+
transition: opacity 0.3s;
|
|
281
|
+
}
|
|
282
|
+
&:hover::before {
|
|
283
|
+
opacity: 0;
|
|
284
|
+
}
|
|
285
|
+
&::after {
|
|
286
|
+
content: '';
|
|
287
|
+
position: absolute;
|
|
288
|
+
height: 100%;
|
|
289
|
+
width: 100%;
|
|
290
|
+
top: 0;
|
|
291
|
+
left: 0;
|
|
292
|
+
border-radius: 2px;
|
|
293
|
+
background-color: ${e=>e.theme.palette.primary.main};
|
|
294
|
+
transform: scale(0.1);
|
|
295
|
+
opacity: 0;
|
|
296
|
+
z-index: -1;
|
|
297
|
+
transition:
|
|
298
|
+
transform 0.3s,
|
|
299
|
+
opacity 0.3s,
|
|
300
|
+
background-color 0.3s;
|
|
301
|
+
}
|
|
302
|
+
&:hover::after {
|
|
303
|
+
opacity: 1;
|
|
304
|
+
transform-origin: center;
|
|
305
|
+
transform: scale(1);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
& > :not(.Mui-disabled) {
|
|
309
|
+
background-color: transparent !important;
|
|
310
|
+
color: ${e=>e.theme.palette.primary.main}!important;
|
|
311
|
+
}
|
|
312
|
+
& > :not(.Mui-disabled) {
|
|
313
|
+
&:hover {
|
|
314
|
+
color: ${e=>e.theme.palette.common.white}!important;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
`;ut("div")`
|
|
318
|
+
background-color: transparent !important;
|
|
319
|
+
& > :not(.Mui-disabled) {
|
|
320
|
+
position: relative;
|
|
321
|
+
z-index: 1;
|
|
322
|
+
&::before {
|
|
323
|
+
content: '';
|
|
324
|
+
position: absolute;
|
|
325
|
+
height: 100%;
|
|
326
|
+
width: 100%;
|
|
327
|
+
left: 0;
|
|
328
|
+
top: 0;
|
|
329
|
+
transition: opacity 0.3s;
|
|
330
|
+
}
|
|
331
|
+
&:hover::before {
|
|
332
|
+
opacity: 0;
|
|
333
|
+
}
|
|
334
|
+
&::after {
|
|
335
|
+
content: '';
|
|
336
|
+
position: absolute;
|
|
337
|
+
height: 100%;
|
|
338
|
+
width: 100%;
|
|
339
|
+
top: 0;
|
|
340
|
+
left: 0;
|
|
341
|
+
border-radius: 2px;
|
|
342
|
+
background-color: ${e=>e.theme.palette.primary.main};
|
|
343
|
+
transform: scale(0.1);
|
|
344
|
+
opacity: 0;
|
|
345
|
+
z-index: -1;
|
|
346
|
+
transition:
|
|
347
|
+
transform 0.3s,
|
|
348
|
+
opacity 0.3s,
|
|
349
|
+
background-color 0.3s;
|
|
350
|
+
}
|
|
351
|
+
&:hover::after {
|
|
352
|
+
opacity: 1;
|
|
353
|
+
transform-origin: center;
|
|
354
|
+
transform: scale(1);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
& > :not(.Mui-disabled) {
|
|
358
|
+
background-color: transparent !important;
|
|
359
|
+
color: ${e=>e.theme.palette.primary.main}!important;
|
|
360
|
+
}
|
|
361
|
+
& > :not(.Mui-disabled) {
|
|
362
|
+
&:hover {
|
|
363
|
+
color: ${e=>e.theme.palette.common.white}!important;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
`;const Vi=(e="")=>e.replace(/(<([^>]+)>)/gi,"").trim(),Lu=(e="")=>{const t=parseInt(e,10);return Number.isNaN(t)?e:t<1e3?t:t<1e6?`${(t/1e3).toFixed(1)}k`:t<1e9?`${(t/1e6).toFixed(1)}m`:`${(t/1e9).toFixed(1)}b`},Ds={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 18a3.5 3.5 0 0 0 0-7h-1A5 4.5 0 0 0 7 9a4.6 4.4 0 0 0-2.1 8.4M12 13v9m-3-3l3 3l3-3"/>'};function xr({title:e,sx:t,children:n,slotProps:r,fontSize:s=12,fontWeight:i=500,color:o="text.contrast",...a}){return e?l.jsx(zo,{title:e,placement:"top",...a,slotProps:{popper:{...r?.popper,sx:es({[`& .${za.tooltip}`]:{fontSize:s,fontWeight:i,boxShadow:2,marginBottom:"6px !important",borderRadius:"8px",cursor:"default",color:o,display:"flex",alignItems:"center"}},r?.popper?.sx)}},children:n}):n}function nn({icon:e=null,children:t=null,maxWidth:n=100,title:r=void 0,sx:s={}}){return(t===0||t)&&l.jsxs(ye,{direction:"row",sx:[{alignItems:"center",gap:.5},{maxWidth:n,overflow:"hidden"},...Array.isArray(s)?s:[s]],children:[e,l.jsx(xr,{title:r||(typeof t=="string"?t:""),children:l.jsx(Y,{variant:"body2",sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:"default"},children:t})})]})}function Du({...e}){const{title:t,description:n="",cover:r="",avatar:s,author:i,download:o,did:a,official:u,buttonText:d="Install",buttonDisabled:h,buttonLoading:f,button:y,onButtonClick:g=()=>{},onMainClick:v,className:m,ref:x,icons:c,status:w,...S}=e,b=He(),p=(L,P=()=>!1)=>(I,...D)=>{const j=L instanceof Function;(P()||j)&&(I.preventDefault(),I.stopPropagation(),j&&L(...D))},k=v&&p(v),E=p(g,()=>!!(y||h||f)),A=O.isValidElement(t)?{children:t}:{title:Vi(t),dangerouslySetInnerHTML:{__html:t}},B=O.isValidElement(n)?{children:n}:{title:Vi(n),dangerouslySetInnerHTML:{__html:n}};return l.jsxs(Ka,{variant:"outlined",onClick:k,...S,sx:{p:{xs:2,md:3},borderRadius:1,...S.sx},children:[l.jsxs(ye,{direction:"row",sx:{flex:1,gap:1,alignItems:"center",overflow:"hidden","& > *":{flexShrink:0}},children:[l.jsx(hn,{src:r,did:a,size:48,variant:"rounded",style:{borderRadius:"8px",overflow:"hidden"}}),l.jsx(Y,{className:"blocklet-title",...A,sx:[{fontWeight:"fontWeightMedium",fontSize:16,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",cursor:"default",pl:.5,"&&":{flexShrink:1}},...Array.isArray(A.sx)?A.sx:[A.sx]]}),l.jsxs(F,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:1},children:[u&&l.jsx(xr,{title:u.tooltip,children:l.jsx(Va,{sx:{color:u.color||"#D97706",fontSize:u.size||18}})}),c?.map(L=>l.jsx(xr,{title:L.title,children:typeof L.icon=="string"?l.jsx(je,{icon:L.icon,style:{color:L.color}}):L.icon},L.key))]}),g&&l.jsxs(ke,{variant:"outlined",size:"small",disabled:h||f,style:{color:b.palette.text.primary,borderColor:b.palette.grey[300],borderRadius:8,fontSize:13,fontWeight:b.typography.fontWeightMedium},onClick:E,children:[f&&l.jsx(Le,{size:15,style:{marginRight:3,color:"inherit"}}),d]}),y]}),l.jsx(ye,{sx:{py:2},children:l.jsx(Y,{className:"blocklet-description",variant:"body2",...B,sx:[{color:"text.secondary",display:"-webkit-box",lineClamp:2,WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",cursor:"default",height:40},...Array.isArray(B.sx)?B.sx:[B.sx]]})}),l.jsxs(ye,{direction:"row",sx:{alignItems:"center",gap:2,color:"text.secondary"},children:[l.jsx(nn,{icon:l.jsx(hn,{src:s,did:a,size:20,variant:"circle"}),maxWidth:200,children:i}),l.jsx(nn,{icon:l.jsx(je,{icon:Ds}),title:o,children:Lu(o)}),w?.filter(L=>L.align!=="right").map(L=>l.jsx(nn,{icon:typeof L.icon=="string"?l.jsx(je,{icon:L.icon}):L.icon,title:L.title,maxWidth:L.maxWidth,children:L.text},L.key)),l.jsx(F,{sx:{flex:1}}),w?.filter(L=>L.align==="right").map(L=>l.jsx(nn,{icon:typeof L.icon=="string"?l.jsx(je,{icon:L.icon}):L.icon,title:L.title,maxWidth:L.maxWidth,sx:{color:L.color},children:L.text},L.key))]})]})}const Nu={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m8 16l2-6l6-2l-2 6l-6 2"/><path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0m9-9v2m0 14v2m-9-9h2m14 0h2"/></g>'},Lt=/^[a-z0-9]+(-[a-z0-9]+)*$/,Cn=(e,t,n,r="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;r=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const a=s.pop(),u=s.pop(),d={provider:s.length>0?s[0]:r,prefix:u,name:a};return t&&!cn(d)?null:d}const i=s[0],o=i.split("-");if(o.length>1){const a={provider:r,prefix:o.shift(),name:o.join("-")};return t&&!cn(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:i};return t&&!cn(a,n)?null:a}return null},cn=(e,t)=>e?!!((e.provider===""||e.provider.match(Lt))&&(t&&e.prefix===""||e.prefix.match(Lt))&&e.name.match(Lt)):!1,Ns=Object.freeze({left:0,top:0,width:16,height:16}),fn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Yr=Object.freeze({...Ns,...fn}),wr=Object.freeze({...Yr,body:"",hidden:!1});function Mu(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 Hi(e,t){const n=Mu(e,t);for(const r in wr)r in fn?r in e&&!(r in n)&&(n[r]=fn[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Au(e,t){const n=e.icons,r=e.aliases||Object.create(null),s=Object.create(null);function i(o){if(n[o])return s[o]=[];if(!(o in s)){s[o]=null;const a=r[o]&&r[o].parent,u=a&&i(a);u&&(s[o]=[a].concat(u))}return s[o]}return Object.keys(n).concat(Object.keys(r)).forEach(i),s}function Bu(e,t,n){const r=e.icons,s=e.aliases||Object.create(null);let i={};function o(a){i=Hi(r[a]||s[a],i)}return o(t),n.forEach(o),Hi(e,i)}function Ms(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(s=>{t(s,null),n.push(s)});const r=Au(e);for(const s in r){const i=r[s];i&&(t(s,Bu(e,s,i)),n.push(s))}return n}const $u={provider:"",aliases:{},not_found:{},...Ns};function Zn(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function As(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!Zn(e,$u))return null;const n=t.icons;for(const s in n){const i=n[s];if(!s.match(Lt)||typeof i.body!="string"||!Zn(i,wr))return null}const r=t.aliases||Object.create(null);for(const s in r){const i=r[s],o=i.parent;if(!s.match(Lt)||typeof o!="string"||!n[o]&&!r[o]||!Zn(i,wr))return null}return t}const Gi=Object.create(null);function Fu(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function ct(e,t){const n=Gi[e]||(Gi[e]=Object.create(null));return n[t]||(n[t]=Fu(e,t))}function Qr(e,t){return As(t)?Ms(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function Wu(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let Bt=!1;function Bs(e){return typeof e=="boolean"&&(Bt=e),Bt}function qu(e){const t=typeof e=="string"?Cn(e,!0,Bt):e;if(t){const n=ct(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Uu(e,t){const n=Cn(e,!0,Bt);if(!n)return!1;const r=ct(n.provider,n.prefix);return Wu(r,n.name,t)}function zu(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Bt&&!t&&!e.prefix){let s=!1;return As(e)&&(e.prefix="",Ms(e,(i,o)=>{o&&Uu(i,o)&&(s=!0)})),s}const n=e.prefix;if(!cn({provider:t,prefix:n,name:"a"}))return!1;const r=ct(t,n);return!!Qr(r,e)}const $s=Object.freeze({width:null,height:null}),Fs=Object.freeze({...$s,...fn}),Ku=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Vu=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Xi(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(Ku);if(r===null||!r.length)return e;const s=[];let i=r.shift(),o=Vu.test(i);for(;;){if(o){const a=parseFloat(i);isNaN(a)?s.push(i):s.push(Math.ceil(a*t*n)/n)}else s.push(i);if(i=r.shift(),i===void 0)return s.join("");o=!o}}const Hu=e=>e==="unset"||e==="undefined"||e==="none";function Gu(e,t){const n={...Yr,...e},r={...Fs,...t},s={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,r].forEach(v=>{const m=[],x=v.hFlip,c=v.vFlip;let w=v.rotate;x?c?w+=2:(m.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),m.push("scale(-1 1)"),s.top=s.left=0):c&&(m.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),m.push("scale(1 -1)"),s.top=s.left=0);let S;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:S=s.height/2+s.top,m.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:m.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:S=s.width/2+s.left,m.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")");break}w%2===1&&(s.left!==s.top&&(S=s.left,s.left=s.top,s.top=S),s.width!==s.height&&(S=s.width,s.width=s.height,s.height=S)),m.length&&(i='<g transform="'+m.join(" ")+'">'+i+"</g>")});const o=r.width,a=r.height,u=s.width,d=s.height;let h,f;o===null?(f=a===null?"1em":a==="auto"?d:a,h=Xi(f,u/d)):(h=o==="auto"?u:o,f=a===null?Xi(h,d/u):a==="auto"?d:a);const y={},g=(v,m)=>{Hu(m)||(y[v]=m.toString())};return g("width",h),g("height",f),y.viewBox=s.left.toString()+" "+s.top.toString()+" "+u.toString()+" "+d.toString(),{attributes:y,body:i}}const Xu=/\sid="(\S+)"/g,Yu="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Qu=0;function Ju(e,t=Yu){const n=[];let r;for(;r=Xu.exec(e);)n.push(r[1]);if(!n.length)return e;const s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(i=>{const o=typeof t=="function"?t(i):t+(Qu++).toString(),a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+o+s+"$3")}),e=e.replace(new RegExp(s,"g"),""),e}const Sr=Object.create(null);function Zu(e,t){Sr[e]=t}function kr(e){return Sr[e]||Sr[""]}function Jr(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 Zr=Object.create(null),It=["https://api.simplesvg.com","https://api.unisvg.com"],un=[];for(;It.length>0;)It.length===1||Math.random()>.5?un.push(It.shift()):un.push(It.pop());Zr[""]=Jr({resources:["https://api.iconify.design"].concat(un)});function ed(e,t){const n=Jr(t);return n===null?!1:(Zr[e]=n,!0)}function ei(e){return Zr[e]}const td=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Yi=td();function nd(e,t){const n=ei(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let s=0;n.resources.forEach(o=>{s=Math.max(s,o.length)});const i=t+".json?icons=";r=n.maxURL-s-n.path.length-i.length}return r}function rd(e){return e===404}const id=(e,t,n)=>{const r=[],s=nd(e,t),i="icons";let o={type:i,provider:e,prefix:t,icons:[]},a=0;return n.forEach((u,d)=>{a+=u.length+1,a>=s&&d>0&&(r.push(o),o={type:i,provider:e,prefix:t,icons:[]},a=u.length),o.icons.push(u)}),r.push(o),r};function od(e){if(typeof e=="string"){const t=ei(e);if(t)return t.path}return"/"}const sd=(e,t,n)=>{if(!Yi){n("abort",424);return}let r=od(t.provider);switch(t.type){case"icons":{const i=t.prefix,a=t.icons.join(","),u=new URLSearchParams({icons:a});r+=i+".json?"+u.toString();break}case"custom":{const i=t.uri;r+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let s=503;Yi(e+r).then(i=>{const o=i.status;if(o!==200){setTimeout(()=>{n(rd(o)?"abort":"next",o)});return}return s=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?n("abort",i):n("next",s)});return}setTimeout(()=>{n("success",i)})}).catch(()=>{n("next",s)})},ad={prepare:id,send:sd};function ld(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((s,i)=>s.provider!==i.provider?s.provider.localeCompare(i.provider):s.prefix!==i.prefix?s.prefix.localeCompare(i.prefix):s.name.localeCompare(i.name));let r={provider:"",prefix:"",name:""};return e.forEach(s=>{if(r.name===s.name&&r.prefix===s.prefix&&r.provider===s.provider)return;r=s;const i=s.provider,o=s.prefix,a=s.name,u=n[i]||(n[i]=Object.create(null)),d=u[o]||(u[o]=ct(i,o));let h;a in d.icons?h=t.loaded:o===""||d.missing.has(a)?h=t.missing:h=t.pending;const f={provider:i,prefix:o,name:a};h.push(f)}),t}function Ws(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(s=>s.id!==t))})}function cd(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,s=e.prefix;t.forEach(i=>{const o=i.icons,a=o.pending.length;o.pending=o.pending.filter(u=>{if(u.prefix!==s)return!0;const d=u.name;if(e.icons[d])o.loaded.push({provider:r,prefix:s,name:d});else if(e.missing.has(d))o.missing.push({provider:r,prefix:s,name:d});else return n=!0,!0;return!1}),o.pending.length!==a&&(n||Ws([e],i.id),i.callback(o.loaded.slice(0),o.missing.slice(0),o.pending.slice(0),i.abort))})}))}let ud=0;function dd(e,t,n){const r=ud++,s=Ws.bind(null,n,r);if(!t.pending.length)return s;const i={id:r,icons:t,callback:e,abort:s};return n.forEach(o=>{(o.loaderCallbacks||(o.loaderCallbacks=[])).push(i)}),s}function hd(e,t=!0,n=!1){const r=[];return e.forEach(s=>{const i=typeof s=="string"?Cn(s,t,n):s;i&&r.push(i)}),r}var fd={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function pd(e,t,n,r){const s=e.resources.length,i=e.random?Math.floor(Math.random()*s):e.index;let o;if(e.random){let k=e.resources.slice(0);for(o=[];k.length>1;){const E=Math.floor(Math.random()*k.length);o.push(k[E]),k=k.slice(0,E).concat(k.slice(E+1))}o=o.concat(k)}else o=e.resources.slice(i).concat(e.resources.slice(0,i));const a=Date.now();let u="pending",d=0,h,f=null,y=[],g=[];typeof r=="function"&&g.push(r);function v(){f&&(clearTimeout(f),f=null)}function m(){u==="pending"&&(u="aborted"),v(),y.forEach(k=>{k.status==="pending"&&(k.status="aborted")}),y=[]}function x(k,E){E&&(g=[]),typeof k=="function"&&g.push(k)}function c(){return{startTime:a,payload:t,status:u,queriesSent:d,queriesPending:y.length,subscribe:x,abort:m}}function w(){u="failed",g.forEach(k=>{k(void 0,h)})}function S(){y.forEach(k=>{k.status==="pending"&&(k.status="aborted")}),y=[]}function b(k,E,A){const B=E!=="success";switch(y=y.filter(L=>L!==k),u){case"pending":break;case"failed":if(B||!e.dataAfterTimeout)return;break;default:return}if(E==="abort"){h=A,w();return}if(B){h=A,y.length||(o.length?p():w());return}if(v(),S(),!e.random){const L=e.resources.indexOf(k.resource);L!==-1&&L!==e.index&&(e.index=L)}u="completed",g.forEach(L=>{L(A)})}function p(){if(u!=="pending")return;v();const k=o.shift();if(k===void 0){if(y.length){f=setTimeout(()=>{v(),u==="pending"&&(S(),w())},e.timeout);return}w();return}const E={status:"pending",resource:k,callback:(A,B)=>{b(E,A,B)}};y.push(E),d++,f=setTimeout(p,e.rotate),n(k,t,E.callback)}return setTimeout(p),c}function qs(e){const t={...fd,...e};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function s(a,u,d){const h=pd(t,a,u,(f,y)=>{r(),d&&d(f,y)});return n.push(h),h}function i(a){return n.find(u=>a(u))||null}return{query:s,find:i,setIndex:a=>{t.index=a},getIndex:()=>t.index,cleanup:r}}function Qi(){}const er=Object.create(null);function md(e){if(!er[e]){const t=ei(e);if(!t)return;const n=qs(t),r={config:t,redundancy:n};er[e]=r}return er[e]}function gd(e,t,n){let r,s;if(typeof e=="string"){const i=kr(e);if(!i)return n(void 0,424),Qi;s=i.send;const o=md(e);o&&(r=o.redundancy)}else{const i=Jr(e);if(i){r=qs(i);const o=e.resources?e.resources[0]:"",a=kr(o);a&&(s=a.send)}}return!r||!s?(n(void 0,424),Qi):r.query(t,s,n)().abort}const Ji="iconify2",$t="iconify",Us=$t+"-count",Zi=$t+"-version",zs=36e5,yd=168;function jr(e,t){try{return e.getItem(t)}catch{}}function ti(e,t,n){try{return e.setItem(t,n),!0}catch{}}function eo(e,t){try{e.removeItem(t)}catch{}}function Tr(e,t){return ti(e,Us,t.toString())}function Cr(e){return parseInt(jr(e,Us))||0}const En={local:!0,session:!0},Ks={local:new Set,session:new Set};let ni=!1;function vd(e){ni=e}let rn=typeof window>"u"?{}:window;function Vs(e){const t=e+"Storage";try{if(rn&&rn[t]&&typeof rn[t].length=="number")return rn[t]}catch{}En[e]=!1}function Hs(e,t){const n=Vs(e);if(!n)return;const r=jr(n,Zi);if(r!==Ji){if(r){const a=Cr(n);for(let u=0;u<a;u++)eo(n,$t+u.toString())}ti(n,Zi,Ji),Tr(n,0);return}const s=Math.floor(Date.now()/zs)-yd,i=a=>{const u=$t+a.toString(),d=jr(n,u);if(typeof d=="string"){try{const h=JSON.parse(d);if(typeof h=="object"&&typeof h.cached=="number"&&h.cached>s&&typeof h.provider=="string"&&typeof h.data=="object"&&typeof h.data.prefix=="string"&&t(h,a))return!0}catch{}eo(n,u)}};let o=Cr(n);for(let a=o-1;a>=0;a--)i(a)||(a===o-1?(o--,Tr(n,o)):Ks[e].add(a))}function Gs(){if(!ni){vd(!0);for(const e in En)Hs(e,t=>{const n=t.data,r=t.provider,s=n.prefix,i=ct(r,s);if(!Qr(i,n).length)return!1;const o=n.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,o):o,!0})}}function bd(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in En)Hs(r,s=>{const i=s.data;return s.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===t});return!0}function xd(e,t){ni||Gs();function n(r){let s;if(!En[r]||!(s=Vs(r)))return;const i=Ks[r];let o;if(i.size)i.delete(o=Array.from(i).shift());else if(o=Cr(s),!Tr(s,o+1))return;const a={cached:Math.floor(Date.now()/zs),provider:e.provider,data:t};return ti(s,$t+o.toString(),JSON.stringify(a))}t.lastModified&&!bd(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function to(){}function wd(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,cd(e)}))}function Sd(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,s=e.iconsToLoad;delete e.iconsToLoad;let i;if(!s||!(i=kr(n)))return;i.prepare(n,r,s).forEach(a=>{gd(n,a,u=>{if(typeof u!="object")a.icons.forEach(d=>{e.missing.add(d)});else try{const d=Qr(e,u);if(!d.length)return;const h=e.pendingIcons;h&&d.forEach(f=>{h.delete(f)}),xd(e,u)}catch(d){console.error(d)}wd(e)})})}))}const kd=(e,t)=>{const n=hd(e,!0,Bs()),r=ld(n);if(!r.pending.length){let u=!0;return t&&setTimeout(()=>{u&&t(r.loaded,r.missing,r.pending,to)}),()=>{u=!1}}const s=Object.create(null),i=[];let o,a;return r.pending.forEach(u=>{const{provider:d,prefix:h}=u;if(h===a&&d===o)return;o=d,a=h,i.push(ct(d,h));const f=s[d]||(s[d]=Object.create(null));f[h]||(f[h]=[])}),r.pending.forEach(u=>{const{provider:d,prefix:h,name:f}=u,y=ct(d,h),g=y.pendingIcons||(y.pendingIcons=new Set);g.has(f)||(g.add(f),s[d][h].push(f))}),i.forEach(u=>{const{provider:d,prefix:h}=u;s[d][h].length&&Sd(u,s[d][h])}),t?dd(t,r,i):to};function jd(e,t){const n={...e};for(const r in t){const s=t[r],i=typeof s;r in $s?(s===null||s&&(i==="string"||i==="number"))&&(n[r]=s):i===typeof n[r]&&(n[r]=r==="rotate"?s%4:s)}return n}const Td=/[\s,]+/;function Cd(e,t){t.split(Td).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Ed(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(s){for(;s<0;)s+=4;return s%4}if(n===""){const s=parseInt(e);return isNaN(s)?0:r(s)}else if(n!==e){let s=0;switch(n){case"%":s=25;break;case"deg":s=90}if(s){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/s,i%1===0?r(i):0)}}return t}function Od(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>"}function Pd(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Id(e){return"data:image/svg+xml,"+Pd(e)}function _d(e){return'url("'+Id(e)+'")'}let Dt;function Rd(){try{Dt=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Dt=null}}function Ld(e){return Dt===void 0&&Rd(),Dt?Dt.createHTML(e):e}const Xs={...Fs,inline:!1},Dd={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Nd={display:"inline-block"},Er={backgroundColor:"currentColor"},Ys={backgroundColor:"transparent"},no={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},ro={WebkitMask:Er,mask:Er,background:Ys};for(const e in ro){const t=ro[e];for(const n in no)t[e+n]=no[n]}const Md={...Xs,inline:!0};function io(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const Ad=(e,t,n,r)=>{const s=n?Md:Xs,i=jd(s,t),o=t.mode||"svg",a={},u=t.style||{},d={...o==="svg"?Dd:{},ref:r};for(let c in t){const w=t[c];if(w!==void 0)switch(c){case"icon":case"style":case"children":case"onLoad":case"mode":case"_ref":case"_inline":break;case"inline":case"hFlip":case"vFlip":i[c]=w===!0||w==="true"||w===1;break;case"flip":typeof w=="string"&&Cd(i,w);break;case"color":a.color=w;break;case"rotate":typeof w=="string"?i[c]=Ed(w):typeof w=="number"&&(i[c]=w);break;case"ariaHidden":case"aria-hidden":w!==!0&&w!=="true"&&delete d["aria-hidden"];break;default:s[c]===void 0&&(d[c]=w)}}const h=Gu(e,i),f=h.attributes;if(i.inline&&(a.verticalAlign="-0.125em"),o==="svg"){d.style={...a,...u},Object.assign(d,f);let c=0,w=t.id;return typeof w=="string"&&(w=w.replace(/-/g,"_")),d.dangerouslySetInnerHTML={__html:Ld(Ju(h.body,w?()=>w+"ID"+c++:"iconifyReact"))},Ae.createElement("svg",d)}const{body:y,width:g,height:v}=e,m=o==="mask"||(o==="bg"?!1:y.indexOf("currentColor")!==-1),x=Od(y,{...f,width:g+"",height:v+""});return d.style={...a,"--svg":_d(x),width:io(f.width),height:io(f.height),...Nd,...m?Er:Ys,...u},Ae.createElement("span",d)};Bs(!0);Zu("",ad);if(typeof document<"u"&&typeof window<"u"){Gs();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"||!zu(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const s=t[n];if(typeof s!="object"||!s||s.resources===void 0)continue;ed(n,s)||console.error(r)}catch{console.error(r)}}}}class Qs extends Ae.Component{constructor(t){super(t),this.state={icon:null}}_abortLoading(){this._loading&&(this._loading.abort(),this._loading=null)}_setData(t){this.state.icon!==t&&this.setState({icon:t})}_checkIcon(t){const n=this.state,r=this.props.icon;if(typeof r=="object"&&r!==null&&typeof r.body=="string"){this._icon="",this._abortLoading(),(t||n.icon===null)&&this._setData({data:r});return}let s;if(typeof r!="string"||(s=Cn(r,!1,!0))===null){this._abortLoading(),this._setData(null);return}const i=qu(s);if(!i){(!this._loading||this._loading.name!==r)&&(this._abortLoading(),this._icon="",this._setData(null),i!==null&&(this._loading={name:r,abort:kd([s],this._checkIcon.bind(this,!1))}));return}if(this._icon!==r||n.icon===null){this._abortLoading(),this._icon=r;const o=["iconify"];s.prefix!==""&&o.push("iconify--"+s.prefix),s.provider!==""&&o.push("iconify--"+s.provider),this._setData({data:i,classes:o}),this.props.onLoad&&this.props.onLoad(r)}}componentDidMount(){this._checkIcon(!1)}componentDidUpdate(t){t.icon!==this.props.icon&&this._checkIcon(!0)}componentWillUnmount(){this._abortLoading()}render(){const t=this.props,n=this.state.icon;if(n===null)return t.children?t.children:Ae.createElement("span",{});let r=t;return n.classes&&(r={...t,className:(typeof t.className=="string"?t.className+" ":"")+n.classes.join(" ")}),Ad({...Yr,...n.data},r,t._inline,t._ref)}}const Ke=Ae.forwardRef(function(t,n){const r={...t,_ref:n,_inline:!1};return Ae.createElement(Qs,r)});Ae.forwardRef(function(t,n){const r={...t,_ref:n,_inline:!0};return Ae.createElement(Qs,r)});var Bd={694:(e,t,n)=>{var r=n(925);function s(){}function i(){}i.resetWarningCache=s,e.exports=function(){function o(d,h,f,y,g,v){if(v!==r){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}function a(){return o}o.isRequired=o;var u={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:a,element:o,elementType:o,instanceOf:a,node:o,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:i,resetWarningCache:s};return u.PropTypes=u,u}},556:(e,t,n)=>{e.exports=n(694)()},925:e=>{e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},115:e=>{var t=typeof Element<"u",n=typeof Map=="function",r=typeof Set=="function",s=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function i(o,a){if(o===a)return!0;if(o&&a&&typeof o=="object"&&typeof a=="object"){if(o.constructor!==a.constructor)return!1;var u,d,h,f;if(Array.isArray(o)){if((u=o.length)!=a.length)return!1;for(d=u;d--!=0;)if(!i(o[d],a[d]))return!1;return!0}if(n&&o instanceof Map&&a instanceof Map){if(o.size!==a.size)return!1;for(f=o.entries();!(d=f.next()).done;)if(!a.has(d.value[0]))return!1;for(f=o.entries();!(d=f.next()).done;)if(!i(d.value[1],a.get(d.value[0])))return!1;return!0}if(r&&o instanceof Set&&a instanceof Set){if(o.size!==a.size)return!1;for(f=o.entries();!(d=f.next()).done;)if(!a.has(d.value[0]))return!1;return!0}if(s&&ArrayBuffer.isView(o)&&ArrayBuffer.isView(a)){if((u=o.length)!=a.length)return!1;for(d=u;d--!=0;)if(o[d]!==a[d])return!1;return!0}if(o.constructor===RegExp)return o.source===a.source&&o.flags===a.flags;if(o.valueOf!==Object.prototype.valueOf&&typeof o.valueOf=="function"&&typeof a.valueOf=="function")return o.valueOf()===a.valueOf();if(o.toString!==Object.prototype.toString&&typeof o.toString=="function"&&typeof a.toString=="function")return o.toString()===a.toString();if((u=(h=Object.keys(o)).length)!==Object.keys(a).length)return!1;for(d=u;d--!=0;)if(!Object.prototype.hasOwnProperty.call(a,h[d]))return!1;if(t&&o instanceof Element)return!1;for(d=u;d--!=0;)if((h[d]!=="_owner"&&h[d]!=="__v"&&h[d]!=="__o"||!o.$$typeof)&&!i(o[h[d]],a[h[d]]))return!1;return!0}return o!=o&&a!=a}e.exports=function(o,a){try{return i(o,a)}catch(u){if((u.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw u}}}},oo={};function ge(e){var t=oo[e];if(t!==void 0)return t.exports;var n=oo[e]={exports:{}};return Bd[e](n,n.exports,ge),n.exports}ge.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return ge.d(t,{a:t}),t},ge.d=(e,t)=>{for(var n in t)ge.o(t,n)&&!ge.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},ge.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),ge.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var Js={};function Zs(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Zs(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}ge.d(Js,{A:()=>Oh});const at=function(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Zs(e))&&(r&&(r+=" "),r+=t);return r},$=(so={default:()=>Ae,useMemo:()=>O.useMemo,useRef:()=>O.useRef},tr={},ge.d(tr,so),tr);var so,tr;const pn=function(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")},$d=typeof Jt=="object"&&Jt&&Jt.Object===Object&&Jt;var Fd=typeof self=="object"&&self&&self.Object===Object&&self;const ea=$d||Fd||Function("return this")(),nr=function(){return ea.Date.now()};var Wd=/\s/,qd=/^\s+/;const Ud=function(e){return e&&e.slice(0,(function(t){for(var n=t.length;n--&&Wd.test(t.charAt(n)););return n})(e)+1).replace(qd,"")},mn=ea.Symbol;var ta=Object.prototype,zd=ta.hasOwnProperty,Kd=ta.toString,_t=mn?mn.toStringTag:void 0,Vd=Object.prototype.toString,ao=mn?mn.toStringTag:void 0;const Hd=function(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":ao&&ao in Object(e)?(function(t){var n=zd.call(t,_t),r=t[_t];try{t[_t]=void 0;var s=!0}catch{}var i=Kd.call(t);return s&&(n?t[_t]=r:delete t[_t]),i})(e):(function(t){return Vd.call(t)})(e)};var Gd=/^[-+]0x[0-9a-f]+$/i,Xd=/^0b[01]+$/i,Yd=/^0o[0-7]+$/i,Qd=parseInt;const lo=function(e){if(typeof e=="number")return e;if((function(r){return typeof r=="symbol"||(function(s){return s!=null&&typeof s=="object"})(r)&&Hd(r)=="[object Symbol]"})(e))return NaN;if(pn(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=pn(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ud(e);var n=Xd.test(e);return n||Yd.test(e)?Qd(e.slice(2),n?2:8):Gd.test(e)?NaN:+e};var Jd=Math.max,Zd=Math.min;const Or=function(e,t,n){var r,s,i,o,a,u,d=0,h=!1,f=!1,y=!0;if(typeof e!="function")throw new TypeError("Expected a function");function g(w){var S=r,b=s;return r=s=void 0,d=w,o=e.apply(b,S)}function v(w){var S=w-u;return u===void 0||S>=t||S<0||f&&w-d>=i}function m(){var w=nr();if(v(w))return x(w);a=setTimeout(m,(function(S){var b=t-(S-u);return f?Zd(b,i-(S-d)):b})(w))}function x(w){return a=void 0,y&&r?g(w):(r=s=void 0,o)}function c(){var w=nr(),S=v(w);if(r=arguments,s=this,u=w,S){if(a===void 0)return(function(b){return d=b,a=setTimeout(m,t),h?g(b):o})(u);if(f)return clearTimeout(a),a=setTimeout(m,t),g(u)}return a===void 0&&(a=setTimeout(m,t)),o}return t=lo(t)||0,pn(n)&&(h=!!n.leading,i=(f="maxWait"in n)?Jd(lo(n.maxWait)||0,t):i,y="trailing"in n?!!n.trailing:y),c.cancel=function(){a!==void 0&&clearTimeout(a),d=0,r=u=s=a=void 0},c.flush=function(){return a===void 0?o:x(nr())},c},co=function(e,t,n){var r=!0,s=!0;if(typeof e!="function")throw new TypeError("Expected a function");return pn(n)&&(r="leading"in n?!!n.leading:r,s="trailing"in n?!!n.trailing:s),Or(e,t,{leading:r,maxWait:t,trailing:s})};var eh=ge(115),th=ge.n(eh),na=(function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some((function(s,i){return s[0]===n&&(r=i,!0)})),r}return(function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var r=e(this.__entries__,n),s=this.__entries__[r];return s&&s[1]},t.prototype.set=function(n,r){var s=e(this.__entries__,n);~s?this.__entries__[s][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,s=e(r,n);~s&&r.splice(s,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var s=0,i=this.__entries__;s<i.length;s++){var o=i[s];n.call(r,o[1],o[0])}},t})()})(),Pr=typeof window<"u"&&typeof document<"u"&&window.document===document,gn=ge.g!==void 0&&ge.g.Math===Math?ge.g:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")(),nh=typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(gn):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},rh=["top","right","bottom","left","width","height","size","weight"],ih=typeof MutationObserver<"u",oh=(function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=(function(t){var n=!1,r=!1,s=0;function i(){n&&(n=!1,t()),r&&a()}function o(){nh(i)}function a(){var u=Date.now();if(n){if(u-s<2)return;r=!0}else n=!0,r=!1,setTimeout(o,20);s=u}return a})(this.refresh.bind(this))}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,r=n.indexOf(t);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter((function(n){return n.gatherActive(),n.hasActive()}));return t.forEach((function(n){return n.broadcastActive()})),t.length>0},e.prototype.connect_=function(){Pr&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),ih?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){Pr&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,r=n===void 0?"":n;rh.some((function(s){return!!~r.indexOf(s)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e})(),uo=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var s=r[n];Object.defineProperty(e,s,{value:t[s],enumerable:!1,writable:!1,configurable:!0})}return e},xt=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||gn},ho=yn(0,0,0,0);function dn(e){return parseFloat(e)||0}function fo(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(r,s){return r+dn(e["border-"+s+"-width"])}),0)}var sh=typeof SVGGraphicsElement<"u"?function(e){return e instanceof xt(e).SVGGraphicsElement}:function(e){return e instanceof xt(e).SVGElement&&typeof e.getBBox=="function"};function ah(e){return Pr?sh(e)?(function(t){var n=t.getBBox();return yn(0,0,n.width,n.height)})(e):(function(t){var n=t.clientWidth,r=t.clientHeight;if(!n&&!r)return ho;var s=xt(t).getComputedStyle(t),i=(function(y){for(var g={},v=0,m=["top","right","bottom","left"];v<m.length;v++){var x=m[v],c=y["padding-"+x];g[x]=dn(c)}return g})(s),o=i.left+i.right,a=i.top+i.bottom,u=dn(s.width),d=dn(s.height);if(s.boxSizing==="border-box"&&(Math.round(u+o)!==n&&(u-=fo(s,"left","right")+o),Math.round(d+a)!==r&&(d-=fo(s,"top","bottom")+a)),!(function(y){return y===xt(y).document.documentElement})(t)){var h=Math.round(u+o)-n,f=Math.round(d+a)-r;Math.abs(h)!==1&&(u-=h),Math.abs(f)!==1&&(d-=f)}return yn(i.left,i.top,u,d)})(e):ho}function yn(e,t,n,r){return{x:e,y:t,width:n,height:r}}var lh=(function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=yn(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=ah(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e})(),ch=function(e,t){var n=(function(r){var s=r.x,i=r.y,o=r.width,a=r.height,u=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,d=Object.create(u.prototype);return uo(d,{x:s,y:i,width:o,height:a,top:i,right:s+o,bottom:a+i,left:s}),d})(t);uo(this,{target:e,contentRect:n})},uh=(function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new na,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element<"u"&&Element instanceof Object){if(!(t instanceof xt(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new lh(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element<"u"&&Element instanceof Object){if(!(t instanceof xt(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(n){n.isActive()&&t.activeObservations_.push(n)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map((function(r){return new ch(r.target,r.broadcastRect())}));this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e})(),ra=typeof WeakMap<"u"?new WeakMap:new na,ia=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=oh.getInstance(),r=new uh(t,n,this);ra.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){ia.prototype[e]=function(){var t;return(t=ra.get(this))[e].apply(t,arguments)}}));const po=gn.ResizeObserver!==void 0?gn.ResizeObserver:ia,We="Left",qe="Right",Ue="Up",ze="Down",yt={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},rr={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},mo="mousemove",go="mouseup";function yo(e,t){if(t===0)return e;const n=Math.PI/180*t;return[e[0]*Math.cos(n)+e[1]*Math.sin(n),e[1]*Math.cos(n)-e[0]*Math.sin(n)]}function dh(e){const{trackMouse:t}=e,n=$.useRef(Object.assign({},rr)),r=$.useRef(Object.assign({},yt)),s=$.useRef(Object.assign({},r.current));let i;for(i in s.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},yt),e),yt)r.current[i]===void 0&&(r.current[i]=yt[i]);const[o,a]=$.useMemo((()=>(function(u,d){const h=x=>{const c="touches"in x;c&&x.touches.length>1||u(((w,S)=>{S.trackMouse&&!c&&(document.addEventListener(mo,f),document.addEventListener(go,g));const{clientX:b,clientY:p}=c?x.touches[0]:x,k=yo([b,p],S.rotationAngle);return S.onTouchStartOrOnMouseDown&&S.onTouchStartOrOnMouseDown({event:x}),Object.assign(Object.assign(Object.assign({},w),rr),{initial:k.slice(),xy:k,start:x.timeStamp||0})}))},f=x=>{u(((c,w)=>{const S="touches"in x;if(S&&x.touches.length>1)return c;if(x.timeStamp-c.start>w.swipeDuration)return c.swiping?Object.assign(Object.assign({},c),{swiping:!1}):c;const{clientX:b,clientY:p}=S?x.touches[0]:x,[k,E]=yo([b,p],w.rotationAngle),A=k-c.xy[0],B=E-c.xy[1],L=Math.abs(A),P=Math.abs(B),I=(x.timeStamp||0)-c.start,D=Math.sqrt(L*L+P*P)/(I||1),j=[A/(I||1),B/(I||1)],N=(function(R,X,U,ne){return R>X?U>0?qe:We:ne>0?ze:Ue})(L,P,A,B),T=typeof w.delta=="number"?w.delta:w.delta[N.toLowerCase()]||yt.delta;if(L<T&&P<T&&!c.swiping)return c;const z={absX:L,absY:P,deltaX:A,deltaY:B,dir:N,event:x,first:c.first,initial:c.initial,velocity:D,vxvy:j};z.first&&w.onSwipeStart&&w.onSwipeStart(z),w.onSwiping&&w.onSwiping(z);let Q=!1;return(w.onSwiping||w.onSwiped||w[`onSwiped${N}`])&&(Q=!0),Q&&w.preventScrollOnSwipe&&w.trackTouch&&x.cancelable&&x.preventDefault(),Object.assign(Object.assign({},c),{first:!1,eventData:z,swiping:!0})}))},y=x=>{u(((c,w)=>{let S;if(c.swiping&&c.eventData){if(x.timeStamp-c.start<w.swipeDuration){S=Object.assign(Object.assign({},c.eventData),{event:x}),w.onSwiped&&w.onSwiped(S);const b=w[`onSwiped${S.dir}`];b&&b(S)}}else w.onTap&&w.onTap({event:x});return w.onTouchEndOrOnMouseUp&&w.onTouchEndOrOnMouseUp({event:x}),Object.assign(Object.assign(Object.assign({},c),rr),{eventData:S})}))},g=x=>{document.removeEventListener(mo,f),document.removeEventListener(go,g),y(x)},v=(x,c)=>{let w=()=>{};if(x&&x.addEventListener){const S=Object.assign(Object.assign({},yt.touchEventOptions),c.touchEventOptions),b=[["touchstart",h,S],["touchmove",f,Object.assign(Object.assign({},S),c.preventScrollOnSwipe?{passive:!1}:{})],["touchend",y,S]];b.forEach((([p,k,E])=>x.addEventListener(p,k,E))),w=()=>b.forEach((([p,k])=>x.removeEventListener(p,k)))}return w},m={ref:x=>{x!==null&&u(((c,w)=>{if(c.el===x)return c;const S={};return c.el&&c.el!==x&&c.cleanUpTouch&&(c.cleanUpTouch(),S.cleanUpTouch=void 0),w.trackTouch&&x&&(S.cleanUpTouch=v(x,w)),Object.assign(Object.assign(Object.assign({},c),{el:x}),S)}))}};return d.trackMouse&&(m.onMouseDown=h),[m,v]})((u=>n.current=u(n.current,r.current)),{trackMouse:t})),[t]);return n.current=(function(u,d,h,f){return d.trackTouch&&u.el?u.cleanUpTouch?d.preventScrollOnSwipe!==h.preventScrollOnSwipe||d.touchEventOptions.passive!==h.touchEventOptions.passive?(u.cleanUpTouch(),Object.assign(Object.assign({},u),{cleanUpTouch:f(u.el,d)})):u:Object.assign(Object.assign({},u),{cleanUpTouch:f(u.el,d)}):(u.cleanUpTouch&&u.cleanUpTouch(),Object.assign(Object.assign({},u),{cleanUpTouch:void 0}))})(n.current,r.current,s.current,a),o}var C=ge(556);function Nt(e){return Nt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nt(e)}function vo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),n.push.apply(n,r)}return n}function bo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vo(Object(n),!0).forEach((function(r){hh(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vo(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function hh(e,t,n){return(t=(function(r){var s=(function(i){if(Nt(i)!="object"||!i)return i;var o=i[Symbol.toPrimitive];if(o!==void 0){var a=o.call(i,"string");if(Nt(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)})(r);return Nt(s)=="symbol"?s:s+""})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var fh={description:"",fullscreen:"",isFullscreen:!1,originalAlt:"",originalHeight:"",originalWidth:"",originalTitle:"",sizes:"",srcSet:"",loading:"eager"},Ir=$.default.memo((function(e){var t=bo(bo({},fh),e),n=t.description,r=t.fullscreen,s=t.handleImageLoaded,i=t.isFullscreen,o=t.onImageError,a=t.original,u=t.originalAlt,d=t.originalHeight,h=t.originalWidth,f=t.originalTitle,y=t.sizes,g=t.srcSet,v=t.loading,m=i&&r||a;return $.default.createElement($.default.Fragment,null,$.default.createElement("img",{className:"image-gallery-image",src:m,alt:u,srcSet:g,height:d,width:h,sizes:y,title:f,onLoad:function(x){return s(x,a)},onError:o,loading:v}),n&&$.default.createElement("span",{className:"image-gallery-description"},n))}));Ir.displayName="Item",Ir.propTypes={description:C.string,fullscreen:C.string,handleImageLoaded:C.func.isRequired,isFullscreen:C.bool,onImageError:C.func.isRequired,original:C.string.isRequired,originalAlt:C.string,originalHeight:C.string,originalWidth:C.string,originalTitle:C.string,sizes:C.string,srcSet:C.string,loading:C.string};const ph=Ir;function Mt(e){return Mt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mt(e)}function xo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),n.push.apply(n,r)}return n}function wo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xo(Object(n),!0).forEach((function(r){mh(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xo(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function mh(e,t,n){return(t=(function(r){var s=(function(i){if(Mt(i)!="object"||!i)return i;var o=i[Symbol.toPrimitive];if(o!==void 0){var a=o.call(i,"string");if(Mt(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)})(r);return Mt(s)=="symbol"?s:s+""})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var gh={left:$.default.createElement("polyline",{points:"15 18 9 12 15 6"}),right:$.default.createElement("polyline",{points:"9 18 15 12 9 6"}),top:$.default.createElement("polyline",{points:"6 15 12 9 18 15"}),bottom:$.default.createElement("polyline",{points:"6 9 12 15 18 9"}),maximize:$.default.createElement("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"}),minimize:$.default.createElement("path",{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"}),play:$.default.createElement("polygon",{points:"5 3 19 12 5 21 5 3"}),pause:$.default.createElement($.default.Fragment,null,$.default.createElement("rect",{x:"6",y:"4",width:"4",height:"16"}),$.default.createElement("rect",{x:"14",y:"4",width:"4",height:"16"}))},yh={strokeWidth:1,viewBox:"0 0 24 24"},oa=function(e){var t=wo(wo({},yh),e),n=t.strokeWidth,r=t.viewBox,s=t.icon;return $.default.createElement("svg",{className:"image-gallery-svg",xmlns:"http://www.w3.org/2000/svg",viewBox:r,fill:"none",stroke:"currentColor",strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"},gh[s])};oa.propTypes={strokeWidth:C.number,viewBox:C.string,icon:(0,C.oneOf)(["left","right","top","bottom","maximize","minimize","play","pause"]).isRequired};const St=oa;var _r=$.default.memo((function(e){var t=e.isFullscreen,n=e.onClick;return $.default.createElement("button",{type:"button",className:"image-gallery-icon image-gallery-fullscreen-button",onClick:n,"aria-label":"Open Fullscreen"},$.default.createElement(St,{strokeWidth:2,icon:t?"minimize":"maximize"}))}));_r.displayName="Fullscreen",_r.propTypes={isFullscreen:C.bool.isRequired,onClick:C.func.isRequired};const vh=_r;var Rr=$.default.memo((function(e){var t=e.disabled,n=e.onClick;return $.default.createElement("button",{type:"button",className:"image-gallery-icon image-gallery-left-nav",disabled:t,onClick:n,"aria-label":"Previous Slide"},$.default.createElement(St,{icon:"left",viewBox:"6 0 12 24"}))}));Rr.displayName="LeftNav",Rr.propTypes={disabled:C.bool.isRequired,onClick:C.func.isRequired};const bh=Rr;var Lr=$.default.memo((function(e){var t=e.disabled,n=e.onClick;return $.default.createElement("button",{type:"button",className:"image-gallery-icon image-gallery-right-nav",disabled:t,onClick:n,"aria-label":"Next Slide"},$.default.createElement(St,{icon:"right",viewBox:"6 0 12 24"}))}));Lr.displayName="RightNav",Lr.propTypes={disabled:C.bool.isRequired,onClick:C.func.isRequired};const xh=Lr;var Dr=$.default.memo((function(e){var t=e.isPlaying,n=e.onClick;return $.default.createElement("button",{type:"button",className:"image-gallery-icon image-gallery-play-button",onClick:n,"aria-label":"Play or Pause Slideshow"},$.default.createElement(St,{strokeWidth:2,icon:t?"pause":"play"}))}));Dr.displayName="PlayPause",Dr.propTypes={isPlaying:C.bool.isRequired,onClick:C.func.isRequired};const wh=Dr;function At(e){return At=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},At(e)}function Nr(){return Nr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nr.apply(null,arguments)}function So(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),n.push.apply(n,r)}return n}function ko(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?So(Object(n),!0).forEach((function(r){Sh(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):So(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function Sh(e,t,n){return(t=(function(r){var s=(function(i){if(At(i)!="object"||!i)return i;var o=i[Symbol.toPrimitive];if(o!==void 0){var a=o.call(i,"string");if(At(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)})(r);return At(s)=="symbol"?s:s+""})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var kh={className:"",delta:0,onSwiping:function(){},onSwiped:function(){}},sa=function(e){var t=ko(ko({},kh),e),n=t.children,r=t.className,s=dh({delta:t.delta,onSwiping:t.onSwiping,onSwiped:t.onSwiped});return $.default.createElement("div",Nr({},s,{className:r}),n)};sa.propTypes={children:C.node.isRequired,className:C.string,delta:C.number,onSwiped:C.func,onSwiping:C.func};const jo=sa;var Mr=$.default.memo((function(e){var t=e.disabled,n=e.onClick;return $.default.createElement("button",{type:"button",className:"image-gallery-icon image-gallery-top-nav",disabled:t,onClick:n,"aria-label":"Previous Slide"},$.default.createElement(St,{icon:"top",viewBox:"6 0 12 24"}))}));Mr.displayName="TopNav",Mr.propTypes={disabled:C.bool.isRequired,onClick:C.func.isRequired};const jh=Mr;var Ar=$.default.memo((function(e){var t=e.disabled,n=e.onClick;return $.default.createElement("button",{type:"button",className:"image-gallery-icon image-gallery-bottom-nav",disabled:t,onClick:n,"aria-label":"Next Slide"},$.default.createElement(St,{icon:"bottom",viewBox:"6 0 12 24"}))}));Ar.displayName="BottomNav",Ar.propTypes={disabled:C.bool.isRequired,onClick:C.func.isRequired};const Th=Ar;function bt(e){return bt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bt(e)}function To(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),n.push.apply(n,r)}return n}function Co(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?To(Object(n),!0).forEach((function(r){vt(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):To(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function Ch(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,la(r.key),r)}}function aa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(aa=function(){return!!e})()}function vn(e){return vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vn(e)}function Br(e,t){return Br=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Br(e,t)}function vt(e,t,n){return(t=la(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function la(e){var t=(function(n){if(bt(n)!="object"||!n)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var s=r.call(n,"string");if(bt(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(e);return bt(t)=="symbol"?t:t+""}var Eo=["fullscreenchange","MSFullscreenChange","mozfullscreenchange","webkitfullscreenchange"],Eh=(0,C.arrayOf)((0,C.shape)({srcSet:C.string,media:C.string}));function Oo(e){var t=parseInt(e.keyCode||e.which||0,10);return t===66||t===62}var $r=(function(){function e(t){var n,r,s,i;return(function(o,a){if(!(o instanceof a))throw new TypeError("Cannot call a class as a function")})(this,e),vt((r=this,i=[t],s=vn(s=e),n=(function(o,a){if(a&&(bt(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u})(o)})(r,aa()?Reflect.construct(s,i||[],vn(r).constructor):s.apply(r,i))),"onBulletClick",(function(o,a){var u=n.props,d=u.onBulletClick,h=u.items,f=n.state.currentIndex;o.target.blur(),f!==a&&(h.length===2?n.slideToIndexWithStyleReset(a,o):n.slideToIndex(a,o)),d&&d(o,a)})),n.state={currentIndex:t.startIndex,thumbsTranslate:0,thumbsSwipedTranslate:0,currentSlideOffset:0,galleryWidth:0,galleryHeight:0,thumbnailsWrapperWidth:0,thumbnailsWrapperHeight:0,thumbsStyle:{transition:"all ".concat(t.slideDuration,"ms ease-out")},isFullscreen:!1,isSwipingThumbnail:!1,isPlaying:!1},n.loadedImages={},n.imageGallery=$.default.createRef(),n.thumbnailsWrapper=$.default.createRef(),n.thumbnails=$.default.createRef(),n.imageGallerySlideWrapper=$.default.createRef(),n.handleImageLoaded=n.handleImageLoaded.bind(n),n.handleKeyDown=n.handleKeyDown.bind(n),n.handleMouseDown=n.handleMouseDown.bind(n),n.handleResize=n.handleResize.bind(n),n.handleOnSwiped=n.handleOnSwiped.bind(n),n.handleScreenChange=n.handleScreenChange.bind(n),n.handleSwiping=n.handleSwiping.bind(n),n.handleThumbnailSwiping=n.handleThumbnailSwiping.bind(n),n.handleOnThumbnailSwiped=n.handleOnThumbnailSwiped.bind(n),n.onThumbnailMouseLeave=n.onThumbnailMouseLeave.bind(n),n.handleImageError=n.handleImageError.bind(n),n.pauseOrPlay=n.pauseOrPlay.bind(n),n.renderThumbInner=n.renderThumbInner.bind(n),n.renderItem=n.renderItem.bind(n),n.slideLeft=n.slideLeft.bind(n),n.slideRight=n.slideRight.bind(n),n.toggleFullScreen=n.toggleFullScreen.bind(n),n.togglePlay=n.togglePlay.bind(n),n.unthrottledSlideToIndex=n.slideToIndex,n.slideToIndex=co(n.unthrottledSlideToIndex,t.slideDuration,{trailing:!1}),t.lazyLoad&&(n.lazyLoaded=[]),n}return(function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&Br(t,n)})(e,$.default.Component),(function(t,n){return n&&Ch(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),t})(e,[{key:"componentDidMount",value:function(){var t=this.props,n=t.autoPlay,r=t.useWindowKeyDown;n&&this.play(),r?window.addEventListener("keydown",this.handleKeyDown):this.imageGallery.current.addEventListener("keydown",this.handleKeyDown),window.addEventListener("mousedown",this.handleMouseDown),this.initSlideWrapperResizeObserver(this.imageGallerySlideWrapper),this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper),this.addScreenChangeEvent()}},{key:"componentDidUpdate",value:function(t,n){var r=this.props,s=r.items,i=r.lazyLoad,o=r.slideDuration,a=r.slideInterval,u=r.startIndex,d=r.thumbnailPosition,h=r.showThumbnails,f=r.useWindowKeyDown,y=this.state,g=y.currentIndex,v=y.isPlaying,m=t.items.length!==s.length,x=!th()(t.items,s),c=t.startIndex!==u,w=t.thumbnailPosition!==d,S=t.showThumbnails!==h;a===t.slideInterval&&o===t.slideDuration||v&&(this.pause(),this.play()),w&&(this.removeResizeObserver(),this.initSlideWrapperResizeObserver(this.imageGallerySlideWrapper),this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper)),S&&h&&this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper),S&&!h&&this.removeThumbnailsResizeObserver(),(m||S)&&this.handleResize(),n.currentIndex!==g&&this.slideThumbnailBar(),t.slideDuration!==o&&(this.slideToIndex=co(this.unthrottledSlideToIndex,o,{trailing:!1})),!i||t.lazyLoad&&!x||(this.lazyLoaded=[]),f!==t.useWindowKeyDown&&(f?(this.imageGallery.current.removeEventListener("keydown",this.handleKeyDown),window.addEventListener("keydown",this.handleKeyDown)):(window.removeEventListener("keydown",this.handleKeyDown),this.imageGallery.current.addEventListener("keydown",this.handleKeyDown))),(c||x)&&this.setState({currentIndex:u,slideStyle:{transition:"none"}})}},{key:"componentWillUnmount",value:function(){var t=this.props.useWindowKeyDown;window.removeEventListener("mousedown",this.handleMouseDown),this.removeScreenChangeEvent(),this.removeResizeObserver(),this.playPauseIntervalId&&(window.clearInterval(this.playPauseIntervalId),this.playPauseIntervalId=null),this.transitionTimer&&window.clearTimeout(this.transitionTimer),t?window.removeEventListener("keydown",this.handleKeyDown):this.imageGallery.current.removeEventListener("keydown",this.handleKeyDown)}},{key:"onSliding",value:function(){var t=this,n=this.state,r=n.currentIndex,s=n.isTransitioning,i=this.props,o=i.onSlide,a=i.slideDuration;this.transitionTimer=window.setTimeout((function(){s&&(t.setState({isTransitioning:!s,isSwipingThumbnail:!1}),o&&o(r))}),a+50)}},{key:"onThumbnailClick",value:function(t,n){var r=this.props,s=r.onThumbnailClick,i=r.items,o=this.state.currentIndex;t.target.parentNode.parentNode.blur(),o!==n&&(i.length===2?this.slideToIndexWithStyleReset(n,t):this.slideToIndex(n,t)),s&&s(t,n)}},{key:"onThumbnailMouseOver",value:function(t,n){var r=this;this.thumbnailMouseOverTimer&&(window.clearTimeout(this.thumbnailMouseOverTimer),this.thumbnailMouseOverTimer=null),this.thumbnailMouseOverTimer=window.setTimeout((function(){r.slideToIndex(n),r.pause()}),300)}},{key:"onThumbnailMouseLeave",value:function(){if(this.thumbnailMouseOverTimer){var t=this.props.autoPlay;window.clearTimeout(this.thumbnailMouseOverTimer),this.thumbnailMouseOverTimer=null,t&&this.play()}}},{key:"setThumbsTranslate",value:function(t){this.setState({thumbsTranslate:t})}},{key:"setModalFullscreen",value:function(t){var n=this.props.onScreenChange;this.setState({modalFullscreen:t}),n&&n(t)}},{key:"getThumbsTranslate",value:function(t){var n,r=this.props,s=r.disableThumbnailScroll,i=r.items,o=this.state,a=o.thumbnailsWrapperWidth,u=o.thumbnailsWrapperHeight,d=this.thumbnails&&this.thumbnails.current;if(s)return 0;if(d){if(this.isThumbnailVertical()){if(d.scrollHeight<=u)return 0;n=d.scrollHeight-u}else{if(d.scrollWidth<=a||a<=0)return 0;n=d.scrollWidth-a}return t*(n/(i.length-1))}return 0}},{key:"getThumbnailPositionClassName",value:function(t){switch(t){case"left":t=" ".concat("image-gallery-thumbnails-left");break;case"right":t=" ".concat("image-gallery-thumbnails-right");break;case"bottom":t=" ".concat("image-gallery-thumbnails-bottom");break;case"top":t=" ".concat("image-gallery-thumbnails-top")}return t}},{key:"getAlignmentClassName",value:function(t){var n=this.state.currentIndex,r=this.props,s=r.infinite,i=r.items,o="",a="image-gallery-left",u="image-gallery-right";switch(t){case n-1:o=" ".concat(a);break;case n:o=" ".concat("image-gallery-center");break;case n+1:o=" ".concat(u)}return i.length>=3&&s&&(t===0&&n===i.length-1?o=" ".concat(u):t===i.length-1&&n===0&&(o=" ".concat(a))),o}},{key:"getTranslateXForTwoSlide",value:function(t){var n=this.state,r=n.currentIndex,s=n.currentSlideOffset,i=n.previousIndex,o=r!==i,a=t===0&&i===0,u=t===1&&i===1,d=t===0&&r===1,h=t===1&&r===0,f=s===0,y=-100*r+100*t+s;return s>0?this.direction="left":s<0&&(this.direction="right"),h&&s>0&&(y=-100+s),d&&s<0&&(y=100+s),o?a&&f&&this.direction==="left"?y=100:u&&f&&this.direction==="right"&&(y=-100):(h&&f&&this.direction==="left"&&(y=-100),d&&f&&this.direction==="right"&&(y=100)),y}},{key:"getThumbnailBarHeight",value:function(){return this.isThumbnailVertical()?{height:this.state.gallerySlideWrapperHeight}:{}}},{key:"getSlideStyle",value:function(t){var n=this.state,r=n.currentIndex,s=n.currentSlideOffset,i=n.slideStyle,o=this.props,a=o.infinite,u=o.items,d=o.useTranslate3D,h=o.isRTL,f=o.slideVertically,y=-100*r,g=u.length-1,v=(y+100*t)*(h?-1:1)+s;a&&u.length>2&&(r===0&&t===g?v=-100*(h?-1:1)+s:r===g&&t===0&&(v=100*(h?-1:1)+s)),a&&u.length===2&&(v=this.getTranslateXForTwoSlide(t));var m=f?"translate(0, ".concat(v,"%)"):"translate(".concat(v,"%, 0)");return d&&(m=f?"translate3d(0, ".concat(v,"%, 0)"):"translate3d(".concat(v,"%, 0, 0)")),Co({display:this.isSlideVisible(t)?"inherit":"none",WebkitTransform:m,MozTransform:m,msTransform:m,OTransform:m,transform:m},i)}},{key:"getCurrentIndex",value:function(){return this.state.currentIndex}},{key:"getThumbnailStyle",value:function(){var t,n=this.props,r=n.useTranslate3D,s=n.isRTL,i=this.state,o=i.thumbsTranslate,a=i.thumbsStyle,u=s?-1*o:o;return this.isThumbnailVertical()?(t="translate(0, ".concat(o,"px)"),r&&(t="translate3d(0, ".concat(o,"px, 0)"))):(t="translate(".concat(u,"px, 0)"),r&&(t="translate3d(".concat(u,"px, 0, 0)"))),Co({WebkitTransform:t,MozTransform:t,msTransform:t,OTransform:t,transform:t},a)}},{key:"getSlideItems",value:function(){var t=this,n=this.state.currentIndex,r=this.props,s=r.items,i=r.slideOnThumbnailOver,o=r.onClick,a=r.lazyLoad,u=r.onTouchMove,d=r.onTouchEnd,h=r.onTouchStart,f=r.onMouseOver,y=r.onMouseLeave,g=r.renderItem,v=r.renderThumbInner,m=r.showThumbnails,x=r.showBullets,c=[],w=[],S=[];return s.forEach((function(b,p){var k=t.getAlignmentClassName(p),E=b.originalClass?" ".concat(b.originalClass):"",A=b.thumbnailClass?" ".concat(b.thumbnailClass):"",B=b.renderItem||g||t.renderItem,L=b.renderThumbInner||v||t.renderThumbInner,P=!a||k||t.lazyLoaded[p];P&&a&&!t.lazyLoaded[p]&&(t.lazyLoaded[p]=!0);var I=t.getSlideStyle(p),D=$.default.createElement("div",{"aria-label":"Go to Slide ".concat(p+1),key:"slide-".concat(p),tabIndex:"-1",className:"image-gallery-slide ".concat(k," ").concat(E),style:I,onClick:o,onKeyUp:t.handleSlideKeyUp,onTouchMove:u,onTouchEnd:d,onTouchStart:h,onMouseOver:f,onFocus:f,onMouseLeave:y,role:"button"},P?B(b):$.default.createElement("div",{style:{height:"100%"}}));if(c.push(D),m&&b.thumbnail){var j=at("image-gallery-thumbnail",A,{active:n===p});w.push($.default.createElement("button",{key:"thumbnail-".concat(p),type:"button",tabIndex:"0","aria-pressed":n===p?"true":"false","aria-label":"Go to Slide ".concat(p+1),className:j,onMouseLeave:i?t.onThumbnailMouseLeave:null,onMouseOver:function(T){return t.handleThumbnailMouseOver(T,p)},onFocus:function(T){return t.handleThumbnailMouseOver(T,p)},onKeyUp:function(T){return t.handleThumbnailKeyUp(T,p)},onClick:function(T){return t.onThumbnailClick(T,p)}},L(b)))}if(x){var N=at("image-gallery-bullet",b.bulletClass,{active:n===p});S.push($.default.createElement("button",{type:"button",key:"bullet-".concat(p),className:N,onClick:function(T){return t.onBulletClick(T,p)},"aria-pressed":n===p?"true":"false","aria-label":"Go to Slide ".concat(p+1)}))}})),{slides:c,thumbnails:w,bullets:S}}},{key:"ignoreIsTransitioning",value:function(){var t=this.props.items,n=this.state,r=n.previousIndex,s=n.currentIndex,i=t.length-1;return Math.abs(r-s)>1&&!(r===0&&s===i)&&!(r===i&&s===0)}},{key:"isFirstOrLastSlide",value:function(t){return t===this.props.items.length-1||t===0}},{key:"slideIsTransitioning",value:function(t){var n=this.state,r=n.isTransitioning,s=n.previousIndex,i=n.currentIndex;return r&&!(t===s||t===i)}},{key:"isSlideVisible",value:function(t){return!this.slideIsTransitioning(t)||this.ignoreIsTransitioning()&&!this.isFirstOrLastSlide(t)}},{key:"slideThumbnailBar",value:function(){var t=this.state,n=t.currentIndex,r=t.isSwipingThumbnail,s=-this.getThumbsTranslate(n);r||(n===0?this.setState({thumbsTranslate:0,thumbsSwipedTranslate:0}):this.setState({thumbsTranslate:s,thumbsSwipedTranslate:s}))}},{key:"canSlide",value:function(){return this.props.items.length>=2}},{key:"canSlideLeft",value:function(){var t=this.props,n=t.infinite,r=t.isRTL;return n||(r?this.canSlideNext():this.canSlidePrevious())}},{key:"canSlideRight",value:function(){var t=this.props,n=t.infinite,r=t.isRTL;return n||(r?this.canSlidePrevious():this.canSlideNext())}},{key:"canSlidePrevious",value:function(){return this.state.currentIndex>0}},{key:"canSlideNext",value:function(){return this.state.currentIndex<this.props.items.length-1}},{key:"handleSwiping",value:function(t){var n=t.event,r=t.absX,s=t.absY,i=t.dir,o=this.props,a=o.disableSwipe,u=o.stopPropagation,d=o.swipingTransitionDuration,h=this.state,f=h.galleryWidth,y=h.galleryHeight,g=h.isTransitioning,v=h.swipingUpDown,m=h.swipingLeftRight,x=this.props.slideVertically;if((i!==Ue&&i!==ze&&!v||m||(v||this.setState({swipingUpDown:!0}),x))&&(i!==We&&i!==qe||m||this.setState({swipingLeftRight:!0}),!a))if(u&&n.preventDefault(),g)this.setState({currentSlideOffset:0});else{if((i===We||i===qe)&&x||(i===Ue||i===ze)&&!x)return;var c=vt(vt(vt(vt({},We,-1),qe,1),Ue,-1),ze,1)[i],w=r/f*100;x&&(w=s/y*100),Math.abs(w)>=100&&(w=100);var S={transition:"transform ".concat(d,"ms ease-out")};this.setState({currentSlideOffset:c*w,slideStyle:S})}}},{key:"handleThumbnailSwiping",value:function(t){var n=t.event,r=t.absX,s=t.absY,i=t.dir,o=this.props,a=o.stopPropagation,u=o.swipingThumbnailTransitionDuration,d=this.state,h=d.thumbsSwipedTranslate,f=d.thumbnailsWrapperHeight,y=d.thumbnailsWrapperWidth,g=d.swipingUpDown,v=d.swipingLeftRight;if(this.isThumbnailVertical()){if((i===We||i===qe||v)&&!g)return void(v||this.setState({swipingLeftRight:!0}));i!==Ue&&i!==ze||g||this.setState({swipingUpDown:!0})}else{if((i===Ue||i===ze||g)&&!v)return void(g||this.setState({swipingUpDown:!0}));i!==We&&i!==qe||v||this.setState({swipingLeftRight:!0})}var m,x,c,w,S,b=this.thumbnails&&this.thumbnails.current;if(this.isThumbnailVertical()?(m=h+(i===ze?s:-s),x=b.scrollHeight-f+20,c=Math.abs(m)>x,w=m>20,S=b.scrollHeight<=f):(m=h+(i===qe?r:-r),x=b.scrollWidth-y+20,c=Math.abs(m)>x,w=m>20,S=b.scrollWidth<=y),!S&&(i!==We&&i!==Ue||!c)&&(i!==qe&&i!==ze||!w)){a&&n.stopPropagation();var p={transition:"transform ".concat(u,"ms ease-out")};this.setState({thumbsTranslate:m,thumbsStyle:p})}}},{key:"handleOnThumbnailSwiped",value:function(){var t=this.state.thumbsTranslate,n=this.props.slideDuration;this.resetSwipingDirection(),this.setState({isSwipingThumbnail:!0,thumbsSwipedTranslate:t,thumbsStyle:{transition:"all ".concat(n,"ms ease-out")}})}},{key:"sufficientSwipe",value:function(){var t=this.state.currentSlideOffset,n=this.props.swipeThreshold;return Math.abs(t)>n}},{key:"resetSwipingDirection",value:function(){var t=this.state,n=t.swipingUpDown,r=t.swipingLeftRight;n&&this.setState({swipingUpDown:!1}),r&&this.setState({swipingLeftRight:!1})}},{key:"handleOnSwiped",value:function(t){var n=t.event,r=t.dir,s=t.velocity,i=this.props,o=i.disableSwipe,a=i.stopPropagation,u=i.flickThreshold,d=this.props.slideVertically;if(!o){var h=this.props.isRTL;a&&n.stopPropagation(),this.resetSwipingDirection();var f=(r===We?1:-1)*(h?-1:1);d&&(f=r===Ue?1:-1);var y=d?s>u&&!(r===We||r===qe):s>u&&!(r===Ue||r===ze);this.handleOnSwipedTo(f,y)}}},{key:"handleOnSwipedTo",value:function(t,n){var r=this.state,s=r.currentIndex,i=r.isTransitioning,o=s;!this.sufficientSwipe()&&!n||i||(o+=t),(t===-1&&!this.canSlideLeft()||t===1&&!this.canSlideRight())&&(o=s),this.unthrottledSlideToIndex(o)}},{key:"handleMouseDown",value:function(){this.imageGallery.current.classList.add("image-gallery-using-mouse")}},{key:"handleKeyDown",value:function(t){var n=this.props,r=n.disableKeyDown,s=n.useBrowserFullscreen,i=this.state.isFullscreen;if(this.imageGallery.current.classList.remove("image-gallery-using-mouse"),!r)switch(parseInt(t.keyCode||t.which||0,10)){case 37:this.canSlideLeft()&&!this.playPauseIntervalId&&this.slideLeft(t);break;case 39:this.canSlideRight()&&!this.playPauseIntervalId&&this.slideRight(t);break;case 27:i&&!s&&this.exitFullScreen()}}},{key:"handleImageError",value:function(t){var n=this.props.onErrorImageURL;n&&t.target.src.indexOf(n)===-1&&(t.target.src=n)}},{key:"removeThumbnailsResizeObserver",value:function(){this.resizeThumbnailWrapperObserver&&this.thumbnailsWrapper&&this.thumbnailsWrapper.current&&(this.resizeThumbnailWrapperObserver.unobserve(this.thumbnailsWrapper.current),this.resizeThumbnailWrapperObserver=null)}},{key:"removeResizeObserver",value:function(){this.resizeSlideWrapperObserver&&this.imageGallerySlideWrapper&&this.imageGallerySlideWrapper.current&&(this.resizeSlideWrapperObserver.unobserve(this.imageGallerySlideWrapper.current),this.resizeSlideWrapperObserver=null),this.removeThumbnailsResizeObserver()}},{key:"handleResize",value:function(){var t=this.state.currentIndex;this.imageGallery&&(this.imageGallery&&this.imageGallery.current&&this.setState({galleryWidth:this.imageGallery.current.offsetWidth,galleryHeight:this.imageGallery.current.offsetHeight}),this.imageGallerySlideWrapper&&this.imageGallerySlideWrapper.current&&this.setState({gallerySlideWrapperHeight:this.imageGallerySlideWrapper.current.offsetHeight}),this.setThumbsTranslate(-this.getThumbsTranslate(t)))}},{key:"initSlideWrapperResizeObserver",value:function(t){var n=this;t&&!t.current||(this.resizeSlideWrapperObserver=new po(Or((function(r){r&&r.forEach((function(s){n.setState({thumbnailsWrapperWidth:s.contentRect.width},n.handleResize)}))}),50)),this.resizeSlideWrapperObserver.observe(t.current))}},{key:"initThumbnailWrapperResizeObserver",value:function(t){var n=this;t&&!t.current||(this.resizeThumbnailWrapperObserver=new po(Or((function(r){r&&r.forEach((function(s){n.setState({thumbnailsWrapperHeight:s.contentRect.height},n.handleResize)}))}),50)),this.resizeThumbnailWrapperObserver.observe(t.current))}},{key:"toggleFullScreen",value:function(){this.state.isFullscreen?this.exitFullScreen():this.fullScreen()}},{key:"togglePlay",value:function(){this.playPauseIntervalId?this.pause():this.play()}},{key:"handleScreenChange",value:function(){var t=this.props,n=t.onScreenChange,r=t.useBrowserFullscreen,s=document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement,i=this.imageGallery.current===s;n&&n(i),r&&this.setState({isFullscreen:i})}},{key:"slideToIndex",value:function(t,n){var r=this.state,s=r.currentIndex,i=r.isTransitioning,o=this.props,a=o.items,u=o.slideDuration,d=o.onBeforeSlide;if(!i){n&&this.playPauseIntervalId&&(this.pause(!1),this.play(!1));var h=a.length-1,f=t;t<0?f=h:t>h&&(f=0),d&&f!==s&&d(f),this.setState({previousIndex:s,currentIndex:f,isTransitioning:f!==s,currentSlideOffset:0,slideStyle:{transition:"all ".concat(u,"ms ease-out")}},this.onSliding)}}},{key:"slideLeft",value:function(t){var n=this.props.isRTL;this.slideTo(t,n?"right":"left")}},{key:"slideRight",value:function(t){var n=this.props.isRTL;this.slideTo(t,n?"left":"right")}},{key:"slideTo",value:function(t,n){var r=this.state,s=r.currentIndex,i=r.isTransitioning,o=this.props.items,a=s+(n==="left"?-1:1);i||(o.length===2?this.slideToIndexWithStyleReset(a,t):this.slideToIndex(a,t))}},{key:"slideToIndexWithStyleReset",value:function(t,n){var r=this,s=this.state,i=s.currentIndex,o=s.currentSlideOffset;this.setState({currentSlideOffset:o+(i>t?.001:-.001),slideStyle:{transition:"none"}},(function(){window.setTimeout((function(){return r.slideToIndex(t,n)}),25)}))}},{key:"handleThumbnailMouseOver",value:function(t,n){this.props.slideOnThumbnailOver&&this.onThumbnailMouseOver(t,n)}},{key:"handleThumbnailKeyUp",value:function(t,n){Oo(t)&&this.onThumbnailClick(t,n)}},{key:"handleSlideKeyUp",value:function(t){Oo(t)&&(0,this.props.onClick)(t)}},{key:"isThumbnailVertical",value:function(){var t=this.props.thumbnailPosition;return t==="left"||t==="right"}},{key:"addScreenChangeEvent",value:function(){var t=this;Eo.forEach((function(n){document.addEventListener(n,t.handleScreenChange)}))}},{key:"removeScreenChangeEvent",value:function(){var t=this;Eo.forEach((function(n){document.removeEventListener(n,t.handleScreenChange)}))}},{key:"fullScreen",value:function(){var t=this.props.useBrowserFullscreen,n=this.imageGallery.current;t?n.requestFullscreen?n.requestFullscreen():n.msRequestFullscreen?n.msRequestFullscreen():n.mozRequestFullScreen?n.mozRequestFullScreen():n.webkitRequestFullscreen?n.webkitRequestFullscreen():this.setModalFullscreen(!0):this.setModalFullscreen(!0),this.setState({isFullscreen:!0})}},{key:"exitFullScreen",value:function(){var t=this.state.isFullscreen,n=this.props.useBrowserFullscreen;t&&(n?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():this.setModalFullscreen(!1):this.setModalFullscreen(!1),this.setState({isFullscreen:!1}))}},{key:"pauseOrPlay",value:function(){var t=this.props.infinite,n=this.state.currentIndex;t||this.canSlideRight()?this.slideToIndex(n+1):this.pause()}},{key:"play",value:function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],n=this.props,r=n.onPlay,s=n.slideInterval,i=n.slideDuration,o=this.state.currentIndex;this.playPauseIntervalId||(this.setState({isPlaying:!0}),this.playPauseIntervalId=window.setInterval(this.pauseOrPlay,Math.max(s,i)),r&&t&&r(o))}},{key:"pause",value:function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],n=this.props.onPause,r=this.state.currentIndex;this.playPauseIntervalId&&(window.clearInterval(this.playPauseIntervalId),this.playPauseIntervalId=null,this.setState({isPlaying:!1}),n&&t&&n(r))}},{key:"isImageLoaded",value:function(t){return!!this.loadedImages[t.original]||(this.loadedImages[t.original]=!0,!1)}},{key:"handleImageLoaded",value:function(t,n){var r=this.props.onImageLoad;!this.loadedImages[n]&&r&&(this.loadedImages[n]=!0,r(t))}},{key:"renderItem",value:function(t){var n=this.state.isFullscreen,r=this.props.onImageError||this.handleImageError;return $.default.createElement(ph,{description:t.description,fullscreen:t.fullscreen,handleImageLoaded:this.handleImageLoaded,isFullscreen:n,onImageError:r,original:t.original,originalAlt:t.originalAlt,originalHeight:t.originalHeight,originalWidth:t.originalWidth,originalTitle:t.originalTitle,sizes:t.sizes,loading:t.loading,srcSet:t.srcSet})}},{key:"renderThumbInner",value:function(t){var n=this.props.onThumbnailError||this.handleImageError;return $.default.createElement("span",{className:"image-gallery-thumbnail-inner"},$.default.createElement("img",{className:"image-gallery-thumbnail-image",src:t.thumbnail,height:t.thumbnailHeight,width:t.thumbnailWidth,alt:t.thumbnailAlt,title:t.thumbnailTitle,loading:t.thumbnailLoading,onError:n}),t.thumbnailLabel&&$.default.createElement("div",{className:"image-gallery-thumbnail-label"},t.thumbnailLabel))}},{key:"render",value:function(){var t=this.state,n=t.currentIndex,r=t.isFullscreen,s=t.modalFullscreen,i=t.isPlaying,o=this.props,a=o.additionalClass,u=o.disableThumbnailSwipe,d=o.indexSeparator,h=o.isRTL,f=o.items,y=o.thumbnailPosition,g=o.renderFullscreenButton,v=o.renderCustomControls,m=o.renderLeftNav,x=o.renderRightNav,c=o.renderTopNav,w=o.renderBottomNav,S=o.showBullets,b=o.showFullscreenButton,p=o.showIndex,k=o.showThumbnails,E=o.showNav,A=o.showPlayButton,B=o.slideVertically,L=o.renderPlayPauseButton,P=this.getThumbnailStyle(),I=this.getSlideItems(),D=I.slides,j=I.thumbnails,N=I.bullets,T=at("image-gallery-slide-wrapper",this.getThumbnailPositionClassName(y),{"image-gallery-rtl":h}),z=at("image-gallery-bullets",{"image-gallery-bullets-vertical":B}),Q=$.default.createElement("div",{ref:this.imageGallerySlideWrapper,className:T},v&&v(),this.canSlide()?$.default.createElement($.default.Fragment,null,E&&$.default.createElement($.default.Fragment,null,B?c(this.slideLeft,!this.canSlideLeft()):m(this.slideLeft,!this.canSlideLeft()),B?w(this.slideRight,!this.canSlideRight()):x(this.slideRight,!this.canSlideRight())),$.default.createElement(jo,{className:"image-gallery-swipe",delta:0,onSwiping:this.handleSwiping,onSwiped:this.handleOnSwiped},$.default.createElement("div",{className:"image-gallery-slides"},D))):$.default.createElement("div",{className:"image-gallery-slides"},D),A&&L(this.togglePlay,i),S&&$.default.createElement("div",{className:z},$.default.createElement("div",{className:"image-gallery-bullets-container",role:"navigation","aria-label":"Bullet Navigation"},N)),b&&g(this.toggleFullScreen,r),p&&$.default.createElement("div",{className:"image-gallery-index"},$.default.createElement("span",{className:"image-gallery-index-current"},n+1),$.default.createElement("span",{className:"image-gallery-index-separator"},d),$.default.createElement("span",{className:"image-gallery-index-total"},f.length))),R=at("image-gallery",a,{"fullscreen-modal":s}),X=at("image-gallery-content",this.getThumbnailPositionClassName(y),{fullscreen:r}),U=at("image-gallery-thumbnails-wrapper",this.getThumbnailPositionClassName(y),{"thumbnails-wrapper-rtl":!this.isThumbnailVertical()&&h},{"thumbnails-swipe-horizontal":!this.isThumbnailVertical()&&!u},{"thumbnails-swipe-vertical":this.isThumbnailVertical()&&!u});return $.default.createElement("div",{ref:this.imageGallery,className:R,"aria-live":"polite"},$.default.createElement("div",{className:X},(y==="bottom"||y==="right")&&Q,k&&j.length>0?$.default.createElement(jo,{className:U,delta:0,onSwiping:!u&&this.handleThumbnailSwiping,onSwiped:!u&&this.handleOnThumbnailSwiped},$.default.createElement("div",{className:"image-gallery-thumbnails",ref:this.thumbnailsWrapper,style:this.getThumbnailBarHeight()},$.default.createElement("nav",{ref:this.thumbnails,className:"image-gallery-thumbnails-container",style:P,"aria-label":"Thumbnail Navigation"},j))):null,(y==="top"||y==="left")&&Q))}}])})();$r.propTypes={flickThreshold:C.number,items:(0,C.arrayOf)((0,C.shape)({bulletClass:C.string,bulletOnClick:C.func,description:C.string,original:C.string,originalHeight:C.number,originalWidth:C.number,loading:C.string,thumbnailHeight:C.number,thumbnailWidth:C.number,thumbnailLoading:C.string,fullscreen:C.string,originalAlt:C.string,originalTitle:C.string,thumbnail:C.string,thumbnailAlt:C.string,thumbnailLabel:C.string,thumbnailTitle:C.string,originalClass:C.string,thumbnailClass:C.string,renderItem:C.func,renderThumbInner:C.func,imageSet:Eh,srcSet:C.string,sizes:C.string})).isRequired,showNav:C.bool,autoPlay:C.bool,lazyLoad:C.bool,infinite:C.bool,showIndex:C.bool,showBullets:C.bool,showThumbnails:C.bool,showPlayButton:C.bool,showFullscreenButton:C.bool,disableThumbnailScroll:C.bool,disableKeyDown:C.bool,disableSwipe:C.bool,disableThumbnailSwipe:C.bool,useBrowserFullscreen:C.bool,onErrorImageURL:C.string,indexSeparator:C.string,thumbnailPosition:(0,C.oneOf)(["top","bottom","left","right"]),startIndex:C.number,slideDuration:C.number,slideInterval:C.number,slideOnThumbnailOver:C.bool,swipeThreshold:C.number,swipingTransitionDuration:C.number,swipingThumbnailTransitionDuration:C.number,onSlide:C.func,onBeforeSlide:C.func,onScreenChange:C.func,onPause:C.func,onPlay:C.func,onClick:C.func,onImageLoad:C.func,onImageError:C.func,onTouchMove:C.func,onTouchEnd:C.func,onTouchStart:C.func,onMouseOver:C.func,onMouseLeave:C.func,onBulletClick:C.func,onThumbnailError:C.func,onThumbnailClick:C.func,renderCustomControls:C.func,renderLeftNav:C.func,renderRightNav:C.func,renderTopNav:C.func,renderBottomNav:C.func,renderPlayPauseButton:C.func,renderFullscreenButton:C.func,renderItem:C.func,renderThumbInner:C.func,stopPropagation:C.bool,additionalClass:C.string,useTranslate3D:C.bool,isRTL:C.bool,useWindowKeyDown:C.bool,slideVertically:C.bool},$r.defaultProps={onErrorImageURL:"",additionalClass:"",showNav:!0,autoPlay:!1,lazyLoad:!1,infinite:!0,showIndex:!1,showBullets:!1,showThumbnails:!0,showPlayButton:!0,showFullscreenButton:!0,disableThumbnailScroll:!1,disableKeyDown:!1,disableSwipe:!1,disableThumbnailSwipe:!1,useTranslate3D:!0,isRTL:!1,useBrowserFullscreen:!0,flickThreshold:.4,stopPropagation:!1,indexSeparator:" / ",thumbnailPosition:"bottom",startIndex:0,slideDuration:450,swipingTransitionDuration:0,swipingThumbnailTransitionDuration:0,onSlide:null,onBeforeSlide:null,onScreenChange:null,onPause:null,onPlay:null,onClick:null,onImageLoad:null,onImageError:null,onTouchMove:null,onTouchEnd:null,onTouchStart:null,onMouseOver:null,onMouseLeave:null,onBulletClick:null,onThumbnailError:null,onThumbnailClick:null,renderCustomControls:null,renderThumbInner:null,renderItem:null,slideInterval:3e3,slideOnThumbnailOver:!1,swipeThreshold:30,slideVertically:!1,renderLeftNav:function(e,t){return $.default.createElement(bh,{onClick:e,disabled:t})},renderRightNav:function(e,t){return $.default.createElement(xh,{onClick:e,disabled:t})},renderTopNav:function(e,t){return $.default.createElement(jh,{onClick:e,disabled:t})},renderBottomNav:function(e,t){return $.default.createElement(Th,{onClick:e,disabled:t})},renderPlayPauseButton:function(e,t){return $.default.createElement(wh,{onClick:e,isPlaying:t})},renderFullscreenButton:function(e,t){return $.default.createElement(vh,{onClick:e,isFullscreen:t})},useWindowKeyDown:!0};const Oh=$r;var Ph=Js.A;function Ih(){var e=new Map;function t(n){var r=n.root,s=n.rootMargin,i=n.threshold,o=e.get(r);o||(o=new Map,e.set(r,o));var a=JSON.stringify({rootMargin:s,threshold:i}),u=o.get(a);if(!u){var d=new Map,h=new IntersectionObserver(function(f){f.forEach(function(y){var g=d.get(y.target);g?.(y)})},{root:r,rootMargin:s,threshold:i});u={observer:h,entryCallbacks:d},o.set(a,u)}return{observe:function(y,g){var v,m;(v=u)==null||v.entryCallbacks.set(y,g),(m=u)==null||m.observer.observe(y)},unobserve:function(y){var g,v;(g=u)==null||g.entryCallbacks.delete(y),(v=u)==null||v.observer.unobserve(y)}}}return{getObserver:t}}var _h="0px",Rh=[0],Lh=Ih();function Dh(e){var t,n,r=(t=e?.rootMargin)!=null?t:_h,s=(n=e?.threshold)!=null?n:Rh,i=O.useRef(null),o=O.useRef(null),a=O.useRef(null),u=O.useState(),d=u[0],h=u[1],f=O.useCallback(function(){var m=i.current;if(!m){h(void 0);return}var x=Lh.getObserver({root:o.current,rootMargin:r,threshold:s});x.observe(m,function(c){h(c)}),a.current=x},[r,s]),y=O.useCallback(function(){var m=a.current,x=i.current;x&&m?.unobserve(x),a.current=null},[]),g=O.useCallback(function(m){y(),i.current=m,f()},[f,y]),v=O.useCallback(function(m){y(),o.current=m,f()},[f,y]);return[g,{entry:d,rootRef:v}]}function Fr(){return Fr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fr.apply(this,arguments)}function Nh(e){var t,n=Dh(e),r=n[0],s=n[1],i=!!((t=s.entry)!=null&&t.isIntersecting),o=O.useState(i),a=o[0],u=o[1];return i&&!a&&u(!0),[r,Fr({},s,{isVisible:i,wasEverVisible:a})]}var Mh=100;function Ah(e){var t=e.loading,n=e.hasNextPage,r=e.onLoadMore,s=e.rootMargin,i=e.disabled,o=e.delayInMs,a=o===void 0?Mh:o,u=Nh({rootMargin:s}),d=u[0],h=u[1],f=h.rootRef,y=h.isVisible,g=!i&&!t&&y&&n;return O.useEffect(function(){if(g){var v=setTimeout(function(){r()},a);return function(){clearTimeout(v)}}},[r,g,a]),[d,{rootRef:f}]}const Bh={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>'},$h={width:24,height:24,body:'<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M0 0h24v24H0z"/><path fill="currentColor" d="M18.333 2c1.96 0 3.56 1.537 3.662 3.472l.005.195v12.666c0 1.96-1.537 3.56-3.472 3.662l-.195.005H5.667a3.667 3.667 0 0 1-3.662-3.472L2 18.333V5.667c0-1.96 1.537-3.56 3.472-3.662L5.667 2h12.666zm-2.626 7.293a1 1 0 0 0-1.414 0L11 12.585l-1.293-1.292l-.094-.083a1 1 0 0 0-1.32 1.497l2 2l.094.083a1 1 0 0 0 1.32-.083l4-4l.083-.094a1 1 0 0 0-.083-1.32z"/></g>'},Fh={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 6L6 18M6 6l12 12"/>'};var ir=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function or(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent("on".concat(t),function(){n(window.event)})}function ca(e,t){for(var n=t.slice(0,t.length-1),r=0;r<n.length;r++)n[r]=e[n[r].toLowerCase()];return n}function ua(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");for(var t=e.split(","),n=t.lastIndexOf("");n>=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function Wh(e,t){for(var n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,s=!0,i=0;i<n.length;i++)r.indexOf(n[i])===-1&&(s=!1);return s}var ri={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":ir?173:189,"=":ir?61:187,";":ir?59:186,"'":222,"[":219,"]":221,"\\":220},nt={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},Wr={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},fe={16:!1,18:!1,17:!1,91:!1},ce={};for(var on=1;on<20;on++)ri["f".concat(on)]=111+on;var ie=[],Po=!1,da="all",ha=[],On=function(t){return ri[t.toLowerCase()]||nt[t.toLowerCase()]||t.toUpperCase().charCodeAt(0)};function fa(e){da=e||"all"}function Ft(){return da||"all"}function qh(){return ie.slice(0)}function Uh(e){var t=e.target||e.srcElement,n=t.tagName,r=!0;return(t.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!t.readOnly)&&(r=!1),r}function zh(e){return typeof e=="string"&&(e=On(e)),ie.indexOf(e)!==-1}function Kh(e,t){var n,r;e||(e=Ft());for(var s in ce)if(Object.prototype.hasOwnProperty.call(ce,s))for(n=ce[s],r=0;r<n.length;)n[r].scope===e?n.splice(r,1):r++;Ft()===e&&fa(t||"all")}function Vh(e){var t=e.keyCode||e.which||e.charCode,n=ie.indexOf(t);if(n>=0&&ie.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&ie.splice(0,ie.length),(t===93||t===224)&&(t=91),t in fe){fe[t]=!1;for(var r in nt)nt[r]===t&&(Te[r]=!1)}}function Hh(e){if(typeof e>"u")Object.keys(ce).forEach(function(o){return delete ce[o]});else if(Array.isArray(e))e.forEach(function(o){o.key&&sr(o)});else if(typeof e=="object")e.key&&sr(e);else if(typeof e=="string"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var s=n[0],i=n[1];typeof s=="function"&&(i=s,s=""),sr({key:e,scope:s,method:i,splitKey:"+"})}}var sr=function(t){var n=t.key,r=t.scope,s=t.method,i=t.splitKey,o=i===void 0?"+":i,a=ua(n);a.forEach(function(u){var d=u.split(o),h=d.length,f=d[h-1],y=f==="*"?"*":On(f);if(ce[y]){r||(r=Ft());var g=h>1?ca(nt,d):[];ce[y]=ce[y].filter(function(v){var m=s?v.method===s:!0;return!(m&&v.scope===r&&Wh(v.mods,g))})}})};function Io(e,t,n,r){if(t.element===r){var s;if(t.scope===n||t.scope==="all"){s=t.mods.length>0;for(var i in fe)Object.prototype.hasOwnProperty.call(fe,i)&&(!fe[i]&&t.mods.indexOf(+i)>-1||fe[i]&&t.mods.indexOf(+i)===-1)&&(s=!1);(t.mods.length===0&&!fe[16]&&!fe[18]&&!fe[17]&&!fe[91]||s||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}}function _o(e,t){var n=ce["*"],r=e.keyCode||e.which||e.charCode;if(Te.filter.call(this,e)){if((r===93||r===224)&&(r=91),ie.indexOf(r)===-1&&r!==229&&ie.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(v){var m=Wr[v];e[v]&&ie.indexOf(m)===-1?ie.push(m):!e[v]&&ie.indexOf(m)>-1?ie.splice(ie.indexOf(m),1):v==="metaKey"&&e[v]&&ie.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(ie=ie.slice(ie.indexOf(m))))}),r in fe){fe[r]=!0;for(var s in nt)nt[s]===r&&(Te[s]=!0);if(!n)return}for(var i in fe)Object.prototype.hasOwnProperty.call(fe,i)&&(fe[i]=e[Wr[i]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(ie.indexOf(17)===-1&&ie.push(17),ie.indexOf(18)===-1&&ie.push(18),fe[17]=!0,fe[18]=!0);var o=Ft();if(n)for(var a=0;a<n.length;a++)n[a].scope===o&&(e.type==="keydown"&&n[a].keydown||e.type==="keyup"&&n[a].keyup)&&Io(e,n[a],o,t);if(r in ce){for(var u=0;u<ce[r].length;u++)if((e.type==="keydown"&&ce[r][u].keydown||e.type==="keyup"&&ce[r][u].keyup)&&ce[r][u].key){for(var d=ce[r][u],h=d.splitKey,f=d.key.split(h),y=[],g=0;g<f.length;g++)y.push(On(f[g]));y.sort().join("")===ie.sort().join("")&&Io(e,d,o,t)}}}}function Gh(e){return ha.indexOf(e)>-1}function Te(e,t,n){ie=[];var r=ua(e),s=[],i="all",o=document,a=0,u=!1,d=!0,h="+",f=!1;for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(i=t.scope),t.element&&(o=t.element),t.keyup&&(u=t.keyup),t.keydown!==void 0&&(d=t.keydown),t.capture!==void 0&&(f=t.capture),typeof t.splitKey=="string"&&(h=t.splitKey)),typeof t=="string"&&(i=t);a<r.length;a++)e=r[a].split(h),s=[],e.length>1&&(s=ca(nt,e)),e=e[e.length-1],e=e==="*"?"*":On(e),e in ce||(ce[e]=[]),ce[e].push({keyup:u,keydown:d,scope:i,mods:s,shortcut:r[a],method:n,key:r[a],splitKey:h,element:o});typeof o<"u"&&!Gh(o)&&window&&(ha.push(o),or(o,"keydown",function(y){_o(y,o)},f),Po||(Po=!0,or(window,"focus",function(){ie=[]},f)),or(o,"keyup",function(y){_o(y,o),Vh(y)},f))}function Xh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(ce).forEach(function(n){var r=ce[n].find(function(s){return s.scope===t&&s.shortcut===e});r&&r.method&&r.method()})}var ar={setScope:fa,getScope:Ft,deleteScope:Kh,getPressedKeyCodes:qh,isPressed:zh,filter:Uh,trigger:Xh,unbind:Hh,keyMap:ri,modifier:nt,modifierMap:Wr};for(var lr in ar)Object.prototype.hasOwnProperty.call(ar,lr)&&(Te[lr]=ar[lr]);if(typeof window<"u"){var Yh=window.hotkeys;Te.noConflict=function(e){return e&&window.hotkeys===Te&&(window.hotkeys=Yh),Te},window.hotkeys=Te}Te.filter=function(){return!0};var pa=function(t,n){var r=t.target,s=r&&r.tagName;return!!(s&&n&&n.includes(s))},Qh=function(t){return pa(t,["INPUT","TEXTAREA","SELECT"])};function Jh(e,t,n,r){n instanceof Array&&(r=n,n=void 0);var s=n||{},i=s.enableOnTags,o=s.filter,a=s.keyup,u=s.keydown,d=s.filterPreventDefault,h=d===void 0?!0:d,f=s.enabled,y=f===void 0?!0:f,g=s.enableOnContentEditable,v=g===void 0?!1:g,m=O.useRef(null),x=O.useCallback(function(c,w){var S,b;return o&&!o(c)?!h:Qh(c)&&!pa(c,i)||(S=c.target)!=null&&S.isContentEditable&&!v?!0:m.current===null||document.activeElement===m.current||(b=m.current)!=null&&b.contains(document.activeElement)?(t(c,w),!0):!1},r?[m,i,o].concat(r):[m,i,o]);return O.useEffect(function(){if(!y){Te.unbind(e,x);return}return a&&u!==!0&&(n.keydown=!1),Te(e,n||{},x),function(){return Te.unbind(e,x)}},[x,e,y]),m}Te.isPressed;const ma=O.createContext({open:!1,toggleOpen:e=>{}});function Zh({children:e}){const[t,n]=O.useState(!1),r=i=>{n(i??!i)},s=O.useMemo(()=>({open:t,toggleOpen:r}),[t]);return l.jsx(ma.Provider,{value:s,children:e})}function ii(){return O.useContext(ma)}const Pe={nameAsc:"title",nameDesc:"title",popularity:"stats.downloads",publishAt:"lastPublishedAt",mobilePageSize:10,pageSize:18,currentPage:1,defaultCurrentPage:1,blockletsPath:"/api/v2/blocklets.json",categoriesPath:"/api/blocklets/categories",explorePath:"/api/blocklets/explore",exploreDidsPath:"/api/blocklets/dids",cacheSize:100},ef=e=>qt(async()=>{const{data:t}=await e.get(Pe.categoriesPath);return Array.isArray(t)?t:[]},{manual:!0});function tf(e,t){const n=e.menu?{sortBy:"popularity",sortDirection:"desc",showResources:"true",...ql(e,["sortBy","sortDirection","showResources"])}:{sortBy:"popularity",sortDirection:"desc",showResources:"true",...e,menu:void 0},{onFilterChange:r,onSearchSelect:s=a=>{t.onFilterChange({...n,keyword:a.title})},emptyCategory:i}=t;!n.category&&!i&&(n.category="All");const o=a=>{const u={...n,...a};r(Nn(u,d=>d===""||d===void 0))};return{filters:e,cleanFilter:a=>{const u=a?Nn(n,(d,h)=>a.includes(h)):{};r(Nn(u,d=>d===""||d===void 0))},handleActiveMenu:a=>{a!==e.menu&&r({menu:a})},handleSort:(a,u)=>{o({sortBy:a,sortDirection:u||a==="nameAsc"?"asc":"desc"})},handleKeyword:a=>{o({category:void 0,keyword:a||void 0})},handlePrice:a=>{o({price:a===e.price?void 0:a})},handleCategory:a=>{o({category:a===e.category?"":a})},handleDeveloper:a=>{o({owner:a||void 0})},handlePage:a=>{o({currentPage:a})},handleSwitchIsOfficial:a=>{o({isOfficial:a==="true"?"true":""})},handleSwitchShowResources:a=>{o({showResources:a})},handleSearchSelect:a=>{s(a)}}}const nf=(e,t,n)=>e&&t||!n,ga=e=>[{name:e("sort.popularity"),value:"popularity"},{name:e("sort.lastPublished"),value:"publishAt"}],ya=(e,t,n)=>{const r=Ul(e),s=zl(r.search);if(Kl(e)?.endsWith(".gif"))return s.imageFilter?Vl({...r,search:""}):e;if(s.imageFilter)return e;const i=n||window.blocklet?.version,{w:o,h:a}=typeof t=="object"?{w:t.w,h:t.h}:{w:t,h:t};return kn(e,{...o||a?{imageFilter:"resize",w:o,h:a}:{},v:i})},rf=e=>[{name:e("blocklet.free"),value:"free"},{name:e("blocklet.payment"),value:"payment"}],of=(e=[],t="en")=>e.map(n=>({name:n.locales[t]||n.locales.en,value:n._id})),sf=e=>Array.isArray(e)?e.map(t=>t.message).join(`
|
|
367
|
+
`):e.response?.data?.error?e.response.data.error.message||e.response.data.error:e.message||e,af=(e,t)=>e?.replace(/{(\w*)}/g,(n,r)=>t.hasOwnProperty(r)?t[r]:""),lf=()=>window.innerWidth<=600,cf={common:{title:"Blocklet Store",searchStore:"Search Blocklet",showResources:"Show extensions",official:"Official Blocklets",price:"Price",category:"Category",categories:"Categories",resourceType:"Resource Type",clear:"Clear",cancel:"Cancel",search:"Search",fetchError:"Failed to fetch data, please try again later",searchPlaceholder:"Search blocklet"},explore:{title:"Explore",trending:"Trending",topRated:"Top Rated",recentlyUpdated:"Recently Updated",viewDetail:"View Details"},sort:{sort:"Sort",rating:"Rating",popularity:"Most Popular",lastPublished:"Latest Published"},category:{all:"All",placeholder:"Category name",helperText:"Please select a category"},blocklet:{noResults:"No blocklet found.",free:"Free",search:'Results for "{keyword}"',authorTag:"Blocklet by {name}",resourceTag:"Extensions for {name}",resultCount:"{count} Blocklets",emptyTip:"Tips:",filterTip:"Appropriately reduce the filter conditions",keywordTip:"Try other keywords",owner:"Blocklets from {name}",noBlockletPart1:'No Blocklets associated with"',noBlockletPart2:'"were found',noCategoryResults1:'No "',noCategoryResults2:'" Blocklets'},autocomplete:{expandResult:'View all search results for "{name}"'}},uf={common:{title:"Blocklet 商店",searchStore:"搜索 Blocklet",showResources:"显示扩展",official:"官方 Blocklet",price:"价格",category:"类别",categories:"类别",resourceType:"资源类型",clear:"清除",cancel:"取消",search:"搜索",fetchError:"获取数据失败, 请稍后再试",searchPlaceholder:"搜索 Blocklet"},explore:{title:"探索",trending:"趋势",topRated:"评分最高",recentlyUpdated:"最近更新",viewDetail:"查看详情"},sort:{sort:"排序",rating:"评分",popularity:"最热门",lastPublished:"最新发布"},category:{all:"全部",placeholder:"分类名称",helperText:"请选择分类"},blocklet:{noResults:"未搜索到 Blocklet",free:"免费",search:'搜索 "{keyword}" 的结果',authorTag:"{name} 的 Blocklet",resourceTag:"{name} 的拓展",resultCount:"{count} 个 Blocklet",emptyTip:"建议:",filterTip:"适当减少筛选条件",keywordTip:"尝试其他关键字",owner:"来自 {name} 的 Blocklets",noBlockletPart1:'没有找到与"',noBlockletPart2:'"相关的 Blocklets',noCategoryResults1:'无 "',noCategoryResults2:'" 类别的 Blocklets'},autocomplete:{expandResult:"查看 “{name}” 的所有搜索结果"}},cr={en:hi(cf),zh:hi(uf)},va=(e,t)=>{const n={};return e&&(n["x-blocklet-server-version"]=e),t&&(n["x-blocklet-store-version"]=t),n},df=e=>(t,n)=>{const r=cr[e]?cr[e][t]:cr.en[t];return af(r,n)||t},ba={errors:{fetchCategoriesError:null},loadings:{fetchCategoriesLoading:!1},compact:!1,endpoint:"",wrapChildren:()=>null,t:e=>e,storeVersion:"",minItemWidth:350,serverVersion:"",layout:{},selectedCategory:void 0,categoryList:[],blockletRender:()=>null,locale:"en",categoryOptions:[],priceOptions:[],storeApi:null,baseSearch:!1,showResourcesSwitch:!1,showCategory:!1,tagFilters:[],developerName:"",onFilterChange:()=>{},updateDeveloperName:()=>{},getCategoryLocale:()=>null,search:{filters:{},cleanFilter:()=>{},handleActiveMenu:()=>{},handleSort:()=>{},handleKeyword:()=>{},handlePrice:()=>{},handleCategory:()=>{},handleDeveloper:()=>{},handleSwitchShowResources:()=>{},handleSwitchIsOfficial:()=>{},handleSearchSelect:()=>{},handlePage:()=>{}}},xa=O.createContext(ba),{Provider:hf,Consumer:qp}=xa;function ff(e){const{locale:t="zh",filters:n={},serverVersion:r="",onFilterChange:s=()=>{},minItemWidth:i=350,queryFilter:o=!0,layout:a={},wrapChildren:u=R=>R,extraFilter:d=R=>R,baseSearch:h=!1,fetchCategoryDelay:f=0,showResourcesSwitch:y=!1,showCategory:g=!0,tagFilters:v=[],children:m,storeVersion:x,onSearchSelect:c=()=>{},endpoint:w,blockletRender:S,compact:b=!1}=e,p=va(r,x),k=O.useMemo(()=>os({baseURL:w,headers:p}),[w]),E=tf(n,{onFilterChange:s,emptyCategory:!a.showExplore,onSearchSelect:c}),[A,B]=O.useState(""),{data:L=[],error:P,loading:I,run:D}=ef(k),j=O.useMemo(()=>{const R=Wl(L,[U=>U.name],["asc"]),X=R.findIndex(U=>U.name==="All"||U.locales.en==="All");return X>-1?[{...R[X],_id:"All"},...R.slice(0,X),...R.slice(X+1)]:R},[L]),N=O.useCallback(df(t),[t]),T=O.useMemo(()=>of(j,t),[j,t]),z=rf(N),Q={search:E,compact:b,errors:{fetchCategoriesError:P},loadings:{fetchCategoriesLoading:I},extraFilter:d,endpoint:w,queryFilter:o,layout:{showExplore:a.showExplore??!1,showCategory:a.showCategory??!0,showTitle:a.showTitle??!0,showSearch:a.showSearch??!0},minItemWidth:i,wrapChildren:u,t:N,storeVersion:x,serverVersion:r,selectedCategory:E.filters.category||(a.showExplore?"":"All"),categoryList:j,blockletRender:S,locale:t,categoryOptions:T,priceOptions:z,storeApi:k,baseSearch:h,showResourcesSwitch:y,showCategory:g,tagFilters:v,onFilterChange:s,getCategoryLocale:R=>{if(!R)return null;const X=L.find(U=>U._id===R||U.locales.en==="All");return X?X.locales[t]||X.locales.en:null},get developerName(){return A},updateDeveloperName:B};return O.useEffect(()=>{setTimeout(D,f||0)},[w,D,f]),l.jsx(hf,{value:Q,children:m})}function ve(){return O.useContext(xa)||ba}function wa({children:e,onClick:t,size:n=32,...r}){return l.jsx(Wt,{...r,onClick:t,variant:"outlined",sx:[{minWidth:n,height:n,p:0,borderColor:"divider","&:hover":{borderColor:"divider"},borderRadius:2,color:"text.secondary"},...Array.isArray(r.sx)?r.sx:[r.sx]],children:e})}function sn(e,t){return e===void 0?t:e}function oi({xs:e=void 0,sm:t=void 0,md:n=void 0,lg:r=void 0,xl:s=void 0,exact:i=!1}){const o=He(),a=tt(o.breakpoints.down("sm")),u=tt(o.breakpoints.between("sm","md")),d=tt(o.breakpoints.between("md","lg")),h=tt(o.breakpoints.between("lg","xl"));if(i)return a?e||null:u?t||null:d?n||null:h?r||null:s||null;let f=e;return a||(f=sn(t,f),u)||(f=sn(n,f),d)||(f=sn(r,f),h)?f:sn(s,f)}function pf({children:e}){const{open:t,toggleOpen:n}=ii();return l.jsx(oi,{xs:l.jsx(Xa,{open:t,onClose:()=>n(!1),children:e}),md:l.jsx(F,{children:e})})}function mf({loading:e=!1,disabled:t,...n}){return l.jsx(Wt,{disableElevation:!0,disabled:t||e===!0,...n,sx:[{borderRadius:"4px"},...Array.isArray(n.sx)?n.sx:[n.sx]],startIcon:e&&l.jsx(Le,{size:"1em"})})}function qr({value:e,options:t,onChange:n,placeholder:r="",...s}){const i=O.useRef(null),o=He(),[a,u]=O.useState(!1),[d,h]=O.useState(e!==null?e:""),f=tt(o.breakpoints.down("sm"));O.useEffect(()=>{h(e!==null?e:"")},[e]);const y=O.useCallback(()=>{u(!1)},[]),g=O.useCallback(()=>{u(!0)},[]);function v(x){h(x.value),n(x.value),f&&y()}function m(x){return x===d}return l.jsxs(l.Fragment,{children:[l.jsxs(gf,{ref:i,onClick:g,variant:"outlined",size:"medium",className:["my-select__selector",Rt(d)?"":"my-select__selector--active"].join(" "),sx:{minWidth:{xs:"100px",md:"auto"},color:"text.primary",borderRadius:"8px"},...s,children:[t.find(x=>x.value===d)?.name||r,l.jsx(Ja,{className:"my-select__arrowdown",component:Za,sx:{width:18,height:18}})]}),l.jsx(el,{open:a,anchorEl:i.current,transition:!0,sx:{zIndex:"9999"},children:({TransitionProps:x,placement:c})=>l.jsx(tl,{...x,style:{transformOrigin:c==="bottom"?"center top":"center bottom"},children:l.jsx(nl,{children:l.jsx(rl,{onClickAway:y,children:l.jsx(yf,{autoFocusItem:a,onMouseEnter:g,onMouseLeave:y,children:t.map(w=>l.jsxs(Vr,{onClick:()=>v(w),sx:{fontSize:14},children:[l.jsx(Yo,{sx:{mr:1,fontSize:16,visibility:m(w.value)?"visible":"hidden"}}),w.name]},w.value))})})})})})]})}const gf=ut(mf)`
|
|
368
|
+
border: 1px solid ${e=>e.theme.palette.divider};
|
|
369
|
+
padding: 6px 8px 6px 12px;
|
|
370
|
+
font-weight: ${e=>e.theme.typography.fontWeightRegular};
|
|
371
|
+
font-size: 14px;
|
|
372
|
+
color: ${e=>e.theme.palette.text.secondary};
|
|
373
|
+
line-height: 1;
|
|
374
|
+
text-transform: none;
|
|
375
|
+
& + & {
|
|
376
|
+
margin-left: 10px;
|
|
377
|
+
}
|
|
378
|
+
.my-select__arrowdown {
|
|
379
|
+
color: ${e=>e.theme.palette.grey[400]};
|
|
380
|
+
font-size: 14px;
|
|
381
|
+
margin-left: 6px;
|
|
382
|
+
}
|
|
383
|
+
.my-select__icon {
|
|
384
|
+
font-size: 0;
|
|
385
|
+
svg {
|
|
386
|
+
color: ${e=>e.theme.palette.grey[400]};
|
|
387
|
+
font-size: 18px;
|
|
388
|
+
margin-right: 3px;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
`,yf=ut(Xo)`
|
|
392
|
+
.my-select__option__icon {
|
|
393
|
+
color: transparent;
|
|
394
|
+
font-size: 14px;
|
|
395
|
+
margin: 0 3px 0 -5px;
|
|
396
|
+
}
|
|
397
|
+
.my-select__option {
|
|
398
|
+
font-size: 14px;
|
|
399
|
+
color: #999;
|
|
400
|
+
}
|
|
401
|
+
.my-select__option--active {
|
|
402
|
+
&,
|
|
403
|
+
.my-select__option__icon {
|
|
404
|
+
color: ${e=>e.theme.palette.primary.main};
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
`;function Sa(){const{search:e,t}=ve(),{filters:n,handleSort:r,handlePrice:s}=e,i=ga(t);return l.jsxs(ye,{direction:{xs:"row",md:"column"},sx:{alignItems:{xs:"center",md:"flex-start"},gap:{xs:1,md:2},width:{xs:"100%",md:"auto"},justifyContent:"space-between"},children:[l.jsx(zr,{control:l.jsx(Kr,{checked:n.price==="free",size:"small",sx:{"& .MuiSvgIcon-fontSizeSmall":{fontSize:16,color:"text.hint"}},onChange:o=>s(o.target.checked?"free":"")}),label:t("blocklet.free")}),l.jsx(qr,{value:n.sortBy||i[0].value,options:i,onChange:o=>r(o),placeholder:t("sort.sort")})]})}function vf({menus:e=[]}){const{selectedCategory:t,search:n,t:r,categoryOptions:s,loadings:i,layout:o,baseSearch:a,compact:u}=ve(),{filters:d,handleActiveMenu:h,handleCategory:f,cleanFilter:y}=n,{toggleOpen:g}=ii();O.useEffect(()=>{g(!1)},[Object.values(d).join("")]);const v=nf(a,o.showSearch,d.keyword);return o.showCategory&&!u?l.jsxs(pf,{children:[l.jsx(oi,{xs:l.jsxs(ye,{direction:"row",justifyContent:"space-between",alignItems:"center",p:2,mb:.5,gap:2,borderBottom:1,borderColor:"divider",children:[l.jsx(wa,{onClick:()=>g(!1),children:l.jsx(Ho,{})}),l.jsx(Y,{flex:1,variant:"body1",fontWeight:"fontWeightMedium",children:r("common.category")})]}),md:null}),l.jsx(ye,{visibility:i.fetchCategoriesLoading?"hidden":"visible",width:{xs:268,md:200},boxSizing:"content-box",p:{xs:2,md:0},pr:{md:6},children:v?l.jsxs(l.Fragment,{children:[o.showExplore&&l.jsxs(F,{mb:3,pb:3,borderBottom:1,borderColor:"divider",children:[l.jsxs(F,{display:"flex",alignItems:"center",gap:1,children:[l.jsx(Ke,{icon:Nu,width:20,height:20}),l.jsx(Y,{variant:"body1",color:!t&&!d.menu?"text.primary":"grey.400",fontWeight:!t&&!d.menu?"fontWeightMedium":void 0,sx:{cursor:"pointer"},onClick:()=>{g(!1),y()},children:r("explore.title")})]}),e.map(m=>l.jsxs(F,{display:"flex",alignItems:"center",mt:2,gap:1,children:[typeof m.icon=="string"?l.jsx(Ke,{icon:m.icon,width:20,height:20}):m.icon,l.jsx(Y,{variant:"body1",color:d.menu===m.key?"text.primary":"grey.400",fontWeight:d.menu===m.key?"fontWeightMedium":void 0,sx:{cursor:"pointer"},onClick:()=>{g(!1),h(m.key),m.onClick?.()},children:m.title})]},m.key))]}),!!s.length&&l.jsx(ye,{gap:2,children:s.map(m=>l.jsx(Y,{variant:"body1",title:m.name,sx:{cursor:"pointer"},"data-cy":"filter",color:t===m.value?"text.primary":"grey.400",textTransform:"capitalize",onClick:()=>{t===m.value?y():f(m.value),g(!1)},children:m.name},m.value))})]}):l.jsx(Sa,{})})]}):null}function si(){const{endpoint:e,serverVersion:t,storeVersion:n}=ve(),r=va(t,n),s=O.useMemo(()=>os({baseURL:e,headers:r}),[e]);return{get:async i=>{const{data:o}=await s.get(i);return o},post:async(i,o)=>{const{data:a}=await s.post(i,o);return a}}}const ka=O.memo(function(e){return l.jsx(F,{...e,sx:[{height:60,display:"flex",alignItems:"center",justifyContent:"center"},...Array.isArray(e.sx)?e.sx:[e.sx]],children:l.jsx(Le,{})})});function Ro({icon:e=null,children:t=null,maxWidth:n=100,title:r=""}){return(t===0||t)&&l.jsxs(ye,{direction:"row",sx:{alignItems:"center",gap:1,maxWidth:n,overflow:"hidden"},children:[e,l.jsx(Y,{variant:"body2",title:r||(typeof t=="string"?t:void 0),sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t})]})}const bf=16/9,ur=292,Ur=189,bn=336;function xf(){const{t:e,search:t}=ve(),{get:n}=si(),r=He(),s=tt(r.breakpoints.down("md")),i=window.blocklet?.preferences?.homeBanner||[],{data:o=[],error:a,loading:u}=qt(async()=>{const m=await n(kn(Pe.blockletsPath,{didList:i.map(x=>x.did).join(",")}));return m?.dataList?i.map(x=>m.dataList.find(c=>c.did===x.did)):[]});a&&console.error("Get Banner Blocklets error:",a);const d={position:"absolute",top:"50%",transform:"translateY(-50%)",zIndex:100,cursor:"pointer",color:"text.hint"};return!a&&i.length>0?l.jsxs(l.Fragment,{children:[l.jsx(Y,{component:"h2",variant:"h2",sx:{mt:{xs:2,md:0},mb:3},children:e("explore.title")}),l.jsx(F,{sx:{height:{xs:"auto",md:ur},minHeight:ur,position:"relative",border:1,borderColor:"divider",borderRadius:3,overflow:"hidden"},children:u?l.jsxs(F,{sx:{p:5,display:{md:"flex"},gap:5,alignItems:"center",justifyContent:"center"},children:[l.jsx(Ze,{variant:"rounded",height:Ur,width:bn}),l.jsxs(F,{sx:{flex:1,height:"100%"},children:[l.jsx(Ze,{variant:"text",height:50,width:100}),l.jsx(Ze,{variant:"text",height:40,width:"100%"}),l.jsx(Ze,{variant:"text",height:40,width:300}),l.jsxs(F,{sx:{display:"flex",gap:1,my:2},children:[l.jsx(Ze,{variant:"circular",height:20,width:20}),l.jsx(Ze,{variant:"text",height:20,width:50})]}),l.jsx(Ze,{variant:"rounded",height:30,width:100})]})]}):l.jsx(Ph,{showNav:!0,autoPlay:!0,slideDuration:s?500:1e3,slideInterval:5e3,showPlayButton:!1,showIndex:!1,showBullets:!1,showThumbnails:!1,showFullscreenButton:!1,renderLeftNav:m=>l.jsx(F,{onClick:m,sx:{display:{xs:"none",md:"block"}},children:l.jsx(Qa,{sx:{...d,left:5}})}),renderRightNav:m=>l.jsx(F,{onClick:m,sx:{display:{xs:"none",md:"block"}},children:l.jsx(Ya,{sx:{...d,right:5}})}),items:i.map((m,x)=>({original:m.did,renderItem:()=>{const c=o[x]||{},w=m.cover||Sf(m.did,c.screenshots?.[0]),S=ya(w,r.breakpoints.values.md*2);return l.jsxs(ye,{direction:{xs:"column",md:"row"},onClick:()=>t.handleSearchSelect(c),sx:{height:{xs:"auto",md:ur},display:"flex",justifyContent:"center",alignItems:{xs:"flex-start",md:"center"},p:{xs:2,md:5},gap:{xs:2,md:5},cursor:"pointer","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`url("${S}")`,backgroundSize:"cover",filter:"blur(50px)",opacity:.15,zIndex:0}},children:[h(S),l.jsxs(ye,{sx:{flex:1,height:"100%",gap:3},children:[l.jsxs(F,{sx:{flex:1},children:[f(m.name||c.title||m.name),y(m.desc||c.description)]}),c.did&&g(c,m.baseNum),v(c)]})]})}}))})})]}):null;function h(m){return l.jsx(F,{sx:{borderRadius:2,overflow:"hidden",position:"relative",width:{xs:"100%",md:bn}},children:l.jsx(kf,{url:m})})}function f(m){return l.jsx(Y,{variant:"h2",sx:{width:"100%"},children:m})}function y(m){return l.jsx(Y,{variant:"body2",sx:{color:"text.secondary",textAlign:"left",width:"100%",minHeight:70,maxHeight:71,pt:1,display:"-webkit-box",lineClamp:3,WebkitLineClamp:3,textWrap:"wrap",overflow:"hidden",WebkitBoxOrient:"vertical"},children:m})}function g(m,x=0){const{did:c,owner:w,stats:S}=m;return l.jsxs(F,{sx:{display:"flex",alignItems:"center",gap:2,color:"text.secondary"},children:[l.jsx(Ro,{icon:l.jsx(hn,{src:w.avatar,did:c,size:20,variant:"circle"}),children:w.fullName}),l.jsx(Ro,{icon:l.jsx(Ke,{icon:Ds}),title:`${S.downloads+x}`,children:wf(S.downloads+x)})]})}function v(m){return l.jsx(Wt,{variant:"outlined",size:"small",onClick:()=>t.handleSearchSelect(m),sx:{width:"fit-content",textTransform:"none",borderRadius:1,borderColor:"grey.300","&:hover":{borderColor:"divider"}},children:e("explore.viewDetail")})}}const wf=e=>Number.isNaN(e)?0:e<1e3?e:e<1e6?`${(e/1e3).toFixed(1)}k`:e<1e9?`${(e/1e6).toFixed(1)}m`:`${(e/1e9).toFixed(1)}b`,Sf=(e,t)=>e&&t?`/assets/${e}/screenshots/${t}`:"";function kf({url:e}){const[t,n]=O.useState(!0);return l.jsxs(l.Fragment,{children:[t&&l.jsx(Ze,{variant:"rectangular",sx:{width:{xs:"100%",md:bn},height:{xs:"auto",md:Ur}}}),l.jsx(F,{component:"img",src:e,alt:"",onLoad:()=>n(!1),onError:()=>n(!1),sx:{display:t?"none":"block",width:{xs:"100%",md:bn},height:{xs:"auto",md:Ur},borderRadius:2,border:1,borderColor:"divider",objectFit:"container",cursor:"pointer",aspectRatio:bf}})]})}function jf({title:e,blocklets:t}){const{blockletRender:n,serverVersion:r}=ve();return l.jsxs(F,{sx:{mt:3},children:[l.jsx(Y,{component:"h3",variant:"h3",sx:{mb:2},children:e}),l.jsx(li,{container:!0,spacing:2,sx:{boxSizing:"border-box",maxWidth:"calc(100vw - 16px)"},children:t.map(s=>l.jsx(li,{"data-blocklet-did":s.did,sx:{p:"2px"},size:{xs:12,md:6},children:l.jsx(F,{sx:{padding:"1px"},children:n({blocklet:s,blocklets:t,serverVersion:r})})},s.did))})]})}function Tf(){const{get:e}=si(),{t}=ve(),{data:n=[],error:r,loading:s}=qt(async()=>{const i=await e(Pe.explorePath);return Array.isArray(i)?i:[]});return r?l.jsx(Tn,{error:new Error(`Failed to fetch blocklets from ${Pe.explorePath}`)}):s?l.jsx(ka,{mt:15}):l.jsxs(l.Fragment,{children:[l.jsx(xf,{}),n.map(i=>i.blocklets?.length>0?l.jsx(jf,{title:t(`explore.${i.type}`),blocklets:i.blocklets},i.type):null)]})}const dr="__FREE_TEXT__",Lo="__NO_RESULT__",hr=40;function ja({endpoint:e,t,locale:n,filters:r,handleKeyword:s,handleSearchSelect:i,...o}){const a=O.useRef(null),u=O.useRef(!1),[d,h]=O.useState(!1),[f,y]=O.useState(""),[g,v]=O.useState(!1),m=si(),[x,c]=O.useState(!1),w=o?.placeholder||t("common.searchStore"),S=async T=>{c(!0);const z=await m.get(lt(e,kn(Pe.blockletsPath,T)));return c(!1),z.dataList||[]},{data:b,run:p}=qt(T=>T?S({sortBy:Pe.nameDesc,page:1,pageSize:10,keyword:T,showResources:"true"}):Promise.resolve([]),{manual:!0});O.useEffect(()=>{c(!0),p(r.keyword),y(r.keyword||"")},[r.keyword,p]),Jh("ctrl + k, command + k",T=>(T.stopPropagation(),T.preventDefault(),a.current?.querySelector("input")?.focus(),!1),{enableOnTags:["INPUT"]});const k=ls(T=>p(T),{wait:300}),E={name:dr,title:f,did:""};let A=[];return f&&(x?A=[E]:b?.length?A=[E,...b]:A=[{name:Lo,title:t("blocklet.noResults"),did:""}]),l.jsxs(l.Fragment,{children:[l.jsxs(Ga,{fullScreen:!0,open:g,sx:{display:{md:"none"}},children:[l.jsxs(F,{sx:{p:2,pb:0,display:"flex",alignItems:"center",gap:2},children:[l.jsx(Go,{fullWidth:!0,sx:{bgcolor:"grey.50",px:1,py:.5,".MuiInputBase-input":{p:1},".MuiOutlinedInput-notchedOutline":{borderRadius:"8px",borderColor:"transparent"},"&&:hover .MuiOutlinedInput-notchedOutline, &&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"divider",borderWidth:"1px"}},autoFocus:!0,placeholder:w,className:"bl-autocomplete-input",value:f,onChange:T=>B(T.target.value),startAdornment:j(g),endAdornment:N()}),l.jsx(Wt,{variant:"outlined",onClick:()=>{v(!1),y(r.keyword||"")},children:t("common.cancel")})]}),l.jsx(Xo,{sx:{p:.5},children:A.map(T=>I(T))})]}),l.jsx(F,{sx:{display:{sx:"block",md:"none"},paddingTop:1,opacity:.5},children:l.jsx(Ke,{icon:Mn,style:{fontSize:22,color:"inherit"},onClick:()=>v(!0)})}),l.jsx(Fo,{ref:a,open:!!f&&d,size:"small",onOpen:()=>h(!0),onClose:(T,z)=>{h(!1),z==="selectOption"&&!u.current&&s(f)},onKeyDown:T=>{T.key==="Enter"&&!f&&L()},disableClearable:!0,inputValue:f,onInputChange:(T,z)=>B(z),isOptionEqualToValue:(T,z)=>T.name===z.name,getOptionLabel:T=>T.title,getOptionKey:T=>T.name,noOptionsText:t("blocklet.noResults"),autoHighlight:!0,forcePopupIcon:!1,slotProps:{paper:{sx:{mt:.5,minWidth:"100%",width:"fit-content","& > ul":{p:.5}}}},renderInput:T=>l.jsx(xn,{...T,InputProps:{...T.InputProps,autoFocus:!0,placeholder:w,className:"bl-autocomplete-input",value:f,startAdornment:j(d),endAdornment:N()}}),filterOptions:T=>T,...o,options:A,renderOption:(T,z)=>I(z),value:E,sx:[{bgcolor:"grey.50",borderRadius:"8px",overflow:"hidden",".MuiOutlinedInput-notchedOutline":{borderRadius:"8px",borderColor:"transparent"},"&&:hover .MuiOutlinedInput-notchedOutline, &&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"divider",borderWidth:"1px"}},...Array.isArray(o.sx)?o.sx:[o.sx]]})]});function B(T){c(!0),y(T),u.current=!1,k.run(T)}function L(){v(!1),y(""),B(""),s("")}function P(T){T?.did?(v(!1),u.current=!0,y(""),i(T)):T.name===dr&&(v(!1),s(f))}function I(T){return l.jsxs(Vr,{sx:{display:"flex",alignItems:"center",gap:1,p:1.5,borderRadius:"8px"},onClick:()=>P(T),children:[D(T),l.jsxs(Y,{variant:"body1",children:[l.jsx(Y,{sx:{fontWeight:"fontWeightMedium",display:"flex",alignItems:"center",gap:1},children:T.title}),l.jsx(Y,{sx:{fontSize:"13px",color:"text.hint"},children:T.category?.locales?.[n||"en"]||""})]})]},T.did)}function D(T){if([dr,Lo].includes(T.name))return l.jsx(F,{sx:{width:hr,p:"6px",display:"flex",justifyContent:"center",alignItems:"center",color:"text.hint",bgcolor:"grey.100",borderRadius:"8px"},children:l.jsx(Ke,{icon:Mn,style:{fontSize:28}})});let z="";return T.logo&&(z=lt(e,"assets",T.did,ya(T.logo,hr,T.version))),l.jsx(hn,{src:z,size:hr,style:{borderRadius:"8px",overflow:"hidden"}})}function j(T=!0){return l.jsx(F,{sx:{display:"flex",pl:.5,alignItems:"center",color:"text.hint"},children:T&&f&&x?l.jsx(Le,{color:"inherit",size:16}):l.jsx(Ke,{icon:Mn,style:{fontSize:16,cursor:"default"}})})}function N(){return f?l.jsx(F,{sx:{display:"flex",alignItems:"center",color:"text.hint"},children:l.jsx(Ke,{icon:Fh,style:{fontSize:20,cursor:"pointer",color:"inherit"},onClick:()=>L()})}):null}}function Cf({placeholder:e,...t}){const{search:n,t:r}=ve(),{filters:s,handleKeyword:i}=n,[o,a]=O.useState(s.keyword||""),u=ls(i,{wait:300}),d=y=>{const{value:g}=y.target;a(g),u.run(g)},h=()=>{a(""),i("")};O.useEffect(()=>{a(s.keyword||"")},[s.keyword]);const f=e||r("common.searchPlaceholder");return l.jsx(Ef,{inputProps:{"data-cy":"search-blocklet"},startAdornment:l.jsx(ui,{position:"start",children:l.jsx(Of,{sx:{fontSize:18,ml:-.5}})}),onChange:d,placeholder:f,value:o,title:f,"data-cy":"search",endAdornment:o&&l.jsx(ui,{position:"end",children:l.jsx(Pf,{"data-cy":"search-delete",onClick:h})}),...t})}const Ef=ut(Go)`
|
|
408
|
+
background-color: ${e=>e.theme.palette.grey[50]};
|
|
409
|
+
font-size: 14px;
|
|
410
|
+
border-radius: 6px;
|
|
411
|
+
width: 100%;
|
|
412
|
+
.MuiInputBase-input {
|
|
413
|
+
padding: 8px 0 8px 0px;
|
|
414
|
+
}
|
|
415
|
+
.MuiOutlinedInput-notchedOutline {
|
|
416
|
+
border: none;
|
|
417
|
+
}
|
|
418
|
+
.Mui-focused {
|
|
419
|
+
background-color: #f6f6f6;
|
|
420
|
+
.MuiInputBase-input::placeholder {
|
|
421
|
+
color: transparent;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
`,Of=ut(il)`
|
|
425
|
+
color: ${e=>e.theme.palette.grey[500]};
|
|
426
|
+
`,Pf=ut(Ho)`
|
|
427
|
+
color: ${e=>e.theme.palette.grey[500]};
|
|
428
|
+
font-size: 16px;
|
|
429
|
+
cursor: pointer;
|
|
430
|
+
`;function If(){const{search:e,t,endpoint:n,locale:r,getCategoryLocale:s,developerName:i,showResourcesSwitch:o,layout:a,baseSearch:u,categoryOptions:d,compact:h}=ve(),{filters:f,handleSort:y,handlePrice:g,handleDeveloper:v,handleSwitchShowResources:m,cleanFilter:x,handleCategory:c,handleSwitchIsOfficial:w}=e,S=ga(t);return l.jsxs(ye,{className:"filter-bar",direction:{xs:"column",md:"row"},spacing:{xs:1,md:0},sx:{position:"sticky",top:0,zIndex:1e3,alignItems:{xs:"flex-start",md:"center"},justifyContent:"space-between",gap:2,pt:{xs:2,md:0},px:0,pb:h?2:3,backgroundColor:"background.default"},children:[!h&&l.jsx(Y,{variant:"h2",sx:{textTransform:"capitalize"},children:s(f.category)}),l.jsxs(ye,{direction:"row",sx:{flex:1,alignItems:"center",flexWrap:{xs:"wrap",md:"nowrap"},width:"100%",justifyContent:{xs:"flex-start",md:"flex-end"},gap:2},children:[a.showSearch?l.jsx(F,{sx:{flex:1,flexBasis:{xs:"100%",md:"auto"}},children:u?l.jsx(Cf,{}):l.jsx(ja,{locale:r,endpoint:n,sx:{display:{md:"block",xs:"none"},flex:1,mr:1,width:"350px"},t,filters:e.filters,handleKeyword:e.handleKeyword,handleSearchSelect:e.handleSearchSelect})}):null,f.owner&&i&&l.jsx(ci,{label:t("blocklet.authorTag",{name:i}),size:"small",onDelete:()=>v("")}),f.resourceDid&&f.resourceBlocklet&&l.jsx(ci,{label:t("blocklet.resourceTag",{name:f.resourceBlocklet}),size:"small",onDelete:()=>x(["resourceDid","resourceBlocklet","showResources"])}),l.jsx(fr,{checked:f.isOfficial==="true",onChange:b=>w(b?"true":"false"),label:t("common.official")}),o?l.jsx(fr,{checked:f.showResources!=="false",onChange:b=>m(b?"true":"false"),label:t("common.showResources")}):null,l.jsx(fr,{checked:f.price==="free",onChange:b=>g(b?"free":""),label:t("blocklet.free")}),h&&l.jsx(F,{children:l.jsx(qr,{value:f.category||d[0]?.value,options:d,placeholder:t("common.category"),onChange:b=>c(b)})}),l.jsx(qr,{value:f.sortBy||S[0].value,options:S,placeholder:t("sort.sort"),onChange:b=>y(b)})]})]})}function fr({checked:e,onChange:t,label:n}){const r=He();return l.jsx(zr,{sx:{m:0,p:0},className:"check-button",control:l.jsx(Kr,{checked:e,icon:l.jsx(Ke,{style:{padding:0,color:r.palette.text.secondary},icon:Bh}),checkedIcon:l.jsx(Ke,{style:{padding:0,color:r.palette.primary.main},icon:$h}),size:"large",sx:{p:0,mr:1},onChange:s=>t(s.target.checked)}),label:n})}function an({children:e}){return l.jsxs(F,{sx:{display:"flex",mt:2,flexDirection:"column",alignItems:"center",justifyContent:"center",color:"text.hint"},children:[l.jsx(ml,{}),e]})}function Do(){const{t:e}=ve();return l.jsx(Y,{style:{textAlign:"center"},variant:"subtitle2",children:e("blocklet.noResults")})}function pr({filterTip:e=!1,keywordTip:t=!1}){const{t:n,locale:r}=ve(),s=()=>r==="zh"?"、":" , ";return l.jsxs(F,{sx:{mt:1,display:"flex"},children:[l.jsx(Y,{style:{marginRight:"16px"},children:n("blocklet.emptyTip")}),e&&l.jsx(Y,{children:n("blocklet.filterTip")}),e&&t&&s(),t&&l.jsx(Y,{children:n("blocklet.keywordTip")})]})}function mr({primaryStart:e,primaryEnd:t,filter:n}){return l.jsxs(Y,{variant:"subtitle2",sx:{display:"flex",gap:.5,mx:.5},children:[l.jsx(Y,{children:e}),l.jsx(Y,{title:n,color:"primary",sx:{maxWidth:"30vw",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n}),l.jsxs(Y,{children:[t," "]})]})}function _f(){const{t:e,search:t,getCategoryLocale:n,selectedCategory:r}=ve(),{filters:s}=t,i=!!r||!!s.price;if(s.keyword&&i)return l.jsxs(an,{children:[l.jsx(mr,{primaryStart:e("blocklet.noBlockletPart1"),primaryEnd:e("blocklet.noBlockletPart2"),filter:s.keyword}),l.jsx(pr,{keywordTip:!0,filterTip:!0})]});if(s.keyword)return l.jsxs(an,{children:[l.jsx(mr,{primaryStart:e("blocklet.noBlockletPart1"),primaryEnd:e("blocklet.noBlockletPart2"),filter:s.keyword}),l.jsx(pr,{keywordTip:!0})]});if(i){const o=n(r);return l.jsxs(an,{children:[o?l.jsx(mr,{primaryStart:e("blocklet.noCategoryResults1"),primaryEnd:e("blocklet.noCategoryResults2"),filter:o}):l.jsx(Do,{}),l.jsx(pr,{filterTip:!0})]})}return l.jsx(an,{children:l.jsx(Do,{})})}const Rf=(e,t,n,r)=>lc(async s=>{s||(n.currentPage=n.defaultCurrentPage);const{currentPage:i,pageSize:o}=n,a={...t,category:t.category==="All"?"":t.category,sortBy:Pe[t.sortBy],page:i,pageSize:o};r(null);const{data:u={}}=await e.get(Pe.blockletsPath,{params:a});return n.currentPage++,{page:i,pageSize:o,list:u?.dataList||[],total:u?.total||0}},{isNoMore:s=>s?s.page*s.pageSize>=s.total:!1,reloadDeps:[e,Il(t)],onError:r});function Lf(){const{storeApi:e,search:t,extraFilter:n,errors:r,updateDeveloperName:s}=ve(),{filters:i}=t,o=ac({currentPage:Pe.currentPage,pageSize:lf()?Pe.mobilePageSize:Pe.pageSize,defaultCurrentPage:Pe.defaultCurrentPage}),[a,u]=O.useState(null),d=Rf(e,i,o,u),h=O.useMemo(()=>n?n(d.data?.list||[]):d.data?.list||[],[d.data,n]);return O.useEffect(()=>{const f=h.find(y=>y.owner.did===i.owner);s(f?.owner.fullName||f?.author.name||"")},[i.owner,h,s]),{blocklets:h,fetchBlockletsError:a,loadMore:d.loadMore,hasNextPage:!d.noMore,total:d.data?.total||0,loadings:{fetchBlockletsLoading:d.loading,loadingMore:d.loadingMore},errors:{...r,fetchBlockletsError:a}}}function Df(){const{t:e,search:t,endpoint:n,blockletRender:r,serverVersion:s,minItemWidth:i,layout:o,baseSearch:a,compact:u}=ve(),{filters:d}=t,{blocklets:h,errors:f,loadMore:y,loadings:g,hasNextPage:v,total:m}=Lf(),[x]=Ah({loading:g.fetchBlockletsLoading||g.loadingMore,hasNextPage:v,onLoadMore:y});if(f.fetchBlockletsError){const b=new Error(`Failed to fetch blocklets from ${n}: ${sf(f.fetchBlockletsError)}`);return l.jsx(Tn,{error:b})}const c=a&&o.showSearch||!d.keyword;return l.jsxs(l.Fragment,{children:[c?l.jsx(If,{}):l.jsxs(l.Fragment,{children:[l.jsx(oi,{xs:l.jsx(Sa,{}),md:null}),S()]}),w(),!g.fetchBlockletsLoading&&v&&l.jsx(F,{ref:x,sx:{height:70,minHeight:70,display:"flex",justifyContent:"center",py:2,overflow:"hidden"},children:g.loadingMore?l.jsx(Le,{}):null})]});function w(){return g.fetchBlockletsLoading?l.jsx(ka,{mt:15}):h.length?l.jsx(F,{className:"blocklet-list",sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:`repeat(auto-fill, minmax(${i}px, 1fr))`},p:"2px",rowGap:2,columnGap:u?0:2},children:h.map(b=>l.jsx(F,{"data-blocklet-did":b.did,sx:{minWidth:{xs:"100%",sm:i},maxWidth:"calc(100vw - 32px)"},children:r({blocklet:b,blocklets:h,serverVersion:s})},b.did))}):l.jsx(_f,{})}function S(){return l.jsxs(ye,{direction:"row",className:"search-result-title",sx:{alignItems:"center",justifyContent:"space-between",mb:2,mt:{xs:2,md:0}},children:[l.jsx(Y,{variant:"h3",title:d.keyword,sx:{maxWidth:"50vw",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e("blocklet.search",{keyword:d.keyword})}),l.jsx(Y,{variant:"body1",sx:{color:"text.hint",fontSize:13},children:e("blocklet.resultCount",{count:m})})]})}}function Nf(){const{t:e,selectedCategory:t,getCategoryLocale:n,locale:r,search:s}=ve(),{toggleOpen:i}=ii(),o=pl().arcSphere,a=!!window.blocklet?.navigation?.some(u=>u.section==="bottomNavigation");return l.jsxs(F,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[l.jsxs(Y,{variant:"body1",sx:{display:{xs:"flex",md:"none"},alignItems:"center",gap:1,py:2,fontWeight:"fontWeightMedium"},children:[l.jsx(wa,{onClick:()=>i(!0),children:l.jsx(Ha,{})}),n(t)||e("common.category")]}),o&&a&&l.jsx(ja,{locale:r,endpoint:window.blocklet?.prefix||"/",sx:{display:{md:"block",xs:"none"},mr:1,width:"350px"},t:e,filters:s.filters,handleKeyword:s.handleKeyword,handleSearchSelect:s.handleSearchSelect})]})}function Mf({menus:e=[],children:t=void 0}){const{search:n,layout:r,compact:s}=ve(),{filters:i}=n,o=O.useRef(null),a=i.category||i.keyword||i.price,u=e.find(d=>d.key===i.menu)?.key;return l.jsx(Zh,{children:l.jsxs(ts,{FallbackComponent:Tn,children:[!s&&l.jsx(Nf,{}),l.jsxs(F,{ref:o,className:"list-container",sx:{display:"flex",height:"100%",pt:{xs:0,md:s?0:5}},children:[l.jsx(vf,{menus:e}),l.jsxs(ye,{sx:[{height:"100%",position:"relative",flex:1},s?{overflowY:"auto",ml:-2,pr:1,pb:2}:{overflow:"visible"}],children:[u&&t?.(u),!u&&(r.showExplore&&!a?l.jsx(Tf,{}):l.jsx(Df,{}))]})]})]})})}function Af(e){const{menus:t,children:n,...r}=e,s=He(),i=Ko(Fl({},s,{typography:{h1:{fontSize:32,fontWeight:700,lineHeight:1.375,textAlign:"left"},h2:{fontSize:24,fontWeight:700,lineHeight:1.3333333,textAlign:"left"},h3:{fontSize:18,fontWeight:600,lineHeight:1.5,textAlign:"left"},fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:500,fontWeightBold:700}}));return l.jsx(Vo,{theme:i,children:l.jsx(ff,{...r,children:l.jsx(Mf,{menus:t,children:n})})})}const Bf={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1zm0 10a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1zm10 0a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1zm0-8h6m-3-3v6"/>'},$f={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m17 10l-2-6m-8 6l2-6m4 16H7.244a3 3 0 0 1-2.965-2.544l-1.255-7.152A2 2 0 0 1 5.001 8H19a2 2 0 0 1 1.977 2.304"/><path d="M10 14a2 2 0 1 0 4 0a2 2 0 0 0-4 0m11 1h-2.5a1.5 1.5 0 0 0 0 3h1a1.5 1.5 0 0 1 0 3H17m2 0v1m0-8v1"/></g>'},Ff={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M22 12.54c-1.804-.345-2.701-1.08-3.523-2.94c-.487.696-1.102 1.568-.92 2.4c.028.238-.32 1-.557 1H3c0 5.208 3.164 7 6.196 7c4.124.022 7.828-1.376 9.854-5c1.146-.101 2.296-1.505 2.95-2.46z"/><path d="M5 10h3v3H5zm3 0h3v3H8zm3 0h3v3h-3zM8 7h3v3H8zm3 0h3v3h-3zm0-3h3v3h-3zM4.571 18c1.5 0 2.047-.074 2.958-.78M10 16v.01"/></g>'},Wf={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m7 11l5-5l5 5M7 17l5-5l5 5"/>'},qf=(e,t)=>!t||!e?!0:yr.satisfies(yr.coerce(e),t);function Ta({children:e,serverVersion:t="",requirementVersion:n="",...r}){const{t:s}=Ce();return qf(t,n)?e:l.jsx(zo,{title:s("store.tooltip.upgradeServer",{serverVersion:t,version:n}),arrow:!0,children:l.jsx(Y,{children:l.jsx(Wt,{disabled:!0,variant:"outlined",...r,children:s("common.upgradeServer")})})})}Ta.propTypes={children:_.node.isRequired,serverVersion:_.string,requirementVersion:_.string};const Uf=(e,t)=>lt(t,`/blocklets/${e.did}`),No=({blocklet:e,attribute:t,value:n})=>e._formatted?e._formatted[t]:n,zf=e=>e.inStore&&Ve.isFreeBlocklet(e)===!1;function Ca({blocklet:e,blocklets:t=[],handleButtonClick:n=null,endpoint:r="",serverVersion:s=""}){const{t:i}=Ce();let o=lt(r,_l(e.did,e.logo||""));try{const x=new URL(o);x.searchParams.set("v",e.version||+new Date),o=x.href}catch{}const[a,u]=O.useState(!1),d=async()=>{try{u(!0),await n({meta:e,registryUrl:r,blocklets:t})}catch(x){wn.error(x.message)}finally{u(!1)}},{blocklet:h}=Sn(),f=()=>(h?.children||[]).find(w=>w.meta.bundleDid===e.did).meta.version,g=(()=>{const x=(h?.children||[]).find(c=>c.meta.bundleDid===e.did);if(x){try{const c=x.meta.version,w=e.version;if(yr.gt(w,c))return"upgrade"}catch{return"install"}return"disable"}return"install"})(),v=e.requirements?.server,m=[];return g==="upgrade"?m.push({key:"upgrade",icon:l.jsx(je,{icon:Wf,color:"success.light",width:20,height:20},"version"),title:`${f()} -> ${e.version}`,align:"right",color:"success.light",maxWidth:300,text:l.jsx(F,{sx:{fontWeight:"bold"},children:i("blocklet.component.upgradeAvailable")})}):g==="disable"?m.push({key:"disable",icon:l.jsx(je,{icon:Bf,color:"text.disabled",width:20,height:20},"disable"),align:"right",maxWidth:300,color:"text.disabled",text:i("blocklet.component.installed")}):zf(e)&&m.push({key:"purchase",icon:l.jsx(je,{icon:$f,color:"primary.main",width:20,height:20},"purchase"),align:"right",maxWidth:300,color:"primary.main",text:i("blocklet.component.needBuy")}),l.jsx(Kf,{title:No({blocklet:e,attribute:"title",value:e.title||e.name}),did:e.did,description:No({blocklet:e,attribute:"description",value:e.description}),cover:e.logo?o:"",version:e.version,onButtonClick:null,"data-cy":"install-blocklet",sx:g!=="disable"?{"&:hover, && *":{cursor:"pointer"}}:{"&:after, &:before":{content:'""',opacity:"0 !important"}},onMainClick:g==="disable"?void 0:d,icons:e.docker?.image?[{key:"docker",icon:l.jsx(F,{sx:{display:"flex",color:"primary.main"},children:l.jsx(je,{icon:Ff})}),title:i("blocklet.dockerImage")}]:[],official:e.isOfficial?{tooltip:i("blocklet.component.isOfficial")}:void 0,download:e.stats.downloads,status:m,button:l.jsx(Ta,{serverVersion:s,requirementVersion:v,size:"small",children:l.jsx("div",{style:{display:"flex",alignItems:"center"},children:l.jsx(Ru,{children:l.jsx(ke,{size:"small",disabled:a,variant:"outlined",color:"primary",onClick:x=>{x.preventDefault(),x.stopPropagation();const c=Uf(e,r);c&&window.open(c,"_blank","noopener,noreferrer")},children:i("common.detail")},e.did)})})})})}Ca.propTypes={blocklet:_.object.isRequired,blocklets:_.array,handleButtonClick:_.func,endpoint:_.string,serverVersion:_.string};function Ea({handleButtonClick:e=null,handleSearchSelect:t=null,storeUrl:n,handleBlockletRender:r=null,extraFilter:s=void 0,serverVersion:i="",resourceType:o="",resourceDid:a="",showResourcesSwitch:u=!0,showCategory:d=!0,compact:h=!1,...f}){const y=He(),{locale:g}=Ce(),[v,m]=O.useState(!1),[x,c]=O.useState({}),w=p=>{c(p)},S=n,b=O.useMemo(()=>Ko(y,{palette:{background:{default:y.palette.background.paper}}}),[y]);return O.useEffect(()=>{c({showResources:!0,resourceType:o,resourceDid:a})},[S,o,a]),O.useEffect(()=>{m(!0),c({showResources:!0,resourceType:o,resourceDid:a})},[]),l.jsx(Vo,{theme:b,children:l.jsx(ts,{FallbackComponent:Tn,resetKeys:[S],children:l.jsxs(F,{...f,sx:es({overflow:"auto",".title-bar + div":{height:"unset"}},f.sx),children:[v&&l.jsx(Af,{showCategory:d,showResourcesSwitch:u,blockletRender:p=>{const k={...p,handleButtonClick:e,endpoint:S};return r({...p,defaultRender:l.jsx(Ca,{...k})})},compact:h,minItemWidth:300,baseSearch:!0,endpoint:S,locale:g,onFilterChange:w,onSearchSelect:t,filters:x,extraFilter:s,serverVersion:i,fetchCategoryDelay:500}),l.jsx(F,{sx:{mt:2},children:" "})]})})})}Ea.propTypes={storeUrl:_.string.isRequired,handleButtonClick:_.func,handleSearchSelect:_.func,handleBlockletRender:_.func,extraFilter:_.func,serverVersion:_.string,resourceType:_.string,resourceDid:_.string,showResourcesSwitch:_.bool,showCategory:_.bool,compact:_.bool};const Kf=pe(Du)`
|
|
431
|
+
.ms-highlight {
|
|
432
|
+
color: ${e=>e.theme.palette.primary.main};
|
|
433
|
+
}
|
|
434
|
+
`;function Oa({ref:e=null,meta:t=null,isMobile:n,onStepChange:r}){const s=He(),{steps:i,activeStep:o,setActiveStepByKey:a,setActiveStepByIndex:u}=Ml(),{t:d,locale:h}=Ce(),f=i[o];return O.useEffect(()=>{r(o)},[r,o]),O.useImperativeHandle(e,()=>({setActiveStepByKey:a,setActiveStepByIndex:u})),l.jsx(Hf,{component:"div",className:n?"mobileStyle":"",sx:{height:"calc(100% - 56px)","&>div>div>div:first-of-type":{flex:{md:1}}},children:l.jsx(Al,{locale:h,blockletMeta:{title:" ",...t},pcWidth:"100%",pcHeight:"100%",logoUrl:t&&t.logo&&t.registryUrl?Rl({did:t.did,version:t.version,baseUrl:t.registryUrl,logoPath:t.logo}):null,theme:s,stepTip:d("blocklet.component.add"),children:l.jsx(Vf,{children:typeof f?.body=="function"?f.body():f?.body})})})}Oa.propTypes={ref:_.any,meta:_.any,onStepChange:_.func.isRequired,isMobile:_.bool.isRequired};const Mo=e=>e.isMobile?`
|
|
435
|
+
height: calc(100vh - 56px - 64px - 48px);
|
|
436
|
+
`:"",Vf=pe.div`
|
|
437
|
+
width: 100%;
|
|
438
|
+
height: 100%;
|
|
439
|
+
display: flex;
|
|
440
|
+
flex-direction: column;
|
|
441
|
+
justify-content: flex-start;
|
|
442
|
+
align-items: flex-start;
|
|
443
|
+
|
|
444
|
+
.bottom-button {
|
|
445
|
+
min-width: 200px;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
// blocklet-select-side
|
|
449
|
+
aside {
|
|
450
|
+
width: 140px;
|
|
451
|
+
}
|
|
452
|
+
`,Hf=pe(F)`
|
|
453
|
+
${({className:e})=>e==="mobileStyle"?`
|
|
454
|
+
& > div{
|
|
455
|
+
height: 100%;
|
|
456
|
+
}
|
|
457
|
+
.root-header {
|
|
458
|
+
.app-name-content {
|
|
459
|
+
display: none;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
// content-panel
|
|
464
|
+
.root-header + div{
|
|
465
|
+
padding-top: 0;
|
|
466
|
+
position: relative;
|
|
467
|
+
& > div {
|
|
468
|
+
padding-top: 0;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
header + div {
|
|
473
|
+
padding-top: 0;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
header {
|
|
477
|
+
.header-title {
|
|
478
|
+
margin-left: 0;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.header-title-name {
|
|
482
|
+
max-width: 100% !important;
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
.app-content {
|
|
486
|
+
padding: 0!important;
|
|
487
|
+
}
|
|
488
|
+
`:`
|
|
489
|
+
position: relative;
|
|
490
|
+
.ll-container { // 通过 Launcher Layout 组件约定的 .ll-container class 自定义 Layout 样式
|
|
491
|
+
width: 100%;
|
|
492
|
+
height: 100%;
|
|
493
|
+
border-radius: 0;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.root-header {
|
|
497
|
+
z-index: auto !important;
|
|
498
|
+
position: fixed !important;
|
|
499
|
+
}
|
|
500
|
+
& > div {
|
|
501
|
+
height: 100%;
|
|
502
|
+
width: 100%;
|
|
503
|
+
max-width: 100%;
|
|
504
|
+
& > div {
|
|
505
|
+
max-height: unset !important;
|
|
506
|
+
max-width: 100%;
|
|
507
|
+
& > div {
|
|
508
|
+
// left-panel
|
|
509
|
+
&:first-of-type {
|
|
510
|
+
padding: 0;
|
|
511
|
+
width: 20%;
|
|
512
|
+
min-width: 180px;
|
|
513
|
+
|
|
514
|
+
& > div:first-of-type {
|
|
515
|
+
display: none;
|
|
516
|
+
}
|
|
517
|
+
// step
|
|
518
|
+
& > div:last-child {
|
|
519
|
+
// margin-top: 32px;
|
|
520
|
+
margin-top: 0;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
// right-panel
|
|
524
|
+
&:last-child {
|
|
525
|
+
padding-top: 0;
|
|
526
|
+
padding-right: 0px;
|
|
527
|
+
overflow-y: hidden;
|
|
528
|
+
.app-content {
|
|
529
|
+
padding: 0 0 24px 0;
|
|
530
|
+
}
|
|
531
|
+
.button-container {
|
|
532
|
+
padding-right: 0;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
`}
|
|
540
|
+
|
|
541
|
+
& .ll-container {
|
|
542
|
+
background: ${({theme:e})=>e.palette.background.paper};
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
& .app-overview {
|
|
546
|
+
margin-left: 0 !important;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
& .flex-justify-center {
|
|
550
|
+
display: flex;
|
|
551
|
+
justify-content: center;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
& .flex-align-center {
|
|
555
|
+
display: flex;
|
|
556
|
+
height: 100%;
|
|
557
|
+
align-items: center;
|
|
558
|
+
${e=>Mo(e)}
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
& .agreement-wrapper {
|
|
562
|
+
${e=>Mo(e)}
|
|
563
|
+
max-height: 60vh;
|
|
564
|
+
.eula-trigger {
|
|
565
|
+
padding-right: 0;
|
|
566
|
+
}
|
|
567
|
+
.next-button {
|
|
568
|
+
display: none;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
& .connect {
|
|
573
|
+
background: white;
|
|
574
|
+
}
|
|
575
|
+
`,Gf=(e,t)=>(e?.children||[]).find(n=>n.mountPoint===t)?.meta,Xf=e=>e.inStore&&Ve.isFreeBlocklet(e)===!1,Yf=e=>[et.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED,et.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP].includes(e?.capabilities?.didSpace),gr=e=>e?.configs?.find(t=>t.key===et.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT)?.value||null,Qf=e=>(e.environments||[]).some(t=>t.required),Ao=(e,t)=>e?.some(n=>n.required&&!t[n.key]),Jf=({params:e,blocklet:t,t:n})=>{const r=e.title||e.name;return r?(t?.children||[]).find(i=>i.meta.bundleDid===e.bundleDid)?n("blocklet.component.upgradeNext",{name:r}):n("blocklet.component.addNext",{name:r}):n("common.next")},Bo=({componentDid:e,timeout:t=1e3,manual:n=!1}={})=>{setTimeout(()=>{window.parent.postMessage({event:"component.installed",componentDid:e,manual:n},"*")},t)},Zf=e=>e?.store?e.store:e?.url||"";function ep({onClose:e=()=>{},mode:t="normal",stores:n=[],resourceType:r="",resourceDid:s="",storageKey:i="",inDialog:o=!0,selectedMeta:a=null,storeUrl:u="",showResourcesSwitch:d=!0,showFromUrl:h=!0,enableRunBackground:f=!0,showCategory:y=!0,installFromUrlParams:g=null}){const{t:v,locale:m}=Ce(),[x,c]=O.useState(!1),[w,S]=O.useState(null),[b,p]=O.useState(""),[k,E]=O.useState(""),{api:A,ws:{useSubscription:B},inService:L,info:P}=wt(),{blocklet:I,actions:{refreshBlocklet:D}}=Sn(),[j,N]=O.useState(null),[T,z]=O.useState(!1),Q={bundleDid:"",componentDid:"",componentName:"",pathPrefix:"",name:"",title:"",configsList:[],configsValue:{},hasMissRequiredConfigs:!1,hasEnvironmentsStep:!1,hasRequiredEnvironments:!1,requirePurchase:!1,didSpaceIsRequiredSetup:null,installResultProps:{},purchaseResultProps:{},showFromUrlDialog:!1,isUpload:!1,upgradeDid:""},[R,X]=O.useState(Q),[U,ne]=O.useState(0),G=O.useRef({}),Z=O.useRef({}),ee=O.useRef({}),Ie=tt(q=>q.breakpoints.down("md")),Ge=cl(),[rt,Xe]=O.useState(!0),{meta:te}=G.current,K=ds(te),oe=O.useRef(!1),ue=O.useRef(null),se=q=>X(H=>({...H,...q}));O.useEffect(()=>{if(R.pathPrefix){const{errMsg:q}=Tt({...R,pathPrefix:R.pathPrefix,locale:m});p(q)}},[R.pathPrefix]),O.useEffect(()=>{U===0&&X(Q)},[U]);const dt=()=>{const q=gr(I)??"";se({didSpaceEndpoint:q})},it=()=>G?.current?.meta?Ve.getDisplayName(G.current):"",ot=()=>{c(!1),X({}),oe.current=!1,G.current={},e()},ht=q=>{const H=J=>{se({installResultProps:{variant:"error",title:it(),subTitle:q,footer:l.jsx(ke,{className:"bottom-button",disabled:J,"data-cy":"retry-install-component",onClick:async()=>{H(!0),await Ut(G.current.installInput)},children:l.jsxs(F,{sx:{display:"flex",alignItems:"center"},children:[J&&l.jsx(Le,{size:16,style:{marginRight:8}}),v("common.retry")]})})}})};H()},ft=q=>H=>{(H?.meta?.did||H?.meta)===I?.meta?.did&&q(H)},kt=()=>{Bo({timeout:0,componentDid:Ge.componentDid,manual:!0}),ot(),setTimeout(()=>{const q=document.getElementsByClassName("dashboard-main")[0];q&&(q.scrollTop=q.scrollHeight)},200)};B(et.BlockletEvents.componentInstalled,ft(()=>{se({installResultProps:{variant:"success",title:it(),subTitle:v("blocklet.component.installSuccessTip")}}),Bo({componentDid:Ge.componentDid})}),[I?.meta?.did]),B(et.BlockletEvents.statusChange,ft(()=>{const q=gr(I);se(H=>({...H,didSpaceEndpoint:q}))}),[I?.meta?.did]),B(et.BlockletEvents.downloadFailed,ft(()=>{oe.current=!1,ht(v("blocklet.component.installComponentError"))}),[I?.meta?.did]),B(et.BlockletEvents.installFailed,ft(()=>{oe.current=!1,ht(v("blocklet.component.installComponentError"))}),[I?.meta?.did]);const me=[],jt=q=>(I?.children||[]).find(H=>H.meta.did===q),Ut=async q=>{oe.current=!0;const{pathPrefix:H,bundleDid:J,title:re,componentName:he="",componentDid:Ee=""}=R,$e=G.current?.meta||{},{configs:pt=[],registryUrl:De,inStore:mt,inputUrl:Ct,dist:In}=$e,zt=G.current?.downloadTokenList,Kt=Ct||(mt?fi(De,J,In):"");c(!0);const we={rootDid:I.meta.did,url:Kt,mountPoint:H?Qt.urlPathFriendly(H):`/${Qt.urlPathFriendly($e.title||$e.name)}`,title:re,name:he,did:R.isUpload&&R.upgradeDid?R.upgradeDid:Ee,dist:{tarball:"",integrity:""},onlyRequired:!rt,...R.hasEnvironmentsStep&&pt.length>0?{configs:pt.map(Fe=>({...Fe,value:R.configsValue[Fe.key]||""}))}:{},...zt?{downloadTokenList:zt}:{},...q};try{if(await A.installComponent({input:we}),De){const{teamDid:Fe,storeList:Ye}=is({fromBlocklet:L,nodeInfo:P,blocklet:I}),{isNew:Et,decoded:Vt}=Dl(De,Ye);Et&&A.addBlockletStore({input:{teamDid:Fe,url:Vt}}).catch(_n=>{console.error("addBlockletStore error: ",_n)})}se({installResultProps:{}}),D({showError:!1,attachRuntimeInfo:!1})}catch(Fe){const Ye=br(Fe);wn.error(Ye),console.error("installComponent error: ",Fe),ht(Ye)}finally{c(!1),G.current.installInput=we}},Tt=q=>{const H=yc({params:{...q,did:q.bundleDid},blocklets:[I],blocklet:I,locale:m,isUpload:R.isUpload});let J=H;const re=Gf(I,R.pathPrefix);if(H==="overwrite"&&re&&re.did!==q.bundleDid?(se({upgradeDid:re.did}),J=""):(se({upgradeDid:""}),J=H),J){const he=jt(q.bundleDid),Ee=vc({params:{...q,did:q.bundleDid},blocklet:I});if(he&&he.mountPoint===Ee)return{errMsg:""}}return{errMsg:J}},M=async q=>{const{errMsg:H}=Tt({...R,locale:m});p(H),U===me.length-2&&!oe.current&&await Ut(q),Z.current?.setActiveStepByIndex?.(J=>J+1)},V=()=>{Z.current?.setActiveStepByIndex?.(q=>q-1)},de=()=>{const{pathPrefix:q,bundleDid:H,title:J,componentName:re="",componentDid:he=""}=R,{meta:Ee={}}=G.current||{},{registryUrl:$e,inStore:pt,inputUrl:De,dist:mt}=Ee,Ct=pt?fi($e,H,mt):De;N({meta:Ee,installOpts:{type:"component",rootDid:I.meta.did,mountPoint:q,url:Ct,title:J,name:re,did:he}})},xe=q=>{z(!1),se({purchaseResultProps:{variant:"error",title:it(),subTitle:q,style:{paddingTop:120},footer:l.jsx(ke,{className:"bottom-button","data-cy":"retry-purchase-component",onClick:()=>{se({purchaseResultProps:{}})},children:v("common.retry")})}})},_e=({downloadTokenList:q})=>{G.current.downloadTokenList=q,z(!1),M()},st=({chooseParams:q=G.current,componentDid:H,isInit:J=!1,isUpload:re=!1})=>{const{meta:he,registryUrl:Ee,inStore:$e,inputUrl:pt}=q,{did:De,title:mt,name:Ct}=he,In=(I.settings?.children||[]).filter(Oe=>Oe.status==="deleted"&&Oe.meta.bundleDid===De),zt=H||"",Kt=he.environments?.map(Oe=>{const{name:Rn,validation:Ht,...Gt}=Oe,Ln={validation:Gl(Ht)?"":Ht};return{...Gt,key:Rn,...Ln}});G.current={...q,meta:{...he,configs:Kt,registryUrl:Ee,inStore:$e,inputUrl:pt}};let we={};if(J){const Oe=[I],Rn=Kt||[],Ht=[],Gt=ss(Hl([...Rn,...Ht]),"key").filter(gt=>!!gt.key).sort((gt,Xt)=>gt.required&&!Xt.required?-1:Xt.required&&!gt.required?1:0),Ln=Ve.getSharedConfigObj(Oe[0],{configs:Gt}),Dn={},ai=Gt.map(gt=>{const{default:Xt,key:Yt,...Ia}=gt;return Dn[Yt]=Ln[Yt]||Xt,{...Ia,key:Yt,hidden:!!et.BLOCKLET_CONFIGURABLE_KEY[Yt]}});we={...we,configsList:ai,configsValue:Dn,hasMissRequiredConfigs:Ao(ai,Dn)}}const Fe=I.children.some(Oe=>Oe.mountPoint==="/"),Ye=In.find(Oe=>Oe.meta.bundleDid===De),Et=I.children.find(Oe=>Oe.meta.bundleDid===De);we.title=mt||"",Ye?we={...we,pathPrefix:Ye.mountPoint||"",componentName:Ye.meta.name,hasEnvironmentsStep:!1}:Et?we={...we,pathPrefix:Et.mountPoint||"",componentName:Et.meta.name,hasEnvironmentsStep:!1}:we={...we,pathPrefix:Fe?`/${Qt.urlPathFriendly(mt)||Qt.urlPathFriendly(Ct)}`.toLowerCase():"/",componentName:"",hasEnvironmentsStep:G.current.meta?.environments?.length>0};const Vt=Xf(G.current.meta),_n=Yf(G.current.meta),Pa=gr(I);se({bundleDid:De,componentDid:zt,...we,hasRequiredEnvironments:Qf(G.current.meta),requirePurchase:Vt,didSpaceIsRequiredSetup:_n,didSpaceEndpoint:Pa,isUpload:re}),J&&Vt&&de()},Pn=async()=>{if(!ue.current.loading)try{c(!0),await ue.current.onSubmit()&&M()}catch(q){console.error("error",q)}finally{c(!1)}};O.useEffect(()=>{if(!a&&!g?.meta||U!==0||!I)return;const{meta:q,inputUrl:H="",inStore:J=!0,registryUrl:re="",isUpload:he=!1}=g||{};st({chooseParams:{blocklets:[a||q],meta:a||q,registryUrl:re||u||Zf(a?.bundleSource),inStore:J,inputUrl:H},isInit:!0,isUpload:he}),se({showFromUrlDialog:!1}),M()},[a,U,I,g]),me.push({key:"selectComponent",name:v("blocklet.component.selectComponent"),body:l.jsxs(Je,{sx:{width:400,display:"flex",flexDirection:"column"},component:"div",children:[h&&R.showFromUrlDialog&&l.jsx(Es,{mode:"component",onCancel:()=>{se({showFromUrlDialog:!1})},onSuccess:({meta:q,inputUrl:H,inStore:J,registryUrl:re})=>{st({chooseParams:{meta:q,inputUrl:H,inStore:J,registryUrl:re},isInit:!0}),se({showFromUrlDialog:!1}),M()},handleText:{title:v("blocklet.component.addComponentTip.fromUrl"),confirm:v("blocklet.component.choose")}}),l.jsx(Ls,{stores:n,extra:Jo.isInServerlessMode(P)?null:h?l.jsxs(ke,{variant:"text",color:"primary","data-cy":"add-component-from-url",onClick:()=>{se({showFromUrlDialog:!0})},style:{padding:"0 2px"},children:[l.jsx(ol,{style:{fontSize:20,marginRight:4}}),v("blocklet.component.addComponentTip.fromUrl")]}):null,loading:x,onChange:()=>{X({}),G.current={}},storageKey:i,children:({currentRegistry:q})=>l.jsx(Ea,{showResourcesSwitch:d,showCategory:y,serverVersion:P?.version,compact:!0,style:{flex:1,overflow:"hidden",height:"100%"},storeUrl:q.url,resourceType:r,resourceDid:s,handleButtonClick:H=>{st({chooseParams:{...H,inStore:!0},isInit:!0})},handleBlockletRender:({blocklet:H,defaultRender:J})=>{const re=R?.bundleDid&&R?.bundleDid===H?.did;return l.jsxs(np,{children:[l.jsx(F,{className:re?"choose-blocklet":"",sx:{"& > div":{position:"relative","&:before, &:after":{content:'""',position:"absolute",width:"0",height:"0",opacity:0,transition:"width 0.3s, height 0.3s, opacity 0.3s",borderRadius:"8px",pointerEvents:"none",...re?{width:"100%",height:"100%",opacity:1}:{}},"&:before":{top:0,left:0,borderTop:"1px solid",borderLeft:"1px solid",borderColor:"primary.main"},"&:after":{bottom:0,right:0,borderBottom:"1px solid",borderRight:"1px solid",borderColor:"primary.main"},"&:hover":{"&:before, &:after":{width:"100%",height:"100%",opacity:1}}}},style:{marginLeft:16},children:J}),re&&l.jsx(F,{className:"check-container",children:l.jsx(Yo,{className:"check-icon"})})]})}})})]}),cancel:t==="embed"?void 0:v("common.cancel"),confirm:Jf({params:R,blocklet:I,t:v}),onCancel:ot,onConfirm:()=>{M()}}),me.push({key:"agreement",name:v("launchBlocklet.introduction"),body:l.jsxs(Je,{component:"div",className:"agreement-wrapper",children:[l.jsx(vr,{title:v("launchBlocklet.introduction"),subTitle:v("blocklet.component.addComponentTip.introduction")}),te?l.jsx(bs,{meta:te,onClickNext:M,installRelated:rt,onChangeInstallRelated:Xe,handleDescEle:l.jsx("p",{children:v("blocklet.component.addComponentTip.belowInformation")})}):null]}),cancel:a?void 0:v("common.pre"),disabled:!K,confirm:v(K?"launchBlocklet.next":"launchBlocklet.canNotInstall"),onCancel:a?ot:V,onConfirm:()=>{z(!1),M()}}),te&&R.requirePurchase&&me.push({key:"purchase",name:l.jsxs(l.Fragment,{children:[v("common.verifyNFT"),l.jsx(Zt,{})]}),body:l.jsxs(Je,{component:"div",className:"flex-align-center",style:{flexDirection:"column"},children:[!(ee.current?.getCurrentStep?.()===2||T)&&l.jsx(ln,{title:v("common.verifyNFT"),subTitle:v("blocklet.component.addComponentTip.verifyNFT")}),Rt(R.purchaseResultProps)?j&&l.jsx(Is,{ref:ee,meta:j.meta,mode:R.componentDid?"verify":"both",onCancel:xe,installOpts:j.installOpts,handlePaySuccess:_e}):l.jsx("div",{className:"flex-align-center flex-justify-center",children:l.jsx(mi,{...R.purchaseResultProps})})]}),disabled:ee.current?.getCurrentStep?.()===2||T,cancel:v("common.pre"),confirm:v("common.next"),onConfirm:()=>{typeof ee.current.onNext=="function"&&(ee.current.onNext(),z(!0))},onCancel:()=>{V()}}),Ve.hasStartEngine(te)&&Xl.hasMountPoint(te)?me.push({key:"config",name:v("common.config"),error:b,body:l.jsxs(Je,{component:"div",children:[l.jsx(ln,{title:v("common.config"),subTitle:v("blocklet.component.addComponentTip.config")}),l.jsx(xn,{label:v("blocklet.component.mountPoint"),autoComplete:"off",variant:"outlined",name:"pathPrefix",fullWidth:!0,helperText:k||v("blocklet.component.mountPointTip"),style:{marginBottom:32},margin:"normal",value:R.pathPrefix,onChange:q=>{const H=q.target.value;se({pathPrefix:H}),E(v("common.slugifyHint",{value:Ll(H)}))},slotProps:{htmlInput:{"data-cy":"mount-point-input"}}}),!!b&&l.jsx(Uo,{severity:"error",style:{width:"100%",marginTop:8},children:b})]}),cancel:v("common.pre"),confirm:v("common.next"),onCancel:V,onConfirm:()=>{M()}}):te&&(R.pathPrefix=te.interfaces?.[0]?.path||`/${te.did}`),te&&te?.requirements?.aigne&&me.push({key:"aigne",name:l.jsxs(Y,{component:"div",title:v("setting.aigne.config"),sx:{whiteSpace:"break-spaces"},children:[v("setting.aigne.config")," ",l.jsx(Zt,{})]}),body:()=>l.jsxs(Je,{component:"div",className:"aigne-config-wrapper",children:[l.jsx(vr,{title:v("setting.aigne.config")}),l.jsx(F,{className:"form-container",sx:{"> div":{maxWidth:"unset",width:"100%"}},children:l.jsx(uc,{orientation:"vertical",hideSubmitButton:!0,hideDivider:!0,source:"setup",forceValidate:!0,ref:ue})})]}),cancel:v("common.pre"),confirm:v("common.next"),onCancel:()=>{ue.current.loading||V()},onConfirm:Pn,loading:x||ue.current?.loading,disabled:x||ue.current?.loading}),te&&R?.hasEnvironmentsStep&&me.push({key:"environment",name:l.jsxs(l.Fragment,{children:[v("common.environment")," ",R.hasRequiredEnvironments&&l.jsx(Zt,{})]}),disabled:!!w||R?.hasMissRequiredConfigs,body:()=>l.jsxs(Je,{component:"div",style:{overflowY:"auto"},children:[l.jsx(ln,{title:v("common.environment"),subTitle:v("blocklet.component.addComponentTip.environment")}),l.jsx(Jl,{style:{marginTop:-12,width:"100%"},schema:R.configsList,defaultValue:R.configsValue,onChange:(q,{action:H,currentItem:J,allValues:re})=>{H==="confirm"&&se({hasMissRequiredConfigs:Ao(R.configsList,re),configsValue:re}),H==="edit"?S(J):["cancel","confirm"].includes(H)&&S(null)}})]}),cancel:v("common.pre"),confirm:v("common.next"),onCancel:V,onConfirm:M}),te&&R?.didSpaceIsRequiredSetup&&me.push({key:"didSpace",name:l.jsxs(l.Fragment,{children:[v("blocklet.component.didSpaceConfig")," ",R.didSpaceIsRequiredSetup==="required"&&l.jsx(Zt,{})]}),disabled:R?.didSpaceIsRequiredSetup&&!R.didSpaceEndpoint,body:()=>l.jsx(Ql,{children:l.jsxs(Je,{component:"div",children:[l.jsx(ln,{title:v("blocklet.component.didSpaceConfig"),subTitle:v("blocklet.component.didSpaceConfigTip")}),l.jsx(F,{sx:{mt:"36px","& > div":{maxWidth:"unset !important","& .MuiAutocomplete-root":{maxWidth:"unset !important"}}},children:l.jsx(Rs,{blockletMeta:G.current.meta,onNext:()=>{M()},onEndpointUpdate:dt})})]})}),cancel:v("common.pre"),confirm:v("common.next"),onCancel:V,onConfirm:M}),me.push({key:"install",name:jt(te?.did)?v("common.upgrade"):v("common.install"),disabled:f?!1:Rt(R.installResultProps),loading:f?!1:Rt(R.installResultProps),body:l.jsx(Je,{component:"div",className:"flex-justify-center flex-align-center",style:{flexDirection:"column"},children:Rt(R.installResultProps)?l.jsx(gl,{message:l.jsx(rp,{children:v(f?"blocklet.component.installingCanCloseWindowTip":"blocklet.component.installingTip")}),increaseSpeed:.3,messageLoop:!1}):l.jsx("div",{style:{marginTop:120},children:l.jsx(mi,{...R.installResultProps})})}),confirm:v("common.complete"),onConfirm:kt});const ae=me[U]||{},Be=()=>x||ae.error||!R.bundleDid?!0:U>1?!R.pathPrefix:!1;return I?l.jsxs(tp,{sx:o?{height:{xs:"calc(100vh - 72px - 32px)",md:"72vh"},"&& .ll-header":{p:3},"&& .MuiDialogContent-root":{p:0},"&& .layout-content":{p:0,pl:{xs:0,md:2},pb:0,"& .filter-bar":{pt:0,pl:2}}}:{width:"100%",height:"100vh"},children:[l.jsx(Bl,{steps:me,mode:"memory",children:l.jsx(Oa,{ref:Z,meta:te,isMobile:Ie,onStepChange:q=>{ne(q)}})}),l.jsxs(F,{className:"action-bar",children:[ae.cancel&&l.jsx(ke,{onClick:q=>{q.stopPropagation(),ae.onCancel()},disabled:U===me.length-2&&x,color:"inherit",children:ae.cancel||v("common.cancel")}),ae.confirm&&l.jsx(ke,{onClick:q=>{q.stopPropagation(),ae.onConfirm()},color:"primary","data-cy":"submit-confirm-next",disabled:x||(typeof ae.disabled=="boolean"?ae.disabled:Be()),variant:"contained",autoFocus:!0,title:ae.confirm,style:{marginLeft:8,overflow:"hidden",minWidth:"140px",maxWidth:"280px",textAlign:"center"},children:l.jsxs(F,{sx:{display:"flex",alignItems:"center",overflow:"hidden"},children:[(typeof ae.loading=="boolean"?ae.loading:x)&&l.jsx(Le,{style:{marginRight:8},size:16}),l.jsx(F,{component:"span",sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:ae.confirm})]})})]})]}):null}ep.propTypes={onClose:_.func,mode:_.oneOf(["normal","embed"]),inDialog:_.bool,stores:_.arrayOf(_.string),storeUrl:_.string,resourceType:_.string,resourceDid:_.string,storageKey:_.string,selectedMeta:_.object,showResourcesSwitch:_.bool,showFromUrl:_.bool,enableRunBackground:_.bool,showCategory:_.bool,installFromUrlParams:_.object};const tp=pe(F)`
|
|
576
|
+
.action-bar {
|
|
577
|
+
display: flex;
|
|
578
|
+
justify-content: flex-end;
|
|
579
|
+
position: sticky;
|
|
580
|
+
bottom: 0;
|
|
581
|
+
padding-top: 16px;
|
|
582
|
+
z-index: 100;
|
|
583
|
+
width: 100%;
|
|
584
|
+
background: ${({theme:e})=>e.palette.background.paper};
|
|
585
|
+
border-top: '1px solid';
|
|
586
|
+
border-color: ${({theme:e})=>e.palette.divider};
|
|
587
|
+
}
|
|
588
|
+
`,Je=pe(Y)`
|
|
589
|
+
width: 100%;
|
|
590
|
+
height: 100%;
|
|
591
|
+
`,ln=pe(vr)`
|
|
592
|
+
margin-bottom: 24px;
|
|
593
|
+
`,np=pe.div`
|
|
594
|
+
position: relative;
|
|
595
|
+
|
|
596
|
+
.choose-blocklet {
|
|
597
|
+
background-color: rgb(236, 251, 253);
|
|
598
|
+
border-color: rgb(236, 251, 253);
|
|
599
|
+
border-radius: 8px;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
.check-container {
|
|
603
|
+
position: absolute;
|
|
604
|
+
right: 0;
|
|
605
|
+
bottom: 0;
|
|
606
|
+
display: flex;
|
|
607
|
+
justify-content: flex-end;
|
|
608
|
+
align-items: flex-end;
|
|
609
|
+
width: 30px;
|
|
610
|
+
height: 30px;
|
|
611
|
+
border-radius: 0 0 8px 0;
|
|
612
|
+
color: ${e=>e.theme.palette.common.white};
|
|
613
|
+
overflow: hidden;
|
|
614
|
+
transition: all ease 0.3s;
|
|
615
|
+
&:after {
|
|
616
|
+
position: absolute;
|
|
617
|
+
z-index: 0;
|
|
618
|
+
display: block;
|
|
619
|
+
width: 0;
|
|
620
|
+
height: 0;
|
|
621
|
+
border-top: transparent solid 15px;
|
|
622
|
+
border-left: transparent solid 15px;
|
|
623
|
+
border-bottom: ${e=>e.theme.palette.primary.main} solid 15px;
|
|
624
|
+
border-right: ${e=>e.theme.palette.primary.main} solid 15px;
|
|
625
|
+
transition: all ease 0.1s;
|
|
626
|
+
content: '';
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
.check-icon {
|
|
630
|
+
position: relative;
|
|
631
|
+
z-index: 2;
|
|
632
|
+
margin: 0 1px 1px 0;
|
|
633
|
+
font-size: 16px;
|
|
634
|
+
transition: all ease 0.2s;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
`,rp=pe.div`
|
|
638
|
+
color: ${e=>e.theme.palette.primary.main};
|
|
639
|
+
.msg-before {
|
|
640
|
+
display: inline-block;
|
|
641
|
+
color: #aaa;
|
|
642
|
+
font-size: 14px;
|
|
643
|
+
margin-right: 6px;
|
|
644
|
+
}
|
|
645
|
+
`;export{ep as A,ks as B,Es as I,Wp as S,$p as a,Fp as b,Ff as d,ju as f};
|