@abtnode/webapp 1.16.27 → 1.16.28-beta-bfbab430
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/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{Add-DOwN6I9N.js → Add-DEou6OQu.js} +1 -1
- package/dist/assets/{ArrowDropDown-CEsdzzcK.js → ArrowDropDown-B8q6yJii.js} +1 -1
- package/dist/assets/{Autocomplete-DcC19-q2.js → Autocomplete-CxHBaO5x.js} +1 -1
- package/dist/assets/Breadcrumbs--9MrOMZw.js +1 -0
- package/dist/assets/{ButtonGroup-CKY0O7tT.js → ButtonGroup-BbRXyWVe.js} +1 -1
- package/dist/assets/{CheckCircle-BA-bGNdF.js → CheckCircle-D6vwJd9K.js} +1 -1
- package/dist/assets/{ChevronLeft-DRzRLgnp.js → ChevronLeft-Bc2acyen.js} +1 -1
- package/dist/assets/{ChevronRight-B2YICLYm.js → ChevronRight-Bcko4z80.js} +1 -1
- package/dist/assets/{Close-D9SKZkJ7.js → Close-DGnER_ve.js} +1 -1
- package/dist/assets/Delete-BGOcGa_D.js +1 -0
- package/dist/assets/DeleteOutline-C7JmRduW.js +1 -0
- package/dist/assets/{Done-DaMxTX7e.js → Done-CydSjSOx.js} +1 -1
- package/dist/assets/{Edit-B1ySEana.js → Edit-B0yxTPMe.js} +1 -1
- package/dist/assets/{EditIcon-BQGlXOR3.js → EditIcon-CF5y6ttj.js} +1 -1
- package/dist/assets/{FilterList-DKFhXHd2.js → FilterList-RGEuYf_e.js} +5 -5
- package/dist/assets/{Google-D2cPndsH.js → Google-CuSS9iHp.js} +4 -4
- package/dist/assets/{Https-CsiKqkaT.js → Https-B3P9JJiw.js} +1 -1
- package/dist/assets/{InfoOutlined-BUn5fKCT.js → InfoOutlined-B4lqtuRU.js} +1 -1
- package/dist/assets/{InputAdornment-DHLm1mFN.js → InputAdornment-BzCm_2kz.js} +1 -1
- package/dist/assets/{InputLabel-BjbeXM2B.js → InputLabel-CdW9MyDY.js} +1 -1
- package/dist/assets/{LastPage-DXu9ZGZF.js → LastPage-dDlMsztV.js} +1 -1
- package/dist/assets/{Launch-BIqLZtET.js → Launch-Dhs9Q_70.js} +1 -1
- package/dist/assets/{Link-DN_Lz3rV.js → Link-DSNZ4PNo.js} +1 -1
- package/dist/assets/{LoadingButton-3UN68oPJ.js → LoadingButton-DrVP9tt_.js} +1 -1
- package/dist/assets/{LockIcon-mC00ojRt.js → LockIcon-BMilDbx1.js} +1 -1
- package/dist/assets/{Loop-2BGd9rzF.js → Loop-CAxjNyCL.js} +1 -1
- package/dist/assets/{MoreVert-BCR8irtL.js → MoreVert-BL42DjcZ.js} +1 -1
- package/dist/assets/{Pagination-0NPBd4bk.js → Pagination-DWKt9t_F.js} +1 -1
- package/dist/assets/{Public-333jCEeA.js → Public-BobH8eAT.js} +1 -1
- package/dist/assets/{SchemaReference.es-oKwgj6eC.js → SchemaReference.es-MUfmufV5.js} +1 -1
- package/dist/assets/{Search-5iZBDNjz.js → Search-J7ilvWof.js} +1 -1
- package/dist/assets/{Select-CPvSg7uW.js → Select-DJl6HmRs.js} +2 -2
- package/dist/assets/{Skeleton-B4-1c0OT.js → Skeleton-CSyuj2cV.js} +4 -4
- package/dist/assets/{Slider-DdynydW3.js → Slider-DRCfqhU1.js} +1 -1
- package/dist/assets/{Stepper-DpooXZzV.js → Stepper-C2a4PQ3_.js} +1 -1
- package/dist/assets/{TextField-sj2mcEXD.js → TextField-BD0it3d0.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-BKQ2fKoV.js → ToggleButtonGroup-CR3zvwUX.js} +1 -1
- package/dist/assets/{ViewList-Cul4OAvz.js → ViewList-D3pEO1Ca.js} +1 -1
- package/dist/assets/{actions-xngcxvp5.js → actions-CL-Y8Eer.js} +1 -1
- package/dist/assets/actions-Dx15LaaC.js +11 -0
- package/dist/assets/{agreement-DBRJClMM.js → agreement-Dd1yuqFa.js} +9 -9
- package/dist/assets/api-Ce74sKYG.js +1 -0
- package/dist/assets/app-avatar-rgMNqIXw.js +1 -0
- package/dist/assets/{ar-DqmJV4p8.js → ar-DXpJw3XU.js} +1 -1
- package/dist/assets/{audit-logs-BkgPztEs.js → audit-logs-CmuAN_qn.js} +1 -1
- package/dist/assets/{brace-fold.es-CsornGfx.js → brace-fold.es-psNZdrWu.js} +1 -1
- package/dist/assets/{bundle-avatar-DzcvR6DI.js → bundle-avatar-C_2wXttj.js} +1 -1
- package/dist/assets/chart-sF6tbndw.js +35 -0
- package/dist/assets/{click-to-copy-CBs5PKxt.js → click-to-copy-KBQWqGOq.js} +1 -1
- package/dist/assets/{closebrackets.es-5NAqcDxa.js → closebrackets.es-ZHCmqLUg.js} +1 -1
- package/dist/assets/{codemirror.es-CEoouqN7.js → codemirror.es-DmoQbR9T.js} +1 -1
- package/dist/assets/{comment.es-DX01jrAI.js → comment.es-B7zL23d5.js} +1 -1
- package/dist/assets/{config-navigation-Ngw7D7GZ.js → config-navigation-BN7PO-cf.js} +2 -2
- package/dist/assets/{de-CHOUObJ5.js → de-CWxlIdre.js} +1 -1
- package/dist/assets/{delete-confirm-Da1BomBl.js → delete-confirm-ztUwg2kj.js} +1 -1
- package/dist/assets/detail-CXbwmlpg.js +58 -0
- package/dist/assets/{dialog.es-Oh6qpXQO.js → dialog.es-CFWHh6H2.js} +1 -1
- package/dist/assets/{download-DHPNYF1S.js → download-bWTPRaod.js} +1 -1
- package/dist/assets/{es-aZ4oYeVs.js → es-BmrvDK07.js} +1 -1
- package/dist/assets/{foldgutter.es-DqR5-lAT.js → foldgutter.es-CqRhTHya.js} +1 -1
- package/dist/assets/{fr-Bi9vptGI.js → fr-B7SxgRy3.js} +1 -1
- package/dist/assets/getValidReactChildren-DKO9kPop.js +1 -0
- package/dist/assets/{hi-BXYjfUTP.js → hi-BRRtNIB_.js} +1 -1
- package/dist/assets/{hint.es-D5LvE1_r.js → hint.es-DK_6KY-o.js} +1 -1
- package/dist/assets/{hint.es2-CgI0iRUf.js → hint.es2-CgWo28Uj.js} +1 -1
- package/dist/assets/{id-VVXvzjmO.js → id-D6-Qi7Q1.js} +1 -1
- package/dist/assets/{iframe-BcDoraJg.js → iframe-C32DbqVc.js} +1 -1
- package/dist/assets/{index-CWilKNfl.js → index-84DtgjQO.js} +6 -6
- package/dist/assets/{index-DuwHJNV9.js → index-B0WN-XH2.js} +1 -1
- package/dist/assets/{index-Cl7gQviA.js → index-B4ZjZNN8.js} +1 -1
- package/dist/assets/{index-CsVg93BX.js → index-BA_TAXpL.js} +2 -2
- package/dist/assets/{index-CAH8ukaj.js → index-BD7uC7gm.js} +4 -4
- package/dist/assets/{index-DPGsh5ca.js → index-BET56ssY.js} +1 -1
- package/dist/assets/{index-zUZPbg2I.js → index-BNulkcXj.js} +1 -1
- package/dist/assets/{index--Q6KdM7v.js → index-BoZhSN8h.js} +1 -1
- package/dist/assets/{index-BgqVsUwi.js → index-Bzs05ai8.js} +1 -1
- package/dist/assets/index-C4aM6rsI.js +54 -0
- package/dist/assets/index-C6fuJWed.js +262 -0
- package/dist/assets/{index-DC46OSan.js → index-CE4mBIM_.js} +1 -1
- package/dist/assets/{index-4SJGeyEI.js → index-CEBXL16c.js} +1 -1
- package/dist/assets/{index-DV-pE5RI.js → index-CYGLUEkg.js} +3 -3
- package/dist/assets/index-CYZ-ZpV5.js +80 -0
- package/dist/assets/{index-B6ReOJJN.js → index-Ca7UJIsi.js} +1 -1
- package/dist/assets/{index-BXmzbebA.js → index-CfOOBUnf.js} +2 -2
- package/dist/assets/{index-C7GDLIo-.js → index-CiaQ1OoK.js} +1 -1
- package/dist/assets/{index-CtWm5SK6.js → index-Cj3s4CtX.js} +4 -4
- package/dist/assets/{index-Boqyvc8Q.js → index-CkI554oc.js} +212 -211
- package/dist/assets/{index-eGpwmK92.js → index-Clbjq5Ay.js} +3 -3
- package/dist/assets/{index-Bvs8qR9r.js → index-CsNkkebn.js} +1 -1
- package/dist/assets/{index-BwcFSka9.js → index-CwOFD6vt.js} +1 -1
- package/dist/assets/{index-DoMsU5M2.js → index-CzZF4DJ9.js} +1 -1
- package/dist/assets/{index-B-OHtxJg.js → index-D2cgpNGA.js} +57 -57
- package/dist/assets/{index-DycwPjM3.js → index-D5A34D-v.js} +1 -1
- package/dist/assets/index-D9RqTndg.js +21 -0
- package/dist/assets/index-DA4GWzzk.js +85 -0
- package/dist/assets/{index-CBdVDTUr.js → index-DG50udXf.js} +4 -4
- package/dist/assets/index-DHDAQRQS.js +11 -0
- package/dist/assets/index-DbaRhcjK.js +1 -0
- package/dist/assets/{index-BPEtPX12.js → index-Dc48oA1e.js} +7 -7
- package/dist/assets/index-DeSsBKwN.js +16 -0
- package/dist/assets/{index-Ct_q9GS4.js → index-Dlmo3B4P.js} +1 -1
- package/dist/assets/index-DoYPOJLK.js +530 -0
- package/dist/assets/{index-BCPsngBN.js → index-DuHl-QWf.js} +1 -1
- package/dist/assets/{index-opBznRc5.js → index-HMFhZkjG.js} +11 -11
- package/dist/assets/{index-_NTV4-zc.js → index-aVpXIXlo.js} +5 -5
- package/dist/assets/index-dQw_Q0Sx.js +58 -0
- package/dist/assets/{index-BCQQEHyP.js → index-lXzOGnDm.js} +11 -11
- package/dist/assets/index-lfuZxoX8.js +11 -0
- package/dist/assets/{index-DZnZf-o0.js → index-owRl0jyR.js} +16 -16
- package/dist/assets/{index-D81FDm0a.js → index-sNR67yJ2.js} +1 -1
- package/dist/assets/{index.es-C_vrKJwx.js → index.es-r9xAwx7Q.js} +1 -1
- package/dist/assets/{index.esm-Cnicyd3_.js → index.esm-BCQ0BZMT.js} +1 -1
- package/dist/assets/{info-addon.es-B0sGOwNz.js → info-addon.es-BDFdJmkW.js} +1 -1
- package/dist/assets/{info.es-x51I_2sm.js → info.es-CBadJSwW.js} +1 -1
- package/dist/assets/install-from-url-DuxahkOW.js +1 -0
- package/dist/assets/{invitation-B30vIvMt.js → invitation-CSvGVnhZ.js} +6 -6
- package/dist/assets/{isEqual-DbZp5EUk.js → isEqual-DLk5wI5o.js} +1 -1
- package/dist/assets/{item-BdJl6I8q.js → item-Bv034Zcl.js} +13 -13
- package/dist/assets/{ja-DqJiajLu.js → ja--dtwu5Xy.js} +1 -1
- package/dist/assets/{javascript.es-AOt9muQq.js → javascript.es-Bq6krn1L.js} +1 -1
- package/dist/assets/{jump-to-line.es-p4ynQoBS.js → jump-to-line.es-Cm-kakdo.js} +1 -1
- package/dist/assets/{jump.es-BrSOPKg0.js → jump.es-VEZCju5l.js} +1 -1
- package/dist/assets/{ko-DQKmtlbI.js → ko-DpRJDWhF.js} +1 -1
- package/dist/assets/{line-DdSLBn8H.js → line-VNmgswg2.js} +4 -4
- package/dist/assets/{lint.es-BMdrvXUs.js → lint.es-DhrBN362.js} +1 -1
- package/dist/assets/{lint.es2-DX4OlyGK.js → lint.es2-CWQYXYDN.js} +1 -1
- package/dist/assets/{lint.es3-BYQCiNDn.js → lint.es3-HsrZT9m1.js} +1 -1
- package/dist/assets/{list-header-BnipX_Rp.js → list-header-DsWkp7IV.js} +1 -1
- package/dist/assets/{log-i4SQ4Z0y.js → log-DgVRxyob.js} +2 -2
- package/dist/assets/{lottie-BYxFXW-g.js → lottie-CYf1PmCL.js} +1 -1
- package/dist/assets/{matchbrackets.es-aeJus3PD.js → matchbrackets.es-BthTk6Jn.js} +1 -1
- package/dist/assets/{memory-Cu-5WL0k.js → memory-dGmMptAO.js} +1 -1
- package/dist/assets/{mode.es-CXfOP3-9.js → mode.es-_GdTPtpx.js} +1 -1
- package/dist/assets/{mode.es2-DOeKit6c.js → mode.es2-brmgogqJ.js} +1 -1
- package/dist/assets/{mode.es3-8pUUSOKg.js → mode.es3-DPGB-Rg-.js} +1 -1
- package/dist/assets/{onlineParser.es-Bsw_5f31.js → onlineParser.es-BUsBjG_x.js} +1 -1
- package/dist/assets/overview-BjqHXIvR.js +23 -0
- package/dist/assets/{pt-si0ACe2m.js → pt-BxA88dKG.js} +1 -1
- package/dist/assets/{react-BU7lI6gg.js → react-B-xa5K3p.js} +22 -22
- package/dist/assets/{redux-07bmubSg.js → redux-BBckwmBz.js} +1 -1
- package/dist/assets/{resource-dialog-Co295aU2.js → resource-dialog-CIpxrG7w.js} +2 -2
- package/dist/assets/{ru-B36cpSA6.js → ru-C9WJaQoQ.js} +1 -1
- package/dist/assets/runtime-mnz4kggA.js +1 -0
- package/dist/assets/{search.es-ByHwIa0U.js → search.es-CV0d4AUV.js} +1 -1
- package/dist/assets/{searchcursor.es-CsQOLBoo.js → searchcursor.es-CxYOh1mB.js} +1 -1
- package/dist/assets/service-DbM6n6e-.js +1 -0
- package/dist/assets/{show-hint.es-BY2B9aLR.js → show-hint.es-GDHMVUwy.js} +1 -1
- package/dist/assets/{slicedToArray-BwJA6b7k.js → slicedToArray-Pwxti1pp.js} +3 -3
- package/dist/assets/spaces-3s9pbV-M.js +1 -0
- package/dist/assets/{sublime.es-DZOyVbIC.js → sublime.es-BiX2tLa_.js} +1 -1
- package/dist/assets/{switch-control-D1Iqbf5D.js → switch-control-1CHbJzd5.js} +1 -1
- package/dist/assets/{table-icons-CB9vK-gH.js → table-icons-DjAM1A7C.js} +10 -10
- package/dist/assets/{tag-CANB-Fll.js → tag-CdoBHuxB.js} +1 -1
- package/dist/assets/team-CrNp0IgF.js +1 -0
- package/dist/assets/{th-Dtc8_3Sk.js → th-z7LSYRZi.js} +1 -1
- package/dist/assets/toUpper-C7enqaxL.js +1 -0
- package/dist/assets/{traffic-CmQ-j2sa.js → traffic-Bw_e_wEP.js} +5 -5
- package/dist/assets/url-evaluation-asC5XTLH.js +7 -0
- package/dist/assets/use-blocklet-info-for-connect-did-spaces-R82fq7SC.js +1 -0
- package/dist/assets/{useLocalStorage-BNvbpN9F.js → useLocalStorage-DRS65jti.js} +1 -1
- package/dist/assets/util-BC42zb0j.js +1 -0
- package/dist/assets/{vi-DpH7bkpR.js → vi-CAtyUyNW.js} +1 -1
- package/dist/assets/{wait-container-mYVBI-ZE.js → wait-container-DzvlQJkQ.js} +4 -4
- package/dist/assets/withStyles-CPWhmxGn.js +1 -0
- package/dist/assets/wrap-locale-p7nrsckq.js +1 -0
- package/dist/assets/{zh-Dizc5DZz.js → zh-BVBeddUa.js} +1 -1
- package/dist/assets/{zh-tw-Cb93tcSH.js → zh-tw-CoStw7dd.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/Breadcrumbs-f87TWJgq.js +0 -1
- package/dist/assets/Delete-h8Ye2r4b.js +0 -1
- package/dist/assets/DeleteOutline-C-1A8rVu.js +0 -1
- package/dist/assets/DeleteOutline-ClZ-ABF-.js +0 -1
- package/dist/assets/actions-ByUCXaaH.js +0 -11
- package/dist/assets/api-BdOqJGVs.js +0 -1
- package/dist/assets/app-avatar-DEqDSBYG.js +0 -1
- package/dist/assets/chart-CQeRS3mZ.js +0 -35
- package/dist/assets/detail-CaMUtLL5.js +0 -58
- package/dist/assets/getValidReactChildren-B_HEoXEd.js +0 -1
- package/dist/assets/index-3vcNDYsD.js +0 -530
- package/dist/assets/index-B7-XNbV9.js +0 -85
- package/dist/assets/index-BMkbX5aS.js +0 -11
- package/dist/assets/index-B_M-nPU6.js +0 -58
- package/dist/assets/index-DMKpICI6.js +0 -1
- package/dist/assets/index-DY9g7uAE.js +0 -54
- package/dist/assets/index-DdxWI-QG.js +0 -262
- package/dist/assets/index-DwOVPSU7.js +0 -21
- package/dist/assets/index-Mr6j5sdU.js +0 -11
- package/dist/assets/index-PDofIfka.js +0 -80
- package/dist/assets/index-RlfSCcPa.js +0 -16
- package/dist/assets/install-from-url-Cnfp9xqR.js +0 -1
- package/dist/assets/overview-CnuzNSfm.js +0 -23
- package/dist/assets/runtime-CW-W-Oej.js +0 -1
- package/dist/assets/service-DNZLEaeT.js +0 -1
- package/dist/assets/spaces-CGO2dSgv.js +0 -1
- package/dist/assets/team-rrZYIohT.js +0 -1
- package/dist/assets/toUpper-D0HPBfn5.js +0 -1
- package/dist/assets/url-evaluation-DymLev_N.js +0 -7
- package/dist/assets/use-blocklet-info-for-connect-did-spaces-YWN8QaVT.js +0 -1
- package/dist/assets/util-CRUZQ4-B.js +0 -1
- package/dist/assets/withStyles-CSLQqeaB.js +0 -1
- package/dist/assets/wrap-locale-B076jNc7.js +0 -1
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import{ak as Y,z as A,r as p,a as J,b as X,P as x,q as j,u as P,y as Z,av as _,M as ee,j as t,x as $,aw as te,a2 as S,m as R,D as N,ax as se,ay as oe,V as q,az as re,B as M,C as O,aA as ne,A as W,K as z,aB as ae,aC as ie,aD as le,F as ce,i as ue,n as K,ab as de,a5 as pe,a8 as he,a9 as fe,aE as me,aa as ge,Q as xe}from"./index-Boqyvc8Q.js";import{_ as D}from"./useLocalStorage-BNvbpN9F.js";import{c as be,C as ye,A as ke,D as Se,B as je,S as V,a as Pe,b as we}from"./item-BdJl6I8q.js";import{d as ve}from"./ArrowDropDown-CEsdzzcK.js";import{B as Re}from"./Breadcrumbs-f87TWJgq.js";import"./index-eGpwmK92.js";import"./index-BXmzbebA.js";import"./Search-5iZBDNjz.js";import"./index-D81FDm0a.js";import"./Select-CPvSg7uW.js";import"./InputAdornment-DHLm1mFN.js";import"./preact.module-B1z5cdvs.js";import"./Add-DOwN6I9N.js";import"./TextField-sj2mcEXD.js";import"./InputLabel-BjbeXM2B.js";import"./Launch-BIqLZtET.js";import"./Done-DaMxTX7e.js";import"./DeleteOutline-C-1A8rVu.js";import"./DeleteOutline-ClZ-ABF-.js";import"./delete-confirm-Da1BomBl.js";import"./click-to-copy-CBs5PKxt.js";import"./MoreVert-BCR8irtL.js";import"./ButtonGroup-CKY0O7tT.js";import"./getValidReactChildren-B_HEoXEd.js";function Ce(e){const n=Y(),c=A(),[s,o]=D(`sid:blocklet:purchase:${e}`),[l,u]=p.useState(!1),[h,a]=p.useState(null),d=()=>{const{pathname:r,searchParams:m}=new URL(window.location.href),b=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";m.get("sid")&&(o(""),c(r.replace(b,"/"),{replace:!0}))},i=!!(n.get("assetDid")&&s&&n.get("sid")===s);return J(X.BlockletEvents.purchaseChange,r=>{r.did===e&&(a(r.session),["declined","confirmed","error"].includes(r.session.status)&&(u(!0),setTimeout(d,2e3)))}),p.useEffect(()=>{h&&h.id!==s&&o(h.id)},[h]),{hasCompleted:l,hasPurchased:i,session:h,setSession:a,doRedirect:d}}function B({meta:e,onCancel:n,handlePaySuccess:c,storeUrl:s}){const{t:o}=j(),{info:l}=P(),[u,h]=p.useState("both"),[a,d]=p.useState(1),i=Z(l),r=_(e,l,s),m=v=>{v!==u&&h(v)},b=()=>{u&&(d(2),u==="verify"&&(window.location.href=r))},y=(v,L)=>{L!=="backdropClick"&&n()},w=()=>{c(r)},f=ee({meta:e});if(u==="purchase"&&a===2)return t.jsx($,{open:!0,popup:!0,baseUrl:s,action:"acquire-asset",checkFn:te.create({baseURL:S(s,"/store")}).get,onSuccess:w,onClose:n,checkTimeout:60*5e3,extraParams:{factory:e.nftFactory},webWalletUrl:i,disableClose:!0,saveConnect:!1,showDownload:!1,messages:{title:o("store.purchase.auth.title",{name:f}),scan:o("store.purchase.auth.scan"),confirm:o("store.purchase.auth.confirm"),success:t.jsxs(t.Fragment,{children:[t.jsx(R,{gutterBottom:!0,children:o("store.purchase.auth.success")}),t.jsxs(R,{variant:"subtitle2",children:[" ",o("store.purchase.autoLaunch",{name:f})]})]})}});const g=N;return t.jsx(g,{title:o("store.purchase.title",{name:f}),disableEscapeKeyDown:!0,open:!0,fullWidth:!0,onClose:y,children:t.jsx("div",{style:{marginBottom:16},children:t.jsx(ye,{action:u,onNext:b,onSelect:m})})})}B.propTypes={...be,storeUrl:x.string.isRequired,handlePaySuccess:x.func};B.defaultProps={handlePaySuccess:e=>{setTimeout(()=>{window.location.href=e},1e3)}};function E({meta:e,buttonText:n,storeUrl:c,isResource:s}){const{t:o}=j(),l=A(),{info:u}=P(),{api:h}=se(),a=oe(e)===!1,[d,i]=p.useState(!1),{hasPurchased:r}=Ce(e.did),[m,b]=p.useState(!1),[y]=D("instant-blocklet-install",!1),[w,f]=p.useState(!1),g=p.useMemo(()=>d?o(a?"blocklet.status.purchasing":"blocklet.status.waiting"):"",[d,o,a]),v=p.useMemo(()=>s?o("blocklet.status.resource"):a?n.purchase:n.launch,[a,n,s]),L=k=>{k.preventDefault(),k.stopPropagation();try{if(i(!0),a){b(!0);return}if(y){f(!0);return}if(!a){const C=_(e,u,c);window.location.href=C;return}}catch(C){W.error(z(C),{autoHideDuration:5e3}),console.error("Blocklet installed failed",C)}finally{i(!1)}},H=()=>{i(!1),b(!1)},Q=k=>{i(!1),f(!1),l(`/blocklets/${k.appDid}/components`)},G=()=>{i(!1),f(!1)};return t.jsxs(t.Fragment,{children:[t.jsx(ke,{children:t.jsx(q,{permission:"mutate_blocklets",children:k=>t.jsx(re,{title:s?o("launchBlocklet.error.resourceBlocklet"):"",children:t.jsx(M,{onClick:L,size:"small",sx:{cursor:s?"not-allowed":"pointer"},disabled:!!(g||!k),variant:"outlined",color:"primary","data-cy":"install-blocklet",children:g?t.jsxs(t.Fragment,{children:[t.jsx(O,{size:16,style:{marginRight:3}}),g]}):v},e.did)})})}),(r||m)&&t.jsx(B,{method:"launch",meta:e,mode:"both",onCancel:H,storeUrl:c}),w&&t.jsx($,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:h.get,checkTimeout:5*60*1e3,onSuccess:Q,extraParams:{title:e.title,blockletMetaUrl:decodeURIComponent(ne(c,e.did).trim())},messages:{title:o("setup.keyPair.title"),scan:o("setup.keyPair.scan"),confirm:o("setup.keyPair.confirm"),success:o("setup.keyPair.success")},onClose:G})]})}E.propTypes={isResource:x.bool,meta:x.object.isRequired,buttonText:x.shape({purchase:x.string.isRequired,launch:x.string.isRequired}).isRequired,storeUrl:x.string.isRequired};E.defaultProps={isResource:!1};const De=(e,n,c)=>{const s=de(n);return S(c,`/blocklets/${e.did}/?server-url=${s}`)},F=({meta:e,attribute:n,value:c})=>e._formatted?e._formatted[n]:c;function U({blocklet:e,endpoint:n}){const{t:c}=j(),s=P();let o=S(s.imgPrefix,"blocklet.png");const l=n;if(l.startsWith("http")&&e.logo)o=S(l,le(e.did,e.logo,e.version));else{let r=(window.env.apiPrefix||"/").replace(/^\/+/,"").replace(/\/+$/,"");r&&(r=`/${r}`),o=S(r,`/blocklet/logo/${e.did}`)}try{const i=new URL(o);i.searchParams.set("v",e.version||+new Date),o=i.href}catch{}const u=(s==null?void 0:s.info.mode)!==ce.NODE_MODES.SERVERLESS,h=i=>i.currentTarget.contains(i.target)?!0:(i.preventDefault(),!1),a={meta:e,buttonText:{purchase:c("common.purchase"),launch:c("common.launch")},storeUrl:l};let d=null;return u&&(d=t.jsx("div",{style:{display:"flex",alignItems:"center"},children:t.jsx(E,{isResource:!e.group,...a})})),t.jsx(ue,{href:De(e,s.info,n),style:{color:"initial",textDecoration:"none"},onClick:h,target:"_blank",children:t.jsx(Le,{title:F({meta:e,attribute:"title",value:e.title||e.name}),did:e.did,description:F({meta:e,attribute:"description",value:e.description}),cover:e.logo?o:"",version:e.version,button:d})})}U.propTypes={blocklet:x.object.isRequired,endpoint:x.string};U.defaultProps={endpoint:""};function T({storeUrl:e,handleSearchSelect:n,extraFilter:c,...s}){var r;const{locale:o}=j(),l=P(),[u,h]=p.useState({}),a=m=>{h(m)},d=e,i=(r=l==null?void 0:l.info)==null?void 0:r.version;return p.useEffect(()=>{h({})},[d]),t.jsx(ae,{FallbackComponent:ie,resetKeys:[d],children:t.jsx("div",{...s,children:t.jsx(Se,{blockletRender:m=>{const b={...m,endpoint:d};return t.jsx(U,{...b})},baseSearch:!0,endpoint:d,locale:o,onFilterChange:a,onSearchSelect:n,filters:u,extraFilter:c,serverVersion:i})})})}T.propTypes={storeUrl:x.string.isRequired,handleSearchSelect:x.func,extraFilter:x.func};T.defaultProps={handleSearchSelect:null,extraFilter:void 0};const Le=K(je)`
|
|
2
|
-
.ms-highlight {
|
|
3
|
-
color: ${e=>e.theme.palette.primary.main};
|
|
4
|
-
}
|
|
5
|
-
`,Be=pe(()=>({buttonText:{textTransform:"none !important"},iconRoot:{minWidth:24},menuName:{display:"flex",flexDirection:"column",marginRight:"100px","& span":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})),I=p.forwardRef(({onChange:e,onDelete:n},c)=>{const{info:s}=P(),{t:o}=j(),[l,u]=p.useState(!1),[h,a]=p.useState(!1),[d,i]=p.useState(-1),r=Be(),[m,b]=D(V),y=Math.max(s.blockletRegistryList.findIndex(f=>f.url===m),0),w=f=>{try{u(!0),i(f);const g=s.blockletRegistryList[f];b(g.url),e(g.url),a(!1)}catch(g){console.error(g),W.error(`${o("store.blockletRegistry.changeFailed")} ${z(g)}`)}finally{u(!1)}};return p.useImperativeHandle(c,()=>({setOpen:a})),t.jsxs(t.Fragment,{children:[t.jsx(q,{permission:"mutate_node",children:f=>t.jsx(M,{disabled:!f,classes:{text:r.buttonText},color:"secondary","data-cy":"store-toggle",onClick:()=>{a(!0)},endIcon:t.jsx(ve,{}),children:t.jsx(R,{color:"secondary",children:s.blockletRegistryList[y].name})})}),t.jsx(N,{title:o("store.blockletRegistry.switchRegistry"),disableEscapeKeyDown:!0,disablePortal:!1,fullWidth:!0,open:h,onClose:()=>a(!1),children:t.jsxs(he,{className:r.tabPanel,children:[s.blockletRegistryList.map((f,g)=>t.jsxs(fe,{button:!0,disabled:l,selected:y===g,"data-cy":"store-switch",onClick:()=>{if(!l){if(g===y){a(!1);return}w(g)}},children:[d===g&&l&&t.jsx(me,{className:r.iconRoot,children:t.jsx(O,{size:16})}),t.jsx(ge,{children:t.jsx(Pe,{teamDid:s.did,store:f,onDelete:()=>n(f.url)})})]},f.url)),t.jsx(we,{disabled:l,onAdd:e,teamDid:s.did,blockletRegistryList:s.blockletRegistryList})]})})]})});I.propTypes={onChange:x.func,onDelete:x.func};I.defaultProps={onChange:()=>{},onDelete:()=>{}};const Ee=I;function ot(){const{t:e}=j(),{info:n}=P(),[c]=D(V),{blockletRegistryList:s}=n,o=s.find(r=>c===r.url)||s[0],[l,u]=p.useState(o.url),h=n.routing.adminPath,a=S(window.location.origin,h),d=({detailUrl:r})=>{const m=new URL(r);m.searchParams.set("server-url",a);const b=document.createElement("a");b.setAttribute("target","_blank"),b.setAttribute("href",m.href),b.click()},i=p.useRef(null);return t.jsxs(Ue,{children:[t.jsxs(Re,{separator:"›","aria-label":"breadcrumb",className:"page-breadcrumb",children:[t.jsx(R,{color:"textPrimary",children:e("common.store")}),t.jsx(Ee,{ref:i,onChange:r=>u(r),onDelete:r=>{var m;l===r&&u((m=n.blockletRegistryList[0])==null?void 0:m.url)}})]}),t.jsx(xe,{className:"store-header",display:"flex",justifyContent:"space-between",p:0,m:0,children:t.jsx(R,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:e("store.headerDescription")})}),t.jsx(T,{className:"blocklet-list",handleSearchSelect:d,storeUrl:l})]})}const Ue=K.main`
|
|
6
|
-
@media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
|
|
7
|
-
.store-header {
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
margin-bottom: 32px !important;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.page-header {
|
|
13
|
-
margin-bottom: 16px !important;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
.blocklet-list {
|
|
17
|
-
aside:hover {
|
|
18
|
-
height: calc(100vh - 235px);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
`;export{ot as default};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{u as V,j as n,r as d,L as Y,P as h,f as A,l as j,Q as m,m as E,d as Z,X as ee,C as te,q as re,bo as T,M as N,a as f,F as L,b as x,d2 as ne,G as v,A as _,p as oe,o as se,z as ie,bh as ae,n as me}from"./index-Boqyvc8Q.js";import{T as le}from"./index-zUZPbg2I.js";import ce from"./traffic-CmQ-j2sa.js";import{D as ue}from"./index-CtWm5SK6.js";import{B as de}from"./app-avatar-DEqDSBYG.js";import{B as pe}from"./bundle-avatar-DzcvR6DI.js";import{C as fe,M as C}from"./memory-Cu-5WL0k.js";import{I as he}from"./chart-CQeRS3mZ.js";import{w as ge}from"./withStyles-CSLQqeaB.js";import{_ as ve}from"./useLocalStorage-BNvbpN9F.js";import{T as ye,a as xe}from"./ToggleButtonGroup-BKQ2fKoV.js";import"./Delete-h8Ye2r4b.js";import"./iframe-BcDoraJg.js";import"./ChevronLeft-DRzRLgnp.js";import"./ChevronRight-B2YICLYm.js";import"./Select-CPvSg7uW.js";import"./TextField-sj2mcEXD.js";import"./InputLabel-BjbeXM2B.js";import"./InputAdornment-DHLm1mFN.js";import"./FilterList-DKFhXHd2.js";import"./LastPage-DXu9ZGZF.js";import"./index-_NTV4-zc.js";import"./redux-07bmubSg.js";import"./Search-5iZBDNjz.js";import"./index-BXmzbebA.js";import"./MoreVert-BCR8irtL.js";import"./getValidReactChildren-B_HEoXEd.js";function je(){const{api:e,info:t}=V();return n.jsx(ce,{client:e,did:t.did})}var M={};Object.defineProperty(M,"__esModule",{value:!0});var H=M.default=void 0;be(d);var S=n;function be(e){return e&&e.__esModule?e:{default:e}}function k(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),i.push.apply(i,a)}return i}function D(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?k(Object(i),!0).forEach(function(a){Ie(e,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(i,a))})}return e}function Ie(e,t,i){return t=Pe(t),t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Pe(e){var t=we(e,"string");return typeof t=="symbol"?t:String(t)}function we(e,t){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var a=i.call(e,t||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var O=function(t){return(0,S.jsxs)("svg",D(D({},t),{},{children:[(0,S.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.083 3.2c0-.619.501-1.12 1.12-1.12h25.6c.619 0 1.12.501 1.12 1.12v10.24a1.12 1.12 0 0 1-1.12 1.12h-25.6a1.12 1.12 0 0 1-1.12-1.12V3.2zm2.24 1.12v8h23.36v-8H4.323zm-2.24 14.24c0-.619.501-1.12 1.12-1.12h25.6c.619 0 1.12.501 1.12 1.12V28.8a1.12 1.12 0 0 1-1.12 1.12h-25.6a1.12 1.12 0 0 1-1.12-1.12V18.56zm2.24 1.12v8h23.36v-8H4.323z",fill:"currentColor"}),(0,S.jsx)("path",{d:"M8.963 7.04h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64V7.68a.64.64 0 0 0-.64-.64zm0 15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64v-1.28a.64.64 0 0 0-.64-.64zm5.12-15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64V7.68a.64.64 0 0 0-.64-.64zm0 15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64v-1.28a.64.64 0 0 0-.64-.64z",fill:"currentColor"})]}))};O.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"};O.displayName="server";H=M.default=O;const Ne=ge(e=>({root:{height:10},colorPrimary:{backgroundColor:e.palette.grey[e.palette.mode==="light"?200:700]},bar:{backgroundColor:e.palette.secondary.main}}))(Y);function $(e){const{value:t}=e;return n.jsxs(m,{display:"flex",alignItems:"center",mt:2,children:[n.jsx(m,{width:"100%",style:{overflow:"hidden"},mr:1,children:n.jsx(Ne,{variant:"determinate",...e})}),n.jsx(m,{minWidth:35,children:n.jsx(E,{variant:"body2",color:"textSecondary",children:`${Math.round(t)}%`})})]})}$.propTypes={value:h.number.isRequired};function R({disk:e}){const{t}=d.useContext(A),i=[{id:1,className:"used",title:t("system.used"),metric:j(e.used)},{id:2,className:"free",title:t("system.free"),metric:j(e.free)},{id:3,className:"total",title:t("system.total"),metric:j(e.total)}];return n.jsx(he,{title:`${t("common.disk")} (${e.device})`,value:j(e.used),graph:n.jsx(m,{mt:3,children:n.jsx($,{value:e.used/e.total*100})}),description:i.map((a,u)=>n.jsxs(m,{sx:{marginLeft:u===0?0:2},children:[a.title,": ",a.metric]},a.title))})}R.propTypes={disk:h.shape({used:h.number,free:h.number,total:h.number,device:h.string})};R.defaultProps={disk:{used:0,free:0,total:1,device:""}};const U={uptime:0,pid:-1,cpuUsage:0,memoryUsage:0},z="Blocklet Server";function F({initialBlocklets:e}){const{t,locale:i}=re(),{api:a}=V(),[u,b]=ve("runtime-view-interval",6),y=d.useMemo(()=>{const r=[];return r.push({type:"server",groupId:"server",groupName:z,id:"server:daemon",name:"Server (Daemon)",runtimeInfo:U}),r.push({type:"server",groupId:"server",groupName:z,id:"server:service",name:"Server (Service)",runtimeInfo:U}),e.forEach(o=>{T(o,(s,{id:l,ancestors:c})=>{s.runtimeInfo&&r.push({type:"blocklet",groupId:o.meta.did,groupName:N(o),id:l,name:N(s,!0),blocklet:o,component:s,runtimeInfo:s.runtimeInfo,ancestors:c})})}),r},[]),[p,I]=d.useState(y),[g,q]=d.useState({os:{platform:""},mem:{used:0,free:0,total:1},cpu:{cpus:[],currentLoad:1},disks:[],daemon:{},service:{}}),[P,G]=d.useState({cpu:[],mem:[],daemonMem:[],serviceMem:[]});f(L.EVENTS.NODE_RUNTIME_INFO,r=>{r.mem.total=r.mem.total||0,r.mem.used=r.mem.total-(r.mem.available||0),q(r),I(o=>o.map(s=>s.id==="server:daemon"?{...s,runtimeInfo:{...s.runtimeInfo,...r.daemon}}:s.id==="server:service"?{...s,runtimeInfo:{...s.runtimeInfo,...r.service}}:s))}),f(L.EVENTS.BLOCKLETS_RUNTIME_INFO,r=>{if(!r||!r.length){console.error("incorrect blocklets runtime info format",r);return}I(o=>o.map(s=>{const l=r.find(c=>c.componentId===s.id);return l?{...s,runtimeInfo:{...s.runtimeInfo,...l.runtimeInfo}}:s}))});const w=r=>{I(o=>o.filter(s=>s.groupId!==r.meta.did))},B=async r=>{try{const{blocklet:o}=await a.getBlocklet({input:{did:r.meta.did,attachRuntimeInfo:!0}});o.status!=="running"&&w(o),I(s=>{const l=s.filter(c=>c.groupId!==o.meta.did);return T(o,(c,{id:X,ancestors:J})=>{c.runtimeInfo&&l.push({type:"blocklet",groupId:o.meta.did,groupName:N(o),id:X,name:N(c,!0),blocklet:o,component:c,runtimeInfo:c.runtimeInfo,ancestors:J})}),l})}catch(o){_.error(o.message)}};f(x.BlockletEvents.removed,w),f(x.BlockletEvents.startFailed,w),f(x.BlockletEvents.statusChange,r=>{if(r.status!=="running"){w(r);return}B(r)}),f(x.BlockletEvents.updated,B),f(x.BlockletEvents.started,B);const W=()=>{a.getNodeRuntimeHistory({input:{hours:u}}).then(r=>{const o=r.history||[];G({cpu:o.map(s=>({date:s.date,value:s.cpu})),mem:o.map(s=>({date:s.date,value:s.mem})),daemonMem:o.map(s=>({date:s.date,value:s.daemonMem})),serviceMem:o.map(s=>({date:s.date,value:s.serviceMem}))})}).catch(r=>{_.error(r.message)})};d.useEffect(()=>{W()},[u]);const K=r=>oe(Number(r||0),{locale:se(i)}),Q=[{label:t("common.group"),name:"groupName",options:{customBodyRenderLite(r){const{type:o,blocklet:s,groupName:l}=p[r];return o==="server"?n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(ne,{width:"14",height:"14"}),n.jsx(m,{ml:1,children:l})]}):n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(de,{size:14,blocklet:s}),n.jsx(m,{ml:1,children:l})]})}}},{label:t("common.name"),name:"name",options:{customBodyRenderLite(r){const{type:o,name:s,component:l,ancestors:c}=p[r];return o==="server"?n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(H,{width:"14",height:"14"}),n.jsx(m,{ml:1,children:s})]}):n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(pe,{size:14,blocklet:l,ancestors:c}),n.jsx(m,{ml:1,children:s})]})}}},{label:t("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(r){const{runtimeInfo:o}=p[r];return K(o.uptime)}}},{label:t("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(r){const{runtimeInfo:o}=p[r];return j((o==null?void 0:o.memoryUsage)||0)},sortDirection:"asc"}},{label:t("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(r){const{runtimeInfo:o}=p[r];return`${(o.cpuUsage||0).toFixed(1)}%`}}},{label:t("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid"},{label:t("blocklet.runtimeInfo.port"),name:"runtimeInfo.port"}];return n.jsxs("div",{children:[n.jsxs(m,{display:"flex",justifyContent:"space-between",flexDirection:"row",mb:2,children:[n.jsx(E,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},children:t("analytics.trend")}),n.jsx(ye,{size:"small",exclusive:!0,value:u,onChange:(r,o)=>b(o),children:[1,3,6,12,24].map(r=>n.jsxs(xe,{value:r,children:[r,"H"]},r))})]}),n.jsxs(v,{mb:4,container:!0,spacing:4,children:[n.jsx(v,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(fe,{...g.cpu,history:P.cpu})},"cpu"),n.jsx(v,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(C,{...g.mem,history:P.mem})},"memory"),n.jsx(v,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(C,{title:`${t("common.memory")} (Daemon)`,used:g.daemon.memoryUsage||0,history:P.daemonMem})},"memory-daemon"),n.jsx(v,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(C,{title:`${t("common.memory")} (Service)`,instanceCount:g.service.instanceCount||0,used:g.service.memoryUsage||0,history:P.serviceMem})},"memory-service"),g.disks.map(r=>n.jsx(v,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(R,{disk:r})},"disk"))]}),n.jsx(ue,{className:"runtime-insight-list",title:t("analytics.detail"),locale:i,data:p,columns:Q,options:{download:!1,filter:!1,print:!1,pagination:!1,rowsPerPage:100}})]})}F.propTypes={initialBlocklets:h.array.isRequired};function Be(){const{data:e,externalData:t,initialized:i}=Z();if(!i)return n.jsx(ee,{relative:"parent",children:n.jsx(te,{})});const a=[...e,...t];return n.jsx(F,{initialBlocklets:a})}function tt(){const e=ie(),{t}=d.useContext(A),{tab:i="traffic"}=ae(),a=p=>{e(`/analytics/${p}`)},u=[{label:t("common.traffic"),value:"traffic"},{label:t("common.runtime"),value:"runtime"}],b={traffic:je,runtime:Be},y=b[i]||b.traffic;return n.jsxs(Ce,{children:[n.jsx(E,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:t("common.analytics")}),n.jsx(le,{tabs:u,current:i,onChange:a}),n.jsx("div",{className:"page-content",children:d.isValidElement(y)?y:n.jsx(y,{})})]})}const Ce=me.main`
|
|
2
|
-
.page-header {
|
|
3
|
-
display: flex;
|
|
4
|
-
justify-content: space-between;
|
|
5
|
-
align-items: center;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.page-content {
|
|
9
|
-
margin-top: 16px;
|
|
10
|
-
}
|
|
11
|
-
`;export{tt as default};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import{n as N,P as L,r as w,f as ke,j as e,C as V,i as je,u as de,q,t as ye,v as Ce,D as ve,B as W,w as Se,m as I,x as Be,y as we,z as pe,A as z,E as Ae,d as Te,F as De,H as Ee,J as ee,K as Ie,M as O,N as te,O as oe,Q as y,R as Le,S as _,U as Pe,V as Re,X as _e}from"./index-Boqyvc8Q.js";import{_ as se}from"./useLocalStorage-BNvbpN9F.js";import{g as Fe,D as Ne}from"./index-CtWm5SK6.js";import{E as $e}from"./index-BXmzbebA.js";import{u as Ue,B as ne}from"./url-evaluation-DymLev_N.js";import{D as Me,u as Oe,B as le}from"./actions-ByUCXaaH.js";import{l as ae}from"./index-BCPsngBN.js";import{W as We}from"./tag-CANB-Fll.js";import{I as ze,B as Ve}from"./install-from-url-Cnfp9xqR.js";import{B as re}from"./app-avatar-DEqDSBYG.js";import{d as qe}from"./Add-DOwN6I9N.js";import{S as D}from"./index-RlfSCcPa.js";import{T as ie}from"./TextField-sj2mcEXD.js";import{F as Ke,S as Qe}from"./Select-CPvSg7uW.js";import"./FilterList-DKFhXHd2.js";import"./Delete-h8Ye2r4b.js";import"./InputLabel-BjbeXM2B.js";import"./LastPage-DXu9ZGZF.js";import"./index-_NTV4-zc.js";import"./redux-07bmubSg.js";import"./Search-5iZBDNjz.js";import"./MoreVert-BCR8irtL.js";import"./ButtonGroup-CKY0O7tT.js";import"./getValidReactChildren-B_HEoXEd.js";import"./isEqual-DbZp5EUk.js";import"./index-B6ReOJJN.js";import"./Stepper-DpooXZzV.js";function F({blocklet:g,skipAccessibilityCheck:c=!1,...p}){const{t:a}=w.useContext(ke),{urls:C,loading:s,recommendedUrl:m}=Ue(g);if(s&&!c)return e.jsx(V,{size:12,...p});const x=c?C[0]:m;return x?e.jsx(He,{...p,children:e.jsx(Xe,{children:e.jsx(je,{href:x,target:"_blank",className:"blocklet-interface",underline:"hover",children:a("common.open")})})}):a("blocklet.router.noAccessibleUrl")}const Xe=N.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
margin: 4px 0;
|
|
4
|
-
`,He=N.div`
|
|
5
|
-
.blocklet-interface {
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
justify-content: flex-start;
|
|
9
|
-
white-space: nowrap;
|
|
10
|
-
|
|
11
|
-
img {
|
|
12
|
-
margin-right: 4px;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
`;F.propTypes={blocklet:L.object.isRequired,skipAccessibilityCheck:L.bool};F.defaultProps={skipAccessibilityCheck:!1};const ce={title:/^.{3,40}$/,description:/^.{3,160}$/};function K({onCancel:g,onSuccess:c}){const{info:p}=de(),{t:a}=q(),{api:C}=ye(),[s,m]=Ce({loading:!1,title:"",titleError:"",description:"",descriptionError:"",isConnectOpen:!1}),x=()=>{m({loading:!0,isConnectOpen:!0})},b=d=>{m({loading:!1,isConnectOpen:!1}),c(d)},v=()=>{m({loading:!1,isConnectOpen:!1})},k=d=>{const{value:n,name:r}=d.target;m({[`${r}Error`]:n&&!ce[r].test(n)?a(`blocklet.${r}ValidationError`):""})},S=d=>{const{value:n,name:r}=d.target,u=`${r}Error`;s[u]?m({[r]:n,[u]:n&&!ce[r].test(n)?a(`blocklet.${r}ValidationError`):""}):m({[r]:n})};return e.jsxs(e.Fragment,{children:[e.jsx(ve,{title:a("blocklet.installFromCreate"),fullWidth:!0,maxWidth:"sm",onClose:()=>g(),showCloseButton:!0,open:!0,actions:e.jsxs(e.Fragment,{children:[e.jsx(W,{onClick:d=>{d.stopPropagation(),g()},color:"inherit",children:a("common.cancel")}),e.jsxs(W,{onClick:d=>{d.stopPropagation(),x()},color:"primary","data-cy":"install-blocklet-next-step",variant:"contained",disabled:s.loading||s.titleError||s.descriptionError||!s.title||!s.description,style:{marginLeft:8},children:[s.loading&&e.jsx(V,{size:16}),a("common.create")]})]}),children:e.jsx(Se,{component:"div",children:e.jsxs(I,{component:"div",children:[e.jsx(ie,{style:{marginBottom:24},label:`Blocklet ${a("common.title")}`,autoComplete:"off",variant:"outlined",fullWidth:!0,autoFocus:!0,name:"title",value:s.title,onBlur:k,onChange:S,error:!!s.titleError,helperText:s.titleError,disabled:s.loading}),e.jsx(ie,{label:`Blocklet ${a("common.description")}`,autoComplete:"off",variant:"outlined",fullWidth:!0,name:"description",value:s.description,onBlur:k,onChange:S,error:!!s.descriptionError,helperText:s.descriptionError,disabled:s.loading})]})})}),e.jsx(Be,{popup:!0,open:s.isConnectOpen,forceConnected:!1,className:"launch-from-create-auth",action:"launch-free-blocklet-by-session",checkFn:C.get,checkTimeout:5*60*1e3,webWalletUrl:we(p),onSuccess:b,extraParams:{title:s.title,description:s.description},messages:{title:a("setup.keyPair.title"),scan:a("setup.keyPair.scan"),confirm:a("setup.keyPair.confirm"),success:a("setup.keyPair.success")},onClose:v})]})}K.propTypes={onCancel:L.func.isRequired,onSuccess:L.func.isRequired};K.defaultProps={};function Q({onCreate:g}){const c=pe(),{t:p}=q(),[a,C]=w.useState(""),[s,m]=w.useState(""),[x,b]=w.useState(null),[v,k]=w.useState(null),S=()=>{b(null)},d=()=>{b({onCancel:()=>{S(),b(null)},onSuccess:()=>{S()}})},n=()=>{k({onCancel:()=>{k(null)},onSuccess:(...j)=>{k(null),g(...j)}})},r=()=>{const j=new URL("http://localhost");j.searchParams.set("restoreFrom","server"),j.searchParams.set("serverUrl",window.location.href),c(`/blocklets/restore${j.search}`)},u=()=>{c("/blocklets/restore")};return e.jsxs(e.Fragment,{children:[e.jsxs(D,{onClick:()=>c("/store"),menuButtonProps:{"data-cy":"open-install-menu"},menu:[e.jsx(D.Item,{"data-cy":"open-install-form",onClick:()=>d(),children:p("blocklet.installFromUrl")},"1"),e.jsx(D.Item,{"data-cy":"open-create-form",onClick:()=>n(),children:p("blocklet.installFromCreate")},"2"),e.jsx(D.Item,{"data-cy":"open-install-from-spaces",onClick:()=>u(),children:p("blocklet.restoreFromSpaces.title")},"3"),e.jsx(D.Item,{"data-cy":"open-install-from-spaces",onClick:()=>r(),children:p("blocklet.installFromDiskBackup")},"3")].filter(Boolean),children:[e.jsx(qe,{}),p("blocklet.installFromMarket")]}),!!a&&e.jsx(z,{variant:"error",message:a,onClose:()=>C("")}),!!s&&e.jsx(z,{variant:"success",duration:3e3,message:s,onClose:()=>m("")}),x&&e.jsx(ze,{onCancel:x.onCancel,onSuccess:x.onSuccess}),v&&e.jsx(K,{onCancel:v.onCancel,onSuccess:v.onSuccess})]})}Q.propTypes={onCreate:L.func};Q.defaultProps={onCreate:()=>{}};const E="internal",me="external";function wt(){return e.jsx(Me,{children:e.jsx(Je,{})})}function Je(){const g=pe(),c=de(),[p,a]=Ae(),{data:C,externalData:s,error:m,refresh:x,loading:b}=Te(),{deletingBlocklets:v,addDeletingDid:k,removeDeletingDid:S,matchDeletingDid:d}=Oe(),{t:n,locale:r}=q(),[u,j]=w.useState(p.get("searchText")),[ue]=se("show-external-blocklet-actions",!1),fe=[{id:E,name:n("blocklet.internal")},{id:me,name:n("blocklet.external")}],[A,xe]=se("blocklet-type-filter",E),X=A===E?C:s,he=(c==null?void 0:c.info.mode)!==De.NODE_MODES.SERVERLESS;d(X.map(l=>l.meta.did));const H=({action:l,blocklet:R})=>{l==="remove"&&k(R.meta.did)},J=l=>{if(l.error){z.error(l.error.message),l.action==="remove"&&S(l.blocklet.meta.did);return}l.action==="remove"&&c.refresh({silent:!0})},G=Ee(l=>l.breakpoints.up("md"));let P=null;const $=X||[];if(m)P=e.jsx(ee,{type:"error",variant:"icon",children:e.jsxs("div",{children:[Ie(m),e.jsx(W,{onClick:()=>x({silent:!1}),children:e.jsx("span",{style:{color:"#44cdc6",textDecoration:"underline"},children:n("common.retry")})})]})});else if($.length>0||b){const l=["installedAt","startedAt","stoppedAt","createdAt"],R=o=>{if(o.status==="starting")return new Date("2199").getTime();if(o.status==="running"){if(o.appRuntimeInfo)return o.appRuntimeInfo.startAt;if(o.startedAt)return o.startedAt.getTime()}return 0};let f=$.map(o=>(l.forEach(t=>{if(o[t]){const h=new Date(o[t]);o[t]=h}}),o)).sort((o,t)=>{const h=R(o);return R(t)-h});u&&(f=f.filter(o=>{var i;const t=O(o)||"",h=((i=o.site)==null?void 0:i.domainAliases)||[],B=ae.isValid(u)?ae.toAddress(u):u,T=u.trim().toLocaleLowerCase();return o.appDid===B||o.appPid===B||t.toLocaleLowerCase().includes(T)||h.some(M=>{var Z;return(Z=M.value)==null?void 0:Z.toLocaleLowerCase().includes(T)})}));const U=Fe("blocklets-list");U.searchText&&!u&&j(U.searchText);const ge=[{label:n("common.name"),name:"meta.title",options:{customBodyRenderLite(o){const t=f[o],h=te(t).length>0?"components":"overview";return e.jsx(oe,{to:`/blocklets/${t.meta.did}/${h}`,className:"blocklet-name-wrapper",children:e.jsxs(I,{component:"strong",variant:"body1",className:"blocklet-name",children:[e.jsx(re,{blocklet:t,style:{marginRight:8}}),e.jsxs(y,{children:[e.jsx(y,{children:O(t)}),e.jsxs(y,{children:[e.jsx(Ve,{mode:t.mode||""}),!Le(t.controller)&&e.jsx(We,{type:"primary",children:n("blocklet.external")})]})]})]})},t.meta.did)}}},A===E?{label:n("common.visit"),name:"runtimeInfo.pid",align:"left",options:{sort:!1,customBodyRenderLite(o){const t=f[o];return e.jsx(F,{blocklet:t},t.meta.did)}}}:null,{label:n("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(o){const t=f[o];return t.status==="running"&&t.appRuntimeInfo?e.jsx(_,{value:t.appRuntimeInfo.startAt,locale:r},t.meta.did):""}}},{label:n("common.installedAt"),name:"installedAt",options:{customBodyRenderLite(o){const t=f[o];return t.installedAt?e.jsx(_,{value:t.installedAt.getTime(),locale:r},t.meta.did):t.createdAt?e.jsx(_,{value:t.createdAt.getTime(),locale:r},t.meta.did):""}}},{label:n("common.updatedAt"),name:"updatedAt",options:{customBodyRenderLite(o){const t=f[o];return e.jsx(_,{value:t.updatedAt,locale:r},t.meta.did)}}},{label:n("common.status"),name:"status",width:120,align:"center",options:{customBodyRenderLite(o){const t=f[o];return e.jsx(ne,{"data-cy":"blocklet-status","status-blocklet-did":t.meta.did,status:v.includes(t.meta.did)?"deleting":t.status,source:t.source,progress:t.progress},t.meta.did)}}},A===E||ue?{label:n("common.actions"),name:"",width:90,options:{sort:!1,customBodyRenderLite(o){const t=f[o];return e.jsx(le,{blocklet:t,variant:"menu",onStart:H,onComplete:J},t.meta.did)}}}:null].filter(Boolean),Y={};G||(Y.TableBody=function(t){if(b)return e.jsx(_e,{relative:"parent",children:e.jsx(V,{})});const{page:h,rowsPerPage:B}=t,T=f.slice(h*B,(h+1)*B);return T.length?e.jsx("div",{children:T.map(i=>{const M=te(i).length>0?"components":"overview";return e.jsxs(y,{className:"blocklet-item--mobile",display:"flex",justifyContent:"space-between",alignItems:"center",children:[e.jsx(re,{className:"blocklet__avatar",blocklet:i,size:G?40:60}),e.jsxs(oe,{className:"blocklet__content",to:`/blocklets/${i.meta.did}/${M}`,children:[e.jsxs(y,{display:"flex",justifyContent:"space-between",alignItems:"flex-start",children:[e.jsx(I,{component:"strong",variant:"body1",className:"blocklet__name",children:O(i,!0)}),e.jsx(le,{blocklet:i,variant:"menu",onStart:H,onComplete:J},i.meta.did)]}),e.jsxs(I,{component:"small",className:"blocklet__addons",children:[e.jsx(y,{display:"flex",alignItems:"center",children:e.jsx(F,{blocklet:i,style:{marginLeft:16,fontSize:14}})}),e.jsx(ne,{"status-blocklet-did":i.meta.did,status:i.status,source:i.source,progress:i.progress},i.meta.did)]})]})]})})}):e.jsx($e,{children:n("common.empty")})}),P=e.jsx(Ge,{children:e.jsx(Ne,{loading:b,className:"blocklet-list",title:e.jsx(y,{display:"flex",alignItems:"center",children:n("blocklet.index.tableTitle")}),locale:r,data:f,columns:ge,durable:"blocklets-list",options:{download:!1,filter:!1,print:!1,searchPlaceholder:n("common.search"),searchAlwaysOpen:!1,sortOrder:{name:"uptime",direction:"desc"},searchDebounceTime:300,onSearchChange:o=>{j(o),a({searchText:o??""})},customSearch:()=>!0,...U,searchText:u},components:Y})})}else $.length===0&&(P=e.jsx(ee,{type:"warning",variant:"icon",children:n("blocklet.index.noBlocklet")}));const be=s&&s.length>0;return e.jsxs(Ye,{children:[e.jsxs(I,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:[e.jsxs(y,{display:"flex",alignItems:"center",children:[n("common.blocklets"),(be||A===me)&&e.jsx(Ke,{sx:{ml:1},children:e.jsx(Qe,{value:A,onChange:l=>xe(l.target.value),size:"small",children:fe.map(l=>e.jsx(Pe,{value:l.id,children:n(l.name)},l.id))})})]}),e.jsx(Re,{permission:"mutate_blocklets",children:he&&e.jsx(Q,{onCreate:l=>{g(`/blocklets/${l.appDid}/components`)}})})]}),P]})}const Ge=N.div`
|
|
16
|
-
.blocklet-item--mobile {
|
|
17
|
-
padding: 16px 0;
|
|
18
|
-
}
|
|
19
|
-
`,Ye=N.main`
|
|
20
|
-
.page-header {
|
|
21
|
-
display: flex;
|
|
22
|
-
justify-content: space-between;
|
|
23
|
-
align-items: center;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.blocklet-list {
|
|
27
|
-
.blocklet-item--mobile {
|
|
28
|
-
.blocklet__avatar {
|
|
29
|
-
margin-right: -60px;
|
|
30
|
-
}
|
|
31
|
-
.blocklet__content {
|
|
32
|
-
padding-left: 68px;
|
|
33
|
-
flex: 1;
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
z-index: 1;
|
|
37
|
-
}
|
|
38
|
-
.blocklet__name {
|
|
39
|
-
font-weight: bold;
|
|
40
|
-
text-decoration: none;
|
|
41
|
-
white-space: normal;
|
|
42
|
-
word-break: break-all;
|
|
43
|
-
}
|
|
44
|
-
.blocklet__addons {
|
|
45
|
-
display: flex;
|
|
46
|
-
justify-content: space-between;
|
|
47
|
-
margin-top: 5px;
|
|
48
|
-
margin-bottom: -10px;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
.blocklet-name-wrapper {
|
|
52
|
-
display: flex;
|
|
53
|
-
flex-direction: row;
|
|
54
|
-
align-items: center;
|
|
55
|
-
justify-content: flex-start;
|
|
56
|
-
}
|
|
57
|
-
.blocklet-name {
|
|
58
|
-
font-weight: bold;
|
|
59
|
-
text-decoration: underline;
|
|
60
|
-
display: flex;
|
|
61
|
-
align-items: center;
|
|
62
|
-
white-space: normal;
|
|
63
|
-
word-break: break-all;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.blocklet-interface {
|
|
67
|
-
display: flex;
|
|
68
|
-
align-items: center;
|
|
69
|
-
justify-content: flex-start;
|
|
70
|
-
|
|
71
|
-
img {
|
|
72
|
-
margin-right: 4px;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.MuiToolbar-root {
|
|
77
|
-
display: flex;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
`;export{Je as BlockletList,wt as default};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{r,U as u,j as e,dV as p,b5 as M,dW as b,dX as z,dY as E,P as o,dE as O,s as m,dZ as S}from"./index-Boqyvc8Q.js";import{B as v}from"./ButtonGroup-CKY0O7tT.js";function d(s){const{size:f,color:a,menu:i,children:l,variant:h,onClick:x,menuButtonProps:y,...g}=s,[j,c]=r.useState(!1),t=r.useRef(null),k=Array.isArray(i)?i.map((n,I)=>r.isValidElement(n)?n:r.createElement(u,{...n,key:I})):i,B=()=>{c(n=>!n)},C=n=>{t.current&&t.current.contains(n.target)||c(!1)},P=n=>{n.target.closest(".MuiMenuItem-root")&&c(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs(A,{variant:h,size:f,color:a,ref:t,...g,children:[typeof l=="function"?l():e.jsx(p,{onClick:x,color:a,children:l}),e.jsx(p,{onClick:B,color:a,...y,"aria-label":"more functions",children:e.jsx(M,{})})]}),e.jsx(L,{open:j,anchorEl:t.current,placement:"bottom-end",disablePortal:!1,children:e.jsx(b,{children:e.jsx(z,{onClickAway:C,children:e.jsx(E,{onClick:P,children:k})})})})]})}d.propTypes={size:o.oneOf(["small","medium","large"]),color:o.oneOf(["primary","secondary","inherit"]),menu:o.oneOfType([o.node,o.array]),children:o.node,variant:o.oneOf(["outlined","contained"]),onClick:o.func,menuButtonProps:o.object};d.defaultProps={size:"medium",color:"primary",menu:[],children:null,variant:"contained",onClick:O,menuButtonProps:{}};d.Item=u;const A=m(v)`
|
|
2
|
-
> .MuiButtonBase-root:last-of-type {
|
|
3
|
-
min-width: 2em;
|
|
4
|
-
padding-left: 0;
|
|
5
|
-
padding-right: 0;
|
|
6
|
-
}
|
|
7
|
-
`,L=m(S)`
|
|
8
|
-
z-index: ${s=>s.theme.zIndex.tooltip};
|
|
9
|
-
.MuiList-root {
|
|
10
|
-
padding: 4px 0;
|
|
11
|
-
}
|
|
12
|
-
.MuiListItem-root {
|
|
13
|
-
padding-top: 4px;
|
|
14
|
-
padding-bottom: 4px;
|
|
15
|
-
}
|
|
16
|
-
`;export{d as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{P as l,j as t,bm as G,t as J,r as s,q as V,M as H,W as Q,dN as X,m as Y,D as Z,B as E,C as I,w as _,J as ee,x as te,bn as ne,K as oe}from"./index-Boqyvc8Q.js";import{W as se}from"./tag-CANB-Fll.js";import{I as w}from"./index-B6ReOJJN.js";import{T as re}from"./TextField-sj2mcEXD.js";import{S as ae,a as le,b as ie}from"./Stepper-DpooXZzV.js";function ce({mode:r,...i}){return r==="development"?t.jsx(se,{type:"primary",...i,children:"DEV"}):null}ce.propTypes={mode:l.string.isRequired};function D({defaultUrl:r,onCancel:i,onSuccess:v,onError:W,mode:B,handleText:c}){const{api:F}=G(),{api:L}=J(),[d,m]=s.useState(!1),[y,p]=s.useState(""),{t:n}=V(),j={dist:{}},[u,M]=s.useState(r),[f,h]=s.useState(r?1:0),[o,k]=s.useState(j),[R,x]=s.useState(!1),[S,T]=s.useState({}),P=B==="component",g=P?!0:!r,C=async()=>{k(j),p(null),m(!0);try{const e=decodeURIComponent(u.trim());try{new URL(e)}catch{throw new Error("Invalid URL")}const{meta:b,inStore:$,registryUrl:z}=await F.getBlockletMetaFromUrl({input:{url:e}});k(b),T({inStore:$,registryUrl:z,inputUrl:u.trim()})}catch(e){console.error(e);const b=`Blocklet Install failed: ${oe(e)}`;p(b),W(e)}finally{m(!1)}},q=()=>{if(P){v({meta:o,...S}),i();return}m(!0),x(!0)},N=()=>{m(!1),x(!1),v({meta:o,...S}),i()},A=()=>{m(!1),x(!1)};s.useEffect(()=>{r&&C()},[r]);const K=[{name:n("common.name"),value:H({meta:o},!0)},{name:n("common.version"),value:o.version},{name:n("common.did"),value:t.jsx(Q,{did:o.did})},{name:n("common.author"),value:X(o.author)},{name:n("blocklet.dist.downloadLink"),value:o.dist.tarball}],O=()=>d?t.jsx("div",{style:{height:200,width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:t.jsx(I,{})}):o.did?t.jsx("div",{style:{paddingLeft:"10%"},children:K.map(e=>e.name===n("common.did")?t.jsx(w,{valueComponent:"div",nameWidth:120,name:e.name,nameFormatter:()=>n("common.did"),children:e.value},e.name):t.jsx(w,{valueComponent:"div",nameWidth:120,name:e.name,children:e.value},e.name))}):null,U=[{label:n("blocklet.fromUrl.step0"),body:t.jsx(Y,{component:"div",children:t.jsx(re,{label:n("blocklet.fromUrl.label"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"blocklet-url-input",fullWidth:!0,autoFocus:!0,style:{marginBottom:32},margin:"dense",helperText:n("blocklet.fromUrl.description"),value:u,onChange:e=>{p(null),M(e.target.value)},disabled:d,onKeyPress:e=>{e.key==="Enter"&&(e.preventDefault(),C(),h(1))}})}),cancel:n("common.cancel"),confirm:n("common.next"),onCancel:i,onConfirm:()=>{C(),h(1)}},{label:n("blocklet.fromUrl.step1"),body:O(),cancel:n(g?"common.pre":"common.cancel"),confirm:(c==null?void 0:c.confirm)||n("blocklet.fromUrl.confirm"),onCancel:()=>{g?h(e=>e-1):i()},onConfirm:()=>{q()}}],a=U[f];return t.jsxs(t.Fragment,{children:[t.jsxs(Z,{title:(c==null?void 0:c.title)||n("blocklet.fromUrl.title"),fullWidth:!0,maxWidth:"md",onClose:()=>a.onCancel(),showCloseButton:f===0,disableEscapeKeyDown:!0,open:!0,actions:t.jsxs(t.Fragment,{children:[a.cancel&&t.jsx(E,{onClick:e=>{e.stopPropagation(),p(null),a.onCancel()},color:"inherit",children:a.cancel||n("common.cancel")}),t.jsxs(E,{onClick:e=>{e.stopPropagation(),a.onConfirm()},color:"primary","data-cy":"install-blocklet-next-step",disabled:d||!u||y,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[d&&f===0&&t.jsx(I,{size:16}),a.confirm]})]}),children:[g&&t.jsx(ae,{alternativeLabel:!0,activeStep:f,children:U.map(({label:e})=>t.jsx(le,{children:t.jsx(ie,{children:e})},e))}),t.jsx(_,{component:"div",style:{marginTop:24},children:a.body}),!!y&&t.jsx(ee,{type:"error",style:{width:"100%",marginTop:8},children:y})]}),o&&R&&t.jsx(te,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:L.get,checkTimeout:5*60*1e3,onSuccess:N,extraParams:{title:o.title,wt:ne(o),blockletMetaUrl:decodeURIComponent(u.trim())},messages:{title:n("setup.keyPair.title"),scan:n("setup.keyPair.scan"),confirm:n("setup.keyPair.confirm"),success:n("setup.keyPair.success")},onClose:A})]})}D.propTypes={defaultUrl:l.string,onCancel:l.func.isRequired,onSuccess:l.func.isRequired,onError:l.func,mode:l.oneOf(["install","component"]),handleText:l.object};D.defaultProps={onError:()=>{},defaultUrl:"",mode:"install",handleText:{}};export{ce as B,D as I};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import{bc as J,H as ae,aL as le,aM as ce,j as e,cT as dt,dJ as mt,P as r,aV as qe,q as R,r as S,bm as U,e as ut,b as ke,J as pt,az as F,C as H,ae as K,A as O,gB as ft,g as ze,gC as ht,gD as xt,gE as gt,gF as yt,gG as jt,Y as bt,v as de,gH as Fe,gI as vt,gJ as Dt,Q as h,m as I,gK as wt,aT as Ct,X as Ee,i as St,x as At,aw as Tt,dE as Re,cd as Me,U as Be,B as V,aO as It,aE as kt,aa as Et,b0 as Oe,b1 as Ue,b2 as We,k as Rt,b3 as Pe,a$ as Pt,bO as He,n as Ve,cl as _t,gL as Qe,b4 as Lt,gM as $t,bK as Nt,gN as qt,aP as zt,b5 as Je,a3 as Ft,W as B,M as Mt,cO as Bt,au as Ot,gO as Ut,T as Wt}from"./index-Boqyvc8Q.js";import{I as Ke}from"./index-B6ReOJJN.js";import{u as me}from"./team-rrZYIohT.js";import{D as _e,B as Ht}from"./url-evaluation-DymLev_N.js";import{d as Vt}from"./Add-DOwN6I9N.js";import{d as Qt}from"./LockIcon-mC00ojRt.js";import{E as Jt}from"./index-BXmzbebA.js";import{d as Kt,a as Ge}from"./Https-CsiKqkaT.js";import{d as Gt}from"./InfoOutlined-BUn5fKCT.js";import{r as Yt}from"./index-C7GDLIo-.js";import"./api-BdOqJGVs.js";import{p as Le}from"./util-CRUZQ4-B.js";import{T as Xt}from"./TextField-sj2mcEXD.js";import{L as Zt}from"./LoadingButton-3UN68oPJ.js";import{d as Ye}from"./Delete-h8Ye2r4b.js";import{A as en}from"./actions-xngcxvp5.js";import"./tag-CANB-Fll.js";import"./Select-CPvSg7uW.js";import"./InputLabel-BjbeXM2B.js";function tn({key:n="sm"}){const t=J();return ae(t.breakpoints.down(n))}var ue={},nn=ce;Object.defineProperty(ue,"__esModule",{value:!0});var Xe=ue.default=void 0,sn=nn(le()),on=e;Xe=ue.default=(0,sn.default)((0,on.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"OpenInNew");var pe={},rn=ce;Object.defineProperty(pe,"__esModule",{value:!0});var fe=pe.default=void 0,an=rn(le()),ln=e;fe=pe.default=(0,an.default)((0,ln.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess");var he={},cn=ce;Object.defineProperty(he,"__esModule",{value:!0});var ne=he.default=void 0,dn=cn(le()),mn=e;ne=he.default=(0,dn.default)((0,mn.jsx)("path",{d:"M12.16 3h-.32L9.21 8.25h5.58zm4.3 5.25h5.16L19 3h-5.16zm4.92 1.5h-8.63V20.1zM11.25 20.1V9.75H2.62zM7.54 8.25 10.16 3H5L2.38 8.25z"}),"Diamond");class un{constructor(t,s,o){this.name=t,this.prefix=s,this.baseEncode=o}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class pn{constructor(t,s,o){if(this.name=t,this.prefix=s,s.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=s.codePointAt(0),this.baseDecode=o}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return Ze(this,t)}}class fn{constructor(t){this.decoders=t}or(t){return Ze(this,t)}decode(t){const s=t[0],o=this.decoders[s];if(o)return o.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Ze=(n,t)=>new fn({...n.decoders||{[n.prefix]:n},...t.decoders||{[t.prefix]:t}});class hn{constructor(t,s,o,a){this.name=t,this.prefix=s,this.baseEncode=o,this.baseDecode=a,this.encoder=new un(t,s,o),this.decoder=new pn(t,s,a)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const xn=({name:n,prefix:t,encode:s,decode:o})=>new hn(n,t,s,o),gn=(n,t,s,o)=>{const a={};for(let u=0;u<t.length;++u)a[t[u]]=u;let l=n.length;for(;n[l-1]==="=";)--l;const i=new Uint8Array(l*s/8|0);let c=0,d=0,p=0;for(let u=0;u<l;++u){const g=a[n[u]];if(g===void 0)throw new SyntaxError(`Non-${o} character`);d=d<<s|g,c+=s,c>=8&&(c-=8,i[p++]=255&d>>c)}if(c>=s||255&d<<8-c)throw new SyntaxError("Unexpected end of data");return i},yn=(n,t,s)=>{const o=t[t.length-1]==="=",a=(1<<s)-1;let l="",i=0,c=0;for(let d=0;d<n.length;++d)for(c=c<<8|n[d],i+=8;i>s;)i-=s,l+=t[a&c>>i];if(i&&(l+=t[a&c<<s-i]),o)for(;l.length*s&7;)l+="=";return l},N=({name:n,prefix:t,bitsPerChar:s,alphabet:o})=>xn({prefix:t,name:n,encode(a){return yn(a,o,s)},decode(a){return gn(a,o,s,n)}}),jn=N({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),bn=N({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),vn=N({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Dn=N({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),wn=N({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Cn=N({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Sn=N({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),An=N({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Tn=N({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),In=Object.freeze(Object.defineProperty({__proto__:null,base32:jn,base32hex:wn,base32hexpad:Sn,base32hexpadupper:An,base32hexupper:Cn,base32pad:vn,base32padupper:Dn,base32upper:bn,base32z:Tn},Symbol.toStringTag,{value:"Module"})),kn=dt(In),{toBuffer:En,toAddress:Rn,toBase58:Pn,toHex:_n}=mt,{base32:et}=kn,Ln=n=>{if(!n)return n;const t=En(Rn(n));return et.encode(t)},$n=n=>{if(!n)return n;const t=et.decode(n),s=Pn(t);return s.length>30?s:_n(t)};var Nn={encode:Ln,decode:$n};const qn=n=>["waiting","creating","renewaling"].includes(n);function xe(n){var b,w;const{t}=R(),[s,o]=S.useState(!1),{inService:a}=U(),[l,i]=S.useState(null),{siteId:c,domain:d,onAdd:p,children:u,did:g}=n,[P,j]=S.useState(!1),{api:C,ws:{useSubscription:k}}=U(),{mode:E,actions:{refreshDomainStatus:f}}=me(),v=ut(async()=>{const{cert:y}=await C.findCertificateByDomain({input:{domain:d,did:g}});return y}),A=(y,L)=>{y.domain===d&&(j(!1),o(!1),a&&E!=="setup"&&(L==="success"?O.success(t("setup.domain.genCertSuccess",{domain:y.domain})):L==="error"&&O.error(t("setup.domain.genCertFailed",{domain:y.domain,message:y.message}))))};if(S.useEffect(()=>{var y;v.loading||j(qn((y=v.value)==null?void 0:y.status))},[v.loading,(b=v.value)==null?void 0:b.status]),k(ke.BlockletEvents.certError,y=>A(y,"error")),k(ke.BlockletEvents.certIssued,y=>{v.retry(),f(y.domain),A(y,"success")}),v.loading||((w=v.value)==null?void 0:w.status)==="normal")return"";const D=()=>{o(!1),i(null)},m=async()=>{o(!0);try{await C.issueLetsEncryptCert({input:{siteId:c,domain:d,did:g,inBlockletSetup:E==="setup"}}),p(),j(!0)}catch(y){console.error(y),j(!1)}finally{o(!1),i(null)}},_={title:t("router.cert.genLetsEncryptCert.title"),description:e.jsxs("div",{children:[e.jsx(pt,{type:"success",children:t("router.cert.genLetsEncryptCert.dnsTip")}),t("router.cert.genLetsEncryptCert.description")]}),confirm:t("common.confirm"),onConfirm:m,onCancel:D},W=y=>{y.stopPropagation(),i(_)};return e.jsxs(e.Fragment,{children:[P?e.jsx(F,{title:t("router.cert.issuing"),children:e.jsx(H,{size:12})}):u({loading:s,open:W}),l&&e.jsx(K,{color:"primary",title:l.title,description:l.description,confirm:l.confirm,params:l.params,onConfirm:l.onConfirm,onCancel:l.onCancel})]})}xe.propTypes={domain:r.string.isRequired,did:r.string.isRequired,siteId:r.string.isRequired,onAdd:r.func,children:r.any};xe.defaultProps={onAdd:()=>{},children:null};function ge(n){const{domain:t,domainStatus:s,...o}=n;return!qe(t)||s!=null&&s.isHttps?"":e.jsx(xe,{domain:t,...o})}ge.propTypes={domain:r.string.isRequired,domainStatus:r.shape({isHttps:r.bool}).isRequired,did:r.string.isRequired,onAdd:r.func,children:r.any};ge.defaultProps={onAdd:()=>{},children:null};var zn=ft;function Fn(n,t){for(var s=-1,o=n.length;++s<o&&zn(t,n[s],0)>-1;);return s}var Mn=Fn,Bn=ht,On=xt,Un=gt,Wn=yt,Hn=Mn,$e=jt,Vn=bt;function Qn(n,t,s){if(n=Vn(n),n&&(s||t===void 0))return On(n);if(!n||!(t=Bn(t)))return n;var o=$e(n),a=$e(t),l=Hn(o,a),i=Wn(o,a)+1;return Un(o,l,i).join("")}var Jn=Qn;const tt=ze(Jn),nt=S.createContext({}),{Provider:Kn,Consumer:Ps}=nt;function Gn({children:n}){const[t,s]=de({domain:"",error:null}),{locale:o}=R(),a={error:t.error,domain:t.domain,setError:l=>{s({error:l})},setDomain:l=>{const i=tt(l),c=Fe(i,o);s({domain:i,error:c})}};return e.jsx(Kn,{value:{value:a},children:n})}function Yn(){const{value:n}=S.useContext(nt);return n}const Ne=vt,Xn=Dt,st="z2qaGosS3rZ7m5ttP3Nd4V4qczR9TryTcRV4p",Zn=async n=>{var c;if(!n||!(n!=null&&n.trim()))return null;const t=new URL(n);t.pathname="__blocklet__.js",t.searchParams.set("type","json");const{data:s}=await Xn.get(t.toString()),o=(c=s==null?void 0:s.componentMountPoints)==null?void 0:c.find(d=>d.did===st),a=new URL(n);a.pathname=o==null?void 0:o.mountPoint;const l=a.toString(),i=Ne(l,"/api");return{base:l,api:i,domain:Ne(i,"/domains")}};var es={DID_DOMAIN_SERVICE_DID:st,getDidDomainServiceURL:Zn},G={exports:{}};const ts=Yt,ns=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"];class ot extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}}const ss=(n,t,s)=>{const o=s.retries-(t-1);return n.attemptNumber=t,n.retriesLeft=o,n},os=n=>ns.includes(n),it=(n,t)=>new Promise((s,o)=>{t={onFailedAttempt:()=>{},retries:10,...t};const a=ts.operation(t);a.attempt(async l=>{try{s(await n(l))}catch(i){if(!(i instanceof Error)){o(new TypeError(`Non-error was thrown: "${i}". You should only throw errors.`));return}if(i instanceof ot)a.stop(),o(i.originalError);else if(i instanceof TypeError&&!os(i.message))a.stop(),o(i);else{ss(i,l,t);try{await t.onFailedAttempt(i)}catch(c){o(c);return}a.retry(i)||o(a.mainError())}}})});G.exports=it;G.exports.default=it;G.exports.AbortError=ot;var is=G.exports;const rs=ze(is);function ye({domain:n,resolvedTarget:t,...s}){const{t:o,locale:a}=R();return e.jsxs(h,{sx:{backgroundColor:"rgb(236, 251, 253)",borderColor:"rgb(236, 251, 253)",borderRadius:"8px",padding:"12px"},...s,children:[e.jsxs(h,{display:"flex",children:[o("router.domain.setup.tipStart"),n&&e.jsx(h,{mx:.5,color:"primary.main",fontWeight:"fontWeightBold",children:n}),o("router.domain.setup.tipEnd"),":"]}),e.jsxs(h,{sx:{"&>div":{mb:0},marginTop:"8px"},children:[e.jsx(se,{label:o("router.domain.setup.recordType"),value:"CNAME",locale:a}),e.jsx(se,{label:o("router.domain.setup.recordValue"),value:t,locale:a})]})]})}ye.propTypes={domain:r.string,resolvedTarget:r.string.isRequired};ye.defaultProps={domain:""};function se({locale:n,label:t,value:s}){const o=ae(l=>l.breakpoints.down("md")),a=J();return e.jsx(Ke,{name:t,nameWidth:120,children:e.jsxs(h,{sx:{display:"flex",alignItems:"center",lineHeight:1},children:[e.jsx(I,{component:"span",color:"primary.main",overflow:"auto",sx:o?{maxWidth:"95%",wordWrap:"break-word"}:{wordWrap:"break-word"},children:s}),e.jsx(wt,{content:s,locale:n,style:{marginLeft:"4px",color:a.palette.text.secondary}})]})})}se.propTypes={locale:r.string.isRequired,label:r.string.isRequired,value:r.string.isRequired};function je({siteId:n,teamDid:t,cnameDomain:s,defaultCustomDomain:o,onInputDomain:a,appId:l,appPk:i,onSuccess:c,onError:d,disabled:p,autoFocus:u,inBlockletSetup:g,shouldCheckDomain:P,onStateChange:j,currentIp:C,resolveDomain:k,...E}){const{t:f,locale:v}=R(),{api:A,info:D}=U(),m=Yn(),_=J(),W=tn({key:"sm"}),[b,w]=de({submittingDomain:!1,domain:o,error:null,type:D!=null&&D.nftDomainUrl?"nftDomain":"inputDomain",showNFTDomainAuth:!1,showDnsTip:!1}),y=Ct(()=>es.getDidDomainServiceURL(D==null?void 0:D.nftDomainUrl));if(D!=null&&D.nftDomainUrl&&y.loading)return e.jsx(h,{...E,children:e.jsx(Ee,{relative:"parent",children:e.jsx(H,{})})});if(y.error)return e.jsx(h,{...E,children:e.jsx(Ee,{relative:"parent",children:y.error.message})});const L=y.value,rt=()=>{w({invalidDNSDomain:null})},Z=async x=>{j(f("setup.domain.addingDomain")),await A.addDomainAlias({input:{id:n,domainAlias:x,teamDid:t,inBlockletSetup:!0}}),w({submittingDomain:!1}),c({domain:x,type:"inputDomain"})},Se=async({domain:x,type:T,nftDid:M,chainHost:$})=>{try{if(!P){if(T==="inputDomain"){await Z(x);return}c({domain:x,type:T,nftDid:M,chainHost:$});return}j({text:f("setup.domain.checkingResolvable")});let q=30;const ee=3e3,ct=q*1e3/ee,Te=setInterval(()=>{if(q<=0){clearInterval(Te);return}j({text:`${f("setup.domain.checkingResolvable")} (${q--}s)`})},1e3),Ie=await rs(async()=>{const{data:z}=await k(x);if(!z.address)throw new Error("Cannot resolve domain");return z.address},{retries:ct,minTimeout:ee,maxTimeout:ee,onFailedAttempt:console.error}).catch(console.error);if(clearInterval(Te),!Ie){const z=f("setup.domain.cannotResolve",{domain:x});if(T==="nftDomain"){O.error(z),c({domain:x,type:"nftDomain"});return}j({text:""}),w({invalidDNSDomain:{domain:x,error:z},domain:x,type:T,submittingDomain:!1});return}if(Ie!==C){const z=f("setup.domain.resolvedAddressError",{domain:x,curDomain:window.location.hostname});if(T==="nftDomain"){O.error(z),c({domain:x,type:"nftDomain"});return}j({text:""}),w({invalidDNSDomain:{domain:x,error:z},domain:x,type:T,submittingDomain:!1});return}if(T==="nftDomain"){c({domain:x,type:"nftDomain"});return}await Z(x)}catch(q){O.error(q.message),j({text:""}),w({submittingDomain:!1})}},at=async({domain:x,nftDid:T,chainHost:M})=>{try{const $=Le(x);w({submittingDomain:!0}),await A.addDomainAlias({input:{id:n,type:"nft-domain",domainAlias:$,nftDid:T,chainHost:M,teamDid:t,inBlockletSetup:g}});const q="nftDomain";w({showNFTDomainAuth:!1,type:q}),await Se({domain:$,type:q,nftDid:T,chainHost:M})}catch($){O.error($.message)}finally{w({showNFTDomainAuth:!1,submittingDomain:!1})}},lt=async()=>{try{w({submittingDomain:!0});const x=Le(b.domain);if(D.nftDomainUrl&&L&&(await A.isDidDomain({input:{domain:x}})).value===!0){w({showNFTDomainAuth:!0});return}await Se({domain:x,type:b.type})}catch(x){w({submittingDomain:!1}),m.setError(x.message)}},Ae=m.error||b.error;return e.jsx(h,{...E,children:e.jsxs(h,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",gap:"1em"},children:[e.jsxs(h,{sx:{display:"flex",flexDirection:"column",gap:"8px"},children:[D.nftDomainUrl&&L&&e.jsxs(h,{sx:{color:_.palette.text.primary},children:[e.jsx(I,{children:f("router.domainAlias.addDomainNFT.tips")}),e.jsxs(I,{component:"div",children:[f("router.domainAlias.addDomainNFT.buyTip"),e.jsxs(St,{href:L.base,sx:{display:"inline-flex",alignItems:"center"},target:"_blank",children:[e.jsx("i",{children:f("router.domainAlias.addDomainNFT.buy")}),e.jsx(Xe,{fontSize:"small"})]})]})]}),e.jsx(Xt,{sx:{display:"block",marginTop:"8px"},label:f("router.domainAlias.add.domainDescription"),helperText:b.type==="inputDomain"&&Ae||f("router.domainAlias.add.helperText"),inputProps:{"data-cy":"domain-name-input"},fullWidth:!0,disabled:p,value:b.domain,size:"small",variant:"outlined",error:!!Ae&&b.type==="inputDomain",onChange:x=>{var $;const T=tt(($=x.target)==null?void 0:$.value);m.setDomain(T);const M=Fe(T,v);w({domain:T,error:M,type:"inputDomain"}),a({domain:T,error:M,type:"inputDomain"})},autoFocus:u,onBlur:()=>{m.domain||(w({error:null}),m.setError(null))}}),e.jsx(h,{sx:{width:"100%",display:"flex",justifyContent:"flex-end"},children:e.jsx(Zt,{"data-cy":"confirm-add-domain",fullWidth:W,variant:"contained",loading:b.submittingDomain,onClick:lt,children:f("common.add")})}),e.jsxs(h,{sx:{cursor:"pointer",fontSize:"14px",display:"flex",alignItems:"center",gap:"4px",lineHeight:1,color:_.palette.primary.main},onClick:()=>w({showDnsTip:!b.showDnsTip}),children:[e.jsx(Gt,{fontSize:"1em"}),f("router.domainAlias.showTipHint")]}),b.showDnsTip&&e.jsx(ye,{domain:b.domain,resolvedTarget:s,style:{marginTop:"4px"}})]}),b.invalidDNSDomain&&e.jsx(K,{title:f("common.reminder"),description:f("setup.domain.invalidDNSReminder",{error:b.invalidDNSDomain.error}),color:"primary",confirm:f("setup.domain.continueAdd"),onConfirm:()=>Z(b.invalidDNSDomain.domain,b.type),onCancel:rt}),L&&e.jsx(At,{open:b.showNFTDomainAuth,popup:!0,useSocket:!1,action:"authorize",baseUrl:L.api,checkFn:Tt.create({baseURL:L.api}).get,extraParams:{delegatee:l,delegateePk:i,domain:b.domain},onSuccess:at,onClose:()=>w({showNFTDomainAuth:!1,submittingDomain:!1}),checkTimeout:60*5e3,showDownload:!1,messages:{title:f("router.domainAlias.addDomainNFT.connect.title"),scan:f("router.domainAlias.addDomainNFT.connect.scan"),confirm:f("router.domainAlias.addDomainNFT.connect.confirm"),success:f("router.domainAlias.addDomainNFT.connect.success")}})]})})}je.propTypes={siteId:r.string.isRequired,currentIp:r.string,teamDid:r.string.isRequired,cnameDomain:r.string.isRequired,defaultCustomDomain:r.string,onInputDomain:r.func,onSuccess:r.func,appId:r.string,appPk:r.string,disabled:r.bool,autoFocus:r.bool,inBlockletSetup:r.bool,shouldCheckDomain:r.bool,onStateChange:r.func,resolveDomain:r.func,onError:r.func};je.defaultProps={defaultCustomDomain:"",currentIp:"",onInputDomain:Re,onSuccess:Re,appId:"",appPk:"",disabled:!1,autoFocus:!0,inBlockletSetup:!1,shouldCheckDomain:!1,onStateChange:()=>{},resolveDomain:()=>{},onError:()=>{}};function be({id:n,children:t,title:s,teamDid:o,systemDomains:a,appId:l,appPk:i}){const{t:c}=R(),[d,p]=de({loading:!1,confirmSetting:null}),u=a.find(C=>Me.isDidDomain(C)),g=()=>{p({loading:!1,confirmSetting:null})},P={title:s||c("router.domainAlias.add.title"),description:function(k,E,f){return e.jsx(je,{siteId:n,teamDid:o,cnameDomain:u,onSuccess:()=>p({confirmSetting:null}),onInputDomain:({domain:v,type:A,error:D})=>{E({...k,domain:v,type:A,__disableConfirm:!!D}),f(D)},appId:l,appPk:i})},confirm:c("common.confirm"),cancel:c("common.cancel"),params:{domain:"",__disableConfirm:!0},onCancel:g},j=C=>{C.stopPropagation(),p({confirmSetting:P})};return e.jsxs(e.Fragment,{children:[typeof t=="function"?t({loading:d.loading,open:j}):e.jsxs(Be,{onClick:j,className:"rule-action","data-cy":"action-add-domain-alias",children:[d.loading?e.jsx(H,{size:16}):e.jsx(Kt,{style:{fontSize:18,marginRight:5}}),c("router.domainAlias.add.title")]}),d.confirmSetting&&e.jsx(K,{title:d.confirmSetting.title,description:d.confirmSetting.description,confirm:d.confirmSetting.confirm,cancel:d.confirmSetting.cancel,params:d.confirmSetting.params,onCancel:d.confirmSetting.onCancel,showConfirm:!1,showCancel:!0,displayError:!1,color:"primary",loading:d.loading,maxWidth:"sm"})]})}be.propTypes={id:r.string.isRequired,children:r.any,title:r.string,teamDid:r.string,systemDomains:r.arrayOf(r.string).isRequired,appId:r.string,appPk:r.string.isRequired};be.defaultProps={children:null,title:"",teamDid:"",appId:null};function as(n){return e.jsx(Gn,{children:e.jsx(be,{...n})})}function ve(n){const{t}=R(),[s,o]=S.useState(!1),[a,l]=S.useState(null),{id:i,domain:c,children:d,teamDid:p}=n,{api:u}=U(),g=()=>{o(!1),l(null)},P=async()=>{o(!0);try{await u.deleteDomainAlias({input:{id:i,domainAlias:c,teamDid:p}}),await It(2e3)}catch(k){O.error(k.message)}finally{l(null),o(!1)}},j={title:t("router.domainAlias.delete.title"),description:t("router.domainAlias.delete.description"),confirm:t("common.confirm"),onConfirm:P,onCancel:g},C=k=>{k.stopPropagation(),l(j)};return e.jsxs(e.Fragment,{children:[typeof d=="function"?d({loading:s,open:C}):e.jsxs(V,{edge:"end",onClick:C,size:"small",className:"rule-action",color:"error","data-cy":"action-delete-domain-alias",children:[s?e.jsx(H,{size:16}):e.jsx(Ye,{style:{fontSize:16}}),t("router.domainAlias.delete.title")]}),a&&e.jsx(K,{title:a.title,description:a.description,confirm:a.confirm,params:a.params,onConfirm:a.onConfirm,onCancel:a.onCancel})]})}ve.propTypes={id:r.string.isRequired,domain:r.string.isRequired,children:r.any,teamDid:r.string};ve.defaultProps={children:null,teamDid:""};function De({site:n,domain:t,blocklet:s}){const{t:o}=R(),a=t.value===window.location.hostname;return e.jsx(en,{"data-cy":"domain-actions",size:"large",actions:[({close:l})=>{var i;return e.jsx(ve,{id:n.id,domain:t.value,teamDid:(i=s==null?void 0:s.meta)==null?void 0:i.did,children:({open:c})=>e.jsx(F,{title:a?o("blocklet.router.currentDomainTip"):"",children:e.jsx("span",{children:e.jsxs(Be,{disabled:t.isProtected||a,dense:!0,onClick:d=>{l(),c(d)},"data-cy":"action-toggle-block",children:[e.jsx(kt,{style:{minWidth:24,marginRight:8},children:e.jsx(Ye,{})}),e.jsx(Et,{primary:o("common.delete")})]},"remove")})})})}]})}De.propTypes={site:r.object.isRequired,domain:r.object.isRequired,blocklet:r.object.isRequired};De.defaultProps={};const Y=r.shape({href:r.string,accessibility:r.shape({loading:r.bool,accessible:r.bool}),domainStatus:r.shape({isHttps:r.bool,matchedCert:r.object}),dns:r.shape({resolved:r.bool,ip:r.string})});function we({certificate:n}){const[t,s]=S.useState(null),o=U(),{t:a,locale:l}=R(),i=p=>{s(p.currentTarget)},c=()=>{s(null)},d=!!t;return e.jsxs(e.Fragment,{children:[e.jsx(Ge,{"aria-owns":d?"mouse-over-popover":void 0,onMouseEnter:i,onMouseLeave:c,style:{color:"#44cdc6",fontSize:20,cursor:"pointer"}}),e.jsx(Oe,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:d,anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:c,disableRestoreFocus:!0,children:e.jsx(Ue,{children:e.jsxs(We,{style:{display:"flex"},children:[e.jsx("div",{children:e.jsx("img",{src:`${o.imgPrefix}/https-certificate-icon.png`,alt:"certificate icon",style:{maxHeight:"100%",maxWidth:"100%"}})}),e.jsxs(I,{component:"div",style:{marginLeft:"16px"},children:[e.jsx(I,{component:"div",style:{fontWeight:"bold"},children:n.domain}),e.jsx(I,{component:"div",children:`${a("common.issuer")}: ${Rt(n,"issuer.commonName","")}`}),e.jsx(I,{component:"div",children:`${a("router.cert.issuedOn")}: ${Pe(n.validFrom,l)}`}),e.jsx(I,{component:"div",children:`${a("router.cert.expiryOn")}: ${Pe(n.validTo,l)}`})]})]})})})]})}we.propTypes={certificate:r.object};we.defaultProps={certificate:{}};function Q({domain:n,filters:t}){const{t:s}=R(),{value:o,domainStatus:a}=n;if(!qe(o))return null;let l=null,i=null;const{isHttps:c,matchedCert:d}=a;if(!Pt(o)){const{dns:{resolved:u,ip:g}={}}=a;u||g==="127.0.0.1"?l=e.jsx(F,{title:s("router.domain.verify.ok"),children:e.jsx(_e,{color:"success"})}):l=e.jsx(F,{title:s("router.domain.verify.notResolved"),children:e.jsx(_e,{color:"error"})})}c?i=e.jsx(we,{certificate:d}):i=e.jsx(F,{title:s("router.domain.https.bad"),children:e.jsx(Ge,{style:{color:"#D0021B",fontSize:20,cursor:"pointer"}})});const p=t.map(u=>u==="domain"?l:u==="http"?i:null);return S.createElement(S.Fragment,null,...p)}Q.propTypes={domain:Y.isRequired,filters:r.array};Q.defaultProps={filters:["domain","http"]};const ls=He(X,"mutate_blocklets"),cs=He(X,"",_t);function Ce(n){const{inService:t}=U(),{blocklet:s,loadingRuntimeInfo:o}=me();let a=ls;return t&&(a=cs),e.jsx(a,{...n,blocklet:s,inService:t,loadingRuntimeInfo:o})}Ce.propTypes={listOnly:r.bool};Ce.defaultProps={listOnly:!1};function X({hasPermission:n,blocklet:t,loadingRuntimeInfo:s,inService:o,listOnly:a}){var f,v,A,D;const{t:l}=R(),[i,c]=S.useState(!1),d=ae(m=>m.breakpoints.down("md")),p=S.useMemo(()=>{let m=n;return Qe(t)&&(m=m&&o),m},[n,o,t]),{site:u}=t,g=S.useMemo(()=>{var m;return Lt((m=t.site)==null?void 0:m.domainAliases)},[(f=t.site)==null?void 0:f.domainAliases]),P=[],j=[],C=Nn.encode(t.appPid),k=(A=(v=t.environments)==null?void 0:v.find(m=>m.key==="BLOCKLET_APP_PK"))==null?void 0:A.value,E=$t(g);return g.forEach(m=>{const _=m.value||"";Me.isDidDomain(_)&&!_.startsWith(C)?j.push(m):P.push(m)}),e.jsxs(e.Fragment,{children:[!a&&e.jsxs(e.Fragment,{children:[e.jsxs(h,{className:"title first",display:"flex",justifyContent:"space-between",alignItems:"center",children:[e.jsx(h,{children:l("common.domain")}),p&&e.jsx(as,{id:u.id,title:l("router.domain.add.title"),teamDid:(D=t.meta)==null?void 0:D.did,appId:t.appPid,appPk:k,systemDomains:E==null?void 0:E.map(m=>m.value),children:({open:m})=>e.jsxs(V,{style:{marginLeft:16},variant:"contained",color:"primary","data-cy":"add-domain-alias",onClick:m,disabled:Nt(t.status),children:[e.jsx(Vt,{style:{fontSize:"1.3em",marginRight:4}}),l("common.add")]})})]}),qt(t.status)===!1&&e.jsx(h,{mt:1.5,mb:1.5,children:e.jsx(zt,{severity:"warning",children:l("blocklet.router.noRunning")})})]}),e.jsx(h,{sx:{display:"flex",flexDirection:"column",gap:1},children:(i?g:P).map(m=>{var W,b;const _=m.value;return e.jsxs(S.Fragment,{children:[d&&e.jsxs(h,{display:"flex",flexDirection:"column",children:[e.jsx(h,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:e.jsx(oe,{domain:m,target:"_blank",children:m.value})}),e.jsxs(h,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(h,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:1},children:[e.jsx(Q,{domain:m,filters:["domain"]},`${m.value}-domain`),e.jsx(re,{siteId:(W=t.site)==null?void 0:W.id,domain:m,blocklet:t,hasMutatePermission:p})]}),e.jsx(h,{sx:{button:{padding:0}},children:e.jsx(ie,{hasMutatePermission:p,site:u,domain:m,blocklet:t})})]})]},_),!d&&e.jsxs(h,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(h,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[e.jsx(Q,{domain:m,filters:["domain"]},`${m.value}-domain`),e.jsx(h,{sx:{ml:2,mr:.5},children:e.jsx(oe,{domain:m,target:"_blank",children:m.value})}),e.jsx(re,{siteId:(b=t.site)==null?void 0:b.id,domain:m,blocklet:t,hasMutatePermission:p})]}),e.jsx(h,{sx:{button:{padding:0}},children:e.jsx(ie,{hasMutatePermission:p,site:u,domain:m,blocklet:t})})]},_)]},_)})}),j.length>0&&e.jsx("div",{style:{marginLeft:"20px",marginTop:"12px"},children:e.jsx(V,{endIcon:i?e.jsx(fe,{}):e.jsx(Je,{}),onClick:()=>c(!i),children:l(i?"common.collapseAll":"blocklet.router.showAllDomains")})}),!g.length&&(s?e.jsx(H,{size:16}):e.jsx(Jt,{children:l("common.empty")}))]})}X.propTypes={hasPermission:r.bool,blocklet:r.object.isRequired,loadingRuntimeInfo:r.bool,inService:r.bool.isRequired,listOnly:r.bool};X.defaultProps={hasPermission:!1,loadingRuntimeInfo:!1,listOnly:!1};function oe({domain:n,children:t,...s}){const{t:o}=R(),{href:a,accessibility:l}=n;return!l||l.loading?e.jsxs(te,{...s,children:[t,e.jsx(F,{title:o("blocklet.router.checkUrlAccessible"),placement:"top-end",children:e.jsx("span",{className:"status",children:e.jsx(H,{size:12})})})]}):l.accessible?e.jsx(te,{...s,children:e.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",children:t})}):e.jsx(te,{...s,children:e.jsx(F,{title:o("blocklet.router.urlInaccessible"),placement:"top-end",children:e.jsx("span",{children:t})})})}oe.propTypes={domain:Y.isRequired,children:r.any.isRequired};const te=Ve.span`
|
|
2
|
-
&,
|
|
3
|
-
& > * {
|
|
4
|
-
color: #222;
|
|
5
|
-
font-size: 18px;
|
|
6
|
-
word-break: break-all;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.status {
|
|
10
|
-
margin-left: 8px;
|
|
11
|
-
}
|
|
12
|
-
`;function ie({hasMutatePermission:n,site:t,domain:s,blocklet:o}){const a=J(),{t:l}=R();return n&&!s.isProtected?e.jsx(De,{site:t,domain:s,blocklet:o}):e.jsx(F,{title:l("blocklet.router.domainLockTooltip"),placement:"top",children:e.jsx(Ft,{disabled:!0,size:"large",style:{pointerEvents:"auto",paddingTop:0,paddingBottom:0},children:e.jsx(Qt,{style:{fill:a.palette.text.disabled}})})})}ie.propTypes={hasMutatePermission:r.bool.isRequired,site:r.object.isRequired,domain:Y.isRequired,blocklet:r.object.isRequired};function re({siteId:n,domain:t,blocklet:s,hasMutatePermission:o}){const a=J(),{t:l}=R(),[i,c]=S.useState(null),d=u=>{c(u.currentTarget)},p=()=>{c(null)};return e.jsxs(h,{sx:{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:1},children:[t.type==="nft-domain"&&e.jsxs(e.Fragment,{children:[e.jsx(ne,{onMouseEnter:d,onMouseLeave:p,style:{cursor:"pointer",fill:a.palette.primary.main}}),e.jsx(Oe,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:!!i,anchorEl:i,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:p,disableRestoreFocus:!0,children:e.jsx(Ue,{children:e.jsxs(We,{style:{display:"flex",flexDirection:"column"},children:[e.jsxs(I,{component:"div",style:{display:"flex",alignItems:"center"},children:[e.jsx(ne,{style:{fill:a.palette.primary.main}}),e.jsx(I,{component:"span",style:{marginLeft:"8px",fontSize:"18px",fontWeight:"bolder"},children:l("router.domainAlias.nftDomain")})]}),e.jsxs(I,{component:"div",style:{display:"flex",marginTop:"12px"},children:[e.jsx(I,{component:"span",style:{width:"80px",marginRight:"8px"},children:l("common.domain")}),e.jsx(I,{component:"span",children:t.value})]}),e.jsxs(I,{component:"div",style:{display:"flex"},children:[e.jsx(I,{component:"span",style:{width:"80px",marginRight:"8px"},children:"NFT"}),e.jsx(B,{did:t.nftDid})]})]})})})]}),e.jsx(Q,{domain:t,filters:["http"]},`${t.value}-http`),o&&e.jsx(ge,{siteId:n,domain:t.value,domainStatus:t.domainStatus,did:s.meta.did,children:({open:u})=>e.jsx(V,{sx:{padding:0},size:"small",onClick:g=>u(g),children:l("router.cert.genLetsEncryptCert.title")})})]})}re.propTypes={siteId:r.string.isRequired,domain:Y.isRequired,blocklet:r.object.isRequired,hasMutatePermission:r.bool.isRequired};const ds={arcblock:"ArcBlock",ethereum:"Ethereum"};function ms(){var j,C,k,E,f;const{t:n,locale:t}=R(),{info:s,inService:o}=U(),[a,l]=S.useState(!1),{blocklet:i}=me(),{appDid:c,appPid:d,migratedFrom:p=[]}=i,u=(j=i.environments.find(v=>v.key==="BLOCKLET_APP_CHAIN_TYPE"))==null?void 0:j.value,g=[c?{name:n("blocklet.appId"),value:e.jsx(B,{did:c,showQrcode:!0})}:null,d?{name:n("blocklet.appPid"),value:e.jsx(B,{did:d,showQrcode:!0})}:null,(p==null?void 0:p.length)>1?{name:n("blocklet.alsoKnownAs"),value:e.jsxs("div",{children:[(a?p.slice(1):p.slice(1,2)).map(v=>e.jsx(B,{did:v.appDid,showQrcode:!0})),p.length>2&&e.jsx(V,{style:{marginLeft:"18px"},endIcon:a?e.jsx(fe,{}):e.jsx(Je,{}),onClick:()=>l(!a),children:n(a?"common.collapseAll":"blocklet.router.showAllDIDs")})]})}:null,{name:n("common.name"),value:Mt(i,!0)},{name:n("common.status"),value:e.jsx(Ht,{status:i.status,source:i.source,progress:i.progress})},Qe(i)?{name:"NFT",value:e.jsx(B,{external:!0,href:Bt((C=i==null?void 0:i.controller)==null?void 0:C.chainHost,(k=i==null?void 0:i.controller)==null?void 0:k.nftId,"asset"),did:(E=i==null?void 0:i.controller)==null?void 0:E.nftId,showQrcode:!0})}:null,{name:n("blocklet.installedAt"),value:Ot(i.installedAt,t)},{name:n("blocklet.overview.accessControl"),value:n(`team.whoCanAccess.${Ut(i)}.title`)},{name:n("common.owner"),value:(f=i.settings)!=null&&f.owner?e.jsx(B,{did:i.settings.owner.did,showQrcode:!0}):"-"},{name:n("blocklet.config.walletType.name"),value:ds[u||"arcblock"]||u},i.externalSkSource?{name:n("blocklet.skSource"),value:i.externalSkSource}:null].filter(Boolean);o&&g.push({name:n("common.serverDid"),value:e.jsx(B,{did:s.did,showQrcode:!0})},{name:n("common.serverVersion"),value:e.jsx(Wt,{children:s.version})});const P=v=>v.map(A=>e.jsx(Ke,{style:{display:"flex",alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:A.name,nameFormatter:()=>A.name,children:A.value},A.name));return e.jsxs(us,{component:"div",children:[e.jsx(Ce,{}),e.jsx("div",{className:"title",children:e.jsx("span",{children:n("common.basicInfo")})}),e.jsx("div",{className:"basicInfo",children:P(g)})]})}ms.propTypes={};const us=Ve(I)`
|
|
13
|
-
.title {
|
|
14
|
-
font-size: 1.2rem;
|
|
15
|
-
font-weight: bold;
|
|
16
|
-
margin-top: ${n=>n.theme.spacing(5)};
|
|
17
|
-
margin-bottom: ${n=>n.theme.spacing(3)};
|
|
18
|
-
|
|
19
|
-
&.first {
|
|
20
|
-
margin-top: 0;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
`;export{ms as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,G as y,P as s,n as g,m as p,q as k,r as x,bo as v,M as b,Q as u,l as B,p as R,o as U}from"./index-Boqyvc8Q.js";import{D as L}from"./index-CtWm5SK6.js";import{u as M}from"./team-rrZYIohT.js";import{C,M as P}from"./memory-Cu-5WL0k.js";import{B as D}from"./bundle-avatar-DzcvR6DI.js";import"./FilterList-DKFhXHd2.js";import"./Select-CPvSg7uW.js";import"./Delete-h8Ye2r4b.js";import"./InputLabel-BjbeXM2B.js";import"./TextField-sj2mcEXD.js";import"./LastPage-DXu9ZGZF.js";import"./index-_NTV4-zc.js";import"./redux-07bmubSg.js";import"./Search-5iZBDNjz.js";import"./index-BXmzbebA.js";import"./MoreVert-BCR8irtL.js";import"./chart-CQeRS3mZ.js";function h({blocklet:r,cpuHistory:i,memoryHistory:n,...m}){const l=r.appRuntimeInfo||{};return e.jsx(H,{component:"div",...m,children:e.jsxs(y,{className:"page-metrics",container:!0,spacing:5,children:[e.jsx(y,{item:!0,lg:4,md:6,sm:6,xs:12,children:!!i.length&&e.jsx(C,{currentLoad:l.cpuUsage||0,history:i,style:{height:150}})},"cpu"),e.jsx(y,{item:!0,lg:4,md:6,sm:6,xs:12,children:!!n.length&&e.jsx(P,{used:l.memoryUsage||0,history:n,style:{height:150}})},"memory")]})})}h.propTypes={blocklet:s.object.isRequired,cpuHistory:s.arrayOf(s.shape({date:s.number,value:s.number})),memoryHistory:s.arrayOf(s.shape({date:s.number,value:s.number}))};h.defaultProps={cpuHistory:[],memoryHistory:[]};const H=g(p)``;function N(){const{t:r,locale:i}=k(),{blocklet:n,runtimeHistory:m,actions:{refreshBlocklet:l}}=M(),a=x.useMemo(()=>{const t=[];return v(n,(o,{ancestors:f,id:d,level:c})=>{o.runtimeInfo&&t.push({type:"blocklet",groupId:n.meta.did,groupName:b(n),id:d,name:b(o,!0),blocklet:n,component:o,level:c-1>=0?c-1:0,runtimeInfo:o.runtimeInfo,ancestors:f})}),t},[n]);x.useEffect(()=>{const t=setInterval(()=>{l()},1e4);return()=>{clearInterval(t)}},[]);const I=t=>R(Number(t||0),{locale:U(i)}),j=[{label:r("common.name"),name:"name",options:{customBodyRenderLite(t){const{name:o,component:f,level:d,ancestors:c}=a[t];return e.jsxs(u,{display:"flex",alignItems:"center",pl:d*2,children:[e.jsx(D,{size:14,blocklet:f,ancestors:c}),e.jsx(u,{ml:1,children:o})]})}}},{label:r("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(t){const{runtimeInfo:o}=a[t];return I(o.uptime)}}},{label:r("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(t){const{runtimeInfo:o}=a[t];return B((o==null?void 0:o.memoryUsage)||0)}}},{label:r("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(t){const{runtimeInfo:o}=a[t];return`${(o.cpuUsage||0).toFixed(1)}%`}}},{label:r("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid"},{label:r("blocklet.runtimeInfo.port"),name:"runtimeInfo.port"}];return e.jsxs(T,{component:"div",children:[e.jsx(p,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:2,children:r("analytics.trend")}),n.status==="running"?[e.jsx(u,{children:e.jsx(h,{blocklet:n,cpuHistory:m.cpu,memoryHistory:m.memory})}),e.jsx(u,{mt:3,children:e.jsx(L,{title:r("analytics.detail"),className:"monitor-table",locale:i,data:a,columns:j,options:{search:!1,download:!1,filter:!1,print:!1,viewColumns:!1,pagination:!1,rowsPerPage:100}})})]:e.jsx(p,{children:r("blocklet.runtimeInfo.noRunning")})]})}N.propTypes={};const T=g(p)``;export{N as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as m,f as s,bt as a,j as o,P as l}from"./index-Boqyvc8Q.js";import{T as c,M as n,t as u}from"./table-icons-CB9vK-gH.js";import"./FilterList-DKFhXHd2.js";import"./Select-CPvSg7uW.js";import"./Delete-h8Ye2r4b.js";import"./InputLabel-BjbeXM2B.js";import"./TextField-sj2mcEXD.js";import"./LastPage-DXu9ZGZF.js";import"./slicedToArray-BwJA6b7k.js";import"./Search-5iZBDNjz.js";import"./actions-ByUCXaaH.js";import"./useLocalStorage-BNvbpN9F.js";import"./MoreVert-BCR8irtL.js";import"./ButtonGroup-CKY0O7tT.js";import"./getValidReactChildren-B_HEoXEd.js";import"./url-evaluation-DymLev_N.js";import"./tag-CANB-Fll.js";import"./ChevronLeft-DRzRLgnp.js";import"./Edit-B1ySEana.js";import"./ChevronRight-B2YICLYm.js";import"./DeleteOutline-ClZ-ABF-.js";import"./redux-07bmubSg.js";import"./Skeleton-B4-1c0OT.js";import"./InputAdornment-DHLm1mFN.js";import"./index-zUZPbg2I.js";import"./memoize-one.esm-BdPwpGay.js";import"./Add-DOwN6I9N.js";import"./ArrowDropDown-CEsdzzcK.js";function d({blocklet:i,...r}){const{t}=m.useContext(s),e=a(i);if(e.length===0)return o.jsx("div",{children:t("blocklet.noService")});const p=[{title:t("common.name"),field:"name"},{title:t("common.protocol"),field:"protocol"},{title:t("common.port"),field:"port"},{title:t("blocklet.upstreamPort"),field:"upstreamPort"}];return o.jsx(c,{...r,children:o.jsx(n,{columns:p,icons:{...u},options:{sorting:!1,emptyRowsWhenPaging:!1,actionsColumnIndex:-1,tableLayout:"auto",maxBodyHeight:"100%",search:!1,pageSize:1e3,pageSizeOptions:[1e3]},localization:{body:{emptyDataSourceMessage:t("blocklet.noService")}},data:e})})}d.propTypes={blocklet:l.object.isRequired};export{d as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as d,b7 as i,bR as s,a0 as l}from"./index-Boqyvc8Q.js";import{a as n}from"./api-BdOqJGVs.js";function S(a){const t=a.replace(/\/api\/space\/.+/,""),r=a.replace(/\/$/,"").split("/"),e=r.at(-4),c=r.at(-2);return s(t,"space",e,"apps",c,`explorer?key=/apps/${c}/.did-objects/${c}/`)}function U(a){const t=a.replace(/\/api\/space\/.+/,""),e=a.replace(/\/$/,"").split("/").at(-4);return s(t,"space",e)}function m(a){return a.replace(/\/$/,"").split("/").at(-4)}async function P(a){try{if(!i(a))return!1;const{headers:t}=await n.head(a,{timeout:5e3});return t["x-listable"]==="true"&&t["x-readable"]==="true"&&t["x-writeable"]==="true"}catch(t){return console.error(t),!1}}function C(a){var t;return((t=a==null?void 0:a.find(r=>r.key===d.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT))==null?void 0:t.value)||""}function y(a){return a==null?void 0:a.replace(/\/api\/space\/.+/,"")}function h(a){const t=new URL(a);return s(t.origin,t.pathname)}async function A(a){try{if(!i(a))return!1;const t=h(a),r=s(t,"space/api/did/one-click-authorization/token"),{status:e,data:c}=await n.get(r,{timeout:5e3});return e===200&&l.isObject(c)}catch(t){return console.error(t),!1}}async function D(a,{timeout:t}={timeout:3e3}){try{if(!i(a))return"";const{headers:r}=await n.head(a,{timeout:t}),e=r["x-space-name"];return e?decodeURIComponent(e):""}catch(r){return console.error(r),""}}function L(a){const t=a.replace(/\/api\/space\/.+/,""),e=a.replace(/\/$/,"").split("/").at(-4);return s(t,`/api/space/nft/display?spaceDid=${e}`)}const _=a=>{var t,r;return((r=(t=a==null?void 0:a.configs)==null?void 0:t.find(e=>e.key===d.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT))==null?void 0:r.value)||null};async function x(a){const t={};return t.did=m(a),t.name=await D(a),t.url=y(a),t.endpoint=a,t}async function B(a,t={timeout:3e4,withSearchParams:!0}){var u;if(!l.isString(a))throw new Error(`url(${a}) must be a string`);const r=a.startsWith("http")?a:`https://${a}`,e=new URL(r),{data:c}=await n.get(s(e.origin,"/__blocklet__.js?type=json"),{timeout:t.timeout}),o=(u=c.componentMountPoints.findLast(f=>f.did==="z8iZnaYxnkMD5AKRjTKiCb8pQr1ut8UantAcf"))==null?void 0:u.mountPoint;if(!o)throw new Error(`MountPoint(${o}) not found`);const p=s(e.origin,o);return t.withSearchParams&&e.searchParams.get("spaceDid")?s(p,`?spaceDid=${e.searchParams.get("spaceDid")}`):p}export{D as a,C as b,_ as c,x as d,L as e,m as f,B as g,h,A as i,U as j,S as k,P as l};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as c,ca as Ce,cb as me,a2 as Ie,F as fe,aK as de,cd as ie,b as P,ce as Te,cf as Be,cg as ue,bP as we,bQ as Le,ch as ce,A as H,u as ge,ci as Ue,j as pe,P as K,aI as Ne,q as he,a as Q,ab as Ae,M as De}from"./index-Boqyvc8Q.js";const ve=c.createContext({});function Ze(){return c.useContext(ve)}const z=c.createContext({});function be(){return c.useContext(z)}const Oe=Ce(e=>{const{origin:n,hostname:s}=new URL(e);return s===window.location.hostname?!0:me(Ie(n,fe.WELLKNOWN_PING_PREFIX))}),D={};function xe({urls:e,checkAccessible:n=me,disableCache:s=!1}){const i=c.useRef(e.filter(v=>D[v]).map(v=>D[v])),u=i.current.length===e.length,[o,p]=c.useState(u?i.current:[]),[l,S]=c.useState(!u),h=c.useMemo(()=>!l&&o.length?o[0]:null,[o,l]);return c.useEffect(()=>{(e==null?void 0:e.length)>0&&!u&&(async()=>{let E;S(!0),s?(E=await ie.evaluateURLs(e,{checkAccessible:n}),E.forEach(C=>{D[C.url]=C})):((await ie.evaluateURLs(e.filter(y=>!D[y]),{checkAccessible:n})).forEach(y=>{D[y.url]=y}),E=e.map(y=>D[y]).sort((y,T)=>T.score-y.score)),p(E),S(!1)})()},[e,s,u]),{urlsState:o,loading:l,recommendedUrlState:h,recommendedUrl:h==null?void 0:h.url}}function _e(e){var p;const n=c.useMemo(()=>e.map(l=>de(l)),[e]),{urlsState:s,loading:i,recommendedUrl:u}=xe({urls:n,checkAccessible:Oe});let o;if(i)o={domainsAccessibility:e.reduce((l,S)=>({...l,[S]:{loading:!0}}),{}),recommendedDomain:null};else{const l=s.reduce((h,v)=>{const E=new URL(v.url).hostname;return h[E]={...v,domain:E},h},{}),S=((p=s.find(h=>h.accessible))==null?void 0:p.url)||u;o={domainsAccessibility:l,recommendedDomain:S?new URL(S).hostname:null}}return o}const Fe=(e,n)=>{const s=typeof n!="number"?Number(n):n;if(Number.isNaN(s)||s<=0)return 0;const i=Math.floor(e/s*100);return Math.min(Math.max(i,0),100)},O="ttl-";function He(e,n,s=0){if(n==null){localStorage.removeItem(O+e);return}const i={value:n,expiry:Date.now()+s};localStorage.setItem(O+e,JSON.stringify(i))}function Ke(e){ye();const n=localStorage.getItem(O+e);if(!n)return null;const s=JSON.parse(n);return Date.now()>s.expiry?(localStorage.removeItem(O+e),null):s.value}function Ee(e){localStorage.removeItem(O+e)}let X=null;function ye(e=!1){const n=Date.now();if(!(!e&&X&&n-X<60*1e3*5)){X=n;for(let s=0;s<localStorage.length;s++){const i=localStorage.key(s);if(i.startsWith(O)){const u=localStorage.getItem(i);if(u){let o;try{o=JSON.parse(u)}catch{continue}n>o.expiry&&localStorage.removeItem(i)}}}}}ye();const M=e=>`blocklet-status-${e}`,Me={installed:1,starting:1,running:1,stopped:1,upgrading:1,restarting:1,deleting:1};function le(e){if(e){const n=e.children||[];let s=!1;n.forEach(i=>{var u,o;if(i.status==="downloading"){const p=Ke(M((u=i.meta)==null?void 0:u.bundleDid));i.status=p||i.status,p==="extracting"&&(s=!0)}else Me[e.status]&&Ee(M((o=i.meta)==null?void 0:o.bundleDid))}),s&&(e.status="extracting")}}function je({did:e,client:n,useSubscription:s,getIP:i,useLocaleContext:u,disableSubscription:o,getOptionalComponents:p=!1}){var V,Z,b,ee,te,se,ne,re,oe;const{t:l,locale:S}=u(),[h,v]=c.useState(null),[E,C]=c.useState(!1),[y,T]=c.useState(!1),[r,w]=c.useState(),[j,k]=c.useState({cpu:[],memory:[]}),[W,x]=c.useState({}),A=(Z=(V=r==null?void 0:r.site)==null?void 0:V.domainAliases)!=null&&Z.length?JSON.stringify(r.site.domainAliases.map(t=>t.value)):"",q=c.useMemo(()=>{var t;return(((t=r==null?void 0:r.site)==null?void 0:t.domainAliases)||[]).map(a=>a.value)},[A]),{domainsAccessibility:$,recommendedDomain:J}=_e(q),_=async()=>{T(!0);try{const{blocklet:t}=await n.getBlocklet({input:{did:e,attachRuntimeInfo:!0,getOptionalComponents:p}});await ce(t,{getIP:i}),le(t),w(t)}catch(t){H.error(t.message)}finally{T(!1)}},G=async()=>{try{const t=await n.getBlockletRuntimeHistory({input:{did:e,hours:6}});t&&k({cpu:t.history.map(a=>({date:a.date,value:a.cpu})),memory:t.history.map(a=>({date:a.date,value:a.mem}))})}catch(t){H.error(t.message)}},f=async({showError:t=!0,attachRuntimeInfo:a=!0}={})=>{if(!E)try{C(!0),v(null);const{blocklet:R}=await n.getBlocklet({input:{did:e,getOptionalComponents:p}});if(R)w(g=>(ce(R,{fixRuntime:"merge-old",oldBlocklet:g}),le(R),R)),C(!1),a&&(_(),G());else throw new Error(l("blocklet.notFound"))}catch(R){C(!1),v(R),t&&H.error(R.message)}},m=t=>{var a;((a=t==null?void 0:t.meta)==null?void 0:a.did)===r.meta.did&&f({showError:!1})},d=t=>{var a;((a=t==null?void 0:t.meta)==null?void 0:a.did)===r.meta.did&&f({attachRuntimeInfo:!1,showError:!1})},F=t=>{var a,R;!t||((a=t.meta)==null?void 0:a.did)!==((R=r==null?void 0:r.meta)==null?void 0:R.did)||(t.status==="extracting"&&w(g=>{if(!g)return g;const L=g.children||[];return L.forEach(B=>{var I,U,N;((I=B.meta)==null?void 0:I.bundleDid)===((U=t.component)==null?void 0:U.did)&&(He(M((N=B.meta)==null?void 0:N.bundleDid),t.status,1e3*60*5),B.status=t.status)}),{...g,children:L,status:t.status}}),t.status==="downloading"&&t.total&&w(g=>{if(!g)return g;const L=g.children||[];let B=g.progress||0;return L.forEach(I=>{var U,N,ae;((U=I.meta)==null?void 0:U.bundleDid)===((N=t.component)==null?void 0:N.did)&&(I.progress=Fe(t.current,t.total),I.status=t.status,I.progress>B&&(B=I.progress),Ee(M((ae=I.meta)==null?void 0:ae.bundleDid)))}),{...g,children:L,progress:B}}))},Y=()=>{e&&A&&n.checkDomains({input:{did:e}}).catch(t=>{console.error(t)})},Se=async t=>{const{blocklet:a}=await n.configNavigations({input:{did:e,navigations:t}});w(a)};c.useEffect(()=>{A&&!o&&Y()},[A,o]),s(P.BlockletEvents.domainStatus,t=>{x(a=>({...a,[t.domain]:{...a[t.domain],...t}}))},[(b=r==null?void 0:r.meta)==null?void 0:b.did,!o]),s(P.BlockletEvents.statusChange,t=>{var a;((a=t==null?void 0:t.meta)==null?void 0:a.did)===r.meta.did&&(w(R=>{const g={...R};return g.status=P.fromBlockletStatus(t.status),(g.children||[]).forEach(L=>{const B=t.children.find(I=>{var U,N;return((U=I.meta)==null?void 0:U.did)===((N=L.meta)==null?void 0:N.did)});B&&(L.status=P.fromBlockletStatus(B.status))}),g}),d(t))},[(ee=r==null?void 0:r.meta)==null?void 0:ee.did,!o]),s(P.BlockletEvents.storeChange,d,[(te=r==null?void 0:r.meta)==null?void 0:te.did,!o]),s(P.BlockletEvents.installed,m,[(se=r==null?void 0:r.meta)==null?void 0:se.did,!o]),s(P.BlockletEvents.upgraded,m,[(ne=r==null?void 0:r.meta)==null?void 0:ne.did,!o]),s(P.BlockletEvents.updated,m,[(re=r==null?void 0:r.meta)==null?void 0:re.did,!o]),s(P.BlockletEvents.downloadBundleProgress,F,[(oe=r==null?void 0:r.meta)==null?void 0:oe.did,!o]);const Pe=r?Te(r,{site:{domainAliases:r.site.domainAliases.map(t=>{const a=t.value,R=Be(a);return t.domainStatus=ue(W[R],["domain","meta"]),t.accessibility=ue($[a],["domain"]),t.href=we({blocklet:r,domain:t,params:Le(r,S)}),t})}}):null;return{loading:E,loadingRuntimeInfo:y,error:h,blocklet:Pe,runtimeHistory:j,recommendedDomain:J||"",actions:{refreshBlocklet:f,refreshDomainStatus:Y,setBlocklet:w,configNavigations:Se}}}const{Provider:ke,Consumer:et}=z;function We({did:e,children:n}){const{api:s,ws:{useSubscription:i}}=ge(),{loading:u,loadingRuntimeInfo:o,error:p,blocklet:l,recommendedDomain:S,runtimeHistory:h,actions:{refreshBlocklet:v,refreshDomainStatus:E,setBlocklet:C,configNavigations:y}}=je({did:e,client:s,useSubscription:i,getIP:Ne,useLocaleContext:he,getOptionalComponents:!0});c.useEffect(()=>{v()},[e]);const T={did:e,client:s,loading:u,loadingRuntimeInfo:o,error:p,blocklet:l,recommendedDomain:S,runtimeHistory:h,appIdList:l?Ue(l):[],actions:{refreshBlocklet:v,refreshDomainStatus:E,setBlocklet:C,configNavigations:y}};return pe.jsx(ke,{value:T,children:n})}We.propTypes={did:K.string.isRequired,children:K.any.isRequired};function qe(){return c.useContext(z)}const{Provider:$e,Consumer:tt}=ve,Je=(e,n,s)=>e===n.did?n.name:s?De(s):"",Ge=(e,n,s)=>{if(s){const i=s.environments.find(u=>u.key===P.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR);return i?i.value:"auto"}return"default"},Qe=(e,n,s)=>e===n.did?n.trustedPassports||[]:s?s.trustedPassports||[]:[],Xe=(e,n,s)=>e===n.did?n.trustedFactories||[]:s?s.trustedFactories||[]:[],ze=(e,n,s)=>e===n.did?e:s&&((s.environments||[]).find(u=>u.key==="BLOCKLET_APP_ID")||{}).value||"",Ye=(e,n,s)=>e===n.did?n.enablePassportIssuance!==!1:s?s.enablePassportIssuance!==!1:!0;function Re({teamDid:e,children:n}){const{t:s,locale:i}=he(),{api:u,info:o}=ge(),{recommendedDomain:p,blocklet:l}=qe()||{},[S,h]=c.useState([]),[v,E]=c.useState([]),[C,y]=c.useState([]),T=Je(e,o,l),r=Ge(e,o,l),w=Qe(e,o,l),j=Xe(e,o,l),k=ze(e,o,l),W=Ye(e,o,l),x=async f=>{try{const m=await u.doBatchQuery({getRoles:{input:{teamDid:f}},getPermissions:{input:{teamDid:f}},getInvitations:{input:{teamDid:f}}});E((m.getRoles.roles||[]).filter(d=>!fe.RBAC_CONFIG.roles.some(F=>F.name===d.name&&(!F.passport||F.noHuman))).map(d=>(d.hasDescription=!!d.description,d.hasDescription||(d.description=s("team.passport.description",{teamName:T,title:d.title})),d))),y(m.getPermissions.permissions||[]),h(m.getInvitations.invitations||[])}catch(m){H.error(m.message)}},A=({did:f}={})=>{const m={teamDid:e,user:{did:f}};return u.getUser({input:m})},q=({query:f,paging:m}={})=>{const d={teamDid:e};return m&&(d.paging=m),f&&(d.query=f),d.sort={lastLoginAt:-1},u.getUsers({input:d})},$=()=>u.getUsersCountPerRole({input:{teamDid:e}}),J=()=>x(e);c.useEffect(()=>{x(e)},[e]),c.useEffect(()=>{E(f=>f.map(m=>(m.hasDescription||(m.description=s("team.passport.description",{teamName:T,title:m.title})),{...m})))},[s,i]);const _=f=>{f.teamDid===e&&x(e)};Q(P.TeamEvents.userAdded,_,[e]),Q(P.TeamEvents.userRemoved,_,[e]),Q(P.TeamEvents.userUpdated,_,[e]);const G={teamDid:e,teamIssuerDid:k,teamName:T,invitations:S,roles:v,permissions:C,trustedPassports:w,trustedFactories:j,isNodeTeam:e===o.did,enablePassportIssuance:W,refresh:J,passportColor:r,endpoint:e===o.did?Ae(o):de(p),blocklet:l,api:{getUser:A,getUsers:q,getUsersCountPerRole:$}};return pe.jsx($e,{value:G,children:n})}Re.propTypes={teamDid:K.string.isRequired,children:K.object.isRequired};Re.defaultProps={};export{We as B,Re as T,qe as a,Ze as b,be as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as e,dz as n,bE as o,Y as a}from"./index-Boqyvc8Q.js";var s=n,p=o;function i(t,r){return t&&t.length?p(t,s(r)):[]}var u=i;const _=e(u);var U=a;function b(t){return U(t).toUpperCase()}var g=b;const c=e(g);export{c as t,_ as u};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{bS as G,j as p,bT as z,c2 as M,bV as C,r,bY as F,bZ as N,c3 as X,c4 as U,c5 as Z,b_ as Q,bX as L,c6 as Y,c0 as _,c1 as T,c7 as J,c8 as ee,c9 as oe,n as se,P as b,f as A,bK as te,az as ne,C as ae,ca as re,cb as D,a2 as ce,F as ie,cc as le,bQ as ue,cd as P,aK as de}from"./index-Boqyvc8Q.js";import{F as pe}from"./Delete-h8Ye2r4b.js";import{W as ge}from"./tag-CANB-Fll.js";const fe=G(p.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),me=G(p.jsx("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked"),he=z("span",{shouldForwardProp:M})({position:"relative",display:"flex"}),Re=z(fe)({transform:"scale(1)"}),ye=z(me)(({theme:e,ownerState:o})=>C({left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest})},o.checked&&{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}));function V(e){const{checked:o=!1,classes:s={},fontSize:n}=e,t=C({},e,{checked:o});return p.jsxs(he,{className:s.root,ownerState:t,children:[p.jsx(Re,{fontSize:n,className:s.background,ownerState:t}),p.jsx(ye,{fontSize:n,className:s.dot,ownerState:t})]})}const Ce=r.createContext(void 0),O=Ce;function ve(){return r.useContext(O)}function we(e){return N("MuiRadio",e)}const $=F("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),xe=["checked","checkedIcon","color","icon","name","onChange","size","className"],be=e=>{const{classes:o,color:s,size:n}=e,t={root:["root",`color${U(s)}`,n!=="medium"&&`size${U(n)}`]};return C({},o,T(t,we,o))},ke=z(X,{shouldForwardProp:e=>M(e)||e==="classes",name:"MuiRadio",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:s}=e;return[o.root,s.size!=="medium"&&o[`size${U(s.size)}`],o[`color${U(s.color)}`]]}})(({theme:e,ownerState:o})=>C({color:(e.vars||e).palette.text.secondary},!o.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${o.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Z(o.color==="default"?e.palette.action.active:e.palette[o.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},o.color!=="default"&&{[`&.${$.checked}`]:{color:(e.vars||e).palette[o.color].main}},{[`&.${$.disabled}`]:{color:(e.vars||e).palette.action.disabled}}));function Ue(e,o){return typeof o=="object"&&o!==null?e===o:String(e)===String(o)}const j=p.jsx(V,{checked:!0}),I=p.jsx(V,{}),ze=r.forwardRef(function(o,s){var n,t;const a=Q({props:o,name:"MuiRadio"}),{checked:h,checkedIcon:l=j,color:u="primary",icon:d=I,name:c,onChange:i,size:R="medium",className:g}=a,v=L(a,xe),k=C({},a,{color:u,size:R}),x=be(k),y=ve();let m=h;const H=Y(i,y&&y.onChange);let S=c;return y&&(typeof m>"u"&&(m=Ue(y.value,a.value)),typeof S>"u"&&(S=y.name)),p.jsx(ke,C({type:"radio",icon:r.cloneElement(d,{fontSize:(n=I.props.fontSize)!=null?n:R}),checkedIcon:r.cloneElement(l,{fontSize:(t=j.props.fontSize)!=null?t:R}),ownerState:k,classes:x,name:S,checked:m,onChange:H,ref:s,className:_(x.root,g)},v))}),Me=ze;function Se(e){return N("MuiRadioGroup",e)}F("MuiRadioGroup",["root","row","error"]);const Pe=["actions","children","className","defaultValue","name","onChange","value"],$e=e=>{const{classes:o,row:s,error:n}=e;return T({root:["root",s&&"row",n&&"error"]},Se,o)},je=r.forwardRef(function(o,s){const{actions:n,children:t,className:a,defaultValue:h,name:l,onChange:u,value:d}=o,c=L(o,Pe),i=r.useRef(null),R=$e(o),[g,v]=J({controlled:d,default:h,name:"RadioGroup"});r.useImperativeHandle(n,()=>({focus:()=>{let m=i.current.querySelector("input:not(:disabled):checked");m||(m=i.current.querySelector("input:not(:disabled)")),m&&m.focus()}}),[]);const k=ee(s,i),x=oe(l),y=r.useMemo(()=>({name:x,onChange(m){v(m.target.value),u&&u(m,m.target.value)},value:g}),[x,u,v,g]);return p.jsx(O.Provider,{value:y,children:p.jsx(pe,C({role:"radiogroup",ref:k,className:_(R.root,a)},c,{children:t}))})}),Fe=je,B={success:"#3ab39d",error:"#D0021B"},E="10px",Ie=se.div`
|
|
2
|
-
display: inline-block;
|
|
3
|
-
min-width: ${e=>e.size||E};
|
|
4
|
-
min-height: ${e=>e.size||E};
|
|
5
|
-
background: ${e=>B[e.color]||e.color||B.success};
|
|
6
|
-
border-radius: 100%;
|
|
7
|
-
`,f={yellow:"#FFCF71",grey:"#888888"};function W({isResource:e,status:o,variant:s,source:n,progress:t,...a}){const{t:h}=r.useContext(A),l={added:"primary",waiting:"warning",downloading:"warning",extracting:"warning",downloaded:"primary",installing:"warning",installed:"primary",starting:"warning",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"warning",restarting:"warning",corrupted:"error",deleting:"warning",resource:"primary"},u={added:f.grey,waiting:f.yellow,downloading:f.yellow,extracting:f.yellow,downloaded:f.grey,installing:f.yellow,installed:f.grey,starting:f.yellow,running:"success",stopping:f.yellow,stopped:f.grey,error:"error",upgrading:f.yellow,restarting:f.yellow,corrupted:"error",deleting:f.yellow,resource:"primary"},d=te(o),c=e&&o==="stopped"?"resource":o,i=h(`blocklet.status.${c}`);return s==="dot"?p.jsx(ne,{title:h("blocklet.statusTip",{status:i}),children:p.jsx(Ie,{color:u[c],...a})}):p.jsxs(ge,{type:l[c],...a,children:[d&&p.jsx(ae,{size:12,color:"inherit",style:{marginRight:5}}),i,c==="downloading"&&t?p.jsx("div",{style:{marginLeft:5},children:`${t} %`}):null]})}W.propTypes={status:b.string.isRequired,variant:b.oneOf(["dot","tag"]),source:b.string,progress:b.number,isResource:b.bool};W.defaultProps={isResource:!1,variant:"tag",source:"",progress:0};const q=re(e=>D(ce(new URL(e).origin,ie.WELLKNOWN_PING_PREFIX))),w={};function K({urls:e,checkAccessible:o=D,disableCache:s=!1}){const n=r.useRef(e.filter(c=>w[c]).map(c=>w[c])),t=n.current.length===e.length,[a,h]=r.useState(t?n.current:[]),[l,u]=r.useState(!t),d=r.useMemo(()=>!l&&a.length?a[0]:null,[a,l]);return r.useEffect(()=>{(e==null?void 0:e.length)>0&&!t&&(async()=>{let i;u(!0),s?(i=await P.evaluateURLs(e,{checkAccessible:o}),i.forEach(R=>{w[R.url]=R})):((await P.evaluateURLs(e.filter(g=>!w[g]),{checkAccessible:o})).forEach(g=>{w[g.url]=g}),i=e.map(g=>w[g]).sort((g,v)=>v.score-g.score)),h(i),u(!1)})()},[e,s,t]),{urlsState:a,loading:l,recommendedUrlState:d,recommendedUrl:d==null?void 0:d.url}}function Ne(e){const{locale:o}=r.useContext(A),s=r.useMemo(()=>e?le({blocklet:e,params:ue(e,o)}):[],[e,o]),{loading:n,recommendedUrlState:t,recommendedUrl:a}=K({urls:s,checkAccessible:q});return{urls:s,loading:n,recommendedUrlState:t,recommendedUrl:a}}function Le(e){var h;const o=r.useMemo(()=>e.map(l=>de(l)),[e]),{urlsState:s,loading:n,recommendedUrl:t}=K({urls:o,checkAccessible:q});let a;if(n)a={domainsAccessibility:e.reduce((l,u)=>({...l,[u]:{loading:!0}}),{}),recommendedDomain:null};else{const l=s.reduce((d,c)=>{const i=new URL(c.url).hostname;return d[i]={...c,domain:i},d},{}),u=((h=s.find(d=>d.accessible))==null?void 0:h.url)||t;a={domainsAccessibility:l,recommendedDomain:u?new URL(u).hostname:null}}return a}export{W as B,Ie as D,Fe as R,Le as a,Me as b,Ne as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aL as u,aM as B,j as e,Z as x,r as I,gn as m,gp as j,a3 as E,R as S,hY as U,hZ as R,b as O}from"./index-Boqyvc8Q.js";import{R as J}from"./index--Q6KdM7v.js";var d={},M=B;Object.defineProperty(d,"__esModule",{value:!0});var C=d.default=void 0,F=M(u()),Z=e;C=d.default=(0,F.default)((0,Z.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"CloseOutlined");var p=function(h){return e.jsxs("svg",{...h,children:[e.jsxs("g",{filter:"url(#a)",children:[e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#DDD"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m49.192 6.222-40.97 40.97A11 11 0 0 0 5 54.971V240c0 6.075 4.925 11 11 11h196c6.075 0 11-4.925 11-11V14c0-6.075-4.925-11-11-11H56.97a11 11 0 0 0-7.778 3.222Zm-.707-.707A12 12 0 0 1 56.971 2H212c6.627 0 12 5.373 12 12v226c0 6.627-5.373 12-12 12H16c-6.627 0-12-5.373-12-12V54.97a12 12 0 0 1 3.515-8.485l40.97-40.97Z",fill:"#000",fillOpacity:".08"}),e.jsx("mask",{id:"b",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"4",y:"2",width:"220",height:"250",children:e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#D9D9D9"})}),e.jsxs("g",{mask:"url(#b)",children:[e.jsx("path",{opacity:".5",fill:"url(#c)",d:"M4 2h220v128H4z"}),e.jsx("path",{opacity:".1",fill:"url(#d)",d:"M4 130h220v122H4z"}),e.jsx("path",{d:"M33.045 169h-3.767v-11.636h3.887c1.14 0 2.12.233 2.937.698a4.61 4.61 0 0 1 1.881 1.995c.44.863.659 1.899.659 3.108 0 1.212-.222 2.254-.665 3.125a4.668 4.668 0 0 1-1.909 2.011c-.833.466-1.84.699-3.023.699Zm-2.01-1.534h1.914c.886 0 1.623-.167 2.21-.5a3.152 3.152 0 0 0 1.318-1.46c.292-.64.438-1.421.438-2.341 0-.913-.146-1.688-.438-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm11.546-10.102V169h-1.756v-11.636h1.756ZM48.905 169h-3.767v-11.636h3.886c1.14 0 2.12.233 2.938.698a4.609 4.609 0 0 1 1.88 1.995c.44.863.66 1.899.66 3.108 0 1.212-.222 2.254-.665 3.125a4.667 4.667 0 0 1-1.91 2.011c-.833.466-1.84.699-3.022.699Zm-2.011-1.534h1.914c.887 0 1.623-.167 2.21-.5a3.151 3.151 0 0 0 1.319-1.46c.291-.64.437-1.421.437-2.341 0-.913-.146-1.688-.437-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm20.372-7.046a1.662 1.662 0 0 0-.75-1.25c-.44-.299-.993-.448-1.66-.448-.477 0-.89.075-1.238.227a1.91 1.91 0 0 0-.813.613c-.189.258-.284.552-.284.881 0 .277.065.515.194.716.132.201.304.369.516.506.216.132.447.244.694.335.246.087.483.159.71.216l1.136.295c.371.091.752.214 1.142.37.39.155.752.36 1.086.613.333.254.602.568.806.944.209.374.313.823.313 1.346 0 .659-.17 1.244-.511 1.756-.338.511-.828.915-1.472 1.21-.64.295-1.415.443-2.324.443-.871 0-1.625-.138-2.261-.415-.637-.276-1.135-.668-1.495-1.176-.36-.511-.558-1.117-.596-1.818h1.761c.034.421.17.771.41 1.051.242.277.55.483.925.62.38.132.794.198 1.245.198.496 0 .937-.077 1.324-.233.39-.159.697-.378.92-.659a1.56 1.56 0 0 0 .335-.994c0-.345-.098-.627-.295-.847a2.191 2.191 0 0 0-.79-.545 7.725 7.725 0 0 0-1.12-.381l-1.374-.375c-.932-.253-1.67-.627-2.216-1.119-.542-.492-.813-1.144-.813-1.955 0-.67.182-1.255.546-1.755.363-.5.856-.888 1.477-1.165.621-.28 1.322-.42 2.102-.42.788 0 1.483.138 2.085.414.607.277 1.084.658 1.432 1.142.349.481.53 1.034.546 1.659h-1.693Zm3.813 11.853v-12h1.66v1.415h.142c.098-.182.24-.393.426-.631.185-.239.443-.447.772-.625.33-.182.766-.273 1.307-.273.705 0 1.334.178 1.887.534.553.356.987.869 1.3 1.54.319.67.478 1.477.478 2.42 0 .944-.157 1.752-.472 2.427-.314.67-.746 1.187-1.295 1.551-.55.36-1.176.539-1.88.539-.53 0-.965-.089-1.302-.267a2.457 2.457 0 0 1-.784-.625 4.667 4.667 0 0 1-.437-.636h-.103v4.631H71.08Zm1.665-7.637c0 .614.09 1.152.267 1.614.178.462.436.824.773 1.085.337.258.75.387 1.239.387.507 0 .931-.135 1.273-.404.34-.273.598-.642.772-1.108.178-.466.267-.99.267-1.574 0-.575-.087-1.092-.261-1.551-.17-.458-.428-.82-.773-1.085-.34-.265-.767-.398-1.278-.398-.493 0-.91.127-1.25.381-.337.254-.593.608-.767 1.062-.175.455-.262.985-.262 1.591Zm10.75 4.557a3.557 3.557 0 0 1-1.5-.307 2.523 2.523 0 0 1-1.062-.903c-.258-.394-.386-.877-.386-1.449 0-.492.094-.898.283-1.216.19-.318.446-.57.768-.756a4.036 4.036 0 0 1 1.08-.42c.397-.095.802-.167 1.215-.216l1.273-.148c.325-.041.562-.108.71-.198.148-.091.222-.239.222-.444v-.039c0-.497-.14-.881-.42-1.154-.277-.273-.69-.409-1.24-.409-.572 0-1.022.127-1.352.381-.325.25-.55.528-.676.835l-1.597-.364c.19-.53.466-.958.83-1.284.368-.329.79-.568 1.267-.716.477-.151.98-.227 1.506-.227.348 0 .718.042 1.108.125.394.08.761.227 1.102.443.345.216.627.525.847.926.22.398.33.915.33 1.552V169h-1.66v-1.193h-.068c-.11.22-.275.435-.495.648-.22.212-.501.388-.846.528s-.758.21-1.239.21Zm.37-1.363c.47 0 .87-.093 1.204-.279.337-.185.593-.428.767-.727.178-.303.267-.627.267-.972v-1.125c-.06.061-.178.118-.352.171-.17.049-.365.093-.585.13-.22.034-.434.067-.642.097l-.523.068c-.33.042-.63.112-.903.21a1.553 1.553 0 0 0-.648.427c-.16.181-.239.424-.239.727 0 .42.156.738.466.954.31.212.707.319 1.188.319Zm9.876 1.346c-.845 0-1.572-.191-2.182-.574a3.796 3.796 0 0 1-1.398-1.596c-.325-.678-.488-1.455-.488-2.33 0-.886.166-1.668.5-2.346a3.832 3.832 0 0 1 1.409-1.597c.606-.383 1.32-.574 2.142-.574.663 0 1.254.123 1.773.369.519.243.937.584 1.255 1.023.322.44.514.953.574 1.54h-1.653c-.091-.409-.3-.761-.625-1.057-.322-.295-.754-.443-1.296-.443a2.11 2.11 0 0 0-1.244.375c-.352.246-.627.598-.824 1.057-.197.454-.295.992-.295 1.613 0 .637.096 1.186.29 1.648.193.462.466.82.818 1.074.356.254.774.381 1.255.381.322 0 .614-.059.875-.177.266-.121.487-.293.665-.517.182-.223.309-.492.38-.806h1.654a3.211 3.211 0 0 1-.55 1.511 3.165 3.165 0 0 1-1.234 1.045c-.511.254-1.111.381-1.8.381Zm9.163 0c-.859 0-1.6-.184-2.221-.551a3.732 3.732 0 0 1-1.432-1.563c-.333-.674-.5-1.464-.5-2.369 0-.894.167-1.682.5-2.363a3.887 3.887 0 0 1 1.409-1.597c.606-.383 1.314-.574 2.125-.574.493 0 .97.082 1.432.244.462.163.877.419 1.244.767.368.349.657.802.87 1.358.212.553.318 1.226.318 2.017v.603H99.71v-1.273h5.273c0-.447-.091-.843-.273-1.187a2.052 2.052 0 0 0-.767-.824c-.326-.201-.708-.302-1.148-.302a2.22 2.22 0 0 0-1.25.353 2.364 2.364 0 0 0-.818.909 2.626 2.626 0 0 0-.284 1.21v.994c0 .584.102 1.08.307 1.489.208.409.498.722.869.938.372.212.805.318 1.301.318a2.7 2.7 0 0 0 .881-.137c.265-.094.494-.234.688-.42.193-.186.341-.415.443-.688l1.608.29c-.129.474-.36.888-.693 1.244-.33.353-.745.627-1.245.824-.496.194-1.062.29-1.699.29Z",fill:"#fff"}),e.jsx("path",{d:"M117.604 47.263 121.523 45h14.267v41.862h-14.267l-15.335-8.854V53.854l1.818-1.05 3.2 1.848-1.818 1.05V76.16l12.993 7.502h10.209V48.2h-10.209l-1.577.91-3.2-1.847Z",fill:"url(#e)"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.402 76.16V55.701L106.409 48.2H96.2v35.462h10.209l1.582-.913 3.2 1.847-3.924 2.266H93V45h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047Z",fill:"url(#f)"}),e.jsxs("g",{clipPath:"url(#g)",fillRule:"evenodd",clipRule:"evenodd",fill:"#fff",children:[e.jsx("path",{d:"m50.928 216.089 1.034 2.852h-2.503l1.028-2.842a4.95 4.95 0 0 0 .107-.338 7.17 7.17 0 0 0 .111-.409c.075.297.15.542.223.737Zm2.28 5.591h.796l-2.775-7.352h-1.043l-2.774 7.352h.795a.338.338 0 0 0 .223-.077.425.425 0 0 0 .127-.179l.615-1.705h3.07l.617 1.705a.399.399 0 0 0 .126.184.339.339 0 0 0 .223.072Zm4.823-.963a2.023 2.023 0 0 1-.67.098h-1.455v-2.453h1.456c.5 0 .871.106 1.11.318.24.208.36.495.36.86 0 .184-.028.355-.083.512a1.005 1.005 0 0 1-.262.399 1.2 1.2 0 0 1-.456.266Zm-2.125-3.128v-2.406h1.237c.498 0 .865.095 1.101.286.236.192.355.497.355.917 0 .369-.125.662-.374.881-.246.215-.623.322-1.13.322h-1.189Zm2.358-3.128a4.106 4.106 0 0 0-1.12-.133h-2.27v7.352h2.507c.391 0 .74-.051 1.048-.154.307-.102.566-.247.776-.435.21-.188.37-.409.48-.665.11-.26.165-.547.165-.861 0-.904-.506-1.462-1.518-1.674.22-.075.41-.169.572-.281a1.79 1.79 0 0 0 .403-.379c.106-.144.186-.297.237-.461.052-.164.078-.335.078-.512a2.1 2.1 0 0 0-.146-.804 1.49 1.49 0 0 0-.441-.609 2.073 2.073 0 0 0-.771-.384Zm7.535.778h-2.212v6.441h-1.028v-6.441h-2.222v-.911H65.8v.911Zm2.439.564h-1.13v1.193h1.13v-1.193Zm-1.13 2.983h1.13v1.193h-1.13v-1.193Z",fillOpacity:".8"}),e.jsx("path",{d:"M28.247 221.771V214h3.894c.99.072 1.765.944 1.765 1.998v3.77c0 1.106-.85 2.003-1.897 2.003h-3.762ZM36.355 214h-1.011v7.783h1.01V214Zm-7.097 6.704v-5.642h2.751c.49 0 .886.419.886.936v3.77c0 .517-.396.936-.886.936h-2.75ZM37.775 214v7.771h3.762c1.047 0 1.897-.897 1.897-2.003v-3.77c0-1.054-.774-1.926-1.765-1.998h-3.894Zm6.946 1.803h1.13v1.193h-1.13v-1.193Zm1.13 2.983h-1.13v1.193h1.13v-1.193Zm-7.065-3.724v5.642h2.75c.49 0 .887-.419.887-.936v-3.77c0-.517-.397-.936-.886-.936h-2.751Z"})]}),e.jsx("circle",{cx:"191.32",cy:"218",r:"10",fill:"url(#h)"}),e.jsx("path",{d:"m192.064 213.333.976-.564h3.554v10.427h-3.286a1 1 0 0 1-.5-.134l-3.588-2.071v-6.016l.453-.262.797.46-.453.262v5.096l3.237 1.868h2.543v-8.833h-2.543l-.393.227-.797-.46Z",fill:"#fff"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M192.512 220.531v-5.096l-3.237-1.869h-2.543v8.833h2.543l.394-.227.797.46-.977.564h-3.554v-10.427h3.554l3.82 2.206v6.016l-.452.261-.797-.461.452-.26Z",fill:"#fff"})]})]}),e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"d",x1:"114",y1:"130",x2:"114",y2:"252",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#101010"}),e.jsx("stop",{offset:"1",stopColor:"#272727"})]}),e.jsxs("linearGradient",{id:"e",x1:"120.989",y1:"45",x2:"120.989",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff",stopOpacity:".4"}),e.jsx("stop",{offset:"1",stopColor:"#fff"})]}),e.jsxs("linearGradient",{id:"f",x1:"107.801",y1:"45",x2:"107.801",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff"}),e.jsx("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})]}),e.jsxs("radialGradient",{id:"h",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(17 -8.76924 6.97565 13.52294 183.166 221)",children:[e.jsx("stop",{stopColor:"#016BED"}),e.jsx("stop",{offset:".699",stopColor:"#4498FB"}),e.jsx("stop",{offset:"1",stopColor:"#9DFFE8"})]}),e.jsx("clipPath",{id:"g",children:e.jsx("path",{fill:"#fff",transform:"translate(28 214)",d:"M0 0h40.32v8H0z"})}),e.jsx("pattern",{id:"c",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:e.jsx("use",{xlinkHref:"#i",transform:"scale(.00455 .00781)"})}),e.jsxs("filter",{id:"a",x:"0",y:"0",width:"228",height:"258",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.jsx("feOffset",{dy:"2"}),e.jsx("feGaussianBlur",{stdDeviation:"2"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0.0631944 0 0 0 0 0.242785 0 0 0 0 0.403472 0 0 0 0.2 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})]}),e.jsx("image",{id:"i",width:"220",height:"128",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANwAAACABAMAAACSOBo+AAAAG1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACUUeIgAAAACXRSTlMSFhkOHAsfCCOMH5MiAAAjjElEQVRo3hTQO3sjRRBG4a+qWzJhVfdIJqzuGXsJe2bkJe0e2UA4shdIJS2X1LBcUpbL/wae5yQnfVHGjp2+V08yKR7OwBDYte8pi5Aq9DObSBouqN9cidZyusonzWtGJO13phLebEn6xKEnlYyXe5hnySc53Ym9Abn7crTse8r7BMeIB8yBOVZK0trMjxT5S/cgc9G63BQqZoF3xSYZYeRk2hoIvEBFA7XMtaaF8TdY1GjiDDqgEswRDlWnRtmYzl5zRUq3sx3I+JL7sBJKXchDGJY9D+SfHAIoA+TuHCyYYYFjkhNB8tO5hhju0ANjdCITLx4/JDL+yyP0ErZR+m3M322bY8OKHzoOcAXLQMBHiIh+X59pv6udCJ7MAV9HARPtTEuFSdAzNVn7uPmkk3TpBGHb8DJZ3p36ScsuJVFQP6CUBXimN3BABZJUiEwBOMsHUisZiXU8k3bVSTrPcHsKEEg8gV/vP7U26vRWhl2UnfEbX3VlVbRHgSwmcy2tWTjsxmIb4YjgbAkmpyEOINs1gCtSC4YsjwnY9l1MJYRz1NMk5NAC3MffnLwiHnNH7IoyER5VEI6S4Um++uKyho0BwmD+1rA90yarpO4ZpjLgs8+BTUfU9w+gkwEi6ftxqyB9Wt6IBstE0E8kxJLeKaVhNA/uEwIslv1JmRwcSzAo+URPCF5M8AGzEF8yG+QVBFl53FqhfYqd7/PM6AmJouW4cVge9pZuMJga2NQH918Sp4VIXdd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2dhwRULpny5D5yKI7vD/4iAW9KWHB7JsEZeCE1E/mdgVHZTOci8X+YIanJt7+aBd2k8f2RL45Z2puefelcXjUWbKdMSYwr58dAPaHymSU0o9/zjFt7/VoGmNAwCyvrKe2L1hYJqtd5gh6FGiCAGzqFk6on9pQdSAQzkctDTtXGbDih5iRPVIk9TwCJGwP3tpATkHsNwloUilnNMFce7twgDgrgWhsE8jWW+EBLlTDMn9pmtJOefTJc6Cxld039TN4XiwL4pMtU+8tXJ4g/LghG5APdF7/e3FSi4v8vnEBiIEm+5LlZtsk2LbbbY5hN9JkkJkd5BjQFPoUcwjJdTm0mx0024NmOvVgxASvU9TonFxUqG8cUTy3m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]})};p.defaultProps={width:"228",height:"258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function Q({src:t,alt:h}){const[a,r]=I.useState(!1),[i,c]=I.useState(!1),o=()=>c(!0),n=()=>c(!1);return e.jsxs(e.Fragment,{children:[e.jsx(J,{ready:a,customPlaceholder:e.jsx("img",{style:{cursor:"pointer"},alt:h,src:t,width:"58px",height:"58px",onError:()=>r(!0),onClick:o}),children:e.jsx(p,{style:{cursor:"pointer",width:"58px",height:"58px"},onClick:o})}),e.jsx(m,{open:i,onClose:n,"aria-labelledby":"preview-space-nft-display","aria-describedby":"preview space nft display",fullWidth:!0,maxWidth:"md",children:e.jsxs(j,{style:{padding:"8px 8px",backgroundColor:"rgba(0,0,0,0.8)"},children:[e.jsx(E,{color:"inherit",onClick:n,"aria-label":"close",style:{position:"absolute",top:8,right:8,color:"white"},children:e.jsx(C,{})}),a?e.jsx(p,{style:{width:"100%",height:"75vh"}}):e.jsx("img",{src:t,alt:"",style:{width:"100%",height:"75vh",objectFit:"contain"}})]})})]})}Q.propTypes={src:x.string.isRequired,alt:x.string.isRequired};function D({blocklet:t}){var A,f,g;if(S(t))return{};const{appDid:h}=t,a=U(t),r=R(t),i=(g=(f=(A=t==null?void 0:t.site)==null?void 0:A.domainAliases)==null?void 0:f.sort((s,l)=>s.accessibility.accessible&&l.accessibility.accessible?+s.isProtected-+l.isProtected:+l.accessibility.accessible-+s.accessibility.accessible))==null?void 0:g.map(s=>{var v;const l=(v=s==null?void 0:s.domainStatus)!=null&&v.isHttps?"https://":"http://",y=s==null?void 0:s.value;return`${l}${y}`}).filter(Boolean),c=i==null?void 0:i[0],o=O.DID_SPACES.AUTHORIZE.DEFAULT_SCOPE,n=window.location.href;return{appDid:h,appName:a,appDescription:r,appUrl:c,scopes:o,referrer:n,isReady:!!c}}export{Q as P,D as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{cH as a,b as l,F as u}from"./index-Boqyvc8Q.js";import{i as h}from"./InfoOutlined-BUn5fKCT.js";const s=(e,r)=>{if(e.type===u.ROUTING_RULE_TYPES.REDIRECT){if(!e.url)return new Error(`${r("router.validation.redirectUrlRequired")}`);if(!e.redirectCode)return new Error(`redirect ${r("router.validation.redirectCodeRequired")}`)}else if(e.type===u.ROUTING_RULE_TYPES.BLOCKLET&&!e.did)return new Error(r("router.validation.didRequired"));return null},p=(e,r)=>{const t=s(e,r);return t||(e.pathPrefix.length?e.pathPrefix.length>150?new Error(r("router.validation.pathPrefixTooLong",{length:150})):null:new Error(r("router.validation.pathPrefixCannotBeEmpty")))},E=({params:e,blocklets:r,blocklet:t,locale:o="en"})=>{if(t){let i=(t.children||[]).find(d=>a(d.meta)&&h(d.mountPoint,e.pathPrefix));if(t.meta.group!=="gateway"&&e.pathPrefix==="/"&&(i="/"),i)return{zh:`挂载点 ${e.pathPrefix} 已存在,请使用其他挂载点`,en:`The mount point ${e.pathPrefix} already exist, please use another mount point`}[o]}const f=r.find(i=>i.meta.did===e.did);if(!f)return"";const n=f.meta.interfaces.find(i=>i.type==="web");return n&&n.prefix!==l.BLOCKLET_DYNAMIC_PATH_PREFIX&&e.pathPrefix!==n.prefix?{zh:`该 blocklet 只能挂载在 ${n.prefix}`,en:`This blocklet can only be mounted on ${n.prefix}`}[o]:""},R=e=>{if(!e||typeof e!="string")return e;let r=e.trim();try{return r=r.toLowerCase(),r.startsWith("http://")||r.startsWith("https://")?new URL(r).hostname:r}catch(t){return console.error("format domain failed",t),r}};export{p as a,R as p,E as v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bV as c,bX as h,a5 as P,d3 as S,r as T,h as w,j}from"./index-Boqyvc8Q.js";function _(i){const{theme:t,name:e,props:r}=i;if(!t||!t.components||!t.components[e]||!t.components[e].defaultProps)return r;const o=c({},r),s=t.components[e].defaultProps;let a;for(a in s)o[a]===void 0&&(o[a]=s[a]);return o}const b=["defaultTheme","withTheme","name"],N=["classes"],E=(i,t={})=>e=>{const{defaultTheme:r,withTheme:o=!1,name:s}=t,a=h(t,b);let p=s;const d=P(i,c({defaultTheme:r,Component:e,name:s||e.displayName,classNamePrefix:p},a)),m=T.forwardRef(function(f,x){const u=h(f,N),y=d(c({},e.defaultProps,f));let l,n=u;return(typeof s=="string"||o)&&(l=w()||r,s&&(n=_({theme:l,name:s,props:u})),o&&!n.theme&&(n.theme=l)),j.jsx(e,c({ref:x,classes:y},n))});return S(m,e),m};export{E as w};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{cQ as r,cR as i,bq as e,j as _,cS as u}from"./index-Boqyvc8Q.js";const a={en:r(i),ar:()=>e(()=>import("./ar-DqmJV4p8.js"),[],import.meta.url).then(t=>r(t.default)),de:()=>e(()=>import("./de-CHOUObJ5.js"),[],import.meta.url).then(t=>r(t.default)),es:()=>e(()=>import("./es-aZ4oYeVs.js"),[],import.meta.url).then(t=>r(t.default)),fr:()=>e(()=>import("./fr-Bi9vptGI.js"),[],import.meta.url).then(t=>r(t.default)),hi:()=>e(()=>import("./hi-BXYjfUTP.js"),[],import.meta.url).then(t=>r(t.default)),id:()=>e(()=>import("./id-VVXvzjmO.js"),[],import.meta.url).then(t=>r(t.default)),ja:()=>e(()=>import("./ja-DqJiajLu.js"),[],import.meta.url).then(t=>r(t.default)),ko:()=>e(()=>import("./ko-DQKmtlbI.js"),[],import.meta.url).then(t=>r(t.default)),pt:()=>e(()=>import("./pt-si0ACe2m.js"),[],import.meta.url).then(t=>r(t.default)),ru:()=>e(()=>import("./ru-B36cpSA6.js"),[],import.meta.url).then(t=>r(t.default)),th:()=>e(()=>import("./th-Dtc8_3Sk.js"),[],import.meta.url).then(t=>r(t.default)),vi:()=>e(()=>import("./vi-DpH7bkpR.js"),[],import.meta.url).then(t=>r(t.default)),"zh-TW":()=>e(()=>import("./zh-tw-Cb93tcSH.js"),[],import.meta.url).then(t=>r(t.default)),zh:()=>e(()=>import("./zh-Dizc5DZz.js"),[],import.meta.url).then(t=>r(t.default))};function p(t){return function(o){return _.jsx(u,{translations:a,children:_.jsx(t,{...o})})}}export{p as w};
|