@abtnode/blocklet-services 1.16.15-beta-d649cecc → 1.16.15-beta-b9970af8

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.
Files changed (53) hide show
  1. package/build/asset-manifest.json +79 -79
  2. package/build/index.html +1 -1
  3. package/build/service-worker.js +1 -1
  4. package/build/static/css/{2784.1780cb4a.chunk.css → 1562.1b34375e.chunk.css} +1 -1
  5. package/build/static/js/{1013.30081166.chunk.js → 1013.3fea2f42.chunk.js} +3 -3
  6. package/build/static/js/{1480.35a3e406.chunk.js → 1480.76f3aa40.chunk.js} +2 -2
  7. package/build/static/js/{2784.b037c6d1.chunk.js → 1562.73f77a34.chunk.js} +3 -3
  8. package/build/static/js/1565.fb9d063a.chunk.js +2 -0
  9. package/build/static/js/{1660.c490fcee.chunk.js → 1660.a921a29a.chunk.js} +2 -2
  10. package/build/static/js/{1760.7726694e.chunk.js → 1760.1d682c10.chunk.js} +2 -2
  11. package/build/static/js/{1980.ff084f4c.chunk.js → 1980.5fbdb67a.chunk.js} +2 -2
  12. package/build/static/js/2100.d46217bd.chunk.js +2 -0
  13. package/build/static/js/{2393.9c045444.chunk.js → 2393.f7bbb9ef.chunk.js} +2 -2
  14. package/build/static/js/{2653.b9c51282.chunk.js → 2653.99c8d3c0.chunk.js} +2 -2
  15. package/build/static/js/{3593.98d9341a.chunk.js → 3593.36ff635b.chunk.js} +2 -2
  16. package/build/static/js/{3688.0122dfcd.chunk.js → 3688.6ec4bb5c.chunk.js} +2 -2
  17. package/build/static/js/{4023.cb71646d.chunk.js → 4023.7553cbda.chunk.js} +2 -2
  18. package/build/static/js/{445.21c0ec50.chunk.js → 445.4e1c7d75.chunk.js} +3 -3
  19. package/build/static/js/{4682.23dd054e.chunk.js → 4682.867b00fa.chunk.js} +2 -2
  20. package/build/static/js/{4716.60c7a9b1.chunk.js → 4716.55a4daab.chunk.js} +2 -2
  21. package/build/static/js/{4802.af6f7b74.chunk.js → 4802.fbb3d2f1.chunk.js} +2 -2
  22. package/build/static/js/{5176.98a62a22.chunk.js → 5176.fdc05077.chunk.js} +2 -2
  23. package/build/static/js/{5628.01088d1b.chunk.js → 5628.701509d2.chunk.js} +2 -2
  24. package/build/static/js/{5859.b3338b24.chunk.js → 5859.b1852fc0.chunk.js} +2 -2
  25. package/build/static/js/{5982.e80abbc4.chunk.js → 5982.5c6bdd6b.chunk.js} +2 -2
  26. package/build/static/js/{6186.964c3165.chunk.js → 6186.a5c56653.chunk.js} +2 -2
  27. package/build/static/js/{6452.c7f6c102.chunk.js → 6452.b7040943.chunk.js} +2 -2
  28. package/build/static/js/{6640.14ab87a4.chunk.js → 6640.34287d69.chunk.js} +2 -2
  29. package/build/static/js/{6711.38948be4.chunk.js → 6711.93590b67.chunk.js} +2 -2
  30. package/build/static/js/{6737.597a5126.chunk.js → 6737.0af19630.chunk.js} +2 -2
  31. package/build/static/js/{6771.dfad334c.chunk.js → 6771.b78869b6.chunk.js} +3 -3
  32. package/build/static/js/{6856.01a0c9a2.chunk.js → 6856.46480e82.chunk.js} +2 -2
  33. package/build/static/js/{6868.8289e873.chunk.js → 6868.71135b70.chunk.js} +2 -2
  34. package/build/static/js/{7465.b76f2c39.chunk.js → 7465.30cccc16.chunk.js} +3 -3
  35. package/build/static/js/{8128.e95991f7.chunk.js → 8128.d1e32d23.chunk.js} +3 -3
  36. package/build/static/js/{8437.0d88b9db.chunk.js → 8437.fd5a5ad5.chunk.js} +2 -2
  37. package/build/static/js/{861.2a22cbbf.chunk.js → 861.889f9199.chunk.js} +2 -2
  38. package/build/static/js/{9102.7087c66c.chunk.js → 9102.1c2ca825.chunk.js} +2 -2
  39. package/build/static/js/{9409.21bf1e37.chunk.js → 9409.1148b9cc.chunk.js} +2 -2
  40. package/build/static/js/{9620.c8f2696a.chunk.js → 9620.f05f3e72.chunk.js} +2 -2
  41. package/build/static/js/{9899.eb448353.chunk.js → 9899.52da4ed3.chunk.js} +2 -2
  42. package/build/static/js/main.706d9331.js +3 -0
  43. package/package.json +23 -23
  44. package/build/static/js/1565.a5a98618.chunk.js +0 -2
  45. package/build/static/js/2100.1e7f0c60.chunk.js +0 -2
  46. package/build/static/js/main.95c13005.js +0 -3
  47. /package/build/static/js/{1013.30081166.chunk.js.LICENSE.txt → 1013.3fea2f42.chunk.js.LICENSE.txt} +0 -0
  48. /package/build/static/js/{2784.b037c6d1.chunk.js.LICENSE.txt → 1562.73f77a34.chunk.js.LICENSE.txt} +0 -0
  49. /package/build/static/js/{445.21c0ec50.chunk.js.LICENSE.txt → 445.4e1c7d75.chunk.js.LICENSE.txt} +0 -0
  50. /package/build/static/js/{6771.dfad334c.chunk.js.LICENSE.txt → 6771.b78869b6.chunk.js.LICENSE.txt} +0 -0
  51. /package/build/static/js/{7465.b76f2c39.chunk.js.LICENSE.txt → 7465.30cccc16.chunk.js.LICENSE.txt} +0 -0
  52. /package/build/static/js/{8128.e95991f7.chunk.js.LICENSE.txt → 8128.d1e32d23.chunk.js.LICENSE.txt} +0 -0
  53. /package/build/static/js/{main.95c13005.js.LICENSE.txt → main.706d9331.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[6186],{5954:function(e,n,t){t.d(n,{cK:function(){return d},h6:function(){return p}});var r=t(30969),o=t(41395),a=t(20244),i=t(48952),c=t(90781),s=t(99042),l=t(37574),u=o.sy.Provider;o.sy.Consumer;function d(e){var n=e.children,t="".concat(a.WELLKNOWN_SERVICE_PATH_PREFIX,"/static/images"),r=window.env,o=r.serverDid,d=r.serverVersion,p=r.mode,f={imgPrefix:t,api:i.Z,restApi:s.Z,ws:{getWsClient:c.ZP,create:c.Ue,useSubscription:c.mU},type:"service",info:{did:o,version:d,mode:p}};return(0,l.jsx)(u,{value:{node:f},children:n})}function p(){return(0,r.useContext)(o.sy).node}},6186:function(e,n,t){t.r(n),t.d(n,{default:function(){return en}});var r,o=t(71171),a=t(16380),i=t(30969),c=t(30734),s=t(238),l=t(38361),u=t(51711),d=t(47333),p=t(19865),f=t(7017),m=t(20244),v=t(24891),h=t(43820),g=t(94282),x=t(33028),b=t(32723),Z=t(34795),y=t(96234),k=t(59740),w=t(24974),C=t.n(w),P=t(86822),E=t(17708),j=t(94551),D=t(48082),S=t(75295),R=t(89667),_=t(94308),B=t(2689),N=t(37973),L=t(93310),T=t(86008),I=t(33359),U=t(76492),A=t(97517),O=t(49884),G=t(18877),z=t(29996),F=t(59505),K=t(94984),M=t(90617),q=t(41395),V=t(8479),W=t(55008),X=t(45008),H=t(37574),J=["blocklet","onStart","onComplete","variant","hasPermission","useBlockletUrlEvaluation"];function Y(e){var n,t,r,o,a=e.blocklet,s=e.onStart,l=e.onComplete,u=e.variant,p=e.hasPermission,h=e.useBlockletUrlEvaluation,g=(0,k.Z)(e,J),w=(0,c.useNavigate)(),C=(0,q.h6)(),Y=(0,i.useState)(null),Q=(0,y.Z)(Y,2),ee=Q[0],ne=Q[1],te=(0,i.useState)(null),re=(0,y.Z)(te,2),oe=re[0],ae=re[1],ie=(0,i.useState)(!1),ce=(0,y.Z)(ie,2),se=ce[0],le=ce[1],ue=(0,i.useState)(null),de=(0,y.Z)(ue,2),pe=de[0],fe=de[1],me=(0,i.useContext)(d.RD).t,ve=(0,E.Z)("skip-blocklet-setup",!1),he=(0,y.Z)(ve,1)[0],ge=h(a),xe=ge.loading,be=ge.recommendedUrl,Ze=(0,X.y0)().nftState,ye=(0,f.isInProgress)(a.status),ke=(null===a||void 0===a||null===(n=a.controller)||void 0===n||null===(t=n.status)||void 0===t?void 0:t.value)===F.BLOCKLET_CONTROLLER_STATUS.suspended;null!==Ze&&void 0!==Ze&&Ze.expired||(null===a||void 0===a||null===(r=a.controller)||void 0===r||null===(o=r.status)||void 0===o?void 0:o.reason)!==F.SUSPENDED_REASON.expired||(ke=!1);var we=C.inService,Ce=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,Z.Z)((0,b.Z)().mark((function r(){var o,i,c,u,d;return(0,b.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(o=function(){var t=(0,Z.Z)((0,b.Z)().mark((function t(r){var o,i,c,u,d,p,m,h,g,x;return(0,b.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s({action:e,blocklet:a}),le(!0),ae(e),fe(null),o=!1,t.prev=5,"remove"!==e){t.next=11;break}return t.next=9,n(r);case 9:t.next=38;break;case 11:if("start"!==e){t.next=28;break}if((0,f.hasRunnableComponent)(a)){t.next=15;break}return K.Z.error(me("blocklet.noComponent")),t.abrupt("return");case 15:if(we||he||null!==(i=a.settings)&&void 0!==i&&i.initialized||a.mode===F.BLOCKLET_MODES.DEVELOPMENT){t.next=22;break}return c=(0,M.RU)(C.info),(u=new URL(be)).searchParams.set("serverUrl",c),window.open(u.href),l({action:e,blocklet:a}),t.abrupt("return");case 22:return d=a.children.filter((function(e){return!(0,f.isInProgress)(e.status)&&"running"!==e.status})).map((function(e){return e.meta.did})),p={did:a.meta.did,componentDids:d},t.next=26,n({input:p});case 26:t.next=38;break;case 28:if(!["stop","restart","reload"].includes(e)){t.next=35;break}return m=a.children.filter((function(e){return"running"===e.status})).map((function(e){return e.meta.did})),h={did:a.meta.did,componentDids:m},t.next=33,n({input:h});case 33:t.next=38;break;case 35:return g={did:a.meta.did},t.next=38,n({input:g});case 38:if("remove"!==e){t.next=42;break}o=!0,t.next=44;break;case 42:return t.next=44,(0,v._v)(1e3);case 44:"reload"===e&&K.Z.success(me("blocklet.reloadSuccess")),l({action:e,blocklet:a}),t.next=52;break;case 48:t.prev=48,t.t0=t.catch(5),x="Blocklet ".concat(e," failed: ").concat((0,v.Z)(t.t0)),l({action:e,blocklet:a,error:new Error(x)});case 52:return t.prev=52,o||le(!1),t.finish(52);case 55:case"end":return t.stop()}}),t,null,[[5,48,52,55]])})));return function(e){return t.apply(this,arguments)}}(),i=function(){le(!1),fe(null)},c=(0,f.getDisplayName)(a,!0),u=a.mode===F.BLOCKLET_MODES.DEVELOPMENT?{description:function(){return(0,H.jsx)(I.Z,{component:"div",children:(0,H.jsx)(I.Z,{gutterBottom:!0,children:me("blocklet.action.removeApplicationDescription")})})},params:{removeType:"complete"}}:{description:function(e,n){return(0,H.jsxs)(I.Z,{component:"div",children:[(0,H.jsx)(I.Z,{gutterBottom:!0,children:me("blocklet.action.removeApplicationDescription")}),(0,H.jsxs)(A.Z,{name:"removeType",value:e.removeType,onChange:function(t){return n((0,x.Z)((0,x.Z)({},e),{},{removeType:t.target.value}))},children:[(0,H.jsx)(O.Z,{value:"backup",control:(0,H.jsx)(U.Z,{}),label:me("blocklet.action.removeApplicationAfterBackup")}),(0,H.jsx)(O.Z,{value:"complete",control:(0,H.jsx)(U.Z,{}),label:me("blocklet.action.removeApplicationComplete")})]})]})},params:{removeType:"backup"}},d={stop:{title:"".concat(me("common.stop")," ").concat(c),description:me("blocklet.action.stopDescription"),confirm:me("blocklet.action.confirmStop"),cancel:me("common.cancel"),onConfirm:o,onCancel:i},restart:{title:"".concat(me("common.restart")," ").concat(c),description:me("blocklet.action.restartDescription"),confirm:me("blocklet.action.confirmRestart"),cancel:me("common.cancel"),onConfirm:o,onCancel:i},remove:(0,x.Z)({title:"".concat(me("common.remove")," ").concat(c),confirm:me("blocklet.action.confirmRemove"),cancel:me("common.cancel"),onConfirm:o,onCancel:i},u),cancelDownload:{title:"".concat(me("common.cancel")),description:me("blocklet.action.cancelDownloadDescription",{name:c}),confirm:me("common.confirm"),cancel:me("common.cancel"),onConfirm:o,onCancel:i}},!t){r.next=9;break}fe(d[e]),r.next=11;break;case 9:return r.next=11,o();case 11:case"end":return r.stop()}}),r)})))},Pe=Boolean(ee),Ee=function(){var e=(0,Z.Z)((0,b.Z)().mark((function e(n,t){return(0,b.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{t.stopPropagation(),t.preventDefault()}catch(r){}if(ne(null),"function"!==typeof n.handler){e.next=16;break}return e.prev=3,le(!0),ae(n.action),e.next=8,n.handler();case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),console.error("Blocklet ".concat(n.name," failed: "),e.t0);case 13:return e.prev=13,le(!1),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[3,10,13,16]])})));return function(n,t){return e.apply(this,arguments)}}(),je=!we&&(0,f.isDeletableBlocklet)(a)&&a.structVersion===m.APP_STRUCT_VERSION?{action:"remove",icon:W.Z.Remove,name:me("common.remove"),handler:Ce("remove",function(){var e=(0,Z.Z)((0,b.Z)().mark((function e(n){return(0,b.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("backup"!==n.removeType){e.next=4;break}return e.next=4,C.api.backupBlocklet({input:{appDid:a.appDid,to:"disk"}});case 4:return e.next=6,C.api.deleteBlocklet({input:{did:a.meta.did,keepData:!1}});case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),!0),disabled:ye}:null,De={action:"remove",icon:W.Z.Remove,name:me("common.cancel"),handler:Ce("cancelDownload",C.api.cancelDownloadBlocklet,!0)},Se=(0,f.getAppMissingConfigs)(a),Re=[{action:"start",icon:W.Z.Start,name:me("common.start"),handler:Ce("start",C.api.startBlocklet),disabled:ke||a.children.every((function(e){return"running"===e.status}))||(0,v.XN)(a.status)||xe||ye},{action:"stop",icon:W.Z.Stop,name:me("common.stop"),handler:Ce("stop",C.api.stopBlocklet,!0),disabled:!["running","starting"].includes(a.status)},{action:"restart",icon:W.Z.Restart,name:me("common.restart"),handler:Ce("restart",C.api.restartBlocklet,!0),disabled:ke||"running"!==a.status},{action:"reload",icon:W.Z.Reload,name:me("common.reload"),handler:Ce("reload",C.api.reloadBlocklet),disabled:ke||"running"!==a.status},(0,v.XN)(a.status)?De:je,{separator:!0},{onlyInMenu:!0,action:"config",icon:W.Z.Config,name:me("common.config"),handler:function(){w("/blocklets/".concat(a.meta.did,"/configuration"))},disabled:(0,v.XN)(a.status)},{onlyInMenu:!0,action:"team",icon:W.Z.Group,name:me("common.manageTeam"),handler:function(){w("/blocklets/".concat(a.meta.did,"/members"))},disabled:(0,v.XN)(a.status)},{onlyInMenu:!0,action:"log",icon:W.Z.Log,name:me("common.log"),handler:function(){w("/logs/blocklet-".concat(a.meta.did))},disabled:(0,v.XN)(a.status)}].filter(Boolean);return"menu"===u?(0,H.jsxs)($,{"data-cy":"blocklet-actions",children:[(0,H.jsx)(j.Z,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":a.meta.did,onClick:function(e){try{e.stopPropagation(),e.preventDefault()}catch(n){}ne(e.currentTarget)},size:"small",disabled:!p||!(0,v.XN)(a.status)&&se,children:(0,H.jsx)(N.Z,{})}),(0,H.jsxs)(D.Z,{id:"actions-menu",anchorEl:ee,keepMounted:!0,open:Pe,onClose:function(e){try{e.stopPropagation(),e.preventDefault()}catch(n){}ne(null)},PaperProps:{},children:[Se.length>0&&(0,H.jsxs)(G.Z,{style:{maxWidth:"400px"},severity:"error",children:[me("blocklet.config.missingRequired"),(0,H.jsx)("br",{}),(0,H.jsx)(P.rU,{to:"/blocklets/".concat(a.meta.did,"/components"),children:me("blocklet.config.gotoFix")})]}),Re.map((function(e,n){return e.separator?(0,H.jsx)(S.Z,{},"separator-".concat(n)):(0,H.jsxs)(B.Z,{dense:!0,onClick:function(n){return Ee(e,n)},disabled:e.disabled,"data-cy":"".concat(e.action,"-blocklet"),children:[(0,H.jsx)(L.Z,{style:{minWidth:24},children:(0,H.jsx)(e.icon,{fontSize:"small"})}),(0,H.jsx)(T.Z,{primary:e.name})]},e.name)}))]}),pe&&(0,H.jsx)(V.Z,{title:pe.title,description:pe.description,confirm:pe.confirm,cancel:pe.cancel,params:pe.params,onConfirm:pe.onConfirm,onCancel:pe.onCancel})]}):(0,H.jsxs)($,(0,x.Z)((0,x.Z)({"data-cy":"blocklet-actions"},g),{},{children:[(0,H.jsx)(R.Z,{children:Re.filter((function(e){return!e.separator&&!e.onlyInMenu})).map((function(e){return(0,H.jsxs)(z.Z,{title:e.name,"data-cy":"".concat(e.action,"-blocklet"),onClick:function(){return Ee(e)},disabled:Boolean(e.disabled)||se,children:[oe===e.action&&se&&ye?(0,H.jsx)(_.Z,{size:16}):(0,H.jsx)(e.icon,{}),(0,H.jsx)("span",{className:"blocklet-action-text",children:e.name})]},e.name)}))}),pe&&(0,H.jsx)(V.Z,{title:pe.title,description:pe.description,confirm:pe.confirm,cancel:pe.cancel,params:pe.params,onConfirm:pe.onConfirm,onCancel:pe.onCancel})]}))}Y.propTypes={blocklet:C().object.isRequired,onStart:C().func.isRequired,onComplete:C().func.isRequired,variant:C().oneOf(["menu","group"]),hasPermission:C().bool,useBlockletUrlEvaluation:C().func},Y.defaultProps={variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:function(){var e,n;return{loading:!1,recommendedUrl:null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.href}}};var $=a.default.div(r||(r=(0,o.Z)(["\n display: flex;\n align-items: center;\n\n @media (max-width: ","px) {\n .MuiButton-root {\n padding: 4px;\n font-size: 10px;\n }\n }\n"])),(function(e){return e.theme.breakpoints.values.sm})),Q=t(84802),ee=t(23299),ne=t(22100),te=t(77370),re=function(e){var n={},t=null;return(0,f.forEachBlockletSync)(e,(function(e){n[e.meta.bundleDid]?t=(0,f.getDisplayName)(e,!0):e.meta.bundleDid&&(n[e.meta.bundleDid]=!0)})),t},oe=function(e,n,t){var r=e.hostname,o=e.href;if(!n)return o;if(t){var a,i=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!i)return o;var c=i[0],s=(((null===(a=n.site)||void 0===a?void 0:a.domainAliases)||[]).map((function(e){return e.value})).filter(Boolean).find((function(e){return e.endsWith(m.DEFAULT_DID_DOMAIN)}))||"").replace(".".concat(m.DEFAULT_DID_DOMAIN),"");return s?o.replace(r,"".concat(s,"-").concat(c,".").concat(m.DEFAULT_IP_DOMAIN_SUFFIX)):o}return o.replace(n.meta.bundleDid,n.appPid)};function ae(){var e=(0,d.PE)().t,n=(0,te.T)().api,t=(0,X.y0)().blocklet,r=(0,q.h6)().inService,o=(0,i.useState)(!1),a=(0,y.Z)(o,2),c=a[0],s=a[1],u=(0,i.useState)(5),p=(0,y.Z)(u,2),h=p[0],g=p[1],x=t&&t.structVersion!==m.APP_STRUCT_VERSION;return[x&&(0,H.jsxs)(ee.Z,{type:"warning",style:{margin:"12px 0"},children:[(0,H.jsxs)(l.Z,{display:"flex",alignItems:"center",children:[(0,H.jsx)(z.Z,{variant:"contained",size:"small",color:"primary",onClick:function(){return function(){try{if("running"===t.status)return void K.Z.error(e("blocklet.migrate.tip.running"));var n=re(t);if(n)return void K.Z.error(e("blocklet.migrate.tip.duplicate",{name:n}));s(!0)}catch(r){K.Z.error((0,v.Z)(r))}}()},style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),(0,H.jsx)("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map((function(n){return(0,H.jsx)(l.Z,{display:"flex",alignItems:"center",children:e("blocklet.migrate.intro.".concat(n))},n)}))]},"alert"),t&&(0,H.jsx)(ne.default,{popup:!0,open:c,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:n.get,checkTimeout:3e5,onSuccess:function(){var e=oe(window.location,t,r);setTimeout((function(){window.location.href=e}),5e3),g(5),setInterval((function(){g((function(e){return e-1}))}),1e3)},extraParams:{appDid:t.appDid,did:t.meta.did,wt:(0,M.iK)(t,!0),title:(0,f.getDisplayName)(t)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:h>=0?e("blocklet.migrate.success",{sec:h}):"Redirecting..."},onClose:function(){return s(!1)}},"connect")]}ae.propTypes={};var ie=t(66138),ce=t(90781),se=t(64864),le=t(5954),ue=t(80670),de=t(48952),pe=ue.Gy.Provider,fe=(ue.Gy.Consumer,window.env),me=fe.did,ve=fe.appId;function he(e){var n,t,r=e.children,o=(0,se.y0)().blocklet,a=(0,i.useState)([]),c=(0,y.Z)(a,2),s=c[0],l=c[1],u=(0,i.useState)([]),d=(0,y.Z)(u,2),p=d[0],v=d[1],h=(0,i.useState)([]),g=(0,y.Z)(h,2),x=g[0],k=g[1],w=(0,f.getDisplayName)(o),C=(null===(n=((null===o||void 0===o?void 0:o.environments)||[]).find((function(e){return e.key===F.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR})))||void 0===n?void 0:n.value)||"auto",P=(null===o||void 0===o?void 0:o.trustedPassports)||[],E=(null===o||void 0===o?void 0:o.trustedFactories)||[],j=!1!==(null===o||void 0===o?void 0:o.enablePassportIssuance),D=function(){var e=(0,Z.Z)((0,b.Z)().mark((function e(){var n;return(0,b.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,de.Z.doBatchQuery({getRoles:{input:{teamDid:me}},getPermissions:{input:{teamDid:me}},getInvitations:{input:{teamDid:me}}});case 3:n=e.sent,v((n.getRoles.roles||[]).filter((function(e){return!m.RBAC_CONFIG.roles.some((function(n){return n.name===e.name&&(!n.passport||n.ci)}))})).map((function(e){return e.description=e.description||"Use this passport to connect ".concat(w," as ").concat(e.title),e}))),k(n.getPermissions.permissions||[]),l(n.getInvitations.invitations||[]),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),K.Z.error(e.t0.message);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}();(0,i.useEffect)((function(){var e;null!==o&&void 0!==o&&null!==(e=o.meta)&&void 0!==e&&e.did&&D()}),[null===o||void 0===o||null===(t=o.meta)||void 0===t?void 0:t.did]);var S=function(e){e.teamDid===me&&D(me)};(0,ce.mU)(m.EVENTS.USER_ADDED,S,[me]),(0,ce.mU)(m.EVENTS.USER_REMOVED,S,[me]),(0,ce.mU)(m.EVENTS.USER_UPDATED,S,[me]);var R={teamDid:me,teamIssuerDid:ve,teamName:w,invitations:s,roles:p,permissions:x,trustedPassports:P,trustedFactories:E,isNodeTeam:!1,enablePassportIssuance:j,refresh:function(){return D()},passportColor:C,endpoint:window.location.origin,blocklet:o,api:{getUser:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).did,n={teamDid:me,user:{did:e}};return de.Z.getUser({input:n})},getUsers:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.query,t=e.paging,r={teamDid:me};return t&&(r.paging=t),n&&(r.query=n),r.sort={lastLoginAt:-1},de.Z.getUsers({input:r})},getUsersCountPerRole:function(){return de.Z.getUsersCountPerRole({input:{teamDid:me}})}}};return(0,H.jsx)(pe,{value:R,children:r})}t(53420);var ge=t(25177),xe=t(75255),be=t(51921),Ze=t(19638),ye=t(13328);function ke(e){var n=e.infos,t=(0,d.PE)().t,r=n.map((function(e){return"* ".concat(e.label,": ").concat(e.value)})).join("\n"),o=new URL("https://github.com/blocklet/blocklet-site/issues/new");return o.searchParams.set("title","[Feedback]"),o.searchParams.set("body","\x3c!-- [Enter feedback here] --\x3e\n\n\n\n\x3c!--\nDocument Details\n".concat(r,"\n* Page: ").concat(window.location.href,"\n--\x3e\n")),(0,ye.tZ)(l.Z,{sx:{mx:{xs:0,md:2}},children:(0,ye.tZ)(Ze.Z,{sx:{color:"text.primary"},target:"_blank",href:o.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}ke.propTypes={infos:C().arrayOf(C().shape({label:C().string,value:C().string}))},ke.defaultProps={infos:[]};var we=t(37433),Ce=t(39563),Pe=t(19886),Ee=t.n(Pe),je=t(91380),De=t(7173),Se=t(83176),Re=t(93033),_e=t.n(Re),Be=t(22073),Ne=t(43178),Le=["launcherUrl","chainHost","nftId","retention"],Te=["sx"];function Ie(e){var n,t,r=e.launcherUrl,o=e.chainHost,a=e.nftId,c=(e.retention,(0,k.Z)(e,Le)),s=(0,d.PE)(),u=s.t,p=s.locale,f=(0,Ne.Z)({safeIframeRef:null,popoverAnchorEl:null}),m=(0,y.Z)(f,2),h=m[0],g=m[1],w=(0,i.useRef)(null),C=c.sx,P=void 0===C?{}:C,E=(0,k.Z)(c,Te),j=(0,Be.Z)((0,Z.Z)((0,b.Z)().mark((function e(){var n,t,i,c;return(0,b.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([(0,v.Nh)(o,a),(0,v.qZ)({launcherUrl:r||"https://launcher.arcblock.io/",nftId:a,locale:p})]);case 2:return n=e.sent,t=(0,y.Z)(n,2),i=t[0],c=t[1],e.abrupt("return",{asset:i,subscriptionURL:c});case 7:case"end":return e.stop()}}),e)}))),[p]);if(j.loading)return(0,H.jsxs)(l.Z,(0,x.Z)((0,x.Z)({sx:(0,x.Z)({display:"flex",alignItems:"center",color:"grey",gap:1},P)},E),{},{children:[(0,H.jsx)(_.Z,{size:16}),u("expiration.loading")]}));if(j.error)return console.error(j.error),(0,H.jsx)(De.Z,(0,x.Z)((0,x.Z)({label:u("expiration.loadFailed"),color:"error",variant:"success",sx:(0,x.Z)({cursor:"pointer"},P)},E),{},{onClick:function(){return j.retry()}}));var D=(0,v.D9)(null===(n=j.value)||void 0===n?void 0:n.asset),S=Ee()(D).isBefore(Ee()()),R=Ee()(D).diff(Ee()(),"ms"),B="success";R<=2592e6&&(B="warning"),S&&(B="error");return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(De.Z,(0,x.Z)((0,x.Z)({label:(0,H.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,H.jsx)(je.Z,{sx:{mr:"4px"},fontSize:"small"}),u("expiration.tips.".concat(B),{validity:_e()(R,{locale:(0,v.tA)(p),compact:!0,verbose:!0})})]}),color:B,variant:"success"!==B?"contained":"outlined",sx:(0,x.Z)({cursor:"pointer"},P)},E),{},{onClick:function(e){g({popoverAnchorEl:e.currentTarget})}})),(0,H.jsx)(Se.ZP,{id:"popover-info",open:Boolean(h.popoverAnchorEl),anchorEl:h.popoverAnchorEl,onClose:function(){g({popoverAnchorEl:null})},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:(0,H.jsx)("iframe",{ref:w,title:u("common.subscription"),width:"360px",height:"600px",style:{border:0},src:null===(t=j.value)||void 0===t?void 0:t.subscriptionURL})})]})}Ie.propTypes={chainHost:C().string.isRequired,nftId:C().string.isRequired,sx:C().object,retention:C().number,launcherUrl:C().string.isRequired},Ie.defaultProps={sx:{},retention:0};var Ue,Ae=Ie;function Oe(e){var n,t=e.children,r=(0,d.PE)().t,o=(0,se.y0)(),a=o.loading,i=o.error,u=o.actions.refreshBlocklet,p=o.env,f=o.blocklet,h=(0,le.h6)().info,g=(0,c.useLocation)(),x=(0,xe.Z)((function(e){return e.breakpoints.down("md")})),b=[{label:"App ID",value:p.appId},{label:"App Version",value:p.version},{label:"App Bundle Name",value:null===f||void 0===f||null===(n=f.meta)||void 0===n?void 0:n.bundleName},{label:"Server Id",value:h.did},{label:"Server Version",value:h.version}],Z={};return x&&(Z.logo=null),(0,ye.BX)(ze,{legacy:!1,fullWidth:!0,headerAddons:function(e){var n,t,r;if(!(0,M.ep)(f))return e;var o=Array.isArray(e)?e:[e];return o.unshift((0,ye.tZ)(Ae,{chainHost:null===f||void 0===f||null===(n=f.controller)||void 0===n?void 0:n.chainHost,nftId:null===f||void 0===f||null===(t=f.controller)||void 0===t?void 0:t.nftId,launcherUrl:null===f||void 0===f||null===(r=f.controller)||void 0===r?void 0:r.launcherUrl,retention:m.EXPIRED_BLOCKLET_DATA_RETENTION_DAYS,sx:{cursor:"pointer",marginRight:{xs:"8px",md:"48px"}}})),o},headerProps:Z,footerProps:{addon:(0,ye.tZ)(ke,{infos:b})},children:[!f&&a&&(0,ye.tZ)(s.Z,{relative:"parent",children:(0,ye.tZ)(_.Z,{})}),!f&&i&&(0,ye.BX)(s.Z,{relative:"parent",children:[(0,ye.BX)(l.Z,{display:"flex",alignItems:"center",children:[(0,ye.tZ)(ge.Z,{color:"error",sx:{marginRight:1}}),(0,v.Z)(i)]}),(0,ye.tZ)(z.Z,{onClick:function(){return u()},children:(0,ye.tZ)("span",{style:{textDecoration:"underline"},children:r("common.retry")})})]}),!!f&&(0,ye.tZ)("div",{className:"dashboard-layout-body",children:(0,ye.tZ)("div",{className:"dashboard-layout-main",children:(0,ye.tZ)(l.Z,{className:"dashboard-layout-main",children:(0,ye.tZ)(l.Z,{flex:1,padding:"16px",display:"flex",flexDirection:"column",children:(0,ye.tZ)(be.ErrorBoundary,{FallbackComponent:we.H,resetKeys:[g.pathname],children:t})})})})})]})}Oe.defaultProps={children:null};var Ge,ze=(0,a.default)(Ce.Z)(Ue||(Ue=(0,o.Z)(["\n .dashboard-layout-body {\n flex: 1;\n display: flex;\n padding-top: 16px;\n }\n .dashboard-layout-main {\n flex: 1;\n padding: 0;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n }\n"]))),Fe=t(38507),Ke=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(4461),t.e(3688)]).then(t.bind(t,13688))})),Me=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(1614),t.e(5960),t.e(2631),t.e(4212),t.e(2291),t.e(617),t.e(2653)]).then(t.bind(t,92653))})),qe=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(4319),t.e(252),t.e(3593)]).then(t.bind(t,23593))})),Ve=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(1614),t.e(5960),t.e(2631),t.e(4212),t.e(2291),t.e(4764),t.e(6640),t.e(6868),t.e(4802)]).then(t.bind(t,121))})),We=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7606),t.e(3154),t.e(6771)]).then(t.bind(t,26771))})),Xe=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(5645),t.e(5982)]).then(t.bind(t,25205))})),He=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(5960),t.e(2631),t.e(9260),t.e(4764),t.e(8128),t.e(4023)]).then(t.bind(t,4023))})),Je=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(1614),t.e(5960),t.e(2631),t.e(4212),t.e(2291),t.e(4164),t.e(6498),t.e(7310),t.e(9657),t.e(6452)]).then(t.bind(t,76452))})),Ye=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(1614),t.e(5960),t.e(4212),t.e(4164),t.e(4319),t.e(445),t.e(9260),t.e(5465),t.e(7606),t.e(6921),t.e(6498),t.e(2784),t.e(6868),t.e(1565)]).then(t.bind(t,31565))})),$e=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(1614),t.e(5960),t.e(2631),t.e(4212),t.e(2291),t.e(5465),t.e(6700),t.e(2393)]).then(t.bind(t,2393))}));function Qe(){var e,n,t=(0,c.useNavigate)(),r=(0,c.useParams)().tab,o=void 0===r?"overview":r,a=(0,se.y0)(),x=a.blocklet,b=a.actions.refreshBlocklet,Z=(0,d.PE)().t,y=null===x||void 0===x||null===(e=x.meta)||void 0===e?void 0:e.did,k=!x||(0,v.wS)(x.status)?[]:(0,f.getAppMissingConfigs)(x),w=[{label:Z("common.overview"),value:"overview"},{label:(0,H.jsx)(u.Z,{color:"error",variant:"dot",invisible:!k.length,children:Z("common.components")}),value:"components"}];(0,v.wS)(null===x||void 0===x?void 0:x.status)||w.push({label:Z("common.configuration"),value:"configuration"}),w.push({label:Z("common.auditLogs"),value:"audit-logs"}),x&&null!==(n=x.children)&&void 0!==n&&n.length&&x.structVersion===m.APP_STRUCT_VERSION&&w.push({label:Z("common.logs"),value:"logs"}),w.push({label:Z("common.configNavigation"),value:"navigation"}),w.push({label:Z("common.storage"),value:"storage"});var C=(0,H.jsx)(We,{scope:y,categories:["blocklet","team","security","certificates","gateway"]});(0,ce.mU)(m.EVENTS.NOTIFICATION_CREATE,(function(e){var n=e||{},t=n.severity,r=n.title,o=n.description;"error"===t?K.Z.error(o||r):K.Z.success(o||r)}),[y]);var P={overview:(0,H.jsx)(Ke,{}),members:(0,H.jsx)(l.Z,{mt:-5,children:(0,H.jsx)(Me,{type:"blocklet",createPassportSvg:Fe.Ju})}),passports:(0,H.jsx)(l.Z,{mt:-4.5,children:(0,H.jsx)(qe,{createPassportSvg:Fe.Ju})}),components:Ye,configuration:(0,H.jsx)(Ve,{blocklet:x,onUpdate:function(){b()}}),"audit-logs":C,logs:Xe,navigation:He,storage:(0,H.jsx)(Je,{}),analytics:(0,H.jsx)(l.Z,{mt:-5,children:(0,H.jsx)($e,{})})},E=P[o]||P.overview,j=!["members","passports","analytics"].includes(o),D=x?(0,H.jsxs)(h.g,{type:"components",children:[j&&(0,H.jsx)(p.Z,{tabs:w,current:o,onChange:function(e){t("".concat(m.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin/").concat(e))},scrollButtons:"auto"}),(0,H.jsx)("div",{className:"page-content",children:(0,H.jsx)(i.Suspense,{fallback:(0,H.jsx)(s.Z,{children:(0,H.jsx)(_.Z,{})}),children:(0,i.isValidElement)(E)?E:(0,H.jsx)(E,{blocklet:x})})})]}):(0,H.jsx)(s.Z,{children:(0,H.jsx)(_.Z,{})});return(0,H.jsx)(le.cK,{children:(0,H.jsx)(he,{children:(0,H.jsx)(Oe,{children:(0,H.jsx)(ie.wV,{children:(0,H.jsxs)(nn,{children:[j&&(0,H.jsxs)(l.Z,{component:"div",className:"page-header",children:[(0,H.jsxs)(l.Z,{component:"h2",variant:"h4",className:"page-title",color:"textPrimary",children:[x?(0,H.jsx)(Q.Z,{blocklet:x,style:{marginRight:16}}):null,x?(0,H.jsxs)(l.Z,{display:"flex",alignItems:"center",children:[(0,H.jsx)(l.Z,{children:(0,f.getDisplayName)(x)}),"unknown"!==(null===x||void 0===x?void 0:x.status)&&(0,H.jsx)(g.Z,{size:"12px",style:{marginLeft:8},status:x.status,source:x.source})]}):"".concat(Z("common.blocklet")," ").concat(Z("common.detail"))]}),x?(0,H.jsx)(Y,{className:"page-actions",hasPermission:!0,blocklet:x,onStart:function(){},onComplete:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).error;e&&K.Z.error(e.message)},variant:"group"}):null]}),(0,H.jsx)(ae,{}),D]})})})})})}function en(){var e,n=(0,se.y0)().blocklet,t=null===n||void 0===n||null===(e=n.meta)||void 0===e?void 0:e.did;return(0,i.useEffect)((function(){var e=(0,ce.ZP)();return t&&e.connect(),function(){t&&e.isConnected()&&e.disconnect()}}),[t]),(0,H.jsx)(Qe,{})}var nn=a.default.main(Ge||(Ge=(0,o.Z)(["\n .page-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .page-title {\n display: flex;\n align-items: center;\n\n .page-link {\n font-size: 15px;\n margin-top: 8px;\n margin-left: 8px;\n }\n }\n\n .page-content {\n margin-top: 36px;\n }\n\n @media (max-width: ","px) {\n .page-header {\n flex-direction: column;\n align-items: flex-start;\n .page-actions,\n .MuiButtonGroup-root {\n width: 100%;\n }\n .MuiButtonGroup-root {\n .MuiButtonBase-root {\n flex: 1;\n }\n .blocklet-action-text {\n display: none;\n }\n }\n }\n\n .page-title {\n margin-bottom: 15px;\n }\n }\n"])),(function(e){return e.theme.breakpoints.values.md}))},84802:function(e,n,t){t.d(n,{Z:function(){return f}});var r=t(33028),o=t(59740),a=t(24974),i=t.n(a),c=t(59467),s=t(62399),l=t(59505),u=t(15300),d=t(37574),p=["blocklet","style","size"];function f(e){var n,t=e.blocklet,a=e.style,i=e.size,f=(0,o.Z)(e,p),m=(0,u.Z)({blocklet:t}).logoUrl,v=f.variant,h=(0,d.jsx)("img",{src:m,alt:"",style:{width:i}});t.meta.logo||((null===(n=(t.configs||[]).find((function(e){return e.key===l.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE})))||void 0===n?void 0:n.value)||(h=(0,d.jsx)(s.Z,{did:t.meta.did||"",responsive:!0})));return(0,d.jsx)(c.Z,(0,r.Z)((0,r.Z)({variant:v||"square",style:Object.assign({backgroundColor:"transparent",width:i,height:i,borderRadius:10},a)},f),{},{children:h}))}f.propTypes={blocklet:i().object.isRequired,style:i().object,size:i().oneOfType([i().number,i().string])},f.defaultProps={style:{},size:40}},55008:function(e,n,t){var r=t(10814),o=t(8825),a=t(60003),i=t(13875),c=t(57256),s=t(14079),l=t(51389),u=t(98127);n.Z={Start:o.Z,Stop:a.Z,Restart:i.default,Reload:c.Z,Remove:r.default,Config:s.Z,Log:l.Z,Group:u.Z}},94282:function(e,n,t){t.d(n,{Z:function(){return g}});var r=t(33028),o=t(59740),a=t(30969),i=t(24974),c=t.n(i),s=t(94308),l=t(6779),u=t(47333),d=t(7017),p=t(19708),f=t(61472),m=t(37574),v=["status","variant","source"],h={yellow:"#FFCF71",grey:"#888888"};function g(e){var n=e.status,t=e.variant,i=(e.source,(0,o.Z)(e,v)),c=(0,a.useContext)(u.RD).t,g={added:h.grey,waiting:h.yellow,downloading:h.yellow,downloaded:h.grey,installing:h.yellow,installed:h.grey,starting:h.yellow,running:"success",stopping:h.yellow,stopped:h.grey,error:"error",upgrading:h.yellow,restarting:h.yellow,corrupted:"error",deleting:h.yellow},x=(0,d.isInProgress)(n),b=c("blocklet.status.".concat(n));return"dot"===t?(0,m.jsx)(l.Z,{title:c("blocklet.statusTip",{status:b}),children:(0,m.jsx)(p.Z,(0,r.Z)({color:g[n]},i))}):(0,m.jsxs)(f.Z,(0,r.Z)((0,r.Z)({type:{added:"primary",waiting:"warning",downloading:"warning",downloaded:"primary",installing:"warning",installed:"primary",starting:"warning",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"warning",restarting:"warning",corrupted:"error",deleting:"warning"}[n]},i),{},{children:[x&&(0,m.jsx)(s.Z,{size:12,color:"inherit",style:{marginRight:5}}),b]}))}g.propTypes={status:c().string.isRequired,variant:c().oneOf(["dot","tag"]),source:c().string},g.defaultProps={variant:"tag",source:""}},8479:function(e,n,t){t.d(n,{Z:function(){return R}});var r=t(71171),o=t(33028),a=t(32723),i=t(34795),c=t(96234),s=t(59740),l=t(30969),u=t(24974),d=t.n(u),p=t(16380),f=t(84636),m=t(94308),v=t(96074),h=t(59071),g=t(43207),x=t(38357),b=t(18877),Z=t(94702),y=t(75255),k=t(47333),w=t(29996),C=t(24891),P=t(45555);var E,j=function(){var e=(0,P.Z)();return{minWidth:(0,y.Z)(e.breakpoints.down("md"))?300:e.breakpoints.values.sm}},D=t(37574),S=["title","description","showCancel","cancel","confirm","color","params","onCancel","onConfirm","loading"];function R(e){var n=e.title,t=e.description,r=e.showCancel,u=e.cancel,d=e.confirm,p=e.color,f=e.params,P=e.onCancel,E=e.onConfirm,R=e.loading,B=(0,s.Z)(e,S),N=(0,l.useState)(f),L=(0,c.Z)(N,2),T=L[0],I=L[1],U=(0,l.useState)(!0),A=(0,c.Z)(U,2),O=A[0],G=A[1],z=(0,l.useState)(!1),F=(0,c.Z)(z,2),K=F[0],M=F[1],q=(0,l.useState)(""),V=(0,c.Z)(q,2),W=V[0],X=V[1],H=(0,k.PE)().t,J=(0,Z.Z)(),Y=function(){var e=(0,i.Z)((0,a.Z)().mark((function e(n){return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!==typeof n){e.next=17;break}return M(!0),e.prev=2,e.next=5,n(T);case 5:G(!1),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(2),X((0,C.Z)(e.t0)),console.error(e.t0);case 12:return e.prev=12,M(!1),e.finish(12);case 15:e.next=18;break;case 17:G(!1);case 18:case"end":return e.stop()}}),e,null,[[2,8,12,15]])})));return function(n){return e.apply(this,arguments)}}(),$="function"===typeof n?n():n,Q="function"===typeof t?t(T,I,X):t,ee=(0,y.Z)(J.breakpoints.down("md")),ne=j().minWidth;return(0,D.jsxs)(_,(0,o.Z)((0,o.Z)({onClick:function(e){e.stopPropagation()},fullScreen:ee,open:O,style:{minWidth:ne}},B),{},{children:[(0,D.jsx)(x.Z,{children:$}),(0,D.jsxs)(h.Z,{style:{minWidth:ne},children:[(0,D.jsx)(g.Z,{component:"div",children:Q}),!!W&&(0,D.jsx)(b.Z,{severity:"error",style:{width:"100%",marginTop:8},children:W})]}),(0,D.jsxs)(v.Z,{className:"delete-actions",style:{padding:"8px 24px 24px"},children:[r&&(0,D.jsx)(w.Z,{onClick:function(e){e.stopPropagation(),Y(P)},color:"inherit","data-cy":"cancel-confirm-dialog",children:u||H("common.cancel")}),(0,D.jsxs)(w.Z,{onClick:function(e){e.stopPropagation(),Y(E)},color:p,disabled:T.__disableConfirm||K||R,variant:"contained","data-cy":"submit-confirm-dialog",autoFocus:!0,children:[(K||R)&&(0,D.jsx)(m.Z,{size:16}),d]})]})]}))}R.propTypes={title:d().any.isRequired,description:d().any.isRequired,showCancel:d().bool,cancel:d().string,color:d().string,confirm:d().string,params:d().object,onCancel:d().func,onConfirm:d().func.isRequired,loading:d().bool},R.defaultProps={onCancel:function(){},showCancel:!0,cancel:"",confirm:"Confirm",color:"error",params:{},loading:!1};var _=(0,p.default)(f.Z)(E||(E=(0,r.Z)(["\n .delete-actions .Mui-disabled {\n color: rgba(0, 0, 0, 0.26) !important;\n box-shadow: none;\n background-color: rgba(0, 0, 0, 0.12) !important;\n }\n"])))},66138:function(e,n,t){t.d(n,{wV:function(){return j},XN:function(){return D}});var r=t(32723),o=t(33028),a=t(34795),i=t(96234),c=t(30969),s=t(24974),l=t.n(s),u=t(94984),d=t(47333),p=t(59505),f=t(45008),m=t(30134),v=t(57982),h=t(41395),g=t(50576);function x(e){return b.apply(this,arguments)}function b(){return b=(0,a.Z)((0,r.Z)().mark((function e(n){var t,i,c,s,l;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.blockletDid,i=n.nodeApi,c=n.spaceGateways,s=!1,e.next=4,Promise.all(c.map(function(){var e=(0,a.Z)((0,r.Z)().mark((function e(n){var t,a;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.name,e.next=3,(0,m.nU)(n.endpoint);case 3:return a=e.sent,(0,g.isEmpty)(a)||a===t||(t=a,s=!0),e.abrupt("return",(0,o.Z)((0,o.Z)({},n),{},{name:t}));case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()));case 4:if(l=e.sent,!s){e.next=8;break}return e.next=8,Promise.all(l.filter((function(e){return e.did})).map((function(e){return i.updateBlockletSpaceGateway({input:{did:t,where:{did:e.did},spaceGateway:(0,o.Z)({},e)}})})));case 8:return e.abrupt("return",l);case 9:case"end":return e.stop()}}),e)}))),b.apply(this,arguments)}var Z=t(85710);var y=t(24891);function k(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{deps:[],setLoading:function(){}},t=n.deps,o=n.setLoading,s=(0,f.y0)().blocklet,l=(0,c.useState)([]),d=(0,i.Z)(l,2),p=d[0],m=d[1],x=(0,h.h6)().api,b=(0,g.debounce)((0,a.Z)((0,r.Z)().mark((function e(){var n,t;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,o(!0),s){e.next=5;break}return m([]),e.abrupt("return");case 5:return e.next=7,x.getBlockletBackups({input:{did:s.meta.did}});case 7:n=e.sent,t=n.backups,m(null!==t&&void 0!==t?t:[]),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),console.error(e.t0),u.Z.error((0,y.Z)(e.t0));case 16:return e.prev=16,o(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[0,12,16,19]])}))),2e3);return(0,v.Z)((0,a.Z)((0,r.Z)().mark((function e(){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:b();case 1:case"end":return e.stop()}}),e)}))),[null===s||void 0===s||null===(e=s.meta)||void 0===e?void 0:e.did].concat(t)),{backups:p}}var w=function(e){var n=e.appDid,t=k().backups,r=(0,c.useState)({message:"",progress:0,completed:!1}),a=(0,i.Z)(r,2),s=a[0],l=a[1];return(0,(0,h.h6)().ws.useSubscription)(p.BlockletEvents.backupProgress,(function(e){n===(null===e||void 0===e?void 0:e.appDid)&&l((function(){return(0,o.Z)({},e)}))}),[n]),(0,c.useEffect)((function(){var e;if(null!==t&&void 0!==t&&t.length&&(0,g.isNull)(null===(e=t[0])||void 0===e?void 0:e.status)){var n=(0,i.Z)(t,1)[0];l((function(){return{message:n.message,progress:n.progress,completed:Boolean(n.progress>=100)}}))}}),[t]),s},C=t(37574),P=(0,c.createContext)({}),E=P.Provider;P.Consumer;function j(e){var n=e.children,t=(0,d.PE)().t,s=(0,h.h6)().api,l=(0,f.y0)().blocklet,g=(0,c.useState)(!1),b=(0,i.Z)(g,2),y=b[0],P=b[1],j=(0,c.useState)(!1),D=(0,i.Z)(j,2),S=D[0],R=D[1],_=function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.setLoading,o=n.refresh,s=(0,f.y0)(),l=s.blocklet,d=s.actions.refreshBlocklet,p=null===l||void 0===l||null===(e=l.meta)||void 0===e?void 0:e.did,m=(0,c.useState)([]),g=(0,i.Z)(m,2),b=g[0],y=g[1],k=(0,h.h6)().api;return(0,v.Z)((0,a.Z)((0,r.Z)().mark((function e(){var n,o,a;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,p){e.next=4;break}return y([]),e.abrupt("return");case 4:return null===t||void 0===t||t(!0),e.next=7,k.getBlockletSpaceGateways({input:{did:p}});case 7:return n=e.sent,o=n.spaceGateways,e.next=11,x({blockletDid:p,nodeApi:k,spaceGateways:o});case 11:a=e.sent,y(null!==a&&void 0!==a?a:[]),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(0),console.error(e.t0),u.Z.error((0,Z.Z)(e.t0));case 19:return e.prev=19,null===t||void 0===t||t(!1),e.finish(19);case 22:case"end":return e.stop()}}),e,null,[[0,15,19,22]])}))),[p,d,o]),{spaceGateways:b}}({refresh:S,setLoading:P}),B=_.spaceGateways,N=w({appDid:null===l||void 0===l?void 0:l.appDid}),L=(0,c.useState)(!1),T=(0,i.Z)(L,2),I=T[0],U=T[1],A=(0,c.useMemo)((function(){return(0,m.mo)(null===l||void 0===l?void 0:l.environments)}),[l,S,I]),O=(0,c.useState)(!1),G=(0,i.Z)(O,2),z=G[0],F=k({deps:[N],setLoading:G[1]}).backups,K=(0,c.useState)(null===B||void 0===B?void 0:B.find((function(e){return e.endpoint===A}))),M=(0,i.Z)(K,2),q=M[0],V=M[1],W=function(){var e=(0,a.Z)((0,r.Z)().mark((function e(n,t){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return B.push((0,o.Z)((0,o.Z)({},n),{},{loading:!0})),e.next=3,s.addBlockletSpaceGateway({input:{did:l.meta.did,spaceGateway:n}});case 3:if(A===t){e.next=6;break}return e.next=6,s.configBlocklet({input:{did:[l.meta.did],configs:[{key:p.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t}]}});case 6:J(),V(n);case 8:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),X=function(){var e=(0,a.Z)((0,r.Z)().mark((function e(n){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return");case 2:if(n.endpoint!==A){e.next=5;break}return u.Z.warning(t("storage.spaces.gateway.delete.failedForConnected")),e.abrupt("return");case 5:return e.next=7,s.deleteBlockletSpaceGateway({input:{did:l.meta.did,spaceGatewayDid:null===n||void 0===n?void 0:n.did}});case 7:J(),V(n);case 9:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),H=function(){var e=(0,a.Z)((0,r.Z)().mark((function e(n){var o;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.updateBlockletSpaceGateway({input:{did:l.meta.did,where:{did:n.did},spaceGateway:n}});case 2:if(A===n.endpoint){e.next=5;break}return e.next=5,s.configBlocklet({input:{did:[l.meta.did],configs:[{key:p.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:n.endpoint}]}});case 5:u.Z.success(t("storage.spaces.connectedWithName",{name:null!==(o=null===n||void 0===n?void 0:n.name)&&void 0!==o?o:"DID Spaces"})),J();case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),J=function(){R((function(e){return!e}))};return(0,C.jsx)(E,{value:{spaceGateways:B,selectedSpaceGateway:q,addSpaceGateway:W,deleteSpaceGateway:X,updateSpaceGateway:H,refreshSpaceGateways:J,spaceGatewaysLoading:y,spaceGatewayIsSelected:function(e){return(null===e||void 0===e?void 0:e.endpoint)===A},backupEndpoint:A,backupProgress:N,backups:F,backupsLoading:z,refreshBackupEndpoint:function(){U((function(e){return!e}))}},children:n})}function D(){return(0,c.useContext)(P)}j.propTypes={children:l().any.isRequired},j.defaultProps={}},43820:function(e,n,t){t.d(n,{K:function(){return f},g:function(){return p}});var r=t(68079),o=t(96234),a=t(30969),i=t(24974),c=t.n(i),s=t(16986),l=t.n(s),u=t(37574),d=(0,a.createContext)({});function p(e){var n=e.children,t=e.type,i=(0,a.useState)([]),c=(0,o.Z)(i,2),s=c[0],p=c[1],f=(0,a.useRef)([]),m=function(e){if(f.current.includes(e)){var n=f.current.filter((function(n){return n!==e}));p(n),f.current=n}};return(0,u.jsx)(d.Provider,{value:{type:t,deletingBlocklets:s,addDeletingDid:function(e){if(!f.current.includes(e)){var n=[].concat((0,r.Z)(f.current),[e]);p(n),f.current=n}},removeDeletingDid:m,matchDeletingDid:function(e){var n=s.filter((function(n){return e.find((function(e){return e===n}))}));l()(n,s).forEach((function(e){return m(e)}))}},children:n})}function f(){return(0,a.useContext)(d)}p.propTypes={type:c().string,children:c().node.isRequired},p.defaultProps={type:"blocklets"}},41395:function(e,n,t){t.d(n,{h6:function(){return i},sy:function(){return a}});var r=t(33028),o=t(30969),a=(0,o.createContext)({});a.Provider,a.Consumer;function i(){var e=(0,o.useContext)(a).node;return(0,r.Z)((0,r.Z)({},e),{},{inService:"service"===e.type,inDaemon:"daemon"===e.type})}},77370:function(e,n,t){t.d(n,{B:function(){return o.B3},T:function(){return a}});var r=t(30969),o=t(57721);function a(){return(0,r.useContext)(o.B3)}},80670:function(e,n,t){t.d(n,{DJ:function(){return a},Gy:function(){return o}});var r=t(30969),o=(0,r.createContext)({});o.Provider,o.Consumer;function a(){return(0,r.useContext)(o)}},19708:function(e,n,t){var r,o=t(71171),a=t(16380),i={success:"#3ab39d",error:"#D0021B"},c="10px",s=a.default.div(r||(r=(0,o.Z)(["\n display: inline-block;\n width: ",";\n height: ",";\n background: ",";\n border-radius: 100%;\n"])),(function(e){return e.size||c}),(function(e){return e.size||c}),(function(e){return i[e.color]||e.color||i.success}));n.Z=s},15300:function(e,n,t){t.d(n,{Z:function(){return c}});var r=t(19611),o=t.n(r),a=t(41395),i=t(24891);function c(e){var n,t,r=e.blocklet,c=(0,a.h6)().inService,s=(null===(n=window.env)||void 0===n?void 0:n.apiPrefix)||"/",l="?v=".concat(null===r||void 0===r||null===(t=r.meta)||void 0===t?void 0:t.version).concat((0,i.wS)(null===r||void 0===r?void 0:r.status)?"~":"");return{logoUrl:o()(s,"/blocklet/logo/".concat(c?"":r.meta.did),l)}}},61472:function(e,n,t){t.d(n,{Z:function(){return u}});var r=t(33028),o=t(59740),a=t(24974),i=t.n(a),c=t(9715),s=t(37574),l=["children","style"];function u(e){var n=e.children,t=e.style,a=(0,o.Z)(e,l);return(0,s.jsx)(c.Z,(0,r.Z)((0,r.Z)({style:t},a),{},{children:n}))}u.propTypes={children:i().any.isRequired,style:i().object},u.defaultProps={style:{}}},54559:function(e,n,t){t.d(n,{hi:function(){return a},od:function(){return o.a}});var r=t(95803),o=t.n(r);o().defaults.timeout=1e4;var a=o().create()},30134:function(e,n,t){t.d(n,{EJ:function(){return k},Jf:function(){return y},LQ:function(){return f},Nb:function(){return m},Xv:function(){return d},mo:function(){return h},nD:function(){return p},nU:function(){return b},w2:function(){return g}});var r=t(32723),o=t(34795),a=t(92522),i=t.n(a),c=t(59505),s=t(50576),l=t(54559),u=t(19611);function d(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/"),r=t.at(-4),o=t.at(-2);return u(n,"space",r,"apps",o,"explorer","?key=/apps/".concat(o,"/.did-objects/").concat(o,"/"))}function p(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/").at(-4);return u(n,"space",t)}function f(e){return e.replace(/\/$/,"").split("/").at(-4)}function m(e){return v.apply(this,arguments)}function v(){return(v=(0,o.Z)((0,r.Z)().mark((function e(n){var t,o;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i()(n)){e.next=3;break}return e.abrupt("return",!1);case 3:return e.next=5,l.hi.head(n,{timeout:5e3});case 5:return t=e.sent,o=t.headers,e.abrupt("return","true"===o["x-listable"]&&"true"===o["x-readable"]&&"true"===o["x-writeable"]);case 10:return e.prev=10,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",!1);case 14:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function h(e){var n;return(null===e||void 0===e||null===(n=e.find((function(e){return e.key===c.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT})))||void 0===n?void 0:n.value)||""}function g(e){return x.apply(this,arguments)}function x(){return(x=(0,o.Z)((0,r.Z)().mark((function e(n){var t,o,a,c;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i()(n)){e.next=3;break}return e.abrupt("return",!1);case 3:return t=u(n,"space/api/did/one-click-authorization/token"),e.next=6,l.hi.get(t,{timeout:5e3});case 6:return o=e.sent,a=o.status,c=o.data,e.abrupt("return",200===a&&(0,s.isObject)(c));case 12:return e.prev=12,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,null,[[0,12]])})))).apply(this,arguments)}function b(e){return Z.apply(this,arguments)}function Z(){return(Z=(0,o.Z)((0,r.Z)().mark((function e(n){var t,o,a;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i()(n)){e.next=3;break}return e.abrupt("return","");case 3:return e.next=5,l.hi.head(n,{timeout:3e3});case 5:return t=e.sent,o=t.headers,a=o["x-space-name"],e.abrupt("return",a?decodeURIComponent(a):"");case 11:return e.prev=11,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return","");case 15:case"end":return e.stop()}}),e,null,[[0,11]])})))).apply(this,arguments)}function y(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/").at(-4);return u(n,"/api/space/nft/display?spaceDid=".concat(t))}var k=function(e){var n,t;return(null===e||void 0===e||null===(n=e.configs)||void 0===n||null===(t=n.find((function(e){return e.key===c.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT})))||void 0===t?void 0:t.value)||null}},85710:function(e,n,t){var r=t(73408).default,o=t(27609).default,a=t(91461).default,i=t(43681).default;Object.defineProperty(n,"Z",{enumerable:!0,get:function(){return b.default}});var c,s=t(20244),l=P(t(99237)),u=P(t(63784)),d=P(t(92522)),p=P(t(46292)),f=P(t(99985)),m=P(t(18930)),v=P(t(61301)),h=P(t(19611)),g=P(t(31419)),x=P(t(19886)),b=P(t(39882)),Z=P(t(6399)),y=t(67615),k=P(t(67626)),w=t(59505),C=P(t(88617));function P(e){return e&&e.__esModule?e:{default:e}}function E(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(!e)return"";var r="http";"https:"===window.location.protocol&&((0,y.isIpEcho)(e)||(0,y.isSlpDomain)(e)||(0,y.isDidDomain)(e))&&(r="https");var o="",a=Number(window.location.port);a&&![80,443].includes(a)&&(o=":".concat(a));var i=new URL("".concat(r,"://").concat(e).concat(o));i.pathname=n;var c=i.href.replace(/\/$/,"");if(!t||!Object.keys(t))return c;var s=new URLSearchParams;return Object.keys(t).forEach((function(e){s.append(e,t[e])})),"".concat(c).concat("/"===i.pathname?"/":"","?").concat(s.toString())}var j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en";return"tw"===e?"zh":e};var D=function(e){return e.replace(/^\?/,"").split("&").map((function(e){return e.split("=")})).filter((function(e){return!!i(e,1)[0]})).reduce((function(e,n){var t=n[0],r=decodeURIComponent(n[1])||!0;return e[t]=r,e}),{})};var S=function(e,n){return n.startsWith("/assets")?n:"/assets/".concat(e,"/").concat(n)};var R=function(){var e=a(o().mark((function e(n){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,y.evaluateURLs)(n);case 3:return t=e.sent,e.abrupt("return",t[0].url);case 7:return e.prev=7,e.t0=e.catch(0),console.warn("get accessible url failed"),e.abrupt("return","");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(n){return e.apply(this,arguments)}}();function _(e){for(var n=decodeURIComponent(e);n!==decodeURIComponent(n);)n=decodeURIComponent(n);return n}function B(){return(B=a(o().mark((function e(n,t){var r,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,g.default.post((0,h.default)(n,"/api/gql/"),JSON.stringify({query:'{\n getAssetState(address: "'.concat(t,'") {\n state {\n address\n data {\n typeUrl\n value\n }\n issuer\n owner\n parent\n }\n }\n }')}),{headers:{"Content-Type":"application/json",Accept:"application/json"},timeout:6e4});case 2:return r=e.sent,(a=(0,p.default)(r.data,"data.getAssetState.state"))&&"json"===a.data.typeUrl&&(a.data.value=JSON.parse(a.data.value)),e.abrupt("return",a);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}null===(c=window.env)||void 0===c||c.groupPathPrefix,s.ROLES.ADMIN,s.ROLES.OWNER;var N=function(e){return!!e&&(e.endsWith(s.DEFAULT_DID_DOMAIN)||e.endsWith(s.DEFAULT_IP_DOMAIN_SUFFIX)||e.endsWith(s.DEFAULT_SLP_DOMAIN))};var L=function(){var e=a(o().mark((function e(n){var t,r,a,i,c,s,l,u,d,p,f,m;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.launcherUrl,r=void 0===t?"":t,a=n.nftId,i=void 0===a?"":a,c=n.locale,s=void 0===c?"en":c,r){e.next=3;break}return e.abrupt("return","");case 3:return l=(0,h.default)(r,"/instances"),e.prev=4,e.next=7,g.default.get((0,h.default)(r,"__blocklet__.js?type=json"),{timeout:5e3});case 7:d=e.sent,p=d.data,f=null===(u=p.componentMountPoints)||void 0===u?void 0:u.find((function(e){return"z8iZy4P83i6AgnNdNUexsh2kBcsDHoqcwPavn"===e.did})),m=new URL(r),l=(0,h.default)(m.origin,null===f||void 0===f?void 0:f.mountPoint,"/nfts"),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),console.error(e.t0);case 17:return e.abrupt("return",(0,h.default)(l,"/".concat(i,"/subscription?locale=").concat(s,"&return-url=").concat(encodeURIComponent(window.location.href))));case 18:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(n){return e.apply(this,arguments)}}()}}]);
2
- //# sourceMappingURL=6186.964c3165.chunk.js.map
1
+ "use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[6186],{5954:function(e,n,t){t.d(n,{cK:function(){return d},h6:function(){return p}});var r=t(30969),o=t(41395),a=t(20244),i=t(48952),c=t(90781),s=t(99042),l=t(37574),u=o.sy.Provider;o.sy.Consumer;function d(e){var n=e.children,t="".concat(a.WELLKNOWN_SERVICE_PATH_PREFIX,"/static/images"),r=window.env,o=r.serverDid,d=r.serverVersion,p=r.mode,f={imgPrefix:t,api:i.Z,restApi:s.Z,ws:{getWsClient:c.ZP,create:c.Ue,useSubscription:c.mU},type:"service",info:{did:o,version:d,mode:p}};return(0,l.jsx)(u,{value:{node:f},children:n})}function p(){return(0,r.useContext)(o.sy).node}},6186:function(e,n,t){t.r(n),t.d(n,{default:function(){return en}});var r,o=t(71171),a=t(16380),i=t(30969),c=t(30734),s=t(238),l=t(38361),u=t(51711),d=t(26022),p=t(19865),f=t(7017),m=t(20244),v=t(24891),h=t(43820),g=t(94282),x=t(33028),b=t(32723),Z=t(34795),y=t(96234),k=t(59740),w=t(24974),C=t.n(w),P=t(86822),E=t(17708),j=t(94551),D=t(48082),S=t(75295),R=t(89667),_=t(94308),B=t(2689),N=t(37973),L=t(93310),T=t(86008),I=t(33359),U=t(76492),A=t(97517),O=t(49884),G=t(18877),z=t(29996),F=t(59505),K=t(94984),M=t(90617),q=t(41395),V=t(8479),W=t(55008),X=t(45008),H=t(37574),J=["blocklet","onStart","onComplete","variant","hasPermission","useBlockletUrlEvaluation"];function Y(e){var n,t,r,o,a=e.blocklet,s=e.onStart,l=e.onComplete,u=e.variant,p=e.hasPermission,h=e.useBlockletUrlEvaluation,g=(0,k.Z)(e,J),w=(0,c.useNavigate)(),C=(0,q.h6)(),Y=(0,i.useState)(null),Q=(0,y.Z)(Y,2),ee=Q[0],ne=Q[1],te=(0,i.useState)(null),re=(0,y.Z)(te,2),oe=re[0],ae=re[1],ie=(0,i.useState)(!1),ce=(0,y.Z)(ie,2),se=ce[0],le=ce[1],ue=(0,i.useState)(null),de=(0,y.Z)(ue,2),pe=de[0],fe=de[1],me=(0,i.useContext)(d.RD).t,ve=(0,E.Z)("skip-blocklet-setup",!1),he=(0,y.Z)(ve,1)[0],ge=h(a),xe=ge.loading,be=ge.recommendedUrl,Ze=(0,X.y0)().nftState,ye=(0,f.isInProgress)(a.status),ke=(null===a||void 0===a||null===(n=a.controller)||void 0===n||null===(t=n.status)||void 0===t?void 0:t.value)===F.BLOCKLET_CONTROLLER_STATUS.suspended;null!==Ze&&void 0!==Ze&&Ze.expired||(null===a||void 0===a||null===(r=a.controller)||void 0===r||null===(o=r.status)||void 0===o?void 0:o.reason)!==F.SUSPENDED_REASON.expired||(ke=!1);var we=C.inService,Ce=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,Z.Z)((0,b.Z)().mark((function r(){var o,i,c,u,d;return(0,b.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(o=function(){var t=(0,Z.Z)((0,b.Z)().mark((function t(r){var o,i,c,u,d,p,m,h,g,x;return(0,b.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s({action:e,blocklet:a}),le(!0),ae(e),fe(null),o=!1,t.prev=5,"remove"!==e){t.next=11;break}return t.next=9,n(r);case 9:t.next=38;break;case 11:if("start"!==e){t.next=28;break}if((0,f.hasRunnableComponent)(a)){t.next=15;break}return K.Z.error(me("blocklet.noComponent")),t.abrupt("return");case 15:if(we||he||null!==(i=a.settings)&&void 0!==i&&i.initialized||a.mode===F.BLOCKLET_MODES.DEVELOPMENT){t.next=22;break}return c=(0,M.RU)(C.info),(u=new URL(be)).searchParams.set("serverUrl",c),window.open(u.href),l({action:e,blocklet:a}),t.abrupt("return");case 22:return d=a.children.filter((function(e){return!(0,f.isInProgress)(e.status)&&"running"!==e.status})).map((function(e){return e.meta.did})),p={did:a.meta.did,componentDids:d},t.next=26,n({input:p});case 26:t.next=38;break;case 28:if(!["stop","restart","reload"].includes(e)){t.next=35;break}return m=a.children.filter((function(e){return"running"===e.status})).map((function(e){return e.meta.did})),h={did:a.meta.did,componentDids:m},t.next=33,n({input:h});case 33:t.next=38;break;case 35:return g={did:a.meta.did},t.next=38,n({input:g});case 38:if("remove"!==e){t.next=42;break}o=!0,t.next=44;break;case 42:return t.next=44,(0,v._v)(1e3);case 44:"reload"===e&&K.Z.success(me("blocklet.reloadSuccess")),l({action:e,blocklet:a}),t.next=52;break;case 48:t.prev=48,t.t0=t.catch(5),x="Blocklet ".concat(e," failed: ").concat((0,v.Z)(t.t0)),l({action:e,blocklet:a,error:new Error(x)});case 52:return t.prev=52,o||le(!1),t.finish(52);case 55:case"end":return t.stop()}}),t,null,[[5,48,52,55]])})));return function(e){return t.apply(this,arguments)}}(),i=function(){le(!1),fe(null)},c=(0,f.getDisplayName)(a,!0),u=a.mode===F.BLOCKLET_MODES.DEVELOPMENT?{description:function(){return(0,H.jsx)(I.Z,{component:"div",children:(0,H.jsx)(I.Z,{gutterBottom:!0,children:me("blocklet.action.removeApplicationDescription")})})},params:{removeType:"complete"}}:{description:function(e,n){return(0,H.jsxs)(I.Z,{component:"div",children:[(0,H.jsx)(I.Z,{gutterBottom:!0,children:me("blocklet.action.removeApplicationDescription")}),(0,H.jsxs)(A.Z,{name:"removeType",value:e.removeType,onChange:function(t){return n((0,x.Z)((0,x.Z)({},e),{},{removeType:t.target.value}))},children:[(0,H.jsx)(O.Z,{value:"backup",control:(0,H.jsx)(U.Z,{}),label:me("blocklet.action.removeApplicationAfterBackup")}),(0,H.jsx)(O.Z,{value:"complete",control:(0,H.jsx)(U.Z,{}),label:me("blocklet.action.removeApplicationComplete")})]})]})},params:{removeType:"backup"}},d={stop:{title:"".concat(me("common.stop")," ").concat(c),description:me("blocklet.action.stopDescription"),confirm:me("blocklet.action.confirmStop"),cancel:me("common.cancel"),onConfirm:o,onCancel:i},restart:{title:"".concat(me("common.restart")," ").concat(c),description:me("blocklet.action.restartDescription"),confirm:me("blocklet.action.confirmRestart"),cancel:me("common.cancel"),onConfirm:o,onCancel:i},remove:(0,x.Z)({title:"".concat(me("common.remove")," ").concat(c),confirm:me("blocklet.action.confirmRemove"),cancel:me("common.cancel"),onConfirm:o,onCancel:i},u),cancelDownload:{title:"".concat(me("common.cancel")),description:me("blocklet.action.cancelDownloadDescription",{name:c}),confirm:me("common.confirm"),cancel:me("common.cancel"),onConfirm:o,onCancel:i}},!t){r.next=9;break}fe(d[e]),r.next=11;break;case 9:return r.next=11,o();case 11:case"end":return r.stop()}}),r)})))},Pe=Boolean(ee),Ee=function(){var e=(0,Z.Z)((0,b.Z)().mark((function e(n,t){return(0,b.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{t.stopPropagation(),t.preventDefault()}catch(r){}if(ne(null),"function"!==typeof n.handler){e.next=16;break}return e.prev=3,le(!0),ae(n.action),e.next=8,n.handler();case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),console.error("Blocklet ".concat(n.name," failed: "),e.t0);case 13:return e.prev=13,le(!1),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[3,10,13,16]])})));return function(n,t){return e.apply(this,arguments)}}(),je=!we&&(0,f.isDeletableBlocklet)(a)&&a.structVersion===m.APP_STRUCT_VERSION?{action:"remove",icon:W.Z.Remove,name:me("common.remove"),handler:Ce("remove",function(){var e=(0,Z.Z)((0,b.Z)().mark((function e(n){return(0,b.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("backup"!==n.removeType){e.next=4;break}return e.next=4,C.api.backupBlocklet({input:{appDid:a.appDid,to:"disk"}});case 4:return e.next=6,C.api.deleteBlocklet({input:{did:a.meta.did,keepData:!1}});case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),!0),disabled:ye}:null,De={action:"remove",icon:W.Z.Remove,name:me("common.cancel"),handler:Ce("cancelDownload",C.api.cancelDownloadBlocklet,!0)},Se=(0,f.getAppMissingConfigs)(a),Re=[{action:"start",icon:W.Z.Start,name:me("common.start"),handler:Ce("start",C.api.startBlocklet),disabled:ke||a.children.every((function(e){return"running"===e.status}))||(0,v.XN)(a.status)||xe||ye},{action:"stop",icon:W.Z.Stop,name:me("common.stop"),handler:Ce("stop",C.api.stopBlocklet,!0),disabled:!["running","starting"].includes(a.status)},{action:"restart",icon:W.Z.Restart,name:me("common.restart"),handler:Ce("restart",C.api.restartBlocklet,!0),disabled:ke||"running"!==a.status},{action:"reload",icon:W.Z.Reload,name:me("common.reload"),handler:Ce("reload",C.api.reloadBlocklet),disabled:ke||"running"!==a.status},(0,v.XN)(a.status)?De:je,{separator:!0},{onlyInMenu:!0,action:"config",icon:W.Z.Config,name:me("common.config"),handler:function(){w("/blocklets/".concat(a.meta.did,"/configuration"))},disabled:(0,v.XN)(a.status)},{onlyInMenu:!0,action:"team",icon:W.Z.Group,name:me("common.manageTeam"),handler:function(){w("/blocklets/".concat(a.meta.did,"/members"))},disabled:(0,v.XN)(a.status)},{onlyInMenu:!0,action:"log",icon:W.Z.Log,name:me("common.log"),handler:function(){w("/logs/blocklet-".concat(a.meta.did))},disabled:(0,v.XN)(a.status)}].filter(Boolean);return"menu"===u?(0,H.jsxs)($,{"data-cy":"blocklet-actions",children:[(0,H.jsx)(j.Z,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":a.meta.did,onClick:function(e){try{e.stopPropagation(),e.preventDefault()}catch(n){}ne(e.currentTarget)},size:"small",disabled:!p||!(0,v.XN)(a.status)&&se,children:(0,H.jsx)(N.Z,{})}),(0,H.jsxs)(D.Z,{id:"actions-menu",anchorEl:ee,keepMounted:!0,open:Pe,onClose:function(e){try{e.stopPropagation(),e.preventDefault()}catch(n){}ne(null)},PaperProps:{},children:[Se.length>0&&(0,H.jsxs)(G.Z,{style:{maxWidth:"400px"},severity:"error",children:[me("blocklet.config.missingRequired"),(0,H.jsx)("br",{}),(0,H.jsx)(P.rU,{to:"/blocklets/".concat(a.meta.did,"/components"),children:me("blocklet.config.gotoFix")})]}),Re.map((function(e,n){return e.separator?(0,H.jsx)(S.Z,{},"separator-".concat(n)):(0,H.jsxs)(B.Z,{dense:!0,onClick:function(n){return Ee(e,n)},disabled:e.disabled,"data-cy":"".concat(e.action,"-blocklet"),children:[(0,H.jsx)(L.Z,{style:{minWidth:24},children:(0,H.jsx)(e.icon,{fontSize:"small"})}),(0,H.jsx)(T.Z,{primary:e.name})]},e.name)}))]}),pe&&(0,H.jsx)(V.Z,{title:pe.title,description:pe.description,confirm:pe.confirm,cancel:pe.cancel,params:pe.params,onConfirm:pe.onConfirm,onCancel:pe.onCancel})]}):(0,H.jsxs)($,(0,x.Z)((0,x.Z)({"data-cy":"blocklet-actions"},g),{},{children:[(0,H.jsx)(R.Z,{children:Re.filter((function(e){return!e.separator&&!e.onlyInMenu})).map((function(e){return(0,H.jsxs)(z.Z,{title:e.name,"data-cy":"".concat(e.action,"-blocklet"),onClick:function(){return Ee(e)},disabled:Boolean(e.disabled)||se,children:[oe===e.action&&se&&ye?(0,H.jsx)(_.Z,{size:16}):(0,H.jsx)(e.icon,{}),(0,H.jsx)("span",{className:"blocklet-action-text",children:e.name})]},e.name)}))}),pe&&(0,H.jsx)(V.Z,{title:pe.title,description:pe.description,confirm:pe.confirm,cancel:pe.cancel,params:pe.params,onConfirm:pe.onConfirm,onCancel:pe.onCancel})]}))}Y.propTypes={blocklet:C().object.isRequired,onStart:C().func.isRequired,onComplete:C().func.isRequired,variant:C().oneOf(["menu","group"]),hasPermission:C().bool,useBlockletUrlEvaluation:C().func},Y.defaultProps={variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:function(){var e,n;return{loading:!1,recommendedUrl:null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.href}}};var $=a.default.div(r||(r=(0,o.Z)(["\n display: flex;\n align-items: center;\n\n @media (max-width: ","px) {\n .MuiButton-root {\n padding: 4px;\n font-size: 10px;\n }\n }\n"])),(function(e){return e.theme.breakpoints.values.sm})),Q=t(84802),ee=t(23299),ne=t(22100),te=t(77370),re=function(e){var n={},t=null;return(0,f.forEachBlockletSync)(e,(function(e){n[e.meta.bundleDid]?t=(0,f.getDisplayName)(e,!0):e.meta.bundleDid&&(n[e.meta.bundleDid]=!0)})),t},oe=function(e,n,t){var r=e.hostname,o=e.href;if(!n)return o;if(t){var a,i=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!i)return o;var c=i[0],s=(((null===(a=n.site)||void 0===a?void 0:a.domainAliases)||[]).map((function(e){return e.value})).filter(Boolean).find((function(e){return e.endsWith(m.DEFAULT_DID_DOMAIN)}))||"").replace(".".concat(m.DEFAULT_DID_DOMAIN),"");return s?o.replace(r,"".concat(s,"-").concat(c,".").concat(m.DEFAULT_IP_DOMAIN_SUFFIX)):o}return o.replace(n.meta.bundleDid,n.appPid)};function ae(){var e=(0,d.PE)().t,n=(0,te.T)().api,t=(0,X.y0)().blocklet,r=(0,q.h6)().inService,o=(0,i.useState)(!1),a=(0,y.Z)(o,2),c=a[0],s=a[1],u=(0,i.useState)(5),p=(0,y.Z)(u,2),h=p[0],g=p[1],x=t&&t.structVersion!==m.APP_STRUCT_VERSION;return[x&&(0,H.jsxs)(ee.Z,{type:"warning",style:{margin:"12px 0"},children:[(0,H.jsxs)(l.Z,{display:"flex",alignItems:"center",children:[(0,H.jsx)(z.Z,{variant:"contained",size:"small",color:"primary",onClick:function(){return function(){try{if("running"===t.status)return void K.Z.error(e("blocklet.migrate.tip.running"));var n=re(t);if(n)return void K.Z.error(e("blocklet.migrate.tip.duplicate",{name:n}));s(!0)}catch(r){K.Z.error((0,v.Z)(r))}}()},style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),(0,H.jsx)("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map((function(n){return(0,H.jsx)(l.Z,{display:"flex",alignItems:"center",children:e("blocklet.migrate.intro.".concat(n))},n)}))]},"alert"),t&&(0,H.jsx)(ne.default,{popup:!0,open:c,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:n.get,checkTimeout:3e5,onSuccess:function(){var e=oe(window.location,t,r);setTimeout((function(){window.location.href=e}),5e3),g(5),setInterval((function(){g((function(e){return e-1}))}),1e3)},extraParams:{appDid:t.appDid,did:t.meta.did,wt:(0,M.iK)(t,!0),title:(0,f.getDisplayName)(t)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:h>=0?e("blocklet.migrate.success",{sec:h}):"Redirecting..."},onClose:function(){return s(!1)}},"connect")]}ae.propTypes={};var ie=t(66138),ce=t(90781),se=t(64864),le=t(5954),ue=t(80670),de=t(48952),pe=ue.Gy.Provider,fe=(ue.Gy.Consumer,window.env),me=fe.did,ve=fe.appId;function he(e){var n,t,r=e.children,o=(0,se.y0)().blocklet,a=(0,i.useState)([]),c=(0,y.Z)(a,2),s=c[0],l=c[1],u=(0,i.useState)([]),d=(0,y.Z)(u,2),p=d[0],v=d[1],h=(0,i.useState)([]),g=(0,y.Z)(h,2),x=g[0],k=g[1],w=(0,f.getDisplayName)(o),C=(null===(n=((null===o||void 0===o?void 0:o.environments)||[]).find((function(e){return e.key===F.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR})))||void 0===n?void 0:n.value)||"auto",P=(null===o||void 0===o?void 0:o.trustedPassports)||[],E=(null===o||void 0===o?void 0:o.trustedFactories)||[],j=!1!==(null===o||void 0===o?void 0:o.enablePassportIssuance),D=function(){var e=(0,Z.Z)((0,b.Z)().mark((function e(){var n;return(0,b.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,de.Z.doBatchQuery({getRoles:{input:{teamDid:me}},getPermissions:{input:{teamDid:me}},getInvitations:{input:{teamDid:me}}});case 3:n=e.sent,v((n.getRoles.roles||[]).filter((function(e){return!m.RBAC_CONFIG.roles.some((function(n){return n.name===e.name&&(!n.passport||n.ci)}))})).map((function(e){return e.description=e.description||"Use this passport to connect ".concat(w," as ").concat(e.title),e}))),k(n.getPermissions.permissions||[]),l(n.getInvitations.invitations||[]),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),K.Z.error(e.t0.message);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}();(0,i.useEffect)((function(){var e;null!==o&&void 0!==o&&null!==(e=o.meta)&&void 0!==e&&e.did&&D()}),[null===o||void 0===o||null===(t=o.meta)||void 0===t?void 0:t.did]);var S=function(e){e.teamDid===me&&D(me)};(0,ce.mU)(m.EVENTS.USER_ADDED,S,[me]),(0,ce.mU)(m.EVENTS.USER_REMOVED,S,[me]),(0,ce.mU)(m.EVENTS.USER_UPDATED,S,[me]);var R={teamDid:me,teamIssuerDid:ve,teamName:w,invitations:s,roles:p,permissions:x,trustedPassports:P,trustedFactories:E,isNodeTeam:!1,enablePassportIssuance:j,refresh:function(){return D()},passportColor:C,endpoint:window.location.origin,blocklet:o,api:{getUser:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).did,n={teamDid:me,user:{did:e}};return de.Z.getUser({input:n})},getUsers:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.query,t=e.paging,r={teamDid:me};return t&&(r.paging=t),n&&(r.query=n),r.sort={lastLoginAt:-1},de.Z.getUsers({input:r})},getUsersCountPerRole:function(){return de.Z.getUsersCountPerRole({input:{teamDid:me}})}}};return(0,H.jsx)(pe,{value:R,children:r})}t(53420);var ge=t(25177),xe=t(75255),be=t(51921),Ze=t(19638),ye=t(13328);function ke(e){var n=e.infos,t=(0,d.PE)().t,r=n.map((function(e){return"* ".concat(e.label,": ").concat(e.value)})).join("\n"),o=new URL("https://github.com/blocklet/blocklet-site/issues/new");return o.searchParams.set("title","[Feedback]"),o.searchParams.set("body","\x3c!-- [Enter feedback here] --\x3e\n\n\n\n\x3c!--\nDocument Details\n".concat(r,"\n* Page: ").concat(window.location.href,"\n--\x3e\n")),(0,ye.tZ)(l.Z,{sx:{mx:{xs:0,md:2}},children:(0,ye.tZ)(Ze.Z,{sx:{color:"text.primary"},target:"_blank",href:o.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}ke.propTypes={infos:C().arrayOf(C().shape({label:C().string,value:C().string}))},ke.defaultProps={infos:[]};var we=t(37433),Ce=t(39563),Pe=t(19886),Ee=t.n(Pe),je=t(91380),De=t(7173),Se=t(83176),Re=t(93033),_e=t.n(Re),Be=t(22073),Ne=t(43178),Le=["launcherUrl","chainHost","nftId","retention"],Te=["sx"];function Ie(e){var n,t,r=e.launcherUrl,o=e.chainHost,a=e.nftId,c=(e.retention,(0,k.Z)(e,Le)),s=(0,d.PE)(),u=s.t,p=s.locale,f=(0,Ne.Z)({safeIframeRef:null,popoverAnchorEl:null}),m=(0,y.Z)(f,2),h=m[0],g=m[1],w=(0,i.useRef)(null),C=c.sx,P=void 0===C?{}:C,E=(0,k.Z)(c,Te),j=(0,Be.Z)((0,Z.Z)((0,b.Z)().mark((function e(){var n,t,i,c;return(0,b.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([(0,v.Nh)(o,a),(0,v.qZ)({launcherUrl:r||"https://launcher.arcblock.io/",nftId:a,locale:p})]);case 2:return n=e.sent,t=(0,y.Z)(n,2),i=t[0],c=t[1],e.abrupt("return",{asset:i,subscriptionURL:c});case 7:case"end":return e.stop()}}),e)}))),[p]);if(j.loading)return(0,H.jsxs)(l.Z,(0,x.Z)((0,x.Z)({sx:(0,x.Z)({display:"flex",alignItems:"center",color:"grey",gap:1},P)},E),{},{children:[(0,H.jsx)(_.Z,{size:16}),u("expiration.loading")]}));if(j.error)return console.error(j.error),(0,H.jsx)(De.Z,(0,x.Z)((0,x.Z)({label:u("expiration.loadFailed"),color:"error",variant:"success",sx:(0,x.Z)({cursor:"pointer"},P)},E),{},{onClick:function(){return j.retry()}}));var D=(0,v.D9)(null===(n=j.value)||void 0===n?void 0:n.asset),S=Ee()(D).isBefore(Ee()()),R=Ee()(D).diff(Ee()(),"ms"),B="success";R<=2592e6&&(B="warning"),S&&(B="error");return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(De.Z,(0,x.Z)((0,x.Z)({label:(0,H.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,H.jsx)(je.Z,{sx:{mr:"4px"},fontSize:"small"}),u("expiration.tips.".concat(B),{validity:_e()(R,{locale:(0,v.tA)(p),compact:!0,verbose:!0})})]}),color:B,variant:"success"!==B?"contained":"outlined",sx:(0,x.Z)({cursor:"pointer"},P)},E),{},{onClick:function(e){g({popoverAnchorEl:e.currentTarget})}})),(0,H.jsx)(Se.ZP,{id:"popover-info",open:Boolean(h.popoverAnchorEl),anchorEl:h.popoverAnchorEl,onClose:function(){g({popoverAnchorEl:null})},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:(0,H.jsx)("iframe",{ref:w,title:u("common.subscription"),width:"360px",height:"600px",style:{border:0},src:null===(t=j.value)||void 0===t?void 0:t.subscriptionURL})})]})}Ie.propTypes={chainHost:C().string.isRequired,nftId:C().string.isRequired,sx:C().object,retention:C().number,launcherUrl:C().string.isRequired},Ie.defaultProps={sx:{},retention:0};var Ue,Ae=Ie;function Oe(e){var n,t=e.children,r=(0,d.PE)().t,o=(0,se.y0)(),a=o.loading,i=o.error,u=o.actions.refreshBlocklet,p=o.env,f=o.blocklet,h=(0,le.h6)().info,g=(0,c.useLocation)(),x=(0,xe.Z)((function(e){return e.breakpoints.down("md")})),b=[{label:"App ID",value:p.appId},{label:"App Version",value:p.version},{label:"App Bundle Name",value:null===f||void 0===f||null===(n=f.meta)||void 0===n?void 0:n.bundleName},{label:"Server Id",value:h.did},{label:"Server Version",value:h.version}],Z={};return x&&(Z.logo=null),(0,ye.BX)(ze,{legacy:!1,fullWidth:!0,headerAddons:function(e){var n,t,r;if(!(0,M.ep)(f))return e;var o=Array.isArray(e)?e:[e];return o.unshift((0,ye.tZ)(Ae,{chainHost:null===f||void 0===f||null===(n=f.controller)||void 0===n?void 0:n.chainHost,nftId:null===f||void 0===f||null===(t=f.controller)||void 0===t?void 0:t.nftId,launcherUrl:null===f||void 0===f||null===(r=f.controller)||void 0===r?void 0:r.launcherUrl,retention:m.EXPIRED_BLOCKLET_DATA_RETENTION_DAYS,sx:{cursor:"pointer",marginRight:{xs:"8px",md:"48px"}}})),o},headerProps:Z,footerProps:{addon:(0,ye.tZ)(ke,{infos:b})},children:[!f&&a&&(0,ye.tZ)(s.Z,{relative:"parent",children:(0,ye.tZ)(_.Z,{})}),!f&&i&&(0,ye.BX)(s.Z,{relative:"parent",children:[(0,ye.BX)(l.Z,{display:"flex",alignItems:"center",children:[(0,ye.tZ)(ge.Z,{color:"error",sx:{marginRight:1}}),(0,v.Z)(i)]}),(0,ye.tZ)(z.Z,{onClick:function(){return u()},children:(0,ye.tZ)("span",{style:{textDecoration:"underline"},children:r("common.retry")})})]}),!!f&&(0,ye.tZ)("div",{className:"dashboard-layout-body",children:(0,ye.tZ)("div",{className:"dashboard-layout-main",children:(0,ye.tZ)(l.Z,{className:"dashboard-layout-main",children:(0,ye.tZ)(l.Z,{flex:1,padding:"16px",display:"flex",flexDirection:"column",children:(0,ye.tZ)(be.ErrorBoundary,{FallbackComponent:we.H,resetKeys:[g.pathname],children:t})})})})})]})}Oe.defaultProps={children:null};var Ge,ze=(0,a.default)(Ce.Z)(Ue||(Ue=(0,o.Z)(["\n .dashboard-layout-body {\n flex: 1;\n display: flex;\n padding-top: 16px;\n }\n .dashboard-layout-main {\n flex: 1;\n padding: 0;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n }\n"]))),Fe=t(38507),Ke=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(4461),t.e(3688)]).then(t.bind(t,13688))})),Me=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(1614),t.e(5960),t.e(2631),t.e(4212),t.e(2291),t.e(617),t.e(2653)]).then(t.bind(t,92653))})),qe=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(4319),t.e(252),t.e(3593)]).then(t.bind(t,23593))})),Ve=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(1614),t.e(5960),t.e(2631),t.e(4212),t.e(2291),t.e(4764),t.e(6640),t.e(6868),t.e(4802)]).then(t.bind(t,121))})),We=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7606),t.e(3154),t.e(6771)]).then(t.bind(t,26771))})),Xe=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(5645),t.e(5982)]).then(t.bind(t,25205))})),He=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(5960),t.e(2631),t.e(9260),t.e(4764),t.e(8128),t.e(4023)]).then(t.bind(t,4023))})),Je=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(1614),t.e(5960),t.e(2631),t.e(4212),t.e(2291),t.e(4164),t.e(6498),t.e(7310),t.e(9657),t.e(6452)]).then(t.bind(t,76452))})),Ye=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(1614),t.e(5960),t.e(4212),t.e(4164),t.e(4319),t.e(445),t.e(9260),t.e(5465),t.e(7606),t.e(6921),t.e(6498),t.e(1562),t.e(6868),t.e(1565)]).then(t.bind(t,31565))})),$e=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(1614),t.e(5960),t.e(2631),t.e(4212),t.e(2291),t.e(5465),t.e(6700),t.e(2393)]).then(t.bind(t,2393))}));function Qe(){var e,n,t=(0,c.useNavigate)(),r=(0,c.useParams)().tab,o=void 0===r?"overview":r,a=(0,se.y0)(),x=a.blocklet,b=a.actions.refreshBlocklet,Z=(0,d.PE)().t,y=null===x||void 0===x||null===(e=x.meta)||void 0===e?void 0:e.did,k=!x||(0,v.wS)(x.status)?[]:(0,f.getAppMissingConfigs)(x),w=[{label:Z("common.overview"),value:"overview"},{label:(0,H.jsx)(u.Z,{color:"error",variant:"dot",invisible:!k.length,children:Z("common.components")}),value:"components"}];(0,v.wS)(null===x||void 0===x?void 0:x.status)||w.push({label:Z("common.configuration"),value:"configuration"}),w.push({label:Z("common.auditLogs"),value:"audit-logs"}),x&&null!==(n=x.children)&&void 0!==n&&n.length&&x.structVersion===m.APP_STRUCT_VERSION&&w.push({label:Z("common.logs"),value:"logs"}),w.push({label:Z("common.configNavigation"),value:"navigation"}),w.push({label:Z("common.storage"),value:"storage"});var C=(0,H.jsx)(We,{scope:y,categories:["blocklet","team","security","certificates","gateway"]});(0,ce.mU)(m.EVENTS.NOTIFICATION_CREATE,(function(e){var n=e||{},t=n.severity,r=n.title,o=n.description;"error"===t?K.Z.error(o||r):K.Z.success(o||r)}),[y]);var P={overview:(0,H.jsx)(Ke,{}),members:(0,H.jsx)(l.Z,{mt:-5,children:(0,H.jsx)(Me,{type:"blocklet",createPassportSvg:Fe.Ju})}),passports:(0,H.jsx)(l.Z,{mt:-4.5,children:(0,H.jsx)(qe,{createPassportSvg:Fe.Ju})}),components:Ye,configuration:(0,H.jsx)(Ve,{blocklet:x,onUpdate:function(){b()}}),"audit-logs":C,logs:Xe,navigation:He,storage:(0,H.jsx)(Je,{}),analytics:(0,H.jsx)(l.Z,{mt:-5,children:(0,H.jsx)($e,{})})},E=P[o]||P.overview,j=!["members","passports","analytics"].includes(o),D=x?(0,H.jsxs)(h.g,{type:"components",children:[j&&(0,H.jsx)(p.Z,{tabs:w,current:o,onChange:function(e){t("".concat(m.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin/").concat(e))},scrollButtons:"auto"}),(0,H.jsx)("div",{className:"page-content",children:(0,H.jsx)(i.Suspense,{fallback:(0,H.jsx)(s.Z,{children:(0,H.jsx)(_.Z,{})}),children:(0,i.isValidElement)(E)?E:(0,H.jsx)(E,{blocklet:x})})})]}):(0,H.jsx)(s.Z,{children:(0,H.jsx)(_.Z,{})});return(0,H.jsx)(le.cK,{children:(0,H.jsx)(he,{children:(0,H.jsx)(Oe,{children:(0,H.jsx)(ie.wV,{children:(0,H.jsxs)(nn,{children:[j&&(0,H.jsxs)(l.Z,{component:"div",className:"page-header",children:[(0,H.jsxs)(l.Z,{component:"h2",variant:"h4",className:"page-title",color:"textPrimary",children:[x?(0,H.jsx)(Q.Z,{blocklet:x,style:{marginRight:16}}):null,x?(0,H.jsxs)(l.Z,{display:"flex",alignItems:"center",children:[(0,H.jsx)(l.Z,{children:(0,f.getDisplayName)(x)}),"unknown"!==(null===x||void 0===x?void 0:x.status)&&(0,H.jsx)(g.Z,{size:"12px",style:{marginLeft:8},status:x.status,source:x.source})]}):"".concat(Z("common.blocklet")," ").concat(Z("common.detail"))]}),x?(0,H.jsx)(Y,{className:"page-actions",hasPermission:!0,blocklet:x,onStart:function(){},onComplete:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).error;e&&K.Z.error(e.message)},variant:"group"}):null]}),(0,H.jsx)(ae,{}),D]})})})})})}function en(){var e,n=(0,se.y0)().blocklet,t=null===n||void 0===n||null===(e=n.meta)||void 0===e?void 0:e.did;return(0,i.useEffect)((function(){var e=(0,ce.ZP)();return t&&e.connect(),function(){t&&e.isConnected()&&e.disconnect()}}),[t]),(0,H.jsx)(Qe,{})}var nn=a.default.main(Ge||(Ge=(0,o.Z)(["\n .page-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .page-title {\n display: flex;\n align-items: center;\n\n .page-link {\n font-size: 15px;\n margin-top: 8px;\n margin-left: 8px;\n }\n }\n\n .page-content {\n margin-top: 36px;\n }\n\n @media (max-width: ","px) {\n .page-header {\n flex-direction: column;\n align-items: flex-start;\n .page-actions,\n .MuiButtonGroup-root {\n width: 100%;\n }\n .MuiButtonGroup-root {\n .MuiButtonBase-root {\n flex: 1;\n }\n .blocklet-action-text {\n display: none;\n }\n }\n }\n\n .page-title {\n margin-bottom: 15px;\n }\n }\n"])),(function(e){return e.theme.breakpoints.values.md}))},84802:function(e,n,t){t.d(n,{Z:function(){return f}});var r=t(33028),o=t(59740),a=t(24974),i=t.n(a),c=t(59467),s=t(62399),l=t(59505),u=t(15300),d=t(37574),p=["blocklet","style","size"];function f(e){var n,t=e.blocklet,a=e.style,i=e.size,f=(0,o.Z)(e,p),m=(0,u.Z)({blocklet:t}).logoUrl,v=f.variant,h=(0,d.jsx)("img",{src:m,alt:"",style:{width:i}});t.meta.logo||((null===(n=(t.configs||[]).find((function(e){return e.key===l.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE})))||void 0===n?void 0:n.value)||(h=(0,d.jsx)(s.Z,{did:t.meta.did||"",responsive:!0})));return(0,d.jsx)(c.Z,(0,r.Z)((0,r.Z)({variant:v||"square",style:Object.assign({backgroundColor:"transparent",width:i,height:i,borderRadius:10},a)},f),{},{children:h}))}f.propTypes={blocklet:i().object.isRequired,style:i().object,size:i().oneOfType([i().number,i().string])},f.defaultProps={style:{},size:40}},55008:function(e,n,t){var r=t(10814),o=t(8825),a=t(60003),i=t(13875),c=t(57256),s=t(14079),l=t(51389),u=t(98127);n.Z={Start:o.Z,Stop:a.Z,Restart:i.default,Reload:c.Z,Remove:r.default,Config:s.Z,Log:l.Z,Group:u.Z}},94282:function(e,n,t){t.d(n,{Z:function(){return g}});var r=t(33028),o=t(59740),a=t(30969),i=t(24974),c=t.n(i),s=t(94308),l=t(6779),u=t(26022),d=t(7017),p=t(19708),f=t(61472),m=t(37574),v=["status","variant","source"],h={yellow:"#FFCF71",grey:"#888888"};function g(e){var n=e.status,t=e.variant,i=(e.source,(0,o.Z)(e,v)),c=(0,a.useContext)(u.RD).t,g={added:h.grey,waiting:h.yellow,downloading:h.yellow,downloaded:h.grey,installing:h.yellow,installed:h.grey,starting:h.yellow,running:"success",stopping:h.yellow,stopped:h.grey,error:"error",upgrading:h.yellow,restarting:h.yellow,corrupted:"error",deleting:h.yellow},x=(0,d.isInProgress)(n),b=c("blocklet.status.".concat(n));return"dot"===t?(0,m.jsx)(l.Z,{title:c("blocklet.statusTip",{status:b}),children:(0,m.jsx)(p.Z,(0,r.Z)({color:g[n]},i))}):(0,m.jsxs)(f.Z,(0,r.Z)((0,r.Z)({type:{added:"primary",waiting:"warning",downloading:"warning",downloaded:"primary",installing:"warning",installed:"primary",starting:"warning",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"warning",restarting:"warning",corrupted:"error",deleting:"warning"}[n]},i),{},{children:[x&&(0,m.jsx)(s.Z,{size:12,color:"inherit",style:{marginRight:5}}),b]}))}g.propTypes={status:c().string.isRequired,variant:c().oneOf(["dot","tag"]),source:c().string},g.defaultProps={variant:"tag",source:""}},8479:function(e,n,t){t.d(n,{Z:function(){return R}});var r=t(71171),o=t(33028),a=t(32723),i=t(34795),c=t(96234),s=t(59740),l=t(30969),u=t(24974),d=t.n(u),p=t(16380),f=t(84636),m=t(94308),v=t(96074),h=t(59071),g=t(43207),x=t(38357),b=t(18877),Z=t(94702),y=t(75255),k=t(26022),w=t(29996),C=t(24891),P=t(45555);var E,j=function(){var e=(0,P.Z)();return{minWidth:(0,y.Z)(e.breakpoints.down("md"))?300:e.breakpoints.values.sm}},D=t(37574),S=["title","description","showCancel","cancel","confirm","color","params","onCancel","onConfirm","loading"];function R(e){var n=e.title,t=e.description,r=e.showCancel,u=e.cancel,d=e.confirm,p=e.color,f=e.params,P=e.onCancel,E=e.onConfirm,R=e.loading,B=(0,s.Z)(e,S),N=(0,l.useState)(f),L=(0,c.Z)(N,2),T=L[0],I=L[1],U=(0,l.useState)(!0),A=(0,c.Z)(U,2),O=A[0],G=A[1],z=(0,l.useState)(!1),F=(0,c.Z)(z,2),K=F[0],M=F[1],q=(0,l.useState)(""),V=(0,c.Z)(q,2),W=V[0],X=V[1],H=(0,k.PE)().t,J=(0,Z.Z)(),Y=function(){var e=(0,i.Z)((0,a.Z)().mark((function e(n){return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!==typeof n){e.next=17;break}return M(!0),e.prev=2,e.next=5,n(T);case 5:G(!1),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(2),X((0,C.Z)(e.t0)),console.error(e.t0);case 12:return e.prev=12,M(!1),e.finish(12);case 15:e.next=18;break;case 17:G(!1);case 18:case"end":return e.stop()}}),e,null,[[2,8,12,15]])})));return function(n){return e.apply(this,arguments)}}(),$="function"===typeof n?n():n,Q="function"===typeof t?t(T,I,X):t,ee=(0,y.Z)(J.breakpoints.down("md")),ne=j().minWidth;return(0,D.jsxs)(_,(0,o.Z)((0,o.Z)({onClick:function(e){e.stopPropagation()},fullScreen:ee,open:O,style:{minWidth:ne}},B),{},{children:[(0,D.jsx)(x.Z,{children:$}),(0,D.jsxs)(h.Z,{style:{minWidth:ne},children:[(0,D.jsx)(g.Z,{component:"div",children:Q}),!!W&&(0,D.jsx)(b.Z,{severity:"error",style:{width:"100%",marginTop:8},children:W})]}),(0,D.jsxs)(v.Z,{className:"delete-actions",style:{padding:"8px 24px 24px"},children:[r&&(0,D.jsx)(w.Z,{onClick:function(e){e.stopPropagation(),Y(P)},color:"inherit","data-cy":"cancel-confirm-dialog",children:u||H("common.cancel")}),(0,D.jsxs)(w.Z,{onClick:function(e){e.stopPropagation(),Y(E)},color:p,disabled:T.__disableConfirm||K||R,variant:"contained","data-cy":"submit-confirm-dialog",autoFocus:!0,children:[(K||R)&&(0,D.jsx)(m.Z,{size:16}),d]})]})]}))}R.propTypes={title:d().any.isRequired,description:d().any.isRequired,showCancel:d().bool,cancel:d().string,color:d().string,confirm:d().string,params:d().object,onCancel:d().func,onConfirm:d().func.isRequired,loading:d().bool},R.defaultProps={onCancel:function(){},showCancel:!0,cancel:"",confirm:"Confirm",color:"error",params:{},loading:!1};var _=(0,p.default)(f.Z)(E||(E=(0,r.Z)(["\n .delete-actions .Mui-disabled {\n color: rgba(0, 0, 0, 0.26) !important;\n box-shadow: none;\n background-color: rgba(0, 0, 0, 0.12) !important;\n }\n"])))},66138:function(e,n,t){t.d(n,{wV:function(){return j},XN:function(){return D}});var r=t(32723),o=t(33028),a=t(34795),i=t(96234),c=t(30969),s=t(24974),l=t.n(s),u=t(94984),d=t(26022),p=t(59505),f=t(45008),m=t(30134),v=t(57982),h=t(41395),g=t(50576);function x(e){return b.apply(this,arguments)}function b(){return b=(0,a.Z)((0,r.Z)().mark((function e(n){var t,i,c,s,l;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.blockletDid,i=n.nodeApi,c=n.spaceGateways,s=!1,e.next=4,Promise.all(c.map(function(){var e=(0,a.Z)((0,r.Z)().mark((function e(n){var t,a;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.name,e.next=3,(0,m.nU)(n.endpoint);case 3:return a=e.sent,(0,g.isEmpty)(a)||a===t||(t=a,s=!0),e.abrupt("return",(0,o.Z)((0,o.Z)({},n),{},{name:t}));case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()));case 4:if(l=e.sent,!s){e.next=8;break}return e.next=8,Promise.all(l.filter((function(e){return e.did})).map((function(e){return i.updateBlockletSpaceGateway({input:{did:t,where:{did:e.did},spaceGateway:(0,o.Z)({},e)}})})));case 8:return e.abrupt("return",l);case 9:case"end":return e.stop()}}),e)}))),b.apply(this,arguments)}var Z=t(85710);var y=t(24891);function k(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{deps:[],setLoading:function(){}},t=n.deps,o=n.setLoading,s=(0,f.y0)().blocklet,l=(0,c.useState)([]),d=(0,i.Z)(l,2),p=d[0],m=d[1],x=(0,h.h6)().api,b=(0,g.debounce)((0,a.Z)((0,r.Z)().mark((function e(){var n,t;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,o(!0),s){e.next=5;break}return m([]),e.abrupt("return");case 5:return e.next=7,x.getBlockletBackups({input:{did:s.meta.did}});case 7:n=e.sent,t=n.backups,m(null!==t&&void 0!==t?t:[]),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),console.error(e.t0),u.Z.error((0,y.Z)(e.t0));case 16:return e.prev=16,o(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[0,12,16,19]])}))),2e3);return(0,v.Z)((0,a.Z)((0,r.Z)().mark((function e(){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:b();case 1:case"end":return e.stop()}}),e)}))),[null===s||void 0===s||null===(e=s.meta)||void 0===e?void 0:e.did].concat(t)),{backups:p}}var w=function(e){var n=e.appDid,t=k().backups,r=(0,c.useState)({message:"",progress:0,completed:!1}),a=(0,i.Z)(r,2),s=a[0],l=a[1];return(0,(0,h.h6)().ws.useSubscription)(p.BlockletEvents.backupProgress,(function(e){n===(null===e||void 0===e?void 0:e.appDid)&&l((function(){return(0,o.Z)({},e)}))}),[n]),(0,c.useEffect)((function(){var e;if(null!==t&&void 0!==t&&t.length&&(0,g.isNull)(null===(e=t[0])||void 0===e?void 0:e.status)){var n=(0,i.Z)(t,1)[0];l((function(){return{message:n.message,progress:n.progress,completed:Boolean(n.progress>=100)}}))}}),[t]),s},C=t(37574),P=(0,c.createContext)({}),E=P.Provider;P.Consumer;function j(e){var n=e.children,t=(0,d.PE)().t,s=(0,h.h6)().api,l=(0,f.y0)().blocklet,g=(0,c.useState)(!1),b=(0,i.Z)(g,2),y=b[0],P=b[1],j=(0,c.useState)(!1),D=(0,i.Z)(j,2),S=D[0],R=D[1],_=function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.setLoading,o=n.refresh,s=(0,f.y0)(),l=s.blocklet,d=s.actions.refreshBlocklet,p=null===l||void 0===l||null===(e=l.meta)||void 0===e?void 0:e.did,m=(0,c.useState)([]),g=(0,i.Z)(m,2),b=g[0],y=g[1],k=(0,h.h6)().api;return(0,v.Z)((0,a.Z)((0,r.Z)().mark((function e(){var n,o,a;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,p){e.next=4;break}return y([]),e.abrupt("return");case 4:return null===t||void 0===t||t(!0),e.next=7,k.getBlockletSpaceGateways({input:{did:p}});case 7:return n=e.sent,o=n.spaceGateways,e.next=11,x({blockletDid:p,nodeApi:k,spaceGateways:o});case 11:a=e.sent,y(null!==a&&void 0!==a?a:[]),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(0),console.error(e.t0),u.Z.error((0,Z.Z)(e.t0));case 19:return e.prev=19,null===t||void 0===t||t(!1),e.finish(19);case 22:case"end":return e.stop()}}),e,null,[[0,15,19,22]])}))),[p,d,o]),{spaceGateways:b}}({refresh:S,setLoading:P}),B=_.spaceGateways,N=w({appDid:null===l||void 0===l?void 0:l.appDid}),L=(0,c.useState)(!1),T=(0,i.Z)(L,2),I=T[0],U=T[1],A=(0,c.useMemo)((function(){return(0,m.mo)(null===l||void 0===l?void 0:l.environments)}),[l,S,I]),O=(0,c.useState)(!1),G=(0,i.Z)(O,2),z=G[0],F=k({deps:[N],setLoading:G[1]}).backups,K=(0,c.useState)(null===B||void 0===B?void 0:B.find((function(e){return e.endpoint===A}))),M=(0,i.Z)(K,2),q=M[0],V=M[1],W=function(){var e=(0,a.Z)((0,r.Z)().mark((function e(n,t){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return B.push((0,o.Z)((0,o.Z)({},n),{},{loading:!0})),e.next=3,s.addBlockletSpaceGateway({input:{did:l.meta.did,spaceGateway:n}});case 3:if(A===t){e.next=6;break}return e.next=6,s.configBlocklet({input:{did:[l.meta.did],configs:[{key:p.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t}]}});case 6:J(),V(n);case 8:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),X=function(){var e=(0,a.Z)((0,r.Z)().mark((function e(n){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return");case 2:if(n.endpoint!==A){e.next=5;break}return u.Z.warning(t("storage.spaces.gateway.delete.failedForConnected")),e.abrupt("return");case 5:return e.next=7,s.deleteBlockletSpaceGateway({input:{did:l.meta.did,spaceGatewayDid:null===n||void 0===n?void 0:n.did}});case 7:J(),V(n);case 9:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),H=function(){var e=(0,a.Z)((0,r.Z)().mark((function e(n){var o;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.updateBlockletSpaceGateway({input:{did:l.meta.did,where:{did:n.did},spaceGateway:n}});case 2:if(A===n.endpoint){e.next=5;break}return e.next=5,s.configBlocklet({input:{did:[l.meta.did],configs:[{key:p.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:n.endpoint}]}});case 5:u.Z.success(t("storage.spaces.connectedWithName",{name:null!==(o=null===n||void 0===n?void 0:n.name)&&void 0!==o?o:"DID Spaces"})),J();case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),J=function(){R((function(e){return!e}))};return(0,C.jsx)(E,{value:{spaceGateways:B,selectedSpaceGateway:q,addSpaceGateway:W,deleteSpaceGateway:X,updateSpaceGateway:H,refreshSpaceGateways:J,spaceGatewaysLoading:y,spaceGatewayIsSelected:function(e){return(null===e||void 0===e?void 0:e.endpoint)===A},backupEndpoint:A,backupProgress:N,backups:F,backupsLoading:z,refreshBackupEndpoint:function(){U((function(e){return!e}))}},children:n})}function D(){return(0,c.useContext)(P)}j.propTypes={children:l().any.isRequired},j.defaultProps={}},43820:function(e,n,t){t.d(n,{K:function(){return f},g:function(){return p}});var r=t(68079),o=t(96234),a=t(30969),i=t(24974),c=t.n(i),s=t(16986),l=t.n(s),u=t(37574),d=(0,a.createContext)({});function p(e){var n=e.children,t=e.type,i=(0,a.useState)([]),c=(0,o.Z)(i,2),s=c[0],p=c[1],f=(0,a.useRef)([]),m=function(e){if(f.current.includes(e)){var n=f.current.filter((function(n){return n!==e}));p(n),f.current=n}};return(0,u.jsx)(d.Provider,{value:{type:t,deletingBlocklets:s,addDeletingDid:function(e){if(!f.current.includes(e)){var n=[].concat((0,r.Z)(f.current),[e]);p(n),f.current=n}},removeDeletingDid:m,matchDeletingDid:function(e){var n=s.filter((function(n){return e.find((function(e){return e===n}))}));l()(n,s).forEach((function(e){return m(e)}))}},children:n})}function f(){return(0,a.useContext)(d)}p.propTypes={type:c().string,children:c().node.isRequired},p.defaultProps={type:"blocklets"}},41395:function(e,n,t){t.d(n,{h6:function(){return i},sy:function(){return a}});var r=t(33028),o=t(30969),a=(0,o.createContext)({});a.Provider,a.Consumer;function i(){var e=(0,o.useContext)(a).node;return(0,r.Z)((0,r.Z)({},e),{},{inService:"service"===e.type,inDaemon:"daemon"===e.type})}},77370:function(e,n,t){t.d(n,{B:function(){return o.B3},T:function(){return a}});var r=t(30969),o=t(57721);function a(){return(0,r.useContext)(o.B3)}},80670:function(e,n,t){t.d(n,{DJ:function(){return a},Gy:function(){return o}});var r=t(30969),o=(0,r.createContext)({});o.Provider,o.Consumer;function a(){return(0,r.useContext)(o)}},19708:function(e,n,t){var r,o=t(71171),a=t(16380),i={success:"#3ab39d",error:"#D0021B"},c="10px",s=a.default.div(r||(r=(0,o.Z)(["\n display: inline-block;\n width: ",";\n height: ",";\n background: ",";\n border-radius: 100%;\n"])),(function(e){return e.size||c}),(function(e){return e.size||c}),(function(e){return i[e.color]||e.color||i.success}));n.Z=s},15300:function(e,n,t){t.d(n,{Z:function(){return c}});var r=t(19611),o=t.n(r),a=t(41395),i=t(24891);function c(e){var n,t,r=e.blocklet,c=(0,a.h6)().inService,s=(null===(n=window.env)||void 0===n?void 0:n.apiPrefix)||"/",l="?v=".concat(null===r||void 0===r||null===(t=r.meta)||void 0===t?void 0:t.version).concat((0,i.wS)(null===r||void 0===r?void 0:r.status)?"~":"");return{logoUrl:o()(s,"/blocklet/logo/".concat(c?"":r.meta.did),l)}}},61472:function(e,n,t){t.d(n,{Z:function(){return u}});var r=t(33028),o=t(59740),a=t(24974),i=t.n(a),c=t(9715),s=t(37574),l=["children","style"];function u(e){var n=e.children,t=e.style,a=(0,o.Z)(e,l);return(0,s.jsx)(c.Z,(0,r.Z)((0,r.Z)({style:t},a),{},{children:n}))}u.propTypes={children:i().any.isRequired,style:i().object},u.defaultProps={style:{}}},54559:function(e,n,t){t.d(n,{hi:function(){return a},od:function(){return o.a}});var r=t(95803),o=t.n(r);o().defaults.timeout=1e4;var a=o().create()},30134:function(e,n,t){t.d(n,{EJ:function(){return k},Jf:function(){return y},LQ:function(){return f},Nb:function(){return m},Xv:function(){return d},mo:function(){return h},nD:function(){return p},nU:function(){return b},w2:function(){return g}});var r=t(32723),o=t(34795),a=t(92522),i=t.n(a),c=t(59505),s=t(50576),l=t(54559),u=t(19611);function d(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/"),r=t.at(-4),o=t.at(-2);return u(n,"space",r,"apps",o,"explorer","?key=/apps/".concat(o,"/.did-objects/").concat(o,"/"))}function p(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/").at(-4);return u(n,"space",t)}function f(e){return e.replace(/\/$/,"").split("/").at(-4)}function m(e){return v.apply(this,arguments)}function v(){return(v=(0,o.Z)((0,r.Z)().mark((function e(n){var t,o;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i()(n)){e.next=3;break}return e.abrupt("return",!1);case 3:return e.next=5,l.hi.head(n,{timeout:5e3});case 5:return t=e.sent,o=t.headers,e.abrupt("return","true"===o["x-listable"]&&"true"===o["x-readable"]&&"true"===o["x-writeable"]);case 10:return e.prev=10,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",!1);case 14:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function h(e){var n;return(null===e||void 0===e||null===(n=e.find((function(e){return e.key===c.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT})))||void 0===n?void 0:n.value)||""}function g(e){return x.apply(this,arguments)}function x(){return(x=(0,o.Z)((0,r.Z)().mark((function e(n){var t,o,a,c;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i()(n)){e.next=3;break}return e.abrupt("return",!1);case 3:return t=u(n,"space/api/did/one-click-authorization/token"),e.next=6,l.hi.get(t,{timeout:5e3});case 6:return o=e.sent,a=o.status,c=o.data,e.abrupt("return",200===a&&(0,s.isObject)(c));case 12:return e.prev=12,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,null,[[0,12]])})))).apply(this,arguments)}function b(e){return Z.apply(this,arguments)}function Z(){return(Z=(0,o.Z)((0,r.Z)().mark((function e(n){var t,o,a;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i()(n)){e.next=3;break}return e.abrupt("return","");case 3:return e.next=5,l.hi.head(n,{timeout:3e3});case 5:return t=e.sent,o=t.headers,a=o["x-space-name"],e.abrupt("return",a?decodeURIComponent(a):"");case 11:return e.prev=11,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return","");case 15:case"end":return e.stop()}}),e,null,[[0,11]])})))).apply(this,arguments)}function y(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/").at(-4);return u(n,"/api/space/nft/display?spaceDid=".concat(t))}var k=function(e){var n,t;return(null===e||void 0===e||null===(n=e.configs)||void 0===n||null===(t=n.find((function(e){return e.key===c.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT})))||void 0===t?void 0:t.value)||null}},85710:function(e,n,t){var r=t(73408).default,o=t(27609).default,a=t(91461).default,i=t(43681).default;Object.defineProperty(n,"Z",{enumerable:!0,get:function(){return b.default}});var c,s=t(20244),l=P(t(99237)),u=P(t(63784)),d=P(t(92522)),p=P(t(46292)),f=P(t(99985)),m=P(t(18930)),v=P(t(61301)),h=P(t(19611)),g=P(t(31419)),x=P(t(19886)),b=P(t(39882)),Z=P(t(6399)),y=t(67615),k=P(t(67626)),w=t(59505),C=P(t(88617));function P(e){return e&&e.__esModule?e:{default:e}}function E(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(!e)return"";var r="http";"https:"===window.location.protocol&&((0,y.isIpEcho)(e)||(0,y.isSlpDomain)(e)||(0,y.isDidDomain)(e))&&(r="https");var o="",a=Number(window.location.port);a&&![80,443].includes(a)&&(o=":".concat(a));var i=new URL("".concat(r,"://").concat(e).concat(o));i.pathname=n;var c=i.href.replace(/\/$/,"");if(!t||!Object.keys(t))return c;var s=new URLSearchParams;return Object.keys(t).forEach((function(e){s.append(e,t[e])})),"".concat(c).concat("/"===i.pathname?"/":"","?").concat(s.toString())}var j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en";return"tw"===e?"zh":e};var D=function(e){return e.replace(/^\?/,"").split("&").map((function(e){return e.split("=")})).filter((function(e){return!!i(e,1)[0]})).reduce((function(e,n){var t=n[0],r=decodeURIComponent(n[1])||!0;return e[t]=r,e}),{})};var S=function(e,n){return n.startsWith("/assets")?n:"/assets/".concat(e,"/").concat(n)};var R=function(){var e=a(o().mark((function e(n){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,y.evaluateURLs)(n);case 3:return t=e.sent,e.abrupt("return",t[0].url);case 7:return e.prev=7,e.t0=e.catch(0),console.warn("get accessible url failed"),e.abrupt("return","");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(n){return e.apply(this,arguments)}}();function _(e){for(var n=decodeURIComponent(e);n!==decodeURIComponent(n);)n=decodeURIComponent(n);return n}function B(){return(B=a(o().mark((function e(n,t){var r,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,g.default.post((0,h.default)(n,"/api/gql/"),JSON.stringify({query:'{\n getAssetState(address: "'.concat(t,'") {\n state {\n address\n data {\n typeUrl\n value\n }\n issuer\n owner\n parent\n }\n }\n }')}),{headers:{"Content-Type":"application/json",Accept:"application/json"},timeout:6e4});case 2:return r=e.sent,(a=(0,p.default)(r.data,"data.getAssetState.state"))&&"json"===a.data.typeUrl&&(a.data.value=JSON.parse(a.data.value)),e.abrupt("return",a);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}null===(c=window.env)||void 0===c||c.groupPathPrefix,s.ROLES.ADMIN,s.ROLES.OWNER;var N=function(e){return!!e&&(e.endsWith(s.DEFAULT_DID_DOMAIN)||e.endsWith(s.DEFAULT_IP_DOMAIN_SUFFIX)||e.endsWith(s.DEFAULT_SLP_DOMAIN))};var L=function(){var e=a(o().mark((function e(n){var t,r,a,i,c,s,l,u,d,p,f,m;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.launcherUrl,r=void 0===t?"":t,a=n.nftId,i=void 0===a?"":a,c=n.locale,s=void 0===c?"en":c,r){e.next=3;break}return e.abrupt("return","");case 3:return l=(0,h.default)(r,"/instances"),e.prev=4,e.next=7,g.default.get((0,h.default)(r,"__blocklet__.js?type=json"),{timeout:5e3});case 7:d=e.sent,p=d.data,f=null===(u=p.componentMountPoints)||void 0===u?void 0:u.find((function(e){return"z8iZy4P83i6AgnNdNUexsh2kBcsDHoqcwPavn"===e.did})),m=new URL(r),l=(0,h.default)(m.origin,null===f||void 0===f?void 0:f.mountPoint,"/nfts"),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),console.error(e.t0);case 17:return e.abrupt("return",(0,h.default)(l,"/".concat(i,"/subscription?locale=").concat(s,"&return-url=").concat(encodeURIComponent(window.location.href))));case 18:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(n){return e.apply(this,arguments)}}()}}]);
2
+ //# sourceMappingURL=6186.a5c56653.chunk.js.map
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[6452],{92746:function(e,n,t){var a,r=t(71171),s=t(33028),o=t(59740),i=t(16380),c=t(50442),l=t(37574),p=["labelProps","className","style"];function d(e){var n=e.labelProps,t=e.className,a=e.style,r=(0,o.Z)(e,p),i=(0,s.Z)((0,s.Z)({},n),{},{labelPlacement:(null===n||void 0===n?void 0:n.labelPlacement)||"start"});return(0,l.jsx)(u,{className:t,style:a,children:(0,l.jsx)(c.Z,(0,s.Z)({labelProps:i},r))})}d.propTypes=c.Z.propTypes,d.defaultProps=c.Z.defaultProps;var u=i.default.div(a||(a=(0,r.Z)(["\n max-width: 300px;\n > label {\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n }\n "," {\n max-width: 100%;\n }\n"])),(function(e){return e.theme.breakpoints.down("sm")}));n.Z=d},76452:function(e,n,t){t.r(n),t.d(n,{default:function(){return Pe}});var a=t(30969),r=t(33028),s=t(38361),o=t(33359),i=t(47333),c=t(45008),l=t(32723),p=t(34795),d=t(96234),u=t(33665),h=t(94308),f=t(43207),x=t(87006),m=t(29996),g=t(22100),v=t(19611),Z=t.n(v),y=t(94984),j=t(15419),k=t(50496),A=t(23299),b=t(20244),C=t(54559),w=t(24891),S=t(41395),B=t(83998),I=t(30134),D=t(66138),U=t(37574);function R(e){var n=Object.assign({},((0,u.Z)(e),e)),t=(0,c.y0)().blocklet,v=(0,S.h6)().info,R=(0,i.PE)(),E=R.t,T=R.locale,F=(0,a.useState)(""),z=(0,d.Z)(F,2),O=z[0],L=z[1],N=(0,a.useState)(!1),M=(0,d.Z)(N,2),P=M[0],J=M[1],G=(0,a.useState)(!1),Q=(0,d.Z)(G,2),H=Q[0],V=Q[1],X=(0,a.useState)(""),K=(0,d.Z)(X,2),W=K[0],Y=K[1],q=(0,B.Z)({blocklet:t}),_=(0,w.yP)(v),$=(0,D.XN)(),ee=$.spaceGateways,ne=$.addSpaceGateway,te=(0,a.useState)({open:!1,action:"one-click-authorization",checkTimeout:3e5,prefix:Z()(b.PROD_DID_SPACES.CORE_URL,"space/api/did"),baseUrl:new URL(b.PROD_DID_SPACES.CORE_URL).origin,checkFn:C.od.create({baseURL:Z()(b.PROD_DID_SPACES.CORE_URL,"space")}).get,messages:{title:E("storage.spaces.provideNFT.title",{appName:q.appName},T),scan:E("storage.spaces.provideNFT.scan",{appName:q.appName},T),confirm:"",success:(0,U.jsx)(o.Z,{gutterBottom:!0,children:E("storage.spaces.provideNFT.success")})},onClose:function(){se((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!1})}))}}),ae=(0,d.Z)(te,2),re=ae[0],se=ae[1],oe=(0,a.useState)({open:!1,action:"one-click-authorization",checkTimeout:3e5,messages:{title:E("storage.spaces.authorize.title",{appName:q.appName},T),scan:E("storage.spaces.authorize.scan",{appName:q.appName},T),confirm:"",success:(0,U.jsx)(o.Z,{gutterBottom:!0,children:E("storage.spaces.authorize.success")})},onClose:function(){le((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!1})}))}}),ie=(0,d.Z)(oe,2),ce=ie[0],le=ie[1],pe=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(n,t){var a,s;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,a=t(n.endpoint),s=n.space?t(n.space):{},e.next=5,de((0,r.Z)((0,r.Z)({endpoint:a},{did:(0,I.LQ)(a),name:"DID Space"}),s));case 5:le((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!1})})),se((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!1})})),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.error(e.t0),y.Z.error((0,w.Z)(e.t0));case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(n,t){return e.apply(this,arguments)}}(),de=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(n){var t,a,r,s,o,i,c,p;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=n.endpoint,o=n.name,i=n.did,(c=null===s||void 0===s||null===(t=s.replace(/\/api\/.+/,""))||void 0===t||null===(a=t.trim())||void 0===a?void 0:a.replace(/\/$/,"")).startsWith("http")||(c="https://".concat(c)),e.next=5,(0,I.w2)(c);case 5:if(e.sent){e.next=8;break}return y.Z.error(E("storage.spaces.gateway.add.invalidUrl")),e.abrupt("return");case 8:if(!ee.some((function(e){return e.endpoint===s}))){e.next=12;break}return y.Z.error(E("storage.spaces.gateway.add.duplicate",{name:o})),e.abrupt("return");case 12:return p={name:o,did:i,url:c,endpoint:s},e.next=15,ne(p,s);case 15:y.Z.success(E("storage.spaces.connectedWithName",{name:null!==(r=null===p||void 0===p?void 0:p.name)&&void 0!==r?r:"DID Spaces"}));case 16:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),ue=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(){var n,t;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,J(!0),n=O.startsWith("http")?O:"https://".concat(O),e.next=5,(0,I.w2)(n);case 5:if(e.sent){e.next=7;break}throw new Error(E("storage.spaces.gateway.add.invalidUrl"));case 7:le((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!0,prefix:Z()(n,"space/api/did"),baseUrl:new URL(n).origin,checkFn:C.od.create({baseURL:Z()(n,"space")}).get,extraParams:{appDid:q.appDid,appName:q.appName,appDescription:q.appDescription,scopes:q.scopes,appUrl:q.appUrl,referrer:q.referrer,nodeDid:v.did}})})),V(!1),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(0),t="".concat(E("storage.spaces.gateway.add.failed",T),": ").concat((0,w.Z)(e.t0)),Y(t);case 15:return e.prev=15,J(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[0,11,15,18]])})));return function(){return e.apply(this,arguments)}}();return(0,U.jsxs)(s.Z,{children:[(0,U.jsx)(j.Z,{color:"primary",style:{textTransform:"none !important",fontSize:"1rem"},size:"small",onClick:function(){se((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!0,extraParams:{appDid:q.appDid,appName:q.appName,appDescription:q.appDescription,scopes:q.scopes,appUrl:q.appUrl,referrer:q.referrer,nodeDid:v.did}})}))},menu:[(0,U.jsx)(j.Z.Item,(0,r.Z)((0,r.Z)({sx:{textTransform:"none"},onClick:function(){return V(!0)},size:"small"},n),{},{children:E("storage.spaces.connect.useSpaceGateway")}),"1")],children:(0,U.jsx)(o.Z,{sx:{fontWeight:"bold",textTransform:"none"},children:E("storage.spaces.connect.useWallet")})}),(0,U.jsx)(g.default,{forceConnected:!1,saveConnect:!1,prefix:re.prefix,open:re.open,popup:!0,action:re.action,webWalletUrl:_,baseUrl:re.baseUrl,checkFn:re.checkFn,onSuccess:pe,onClose:re.onClose,checkTimeout:re.checkTimeout,extraParams:re.extraParams,messages:re.messages,locale:T}),(0,U.jsx)(g.default,{forceConnected:!1,saveConnect:!1,prefix:ce.prefix,open:ce.open,popup:!0,action:ce.action,baseUrl:ce.baseUrl,checkFn:ce.checkFn,onSuccess:pe,onClose:ce.onClose,checkTimeout:ce.checkTimeout,extraParams:ce.extraParams,messages:ce.messages,locale:T}),(0,U.jsxs)(k.Z,{title:E("storage.spaces.gateway.add.title"),fullWidth:!0,maxWidth:"md",open:H,onClose:function(){return V(!1)},PaperProps:{style:{minHeight:"auto"}},actions:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(m.Z,{onClick:function(e){e.stopPropagation(),V(!1)},color:"inherit",children:E("common.cancel")}),(0,U.jsxs)(m.Z,{onClick:ue,color:"primary",disabled:P||!O,variant:"contained",autoFocus:!0,children:[P&&(0,U.jsx)(h.Z,{size:16}),E("common.confirm")]})]}),children:[(0,U.jsx)("div",{style:{paddingTop:12,overflowY:"hidden"},children:(0,U.jsx)(f.Z,{component:"div",children:(0,U.jsx)(o.Z,{component:"div",children:(0,U.jsx)(x.Z,{label:E("storage.spaces.gateway.add.label"),autoComplete:"off",variant:"outlined",name:"url",fullWidth:!0,value:O,onChange:function(e){Y(null),L(e.target.value)},disabled:P,onKeyPress:function(){var e=(0,p.Z)((0,l.Z)().mark((function e(n){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("Enter"!==n.key){e.next=3;break}return e.next=3,ue();case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),autoFocus:!0})})})}),Boolean(W)&&(0,U.jsx)(A.Z,{type:"error",style:{width:"100%"},children:W})]})]})}R.propTypes={},R.defaultProps={};var E,T=R,F=t(71171),z=t(59740),O=t(16380),L=t(24974),N=t.n(L),M=t(99237),P=t.n(M),J=t(19638),G=t(70177),Q=["blocklet"];function H(e){var n=e.blocklet,t=(0,z.Z)(e,Q),s=(0,a.useContext)(i.RD).t;if(!n.diskInfo)return(0,U.jsx)(o.Z,{children:s("blocklet.diskInfo.empty")});var c=function(e,n,t){return(0,U.jsxs)(o.Z,{children:[t?(0,U.jsx)(J.Z,{style:{cursor:"pointer"},onClick:t,underline:"hover",children:e}):e," ",(0,U.jsx)("strong",{children:n?P()(n):"empty"})]})},l=n.environments.reduce((function(e,n){return e[n.key]=n.value,e}),{}),p=[{key:"appDir",name:s("blocklet.diskInfo.appDir"),value:c(l.BLOCKLET_APP_DIR,n.diskInfo.app)},{key:"dataDir",name:s("blocklet.diskInfo.dataDir"),value:c(l.BLOCKLET_DATA_DIR,n.diskInfo.data)},{key:"logDir",name:s("blocklet.diskInfo.logDir"),value:c(l.BLOCKLET_LOG_DIR,n.diskInfo.log)},{key:"cacheDir",name:s("blocklet.diskInfo.cacheDir"),value:c(l.BLOCKLET_CACHE_DIR,n.diskInfo.cache)}];return(0,U.jsx)(V,(0,r.Z)((0,r.Z)({component:"div"},t),{},{children:p.map((function(e){return(0,U.jsx)(G.Z,{valueComponent:"div",nameWidth:120,name:e.name,children:e.value},e.key)}))}))}H.propTypes={blocklet:N().object.isRequired},H.defaultProps={};var V=(0,O.default)(o.Z)(E||(E=(0,F.Z)([""]))),X=function(e){return(0,U.jsxs)("svg",(0,r.Z)((0,r.Z)({},e),{},{children:[(0,U.jsxs)("g",{filter:"url(#a)",children:[(0,U.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"}),(0,U.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.192 6.222l-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"}),(0,U.jsx)("mask",{id:"b",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"4",y:"2",width:"220",height:"250",children:(0,U.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"})}),(0,U.jsxs)("g",{mask:"url(#b)",children:[(0,U.jsx)("path",{opacity:".5",fill:"url(#c)",d:"M4 2h220v128H4z"}),(0,U.jsx)("path",{opacity:".1",fill:"url(#d)",d:"M4 130h220v122H4z"}),(0,U.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"}),(0,U.jsx)("path",{d:"M117.604 47.263L121.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)"}),(0,U.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)"}),(0,U.jsxs)("g",{clipPath:"url(#g)",fillRule:"evenodd",clipRule:"evenodd",fill:"#fff",children:[(0,U.jsx)("path",{d:"M50.928 216.089l1.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"}),(0,U.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"})]}),(0,U.jsx)("circle",{cx:"191.32",cy:"218",r:"10",fill:"url(#h)"}),(0,U.jsx)("path",{d:"M192.064 213.333l.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"}),(0,U.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"})]})]}),(0,U.jsxs)("defs",{children:[(0,U.jsxs)("filter",{id:"a",x:"0",y:"0",width:"228",height:"258",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,U.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,U.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"}),(0,U.jsx)("feOffset",{dy:"2"}),(0,U.jsx)("feGaussianBlur",{stdDeviation:"2"}),(0,U.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,U.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"}),(0,U.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),(0,U.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})]}),(0,U.jsx)("pattern",{id:"c",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:(0,U.jsx)("use",{xlinkHref:"#i",transform:"scale(.00455 .00781)"})}),(0,U.jsxs)("linearGradient",{id:"d",x1:"114",y1:"130",x2:"114",y2:"252",gradientUnits:"userSpaceOnUse",children:[(0,U.jsx)("stop",{stopColor:"#101010"}),(0,U.jsx)("stop",{offset:"1",stopColor:"#272727"})]}),(0,U.jsxs)("linearGradient",{id:"e",x1:"120.989",y1:"45",x2:"120.989",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[(0,U.jsx)("stop",{stopColor:"#fff",stopOpacity:".4"}),(0,U.jsx)("stop",{offset:"1",stopColor:"#fff"})]}),(0,U.jsxs)("linearGradient",{id:"f",x1:"107.801",y1:"45",x2:"107.801",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[(0,U.jsx)("stop",{stopColor:"#fff"}),(0,U.jsx)("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})]}),(0,U.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:[(0,U.jsx)("stop",{stopColor:"#016BED"}),(0,U.jsx)("stop",{offset:".699",stopColor:"#4498FB"}),(0,U.jsx)("stop",{offset:"1",stopColor:"#9DFFE8"})]}),(0,U.jsx)("clipPath",{id:"g",children:(0,U.jsx)("path",{fill:"#fff",transform:"translate(28 214)",d:"M0 0h40.32v8H0z"})}),(0,U.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+X59pv6udCJ7MAV9HARPtTEuFSdAzNVn7uPmkk3TpBGHb8DJZ3p36ScsuJVFQP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WZNGFywCCCF+7J1+B4vr0gBhFB6S+89eO6chpzkyM8s0MdCgW7njgiikAKvGH0fRKr9cXmycUjU8xfeY87PIXB3q1TK2GWGjxhtr146ZKTKWPp9sR8MWBNzQTNNrIt4XCVHh+OwfYAo9QybSeFUX5a9bl1On+cL5YHUjp/eID+XwV2AwZUXHswFw0IhIUlwmaTdQtlKJUpbAArh1IONYy6WQkAc9+ZocJMnELtCFNKLySGLwUIuW1fJLBKOoydII6+sDlhy8xYI1vchhF6qZnM0/oZSUzcd5By2cDzUtH3ng8PHIzAKL25wuSv+gDBsggYWWkvLT27f2dhwRULpny5D5yKI7vD/4iAW9KWHB7JsEZeCE1E/mdgVHZTOci8X+YIanJt7+aBd2k8f2RL45Z2puefelcXjUWbKdMSYwr58dAPaHymSU0o9/zjFt7/VoGmNAwCyvrKe2L1hYJqtd5gh6FGiCAGzqFk6on9pQdSAQzkctDTtXGbDih5iRPVIk9TwCJGwP3tpATkHsNwloUilnNMFce7twgDgrgWhsE8jWW+EBLlTDMn9pmtJOefTJc6Cxld039TN4XiwL4pMtU+8tXJ4g/LghG5APdF7/e3FSi4v8vnEBiIEm+5LlZtsk2LbbbY5hN9JkkJkd5BjQFPoUcwjJdTm0mx0024NmOvVgxASvU9TonFxUqG8cUTy3m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]}))};function K(){var e=(0,i.PE)().t,n=(0,c.y0)().blocklet;return(0,U.jsxs)(s.Z,{children:[(0,U.jsxs)(s.Z,{minHeight:"40vh",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[(0,U.jsx)(X,{style:{width:200,height:250}}),(0,U.jsx)(o.Z,{marginTop:"24px",marginBottom:"24px",children:e("storage.spaces.connect.provider")}),(0,U.jsx)(T,{})]}),(0,U.jsx)(o.Z,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:e("common.dataStorage")}),(0,U.jsx)(H,{blocklet:n})]})}X.defaultProps={width:"228",height:"258",viewBox:"0 0 228 258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},K.propTypes={};var W=K,Y=t(75255),q=t(7173),_=t(38627),$=t(59505),ee=t(54164),ne=t(50576),te=t(38996),ae=t(36558),re=t(92746),se=t(94551),oe=t(48082),ie=t(2689),ce=t(93310),le=t(86008),pe=t(37973),de=t(20352),ue=t(61292),he=t(60030),fe=t(30291),xe=t(67531);function me(e){var n=e.spaceGateway,t=e.onDelete,r=(0,i.PE)().t,s=(0,a.useState)(!1),o=(0,d.Z)(s,2),c=o[0],u=o[1],h=(0,a.useState)(!1),f=(0,d.Z)(h,2),x=f[0],m=f[1],g=function(e,n){null===e||void 0===e||e.preventDefault(),null===e||void 0===e||e.stopPropagation(),u(n)},v=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(a){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,null===a||void 0===a||a.stopPropagation(),m(!0),e.next=5,t(n);case 5:u(!1),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.error(e.t0),y.Z.error("".concat(r("storage.space.gateway.delete.failed"),": ").concat((0,w.Z)(e.t0)));case 12:return e.prev=12,m(!1),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[0,8,12,15]])})));return function(n){return e.apply(this,arguments)}}();return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(ie.Z,{color:"red",onClick:function(e){return g(e,!0)},children:[(0,U.jsx)(ce.Z,{style:{minWidth:24,color:"red"},children:(0,U.jsx)(fe.default,{fontSize:"small"})}),(0,U.jsx)(le.Z,{style:{color:"red"},children:r("common.delete")})]}),(0,U.jsx)(xe.Z,{title:r("common.delConfirmDescription",{data:"".concat(null===n||void 0===n?void 0:n.name)}),open:c,confirmButton:{text:r("common.confirm"),props:{variant:"contained",color:"error",loading:x}},cancelButton:{text:r("common.cancel"),props:{variant:"contained",color:"primary"},loading:x},onConfirm:v,onCancel:function(e){return g(e,!1)}})]})}me.propTypes={onDelete:N().func,spaceGateway:N().shape({name:N().string.isRequired,url:N().string.isRequired,protected:N().bool}).isRequired},me.defaultProps={onDelete:function(){}};var ge=me,ve=["spaceGateway","connected","onDelete","onConnect","enableSwitchToSpace"];function Ze(e){var n=e.spaceGateway,t=e.connected,s=e.onDelete,o=e.onConnect,c=e.enableSwitchToSpace,u=(0,z.Z)(e,ve),f=(0,a.useState)(null),x=(0,d.Z)(f,2),m=x[0],g=x[1],v=(0,i.PE)().t,Z=(0,a.useState)(!1),j=(0,d.Z)(Z,2),k=j[0],A=j[1],b=function(e,n){e.stopPropagation(),e.preventDefault(),g(n&&e.currentTarget)},C=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(t){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,A(!0),b(t,!1),e.next=5,o(n);case 5:e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.error(e.t0),y.Z.error(e.t0.message);case 11:return e.prev=11,A(!1),e.finish(11);case 14:case"end":return e.stop()}}),e,null,[[0,7,11,14]])})));return function(n){return e.apply(this,arguments)}}();return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(se.Z,(0,r.Z)((0,r.Z)({"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",onClick:function(e){return b(e,!0)},size:"small"},u),{},{children:k||null!==n&&void 0!==n&&n.loading?(0,U.jsx)(h.Z,{size:"24px"}):(0,U.jsx)(pe.Z,{})})),(0,U.jsxs)(oe.Z,{id:"simple-menu",anchorEl:m,keepMounted:!0,open:Boolean(m),onClose:function(e){return b(e,!1)},children:[(0,U.jsxs)(ie.Z,{onClick:function(e){b(e,!1),window.open(n.endpoint?(0,I.nD)(n.endpoint):n.url)},children:[(0,U.jsx)(ce.Z,{style:{minWidth:24},children:(0,U.jsx)(de.Z,{fontSize:"small"})}),(0,U.jsx)(le.Z,{children:v("common.open")})]}),(0,U.jsxs)(ie.Z,{onClick:function(e){b(e,!1),window.open((0,I.Xv)(n.endpoint))},children:[(0,U.jsx)(ce.Z,{style:{minWidth:24},children:(0,U.jsx)(he.Z,{fontSize:"small"})}),(0,U.jsx)(le.Z,{children:v("storage.spaces.strategy.viewBackupFiles")})]}),!t&&c&&(0,U.jsxs)(ie.Z,{onClick:C,children:[(0,U.jsx)(ce.Z,{style:{minWidth:24},children:(0,U.jsx)(ue.Z,{fontSize:"small"})}),(0,U.jsx)(le.Z,{children:v("storage.spaces.connect.switchToSpace")})]}),!t&&(0,U.jsx)(ge,{spaceGateway:n,onDelete:s})]})]})}Ze.propTypes={spaceGateway:N().shape({name:N().string.isRequired,url:N().string.isRequired,protected:N().bool,endpoint:N().string.isRequired,loading:N().bool}).isRequired,connected:N().bool.isRequired,enableSwitchToSpace:N().bool,onDelete:N().func,onConnect:N().func},Ze.defaultProps={onDelete:function(){},onConnect:function(){},enableSwitchToSpace:!0};var ye,je=Ze,ke=t(19066),Ae=t(50202),be=["spaceGateway","connected","onDelete","onBackupNow"],Ce=function(e){return(0,U.jsx)("svg",(0,r.Z)((0,r.Z)({},e),{},{children:(0,U.jsx)("circle",{cx:"4",cy:"4",r:"4",fill:"#25C99B"})}))};Ce.defaultProps={width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var we=function(e){return(0,U.jsx)("svg",(0,r.Z)((0,r.Z)({},e),{},{children:(0,U.jsx)("circle",{cx:"4",cy:"4",r:"4",fill:"#F16E6E"})}))};function Se(e){var n=e.spaceGateway,t=e.connected,u=e.onDelete,h=e.onBackupNow,f=(0,z.Z)(e,be),x=(0,Y.Z)((function(e){return e.breakpoints.down("md")})),v=(0,i.PE)(),j=v.t,k=v.locale,A=(0,c.y0)().blocklet,b=(0,S.h6)(),w=b.api,R=b.info.did,E=(0,B.Z)({blocklet:A}),T=E.appDid,F=E.appName,O=E.appDescription,L=E.scopes,N=E.appUrl,M=E.referrer,P=(0,D.XN)(),J=P.updateSpaceGateway,G=P.backupEndpoint,Q=P.backupProgress,H=P.refreshBackupEndpoint,V=(0,a.useState)(!1),X=(0,d.Z)(V,2),K=X[0],W=X[1],se=(0,a.useState)({open:!1,action:"one-click-authorization",checkTimeout:3e5,messages:{title:j("storage.spaces.authorize.title",{appName:F},k),scan:j("storage.spaces.authorize.scan",{appName:F},k),confirm:"",success:(0,U.jsx)(o.Z,{gutterBottom:!0,children:j("storage.spaces.authorize.success")})},onClose:function(){ce((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!1})}))}}),oe=(0,d.Z)(se,2),ie=oe[0],ce=oe[1],le=(0,ee.Z)((0,p.Z)((0,l.Z)().mark((function e(){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return",!0);case 2:return e.abrupt("return",(0,I.Nb)(G));case 3:case"end":return e.stop()}}),e)}))),{refreshDeps:[t,G,null===ie||void 0===ie?void 0:ie.open,K]}),pe=le.data,de=le.loading,ue=t&&pe,he=t&&!K&&pe&&!(null!==n&&void 0!==n&&n.loading),fe=t&&K&&pe,xe=t&&!pe&&!de&&!K,me=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.Nb)(null===n||void 0===n?void 0:n.endpoint);case 2:if(!e.sent){e.next=9;break}return e.next=6,w.configBlocklet({input:{did:[A.meta.did],configs:[{key:$.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:n.endpoint}]}});case 6:return H(),y.Z.success(j("storage.spaces.connect.switchToSpaceSucceeded",{name:n.name?"(".concat(n.name,")"):""})),e.abrupt("return");case 9:ce((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!0,prefix:Z()(n.url,"space/api/did"),baseUrl:new URL(n.url).origin,checkFn:C.od.create({baseURL:Z()(n.url,"space")}).get,extraParams:{appDid:T,appName:F,appDescription:O,scopes:L,appUrl:N,referrer:M,nodeDid:R}})}));case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ge=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(t,a){var s,o,i,c,p,d;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=a(t.endpoint),c=(0,I.LQ)(i),p=t.space?a(t.space):{},!n.did||c===n.did){e.next=7;break}return ce((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!1})})),y.Z.error(j("storage.spaces.gateway.switch.failedForMismatchSpace",{name:null!==p&&void 0!==p&&p.name?p.name:""})),e.abrupt("return");case 7:return d=(0,r.Z)((0,r.Z)({},n),{},{name:null!==(s=p.name)&&void 0!==s?s:"DID Space",did:null!==(o=p.did)&&void 0!==o?o:(0,I.LQ)(i),endpoint:i}),e.next=10,J(d);case 10:ce((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!1})}));case 11:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),ve=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!K){e.next=3;break}return e.abrupt("return");case 3:return W(!0),e.next=6,h();case 6:e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.error(e.t0),y.Z.error(e.t0.message);case 12:return e.prev=12,W(!0),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[0,8,12,15]])})));return function(){return e.apply(this,arguments)}}();return(0,a.useEffect)((function(){null!==Q&&void 0!==Q&&Q.completed?(100===(null===Q||void 0===Q?void 0:Q.progress)?y.Z.success(j("storage.spaces.backupSuccessfully")):-1===(null===Q||void 0===Q?void 0:Q.progress)&&y.Z.error(null===Q||void 0===Q?void 0:Q.message),W(!1),Q.progress=0,Q.message=""):Q.progress&&W(!0)}),[Q]),(0,U.jsxs)(Be,{style:{position:"relative"},children:[(0,U.jsxs)(s.Z,(0,r.Z)((0,r.Z)({sx:{backgroundColor:t?"#F0FDFF":"inherit","&:hover":{backgroundColor:t?"#F0FDFF":"#FBFBFB"},borderRadius:"8px"},display:"flex",padding:"12px 20px"},f),{},{children:[(0,U.jsx)(s.Z,{display:"flex",children:(0,U.jsx)(Ae.Z,{alt:n.did,src:(0,I.Jf)(n.endpoint)})}),(0,U.jsxs)(s.Z,{className:"spaces-info",display:"flex",flexGrow:(!x||!fe)&&1,minWidth:"180px",flexDirection:fe?"row":"column",sx:{marginLeft:"20px",padding:"0px 0px"},children:[(0,U.jsxs)(s.Z,{className:"spaces-info",display:"flex",maxWidth:"360px",alignItems:"center",children:[(0,U.jsx)(o.Z,{color:t?"primary":"inherit",fontSize:"1rem",fontWeight:"bold",children:n.name}),ue&&(0,U.jsx)(q.Z,{label:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Ce,{style:{marginRight:"4px"}}),j("storage.spaces.connected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:"20px",fontWeight:"bold"}}),xe&&(0,U.jsx)(q.Z,{label:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(we,{style:{marginRight:"4px"}}),j("storage.spaces.disconnected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:"20px",fontWeight:"bold"}})]}),(0,U.jsx)(s.Z,{className:"spaces-address",display:fe?"none":"flex",color:"#9397A1",marginTop:"8px",children:(0,U.jsx)(o.Z,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},color:"#9397A1",children:n.did&&(0,U.jsx)(ae.Z,{copyable:!1,size:14,compact:!0,responsive:!1,did:n.did})})})]}),(0,U.jsxs)(s.Z,{className:"spaces-backup",display:"flex",alignItems:"center",flex:x&&fe&&1,children:[he&&(0,U.jsxs)(s.Z,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:[(0,U.jsx)(m.Z,{variant:"contained",size:"small",onClick:ve,children:j("storage.spaces.strategy.backupNow")}),ke.C&&(0,U.jsx)(re.Z,{name:"enable-auto-backup",title:"coming soon",disabled:!0,labelProps:{label:(0,U.jsx)(o.Z,{sx:{marginRight:"8px",fontSize:"16px"},children:(0,U.jsx)("span",{children:j("storage.spaces.strategy.autoBackup")})})},style:{marginLeft:"64px"}})]}),fe&&(0,U.jsxs)(s.Z,{className:"backup-progress",display:"flex",flexDirection:"column",alignItems:"center",minWidth:!x&&"640px",marginLeft:x&&"16px",width:x&&"360px",marginRight:"auto",alignSelf:"flex-end",children:[(0,U.jsx)(o.Z,{color:"primary",children:null===Q||void 0===Q?void 0:Q.message}),(0,U.jsxs)(s.Z,{sx:{display:"flex",alignItems:"center"},width:"100%",children:[(0,U.jsx)(s.Z,{sx:{width:"100%",mr:1},children:(0,U.jsx)(_.Z,{color:"primary",variant:"determinate",value:null===Q||void 0===Q?void 0:Q.progress})}),(0,U.jsx)(s.Z,{sx:{maxWidth:"100%"},children:(0,U.jsxs)(o.Z,{variant:"body2",color:"text.secondary",children:[null===Q||void 0===Q?void 0:Q.progress,"%"]})})]})]}),xe&&(0,U.jsx)(s.Z,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:(0,U.jsx)(m.Z,{color:"error",variant:"contained",size:"small",onClick:me,children:j("storage.spaces.disconnected.reconnectNow")})}),(0,U.jsx)(je,{sx:{marginLeft:"16px",marginRight:"16px",alignItems:"flex-end",justifyItems:"flex-end"},spaceGateway:n,connected:t,onDelete:u,onConnect:me,enableSwitchToSpace:(null===Q||void 0===Q?void 0:Q.completed)||(0,ne.isEmpty)(null===Q||void 0===Q?void 0:Q.message)})]})]})),(0,U.jsx)(g.default,{forceConnected:!1,saveConnect:!1,prefix:ie.prefix,open:ie.open,popup:!0,action:ie.action,baseUrl:ie.baseUrl,checkFn:ie.checkFn,onSuccess:ge,onClose:ie.onClose,checkTimeout:ie.checkTimeout,extraParams:ie.extraParams,messages:ie.messages,locale:k},"get-endpoint"),(0,U.jsx)(s.Z,{className:"selected-container ".concat(t?"selected":""),children:(0,U.jsx)(te.default,{className:"selected-icon"})})]})}we.defaultProps={width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Se.propTypes={spaceGateway:N().shape({did:N().string.isRequired,name:N().string.isRequired,url:N().string.isRequired,endpoint:N().string.isRequired,protected:N().bool,loading:N().bool}).isRequired,connected:N().bool.isRequired,progress:N().any.isRequired,onDelete:N().func,onBackupNow:N().func},Se.defaultProps={onDelete:function(){},onBackupNow:function(){}};var Be=(0,O.default)(s.Z)(ye||(ye=(0,F.Z)(["\n .selected-container {\n position: absolute;\n right: 0px;\n bottom: 0px;\n display: flex;\n -webkit-box-pack: end;\n justify-content: flex-end;\n align-items: flex-end;\n width: 32px;\n height: 32px;\n border-radius: 0px 0px 8px;\n color: rgb(255, 255, 255);\n overflow: hidden;\n transition: all 0.4s ease 0s;\n\n &::after {\n position: absolute;\n z-index: 0;\n left: 60px;\n top: 60px;\n display: block;\n width: 0px;\n height: 0px;\n border-width: 16px;\n border-style: solid;\n border-color: transparent #1dc1c7 #1dc1c7 transparent;\n transition: all 0.1s ease 0s;\n content: '';\n }\n\n .selected-icon {\n visibility: hidden;\n width: 60%;\n height: 60%;\n position: relative;\n z-index: 2;\n margin: 0px 1px 1px 0px;\n font-size: 16px;\n transition: all 0.2s ease 0s;\n }\n }\n\n .selected-container.selected {\n &::after {\n left: 0px;\n top: 0px;\n }\n\n .selected-icon {\n visibility: visible;\n }\n }\n"]))),Ie=Se,De=t(9715),Ue=t(2291),Re=t(6779),Ee=t(20296),Te=t(19886),Fe=t.n(Te),ze=t(88666);function Oe(e){var n=Object.assign({},((0,u.Z)(e),e)),t=(0,i.PE)(),a=t.t,c=t.locale,l=(0,D.XN)(),p=l.spaceGateways,d=l.backups,f=[{label:"DID Spaces",name:"target",options:{customBodyRenderLite:function(e){var n,t=d[e],a=t.targetUrl,r=t.targetName,s=t.status,i=t.createdAt,c=s===b.BACKUPS.STATUS.PROGRESS&&Fe()().diff(i,"hours")>=b.BACKUPS.TIMEOUT_HOURS,l=s===b.BACKUPS.STATUS.SUCCEEDED&&!c,u=r||(null===(n=p.find((function(e){return null===a||void 0===a?void 0:a.includes((0,I.LQ)(null===e||void 0===e?void 0:e.endpoint))})))||void 0===n?void 0:n.name)||"Unknown DID Space";return l?(0,U.jsx)(J.Z,{fontSize:"16px",href:a,target:"_blank",children:u}):(0,U.jsx)(o.Z,{variant:"body1",fontSize:"16px",children:u})}}},{label:a("common.strategy"),name:"strategy",options:{customBodyRender:function(e){var n=a(0===e?"common.auto":"common.manual");return(0,U.jsx)(De.Z,{children:n})}}},{label:a("common.startTime"),name:"createdAt",options:{customBodyRender:function(e){return Fe()(e).format("YYYY-MM-DD HH:mm:ss")}}},{label:a("common.endTime"),name:"updatedAt",options:{customBodyRender:function(e){return(0,ne.isEmpty)(e)?"":Fe()(e).format("YYYY-MM-DD HH:mm:ss")}}},{label:a("common.status"),name:"status",options:{customBodyRenderLite:function(e){var n,t=null!==(n=null===d||void 0===d?void 0:d[e])&&void 0!==n?n:{},r=t.status,i=t.message,c=t.createdAt,l=r===b.BACKUPS.STATUS.PROGRESS&&Fe()().diff(c,"hours")>=b.BACKUPS.TIMEOUT_HOURS,p=l&&a("common.timeoutError"),u=r===b.BACKUPS.STATUS.PROGRESS&&!l,f=r===b.BACKUPS.STATUS.SUCCEEDED&&!l;return u?(0,U.jsxs)(o.Z,{display:"inline-flex",alignItems:"center",fontSize:"14px",children:[(0,U.jsx)(h.Z,{sx:{marginRight:"4px"},size:"12px"}),a("common.progress")]}):f?(0,U.jsx)(De.Z,{type:"success",children:a("common.succeeded")}):(0,U.jsxs)(s.Z,{display:"inline-flex",alignItems:"center",children:[(0,U.jsx)(De.Z,{type:"error",children:a("common.failed")})," \xa0",(0,U.jsx)(Re.Z,{style:{display:"flex",alignItems:"center",flexShrink:0},title:i||p,children:(0,U.jsx)(Ee.Z,{children:(0,U.jsx)(ze.Z,{style:{width:"24px",height:"24px"},color:"error"})})})]})}}}];return(0,U.jsx)(s.Z,(0,r.Z)((0,r.Z)({},n),{},{children:null!==d&&void 0!==d&&d.length?(0,U.jsx)(Ue.Z,{title:(0,U.jsx)(o.Z,{fontSize:"1.2rem",fontWeight:"bold",children:a("storage.spaces.backup.records")}),data:d,columns:f,emptyNode:a("storage.spaces.record.emptyData",c),options:{download:!1,filter:!1,print:!1}}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(s.Z,{display:"flex",height:"56px",lineHeight:"56px",alignItems:"center",children:(0,U.jsx)(o.Z,{fontSize:"1.2rem",fontWeight:"bold",children:a("storage.spaces.backup.records")})}),(0,U.jsx)(s.Z,{color:"#9397A1",marginTop:"16px",marginBottom:"24px",children:a("storage.spaces.record.emptyData")})]})}))}Oe.propTypes={};var Le=Oe;var Ne=function(){var e=(0,i.PE)().t,n=(0,c.y0)().blocklet,t=(0,S.h6)().api,a=(0,D.XN)(),r=a.spaceGateways,d=a.spaceGatewaysLoading,u=a.deleteSpaceGateway,f=a.spaceGatewayIsSelected,x=d&&!(null!==r&&void 0!==r&&r.length),m=function(){var n=(0,p.Z)((0,l.Z)().mark((function n(t){return(0,l.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,u(t);case 2:y.Z.success(e("storage.spaces.gateway.delete.succeeded",{name:"(".concat(t.name,")")}));case 3:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),g=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.backupBlocklet({input:{appDid:n.appDid,to:"spaces"}});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,U.jsxs)(s.Z,{display:"flex",flexDirection:"column",children:[(0,U.jsxs)(s.Z,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"12px",children:[(0,U.jsx)(o.Z,{fontSize:"1.2rem",fontWeight:"bold",children:e("storage.spaces.connected.title")}),(0,U.jsx)(T,{})]}),(0,U.jsx)(s.Z,{children:x?(0,U.jsx)(s.Z,{display:"flex",justifyContent:"center",children:(0,U.jsx)(h.Z,{})}):r.map((function(e){return(0,U.jsx)(Ie,{style:{marginTop:"12px"},spaceGateway:e,connected:f(e),onDelete:m,onBackupNow:g},e.endpoint)}))}),(0,U.jsx)(Le,{sx:{marginTop:"24px"}}),(0,U.jsx)(o.Z,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:e("common.dataStorage")}),(0,U.jsx)(H,{blocklet:n})]})};function Me(){return(0,D.XN)().backupEndpoint?(0,U.jsx)(Ne,{}):(0,U.jsx)(W,{})}Me.propTypes={};var Pe=Me},19066:function(e,n,t){t.d(n,{C:function(){return a}});var a="true"===localStorage.getItem("enableDebug")}}]);
2
- //# sourceMappingURL=6452.c7f6c102.chunk.js.map
1
+ "use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[6452],{92746:function(e,n,t){var a,r=t(71171),s=t(33028),o=t(59740),i=t(16380),c=t(50442),l=t(37574),p=["labelProps","className","style"];function d(e){var n=e.labelProps,t=e.className,a=e.style,r=(0,o.Z)(e,p),i=(0,s.Z)((0,s.Z)({},n),{},{labelPlacement:(null===n||void 0===n?void 0:n.labelPlacement)||"start"});return(0,l.jsx)(u,{className:t,style:a,children:(0,l.jsx)(c.Z,(0,s.Z)({labelProps:i},r))})}d.propTypes=c.Z.propTypes,d.defaultProps=c.Z.defaultProps;var u=i.default.div(a||(a=(0,r.Z)(["\n max-width: 300px;\n > label {\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n }\n "," {\n max-width: 100%;\n }\n"])),(function(e){return e.theme.breakpoints.down("sm")}));n.Z=d},76452:function(e,n,t){t.r(n),t.d(n,{default:function(){return Pe}});var a=t(30969),r=t(33028),s=t(38361),o=t(33359),i=t(26022),c=t(45008),l=t(32723),p=t(34795),d=t(96234),u=t(33665),h=t(94308),f=t(43207),x=t(87006),m=t(29996),g=t(22100),v=t(19611),Z=t.n(v),y=t(94984),j=t(15419),k=t(50496),A=t(23299),b=t(20244),C=t(54559),w=t(24891),S=t(41395),B=t(83998),I=t(30134),D=t(66138),U=t(37574);function R(e){var n=Object.assign({},((0,u.Z)(e),e)),t=(0,c.y0)().blocklet,v=(0,S.h6)().info,R=(0,i.PE)(),E=R.t,T=R.locale,F=(0,a.useState)(""),z=(0,d.Z)(F,2),O=z[0],L=z[1],N=(0,a.useState)(!1),M=(0,d.Z)(N,2),P=M[0],J=M[1],G=(0,a.useState)(!1),Q=(0,d.Z)(G,2),H=Q[0],V=Q[1],X=(0,a.useState)(""),K=(0,d.Z)(X,2),W=K[0],Y=K[1],q=(0,B.Z)({blocklet:t}),_=(0,w.yP)(v),$=(0,D.XN)(),ee=$.spaceGateways,ne=$.addSpaceGateway,te=(0,a.useState)({open:!1,action:"one-click-authorization",checkTimeout:3e5,prefix:Z()(b.PROD_DID_SPACES.CORE_URL,"space/api/did"),baseUrl:new URL(b.PROD_DID_SPACES.CORE_URL).origin,checkFn:C.od.create({baseURL:Z()(b.PROD_DID_SPACES.CORE_URL,"space")}).get,messages:{title:E("storage.spaces.provideNFT.title",{appName:q.appName},T),scan:E("storage.spaces.provideNFT.scan",{appName:q.appName},T),confirm:"",success:(0,U.jsx)(o.Z,{gutterBottom:!0,children:E("storage.spaces.provideNFT.success")})},onClose:function(){se((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!1})}))}}),ae=(0,d.Z)(te,2),re=ae[0],se=ae[1],oe=(0,a.useState)({open:!1,action:"one-click-authorization",checkTimeout:3e5,messages:{title:E("storage.spaces.authorize.title",{appName:q.appName},T),scan:E("storage.spaces.authorize.scan",{appName:q.appName},T),confirm:"",success:(0,U.jsx)(o.Z,{gutterBottom:!0,children:E("storage.spaces.authorize.success")})},onClose:function(){le((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!1})}))}}),ie=(0,d.Z)(oe,2),ce=ie[0],le=ie[1],pe=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(n,t){var a,s;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,a=t(n.endpoint),s=n.space?t(n.space):{},e.next=5,de((0,r.Z)((0,r.Z)({endpoint:a},{did:(0,I.LQ)(a),name:"DID Space"}),s));case 5:le((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!1})})),se((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!1})})),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.error(e.t0),y.Z.error((0,w.Z)(e.t0));case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(n,t){return e.apply(this,arguments)}}(),de=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(n){var t,a,r,s,o,i,c,p;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=n.endpoint,o=n.name,i=n.did,(c=null===s||void 0===s||null===(t=s.replace(/\/api\/.+/,""))||void 0===t||null===(a=t.trim())||void 0===a?void 0:a.replace(/\/$/,"")).startsWith("http")||(c="https://".concat(c)),e.next=5,(0,I.w2)(c);case 5:if(e.sent){e.next=8;break}return y.Z.error(E("storage.spaces.gateway.add.invalidUrl")),e.abrupt("return");case 8:if(!ee.some((function(e){return e.endpoint===s}))){e.next=12;break}return y.Z.error(E("storage.spaces.gateway.add.duplicate",{name:o})),e.abrupt("return");case 12:return p={name:o,did:i,url:c,endpoint:s},e.next=15,ne(p,s);case 15:y.Z.success(E("storage.spaces.connectedWithName",{name:null!==(r=null===p||void 0===p?void 0:p.name)&&void 0!==r?r:"DID Spaces"}));case 16:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),ue=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(){var n,t;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,J(!0),n=O.startsWith("http")?O:"https://".concat(O),e.next=5,(0,I.w2)(n);case 5:if(e.sent){e.next=7;break}throw new Error(E("storage.spaces.gateway.add.invalidUrl"));case 7:le((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!0,prefix:Z()(n,"space/api/did"),baseUrl:new URL(n).origin,checkFn:C.od.create({baseURL:Z()(n,"space")}).get,extraParams:{appDid:q.appDid,appName:q.appName,appDescription:q.appDescription,scopes:q.scopes,appUrl:q.appUrl,referrer:q.referrer,nodeDid:v.did}})})),V(!1),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(0),t="".concat(E("storage.spaces.gateway.add.failed",T),": ").concat((0,w.Z)(e.t0)),Y(t);case 15:return e.prev=15,J(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[0,11,15,18]])})));return function(){return e.apply(this,arguments)}}();return(0,U.jsxs)(s.Z,{children:[(0,U.jsx)(j.Z,{color:"primary",style:{textTransform:"none !important",fontSize:"1rem"},size:"small",onClick:function(){se((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!0,extraParams:{appDid:q.appDid,appName:q.appName,appDescription:q.appDescription,scopes:q.scopes,appUrl:q.appUrl,referrer:q.referrer,nodeDid:v.did}})}))},menu:[(0,U.jsx)(j.Z.Item,(0,r.Z)((0,r.Z)({sx:{textTransform:"none"},onClick:function(){return V(!0)},size:"small"},n),{},{children:E("storage.spaces.connect.useSpaceGateway")}),"1")],children:(0,U.jsx)(o.Z,{sx:{fontWeight:"bold",textTransform:"none"},children:E("storage.spaces.connect.useWallet")})}),(0,U.jsx)(g.default,{forceConnected:!1,saveConnect:!1,prefix:re.prefix,open:re.open,popup:!0,action:re.action,webWalletUrl:_,baseUrl:re.baseUrl,checkFn:re.checkFn,onSuccess:pe,onClose:re.onClose,checkTimeout:re.checkTimeout,extraParams:re.extraParams,messages:re.messages,locale:T}),(0,U.jsx)(g.default,{forceConnected:!1,saveConnect:!1,prefix:ce.prefix,open:ce.open,popup:!0,action:ce.action,baseUrl:ce.baseUrl,checkFn:ce.checkFn,onSuccess:pe,onClose:ce.onClose,checkTimeout:ce.checkTimeout,extraParams:ce.extraParams,messages:ce.messages,locale:T}),(0,U.jsxs)(k.Z,{title:E("storage.spaces.gateway.add.title"),fullWidth:!0,maxWidth:"md",open:H,onClose:function(){return V(!1)},PaperProps:{style:{minHeight:"auto"}},actions:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(m.Z,{onClick:function(e){e.stopPropagation(),V(!1)},color:"inherit",children:E("common.cancel")}),(0,U.jsxs)(m.Z,{onClick:ue,color:"primary",disabled:P||!O,variant:"contained",autoFocus:!0,children:[P&&(0,U.jsx)(h.Z,{size:16}),E("common.confirm")]})]}),children:[(0,U.jsx)("div",{style:{paddingTop:12,overflowY:"hidden"},children:(0,U.jsx)(f.Z,{component:"div",children:(0,U.jsx)(o.Z,{component:"div",children:(0,U.jsx)(x.Z,{label:E("storage.spaces.gateway.add.label"),autoComplete:"off",variant:"outlined",name:"url",fullWidth:!0,value:O,onChange:function(e){Y(null),L(e.target.value)},disabled:P,onKeyPress:function(){var e=(0,p.Z)((0,l.Z)().mark((function e(n){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("Enter"!==n.key){e.next=3;break}return e.next=3,ue();case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),autoFocus:!0})})})}),Boolean(W)&&(0,U.jsx)(A.Z,{type:"error",style:{width:"100%"},children:W})]})]})}R.propTypes={},R.defaultProps={};var E,T=R,F=t(71171),z=t(59740),O=t(16380),L=t(24974),N=t.n(L),M=t(99237),P=t.n(M),J=t(19638),G=t(70177),Q=["blocklet"];function H(e){var n=e.blocklet,t=(0,z.Z)(e,Q),s=(0,a.useContext)(i.RD).t;if(!n.diskInfo)return(0,U.jsx)(o.Z,{children:s("blocklet.diskInfo.empty")});var c=function(e,n,t){return(0,U.jsxs)(o.Z,{children:[t?(0,U.jsx)(J.Z,{style:{cursor:"pointer"},onClick:t,underline:"hover",children:e}):e," ",(0,U.jsx)("strong",{children:n?P()(n):"empty"})]})},l=n.environments.reduce((function(e,n){return e[n.key]=n.value,e}),{}),p=[{key:"appDir",name:s("blocklet.diskInfo.appDir"),value:c(l.BLOCKLET_APP_DIR,n.diskInfo.app)},{key:"dataDir",name:s("blocklet.diskInfo.dataDir"),value:c(l.BLOCKLET_DATA_DIR,n.diskInfo.data)},{key:"logDir",name:s("blocklet.diskInfo.logDir"),value:c(l.BLOCKLET_LOG_DIR,n.diskInfo.log)},{key:"cacheDir",name:s("blocklet.diskInfo.cacheDir"),value:c(l.BLOCKLET_CACHE_DIR,n.diskInfo.cache)}];return(0,U.jsx)(V,(0,r.Z)((0,r.Z)({component:"div"},t),{},{children:p.map((function(e){return(0,U.jsx)(G.Z,{valueComponent:"div",nameWidth:120,name:e.name,children:e.value},e.key)}))}))}H.propTypes={blocklet:N().object.isRequired},H.defaultProps={};var V=(0,O.default)(o.Z)(E||(E=(0,F.Z)([""]))),X=function(e){return(0,U.jsxs)("svg",(0,r.Z)((0,r.Z)({},e),{},{children:[(0,U.jsxs)("g",{filter:"url(#a)",children:[(0,U.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"}),(0,U.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.192 6.222l-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"}),(0,U.jsx)("mask",{id:"b",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"4",y:"2",width:"220",height:"250",children:(0,U.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"})}),(0,U.jsxs)("g",{mask:"url(#b)",children:[(0,U.jsx)("path",{opacity:".5",fill:"url(#c)",d:"M4 2h220v128H4z"}),(0,U.jsx)("path",{opacity:".1",fill:"url(#d)",d:"M4 130h220v122H4z"}),(0,U.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"}),(0,U.jsx)("path",{d:"M117.604 47.263L121.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)"}),(0,U.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)"}),(0,U.jsxs)("g",{clipPath:"url(#g)",fillRule:"evenodd",clipRule:"evenodd",fill:"#fff",children:[(0,U.jsx)("path",{d:"M50.928 216.089l1.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"}),(0,U.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"})]}),(0,U.jsx)("circle",{cx:"191.32",cy:"218",r:"10",fill:"url(#h)"}),(0,U.jsx)("path",{d:"M192.064 213.333l.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"}),(0,U.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"})]})]}),(0,U.jsxs)("defs",{children:[(0,U.jsxs)("filter",{id:"a",x:"0",y:"0",width:"228",height:"258",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,U.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,U.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"}),(0,U.jsx)("feOffset",{dy:"2"}),(0,U.jsx)("feGaussianBlur",{stdDeviation:"2"}),(0,U.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,U.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"}),(0,U.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),(0,U.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})]}),(0,U.jsx)("pattern",{id:"c",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:(0,U.jsx)("use",{xlinkHref:"#i",transform:"scale(.00455 .00781)"})}),(0,U.jsxs)("linearGradient",{id:"d",x1:"114",y1:"130",x2:"114",y2:"252",gradientUnits:"userSpaceOnUse",children:[(0,U.jsx)("stop",{stopColor:"#101010"}),(0,U.jsx)("stop",{offset:"1",stopColor:"#272727"})]}),(0,U.jsxs)("linearGradient",{id:"e",x1:"120.989",y1:"45",x2:"120.989",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[(0,U.jsx)("stop",{stopColor:"#fff",stopOpacity:".4"}),(0,U.jsx)("stop",{offset:"1",stopColor:"#fff"})]}),(0,U.jsxs)("linearGradient",{id:"f",x1:"107.801",y1:"45",x2:"107.801",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[(0,U.jsx)("stop",{stopColor:"#fff"}),(0,U.jsx)("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})]}),(0,U.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:[(0,U.jsx)("stop",{stopColor:"#016BED"}),(0,U.jsx)("stop",{offset:".699",stopColor:"#4498FB"}),(0,U.jsx)("stop",{offset:"1",stopColor:"#9DFFE8"})]}),(0,U.jsx)("clipPath",{id:"g",children:(0,U.jsx)("path",{fill:"#fff",transform:"translate(28 214)",d:"M0 0h40.32v8H0z"})}),(0,U.jsx)("image",{id:"i",width:"220",height:"128",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANwAAACABAMAAACSOBo+AAAAG1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACUUeIgAAAACXRSTlMSFhkOHAsfCCOMH5MiAAAjjElEQVRo3hTQO3sjRRBG4a+qWzJhVfdIJqzuGXsJe2bkJe0e2UA4shdIJS2X1LBcUpbL/wae5yQnfVHGjp2+V08yKR7OwBDYte8pi5Aq9DObSBouqN9cidZyusonzWtGJO13phLebEn6xKEnlYyXe5hnySc53Ym9Abn7crTse8r7BMeIB8yBOVZK0trMjxT5S/cgc9G63BQqZoF3xSYZYeRk2hoIvEBFA7XMtaaF8TdY1GjiDDqgEswRDlWnRtmYzl5zRUq3sx3I+JL7s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XB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]}))};function K(){var e=(0,i.PE)().t,n=(0,c.y0)().blocklet;return(0,U.jsxs)(s.Z,{children:[(0,U.jsxs)(s.Z,{minHeight:"40vh",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[(0,U.jsx)(X,{style:{width:200,height:250}}),(0,U.jsx)(o.Z,{marginTop:"24px",marginBottom:"24px",children:e("storage.spaces.connect.provider")}),(0,U.jsx)(T,{})]}),(0,U.jsx)(o.Z,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:e("common.dataStorage")}),(0,U.jsx)(H,{blocklet:n})]})}X.defaultProps={width:"228",height:"258",viewBox:"0 0 228 258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},K.propTypes={};var W=K,Y=t(75255),q=t(7173),_=t(38627),$=t(59505),ee=t(54164),ne=t(50576),te=t(38996),ae=t(36558),re=t(92746),se=t(94551),oe=t(48082),ie=t(2689),ce=t(93310),le=t(86008),pe=t(37973),de=t(20352),ue=t(61292),he=t(60030),fe=t(30291),xe=t(67531);function me(e){var n=e.spaceGateway,t=e.onDelete,r=(0,i.PE)().t,s=(0,a.useState)(!1),o=(0,d.Z)(s,2),c=o[0],u=o[1],h=(0,a.useState)(!1),f=(0,d.Z)(h,2),x=f[0],m=f[1],g=function(e,n){null===e||void 0===e||e.preventDefault(),null===e||void 0===e||e.stopPropagation(),u(n)},v=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(a){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,null===a||void 0===a||a.stopPropagation(),m(!0),e.next=5,t(n);case 5:u(!1),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.error(e.t0),y.Z.error("".concat(r("storage.space.gateway.delete.failed"),": ").concat((0,w.Z)(e.t0)));case 12:return e.prev=12,m(!1),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[0,8,12,15]])})));return function(n){return e.apply(this,arguments)}}();return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(ie.Z,{color:"red",onClick:function(e){return g(e,!0)},children:[(0,U.jsx)(ce.Z,{style:{minWidth:24,color:"red"},children:(0,U.jsx)(fe.default,{fontSize:"small"})}),(0,U.jsx)(le.Z,{style:{color:"red"},children:r("common.delete")})]}),(0,U.jsx)(xe.Z,{title:r("common.delConfirmDescription",{data:"".concat(null===n||void 0===n?void 0:n.name)}),open:c,confirmButton:{text:r("common.confirm"),props:{variant:"contained",color:"error",loading:x}},cancelButton:{text:r("common.cancel"),props:{variant:"contained",color:"primary"},loading:x},onConfirm:v,onCancel:function(e){return g(e,!1)}})]})}me.propTypes={onDelete:N().func,spaceGateway:N().shape({name:N().string.isRequired,url:N().string.isRequired,protected:N().bool}).isRequired},me.defaultProps={onDelete:function(){}};var ge=me,ve=["spaceGateway","connected","onDelete","onConnect","enableSwitchToSpace"];function Ze(e){var n=e.spaceGateway,t=e.connected,s=e.onDelete,o=e.onConnect,c=e.enableSwitchToSpace,u=(0,z.Z)(e,ve),f=(0,a.useState)(null),x=(0,d.Z)(f,2),m=x[0],g=x[1],v=(0,i.PE)().t,Z=(0,a.useState)(!1),j=(0,d.Z)(Z,2),k=j[0],A=j[1],b=function(e,n){e.stopPropagation(),e.preventDefault(),g(n&&e.currentTarget)},C=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(t){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,A(!0),b(t,!1),e.next=5,o(n);case 5:e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.error(e.t0),y.Z.error(e.t0.message);case 11:return e.prev=11,A(!1),e.finish(11);case 14:case"end":return e.stop()}}),e,null,[[0,7,11,14]])})));return function(n){return e.apply(this,arguments)}}();return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(se.Z,(0,r.Z)((0,r.Z)({"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",onClick:function(e){return b(e,!0)},size:"small"},u),{},{children:k||null!==n&&void 0!==n&&n.loading?(0,U.jsx)(h.Z,{size:"24px"}):(0,U.jsx)(pe.Z,{})})),(0,U.jsxs)(oe.Z,{id:"simple-menu",anchorEl:m,keepMounted:!0,open:Boolean(m),onClose:function(e){return b(e,!1)},children:[(0,U.jsxs)(ie.Z,{onClick:function(e){b(e,!1),window.open(n.endpoint?(0,I.nD)(n.endpoint):n.url)},children:[(0,U.jsx)(ce.Z,{style:{minWidth:24},children:(0,U.jsx)(de.Z,{fontSize:"small"})}),(0,U.jsx)(le.Z,{children:v("common.open")})]}),(0,U.jsxs)(ie.Z,{onClick:function(e){b(e,!1),window.open((0,I.Xv)(n.endpoint))},children:[(0,U.jsx)(ce.Z,{style:{minWidth:24},children:(0,U.jsx)(he.Z,{fontSize:"small"})}),(0,U.jsx)(le.Z,{children:v("storage.spaces.strategy.viewBackupFiles")})]}),!t&&c&&(0,U.jsxs)(ie.Z,{onClick:C,children:[(0,U.jsx)(ce.Z,{style:{minWidth:24},children:(0,U.jsx)(ue.Z,{fontSize:"small"})}),(0,U.jsx)(le.Z,{children:v("storage.spaces.connect.switchToSpace")})]}),!t&&(0,U.jsx)(ge,{spaceGateway:n,onDelete:s})]})]})}Ze.propTypes={spaceGateway:N().shape({name:N().string.isRequired,url:N().string.isRequired,protected:N().bool,endpoint:N().string.isRequired,loading:N().bool}).isRequired,connected:N().bool.isRequired,enableSwitchToSpace:N().bool,onDelete:N().func,onConnect:N().func},Ze.defaultProps={onDelete:function(){},onConnect:function(){},enableSwitchToSpace:!0};var ye,je=Ze,ke=t(19066),Ae=t(50202),be=["spaceGateway","connected","onDelete","onBackupNow"],Ce=function(e){return(0,U.jsx)("svg",(0,r.Z)((0,r.Z)({},e),{},{children:(0,U.jsx)("circle",{cx:"4",cy:"4",r:"4",fill:"#25C99B"})}))};Ce.defaultProps={width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var we=function(e){return(0,U.jsx)("svg",(0,r.Z)((0,r.Z)({},e),{},{children:(0,U.jsx)("circle",{cx:"4",cy:"4",r:"4",fill:"#F16E6E"})}))};function Se(e){var n=e.spaceGateway,t=e.connected,u=e.onDelete,h=e.onBackupNow,f=(0,z.Z)(e,be),x=(0,Y.Z)((function(e){return e.breakpoints.down("md")})),v=(0,i.PE)(),j=v.t,k=v.locale,A=(0,c.y0)().blocklet,b=(0,S.h6)(),w=b.api,R=b.info.did,E=(0,B.Z)({blocklet:A}),T=E.appDid,F=E.appName,O=E.appDescription,L=E.scopes,N=E.appUrl,M=E.referrer,P=(0,D.XN)(),J=P.updateSpaceGateway,G=P.backupEndpoint,Q=P.backupProgress,H=P.refreshBackupEndpoint,V=(0,a.useState)(!1),X=(0,d.Z)(V,2),K=X[0],W=X[1],se=(0,a.useState)({open:!1,action:"one-click-authorization",checkTimeout:3e5,messages:{title:j("storage.spaces.authorize.title",{appName:F},k),scan:j("storage.spaces.authorize.scan",{appName:F},k),confirm:"",success:(0,U.jsx)(o.Z,{gutterBottom:!0,children:j("storage.spaces.authorize.success")})},onClose:function(){ce((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!1})}))}}),oe=(0,d.Z)(se,2),ie=oe[0],ce=oe[1],le=(0,ee.Z)((0,p.Z)((0,l.Z)().mark((function e(){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return",!0);case 2:return e.abrupt("return",(0,I.Nb)(G));case 3:case"end":return e.stop()}}),e)}))),{refreshDeps:[t,G,null===ie||void 0===ie?void 0:ie.open,K]}),pe=le.data,de=le.loading,ue=t&&pe,he=t&&!K&&pe&&!(null!==n&&void 0!==n&&n.loading),fe=t&&K&&pe,xe=t&&!pe&&!de&&!K,me=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.Nb)(null===n||void 0===n?void 0:n.endpoint);case 2:if(!e.sent){e.next=9;break}return e.next=6,w.configBlocklet({input:{did:[A.meta.did],configs:[{key:$.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:n.endpoint}]}});case 6:return H(),y.Z.success(j("storage.spaces.connect.switchToSpaceSucceeded",{name:n.name?"(".concat(n.name,")"):""})),e.abrupt("return");case 9:ce((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!0,prefix:Z()(n.url,"space/api/did"),baseUrl:new URL(n.url).origin,checkFn:C.od.create({baseURL:Z()(n.url,"space")}).get,extraParams:{appDid:T,appName:F,appDescription:O,scopes:L,appUrl:N,referrer:M,nodeDid:R}})}));case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ge=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(t,a){var s,o,i,c,p,d;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=a(t.endpoint),c=(0,I.LQ)(i),p=t.space?a(t.space):{},!n.did||c===n.did){e.next=7;break}return ce((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!1})})),y.Z.error(j("storage.spaces.gateway.switch.failedForMismatchSpace",{name:null!==p&&void 0!==p&&p.name?p.name:""})),e.abrupt("return");case 7:return d=(0,r.Z)((0,r.Z)({},n),{},{name:null!==(s=p.name)&&void 0!==s?s:"DID Space",did:null!==(o=p.did)&&void 0!==o?o:(0,I.LQ)(i),endpoint:i}),e.next=10,J(d);case 10:ce((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!1})}));case 11:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),ve=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!K){e.next=3;break}return e.abrupt("return");case 3:return W(!0),e.next=6,h();case 6:e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.error(e.t0),y.Z.error(e.t0.message);case 12:return e.prev=12,W(!0),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[0,8,12,15]])})));return function(){return e.apply(this,arguments)}}();return(0,a.useEffect)((function(){null!==Q&&void 0!==Q&&Q.completed?(100===(null===Q||void 0===Q?void 0:Q.progress)?y.Z.success(j("storage.spaces.backupSuccessfully")):-1===(null===Q||void 0===Q?void 0:Q.progress)&&y.Z.error(null===Q||void 0===Q?void 0:Q.message),W(!1),Q.progress=0,Q.message=""):Q.progress&&W(!0)}),[Q]),(0,U.jsxs)(Be,{style:{position:"relative"},children:[(0,U.jsxs)(s.Z,(0,r.Z)((0,r.Z)({sx:{backgroundColor:t?"#F0FDFF":"inherit","&:hover":{backgroundColor:t?"#F0FDFF":"#FBFBFB"},borderRadius:"8px"},display:"flex",padding:"12px 20px"},f),{},{children:[(0,U.jsx)(s.Z,{display:"flex",children:(0,U.jsx)(Ae.Z,{alt:n.did,src:(0,I.Jf)(n.endpoint)})}),(0,U.jsxs)(s.Z,{className:"spaces-info",display:"flex",flexGrow:(!x||!fe)&&1,minWidth:"180px",flexDirection:fe?"row":"column",sx:{marginLeft:"20px",padding:"0px 0px"},children:[(0,U.jsxs)(s.Z,{className:"spaces-info",display:"flex",maxWidth:"360px",alignItems:"center",children:[(0,U.jsx)(o.Z,{color:t?"primary":"inherit",fontSize:"1rem",fontWeight:"bold",children:n.name}),ue&&(0,U.jsx)(q.Z,{label:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Ce,{style:{marginRight:"4px"}}),j("storage.spaces.connected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:"20px",fontWeight:"bold"}}),xe&&(0,U.jsx)(q.Z,{label:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(we,{style:{marginRight:"4px"}}),j("storage.spaces.disconnected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:"20px",fontWeight:"bold"}})]}),(0,U.jsx)(s.Z,{className:"spaces-address",display:fe?"none":"flex",color:"#9397A1",marginTop:"8px",children:(0,U.jsx)(o.Z,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},color:"#9397A1",children:n.did&&(0,U.jsx)(ae.Z,{copyable:!1,size:14,compact:!0,responsive:!1,did:n.did})})})]}),(0,U.jsxs)(s.Z,{className:"spaces-backup",display:"flex",alignItems:"center",flex:x&&fe&&1,children:[he&&(0,U.jsxs)(s.Z,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:[(0,U.jsx)(m.Z,{variant:"contained",size:"small",onClick:ve,children:j("storage.spaces.strategy.backupNow")}),ke.C&&(0,U.jsx)(re.Z,{name:"enable-auto-backup",title:"coming soon",disabled:!0,labelProps:{label:(0,U.jsx)(o.Z,{sx:{marginRight:"8px",fontSize:"16px"},children:(0,U.jsx)("span",{children:j("storage.spaces.strategy.autoBackup")})})},style:{marginLeft:"64px"}})]}),fe&&(0,U.jsxs)(s.Z,{className:"backup-progress",display:"flex",flexDirection:"column",alignItems:"center",minWidth:!x&&"640px",marginLeft:x&&"16px",width:x&&"360px",marginRight:"auto",alignSelf:"flex-end",children:[(0,U.jsx)(o.Z,{color:"primary",children:null===Q||void 0===Q?void 0:Q.message}),(0,U.jsxs)(s.Z,{sx:{display:"flex",alignItems:"center"},width:"100%",children:[(0,U.jsx)(s.Z,{sx:{width:"100%",mr:1},children:(0,U.jsx)(_.Z,{color:"primary",variant:"determinate",value:null===Q||void 0===Q?void 0:Q.progress})}),(0,U.jsx)(s.Z,{sx:{maxWidth:"100%"},children:(0,U.jsxs)(o.Z,{variant:"body2",color:"text.secondary",children:[null===Q||void 0===Q?void 0:Q.progress,"%"]})})]})]}),xe&&(0,U.jsx)(s.Z,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:(0,U.jsx)(m.Z,{color:"error",variant:"contained",size:"small",onClick:me,children:j("storage.spaces.disconnected.reconnectNow")})}),(0,U.jsx)(je,{sx:{marginLeft:"16px",marginRight:"16px",alignItems:"flex-end",justifyItems:"flex-end"},spaceGateway:n,connected:t,onDelete:u,onConnect:me,enableSwitchToSpace:(null===Q||void 0===Q?void 0:Q.completed)||(0,ne.isEmpty)(null===Q||void 0===Q?void 0:Q.message)})]})]})),(0,U.jsx)(g.default,{forceConnected:!1,saveConnect:!1,prefix:ie.prefix,open:ie.open,popup:!0,action:ie.action,baseUrl:ie.baseUrl,checkFn:ie.checkFn,onSuccess:ge,onClose:ie.onClose,checkTimeout:ie.checkTimeout,extraParams:ie.extraParams,messages:ie.messages,locale:k},"get-endpoint"),(0,U.jsx)(s.Z,{className:"selected-container ".concat(t?"selected":""),children:(0,U.jsx)(te.default,{className:"selected-icon"})})]})}we.defaultProps={width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Se.propTypes={spaceGateway:N().shape({did:N().string.isRequired,name:N().string.isRequired,url:N().string.isRequired,endpoint:N().string.isRequired,protected:N().bool,loading:N().bool}).isRequired,connected:N().bool.isRequired,progress:N().any.isRequired,onDelete:N().func,onBackupNow:N().func},Se.defaultProps={onDelete:function(){},onBackupNow:function(){}};var Be=(0,O.default)(s.Z)(ye||(ye=(0,F.Z)(["\n .selected-container {\n position: absolute;\n right: 0px;\n bottom: 0px;\n display: flex;\n -webkit-box-pack: end;\n justify-content: flex-end;\n align-items: flex-end;\n width: 32px;\n height: 32px;\n border-radius: 0px 0px 8px;\n color: rgb(255, 255, 255);\n overflow: hidden;\n transition: all 0.4s ease 0s;\n\n &::after {\n position: absolute;\n z-index: 0;\n left: 60px;\n top: 60px;\n display: block;\n width: 0px;\n height: 0px;\n border-width: 16px;\n border-style: solid;\n border-color: transparent #1dc1c7 #1dc1c7 transparent;\n transition: all 0.1s ease 0s;\n content: '';\n }\n\n .selected-icon {\n visibility: hidden;\n width: 60%;\n height: 60%;\n position: relative;\n z-index: 2;\n margin: 0px 1px 1px 0px;\n font-size: 16px;\n transition: all 0.2s ease 0s;\n }\n }\n\n .selected-container.selected {\n &::after {\n left: 0px;\n top: 0px;\n }\n\n .selected-icon {\n visibility: visible;\n }\n }\n"]))),Ie=Se,De=t(9715),Ue=t(2291),Re=t(6779),Ee=t(20296),Te=t(19886),Fe=t.n(Te),ze=t(88666);function Oe(e){var n=Object.assign({},((0,u.Z)(e),e)),t=(0,i.PE)(),a=t.t,c=t.locale,l=(0,D.XN)(),p=l.spaceGateways,d=l.backups,f=[{label:"DID Spaces",name:"target",options:{customBodyRenderLite:function(e){var n,t=d[e],a=t.targetUrl,r=t.targetName,s=t.status,i=t.createdAt,c=s===b.BACKUPS.STATUS.PROGRESS&&Fe()().diff(i,"hours")>=b.BACKUPS.TIMEOUT_HOURS,l=s===b.BACKUPS.STATUS.SUCCEEDED&&!c,u=r||(null===(n=p.find((function(e){return null===a||void 0===a?void 0:a.includes((0,I.LQ)(null===e||void 0===e?void 0:e.endpoint))})))||void 0===n?void 0:n.name)||"Unknown DID Space";return l?(0,U.jsx)(J.Z,{fontSize:"16px",href:a,target:"_blank",children:u}):(0,U.jsx)(o.Z,{variant:"body1",fontSize:"16px",children:u})}}},{label:a("common.strategy"),name:"strategy",options:{customBodyRender:function(e){var n=a(0===e?"common.auto":"common.manual");return(0,U.jsx)(De.Z,{children:n})}}},{label:a("common.startTime"),name:"createdAt",options:{customBodyRender:function(e){return Fe()(e).format("YYYY-MM-DD HH:mm:ss")}}},{label:a("common.endTime"),name:"updatedAt",options:{customBodyRender:function(e){return(0,ne.isEmpty)(e)?"":Fe()(e).format("YYYY-MM-DD HH:mm:ss")}}},{label:a("common.status"),name:"status",options:{customBodyRenderLite:function(e){var n,t=null!==(n=null===d||void 0===d?void 0:d[e])&&void 0!==n?n:{},r=t.status,i=t.message,c=t.createdAt,l=r===b.BACKUPS.STATUS.PROGRESS&&Fe()().diff(c,"hours")>=b.BACKUPS.TIMEOUT_HOURS,p=l&&a("common.timeoutError"),u=r===b.BACKUPS.STATUS.PROGRESS&&!l,f=r===b.BACKUPS.STATUS.SUCCEEDED&&!l;return u?(0,U.jsxs)(o.Z,{display:"inline-flex",alignItems:"center",fontSize:"14px",children:[(0,U.jsx)(h.Z,{sx:{marginRight:"4px"},size:"12px"}),a("common.progress")]}):f?(0,U.jsx)(De.Z,{type:"success",children:a("common.succeeded")}):(0,U.jsxs)(s.Z,{display:"inline-flex",alignItems:"center",children:[(0,U.jsx)(De.Z,{type:"error",children:a("common.failed")})," \xa0",(0,U.jsx)(Re.Z,{style:{display:"flex",alignItems:"center",flexShrink:0},title:i||p,children:(0,U.jsx)(Ee.Z,{children:(0,U.jsx)(ze.Z,{style:{width:"24px",height:"24px"},color:"error"})})})]})}}}];return(0,U.jsx)(s.Z,(0,r.Z)((0,r.Z)({},n),{},{children:null!==d&&void 0!==d&&d.length?(0,U.jsx)(Ue.Z,{title:(0,U.jsx)(o.Z,{fontSize:"1.2rem",fontWeight:"bold",children:a("storage.spaces.backup.records")}),data:d,columns:f,emptyNode:a("storage.spaces.record.emptyData",c),options:{download:!1,filter:!1,print:!1}}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(s.Z,{display:"flex",height:"56px",lineHeight:"56px",alignItems:"center",children:(0,U.jsx)(o.Z,{fontSize:"1.2rem",fontWeight:"bold",children:a("storage.spaces.backup.records")})}),(0,U.jsx)(s.Z,{color:"#9397A1",marginTop:"16px",marginBottom:"24px",children:a("storage.spaces.record.emptyData")})]})}))}Oe.propTypes={};var Le=Oe;var Ne=function(){var e=(0,i.PE)().t,n=(0,c.y0)().blocklet,t=(0,S.h6)().api,a=(0,D.XN)(),r=a.spaceGateways,d=a.spaceGatewaysLoading,u=a.deleteSpaceGateway,f=a.spaceGatewayIsSelected,x=d&&!(null!==r&&void 0!==r&&r.length),m=function(){var n=(0,p.Z)((0,l.Z)().mark((function n(t){return(0,l.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,u(t);case 2:y.Z.success(e("storage.spaces.gateway.delete.succeeded",{name:"(".concat(t.name,")")}));case 3:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),g=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.backupBlocklet({input:{appDid:n.appDid,to:"spaces"}});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,U.jsxs)(s.Z,{display:"flex",flexDirection:"column",children:[(0,U.jsxs)(s.Z,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"12px",children:[(0,U.jsx)(o.Z,{fontSize:"1.2rem",fontWeight:"bold",children:e("storage.spaces.connected.title")}),(0,U.jsx)(T,{})]}),(0,U.jsx)(s.Z,{children:x?(0,U.jsx)(s.Z,{display:"flex",justifyContent:"center",children:(0,U.jsx)(h.Z,{})}):r.map((function(e){return(0,U.jsx)(Ie,{style:{marginTop:"12px"},spaceGateway:e,connected:f(e),onDelete:m,onBackupNow:g},e.endpoint)}))}),(0,U.jsx)(Le,{sx:{marginTop:"24px"}}),(0,U.jsx)(o.Z,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:e("common.dataStorage")}),(0,U.jsx)(H,{blocklet:n})]})};function Me(){return(0,D.XN)().backupEndpoint?(0,U.jsx)(Ne,{}):(0,U.jsx)(W,{})}Me.propTypes={};var Pe=Me},19066:function(e,n,t){t.d(n,{C:function(){return a}});var a="true"===localStorage.getItem("enableDebug")}}]);
2
+ //# sourceMappingURL=6452.b7040943.chunk.js.map