@abtnode/webapp 1.16.11-next-3d2b39f7 → 1.16.11-next-d32a90d4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/build/asset-manifest.json +9 -8
- package/build/index.html +1 -1
- package/build/static/js/{4517.25074aaa.chunk.js → 2082.2548267f.chunk.js} +1 -1
- package/build/static/js/4762.a6631c89.chunk.js +1 -0
- package/build/static/js/6014.b606db43.chunk.js +1 -0
- package/build/static/js/6738.1a39ced1.chunk.js +1 -0
- package/build/static/js/7016.ebe6ee63.chunk.js +1 -0
- package/build/static/js/7148.5383b105.chunk.js +2 -0
- package/build/static/js/9520.acce2211.chunk.js +1 -0
- package/build/static/js/main.5ba295e8.js +2 -0
- package/package.json +1 -1
- package/build/static/js/6014.05b59145.chunk.js +0 -1
- package/build/static/js/6738.35106399.chunk.js +0 -1
- package/build/static/js/7148.102edb7f.chunk.js +0 -2
- package/build/static/js/8352.0e515690.chunk.js +0 -1
- package/build/static/js/851.2cbd8223.chunk.js +0 -1
- package/build/static/js/main.3c64a86e.js +0 -2
- /package/build/static/js/{7148.102edb7f.chunk.js.LICENSE.txt → 7148.5383b105.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.3c64a86e.js.LICENSE.txt → main.5ba295e8.js.LICENSE.txt} +0 -0
package/blocklet.yml
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
3
|
"main.css": "./static/css/main.c9e90622.css",
|
|
4
|
-
"main.js": "./static/js/main.
|
|
4
|
+
"main.js": "./static/js/main.5ba295e8.js",
|
|
5
5
|
"static/js/5984.6d4bc633.chunk.js": "./static/js/5984.6d4bc633.chunk.js",
|
|
6
|
-
"static/js/
|
|
6
|
+
"static/js/2082.2548267f.chunk.js": "./static/js/2082.2548267f.chunk.js",
|
|
7
7
|
"static/js/2098.39cd0ace.chunk.js": "./static/js/2098.39cd0ace.chunk.js",
|
|
8
8
|
"static/js/8928.7ea9088a.chunk.js": "./static/js/8928.7ea9088a.chunk.js",
|
|
9
|
-
"static/js/
|
|
9
|
+
"static/js/7016.ebe6ee63.chunk.js": "./static/js/7016.ebe6ee63.chunk.js",
|
|
10
10
|
"static/css/1371.f696fdbf.chunk.css": "./static/css/1371.f696fdbf.chunk.css",
|
|
11
11
|
"static/js/1371.004b8ff2.chunk.js": "./static/js/1371.004b8ff2.chunk.js",
|
|
12
12
|
"static/js/4792.daacddf5.chunk.js": "./static/js/4792.daacddf5.chunk.js",
|
|
13
13
|
"static/css/6014.f696fdbf.chunk.css": "./static/css/6014.f696fdbf.chunk.css",
|
|
14
|
-
"static/js/6014.
|
|
14
|
+
"static/js/6014.b606db43.chunk.js": "./static/js/6014.b606db43.chunk.js",
|
|
15
15
|
"static/js/9038.2908c176.chunk.js": "./static/js/9038.2908c176.chunk.js",
|
|
16
16
|
"static/js/6158.05a989aa.chunk.js": "./static/js/6158.05a989aa.chunk.js",
|
|
17
17
|
"static/js/4557.0c29f7fc.chunk.js": "./static/js/4557.0c29f7fc.chunk.js",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"static/js/3633.67f1416e.chunk.js": "./static/js/3633.67f1416e.chunk.js",
|
|
54
54
|
"static/js/442.ed7bae8d.chunk.js": "./static/js/442.ed7bae8d.chunk.js",
|
|
55
55
|
"static/css/7148.5ade355d.chunk.css": "./static/css/7148.5ade355d.chunk.css",
|
|
56
|
-
"static/js/7148.
|
|
56
|
+
"static/js/7148.5383b105.chunk.js": "./static/js/7148.5383b105.chunk.js",
|
|
57
57
|
"static/js/9327.e9305607.chunk.js": "./static/js/9327.e9305607.chunk.js",
|
|
58
58
|
"static/css/4691.cc1ab277.chunk.css": "./static/css/4691.cc1ab277.chunk.css",
|
|
59
59
|
"static/js/4691.b2e657a4.chunk.js": "./static/js/4691.b2e657a4.chunk.js",
|
|
@@ -64,9 +64,10 @@
|
|
|
64
64
|
"static/js/3453.73bb4d18.chunk.js": "./static/js/3453.73bb4d18.chunk.js",
|
|
65
65
|
"static/js/9076.150e000f.chunk.js": "./static/js/9076.150e000f.chunk.js",
|
|
66
66
|
"static/css/4665.5d6e9197.chunk.css": "./static/css/4665.5d6e9197.chunk.css",
|
|
67
|
+
"static/js/4762.a6631c89.chunk.js": "./static/js/4762.a6631c89.chunk.js",
|
|
67
68
|
"static/js/2878.9b638eb1.chunk.js": "./static/js/2878.9b638eb1.chunk.js",
|
|
68
|
-
"static/js/
|
|
69
|
-
"static/js/6738.
|
|
69
|
+
"static/js/9520.acce2211.chunk.js": "./static/js/9520.acce2211.chunk.js",
|
|
70
|
+
"static/js/6738.1a39ced1.chunk.js": "./static/js/6738.1a39ced1.chunk.js",
|
|
70
71
|
"static/js/519.a67b47b1.chunk.js": "./static/js/519.a67b47b1.chunk.js",
|
|
71
72
|
"static/js/2991.a6b53f19.chunk.js": "./static/js/2991.a6b53f19.chunk.js",
|
|
72
73
|
"static/js/6189.7015cb96.chunk.js": "./static/js/6189.7015cb96.chunk.js",
|
|
@@ -89,6 +90,6 @@
|
|
|
89
90
|
},
|
|
90
91
|
"entrypoints": [
|
|
91
92
|
"static/css/main.c9e90622.css",
|
|
92
|
-
"static/js/main.
|
|
93
|
+
"static/js/main.5ba295e8.js"
|
|
93
94
|
]
|
|
94
95
|
}
|
package/build/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><base href="/"/><meta charset="utf-8"/><link rel="shortcut icon" href="favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"/><meta name="theme-color" content="#000000"/><script>"https:"===window.location.protocol&&document.write('<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />')</script><link rel="manifest" href="manifest.json"/><link rel="stylesheet" href="icons/css/all.css"/><title>Blocklet Server</title><script src="api/env"></script><script defer="defer" src="./static/js/main.
|
|
1
|
+
<!doctype html><html lang="en"><head><base href="/"/><meta charset="utf-8"/><link rel="shortcut icon" href="favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"/><meta name="theme-color" content="#000000"/><script>"https:"===window.location.protocol&&document.write('<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />')</script><link rel="manifest" href="manifest.json"/><link rel="stylesheet" href="icons/css/all.css"/><title>Blocklet Server</title><script src="api/env"></script><script defer="defer" src="./static/js/main.5ba295e8.js"></script><link href="./static/css/main.c9e90622.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[4517],{77327:function(e,t,n){"use strict";n.r(t),n.d(t,{BlockletList:function(){return pe},default:function(){return me}});var r,l,o=n(71171),a=n(33028),i=n(32723),c=n(34795),s=n(96234),u=n(5057),d=n(33518),f=n(75506),m=n.n(f),p=n(85493),h=n(15849),v=n(67654),x=n(11750),b=n(37565),g=n(21769),j=n(74490),y=n(39948),k=n(72904),C=n(37298),w=n(78146),Z=n(44846),O=n(42873),P=n(19561),_=n(31290),L=n(13714),S=n(52118),z=n(35432),M=n(75e3),A=n(30746),B=n(80514),D=n(56048),I=n(82594),R=n(54474),T=n(38242),N=n(60411),E=n(52926),F=n(74094),V=n(17265),U=n(59740),H=n(49603),W=n(24138),G=n(96266),J=["blocklet","skipAccessibilityCheck"];function q(e){var t=e.blocklet,n=e.skipAccessibilityCheck,r=void 0!==n&&n,l=(0,U.Z)(e,J),o=(0,u.useContext)(S.LocaleContext).t,i=(0,W.BZ)(t),c=i.urls,s=i.loading,d=i.recommendedUrl;if(s&&!r)return(0,G.jsx)(Z.Z,(0,a.Z)({size:12},l));var f=r?c[0]:d;return f?(0,G.jsx)(Q,(0,a.Z)((0,a.Z)({},l),{},{children:(0,G.jsx)(K,{children:(0,G.jsx)(H.Z,{href:f,target:"_blank",className:"blocklet-interface",underline:"hover",children:o("common.open")})})})):o("blocklet.router.noAccessibleUrl")}var K=d.default.div(r||(r=(0,o.Z)(["\n display: flex;\n margin: 4px 0;\n"]))),Q=d.default.div(l||(l=(0,o.Z)(["\n .blocklet-interface {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n white-space: nowrap;\n\n img {\n margin-right: 4px;\n }\n }\n"])));q.defaultProps={skipAccessibilityCheck:!1};var X=n(44919),Y=n(29316),$=n(50438),ee=n(31853),te=n(99593),ne=n(50453),re=n(47020),le=n(57090),oe=n(48208);function ae(e){var t=e.onCancel,n=e.onSuccess,r=(0,N.h6)().info,l=(0,S.useLocaleContext)().t,o=(0,oe.useSessionContext)().api,a=(0,ee.default)({loading:!1,error:"",title:"",description:"",isConnectOpen:!1}),i=(0,s.Z)(a,2),c=i[0],u=i[1];return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(te.default,{title:l("blocklet.installFromCreate"),fullWidth:!0,maxWidth:"sm",onClose:function(){return t()},showCloseButton:!0,open:!0,actions:(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(L.default,{onClick:function(e){e.stopPropagation(),t()},color:"inherit",children:l("common.cancel")}),(0,G.jsxs)(L.default,{onClick:function(e){e.stopPropagation(),u({loading:!0,isConnectOpen:!0})},color:"primary","data-cy":"install-blocklet-next-step",variant:"contained",disabled:c.loading||c.error||!c.title||!c.description,style:{marginLeft:8},children:[c.loading&&(0,G.jsx)(Z.Z,{size:16}),l("common.create")]})]}),children:[(0,G.jsx)(ne.Z,{component:"div",children:(0,G.jsxs)(x.Z,{component:"div",children:[(0,G.jsx)(re.Z,{style:{marginBottom:24},label:"Blocklet ".concat(l("common.title")),autoComplete:"off",variant:"outlined",fullWidth:!0,autoFocus:!0,value:c.title,onChange:function(e){u({error:"",title:e.target.value})},disabled:c.loading}),(0,G.jsx)(re.Z,{label:"Blocklet ".concat(l("common.description")),autoComplete:"off",variant:"outlined",fullWidth:!0,value:c.description,onChange:function(e){u({error:"",description:e.target.value})},disabled:c.loading})]})}),!!c.error&&(0,G.jsx)(_.default,{type:"error",style:{width:"100%",marginTop:8},children:c.error})]}),(0,G.jsx)(le.default,{popup:!0,open:c.isConnectOpen,forceConnected:!1,className:"launch-from-create-auth",action:"launch-free-blocklet-by-session",checkFn:o.get,checkTimeout:3e5,webWalletUrl:(0,F.yP)(r),onSuccess:function(e){u({loading:!1,isConnectOpen:!1}),n(e)},extraParams:{title:c.title,description:c.description},messages:{title:l("setup.keyPair.title"),scan:l("setup.keyPair.scan"),confirm:l("setup.keyPair.confirm"),success:l("setup.keyPair.success")},onClose:function(){u({loading:!1,isConnectOpen:!1})}})]})}function ie(e){var t=e.onCreate,n=(0,p.useNavigate)(),r=(0,S.useLocaleContext)().t,l=(0,u.useState)(""),o=(0,s.Z)(l,2),a=o[0],d=o[1],f=(0,u.useState)(""),m=(0,s.Z)(f,2),h=m[0],v=m[1],x=(0,u.useState)(null),b=(0,s.Z)(x,2),g=b[0],j=b[1],y=(0,u.useState)(null),k=(0,s.Z)(y,2),C=k[0],w=k[1],Z=function(){j(null)},O=function(){var e=(0,c.Z)((0,i.Z)().mark((function e(){return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n("/blocklets/restore");case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(Y.default,{onClick:function(){return n("/store")},menuButtonProps:{"data-cy":"open-install-menu"},menu:[(0,G.jsx)(Y.default.Item,{"data-cy":"open-install-form",onClick:function(){j({onCancel:function(){Z(),j(null)},onSuccess:function(){Z()}})},children:r("blocklet.installFromUrl")},"1"),(0,G.jsx)(Y.default.Item,{"data-cy":"open-create-form",onClick:function(){w({onCancel:function(){w(null)},onSuccess:function(){w(null),t.apply(void 0,arguments)}})},children:r("blocklet.installFromCreate")},"2"),(0,G.jsx)(Y.default.Item,{"data-cy":"open-install-from-spaces",onClick:function(){return O()},children:r("blocklet.restoreFromSpaces.title")},"3"),(0,G.jsx)(Y.default.Item,{"data-cy":"open-install-from-spaces",onClick:function(){return function(){var e=new URL("http://localhost");e.searchParams.set("restoreFrom","server"),e.searchParams.set("serverUrl",window.location.href),n("/blocklets/restore".concat(e.search))}()},children:r("blocklet.installFromDiskBackup")},"3")].filter(Boolean),children:[(0,G.jsx)(X.default,{}),r("blocklet.installFromMarket")]}),!!a&&(0,G.jsx)(M.default,{variant:"error",message:a,onClose:function(){return d("")}}),!!h&&(0,G.jsx)(M.default,{variant:"success",duration:3e3,message:h,onClose:function(){return v("")}}),g&&(0,G.jsx)($.default,{onCancel:g.onCancel,onSuccess:g.onSuccess}),C&&(0,G.jsx)(ae,{onCancel:C.onCancel,onSuccess:C.onSuccess})]})}ae.defaultProps={},ie.defaultProps={onCreate:function(){}};var ce,se,ue=n(7199),de="internal",fe="external";function me(){return(0,G.jsx)(B.DeletingBlockletProvider,{children:(0,G.jsx)(pe,{})})}function pe(){var e=(0,p.useNavigate)(),t=(0,N.h6)(),n=(0,h.useSearchParams)(),r=(0,s.Z)(n,2),l=r[0],o=r[1],d=(0,E.RJ)(),f=d.data,U=d.externalData,H=d.error,W=d.refresh,J=d.loading,K=(0,B.useDeletingBlockletContext)(),Q=K.deletingBlocklets,X=K.addDeletingDid,Y=K.removeDeletingDid,$=K.matchDeletingDid,ee=(0,S.useLocaleContext)(),te=ee.t,ne=ee.locale,re=(0,u.useState)(l.get("searchText")),le=(0,s.Z)(re,2),oe=le[0],ae=le[1],ce=(0,v.default)("show-external-blocklet-actions",!1),se=(0,s.Z)(ce,1)[0],me=[{id:de,name:te("blocklet.internal")},{id:fe,name:te("blocklet.external")}],pe=(0,v.default)("blocklet-type-filter",de),xe=(0,s.Z)(pe,2),be=xe[0],ge=xe[1],je=be===de?f:U,ye=(null===t||void 0===t?void 0:t.info.mode)!==z.NODE_MODES.SERVERLESS;$(je.map((function(e){return e.meta.did})));var ke=function(e){var t=e.action,n=e.blocklet;"remove"===t&&X(n.meta.did)},Ce=function(){var e=(0,c.Z)((0,i.Z)().mark((function e(n){return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.error){e.next=4;break}return M.default.error(n.error.message),"remove"===n.action&&Y(n.blocklet.meta.did),e.abrupt("return");case 4:"remove"===n.action&&t.refresh({silent:!0});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),we=(0,k.Z)((function(e){return e.breakpoints.up("md")})),Ze=null,Oe=je||[];if(H)Ze=(0,G.jsx)(_.default,{type:"error",variant:"icon",children:(0,G.jsxs)("div",{children:[(0,F.Z)(H),(0,G.jsx)(L.default,{onClick:function(){return W({silent:!1})},children:(0,G.jsx)("span",{style:{color:"#44cdc6",textDecoration:"underline"},children:te("common.retry")})})]})});else if(Oe.length>0||J){var Pe=["installedAt","startedAt","stoppedAt","createdAt"],_e=function(e){if("starting"===e.status)return new Date("2199").getTime();if("running"===e.status){if(e.appRuntimeInfo)return e.appRuntimeInfo.startAt;if(e.startedAt)return e.startedAt.getTime()}return 0},Le=Oe.map((function(e){return Pe.forEach((function(t){if(e[t]){var n=new Date(e[t]);e[t]=n}})),e})).sort((function(e,t){var n=_e(e);return _e(t)-n}));oe&&(Le=Le.filter((function(e){var t,n=(0,T.getDisplayName)(e)||"",r=(null===(t=e.site)||void 0===t?void 0:t.domainAliases)||[],l=oe.trim().toLocaleLowerCase();return n.toLocaleLowerCase().includes(l)||r.some((function(e){var t;return null===(t=e.value)||void 0===t?void 0:t.toLocaleLowerCase().includes(l)}))})));var Se=(0,C.getDurableData)("blocklets-list");Se.searchText&&!oe&&ae(Se.searchText);var ze=[{label:te("common.name"),name:"meta.title",options:{customBodyRenderLite:function(e){var t=Le[e],n=(0,T.getAppMissingConfigs)(t).length>0?"components":"overview";return(0,G.jsx)(h.Link,{to:"/blocklets/".concat(t.meta.did,"/").concat(n),className:"blocklet-name-wrapper",children:(0,G.jsxs)(x.Z,{component:"strong",variant:"body1",className:"blocklet-name",children:[(0,G.jsx)(R.Z,{blocklet:t,style:{marginRight:8}}),(0,G.jsxs)(y.Z,{children:[(0,G.jsx)(y.Z,{children:(0,T.getDisplayName)(t)}),(0,G.jsxs)(y.Z,{children:[(0,G.jsx)(I.default,{mode:t.mode||""}),!m()(t.controller)&&(0,G.jsx)(D.default,{type:"primary",children:te("blocklet.external")})]})]})]})},t.meta.did)}}},be===de?{label:te("common.visit"),name:"runtimeInfo.pid",align:"left",options:{sort:!1,customBodyRenderLite:function(e){var t=Le[e];return(0,G.jsx)(q,{blocklet:t},t.meta.did)}}}:null,{label:te("common.installedAt"),name:"installedAt",options:{customBodyRenderLite:function(e){var t=Le[e];return t.installedAt?(0,G.jsx)(w.default,{value:t.installedAt.getTime(),locale:ne},t.meta.did):t.createdAt?(0,G.jsx)(w.default,{value:t.createdAt.getTime(),locale:ne},t.meta.did):""}}},{label:te("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite:function(e){var t=Le[e];return"running"===t.status&&t.appRuntimeInfo?(0,G.jsx)(w.default,{value:t.appRuntimeInfo.startAt,locale:ne},t.meta.did):""}}},{label:te("common.status"),name:"status",width:120,align:"center",options:{customBodyRenderLite:function(e){var t=Le[e];return(0,G.jsx)(A.default,{"data-cy":"blocklet-status","status-blocklet-did":t.meta.did,status:Q.includes(t.meta.did)?"deleting":t.status,source:t.source},t.meta.did)}}},be===de||se?{label:te("common.actions"),name:"",width:90,options:{sort:!1,customBodyRenderLite:function(e){var t=Le[e];return(0,G.jsx)(V.Z,{blocklet:t,variant:"menu",onStart:ke,onComplete:Ce},t.meta.did)}}}:null].filter(Boolean),Me={};we||(Me.TableBody=function(e){if(J)return(0,G.jsx)(O.default,{relative:"parent",children:(0,G.jsx)(Z.Z,{})});var t=e.page,n=e.rowsPerPage,r=Le.slice(t*n,(t+1)*n);return r.length?(0,G.jsx)("div",{children:r.map((function(e){var t=(0,T.getAppMissingConfigs)(e).length>0?"components":"overview";return(0,G.jsxs)(y.Z,{className:"blocklet-item--mobile",display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,G.jsx)(R.Z,{className:"blocklet__avatar",blocklet:e,size:we?40:60}),(0,G.jsxs)(h.Link,{className:"blocklet__content",to:"/blocklets/".concat(e.meta.did,"/").concat(t),children:[(0,G.jsxs)(y.Z,{display:"flex",justifyContent:"space-between",alignItems:"flex-start",children:[(0,G.jsx)(x.Z,{component:"strong",variant:"body1",className:"blocklet__name",children:(0,T.getDisplayName)(e,!0)}),(0,G.jsx)(V.Z,{blocklet:e,variant:"menu",onStart:ke,onComplete:Ce},e.meta.did)]}),(0,G.jsxs)(x.Z,{component:"small",className:"blocklet__addons",children:[(0,G.jsx)(y.Z,{display:"flex",alignItems:"center",children:(0,G.jsx)(q,{blocklet:e,style:{marginLeft:16,fontSize:14}})}),(0,G.jsx)(A.default,{"status-blocklet-did":e.meta.did,status:e.status,source:e.source},e.meta.did)]})]})]})}))}):(0,G.jsx)(P.default,{children:te("common.empty")})}),Ze=(0,G.jsx)(he,{children:(0,G.jsx)(C.default,{loading:J,className:"blocklet-list",title:(0,G.jsx)(y.Z,{display:"flex",alignItems:"center",children:te("blocklet.index.tableTitle")}),locale:ne,data:Le,columns:ze,durable:"blocklets-list",options:(0,a.Z)((0,a.Z)({download:!1,filter:!1,print:!1,searchPlaceholder:te("common.search"),searchAlwaysOpen:!1,sortOrder:{name:"uptime",direction:"desc"},searchDebounceTime:300,onSearchChange:function(e){ae(e),o({searchText:null!==e&&void 0!==e?e:""})},customSearch:function(){return!0}},Se),{},{searchText:oe}),components:Me})})}else 0===Oe.length&&(Ze=(0,G.jsx)(_.default,{type:"warning",variant:"icon",children:te("blocklet.index.noBlocklet")}));var Ae=U&&U.length>0;return(0,G.jsxs)(ve,{children:[(0,G.jsxs)(x.Z,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:[(0,G.jsxs)(y.Z,{display:"flex",alignItems:"center",children:[te("common.blocklets"),(Ae||be===fe)&&(0,G.jsx)(b.Z,{sx:{ml:1},children:(0,G.jsx)(g.Z,{value:be,onChange:function(e){return ge(e.target.value)},size:"small",children:me.map((function(e){return(0,G.jsx)(j.Z,{value:e.id,children:te(e.name)},e.id)}))})})]}),(0,G.jsx)(ue.Z,{permission:"mutate_blocklets",children:ye&&(0,G.jsx)(ie,{onCreate:function(t){e("/blocklets/".concat(t.appDid,"/components"))}})})]}),Ze]})}var he=d.default.div(ce||(ce=(0,o.Z)(["\n .blocklet-item--mobile {\n padding: 16px 0;\n }\n"]))),ve=d.default.main(se||(se=(0,o.Z)(["\n .page-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .blocklet-list {\n .blocklet-item--mobile {\n .blocklet__avatar {\n margin-right: -60px;\n }\n .blocklet__content {\n padding-left: 68px;\n flex: 1;\n display: flex;\n flex-direction: column;\n z-index: 1;\n }\n .blocklet__name {\n font-weight: bold;\n text-decoration: none;\n white-space: normal;\n word-break: break-all;\n }\n .blocklet__addons {\n display: flex;\n justify-content: space-between;\n margin-top: 5px;\n margin-bottom: -10px;\n }\n }\n .blocklet-name-wrapper {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n }\n .blocklet-name {\n font-weight: bold;\n text-decoration: underline;\n display: flex;\n align-items: center;\n white-space: normal;\n word-break: break-all;\n }\n\n .blocklet-interface {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n\n img {\n margin-right: 4px;\n }\n }\n\n .MuiToolbar-root {\n display: flex;\n }\n }\n"])))},29316:function(e,t,n){"use strict";var r=n(43681).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=Z;var l,o,a=n(5057),i=g(n(55898)),c=g(n(76720)),s=g(n(44955)),u=g(n(66942)),d=g(n(64807)),f=g(n(77198)),m=g(n(51280)),p=g(n(29379)),h=g(n(66816)),v=n(66044),x=n(96266),b=["size","color","menu","children","variant","onClick","menuButtonProps"];function g(e){return e&&e.__esModule?e:{default:e}}function j(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e,t){if(null==e)return{};var n,r,l=function(e,t){if(null==e)return{};var n,r,l={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}function Z(e){var t=e.size,n=e.color,l=e.menu,o=e.children,i=e.variant,s=e.onClick,p=e.menuButtonProps,v=w(e,b),g=(0,a.useState)(!1),j=r(g,2),y=j[0],C=j[1],Z=(0,a.useRef)(null),_=Array.isArray(l)?l.map((function(e,t){return(0,a.isValidElement)(e)?e:(0,a.createElement)(m.default,k(k({},e),{},{key:t}))})):l;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(O,k(k({variant:i,size:t,color:n,ref:Z},v),{},{children:["function"===typeof o?o():(0,x.jsx)(h.default,{onClick:s,color:n,children:o}),(0,x.jsx)(h.default,k(k({onClick:function(){C((function(e){return!e}))},color:n},p),{},{"aria-label":"more functions",children:(0,x.jsx)(c.default,{})}))]})),(0,x.jsx)(P,{open:y,anchorEl:Z.current,placement:"bottom-end",disablePortal:!1,children:(0,x.jsx)(u.default,{children:(0,x.jsx)(d.default,{onClickAway:function(e){Z.current&&Z.current.contains(e.target)||C(!1)},children:(0,x.jsx)(f.default,{onClick:function(e){e.target.classList.contains("MuiMenuItem-root")&&C(!1)},children:_})})})})]})}Z.propTypes={size:i.default.oneOf(["small","medium","large"]),color:i.default.oneOf(["primary","secondary","inherit"]),menu:i.default.oneOfType([i.default.node,i.default.array]),children:i.default.node,variant:i.default.oneOf(["outlined","contained"]),onClick:i.default.func,menuButtonProps:i.default.object},Z.defaultProps={size:"medium",color:"primary",menu:[],children:null,variant:"contained",onClick:function(){},menuButtonProps:{}},Z.Item=m.default;var O=(0,v.styled)(p.default)(l||(l=j(["\n > .MuiButtonBase-root:last-of-type {\n min-width: 2em;\n padding-left: 0;\n padding-right: 0;\n }\n"]))),P=(0,v.styled)(s.default)(o||(o=j(["\n z-index: ",";\n .MuiList-root {\n padding: 4px 0;\n }\n .MuiListItem-root {\n padding-top: 4px;\n padding-bottom: 4px;\n }\n"])),(function(e){return e.theme.zIndex.tooltip}))},35258:function(e,t,n){"use strict";var r=n(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=r(n(56930)),o=n(96266),a=(0,l.default)((0,o.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"}),"Autorenew");t.default=a},70648:function(e,t,n){"use strict";var r=n(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=r(n(56930)),o=n(96266),a=(0,l.default)((0,o.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"}),"Group");t.default=a},22754:function(e,t,n){"use strict";var r=n(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=r(n(56930)),o=n(96266),a=(0,l.default)((0,o.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");t.default=a},49647:function(e,t,n){"use strict";var r=n(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=r(n(56930)),o=n(96266),a=(0,l.default)((0,o.jsx)("path",{d:"M18 17H6v-2h12v2zm0-4H6v-2h12v2zm0-4H6V7h12v2zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2v20z"}),"Receipt");t.default=a},32207:function(e,t,n){"use strict";var r=n(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=r(n(56930)),o=n(96266),a=(0,l.default)((0,o.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"}),"Replay");t.default=a},17545:function(e,t,n){"use strict";var r=n(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=r(n(56930)),o=n(96266),a=(0,l.default)((0,o.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}),"Settings");t.default=a},98451:function(e,t,n){"use strict";var r=n(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=r(n(56930)),o=n(96266),a=(0,l.default)((0,o.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");t.default=a},3895:function(e,t,n){var r=n(98323),l=n(97247),o=n(89479),a=n(73470),i=n(74631),c=n(51565);e.exports=function(e,t,n,s){var u=-1,d=l,f=!0,m=e.length,p=[],h=t.length;if(!m)return p;n&&(t=a(t,i(n))),s?(d=o,f=!1):t.length>=200&&(d=c,f=!1,t=new r(t));e:for(;++u<m;){var v=e[u],x=null==n?v:n(v);if(v=s||0!==v?v:0,f&&x===x){for(var b=h;b--;)if(t[b]===x)continue e;p.push(v)}else d(t,x,s)||p.push(v)}return p}},13973:function(e,t,n){var r=n(3895),l=n(61350),o=n(43676);e.exports=function(e,t,n){var a=e.length;if(a<2)return a?o(e[0]):[];for(var i=-1,c=Array(a);++i<a;)for(var s=e[i],u=-1;++u<a;)u!=i&&(c[i]=r(c[i]||s,e[u],t,n));return o(l(c,1),t,n)}},75506:function(e,t,n){var r=n(74525),l=n(34493),o=n(79689),a=n(44028),i=n(90653),c=n(43401),s=n(98604),u=n(52563),d=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(i(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||c(e)||u(e)||o(e)))return!e.length;var t=l(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(s(e))return!r(e).length;for(var n in e)if(d.call(e,n))return!1;return!0}},69163:function(e,t,n){var r=n(5948),l=n(86456),o=n(13973),a=n(7244),i=n(59408),c=l((function(e){var t=i(e);return t="function"==typeof t?t:void 0,o(r(e,a),void 0,t)}));e.exports=c},33665:function(e,t,n){"use strict";function r(e){if(null==e)throw new TypeError("Cannot destructure "+e)}n.d(t,{Z:function(){return r}})}}]);
|
|
1
|
+
(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[2082],{77327:function(e,t,n){"use strict";n.r(t),n.d(t,{BlockletList:function(){return pe},default:function(){return me}});var r,l,o=n(71171),a=n(33028),i=n(32723),c=n(34795),s=n(96234),u=n(5057),d=n(33518),f=n(75506),m=n.n(f),p=n(85493),v=n(15849),h=n(67654),x=n(11750),b=n(37565),g=n(21769),j=n(74490),k=n(39948),y=n(72904),C=n(37298),w=n(78146),Z=n(44846),O=n(42873),P=n(19561),_=n(31290),L=n(13714),S=n(52118),B=n(35432),z=n(75e3),M=n(30746),A=n(80514),D=n(56048),I=n(82594),R=n(54474),T=n(38242),N=n(60411),E=n(52926),F=n(74094),V=n(17265),U=n(59740),H=n(49603),W=n(24138),G=n(96266),J=["blocklet","skipAccessibilityCheck"];function q(e){var t=e.blocklet,n=e.skipAccessibilityCheck,r=void 0!==n&&n,l=(0,U.Z)(e,J),o=(0,u.useContext)(S.LocaleContext).t,i=(0,W.BZ)(t),c=i.urls,s=i.loading,d=i.recommendedUrl;if(s&&!r)return(0,G.jsx)(Z.Z,(0,a.Z)({size:12},l));var f=r?c[0]:d;return f?(0,G.jsx)(Q,(0,a.Z)((0,a.Z)({},l),{},{children:(0,G.jsx)(K,{children:(0,G.jsx)(H.Z,{href:f,target:"_blank",className:"blocklet-interface",underline:"hover",children:o("common.open")})})})):o("blocklet.router.noAccessibleUrl")}var K=d.default.div(r||(r=(0,o.Z)(["\n display: flex;\n margin: 4px 0;\n"]))),Q=d.default.div(l||(l=(0,o.Z)(["\n .blocklet-interface {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n white-space: nowrap;\n\n img {\n margin-right: 4px;\n }\n }\n"])));q.defaultProps={skipAccessibilityCheck:!1};var X=n(44919),Y=n(29316),$=n(50438),ee=n(31853),te=n(99593),ne=n(50453),re=n(47020),le=n(57090),oe=n(48208);function ae(e){var t=e.onCancel,n=e.onSuccess,r=(0,N.h6)().info,l=(0,S.useLocaleContext)().t,o=(0,oe.useSessionContext)().api,a=(0,ee.default)({loading:!1,error:"",title:"",description:"",isConnectOpen:!1}),i=(0,s.Z)(a,2),c=i[0],u=i[1];return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(te.default,{title:l("blocklet.installFromCreate"),fullWidth:!0,maxWidth:"sm",onClose:function(){return t()},showCloseButton:!0,open:!0,actions:(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(L.default,{onClick:function(e){e.stopPropagation(),t()},color:"inherit",children:l("common.cancel")}),(0,G.jsxs)(L.default,{onClick:function(e){e.stopPropagation(),u({loading:!0,isConnectOpen:!0})},color:"primary","data-cy":"install-blocklet-next-step",variant:"contained",disabled:c.loading||c.error||!c.title||!c.description,style:{marginLeft:8},children:[c.loading&&(0,G.jsx)(Z.Z,{size:16}),l("common.create")]})]}),children:[(0,G.jsx)(ne.Z,{component:"div",children:(0,G.jsxs)(x.Z,{component:"div",children:[(0,G.jsx)(re.Z,{style:{marginBottom:24},label:"Blocklet ".concat(l("common.title")),autoComplete:"off",variant:"outlined",fullWidth:!0,autoFocus:!0,value:c.title,onChange:function(e){u({error:"",title:e.target.value})},disabled:c.loading}),(0,G.jsx)(re.Z,{label:"Blocklet ".concat(l("common.description")),autoComplete:"off",variant:"outlined",fullWidth:!0,value:c.description,onChange:function(e){u({error:"",description:e.target.value})},disabled:c.loading})]})}),!!c.error&&(0,G.jsx)(_.default,{type:"error",style:{width:"100%",marginTop:8},children:c.error})]}),(0,G.jsx)(le.default,{popup:!0,open:c.isConnectOpen,forceConnected:!1,className:"launch-from-create-auth",action:"launch-free-blocklet-by-session",checkFn:o.get,checkTimeout:3e5,webWalletUrl:(0,F.yP)(r),onSuccess:function(e){u({loading:!1,isConnectOpen:!1}),n(e)},extraParams:{title:c.title,description:c.description},messages:{title:l("setup.keyPair.title"),scan:l("setup.keyPair.scan"),confirm:l("setup.keyPair.confirm"),success:l("setup.keyPair.success")},onClose:function(){u({loading:!1,isConnectOpen:!1})}})]})}function ie(e){var t=e.onCreate,n=(0,p.useNavigate)(),r=(0,S.useLocaleContext)().t,l=(0,u.useState)(""),o=(0,s.Z)(l,2),a=o[0],d=o[1],f=(0,u.useState)(""),m=(0,s.Z)(f,2),v=m[0],h=m[1],x=(0,u.useState)(null),b=(0,s.Z)(x,2),g=b[0],j=b[1],k=(0,u.useState)(null),y=(0,s.Z)(k,2),C=y[0],w=y[1],Z=function(){j(null)},O=function(){var e=(0,c.Z)((0,i.Z)().mark((function e(){return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n("/blocklets/restore");case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(Y.default,{onClick:function(){return n("/store")},menuButtonProps:{"data-cy":"open-install-menu"},menu:[(0,G.jsx)(Y.default.Item,{"data-cy":"open-install-form",onClick:function(){j({onCancel:function(){Z(),j(null)},onSuccess:function(){Z()}})},children:r("blocklet.installFromUrl")},"1"),(0,G.jsx)(Y.default.Item,{"data-cy":"open-create-form",onClick:function(){w({onCancel:function(){w(null)},onSuccess:function(){w(null),t.apply(void 0,arguments)}})},children:r("blocklet.installFromCreate")},"2"),(0,G.jsx)(Y.default.Item,{"data-cy":"open-install-from-spaces",onClick:function(){return O()},children:r("blocklet.restoreFromSpaces.title")},"3"),(0,G.jsx)(Y.default.Item,{"data-cy":"open-install-from-spaces",onClick:function(){return function(){var e=new URL("http://localhost");e.searchParams.set("restoreFrom","server"),e.searchParams.set("serverUrl",window.location.href),n("/blocklets/restore".concat(e.search))}()},children:r("blocklet.installFromDiskBackup")},"3")].filter(Boolean),children:[(0,G.jsx)(X.default,{}),r("blocklet.installFromMarket")]}),!!a&&(0,G.jsx)(z.default,{variant:"error",message:a,onClose:function(){return d("")}}),!!v&&(0,G.jsx)(z.default,{variant:"success",duration:3e3,message:v,onClose:function(){return h("")}}),g&&(0,G.jsx)($.default,{onCancel:g.onCancel,onSuccess:g.onSuccess}),C&&(0,G.jsx)(ae,{onCancel:C.onCancel,onSuccess:C.onSuccess})]})}ae.defaultProps={},ie.defaultProps={onCreate:function(){}};var ce,se,ue=n(7199),de="internal",fe="external";function me(){return(0,G.jsx)(A.DeletingBlockletProvider,{children:(0,G.jsx)(pe,{})})}function pe(){var e=(0,p.useNavigate)(),t=(0,N.h6)(),n=(0,v.useSearchParams)(),r=(0,s.Z)(n,2),l=r[0],o=r[1],d=(0,E.RJ)(),f=d.data,U=d.externalData,H=d.error,W=d.refresh,J=d.loading,K=(0,A.useDeletingBlockletContext)(),Q=K.deletingBlocklets,X=K.addDeletingDid,Y=K.removeDeletingDid,$=K.matchDeletingDid,ee=(0,S.useLocaleContext)(),te=ee.t,ne=ee.locale,re=(0,u.useState)(l.get("searchText")),le=(0,s.Z)(re,2),oe=le[0],ae=le[1],ce=(0,h.default)("show-external-blocklet-actions",!1),se=(0,s.Z)(ce,1)[0],me=[{id:de,name:te("blocklet.internal")},{id:fe,name:te("blocklet.external")}],pe=(0,h.default)("blocklet-type-filter",de),xe=(0,s.Z)(pe,2),be=xe[0],ge=xe[1],je=be===de?f:U,ke=(null===t||void 0===t?void 0:t.info.mode)!==B.NODE_MODES.SERVERLESS;$(je.map((function(e){return e.meta.did})));var ye=function(e){var t=e.action,n=e.blocklet;"remove"===t&&X(n.meta.did)},Ce=function(){var e=(0,c.Z)((0,i.Z)().mark((function e(n){return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.error){e.next=4;break}return z.default.error(n.error.message),"remove"===n.action&&Y(n.blocklet.meta.did),e.abrupt("return");case 4:"remove"===n.action&&t.refresh({silent:!0});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),we=(0,y.Z)((function(e){return e.breakpoints.up("md")})),Ze=null,Oe=je||[];if(H)Ze=(0,G.jsx)(_.default,{type:"error",variant:"icon",children:(0,G.jsxs)("div",{children:[(0,F.Z)(H),(0,G.jsx)(L.default,{onClick:function(){return W({silent:!1})},children:(0,G.jsx)("span",{style:{color:"#44cdc6",textDecoration:"underline"},children:te("common.retry")})})]})});else if(Oe.length>0||J){var Pe=["installedAt","startedAt","stoppedAt","createdAt"],_e=function(e){if("starting"===e.status)return new Date("2199").getTime();if("running"===e.status){if(e.appRuntimeInfo)return e.appRuntimeInfo.startAt;if(e.startedAt)return e.startedAt.getTime()}return 0},Le=Oe.map((function(e){return Pe.forEach((function(t){if(e[t]){var n=new Date(e[t]);e[t]=n}})),e})).sort((function(e,t){var n=_e(e);return _e(t)-n}));oe&&(Le=Le.filter((function(e){var t,n=(0,T.getDisplayName)(e)||"",r=(null===(t=e.site)||void 0===t?void 0:t.domainAliases)||[],l=oe.trim().toLocaleLowerCase();return n.toLocaleLowerCase().includes(l)||r.some((function(e){var t;return null===(t=e.value)||void 0===t?void 0:t.toLocaleLowerCase().includes(l)}))})));var Se=(0,C.getDurableData)("blocklets-list");Se.searchText&&!oe&&ae(Se.searchText);var Be=[{label:te("common.name"),name:"meta.title",options:{customBodyRenderLite:function(e){var t=Le[e],n=(0,T.getAppMissingConfigs)(t).length>0?"components":"overview";return(0,G.jsx)(v.Link,{to:"/blocklets/".concat(t.meta.did,"/").concat(n),className:"blocklet-name-wrapper",children:(0,G.jsxs)(x.Z,{component:"strong",variant:"body1",className:"blocklet-name",children:[(0,G.jsx)(R.Z,{blocklet:t,style:{marginRight:8}}),(0,G.jsxs)(k.Z,{children:[(0,G.jsx)(k.Z,{children:(0,T.getDisplayName)(t)}),(0,G.jsxs)(k.Z,{children:[(0,G.jsx)(I.default,{mode:t.mode||""}),!m()(t.controller)&&(0,G.jsx)(D.default,{type:"primary",children:te("blocklet.external")})]})]})]})},t.meta.did)}}},be===de?{label:te("common.visit"),name:"runtimeInfo.pid",align:"left",options:{sort:!1,customBodyRenderLite:function(e){var t=Le[e];return(0,G.jsx)(q,{blocklet:t},t.meta.did)}}}:null,{label:te("common.installedAt"),name:"installedAt",options:{customBodyRenderLite:function(e){var t=Le[e];return t.installedAt?(0,G.jsx)(w.default,{value:t.installedAt.getTime(),locale:ne},t.meta.did):t.createdAt?(0,G.jsx)(w.default,{value:t.createdAt.getTime(),locale:ne},t.meta.did):""}}},{label:te("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite:function(e){var t=Le[e];return"running"===t.status&&t.appRuntimeInfo?(0,G.jsx)(w.default,{value:t.appRuntimeInfo.startAt,locale:ne},t.meta.did):""}}},{label:te("common.status"),name:"status",width:120,align:"center",options:{customBodyRenderLite:function(e){var t=Le[e];return(0,G.jsx)(M.default,{"data-cy":"blocklet-status","status-blocklet-did":t.meta.did,status:Q.includes(t.meta.did)?"deleting":t.status,source:t.source},t.meta.did)}}},be===de||se?{label:te("common.actions"),name:"",width:90,options:{sort:!1,customBodyRenderLite:function(e){var t=Le[e];return(0,G.jsx)(V.Z,{blocklet:t,variant:"menu",onStart:ye,onComplete:Ce},t.meta.did)}}}:null].filter(Boolean),ze={};we||(ze.TableBody=function(e){if(J)return(0,G.jsx)(O.default,{relative:"parent",children:(0,G.jsx)(Z.Z,{})});var t=e.page,n=e.rowsPerPage,r=Le.slice(t*n,(t+1)*n);return r.length?(0,G.jsx)("div",{children:r.map((function(e){var t=(0,T.getAppMissingConfigs)(e).length>0?"components":"overview";return(0,G.jsxs)(k.Z,{className:"blocklet-item--mobile",display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,G.jsx)(R.Z,{className:"blocklet__avatar",blocklet:e,size:we?40:60}),(0,G.jsxs)(v.Link,{className:"blocklet__content",to:"/blocklets/".concat(e.meta.did,"/").concat(t),children:[(0,G.jsxs)(k.Z,{display:"flex",justifyContent:"space-between",alignItems:"flex-start",children:[(0,G.jsx)(x.Z,{component:"strong",variant:"body1",className:"blocklet__name",children:(0,T.getDisplayName)(e,!0)}),(0,G.jsx)(V.Z,{blocklet:e,variant:"menu",onStart:ye,onComplete:Ce},e.meta.did)]}),(0,G.jsxs)(x.Z,{component:"small",className:"blocklet__addons",children:[(0,G.jsx)(k.Z,{display:"flex",alignItems:"center",children:(0,G.jsx)(q,{blocklet:e,style:{marginLeft:16,fontSize:14}})}),(0,G.jsx)(M.default,{"status-blocklet-did":e.meta.did,status:e.status,source:e.source},e.meta.did)]})]})]})}))}):(0,G.jsx)(P.default,{children:te("common.empty")})}),Ze=(0,G.jsx)(ve,{children:(0,G.jsx)(C.default,{loading:J,className:"blocklet-list",title:(0,G.jsx)(k.Z,{display:"flex",alignItems:"center",children:te("blocklet.index.tableTitle")}),locale:ne,data:Le,columns:Be,durable:"blocklets-list",options:(0,a.Z)((0,a.Z)({download:!1,filter:!1,print:!1,searchPlaceholder:te("common.search"),searchAlwaysOpen:!1,sortOrder:{name:"uptime",direction:"desc"},searchDebounceTime:300,onSearchChange:function(e){ae(e),o({searchText:null!==e&&void 0!==e?e:""})},customSearch:function(){return!0}},Se),{},{searchText:oe}),components:ze})})}else 0===Oe.length&&(Ze=(0,G.jsx)(_.default,{type:"warning",variant:"icon",children:te("blocklet.index.noBlocklet")}));var Me=U&&U.length>0;return(0,G.jsxs)(he,{children:[(0,G.jsxs)(x.Z,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:[(0,G.jsxs)(k.Z,{display:"flex",alignItems:"center",children:[te("common.blocklets"),(Me||be===fe)&&(0,G.jsx)(b.Z,{sx:{ml:1},children:(0,G.jsx)(g.Z,{value:be,onChange:function(e){return ge(e.target.value)},size:"small",children:me.map((function(e){return(0,G.jsx)(j.Z,{value:e.id,children:te(e.name)},e.id)}))})})]}),(0,G.jsx)(ue.Z,{permission:"mutate_blocklets",children:ke&&(0,G.jsx)(ie,{onCreate:function(t){e("/blocklets/".concat(t.appDid,"/components"))}})})]}),Ze]})}var ve=d.default.div(ce||(ce=(0,o.Z)(["\n .blocklet-item--mobile {\n padding: 16px 0;\n }\n"]))),he=d.default.main(se||(se=(0,o.Z)(["\n .page-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .blocklet-list {\n .blocklet-item--mobile {\n .blocklet__avatar {\n margin-right: -60px;\n }\n .blocklet__content {\n padding-left: 68px;\n flex: 1;\n display: flex;\n flex-direction: column;\n z-index: 1;\n }\n .blocklet__name {\n font-weight: bold;\n text-decoration: none;\n white-space: normal;\n word-break: break-all;\n }\n .blocklet__addons {\n display: flex;\n justify-content: space-between;\n margin-top: 5px;\n margin-bottom: -10px;\n }\n }\n .blocklet-name-wrapper {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n }\n .blocklet-name {\n font-weight: bold;\n text-decoration: underline;\n display: flex;\n align-items: center;\n white-space: normal;\n word-break: break-all;\n }\n\n .blocklet-interface {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n\n img {\n margin-right: 4px;\n }\n }\n\n .MuiToolbar-root {\n display: flex;\n }\n }\n"])))},33650:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlockletProvider=t.BlockletContext=t.BlockletConsumer=void 0,t.useBlockletContext=function(){return(0,r.useContext)(l)};var r=n(5057),l=(0,r.createContext)({});t.BlockletContext=l;var o=l.Provider,a=l.Consumer;t.BlockletConsumer=a,t.BlockletProvider=o},29316:function(e,t,n){"use strict";var r=n(43681).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=Z;var l,o,a=n(5057),i=g(n(55898)),c=g(n(76720)),s=g(n(44955)),u=g(n(66942)),d=g(n(64807)),f=g(n(77198)),m=g(n(51280)),p=g(n(29379)),v=g(n(66816)),h=n(66044),x=n(96266),b=["size","color","menu","children","variant","onClick","menuButtonProps"];function g(e){return e&&e.__esModule?e:{default:e}}function j(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e,t){if(null==e)return{};var n,r,l=function(e,t){if(null==e)return{};var n,r,l={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}function Z(e){var t=e.size,n=e.color,l=e.menu,o=e.children,i=e.variant,s=e.onClick,p=e.menuButtonProps,h=w(e,b),g=(0,a.useState)(!1),j=r(g,2),k=j[0],C=j[1],Z=(0,a.useRef)(null),_=Array.isArray(l)?l.map((function(e,t){return(0,a.isValidElement)(e)?e:(0,a.createElement)(m.default,y(y({},e),{},{key:t}))})):l;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(O,y(y({variant:i,size:t,color:n,ref:Z},h),{},{children:["function"===typeof o?o():(0,x.jsx)(v.default,{onClick:s,color:n,children:o}),(0,x.jsx)(v.default,y(y({onClick:function(){C((function(e){return!e}))},color:n},p),{},{"aria-label":"more functions",children:(0,x.jsx)(c.default,{})}))]})),(0,x.jsx)(P,{open:k,anchorEl:Z.current,placement:"bottom-end",disablePortal:!1,children:(0,x.jsx)(u.default,{children:(0,x.jsx)(d.default,{onClickAway:function(e){Z.current&&Z.current.contains(e.target)||C(!1)},children:(0,x.jsx)(f.default,{onClick:function(e){e.target.closest(".MuiMenuItem-root")&&C(!1)},children:_})})})})]})}Z.propTypes={size:i.default.oneOf(["small","medium","large"]),color:i.default.oneOf(["primary","secondary","inherit"]),menu:i.default.oneOfType([i.default.node,i.default.array]),children:i.default.node,variant:i.default.oneOf(["outlined","contained"]),onClick:i.default.func,menuButtonProps:i.default.object},Z.defaultProps={size:"medium",color:"primary",menu:[],children:null,variant:"contained",onClick:function(){},menuButtonProps:{}},Z.Item=m.default;var O=(0,h.styled)(p.default)(l||(l=j(["\n > .MuiButtonBase-root:last-of-type {\n min-width: 2em;\n padding-left: 0;\n padding-right: 0;\n }\n"]))),P=(0,h.styled)(s.default)(o||(o=j(["\n z-index: ",";\n .MuiList-root {\n padding: 4px 0;\n }\n .MuiListItem-root {\n padding-top: 4px;\n padding-bottom: 4px;\n }\n"])),(function(e){return e.theme.zIndex.tooltip}))},35258:function(e,t,n){"use strict";var r=n(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=r(n(56930)),o=n(96266),a=(0,l.default)((0,o.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"}),"Autorenew");t.default=a},70648:function(e,t,n){"use strict";var r=n(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=r(n(56930)),o=n(96266),a=(0,l.default)((0,o.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"}),"Group");t.default=a},22754:function(e,t,n){"use strict";var r=n(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=r(n(56930)),o=n(96266),a=(0,l.default)((0,o.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");t.default=a},49647:function(e,t,n){"use strict";var r=n(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=r(n(56930)),o=n(96266),a=(0,l.default)((0,o.jsx)("path",{d:"M18 17H6v-2h12v2zm0-4H6v-2h12v2zm0-4H6V7h12v2zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2v20z"}),"Receipt");t.default=a},32207:function(e,t,n){"use strict";var r=n(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=r(n(56930)),o=n(96266),a=(0,l.default)((0,o.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"}),"Replay");t.default=a},17545:function(e,t,n){"use strict";var r=n(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=r(n(56930)),o=n(96266),a=(0,l.default)((0,o.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}),"Settings");t.default=a},98451:function(e,t,n){"use strict";var r=n(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=r(n(56930)),o=n(96266),a=(0,l.default)((0,o.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");t.default=a},3895:function(e,t,n){var r=n(98323),l=n(97247),o=n(89479),a=n(73470),i=n(74631),c=n(51565);e.exports=function(e,t,n,s){var u=-1,d=l,f=!0,m=e.length,p=[],v=t.length;if(!m)return p;n&&(t=a(t,i(n))),s?(d=o,f=!1):t.length>=200&&(d=c,f=!1,t=new r(t));e:for(;++u<m;){var h=e[u],x=null==n?h:n(h);if(h=s||0!==h?h:0,f&&x===x){for(var b=v;b--;)if(t[b]===x)continue e;p.push(h)}else d(t,x,s)||p.push(h)}return p}},13973:function(e,t,n){var r=n(3895),l=n(61350),o=n(43676);e.exports=function(e,t,n){var a=e.length;if(a<2)return a?o(e[0]):[];for(var i=-1,c=Array(a);++i<a;)for(var s=e[i],u=-1;++u<a;)u!=i&&(c[i]=r(c[i]||s,e[u],t,n));return o(l(c,1),t,n)}},75506:function(e,t,n){var r=n(74525),l=n(34493),o=n(79689),a=n(44028),i=n(90653),c=n(43401),s=n(98604),u=n(52563),d=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(i(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||c(e)||u(e)||o(e)))return!e.length;var t=l(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(s(e))return!r(e).length;for(var n in e)if(d.call(e,n))return!1;return!0}},69163:function(e,t,n){var r=n(5948),l=n(86456),o=n(13973),a=n(7244),i=n(59408),c=l((function(e){var t=i(e);return t="function"==typeof t?t:void 0,o(r(e,a),void 0,t)}));e.exports=c},33665:function(e,t,n){"use strict";function r(e){if(null==e)throw new TypeError("Cannot destructure "+e)}n.d(t,{Z:function(){return r}})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[4762],{69561:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var r=n(5057),i=l(n(55898)),o=l(n(81407)),a=n(52118),c=n(96266),u=["children"];function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function m(e){var t=e.children,n=d(e,u),i=(0,r.useContext)(a.LocaleContext).t;return(0,c.jsx)(o.default,s(s({tip:i("common.copyTip"),copiedTip:i("common.copiedTip")},n),{},{children:t}))}m.propTypes={children:i.default.any.isRequired}},5140:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;var r=s(n(55898)),i=s(n(67623)),o=s(n(7037)),a=s(n(60001)),c=n(52118),u=s(n(69561)),l=s(n(62923)),f=n(96266);function s(e){return e&&e.__esModule?e:{default:e}}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e){var t=e.title,n=e.description,r=e.confirmPlaceholder,s=e.cancel,p=e.confirm,m=e.params,y=e.onCancel,b=e.onConfirm,v=e.keyName,O=(0,c.useLocaleContext)().t,j={title:function(){return(0,f.jsxs)("div",{children:[t," (".concat(v,")")]})},description:function(e,t){return(0,f.jsxs)("div",{children:[(0,f.jsx)(a.default,{severity:"warning",style:{width:"100%"},children:O("common.notice")}),(0,f.jsx)("div",{style:{marginTop:24,marginBottom:24},dangerouslySetInnerHTML:{__html:n}}),(0,f.jsxs)("div",{style:{marginBottom:24},children:[O("common.click"),"\uff1a",(0,f.jsx)(u.default,{"data-cy":"click-copy",children:v})]}),(0,f.jsx)(i.default,{component:"div",children:(0,f.jsx)(o.default,{label:r,autoComplete:"off","data-cy":"delete-confirm-input",variant:"outlined",fullWidth:!0,autoFocus:!0,value:e.inputVal,onChange:function(n){var r;r=d(d({},e),{},{inputVal:n.target.value,__disableConfirm:v!==n.target.value}),t(d(d({},r),{},{__disableConfirm:r.__disableConfirm}))}})})]})},confirm:p,cancel:s,onConfirm:b,onCancel:y,params:d({inputVal:"",__disableConfirm:!0},m)};return(0,f.jsx)(l.default,{title:j.title,description:j.description,confirm:j.confirm,cancel:j.cancel,params:j.params,onConfirm:j.onConfirm,onCancel:j.onCancel})}y.propTypes={title:r.default.any.isRequired,keyName:r.default.any.isRequired,description:r.default.any.isRequired,confirmPlaceholder:r.default.any.isRequired,cancel:r.default.string,confirm:r.default.string,params:r.default.object,onCancel:r.default.func,onConfirm:r.default.func.isRequired},y.defaultProps={onCancel:function(){},cancel:"",confirm:"Confirm",params:{}}},57490:function(e,t,n){n.d(t,{LN:function(){return O},Nh:function(){return b}});var r,i=n(32723),o=n(34795),a=n(35432),c=(n(74410),n(77828),n(5855),n(82434),n(88084),n(77247),n(90049),n(6352)),u=n.n(c),l=n(54725),f=n.n(l),s=(n(59408),n(3257),n(76811),n(49714),n(41365),n(94874)),p=n.n(s),d=n(57156),m=n.n(d),y=n(45239);n(72443);function b(e,t){return v.apply(this,arguments)}function v(){return(v=(0,o.Z)((0,i.Z)().mark((function e(t,n){var r,o;return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p().post(u()(t,"/api/gql/"),JSON.stringify({query:'{\n getAssetState(address: "'.concat(n,'") {\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,(o=f()(r.data,"data.getAssetState.state"))&&"json"===o.data.typeUrl&&(o.data.value=JSON.parse(o.data.value)),e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}null===(r=window.env)||void 0===r||r.groupPathPrefix,a.ROLES.ADMIN,a.ROLES.OWNER;var O=function(e){return m()((0,y.default)(e))}}}]);
|