@abtnode/blocklet-services 1.16.39-beta-20250209-091732-ccef0248 → 1.16.39-beta-20250210-113651-271e99ca
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/add-component-core-BtRcqhKo.js +1 -1
- package/dist/assets/add-resource-nU5RWMls.js +1 -1
- package/dist/assets/analytics-X9VRwkzm.js +1 -1
- package/dist/assets/audit-logs-BJdGmYfI.js +1 -1
- package/dist/assets/complete-DtNcnxdf.js +1 -1
- package/dist/assets/component-DOOz4rgK.js +1 -1
- package/dist/assets/config-navigation-B5FcBZZN.js +1 -1
- package/dist/assets/connect-ByH0XoiE.js +1 -1
- package/dist/assets/dashboard-Cgj1BkGn.js +2 -2
- package/dist/assets/email-BaNlnEr5.js +1 -1
- package/dist/assets/exchange-passport-CjaHJzsV.js +1 -1
- package/dist/assets/index-C7dWd4bS.js +1 -1
- package/dist/assets/index-Cqc33Ts_.js +1 -1
- package/dist/assets/index-D6IQwB0H.js +1 -1
- package/dist/assets/index-DzU25sJ1.js +1 -1
- package/dist/assets/index-Dzj545ro.js +1 -1
- package/dist/assets/index-LIf2LIyz.js +1 -1
- package/dist/assets/index-PcImULKW.js +1 -1
- package/dist/assets/invite-C4uHXoFz.js +1 -1
- package/dist/assets/issue-passport-Dq9lOjJK.js +1 -1
- package/dist/assets/item-Ba7fzXuK.js +1 -1
- package/dist/assets/login-DnwZJEBm.js +1 -1
- package/dist/assets/lost-passport-Cqpxv9tR.js +1 -1
- package/dist/assets/open-window-BCSIX9-I.js +1 -1
- package/dist/assets/overview-DMjokddi.js +1 -1
- package/dist/assets/publish-resource-BeEqCNhj.js +1 -1
- package/dist/assets/setup-hqq9REGL.js +2 -2
- package/dist/assets/start-C1K4M5DN.js +1 -1
- package/package.json +21 -21
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DF1jJ-bb.js","assets/vendor-arcblock-DZrZ_x_3.js","assets/vendor-react-D-afvo_7.js","assets/vendor-utils-5TjOM6td.js","assets/vendor-mui-core-xF5F4eT7.js","assets/vendor-hooks-BKxTDk_P.js","assets/vendor-arcblock-DhgPdlEj.css","assets/index-C2fPoxDR.js","assets/index-LIf2LIyz.js","assets/index-DoZ2YM4T.js","assets/index-AgKpYdvC.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as S,k as Dt,l as lt,L as ce,f as Hn,h as Gn,i as pt}from"./vendor-react-D-afvo_7.js";import{a1 as be,j as t,t as ze,a3 as u,aM as Wo,E as d,a4 as pe,I as ne,T as A,bU as Uo,aa as de,aE as Xn,bL as Ge,ad as Fo,aN as Xe,bq as jt,x as Y,a2 as et,P as Ho,G as Go,v as Tt,$ as Xo,ar as Jo,al as fe,ah as Jn,D as _t,ab as Qo,r as Yo,bK as Qn,K as Be,y as Zo,M as Z,ac as ye,aL as Yn,L as Zn,z as Kn,bn as es,aA as Ko,az as tt,bt as ts,bu as os,bV as ns,bW as ss,aP as en,bH as rs,bN as is,bx as ls,by as ft}from"./vendor-mui-core-xF5F4eT7.js";import{y as xe,B as Te,h as ie,a5 as cs,f as mo,_ as tn,ad as bo}from"./index-LIf2LIyz.js";import{$ as ge,b as H,e as Q,a2 as ot,ab as on,aT as nn,a9 as sn,Z as as,aU as Pt,j as W,n as ds,aV as us,aW as ps,Y as fs,aB as re,aX as hs,ao as ms,aL as Re,a6 as Lt,aY as ve,ah as bs,am as xs}from"./vendor-arcblock-DZrZ_x_3.js";import{d as qt}from"./Add-DSPtuudj.js";import{d as gs}from"./Error-CN75ZRlV.js";import{C as $t}from"./confirm-CpCj_oj-.js";import{u as ct}from"./session-CM1ewS-k.js";import{W as xo}from"./did-address-D0Fo5eTl.js";import{E as Ve,D as go,C as jo,P as ko}from"./react-beautiful-dnd.esm-DwxjmShi.js";import{B as Nt}from"./bundle-avatar-CYdInmjR.js";import{S as he}from"./shorten-label-J69eHfMN.js";import{T as js,x as ae,G as At,C as Je}from"./vendor-utils-5TjOM6td.js";import{d as ks}from"./Download-B4M4wwJm.js";import{d as ys}from"./QuestionMarkCircle-BvUTckGB.js";import{u as vs}from"./vendor-hooks-BKxTDk_P.js";import{_ as Se}from"./useSetState-Crt4S51m.js";import{c as Et}from"./index-DoZ2YM4T.js";import{E as Mt}from"./index-CHFvfli7.js";import{p as nt}from"./index-BA_7CRkd.js";import"./api-K65cLqol.js";import{d as ws}from"./ChevronRight-DlIj8Fj2.js";import{T as Cs,a as Ss}from"./vendor-mui-x-CSUdon8K.js";import{d as yo}from"./DeleteOutline-BzV7E1BM.js";import{c as Rs,A as rn,u as Is,S as Ds,U as Ts,a as ht,b as ln,n as _s,e as Ps,f as vo,g as Ls}from"./item-Ba7fzXuK.js";import{d as qs}from"./ArrowDropDown-DM9y1OaN.js";import{f as Ie}from"./format-error-C0Ke3VXF.js";import{C as $s}from"./click-to-copy-Bu9H6mvL.js";import{d as Ns}from"./Launch-BX35m3eH.js";import{M as As}from"./index-ChSPqVLh.js";import{r as Es}from"./index-DtwN19zv.js";import{d as Ms}from"./Done-DJfjmlFC.js";import"./raf-schd.esm-Cxhj8umC.js";import"./get-safe-url-Du4BhDgB.js";var Ot={},Os=be;Object.defineProperty(Ot,"__esModule",{value:!0});var cn=Ot.default=void 0,zs=Os(ge()),Bs=t;cn=Ot.default=(0,zs.default)((0,Bs.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddBox");var zt={},Vs=be;Object.defineProperty(zt,"__esModule",{value:!0});var an=zt.default=void 0,Ws=Vs(ge()),Us=t;an=zt.default=(0,Ws.default)((0,Us.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H15v-8h5V8zm-1 7V3.5L18.5 9zm4 12.66V16h5.66v2h-2.24l2.95 2.95-1.41 1.41L19 19.41v2.24h-2z"}),"FileOpen");var Bt={},Fs=be;Object.defineProperty(Bt,"__esModule",{value:!0});var dn=Bt.default=void 0,Hs=Fs(ge()),Gs=t;dn=Bt.default=(0,Hs.default)((0,Gs.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function Vt({did:e,projectId:o,title:n,logo:r,describe:s}){const i=`${`${H.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${o}/logo/upload`}/${r}`,[a,c]=S.useState(!1),f=ze(h=>h.breakpoints.down("md"));return t.jsxs(u,{sx:{display:"flex",flexDirection:"row",color:a?"primary.main":"grey.900",gap:1},onPointerEnter:()=>c(!0),onPointerLeave:()=>c(!1),children:[t.jsx(Wo,{sx:{borderRadius:1},src:i}),t.jsxs(u,{children:[t.jsx(he,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:f?"primary.main":""},children:n||"/"}),t.jsx(he,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:f||a?"primary.main":"grey.700"},children:s||"/"})]})]})}Vt.propTypes={projectId:d.string.isRequired,did:d.string.isRequired,title:d.string.isRequired,logo:d.string.isRequired,describe:d.string.isRequired};function Wt({initUrl:e}){const o=Dt(),n=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:r,locale:s}=Q(),{api:l}=xe(),{api:i}=ct(),[a,c]=S.useState(!0),{blocklet:f}=Te(),[h,g]=S.useState(null),[m,p]=S.useState(!1),v=ze(j=>j.breakpoints.down("xl")),{componentDid:w=""}=lt(),[T,x]=S.useState(null),b=()=>{l.getProjects({input:{did:f.meta.did,componentDid:w,tenantScope:n}}).then(j=>{const P=(j==null?void 0:j.projects)||[];c(!1),x(P)}).catch(j=>{c(!1),W.error(j.message)})},I=()=>{o(`${H.UNOWNED_DID}/create/none`,{replace:!0})},L=j=>{g(j)},D=()=>{c(!1),p(!0)},k=()=>{p(!1),g(null)},_=j=>{W.error(j.message),p(!1),g(null)},N=j=>{if(!(j!=null&&j.deleted)){W.error("Delete project failed");return}b(),p(!1),g(null)},U=(j,P,E)=>{let F=j==null?void 0:j.trim();return F?(F=ds.toAddress(F).toLocaleLowerCase(),E.some((O,R)=>{const q=P[R];return q&&O.searchable&&O.display!=="excluded"&&O.display!=="false"&&q.toLocaleLowerCase().includes(F)})):!0};if(S.useEffect(()=>{b()},[]),!T&&a)return t.jsx(u,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:t.jsx(Ve,{})});if(!T)return null;if(!T.length)return t.jsxs(u,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[t.jsx(u,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:r("blocklet.publish.blockletEmptyTip")}),t.jsx(u,{sx:{fontSize:14,color:"text.secondary",mb:3},children:r("blocklet.publish.createBlockletTip")}),t.jsx(ot,{onClick:I,variant:"contained",children:r("blocklet.publish.createBlocklet")})]});const y=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:j=>{const P=T[j];return t.jsx(ce,{to:`${P.id}`,children:t.jsx(Vt,{did:f.meta.did,projectId:P.id,logo:P.blockletLogo,title:P.blockletTitle,describe:P.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{searchable:!1,customBodyRender:j=>j?t.jsx(on,{type:"success",children:j}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:j=>j?t.jsx(xo,{size:14,compact:!0,responsive:!1,did:j}):null}},v||w?null:{label:r("common.createdBy"),name:"createdBy",options:{customBodyRender:j=>j?t.jsx(xo,{onClick:()=>{o(`/.well-known/service/admin/members?did=${j}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:j}):null}},v||w?null:{label:r("common.scope"),name:"componentDid",options:{customBodyRender:j=>{const P=(f.children||[]).find(E=>E.meta.did===j);return P?t.jsxs(u,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[t.jsx(Nt,{size:14,blocklet:P,ancestors:[f]}),t.jsx(u,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:P.meta.title})]},j):""}}},v||n?null:{label:r("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:j=>t.jsx(u,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:t.jsx(he,{children:j})})}},{label:r("common.updatedAt"),name:"updatedAt",options:{searchable:!1,customBodyRender:j=>t.jsx(nn,{value:Number(j),locale:s})}},{label:r("common.actions"),name:"actions",options:{searchable:!1,customBodyRenderLite:j=>{const P=T[j];return t.jsxs(u,{display:"flex",children:[t.jsx(ce,{to:`${P.id}/new-release/${P.lastReleaseId}`,children:t.jsx(pe,{title:r("blocklet.publish.createRelease"),placement:"top",children:t.jsx(ne,{color:"primary","aria-label":"create",children:t.jsx(cn,{style:{fontSize:18}})})})}),!!P.lastReleaseId&&t.jsx(pe,{title:r("blocklet.publish.viewLastRelease",{name:P.blockletTitle}),placement:"top",children:t.jsx(ne,{color:"secondary","aria-label":"create",children:t.jsx(ce,{style:{display:"flex"},to:`${P.id}/view/${P.lastReleaseId}`,children:t.jsx(an,{sx:{fontSize:18}})})})}),t.jsx(pe,{title:r("blocklet.publish.delete",{name:P.blockletTitle}),placement:"top",children:t.jsx(ne,{color:"primary","aria-label":"delete",onClick:()=>L(P),children:t.jsx(sn,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),C=m?t.jsx(as,{open:!0,popup:!0,onClose:k,action:"check-has-project-id",locale:s,checkFn:i.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:N,onError:_,extraParams:{projectId:h.id,did:f.meta.did,name:h.blockletTitle},messages:{title:r("blocklet.publish.deleteProject.title",{name:h.blockletTitle}),scan:r("blocklet.publish.deleteProject.scan",{name:h.blockletTitle}),confirm:r("blocklet.publish.deleteProject.confirm"),success:r("blocklet.publish.deleteProject.success")}}):null;return t.jsxs(u,{children:[t.jsxs(u,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[t.jsxs(u,{display:"flex",flexDirection:"row",alignItems:"center",children:[t.jsx(u,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:r("common.blockletStudio")}),t.jsx(pe,{title:r("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:t.jsx(dn,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),t.jsxs(ot,{onClick:I,variant:"contained",children:[t.jsx(qt,{style:{fontSize:"1.3em",marginRight:4}}),r("blocklet.publish.createBlocklet")]})]}),t.jsx(Pt,{className:"main-table",locale:s,data:T,columns:y,options:{sort:!1,download:!1,filter:!1,print:!1,search:!0,viewColumns:!1,searchAlwaysOpen:!0,rowsPerPageOptions:[10,20,50,100],searchPlaceholder:r("blocklet.list.searchPlaceholder"),searchDebounceTime:400,customSearch:U}}),h&&t.jsx($t,{title:`${r("common.delete")} ${h.blockletTitle}`,description:r("blocklet.publish.deleteProject.description"),confirm:r("common.confirm"),onConfirm:D,onCancel:()=>g(null),children:t.jsx(u,{sx:{marginTop:2},children:[r("blocklet.publish.deleteProject.tip1"),r("blocklet.publish.deleteProject.tip2"),r("blocklet.publish.deleteProject.tip3")].map(j=>t.jsxs(u,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[t.jsx(gs,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),t.jsx(A,{component:"span",variant:"inherit",color:"text.secondary",children:j})]}))})}),C]})}Wt.propTypes={initUrl:d.object};Wt.defaultProps={initUrl:null};var Ut={},Xs=be;Object.defineProperty(Ut,"__esModule",{value:!0});var un=Ut.default=void 0,Js=Xs(ge()),wo=t;un=Ut.default=(0,Js.default)([(0,wo.jsx)("path",{d:"M20 17H4V5h8V3H4c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h4v2h8v-2h4c1.1 0 2-.9 2-2v-3h-2z"},"0"),(0,wo.jsx)("path",{d:"m17 14 5-5-1.41-1.41L18 10.17V3h-2v7.17l-2.59-2.58L12 9z"},"1")],"InstallDesktop");function Qs(){var D;const{t:e,locale:o}=Q(),{projectId:n}=lt(),{api:r}=xe(),[s,l]=S.useState(!0),{blocklet:i}=Te(),a=ze(k=>k.breakpoints.down("md")),[c,f]=S.useState(null),[h,g]=S.useState(null),[m,p]=S.useState(null),v=(D=window.env)==null?void 0:D.serverEndpoint,w=()=>{r.getReleases({input:{did:i.meta.did,projectId:n}}).then(k=>{const _=(k==null?void 0:k.releases)||[];l(!1),f(_)}).catch(k=>{l(!1),W.error(k.message)})},T=()=>{r.doBatchQuery({getProject:{input:{did:i.meta.did,projectId:n}},getReleases:{input:{did:i.meta.did,projectId:n}}}).then(k=>{g(k.getProject.project||{}),f(k.getReleases.releases||[]),l(!1)}).catch(k=>{l(!1),W.error(k.message)})};S.useEffect(()=>{T()},[]);const x=()=>{l(!1);const k=m.id;r.deleteRelease({input:{did:i.meta.did,projectId:n,releaseId:k}}).then(()=>{l(!1),w(),W.success(e("common.removeSuccess")),p(null)}).catch(_=>{l(!1),W.error(_.message)})},b=k=>{p(k)};if(!c&&s)return t.jsx(u,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:t.jsx(Ve,{})});if(!c)return null;const I=t.jsxs(Uo,{className:"breadcrumbs","aria-label":"breadcrumb",children:[t.jsx(ce,{to:"..",children:e("common.blockletStudio")}),t.jsx(A,{color:"text.primary",children:t.jsx(he,{maxLength:a?6:30,children:h.blockletTitle})})]});if(!c.length)return t.jsxs(t.Fragment,{children:[I,t.jsxs(u,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[t.jsx(u,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:e("blocklet.publish.releaseEmptyTip")}),t.jsx(u,{sx:{fontSize:14,color:"text.secondary",mb:3},children:e("blocklet.publish.createReleaseTip")}),t.jsx(ce,{to:"create/none",children:t.jsx(ot,{variant:"contained",children:e("blocklet.publish.createRelease")})})]})]});const L=[{label:e("common.version"),name:"blockletVersion",minWidth:160,options:{customBodyRenderLite:k=>{const _=c[k];return t.jsx(ce,{to:`view/${_.id}`,children:t.jsx(Vt,{did:i.meta.did,projectId:h.id,logo:_.blockletLogo,title:_.blockletVersion,describe:_.blockletTitle})})}}},{label:e("blocklet.publish.releaseNote"),name:"note",options:{customBodyRenderLite:k=>{const _=c[k];return t.jsx(A,{className:"note",children:_.note||""})}}},{label:e("common.status"),name:"status",options:{customBodyRender:k=>t.jsx(on,{type:k==="published"?"success":"warning",children:k==="published"?"Released":js(k)})}},{label:e("common.lastPublishedAt"),name:"updatedAt",options:{customBodyRenderLite:k=>{const _=c[k];return _.status!==ie.PROJECT.RELEASE_STATUS.published?"":t.jsx(nn,{value:Number(_.updatedAt),locale:o})}}},{label:e("common.actions"),name:"actions",options:{customBodyRenderLite:k=>{var j;const _=c[k];let N="",U="";const y=_.status==="published";if(y){const P=ae(v,`/api/project/${i.meta.did}/${h.id}/${h.lastReleaseId}/release/blocklet.json`),E=new URL(v);E.pathname=ae(E.pathname,"/launch-blocklet/agreement"),E.searchParams.set("blocklet_meta_url",P),N=E.href,U=ae(`${H.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${i.meta.did}/${h.id}/${h.lastReleaseId}/download/${(h.lastReleaseFiles||[])[0]}`)}const C=(j=h.blockletComponents)!=null&&j.some(P=>P.included)||_.uploadedResource?"pack":"resource";return t.jsxs(u,{display:"flex",alignItems:"center",children:[y&&C==="pack"&&t.jsx(pe,{title:e("blocklet.publish.install",{name:h.blockletTitle}),placement:"top",children:t.jsx(ne,{color:"secondary","aria-label":"create",children:t.jsx("a",{style:{display:"flex"},href:N,target:"_blank",rel:"noreferrer",children:t.jsx(un,{sx:{fontSize:18}})})})}),y&&t.jsx(pe,{title:e("blocklet.publish.download",{name:h.blockletTitle}),placement:"top",children:t.jsx(ne,{color:"primary","aria-label":"download",children:t.jsx("a",{style:{display:"flex"},href:U,children:t.jsx(ks,{sx:{fontSize:18}})})})}),t.jsx(pe,{title:e("blocklet.publish.delete",{name:h.blockletTitle}),placement:"top",children:t.jsx(ne,{color:"primary","aria-label":"delete",onClick:()=>b(_),children:t.jsx(sn,{sx:{fontSize:18}})})})]})}}}];return t.jsxs(Ys,{children:[t.jsxs(u,{className:"header",children:[I,t.jsx(ce,{to:"new-release/none",children:t.jsxs(ot,{variant:"contained",children:[t.jsx(qt,{style:{fontSize:"1.3em",marginRight:4}}),e("blocklet.publish.createRelease")]})})]}),t.jsx(Pt,{className:"main-table",verticalKeyWidth:100,locale:o,data:c,columns:L,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),m&&t.jsx($t,{title:e(`${e("common.delete")} ${m.blockletVersion}`),description:e("blocklet.publish.deleteReleaseTip"),confirm:e("common.confirm"),onConfirm:x,onCancel:()=>p(null)})]})}const Ys=de(u)`
|
|
2
|
+
import{r as S,k as Dt,l as lt,L as ce,f as Hn,h as Gn,i as pt}from"./vendor-react-D-afvo_7.js";import{a1 as be,j as t,t as ze,a3 as u,aM as Wo,E as d,a4 as pe,I as ne,T as A,bU as Uo,aa as de,aE as Xn,bL as Ge,ad as Fo,aN as Xe,bq as jt,x as Y,a2 as et,P as Ho,G as Go,v as Tt,$ as Xo,ar as Jo,al as fe,ah as Jn,D as _t,ab as Qo,r as Yo,bK as Qn,K as Be,y as Zo,M as Z,ac as ye,aL as Yn,L as Zn,z as Kn,bn as es,aA as Ko,az as tt,bt as ts,bu as os,bV as ns,bW as ss,aP as en,bH as rs,bN as is,bx as ls,by as ft}from"./vendor-mui-core-xF5F4eT7.js";import{y as xe,B as Te,h as ie,a5 as cs,f as mo,_ as tn,ad as bo}from"./index-LIf2LIyz.js";import{$ as ge,b as H,e as Q,a2 as ot,ab as on,aT as nn,a9 as sn,Z as as,aU as Pt,j as W,n as ds,aV as us,aW as ps,Y as fs,aB as re,aX as hs,ao as ms,aL as Re,a6 as Lt,aY as ve,ah as bs,am as xs}from"./vendor-arcblock-DZrZ_x_3.js";import{d as qt}from"./Add-DSPtuudj.js";import{d as gs}from"./Error-CN75ZRlV.js";import{C as $t}from"./confirm-CpCj_oj-.js";import{u as ct}from"./session-CM1ewS-k.js";import{W as xo}from"./did-address-D0Fo5eTl.js";import{E as Ve,D as go,C as jo,P as ko}from"./react-beautiful-dnd.esm-DwxjmShi.js";import{B as Nt}from"./bundle-avatar-CYdInmjR.js";import{S as he}from"./shorten-label-J69eHfMN.js";import{T as js,x as ae,G as At,C as Je}from"./vendor-utils-5TjOM6td.js";import{d as ks}from"./Download-B4M4wwJm.js";import{d as ys}from"./QuestionMarkCircle-BvUTckGB.js";import{u as vs}from"./vendor-hooks-BKxTDk_P.js";import{_ as Se}from"./useSetState-Crt4S51m.js";import{c as Et}from"./index-DoZ2YM4T.js";import{E as Mt}from"./index-CHFvfli7.js";import{p as nt}from"./index-BA_7CRkd.js";import"./api-K65cLqol.js";import{d as ws}from"./ChevronRight-DlIj8Fj2.js";import{T as Cs,a as Ss}from"./vendor-mui-x-CSUdon8K.js";import{d as yo}from"./DeleteOutline-BzV7E1BM.js";import{c as Rs,A as rn,u as Is,S as Ds,U as Ts,a as ht,b as ln,n as _s,e as Ps,f as vo,g as Ls}from"./item-Ba7fzXuK.js";import{d as qs}from"./ArrowDropDown-DM9y1OaN.js";import{f as Ie}from"./format-error-C0Ke3VXF.js";import{C as $s}from"./click-to-copy-Bu9H6mvL.js";import{d as Ns}from"./Launch-BX35m3eH.js";import{M as As}from"./index-ChSPqVLh.js";import{r as Es}from"./index-DtwN19zv.js";import{d as Ms}from"./Done-DJfjmlFC.js";import"./raf-schd.esm-Cxhj8umC.js";import"./get-safe-url-DDeO6YpV.js";var Ot={},Os=be;Object.defineProperty(Ot,"__esModule",{value:!0});var cn=Ot.default=void 0,zs=Os(ge()),Bs=t;cn=Ot.default=(0,zs.default)((0,Bs.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddBox");var zt={},Vs=be;Object.defineProperty(zt,"__esModule",{value:!0});var an=zt.default=void 0,Ws=Vs(ge()),Us=t;an=zt.default=(0,Ws.default)((0,Us.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H15v-8h5V8zm-1 7V3.5L18.5 9zm4 12.66V16h5.66v2h-2.24l2.95 2.95-1.41 1.41L19 19.41v2.24h-2z"}),"FileOpen");var Bt={},Fs=be;Object.defineProperty(Bt,"__esModule",{value:!0});var dn=Bt.default=void 0,Hs=Fs(ge()),Gs=t;dn=Bt.default=(0,Hs.default)((0,Gs.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function Vt({did:e,projectId:o,title:n,logo:r,describe:s}){const i=`${`${H.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${o}/logo/upload`}/${r}`,[a,c]=S.useState(!1),f=ze(h=>h.breakpoints.down("md"));return t.jsxs(u,{sx:{display:"flex",flexDirection:"row",color:a?"primary.main":"grey.900",gap:1},onPointerEnter:()=>c(!0),onPointerLeave:()=>c(!1),children:[t.jsx(Wo,{sx:{borderRadius:1},src:i}),t.jsxs(u,{children:[t.jsx(he,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:f?"primary.main":""},children:n||"/"}),t.jsx(he,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:f||a?"primary.main":"grey.700"},children:s||"/"})]})]})}Vt.propTypes={projectId:d.string.isRequired,did:d.string.isRequired,title:d.string.isRequired,logo:d.string.isRequired,describe:d.string.isRequired};function Wt({initUrl:e}){const o=Dt(),n=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:r,locale:s}=Q(),{api:l}=xe(),{api:i}=ct(),[a,c]=S.useState(!0),{blocklet:f}=Te(),[h,g]=S.useState(null),[m,p]=S.useState(!1),v=ze(j=>j.breakpoints.down("xl")),{componentDid:w=""}=lt(),[T,x]=S.useState(null),b=()=>{l.getProjects({input:{did:f.meta.did,componentDid:w,tenantScope:n}}).then(j=>{const P=(j==null?void 0:j.projects)||[];c(!1),x(P)}).catch(j=>{c(!1),W.error(j.message)})},I=()=>{o(`${H.UNOWNED_DID}/create/none`,{replace:!0})},L=j=>{g(j)},D=()=>{c(!1),p(!0)},k=()=>{p(!1),g(null)},_=j=>{W.error(j.message),p(!1),g(null)},N=j=>{if(!(j!=null&&j.deleted)){W.error("Delete project failed");return}b(),p(!1),g(null)},U=(j,P,E)=>{let F=j==null?void 0:j.trim();return F?(F=ds.toAddress(F).toLocaleLowerCase(),E.some((O,R)=>{const q=P[R];return q&&O.searchable&&O.display!=="excluded"&&O.display!=="false"&&q.toLocaleLowerCase().includes(F)})):!0};if(S.useEffect(()=>{b()},[]),!T&&a)return t.jsx(u,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:t.jsx(Ve,{})});if(!T)return null;if(!T.length)return t.jsxs(u,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[t.jsx(u,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:r("blocklet.publish.blockletEmptyTip")}),t.jsx(u,{sx:{fontSize:14,color:"text.secondary",mb:3},children:r("blocklet.publish.createBlockletTip")}),t.jsx(ot,{onClick:I,variant:"contained",children:r("blocklet.publish.createBlocklet")})]});const y=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:j=>{const P=T[j];return t.jsx(ce,{to:`${P.id}`,children:t.jsx(Vt,{did:f.meta.did,projectId:P.id,logo:P.blockletLogo,title:P.blockletTitle,describe:P.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{searchable:!1,customBodyRender:j=>j?t.jsx(on,{type:"success",children:j}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:j=>j?t.jsx(xo,{size:14,compact:!0,responsive:!1,did:j}):null}},v||w?null:{label:r("common.createdBy"),name:"createdBy",options:{customBodyRender:j=>j?t.jsx(xo,{onClick:()=>{o(`/.well-known/service/admin/members?did=${j}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:j}):null}},v||w?null:{label:r("common.scope"),name:"componentDid",options:{customBodyRender:j=>{const P=(f.children||[]).find(E=>E.meta.did===j);return P?t.jsxs(u,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[t.jsx(Nt,{size:14,blocklet:P,ancestors:[f]}),t.jsx(u,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:P.meta.title})]},j):""}}},v||n?null:{label:r("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:j=>t.jsx(u,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:t.jsx(he,{children:j})})}},{label:r("common.updatedAt"),name:"updatedAt",options:{searchable:!1,customBodyRender:j=>t.jsx(nn,{value:Number(j),locale:s})}},{label:r("common.actions"),name:"actions",options:{searchable:!1,customBodyRenderLite:j=>{const P=T[j];return t.jsxs(u,{display:"flex",children:[t.jsx(ce,{to:`${P.id}/new-release/${P.lastReleaseId}`,children:t.jsx(pe,{title:r("blocklet.publish.createRelease"),placement:"top",children:t.jsx(ne,{color:"primary","aria-label":"create",children:t.jsx(cn,{style:{fontSize:18}})})})}),!!P.lastReleaseId&&t.jsx(pe,{title:r("blocklet.publish.viewLastRelease",{name:P.blockletTitle}),placement:"top",children:t.jsx(ne,{color:"secondary","aria-label":"create",children:t.jsx(ce,{style:{display:"flex"},to:`${P.id}/view/${P.lastReleaseId}`,children:t.jsx(an,{sx:{fontSize:18}})})})}),t.jsx(pe,{title:r("blocklet.publish.delete",{name:P.blockletTitle}),placement:"top",children:t.jsx(ne,{color:"primary","aria-label":"delete",onClick:()=>L(P),children:t.jsx(sn,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),C=m?t.jsx(as,{open:!0,popup:!0,onClose:k,action:"check-has-project-id",locale:s,checkFn:i.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:N,onError:_,extraParams:{projectId:h.id,did:f.meta.did,name:h.blockletTitle},messages:{title:r("blocklet.publish.deleteProject.title",{name:h.blockletTitle}),scan:r("blocklet.publish.deleteProject.scan",{name:h.blockletTitle}),confirm:r("blocklet.publish.deleteProject.confirm"),success:r("blocklet.publish.deleteProject.success")}}):null;return t.jsxs(u,{children:[t.jsxs(u,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[t.jsxs(u,{display:"flex",flexDirection:"row",alignItems:"center",children:[t.jsx(u,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:r("common.blockletStudio")}),t.jsx(pe,{title:r("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:t.jsx(dn,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),t.jsxs(ot,{onClick:I,variant:"contained",children:[t.jsx(qt,{style:{fontSize:"1.3em",marginRight:4}}),r("blocklet.publish.createBlocklet")]})]}),t.jsx(Pt,{className:"main-table",locale:s,data:T,columns:y,options:{sort:!1,download:!1,filter:!1,print:!1,search:!0,viewColumns:!1,searchAlwaysOpen:!0,rowsPerPageOptions:[10,20,50,100],searchPlaceholder:r("blocklet.list.searchPlaceholder"),searchDebounceTime:400,customSearch:U}}),h&&t.jsx($t,{title:`${r("common.delete")} ${h.blockletTitle}`,description:r("blocklet.publish.deleteProject.description"),confirm:r("common.confirm"),onConfirm:D,onCancel:()=>g(null),children:t.jsx(u,{sx:{marginTop:2},children:[r("blocklet.publish.deleteProject.tip1"),r("blocklet.publish.deleteProject.tip2"),r("blocklet.publish.deleteProject.tip3")].map(j=>t.jsxs(u,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[t.jsx(gs,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),t.jsx(A,{component:"span",variant:"inherit",color:"text.secondary",children:j})]}))})}),C]})}Wt.propTypes={initUrl:d.object};Wt.defaultProps={initUrl:null};var Ut={},Xs=be;Object.defineProperty(Ut,"__esModule",{value:!0});var un=Ut.default=void 0,Js=Xs(ge()),wo=t;un=Ut.default=(0,Js.default)([(0,wo.jsx)("path",{d:"M20 17H4V5h8V3H4c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h4v2h8v-2h4c1.1 0 2-.9 2-2v-3h-2z"},"0"),(0,wo.jsx)("path",{d:"m17 14 5-5-1.41-1.41L18 10.17V3h-2v7.17l-2.59-2.58L12 9z"},"1")],"InstallDesktop");function Qs(){var D;const{t:e,locale:o}=Q(),{projectId:n}=lt(),{api:r}=xe(),[s,l]=S.useState(!0),{blocklet:i}=Te(),a=ze(k=>k.breakpoints.down("md")),[c,f]=S.useState(null),[h,g]=S.useState(null),[m,p]=S.useState(null),v=(D=window.env)==null?void 0:D.serverEndpoint,w=()=>{r.getReleases({input:{did:i.meta.did,projectId:n}}).then(k=>{const _=(k==null?void 0:k.releases)||[];l(!1),f(_)}).catch(k=>{l(!1),W.error(k.message)})},T=()=>{r.doBatchQuery({getProject:{input:{did:i.meta.did,projectId:n}},getReleases:{input:{did:i.meta.did,projectId:n}}}).then(k=>{g(k.getProject.project||{}),f(k.getReleases.releases||[]),l(!1)}).catch(k=>{l(!1),W.error(k.message)})};S.useEffect(()=>{T()},[]);const x=()=>{l(!1);const k=m.id;r.deleteRelease({input:{did:i.meta.did,projectId:n,releaseId:k}}).then(()=>{l(!1),w(),W.success(e("common.removeSuccess")),p(null)}).catch(_=>{l(!1),W.error(_.message)})},b=k=>{p(k)};if(!c&&s)return t.jsx(u,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:t.jsx(Ve,{})});if(!c)return null;const I=t.jsxs(Uo,{className:"breadcrumbs","aria-label":"breadcrumb",children:[t.jsx(ce,{to:"..",children:e("common.blockletStudio")}),t.jsx(A,{color:"text.primary",children:t.jsx(he,{maxLength:a?6:30,children:h.blockletTitle})})]});if(!c.length)return t.jsxs(t.Fragment,{children:[I,t.jsxs(u,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[t.jsx(u,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:e("blocklet.publish.releaseEmptyTip")}),t.jsx(u,{sx:{fontSize:14,color:"text.secondary",mb:3},children:e("blocklet.publish.createReleaseTip")}),t.jsx(ce,{to:"create/none",children:t.jsx(ot,{variant:"contained",children:e("blocklet.publish.createRelease")})})]})]});const L=[{label:e("common.version"),name:"blockletVersion",minWidth:160,options:{customBodyRenderLite:k=>{const _=c[k];return t.jsx(ce,{to:`view/${_.id}`,children:t.jsx(Vt,{did:i.meta.did,projectId:h.id,logo:_.blockletLogo,title:_.blockletVersion,describe:_.blockletTitle})})}}},{label:e("blocklet.publish.releaseNote"),name:"note",options:{customBodyRenderLite:k=>{const _=c[k];return t.jsx(A,{className:"note",children:_.note||""})}}},{label:e("common.status"),name:"status",options:{customBodyRender:k=>t.jsx(on,{type:k==="published"?"success":"warning",children:k==="published"?"Released":js(k)})}},{label:e("common.lastPublishedAt"),name:"updatedAt",options:{customBodyRenderLite:k=>{const _=c[k];return _.status!==ie.PROJECT.RELEASE_STATUS.published?"":t.jsx(nn,{value:Number(_.updatedAt),locale:o})}}},{label:e("common.actions"),name:"actions",options:{customBodyRenderLite:k=>{var j;const _=c[k];let N="",U="";const y=_.status==="published";if(y){const P=ae(v,`/api/project/${i.meta.did}/${h.id}/${h.lastReleaseId}/release/blocklet.json`),E=new URL(v);E.pathname=ae(E.pathname,"/launch-blocklet/agreement"),E.searchParams.set("blocklet_meta_url",P),N=E.href,U=ae(`${H.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${i.meta.did}/${h.id}/${h.lastReleaseId}/download/${(h.lastReleaseFiles||[])[0]}`)}const C=(j=h.blockletComponents)!=null&&j.some(P=>P.included)||_.uploadedResource?"pack":"resource";return t.jsxs(u,{display:"flex",alignItems:"center",children:[y&&C==="pack"&&t.jsx(pe,{title:e("blocklet.publish.install",{name:h.blockletTitle}),placement:"top",children:t.jsx(ne,{color:"secondary","aria-label":"create",children:t.jsx("a",{style:{display:"flex"},href:N,target:"_blank",rel:"noreferrer",children:t.jsx(un,{sx:{fontSize:18}})})})}),y&&t.jsx(pe,{title:e("blocklet.publish.download",{name:h.blockletTitle}),placement:"top",children:t.jsx(ne,{color:"primary","aria-label":"download",children:t.jsx("a",{style:{display:"flex"},href:U,children:t.jsx(ks,{sx:{fontSize:18}})})})}),t.jsx(pe,{title:e("blocklet.publish.delete",{name:h.blockletTitle}),placement:"top",children:t.jsx(ne,{color:"primary","aria-label":"delete",onClick:()=>b(_),children:t.jsx(sn,{sx:{fontSize:18}})})})]})}}}];return t.jsxs(Ys,{children:[t.jsxs(u,{className:"header",children:[I,t.jsx(ce,{to:"new-release/none",children:t.jsxs(ot,{variant:"contained",children:[t.jsx(qt,{style:{fontSize:"1.3em",marginRight:4}}),e("blocklet.publish.createRelease")]})})]}),t.jsx(Pt,{className:"main-table",verticalKeyWidth:100,locale:o,data:c,columns:L,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),m&&t.jsx($t,{title:e(`${e("common.delete")} ${m.blockletVersion}`),description:e("blocklet.publish.deleteReleaseTip"),confirm:e("common.confirm"),onConfirm:x,onCancel:()=>p(null)})]})}const Ys=de(u)`
|
|
3
3
|
.header {
|
|
4
4
|
display: flex;
|
|
5
5
|
align-items: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as h}from"./vendor-react-D-afvo_7.js";import{j as e,a1 as Ne,E as y,a4 as qe,T as U,a3 as w,aa as ue,a2 as pe,ah as Ue,aj as Re,x as Te,R as Me,bH as De,bI as $e,aP as Ve,al as Se,V as He,cn as Ge,cm as Je,aN as Qe,bL as Xe,A as Ie}from"./vendor-mui-core-xF5F4eT7.js";import{b as se,z as Ye,A as Ze,ap as re}from"./vendor-utils-5TjOM6td.js";import{b as M,j as Q,$ as Ae,aC as V,e as ne,a6 as et,am as tt,B as Ee,bj as st,aU as nt,bA as at}from"./vendor-arcblock-DZrZ_x_3.js";import{y as it,F as B,m as ot,H as ye}from"./index-LIf2LIyz.js";import{d as J,a as rt}from"./vendor-hooks-BKxTDk_P.js";import{b as he}from"./dashboard-Cgj1BkGn.js";import{p as lt}from"./util-NSOsPZWM.js";import{W as ke}from"./did-address-D0Fo5eTl.js";import{S as te}from"./shorten-label-J69eHfMN.js";import{I as je}from"./index-DGzAI_hi.js";import{c as ve}from"./index-DoZ2YM4T.js";import{S as ct,a as dt}from"./list-DI-9r9EP.js";import{R as Le}from"./relative-time-DpRjdL5Z.js";import{D as ut,g as pt}from"./traffic-DelPjTGb.js";import{B as Oe}from"./bundle-avatar-CYdInmjR.js";import{B as ft}from"./index-0u5pzPhR.js";import"./useLocalStorage-DV4AIe5L.js";import"./confirm-CpCj_oj-.js";import"./format-error-C0Ke3VXF.js";import"./PlayArrow-DZfknrYj.js";import"./get-safe-url-Du4BhDgB.js";import"./session-CM1ewS-k.js";import"./useAsyncRetry-Bmo6a1Zp.js";import"./useAsync-Ua5iss51.js";import"./InfoOutlined-C_J3Y0fX.js";import"./useSetState-Crt4S51m.js";import"./index-CHFvfli7.js";import"./iframe-CU0LfRyS.js";import"./LaunchOutlined-DaJw5LME.js";import"./ChevronLeft-CmbkC1dP.js";import"./ChevronRight-DlIj8Fj2.js";import"./index-C-D-nCB1.js";import"./vendor-mui-x-CSUdon8K.js";const Pe=h.createContext({}),{Provider:mt,Consumer:Ss}=Pe;function ht({children:t,blocklet:i=""}){const{api:a,inService:f,ws:{useSubscription:m}}=it(),[u,c]=h.useState([]),[j,A]=h.useState({total:0,pageSize:20,pageCount:0,page:1}),[R,_]=h.useState(!1),E=J(()=>{var T;return(T=i.meta)==null?void 0:T.did},[i]),[K,Y]=h.useState({}),[O,H]=h.useState([]),F=async({page:T=1,pageSize:L=20,...C}={})=>{if(!(R||!E))try{_(!0);const I={paging:{page:T,pageSize:L},...C,userName:C.searchText||"",teamDid:E,dateRange:C.dateRange?[B(C.dateRange[0]).toISOString(),B(C.dateRange[1]).toISOString()]:void 0},{dids:W,...Z}=I;let G="";W.includes("system")&&(G="system");const q=W.filter(z=>z!=="system"),ee=await a.getNotificationSendLog({input:{...Z,source:G,componentDids:q}});Y(I);const ae=ee.list.map(z=>({...z,receiverUser:{...z.receiverUser,avatar:lt(z.receiverUser.avatar,E,f)}}));c(ae),A(ee.paging),_(!1)}catch(I){Q.error(I.message),_(!1)}},g=async()=>{const T=await a.getNotificationComponents({input:{teamDid:E}});H(T.componentDids)},D=h.useCallback(T=>{const L=i.children.find(C=>{var I;return((I=C.meta)==null?void 0:I.did)===T});if(L)return L.ancestors=[i],L},[i]),k=async({notificationReceiverIds:T,channels:L,...C})=>{await a.resendNotification({input:{teamDid:E,notificationReceiverIds:T,channels:L.map(I=>I==="wallet"?M.NOTIFICATION_SEND_CHANNEL.WALLET:I==="pushKit"?M.NOTIFICATION_SEND_CHANNEL.PUSH:I),...C}})},$=h.useCallback(async T=>(await a.getUser({input:{teamDid:E,user:{did:T}}})).user,[a,E]);m(`${M.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,T=>{T&&(F(K),g())},[K]),h.useEffect(()=>{E&&g()},[E]);const S={loading:R,fetch:F,data:u,paging:j,blocklet:i,getComponent:D,resendNotification:k,getUser:$,componentDids:O};return e.jsx(mt,{value:{notificationRecords:S},children:t})}function Fe(){const{notificationRecords:t}=h.useContext(Pe);return t}var xe={},gt=Ne;Object.defineProperty(xe,"__esModule",{value:!0});var ze=xe.default=void 0,xt=gt(Ae()),bt=e;ze=xe.default=(0,xt.default)((0,bt.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block");var be={},St=Ne;Object.defineProperty(be,"__esModule",{value:!0});var Be=be.default=void 0,yt=St(Ae()),jt=e;Be=be.default=(0,yt.default)((0,jt.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline");const vt=(t,i,a="")=>{if(!a||!i)return"";switch(a){case M.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:i});case M.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:i});case M.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:i});case M.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return a}};function de(t,i,a={}){const{status:f,updatedAt:m,reason:u="",channel:c="wallet"}=a,j=m?t("notification.sendStatus.sentTime",{date:ot(m,i)}):"",A=vt(t,c,u);return f===M.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:j,reason:A}:f===M.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:j}:{status:"pending",title:t("notification.sendStatus.pending"),reason:A,sentTime:j}}const we={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},ge=["wallet","pushKit","email"],wt=(t,i)=>{var m,u;const{settings:a}=t,f=se(i,"extra.notifications.email",!0);return{available:(u=(m=a==null?void 0:a.notification)==null?void 0:m.email)==null?void 0:u.enabled,enabled:f}},Ct=(t,i)=>{var m,u;const{settings:a}=t,f=se(i,"extra.notifications.push",!0);return{available:(u=(m=a==null?void 0:a.notification)==null?void 0:m.pushKit)==null?void 0:u.enabled,enabled:f}},Nt=t=>({enabled:se(t,"extra.notifications.wallet",!0)}),Rt=t=>({enabled:se(t,"extra.webhooks",[]).length>0}),Ce=(t=3e3)=>new Promise(i=>{setTimeout(()=>{i()},t)}),Tt=(t,i)=>i==="wallet"||i==="webhook"?[{channel:i,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:i}),fail:t("notification.sendStatus.reason.disabled",{channel:i})}]:i==="pushKit"||i==="email"?[{channel:i,type:"available",pass:t("notification.sendStatus.reason.available",{channel:i}),fail:t("notification.sendStatus.reason.unavailable",{channel:i})},{channel:i,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:i}),fail:t("notification.sendStatus.reason.disabled",{channel:i})}]:[],Dt=t=>{const i={},a=B().startOf("day");ge.forEach(u=>{const c=`${u}SendRecord`,A=se(t,c,[]).filter(R=>B(R.sendAt).isSame(a,"day")).length;i[u]=A});const f=se(t,"webhook",{}),m=Object.keys(f??{})??[];return m.length>0&&m.forEach(u=>{const j=(f[u]??[]).filter(A=>B(A.sendAt).isSame(a,"day")).length;i[u]=j}),i};function X({config:t,enableTooltip:i=!0,showTitle:a=!1}){const{status:f,title:m="",sentTime:u="",reason:c=""}=t,j=[m,c].filter(Boolean).join(", ");return e.jsx(qe,{title:i?e.jsxs(e.Fragment,{children:[e.jsx(U,{color:"inherit",sx:{fontSize:12},children:j}),e.jsx("span",{children:u})]}):null,arrow:!0,placement:"top",children:e.jsxs(w,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:1},children:[e.jsxs(w,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",children:[e.jsx(w,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:we[f],style:{opacity:.15}}),e.jsx(w,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:we[f]})]}),a?e.jsx(U,{color:"inherit",sx:{fontSize:12},children:m}):null]})})}X.propTypes={config:y.object.isRequired,enableTooltip:y.bool,showTitle:y.bool};X.defaultProps={enableTooltip:!0,showTitle:!1};_e.propTypes={notification:y.object.isRequired,onCancel:y.func,blocklet:y.object.isRequired,resendChannel:y.string,refresh:y.func,tab:y.string};function _e({notification:t,onCancel:i=()=>{},blocklet:a,resendChannel:f="",refresh:m=()=>{},tab:u="info"}){const{t:c,locale:j}=ne(),{getComponent:A,resendNotification:R,getUser:_}=Fe(),[E,K]=h.useState([]),[Y,O]=h.useState([]),[H,F]=h.useState(null),[g,D]=h.useState(null),k=h.useRef({}),$=J(()=>A(t.componentDid)||a,[a,t.componentDid]),S=J(()=>{var s;return(s=t==null?void 0:t.receivers)==null?void 0:s[0]},[t.receivers]),T=J(()=>S==null?void 0:S.receiver,[S]),L=J(()=>S==null?void 0:S.receiverUser,[S]),C=rt({tab:u||"info"}),I=J(()=>Dt(S),[S]),W=h.useCallback(async s=>{const{receiver:l}=S??{};if(!l)return!1;const p=await _(l);return p?s==="wallet"?Nt(p):s==="email"?wt(a,p):s==="pushKit"?Ct(a,p):s==="webhook"?Rt(p):!0:!1},[S,_,a]);h.useEffect(()=>{if(!S)K([]);else{const s=ge.map(p=>{const b=S[`${p}SendStatus`],v=S[`${p}SendAt`],P=S[`${p}SendFailedReason`],We=de(c,j,{status:b,updatedAt:v,reason:P,channel:p});return{type:p==="pushKit"?"Push Kit":p,extra:We}});K(s);const l=(S==null?void 0:S.webhook)||{};O(Object.entries(l))}},[S,j,c]);const Z=h.useCallback(async(s,l="")=>{const{id:p}=S??{};if(p)try{await R({notificationReceiverIds:[p],channels:[s],...s==="webhook"&&l?{webhookUrls:[l]}:{}}),Q.success("Message has been sent!"),s!=="webhook"&&(await Ce(1e3),F(null))}catch(b){console.error("handleResend error",{error:b}),Q.error(b.response?b.response.statusText:b.message)}},[R,S]),G=async(s,l)=>{if(l==null||l.stopPropagation(),I[s.type]>=4){Q.warning(c("notification.resendLimit"));return}if(l&&F(l==null?void 0:l.currentTarget),D({channel:s.type}),!(!s||s.checking)){K(b=>b.map(v=>s.type===v.type?{...v,checking:!0}:v));try{const b=await W(s.type);await Ce(),D({channel:s.type,result:b}),(typeof b=="boolean"&&b||Ye(b)&&Object.values(b).every(v=>!!v))&&(await Z(s.type),m()),K(v=>v.map(P=>s.type===P.type?{...P,checking:!1}:P))}catch(b){console.error("handleResend error",{error:b})}}},q=async(s,l=null)=>{if(l==null||l.stopPropagation(),I[s]>=4){Q.warning(c("notification.resendLimit"));return}O(b=>b.map(v=>s===v[0]?[...v.slice(0,2),!0]:v));try{await Z("webhook",s),O(b=>b.map(v=>s===v[0]?[...v.slice(0,2),!0]:v)),m()}catch(b){console.error("handleResend error",{error:b})}};h.useEffect(()=>{f&&(C.tab="status",setTimeout(()=>{const s=k.current[f];s&&(ge.includes(f)?(F(s),G({type:f})):q(f))},500))},[f]);const ee=()=>{F(null)},ae=h.useCallback(s=>Tt(c,s),[c]),z=!!H,o=z?"check-resend-popover":void 0;function n(){return[{name:c("notification.from"),value:e.jsx(ct,{size:32,blocklet:$,showName:!0,hideDot:!0})},{name:c("notification.to"),value:e.jsx(w,{children:L?e.jsxs(w,{"data-cy":`member-name-${L.fullName}`,display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start",children:[e.jsx(Ee,{src:`${L.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:T,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(te,{children:L.fullName})]},T):e.jsx(ke,{size:14,responsive:!1,compact:!0,copyable:!1,did:T})})},{name:c("notification.notificationTitle"),value:e.jsx(te,{maxLength:50,children:t.title})},{name:c("notification.body"),value:e.jsx(dt,{notification:t,rows:0})},{name:c("notification.createdAt"),value:e.jsx(Le,{value:t.createdAt,locale:j,shouldUpdate:!0})}].map(l=>e.jsx(je,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:l.name,children:l.value},l.name))}const r={info:{label:c("common.basicInfo"),value:"info",component:n},status:{label:c("notification.status"),value:"status"}},d=Object.values(r).map(({label:s,value:l})=>({label:s,value:l})),x=r[C.tab]||r.info,N=s=>{C.tab=s};return e.jsx(et,{title:c("notification.notificationDetails"),onClose:()=>{C.tab="info",F(null),i()},open:!0,PaperProps:{style:{maxWidth:832,maxHeight:"80vh"}},sx:{"& .MuiDialogContent-root":{paddingTop:0}},fullWidth:!0,actionsPosition:"left",children:e.jsxs(It,{children:[e.jsx(w,{mx:3,className:"tabs",children:e.jsx(tt,{tabs:d,current:C.tab,onChange:N,scrollButtons:"auto"})}),e.jsx("div",{className:"body",children:C.tab==="info"?e.jsx(x.component,{}):e.jsxs(w,{children:[E.map(s=>e.jsx(je,{valueComponent:"div",nameWidth:120,name:s.type,children:e.jsxs(w,{className:"channel-item",display:"flex",alignItems:"center",sx:{gap:"4px",fontSize:14},children:[e.jsx(w,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(X,{config:s.extra,showTitle:!0})}),s.extra.status!=="success"&&e.jsxs(U,{ref:l=>{k.current[s.type]=l},component:"span",display:"flex",alignItems:"center",sx:{color:V.primary.main,fontSize:14},className:ve("resend-btn",{disabled:s.checking||I[s.type]>=4}),onClick:l=>G(s,l),children:[s.checking?e.jsx(pe,{size:12,sx:{color:V.primary.main}}):e.jsx(he,{}),e.jsx("span",{style:{marginLeft:4},children:c("notification.resend")})]})]})},s.type)),e.jsx(Ue,{textAlign:"left",sx:{mt:1,mb:1},children:"Webhook"}),e.jsx(w,{className:"notification-resend-section",display:"flex",flexDirection:"column",gap:1,style:{paddingLeft:0},children:Y.map(([s,l,p])=>{const b=l[0],v=de(c,j,{...b,updatedAt:b.sendAt,reason:b.failedReason,channel:"webhook"});return e.jsxs(w,{className:"channel-item",display:"flex",alignItems:"center",sx:{gap:"4px",fontSize:12},children:[e.jsx(te,{maxLength:30,children:s}),e.jsx(w,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(X,{config:v,showTitle:!0})}),v.status!=="success"&&e.jsxs(U,{ref:P=>{k.current[s]=P},component:"span",sx:{color:V.primary.main},className:ve("resend-btn",{disabled:p||I[s]>=4}),onClick:P=>q(s,P),children:[p?e.jsx(pe,{size:12,sx:{color:V.primary.main}}):e.jsx(he,{}),e.jsx("span",{style:{marginLeft:4},children:c("notification.resend")})]})]},s)})})]})}),e.jsx(Re,{id:o,open:z,anchorEl:H,onClose:ee,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(At,{children:[e.jsxs(U,{variant:"body1",component:"div",className:"check-title",children:[g==null?void 0:g.channel," Checking"]}),e.jsx(w,{display:"flex",flexDirection:"column",sx:{gap:"4px"},children:ae(g==null?void 0:g.channel).map(s=>{var v,P;const{type:l,pass:p,fail:b}=s;return!(g!=null&&g.result)||(v=g==null?void 0:g.result)!=null&&v[l]?e.jsxs(U,{variant:"body1",component:"div",className:"check-item",display:"flex",alignItems:"center",sx:{gap:"4px",color:(P=g==null?void 0:g.result)!=null&&P[l]?V.success.main:"inherit"},children:[g!=null&&g.result?e.jsx(Be,{}):e.jsx(pe,{size:12,sx:{color:V.primary.main}}),e.jsx("span",{children:p})]},l):e.jsxs(U,{variant:"body1",component:"div",display:"flex",alignItems:"center",className:"check-item",sx:{gap:"4px",color:V.error.main},children:[e.jsx(ze,{}),e.jsx("span",{children:b})]},l)})})]})})]})})}const It=ue.div`
|
|
1
|
+
import{r as h}from"./vendor-react-D-afvo_7.js";import{j as e,a1 as Ne,E as y,a4 as qe,T as U,a3 as w,aa as ue,a2 as pe,ah as Ue,aj as Re,x as Te,R as Me,bH as De,bI as $e,aP as Ve,al as Se,V as He,cn as Ge,cm as Je,aN as Qe,bL as Xe,A as Ie}from"./vendor-mui-core-xF5F4eT7.js";import{b as se,z as Ye,A as Ze,ap as re}from"./vendor-utils-5TjOM6td.js";import{b as M,j as Q,$ as Ae,aC as V,e as ne,a6 as et,am as tt,B as Ee,bj as st,aU as nt,bA as at}from"./vendor-arcblock-DZrZ_x_3.js";import{y as it,F as B,m as ot,H as ye}from"./index-LIf2LIyz.js";import{d as J,a as rt}from"./vendor-hooks-BKxTDk_P.js";import{b as he}from"./dashboard-Cgj1BkGn.js";import{p as lt}from"./util-NSOsPZWM.js";import{W as ke}from"./did-address-D0Fo5eTl.js";import{S as te}from"./shorten-label-J69eHfMN.js";import{I as je}from"./index-DGzAI_hi.js";import{c as ve}from"./index-DoZ2YM4T.js";import{S as ct,a as dt}from"./list-DI-9r9EP.js";import{R as Le}from"./relative-time-DpRjdL5Z.js";import{D as ut,g as pt}from"./traffic-DelPjTGb.js";import{B as Oe}from"./bundle-avatar-CYdInmjR.js";import{B as ft}from"./index-0u5pzPhR.js";import"./useLocalStorage-DV4AIe5L.js";import"./confirm-CpCj_oj-.js";import"./format-error-C0Ke3VXF.js";import"./PlayArrow-DZfknrYj.js";import"./get-safe-url-DDeO6YpV.js";import"./session-CM1ewS-k.js";import"./useAsyncRetry-Bmo6a1Zp.js";import"./useAsync-Ua5iss51.js";import"./InfoOutlined-C_J3Y0fX.js";import"./useSetState-Crt4S51m.js";import"./index-CHFvfli7.js";import"./iframe-CU0LfRyS.js";import"./LaunchOutlined-DaJw5LME.js";import"./ChevronLeft-CmbkC1dP.js";import"./ChevronRight-DlIj8Fj2.js";import"./index-C-D-nCB1.js";import"./vendor-mui-x-CSUdon8K.js";const Pe=h.createContext({}),{Provider:mt,Consumer:Ss}=Pe;function ht({children:t,blocklet:i=""}){const{api:a,inService:f,ws:{useSubscription:m}}=it(),[u,c]=h.useState([]),[j,A]=h.useState({total:0,pageSize:20,pageCount:0,page:1}),[R,_]=h.useState(!1),E=J(()=>{var T;return(T=i.meta)==null?void 0:T.did},[i]),[K,Y]=h.useState({}),[O,H]=h.useState([]),F=async({page:T=1,pageSize:L=20,...C}={})=>{if(!(R||!E))try{_(!0);const I={paging:{page:T,pageSize:L},...C,userName:C.searchText||"",teamDid:E,dateRange:C.dateRange?[B(C.dateRange[0]).toISOString(),B(C.dateRange[1]).toISOString()]:void 0},{dids:W,...Z}=I;let G="";W.includes("system")&&(G="system");const q=W.filter(z=>z!=="system"),ee=await a.getNotificationSendLog({input:{...Z,source:G,componentDids:q}});Y(I);const ae=ee.list.map(z=>({...z,receiverUser:{...z.receiverUser,avatar:lt(z.receiverUser.avatar,E,f)}}));c(ae),A(ee.paging),_(!1)}catch(I){Q.error(I.message),_(!1)}},g=async()=>{const T=await a.getNotificationComponents({input:{teamDid:E}});H(T.componentDids)},D=h.useCallback(T=>{const L=i.children.find(C=>{var I;return((I=C.meta)==null?void 0:I.did)===T});if(L)return L.ancestors=[i],L},[i]),k=async({notificationReceiverIds:T,channels:L,...C})=>{await a.resendNotification({input:{teamDid:E,notificationReceiverIds:T,channels:L.map(I=>I==="wallet"?M.NOTIFICATION_SEND_CHANNEL.WALLET:I==="pushKit"?M.NOTIFICATION_SEND_CHANNEL.PUSH:I),...C}})},$=h.useCallback(async T=>(await a.getUser({input:{teamDid:E,user:{did:T}}})).user,[a,E]);m(`${M.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,T=>{T&&(F(K),g())},[K]),h.useEffect(()=>{E&&g()},[E]);const S={loading:R,fetch:F,data:u,paging:j,blocklet:i,getComponent:D,resendNotification:k,getUser:$,componentDids:O};return e.jsx(mt,{value:{notificationRecords:S},children:t})}function Fe(){const{notificationRecords:t}=h.useContext(Pe);return t}var xe={},gt=Ne;Object.defineProperty(xe,"__esModule",{value:!0});var ze=xe.default=void 0,xt=gt(Ae()),bt=e;ze=xe.default=(0,xt.default)((0,bt.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block");var be={},St=Ne;Object.defineProperty(be,"__esModule",{value:!0});var Be=be.default=void 0,yt=St(Ae()),jt=e;Be=be.default=(0,yt.default)((0,jt.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline");const vt=(t,i,a="")=>{if(!a||!i)return"";switch(a){case M.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:i});case M.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:i});case M.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:i});case M.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return a}};function de(t,i,a={}){const{status:f,updatedAt:m,reason:u="",channel:c="wallet"}=a,j=m?t("notification.sendStatus.sentTime",{date:ot(m,i)}):"",A=vt(t,c,u);return f===M.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:j,reason:A}:f===M.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:j}:{status:"pending",title:t("notification.sendStatus.pending"),reason:A,sentTime:j}}const we={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},ge=["wallet","pushKit","email"],wt=(t,i)=>{var m,u;const{settings:a}=t,f=se(i,"extra.notifications.email",!0);return{available:(u=(m=a==null?void 0:a.notification)==null?void 0:m.email)==null?void 0:u.enabled,enabled:f}},Ct=(t,i)=>{var m,u;const{settings:a}=t,f=se(i,"extra.notifications.push",!0);return{available:(u=(m=a==null?void 0:a.notification)==null?void 0:m.pushKit)==null?void 0:u.enabled,enabled:f}},Nt=t=>({enabled:se(t,"extra.notifications.wallet",!0)}),Rt=t=>({enabled:se(t,"extra.webhooks",[]).length>0}),Ce=(t=3e3)=>new Promise(i=>{setTimeout(()=>{i()},t)}),Tt=(t,i)=>i==="wallet"||i==="webhook"?[{channel:i,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:i}),fail:t("notification.sendStatus.reason.disabled",{channel:i})}]:i==="pushKit"||i==="email"?[{channel:i,type:"available",pass:t("notification.sendStatus.reason.available",{channel:i}),fail:t("notification.sendStatus.reason.unavailable",{channel:i})},{channel:i,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:i}),fail:t("notification.sendStatus.reason.disabled",{channel:i})}]:[],Dt=t=>{const i={},a=B().startOf("day");ge.forEach(u=>{const c=`${u}SendRecord`,A=se(t,c,[]).filter(R=>B(R.sendAt).isSame(a,"day")).length;i[u]=A});const f=se(t,"webhook",{}),m=Object.keys(f??{})??[];return m.length>0&&m.forEach(u=>{const j=(f[u]??[]).filter(A=>B(A.sendAt).isSame(a,"day")).length;i[u]=j}),i};function X({config:t,enableTooltip:i=!0,showTitle:a=!1}){const{status:f,title:m="",sentTime:u="",reason:c=""}=t,j=[m,c].filter(Boolean).join(", ");return e.jsx(qe,{title:i?e.jsxs(e.Fragment,{children:[e.jsx(U,{color:"inherit",sx:{fontSize:12},children:j}),e.jsx("span",{children:u})]}):null,arrow:!0,placement:"top",children:e.jsxs(w,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:1},children:[e.jsxs(w,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",children:[e.jsx(w,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:we[f],style:{opacity:.15}}),e.jsx(w,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:we[f]})]}),a?e.jsx(U,{color:"inherit",sx:{fontSize:12},children:m}):null]})})}X.propTypes={config:y.object.isRequired,enableTooltip:y.bool,showTitle:y.bool};X.defaultProps={enableTooltip:!0,showTitle:!1};_e.propTypes={notification:y.object.isRequired,onCancel:y.func,blocklet:y.object.isRequired,resendChannel:y.string,refresh:y.func,tab:y.string};function _e({notification:t,onCancel:i=()=>{},blocklet:a,resendChannel:f="",refresh:m=()=>{},tab:u="info"}){const{t:c,locale:j}=ne(),{getComponent:A,resendNotification:R,getUser:_}=Fe(),[E,K]=h.useState([]),[Y,O]=h.useState([]),[H,F]=h.useState(null),[g,D]=h.useState(null),k=h.useRef({}),$=J(()=>A(t.componentDid)||a,[a,t.componentDid]),S=J(()=>{var s;return(s=t==null?void 0:t.receivers)==null?void 0:s[0]},[t.receivers]),T=J(()=>S==null?void 0:S.receiver,[S]),L=J(()=>S==null?void 0:S.receiverUser,[S]),C=rt({tab:u||"info"}),I=J(()=>Dt(S),[S]),W=h.useCallback(async s=>{const{receiver:l}=S??{};if(!l)return!1;const p=await _(l);return p?s==="wallet"?Nt(p):s==="email"?wt(a,p):s==="pushKit"?Ct(a,p):s==="webhook"?Rt(p):!0:!1},[S,_,a]);h.useEffect(()=>{if(!S)K([]);else{const s=ge.map(p=>{const b=S[`${p}SendStatus`],v=S[`${p}SendAt`],P=S[`${p}SendFailedReason`],We=de(c,j,{status:b,updatedAt:v,reason:P,channel:p});return{type:p==="pushKit"?"Push Kit":p,extra:We}});K(s);const l=(S==null?void 0:S.webhook)||{};O(Object.entries(l))}},[S,j,c]);const Z=h.useCallback(async(s,l="")=>{const{id:p}=S??{};if(p)try{await R({notificationReceiverIds:[p],channels:[s],...s==="webhook"&&l?{webhookUrls:[l]}:{}}),Q.success("Message has been sent!"),s!=="webhook"&&(await Ce(1e3),F(null))}catch(b){console.error("handleResend error",{error:b}),Q.error(b.response?b.response.statusText:b.message)}},[R,S]),G=async(s,l)=>{if(l==null||l.stopPropagation(),I[s.type]>=4){Q.warning(c("notification.resendLimit"));return}if(l&&F(l==null?void 0:l.currentTarget),D({channel:s.type}),!(!s||s.checking)){K(b=>b.map(v=>s.type===v.type?{...v,checking:!0}:v));try{const b=await W(s.type);await Ce(),D({channel:s.type,result:b}),(typeof b=="boolean"&&b||Ye(b)&&Object.values(b).every(v=>!!v))&&(await Z(s.type),m()),K(v=>v.map(P=>s.type===P.type?{...P,checking:!1}:P))}catch(b){console.error("handleResend error",{error:b})}}},q=async(s,l=null)=>{if(l==null||l.stopPropagation(),I[s]>=4){Q.warning(c("notification.resendLimit"));return}O(b=>b.map(v=>s===v[0]?[...v.slice(0,2),!0]:v));try{await Z("webhook",s),O(b=>b.map(v=>s===v[0]?[...v.slice(0,2),!0]:v)),m()}catch(b){console.error("handleResend error",{error:b})}};h.useEffect(()=>{f&&(C.tab="status",setTimeout(()=>{const s=k.current[f];s&&(ge.includes(f)?(F(s),G({type:f})):q(f))},500))},[f]);const ee=()=>{F(null)},ae=h.useCallback(s=>Tt(c,s),[c]),z=!!H,o=z?"check-resend-popover":void 0;function n(){return[{name:c("notification.from"),value:e.jsx(ct,{size:32,blocklet:$,showName:!0,hideDot:!0})},{name:c("notification.to"),value:e.jsx(w,{children:L?e.jsxs(w,{"data-cy":`member-name-${L.fullName}`,display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start",children:[e.jsx(Ee,{src:`${L.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:T,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(te,{children:L.fullName})]},T):e.jsx(ke,{size:14,responsive:!1,compact:!0,copyable:!1,did:T})})},{name:c("notification.notificationTitle"),value:e.jsx(te,{maxLength:50,children:t.title})},{name:c("notification.body"),value:e.jsx(dt,{notification:t,rows:0})},{name:c("notification.createdAt"),value:e.jsx(Le,{value:t.createdAt,locale:j,shouldUpdate:!0})}].map(l=>e.jsx(je,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:l.name,children:l.value},l.name))}const r={info:{label:c("common.basicInfo"),value:"info",component:n},status:{label:c("notification.status"),value:"status"}},d=Object.values(r).map(({label:s,value:l})=>({label:s,value:l})),x=r[C.tab]||r.info,N=s=>{C.tab=s};return e.jsx(et,{title:c("notification.notificationDetails"),onClose:()=>{C.tab="info",F(null),i()},open:!0,PaperProps:{style:{maxWidth:832,maxHeight:"80vh"}},sx:{"& .MuiDialogContent-root":{paddingTop:0}},fullWidth:!0,actionsPosition:"left",children:e.jsxs(It,{children:[e.jsx(w,{mx:3,className:"tabs",children:e.jsx(tt,{tabs:d,current:C.tab,onChange:N,scrollButtons:"auto"})}),e.jsx("div",{className:"body",children:C.tab==="info"?e.jsx(x.component,{}):e.jsxs(w,{children:[E.map(s=>e.jsx(je,{valueComponent:"div",nameWidth:120,name:s.type,children:e.jsxs(w,{className:"channel-item",display:"flex",alignItems:"center",sx:{gap:"4px",fontSize:14},children:[e.jsx(w,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(X,{config:s.extra,showTitle:!0})}),s.extra.status!=="success"&&e.jsxs(U,{ref:l=>{k.current[s.type]=l},component:"span",display:"flex",alignItems:"center",sx:{color:V.primary.main,fontSize:14},className:ve("resend-btn",{disabled:s.checking||I[s.type]>=4}),onClick:l=>G(s,l),children:[s.checking?e.jsx(pe,{size:12,sx:{color:V.primary.main}}):e.jsx(he,{}),e.jsx("span",{style:{marginLeft:4},children:c("notification.resend")})]})]})},s.type)),e.jsx(Ue,{textAlign:"left",sx:{mt:1,mb:1},children:"Webhook"}),e.jsx(w,{className:"notification-resend-section",display:"flex",flexDirection:"column",gap:1,style:{paddingLeft:0},children:Y.map(([s,l,p])=>{const b=l[0],v=de(c,j,{...b,updatedAt:b.sendAt,reason:b.failedReason,channel:"webhook"});return e.jsxs(w,{className:"channel-item",display:"flex",alignItems:"center",sx:{gap:"4px",fontSize:12},children:[e.jsx(te,{maxLength:30,children:s}),e.jsx(w,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(X,{config:v,showTitle:!0})}),v.status!=="success"&&e.jsxs(U,{ref:P=>{k.current[s]=P},component:"span",sx:{color:V.primary.main},className:ve("resend-btn",{disabled:p||I[s]>=4}),onClick:P=>q(s,P),children:[p?e.jsx(pe,{size:12,sx:{color:V.primary.main}}):e.jsx(he,{}),e.jsx("span",{style:{marginLeft:4},children:c("notification.resend")})]})]},s)})})]})}),e.jsx(Re,{id:o,open:z,anchorEl:H,onClose:ee,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(At,{children:[e.jsxs(U,{variant:"body1",component:"div",className:"check-title",children:[g==null?void 0:g.channel," Checking"]}),e.jsx(w,{display:"flex",flexDirection:"column",sx:{gap:"4px"},children:ae(g==null?void 0:g.channel).map(s=>{var v,P;const{type:l,pass:p,fail:b}=s;return!(g!=null&&g.result)||(v=g==null?void 0:g.result)!=null&&v[l]?e.jsxs(U,{variant:"body1",component:"div",className:"check-item",display:"flex",alignItems:"center",sx:{gap:"4px",color:(P=g==null?void 0:g.result)!=null&&P[l]?V.success.main:"inherit"},children:[g!=null&&g.result?e.jsx(Be,{}):e.jsx(pe,{size:12,sx:{color:V.primary.main}}),e.jsx("span",{children:p})]},l):e.jsxs(U,{variant:"body1",component:"div",display:"flex",alignItems:"center",className:"check-item",sx:{gap:"4px",color:V.error.main},children:[e.jsx(ze,{}),e.jsx("span",{children:b})]},l)})})]})})]})})}const It=ue.div`
|
|
2
2
|
& > .notification-row {
|
|
3
3
|
padding: 0;
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as H,t as Zn,g as Qn,e as Dr,a as Xn}from"./vendor-react-D-afvo_7.js";import{j as i,a3 as se,bH as Jt,bI as er,aP as tr,al as jt,T as qe,M as Et,a2 as nt,br as sr,ad as rt,E as B,aa as Te,a4 as ut,v as Jn,x as mn,aM as ei,a1 as ti,bm as ri,bn as ni,I as ii,aK as oi,aN as ai,bL as si}from"./vendor-mui-core-xF5F4eT7.js";import{p as Ie,B as rr,b as nr,T as ci,al as li,n as Ur,x as ui,y as fi}from"./vendor-utils-5TjOM6td.js";import{c as di}from"./index-DoZ2YM4T.js";import{b1 as ft,b2 as pi,b3 as mi,b4 as hn,b5 as hi,b6 as gi,b7 as yi,b8 as gn,b9 as bi,ba as cr,bb as vi,bc as xi,bd as wi,be as ji,o as lr,bf as yn,m as Ei,n as Si,e as _e,B as bn,D as Pi,a6 as Ge,a2 as je,at as Ci,Z as Oi,ae as Ai,a1 as dt,j as Ke,a0 as Ii,bg as vn,b as Ye,au as xn,bh as Ri,aB as Ni,am as Ti,aF as _i,aT as wn,a9 as Di,aU as jn,$ as Ui,bi as En,bj as qi,bk as ki}from"./vendor-arcblock-DZrZ_x_3.js";import{d as St}from"./Add-DSPtuudj.js";import{d as Li}from"./Loop-B05tzyuy.js";import{d as Bi}from"./ViewList-CgG45KQv.js";import{L as Ki,S as Fi,d as Sn}from"./list-header-BdJ1JRqY.js";import{$ as $i,f as Mi,y as Ce,ap as ur,m as Qe,a0 as Wi,M as Xe,aq as zi,h as Ze,B as Pn,ar as Cn,b as Vi}from"./index-LIf2LIyz.js";import{x as Hi,u as fr,a as On,k as Gi}from"./vendor-hooks-BKxTDk_P.js";import{u as De,d as qr,W as An}from"./dashboard-Cgj1BkGn.js";import{W as Pt}from"./did-address-D0Fo5eTl.js";import{P as Be}from"./permission-C0p6f4_S.js";import{C as Rt}from"./click-to-copy-Bu9H6mvL.js";import{f as Fe}from"./format-error-C0Ke3VXF.js";import{_ as Yi}from"./useAsync-Ua5iss51.js";import{I as Pe}from"./index-DGzAI_hi.js";import{d as Zi}from"./DeleteOutline-BzV7E1BM.js";import{C as pt}from"./confirm-CpCj_oj-.js";import{u as mt}from"./session-CM1ewS-k.js";import{i as In,a as Ct,p as Rn}from"./util-NSOsPZWM.js";import{b as Qi}from"./sdk-TBkp9MgA.js";import{p as Xi}from"./index-BA_7CRkd.js";import{A as Ji}from"./actions-CPjP-DJ-.js";import{S as eo}from"./shorten-label-J69eHfMN.js";import"./useLocalStorage-DV4AIe5L.js";import"./PlayArrow-DZfknrYj.js";import"./get-safe-url-Du4BhDgB.js";import"./index-0u5pzPhR.js";import"./useAsyncRetry-Bmo6a1Zp.js";import"./InfoOutlined-C_J3Y0fX.js";import"./useSetState-Crt4S51m.js";import"./MoreHoriz-JX8PbVXG.js";var dr={};Object.defineProperty(dr,"__esModule",{value:!0});var Nn=dr.default=void 0;to(H);var et=i;function to(e){return e&&e.__esModule?e:{default:e}}function kr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Lr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kr(Object(r),!0).forEach(function(n){ro(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ro(e,t,r){return(t=no(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function no(e){var t=io(e,"string");return typeof t=="symbol"?t:t+""}function io(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pr=function(t){return(0,et.jsxs)("svg",Lr(Lr({},t),{},{children:[(0,et.jsx)("g",{clipPath:"url(#clip0)",children:(0,et.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.99997 1.59778C8.19071 1.59778 7.39961 1.83775 6.72673 2.28736C6.05385 2.73697 5.5294 3.37601 5.21971 4.12367C4.91001 4.87134 4.82898 5.69405 4.98686 6.48777C5.14474 7.28149 5.53444 8.01056 6.10668 8.5828C6.67892 9.15504 7.408 9.54474 8.20172 9.70262C8.99544 9.8605 9.81815 9.77947 10.5658 9.46978C11.3135 9.16009 11.9525 8.63564 12.4021 7.96276C12.8517 7.28987 13.0917 6.49878 13.0917 5.68951C13.0917 4.60432 12.6606 3.56357 11.8933 2.79622C11.1259 2.02887 10.0852 1.59778 8.99997 1.59778ZM7.27426 3.9638C7.73195 3.50611 8.35271 3.24899 8.99997 3.24899C9.48266 3.24899 9.95452 3.39212 10.3559 3.66029C10.7572 3.92846 11.07 4.30962 11.2547 4.75556C11.4394 5.20151 11.4878 5.69222 11.3936 6.16563C11.2994 6.63905 11.067 7.07391 10.7257 7.41522C10.3844 7.75654 9.94951 7.98897 9.4761 8.08314C9.00268 8.17731 8.51197 8.12898 8.06603 7.94426C7.62008 7.75954 7.23892 7.44674 6.97075 7.04539C6.70258 6.64405 6.55945 6.1722 6.55945 5.68951C6.55945 5.04224 6.81658 4.42149 7.27426 3.9638ZM7.36691 10.3075C6.28172 10.3075 5.24097 10.7385 4.47362 11.5059C3.70627 12.2732 3.27518 13.314 3.27518 14.3992V17.121C3.27518 17.2763 3.4011 17.4022 3.55643 17.4022H4.64514C4.80047 17.4022 4.92639 17.2763 4.92639 17.121V14.3992C4.92639 13.7519 5.18351 13.1312 5.6412 12.6735C6.09889 12.2158 6.71964 11.9587 7.36691 11.9587H10.633C10.9535 11.9587 11.2709 12.0218 11.567 12.1444C11.8631 12.2671 12.1321 12.4469 12.3588 12.6735C12.5854 12.9001 12.7651 13.1691 12.8878 13.4652C13.0104 13.7613 13.0736 14.0787 13.0736 14.3992V17.121C13.0736 17.2763 13.1995 17.4022 13.3548 17.4022H14.4435C14.5989 17.4022 14.7248 17.2763 14.7248 17.121V14.3992C14.7248 13.314 14.2937 12.2732 13.5263 11.5059C12.759 10.7385 11.7182 10.3075 10.633 10.3075H7.36691Z"})}),(0,et.jsx)("defs",{children:(0,et.jsx)("clipPath",{id:"clip0",children:(0,et.jsx)("rect",{width:"18",height:"18",transform:"translate(0 0.5)"})})})]}))};pr.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};pr.displayName="person";Nn=dr.default=pr;var xt={},oo=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Tn="%[a-f0-9]{2}",Br=new RegExp("("+Tn+")|([^%]+?)","gi"),Kr=new RegExp("("+Tn+")+","gi");function ir(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],ir(r),ir(n))}function ao(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(Br)||[],r=1;r<t.length;r++)e=ir(t,r).join(""),t=e.match(Br)||[];return e}}function so(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=Kr.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=ao(r[0]);n!==r[0]&&(t[r[0]]=n)}r=Kr.exec(e)}t["%C2"]="�";for(var s=Object.keys(t),l=0;l<s.length;l++){var h=s[l];e=e.replace(new RegExp(h,"g"),t[h])}return e}var co=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return so(e)}},lo=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},uo=function(e,t){for(var r={},n=Object.keys(e),s=Array.isArray(t),l=0;l<n.length;l++){var h=n[l],C=e[h];(s?t.indexOf(h)!==-1:t(h,C,e))&&(r[h]=C)}return r};(function(e){const t=oo,r=co,n=lo,s=uo,l=a=>a==null;function h(a){switch(a.arrayFormat){case"index":return o=>(u,f)=>{const g=u.length;return f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,[x(o,a),"[",g,"]"].join("")]:[...u,[x(o,a),"[",x(g,a),"]=",x(f,a)].join("")]};case"bracket":return o=>(u,f)=>f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,[x(o,a),"[]"].join("")]:[...u,[x(o,a),"[]=",x(f,a)].join("")];case"comma":case"separator":return o=>(u,f)=>f==null||f.length===0?u:u.length===0?[[x(o,a),"=",x(f,a)].join("")]:[[u,x(f,a)].join(a.arrayFormatSeparator)];default:return o=>(u,f)=>f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,x(o,a)]:[...u,[x(o,a),"=",x(f,a)].join("")]}}function C(a){let o;switch(a.arrayFormat){case"index":return(u,f,g)=>{if(o=/\[(\d*)\]$/.exec(u),u=u.replace(/\[\d*\]$/,""),!o){g[u]=f;return}g[u]===void 0&&(g[u]={}),g[u][o[1]]=f};case"bracket":return(u,f,g)=>{if(o=/(\[\])$/.exec(u),u=u.replace(/\[\]$/,""),!o){g[u]=f;return}if(g[u]===void 0){g[u]=[f];return}g[u]=[].concat(g[u],f)};case"comma":case"separator":return(u,f,g)=>{const T=typeof f=="string"&&f.includes(a.arrayFormatSeparator),S=typeof f=="string"&&!T&&b(f,a).includes(a.arrayFormatSeparator);f=S?b(f,a):f;const X=T||S?f.split(a.arrayFormatSeparator).map(Z=>b(Z,a)):f===null?f:b(f,a);g[u]=X};default:return(u,f,g)=>{if(g[u]===void 0){g[u]=f;return}g[u]=[].concat(g[u],f)}}}function j(a){if(typeof a!="string"||a.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function x(a,o){return o.encode?o.strict?t(a):encodeURIComponent(a):a}function b(a,o){return o.decode?r(a):a}function _(a){return Array.isArray(a)?a.sort():typeof a=="object"?_(Object.keys(a)).sort((o,u)=>Number(o)-Number(u)).map(o=>a[o]):a}function E(a){const o=a.indexOf("#");return o!==-1&&(a=a.slice(0,o)),a}function P(a){let o="";const u=a.indexOf("#");return u!==-1&&(o=a.slice(u)),o}function d(a){a=E(a);const o=a.indexOf("?");return o===-1?"":a.slice(o+1)}function L(a,o){return o.parseNumbers&&!Number.isNaN(Number(a))&&typeof a=="string"&&a.trim()!==""?a=Number(a):o.parseBooleans&&a!==null&&(a.toLowerCase()==="true"||a.toLowerCase()==="false")&&(a=a.toLowerCase()==="true"),a}function w(a,o){o=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},o),j(o.arrayFormatSeparator);const u=C(o),f=Object.create(null);if(typeof a!="string"||(a=a.trim().replace(/^[?#&]/,""),!a))return f;for(const g of a.split("&")){if(g==="")continue;let[T,S]=n(o.decode?g.replace(/\+/g," "):g,"=");S=S===void 0?null:["comma","separator"].includes(o.arrayFormat)?S:b(S,o),u(b(T,o),S,f)}for(const g of Object.keys(f)){const T=f[g];if(typeof T=="object"&&T!==null)for(const S of Object.keys(T))T[S]=L(T[S],o);else f[g]=L(T,o)}return o.sort===!1?f:(o.sort===!0?Object.keys(f).sort():Object.keys(f).sort(o.sort)).reduce((g,T)=>{const S=f[T];return S&&typeof S=="object"&&!Array.isArray(S)?g[T]=_(S):g[T]=S,g},Object.create(null))}e.extract=d,e.parse=w,e.stringify=(a,o)=>{if(!a)return"";o=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},o),j(o.arrayFormatSeparator);const u=S=>o.skipNull&&l(a[S])||o.skipEmptyString&&a[S]==="",f=h(o),g={};for(const S of Object.keys(a))u(S)||(g[S]=a[S]);const T=Object.keys(g);return o.sort!==!1&&T.sort(o.sort),T.map(S=>{const X=a[S];return X===void 0?"":X===null?x(S,o):Array.isArray(X)?X.reduce(f(S),[]).join("&"):x(S,o)+"="+x(X,o)}).filter(S=>S.length>0).join("&")},e.parseUrl=(a,o)=>{o=Object.assign({decode:!0},o);const[u,f]=n(a,"#");return Object.assign({url:u.split("?")[0]||"",query:w(d(a),o)},o&&o.parseFragmentIdentifier&&f?{fragmentIdentifier:b(f,o)}:{})},e.stringifyUrl=(a,o)=>{o=Object.assign({encode:!0,strict:!0},o);const u=E(a.url).split("?")[0]||"",f=e.extract(a.url),g=e.parse(f,{sort:!1}),T=Object.assign(g,a.query);let S=e.stringify(T,o);S&&(S=`?${S}`);let X=P(a.url);return a.fragmentIdentifier&&(X=`#${x(a.fragmentIdentifier,o)}`),`${u}${S}${X}`},e.pick=(a,o,u)=>{u=Object.assign({parseFragmentIdentifier:!0},u);const{url:f,query:g,fragmentIdentifier:T}=e.parseUrl(a,u);return e.stringifyUrl({url:f,query:s(g,o),fragmentIdentifier:T},u)},e.exclude=(a,o,u)=>{const f=Array.isArray(o)?g=>!o.includes(g):(g,T)=>!o(g,T);return e.pick(a,f,u)}})(xt);const st=Zn,fo={parseNumbers:!1,parseBooleans:!1},po={skipNull:!1,skipEmptyString:!1},mo=(e,t)=>{var r,n;const{navigateMode:s="push",parseOptions:l,stringifyOptions:h}={},C=Object.assign(Object.assign({},fo),l),j=Object.assign(Object.assign({},po),h),x=st.useLocation(),b=(r=st.useHistory)===null||r===void 0?void 0:r.call(st),_=(n=st.useNavigate)===null||n===void 0?void 0:n.call(st),E=Hi(),P=H.useRef(typeof e=="function"?e():e||{}),d=H.useMemo(()=>xt.parse(x.search,C),[x.search]),L=H.useMemo(()=>Object.assign(Object.assign({},P.current),d),[d]);return[L,fr(a=>{const o=typeof a=="function"?a(L):a;E(),b&&b[s]({hash:x.hash,search:xt.stringify(Object.assign(Object.assign({},d),o),j)||"?"},x.state),_&&_({hash:x.hash,search:xt.stringify(Object.assign(Object.assign({},d),o),j)||"?"},{replace:s==="replace",state:x.state})})]},ho=mo;var qt={exports:{}},kt={},Fr;function _n(){if(Fr)return kt;Fr=1;function e(o){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},e(o)}function t(o,u,f){return Object.defineProperty(o,"prototype",{writable:!1}),o}function r(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")}function n(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&s(o,u)}function s(o,u){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,T){return g.__proto__=T,g},s(o,u)}function l(o){var u=j();return function(){var g=x(o),T;if(u){var S=x(this).constructor;T=Reflect.construct(g,arguments,S)}else T=g.apply(this,arguments);return h(this,T)}}function h(o,u){if(u&&(e(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C(o)}function C(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function j(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function x(o){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(f){return f.__proto__||Object.getPrototypeOf(f)},x(o)}var b={},_,E;function P(o,u,f){f||(f=Error);function g(S,X,Z){return typeof u=="string"?u:u(S,X,Z)}var T=function(S){n(Z,S);var X=l(Z);function Z(G,Y,F){var z;return r(this,Z),z=X.call(this,g(G,Y,F)),z.code=o,z}return t(Z)}(f);b[o]=T}function d(o,u){if(Array.isArray(o)){var f=o.length;return o=o.map(function(g){return String(g)}),f>2?"one of ".concat(u," ").concat(o.slice(0,f-1).join(", "),", or ")+o[f-1]:f===2?"one of ".concat(u," ").concat(o[0]," or ").concat(o[1]):"of ".concat(u," ").concat(o[0])}else return"of ".concat(u," ").concat(String(o))}function L(o,u,f){return o.substr(0,u.length)===u}function w(o,u,f){return(f===void 0||f>o.length)&&(f=o.length),o.substring(f-u.length,f)===u}function a(o,u,f){return typeof f!="number"&&(f=0),f+u.length>o.length?!1:o.indexOf(u,f)!==-1}return P("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),P("ERR_INVALID_ARG_TYPE",function(o,u,f){_===void 0&&(_=or()),_(typeof o=="string","'name' must be a string");var g;typeof u=="string"&&L(u,"not ")?(g="must not be",u=u.replace(/^not /,"")):g="must be";var T;if(w(o," argument"))T="The ".concat(o," ").concat(g," ").concat(d(u,"type"));else{var S=a(o,".")?"property":"argument";T='The "'.concat(o,'" ').concat(S," ").concat(g," ").concat(d(u,"type"))}return T+=". Received type ".concat(e(f)),T},TypeError),P("ERR_INVALID_ARG_VALUE",function(o,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";E===void 0&&(E=ft);var g=E.inspect(u);return g.length>128&&(g="".concat(g.slice(0,128),"...")),"The argument '".concat(o,"' ").concat(f,". Received ").concat(g)},TypeError),P("ERR_INVALID_RETURN_VALUE",function(o,u,f){var g;return f&&f.constructor&&f.constructor.name?g="instance of ".concat(f.constructor.name):g="type ".concat(e(f)),"Expected ".concat(o,' to be returned from the "').concat(u,'"')+" function but got ".concat(g,".")},TypeError),P("ERR_MISSING_ARGS",function(){for(var o=arguments.length,u=new Array(o),f=0;f<o;f++)u[f]=arguments[f];_===void 0&&(_=or()),_(u.length>0,"At least one arg needs to be specified");var g="The ",T=u.length;switch(u=u.map(function(S){return'"'.concat(S,'"')}),T){case 1:g+="".concat(u[0]," argument");break;case 2:g+="".concat(u[0]," and ").concat(u[1]," arguments");break;default:g+=u.slice(0,T-1).join(", "),g+=", and ".concat(u[T-1]," arguments");break}return"".concat(g," must be specified")},TypeError),kt.codes=b,kt}var Lt,$r;function go(){if($r)return Lt;$r=1;function e(O,A){var K=Object.keys(O);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(O);A&&(R=R.filter(function(V){return Object.getOwnPropertyDescriptor(O,V).enumerable})),K.push.apply(K,R)}return K}function t(O){for(var A=1;A<arguments.length;A++){var K=arguments[A]!=null?arguments[A]:{};A%2?e(Object(K),!0).forEach(function(R){r(O,R,K[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(K)):e(Object(K)).forEach(function(R){Object.defineProperty(O,R,Object.getOwnPropertyDescriptor(K,R))})}return O}function r(O,A,K){return A=h(A),A in O?Object.defineProperty(O,A,{value:K,enumerable:!0,configurable:!0,writable:!0}):O[A]=K,O}function n(O,A){if(!(O instanceof A))throw new TypeError("Cannot call a class as a function")}function s(O,A){for(var K=0;K<A.length;K++){var R=A[K];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(O,h(R.key),R)}}function l(O,A,K){return A&&s(O.prototype,A),Object.defineProperty(O,"prototype",{writable:!1}),O}function h(O){var A=C(O,"string");return o(A)==="symbol"?A:String(A)}function C(O,A){if(o(O)!=="object"||O===null)return O;var K=O[Symbol.toPrimitive];if(K!==void 0){var R=K.call(O,A||"default");if(o(R)!=="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(O)}function j(O,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(A&&A.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),Object.defineProperty(O,"prototype",{writable:!1}),A&&w(O,A)}function x(O){var A=d();return function(){var R=a(O),V;if(A){var y=a(this).constructor;V=Reflect.construct(R,arguments,y)}else V=R.apply(this,arguments);return b(this,V)}}function b(O,A){if(A&&(o(A)==="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _(O)}function _(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function E(O){var A=typeof Map=="function"?new Map:void 0;return E=function(R){if(R===null||!L(R))return R;if(typeof R!="function")throw new TypeError("Super expression must either be null or a function");if(typeof A<"u"){if(A.has(R))return A.get(R);A.set(R,V)}function V(){return P(R,arguments,a(this).constructor)}return V.prototype=Object.create(R.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),w(V,R)},E(O)}function P(O,A,K){return d()?P=Reflect.construct.bind():P=function(V,y,p){var v=[null];v.push.apply(v,y);var D=Function.bind.apply(V,v),N=new D;return p&&w(N,p.prototype),N},P.apply(null,arguments)}function d(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function L(O){return Function.toString.call(O).indexOf("[native code]")!==-1}function w(O,A){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(R,V){return R.__proto__=V,R},w(O,A)}function a(O){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(K){return K.__proto__||Object.getPrototypeOf(K)},a(O)}function o(O){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},o(O)}var u=ft,f=u.inspect,g=_n(),T=g.codes.ERR_INVALID_ARG_TYPE;function S(O,A,K){return(K===void 0||K>O.length)&&(K=O.length),O.substring(K-A.length,K)===A}function X(O,A){if(A=Math.floor(A),O.length==0||A==0)return"";var K=O.length*A;for(A=Math.floor(Math.log(A)/Math.log(2));A;)O+=O,A--;return O+=O.substring(0,K-O.length),O}var Z="",G="",Y="",F="",z={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},be=10;function Q(O){var A=Object.keys(O),K=Object.create(Object.getPrototypeOf(O));return A.forEach(function(R){K[R]=O[R]}),Object.defineProperty(K,"message",{value:O.message}),K}function de(O){return f(O,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function xe(O,A,K){var R="",V="",y=0,p="",v=!1,D=de(O),N=D.split(`
|
|
1
|
+
import{r as H,t as Zn,g as Qn,e as Dr,a as Xn}from"./vendor-react-D-afvo_7.js";import{j as i,a3 as se,bH as Jt,bI as er,aP as tr,al as jt,T as qe,M as Et,a2 as nt,br as sr,ad as rt,E as B,aa as Te,a4 as ut,v as Jn,x as mn,aM as ei,a1 as ti,bm as ri,bn as ni,I as ii,aK as oi,aN as ai,bL as si}from"./vendor-mui-core-xF5F4eT7.js";import{p as Ie,B as rr,b as nr,T as ci,al as li,n as Ur,x as ui,y as fi}from"./vendor-utils-5TjOM6td.js";import{c as di}from"./index-DoZ2YM4T.js";import{b1 as ft,b2 as pi,b3 as mi,b4 as hn,b5 as hi,b6 as gi,b7 as yi,b8 as gn,b9 as bi,ba as cr,bb as vi,bc as xi,bd as wi,be as ji,o as lr,bf as yn,m as Ei,n as Si,e as _e,B as bn,D as Pi,a6 as Ge,a2 as je,at as Ci,Z as Oi,ae as Ai,a1 as dt,j as Ke,a0 as Ii,bg as vn,b as Ye,au as xn,bh as Ri,aB as Ni,am as Ti,aF as _i,aT as wn,a9 as Di,aU as jn,$ as Ui,bi as En,bj as qi,bk as ki}from"./vendor-arcblock-DZrZ_x_3.js";import{d as St}from"./Add-DSPtuudj.js";import{d as Li}from"./Loop-B05tzyuy.js";import{d as Bi}from"./ViewList-CgG45KQv.js";import{L as Ki,S as Fi,d as Sn}from"./list-header-BdJ1JRqY.js";import{$ as $i,f as Mi,y as Ce,ap as ur,m as Qe,a0 as Wi,M as Xe,aq as zi,h as Ze,B as Pn,ar as Cn,b as Vi}from"./index-LIf2LIyz.js";import{x as Hi,u as fr,a as On,k as Gi}from"./vendor-hooks-BKxTDk_P.js";import{u as De,d as qr,W as An}from"./dashboard-Cgj1BkGn.js";import{W as Pt}from"./did-address-D0Fo5eTl.js";import{P as Be}from"./permission-C0p6f4_S.js";import{C as Rt}from"./click-to-copy-Bu9H6mvL.js";import{f as Fe}from"./format-error-C0Ke3VXF.js";import{_ as Yi}from"./useAsync-Ua5iss51.js";import{I as Pe}from"./index-DGzAI_hi.js";import{d as Zi}from"./DeleteOutline-BzV7E1BM.js";import{C as pt}from"./confirm-CpCj_oj-.js";import{u as mt}from"./session-CM1ewS-k.js";import{i as In,a as Ct,p as Rn}from"./util-NSOsPZWM.js";import{b as Qi}from"./sdk-TBkp9MgA.js";import{p as Xi}from"./index-BA_7CRkd.js";import{A as Ji}from"./actions-CPjP-DJ-.js";import{S as eo}from"./shorten-label-J69eHfMN.js";import"./useLocalStorage-DV4AIe5L.js";import"./PlayArrow-DZfknrYj.js";import"./get-safe-url-DDeO6YpV.js";import"./index-0u5pzPhR.js";import"./useAsyncRetry-Bmo6a1Zp.js";import"./InfoOutlined-C_J3Y0fX.js";import"./useSetState-Crt4S51m.js";import"./MoreHoriz-JX8PbVXG.js";var dr={};Object.defineProperty(dr,"__esModule",{value:!0});var Nn=dr.default=void 0;to(H);var et=i;function to(e){return e&&e.__esModule?e:{default:e}}function kr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Lr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kr(Object(r),!0).forEach(function(n){ro(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ro(e,t,r){return(t=no(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function no(e){var t=io(e,"string");return typeof t=="symbol"?t:t+""}function io(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pr=function(t){return(0,et.jsxs)("svg",Lr(Lr({},t),{},{children:[(0,et.jsx)("g",{clipPath:"url(#clip0)",children:(0,et.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.99997 1.59778C8.19071 1.59778 7.39961 1.83775 6.72673 2.28736C6.05385 2.73697 5.5294 3.37601 5.21971 4.12367C4.91001 4.87134 4.82898 5.69405 4.98686 6.48777C5.14474 7.28149 5.53444 8.01056 6.10668 8.5828C6.67892 9.15504 7.408 9.54474 8.20172 9.70262C8.99544 9.8605 9.81815 9.77947 10.5658 9.46978C11.3135 9.16009 11.9525 8.63564 12.4021 7.96276C12.8517 7.28987 13.0917 6.49878 13.0917 5.68951C13.0917 4.60432 12.6606 3.56357 11.8933 2.79622C11.1259 2.02887 10.0852 1.59778 8.99997 1.59778ZM7.27426 3.9638C7.73195 3.50611 8.35271 3.24899 8.99997 3.24899C9.48266 3.24899 9.95452 3.39212 10.3559 3.66029C10.7572 3.92846 11.07 4.30962 11.2547 4.75556C11.4394 5.20151 11.4878 5.69222 11.3936 6.16563C11.2994 6.63905 11.067 7.07391 10.7257 7.41522C10.3844 7.75654 9.94951 7.98897 9.4761 8.08314C9.00268 8.17731 8.51197 8.12898 8.06603 7.94426C7.62008 7.75954 7.23892 7.44674 6.97075 7.04539C6.70258 6.64405 6.55945 6.1722 6.55945 5.68951C6.55945 5.04224 6.81658 4.42149 7.27426 3.9638ZM7.36691 10.3075C6.28172 10.3075 5.24097 10.7385 4.47362 11.5059C3.70627 12.2732 3.27518 13.314 3.27518 14.3992V17.121C3.27518 17.2763 3.4011 17.4022 3.55643 17.4022H4.64514C4.80047 17.4022 4.92639 17.2763 4.92639 17.121V14.3992C4.92639 13.7519 5.18351 13.1312 5.6412 12.6735C6.09889 12.2158 6.71964 11.9587 7.36691 11.9587H10.633C10.9535 11.9587 11.2709 12.0218 11.567 12.1444C11.8631 12.2671 12.1321 12.4469 12.3588 12.6735C12.5854 12.9001 12.7651 13.1691 12.8878 13.4652C13.0104 13.7613 13.0736 14.0787 13.0736 14.3992V17.121C13.0736 17.2763 13.1995 17.4022 13.3548 17.4022H14.4435C14.5989 17.4022 14.7248 17.2763 14.7248 17.121V14.3992C14.7248 13.314 14.2937 12.2732 13.5263 11.5059C12.759 10.7385 11.7182 10.3075 10.633 10.3075H7.36691Z"})}),(0,et.jsx)("defs",{children:(0,et.jsx)("clipPath",{id:"clip0",children:(0,et.jsx)("rect",{width:"18",height:"18",transform:"translate(0 0.5)"})})})]}))};pr.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};pr.displayName="person";Nn=dr.default=pr;var xt={},oo=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Tn="%[a-f0-9]{2}",Br=new RegExp("("+Tn+")|([^%]+?)","gi"),Kr=new RegExp("("+Tn+")+","gi");function ir(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],ir(r),ir(n))}function ao(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(Br)||[],r=1;r<t.length;r++)e=ir(t,r).join(""),t=e.match(Br)||[];return e}}function so(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=Kr.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=ao(r[0]);n!==r[0]&&(t[r[0]]=n)}r=Kr.exec(e)}t["%C2"]="�";for(var s=Object.keys(t),l=0;l<s.length;l++){var h=s[l];e=e.replace(new RegExp(h,"g"),t[h])}return e}var co=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return so(e)}},lo=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},uo=function(e,t){for(var r={},n=Object.keys(e),s=Array.isArray(t),l=0;l<n.length;l++){var h=n[l],C=e[h];(s?t.indexOf(h)!==-1:t(h,C,e))&&(r[h]=C)}return r};(function(e){const t=oo,r=co,n=lo,s=uo,l=a=>a==null;function h(a){switch(a.arrayFormat){case"index":return o=>(u,f)=>{const g=u.length;return f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,[x(o,a),"[",g,"]"].join("")]:[...u,[x(o,a),"[",x(g,a),"]=",x(f,a)].join("")]};case"bracket":return o=>(u,f)=>f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,[x(o,a),"[]"].join("")]:[...u,[x(o,a),"[]=",x(f,a)].join("")];case"comma":case"separator":return o=>(u,f)=>f==null||f.length===0?u:u.length===0?[[x(o,a),"=",x(f,a)].join("")]:[[u,x(f,a)].join(a.arrayFormatSeparator)];default:return o=>(u,f)=>f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,x(o,a)]:[...u,[x(o,a),"=",x(f,a)].join("")]}}function C(a){let o;switch(a.arrayFormat){case"index":return(u,f,g)=>{if(o=/\[(\d*)\]$/.exec(u),u=u.replace(/\[\d*\]$/,""),!o){g[u]=f;return}g[u]===void 0&&(g[u]={}),g[u][o[1]]=f};case"bracket":return(u,f,g)=>{if(o=/(\[\])$/.exec(u),u=u.replace(/\[\]$/,""),!o){g[u]=f;return}if(g[u]===void 0){g[u]=[f];return}g[u]=[].concat(g[u],f)};case"comma":case"separator":return(u,f,g)=>{const T=typeof f=="string"&&f.includes(a.arrayFormatSeparator),S=typeof f=="string"&&!T&&b(f,a).includes(a.arrayFormatSeparator);f=S?b(f,a):f;const X=T||S?f.split(a.arrayFormatSeparator).map(Z=>b(Z,a)):f===null?f:b(f,a);g[u]=X};default:return(u,f,g)=>{if(g[u]===void 0){g[u]=f;return}g[u]=[].concat(g[u],f)}}}function j(a){if(typeof a!="string"||a.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function x(a,o){return o.encode?o.strict?t(a):encodeURIComponent(a):a}function b(a,o){return o.decode?r(a):a}function _(a){return Array.isArray(a)?a.sort():typeof a=="object"?_(Object.keys(a)).sort((o,u)=>Number(o)-Number(u)).map(o=>a[o]):a}function E(a){const o=a.indexOf("#");return o!==-1&&(a=a.slice(0,o)),a}function P(a){let o="";const u=a.indexOf("#");return u!==-1&&(o=a.slice(u)),o}function d(a){a=E(a);const o=a.indexOf("?");return o===-1?"":a.slice(o+1)}function L(a,o){return o.parseNumbers&&!Number.isNaN(Number(a))&&typeof a=="string"&&a.trim()!==""?a=Number(a):o.parseBooleans&&a!==null&&(a.toLowerCase()==="true"||a.toLowerCase()==="false")&&(a=a.toLowerCase()==="true"),a}function w(a,o){o=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},o),j(o.arrayFormatSeparator);const u=C(o),f=Object.create(null);if(typeof a!="string"||(a=a.trim().replace(/^[?#&]/,""),!a))return f;for(const g of a.split("&")){if(g==="")continue;let[T,S]=n(o.decode?g.replace(/\+/g," "):g,"=");S=S===void 0?null:["comma","separator"].includes(o.arrayFormat)?S:b(S,o),u(b(T,o),S,f)}for(const g of Object.keys(f)){const T=f[g];if(typeof T=="object"&&T!==null)for(const S of Object.keys(T))T[S]=L(T[S],o);else f[g]=L(T,o)}return o.sort===!1?f:(o.sort===!0?Object.keys(f).sort():Object.keys(f).sort(o.sort)).reduce((g,T)=>{const S=f[T];return S&&typeof S=="object"&&!Array.isArray(S)?g[T]=_(S):g[T]=S,g},Object.create(null))}e.extract=d,e.parse=w,e.stringify=(a,o)=>{if(!a)return"";o=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},o),j(o.arrayFormatSeparator);const u=S=>o.skipNull&&l(a[S])||o.skipEmptyString&&a[S]==="",f=h(o),g={};for(const S of Object.keys(a))u(S)||(g[S]=a[S]);const T=Object.keys(g);return o.sort!==!1&&T.sort(o.sort),T.map(S=>{const X=a[S];return X===void 0?"":X===null?x(S,o):Array.isArray(X)?X.reduce(f(S),[]).join("&"):x(S,o)+"="+x(X,o)}).filter(S=>S.length>0).join("&")},e.parseUrl=(a,o)=>{o=Object.assign({decode:!0},o);const[u,f]=n(a,"#");return Object.assign({url:u.split("?")[0]||"",query:w(d(a),o)},o&&o.parseFragmentIdentifier&&f?{fragmentIdentifier:b(f,o)}:{})},e.stringifyUrl=(a,o)=>{o=Object.assign({encode:!0,strict:!0},o);const u=E(a.url).split("?")[0]||"",f=e.extract(a.url),g=e.parse(f,{sort:!1}),T=Object.assign(g,a.query);let S=e.stringify(T,o);S&&(S=`?${S}`);let X=P(a.url);return a.fragmentIdentifier&&(X=`#${x(a.fragmentIdentifier,o)}`),`${u}${S}${X}`},e.pick=(a,o,u)=>{u=Object.assign({parseFragmentIdentifier:!0},u);const{url:f,query:g,fragmentIdentifier:T}=e.parseUrl(a,u);return e.stringifyUrl({url:f,query:s(g,o),fragmentIdentifier:T},u)},e.exclude=(a,o,u)=>{const f=Array.isArray(o)?g=>!o.includes(g):(g,T)=>!o(g,T);return e.pick(a,f,u)}})(xt);const st=Zn,fo={parseNumbers:!1,parseBooleans:!1},po={skipNull:!1,skipEmptyString:!1},mo=(e,t)=>{var r,n;const{navigateMode:s="push",parseOptions:l,stringifyOptions:h}={},C=Object.assign(Object.assign({},fo),l),j=Object.assign(Object.assign({},po),h),x=st.useLocation(),b=(r=st.useHistory)===null||r===void 0?void 0:r.call(st),_=(n=st.useNavigate)===null||n===void 0?void 0:n.call(st),E=Hi(),P=H.useRef(typeof e=="function"?e():e||{}),d=H.useMemo(()=>xt.parse(x.search,C),[x.search]),L=H.useMemo(()=>Object.assign(Object.assign({},P.current),d),[d]);return[L,fr(a=>{const o=typeof a=="function"?a(L):a;E(),b&&b[s]({hash:x.hash,search:xt.stringify(Object.assign(Object.assign({},d),o),j)||"?"},x.state),_&&_({hash:x.hash,search:xt.stringify(Object.assign(Object.assign({},d),o),j)||"?"},{replace:s==="replace",state:x.state})})]},ho=mo;var qt={exports:{}},kt={},Fr;function _n(){if(Fr)return kt;Fr=1;function e(o){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},e(o)}function t(o,u,f){return Object.defineProperty(o,"prototype",{writable:!1}),o}function r(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")}function n(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&s(o,u)}function s(o,u){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,T){return g.__proto__=T,g},s(o,u)}function l(o){var u=j();return function(){var g=x(o),T;if(u){var S=x(this).constructor;T=Reflect.construct(g,arguments,S)}else T=g.apply(this,arguments);return h(this,T)}}function h(o,u){if(u&&(e(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C(o)}function C(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function j(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function x(o){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(f){return f.__proto__||Object.getPrototypeOf(f)},x(o)}var b={},_,E;function P(o,u,f){f||(f=Error);function g(S,X,Z){return typeof u=="string"?u:u(S,X,Z)}var T=function(S){n(Z,S);var X=l(Z);function Z(G,Y,F){var z;return r(this,Z),z=X.call(this,g(G,Y,F)),z.code=o,z}return t(Z)}(f);b[o]=T}function d(o,u){if(Array.isArray(o)){var f=o.length;return o=o.map(function(g){return String(g)}),f>2?"one of ".concat(u," ").concat(o.slice(0,f-1).join(", "),", or ")+o[f-1]:f===2?"one of ".concat(u," ").concat(o[0]," or ").concat(o[1]):"of ".concat(u," ").concat(o[0])}else return"of ".concat(u," ").concat(String(o))}function L(o,u,f){return o.substr(0,u.length)===u}function w(o,u,f){return(f===void 0||f>o.length)&&(f=o.length),o.substring(f-u.length,f)===u}function a(o,u,f){return typeof f!="number"&&(f=0),f+u.length>o.length?!1:o.indexOf(u,f)!==-1}return P("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),P("ERR_INVALID_ARG_TYPE",function(o,u,f){_===void 0&&(_=or()),_(typeof o=="string","'name' must be a string");var g;typeof u=="string"&&L(u,"not ")?(g="must not be",u=u.replace(/^not /,"")):g="must be";var T;if(w(o," argument"))T="The ".concat(o," ").concat(g," ").concat(d(u,"type"));else{var S=a(o,".")?"property":"argument";T='The "'.concat(o,'" ').concat(S," ").concat(g," ").concat(d(u,"type"))}return T+=". Received type ".concat(e(f)),T},TypeError),P("ERR_INVALID_ARG_VALUE",function(o,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";E===void 0&&(E=ft);var g=E.inspect(u);return g.length>128&&(g="".concat(g.slice(0,128),"...")),"The argument '".concat(o,"' ").concat(f,". Received ").concat(g)},TypeError),P("ERR_INVALID_RETURN_VALUE",function(o,u,f){var g;return f&&f.constructor&&f.constructor.name?g="instance of ".concat(f.constructor.name):g="type ".concat(e(f)),"Expected ".concat(o,' to be returned from the "').concat(u,'"')+" function but got ".concat(g,".")},TypeError),P("ERR_MISSING_ARGS",function(){for(var o=arguments.length,u=new Array(o),f=0;f<o;f++)u[f]=arguments[f];_===void 0&&(_=or()),_(u.length>0,"At least one arg needs to be specified");var g="The ",T=u.length;switch(u=u.map(function(S){return'"'.concat(S,'"')}),T){case 1:g+="".concat(u[0]," argument");break;case 2:g+="".concat(u[0]," and ").concat(u[1]," arguments");break;default:g+=u.slice(0,T-1).join(", "),g+=", and ".concat(u[T-1]," arguments");break}return"".concat(g," must be specified")},TypeError),kt.codes=b,kt}var Lt,$r;function go(){if($r)return Lt;$r=1;function e(O,A){var K=Object.keys(O);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(O);A&&(R=R.filter(function(V){return Object.getOwnPropertyDescriptor(O,V).enumerable})),K.push.apply(K,R)}return K}function t(O){for(var A=1;A<arguments.length;A++){var K=arguments[A]!=null?arguments[A]:{};A%2?e(Object(K),!0).forEach(function(R){r(O,R,K[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(K)):e(Object(K)).forEach(function(R){Object.defineProperty(O,R,Object.getOwnPropertyDescriptor(K,R))})}return O}function r(O,A,K){return A=h(A),A in O?Object.defineProperty(O,A,{value:K,enumerable:!0,configurable:!0,writable:!0}):O[A]=K,O}function n(O,A){if(!(O instanceof A))throw new TypeError("Cannot call a class as a function")}function s(O,A){for(var K=0;K<A.length;K++){var R=A[K];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(O,h(R.key),R)}}function l(O,A,K){return A&&s(O.prototype,A),Object.defineProperty(O,"prototype",{writable:!1}),O}function h(O){var A=C(O,"string");return o(A)==="symbol"?A:String(A)}function C(O,A){if(o(O)!=="object"||O===null)return O;var K=O[Symbol.toPrimitive];if(K!==void 0){var R=K.call(O,A||"default");if(o(R)!=="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(O)}function j(O,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(A&&A.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),Object.defineProperty(O,"prototype",{writable:!1}),A&&w(O,A)}function x(O){var A=d();return function(){var R=a(O),V;if(A){var y=a(this).constructor;V=Reflect.construct(R,arguments,y)}else V=R.apply(this,arguments);return b(this,V)}}function b(O,A){if(A&&(o(A)==="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _(O)}function _(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function E(O){var A=typeof Map=="function"?new Map:void 0;return E=function(R){if(R===null||!L(R))return R;if(typeof R!="function")throw new TypeError("Super expression must either be null or a function");if(typeof A<"u"){if(A.has(R))return A.get(R);A.set(R,V)}function V(){return P(R,arguments,a(this).constructor)}return V.prototype=Object.create(R.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),w(V,R)},E(O)}function P(O,A,K){return d()?P=Reflect.construct.bind():P=function(V,y,p){var v=[null];v.push.apply(v,y);var D=Function.bind.apply(V,v),N=new D;return p&&w(N,p.prototype),N},P.apply(null,arguments)}function d(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function L(O){return Function.toString.call(O).indexOf("[native code]")!==-1}function w(O,A){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(R,V){return R.__proto__=V,R},w(O,A)}function a(O){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(K){return K.__proto__||Object.getPrototypeOf(K)},a(O)}function o(O){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},o(O)}var u=ft,f=u.inspect,g=_n(),T=g.codes.ERR_INVALID_ARG_TYPE;function S(O,A,K){return(K===void 0||K>O.length)&&(K=O.length),O.substring(K-A.length,K)===A}function X(O,A){if(A=Math.floor(A),O.length==0||A==0)return"";var K=O.length*A;for(A=Math.floor(Math.log(A)/Math.log(2));A;)O+=O,A--;return O+=O.substring(0,K-O.length),O}var Z="",G="",Y="",F="",z={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},be=10;function Q(O){var A=Object.keys(O),K=Object.create(Object.getPrototypeOf(O));return A.forEach(function(R){K[R]=O[R]}),Object.defineProperty(K,"message",{value:O.message}),K}function de(O){return f(O,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function xe(O,A,K){var R="",V="",y=0,p="",v=!1,D=de(O),N=D.split(`
|
|
2
2
|
`),q=de(A).split(`
|
|
3
3
|
`),$=0,ne="";if(K==="strictEqual"&&o(O)==="object"&&o(A)==="object"&&O!==null&&A!==null&&(K="strictEqualObject"),N.length===1&&q.length===1&&N[0]!==q[0]){var ue=N[0].length+q[0].length;if(ue<=be){if((o(O)!=="object"||O===null)&&(o(A)!=="object"||A===null)&&(O!==0||A!==0))return"".concat(z[K],`
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a1 as V,j as e,E as f,aa as He,T as v,a2 as b,a3 as I,al as q,bm as _,bn as $,x as Ve,ak as Ke,bp as Ge,a4 as Xe,ai as Ye,ac as ee,bO as z,s as We}from"./vendor-mui-core-xF5F4eT7.js";import{n as qe,h as _e,d as de}from"./vendor-hooks-BKxTDk_P.js";import{r as A,u as $e}from"./vendor-react-D-afvo_7.js";import{B as U,y as J,h as T,a0 as et,ac as tt,aw as st,F as W}from"./index-LIf2LIyz.js";import{$ as K,j as y,e as k,aQ as nt,a1 as at,aO as ot,bO as ie,a2 as re,Z as it,b as O,ab as ce,b0 as rt,aU as ct,aP as lt,C as Ie,am as dt}from"./vendor-arcblock-DZrZ_x_3.js";import{u as Ee}from"./use-mobile-DnWfrhc7.js";import{y as te,d as pt,P as ut,F as ht,C as ke,x as pe}from"./vendor-utils-5TjOM6td.js";import"./api-K65cLqol.js";import{u as Re,C as ft,D as mt,a as gt}from"./connect-to-BYvNqC5N.js";import{g as xt,a as St,b as jt,i as At,c as Bt,d as yt,h as vt,e as ue,C as Ct,u as It}from"./config-space-Y_f6nwhj.js";import{f as se}from"./format-error-C0Ke3VXF.js";import{I as Et}from"./index-DGzAI_hi.js";import{d as kt}from"./MoreHoriz-JX8PbVXG.js";import{d as Rt}from"./DeleteOutline-BzV7E1BM.js";import{g as Ce}from"./get-safe-url-Du4BhDgB.js";import{S as Dt}from"./switch-control-D2qynQm8.js";var he={},Ot=V;Object.defineProperty(he,"__esModule",{value:!0});var De=he.default=void 0,Tt=Ot(K()),bt=e;De=he.default=(0,Tt.default)((0,bt.jsx)("path",{d:"M14 12c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2m-2-9c-4.97 0-9 4.03-9 9H0l4 4 4-4H5c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.51 0-2.91-.49-4.06-1.3l-1.42 1.44C8.04 20.3 9.94 21 12 21c4.97 0 9-4.03 9-9s-4.03-9-9-9"}),"SettingsBackupRestoreOutlined");var fe={},Ut=V;Object.defineProperty(fe,"__esModule",{value:!0});var Oe=fe.default=void 0,Lt=Ut(K()),wt=e;Oe=fe.default=(0,Lt.default)((0,wt.jsx)("path",{d:"M2 20h20v-4H2zm2-3h2v2H4zM2 4v4h20V4zm4 3H4V5h2zm-4 7h20v-4H2zm2-3h2v2H4z"}),"StorageOutlined");async function Mt({blockletDid:t,nodeApi:s,spaceGateways:a}){let n=!1;const r=await Promise.all(a.map(async i=>{let{name:o}=i;const c=await xt(i.endpoint);return!te(c)&&c!==o&&(o=c,n=!0),{...i,name:o}}));return n&&await Promise.all(r.filter(i=>i.did).map(i=>s.updateBlockletSpaceGateway({input:{did:t,where:{did:i.did},spaceGateway:{...i}}}))),r}function Ft({refresh:t}={}){var r;const{blocklet:s}=U(),a=(r=s==null?void 0:s.meta)==null?void 0:r.did,{api:n}=J();return qe(async()=>{if(!a)return[];const{spaceGateways:i}=await n.getBlockletSpaceGateways({input:{did:a}});return await Mt({blockletDid:a,nodeApi:n,spaceGateways:i})??[]},{refreshDeps:[a,t],onError(i){var o;(o=i==null?void 0:i.message)!=null&&o.includes("not logged")?console.warn(i):(console.error(i),y.error(se(i)))}})}function Te({deps:t,setLoading:s}={deps:[],setLoading:()=>{}}){var c;const{blocklet:a}=U(),[n,r]=A.useState([]),{api:i}=J(),o=pt(async()=>{try{if(s(!0),!a){r([]);return}const{backups:l}=await i.getBlockletBackups({input:{did:a.meta.did}});r(l??[])}catch(l){console.error(l),y.error(se(l))}finally{s(!1)}},2e3);return _e(async()=>{o()},[(c=a==null?void 0:a.meta)==null?void 0:c.did].concat(t)),{backups:n}}function Pt({appDid:t}){const{backups:s}=Te(),[a,n]=A.useState({message:"",progress:0,completed:!1}),r=J(),{ws:{useSubscription:i}}=r;return i(T.BlockletEvents.backupProgress,o=>{t===(o==null?void 0:o.appDid)&&n(()=>({...o}))},[t]),A.useEffect(()=>{var o;if(s!=null&&s.length&&ut((o=s[0])==null?void 0:o.status)){const[c]=s;n(()=>({message:c.message,progress:c.progress,completed:c.progress>=100}))}},[s]),a}const be=A.createContext({}),{Provider:Nt,Consumer:xs}=be;function me({children:t}){var Z;const{t:s}=k(),{api:a}=J(),{blocklet:n}=U(),[r,i]=A.useState(!1),{data:o,loading:c,mutate:l}=Ft({refresh:r}),h=ht(o),x=Pt({appDid:n==null?void 0:n.appDid}),[d,m]=A.useState(!1),S=A.useMemo(()=>St(n==null?void 0:n.environments),[n,r,d]),[g,j]=A.useState(!1),{backups:C}=Te({deps:[x],setLoading:j}),[u,G]=A.useState(o==null?void 0:o.find(p=>p.endpoint===S)),L=(Z=n==null?void 0:n.settings)==null?void 0:Z.autoBackup,w=()=>{i(p=>!p)},M=()=>{m(p=>!p)},R=async p=>{await a.updateAutoBackup({input:{did:n.meta.did,autoBackup:p}})},E=async(p,P)=>{l(D=>{const X=[...D];return X.push({...p,loading:!0}),X}),await a.addBlockletSpaceGateway({input:{did:n.meta.did,spaceGateway:p}}),S!==P&&await a.configBlocklet({input:{did:[n.meta.did],configs:[{key:T.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:P}]}}),w(),G(p)},F=async p=>{p&&(p.endpoint===S&&(await a.configBlocklet({input:{did:[n.meta.did],configs:[{key:T.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:""}]}}),L!=null&&L.enabled&&await R({enabled:!1})),await a.deleteBlockletSpaceGateway({input:{did:n.meta.did,spaceGatewayDid:p==null?void 0:p.did}}),l(P=>{const D=[...P];return D.splice(D.indexOf(p),1),D}),w(),G(p))},ne=async p=>{await a.updateBlockletSpaceGateway({input:{did:n.meta.did,where:{did:p.did},spaceGateway:p}}),S!==p.endpoint&&await a.configBlocklet({input:{did:[n.meta.did],configs:[{key:T.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:p.endpoint}]}}),y.success(s("storage.spaces.connectedWithName",{name:(p==null?void 0:p.name)??"DID Spaces"})),w()},ae=p=>(p==null?void 0:p.endpoint)===S;return e.jsx(Nt,{value:{spaceGateways:o||[],selectedSpaceGateway:u,addSpaceGateway:E,deleteSpaceGateway:F,updateSpaceGateway:ne,refreshSpaceGateways:w,spaceGatewaysLoading:c,spaceGatewaysFirstLoading:h,spaceGatewayIsSelected:ae,updateAutoBackup:R,backupEndpoint:S,backupProgress:x,backups:C,backupsLoading:g,refreshBackupEndpoint:M,autoBackup:L},children:t})}me.propTypes={children:f.any.isRequired};me.defaultProps={};function Q(){return A.useContext(be)}function H({...t}){const{blocklet:s}=U(),{info:a}=J(),{t:n}=k(),r=Re({blocklet:s}),i=et(a),{spaceGateways:o,addSpaceGateway:c}=Q(),l={checkFn:ke.create({baseURL:pe(window.location.origin,tt())}).get,webWalletUrl:i,extraParams:{appPid:s.appPid,appDid:r.appDid,appName:r.appName,appDescription:r.appDescription,appUrl:r.appUrl,referrer:r.referrer,scopes:r.scopes,nodeDid:a.did}},h=async({endpoint:d,name:m,did:S})=>{const g=await jt(d);if(!await At(g)){y.error(n("storage.spaces.gateway.add.invalidUrl"));return}if(o.some(u=>u.endpoint===d)){y.error(n("storage.spaces.gateway.add.duplicate",{name:m}));return}const C={name:m,did:S,url:g,endpoint:d};await c(C,d),y.success(n("storage.spaces.connectedWithName",{name:(C==null?void 0:C.name)??"DID Spaces"}))},x=async({spaceGateway:d})=>{try{await h(d)}catch(m){console.error(m),y.error(se(m))}};return e.jsx(nt,{...t,options:l,onSuccess:x})}H.propTypes={};H.defaultProps={};function Ue({...t}){const{t:s}=A.useContext(at),{blocklet:a,loadingDiskInfo:n,actions:r}=U();if(A.useEffect(()=>{r==null||r.refreshBlocklet({showError:!1,attachDiskInfo:!0})},[]),a.diskInfo){const i=(l,h,x)=>e.jsxs(v,{children:[l," ",e.jsx("strong",{children:h?st(h):"empty"})]}),o=a.environments.reduce((l,h)=>(l[h.key]=h.value,l),{}),c=[{key:"appDir",name:s("blocklet.diskInfo.appDir"),value:i(o.BLOCKLET_APP_DIR,a.diskInfo.app)},{key:"dataDir",name:s("blocklet.diskInfo.dataDir"),value:i(o.BLOCKLET_DATA_DIR,a.diskInfo.data)},{key:"logDir",name:s("blocklet.diskInfo.logDir"),value:i(o.BLOCKLET_LOG_DIR,a.diskInfo.log)},{key:"cacheDir",name:s("blocklet.diskInfo.cacheDir"),value:i(o.BLOCKLET_CACHE_DIR,a.diskInfo.cache)}];return e.jsx(Jt,{component:"div",...t,children:c.map(l=>e.jsx(Et,{valueComponent:"div",nameWidth:120,name:l.name,children:l.value},l.key))})}return n?e.jsx(b,{}):e.jsx(v,{children:s("blocklet.diskInfo.empty")})}const Jt=He(v)``;var Le=function(s){return e.jsxs("svg",{...s,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/PM6AmJouW4cVge9pZuMJga2NQH918Sp4VIXddVCKizUTFu3CbUM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I7vD/4iAW9KWHB7JsEZeCE1E/mdgVHZTOci8X+YIanJt7+aBd2k8f2RL45Z2puefelcXjUWbKdMSYwr58dAPaHymSU0o9/zjFt7/VoGmNAwCyvrKe2L1hYJqtd5gh6FGiCAGzqFk6on9pQdSAQzkctDTtXGbDih5iRPVIk9TwCJGwP3tpATkHsNwloUilnNMFce7twgDgrgWhsE8jWW+EBLlTDMn9pmtJOefTJc6Cxld039TN4XiwL4pMtU+8tXJ4g/LghG5APdF7/e3FSi4v8vnEBiIEm+5LlZtsk2LbbbY5hN9JkkJkd5BjQFPoUcwjJdTm0mx0024NmOvVgxASvU9TonFxUqG8cUTy3m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]})};Le.defaultProps={width:"228",height:"258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function we(){const{t}=k();return e.jsxs(I,{children:[e.jsxs(I,{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[e.jsx(Le,{style:{width:250,height:250}}),e.jsx(v,{marginTop:"24px",marginBottom:"24px",children:t("storage.spaces.connect.provider")}),e.jsx(H,{})]}),e.jsx(v,{fontSize:"1.2rem",fontWeight:"bold",mb:2,mt:2,children:t("common.dataStorage")}),e.jsx(Ue,{})]})}we.propTypes={};var ge={},Qt=V;Object.defineProperty(ge,"__esModule",{value:!0});var Me=ge.default=void 0,Zt=Qt(K()),zt=e;Me=ge.default=(0,Zt.default)((0,zt.jsx)("path",{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"}),"ArrowOutward");var xe={},Ht=V;Object.defineProperty(xe,"__esModule",{value:!0});var Fe=xe.default=void 0,Vt=Ht(K()),Kt=e;Fe=xe.default=(0,Vt.default)((0,Kt.jsx)("path",{d:"M14.69 2.21 4.33 11.49c-.64.58-.28 1.65.58 1.73L13 14l-4.85 6.76c-.22.31-.19.74.08 1.01.3.3.77.31 1.08.02l10.36-9.28c.64-.58.28-1.65-.58-1.73L11 10l4.85-6.76c.22-.31.19-.74-.08-1.01-.3-.3-.77-.31-1.08-.02"}),"ElectricBoltOutlined");var Se={},Gt=V;Object.defineProperty(Se,"__esModule",{value:!0});var Pe=Se.default=void 0,Xt=Gt(K()),Yt=e;Pe=Se.default=(0,Xt.default)((0,Yt.jsx)("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}),"FolderOutlined");function je({spaceGateway:t,onConfirm:s,onCancel:a}){const{t:n}=k(),[r,i]=A.useState(!1),[o,c]=A.useState(!1),l=(d,m)=>{d==null||d.preventDefault(),d==null||d.stopPropagation(),i(m)},h=async d=>{try{d==null||d.stopPropagation(),c(!0),await(s==null?void 0:s(t)),i(!1)}catch(m){console.error(m),y.error(`${n("storage.space.gateway.delete.failed")}: ${se(m)}`)}finally{i(!1),c(!1)}},x=d=>{l(d,!1),a==null||a(d)};return e.jsxs(e.Fragment,{children:[e.jsxs(q,{color:"red",onClick:d=>l(d,!0),children:[e.jsx(_,{style:{minWidth:24,color:"red"},children:e.jsx(Rt,{fontSize:"small"})}),e.jsx($,{style:{color:"red"},children:n("common.delete")})]}),e.jsx(ot,{title:n("storage.spaces.gateway.delete.title"),open:r,confirmButton:{text:n("common.confirm"),props:{size:"small",variant:"contained",color:"error",loading:o}},cancelButton:{text:n("common.cancel"),props:{size:"small",variant:"outlined",disabled:o}},onConfirm:h,onCancel:x,children:e.jsx(v,{sx:{wordWrap:"break-word"},children:n("storage.spaces.gateway.delete.descForBackup",{name:`${t==null?void 0:t.name}`})})})]})}je.propTypes={spaceGateway:f.shape({name:f.string.isRequired,url:f.string.isRequired,protected:f.bool}).isRequired,onConfirm:f.func,onCancel:f.func};je.defaultProps={onConfirm:()=>{},onCancel:()=>{}};function Ae({spaceGateway:t,selected:s,onDelete:a,onConnect:n,enableSwitchToSpace:r,backupInProgress:i,...o}){const[c,l]=A.useState(null),{t:h}=k(),[x,d]=A.useState(!1),m=(g,j)=>{g.stopPropagation(),g.preventDefault(),l(j&&g.currentTarget)},S=async g=>{try{d(!0),m(g,!1),await n(t)}catch(j){console.error(j),y.error(j.message)}finally{d(!1)}};return e.jsxs(e.Fragment,{children:[x||t!=null&&t.loading?e.jsx(b,{size:"24px"}):e.jsx(Ve,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",variant:"outlined",size:"small",onClick:g=>m(g,!0),...o,children:e.jsx(kt,{})}),e.jsxs(Ke,{id:"simple-menu",anchorEl:c,keepMounted:!0,open:!!c,onClose:g=>m(g,!1),children:[e.jsxs(q,{onClick:g=>{m(g,!1),window.open(Ce(t.endpoint?Bt(t.endpoint):t.url,{allowDomains:null}))},children:[e.jsx(_,{style:{minWidth:24},children:e.jsx(Me,{fontSize:"small"})}),e.jsx($,{children:h("common.open")})]}),e.jsxs(q,{onClick:g=>{m(g,!1),window.open(Ce(yt(t.endpoint),{allowDomains:null}))},children:[e.jsx(_,{style:{minWidth:24},children:e.jsx(Pe,{fontSize:"small"})}),e.jsx($,{children:h("storage.spaces.strategy.viewBackupFiles")})]}),!s&&r&&e.jsxs(q,{onClick:S,children:[e.jsx(_,{style:{minWidth:24},children:e.jsx(Fe,{fontSize:"small"})}),e.jsx($,{children:h("storage.spaces.connect.switchToSpace")})]}),!i&&e.jsx(je,{spaceGateway:t,onConfirm:async()=>{l(null),await(a==null?void 0:a(t))},onCancel:()=>l(null)})]})]})}Ae.propTypes={spaceGateway:f.shape({name:f.string.isRequired,url:f.string.isRequired,protected:f.bool,endpoint:f.string.isRequired,loading:f.bool}).isRequired,selected:f.bool.isRequired,enableSwitchToSpace:f.bool,onDelete:f.func,onConnect:f.func,backupInProgress:f.bool};Ae.defaultProps={onDelete:()=>{},onConnect:()=>{},enableSwitchToSpace:!0,backupInProgress:!1};function Be({spaceGateway:t,spaceStatus:s,selected:a,onConnected:n,onDeleted:r,onBackedUp:i}){const{t:o,locale:c}=k(),{blocklet:l}=U(),{api:h,info:{did:x}}=J(),{appDid:d,appName:m,appDescription:S,scopes:g,appUrl:j,referrer:C}=Re({blocklet:l}),{backupProgress:u,updateSpaceGateway:G,deleteSpaceGateway:L,refreshBackupEndpoint:w}=Q(),[M,R]=A.useState(!1),[E,F]=A.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:o("storage.spaces.authorize.title",{appName:m},c),scan:o("storage.spaces.authorize.scan",{appName:m},c),confirm:"",success:e.jsx(v,{gutterBottom:!0,children:o("storage.spaces.authorize.success")})},onClose:()=>{F(B=>({...B,open:!1}))}}),ne=a&&!M&&s===ie.DISCONNECTED,ae=a&&!M&&!t.loading&&s===ie.CONNECTED,Z=a&&M&&s===ie.CONNECTED,p=async()=>{try{if(await vt(t==null?void 0:t.endpoint)){await h.configBlocklet({input:{did:[l.meta.did],configs:[{key:T.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t.endpoint}]}}),w(),y.success(o("storage.spaces.connect.switchToSpaceSucceeded",{name:t.name?`(${t.name})`:""})),n==null||n(null,t);return}}catch(B){console.error(B),n==null||n(B,t);return}F(B=>({...B,open:!0,prefix:pe(t.url,"space/api/did"),baseUrl:new URL(t.url).origin,checkFn:ke.create({baseURL:pe(t.url,"space")}).get,extraParams:{appDid:d,appName:m,appDescription:S,scopes:g,appUrl:j,referrer:C,nodeDid:x,spaceDid:t.did}}))},P=async(B,ye)=>{const oe=ye(B.endpoint),Ze=ue(oe),N=B.space?ye(B.space):{};if(t.did&&Ze!==t.did){F(ze=>({...ze,open:!1}));const Y=o("storage.spaces.gateway.switch.failedForMismatchSpace",{name:N!=null&&N.name?N.name:""});y.error(Y),n==null||n(new Error(Y),t);return}const ve={...t,name:N.name??"DID Space",did:N.did??ue(oe),endpoint:oe};await G(ve),F(Y=>({...Y,open:!1})),n==null||n(null,ve)},D=async()=>{try{if(M)return;R(!0),await h.backupBlocklet({input:{appDid:l.appDid,to:"spaces"}})}catch(B){console.error(B),y.error(B.message),i==null||i(B,t)}finally{R(!0)}},X=async()=>{try{await L(t),y.success(o("storage.spaces.gateway.delete.succeeded",{name:`(${t.name})`})),r==null||r(null,t)}catch(B){console.error(B),r==null||r(B,t)}};return A.useEffect(()=>{u!=null&&u.completed?(a&&((u==null?void 0:u.progress)===100?(y.success(o("storage.spaces.backupSuccessfully")),i==null||i(null,t)):u.message&&(i==null||i(new Error(u==null?void 0:u.message),t)),u.progress=0,u.message=""),R(!1)):u.progress&&R(!0)},[u]),e.jsxs(e.Fragment,{children:[e.jsxs(I,{sx:{".action-btn":{borderRadius:1,marginLeft:1}},display:"flex",alignItems:"center",children:[ae&&e.jsx(re,{className:"action-btn",variant:"outlined",size:"small",onClick:D,children:o("storage.spaces.strategy.backupNow")}),ne&&e.jsx(re,{className:"action-btn",variant:"outlined",size:"small",onClick:p,children:o("storage.spaces.disconnected.reconnectNow")}),Z&&e.jsxs(re,{className:"action-btn",variant:"outlined",size:"small",sx:{minWidth:70},children:[e.jsx(b,{variant:"determinate",value:u==null?void 0:u.progress,size:14,sx:{mr:1}}),u==null?void 0:u.progress,"%"]}),e.jsx(it,{forceConnected:!1,saveConnect:!1,prefix:E.prefix,open:E.open,popup:!0,action:E.action,baseUrl:E.baseUrl,checkFn:E.checkFn,onSuccess:P,onClose:E.onClose,checkTimeout:E.checkTimeout,extraParams:E.extraParams,messages:E.messages,locale:c},"get-endpoint")]}),e.jsx(Ae,{sx:{minWidth:32,padding:"2px 4px",ml:1},spaceGateway:t,selected:a,onDelete:X,onConnect:p,enableSwitchToSpace:(u==null?void 0:u.completed)||te(u==null?void 0:u.message),backupInProgress:Z})]})}Be.propTypes={spaceGateway:f.shape({did:f.string.isRequired,name:f.string.isRequired,url:f.string.isRequired,endpoint:f.string.isRequired,protected:f.bool,loading:f.bool}).isRequired,spaceStatus:f.string.isRequired,selected:f.bool.isRequired,onConnected:f.func,onDeleted:f.func,onBackedUp:f.func};Be.defaultProps={onConnected:()=>{},onDeleted:()=>{},onBackedUp:()=>{}};function Ne({...t}){const{t:s,locale:a}=k(),{spaceGateways:n,backups:r}=Q(),i=[{label:"DID Space",name:"target",options:{customBodyRenderLite:o=>{var g;const{targetUrl:c,targetName:l,status:h,createdAt:x}=r[o],d=h===O.BACKUPS.STATUS.PROGRESS&&W().diff(x,"hours")>=O.BACKUPS.TIMEOUT_HOURS,m=h===O.BACKUPS.STATUS.SUCCEEDED&&!d,S=l||((g=n.find(j=>c==null?void 0:c.includes(ue(j==null?void 0:j.endpoint))))==null?void 0:g.name)||"Unknown DID Space";return m?e.jsx(Ge,{fontSize:"16px",href:c,target:"_blank",children:S}):e.jsx(v,{variant:"body1",fontSize:"16px",children:S})}}},{label:s("common.strategy"),name:"strategy",options:{customBodyRender:o=>{const c=s(o===0?"common.auto":"common.manual");return e.jsx(ce,{children:c})}}},{label:s("common.startTime"),name:"createdAt",options:{customBodyRender:o=>W(o).format("YYYY-MM-DD HH:mm:ss")}},{label:s("common.endTime"),name:"updatedAt",options:{customBodyRender:o=>te(o)?"":W(o).format("YYYY-MM-DD HH:mm:ss")}},{label:s("common.status"),name:"status",options:{customBodyRenderLite:o=>{const{status:c,message:l,createdAt:h}=(r==null?void 0:r[o])??{},x=c===O.BACKUPS.STATUS.PROGRESS&&W().diff(h,"hours")>=O.BACKUPS.TIMEOUT_HOURS,d=x&&s("common.timeoutError"),m=c===O.BACKUPS.STATUS.PROGRESS&&!x,S=c===O.BACKUPS.STATUS.SUCCEEDED&&!x;return m?e.jsxs(v,{display:"inline-flex",alignItems:"center",fontSize:"14px",children:[e.jsx(b,{sx:{marginRight:"4px"},size:"12px"}),s("common.progress")]}):S?e.jsx(ce,{type:"success",children:s("common.succeeded")}):e.jsxs(I,{display:"inline-flex",alignItems:"center",children:[e.jsx(ce,{type:"error",children:s("common.failed")})," ",e.jsx(Xe,{style:{display:"flex",alignItems:"center",flexShrink:0},title:l||d,children:e.jsx(Ye,{children:e.jsx(rt,{style:{width:"24px",height:"24px"},color:"error"})})})]})}}}];return e.jsx(I,{...t,children:r!=null&&r.length?e.jsx(ct,{title:e.jsx(v,{fontSize:"1.2rem",fontWeight:"bold",children:s("storage.spaces.backup.records")}),data:r,columns:i,emptyNode:s("storage.spaces.record.emptyData",a),options:{download:!1,filter:!1,print:!1}}):e.jsxs(e.Fragment,{children:[e.jsx(I,{display:"flex",height:"56px",lineHeight:"56px",alignItems:"center",children:e.jsx(v,{fontSize:"1.2rem",fontWeight:"bold",children:s("storage.spaces.backup.records")})}),e.jsx(I,{color:"#9397A1",marginTop:"16px",marginBottom:"24px",children:s("storage.spaces.record.emptyData")})]})})}Ne.propTypes={};function Je({...t}){const{t:s}=k(),{autoBackup:a,updateAutoBackup:n}=Q(),r=async()=>{try{const i=!(a!=null&&a.enabled);await n({enabled:i}),y.success(s(i?"storage.spaces.autoBackup.enabled":"storage.spaces.autoBackup.disabled"))}catch(i){y.error(i.message)}};return e.jsx(Dt,{checked:!!(a!=null&&a.enabled),onChange:r,name:"enableWelcomePage",labelProps:{label:e.jsx(v,{marginRight:"8px",children:e.jsx("span",{children:s("storage.spaces.autoBackup.title")})})},style:{...t.style}})}Je.propTypes={};function Wt(){const{t}=k(),s=Ee(),{spaceGateways:a,spaceGatewaysLoading:n,spaceGatewayIsSelected:r}=Q(),i=n&&!(a!=null&&a.length),o=({spaceGateway:c,spaceStatus:l,selected:h,refresh:x})=>e.jsx(Be,{spaceGateway:c,spaceStatus:l,selected:h,onConnected:()=>x(),onBackedUp:d=>d&&x()});return e.jsxs(I,{display:"flex",flexDirection:"column",children:[e.jsxs(ee,{spacing:s?1:4,direction:s?"column":"row",alignItems:s?"space-between":"center",justifyContent:s?"center":"space-between",marginBottom:"12px",children:[e.jsx(v,{fontSize:"1.2rem",fontWeight:"bold",flexGrow:1,children:t("storage.spaces.connected.title")}),e.jsx(Je,{}),s?e.jsx(H,{sx:{width:"100%","& button:first-of-type":{width:"100%"}}}):e.jsx(H,{})]}),e.jsx(I,{children:i?e.jsx(I,{display:"flex",justifyContent:"center",children:e.jsx(b,{})}):e.jsx(z,{container:!0,spacing:1,children:e.jsx(e.Fragment,{children:a.map(c=>e.jsx(z,{item:!0,xs:12,md:6,children:e.jsx(lt,{sx:{marginTop:"12px"},endpoint:c.endpoint,selected:r(c),action:o},c.endpoint)}))})})}),e.jsx(Ne,{sx:{marginTop:"24px"}}),e.jsx(v,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:t("common.dataStorage")}),e.jsx(Ue,{})]})}function qt(){const{spaceGatewaysFirstLoading:t,spaceGateways:s}=Q();return t?e.jsx(Ie,{relative:"parent",children:e.jsx(b,{})}):te(s)?e.jsx(we,{}):e.jsx(Wt,{})}function _t(){return e.jsx(me,{children:e.jsx(qt,{})})}function $t(){const{spaceGateway:t,settingStorageEndpoint:s,updateSpaceGateway:a,hasStorageEndpoint:n,loading:r,storageEndpoint:i}=It(),o=de(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"16px"}));return r?e.jsx(Ie,{relative:"parent",children:e.jsx(b,{})}):e.jsxs(I,{sx:{maxWidth:"md",position:"relative"},children:[n?e.jsx(ft,{spaceGateway:t,settingStorageEndpoint:s}):e.jsx(mt,{}),e.jsx(I,{sx:o,children:e.jsx(gt,{onConnect:a,storageEndpoint:i})})]})}function es(){const{t}=k();return e.jsxs(Ct,{children:[e.jsxs(ee,{spacing:1,marginBottom:2,children:[e.jsx(v,{fontSize:"1.2rem",fontWeight:"bold",children:t("storage.appLevel.title")}),e.jsx(v,{color:"text.secondary",children:t("storage.appLevel.description")})]}),e.jsx($t,{})]})}function Qe({navOrientation:t,...s}){const{t:a,locale:n}=k(),{blocklet:r}=U(),i=Ee({key:"md"}),[o,c]=$e(),l=o.get("tab")||"backup",h=i?"horizontal":t,x=de(()=>{var u;const j=[{label:e.jsxs(ee,{direction:"row",alignItems:"center",alignSelf:"flex-start",spacing:2,children:[e.jsx(De,{}),e.jsx("span",{children:a("common.backup")})]}),value:"backup"}],C=(u=r==null?void 0:r.capabilities)==null?void 0:u.didSpace;return(C===T.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||C===T.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP)&&j.push({label:e.jsxs(ee,{direction:"row",alignItems:"center",alignSelf:"flex-start",spacing:2,children:[e.jsx(Oe,{}),e.jsx("span",{children:a("common.storage")})]}),value:"storage"}),j},[n,h]),m=de(()=>({backup:e.jsx(_t,{}),storage:e.jsx(es,{})}))[l],S=j=>{c(C=>(j==="backup"?C.delete("tab"):C.set("tab",j),C))};if(x.length<=1)return e.jsx(le,{children:m});const g=e.jsx(dt,{tabs:x,current:l,orientation:h,onChange:S,sx:[{borderRight:1,height:"100%",borderColor:"divider"},h==="horizontal"&&{borderRight:0}]});if(h==="vertical")return e.jsx(I,{...s,children:e.jsxs(z,{container:!0,columnSpacing:4,columns:24,sx:{mt:-1},children:[e.jsx(z,{item:!0,md:5,lg:4,children:g}),e.jsx(z,{item:!0,md:19,lg:20,children:e.jsx(le,{sx:{mt:1},children:m})})]})});if(h==="horizontal")return e.jsxs(I,{...s,children:[g,e.jsx(le,{sx:{mt:2},children:m})]})}Qe.propTypes={navOrientation:f.oneOf(["vertical","horizontal"])};Qe.defaultProps={navOrientation:"vertical"};const le=We(I)`
|
|
1
|
+
import{a1 as V,j as e,E as f,aa as He,T as v,a2 as b,a3 as I,al as q,bm as _,bn as $,x as Ve,ak as Ke,bp as Ge,a4 as Xe,ai as Ye,ac as ee,bO as z,s as We}from"./vendor-mui-core-xF5F4eT7.js";import{n as qe,h as _e,d as de}from"./vendor-hooks-BKxTDk_P.js";import{r as A,u as $e}from"./vendor-react-D-afvo_7.js";import{B as U,y as J,h as T,a0 as et,ac as tt,aw as st,F as W}from"./index-LIf2LIyz.js";import{$ as K,j as y,e as k,aQ as nt,a1 as at,aO as ot,bO as ie,a2 as re,Z as it,b as O,ab as ce,b0 as rt,aU as ct,aP as lt,C as Ie,am as dt}from"./vendor-arcblock-DZrZ_x_3.js";import{u as Ee}from"./use-mobile-DnWfrhc7.js";import{y as te,d as pt,P as ut,F as ht,C as ke,x as pe}from"./vendor-utils-5TjOM6td.js";import"./api-K65cLqol.js";import{u as Re,C as ft,D as mt,a as gt}from"./connect-to-BYvNqC5N.js";import{g as xt,a as St,b as jt,i as At,c as Bt,d as yt,h as vt,e as ue,C as Ct,u as It}from"./config-space-Y_f6nwhj.js";import{f as se}from"./format-error-C0Ke3VXF.js";import{I as Et}from"./index-DGzAI_hi.js";import{d as kt}from"./MoreHoriz-JX8PbVXG.js";import{d as Rt}from"./DeleteOutline-BzV7E1BM.js";import{g as Ce}from"./get-safe-url-DDeO6YpV.js";import{S as Dt}from"./switch-control-D2qynQm8.js";var he={},Ot=V;Object.defineProperty(he,"__esModule",{value:!0});var De=he.default=void 0,Tt=Ot(K()),bt=e;De=he.default=(0,Tt.default)((0,bt.jsx)("path",{d:"M14 12c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2m-2-9c-4.97 0-9 4.03-9 9H0l4 4 4-4H5c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.51 0-2.91-.49-4.06-1.3l-1.42 1.44C8.04 20.3 9.94 21 12 21c4.97 0 9-4.03 9-9s-4.03-9-9-9"}),"SettingsBackupRestoreOutlined");var fe={},Ut=V;Object.defineProperty(fe,"__esModule",{value:!0});var Oe=fe.default=void 0,Lt=Ut(K()),wt=e;Oe=fe.default=(0,Lt.default)((0,wt.jsx)("path",{d:"M2 20h20v-4H2zm2-3h2v2H4zM2 4v4h20V4zm4 3H4V5h2zm-4 7h20v-4H2zm2-3h2v2H4z"}),"StorageOutlined");async function Mt({blockletDid:t,nodeApi:s,spaceGateways:a}){let n=!1;const r=await Promise.all(a.map(async i=>{let{name:o}=i;const c=await xt(i.endpoint);return!te(c)&&c!==o&&(o=c,n=!0),{...i,name:o}}));return n&&await Promise.all(r.filter(i=>i.did).map(i=>s.updateBlockletSpaceGateway({input:{did:t,where:{did:i.did},spaceGateway:{...i}}}))),r}function Ft({refresh:t}={}){var r;const{blocklet:s}=U(),a=(r=s==null?void 0:s.meta)==null?void 0:r.did,{api:n}=J();return qe(async()=>{if(!a)return[];const{spaceGateways:i}=await n.getBlockletSpaceGateways({input:{did:a}});return await Mt({blockletDid:a,nodeApi:n,spaceGateways:i})??[]},{refreshDeps:[a,t],onError(i){var o;(o=i==null?void 0:i.message)!=null&&o.includes("not logged")?console.warn(i):(console.error(i),y.error(se(i)))}})}function Te({deps:t,setLoading:s}={deps:[],setLoading:()=>{}}){var c;const{blocklet:a}=U(),[n,r]=A.useState([]),{api:i}=J(),o=pt(async()=>{try{if(s(!0),!a){r([]);return}const{backups:l}=await i.getBlockletBackups({input:{did:a.meta.did}});r(l??[])}catch(l){console.error(l),y.error(se(l))}finally{s(!1)}},2e3);return _e(async()=>{o()},[(c=a==null?void 0:a.meta)==null?void 0:c.did].concat(t)),{backups:n}}function Pt({appDid:t}){const{backups:s}=Te(),[a,n]=A.useState({message:"",progress:0,completed:!1}),r=J(),{ws:{useSubscription:i}}=r;return i(T.BlockletEvents.backupProgress,o=>{t===(o==null?void 0:o.appDid)&&n(()=>({...o}))},[t]),A.useEffect(()=>{var o;if(s!=null&&s.length&&ut((o=s[0])==null?void 0:o.status)){const[c]=s;n(()=>({message:c.message,progress:c.progress,completed:c.progress>=100}))}},[s]),a}const be=A.createContext({}),{Provider:Nt,Consumer:xs}=be;function me({children:t}){var Z;const{t:s}=k(),{api:a}=J(),{blocklet:n}=U(),[r,i]=A.useState(!1),{data:o,loading:c,mutate:l}=Ft({refresh:r}),h=ht(o),x=Pt({appDid:n==null?void 0:n.appDid}),[d,m]=A.useState(!1),S=A.useMemo(()=>St(n==null?void 0:n.environments),[n,r,d]),[g,j]=A.useState(!1),{backups:C}=Te({deps:[x],setLoading:j}),[u,G]=A.useState(o==null?void 0:o.find(p=>p.endpoint===S)),L=(Z=n==null?void 0:n.settings)==null?void 0:Z.autoBackup,w=()=>{i(p=>!p)},M=()=>{m(p=>!p)},R=async p=>{await a.updateAutoBackup({input:{did:n.meta.did,autoBackup:p}})},E=async(p,P)=>{l(D=>{const X=[...D];return X.push({...p,loading:!0}),X}),await a.addBlockletSpaceGateway({input:{did:n.meta.did,spaceGateway:p}}),S!==P&&await a.configBlocklet({input:{did:[n.meta.did],configs:[{key:T.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:P}]}}),w(),G(p)},F=async p=>{p&&(p.endpoint===S&&(await a.configBlocklet({input:{did:[n.meta.did],configs:[{key:T.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:""}]}}),L!=null&&L.enabled&&await R({enabled:!1})),await a.deleteBlockletSpaceGateway({input:{did:n.meta.did,spaceGatewayDid:p==null?void 0:p.did}}),l(P=>{const D=[...P];return D.splice(D.indexOf(p),1),D}),w(),G(p))},ne=async p=>{await a.updateBlockletSpaceGateway({input:{did:n.meta.did,where:{did:p.did},spaceGateway:p}}),S!==p.endpoint&&await a.configBlocklet({input:{did:[n.meta.did],configs:[{key:T.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:p.endpoint}]}}),y.success(s("storage.spaces.connectedWithName",{name:(p==null?void 0:p.name)??"DID Spaces"})),w()},ae=p=>(p==null?void 0:p.endpoint)===S;return e.jsx(Nt,{value:{spaceGateways:o||[],selectedSpaceGateway:u,addSpaceGateway:E,deleteSpaceGateway:F,updateSpaceGateway:ne,refreshSpaceGateways:w,spaceGatewaysLoading:c,spaceGatewaysFirstLoading:h,spaceGatewayIsSelected:ae,updateAutoBackup:R,backupEndpoint:S,backupProgress:x,backups:C,backupsLoading:g,refreshBackupEndpoint:M,autoBackup:L},children:t})}me.propTypes={children:f.any.isRequired};me.defaultProps={};function Q(){return A.useContext(be)}function H({...t}){const{blocklet:s}=U(),{info:a}=J(),{t:n}=k(),r=Re({blocklet:s}),i=et(a),{spaceGateways:o,addSpaceGateway:c}=Q(),l={checkFn:ke.create({baseURL:pe(window.location.origin,tt())}).get,webWalletUrl:i,extraParams:{appPid:s.appPid,appDid:r.appDid,appName:r.appName,appDescription:r.appDescription,appUrl:r.appUrl,referrer:r.referrer,scopes:r.scopes,nodeDid:a.did}},h=async({endpoint:d,name:m,did:S})=>{const g=await jt(d);if(!await At(g)){y.error(n("storage.spaces.gateway.add.invalidUrl"));return}if(o.some(u=>u.endpoint===d)){y.error(n("storage.spaces.gateway.add.duplicate",{name:m}));return}const C={name:m,did:S,url:g,endpoint:d};await c(C,d),y.success(n("storage.spaces.connectedWithName",{name:(C==null?void 0:C.name)??"DID Spaces"}))},x=async({spaceGateway:d})=>{try{await h(d)}catch(m){console.error(m),y.error(se(m))}};return e.jsx(nt,{...t,options:l,onSuccess:x})}H.propTypes={};H.defaultProps={};function Ue({...t}){const{t:s}=A.useContext(at),{blocklet:a,loadingDiskInfo:n,actions:r}=U();if(A.useEffect(()=>{r==null||r.refreshBlocklet({showError:!1,attachDiskInfo:!0})},[]),a.diskInfo){const i=(l,h,x)=>e.jsxs(v,{children:[l," ",e.jsx("strong",{children:h?st(h):"empty"})]}),o=a.environments.reduce((l,h)=>(l[h.key]=h.value,l),{}),c=[{key:"appDir",name:s("blocklet.diskInfo.appDir"),value:i(o.BLOCKLET_APP_DIR,a.diskInfo.app)},{key:"dataDir",name:s("blocklet.diskInfo.dataDir"),value:i(o.BLOCKLET_DATA_DIR,a.diskInfo.data)},{key:"logDir",name:s("blocklet.diskInfo.logDir"),value:i(o.BLOCKLET_LOG_DIR,a.diskInfo.log)},{key:"cacheDir",name:s("blocklet.diskInfo.cacheDir"),value:i(o.BLOCKLET_CACHE_DIR,a.diskInfo.cache)}];return e.jsx(Jt,{component:"div",...t,children:c.map(l=>e.jsx(Et,{valueComponent:"div",nameWidth:120,name:l.name,children:l.value},l.key))})}return n?e.jsx(b,{}):e.jsx(v,{children:s("blocklet.diskInfo.empty")})}const Jt=He(v)``;var Le=function(s){return e.jsxs("svg",{...s,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/PM6AmJouW4cVge9pZuMJga2NQH918Sp4VIXddVCKizUTFu3CbUMxyxgOUoSpidf+JEuRy/g3EyyCTz0yw2KRGtDs4fE8btEktCKZzL3J6mFoLZdlcJKLW33guKRC44aAhkhSWKMOT5uF2kd283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zjFt7/VoGmNAwCyvrKe2L1hYJqtd5gh6FGiCAGzqFk6on9pQdSAQzkctDTtXGbDih5iRPVIk9TwCJGwP3tpATkHsNwloUilnNMFce7twgDgrgWhsE8jWW+EBLlTDMn9pmtJOefTJc6Cxld039TN4XiwL4pMtU+8tXJ4g/LghG5APdF7/e3FSi4v8vnEBiIEm+5LlZtsk2LbbbY5hN9JkkJkd5BjQFPoUcwjJdTm0mx0024NmOvVgxASvU9TonFxUqG8cUTy3m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]})};Le.defaultProps={width:"228",height:"258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function we(){const{t}=k();return e.jsxs(I,{children:[e.jsxs(I,{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[e.jsx(Le,{style:{width:250,height:250}}),e.jsx(v,{marginTop:"24px",marginBottom:"24px",children:t("storage.spaces.connect.provider")}),e.jsx(H,{})]}),e.jsx(v,{fontSize:"1.2rem",fontWeight:"bold",mb:2,mt:2,children:t("common.dataStorage")}),e.jsx(Ue,{})]})}we.propTypes={};var ge={},Qt=V;Object.defineProperty(ge,"__esModule",{value:!0});var Me=ge.default=void 0,Zt=Qt(K()),zt=e;Me=ge.default=(0,Zt.default)((0,zt.jsx)("path",{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"}),"ArrowOutward");var xe={},Ht=V;Object.defineProperty(xe,"__esModule",{value:!0});var Fe=xe.default=void 0,Vt=Ht(K()),Kt=e;Fe=xe.default=(0,Vt.default)((0,Kt.jsx)("path",{d:"M14.69 2.21 4.33 11.49c-.64.58-.28 1.65.58 1.73L13 14l-4.85 6.76c-.22.31-.19.74.08 1.01.3.3.77.31 1.08.02l10.36-9.28c.64-.58.28-1.65-.58-1.73L11 10l4.85-6.76c.22-.31.19-.74-.08-1.01-.3-.3-.77-.31-1.08-.02"}),"ElectricBoltOutlined");var Se={},Gt=V;Object.defineProperty(Se,"__esModule",{value:!0});var Pe=Se.default=void 0,Xt=Gt(K()),Yt=e;Pe=Se.default=(0,Xt.default)((0,Yt.jsx)("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}),"FolderOutlined");function je({spaceGateway:t,onConfirm:s,onCancel:a}){const{t:n}=k(),[r,i]=A.useState(!1),[o,c]=A.useState(!1),l=(d,m)=>{d==null||d.preventDefault(),d==null||d.stopPropagation(),i(m)},h=async d=>{try{d==null||d.stopPropagation(),c(!0),await(s==null?void 0:s(t)),i(!1)}catch(m){console.error(m),y.error(`${n("storage.space.gateway.delete.failed")}: ${se(m)}`)}finally{i(!1),c(!1)}},x=d=>{l(d,!1),a==null||a(d)};return e.jsxs(e.Fragment,{children:[e.jsxs(q,{color:"red",onClick:d=>l(d,!0),children:[e.jsx(_,{style:{minWidth:24,color:"red"},children:e.jsx(Rt,{fontSize:"small"})}),e.jsx($,{style:{color:"red"},children:n("common.delete")})]}),e.jsx(ot,{title:n("storage.spaces.gateway.delete.title"),open:r,confirmButton:{text:n("common.confirm"),props:{size:"small",variant:"contained",color:"error",loading:o}},cancelButton:{text:n("common.cancel"),props:{size:"small",variant:"outlined",disabled:o}},onConfirm:h,onCancel:x,children:e.jsx(v,{sx:{wordWrap:"break-word"},children:n("storage.spaces.gateway.delete.descForBackup",{name:`${t==null?void 0:t.name}`})})})]})}je.propTypes={spaceGateway:f.shape({name:f.string.isRequired,url:f.string.isRequired,protected:f.bool}).isRequired,onConfirm:f.func,onCancel:f.func};je.defaultProps={onConfirm:()=>{},onCancel:()=>{}};function Ae({spaceGateway:t,selected:s,onDelete:a,onConnect:n,enableSwitchToSpace:r,backupInProgress:i,...o}){const[c,l]=A.useState(null),{t:h}=k(),[x,d]=A.useState(!1),m=(g,j)=>{g.stopPropagation(),g.preventDefault(),l(j&&g.currentTarget)},S=async g=>{try{d(!0),m(g,!1),await n(t)}catch(j){console.error(j),y.error(j.message)}finally{d(!1)}};return e.jsxs(e.Fragment,{children:[x||t!=null&&t.loading?e.jsx(b,{size:"24px"}):e.jsx(Ve,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",variant:"outlined",size:"small",onClick:g=>m(g,!0),...o,children:e.jsx(kt,{})}),e.jsxs(Ke,{id:"simple-menu",anchorEl:c,keepMounted:!0,open:!!c,onClose:g=>m(g,!1),children:[e.jsxs(q,{onClick:g=>{m(g,!1),window.open(Ce(t.endpoint?Bt(t.endpoint):t.url,{allowDomains:null}))},children:[e.jsx(_,{style:{minWidth:24},children:e.jsx(Me,{fontSize:"small"})}),e.jsx($,{children:h("common.open")})]}),e.jsxs(q,{onClick:g=>{m(g,!1),window.open(Ce(yt(t.endpoint),{allowDomains:null}))},children:[e.jsx(_,{style:{minWidth:24},children:e.jsx(Pe,{fontSize:"small"})}),e.jsx($,{children:h("storage.spaces.strategy.viewBackupFiles")})]}),!s&&r&&e.jsxs(q,{onClick:S,children:[e.jsx(_,{style:{minWidth:24},children:e.jsx(Fe,{fontSize:"small"})}),e.jsx($,{children:h("storage.spaces.connect.switchToSpace")})]}),!i&&e.jsx(je,{spaceGateway:t,onConfirm:async()=>{l(null),await(a==null?void 0:a(t))},onCancel:()=>l(null)})]})]})}Ae.propTypes={spaceGateway:f.shape({name:f.string.isRequired,url:f.string.isRequired,protected:f.bool,endpoint:f.string.isRequired,loading:f.bool}).isRequired,selected:f.bool.isRequired,enableSwitchToSpace:f.bool,onDelete:f.func,onConnect:f.func,backupInProgress:f.bool};Ae.defaultProps={onDelete:()=>{},onConnect:()=>{},enableSwitchToSpace:!0,backupInProgress:!1};function Be({spaceGateway:t,spaceStatus:s,selected:a,onConnected:n,onDeleted:r,onBackedUp:i}){const{t:o,locale:c}=k(),{blocklet:l}=U(),{api:h,info:{did:x}}=J(),{appDid:d,appName:m,appDescription:S,scopes:g,appUrl:j,referrer:C}=Re({blocklet:l}),{backupProgress:u,updateSpaceGateway:G,deleteSpaceGateway:L,refreshBackupEndpoint:w}=Q(),[M,R]=A.useState(!1),[E,F]=A.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:o("storage.spaces.authorize.title",{appName:m},c),scan:o("storage.spaces.authorize.scan",{appName:m},c),confirm:"",success:e.jsx(v,{gutterBottom:!0,children:o("storage.spaces.authorize.success")})},onClose:()=>{F(B=>({...B,open:!1}))}}),ne=a&&!M&&s===ie.DISCONNECTED,ae=a&&!M&&!t.loading&&s===ie.CONNECTED,Z=a&&M&&s===ie.CONNECTED,p=async()=>{try{if(await vt(t==null?void 0:t.endpoint)){await h.configBlocklet({input:{did:[l.meta.did],configs:[{key:T.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t.endpoint}]}}),w(),y.success(o("storage.spaces.connect.switchToSpaceSucceeded",{name:t.name?`(${t.name})`:""})),n==null||n(null,t);return}}catch(B){console.error(B),n==null||n(B,t);return}F(B=>({...B,open:!0,prefix:pe(t.url,"space/api/did"),baseUrl:new URL(t.url).origin,checkFn:ke.create({baseURL:pe(t.url,"space")}).get,extraParams:{appDid:d,appName:m,appDescription:S,scopes:g,appUrl:j,referrer:C,nodeDid:x,spaceDid:t.did}}))},P=async(B,ye)=>{const oe=ye(B.endpoint),Ze=ue(oe),N=B.space?ye(B.space):{};if(t.did&&Ze!==t.did){F(ze=>({...ze,open:!1}));const Y=o("storage.spaces.gateway.switch.failedForMismatchSpace",{name:N!=null&&N.name?N.name:""});y.error(Y),n==null||n(new Error(Y),t);return}const ve={...t,name:N.name??"DID Space",did:N.did??ue(oe),endpoint:oe};await G(ve),F(Y=>({...Y,open:!1})),n==null||n(null,ve)},D=async()=>{try{if(M)return;R(!0),await h.backupBlocklet({input:{appDid:l.appDid,to:"spaces"}})}catch(B){console.error(B),y.error(B.message),i==null||i(B,t)}finally{R(!0)}},X=async()=>{try{await L(t),y.success(o("storage.spaces.gateway.delete.succeeded",{name:`(${t.name})`})),r==null||r(null,t)}catch(B){console.error(B),r==null||r(B,t)}};return A.useEffect(()=>{u!=null&&u.completed?(a&&((u==null?void 0:u.progress)===100?(y.success(o("storage.spaces.backupSuccessfully")),i==null||i(null,t)):u.message&&(i==null||i(new Error(u==null?void 0:u.message),t)),u.progress=0,u.message=""),R(!1)):u.progress&&R(!0)},[u]),e.jsxs(e.Fragment,{children:[e.jsxs(I,{sx:{".action-btn":{borderRadius:1,marginLeft:1}},display:"flex",alignItems:"center",children:[ae&&e.jsx(re,{className:"action-btn",variant:"outlined",size:"small",onClick:D,children:o("storage.spaces.strategy.backupNow")}),ne&&e.jsx(re,{className:"action-btn",variant:"outlined",size:"small",onClick:p,children:o("storage.spaces.disconnected.reconnectNow")}),Z&&e.jsxs(re,{className:"action-btn",variant:"outlined",size:"small",sx:{minWidth:70},children:[e.jsx(b,{variant:"determinate",value:u==null?void 0:u.progress,size:14,sx:{mr:1}}),u==null?void 0:u.progress,"%"]}),e.jsx(it,{forceConnected:!1,saveConnect:!1,prefix:E.prefix,open:E.open,popup:!0,action:E.action,baseUrl:E.baseUrl,checkFn:E.checkFn,onSuccess:P,onClose:E.onClose,checkTimeout:E.checkTimeout,extraParams:E.extraParams,messages:E.messages,locale:c},"get-endpoint")]}),e.jsx(Ae,{sx:{minWidth:32,padding:"2px 4px",ml:1},spaceGateway:t,selected:a,onDelete:X,onConnect:p,enableSwitchToSpace:(u==null?void 0:u.completed)||te(u==null?void 0:u.message),backupInProgress:Z})]})}Be.propTypes={spaceGateway:f.shape({did:f.string.isRequired,name:f.string.isRequired,url:f.string.isRequired,endpoint:f.string.isRequired,protected:f.bool,loading:f.bool}).isRequired,spaceStatus:f.string.isRequired,selected:f.bool.isRequired,onConnected:f.func,onDeleted:f.func,onBackedUp:f.func};Be.defaultProps={onConnected:()=>{},onDeleted:()=>{},onBackedUp:()=>{}};function Ne({...t}){const{t:s,locale:a}=k(),{spaceGateways:n,backups:r}=Q(),i=[{label:"DID Space",name:"target",options:{customBodyRenderLite:o=>{var g;const{targetUrl:c,targetName:l,status:h,createdAt:x}=r[o],d=h===O.BACKUPS.STATUS.PROGRESS&&W().diff(x,"hours")>=O.BACKUPS.TIMEOUT_HOURS,m=h===O.BACKUPS.STATUS.SUCCEEDED&&!d,S=l||((g=n.find(j=>c==null?void 0:c.includes(ue(j==null?void 0:j.endpoint))))==null?void 0:g.name)||"Unknown DID Space";return m?e.jsx(Ge,{fontSize:"16px",href:c,target:"_blank",children:S}):e.jsx(v,{variant:"body1",fontSize:"16px",children:S})}}},{label:s("common.strategy"),name:"strategy",options:{customBodyRender:o=>{const c=s(o===0?"common.auto":"common.manual");return e.jsx(ce,{children:c})}}},{label:s("common.startTime"),name:"createdAt",options:{customBodyRender:o=>W(o).format("YYYY-MM-DD HH:mm:ss")}},{label:s("common.endTime"),name:"updatedAt",options:{customBodyRender:o=>te(o)?"":W(o).format("YYYY-MM-DD HH:mm:ss")}},{label:s("common.status"),name:"status",options:{customBodyRenderLite:o=>{const{status:c,message:l,createdAt:h}=(r==null?void 0:r[o])??{},x=c===O.BACKUPS.STATUS.PROGRESS&&W().diff(h,"hours")>=O.BACKUPS.TIMEOUT_HOURS,d=x&&s("common.timeoutError"),m=c===O.BACKUPS.STATUS.PROGRESS&&!x,S=c===O.BACKUPS.STATUS.SUCCEEDED&&!x;return m?e.jsxs(v,{display:"inline-flex",alignItems:"center",fontSize:"14px",children:[e.jsx(b,{sx:{marginRight:"4px"},size:"12px"}),s("common.progress")]}):S?e.jsx(ce,{type:"success",children:s("common.succeeded")}):e.jsxs(I,{display:"inline-flex",alignItems:"center",children:[e.jsx(ce,{type:"error",children:s("common.failed")})," ",e.jsx(Xe,{style:{display:"flex",alignItems:"center",flexShrink:0},title:l||d,children:e.jsx(Ye,{children:e.jsx(rt,{style:{width:"24px",height:"24px"},color:"error"})})})]})}}}];return e.jsx(I,{...t,children:r!=null&&r.length?e.jsx(ct,{title:e.jsx(v,{fontSize:"1.2rem",fontWeight:"bold",children:s("storage.spaces.backup.records")}),data:r,columns:i,emptyNode:s("storage.spaces.record.emptyData",a),options:{download:!1,filter:!1,print:!1}}):e.jsxs(e.Fragment,{children:[e.jsx(I,{display:"flex",height:"56px",lineHeight:"56px",alignItems:"center",children:e.jsx(v,{fontSize:"1.2rem",fontWeight:"bold",children:s("storage.spaces.backup.records")})}),e.jsx(I,{color:"#9397A1",marginTop:"16px",marginBottom:"24px",children:s("storage.spaces.record.emptyData")})]})})}Ne.propTypes={};function Je({...t}){const{t:s}=k(),{autoBackup:a,updateAutoBackup:n}=Q(),r=async()=>{try{const i=!(a!=null&&a.enabled);await n({enabled:i}),y.success(s(i?"storage.spaces.autoBackup.enabled":"storage.spaces.autoBackup.disabled"))}catch(i){y.error(i.message)}};return e.jsx(Dt,{checked:!!(a!=null&&a.enabled),onChange:r,name:"enableWelcomePage",labelProps:{label:e.jsx(v,{marginRight:"8px",children:e.jsx("span",{children:s("storage.spaces.autoBackup.title")})})},style:{...t.style}})}Je.propTypes={};function Wt(){const{t}=k(),s=Ee(),{spaceGateways:a,spaceGatewaysLoading:n,spaceGatewayIsSelected:r}=Q(),i=n&&!(a!=null&&a.length),o=({spaceGateway:c,spaceStatus:l,selected:h,refresh:x})=>e.jsx(Be,{spaceGateway:c,spaceStatus:l,selected:h,onConnected:()=>x(),onBackedUp:d=>d&&x()});return e.jsxs(I,{display:"flex",flexDirection:"column",children:[e.jsxs(ee,{spacing:s?1:4,direction:s?"column":"row",alignItems:s?"space-between":"center",justifyContent:s?"center":"space-between",marginBottom:"12px",children:[e.jsx(v,{fontSize:"1.2rem",fontWeight:"bold",flexGrow:1,children:t("storage.spaces.connected.title")}),e.jsx(Je,{}),s?e.jsx(H,{sx:{width:"100%","& button:first-of-type":{width:"100%"}}}):e.jsx(H,{})]}),e.jsx(I,{children:i?e.jsx(I,{display:"flex",justifyContent:"center",children:e.jsx(b,{})}):e.jsx(z,{container:!0,spacing:1,children:e.jsx(e.Fragment,{children:a.map(c=>e.jsx(z,{item:!0,xs:12,md:6,children:e.jsx(lt,{sx:{marginTop:"12px"},endpoint:c.endpoint,selected:r(c),action:o},c.endpoint)}))})})}),e.jsx(Ne,{sx:{marginTop:"24px"}}),e.jsx(v,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:t("common.dataStorage")}),e.jsx(Ue,{})]})}function qt(){const{spaceGatewaysFirstLoading:t,spaceGateways:s}=Q();return t?e.jsx(Ie,{relative:"parent",children:e.jsx(b,{})}):te(s)?e.jsx(we,{}):e.jsx(Wt,{})}function _t(){return e.jsx(me,{children:e.jsx(qt,{})})}function $t(){const{spaceGateway:t,settingStorageEndpoint:s,updateSpaceGateway:a,hasStorageEndpoint:n,loading:r,storageEndpoint:i}=It(),o=de(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"16px"}));return r?e.jsx(Ie,{relative:"parent",children:e.jsx(b,{})}):e.jsxs(I,{sx:{maxWidth:"md",position:"relative"},children:[n?e.jsx(ft,{spaceGateway:t,settingStorageEndpoint:s}):e.jsx(mt,{}),e.jsx(I,{sx:o,children:e.jsx(gt,{onConnect:a,storageEndpoint:i})})]})}function es(){const{t}=k();return e.jsxs(Ct,{children:[e.jsxs(ee,{spacing:1,marginBottom:2,children:[e.jsx(v,{fontSize:"1.2rem",fontWeight:"bold",children:t("storage.appLevel.title")}),e.jsx(v,{color:"text.secondary",children:t("storage.appLevel.description")})]}),e.jsx($t,{})]})}function Qe({navOrientation:t,...s}){const{t:a,locale:n}=k(),{blocklet:r}=U(),i=Ee({key:"md"}),[o,c]=$e(),l=o.get("tab")||"backup",h=i?"horizontal":t,x=de(()=>{var u;const j=[{label:e.jsxs(ee,{direction:"row",alignItems:"center",alignSelf:"flex-start",spacing:2,children:[e.jsx(De,{}),e.jsx("span",{children:a("common.backup")})]}),value:"backup"}],C=(u=r==null?void 0:r.capabilities)==null?void 0:u.didSpace;return(C===T.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||C===T.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP)&&j.push({label:e.jsxs(ee,{direction:"row",alignItems:"center",alignSelf:"flex-start",spacing:2,children:[e.jsx(Oe,{}),e.jsx("span",{children:a("common.storage")})]}),value:"storage"}),j},[n,h]),m=de(()=>({backup:e.jsx(_t,{}),storage:e.jsx(es,{})}))[l],S=j=>{c(C=>(j==="backup"?C.delete("tab"):C.set("tab",j),C))};if(x.length<=1)return e.jsx(le,{children:m});const g=e.jsx(dt,{tabs:x,current:l,orientation:h,onChange:S,sx:[{borderRight:1,height:"100%",borderColor:"divider"},h==="horizontal"&&{borderRight:0}]});if(h==="vertical")return e.jsx(I,{...s,children:e.jsxs(z,{container:!0,columnSpacing:4,columns:24,sx:{mt:-1},children:[e.jsx(z,{item:!0,md:5,lg:4,children:g}),e.jsx(z,{item:!0,md:19,lg:20,children:e.jsx(le,{sx:{mt:1},children:m})})]})});if(h==="horizontal")return e.jsxs(I,{...s,children:[g,e.jsx(le,{sx:{mt:2},children:m})]})}Qe.propTypes={navOrientation:f.oneOf(["vertical","horizontal"])};Qe.defaultProps={navOrientation:"vertical"};const le=We(I)`
|
|
2
2
|
position: relative;
|
|
3
3
|
min-height: 66vh;
|
|
4
4
|
overflow: hidden;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as E,g as Ir,a as he,u as Ro}from"./vendor-react-D-afvo_7.js";import{a1 as U,j as e,E as D,aa as ht,P as To,b_ as tn,bM as Oo,M as G,a3 as P,A as la,I as de,a2 as Ke,bN as ca,T as mt,aN as J,bL as ft,br as So,ad as wo,ah as Kt,bO as Me,aO as Pe,bH as Z,x as fe,ac as Le,b$ as Io,e as gt,Z as ua,a4 as le,K as ko,c0 as qo,c1 as Lo,c2 as Do,c3 as ge,bT as Re,c4 as da,c5 as kr,c6 as qr,c7 as Ao,c8 as fa,c9 as Mo,ca as Eo,aw as qe,cb as Bo,cc as $o,cd as Wo,ce as No,cf as Ho,cg as Fo,ch as zo,ci as Uo,cj as Vo,ck as Ko,cl as Go,cm as tr,am as Yo,C as Zo,ao as Jo,bx as pa,by as ma}from"./vendor-mui-core-xF5F4eT7.js";import{I as Xo}from"./iframe-CU0LfRyS.js";import{G as Be,w as Qo,x as Gt,Z as ei,c as rn,A as pt,n as me,an as ti,y as ri,N as rr,ao as ni,ap as nn,L as ha,F as Ee,K as ga}from"./vendor-utils-5TjOM6td.js";import{$ as vt,ae as an,e as ie,a2 as ee,j as z,b as Q,Z as va,at as ai,a6 as Ge,a1 as Te,bi as xt,au as xa,am as Lr,bn as oi,bo as ii,af as Xt,aB as te,bp as si,bq as li,br as ci,bs as ui,bt as di,a9 as on,aY as fi,bu as Pr,bv as pi,bw as mi,aU as nr,Y as hi,bx as Rr,aV as sn}from"./vendor-arcblock-DZrZ_x_3.js";import{a as je,u as k,d as $e,c as gi,n as Yt,k as ya}from"./vendor-hooks-BKxTDk_P.js";import{A as ba,d as ln}from"./config-DjozEU7w.js";import{F as ja,d as vi}from"./form-text-input-DS_PVT1r.js";import{d as cn}from"./ChevronRight-DlIj8Fj2.js";import{y as oe,B as ue,au as xi,f as _a,av as yi,m as bi,h as ae,M as ji,O as _i}from"./index-LIf2LIyz.js";import{B as Ci}from"./bundle-avatar-CYdInmjR.js";import{u as Pi,B as Ri}from"./index-0u5pzPhR.js";import{d as Ti}from"./Loop-B05tzyuy.js";import{d as Oi}from"./Done-DJfjmlFC.js";import{F as Si,R as wi,L as et}from"./logo-uploader-DbSGPbXh.js";import{w as Ca,P as Ii}from"./permission-C0p6f4_S.js";import{C as Dr}from"./confirm-CpCj_oj-.js";import{f as Ar}from"./format-error-C0Ke3VXF.js";import{_ as ki}from"./useSetState-Crt4S51m.js";import{u as qi}from"./session-CM1ewS-k.js";import{C as Li}from"./click-to-copy-Bu9H6mvL.js";import{u as Mr,a as Di}from"./dashboard-Cgj1BkGn.js";import{u as Ie,C as H,a as un,S as cr}from"./simple-select-D06JmA0a.js";import{a as Pa,b as Ai,c as Mi,m as Ei,i as dn}from"./isEmail-BWNRBSAy.js";import{S as ar}from"./switch-control-D2qynQm8.js";import{K as Bi}from"./keyboard-arrow-down-rounded-DadBVmpO.js";import{d as fn}from"./Add-DSPtuudj.js";import{I as $i}from"./index-DGzAI_hi.js";import{b as Wi}from"./base32-BAfsRZF6.js";import"./EditIcon-BOr0kf6I.js";import"./ArrowDropDown-DM9y1OaN.js";import"./index-DoZ2YM4T.js";import"./useLocalStorage-DV4AIe5L.js";import"./PlayArrow-DZfknrYj.js";import"./get-safe-url-
|
|
1
|
+
import{r as E,g as Ir,a as he,u as Ro}from"./vendor-react-D-afvo_7.js";import{a1 as U,j as e,E as D,aa as ht,P as To,b_ as tn,bM as Oo,M as G,a3 as P,A as la,I as de,a2 as Ke,bN as ca,T as mt,aN as J,bL as ft,br as So,ad as wo,ah as Kt,bO as Me,aO as Pe,bH as Z,x as fe,ac as Le,b$ as Io,e as gt,Z as ua,a4 as le,K as ko,c0 as qo,c1 as Lo,c2 as Do,c3 as ge,bT as Re,c4 as da,c5 as kr,c6 as qr,c7 as Ao,c8 as fa,c9 as Mo,ca as Eo,aw as qe,cb as Bo,cc as $o,cd as Wo,ce as No,cf as Ho,cg as Fo,ch as zo,ci as Uo,cj as Vo,ck as Ko,cl as Go,cm as tr,am as Yo,C as Zo,ao as Jo,bx as pa,by as ma}from"./vendor-mui-core-xF5F4eT7.js";import{I as Xo}from"./iframe-CU0LfRyS.js";import{G as Be,w as Qo,x as Gt,Z as ei,c as rn,A as pt,n as me,an as ti,y as ri,N as rr,ao as ni,ap as nn,L as ha,F as Ee,K as ga}from"./vendor-utils-5TjOM6td.js";import{$ as vt,ae as an,e as ie,a2 as ee,j as z,b as Q,Z as va,at as ai,a6 as Ge,a1 as Te,bi as xt,au as xa,am as Lr,bn as oi,bo as ii,af as Xt,aB as te,bp as si,bq as li,br as ci,bs as ui,bt as di,a9 as on,aY as fi,bu as Pr,bv as pi,bw as mi,aU as nr,Y as hi,bx as Rr,aV as sn}from"./vendor-arcblock-DZrZ_x_3.js";import{a as je,u as k,d as $e,c as gi,n as Yt,k as ya}from"./vendor-hooks-BKxTDk_P.js";import{A as ba,d as ln}from"./config-DjozEU7w.js";import{F as ja,d as vi}from"./form-text-input-DS_PVT1r.js";import{d as cn}from"./ChevronRight-DlIj8Fj2.js";import{y as oe,B as ue,au as xi,f as _a,av as yi,m as bi,h as ae,M as ji,O as _i}from"./index-LIf2LIyz.js";import{B as Ci}from"./bundle-avatar-CYdInmjR.js";import{u as Pi,B as Ri}from"./index-0u5pzPhR.js";import{d as Ti}from"./Loop-B05tzyuy.js";import{d as Oi}from"./Done-DJfjmlFC.js";import{F as Si,R as wi,L as et}from"./logo-uploader-DbSGPbXh.js";import{w as Ca,P as Ii}from"./permission-C0p6f4_S.js";import{C as Dr}from"./confirm-CpCj_oj-.js";import{f as Ar}from"./format-error-C0Ke3VXF.js";import{_ as ki}from"./useSetState-Crt4S51m.js";import{u as qi}from"./session-CM1ewS-k.js";import{C as Li}from"./click-to-copy-Bu9H6mvL.js";import{u as Mr,a as Di}from"./dashboard-Cgj1BkGn.js";import{u as Ie,C as H,a as un,S as cr}from"./simple-select-D06JmA0a.js";import{a as Pa,b as Ai,c as Mi,m as Ei,i as dn}from"./isEmail-BWNRBSAy.js";import{S as ar}from"./switch-control-D2qynQm8.js";import{K as Bi}from"./keyboard-arrow-down-rounded-DadBVmpO.js";import{d as fn}from"./Add-DSPtuudj.js";import{I as $i}from"./index-DGzAI_hi.js";import{b as Wi}from"./base32-BAfsRZF6.js";import"./EditIcon-BOr0kf6I.js";import"./ArrowDropDown-DM9y1OaN.js";import"./index-DoZ2YM4T.js";import"./useLocalStorage-DV4AIe5L.js";import"./PlayArrow-DZfknrYj.js";import"./get-safe-url-DDeO6YpV.js";import"./useAsyncRetry-Bmo6a1Zp.js";import"./useAsync-Ua5iss51.js";import"./InfoOutlined-C_J3Y0fX.js";var Er={},Ni=U;Object.defineProperty(Er,"__esModule",{value:!0});var Ra=Er.default=void 0,Hi=Ni(vt()),Fi=e;Ra=Er.default=(0,Hi.default)((0,Fi.jsx)("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"}),"TuneRounded");var Br={},zi=U;Object.defineProperty(Br,"__esModule",{value:!0});var Ta=Br.default=void 0,Ui=zi(vt()),Vi=e;Ta=Br.default=(0,Ui.default)((0,Vi.jsx)("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"}),"Key");var $r={},Ki=U;Object.defineProperty($r,"__esModule",{value:!0});var Oa=$r.default=void 0,Gi=Ki(vt()),Yi=e;Oa=$r.default=(0,Gi.default)((0,Yi.jsx)("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8z"}),"Login");var Wr={},Zi=U;Object.defineProperty(Wr,"__esModule",{value:!0});var Sa=Wr.default=void 0,Ji=Zi(vt()),Xi=e;Sa=Wr.default=(0,Ji.default)((0,Xi.jsx)("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"}),"NotificationsNone");const Qi={width:24,height:24,body:'<path fill="currentColor" d="M4.975 15q-.425 0-.7-.288T4 14q0-.425.288-.713T5 13h14.025q.425 0 .7.288T20 14q0 .425-.288.713T19 15H4.975Zm0 4q-.425 0-.7-.288T4 18q0-.425.288-.713T5 17h14.025q.425 0 .7.288T20 18q0 .425-.288.713T19 19H4.975Zm0-8q-.425 0-.7-.288T4 10q0-.425.288-.713T5 9h14.025q.425 0 .7.288T20 10q0 .425-.288.713T19 11H4.975Zm0-4q-.425 0-.7-.288T4 6q0-.425.288-.713T5 5h14.025q.425 0 .7.288T20 6q0 .425-.288.713T19 7H4.975Z"/>'},es=Qi;function Nr({label:t,disabled:l,required:r,initialValue:o,onChange:u,style:i,onSubmit:m,triggers:n,options:a,formatterBeforeSubmit:s,helperText:d,placeholder:C,renderImage:y,renderLabel:j,filterKeys:O,noEmpty:S,...I}){const[T,c]=E.useState(!1),[p,v]=E.useState(!1),[f,b]=E.useState(""),_=E.useRef(null),[x,g]=E.useState(o),[h,R]=E.useState(x),q=E.useMemo(()=>{if(!a)return{};const L={};return a.forEach($=>{L[$.code]=$}),L},[a]),M=()=>{if(!a)return[];if(!f)return a.map($=>$.code);const L=new RegExp(f.toLowerCase());return a.filter($=>{var V;for(let Y=0;Y<O.length;Y++){const re=O[Y];if(L.test((V=$[re])==null?void 0:V.toLowerCase()))return!0}return!1}).map($=>$.code)},W=async()=>{v(!0);try{await m(typeof s=="function"?s(h):h)===!1?R(x):S&&!h.length?(R(o),g(o)):(R(h),g(h))}catch{R(x)}finally{v(!1),c(!1)}},A=(L,$)=>{if(!Array.isArray($)){R([]),u([]);return}const V=$.filter(Y=>q[Y]);if(!V.length){R([]),u([]);return}R(V),u(V)},w=L=>{L.stopPropagation(),c(!0),setTimeout(()=>{if(_.current){const $=_.current.querySelector("input");$&&$.focus()}},500)},B=T?e.jsx(Oo,{ref:_,options:a,value:h,onChange:A,inputValue:f,onInputChange:(L,$)=>{b($)},PopperComponent:rs,fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:M,getOptionLabel:L=>{var $;return($=q[L])==null?void 0:$.name},renderInput:L=>e.jsx(G,{...L,label:"",placeholder:C}),renderOption:(L,$)=>{var Y;const V=h.indexOf($)!==-1;return E.createElement(ts,{component:"li",...L,key:$},y(q[$]||{}),e.jsx(P,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:V?"700":"normal"},children:j($,q[$])||((Y=q[$])==null?void 0:Y.name)}),e.jsx(P,{component:an,sx:{opacity:.5,width:18,height:18},style:{visibility:V?"visible":"hidden"}}))},...I}):e.jsx(P,{px:1,className:"form-item-input slot",onClick:w,style:{whiteSpace:"pre-wrap",cursor:"text"},children:h.filter(L=>a.some($=>$.code===L)).map(L=>e.jsx(la,{label:a.find($=>$.code===L).name,style:{marginRight:8},size:"small"},L))});return e.jsx(Si,{className:"form",style:i,children:e.jsxs(P,{className:"form-item",children:[e.jsxs(P,{className:"form-item-label",children:[t,r&&e.jsx(wi,{})]}),e.jsxs(P,{className:"form-item-body",children:[e.jsx(P,{className:"form-item-input",children:B}),e.jsx(P,{className:"form-item-action",children:T?e.jsxs(e.Fragment,{children:[e.jsx(de,{"data-cy":"schema-form-item-confirm",onClick:W,disabled:l||p,size:"large",children:p?e.jsx(Ke,{size:24}):e.jsx(Oi,{})}),e.jsx(de,{"data-cy":"schema-form-item-cancel",onClick:()=>{R(x),c(!1)},disabled:l||p,size:"large",children:e.jsx(an,{})})]}):null})]}),T&&d&&e.jsx(ca,{children:d})]})})}Nr.propTypes={style:D.object,onSubmit:D.func,onChange:D.func,label:D.string,initialValue:D.string,required:D.bool,disabled:D.bool,triggers:D.array,options:D.array,helperText:D.string,formatterBeforeSubmit:D.func,placeholder:D.string,renderImage:D.func,filterKeys:D.arrayOf(D.string),noEmpty:D.bool,renderLabel:D.func};Nr.defaultProps={style:{},onSubmit:()=>{},onChange:()=>{},label:"",initialValue:"",required:!1,disabled:!1,triggers:[],options:[],helperText:"",formatterBeforeSubmit:t=>t.join(","),placeholder:"",filterKeys:["name"],renderImage:()=>null,renderLabel:(t,l)=>"",noEmpty:!1};const ts=ht.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: space-between;
|
|
4
4
|
align-items: center;
|