Bee Dashboard
\ No newline at end of file
+Bee Dashboard
\ No newline at end of file
diff --git a/static/dashboard/static/js/main.637f9634.chunk.js b/static/dashboard/static/js/main.16628c3e.chunk.js
similarity index 88%
rename from static/dashboard/static/js/main.637f9634.chunk.js
rename to static/dashboard/static/js/main.16628c3e.chunk.js
index fbf19ba..e402b67 100644
--- a/static/dashboard/static/js/main.637f9634.chunk.js
+++ b/static/dashboard/static/js/main.16628c3e.chunk.js
@@ -1,2 +1,2 @@
-(this["webpackJsonp@ethersphere/bee-dashboard"]=this["webpackJsonp@ethersphere/bee-dashboard"]||[]).push([[0],{360:function(e){e.exports=JSON.parse('{"a":{"node":">=12.0.0","npm":">=6.0.0","bee":">=0.6.0"}}')},38:function(e,t,n){"use strict";n.d(t,"f",(function(){return s})),n.d(t,"g",(function(){return l})),n.d(t,"k",(function(){return b})),n.d(t,"h",(function(){return j})),n.d(t,"d",(function(){return h})),n.d(t,"l",(function(){return p})),n.d(t,"e",(function(){return O})),n.d(t,"i",(function(){return f})),n.d(t,"c",(function(){return x})),n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return g})),n.d(t,"j",(function(){return v}));var a=n(3),r=n.n(a),c=n(27),i=n(51),o=n(39);function s(e){return i.BigNumber.isBigNumber(e)&&e.isInteger()||"bigint"===typeof e}function l(e){if(i.BigNumber.isBigNumber(e))return e;if("string"===typeof e)return new i.BigNumber(e);if("bigint"===typeof e)return new i.BigNumber(e.toString());if("number"===typeof e)return new i.BigNumber(e);throw new TypeError("Not a BigNumber or BigNumber convertible value. Type: ".concat(typeof e," value: ").concat(e))}function u(e){return d.apply(this,arguments)}function d(){return(d=Object(c.a)(r.a.mark((function e(t){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){return setTimeout((function(){e()}),t)}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){var t,n={fulfilled:(t=e).filter((function(e){return"fulfilled"===e.status})),rejected:t.filter((function(e){return"rejected"===e.status}))};return{fulfilled:n.fulfilled.map((function(e){return e.value})),rejected:n.rejected.map((function(e){return e.reason?String(e.reason):"Unknown error"}))}}function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;return new Promise(function(){var a=Object(c.a)(r.a.mark((function a(c,i){var o,s;return r.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:o=0;case 1:if(!(o>t/4).toString(16)}))}function O(e){return(e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).replaceAll("_"," ")}function f(e){var t=e;return t<120?"".concat(e," seconds"):(t/=60)<120?"".concat(Math.round(t)," minutes"):(t/=60)<48?"".concat(Math.round(t)," hours"):(t/=24)<14?"".concat(Math.round(t)," days"):(t/=7)<52?"".concat(Math.round(t)," weeks"):"".concat((t/=52).toFixed(1)," years")}function x(e){return 4096*Math.pow(2,e)}function m(e,t){return 5*e/t}function g(e,t){return new o.a(t*BigInt(Math.pow(2,e)))}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"[\u2026]";return e.length<=2*t+n.length?e:"".concat(e.slice(0,t)).concat(n).concat(e.slice(-t))}},39:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(12),r=n(13),c=n(51),i=n(38),o=[18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0],s=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;Object(a.a)(this,e),this.amount=void 0,this.decimals=void 0;var r=Object(i.g)(t);if(!Object(i.f)(r)||!o.includes(n))throw new TypeError("Not a valid token values");this.amount=r,this.decimals=n}return Object(r.a)(e,[{key:"toBigInt",get:function(){return BigInt(this.amount.toFixed(0))}},{key:"toString",get:function(){return this.amount.toFixed(0)}},{key:"toBigNumber",get:function(){return new c.BigNumber(this.amount)}},{key:"toDecimal",get:function(){return this.amount.dividedBy(new c.BigNumber(10).pow(this.decimals))}},{key:"toFixedDecimal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:7;return this.toDecimal.toFixed(e)}},{key:"toSignificantDigits",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:4,t=this.toDecimal.toFixed(16),n=-1,a=!1,r=0;r1&&void 0!==arguments[1]?arguments[1]:16,a=Object(i.g)(t),r=a.multipliedBy(new c.BigNumber(10).pow(n));return new e(r,n)}}]),e}()},409:function(e,t,n){},414:function(e,t,n){},483:function(e,t){},485:function(e,t){},497:function(e,t){},499:function(e,t){},525:function(e,t){},526:function(e,t){},53:function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return l})),n.d(t,"e",(function(){return u})),n.d(t,"d",(function(){return d})),n.d(t,"a",(function(){return b})),n.d(t,"c",(function(){return h})),n.d(t,"f",(function(){return m}));var a=n(3),r=n.n(a),c=n(27),i=n(134),o=n.n(i),s=n(38);function l(){var t=new Uint8Array(32);return crypto.getRandomValues(t),new o.a(e.from(t))}function u(e,t){var n=e.findIndex((function(e){return e.uuid===t.uuid}));-1!==n&&e.splice(n,1),e.unshift(t),localStorage.setItem("feeds",JSON.stringify(e))}function d(e){localStorage.setItem("feeds",JSON.stringify(e))}function b(e,t,n,a){return j.apply(this,arguments)}function j(){return(j=Object(c.a)(r.a.mark((function e(t,n,a,c){var i;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("V3"!==n||c){e.next=2;break}throw Error("V3 passwords require password");case 2:if("PRIVATE_KEY"!==n){e.next=6;break}e.t0=t.getPrivateKeyString(),e.next=9;break;case 6:return e.next=8,t.toV3String(c);case 8:e.t0=e.sent;case 9:return i=e.t0,e.abrupt("return",{uuid:Object(s.l)(),name:a,type:c?"V3":"PRIVATE_KEY",address:t.getAddressString(),identity:i});case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,t){return p.apply(this,arguments)}function p(){return(p=Object(c.a)(r.a.mark((function e(t,n){var a,c,i,o;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(64!==n.length){e.next=5;break}return e.next=3,f("PRIVATE_KEY",n);case 3:return a=e.sent,e.abrupt("return",{uuid:Object(s.l)(),name:t,type:"PRIVATE_KEY",identity:n,address:a.getAddressString()});case 5:if(66!==n.length||!n.toLowerCase().startsWith("0x")){e.next=10;break}return e.next=8,f("PRIVATE_KEY",n.slice(2));case 8:return c=e.sent,e.abrupt("return",{uuid:Object(s.l)(),name:t,type:"PRIVATE_KEY",identity:n,address:c.getAddressString()});case 10:return e.prev=10,i=JSON.parse(n),o=i.address,e.abrupt("return",{uuid:Object(s.l)(),name:t,type:"V3",identity:n,address:o});case 15:return e.prev=15,e.t0=e.catch(10),e.abrupt("return",null);case 18:case"end":return e.stop()}}),e,null,[[10,15]])})))).apply(this,arguments)}function O(e,t){return f(e.type,e.identity,t)}function f(e,t,n){return x.apply(this,arguments)}function x(){return(x=Object(c.a)(r.a.mark((function t(n,a,c){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("PRIVATE_KEY"!==n){t.next=4;break}t.t0=o.a.fromPrivateKey(e.from(v(a),"hex")),t.next=7;break;case 4:return t.next=6,o.a.fromV3(a,c);case 6:t.t0=t.sent;case 7:return t.abrupt("return",t.t0);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function m(e,t,n,a,r){return g.apply(this,arguments)}function g(){return(g=Object(c.a)(r.a.mark((function e(t,n,a,c,i){var o,s;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O(n,i);case 2:if(o=e.sent,n.feedHash){e.next=7;break}return e.next=6,t.createFeedManifest(c,"sequence","00".repeat(32),o.getAddressString());case 6:n.feedHash=e.sent;case 7:return s=t.makeFeedWriter("sequence","00".repeat(32),o.getPrivateKeyString()),e.next=10,s.upload(c,a);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e){return e.toLowerCase().startsWith("0x")?e.slice(2):e}}).call(this,n(26).Buffer)},531:function(e,t){},533:function(e,t){},540:function(e,t){},558:function(e,t){},574:function(e,t){},579:function(e,t){},587:function(e,t){},589:function(e,t){},60:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return c}));var a=n(12);function r(t){return"object"===typeof e&&Object({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_BEE_HOST:"http://localhost:1633",REACT_APP_BEE_DEBUG_HOST:"http://localhost:1635",REACT_APP_BEE_DOCS_HOST:"https://docs.ethswarm.org/docs/",REACT_APP_BEE_DISCORD_HOST:"https://discord.gg/eKr9XPv7",REACT_APP_BLOCKCHAIN_EXPLORER_URL:"https://blockscout.com/xdai/mainnet",REACT_APP_BEE_GITHUB_REPO_URL:"https://api.github.com/repos/ethersphere/bee"})[t]}var c=new function e(){Object(a.a)(this,e),this.BEE_API_HOST=void 0,this.BEE_DEBUG_API_HOST=void 0,this.BLOCKCHAIN_EXPLORER_URL=void 0,this.BEE_DOCS_HOST=void 0,this.BEE_DISCORD_HOST=void 0,this.GITHUB_REPO_URL=void 0,this.BEE_API_HOST=sessionStorage.getItem("api_host")||r("REACT_APP_BEE_HOST")||"http://localhost:1633",this.BEE_DEBUG_API_HOST=sessionStorage.getItem("debug_api_host")||r("REACT_APP_BEE_DEBUG_HOST")||"http://localhost:1635",this.BLOCKCHAIN_EXPLORER_URL=r("REACT_APP_BLOCKCHAIN_EXPLORER_URL")||"https://blockscout.com/xdai/mainnet",this.BEE_DOCS_HOST=r("REACT_APP_BEE_DOCS_HOST")||"https://docs.ethswarm.org/docs/",this.BEE_DISCORD_HOST=r("REACT_APP_BEE_DISCORD_HOST")||"https://discord.gg/eKr9XPv7",this.GITHUB_REPO_URL=r("REACT_APP_BEE_GITHUB_REPO_URL")||"https://api.github.com/repos/ethersphere/bee"};t.b=c}).call(this,n(30))},829:function(e,t,n){"use strict";n.r(t);var a=n(0),r=n.n(a),c=n(29),i=n.n(c),o=(n(409),n(945)),s=n(944),l=n(31),u=n(48),d=(n(414),n(900)),b=n(901),j=n(834),h=n(387),p=n(12),O=n(13),f=n(14),x=n(15),m=n(1),g=function(e){Object(f.a)(n,e);var t=Object(x.a)(n);function n(e){var a;return Object(p.a)(this,n),(a=t.call(this,e)).state={error:null},a}return Object(O.a)(n,[{key:"componentDidCatch",value:function(e,t){console.error({error:e,errorInfo:t})}},{key:"render",value:function(){return this.state.error?Object(m.jsxs)("h1",{children:["Something went wrong. Error: ",this.state.error.message]}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}}]),n}(a.Component),v=n(941),y=n(885),w=n(911),k=n(942),S=n(903),C=n(916),A=n(937),E=n(934),P=n(938),T=n(921),B=n(929),N=n(939),D=n(940),I=n(943),_=n.p+"static/media/logo.3d1155fe.svg",L=n(60),R=n(20),U=n(10),F=n(835),W=n(882),H=n(119),M=n(833),V=n(883),q=n(884),z=Object(j.a)((function(e){return Object(h.a)({root:{width:"100%",padding:0,margin:0,marginTop:e.spacing(4),"&:first-child":{marginTop:0}},rootLevel1:{marginTop:e.spacing(1)},rootLevel2:{marginTop:e.spacing(.5)},header:{backgroundColor:e.palette.background.paper},contentLevel0:{marginTop:e.spacing(1)},contentLevel12:{marginTop:e.spacing(.25)},infoText:{color:"#c9c9c9"}})}));function Y(e){var t=e.children,n=e.label,r=e.level,c=e.defaultOpen,i=e.info,o=z(),s=Object(a.useState)(Boolean(c)),l=Object(U.a)(s,2),u=l[0],d=l[1],b="",j="h1",h=o.contentLevel0;return 1===r?(b=o.rootLevel1,j="h2",h=o.contentLevel12):2===r&&(b=o.rootLevel2,j="h3",h=o.contentLevel12),Object(m.jsxs)("div",{className:"".concat(o.root," ").concat(b),children:[Object(m.jsxs)(F.a,{button:!0,onClick:function(){d(!u)},className:o.header,children:[Object(m.jsx)(W.a,{primary:Object(m.jsx)(H.a,{variant:j,children:n})}),Object(m.jsxs)("div",{style:{display:"flex"},children:[!u&&Object(m.jsx)(H.a,{variant:"body2",className:o.infoText,children:i}),u?Object(m.jsx)(V.a,{}):Object(m.jsx)(q.a,{})]})]}),Object(m.jsx)(M.a,{in:u,timeout:"auto",unmountOnExit:!0,children:Object(m.jsx)("div",{className:h,children:t})})]})}var Z=n(951),G=n(888),K=n(889),J=Object(j.a)((function(e){return Object(h.a)({header:{backgroundColor:e.palette.background.paper,marginBottom:e.spacing(.25),wordBreak:"break-word"},copyValue:{cursor:"pointer",padding:e.spacing(1),borderRadius:0,"&:hover":{backgroundColor:"#fcf2e8",color:e.palette.primary.main}}})}));function X(e){var t=e.label,n=e.value,a=e.tooltip,r=J();return Object(m.jsx)(F.a,{className:r.header,children:Object(m.jsxs)(y.a,{container:!0,direction:"row",justifyContent:"space-between",alignItems:"center",children:[t&&Object(m.jsx)(H.a,{variant:"body1",children:t}),n&&Object(m.jsxs)(H.a,{variant:"body2",children:[n,a&&Object(m.jsx)(Z.a,{title:a,placement:"top",arrow:!0,children:Object(m.jsx)(G.a,{size:"small",className:r.copyValue,children:Object(m.jsx)(K.a,{strokeWidth:1})})})]})]})})}var $=Object(j.a)((function(e){return Object(h.a)({wrapper:{display:"flex",flexDirection:"row",flexWrap:"wrap"},action:{marginBottom:e.spacing(1),marginRight:e.spacing(1)}})}));function Q(e){var t=e.children,n=$();return Array.isArray(t)?Object(m.jsx)("div",{className:n.wrapper,children:t.filter((function(e){return e})).map((function(e,t){return Object(m.jsx)("div",{className:n.action,children:e},t)}))}):Object(m.jsx)(y.a,{container:!0,direction:"row",children:Object(m.jsx)(y.a,{className:n.action,children:t})})}var ee=n(114),te=n.n(ee),ne=n(890),ae=n(891),re=Object(j.a)((function(e){return Object(h.a)({header:{backgroundColor:e.palette.background.paper,marginBottom:e.spacing(.25),borderLeft:"".concat(e.spacing(.25),"px solid rgba(0,0,0,0)"),wordBreak:"break-word"},headerOpen:{borderLeft:"".concat(e.spacing(.25),"px solid ").concat(e.palette.primary.main)},copyValue:{cursor:"pointer",padding:e.spacing(1),borderRadius:0,"&:hover":{backgroundColor:"#fcf2e8",color:e.palette.primary.main}},content:{marginTop:e.spacing(2),marginBottom:e.spacing(2)},keyMargin:{marginRight:e.spacing(1)}})}));function ce(e){var t,n=e.label,r=e.value,c=re(),i=Object(a.useState)(!1),o=Object(U.a)(i,2),s=o[0],l=o[1],u=Object(a.useState)(!1),d=Object(U.a)(u,2),b=d[0],j=d[1],h=function(){return l(!s)},p=function(){return j(!0)},O=function(){return j(!1)},f=function(e){var t=function(e){return e.replace(/^0x/i,"").length}(e);return t%6===0?e.match(/(0x|.{6})/gi)||[]:e.match(/(0x|.{1,8})/gi)||[]}(r),x="string"===typeof(t=r)&&/^0x[0-9a-f]+$/i.test(t),g="".concat(x?"".concat(f[0]," ").concat(f[1]):f[0],"[\u2026]").concat(f[f.length-1]);return Object(m.jsx)(F.a,{className:"".concat(c.header," ").concat(s?c.headerOpen:""),children:Object(m.jsxs)(y.a,{container:!0,direction:"column",justifyContent:"space-between",alignItems:"stretch",children:[Object(m.jsxs)(y.a,{container:!0,direction:"row",justifyContent:"space-between",alignItems:"center",children:[n&&Object(m.jsx)(H.a,{variant:"body1",children:n}),Object(m.jsx)(H.a,{variant:"body2",children:Object(m.jsxs)("div",{children:[!s&&Object(m.jsx)("span",{className:c.copyValue,children:Object(m.jsx)(Z.a,{title:b?"Copied":"Copy",placement:"top",arrow:!0,onClose:O,children:Object(m.jsx)(ee.CopyToClipboard,{text:r,children:Object(m.jsx)("span",{onClick:p,children:r?g:""})})})}),Object(m.jsx)(G.a,{size:"small",className:c.copyValue,children:s?Object(m.jsx)(ne.a,{onClick:h,strokeWidth:1}):Object(m.jsx)(ae.a,{onClick:h,strokeWidth:1})})]})})]}),Object(m.jsx)(M.a,{in:s,timeout:"auto",unmountOnExit:!0,children:Object(m.jsx)("div",{className:c.content,children:Object(m.jsx)(Z.a,{title:b?"Copied":"Copy",placement:"top",arrow:!0,onClose:O,children:Object(m.jsx)(ee.CopyToClipboard,{text:r,children:Object(m.jsx)("span",{onClick:p,children:Object(m.jsx)("span",{className:c.copyValue,children:f.map((function(e,t){return Object(m.jsx)(H.a,{variant:"body2",className:c.keyMargin,component:"span",children:e},t)}))})})})})})})]})})}var ie=n(896),oe=n(894),se=n(902),le=n(898),ue=n(899),de=n(895),be=n(897),je=n(137),he={apiUrl:L.a.BEE_API_HOST,apiDebugUrl:L.a.BEE_DEBUG_API_HOST,beeApi:null,beeDebugApi:null,setApiUrl:function(){},setDebugApiUrl:function(){},lockedApiSettings:!1},pe=Object(a.createContext)(he);pe.Consumer;function Oe(e){var t=e.children,n=e.beeApiUrl,r=e.beeDebugApiUrl,c=e.lockedApiSettings,i=Object(a.useState)(he.apiUrl),o=Object(U.a)(i,2),s=o[0],l=o[1],u=Object(a.useState)(he.apiDebugUrl),d=Object(U.a)(u,2),b=d[0],j=d[1],h=Object(a.useState)(null),p=Object(U.a)(h,2),O=p[0],f=p[1],x=Object(a.useState)(null),g=Object(U.a)(x,2),v=g[0],y=g[1],w=Object(a.useState)(Boolean(c)),k=Object(U.a)(w,1)[0],S=n||s,C=r||b;return Object(a.useEffect)((function(){try{f(new je.Bee(S)),sessionStorage.setItem("api_host",S)}catch(e){f(null)}}),[S]),Object(a.useEffect)((function(){try{y(new je.BeeDebug(C)),sessionStorage.setItem("debug_api_host",C)}catch(e){y(null)}}),[C]),Object(m.jsx)(pe.Provider,{value:{apiUrl:S,apiDebugUrl:C,beeApi:O,beeDebugApi:v,setApiUrl:l,setDebugApiUrl:j,lockedApiSettings:k},children:t})}var fe=n(358),xe=n.n(fe),me=n(892);function ge(e){var t=e.value,n=Object(l.b)().enqueueSnackbar;return Object(m.jsx)("div",{style:{marginRight:"3px",marginLeft:"3px"},children:Object(m.jsx)(G.a,{color:"primary",size:"small",onClick:function(){return n("Copied: ".concat(t),{variant:"success"})},children:Object(m.jsx)(ee.CopyToClipboard,{text:t,children:Object(m.jsx)(me.a,{style:{height:"20px"}})})})})}var ve=n(359),ye=n.n(ve),we=n(893);function ke(e){var t=Object(a.useState)(!1),n=Object(U.a)(t,2),r=n[0],c=n[1];return Object(m.jsxs)("div",{children:[Object(m.jsx)(G.a,{color:"primary",size:"small",onClick:function(){c(!0)},children:Object(m.jsx)(we.a,{})}),Object(m.jsx)(oe.a,{onClose:function(){c(!1)},"aria-labelledby":"simple-dialog-title",open:r,children:Object(m.jsxs)("div",{style:{padding:"30px",textAlign:"center"},children:[Object(m.jsx)(de.a,{id:"simple-dialog-title",children:e.label}),Object(m.jsx)(ye.a,{value:e.value,size:150,bgColor:"#ffffff",fgColor:"#000000",level:"L",includeMargin:!1,renderAs:"svg"})]})})]})}function Se(e){return Object(m.jsx)(H.a,{component:"div",variant:"subtitle1",children:e.address?Object(m.jsxs)("div",{style:{display:"flex"},children:[e.hideBlockie?null:Object(m.jsx)("div",{style:{paddingTop:"5px",marginRight:"10px"},children:Object(m.jsx)(xe.a,{size:20,string:e.address})}),Object(m.jsx)("div",{children:Object(m.jsx)("a",{style:e.truncate?{marginRight:"7px",maxWidth:"200px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"}:{marginRight:"7px"},href:"".concat(L.a.BLOCKCHAIN_EXPLORER_URL,"/").concat(e.transaction?"tx":"address","/").concat(e.address),target:"_blank",rel:"noreferrer",children:e.address})}),Object(m.jsx)(ke,{value:e.address,label:"Ethereum Address"}),Object(m.jsx)(ge,{value:e.address})]}):"-"})}function Ce(e){var t=e.peerId,n=e.uncashedAmount,r=Object(a.useState)(!1),c=Object(U.a)(r,2),i=c[0],o=c[1],s=Object(a.useState)(!1),u=Object(U.a)(s,2),j=u[0],h=u[1],p=Object(l.b)().enqueueSnackbar,O=Object(a.useContext)(pe).beeDebugApi,f=function(){o(!1)};return Object(m.jsxs)("div",{children:[Object(m.jsxs)(ie.a,{variant:"contained",onClick:function(){o(!0)},startIcon:Object(m.jsx)(be.a,{size:"1rem"}),children:["Cash out peer ",t.substr(0,8),"[\u2026]"]}),Object(m.jsxs)(oe.a,{open:i,onClose:f,"aria-labelledby":"form-dialog-title",children:[Object(m.jsx)(de.a,{id:"form-dialog-title",children:"Cashout Cheque"}),Object(m.jsx)(le.a,{children:Object(m.jsxs)(ue.a,{style:{marginTop:"20px",overflowWrap:"break-word"},children:[j&&Object(m.jsxs)(m.Fragment,{children:[Object(m.jsxs)("span",{children:["Cashing out ",Object(m.jsx)("strong",{children:n})," from Peer ",Object(m.jsx)("strong",{children:t}),". Please wait..."]}),Object(m.jsx)(d.a,{style:{textAlign:"center",padding:"50px"},children:Object(m.jsx)(b.a,{})})]}),!j&&Object(m.jsxs)("span",{children:["Are you sure you want to cashout ",Object(m.jsxs)("strong",{children:[n," BZZ"]})," from Peer"," ",Object(m.jsx)("strong",{children:t}),"?"]})]})}),Object(m.jsxs)(se.a,{children:[Object(m.jsx)(ie.a,{onClick:f,color:"primary",children:"Cancel"}),Object(m.jsx)(ie.a,{onClick:function(){O&&(t?(h(!0),O.cashoutLastCheque(t).then((function(e){o(!1),p(Object(m.jsxs)("span",{children:["Successfully cashed out cheque. Transaction",Object(m.jsx)(Se,{hideBlockie:!0,transaction:!0,address:e})]}),{variant:"success"})})).catch((function(e){p(Object(m.jsxs)("span",{children:["Error: ",e.message]}),{variant:"error"})})).finally((function(){h(!1)}))):p(Object(m.jsx)("span",{children:"Peer Id invalid"}),{variant:"error"}))},color:"primary",disabled:j,children:"Yes Cashout"})]})]})]})}function Ae(e){var t=e.accounting,n=e.isLoadingUncashed,a=e.totalUncashed;return Object(m.jsxs)(Y,{label:"Peers (".concat((null===t||void 0===t?void 0:t.length)||0,")"),info:"".concat(a.toFixedDecimal()," BZZ (uncashed)"),children:[Object(m.jsx)(X,{label:"Uncashed Amount Total",value:"".concat(a.toFixedDecimal()," BZZ")}),null===t||void 0===t?void 0:t.map((function(e){var t=e.peer,a=e.balance,r=e.received,c=e.sent,i=e.uncashedAmount,o=e.total;return Object(m.jsxs)(Y,{label:"Peer ".concat(t.substr(0,8),"[\u2026]"),level:1,info:"".concat(i.toFixedDecimal()," BZZ (uncashed)"),children:[Object(m.jsx)(ce,{label:"Peer ID",value:t}),Object(m.jsx)(X,{label:"Outstanding Balance",value:"".concat(a.toFixedDecimal()," BZZ")}),Object(m.jsx)(X,{label:"Settlements Sent / Received",value:"-".concat(c.toFixedDecimal()," / ").concat(r.toFixedDecimal()," BZZ")}),Object(m.jsx)(X,{label:"Total",value:"".concat(o.toFixedDecimal()," BZZ")}),Object(m.jsx)(X,{label:"Uncashed Amount",value:n?"loading\u2026":"".concat(i.toFixedDecimal()," BZZ")}),i.toBigNumber.isGreaterThan("0")&&Object(m.jsx)(Q,{children:Object(m.jsx)(Ce,{uncashedAmount:i.toFixedDecimal(),peerId:t})})]},t)}))]})}var Ee=n(904),Pe=Object(j.a)((function(e){return Object(h.a)({root:{height:"100%"},content:{maxWidth:500,marginBottom:e.spacing(4),"&:last-child":{marginBottom:0}},icon:{height:"1rem"}})}));function Te(){var e=Pe();return Object(m.jsxs)(y.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",className:e.root,children:[Object(m.jsx)(y.a,{item:!0,className:e.content,children:Object(m.jsx)(H.a,{variant:"h1",align:"center",children:"Uh oh, it looks like your node is not connected."})}),Object(m.jsx)(y.a,{item:!0,className:e.content,children:Object(m.jsxs)(H.a,{align:"center",children:["Please check your node status to fix the problem. You can also check out the"," ",Object(m.jsx)(S.a,{href:L.a.BEE_DOCS_HOST,target:"_blank",rel:"noreferrer",children:"Swarm Bee Docs"})," ","or ask for support on the"," ",Object(m.jsx)(S.a,{href:L.a.BEE_DISCORD_HOST,target:"_blank",rel:"noreferrer",children:"Ethereum Swarm Discord"}),"."]})}),Object(m.jsx)(y.a,{item:!0,className:e.content,children:Object(m.jsx)(H.a,{align:"center",children:Object(m.jsx)(ie.a,{component:u.b,variant:"contained",startIcon:Object(m.jsx)(Ee.a,{className:e.icon}),to:pr.STATUS,children:"Check node status"})})})]})}var Be=n(3),Ne=n.n(Be),De=n(27),Ie=n(50),_e=n(155),Le=n.n(_e),Re=n(360),Ue=n(361),Fe=n.n(Ue),We=n(39),He=window.location.search.includes("devMode=1"),Me={status:{all:!1,version:!1,blockchainConnection:!1,debugApiConnection:!1,apiConnection:!1,topology:!1,chequebook:!1},latestPublishedVersion:void 0,latestUserVersion:void 0,latestUserVersionExact:void 0,isLatestBeeVersion:!1,latestBeeVersionUrl:"https://github.com/ethersphere/bee/releases/latest",error:null,apiHealth:!1,debugApiHealth:null,nodeAddresses:null,nodeInfo:null,topology:null,chequebookAddress:null,peers:null,chequebookBalance:null,peerBalances:null,peerCheques:null,settlements:null,chainState:null,latestBeeRelease:null,isLoading:!0,isRefreshing:!1,lastUpdate:null,start:function(){},stop:function(){},refresh:function(){return Promise.reject()}},Ve=Object(a.createContext)(Me);Ve.Consumer;function qe(e,t,n,a,r,c,i,o){var s,l=He||Boolean(Object({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_BEE_HOST:"http://localhost:1633",REACT_APP_BEE_DEBUG_HOST:"http://localhost:1635",REACT_APP_BEE_DOCS_HOST:"https://docs.ethswarm.org/docs/",REACT_APP_BEE_DISCORD_HOST:"https://discord.gg/eKr9XPv7",REACT_APP_BLOCKCHAIN_EXPLORER_URL:"https://blockscout.com/xdai/mainnet",REACT_APP_BEE_GITHUB_REPO_URL:"https://api.github.com/repos/ethersphere/bee"}).REACT_APP_DEV_MODE)||"dev"===(null===n||void 0===n?void 0:n.beeMode),u={version:Boolean(e&&Le.a.satisfies(e.version,Re.a.bee,{includePrerelease:!0})),blockchainConnection:Boolean(null===t||void 0===t?void 0:t.ethereum),debugApiConnection:Boolean("ok"===(null===e||void 0===e?void 0:e.status)),apiConnection:a,topology:Boolean((null===r||void 0===r?void 0:r.connected)&&(null===r||void 0===r?void 0:r.connected)>0)||l,chequebook:Boolean(null===c||void 0===c?void 0:c.chequebookAddress)&&null!==i&&(null===i||void 0===i?void 0:i.totalBalance.toBigNumber.isGreaterThan(0))||l||(s=null===n||void 0===n?void 0:n.beeMode,"ultra-light"===s)};return Object(Ie.a)(Object(Ie.a)({},u),{},{all:!o&&Object.values(u).every((function(e){return e}))})}function ze(e){var t,n,r=e.children,c=Object(a.useContext)(pe),i=c.beeApi,o=c.beeDebugApi,s=Object(a.useState)(!1),l=Object(U.a)(s,2),u=l[0],d=l[1],b=Object(a.useState)(null),j=Object(U.a)(b,2),h=j[0],p=j[1],O=Object(a.useState)(null),f=Object(U.a)(O,2),x=f[0],g=f[1],v=Object(a.useState)(null),y=Object(U.a)(v,2),w=y[0],k=y[1],S=Object(a.useState)(null),C=Object(U.a)(S,2),A=C[0],E=C[1],P=Object(a.useState)(null),T=Object(U.a)(P,2),B=T[0],N=T[1],D=Object(a.useState)(null),I=Object(U.a)(D,2),_=I[0],R=I[1],F=Object(a.useState)(null),W=Object(U.a)(F,2),H=W[0],M=W[1],V=Object(a.useState)(null),q=Object(U.a)(V,2),z=q[0],Y=q[1],Z=Object(a.useState)(null),G=Object(U.a)(Z,2),K=G[0],J=G[1],X=Object(a.useState)(null),$=Object(U.a)(X,2),Q=$[0],ee=$[1],te=Object(a.useState)(null),ne=Object(U.a)(te,2),ae=ne[0],re=ne[1],ce=function(){var e=Object(a.useState)(null),t=Object(U.a)(e,2),n=t[0],r=t[1],c=Object(a.useState)(!1),i=Object(U.a)(c,2),o=i[0],s=i[1],l=Object(a.useState)(null),u=Object(U.a)(l,2),d=u[0],b=u[1];return Object(a.useEffect)((function(){Fe.a.get("".concat(L.a.GITHUB_REPO_URL,"/releases/latest")).then((function(e){r(e.data)})).catch((function(e){b(e)})).finally((function(){s(!1)}))}),[]),{latestBeeRelease:n,isLoadingLatestBeeRelease:o,error:d}}(),ie=ce.latestBeeRelease,oe=Object(a.useState)(Me.error),se=Object(U.a)(oe,2),le=se[0],ue=se[1],de=Object(a.useState)(Me.isLoading),be=Object(U.a)(de,2),je=be[0],he=be[1],Oe=Object(a.useState)(Me.isRefreshing),fe=Object(U.a)(Oe,2),xe=fe[0],me=fe[1],ge=Object(a.useState)(Me.lastUpdate),ve=Object(U.a)(ge,2),ye=ve[0],we=ve[1],ke=Object(a.useState)(3e4),Se=Object(U.a)(ke,2),Ce=Se[0],Ae=Se[1],Ee=null===(t=Le.a.coerce(null===ie||void 0===ie?void 0:ie.name))||void 0===t?void 0:t.version,Pe=null===(n=Le.a.coerce(null===h||void 0===h?void 0:h.version))||void 0===n?void 0:n.version,Te=null===h||void 0===h?void 0:h.version;Object(a.useEffect)((function(){he(!0),d(!1),Be()}),[i]),Object(a.useEffect)((function(){he(!0),p(null),g(null),E(null),k(null),R(null),N(null),M(null),Y(null),J(null),ee(null),re(null),Be()}),[o]);var Be=function(){var e=Object(De.a)(Ne.a.mark((function e(){var t,n,a,r;return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!xe){e.next=2;break}return e.abrupt("return");case 2:if(i&&o){e.next=5;break}return he(!1),e.abrupt("return");case 5:return e.prev=5,me(!0),ue(null),t=function(){var e=Object(De.a)(Ne.a.mark((function e(){var t,n,a;return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.getChequebookBalance();case 2:return t=e.sent,n=t.totalBalance,a=t.availableBalance,e.abrupt("return",{totalBalance:new We.a(n),availableBalance:new We.a(a)});case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),n=function(){var e=Object(De.a)(Ne.a.mark((function e(){var t,n;return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.getAllBalances();case 2:return t=e.sent,n=t.balances,e.abrupt("return",n.map((function(e){var t=e.peer,n=e.balance;return{peer:t,balance:new We.a(n)}})));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),a=function(){var e=Object(De.a)(Ne.a.mark((function e(){var t,n,a,r;return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.getAllSettlements();case 2:return t=e.sent,n=t.totalReceived,a=t.settlements,r=t.totalSent,e.abrupt("return",{totalReceived:new We.a(n),totalSent:new We.a(r),settlements:a.map((function(e){var t=e.peer,n=e.received,a=e.sent;return{peer:t,received:new We.a(n),sent:new We.a(a)}}))});case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),r=[i.isConnected().then(d).catch((function(){return d(!1)})),o.getHealth().then(p).catch((function(){return p(null)})),o.getNodeAddresses().then(g).catch((function(){return g(null)})),o.getNodeInfo().then(k).catch((function(){return k(null)})),o.getTopology().then(E).catch((function(){return E(null)})),o.getPeers().then(R).catch((function(){return R(null)})),o.getChequebookAddress().then(N).catch((function(){return N(null)})),o.getLastCheques().then(J).catch((function(){return J(null)})),o.getChainState().then(re).catch((function(){return re(null)})),t().then(M).catch((function(){return M(null)})),n().then(Y).catch((function(){return Y(null)})),a().then(ee).catch((function(){return ee(null)}))],e.next=14,Promise.allSettled(r);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(5),ue(e.t0);case 19:return e.prev=19,he(!1),me(!1),we(Date.now()),e.finish(19);case 24:case"end":return e.stop()}}),e,null,[[5,16,19,24]])})));return function(){return e.apply(this,arguments)}}();return Object(a.useEffect)((function(){if(Be(),Ce){var e=setInterval(Be,Ce);return function(){return clearInterval(e)}}}),[Ce,o,i]),Object(m.jsx)(Ve.Provider,{value:{status:qe(h,x,w,u,A,B,H,le),latestUserVersion:Pe,latestUserVersionExact:Te,latestPublishedVersion:Ee,isLatestBeeVersion:Boolean(Ee&&Pe&&Le.a.satisfies(Ee,Pe,{includePrerelease:!0})),latestBeeVersionUrl:(null===ie||void 0===ie?void 0:ie.html_url)||"https://github.com/ethersphere/bee/releases/latest",error:le,apiHealth:u,debugApiHealth:h,nodeAddresses:x,nodeInfo:w,topology:A,chequebookAddress:B,peers:_,chequebookBalance:H,peerBalances:z,peerCheques:K,settlements:Q,chainState:ae,latestBeeRelease:ie,isLoading:je,isRefreshing:xe,lastUpdate:ye,start:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e4;return Ae(e)},stop:function(){return Ae(null)},refresh:Be},children:r})}var Ye=n(38);var Ze=function(e,t,n){var r=Object(a.useState)(!1),c=Object(U.a)(r,2),i=c[0],o=c[1],s=Object(a.useState)(void 0),l=Object(U.a)(s,2),u=l[0],d=l[1];Object(a.useEffect)((function(){if(!i&&e&&t&&!u){o(!0);var n=t.settlements.filter((function(e){return e.received.toBigNumber.gt("0")})).map((function(t){var n=t.peer;return Object(Ye.h)((function(){return e.getLastCashoutAction(n)}))}));Promise.allSettled(n).then((function(e){var t=Object(Ye.k)(e);d(t.fulfilled),o(!1)}))}}),[t,i,u,e]);var b=function(e,t,n){if(!e||!t)return null;var a={};return e.forEach((function(e){var t=e.peer,n=e.balance;return a[t]={peer:t,balance:n,sent:new We.a("0"),received:new We.a("0"),uncashedAmount:new We.a("0"),total:n}})),t.forEach((function(e){var t=e.peer,n=e.sent,r=e.received;return a[t]=Object(Ie.a)(Object(Ie.a)({},a[t]),{},{sent:n,received:r,total:new We.a(a[t].balance.toBigNumber.plus(r.toBigNumber).minus(n.toBigNumber))})})),n?(null===n||void 0===n||n.forEach((function(e){var t=e.peer,n=e.uncashedAmount;a[t].uncashedAmount=new We.a(n)})),Object.values(a).sort((function(e,t){var n=t.uncashedAmount.toBigNumber.minus(e.uncashedAmount.toBigNumber).toNumber();return 0!==n?n:e.peer22?n.slice(0,19)+"...":n;function O(){"NEW_WINDOW"===i?window.open(r||n):h(r||n)}return Object(m.jsx)(F.a,{className:l.header,children:Object(m.jsx)(y.a,{container:!0,direction:"column",justifyContent:"space-between",alignItems:"stretch",children:Object(m.jsxs)(y.a,{container:!0,direction:"row",justifyContent:"space-between",alignItems:"center",children:[t&&Object(m.jsx)(H.a,{variant:"body1",children:t}),Object(m.jsx)(H.a,{variant:"body2",children:Object(m.jsxs)("div",{children:[s&&Object(m.jsx)("span",{className:l.copyValue,children:Object(m.jsx)(Z.a,{title:b?"Copied":"Copy",placement:"top",arrow:!0,onClose:function(){return j(!1)},children:Object(m.jsx)(te.a,{text:n,children:Object(m.jsx)("span",{onClick:function(){return j(!0)},children:p})})})}),!s&&Object(m.jsx)("span",{onClick:O,children:p}),Object(m.jsxs)(G.a,{size:"small",className:l.openLinkIcon,children:["NEW_WINDOW"===i&&Object(m.jsx)(C.a,{onClick:O,strokeWidth:1}),"HISTORY_PUSH"===i&&Object(m.jsx)(Kt.a,{onClick:O,strokeWidth:1})]})]})})]})})})}var $t=n(379),Qt=n(918),en=n(919),tn=n(920),nn=["index.html","index.htm"];function an(e){var t=e.map(on);if(!t.length)return!1;var n=t.find((function(e){return nn.includes(e)}));if(n)return{indexPath:n};var a=t[0].split("/")[0]+"/";if(t.every((function(e){return e.startsWith(a)}))){var r=t.find((function(e){return nn.map((function(e){return a+e})).includes(e)}));if(r)return{indexPath:r,commonPrefix:a}}return!1}function rn(e){return e>=1e15?(e/1e15).toFixed(2)+" PB":e>=1e12?(e/1e12).toFixed(2)+" TB":e>=1e9?(e/1e9).toFixed(2)+" GB":e>=1e6?(e/1e6).toFixed(2)+" MB":e>=1e3?(e/1e3).toFixed(2)+" kB":e+" bytes"}function cn(e){if(1===e.length)return e[0].name;if(e.length>0){var t=on(e[0]).split("/")[0];if(e.every((function(e){return on(e).split("/")[0]===t})))return t}return"unknown"}function on(e){return(e.path||e.webkitRelativePath||e.name).replace(/^\//g,"")}function sn(e){var t=on(e);return{path:t,fullPath:t,webkitRelativePath:t,lastModified:e.lastModified,name:e.name,size:e.size,type:e.type,stream:e.stream,slice:e.slice,text:e.text,arrayBuffer:function(){var t=Object(De.a)(Ne.a.mark((function t(){return Ne.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.arrayBuffer();case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()}}function ln(e,t,n){return new Promise((function(a,r){if(!e.size||!e.type||!["image/bmp","image/gif","image/vnd.microsoft.icon","image/jpeg","image/png","image/svg+xml","image/tiff","image/webp"].includes(e.type))return r("File not supported!");try{var c=new FileReader;c.readAsDataURL(e),c.onload=function(e){var r,c=null===e||void 0===e||null===(r=e.target)||void 0===r?void 0:r.result;if(!c||"string"!==typeof c)throw new Error("Failed to load the image source");var i=new Image;i.src=c,i.onload=function(){var e=function(e,t,n,a){var r=n?e/n:1,c=a?t/a:1,i=Math.max(r,c);return i<=1?{width:e,height:t}:{width:e/i,height:t/i}}(i.width,i.height,t,n),r=document.createElement("canvas");r.width=e.width,r.height=e.height;var c=r.getContext("2d");if(!c)throw new Error("Failed to create canvas context");c.drawImage(i,0,0,r.width,r.height),c.canvas.toBlob((function(e){if(!e)throw new Error("Failed to extract the blob from canvas");a(e)}),"image/jpeg",1)}},c.onerror=function(e){return r(e)}}catch(i){r(i)}}))}var un=".swarmgatewaymeta.json",dn=".swarmgatewaypreview.jpeg",bn=250,jn=175,hn={origin:"UPLOAD"},pn={files:[],setFiles:function(){},uploadOrigin:hn,setUploadOrigin:function(){}},On=Object(a.createContext)(pn);On.Consumer;function fn(e){var t=e.children,n=Object(a.useState)(pn.files),r=Object(U.a)(n,2),c=r[0],i=r[1],o=Object(a.useState)(pn.uploadOrigin),s=Object(U.a)(o,2),l=s[0],u=s[1],d=Object(a.useState)(void 0),b=Object(U.a)(d,2),j=b[0],h=b[1],p=Object(a.useState)(void 0),O=Object(U.a)(p,2),f=O[0],x=O[1],g=Object(a.useState)(void 0),v=Object(U.a)(g,2),y=v[0],w=v[1];return Object(a.useEffect)((function(){if(h(function(e){var t=e.reduce((function(e,t){return e+t.size}),0),n=Boolean(an(e));return{size:t,name:cn(e),type:1===e.length?e[0].type:"folder",isWebsite:n,count:e.length}}(c)),f&&(URL.revokeObjectURL(f),x(void 0),w(void 0)),1===c.length&&c[0].type.startsWith("image"))return ln(c[0],bn,jn).then((function(e){x(URL.createObjectURL(e)),w(e)})),function(){f&&URL.revokeObjectURL(f)}}),[c]),Object(m.jsx)(On.Provider,{value:{files:c,setFiles:i,uploadOrigin:l,setUploadOrigin:u,metadata:j,previewUri:f,previewBlob:y},children:t})}var xn=Object(j.a)((function(e){return Object(h.a)({areaWrapper:{position:"relative",marginBottom:e.spacing(2)},dropzone:{background:e.palette.background.default,outline:"none",color:"transparent",zIndex:1,"& svg":{opacity:0}},buttonWrapper:{top:"0",left:"0",position:"absolute",display:"flex",width:"100%",height:"100%",justifyContent:"center",alignItems:"center"},button:{marginLeft:e.spacing(.5),marginRight:e.spacing(.5),zIndex:2}})}));function mn(e){var t=e.uploadOrigin,n=e.showHelp,r=Object(a.useContext)(On),c=r.setFiles,i=r.setUploadOrigin,o=xn(),s=Object(R.g)(),u=Object(l.b)().enqueueSnackbar,d=Object(a.useState)(!1),b=Object(U.a)(d,2),j=b[0],h=b[1],p=Object(a.useState)(0),O=Object(U.a)(p,2),f=O[0],x=O[1],g=function(){return document.querySelector(".MuiDropzoneArea-root input")},v=function(){var e=g();e&&(e.setAttribute("directory",""),e.setAttribute("webkitdirectory",""),e.setAttribute("mozdirectory",""),e.click())};return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsxs)("div",{className:o.areaWrapper,children:[Object(m.jsx)($t.a,{dropzoneClass:o.dropzone,onChange:function(e){if(e){var n=e,a=1===e.length?e[0].name:an(n)||void 0;if(e.length&&j&&!a)return u("To upload a website, there must be an index.html or index.htm in the root of the folder.",{variant:"error"}),void setTimeout((function(){x((function(e){return e+1})),c([])}),0);c(n),e.length&&(i(t),s(pr.UPLOAD_IN_PROGRESS))}},filesLimit:1e9,maxFileSize:1e9,showPreviews:!1},f),Object(m.jsxs)("div",{className:o.buttonWrapper,children:[Object(m.jsx)(st,{className:o.button,onClick:function(){var e=g();e&&(e.removeAttribute("directory"),e.removeAttribute("webkitdirectory"),e.removeAttribute("mozdirectory"),e.click())},iconType:Qt.a,children:"Add File"}),Object(m.jsx)(st,{className:o.button,onClick:function(){v(),h(!1)},iconType:en.a,children:"Add Folder"}),Object(m.jsx)(st,{className:o.button,onClick:function(){v(),h(!0)},iconType:tn.a,children:"Add Website"})]})]}),n&&Object(m.jsx)(Ut,{children:"You can click the buttons above or simply drag and drop to add a file or folder. To upload a website to Swarm, make sure that your folder contains an \u201cindex.html\u201d file."})]})}function gn(){var e=Object(a.useContext)(ut).identities,t=Object(R.h)().uuid,n=Object(a.useContext)(pe).beeApi,r=Object(a.useContext)(Ve).status,c=Object(R.g)(),i=Object(a.useState)(!1),o=Object(U.a)(i,2),s=o[0],l=o[1],u=e.find((function(e){return e.uuid===t}));if(Object(a.useEffect)((function(){if(u&&u.feedHash)try{null===n||void 0===n||n.downloadData(u.feedHash).then((function(){return l(!0)}))}catch(e){l(!1)}}),[n,t,u]),!u||!r.all)return c(pr.FEEDS,{replace:!0}),Object(m.jsx)(m.Fragment,{});return Object(m.jsxs)("div",{children:[Object(m.jsx)(Ht,{children:"".concat(u.name," Website")}),Object(m.jsx)(mn,{showHelp:!1,uploadOrigin:{origin:"FEED",uuid:t}}),s&&u.feedHash?Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(rt.a,{mb:.25,children:Object(m.jsx)(ce,{label:"Feed hash",value:u.feedHash})}),Object(m.jsx)(rt.a,{mb:4,children:Object(m.jsx)(Xt,{label:"BZZ Link",value:"https://".concat(Gt.encodeFeedReference(u.feedHash),".bzz.link")})})]}):Object(m.jsx)(rt.a,{mb:4,children:Object(m.jsxs)(Ut,{children:["This feed is curently not pointing anywhere, you can update the feed to fix this. Please refer to the"," ",Object(m.jsx)("a",{href:"https://docs.ethswarm.org/api/#tag/Feed/paths/~1feeds~1{owner}~1{topic}/post",target:"_blank",rel:"noreferrer",children:"official Bee documentation"}),"."]})}),Object(m.jsx)(Q,{children:Object(m.jsx)(st,{iconType:jt.a,onClick:function(){c(pr.FEEDS)},cancel:!0,children:"Close"})})]})}var vn=n(117),yn={stamps:null,error:null,isLoading:!1,lastUpdate:null,start:function(){},stop:function(){},refresh:function(){return Promise.reject()}},wn=Object(a.createContext)(yn);wn.Consumer;function kn(e){var t=e.depth,n=e.bucketDepth,a=e.utilization/Math.pow(2,t-n),r="".concat(Math.ceil(100*a),"%");return Object(Ie.a)(Object(Ie.a)({},e),{},{usage:a,usageText:r})}function Sn(e){var t=e.children,n=Object(a.useContext)(pe).beeDebugApi,r=Object(a.useState)(yn.stamps),c=Object(U.a)(r,2),i=c[0],o=c[1],s=Object(a.useState)(yn.error),l=Object(U.a)(s,2),u=l[0],d=l[1],b=Object(a.useState)(yn.isLoading),j=Object(U.a)(b,2),h=j[0],p=j[1],O=Object(a.useState)(yn.lastUpdate),f=Object(U.a)(O,2),x=f[0],g=f[1],v=Object(a.useState)(null),y=Object(U.a)(v,2),w=y[0],k=y[1],S=function(){var e=Object(De.a)(Ne.a.mark((function e(){var t;return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!h){e.next=2;break}return e.abrupt("return");case 2:if(n){e.next=4;break}return e.abrupt("return");case 4:return e.prev=4,p(!0),e.next=8,n.getAllPostageBatch();case 8:t=e.sent,o(t.map(kn)),g(Date.now()),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(4),d(e.t0);case 16:return e.prev=16,p(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[4,13,16,19]])})));return function(){return e.apply(this,arguments)}}();return Object(a.useEffect)((function(){if(S(),w){var e=setInterval(S,w);return function(){return clearInterval(e)}}}),[w]),Object(m.jsx)(wn.Provider,{value:{stamps:i,error:u,isLoading:h,lastUpdate:x,start:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e4;return k(e)},stop:function(){return k(null)},refresh:S},children:t})}function Cn(e){var t=e.feedName,n=e.onProceed,r=e.onCancel,c=e.loading,i=Object(a.useState)(""),o=Object(U.a)(i,2),s=o[0],l=o[1];return Object(m.jsxs)(ht,{children:[Object(m.jsx)(rt.a,{mb:4,children:Object(m.jsx)(mt,{onClose:r,children:"Update Feed"})}),Object(m.jsx)(rt.a,{mb:2,children:Object(m.jsxs)(H.a,{children:["Please enter the password for \u201c",t,"\u201d:"]})}),Object(m.jsx)(rt.a,{mb:4,children:Object(m.jsx)(Dt,{label:"Password",name:"password",onChange:function(e){l(e.target.value)},password:!0})}),Object(m.jsxs)(Q,{children:[Object(m.jsx)(st,{iconType:Et.a,onClick:function(){return n(s)},disabled:c,loading:c,children:"Proceed"}),Object(m.jsx)(st,{iconType:jt.a,onClick:r,cancel:!0,disabled:c,children:"Cancel"})]})]})}function An(){var e=Object(a.useContext)(ut),t=e.identities,n=e.setIdentities,r=Object(a.useContext)(pe),c=r.beeApi,i=r.beeDebugApi,o=Object(a.useContext)(wn),s=o.stamps,u=o.refresh,d=Object(a.useContext)(Ve).status,b=Object(R.h)().hash,j=Object(a.useState)(null),h=Object(U.a)(j,2),p=h[0],O=h[1],f=Object(a.useState)(null),x=Object(U.a)(f,2),g=x[0],v=x[1],w=Object(a.useState)(!1),k=Object(U.a)(w,2),S=k[0],C=k[1],A=Object(l.b)().enqueueSnackbar,E=Object(a.useState)(!1),P=Object(U.a)(E,2),B=P[0],N=P[1],D=Object(R.g)();function I(e,t){return _.apply(this,arguments)}function _(){return(_=Object(De.a)(Ne.a.mark((function e(a,r){return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(C(!0),c&&i&&p){e.next=5;break}return A(Object(m.jsx)("span",{children:"Bee API unavailabe"}),{variant:"error"}),C(!1),e.abrupt("return");case 5:return e.prev=5,e.next=8,Object(bt.f)(c,a,b,p,r);case 8:Object(bt.e)(t,a),n(Object(vn.a)(t)),D(pr.FEEDS_PAGE.replace(":uuid",a.uuid)),e.next=18;break;case 13:e.prev=13,e.t0=e.catch(5),C(!1),("object"===typeof e.t0&&null!==e.t0&&Reflect.get(e.t0,"message")||"").includes("possibly wrong passphrase")?A("Wrong password, please try again",{variant:"error"}):A("Could not update feed at this time, please try again later",{variant:"error"});case 18:case"end":return e.stop()}}),e,null,[[5,13]])})))).apply(this,arguments)}return Object(a.useEffect)((function(){u()}),[]),d.all?Object(m.jsxs)("div",{children:[B&&g&&Object(m.jsx)(Cn,{feedName:g.name+" Website",onCancel:function(){N(!1)},onProceed:function(e){I(g,e)},loading:S}),Object(m.jsx)(Ht,{children:"Update feed"}),Object(m.jsx)(rt.a,{mb:2,children:Object(m.jsx)(y.a,{container:!0,children:Object(m.jsx)(zt,{options:t.map((function(e){return{value:e.uuid,label:"".concat(e.name," Website")}})),onChange:function(e){var n=e.target.value;v(t.find((function(e){return e.uuid===n}))||null)},label:"Feed"})})}),Object(m.jsx)(rt.a,{mb:4,children:Object(m.jsx)(y.a,{container:!0,children:s?Object(m.jsx)(zt,{options:s.map((function(e){return{value:e.batchID,label:e.batchID.slice(0,8)}})),onChange:function(e){var t=e.target.value;O(t)},label:"Stamp"}):Object(m.jsx)(H.a,{children:"You need to buy a stamp first to be able to update a feed."})})}),Object(m.jsxs)(Q,{children:[Object(m.jsx)(st,{onClick:function(){g&&("V3"===g.type?N(!0):I(g))},iconType:T.a,loading:!B&&S,disabled:S||!p||!g,children:"Update Selected Feed"}),Object(m.jsx)(st,{onClick:function(){D(-1)},iconType:jt.a,disabled:S,cancel:!0,children:"Close"})]})]}):Object(m.jsx)(Te,{})}var En=n(198),Pn=n(385),Tn=n(922),Bn=n(923),Nn=Object(j.a)((function(e){return Object(h.a)({header:{backgroundColor:"#F7F7F7",marginBottom:e.spacing(.25)},typography:{color:"#242424"}})}));function Dn(e){var t=e.children,n=Nn();return Object(m.jsx)(F.a,{className:n.header,children:Object(m.jsx)(H.a,{variant:"body1",className:n.typography,children:t})})}var In,_n=Object(j.a)((function(e){return Object(h.a)({header:{backgroundColor:e.palette.background.paper,marginBottom:e.spacing(.25),borderLeft:"".concat(e.spacing(.25),"px solid rgba(0,0,0,0)"),wordBreak:"break-word"},headerOpen:{borderLeft:"".concat(e.spacing(.25),"px solid ").concat(e.palette.primary.main)},copyValue:{cursor:"pointer",padding:e.spacing(1),borderRadius:0,"&:hover":{backgroundColor:"#fcf2e8",color:e.palette.primary.main}},content:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},keyMargin:{marginRight:e.spacing(1)},unselectableLabel:{cursor:"default",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"}})}));function Ln(e){var t=e.label,n=e.value,r=e.onConfirm,c=e.onChange,i=e.confirmLabel,o=e.confirmLabelDisabled,s=e.expandedOnly,l=e.helperText,u=e.placeholder,d=e.loading,b=e.mapperFn,j=e.locked,h=_n(),p=Object(a.useState)(Boolean(s)),O=Object(U.a)(p,2),f=O[0],x=O[1],g=Object(a.useState)(n||""),v=Object(U.a)(g,2),w=v[0],k=v[1],S=function(){return x(!f)};return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(F.a,{className:"".concat(h.header," ").concat(f?h.headerOpen:""),children:Object(m.jsxs)(y.a,{container:!0,direction:"column",justifyContent:"space-between",alignItems:"stretch",children:[Object(m.jsxs)(y.a,{container:!0,direction:"row",justifyContent:"space-between",alignItems:"center",children:[t&&Object(m.jsx)(H.a,{variant:"body1",className:h.unselectableLabel,children:t}),Object(m.jsx)(H.a,{variant:"body2",children:Object(m.jsxs)("div",{children:[!f&&n,!s&&!j&&Object(m.jsx)(G.a,{size:"small",className:h.copyValue,children:f?Object(m.jsx)(ne.a,{onClick:S,strokeWidth:1}):Object(m.jsx)(Tn.a,{onClick:S,strokeWidth:1})})]})})]}),Object(m.jsx)(M.a,{in:f,timeout:"auto",unmountOnExit:!0,children:Object(m.jsx)(Pn.a,{value:w,placeholder:u,onChange:function(e){b&&(e.target.value=b(e.target.value)),k(e.target.value),c&&c(e.target.value)},fullWidth:!0,className:h.content,autoFocus:!0,hidden:j})})]})}),Object(m.jsxs)(M.a,{in:f,timeout:"auto",unmountOnExit:!0,children:[l&&Object(m.jsx)(Dn,{children:l}),Object(m.jsxs)(Q,{children:[Object(m.jsx)(st,{disabled:d||w===n||Boolean(o)||""===w&&void 0===n,loading:d,iconType:Bn.a,onClick:function(){return r(w)},children:i||"Save"}),Object(m.jsx)(st,{disabled:d||w===n||""===w,iconType:jt.a,onClick:function(){return k(n||"")},cancel:!0,children:"Cancel"})]})]})]})}function Rn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return"".concat(e.slice(0,t),"[\u2026]").concat(e.slice(-t))}function Un(e,t,n){var a=Fn(e),r=a.findIndex((function(e){return e.hash===t}));-1!==r&&a.splice(r,1),a.unshift({createdAt:Date.now(),hash:t,name:n}),a.length>10&&(a.length=10),localStorage.setItem(e,JSON.stringify(a))}function Fn(e){var t=localStorage.getItem(e);if(!t)return[];try{var n=JSON.parse(t);return Array.isArray(n)&&n.every(Wn)?n:[]}catch(a){return[]}}function Wn(e){return"object"===typeof e&&null!==e&&("createdAt"in e&&"hash"in e)}function Hn(e,t){return"index.html"===t?"Website ".concat(Rn(e,4)):t||"Folder ".concat(Rn(e,4))}function Mn(e){var t=e.title,n=e.localStorageKey,r=Object(a.useState)([]),c=Object(U.a)(r,2),i=c[0],o=c[1];return Object(a.useEffect)((function(){o(Fn(n))}),[n]),i.length?Object(m.jsx)(Y,{label:t,defaultOpen:!0,children:i.map((function(e,t){return Object(m.jsx)(Xt,{label:(n=new Date(e.createdAt),n.toString().split("GMT")[0].trim()),value:e.name,link:"/files/hash/"+e.hash,navigationType:"HISTORY_PUSH",allowClipboard:!1},t);var n}))}):null}!function(e){e.UPLOAD_HISTORY="UPLOAD_HISTORY",e.DOWNLOAD_HISTORY="DOWNLOAD_HISTORY"}(In||(In={}));var Vn=n(948),qn=n(924),zn=Object(j.a)((function(e){return Object(h.a)({root:{flexGrow:1,marginBottom:e.spacing(4)},leftTab:{marginRight:e.spacing(.5)},rightTab:{marginLeft:e.spacing(.5)}})}));function Yn(e){var t=e.active,n=zn(),a=Object(R.g)();return Object(m.jsx)("div",{className:n.root,children:Object(m.jsxs)(Vn.a,{value:"UPLOAD"===t?0:1,onChange:function(e,t){a(1===t?pr.DOWNLOAD:pr.UPLOAD)},variant:"fullWidth",children:[Object(m.jsx)(qn.a,{className:n.leftTab,label:"Upload"},"UPLOAD"),Object(m.jsx)(qn.a,{className:n.rightTab,label:"Download"},"DOWNLOAD")]})})}function Zn(){var e=Object(a.useState)(!1),t=Object(U.a)(e,2),n=t[0],r=t[1],c=Object(a.useContext)(pe).beeApi,i=Object(a.useState)(void 0),o=Object(U.a)(i,2),s=o[0],u=o[1],d=Object(a.useContext)(On).setUploadOrigin,b=Object(l.b)().enqueueSnackbar,j=Object(R.g)();function h(){return(h=Object(De.a)(Ne.a.mark((function e(t){var n,a,i,o;return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r(!0),c){e.next=4;break}return r(!1),e.abrupt("return");case 4:return e.prev=4,n=new En.ManifestJs(c),e.next=8,n.resolveFeedManifest(t);case 8:return(a=e.sent)&&(t=a),e.next=12,n.isManifest(t);case 12:if(e.sent){e.next=15;break}throw Error("The specified hash does not contain valid content.");case 15:return e.next=17,n.getIndexDocumentPath(t);case 17:i=e.sent,Un(In.DOWNLOAD_HISTORY,t,Hn(t,i)),d(hn),j(pr.HASH.replace(":hash",t)),e.next=29;break;case 23:e.prev=23,e.t0=e.catch(4),(o="object"===typeof e.t0&&null!==e.t0&&Reflect.get(e.t0,"message")).includes("path address not found")&&(o="The specified hash does not have an index document set."),o.includes("Not Found: Not Found")&&(o="The specified hash was not found."),b(Object(m.jsxs)("span",{children:["Error: ",o||"Unknown"]}),{variant:"error"});case 29:return e.prev=29,r(!1),e.finish(29);case 32:case"end":return e.stop()}}),e,null,[[4,23,29,32]])})))).apply(this,arguments)}return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(Yn,{active:"DOWNLOAD"}),Object(m.jsx)(Ln,{label:"Swarm Hash",onConfirm:function(e){return function(e){return h.apply(this,arguments)}(e)},onChange:function(e){je.Utils.isHexString(e,64)||je.Utils.isHexString(e,128)||!e.trim().length?u(void 0):u("Incorrect format of swarm hash. Expected 64 or 128 hexstring characters.")},helperText:s,confirmLabel:"Find",confirmLabelDisabled:Boolean(s)||n,placeholder:"e.g. 31fb0362b1a42536134c86bc58b97ac0244e5c6630beec3e27c2d1cecb38c605",expandedOnly:!0,mapperFn:function(e){return function(e){return e.length<64?e:Object(Ye.d)(e)||e}(e)},loading:n}),Object(m.jsx)(Mn,{title:"Download History",localStorageKey:In.DOWNLOAD_HISTORY})]})}var Gn=n(373),Kn=n.n(Gn);function Jn(){return Object(m.jsx)(y.a,{container:!0,direction:"row",justifyContent:"center",alignItems:"center",children:Object(m.jsx)(b.a,{})})}var Xn=n(926),$n=n(925),Qn=n(927),ea=Object(j.a)((function(){return Object(h.a)({image:{width:"100%",height:"100%",objectFit:"cover"}})}));function ta(e){var t=ea(),n={};return e.maxHeight&&(n.maxHeight=e.maxHeight),e.maxWidth&&(n.maxWidth=e.maxWidth),Object(m.jsx)("img",{className:t.image,alt:e.alt,src:e.src,style:n})}var na=Object(j.a)((function(){return Object(h.a)({wrapper:{display:"flex",justifyContent:"center",alignItems:"center",width:"175px",height:"175px",background:"repeating-linear-gradient(\n 45deg,\n #efefef,\n #efefef 4px,\n #ffffff 4px,\n #ffffff 8px\n )"}})}));function aa(e){var t=e.children,n=na();return Object(m.jsx)("div",{className:n.wrapper,children:t})}function ra(e){var t=e.icon;return Object(m.jsx)(aa,{children:t})}function ca(e){var t=e.metadata,n=e.previewUri,a=Object(m.jsx)($n.a,{}),r=null===t||void 0===t?void 0:t.type;return(null===t||void 0===t?void 0:t.isWebsite)?(a=Object(m.jsx)(Xn.a,{}),r="Website"):"folder"===(null===t||void 0===t?void 0:t.type)&&(a=Object(m.jsx)(Qn.a,{}),r="Folder"),Object(m.jsxs)(rt.a,{mb:4,children:[Object(m.jsx)(rt.a,{bgcolor:"background.paper",children:Object(m.jsxs)(y.a,{container:!0,direction:"row",children:[n?Object(m.jsx)(ta,{maxWidth:"250px",maxHeight:"175px",alt:"Upload Preview",src:n}):Object(m.jsx)(ra,{icon:a}),Object(m.jsxs)(rt.a,{p:2,children:[(null===t||void 0===t?void 0:t.hash)&&Object(m.jsxs)(H.a,{children:["Swarm Hash: ",Rn(t.hash)]}),(null===t||void 0===t?void 0:t.name)&&(null===t||void 0===t?void 0:t.name)!==(null===t||void 0===t?void 0:t.hash)&&Object(m.jsxs)(H.a,{children:["folder"===(null===t||void 0===t?void 0:t.type)?"Folder Name":"Filename",": ",Object(Ye.j)(null===t||void 0===t?void 0:t.name)]}),Object(m.jsxs)(H.a,{children:["Kind: ",r]}),(null===t||void 0===t?void 0:t.size)?Object(m.jsxs)(H.a,{children:["Size: ",rn(t.size)]}):null]})]})}),"folder"===(null===t||void 0===t?void 0:t.type)&&t.count&&Object(m.jsx)(rt.a,{mt:.25,p:2,bgcolor:"background.paper",children:Object(m.jsxs)(y.a,{container:!0,justifyContent:"space-between",alignItems:"center",direction:"row",children:[Object(m.jsx)(H.a,{variant:"subtitle2",children:"Folder content"}),Object(m.jsxs)(H.a,{variant:"subtitle2",children:[t.count," items"]})]})})]})}function ia(e){var t=e.isWebsite,n=e.hash;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsxs)(rt.a,{mb:4,children:[Object(m.jsx)(ce,{label:"Swarm hash",value:n}),Object(m.jsx)(Xt,{label:"Share on Swarm Gateway",value:"https://gateway.ethswarm.org/access/".concat(n)}),t&&Object(m.jsx)(Xt,{label:"BZZ Link",value:"https://".concat(Gt.encodeManifestReference(n).toString(),".bzz.link")})]}),Object(m.jsxs)(Ut,{children:["The Swarm Gateway is graciously provided by the Swarm Foundation. This service is under development and provided for testing purposes only. Learn more at"," ",Object(m.jsx)("a",{href:"https://gateway.ethswarm.org/",children:"https://gateway.ethswarm.org/"}),"."]})]})}var oa=n(928);function sa(e){var t=e.onOpen,n=e.onCancel,a=e.onDownload,r=e.onUpdateFeed,c=e.hasIndexDocument,i=e.loading;return Object(m.jsxs)(y.a,{container:!0,justifyContent:"space-between",children:[Object(m.jsxs)(Q,{children:[c&&Object(m.jsx)(st,{onClick:t,iconType:oa.a,disabled:i,children:"View Website"}),Object(m.jsx)(st,{onClick:a,iconType:tt.a,disabled:i,loading:i,children:"Download"}),Object(m.jsx)(st,{onClick:n,iconType:jt.a,disabled:i,cancel:!0,children:"Close"})]}),Object(m.jsx)(rt.a,{mb:1,mr:1,children:Object(m.jsx)(st,{onClick:r,iconType:T.a,disabled:i,children:"Update Feed"})})]})}function la(){var e=Object(a.useContext)(pe),t=e.apiUrl,n=e.beeApi,r=Object(a.useContext)(Ve).status,c=Object(R.h)().hash,i=c,o=Object(R.g)(),s=Object(l.b)().enqueueSnackbar,u=Object(a.useState)(!0),d=Object(U.a)(u,2),b=d[0],j=d[1],h=Object(a.useState)(!1),p=Object(U.a)(h,2),O=p[0],f=p[1],x=Object(a.useState)({}),g=Object(U.a)(x,2),v=g[0],y=g[1],w=Object(a.useState)(null),k=Object(U.a)(w,2),S=k[0],C=k[1],A=Object(a.useState)(!1),E=Object(U.a)(A,2),P=E[0],T=E[1],B=Object(a.useState)(void 0),N=Object(U.a)(B,2),D=N[0],I=N[1],_=Object(a.useState)(),F=Object(U.a)(_,2),W=F[0],M=F[1];function V(){return V=Object(De.a)(Ne.a.mark((function e(){var t,a,o,l,u,d,b,j;return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n&&r.all){e.next=2;break}return e.abrupt("return");case 2:return t=new En.ManifestJs(n),e.next=5,t.isManifest(i);case 5:if(e.sent){e.next=10;break}return T(!0),s("The specified hash does not contain valid content.",{variant:"error"}),e.abrupt("return");case 10:return e.next=12,t.getHashes(i);case 12:return a=e.sent,e.next=15,t.getIndexDocumentPath(i);case 15:return o=e.sent,C(o),l=a[dn],delete a[un],delete a[dn],y(a),u=Object.keys(a).length,d={hash:c,size:0,type:u>1?"folder":"unknown",name:i,isWebsite:Boolean(o)&&u>1,count:u},e.prev=23,e.next=26,n.downloadFile(i,un);case 26:b=e.sent,j=b.data.text(),d=Object(Ie.a)(Object(Ie.a)({},d),JSON.parse(j)),e.next=33;break;case 31:e.prev=31,e.t0=e.catch(23);case 33:l&&I("".concat(L.b.BEE_API_HOST,"/bzz/").concat(i,"/").concat(dn)),M(d);case 35:case"end":return e.stop()}}),e,null,[[23,31]])}))),V.apply(this,arguments)}function q(){return(q=Object(De.a)(Ne.a.mark((function e(){var a,r,c,o,s,l,u;return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return");case 2:if(Un(In.DOWNLOAD_HISTORY,i,Hn(i,S)),f(!0),1!==Object.keys(v).length){e.next=8;break}window.open("".concat(t,"/bzz/").concat(i,"/"),"_blank"),e.next=25;break;case 8:a=new Kn.a,r=0,c=Object.entries(v);case 10:if(!(r0?o(-1):o(pr.UPLOAD)},onDownload:function(){return q.apply(this,arguments)},onUpdateFeed:function(){o(pr.FEEDS_UPDATE.replace(":hash",i))},hasIndexDocument:Boolean(null===W||void 0===W?void 0:W.isWebsite),loading:O})]}):Object(m.jsx)(Te,{})}var ua=Object(j.a)((function(){return Object(h.a)({wrapper:{height:"52px",display:"flex",flex:1,justifyContent:"center",alignItems:"center"},todo:{background:"#f7f7f7",color:"#c9c9c9"},inProgress:{background:"#ffffff",color:"#242424",height:"52px"},done:{background:"#f7f7f7",color:"#606060",height:"52px"}})}));function da(e){var t=e.steps,n=e.index,a=ua();function r(e){return e===n?a.inProgress:e255)return"-";var n=Object(Ye.a)(e,t);return"".concat(n.toSignificantDigits()," BZZ")}return Object(m.jsx)(Tt.c,{initialValues:ba,onSubmit:function(){var e=Object(De.a)(Ne.a.mark((function e(n,a){var o,s,l;return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n.depth&&n.amount){e.next=3;break}return e.abrupt("return");case 3:if(c){e.next=5;break}return e.abrupt("return");case 5:return o=BigInt(n.amount),s=Number.parseInt(n.depth),l=n.label?{label:n.label}:void 0,e.next=10,c.createPostageBatch(o.toString(),s,l);case 10:return a.resetForm(),e.next=13,r();case 13:t(),e.next=20;break;case 16:e.prev=16,e.t0=e.catch(0),i("Error: ".concat(e.t0.message),{variant:"error"}),a.setSubmitting(!1);case 20:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t,n){return e.apply(this,arguments)}}(),validate:function(e){var t={};if(e.depth){var n=new Ke.a(e.depth);n.isInteger()?n.isLessThan(16)?t.depth="Minimal depth is 16":n.isGreaterThan(255)&&(t.depth="Depth has to be at most 255"):t.depth="Depth must be an integer"}else t.depth="Required field";if(e.amount){var a=new Ke.a(e.amount);a.isInteger()?a.isLessThanOrEqualTo(0)&&(t.amount="Amount must be greater than 0"):t.amount="Amount must be an integer"}else t.amount="Required field";return e.label&&!/^[0-9a-z]*$/i.test(e.label)&&(t.label="Label must be an alphanumeric string"),t},children:function(e){var t,n=e.submitForm,a=e.isValid,r=e.isSubmitting,c=e.values;return Object(m.jsxs)(Tt.b,{children:[Object(m.jsxs)(rt.a,{mb:2,children:[Object(m.jsx)(Dt,{name:"depth",label:"Depth",formik:!0}),Object(m.jsx)(rt.a,{mt:.25,sx:{bgcolor:"#f6f6f6"},p:2,children:Object(m.jsxs)(y.a,{container:!0,justifyContent:"space-between",children:[Object(m.jsx)(H.a,{children:"Corresponding file size"}),Object(m.jsx)(H.a,{children:(t=parseInt(c.depth||"0",10),isNaN(t)||t<17||t>255?"-":"~".concat(rn(Object(Ye.c)(t))))})]})})]}),Object(m.jsxs)(rt.a,{mb:2,children:[Object(m.jsx)(Dt,{name:"amount",label:"Amount",formik:!0}),Object(m.jsx)(rt.a,{mt:.25,sx:{bgcolor:"#f6f6f6"},p:2,children:Object(m.jsxs)(y.a,{container:!0,justifyContent:"space-between",children:[Object(m.jsx)(H.a,{children:"Corresponding TTL (Time to live)"}),Object(m.jsx)(H.a,{children:o(Number.parseInt(c.amount||"0",10))})]})})]}),Object(m.jsx)(rt.a,{mb:2,children:Object(m.jsx)(Dt,{name:"label",label:"Label",optional:!0,formik:!0})}),Object(m.jsx)(rt.a,{mb:4,sx:{bgcolor:"#fcf2e8"},p:2,children:Object(m.jsxs)(y.a,{container:!0,justifyContent:"space-between",children:[Object(m.jsx)(H.a,{children:"Indicative Price"}),Object(m.jsx)(H.a,{children:s(parseInt(c.depth||"0",10),BigInt(c.amount||"0"))})]})}),Object(m.jsx)(st,{disabled:r||!a||!c.amount||!c.depth,onClick:n,iconType:Et.a,loading:r,children:"Buy New Stamp"})]})}})}function ha(e){var t=e.onSelect,n=e.defaultValue,r=Object(a.useContext)(wn).stamps;return Object(m.jsx)(zt,{options:(r||[]).map((function(e){return{label:e.batchID.slice(0,8),value:e.batchID}})),onChange:function(e){return function(e){if(r){var n=r.find((function(t){return t.batchID===e}));n&&t(n)}}(e.target.value)},defaultValue:n})}function pa(e){var t=e.width,n=e.usage,a=Math.round(100*n),r=a+"%",c=98-a+"%";return Object(m.jsx)("div",{style:{display:"flex",alignItems:"center",height:"100%",width:t},children:Object(m.jsxs)("div",{style:{display:"flex",height:"4px",width:"100%"},children:[Object(m.jsx)("div",{style:{width:r,background:"#dd7200"}}),Object(m.jsx)("div",{style:{width:"2%"}}),Object(m.jsx)("div",{style:{width:c,background:"#c9c9c9"}})]})})}function Oa(e){var t=e.stamp,n=e.shorten;return Object(m.jsx)(rt.a,{p:2,width:"100%",children:Object(m.jsxs)(y.a,{container:!0,justifyContent:"space-between",alignItems:"center",direction:"row",children:[Object(m.jsx)(H.a,{variant:"subtitle2",children:n?t.batchID.slice(0,8):t.batchID}),Object(m.jsx)(pa,{width:"100px",usage:t.usage})]})})}function fa(e){var t=e.stamp;return Object(m.jsxs)(rt.a,{mb:4,children:[Object(m.jsx)(rt.a,{mb:.25,p:2,bgcolor:"background.paper",children:Object(m.jsx)(H.a,{variant:"subtitle2",children:"Associated postage stamp:"})}),Object(m.jsx)(rt.a,{bgcolor:"background.paper",children:Object(m.jsx)(Oa,{stamp:t,shorten:!0})})]})}var xa=n(930);function ma(e){var t=e.step,n=e.onUpload,a=e.onCancel,r=e.onGoBack,c=e.onProceed,i=e.isUploading,o=e.hasStamp,s=e.uploadLabel,l=e.stampMode,u=e.setStampMode;return 0===t?Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(rt.a,{mb:1,children:Object(m.jsxs)(Q,{children:[Object(m.jsx)(st,{onClick:c,iconType:B.a,children:"Add Postage Stamp"}),Object(m.jsx)(st,{onClick:a,iconType:jt.a,cancel:!0,children:"Cancel"})]})}),Object(m.jsx)(Ut,{children:"You need a postage stamp to upload."})]}):1===t?Object(m.jsxs)(y.a,{container:!0,direction:"row",justifyContent:"space-between",children:[Object(m.jsxs)(Q,{children:["SELECT"===l&&Object(m.jsx)(st,{onClick:c,iconType:Et.a,disabled:!o,children:"Proceed With Selected Stamp"}),Object(m.jsx)(st,{onClick:r,iconType:xa.a,cancel:!0,children:"Back To Preview"})]}),Object(m.jsx)(st,{onClick:function(){return u("BUY"===l?"SELECT":"BUY")},iconType:"BUY"===l?B.a:ct.a,children:"BUY"===l?"Use Existing Stamp":"Buy New Stamp"})]}):2===t?Object(m.jsxs)(Q,{children:[Object(m.jsx)(st,{onClick:n,iconType:Et.a,disabled:i,loading:i,children:s}),Object(m.jsx)(st,{onClick:r,iconType:xa.a,disabled:i,cancel:!0,children:"Change Postage Stamp"})]}):Object(m.jsx)(m.Fragment,{})}function ga(){var e=Object(a.useState)(0),t=Object(U.a)(e,2),n=t[0],r=t[1],c=Object(a.useState)("SELECT"),i=Object(U.a)(c,2),o=i[0],s=i[1],u=Object(a.useState)(null),d=Object(U.a)(u,2),b=d[0],j=d[1],h=Object(a.useState)(!1),p=Object(U.a)(h,2),O=p[0],f=p[1],x=Object(a.useState)(!1),g=Object(U.a)(x,2),v=g[0],y=g[1],w=Object(a.useContext)(wn).refresh,k=Object(a.useContext)(pe).beeApi,S=Object(a.useContext)(On),C=S.files,A=S.setFiles,E=S.uploadOrigin,P=S.metadata,T=S.previewUri,B=S.previewBlob,N=Object(a.useContext)(ut),D=N.identities,I=N.setIdentities,_=Object(a.useContext)(Ve).status,L=Object(l.b)().enqueueSnackbar,F=Object(R.g)();if(Object(a.useEffect)((function(){w()}),[]),!_.all)return Object(m.jsx)(Te,{});if(!C.length)return A([]),F(pr.UPLOAD,{replace:!0}),Object(m.jsx)(m.Fragment,{});var W=E.uuid?D.find((function(e){return e.uuid===E.uuid})):null,H=function(e){if(k&&C.length&&b&&P){var t=C.map(sn),n=void 0;if(1===C.length)n=C[0].name;else if(C.length>1){var a=an(C);if(a)if(a.commonPrefix){var r=a.commonPrefix.length;n=a.indexPath.substr(r),t=t.map((function(e){var t=e.path.substr(r);return Object(Ie.a)(Object(Ie.a)({},e),{},{path:t,webkitRelativePath:t,fullPath:t})}))}else n=a.indexPath}var c=C[0].lastModified,i={name:P.name,size:P.size};1===C.length&&(i.type=P.type);var o=new File([JSON.stringify(i)],un,{type:"application/json",lastModified:c});if(t.push(sn(o)),B){var s=new File([B],dn,{type:"image/jpeg",lastModified:c});t.push(sn(s))}f(!0),k.uploadFiles(b.batchID,t,{indexDocument:n}).then((function(t){Un(In.UPLOAD_HISTORY,t.reference,cn(C)),"UPLOAD"===E.origin?F(pr.HASH.replace(":hash",t.reference),{replace:!0}):Object(bt.f)(k,W,t.reference,b.batchID,e).then((function(){Object(bt.e)(D,W),I(Object(vn.a)(D)),F(pr.FEEDS_PAGE.replace(":uuid",E.uuid),{replace:!0})}))})).catch((function(e){L("Error uploading: ".concat(e.message),{variant:"error"}),f(!1)}))}};return Object(m.jsxs)(m.Fragment,{children:[v&&Object(m.jsx)(Cn,{loading:O,feedName:W.name,onCancel:function(){return y(!1)},onProceed:function(e){H(e)}}),W&&Object(m.jsx)(Ht,{children:'Update "'.concat(W.name,'"')}),!W&&Object(m.jsx)(Ht,{children:"Upload"}),Object(m.jsx)(rt.a,{mb:4,children:Object(m.jsx)(da,{steps:["Preview","Add postage stamp","Upload to node"],index:n})}),(0===n||2===n)&&Object(m.jsx)(ca,{metadata:P,previewUri:T}),1===n&&Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(rt.a,{mb:2,children:"SELECT"===o?Object(m.jsx)(ha,{onSelect:function(e){return j(e)},defaultValue:null===b||void 0===b?void 0:b.batchID}):Object(m.jsx)(ja,{onFinished:function(){return s("SELECT")}})}),Object(m.jsx)(rt.a,{mb:4,children:Object(m.jsxs)(Ut,{children:["Please refer to the"," ",Object(m.jsx)("a",{href:"https://docs.ethswarm.org/debug-api/#tag/Postage-Stamps/paths/~1stamps~1{amount}~1{depth}/post",target:"_blank",rel:"noreferrer",children:"official Bee documentation"})," ","to understand these values."]})})]}),2===n&&b&&Object(m.jsx)(fa,{stamp:b}),Object(m.jsx)(ma,{step:n,onCancel:function(){r(0),A([]),j(null),f(!1)},onGoBack:function(){return r((function(e){return e-1}))},onProceed:function(){return r((function(e){return e+1}))},onUpload:function(){"UPLOAD"===E.origin||"PRIVATE_KEY"===W.type?H():y(!0)},isUploading:O,hasStamp:Boolean(b),uploadLabel:W?"Update Feed":"Upload To Your Node",stampMode:o,setStampMode:s})]})}function va(){return Object(a.useContext)(Ve).status.all?Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(Yn,{active:"UPLOAD"}),Object(m.jsx)(mn,{showHelp:!0,uploadOrigin:hn}),Object(m.jsx)(Mn,{title:"Upload History",localStorageKey:In.UPLOAD_HISTORY})]}):Object(m.jsx)(Te,{})}var ya=n(193),wa=1e5,ka="There may be issues with your Bee node or connection.",Sa={connectedPeers:[{minimumValue:200,explanation:"Perfect! ".concat(200," or more connected peers indicate a healthy topology."),score:2},{minimumValue:1,explanation:"Your Bee node is connected to peers, but this number should ideally be above ".concat(200,". If you have only started your Bee node, this number may increase quickly."),score:1},{minimumValue:0,explanation:"Your Bee node has not connected to any peers. "+ka,score:0}],population:[{minimumValue:wa,explanation:"Perfect! Your Bee node seems to have a realistic value for the network size, which means everything is working well on your end.",score:2},{minimumValue:1,explanation:"Population is usually above ".concat(wa.toLocaleString(),". If the number does not increase within a few hours, there may be issues with your Bee node."),score:1},{minimumValue:0,explanation:"Your Bee node has no information on the network population. "+ka,score:0}],depth:[{minimumValue:12,explanation:"Perfect! Your Bee node has the highest available depth.",score:2},{minimumValue:1,explanation:"Your Bee node is supposed to reach a depth of ".concat(12," eventually. Stagnation or decrease in this number may indicate problems with your Bee node."),score:1},{minimumValue:0,explanation:"Your Bee node has not started building its topology yet. "+ka,score:0}]};function Ca(e,t){var n,a=Sa[e],r=a[0].score,c=Object(ya.a)(a);try{for(c.s();!(n=c.n()).done;){var i=n.value;if(t>=i.minimumValue)return{score:i.score,maximumScore:r,explanation:i.explanation}}}catch(s){c.e(s)}finally{c.f()}var o=a[a.length-1];return{score:o.score,maximumScore:r,explanation:o.explanation}}var Aa=function(e){var t,n,a,r,c,i,o={connectedPeers:Ca("connectedPeers",(null===(t=e.topology)||void 0===t?void 0:t.connected)||0),population:Ca("population",(null===(n=e.topology)||void 0===n?void 0:n.population)||0),depth:Ca("depth",(null===(a=e.topology)||void 0===a?void 0:a.depth)||0)},s=Object.values(o).reduce((function(e,t){return e+t.maximumScore}),0),l=Object.values(o).reduce((function(e,t){return e+t.score}),0),u=Math.round(l/s*100)+"%";return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(X,{label:"Overall Health Indicator",value:u}),Object(m.jsx)(X,{label:"Connected Peers",value:null===(r=e.topology)||void 0===r?void 0:r.connected.toString(),tooltip:o.connectedPeers.explanation}),Object(m.jsx)(X,{label:"Population",value:null===(c=e.topology)||void 0===c?void 0:c.population.toString(),tooltip:o.population.explanation}),Object(m.jsx)(X,{label:"Depth",value:null===(i=e.topology)||void 0===i?void 0:i.depth.toString(),tooltip:o.depth.explanation})]})};function Ea(){var e=Object(a.useContext)(Ve),t=e.nodeInfo,n=e.status,r=e.latestUserVersion,c=e.isLatestBeeVersion,i=e.latestBeeVersionUrl,o=e.topology,s=e.nodeAddresses,l=e.chequebookAddress;return n.all?Object(m.jsxs)("div",{children:[Object(m.jsxs)(Y,{label:"Bee Node",defaultOpen:!0,children:[Object(m.jsx)(X,{label:"Mode",value:(null===t||void 0===t?void 0:t.beeMode)||"Unknown"}),Object(m.jsx)(X,{label:"Agent",value:Object(m.jsxs)("div",{children:[Object(m.jsx)("a",{href:"https://github.com/ethersphere/bee",rel:"noreferrer",target:"_blank",children:"Bee"})," ".concat(r||"-"," "),Object(m.jsx)(ie.a,{size:"small",variant:"outlined",href:i,target:"_blank",children:c?"latest":"update"})]})}),Object(m.jsx)(ce,{label:"Public key",value:(null===s||void 0===s?void 0:s.publicKey)||""}),Object(m.jsx)(ce,{label:"PSS public key",value:(null===s||void 0===s?void 0:s.pssPublicKey)||""}),Object(m.jsx)(ce,{label:"Overlay address (Peer ID)",value:(null===s||void 0===s?void 0:s.overlay)||""}),Object(m.jsx)(Y,{level:1,label:"Underlay addresses",children:null===s||void 0===s?void 0:s.underlay.map((function(e){return Object(m.jsx)(X,{value:e},e)}))})]}),Object(m.jsxs)(Y,{label:"Blockchain",defaultOpen:!0,children:[Object(m.jsx)(ce,{label:"Ethereum address",value:(null===s||void 0===s?void 0:s.ethereum)||""}),Object(m.jsx)(ce,{label:"Chequebook contract address",value:(null===l||void 0===l?void 0:l.chequebookAddress)||""})]}),Object(m.jsx)(Y,{label:"Connectivity",defaultOpen:!0,children:Object(m.jsx)(Aa,{topology:o})})]}):Object(m.jsx)(Te,{})}function Pa(){var e=Object(a.useContext)(pe),t=e.apiUrl,n=e.apiDebugUrl,r=e.setApiUrl,c=e.setDebugApiUrl,i=e.lockedApiSettings;return Object(m.jsxs)(Y,{label:"API Settings",defaultOpen:!0,children:[Object(m.jsx)(Ln,{label:"Bee API",value:t,onConfirm:r,locked:i}),Object(m.jsx)(Ln,{label:"Bee Debug API",value:n,onConfirm:c,locked:i})]})}var Ta=Object(j.a)((function(e){return Object(h.a)({root:{width:"100%",padding:0,margin:0,marginTop:e.spacing(4),"&:first-child":{marginTop:0}},rootLevel1:{marginTop:e.spacing(1)},rootLevel2:{marginTop:e.spacing(.5)},header:{backgroundColor:e.palette.background.paper},contentLevel0:{marginTop:e.spacing(1)},contentLevel12:{marginTop:e.spacing(.25)},infoText:{color:"#c9c9c9"}})}));function Ba(e){var t=e.children,n=e.expandable,r=e.defaultOpen,c=Ta(),i=Object(a.useState)(Boolean(r)),o=Object(U.a)(i,2),s=o[0],l=o[1];return Object(m.jsxs)("div",{className:"".concat(c.root," ").concat(c.rootLevel2),children:[Object(m.jsxs)(F.a,{button:!0,onClick:function(){l(!s)},className:c.header,children:[t,s?Object(m.jsx)(V.a,{}):Object(m.jsx)(q.a,{})]}),Object(m.jsx)(M.a,{in:s,timeout:"auto",unmountOnExit:!0,children:Object(m.jsx)("div",{className:c.contentLevel12,children:n})})]})}var Na=function(e){var t=e.postageStamps;return null===t?null:Object(m.jsx)(Y,{label:"Postage Stamps",defaultOpen:!0,children:t.map((function(e){return Object(m.jsx)(Ba,{expandable:Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(ce,{label:"Batch ID",value:e.batchID}),Object(m.jsx)(X,{label:"Depth",value:String(e.depth)}),Object(m.jsx)(X,{label:"Capacity",value:"".concat(rn(4096*Math.pow(2,e.depth)*e.usage)," / ").concat(rn(4096*Math.pow(2,e.depth)))}),Object(m.jsx)(X,{label:"Amount",value:parseInt(e.amount,10).toLocaleString()})]}),children:Object(m.jsx)(Oa,{stamp:e,shorten:!0})},e.batchID)}))})},Da=Object(j.a)((function(){return Object(h.a)({root:{width:"100%",display:"grid"},actions:{display:"flex",width:"100%",flex:"0 1 auto",flexWrap:"wrap",alignItems:"center"}})}));function Ia(){var e=Da(),t=Object(R.g)(),n=Object(a.useContext)(wn),r=n.stamps,c=n.isLoading,i=n.error,o=n.start,s=n.stop,l=Object(a.useContext)(Ve).status;if(Object(a.useEffect)((function(){if(l.all)return o(),function(){return s()}}),[l]),!l.all)return Object(m.jsx)(Te,{});return Object(m.jsxs)("div",{className:e.root,children:[i&&Object(m.jsxs)(d.a,{style:{textAlign:"center",padding:"50px"},children:["Error loading postage stamps details: ",i.message]}),!i&&Object(m.jsxs)(m.Fragment,{children:[Object(m.jsxs)("div",{className:e.actions,children:[Object(m.jsx)(st,{onClick:function(){t(pr.STAMPS_NEW)},iconType:ct.a,children:"Buy New Postage Stamp"}),Object(m.jsx)("div",{style:{height:"5px"},children:c&&Object(m.jsx)(b.a,{})})]}),Object(m.jsx)(Na,{postageStamps:r})]})]})}function _a(){var e=Object(R.g)();return Object(m.jsxs)("div",{children:[Object(m.jsx)(Ht,{children:"Buy new postage stamp"}),Object(m.jsx)(ja,{onFinished:function(){e(pr.STAMPS)}})]})}var La=n(949),Ra=n(380),Ua=["children","value","index"];function Fa(e){var t=e.children,n=e.value,a=e.index,r=Object(Ra.a)(e,Ua);return Object(m.jsx)("div",Object(Ie.a)(Object(Ie.a)({role:"tabpanel",hidden:n!==a},r),{},{children:n===a&&t}))}var Wa=Object(j.a)((function(e){return Object(h.a)({root:{flexGrow:1},content:{marginTop:e.spacing(2)}})}));function Ha(e){var t=e.values,n=e.index,a=e.indexChanged,c=Wa(),i=r.a.useState(n||0),o=Object(U.a)(i,2),s=o[0],l=o[1],u=void 0!==n?n:s;return Object(m.jsxs)("div",{className:c.root,children:[Object(m.jsx)(Vn.a,{value:u,onChange:function(e,t){a?a(t):l(t)},variant:"fullWidth",children:t.map((function(e,t){var n=e.label;return Object(m.jsx)(qn.a,{label:n},t)}))}),Object(m.jsx)("div",{className:c.content,children:t.map((function(e,t){var n=e.component;return Object(m.jsx)(Fa,{value:u,index:t,children:n},t)}))})]})}var Ma,Va,qa=n(950),za=function(e){return Object(m.jsx)("div",{style:{textAlign:"left"},children:Object(m.jsx)(qa.a,{language:e.language,showLineNumbers:e.showLineNumbers,children:e.code})})};!function(e){e[e.macOS=0]="macOS",e[e.Linux=1]="Linux",e[e.Windows=2]="Windows",e[e.iOS=3]="iOS",e[e.Android=4]="Android"}(Ma||(Ma={})),function(e){e[e.macOS=Ma.macOS]="macOS",e[e.Linux=Ma.Linux]="Linux"}(Va||(Va={}));var Ya={platform:Va.macOS,setPlatform:function(){}},Za=Object(a.createContext)(Ya);Za.Consumer;function Ga(e){var t=e.children,n=Object(a.useState)(Va.Linux),r=Object(U.a)(n,2),c=r[0],i=r[1];return Object(a.useEffect)((function(){var e=function(){var e=window.navigator.userAgent,t=window.navigator.platform;return["Macintosh","MacIntel","MacPPC","Mac68K"].includes(t)?Ma.macOS:["iPhone","iPad","iPod"].includes(t)?Ma.iOS:["Win32","Win64","Windows","WinCE"].includes(t)?Ma.Windows:/Android/.test(e)?Ma.Android:/Linux/.test(t)?Ma.Linux:null}();i(function(e){return Object.keys(Va).includes(e)}(e)?e:Va.Linux)}),[]),Object(m.jsx)(Za.Provider,{value:{platform:c,setPlatform:i},children:t})}function Ka(e){var t=Object(a.useContext)(Za),n=t.platform,r=t.setPlatform;return Object(m.jsx)(Ha,{index:n,indexChanged:r,values:[{label:"Linux",component:Object(m.jsx)(za,{showLineNumbers:e.showLineNumbers,language:"bash",code:e.linux})},{label:"macOS",component:Object(m.jsx)(za,{showLineNumbers:e.showLineNumbers,language:"bash",code:e.mac})}]})}function Ja(e){var t=e.isOk,n=e.size,a=e.className,r=n||"1rem";return e.isLoading?Object(m.jsx)(b.a,{size:r,className:a}):Object(m.jsx)("span",{className:a,style:{backgroundColor:t?"#1de600":"#ff3a52",height:r,width:r,borderRadius:"50%",display:"inline-block"}})}function Xa(){var e=Object(a.useContext)(Ve),t=e.status,n=e.isLoading,r=Object(a.useContext)(pe),c=r.setDebugApiUrl,i=r.apiDebugUrl,o=t.debugApiConnection;return Object(m.jsxs)(Y,{label:Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(Ja,{isOk:o,isLoading:n})," Connection to Bee Debug API"]}),children:[Object(m.jsx)(Dn,{children:o?"The connection to the Bee nodes debug API has been successful":"We cannot connect to your nodes debug API. Please check the following to troubleshoot your issue."}),Object(m.jsx)(Ln,{label:"Bee Debug API",value:i,onConfirm:c}),!o&&Object(m.jsx)(Y,{level:1,label:"Troubleshoot",children:Object(m.jsx)(X,{label:Object(m.jsxs)("ol",{children:[Object(m.jsx)("li",{children:"Check the status of your node by running the below command to see if your node is running."}),Object(m.jsx)(Ka,{showLineNumbers:!0,linux:"sudo systemctl status bee",mac:"brew services list"}),Object(m.jsx)("li",{children:"If your node is running, check your firewall settings to make sure that port 1635 (or your custom specified port) is bound to localhost. If your node is not running try executing the below command to start your bee node"}),Object(m.jsx)(La.a,{style:{marginTop:"10px",marginBottom:"10px"},elevation:6,variant:"filled",severity:"error",children:'Your debug node API should never be completely open to the internet. If you want to connect remotely, make sure your firewall settings are set to only allow specific trusted IP addresses and block all other ports. A simple google search for "what is my ip" will show you your computers public IP address to allow.'}),Object(m.jsx)(Ka,{showLineNumbers:!0,linux:"sudo systemctl start bee",mac:"brew services start swarm-bee"}),Object(m.jsx)("li",{children:"Run the commands to validate your node is running and see the log output."}),Object(m.jsx)(Ka,{showLineNumbers:!0,linux:"sudo systemctl status bee \njournalctl --lines=100 --follow --unit bee",mac:"brew services list \ntail -f /usr/local/var/log/swarm-bee/bee.log"}),Object(m.jsxs)("li",{children:["Lastly, check your nodes configuration settings to validate the debug API is enabled and the Cross Origin Resource Sharing (CORS) setting is configured to allow your host. Config parameter"," ",Object(m.jsx)("strong",{children:"debug-api-enable"})," must be set to ",Object(m.jsx)("strong",{children:"true"})," and"," ",Object(m.jsx)("strong",{children:"cors-allowed-origins"})," must be set to your host domain or IP (you can also use the wildcard ",Object(m.jsx)("code",{children:"cors-allowed-origins: ['*']"}),"). If edits are made to the configuration run the restart command below for changes to take effect."]}),Object(m.jsx)(Ka,{showLineNumbers:!0,linux:"sudo vi /etc/bee/bee.yaml\nsudo systemctl restart bee",mac:"sudo vi /usr/local/etc/swarm-bee/bee.yaml \nbrew services restart swarm-bee"})]})})})]})}function $a(){var e=Object(a.useContext)(pe),t=e.setApiUrl,n=e.apiUrl,r=Object(a.useContext)(Ve),c=r.status,i=r.isLoading,o=c.apiConnection;return Object(m.jsxs)(Y,{label:Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(Ja,{isOk:o,isLoading:i})," Connection to Bee API"]}),children:[Object(m.jsx)(Dn,{children:o?"The connection to the Bee nodes API has been successful":"Could not connect to your Bee nodes API. Please check the troubleshoot below on how you may resolve it."}),Object(m.jsx)(Ln,{label:"Bee API",value:n,onConfirm:t}),!o&&Object(m.jsx)(Y,{level:1,label:"Troubleshoot",children:Object(m.jsx)(X,{label:Object(m.jsxs)("ol",{children:[Object(m.jsx)("li",{children:"Check the status of your node by running the below command to see if your node is running."}),Object(m.jsx)(Ka,{showLineNumbers:!0,linux:"sudo systemctl status bee",mac:"brew services list"}),Object(m.jsx)("li",{children:"If your node is running, check your firewall settings to make sure that port 1633 (or your custom specified port) is exposed to the internet. If your node is not running try executing the below command to start your bee node"}),Object(m.jsx)(Ka,{showLineNumbers:!0,linux:"sudo systemctl start bee",mac:"brew services start swarm-bee"}),Object(m.jsx)("li",{children:"Run the commands to validate your node is running and see the log output."}),Object(m.jsx)(Ka,{showLineNumbers:!0,linux:"sudo systemctl status bee \njournalctl --lines=100 --follow --unit bee",mac:"brew services list \ntail -f /usr/local/var/log/swarm-bee/bee.log"})]})})})]})}function Qa(){var e=Object(a.useContext)(Ve),t=e.status,n=e.isLoading,r=e.latestUserVersion,c=e.latestPublishedVersion,i=e.latestBeeVersionUrl,o=t.version;return Object(m.jsxs)(Y,{label:Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(Ja,{isOk:o,isLoading:n})," Bee Version"]}),children:[Object(m.jsx)(Dn,{children:o?"You are running the latest version of Bee.":Object(m.jsxs)(m.Fragment,{children:["Your Bee version is out of date. Please update to the"," ",Object(m.jsx)("a",{href:i,rel:"noreferrer",target:"_blank",children:"latest"})," ","before continuing. Rerun the installation script below to upgrade. For more information please see the"," ",Object(m.jsx)("a",{href:"https://docs.ethswarm.org/docs/installation/manual#upgrading-bee",rel:"noreferrer",target:"_blank",children:"Docs"}),".",Object(m.jsx)(Ka,{showLineNumbers:!0,linux:"bee version\nwget https://github.com/ethersphere/bee/releases/download/".concat(c,"/bee_").concat(c,"_amd64.deb\nsudo dpkg -i bee_").concat(c,"_amd64.deb"),mac:"bee version\nbrew tap ethersphere/tap\nbrew install swarm-bee\nbrew services start swarm-bee"})]})}),Object(m.jsx)(X,{label:"Your Version",value:r||"-"}),Object(m.jsx)(X,{label:"Latest Version",value:c||"-"})]})}function er(){var e=Object(a.useContext)(Ve),t=e.status,n=e.isLoading,r=e.nodeAddresses,c=t.blockchainConnection;return Object(m.jsxs)(Y,{label:Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(Ja,{isOk:c,isLoading:n})," Connection to Blockchain"]}),children:[Object(m.jsx)(Dn,{children:c?"Your node is connected to the xDai blockchain":Object(m.jsxs)(m.Fragment,{children:["Your Bee node must have access to the xDai blockchain, so that it can interact and deploy your chequebook contract. You can run"," ",Object(m.jsx)("a",{href:"https://www.xdaichain.com/",rel:"noreferrer",target:"_blank",children:"your own xDai node"}),", or use a provider instead - we recommend"," ",Object(m.jsx)("a",{href:"https://getblock.io/",rel:"noreferrer",target:"_blank",children:"Getblock"}),". By default, Bee expects a local node at http://localhost:8545. To use a provider instead, simply change the ",Object(m.jsx)("strong",{children:"swap-endpoint"})," in your configuration file."]})}),(null===r||void 0===r?void 0:r.ethereum)&&Object(m.jsx)(ce,{label:"Ethereum Address",value:null===r||void 0===r?void 0:r.ethereum})]})}var tr=function(){var e=Object(a.useContext)(Ve),t=e.status,n=e.isLoading,r=e.chequebookAddress,c=t.chequebook;return Object(m.jsxs)(Y,{label:Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(Ja,{isOk:c,isLoading:n})," Chequebook Deployment & Funding"]}),children:[Object(m.jsx)(Dn,{children:c?"Your chequebook is deployed and funded":Object(m.jsxs)(m.Fragment,{children:["Your chequebook is either not deployed or funded. To run the node you will need xDAI and xBZZ on the xDai network. You may need to aquire BZZ (e.g. ",Object(m.jsx)("a",{href:"https://bzz.exchange/",children:"bzz.exchange"}),") and bridge it to the xDai network through the ",Object(m.jsx)("a",{href:"https://omni.xdaichain.com/bridge",children:"omni bridge"}),". To pay the transaction fees, you will also need xDAI token. You can purchase DAI on the network and bridge it to xDai network through the ",Object(m.jsx)("a",{href:"https://bridge.xdaichain.com/",children:"xDai Bridge"}),". See the"," ",Object(m.jsx)("a",{href:"https://www.xdaichain.com/#xdai-stable-chain",children:"official xDai website"})," for more information."]})}),r&&Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(ce,{label:"Chequebook Address",value:r.chequebookAddress}),Object(m.jsx)(Q,{children:Object(m.jsx)(nt,{})})]})]})};function nr(){var e=Object(a.useContext)(Ve),t=e.status,n=e.isLoading,r=e.topology,c=t.topology;return Object(m.jsxs)(Y,{label:Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(Ja,{isOk:c,isLoading:n})," Connection to Peers"]}),children:[Object(m.jsx)(Dn,{children:c?"You are connected to other Bee nodes":"Your node is not connected to any peers. Please wait a bit if you just started the node, otherwise review your configuration file."}),Object(m.jsx)(Aa,{topology:r})]})}function ar(){return Object(m.jsxs)("div",{children:[Object(m.jsx)(Xa,{}),Object(m.jsx)(Qa,{}),Object(m.jsx)(er,{}),Object(m.jsx)(tr,{}),Object(m.jsx)($a,{}),Object(m.jsx)(nr,{})]})}var rr=n(932),cr=n(933);function ir(e){return or.apply(this,arguments)}function or(){return(or=Object(De.a)(Ne.a.mark((function e(t){return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://xbzz-faucet.apyos.dev/xbzz/".concat(t),{method:"POST"});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var sr=n(946),lr=n(186),ur="https://rpc.gnosischain.com/";function dr(){return(dr=Object(De.a)(Ne.a.mark((function e(t){var n,a;return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(ur,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",method:"eth_getBalance",params:[t,"latest"],id:1})});case 2:return n=e.sent,e.next=5,n.json();case 5:return a=e.sent,e.abrupt("return",a.result);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var br=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,type:"function"}],jr=new sr.a.JsonRpcProvider(ur);function hr(){return hr=Object(De.a)(Ne.a.mark((function e(t){var n,a,r,c=arguments;return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.length>1&&void 0!==c[1]?c[1]:"0xdbf3ea6f5bee45c02255b2c26a16f300502f68da",a=new lr.a(n,br,jr),e.next=4,a.balanceOf(t);case 4:return r=e.sent,e.abrupt("return",r.toString());case 6:case"end":return e.stop()}}),e)}))),hr.apply(this,arguments)}var pr,Or={eth_getBalance:function(e){return dr.apply(this,arguments)},eth_getBalanceERC20:function(e){return hr.apply(this,arguments)}};function fr(){var e=Object(a.useContext)(Ve),t=e.nodeInfo,n=e.chequebookAddress,r=e.nodeAddresses,c=Object(l.b)().enqueueSnackbar,i=Object(a.useState)(null),o=Object(U.a)(i,2),s=o[0],u=o[1],d=Object(a.useState)(null),b=Object(U.a)(d,2),j=b[0],h=b[1],p=Object(a.useState)(!1),O=Object(U.a)(p,2),f=O[0],x=O[1],g=Object(a.useState)("https://rpc.gnosischain.com/"),v=Object(U.a)(g,2),y=v[0],w=v[1];function k(){return(k=Object(De.a)(Ne.a.mark((function e(){var t,n,a,r;return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return x(!0),e.prev=1,e.next=4,fetch("http://localhost:5000/status").then((function(e){return e.json()}));case 4:return t=e.sent,n=t.address,e.next=8,fetch("http://getxdai.co/".concat(n,"/0.1"),{method:"POST"});case 8:return e.next=10,Or.eth_getBalance(n);case 10:return a=e.sent,u(a),e.next=14,Or.eth_getBalance(n);case 14:r=e.sent,h(r),c("Wallet funded successfully",{variant:"success"});case 17:return e.prev=17,x(!1),e.finish(17);case 20:case"end":return e.stop()}}),e,null,[[1,,17,20]])})))).apply(this,arguments)}function S(){return(S=Object(De.a)(Ne.a.mark((function e(){return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(null===n||void 0===n?void 0:n.chequebookAddress)){e.next=5;break}return x(!0),e.next=4,ir(null===n||void 0===n?void 0:n.chequebookAddress).finally((function(){return x(!1)}));case 4:c("Successfully funded chequebook address",{variant:"success"});case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function C(){return(C=Object(De.a)(Ne.a.mark((function e(){return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(null===r||void 0===r?void 0:r.ethereum)){e.next=5;break}return x(!0),e.next=4,ir(null===r||void 0===r?void 0:r.ethereum).finally((function(){return x(!1)}));case 4:c("Successfully funded overlay address",{variant:"success"});case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function A(){return(A=Object(De.a)(Ne.a.mark((function e(){return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return x(!0),e.prev=1,e.next=4,fetch("http://localhost:5000/config",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({"chain-enable":!0,"swap-enable":!0,"swap-endpoint":y})});case 4:return e.next=6,fetch("http://localhost:5000/restart",{method:"POST"});case 6:c("Restarting Bee in Light Mode...",{variant:"success"});case 7:return e.prev=7,x(!1),e.finish(7);case 10:case"end":return e.stop()}}),e,null,[[1,,7,10]])})))).apply(this,arguments)}return Object(a.useEffect)((function(){fetch("http://localhost:5000/status").then((function(e){return e.json()})).then((function(e){return Or.eth_getBalance(e.address)})).then((function(e){return u(e)})),fetch("http://localhost:5000/status").then((function(e){return e.json()})).then((function(e){return Or.eth_getBalanceERC20(e.address)})).then((function(e){return h(e)}))}),[]),t?Object(m.jsxs)("div",{children:[Object(m.jsx)(Ht,{children:"Upgrade"}),Object(m.jsx)(rt.a,{mb:4,children:Object(m.jsx)(rr.a,{variant:"outlined",children:Object(m.jsxs)(rt.a,{p:2,children:[Object(m.jsx)(rt.a,{mb:2,children:Object(m.jsx)(H.a,{variant:"h1",children:"Wallet"})}),Object(m.jsx)(rt.a,{mb:4,children:Object(m.jsxs)(H.a,{children:["Your current balance is ",new We.a(s||"0",18).toSignificantDigits(4)," xDAI and"," ",new We.a(j||"0",16).toSignificantDigits(4)," xBZZ. Fund your node with xDAI so chequebook can be deployed."]})}),Object(m.jsxs)(Q,{children:[Object(m.jsx)(st,{onClick:function(){return k.apply(this,arguments)},iconType:cr.a,loading:f,disabled:f,variant:"outlined",children:"Fund xDAI"}),(null===n||void 0===n?void 0:n.chequebookAddress)&&"0x0000000000000000000000000000000000000000"!==(null===n||void 0===n?void 0:n.chequebookAddress)&&Object(m.jsx)(st,{onClick:function(){return S.apply(this,arguments)},iconType:cr.a,loading:f,disabled:f,variant:"outlined",children:"Fund xBZZ (Chequebook)"}),Object(m.jsx)(st,{onClick:function(){return C.apply(this,arguments)},iconType:cr.a,loading:f,disabled:f,variant:"outlined",children:"Fund xBZZ (Overlay)"})]})]})})}),Object(m.jsx)(rt.a,{mb:4,children:Object(m.jsx)(rr.a,{variant:"outlined",children:Object(m.jsxs)(rt.a,{p:2,children:[Object(m.jsx)(rt.a,{mb:2,children:Object(m.jsx)(H.a,{variant:"h1",children:"RPC Provider"})}),Object(m.jsx)(rt.a,{mb:2,children:Object(m.jsx)(Dt,{label:"RPC Provider",name:"rpc-provider",defaultValue:"https://rpc.gnosischain.com/",onChange:function(e){w(e.target.value)}})})]})})}),Object(m.jsx)(rr.a,{variant:"outlined",children:Object(m.jsxs)(rt.a,{p:2,children:[Object(m.jsx)(H.a,{variant:"h1",children:"Upgrade Node"}),!s&&Object(m.jsx)(rt.a,{mt:2,children:Object(m.jsx)(H.a,{children:"Fund your node to unlock upgrading."})}),Object(m.jsx)(rt.a,{mt:4,children:Object(m.jsx)(st,{onClick:function(){return A.apply(this,arguments)},iconType:E.a,loading:f,disabled:f||!s,variant:"outlined",children:"Switch to Light Mode"})})]})})]}):Object(m.jsx)(Jn,{})}!function(e){e.INFO="/",e.UPGRADE="/upgrade",e.FILES="/files",e.UPLOAD="/files/upload",e.UPLOAD_IN_PROGRESS="/files/upload/workflow",e.DOWNLOAD="/files/download",e.HASH="/files/hash/:hash",e.ACCOUNTING="/accounting",e.SETTINGS="/settings",e.STAMPS="/stamps",e.STAMPS_NEW="/stamps/new",e.STATUS="/status",e.FEEDS="/feeds",e.FEEDS_NEW="/feeds/new",e.FEEDS_UPDATE="/feeds/update/:hash",e.FEEDS_PAGE="/feeds/:uuid"}(pr||(pr={}));var xr=function(){return Object(m.jsxs)(R.c,{children:[Object(m.jsx)(R.a,{path:pr.UPLOAD_IN_PROGRESS,element:Object(m.jsx)(ga,{})}),Object(m.jsx)(R.a,{path:pr.UPLOAD,element:Object(m.jsx)(va,{})}),Object(m.jsx)(R.a,{path:pr.DOWNLOAD,element:Object(m.jsx)(Zn,{})}),Object(m.jsx)(R.a,{path:pr.UPGRADE,element:Object(m.jsx)(fr,{})}),Object(m.jsx)(R.a,{path:pr.HASH,element:Object(m.jsx)(la,{})}),Object(m.jsx)(R.a,{path:pr.ACCOUNTING,element:Object(m.jsx)(at,{})}),Object(m.jsx)(R.a,{path:pr.SETTINGS,element:Object(m.jsx)(Pa,{})}),Object(m.jsx)(R.a,{path:pr.STAMPS,element:Object(m.jsx)(Ia,{})}),Object(m.jsx)(R.a,{path:pr.STAMPS_NEW,element:Object(m.jsx)(_a,{})}),Object(m.jsx)(R.a,{path:pr.STATUS,element:Object(m.jsx)(ar,{})}),Object(m.jsx)(R.a,{path:pr.FEEDS,element:Object(m.jsx)(Lt,{})}),Object(m.jsx)(R.a,{path:pr.FEEDS_NEW,element:Object(m.jsx)(Zt,{})}),Object(m.jsx)(R.a,{path:pr.FEEDS_UPDATE,element:Object(m.jsx)(An,{})}),Object(m.jsx)(R.a,{path:pr.FEEDS_PAGE,element:Object(m.jsx)(gn,{})}),Object(m.jsx)(R.a,{path:pr.INFO,element:Object(m.jsx)(Ea,{})})]})},mr=n(11),gr=n(935),vr=Object(mr.a)((function(e){return{root:{paddingLeft:e.spacing(4),paddingRight:e.spacing(4),borderLeft:"4px solid rgba(0,0,0,0)","&.Mui-selected, &.Mui-selected:hover":{borderLeft:"4px solid ".concat(e.palette.primary.main),backgroundColor:"#2c2c2c",color:"#f9f9f9"}},button:{"&:hover":{backgroundColor:"#2c2c2c",color:"#f9f9f9","@media (hover: none)":{backgroundColor:"#2c2c2c",color:"#f9f9f9"}}}}}))(F.a),yr=Object(j.a)((function(e){return Object(h.a)({icon:{color:"inherit"},activeIcon:{color:e.palette.primary.main}})}));function wr(e){var t=e.iconStart,n=e.iconEnd,a=e.path,r=e.label,c=yr(),i=Object(R.f)(),o=Boolean(a&&Object(R.d)(i.pathname,a));return Object(m.jsxs)(vr,{button:!0,selected:o,disableRipple:!0,children:[Object(m.jsx)(gr.a,{className:o?c.activeIcon:c.icon,children:t}),Object(m.jsx)(W.a,{primary:r}),Object(m.jsx)(gr.a,{className:o?c.activeIcon:c.icon,children:n})]})}var kr=n(936),Sr=Object(j.a)((function(e){return Object(h.a)({icon:{color:"inherit"},iconSmall:{height:e.spacing(2)},root:{height:e.spacing(4),paddingLeft:e.spacing(1),paddingRight:e.spacing(4),color:"#f9f9f9",borderLeft:"0px solid rgba(0,0,0,0)","&.Mui-selected, &.Mui-selected:hover":{borderLeft:"0px solid ".concat(e.palette.primary.main),backgroundColor:"#2c2c2c"}},rootError:{backgroundColor:"rgba(255, 58, 82, 0.25)"},button:{"&:hover":{backgroundColor:"#2c2c2c",color:"white","@media (hover: none)":{backgroundColor:"#2c2c2c",color:"white"}}},smallerText:{fontSize:"0.9rem"}})}));function Cr(e){var t=e.path,n=Object(a.useContext)(Ve),r=n.status,c=n.isLoading,i=Sr(),o=Object(R.f)(),s=Boolean(t&&Object(R.d)(o.pathname,t));return Object(m.jsxs)(F.a,{button:!0,classes:{root:"".concat(i.root," ").concat(r.all?"":i.rootError),button:i.button},selected:s,disableRipple:!0,children:[Object(m.jsx)(gr.a,{style:{marginLeft:"30px"},children:Object(m.jsx)(Ja,{isOk:r.all,isLoading:c})}),Object(m.jsx)(W.a,{primary:Object(m.jsx)(H.a,{className:i.smallerText,children:"Node ".concat(r.all?"OK":"Error")})}),Object(m.jsx)(gr.a,{className:i.icon,children:r.all?null:Object(m.jsx)(kr.a,{className:i.iconSmall})})]})}var Ar=[{label:"Info",path:pr.INFO,icon:A.a},{label:"Upgrade",path:pr.UPGRADE,icon:E.a},{label:"Files",path:pr.UPLOAD,icon:P.a},{label:"Feeds",path:pr.FEEDS,icon:T.a},{label:"Stamps",path:pr.STAMPS,icon:B.a},{label:"Accounting",path:pr.ACCOUNTING,icon:N.a},{label:"Settings",path:pr.SETTINGS,icon:D.a}],Er=Object(j.a)((function(e){return Object(h.a)({root:{flexWrap:"nowrap",minHeight:"100vh",paddingTop:e.spacing(8),paddingBottom:e.spacing(8)},drawer:{width:300,flexShrink:0},drawerPaper:{width:300,backgroundColor:"#212121"},logo:{marginLeft:e.spacing(8),marginRight:e.spacing(8)},icon:{height:e.spacing(4)},iconSmall:{height:e.spacing(2)},divider:{backgroundColor:"#2c2c2c",marginLeft:e.spacing(4),marginRight:e.spacing(4)},link:{color:"#9f9f9f",textDecoration:"none","&:hover":{textDecoration:"none","@media (hover: none)":{textDecoration:"none"}}}})}));function Pr(){var e=Er();return Object(m.jsx)(v.a,{className:e.drawer,variant:"permanent",anchor:"left",classes:{paper:e.drawerPaper},children:Object(m.jsxs)(y.a,{container:!0,direction:"column",justifyContent:"space-between",className:e.root,children:[Object(m.jsx)(y.a,{className:e.logo,children:Object(m.jsx)(u.b,{to:pr.INFO,children:Object(m.jsx)("img",{alt:"swarm",src:_})})}),Object(m.jsxs)(y.a,{children:[Object(m.jsx)(w.a,{children:Ar.map((function(t){return Object(m.jsx)(u.b,{to:t.path,className:e.link,children:Object(m.jsx)(wr,{iconStart:Object(m.jsx)(t.icon,{className:e.icon}),path:t.path,label:t.label},t.path)},t.path)}))}),Object(m.jsx)(k.a,{className:e.divider}),Object(m.jsx)(w.a,{children:Object(m.jsx)(S.a,{href:L.a.BEE_DOCS_HOST,target:"_blank",className:e.link,children:Object(m.jsx)(wr,{iconStart:Object(m.jsx)(I.a,{className:e.icon}),iconEnd:Object(m.jsx)(C.a,{className:e.iconSmall}),label:Object(m.jsx)("span",{children:"Docs"})})})})]}),Object(m.jsx)(y.a,{children:Object(m.jsx)(u.b,{to:pr.STATUS,className:e.link,children:Object(m.jsx)(Cr,{path:pr.STATUS})})})]})})}var Tr,Br=Object(j.a)((function(e){return Object(h.a)({content:{backgroundColor:e.palette.background.default,minHeight:"100vh"}})})),Nr=function(e){var t=Br(),n=Object(a.useContext)(Ve).isLoading;return Object(m.jsxs)("div",{style:{display:"flex"},children:[Object(m.jsx)(Pr,{}),Object(m.jsx)(d.a,{className:t.content,children:Object(m.jsx)(g,{children:Object(m.jsx)(m.Fragment,{children:n?Object(m.jsx)("div",{style:{textAlign:"center",width:"100%"},children:Object(m.jsx)(b.a,{})}):e.children})})})]})},Dr=n(378),Ir=n(201),_r=Object(Dr.a)({palette:{type:"light",background:{default:"#efefef"},primary:{light:"#fcf2e8",main:"#dd7700",dark:Ir.a[800]},secondary:{main:"#333333"}},typography:{fontFamily:["Work Sans","Montserrat","Nunito","Roboto",'"Helvetica Neue"',"Arial","sans-serif"].join(","),h1:{fontSize:"1.3rem",fontWeight:500},h2:{fontSize:"1rem",fontWeight:500},h3:{fontSize:"0.8rem",fontWeight:500},body2:{fontFamily:'"IBM Plex Mono", monospace',fontWeight:500,fontSize:"1rem"}}});_r.overrides={MuiListItem:{button:{"&:hover":{backgroundColor:"#fcf2e8",color:(Tr=_r).palette.primary.main,"@media (hover: none)":{backgroundColor:"#fcf2e8",color:Tr.palette.primary.main}}}},MuiContainer:{root:{padding:Tr.spacing(8)},maxWidthXs:{padding:Tr.spacing(8)},maxWidthSm:{padding:Tr.spacing(8)},maxWidthMd:{padding:Tr.spacing(8)},maxWidthLg:{padding:Tr.spacing(8)},maxWidthXl:{padding:Tr.spacing(8)}},MuiButton:{startIcon:{marginLeft:Tr.spacing(1)},endIcon:{marginRight:Tr.spacing(1)},outlined:{border:"none",borderRadius:Tr.spacing(10),color:Tr.palette.primary.main,backgroundColor:"#fcf2e8"},outlinedSizeSmall:{padding:Tr.spacing(1),paddingLeft:Tr.spacing(2),paddingRight:Tr.spacing(2),boxShadow:"none","&:hover":{backgroundColor:Tr.palette.primary.main,color:"white",boxShadow:"none","@media (hover: none)":{backgroundColor:Tr.palette.primary.main,color:"white",boxShadow:"none"}}},outlinedSizeLarge:{padding:Tr.spacing(4),borderRadius:0,boxShadow:"none","&:hover":{backgroundColor:Tr.palette.primary.main,color:"white",boxShadow:"none","@media (hover: none)":{backgroundColor:Tr.palette.primary.main,color:"white",boxShadow:"none"}}},containedSizeLarge:{padding:Tr.spacing(4),borderRadius:0,boxShadow:"none","&:hover":{backgroundColor:Tr.palette.primary.main,color:"white",boxShadow:"none","@media (hover: none)":{backgroundColor:Tr.palette.primary.main,color:"white",boxShadow:"none"}}},containedSizeSmall:{padding:Tr.spacing(1),paddingLeft:Tr.spacing(2),paddingRight:Tr.spacing(2),borderRadius:0,boxShadow:"none","&:hover":{backgroundColor:Tr.palette.primary.main,color:"white",boxShadow:"none","@media (hover: none)":{backgroundColor:Tr.palette.primary.main,color:"white",boxShadow:"none"}}},contained:{padding:Tr.spacing(2),backgroundColor:"white",boxShadow:"none",borderRadius:0,"&:hover":{backgroundColor:Tr.palette.primary.main,color:"white",boxShadow:"none","@media (hover: none)":{backgroundColor:Tr.palette.primary.main,color:"white",boxShadow:"none"}},"&:focus":{backgroundColor:Tr.palette.primary.main,color:"white"},"&:active":{backgroundColor:Tr.palette.primary.main,color:"white"},"&:disabled":{backgroundColor:"white"}}},MuiTab:{root:{backgroundColor:Tr.palette.background.paper,"&:hover":{backgroundColor:"#fcf2e8",color:Tr.palette.primary.main,opacity:1},"&$selected":{fontWeight:Tr.typography.fontWeightMedium}},textColorInherit:{opacity:.5}},MuiTabs:{root:{borderBottom:"none"},indicator:{backgroundColor:"transparent"}}},_r.props={MuiTab:{disableRipple:!0},MuiButtonBase:{disableRipple:!0}};var Lr=function(e){var t=e.beeApiUrl,n=e.beeDebugApiUrl,a=e.lockedApiSettings;return Object(m.jsx)("div",{className:"App",children:Object(m.jsx)(s.a,{theme:_r,children:Object(m.jsx)(Oe,{beeApiUrl:t,beeDebugApiUrl:n,lockedApiSettings:a,children:Object(m.jsx)(ze,{children:Object(m.jsx)(Sn,{children:Object(m.jsx)(fn,{children:Object(m.jsx)(dt,{children:Object(m.jsx)(Ga,{children:Object(m.jsx)(l.a,{children:Object(m.jsx)(u.a,{children:Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(o.a,{}),Object(m.jsx)(Nr,{children:Object(m.jsx)(xr,{})})]})})})})})})})})})})})},Rr=function(e){e&&e instanceof Function&&n.e(3).then(n.bind(null,953)).then((function(t){var n=t.getCLS,a=t.getFID,r=t.getFCP,c=t.getLCP,i=t.getTTFB;n(e),a(e),r(e),c(e),i(e)}))};i.a.render(Object(m.jsx)(r.a.StrictMode,{children:Object(m.jsx)(Lr,{})}),document.getElementById("root")),Rr()}},[[829,1,2]]]);
-//# sourceMappingURL=main.637f9634.chunk.js.map
\ No newline at end of file
+(this["webpackJsonp@ethersphere/bee-dashboard"]=this["webpackJsonp@ethersphere/bee-dashboard"]||[]).push([[0],{360:function(e){e.exports=JSON.parse('{"a":{"node":">=12.0.0","npm":">=6.0.0","bee":">=0.6.0"}}')},38:function(e,t,n){"use strict";n.d(t,"f",(function(){return s})),n.d(t,"g",(function(){return l})),n.d(t,"k",(function(){return b})),n.d(t,"h",(function(){return j})),n.d(t,"d",(function(){return h})),n.d(t,"l",(function(){return p})),n.d(t,"e",(function(){return O})),n.d(t,"i",(function(){return f})),n.d(t,"c",(function(){return x})),n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return g})),n.d(t,"j",(function(){return v}));var a=n(3),r=n.n(a),c=n(27),i=n(51),o=n(39);function s(e){return i.BigNumber.isBigNumber(e)&&e.isInteger()||"bigint"===typeof e}function l(e){if(i.BigNumber.isBigNumber(e))return e;if("string"===typeof e)return new i.BigNumber(e);if("bigint"===typeof e)return new i.BigNumber(e.toString());if("number"===typeof e)return new i.BigNumber(e);throw new TypeError("Not a BigNumber or BigNumber convertible value. Type: ".concat(typeof e," value: ").concat(e))}function u(e){return d.apply(this,arguments)}function d(){return(d=Object(c.a)(r.a.mark((function e(t){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){return setTimeout((function(){e()}),t)}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){var t,n={fulfilled:(t=e).filter((function(e){return"fulfilled"===e.status})),rejected:t.filter((function(e){return"rejected"===e.status}))};return{fulfilled:n.fulfilled.map((function(e){return e.value})),rejected:n.rejected.map((function(e){return e.reason?String(e.reason):"Unknown error"}))}}function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;return new Promise(function(){var a=Object(c.a)(r.a.mark((function a(c,i){var o,s;return r.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:o=0;case 1:if(!(o>t/4).toString(16)}))}function O(e){return(e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).replaceAll("_"," ")}function f(e){var t=e;return t<120?"".concat(e," seconds"):(t/=60)<120?"".concat(Math.round(t)," minutes"):(t/=60)<48?"".concat(Math.round(t)," hours"):(t/=24)<14?"".concat(Math.round(t)," days"):(t/=7)<52?"".concat(Math.round(t)," weeks"):"".concat((t/=52).toFixed(1)," years")}function x(e){return 4096*Math.pow(2,e)}function m(e,t){return 5*e/t}function g(e,t){return new o.a(t*BigInt(Math.pow(2,e)))}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"[\u2026]";return e.length<=2*t+n.length?e:"".concat(e.slice(0,t)).concat(n).concat(e.slice(-t))}},39:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(12),r=n(13),c=n(51),i=n(38),o=[18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0],s=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;Object(a.a)(this,e),this.amount=void 0,this.decimals=void 0;var r=Object(i.g)(t);if(!Object(i.f)(r)||!o.includes(n))throw new TypeError("Not a valid token values");this.amount=r,this.decimals=n}return Object(r.a)(e,[{key:"toBigInt",get:function(){return BigInt(this.amount.toFixed(0))}},{key:"toString",get:function(){return this.amount.toFixed(0)}},{key:"toBigNumber",get:function(){return new c.BigNumber(this.amount)}},{key:"toDecimal",get:function(){return this.amount.dividedBy(new c.BigNumber(10).pow(this.decimals))}},{key:"toFixedDecimal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:7;return this.toDecimal.toFixed(e)}},{key:"toSignificantDigits",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:4,t=this.toDecimal.toFixed(16),n=-1,a=!1,r=0;r1&&void 0!==arguments[1]?arguments[1]:16,a=Object(i.g)(t),r=a.multipliedBy(new c.BigNumber(10).pow(n));return new e(r,n)}}]),e}()},409:function(e,t,n){},414:function(e,t,n){},483:function(e,t){},485:function(e,t){},497:function(e,t){},499:function(e,t){},525:function(e,t){},526:function(e,t){},53:function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return l})),n.d(t,"e",(function(){return u})),n.d(t,"d",(function(){return d})),n.d(t,"a",(function(){return b})),n.d(t,"c",(function(){return h})),n.d(t,"f",(function(){return m}));var a=n(3),r=n.n(a),c=n(27),i=n(134),o=n.n(i),s=n(38);function l(){var t=new Uint8Array(32);return crypto.getRandomValues(t),new o.a(e.from(t))}function u(e,t){var n=e.findIndex((function(e){return e.uuid===t.uuid}));-1!==n&&e.splice(n,1),e.unshift(t),localStorage.setItem("feeds",JSON.stringify(e))}function d(e){localStorage.setItem("feeds",JSON.stringify(e))}function b(e,t,n,a){return j.apply(this,arguments)}function j(){return(j=Object(c.a)(r.a.mark((function e(t,n,a,c){var i;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("V3"!==n||c){e.next=2;break}throw Error("V3 passwords require password");case 2:if("PRIVATE_KEY"!==n){e.next=6;break}e.t0=t.getPrivateKeyString(),e.next=9;break;case 6:return e.next=8,t.toV3String(c);case 8:e.t0=e.sent;case 9:return i=e.t0,e.abrupt("return",{uuid:Object(s.l)(),name:a,type:c?"V3":"PRIVATE_KEY",address:t.getAddressString(),identity:i});case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,t){return p.apply(this,arguments)}function p(){return(p=Object(c.a)(r.a.mark((function e(t,n){var a,c,i,o;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(64!==n.length){e.next=5;break}return e.next=3,f("PRIVATE_KEY",n);case 3:return a=e.sent,e.abrupt("return",{uuid:Object(s.l)(),name:t,type:"PRIVATE_KEY",identity:n,address:a.getAddressString()});case 5:if(66!==n.length||!n.toLowerCase().startsWith("0x")){e.next=10;break}return e.next=8,f("PRIVATE_KEY",n.slice(2));case 8:return c=e.sent,e.abrupt("return",{uuid:Object(s.l)(),name:t,type:"PRIVATE_KEY",identity:n,address:c.getAddressString()});case 10:return e.prev=10,i=JSON.parse(n),o=i.address,e.abrupt("return",{uuid:Object(s.l)(),name:t,type:"V3",identity:n,address:o});case 15:return e.prev=15,e.t0=e.catch(10),e.abrupt("return",null);case 18:case"end":return e.stop()}}),e,null,[[10,15]])})))).apply(this,arguments)}function O(e,t){return f(e.type,e.identity,t)}function f(e,t,n){return x.apply(this,arguments)}function x(){return(x=Object(c.a)(r.a.mark((function t(n,a,c){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("PRIVATE_KEY"!==n){t.next=4;break}t.t0=o.a.fromPrivateKey(e.from(v(a),"hex")),t.next=7;break;case 4:return t.next=6,o.a.fromV3(a,c);case 6:t.t0=t.sent;case 7:return t.abrupt("return",t.t0);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function m(e,t,n,a,r){return g.apply(this,arguments)}function g(){return(g=Object(c.a)(r.a.mark((function e(t,n,a,c,i){var o,s;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O(n,i);case 2:if(o=e.sent,n.feedHash){e.next=7;break}return e.next=6,t.createFeedManifest(c,"sequence","00".repeat(32),o.getAddressString());case 6:n.feedHash=e.sent;case 7:return s=t.makeFeedWriter("sequence","00".repeat(32),o.getPrivateKeyString()),e.next=10,s.upload(c,a);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e){return e.toLowerCase().startsWith("0x")?e.slice(2):e}}).call(this,n(26).Buffer)},531:function(e,t){},533:function(e,t){},540:function(e,t){},558:function(e,t){},574:function(e,t){},579:function(e,t){},587:function(e,t){},589:function(e,t){},60:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return c}));var a=n(12);function r(t){return"object"===typeof e&&Object({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_BEE_HOST:"http://localhost:1633",REACT_APP_BEE_DEBUG_HOST:"http://localhost:1635",REACT_APP_BEE_DOCS_HOST:"https://docs.ethswarm.org/docs/",REACT_APP_BEE_DISCORD_HOST:"https://discord.gg/eKr9XPv7",REACT_APP_BLOCKCHAIN_EXPLORER_URL:"https://blockscout.com/xdai/mainnet",REACT_APP_BEE_GITHUB_REPO_URL:"https://api.github.com/repos/ethersphere/bee"})[t]}var c=new function e(){Object(a.a)(this,e),this.BEE_API_HOST=void 0,this.BEE_DEBUG_API_HOST=void 0,this.BLOCKCHAIN_EXPLORER_URL=void 0,this.BEE_DOCS_HOST=void 0,this.BEE_DISCORD_HOST=void 0,this.GITHUB_REPO_URL=void 0,this.BEE_API_HOST=sessionStorage.getItem("api_host")||r("REACT_APP_BEE_HOST")||"http://localhost:1633",this.BEE_DEBUG_API_HOST=sessionStorage.getItem("debug_api_host")||r("REACT_APP_BEE_DEBUG_HOST")||"http://localhost:1635",this.BLOCKCHAIN_EXPLORER_URL=r("REACT_APP_BLOCKCHAIN_EXPLORER_URL")||"https://blockscout.com/xdai/mainnet",this.BEE_DOCS_HOST=r("REACT_APP_BEE_DOCS_HOST")||"https://docs.ethswarm.org/docs/",this.BEE_DISCORD_HOST=r("REACT_APP_BEE_DISCORD_HOST")||"https://discord.gg/eKr9XPv7",this.GITHUB_REPO_URL=r("REACT_APP_BEE_GITHUB_REPO_URL")||"https://api.github.com/repos/ethersphere/bee"};t.b=c}).call(this,n(30))},829:function(e,t,n){"use strict";n.r(t);var a=n(0),r=n.n(a),c=n(29),i=n.n(c),o=(n(409),n(945)),s=n(944),l=n(31),u=n(48),d=(n(414),n(900)),b=n(901),j=n(834),h=n(387),p=n(12),O=n(13),f=n(14),x=n(15),m=n(1),g=function(e){Object(f.a)(n,e);var t=Object(x.a)(n);function n(e){var a;return Object(p.a)(this,n),(a=t.call(this,e)).state={error:null},a}return Object(O.a)(n,[{key:"componentDidCatch",value:function(e,t){console.error({error:e,errorInfo:t})}},{key:"render",value:function(){return this.state.error?Object(m.jsxs)("h1",{children:["Something went wrong. Error: ",this.state.error.message]}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}}]),n}(a.Component),v=n(941),y=n(885),w=n(911),k=n(942),S=n(903),C=n(916),A=n(937),E=n(934),P=n(938),T=n(921),B=n(929),N=n(939),D=n(940),I=n(943),_=n.p+"static/media/logo.3d1155fe.svg",L=n(60),R=n(20),U=n(10),F=n(835),W=n(882),H=n(119),M=n(833),V=n(883),q=n(884),z=Object(j.a)((function(e){return Object(h.a)({root:{width:"100%",padding:0,margin:0,marginTop:e.spacing(4),"&:first-child":{marginTop:0}},rootLevel1:{marginTop:e.spacing(1)},rootLevel2:{marginTop:e.spacing(.5)},header:{backgroundColor:e.palette.background.paper},contentLevel0:{marginTop:e.spacing(1)},contentLevel12:{marginTop:e.spacing(.25)},infoText:{color:"#c9c9c9"}})}));function Y(e){var t=e.children,n=e.label,r=e.level,c=e.defaultOpen,i=e.info,o=z(),s=Object(a.useState)(Boolean(c)),l=Object(U.a)(s,2),u=l[0],d=l[1],b="",j="h1",h=o.contentLevel0;return 1===r?(b=o.rootLevel1,j="h2",h=o.contentLevel12):2===r&&(b=o.rootLevel2,j="h3",h=o.contentLevel12),Object(m.jsxs)("div",{className:"".concat(o.root," ").concat(b),children:[Object(m.jsxs)(F.a,{button:!0,onClick:function(){d(!u)},className:o.header,children:[Object(m.jsx)(W.a,{primary:Object(m.jsx)(H.a,{variant:j,children:n})}),Object(m.jsxs)("div",{style:{display:"flex"},children:[!u&&Object(m.jsx)(H.a,{variant:"body2",className:o.infoText,children:i}),u?Object(m.jsx)(V.a,{}):Object(m.jsx)(q.a,{})]})]}),Object(m.jsx)(M.a,{in:u,timeout:"auto",unmountOnExit:!0,children:Object(m.jsx)("div",{className:h,children:t})})]})}var Z=n(951),G=n(888),K=n(889),J=Object(j.a)((function(e){return Object(h.a)({header:{backgroundColor:e.palette.background.paper,marginBottom:e.spacing(.25),wordBreak:"break-word"},copyValue:{cursor:"pointer",padding:e.spacing(1),borderRadius:0,"&:hover":{backgroundColor:"#fcf2e8",color:e.palette.primary.main}}})}));function X(e){var t=e.label,n=e.value,a=e.tooltip,r=J();return Object(m.jsx)(F.a,{className:r.header,children:Object(m.jsxs)(y.a,{container:!0,direction:"row",justifyContent:"space-between",alignItems:"center",children:[t&&Object(m.jsx)(H.a,{variant:"body1",children:t}),n&&Object(m.jsxs)(H.a,{variant:"body2",children:[n,a&&Object(m.jsx)(Z.a,{title:a,placement:"top",arrow:!0,children:Object(m.jsx)(G.a,{size:"small",className:r.copyValue,children:Object(m.jsx)(K.a,{strokeWidth:1})})})]})]})})}var $=Object(j.a)((function(e){return Object(h.a)({wrapper:{display:"flex",flexDirection:"row",flexWrap:"wrap"},action:{marginBottom:e.spacing(1),marginRight:e.spacing(1)}})}));function Q(e){var t=e.children,n=$();return Array.isArray(t)?Object(m.jsx)("div",{className:n.wrapper,children:t.filter((function(e){return e})).map((function(e,t){return Object(m.jsx)("div",{className:n.action,children:e},t)}))}):Object(m.jsx)(y.a,{container:!0,direction:"row",children:Object(m.jsx)(y.a,{className:n.action,children:t})})}var ee=n(114),te=n.n(ee),ne=n(890),ae=n(891),re=Object(j.a)((function(e){return Object(h.a)({header:{backgroundColor:e.palette.background.paper,marginBottom:e.spacing(.25),borderLeft:"".concat(e.spacing(.25),"px solid rgba(0,0,0,0)"),wordBreak:"break-word"},headerOpen:{borderLeft:"".concat(e.spacing(.25),"px solid ").concat(e.palette.primary.main)},copyValue:{cursor:"pointer",padding:e.spacing(1),borderRadius:0,"&:hover":{backgroundColor:"#fcf2e8",color:e.palette.primary.main}},content:{marginTop:e.spacing(2),marginBottom:e.spacing(2)},keyMargin:{marginRight:e.spacing(1)}})}));function ce(e){var t,n=e.label,r=e.value,c=re(),i=Object(a.useState)(!1),o=Object(U.a)(i,2),s=o[0],l=o[1],u=Object(a.useState)(!1),d=Object(U.a)(u,2),b=d[0],j=d[1],h=function(){return l(!s)},p=function(){return j(!0)},O=function(){return j(!1)},f=function(e){var t=function(e){return e.replace(/^0x/i,"").length}(e);return t%6===0?e.match(/(0x|.{6})/gi)||[]:e.match(/(0x|.{1,8})/gi)||[]}(r),x="string"===typeof(t=r)&&/^0x[0-9a-f]+$/i.test(t),g="".concat(x?"".concat(f[0]," ").concat(f[1]):f[0],"[\u2026]").concat(f[f.length-1]);return Object(m.jsx)(F.a,{className:"".concat(c.header," ").concat(s?c.headerOpen:""),children:Object(m.jsxs)(y.a,{container:!0,direction:"column",justifyContent:"space-between",alignItems:"stretch",children:[Object(m.jsxs)(y.a,{container:!0,direction:"row",justifyContent:"space-between",alignItems:"center",children:[n&&Object(m.jsx)(H.a,{variant:"body1",children:n}),Object(m.jsx)(H.a,{variant:"body2",children:Object(m.jsxs)("div",{children:[!s&&Object(m.jsx)("span",{className:c.copyValue,children:Object(m.jsx)(Z.a,{title:b?"Copied":"Copy",placement:"top",arrow:!0,onClose:O,children:Object(m.jsx)(ee.CopyToClipboard,{text:r,children:Object(m.jsx)("span",{onClick:p,children:r?g:""})})})}),Object(m.jsx)(G.a,{size:"small",className:c.copyValue,children:s?Object(m.jsx)(ne.a,{onClick:h,strokeWidth:1}):Object(m.jsx)(ae.a,{onClick:h,strokeWidth:1})})]})})]}),Object(m.jsx)(M.a,{in:s,timeout:"auto",unmountOnExit:!0,children:Object(m.jsx)("div",{className:c.content,children:Object(m.jsx)(Z.a,{title:b?"Copied":"Copy",placement:"top",arrow:!0,onClose:O,children:Object(m.jsx)(ee.CopyToClipboard,{text:r,children:Object(m.jsx)("span",{onClick:p,children:Object(m.jsx)("span",{className:c.copyValue,children:f.map((function(e,t){return Object(m.jsx)(H.a,{variant:"body2",className:c.keyMargin,component:"span",children:e},t)}))})})})})})})]})})}var ie=n(896),oe=n(894),se=n(902),le=n(898),ue=n(899),de=n(895),be=n(897),je=n(137),he={apiUrl:L.a.BEE_API_HOST,apiDebugUrl:L.a.BEE_DEBUG_API_HOST,beeApi:null,beeDebugApi:null,setApiUrl:function(){},setDebugApiUrl:function(){},lockedApiSettings:!1},pe=Object(a.createContext)(he);pe.Consumer;function Oe(e){var t=e.children,n=e.beeApiUrl,r=e.beeDebugApiUrl,c=e.lockedApiSettings,i=Object(a.useState)(he.apiUrl),o=Object(U.a)(i,2),s=o[0],l=o[1],u=Object(a.useState)(he.apiDebugUrl),d=Object(U.a)(u,2),b=d[0],j=d[1],h=Object(a.useState)(null),p=Object(U.a)(h,2),O=p[0],f=p[1],x=Object(a.useState)(null),g=Object(U.a)(x,2),v=g[0],y=g[1],w=Object(a.useState)(Boolean(c)),k=Object(U.a)(w,1)[0],S=n||s,C=r||b;return Object(a.useEffect)((function(){try{f(new je.Bee(S)),sessionStorage.setItem("api_host",S)}catch(e){f(null)}}),[S]),Object(a.useEffect)((function(){try{y(new je.BeeDebug(C)),sessionStorage.setItem("debug_api_host",C)}catch(e){y(null)}}),[C]),Object(m.jsx)(pe.Provider,{value:{apiUrl:S,apiDebugUrl:C,beeApi:O,beeDebugApi:v,setApiUrl:l,setDebugApiUrl:j,lockedApiSettings:k},children:t})}var fe=n(358),xe=n.n(fe),me=n(892);function ge(e){var t=e.value,n=Object(l.b)().enqueueSnackbar;return Object(m.jsx)("div",{style:{marginRight:"3px",marginLeft:"3px"},children:Object(m.jsx)(G.a,{color:"primary",size:"small",onClick:function(){return n("Copied: ".concat(t),{variant:"success"})},children:Object(m.jsx)(ee.CopyToClipboard,{text:t,children:Object(m.jsx)(me.a,{style:{height:"20px"}})})})})}var ve=n(359),ye=n.n(ve),we=n(893);function ke(e){var t=Object(a.useState)(!1),n=Object(U.a)(t,2),r=n[0],c=n[1];return Object(m.jsxs)("div",{children:[Object(m.jsx)(G.a,{color:"primary",size:"small",onClick:function(){c(!0)},children:Object(m.jsx)(we.a,{})}),Object(m.jsx)(oe.a,{onClose:function(){c(!1)},"aria-labelledby":"simple-dialog-title",open:r,children:Object(m.jsxs)("div",{style:{padding:"30px",textAlign:"center"},children:[Object(m.jsx)(de.a,{id:"simple-dialog-title",children:e.label}),Object(m.jsx)(ye.a,{value:e.value,size:150,bgColor:"#ffffff",fgColor:"#000000",level:"L",includeMargin:!1,renderAs:"svg"})]})})]})}function Se(e){return Object(m.jsx)(H.a,{component:"div",variant:"subtitle1",children:e.address?Object(m.jsxs)("div",{style:{display:"flex"},children:[e.hideBlockie?null:Object(m.jsx)("div",{style:{paddingTop:"5px",marginRight:"10px"},children:Object(m.jsx)(xe.a,{size:20,string:e.address})}),Object(m.jsx)("div",{children:Object(m.jsx)("a",{style:e.truncate?{marginRight:"7px",maxWidth:"200px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"}:{marginRight:"7px"},href:"".concat(L.a.BLOCKCHAIN_EXPLORER_URL,"/").concat(e.transaction?"tx":"address","/").concat(e.address),target:"_blank",rel:"noreferrer",children:e.address})}),Object(m.jsx)(ke,{value:e.address,label:"Ethereum Address"}),Object(m.jsx)(ge,{value:e.address})]}):"-"})}function Ce(e){var t=e.peerId,n=e.uncashedAmount,r=Object(a.useState)(!1),c=Object(U.a)(r,2),i=c[0],o=c[1],s=Object(a.useState)(!1),u=Object(U.a)(s,2),j=u[0],h=u[1],p=Object(l.b)().enqueueSnackbar,O=Object(a.useContext)(pe).beeDebugApi,f=function(){o(!1)};return Object(m.jsxs)("div",{children:[Object(m.jsxs)(ie.a,{variant:"contained",onClick:function(){o(!0)},startIcon:Object(m.jsx)(be.a,{size:"1rem"}),children:["Cash out peer ",t.substr(0,8),"[\u2026]"]}),Object(m.jsxs)(oe.a,{open:i,onClose:f,"aria-labelledby":"form-dialog-title",children:[Object(m.jsx)(de.a,{id:"form-dialog-title",children:"Cashout Cheque"}),Object(m.jsx)(le.a,{children:Object(m.jsxs)(ue.a,{style:{marginTop:"20px",overflowWrap:"break-word"},children:[j&&Object(m.jsxs)(m.Fragment,{children:[Object(m.jsxs)("span",{children:["Cashing out ",Object(m.jsx)("strong",{children:n})," from Peer ",Object(m.jsx)("strong",{children:t}),". Please wait..."]}),Object(m.jsx)(d.a,{style:{textAlign:"center",padding:"50px"},children:Object(m.jsx)(b.a,{})})]}),!j&&Object(m.jsxs)("span",{children:["Are you sure you want to cashout ",Object(m.jsxs)("strong",{children:[n," BZZ"]})," from Peer"," ",Object(m.jsx)("strong",{children:t}),"?"]})]})}),Object(m.jsxs)(se.a,{children:[Object(m.jsx)(ie.a,{onClick:f,color:"primary",children:"Cancel"}),Object(m.jsx)(ie.a,{onClick:function(){O&&(t?(h(!0),O.cashoutLastCheque(t).then((function(e){o(!1),p(Object(m.jsxs)("span",{children:["Successfully cashed out cheque. Transaction",Object(m.jsx)(Se,{hideBlockie:!0,transaction:!0,address:e})]}),{variant:"success"})})).catch((function(e){p(Object(m.jsxs)("span",{children:["Error: ",e.message]}),{variant:"error"})})).finally((function(){h(!1)}))):p(Object(m.jsx)("span",{children:"Peer Id invalid"}),{variant:"error"}))},color:"primary",disabled:j,children:"Yes Cashout"})]})]})]})}function Ae(e){var t=e.accounting,n=e.isLoadingUncashed,a=e.totalUncashed;return Object(m.jsxs)(Y,{label:"Peers (".concat((null===t||void 0===t?void 0:t.length)||0,")"),info:"".concat(a.toFixedDecimal()," BZZ (uncashed)"),children:[Object(m.jsx)(X,{label:"Uncashed Amount Total",value:"".concat(a.toFixedDecimal()," BZZ")}),null===t||void 0===t?void 0:t.map((function(e){var t=e.peer,a=e.balance,r=e.received,c=e.sent,i=e.uncashedAmount,o=e.total;return Object(m.jsxs)(Y,{label:"Peer ".concat(t.substr(0,8),"[\u2026]"),level:1,info:"".concat(i.toFixedDecimal()," BZZ (uncashed)"),children:[Object(m.jsx)(ce,{label:"Peer ID",value:t}),Object(m.jsx)(X,{label:"Outstanding Balance",value:"".concat(a.toFixedDecimal()," BZZ")}),Object(m.jsx)(X,{label:"Settlements Sent / Received",value:"-".concat(c.toFixedDecimal()," / ").concat(r.toFixedDecimal()," BZZ")}),Object(m.jsx)(X,{label:"Total",value:"".concat(o.toFixedDecimal()," BZZ")}),Object(m.jsx)(X,{label:"Uncashed Amount",value:n?"loading\u2026":"".concat(i.toFixedDecimal()," BZZ")}),i.toBigNumber.isGreaterThan("0")&&Object(m.jsx)(Q,{children:Object(m.jsx)(Ce,{uncashedAmount:i.toFixedDecimal(),peerId:t})})]},t)}))]})}var Ee=n(904),Pe=Object(j.a)((function(e){return Object(h.a)({root:{height:"100%"},content:{maxWidth:500,marginBottom:e.spacing(4),"&:last-child":{marginBottom:0}},icon:{height:"1rem"}})}));function Te(){var e=Pe();return Object(m.jsxs)(y.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",className:e.root,children:[Object(m.jsx)(y.a,{item:!0,className:e.content,children:Object(m.jsx)(H.a,{variant:"h1",align:"center",children:"Uh oh, it looks like your node is not connected."})}),Object(m.jsx)(y.a,{item:!0,className:e.content,children:Object(m.jsxs)(H.a,{align:"center",children:["Please check your node status to fix the problem. You can also check out the"," ",Object(m.jsx)(S.a,{href:L.a.BEE_DOCS_HOST,target:"_blank",rel:"noreferrer",children:"Swarm Bee Docs"})," ","or ask for support on the"," ",Object(m.jsx)(S.a,{href:L.a.BEE_DISCORD_HOST,target:"_blank",rel:"noreferrer",children:"Ethereum Swarm Discord"}),"."]})}),Object(m.jsx)(y.a,{item:!0,className:e.content,children:Object(m.jsx)(H.a,{align:"center",children:Object(m.jsx)(ie.a,{component:u.b,variant:"contained",startIcon:Object(m.jsx)(Ee.a,{className:e.icon}),to:pr.STATUS,children:"Check node status"})})})]})}var Be=n(3),Ne=n.n(Be),De=n(27),Ie=n(50),_e=n(155),Le=n.n(_e),Re=n(360),Ue=n(361),Fe=n.n(Ue),We=n(39),He=window.location.search.includes("devMode=1"),Me={status:{all:!1,version:!1,blockchainConnection:!1,debugApiConnection:!1,apiConnection:!1,topology:!1,chequebook:!1},latestPublishedVersion:void 0,latestUserVersion:void 0,latestUserVersionExact:void 0,isLatestBeeVersion:!1,latestBeeVersionUrl:"https://github.com/ethersphere/bee/releases/latest",error:null,apiHealth:!1,debugApiHealth:null,nodeAddresses:null,nodeInfo:null,topology:null,chequebookAddress:null,peers:null,chequebookBalance:null,peerBalances:null,peerCheques:null,settlements:null,chainState:null,latestBeeRelease:null,isLoading:!0,isRefreshing:!1,lastUpdate:null,start:function(){},stop:function(){},refresh:function(){return Promise.reject()}},Ve=Object(a.createContext)(Me);Ve.Consumer;function qe(e,t,n,a,r,c,i,o){var s,l=He||Boolean(Object({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_BEE_HOST:"http://localhost:1633",REACT_APP_BEE_DEBUG_HOST:"http://localhost:1635",REACT_APP_BEE_DOCS_HOST:"https://docs.ethswarm.org/docs/",REACT_APP_BEE_DISCORD_HOST:"https://discord.gg/eKr9XPv7",REACT_APP_BLOCKCHAIN_EXPLORER_URL:"https://blockscout.com/xdai/mainnet",REACT_APP_BEE_GITHUB_REPO_URL:"https://api.github.com/repos/ethersphere/bee"}).REACT_APP_DEV_MODE)||"dev"===(null===n||void 0===n?void 0:n.beeMode),u={version:Boolean(e&&Le.a.satisfies(e.version,Re.a.bee,{includePrerelease:!0})),blockchainConnection:Boolean(null===t||void 0===t?void 0:t.ethereum),debugApiConnection:Boolean("ok"===(null===e||void 0===e?void 0:e.status)),apiConnection:a,topology:Boolean((null===r||void 0===r?void 0:r.connected)&&(null===r||void 0===r?void 0:r.connected)>0)||l,chequebook:Boolean(null===c||void 0===c?void 0:c.chequebookAddress)&&null!==i&&(null===i||void 0===i?void 0:i.totalBalance.toBigNumber.isGreaterThan(0))||l||(s=null===n||void 0===n?void 0:n.beeMode,"ultra-light"===s)};return Object(Ie.a)(Object(Ie.a)({},u),{},{all:!o&&Object.values(u).every((function(e){return e}))})}function ze(e){var t,n,r=e.children,c=Object(a.useContext)(pe),i=c.beeApi,o=c.beeDebugApi,s=Object(a.useState)(!1),l=Object(U.a)(s,2),u=l[0],d=l[1],b=Object(a.useState)(null),j=Object(U.a)(b,2),h=j[0],p=j[1],O=Object(a.useState)(null),f=Object(U.a)(O,2),x=f[0],g=f[1],v=Object(a.useState)(null),y=Object(U.a)(v,2),w=y[0],k=y[1],S=Object(a.useState)(null),C=Object(U.a)(S,2),A=C[0],E=C[1],P=Object(a.useState)(null),T=Object(U.a)(P,2),B=T[0],N=T[1],D=Object(a.useState)(null),I=Object(U.a)(D,2),_=I[0],R=I[1],F=Object(a.useState)(null),W=Object(U.a)(F,2),H=W[0],M=W[1],V=Object(a.useState)(null),q=Object(U.a)(V,2),z=q[0],Y=q[1],Z=Object(a.useState)(null),G=Object(U.a)(Z,2),K=G[0],J=G[1],X=Object(a.useState)(null),$=Object(U.a)(X,2),Q=$[0],ee=$[1],te=Object(a.useState)(null),ne=Object(U.a)(te,2),ae=ne[0],re=ne[1],ce=function(){var e=Object(a.useState)(null),t=Object(U.a)(e,2),n=t[0],r=t[1],c=Object(a.useState)(!1),i=Object(U.a)(c,2),o=i[0],s=i[1],l=Object(a.useState)(null),u=Object(U.a)(l,2),d=u[0],b=u[1];return Object(a.useEffect)((function(){Fe.a.get("".concat(L.a.GITHUB_REPO_URL,"/releases/latest")).then((function(e){r(e.data)})).catch((function(e){b(e)})).finally((function(){s(!1)}))}),[]),{latestBeeRelease:n,isLoadingLatestBeeRelease:o,error:d}}(),ie=ce.latestBeeRelease,oe=Object(a.useState)(Me.error),se=Object(U.a)(oe,2),le=se[0],ue=se[1],de=Object(a.useState)(Me.isLoading),be=Object(U.a)(de,2),je=be[0],he=be[1],Oe=Object(a.useState)(Me.isRefreshing),fe=Object(U.a)(Oe,2),xe=fe[0],me=fe[1],ge=Object(a.useState)(Me.lastUpdate),ve=Object(U.a)(ge,2),ye=ve[0],we=ve[1],ke=Object(a.useState)(3e4),Se=Object(U.a)(ke,2),Ce=Se[0],Ae=Se[1],Ee=null===(t=Le.a.coerce(null===ie||void 0===ie?void 0:ie.name))||void 0===t?void 0:t.version,Pe=null===(n=Le.a.coerce(null===h||void 0===h?void 0:h.version))||void 0===n?void 0:n.version,Te=null===h||void 0===h?void 0:h.version;Object(a.useEffect)((function(){he(!0),d(!1),Be()}),[i]),Object(a.useEffect)((function(){he(!0),p(null),g(null),E(null),k(null),R(null),N(null),M(null),Y(null),J(null),ee(null),re(null),Be()}),[o]);var Be=function(){var e=Object(De.a)(Ne.a.mark((function e(){var t,n,a,r;return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!xe){e.next=2;break}return e.abrupt("return");case 2:if(i&&o){e.next=5;break}return he(!1),e.abrupt("return");case 5:return e.prev=5,me(!0),ue(null),t=function(){var e=Object(De.a)(Ne.a.mark((function e(){var t,n,a;return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.getChequebookBalance();case 2:return t=e.sent,n=t.totalBalance,a=t.availableBalance,e.abrupt("return",{totalBalance:new We.a(n),availableBalance:new We.a(a)});case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),n=function(){var e=Object(De.a)(Ne.a.mark((function e(){var t,n;return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.getAllBalances();case 2:return t=e.sent,n=t.balances,e.abrupt("return",n.map((function(e){var t=e.peer,n=e.balance;return{peer:t,balance:new We.a(n)}})));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),a=function(){var e=Object(De.a)(Ne.a.mark((function e(){var t,n,a,r;return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.getAllSettlements();case 2:return t=e.sent,n=t.totalReceived,a=t.settlements,r=t.totalSent,e.abrupt("return",{totalReceived:new We.a(n),totalSent:new We.a(r),settlements:a.map((function(e){var t=e.peer,n=e.received,a=e.sent;return{peer:t,received:new We.a(n),sent:new We.a(a)}}))});case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),r=[i.isConnected().then(d).catch((function(){return d(!1)})),o.getHealth().then(p).catch((function(){return p(null)})),o.getNodeAddresses().then(g).catch((function(){return g(null)})),o.getNodeInfo().then(k).catch((function(){return k(null)})),o.getTopology().then(E).catch((function(){return E(null)})),o.getPeers().then(R).catch((function(){return R(null)})),o.getChequebookAddress().then(N).catch((function(){return N(null)})),o.getLastCheques().then(J).catch((function(){return J(null)})),o.getChainState().then(re).catch((function(){return re(null)})),t().then(M).catch((function(){return M(null)})),n().then(Y).catch((function(){return Y(null)})),a().then(ee).catch((function(){return ee(null)}))],e.next=14,Promise.allSettled(r);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(5),ue(e.t0);case 19:return e.prev=19,he(!1),me(!1),we(Date.now()),e.finish(19);case 24:case"end":return e.stop()}}),e,null,[[5,16,19,24]])})));return function(){return e.apply(this,arguments)}}();return Object(a.useEffect)((function(){if(Be(),Ce){var e=setInterval(Be,Ce);return function(){return clearInterval(e)}}}),[Ce,o,i]),Object(m.jsx)(Ve.Provider,{value:{status:qe(h,x,w,u,A,B,H,le),latestUserVersion:Pe,latestUserVersionExact:Te,latestPublishedVersion:Ee,isLatestBeeVersion:Boolean(Ee&&Pe&&Le.a.satisfies(Ee,Pe,{includePrerelease:!0})),latestBeeVersionUrl:(null===ie||void 0===ie?void 0:ie.html_url)||"https://github.com/ethersphere/bee/releases/latest",error:le,apiHealth:u,debugApiHealth:h,nodeAddresses:x,nodeInfo:w,topology:A,chequebookAddress:B,peers:_,chequebookBalance:H,peerBalances:z,peerCheques:K,settlements:Q,chainState:ae,latestBeeRelease:ie,isLoading:je,isRefreshing:xe,lastUpdate:ye,start:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e4;return Ae(e)},stop:function(){return Ae(null)},refresh:Be},children:r})}var Ye=n(38);var Ze=function(e,t,n){var r=Object(a.useState)(!1),c=Object(U.a)(r,2),i=c[0],o=c[1],s=Object(a.useState)(void 0),l=Object(U.a)(s,2),u=l[0],d=l[1];Object(a.useEffect)((function(){if(!i&&e&&t&&!u){o(!0);var n=t.settlements.filter((function(e){return e.received.toBigNumber.gt("0")})).map((function(t){var n=t.peer;return Object(Ye.h)((function(){return e.getLastCashoutAction(n)}))}));Promise.allSettled(n).then((function(e){var t=Object(Ye.k)(e);d(t.fulfilled),o(!1)}))}}),[t,i,u,e]);var b=function(e,t,n){if(!e||!t)return null;var a={};return e.forEach((function(e){var t=e.peer,n=e.balance;return a[t]={peer:t,balance:n,sent:new We.a("0"),received:new We.a("0"),uncashedAmount:new We.a("0"),total:n}})),t.forEach((function(e){var t=e.peer,n=e.sent,r=e.received;return a[t]=Object(Ie.a)(Object(Ie.a)({},a[t]),{},{sent:n,received:r,total:new We.a(a[t].balance.toBigNumber.plus(r.toBigNumber).minus(n.toBigNumber))})})),n?(null===n||void 0===n||n.forEach((function(e){var t=e.peer,n=e.uncashedAmount;a[t].uncashedAmount=new We.a(n)})),Object.values(a).sort((function(e,t){var n=t.uncashedAmount.toBigNumber.minus(e.uncashedAmount.toBigNumber).toNumber();return 0!==n?n:e.peer22?n.slice(0,19)+"...":n;function O(){"NEW_WINDOW"===i?window.open(r||n):h(r||n)}return Object(m.jsx)(F.a,{className:l.header,children:Object(m.jsx)(y.a,{container:!0,direction:"column",justifyContent:"space-between",alignItems:"stretch",children:Object(m.jsxs)(y.a,{container:!0,direction:"row",justifyContent:"space-between",alignItems:"center",children:[t&&Object(m.jsx)(H.a,{variant:"body1",children:t}),Object(m.jsx)(H.a,{variant:"body2",children:Object(m.jsxs)("div",{children:[s&&Object(m.jsx)("span",{className:l.copyValue,children:Object(m.jsx)(Z.a,{title:b?"Copied":"Copy",placement:"top",arrow:!0,onClose:function(){return j(!1)},children:Object(m.jsx)(te.a,{text:n,children:Object(m.jsx)("span",{onClick:function(){return j(!0)},children:p})})})}),!s&&Object(m.jsx)("span",{onClick:O,children:p}),Object(m.jsxs)(G.a,{size:"small",className:l.openLinkIcon,children:["NEW_WINDOW"===i&&Object(m.jsx)(C.a,{onClick:O,strokeWidth:1}),"HISTORY_PUSH"===i&&Object(m.jsx)(Kt.a,{onClick:O,strokeWidth:1})]})]})})]})})})}var $t=n(379),Qt=n(918),en=n(919),tn=n(920),nn=["index.html","index.htm"];function an(e){var t=e.map(on);if(!t.length)return!1;var n=t.find((function(e){return nn.includes(e)}));if(n)return{indexPath:n};var a=t[0].split("/")[0]+"/";if(t.every((function(e){return e.startsWith(a)}))){var r=t.find((function(e){return nn.map((function(e){return a+e})).includes(e)}));if(r)return{indexPath:r,commonPrefix:a}}return!1}function rn(e){return e>=1e15?(e/1e15).toFixed(2)+" PB":e>=1e12?(e/1e12).toFixed(2)+" TB":e>=1e9?(e/1e9).toFixed(2)+" GB":e>=1e6?(e/1e6).toFixed(2)+" MB":e>=1e3?(e/1e3).toFixed(2)+" kB":e+" bytes"}function cn(e){if(1===e.length)return e[0].name;if(e.length>0){var t=on(e[0]).split("/")[0];if(e.every((function(e){return on(e).split("/")[0]===t})))return t}return"unknown"}function on(e){return(e.path||e.webkitRelativePath||e.name).replace(/^\//g,"")}function sn(e){var t=on(e);return{path:t,fullPath:t,webkitRelativePath:t,lastModified:e.lastModified,name:e.name,size:e.size,type:e.type,stream:e.stream,slice:e.slice,text:e.text,arrayBuffer:function(){var t=Object(De.a)(Ne.a.mark((function t(){return Ne.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.arrayBuffer();case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()}}function ln(e,t,n){return new Promise((function(a,r){if(!e.size||!e.type||!["image/bmp","image/gif","image/vnd.microsoft.icon","image/jpeg","image/png","image/svg+xml","image/tiff","image/webp"].includes(e.type))return r("File not supported!");try{var c=new FileReader;c.readAsDataURL(e),c.onload=function(e){var r,c=null===e||void 0===e||null===(r=e.target)||void 0===r?void 0:r.result;if(!c||"string"!==typeof c)throw new Error("Failed to load the image source");var i=new Image;i.src=c,i.onload=function(){var e=function(e,t,n,a){var r=n?e/n:1,c=a?t/a:1,i=Math.max(r,c);return i<=1?{width:e,height:t}:{width:e/i,height:t/i}}(i.width,i.height,t,n),r=document.createElement("canvas");r.width=e.width,r.height=e.height;var c=r.getContext("2d");if(!c)throw new Error("Failed to create canvas context");c.drawImage(i,0,0,r.width,r.height),c.canvas.toBlob((function(e){if(!e)throw new Error("Failed to extract the blob from canvas");a(e)}),"image/jpeg",1)}},c.onerror=function(e){return r(e)}}catch(i){r(i)}}))}var un=".swarmgatewaymeta.json",dn=".swarmgatewaypreview.jpeg",bn=250,jn=175,hn={origin:"UPLOAD"},pn={files:[],setFiles:function(){},uploadOrigin:hn,setUploadOrigin:function(){}},On=Object(a.createContext)(pn);On.Consumer;function fn(e){var t=e.children,n=Object(a.useState)(pn.files),r=Object(U.a)(n,2),c=r[0],i=r[1],o=Object(a.useState)(pn.uploadOrigin),s=Object(U.a)(o,2),l=s[0],u=s[1],d=Object(a.useState)(void 0),b=Object(U.a)(d,2),j=b[0],h=b[1],p=Object(a.useState)(void 0),O=Object(U.a)(p,2),f=O[0],x=O[1],g=Object(a.useState)(void 0),v=Object(U.a)(g,2),y=v[0],w=v[1];return Object(a.useEffect)((function(){if(h(function(e){var t=e.reduce((function(e,t){return e+t.size}),0),n=Boolean(an(e));return{size:t,name:cn(e),type:1===e.length?e[0].type:"folder",isWebsite:n,count:e.length}}(c)),f&&(URL.revokeObjectURL(f),x(void 0),w(void 0)),1===c.length&&c[0].type.startsWith("image"))return ln(c[0],bn,jn).then((function(e){x(URL.createObjectURL(e)),w(e)})),function(){f&&URL.revokeObjectURL(f)}}),[c]),Object(m.jsx)(On.Provider,{value:{files:c,setFiles:i,uploadOrigin:l,setUploadOrigin:u,metadata:j,previewUri:f,previewBlob:y},children:t})}var xn=Object(j.a)((function(e){return Object(h.a)({areaWrapper:{position:"relative",marginBottom:e.spacing(2)},dropzone:{background:e.palette.background.default,outline:"none",color:"transparent",zIndex:1,"& svg":{opacity:0}},buttonWrapper:{top:"0",left:"0",position:"absolute",display:"flex",width:"100%",height:"100%",justifyContent:"center",alignItems:"center"},button:{marginLeft:e.spacing(.5),marginRight:e.spacing(.5),zIndex:2}})}));function mn(e){var t=e.uploadOrigin,n=e.showHelp,r=Object(a.useContext)(On),c=r.setFiles,i=r.setUploadOrigin,o=xn(),s=Object(R.g)(),u=Object(l.b)().enqueueSnackbar,d=Object(a.useState)(!1),b=Object(U.a)(d,2),j=b[0],h=b[1],p=Object(a.useState)(0),O=Object(U.a)(p,2),f=O[0],x=O[1],g=function(){return document.querySelector(".MuiDropzoneArea-root input")},v=function(){var e=g();e&&(e.setAttribute("directory",""),e.setAttribute("webkitdirectory",""),e.setAttribute("mozdirectory",""),e.click())};return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsxs)("div",{className:o.areaWrapper,children:[Object(m.jsx)($t.a,{dropzoneClass:o.dropzone,onChange:function(e){if(e){var n=e,a=1===e.length?e[0].name:an(n)||void 0;if(e.length&&j&&!a)return u("To upload a website, there must be an index.html or index.htm in the root of the folder.",{variant:"error"}),void setTimeout((function(){x((function(e){return e+1})),c([])}),0);c(n),e.length&&(i(t),s(pr.UPLOAD_IN_PROGRESS))}},filesLimit:1e9,maxFileSize:1e9,showPreviews:!1},f),Object(m.jsxs)("div",{className:o.buttonWrapper,children:[Object(m.jsx)(st,{className:o.button,onClick:function(){var e=g();e&&(e.removeAttribute("directory"),e.removeAttribute("webkitdirectory"),e.removeAttribute("mozdirectory"),e.click())},iconType:Qt.a,children:"Add File"}),Object(m.jsx)(st,{className:o.button,onClick:function(){v(),h(!1)},iconType:en.a,children:"Add Folder"}),Object(m.jsx)(st,{className:o.button,onClick:function(){v(),h(!0)},iconType:tn.a,children:"Add Website"})]})]}),n&&Object(m.jsx)(Ut,{children:"You can click the buttons above or simply drag and drop to add a file or folder. To upload a website to Swarm, make sure that your folder contains an \u201cindex.html\u201d file."})]})}function gn(){var e=Object(a.useContext)(ut).identities,t=Object(R.h)().uuid,n=Object(a.useContext)(pe).beeApi,r=Object(a.useContext)(Ve).status,c=Object(R.g)(),i=Object(a.useState)(!1),o=Object(U.a)(i,2),s=o[0],l=o[1],u=e.find((function(e){return e.uuid===t}));if(Object(a.useEffect)((function(){if(u&&u.feedHash)try{null===n||void 0===n||n.downloadData(u.feedHash).then((function(){return l(!0)}))}catch(e){l(!1)}}),[n,t,u]),!u||!r.all)return c(pr.FEEDS,{replace:!0}),Object(m.jsx)(m.Fragment,{});return Object(m.jsxs)("div",{children:[Object(m.jsx)(Ht,{children:"".concat(u.name," Website")}),Object(m.jsx)(mn,{showHelp:!1,uploadOrigin:{origin:"FEED",uuid:t}}),s&&u.feedHash?Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(rt.a,{mb:.25,children:Object(m.jsx)(ce,{label:"Feed hash",value:u.feedHash})}),Object(m.jsx)(rt.a,{mb:4,children:Object(m.jsx)(Xt,{label:"BZZ Link",value:"https://".concat(Gt.encodeFeedReference(u.feedHash),".bzz.link")})})]}):Object(m.jsx)(rt.a,{mb:4,children:Object(m.jsxs)(Ut,{children:["This feed is curently not pointing anywhere, you can update the feed to fix this. Please refer to the"," ",Object(m.jsx)("a",{href:"https://docs.ethswarm.org/api/#tag/Feed/paths/~1feeds~1{owner}~1{topic}/post",target:"_blank",rel:"noreferrer",children:"official Bee documentation"}),"."]})}),Object(m.jsx)(Q,{children:Object(m.jsx)(st,{iconType:jt.a,onClick:function(){c(pr.FEEDS)},cancel:!0,children:"Close"})})]})}var vn=n(117),yn={stamps:null,error:null,isLoading:!1,lastUpdate:null,start:function(){},stop:function(){},refresh:function(){return Promise.reject()}},wn=Object(a.createContext)(yn);wn.Consumer;function kn(e){var t=e.depth,n=e.bucketDepth,a=e.utilization/Math.pow(2,t-n),r="".concat(Math.ceil(100*a),"%");return Object(Ie.a)(Object(Ie.a)({},e),{},{usage:a,usageText:r})}function Sn(e){var t=e.children,n=Object(a.useContext)(pe).beeDebugApi,r=Object(a.useState)(yn.stamps),c=Object(U.a)(r,2),i=c[0],o=c[1],s=Object(a.useState)(yn.error),l=Object(U.a)(s,2),u=l[0],d=l[1],b=Object(a.useState)(yn.isLoading),j=Object(U.a)(b,2),h=j[0],p=j[1],O=Object(a.useState)(yn.lastUpdate),f=Object(U.a)(O,2),x=f[0],g=f[1],v=Object(a.useState)(null),y=Object(U.a)(v,2),w=y[0],k=y[1],S=function(){var e=Object(De.a)(Ne.a.mark((function e(){var t;return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!h){e.next=2;break}return e.abrupt("return");case 2:if(n){e.next=4;break}return e.abrupt("return");case 4:return e.prev=4,p(!0),e.next=8,n.getAllPostageBatch();case 8:t=e.sent,o(t.map(kn)),g(Date.now()),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(4),d(e.t0);case 16:return e.prev=16,p(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[4,13,16,19]])})));return function(){return e.apply(this,arguments)}}();return Object(a.useEffect)((function(){if(S(),w){var e=setInterval(S,w);return function(){return clearInterval(e)}}}),[w]),Object(m.jsx)(wn.Provider,{value:{stamps:i,error:u,isLoading:h,lastUpdate:x,start:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e4;return k(e)},stop:function(){return k(null)},refresh:S},children:t})}function Cn(e){var t=e.feedName,n=e.onProceed,r=e.onCancel,c=e.loading,i=Object(a.useState)(""),o=Object(U.a)(i,2),s=o[0],l=o[1];return Object(m.jsxs)(ht,{children:[Object(m.jsx)(rt.a,{mb:4,children:Object(m.jsx)(mt,{onClose:r,children:"Update Feed"})}),Object(m.jsx)(rt.a,{mb:2,children:Object(m.jsxs)(H.a,{children:["Please enter the password for \u201c",t,"\u201d:"]})}),Object(m.jsx)(rt.a,{mb:4,children:Object(m.jsx)(Dt,{label:"Password",name:"password",onChange:function(e){l(e.target.value)},password:!0})}),Object(m.jsxs)(Q,{children:[Object(m.jsx)(st,{iconType:Et.a,onClick:function(){return n(s)},disabled:c,loading:c,children:"Proceed"}),Object(m.jsx)(st,{iconType:jt.a,onClick:r,cancel:!0,disabled:c,children:"Cancel"})]})]})}function An(){var e=Object(a.useContext)(ut),t=e.identities,n=e.setIdentities,r=Object(a.useContext)(pe),c=r.beeApi,i=r.beeDebugApi,o=Object(a.useContext)(wn),s=o.stamps,u=o.refresh,d=Object(a.useContext)(Ve).status,b=Object(R.h)().hash,j=Object(a.useState)(null),h=Object(U.a)(j,2),p=h[0],O=h[1],f=Object(a.useState)(null),x=Object(U.a)(f,2),g=x[0],v=x[1],w=Object(a.useState)(!1),k=Object(U.a)(w,2),S=k[0],C=k[1],A=Object(l.b)().enqueueSnackbar,E=Object(a.useState)(!1),P=Object(U.a)(E,2),B=P[0],N=P[1],D=Object(R.g)();function I(e,t){return _.apply(this,arguments)}function _(){return(_=Object(De.a)(Ne.a.mark((function e(a,r){return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(C(!0),c&&i&&p){e.next=5;break}return A(Object(m.jsx)("span",{children:"Bee API unavailabe"}),{variant:"error"}),C(!1),e.abrupt("return");case 5:return e.prev=5,e.next=8,Object(bt.f)(c,a,b,p,r);case 8:Object(bt.e)(t,a),n(Object(vn.a)(t)),D(pr.FEEDS_PAGE.replace(":uuid",a.uuid)),e.next=18;break;case 13:e.prev=13,e.t0=e.catch(5),C(!1),("object"===typeof e.t0&&null!==e.t0&&Reflect.get(e.t0,"message")||"").includes("possibly wrong passphrase")?A("Wrong password, please try again",{variant:"error"}):A("Could not update feed at this time, please try again later",{variant:"error"});case 18:case"end":return e.stop()}}),e,null,[[5,13]])})))).apply(this,arguments)}return Object(a.useEffect)((function(){u()}),[]),d.all?Object(m.jsxs)("div",{children:[B&&g&&Object(m.jsx)(Cn,{feedName:g.name+" Website",onCancel:function(){N(!1)},onProceed:function(e){I(g,e)},loading:S}),Object(m.jsx)(Ht,{children:"Update feed"}),Object(m.jsx)(rt.a,{mb:2,children:Object(m.jsx)(y.a,{container:!0,children:Object(m.jsx)(zt,{options:t.map((function(e){return{value:e.uuid,label:"".concat(e.name," Website")}})),onChange:function(e){var n=e.target.value;v(t.find((function(e){return e.uuid===n}))||null)},label:"Feed"})})}),Object(m.jsx)(rt.a,{mb:4,children:Object(m.jsx)(y.a,{container:!0,children:s?Object(m.jsx)(zt,{options:s.map((function(e){return{value:e.batchID,label:e.batchID.slice(0,8)}})),onChange:function(e){var t=e.target.value;O(t)},label:"Stamp"}):Object(m.jsx)(H.a,{children:"You need to buy a stamp first to be able to update a feed."})})}),Object(m.jsxs)(Q,{children:[Object(m.jsx)(st,{onClick:function(){g&&("V3"===g.type?N(!0):I(g))},iconType:T.a,loading:!B&&S,disabled:S||!p||!g,children:"Update Selected Feed"}),Object(m.jsx)(st,{onClick:function(){D(-1)},iconType:jt.a,disabled:S,cancel:!0,children:"Close"})]})]}):Object(m.jsx)(Te,{})}var En=n(198),Pn=n(385),Tn=n(922),Bn=n(923),Nn=Object(j.a)((function(e){return Object(h.a)({header:{backgroundColor:"#F7F7F7",marginBottom:e.spacing(.25)},typography:{color:"#242424"}})}));function Dn(e){var t=e.children,n=Nn();return Object(m.jsx)(F.a,{className:n.header,children:Object(m.jsx)(H.a,{variant:"body1",className:n.typography,children:t})})}var In,_n=Object(j.a)((function(e){return Object(h.a)({header:{backgroundColor:e.palette.background.paper,marginBottom:e.spacing(.25),borderLeft:"".concat(e.spacing(.25),"px solid rgba(0,0,0,0)"),wordBreak:"break-word"},headerOpen:{borderLeft:"".concat(e.spacing(.25),"px solid ").concat(e.palette.primary.main)},copyValue:{cursor:"pointer",padding:e.spacing(1),borderRadius:0,"&:hover":{backgroundColor:"#fcf2e8",color:e.palette.primary.main}},content:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},keyMargin:{marginRight:e.spacing(1)},unselectableLabel:{cursor:"default",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"}})}));function Ln(e){var t=e.label,n=e.value,r=e.onConfirm,c=e.onChange,i=e.confirmLabel,o=e.confirmLabelDisabled,s=e.expandedOnly,l=e.helperText,u=e.placeholder,d=e.loading,b=e.mapperFn,j=e.locked,h=_n(),p=Object(a.useState)(Boolean(s)),O=Object(U.a)(p,2),f=O[0],x=O[1],g=Object(a.useState)(n||""),v=Object(U.a)(g,2),w=v[0],k=v[1],S=function(){return x(!f)};return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(F.a,{className:"".concat(h.header," ").concat(f?h.headerOpen:""),children:Object(m.jsxs)(y.a,{container:!0,direction:"column",justifyContent:"space-between",alignItems:"stretch",children:[Object(m.jsxs)(y.a,{container:!0,direction:"row",justifyContent:"space-between",alignItems:"center",children:[t&&Object(m.jsx)(H.a,{variant:"body1",className:h.unselectableLabel,children:t}),Object(m.jsx)(H.a,{variant:"body2",children:Object(m.jsxs)("div",{children:[!f&&n,!s&&!j&&Object(m.jsx)(G.a,{size:"small",className:h.copyValue,children:f?Object(m.jsx)(ne.a,{onClick:S,strokeWidth:1}):Object(m.jsx)(Tn.a,{onClick:S,strokeWidth:1})})]})})]}),Object(m.jsx)(M.a,{in:f,timeout:"auto",unmountOnExit:!0,children:Object(m.jsx)(Pn.a,{value:w,placeholder:u,onChange:function(e){b&&(e.target.value=b(e.target.value)),k(e.target.value),c&&c(e.target.value)},fullWidth:!0,className:h.content,autoFocus:!0,hidden:j})})]})}),Object(m.jsxs)(M.a,{in:f,timeout:"auto",unmountOnExit:!0,children:[l&&Object(m.jsx)(Dn,{children:l}),Object(m.jsxs)(Q,{children:[Object(m.jsx)(st,{disabled:d||w===n||Boolean(o)||""===w&&void 0===n,loading:d,iconType:Bn.a,onClick:function(){return r(w)},children:i||"Save"}),Object(m.jsx)(st,{disabled:d||w===n||""===w,iconType:jt.a,onClick:function(){return k(n||"")},cancel:!0,children:"Cancel"})]})]})]})}function Rn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return"".concat(e.slice(0,t),"[\u2026]").concat(e.slice(-t))}function Un(e,t,n){var a=Fn(e),r=a.findIndex((function(e){return e.hash===t}));-1!==r&&a.splice(r,1),a.unshift({createdAt:Date.now(),hash:t,name:n}),a.length>10&&(a.length=10),localStorage.setItem(e,JSON.stringify(a))}function Fn(e){var t=localStorage.getItem(e);if(!t)return[];try{var n=JSON.parse(t);return Array.isArray(n)&&n.every(Wn)?n:[]}catch(a){return[]}}function Wn(e){return"object"===typeof e&&null!==e&&("createdAt"in e&&"hash"in e)}function Hn(e,t){return"index.html"===t?"Website ".concat(Rn(e,4)):t||"Folder ".concat(Rn(e,4))}function Mn(e){var t=e.title,n=e.localStorageKey,r=Object(a.useState)([]),c=Object(U.a)(r,2),i=c[0],o=c[1];return Object(a.useEffect)((function(){o(Fn(n))}),[n]),i.length?Object(m.jsx)(Y,{label:t,defaultOpen:!0,children:i.map((function(e,t){return Object(m.jsx)(Xt,{label:(n=new Date(e.createdAt),n.toString().split("GMT")[0].trim()),value:e.name,link:"/files/hash/"+e.hash,navigationType:"HISTORY_PUSH",allowClipboard:!1},t);var n}))}):null}!function(e){e.UPLOAD_HISTORY="UPLOAD_HISTORY",e.DOWNLOAD_HISTORY="DOWNLOAD_HISTORY"}(In||(In={}));var Vn=n(948),qn=n(924),zn=Object(j.a)((function(e){return Object(h.a)({root:{flexGrow:1,marginBottom:e.spacing(4)},leftTab:{marginRight:e.spacing(.5)},rightTab:{marginLeft:e.spacing(.5)}})}));function Yn(e){var t=e.active,n=zn(),a=Object(R.g)();return Object(m.jsx)("div",{className:n.root,children:Object(m.jsxs)(Vn.a,{value:"UPLOAD"===t?0:1,onChange:function(e,t){a(1===t?pr.DOWNLOAD:pr.UPLOAD)},variant:"fullWidth",children:[Object(m.jsx)(qn.a,{className:n.leftTab,label:"Upload"},"UPLOAD"),Object(m.jsx)(qn.a,{className:n.rightTab,label:"Download"},"DOWNLOAD")]})})}function Zn(){var e=Object(a.useState)(!1),t=Object(U.a)(e,2),n=t[0],r=t[1],c=Object(a.useContext)(pe).beeApi,i=Object(a.useState)(void 0),o=Object(U.a)(i,2),s=o[0],u=o[1],d=Object(a.useContext)(On).setUploadOrigin,b=Object(l.b)().enqueueSnackbar,j=Object(R.g)();function h(){return(h=Object(De.a)(Ne.a.mark((function e(t){var n,a,i,o;return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r(!0),c){e.next=4;break}return r(!1),e.abrupt("return");case 4:return e.prev=4,n=new En.ManifestJs(c),e.next=8,n.resolveFeedManifest(t);case 8:return(a=e.sent)&&(t=a),e.next=12,n.isManifest(t);case 12:if(e.sent){e.next=15;break}throw Error("The specified hash does not contain valid content.");case 15:return e.next=17,n.getIndexDocumentPath(t);case 17:i=e.sent,Un(In.DOWNLOAD_HISTORY,t,Hn(t,i)),d(hn),j(pr.HASH.replace(":hash",t)),e.next=29;break;case 23:e.prev=23,e.t0=e.catch(4),(o="object"===typeof e.t0&&null!==e.t0&&Reflect.get(e.t0,"message")).includes("path address not found")&&(o="The specified hash does not have an index document set."),o.includes("Not Found: Not Found")&&(o="The specified hash was not found."),b(Object(m.jsxs)("span",{children:["Error: ",o||"Unknown"]}),{variant:"error"});case 29:return e.prev=29,r(!1),e.finish(29);case 32:case"end":return e.stop()}}),e,null,[[4,23,29,32]])})))).apply(this,arguments)}return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(Yn,{active:"DOWNLOAD"}),Object(m.jsx)(Ln,{label:"Swarm Hash",onConfirm:function(e){return function(e){return h.apply(this,arguments)}(e)},onChange:function(e){je.Utils.isHexString(e,64)||je.Utils.isHexString(e,128)||!e.trim().length?u(void 0):u("Incorrect format of swarm hash. Expected 64 or 128 hexstring characters.")},helperText:s,confirmLabel:"Find",confirmLabelDisabled:Boolean(s)||n,placeholder:"e.g. 31fb0362b1a42536134c86bc58b97ac0244e5c6630beec3e27c2d1cecb38c605",expandedOnly:!0,mapperFn:function(e){return function(e){return e.length<64?e:Object(Ye.d)(e)||e}(e)},loading:n}),Object(m.jsx)(Mn,{title:"Download History",localStorageKey:In.DOWNLOAD_HISTORY})]})}var Gn=n(373),Kn=n.n(Gn);function Jn(){return Object(m.jsx)(y.a,{container:!0,direction:"row",justifyContent:"center",alignItems:"center",children:Object(m.jsx)(b.a,{})})}var Xn=n(926),$n=n(925),Qn=n(927),ea=Object(j.a)((function(){return Object(h.a)({image:{width:"100%",height:"100%",objectFit:"cover"}})}));function ta(e){var t=ea(),n={};return e.maxHeight&&(n.maxHeight=e.maxHeight),e.maxWidth&&(n.maxWidth=e.maxWidth),Object(m.jsx)("img",{className:t.image,alt:e.alt,src:e.src,style:n})}var na=Object(j.a)((function(){return Object(h.a)({wrapper:{display:"flex",justifyContent:"center",alignItems:"center",width:"175px",height:"175px",background:"repeating-linear-gradient(\n 45deg,\n #efefef,\n #efefef 4px,\n #ffffff 4px,\n #ffffff 8px\n )"}})}));function aa(e){var t=e.children,n=na();return Object(m.jsx)("div",{className:n.wrapper,children:t})}function ra(e){var t=e.icon;return Object(m.jsx)(aa,{children:t})}function ca(e){var t=e.metadata,n=e.previewUri,a=Object(m.jsx)($n.a,{}),r=null===t||void 0===t?void 0:t.type;return(null===t||void 0===t?void 0:t.isWebsite)?(a=Object(m.jsx)(Xn.a,{}),r="Website"):"folder"===(null===t||void 0===t?void 0:t.type)&&(a=Object(m.jsx)(Qn.a,{}),r="Folder"),Object(m.jsxs)(rt.a,{mb:4,children:[Object(m.jsx)(rt.a,{bgcolor:"background.paper",children:Object(m.jsxs)(y.a,{container:!0,direction:"row",children:[n?Object(m.jsx)(ta,{maxWidth:"250px",maxHeight:"175px",alt:"Upload Preview",src:n}):Object(m.jsx)(ra,{icon:a}),Object(m.jsxs)(rt.a,{p:2,children:[(null===t||void 0===t?void 0:t.hash)&&Object(m.jsxs)(H.a,{children:["Swarm Hash: ",Rn(t.hash)]}),(null===t||void 0===t?void 0:t.name)&&(null===t||void 0===t?void 0:t.name)!==(null===t||void 0===t?void 0:t.hash)&&Object(m.jsxs)(H.a,{children:["folder"===(null===t||void 0===t?void 0:t.type)?"Folder Name":"Filename",": ",Object(Ye.j)(null===t||void 0===t?void 0:t.name)]}),Object(m.jsxs)(H.a,{children:["Kind: ",r]}),(null===t||void 0===t?void 0:t.size)?Object(m.jsxs)(H.a,{children:["Size: ",rn(t.size)]}):null]})]})}),"folder"===(null===t||void 0===t?void 0:t.type)&&t.count&&Object(m.jsx)(rt.a,{mt:.25,p:2,bgcolor:"background.paper",children:Object(m.jsxs)(y.a,{container:!0,justifyContent:"space-between",alignItems:"center",direction:"row",children:[Object(m.jsx)(H.a,{variant:"subtitle2",children:"Folder content"}),Object(m.jsxs)(H.a,{variant:"subtitle2",children:[t.count," items"]})]})})]})}function ia(e){var t=e.isWebsite,n=e.hash;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsxs)(rt.a,{mb:4,children:[Object(m.jsx)(ce,{label:"Swarm hash",value:n}),Object(m.jsx)(Xt,{label:"Share on Swarm Gateway",value:"https://gateway.ethswarm.org/access/".concat(n)}),t&&Object(m.jsx)(Xt,{label:"BZZ Link",value:"https://".concat(Gt.encodeManifestReference(n).toString(),".bzz.link")})]}),Object(m.jsxs)(Ut,{children:["The Swarm Gateway is graciously provided by the Swarm Foundation. This service is under development and provided for testing purposes only. Learn more at"," ",Object(m.jsx)("a",{href:"https://gateway.ethswarm.org/",children:"https://gateway.ethswarm.org/"}),"."]})]})}var oa=n(928);function sa(e){var t=e.onOpen,n=e.onCancel,a=e.onDownload,r=e.onUpdateFeed,c=e.hasIndexDocument,i=e.loading;return Object(m.jsxs)(y.a,{container:!0,justifyContent:"space-between",children:[Object(m.jsxs)(Q,{children:[c&&Object(m.jsx)(st,{onClick:t,iconType:oa.a,disabled:i,children:"View Website"}),Object(m.jsx)(st,{onClick:a,iconType:tt.a,disabled:i,loading:i,children:"Download"}),Object(m.jsx)(st,{onClick:n,iconType:jt.a,disabled:i,cancel:!0,children:"Close"})]}),Object(m.jsx)(rt.a,{mb:1,mr:1,children:Object(m.jsx)(st,{onClick:r,iconType:T.a,disabled:i,children:"Update Feed"})})]})}function la(){var e=Object(a.useContext)(pe),t=e.apiUrl,n=e.beeApi,r=Object(a.useContext)(Ve).status,c=Object(R.h)().hash,i=c,o=Object(R.g)(),s=Object(l.b)().enqueueSnackbar,u=Object(a.useState)(!0),d=Object(U.a)(u,2),b=d[0],j=d[1],h=Object(a.useState)(!1),p=Object(U.a)(h,2),O=p[0],f=p[1],x=Object(a.useState)({}),g=Object(U.a)(x,2),v=g[0],y=g[1],w=Object(a.useState)(null),k=Object(U.a)(w,2),S=k[0],C=k[1],A=Object(a.useState)(!1),E=Object(U.a)(A,2),P=E[0],T=E[1],B=Object(a.useState)(void 0),N=Object(U.a)(B,2),D=N[0],I=N[1],_=Object(a.useState)(),F=Object(U.a)(_,2),W=F[0],M=F[1];function V(){return V=Object(De.a)(Ne.a.mark((function e(){var t,a,o,l,u,d,b,j;return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n&&r.all){e.next=2;break}return e.abrupt("return");case 2:return t=new En.ManifestJs(n),e.next=5,t.isManifest(i);case 5:if(e.sent){e.next=10;break}return T(!0),s("The specified hash does not contain valid content.",{variant:"error"}),e.abrupt("return");case 10:return e.next=12,t.getHashes(i);case 12:return a=e.sent,e.next=15,t.getIndexDocumentPath(i);case 15:return o=e.sent,C(o),l=a[dn],delete a[un],delete a[dn],y(a),u=Object.keys(a).length,d={hash:c,size:0,type:u>1?"folder":"unknown",name:i,isWebsite:Boolean(o)&&u>1,count:u},e.prev=23,e.next=26,n.downloadFile(i,un);case 26:b=e.sent,j=b.data.text(),d=Object(Ie.a)(Object(Ie.a)({},d),JSON.parse(j)),e.next=33;break;case 31:e.prev=31,e.t0=e.catch(23);case 33:l&&I("".concat(L.b.BEE_API_HOST,"/bzz/").concat(i,"/").concat(dn)),M(d);case 35:case"end":return e.stop()}}),e,null,[[23,31]])}))),V.apply(this,arguments)}function q(){return(q=Object(De.a)(Ne.a.mark((function e(){var a,r,c,o,s,l,u;return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return");case 2:if(Un(In.DOWNLOAD_HISTORY,i,Hn(i,S)),f(!0),1!==Object.keys(v).length){e.next=8;break}window.open("".concat(t,"/bzz/").concat(i,"/"),"_blank"),e.next=25;break;case 8:a=new Kn.a,r=0,c=Object.entries(v);case 10:if(!(r0?o(-1):o(pr.UPLOAD)},onDownload:function(){return q.apply(this,arguments)},onUpdateFeed:function(){o(pr.FEEDS_UPDATE.replace(":hash",i))},hasIndexDocument:Boolean(null===W||void 0===W?void 0:W.isWebsite),loading:O})]}):Object(m.jsx)(Te,{})}var ua=Object(j.a)((function(){return Object(h.a)({wrapper:{height:"52px",display:"flex",flex:1,justifyContent:"center",alignItems:"center"},todo:{background:"#f7f7f7",color:"#c9c9c9"},inProgress:{background:"#ffffff",color:"#242424",height:"52px"},done:{background:"#f7f7f7",color:"#606060",height:"52px"}})}));function da(e){var t=e.steps,n=e.index,a=ua();function r(e){return e===n?a.inProgress:e255)return"-";var n=Object(Ye.a)(e,t);return"".concat(n.toSignificantDigits()," BZZ")}return Object(m.jsx)(Tt.c,{initialValues:ba,onSubmit:function(){var e=Object(De.a)(Ne.a.mark((function e(n,a){var o,s,l;return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n.depth&&n.amount){e.next=3;break}return e.abrupt("return");case 3:if(c){e.next=5;break}return e.abrupt("return");case 5:return o=BigInt(n.amount),s=Number.parseInt(n.depth),l=n.label?{label:n.label}:void 0,e.next=10,c.createPostageBatch(o.toString(),s,l);case 10:return a.resetForm(),e.next=13,r();case 13:t(),e.next=20;break;case 16:e.prev=16,e.t0=e.catch(0),i("Error: ".concat(e.t0.message),{variant:"error"}),a.setSubmitting(!1);case 20:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t,n){return e.apply(this,arguments)}}(),validate:function(e){var t={};if(e.depth){var n=new Ke.a(e.depth);n.isInteger()?n.isLessThan(16)?t.depth="Minimal depth is 16":n.isGreaterThan(255)&&(t.depth="Depth has to be at most 255"):t.depth="Depth must be an integer"}else t.depth="Required field";if(e.amount){var a=new Ke.a(e.amount);a.isInteger()?a.isLessThanOrEqualTo(0)&&(t.amount="Amount must be greater than 0"):t.amount="Amount must be an integer"}else t.amount="Required field";return e.label&&!/^[0-9a-z]*$/i.test(e.label)&&(t.label="Label must be an alphanumeric string"),t},children:function(e){var t,n=e.submitForm,a=e.isValid,r=e.isSubmitting,c=e.values;return Object(m.jsxs)(Tt.b,{children:[Object(m.jsxs)(rt.a,{mb:2,children:[Object(m.jsx)(Dt,{name:"depth",label:"Depth",formik:!0}),Object(m.jsx)(rt.a,{mt:.25,sx:{bgcolor:"#f6f6f6"},p:2,children:Object(m.jsxs)(y.a,{container:!0,justifyContent:"space-between",children:[Object(m.jsx)(H.a,{children:"Corresponding file size"}),Object(m.jsx)(H.a,{children:(t=parseInt(c.depth||"0",10),isNaN(t)||t<17||t>255?"-":"~".concat(rn(Object(Ye.c)(t))))})]})})]}),Object(m.jsxs)(rt.a,{mb:2,children:[Object(m.jsx)(Dt,{name:"amount",label:"Amount",formik:!0}),Object(m.jsx)(rt.a,{mt:.25,sx:{bgcolor:"#f6f6f6"},p:2,children:Object(m.jsxs)(y.a,{container:!0,justifyContent:"space-between",children:[Object(m.jsx)(H.a,{children:"Corresponding TTL (Time to live)"}),Object(m.jsx)(H.a,{children:o(Number.parseInt(c.amount||"0",10))})]})})]}),Object(m.jsx)(rt.a,{mb:2,children:Object(m.jsx)(Dt,{name:"label",label:"Label",optional:!0,formik:!0})}),Object(m.jsx)(rt.a,{mb:4,sx:{bgcolor:"#fcf2e8"},p:2,children:Object(m.jsxs)(y.a,{container:!0,justifyContent:"space-between",children:[Object(m.jsx)(H.a,{children:"Indicative Price"}),Object(m.jsx)(H.a,{children:s(parseInt(c.depth||"0",10),BigInt(c.amount||"0"))})]})}),Object(m.jsx)(st,{disabled:r||!a||!c.amount||!c.depth,onClick:n,iconType:Et.a,loading:r,children:"Buy New Stamp"})]})}})}function ha(e){var t=e.onSelect,n=e.defaultValue,r=Object(a.useContext)(wn).stamps;return Object(m.jsx)(zt,{options:(r||[]).map((function(e){return{label:e.batchID.slice(0,8),value:e.batchID}})),onChange:function(e){return function(e){if(r){var n=r.find((function(t){return t.batchID===e}));n&&t(n)}}(e.target.value)},defaultValue:n})}function pa(e){var t=e.width,n=e.usage,a=Math.round(100*n),r=a+"%",c=98-a+"%";return Object(m.jsx)("div",{style:{display:"flex",alignItems:"center",height:"100%",width:t},children:Object(m.jsxs)("div",{style:{display:"flex",height:"4px",width:"100%"},children:[Object(m.jsx)("div",{style:{width:r,background:"#dd7200"}}),Object(m.jsx)("div",{style:{width:"2%"}}),Object(m.jsx)("div",{style:{width:c,background:"#c9c9c9"}})]})})}function Oa(e){var t=e.stamp,n=e.shorten;return Object(m.jsx)(rt.a,{p:2,width:"100%",children:Object(m.jsxs)(y.a,{container:!0,justifyContent:"space-between",alignItems:"center",direction:"row",children:[Object(m.jsx)(H.a,{variant:"subtitle2",children:n?t.batchID.slice(0,8):t.batchID}),Object(m.jsx)(pa,{width:"100px",usage:t.usage})]})})}function fa(e){var t=e.stamp;return Object(m.jsxs)(rt.a,{mb:4,children:[Object(m.jsx)(rt.a,{mb:.25,p:2,bgcolor:"background.paper",children:Object(m.jsx)(H.a,{variant:"subtitle2",children:"Associated postage stamp:"})}),Object(m.jsx)(rt.a,{bgcolor:"background.paper",children:Object(m.jsx)(Oa,{stamp:t,shorten:!0})})]})}var xa=n(930);function ma(e){var t=e.step,n=e.onUpload,a=e.onCancel,r=e.onGoBack,c=e.onProceed,i=e.isUploading,o=e.hasStamp,s=e.uploadLabel,l=e.stampMode,u=e.setStampMode;return 0===t?Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(rt.a,{mb:1,children:Object(m.jsxs)(Q,{children:[Object(m.jsx)(st,{onClick:c,iconType:B.a,children:"Add Postage Stamp"}),Object(m.jsx)(st,{onClick:a,iconType:jt.a,cancel:!0,children:"Cancel"})]})}),Object(m.jsx)(Ut,{children:"You need a postage stamp to upload."})]}):1===t?Object(m.jsxs)(y.a,{container:!0,direction:"row",justifyContent:"space-between",children:[Object(m.jsxs)(Q,{children:["SELECT"===l&&Object(m.jsx)(st,{onClick:c,iconType:Et.a,disabled:!o,children:"Proceed With Selected Stamp"}),Object(m.jsx)(st,{onClick:r,iconType:xa.a,cancel:!0,children:"Back To Preview"})]}),Object(m.jsx)(st,{onClick:function(){return u("BUY"===l?"SELECT":"BUY")},iconType:"BUY"===l?B.a:ct.a,children:"BUY"===l?"Use Existing Stamp":"Buy New Stamp"})]}):2===t?Object(m.jsxs)(Q,{children:[Object(m.jsx)(st,{onClick:n,iconType:Et.a,disabled:i,loading:i,children:s}),Object(m.jsx)(st,{onClick:r,iconType:xa.a,disabled:i,cancel:!0,children:"Change Postage Stamp"})]}):Object(m.jsx)(m.Fragment,{})}function ga(){var e=Object(a.useState)(0),t=Object(U.a)(e,2),n=t[0],r=t[1],c=Object(a.useState)("SELECT"),i=Object(U.a)(c,2),o=i[0],s=i[1],u=Object(a.useState)(null),d=Object(U.a)(u,2),b=d[0],j=d[1],h=Object(a.useState)(!1),p=Object(U.a)(h,2),O=p[0],f=p[1],x=Object(a.useState)(!1),g=Object(U.a)(x,2),v=g[0],y=g[1],w=Object(a.useContext)(wn).refresh,k=Object(a.useContext)(pe).beeApi,S=Object(a.useContext)(On),C=S.files,A=S.setFiles,E=S.uploadOrigin,P=S.metadata,T=S.previewUri,B=S.previewBlob,N=Object(a.useContext)(ut),D=N.identities,I=N.setIdentities,_=Object(a.useContext)(Ve).status,L=Object(l.b)().enqueueSnackbar,F=Object(R.g)();if(Object(a.useEffect)((function(){w()}),[]),!_.all)return Object(m.jsx)(Te,{});if(!C.length)return A([]),F(pr.UPLOAD,{replace:!0}),Object(m.jsx)(m.Fragment,{});var W=E.uuid?D.find((function(e){return e.uuid===E.uuid})):null,H=function(e){if(k&&C.length&&b&&P){var t=C.map(sn),n=void 0;if(1===C.length)n=C[0].name;else if(C.length>1){var a=an(C);if(a)if(a.commonPrefix){var r=a.commonPrefix.length;n=a.indexPath.substr(r),t=t.map((function(e){var t=e.path.substr(r);return Object(Ie.a)(Object(Ie.a)({},e),{},{path:t,webkitRelativePath:t,fullPath:t})}))}else n=a.indexPath}var c=C[0].lastModified,i={name:P.name,size:P.size};1===C.length&&(i.type=P.type);var o=new File([JSON.stringify(i)],un,{type:"application/json",lastModified:c});if(t.push(sn(o)),B){var s=new File([B],dn,{type:"image/jpeg",lastModified:c});t.push(sn(s))}f(!0),k.uploadFiles(b.batchID,t,{indexDocument:n}).then((function(t){Un(In.UPLOAD_HISTORY,t.reference,cn(C)),"UPLOAD"===E.origin?F(pr.HASH.replace(":hash",t.reference),{replace:!0}):Object(bt.f)(k,W,t.reference,b.batchID,e).then((function(){Object(bt.e)(D,W),I(Object(vn.a)(D)),F(pr.FEEDS_PAGE.replace(":uuid",E.uuid),{replace:!0})}))})).catch((function(e){L("Error uploading: ".concat(e.message),{variant:"error"}),f(!1)}))}};return Object(m.jsxs)(m.Fragment,{children:[v&&Object(m.jsx)(Cn,{loading:O,feedName:W.name,onCancel:function(){return y(!1)},onProceed:function(e){H(e)}}),W&&Object(m.jsx)(Ht,{children:'Update "'.concat(W.name,'"')}),!W&&Object(m.jsx)(Ht,{children:"Upload"}),Object(m.jsx)(rt.a,{mb:4,children:Object(m.jsx)(da,{steps:["Preview","Add postage stamp","Upload to node"],index:n})}),(0===n||2===n)&&Object(m.jsx)(ca,{metadata:P,previewUri:T}),1===n&&Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(rt.a,{mb:2,children:"SELECT"===o?Object(m.jsx)(ha,{onSelect:function(e){return j(e)},defaultValue:null===b||void 0===b?void 0:b.batchID}):Object(m.jsx)(ja,{onFinished:function(){return s("SELECT")}})}),Object(m.jsx)(rt.a,{mb:4,children:Object(m.jsxs)(Ut,{children:["Please refer to the"," ",Object(m.jsx)("a",{href:"https://docs.ethswarm.org/debug-api/#tag/Postage-Stamps/paths/~1stamps~1{amount}~1{depth}/post",target:"_blank",rel:"noreferrer",children:"official Bee documentation"})," ","to understand these values."]})})]}),2===n&&b&&Object(m.jsx)(fa,{stamp:b}),Object(m.jsx)(ma,{step:n,onCancel:function(){r(0),A([]),j(null),f(!1)},onGoBack:function(){return r((function(e){return e-1}))},onProceed:function(){return r((function(e){return e+1}))},onUpload:function(){"UPLOAD"===E.origin||"PRIVATE_KEY"===W.type?H():y(!0)},isUploading:O,hasStamp:Boolean(b),uploadLabel:W?"Update Feed":"Upload To Your Node",stampMode:o,setStampMode:s})]})}function va(){return Object(a.useContext)(Ve).status.all?Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(Yn,{active:"UPLOAD"}),Object(m.jsx)(mn,{showHelp:!0,uploadOrigin:hn}),Object(m.jsx)(Mn,{title:"Upload History",localStorageKey:In.UPLOAD_HISTORY})]}):Object(m.jsx)(Te,{})}var ya=n(193),wa=1e5,ka="There may be issues with your Bee node or connection.",Sa={connectedPeers:[{minimumValue:200,explanation:"Perfect! ".concat(200," or more connected peers indicate a healthy topology."),score:2},{minimumValue:1,explanation:"Your Bee node is connected to peers, but this number should ideally be above ".concat(200,". If you have only started your Bee node, this number may increase quickly."),score:1},{minimumValue:0,explanation:"Your Bee node has not connected to any peers. "+ka,score:0}],population:[{minimumValue:wa,explanation:"Perfect! Your Bee node seems to have a realistic value for the network size, which means everything is working well on your end.",score:2},{minimumValue:1,explanation:"Population is usually above ".concat(wa.toLocaleString(),". If the number does not increase within a few hours, there may be issues with your Bee node."),score:1},{minimumValue:0,explanation:"Your Bee node has no information on the network population. "+ka,score:0}],depth:[{minimumValue:12,explanation:"Perfect! Your Bee node has the highest available depth.",score:2},{minimumValue:1,explanation:"Your Bee node is supposed to reach a depth of ".concat(12," eventually. Stagnation or decrease in this number may indicate problems with your Bee node."),score:1},{minimumValue:0,explanation:"Your Bee node has not started building its topology yet. "+ka,score:0}]};function Ca(e,t){var n,a=Sa[e],r=a[0].score,c=Object(ya.a)(a);try{for(c.s();!(n=c.n()).done;){var i=n.value;if(t>=i.minimumValue)return{score:i.score,maximumScore:r,explanation:i.explanation}}}catch(s){c.e(s)}finally{c.f()}var o=a[a.length-1];return{score:o.score,maximumScore:r,explanation:o.explanation}}var Aa=function(e){var t,n,a,r,c,i,o={connectedPeers:Ca("connectedPeers",(null===(t=e.topology)||void 0===t?void 0:t.connected)||0),population:Ca("population",(null===(n=e.topology)||void 0===n?void 0:n.population)||0),depth:Ca("depth",(null===(a=e.topology)||void 0===a?void 0:a.depth)||0)},s=Object.values(o).reduce((function(e,t){return e+t.maximumScore}),0),l=Object.values(o).reduce((function(e,t){return e+t.score}),0),u=Math.round(l/s*100)+"%";return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(X,{label:"Overall Health Indicator",value:u}),Object(m.jsx)(X,{label:"Connected Peers",value:null===(r=e.topology)||void 0===r?void 0:r.connected.toString(),tooltip:o.connectedPeers.explanation}),Object(m.jsx)(X,{label:"Population",value:null===(c=e.topology)||void 0===c?void 0:c.population.toString(),tooltip:o.population.explanation}),Object(m.jsx)(X,{label:"Depth",value:null===(i=e.topology)||void 0===i?void 0:i.depth.toString(),tooltip:o.depth.explanation})]})};function Ea(){var e=Object(a.useContext)(Ve),t=e.nodeInfo,n=e.status,r=e.latestUserVersion,c=e.isLatestBeeVersion,i=e.latestBeeVersionUrl,o=e.topology,s=e.nodeAddresses,l=e.chequebookAddress;return n.all?Object(m.jsxs)("div",{children:[Object(m.jsxs)(Y,{label:"Bee Node",defaultOpen:!0,children:[Object(m.jsx)(X,{label:"Mode",value:(null===t||void 0===t?void 0:t.beeMode)||"Unknown"}),Object(m.jsx)(X,{label:"Agent",value:Object(m.jsxs)("div",{children:[Object(m.jsx)("a",{href:"https://github.com/ethersphere/bee",rel:"noreferrer",target:"_blank",children:"Bee"})," ".concat(r||"-"," "),Object(m.jsx)(ie.a,{size:"small",variant:"outlined",href:i,target:"_blank",children:c?"latest":"update"})]})}),Object(m.jsx)(ce,{label:"Public key",value:(null===s||void 0===s?void 0:s.publicKey)||""}),Object(m.jsx)(ce,{label:"PSS public key",value:(null===s||void 0===s?void 0:s.pssPublicKey)||""}),Object(m.jsx)(ce,{label:"Overlay address (Peer ID)",value:(null===s||void 0===s?void 0:s.overlay)||""}),Object(m.jsx)(Y,{level:1,label:"Underlay addresses",children:null===s||void 0===s?void 0:s.underlay.map((function(e){return Object(m.jsx)(X,{value:e},e)}))})]}),Object(m.jsxs)(Y,{label:"Blockchain",defaultOpen:!0,children:[Object(m.jsx)(ce,{label:"Ethereum address",value:(null===s||void 0===s?void 0:s.ethereum)||""}),Object(m.jsx)(ce,{label:"Chequebook contract address",value:(null===l||void 0===l?void 0:l.chequebookAddress)||""})]}),Object(m.jsx)(Y,{label:"Connectivity",defaultOpen:!0,children:Object(m.jsx)(Aa,{topology:o})})]}):Object(m.jsx)(Te,{})}function Pa(){var e=Object(a.useContext)(pe),t=e.apiUrl,n=e.apiDebugUrl,r=e.setApiUrl,c=e.setDebugApiUrl,i=e.lockedApiSettings;return Object(m.jsxs)(Y,{label:"API Settings",defaultOpen:!0,children:[Object(m.jsx)(Ln,{label:"Bee API",value:t,onConfirm:r,locked:i}),Object(m.jsx)(Ln,{label:"Bee Debug API",value:n,onConfirm:c,locked:i})]})}var Ta=Object(j.a)((function(e){return Object(h.a)({root:{width:"100%",padding:0,margin:0,marginTop:e.spacing(4),"&:first-child":{marginTop:0}},rootLevel1:{marginTop:e.spacing(1)},rootLevel2:{marginTop:e.spacing(.5)},header:{backgroundColor:e.palette.background.paper},contentLevel0:{marginTop:e.spacing(1)},contentLevel12:{marginTop:e.spacing(.25)},infoText:{color:"#c9c9c9"}})}));function Ba(e){var t=e.children,n=e.expandable,r=e.defaultOpen,c=Ta(),i=Object(a.useState)(Boolean(r)),o=Object(U.a)(i,2),s=o[0],l=o[1];return Object(m.jsxs)("div",{className:"".concat(c.root," ").concat(c.rootLevel2),children:[Object(m.jsxs)(F.a,{button:!0,onClick:function(){l(!s)},className:c.header,children:[t,s?Object(m.jsx)(V.a,{}):Object(m.jsx)(q.a,{})]}),Object(m.jsx)(M.a,{in:s,timeout:"auto",unmountOnExit:!0,children:Object(m.jsx)("div",{className:c.contentLevel12,children:n})})]})}var Na=function(e){var t=e.postageStamps;return null===t?null:Object(m.jsx)(Y,{label:"Postage Stamps",defaultOpen:!0,children:t.map((function(e){return Object(m.jsx)(Ba,{expandable:Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(ce,{label:"Batch ID",value:e.batchID}),Object(m.jsx)(X,{label:"Depth",value:String(e.depth)}),Object(m.jsx)(X,{label:"Capacity",value:"".concat(rn(4096*Math.pow(2,e.depth)*e.usage)," / ").concat(rn(4096*Math.pow(2,e.depth)))}),Object(m.jsx)(X,{label:"Amount",value:parseInt(e.amount,10).toLocaleString()})]}),children:Object(m.jsx)(Oa,{stamp:e,shorten:!0})},e.batchID)}))})},Da=Object(j.a)((function(){return Object(h.a)({root:{width:"100%",display:"grid"},actions:{display:"flex",width:"100%",flex:"0 1 auto",flexWrap:"wrap",alignItems:"center"}})}));function Ia(){var e=Da(),t=Object(R.g)(),n=Object(a.useContext)(wn),r=n.stamps,c=n.isLoading,i=n.error,o=n.start,s=n.stop,l=Object(a.useContext)(Ve).status;if(Object(a.useEffect)((function(){if(l.all)return o(),function(){return s()}}),[l]),!l.all)return Object(m.jsx)(Te,{});return Object(m.jsxs)("div",{className:e.root,children:[i&&Object(m.jsxs)(d.a,{style:{textAlign:"center",padding:"50px"},children:["Error loading postage stamps details: ",i.message]}),!i&&Object(m.jsxs)(m.Fragment,{children:[Object(m.jsxs)("div",{className:e.actions,children:[Object(m.jsx)(st,{onClick:function(){t(pr.STAMPS_NEW)},iconType:ct.a,children:"Buy New Postage Stamp"}),Object(m.jsx)("div",{style:{height:"5px"},children:c&&Object(m.jsx)(b.a,{})})]}),Object(m.jsx)(Na,{postageStamps:r})]})]})}function _a(){var e=Object(R.g)();return Object(m.jsxs)("div",{children:[Object(m.jsx)(Ht,{children:"Buy new postage stamp"}),Object(m.jsx)(ja,{onFinished:function(){e(pr.STAMPS)}})]})}var La=n(949),Ra=n(380),Ua=["children","value","index"];function Fa(e){var t=e.children,n=e.value,a=e.index,r=Object(Ra.a)(e,Ua);return Object(m.jsx)("div",Object(Ie.a)(Object(Ie.a)({role:"tabpanel",hidden:n!==a},r),{},{children:n===a&&t}))}var Wa=Object(j.a)((function(e){return Object(h.a)({root:{flexGrow:1},content:{marginTop:e.spacing(2)}})}));function Ha(e){var t=e.values,n=e.index,a=e.indexChanged,c=Wa(),i=r.a.useState(n||0),o=Object(U.a)(i,2),s=o[0],l=o[1],u=void 0!==n?n:s;return Object(m.jsxs)("div",{className:c.root,children:[Object(m.jsx)(Vn.a,{value:u,onChange:function(e,t){a?a(t):l(t)},variant:"fullWidth",children:t.map((function(e,t){var n=e.label;return Object(m.jsx)(qn.a,{label:n},t)}))}),Object(m.jsx)("div",{className:c.content,children:t.map((function(e,t){var n=e.component;return Object(m.jsx)(Fa,{value:u,index:t,children:n},t)}))})]})}var Ma,Va,qa=n(950),za=function(e){return Object(m.jsx)("div",{style:{textAlign:"left"},children:Object(m.jsx)(qa.a,{language:e.language,showLineNumbers:e.showLineNumbers,children:e.code})})};!function(e){e[e.macOS=0]="macOS",e[e.Linux=1]="Linux",e[e.Windows=2]="Windows",e[e.iOS=3]="iOS",e[e.Android=4]="Android"}(Ma||(Ma={})),function(e){e[e.macOS=Ma.macOS]="macOS",e[e.Linux=Ma.Linux]="Linux"}(Va||(Va={}));var Ya={platform:Va.macOS,setPlatform:function(){}},Za=Object(a.createContext)(Ya);Za.Consumer;function Ga(e){var t=e.children,n=Object(a.useState)(Va.Linux),r=Object(U.a)(n,2),c=r[0],i=r[1];return Object(a.useEffect)((function(){var e=function(){var e=window.navigator.userAgent,t=window.navigator.platform;return["Macintosh","MacIntel","MacPPC","Mac68K"].includes(t)?Ma.macOS:["iPhone","iPad","iPod"].includes(t)?Ma.iOS:["Win32","Win64","Windows","WinCE"].includes(t)?Ma.Windows:/Android/.test(e)?Ma.Android:/Linux/.test(t)?Ma.Linux:null}();i(function(e){return Object.keys(Va).includes(e)}(e)?e:Va.Linux)}),[]),Object(m.jsx)(Za.Provider,{value:{platform:c,setPlatform:i},children:t})}function Ka(e){var t=Object(a.useContext)(Za),n=t.platform,r=t.setPlatform;return Object(m.jsx)(Ha,{index:n,indexChanged:r,values:[{label:"Linux",component:Object(m.jsx)(za,{showLineNumbers:e.showLineNumbers,language:"bash",code:e.linux})},{label:"macOS",component:Object(m.jsx)(za,{showLineNumbers:e.showLineNumbers,language:"bash",code:e.mac})}]})}function Ja(e){var t=e.isOk,n=e.size,a=e.className,r=n||"1rem";return e.isLoading?Object(m.jsx)(b.a,{size:r,className:a}):Object(m.jsx)("span",{className:a,style:{backgroundColor:t?"#1de600":"#ff3a52",height:r,width:r,borderRadius:"50%",display:"inline-block"}})}function Xa(){var e=Object(a.useContext)(Ve),t=e.status,n=e.isLoading,r=Object(a.useContext)(pe),c=r.setDebugApiUrl,i=r.apiDebugUrl,o=t.debugApiConnection;return Object(m.jsxs)(Y,{label:Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(Ja,{isOk:o,isLoading:n})," Connection to Bee Debug API"]}),children:[Object(m.jsx)(Dn,{children:o?"The connection to the Bee nodes debug API has been successful":"We cannot connect to your nodes debug API. Please check the following to troubleshoot your issue."}),Object(m.jsx)(Ln,{label:"Bee Debug API",value:i,onConfirm:c}),!o&&Object(m.jsx)(Y,{level:1,label:"Troubleshoot",children:Object(m.jsx)(X,{label:Object(m.jsxs)("ol",{children:[Object(m.jsx)("li",{children:"Check the status of your node by running the below command to see if your node is running."}),Object(m.jsx)(Ka,{showLineNumbers:!0,linux:"sudo systemctl status bee",mac:"brew services list"}),Object(m.jsx)("li",{children:"If your node is running, check your firewall settings to make sure that port 1635 (or your custom specified port) is bound to localhost. If your node is not running try executing the below command to start your bee node"}),Object(m.jsx)(La.a,{style:{marginTop:"10px",marginBottom:"10px"},elevation:6,variant:"filled",severity:"error",children:'Your debug node API should never be completely open to the internet. If you want to connect remotely, make sure your firewall settings are set to only allow specific trusted IP addresses and block all other ports. A simple google search for "what is my ip" will show you your computers public IP address to allow.'}),Object(m.jsx)(Ka,{showLineNumbers:!0,linux:"sudo systemctl start bee",mac:"brew services start swarm-bee"}),Object(m.jsx)("li",{children:"Run the commands to validate your node is running and see the log output."}),Object(m.jsx)(Ka,{showLineNumbers:!0,linux:"sudo systemctl status bee \njournalctl --lines=100 --follow --unit bee",mac:"brew services list \ntail -f /usr/local/var/log/swarm-bee/bee.log"}),Object(m.jsxs)("li",{children:["Lastly, check your nodes configuration settings to validate the debug API is enabled and the Cross Origin Resource Sharing (CORS) setting is configured to allow your host. Config parameter"," ",Object(m.jsx)("strong",{children:"debug-api-enable"})," must be set to ",Object(m.jsx)("strong",{children:"true"})," and"," ",Object(m.jsx)("strong",{children:"cors-allowed-origins"})," must be set to your host domain or IP (you can also use the wildcard ",Object(m.jsx)("code",{children:"cors-allowed-origins: ['*']"}),"). If edits are made to the configuration run the restart command below for changes to take effect."]}),Object(m.jsx)(Ka,{showLineNumbers:!0,linux:"sudo vi /etc/bee/bee.yaml\nsudo systemctl restart bee",mac:"sudo vi /usr/local/etc/swarm-bee/bee.yaml \nbrew services restart swarm-bee"})]})})})]})}function $a(){var e=Object(a.useContext)(pe),t=e.setApiUrl,n=e.apiUrl,r=Object(a.useContext)(Ve),c=r.status,i=r.isLoading,o=c.apiConnection;return Object(m.jsxs)(Y,{label:Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(Ja,{isOk:o,isLoading:i})," Connection to Bee API"]}),children:[Object(m.jsx)(Dn,{children:o?"The connection to the Bee nodes API has been successful":"Could not connect to your Bee nodes API. Please check the troubleshoot below on how you may resolve it."}),Object(m.jsx)(Ln,{label:"Bee API",value:n,onConfirm:t}),!o&&Object(m.jsx)(Y,{level:1,label:"Troubleshoot",children:Object(m.jsx)(X,{label:Object(m.jsxs)("ol",{children:[Object(m.jsx)("li",{children:"Check the status of your node by running the below command to see if your node is running."}),Object(m.jsx)(Ka,{showLineNumbers:!0,linux:"sudo systemctl status bee",mac:"brew services list"}),Object(m.jsx)("li",{children:"If your node is running, check your firewall settings to make sure that port 1633 (or your custom specified port) is exposed to the internet. If your node is not running try executing the below command to start your bee node"}),Object(m.jsx)(Ka,{showLineNumbers:!0,linux:"sudo systemctl start bee",mac:"brew services start swarm-bee"}),Object(m.jsx)("li",{children:"Run the commands to validate your node is running and see the log output."}),Object(m.jsx)(Ka,{showLineNumbers:!0,linux:"sudo systemctl status bee \njournalctl --lines=100 --follow --unit bee",mac:"brew services list \ntail -f /usr/local/var/log/swarm-bee/bee.log"})]})})})]})}function Qa(){var e=Object(a.useContext)(Ve),t=e.status,n=e.isLoading,r=e.latestUserVersion,c=e.latestPublishedVersion,i=e.latestBeeVersionUrl,o=t.version;return Object(m.jsxs)(Y,{label:Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(Ja,{isOk:o,isLoading:n})," Bee Version"]}),children:[Object(m.jsx)(Dn,{children:o?"You are running the latest version of Bee.":Object(m.jsxs)(m.Fragment,{children:["Your Bee version is out of date. Please update to the"," ",Object(m.jsx)("a",{href:i,rel:"noreferrer",target:"_blank",children:"latest"})," ","before continuing. Rerun the installation script below to upgrade. For more information please see the"," ",Object(m.jsx)("a",{href:"https://docs.ethswarm.org/docs/installation/manual#upgrading-bee",rel:"noreferrer",target:"_blank",children:"Docs"}),".",Object(m.jsx)(Ka,{showLineNumbers:!0,linux:"bee version\nwget https://github.com/ethersphere/bee/releases/download/".concat(c,"/bee_").concat(c,"_amd64.deb\nsudo dpkg -i bee_").concat(c,"_amd64.deb"),mac:"bee version\nbrew tap ethersphere/tap\nbrew install swarm-bee\nbrew services start swarm-bee"})]})}),Object(m.jsx)(X,{label:"Your Version",value:r||"-"}),Object(m.jsx)(X,{label:"Latest Version",value:c||"-"})]})}function er(){var e=Object(a.useContext)(Ve),t=e.status,n=e.isLoading,r=e.nodeAddresses,c=t.blockchainConnection;return Object(m.jsxs)(Y,{label:Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(Ja,{isOk:c,isLoading:n})," Connection to Blockchain"]}),children:[Object(m.jsx)(Dn,{children:c?"Your node is connected to the xDai blockchain":Object(m.jsxs)(m.Fragment,{children:["Your Bee node must have access to the xDai blockchain, so that it can interact and deploy your chequebook contract. You can run"," ",Object(m.jsx)("a",{href:"https://www.xdaichain.com/",rel:"noreferrer",target:"_blank",children:"your own xDai node"}),", or use a provider instead - we recommend"," ",Object(m.jsx)("a",{href:"https://getblock.io/",rel:"noreferrer",target:"_blank",children:"Getblock"}),". By default, Bee expects a local node at http://localhost:8545. To use a provider instead, simply change the ",Object(m.jsx)("strong",{children:"swap-endpoint"})," in your configuration file."]})}),(null===r||void 0===r?void 0:r.ethereum)&&Object(m.jsx)(ce,{label:"Ethereum Address",value:null===r||void 0===r?void 0:r.ethereum})]})}var tr=function(){var e=Object(a.useContext)(Ve),t=e.status,n=e.isLoading,r=e.chequebookAddress,c=t.chequebook;return Object(m.jsxs)(Y,{label:Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(Ja,{isOk:c,isLoading:n})," Chequebook Deployment & Funding"]}),children:[Object(m.jsx)(Dn,{children:c?"Your chequebook is deployed and funded":Object(m.jsxs)(m.Fragment,{children:["Your chequebook is either not deployed or funded. To run the node you will need xDAI and xBZZ on the xDai network. You may need to aquire BZZ (e.g. ",Object(m.jsx)("a",{href:"https://bzz.exchange/",children:"bzz.exchange"}),") and bridge it to the xDai network through the ",Object(m.jsx)("a",{href:"https://omni.xdaichain.com/bridge",children:"omni bridge"}),". To pay the transaction fees, you will also need xDAI token. You can purchase DAI on the network and bridge it to xDai network through the ",Object(m.jsx)("a",{href:"https://bridge.xdaichain.com/",children:"xDai Bridge"}),". See the"," ",Object(m.jsx)("a",{href:"https://www.xdaichain.com/#xdai-stable-chain",children:"official xDai website"})," for more information."]})}),r&&Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(ce,{label:"Chequebook Address",value:r.chequebookAddress}),Object(m.jsx)(Q,{children:Object(m.jsx)(nt,{})})]})]})};function nr(){var e=Object(a.useContext)(Ve),t=e.status,n=e.isLoading,r=e.topology,c=t.topology;return Object(m.jsxs)(Y,{label:Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(Ja,{isOk:c,isLoading:n})," Connection to Peers"]}),children:[Object(m.jsx)(Dn,{children:c?"You are connected to other Bee nodes":"Your node is not connected to any peers. Please wait a bit if you just started the node, otherwise review your configuration file."}),Object(m.jsx)(Aa,{topology:r})]})}function ar(){return Object(m.jsxs)("div",{children:[Object(m.jsx)(Xa,{}),Object(m.jsx)(Qa,{}),Object(m.jsx)(er,{}),Object(m.jsx)(tr,{}),Object(m.jsx)($a,{}),Object(m.jsx)(nr,{})]})}var rr=n(932),cr=n(933);function ir(e){return or.apply(this,arguments)}function or(){return(or=Object(De.a)(Ne.a.mark((function e(t){return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://xbzz-faucet.apyos.dev/xbzz/".concat(t),{method:"POST"});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var sr=n(946),lr=n(186),ur="https://rpc.gnosischain.com/";function dr(){return(dr=Object(De.a)(Ne.a.mark((function e(t){var n,a;return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(ur,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",method:"eth_getBalance",params:[t,"latest"],id:1})});case 2:return n=e.sent,e.next=5,n.json();case 5:return a=e.sent,e.abrupt("return",a.result);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var br=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,type:"function"}],jr=new sr.a.JsonRpcProvider(ur);function hr(){return hr=Object(De.a)(Ne.a.mark((function e(t){var n,a,r,c=arguments;return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.length>1&&void 0!==c[1]?c[1]:"0xdbf3ea6f5bee45c02255b2c26a16f300502f68da",a=new lr.a(n,br,jr),e.next=4,a.balanceOf(t);case 4:return r=e.sent,e.abrupt("return",r.toString());case 6:case"end":return e.stop()}}),e)}))),hr.apply(this,arguments)}var pr,Or={eth_getBalance:function(e){return dr.apply(this,arguments)},eth_getBalanceERC20:function(e){return hr.apply(this,arguments)}};function fr(){var e=Object(a.useContext)(Ve),t=e.nodeInfo,n=e.chequebookAddress,r=e.nodeAddresses,c=Object(l.b)().enqueueSnackbar,i=Object(a.useState)(null),o=Object(U.a)(i,2),s=o[0],u=o[1],d=Object(a.useState)(null),b=Object(U.a)(d,2),j=b[0],h=b[1],p=Object(a.useState)(!1),O=Object(U.a)(p,2),f=O[0],x=O[1],g=Object(a.useState)("https://rpc.gnosischain.com/"),v=Object(U.a)(g,2),y=v[0],w=v[1],k=parseInt(window.location.host.split(":")[1],10);function S(){return(S=Object(De.a)(Ne.a.mark((function e(){var t,n,a,r;return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return x(!0),e.prev=1,e.next=4,fetch("http://localhost:".concat(k,"/status")).then((function(e){return e.json()}));case 4:return t=e.sent,n=t.address,e.next=8,fetch("http://getxdai.co/".concat(n,"/0.1"),{method:"POST"});case 8:return e.next=10,Or.eth_getBalance(n);case 10:return a=e.sent,u(a),e.next=14,Or.eth_getBalance(n);case 14:r=e.sent,h(r),c("Wallet funded successfully",{variant:"success"});case 17:return e.prev=17,x(!1),e.finish(17);case 20:case"end":return e.stop()}}),e,null,[[1,,17,20]])})))).apply(this,arguments)}function C(){return(C=Object(De.a)(Ne.a.mark((function e(){return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(null===n||void 0===n?void 0:n.chequebookAddress)){e.next=5;break}return x(!0),e.next=4,ir(null===n||void 0===n?void 0:n.chequebookAddress).finally((function(){return x(!1)}));case 4:c("Successfully funded chequebook address",{variant:"success"});case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function A(){return(A=Object(De.a)(Ne.a.mark((function e(){return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(null===r||void 0===r?void 0:r.ethereum)){e.next=5;break}return x(!0),e.next=4,ir(null===r||void 0===r?void 0:r.ethereum).finally((function(){return x(!1)}));case 4:c("Successfully funded overlay address",{variant:"success"});case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function P(){return(P=Object(De.a)(Ne.a.mark((function e(){return Ne.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return x(!0),e.prev=1,e.next=4,fetch("http://localhost:".concat(k,"/config"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({"chain-enable":!0,"swap-enable":!0,"swap-endpoint":y})});case 4:return e.next=6,fetch("http://localhost:".concat(k,"/restart"),{method:"POST"});case 6:c("Restarting Bee in Light Mode...",{variant:"success"});case 7:return e.prev=7,x(!1),e.finish(7);case 10:case"end":return e.stop()}}),e,null,[[1,,7,10]])})))).apply(this,arguments)}return Object(a.useEffect)((function(){fetch("http://localhost:".concat(k,"/status")).then((function(e){return e.json()})).then((function(e){return Or.eth_getBalance(e.address)})).then((function(e){return u(e)})),fetch("http://localhost:".concat(k,"/status")).then((function(e){return e.json()})).then((function(e){return Or.eth_getBalanceERC20(e.address)})).then((function(e){return h(e)}))}),[k]),t?Object(m.jsxs)("div",{children:[Object(m.jsx)(Ht,{children:"Upgrade"}),Object(m.jsx)(rt.a,{mb:4,children:Object(m.jsx)(rr.a,{variant:"outlined",children:Object(m.jsxs)(rt.a,{p:2,children:[Object(m.jsx)(rt.a,{mb:2,children:Object(m.jsx)(H.a,{variant:"h1",children:"Wallet"})}),Object(m.jsx)(rt.a,{mb:4,children:Object(m.jsxs)(H.a,{children:["Your current balance is ",new We.a(s||"0",18).toSignificantDigits(4)," xDAI and"," ",new We.a(j||"0",16).toSignificantDigits(4)," xBZZ. Fund your node with xDAI so chequebook can be deployed."]})}),Object(m.jsxs)(Q,{children:[Object(m.jsx)(st,{onClick:function(){return S.apply(this,arguments)},iconType:cr.a,loading:f,disabled:f,variant:"outlined",children:"Fund xDAI"}),(null===n||void 0===n?void 0:n.chequebookAddress)&&"0x0000000000000000000000000000000000000000"!==(null===n||void 0===n?void 0:n.chequebookAddress)&&Object(m.jsx)(st,{onClick:function(){return C.apply(this,arguments)},iconType:cr.a,loading:f,disabled:f,variant:"outlined",children:"Fund xBZZ (Chequebook)"}),Object(m.jsx)(st,{onClick:function(){return A.apply(this,arguments)},iconType:cr.a,loading:f,disabled:f,variant:"outlined",children:"Fund xBZZ (Overlay)"})]})]})})}),Object(m.jsx)(rt.a,{mb:4,children:Object(m.jsx)(rr.a,{variant:"outlined",children:Object(m.jsxs)(rt.a,{p:2,children:[Object(m.jsx)(rt.a,{mb:2,children:Object(m.jsx)(H.a,{variant:"h1",children:"RPC Provider"})}),Object(m.jsx)(rt.a,{mb:2,children:Object(m.jsx)(Dt,{label:"RPC Provider",name:"rpc-provider",defaultValue:"https://rpc.gnosischain.com/",onChange:function(e){w(e.target.value)}})})]})})}),Object(m.jsx)(rr.a,{variant:"outlined",children:Object(m.jsxs)(rt.a,{p:2,children:[Object(m.jsx)(H.a,{variant:"h1",children:"Upgrade Node"}),!s&&Object(m.jsx)(rt.a,{mt:2,children:Object(m.jsx)(H.a,{children:"Fund your node to unlock upgrading."})}),Object(m.jsx)(rt.a,{mt:4,children:Object(m.jsx)(st,{onClick:function(){return P.apply(this,arguments)},iconType:E.a,loading:f,disabled:f||!s,variant:"outlined",children:"Switch to Light Mode"})})]})})]}):Object(m.jsx)(Jn,{})}!function(e){e.INFO="/",e.UPGRADE="/upgrade",e.FILES="/files",e.UPLOAD="/files/upload",e.UPLOAD_IN_PROGRESS="/files/upload/workflow",e.DOWNLOAD="/files/download",e.HASH="/files/hash/:hash",e.ACCOUNTING="/accounting",e.SETTINGS="/settings",e.STAMPS="/stamps",e.STAMPS_NEW="/stamps/new",e.STATUS="/status",e.FEEDS="/feeds",e.FEEDS_NEW="/feeds/new",e.FEEDS_UPDATE="/feeds/update/:hash",e.FEEDS_PAGE="/feeds/:uuid"}(pr||(pr={}));var xr=function(){return Object(m.jsxs)(R.c,{children:[Object(m.jsx)(R.a,{path:pr.UPLOAD_IN_PROGRESS,element:Object(m.jsx)(ga,{})}),Object(m.jsx)(R.a,{path:pr.UPLOAD,element:Object(m.jsx)(va,{})}),Object(m.jsx)(R.a,{path:pr.DOWNLOAD,element:Object(m.jsx)(Zn,{})}),Object(m.jsx)(R.a,{path:pr.UPGRADE,element:Object(m.jsx)(fr,{})}),Object(m.jsx)(R.a,{path:pr.HASH,element:Object(m.jsx)(la,{})}),Object(m.jsx)(R.a,{path:pr.ACCOUNTING,element:Object(m.jsx)(at,{})}),Object(m.jsx)(R.a,{path:pr.SETTINGS,element:Object(m.jsx)(Pa,{})}),Object(m.jsx)(R.a,{path:pr.STAMPS,element:Object(m.jsx)(Ia,{})}),Object(m.jsx)(R.a,{path:pr.STAMPS_NEW,element:Object(m.jsx)(_a,{})}),Object(m.jsx)(R.a,{path:pr.STATUS,element:Object(m.jsx)(ar,{})}),Object(m.jsx)(R.a,{path:pr.FEEDS,element:Object(m.jsx)(Lt,{})}),Object(m.jsx)(R.a,{path:pr.FEEDS_NEW,element:Object(m.jsx)(Zt,{})}),Object(m.jsx)(R.a,{path:pr.FEEDS_UPDATE,element:Object(m.jsx)(An,{})}),Object(m.jsx)(R.a,{path:pr.FEEDS_PAGE,element:Object(m.jsx)(gn,{})}),Object(m.jsx)(R.a,{path:pr.INFO,element:Object(m.jsx)(Ea,{})})]})},mr=n(11),gr=n(935),vr=Object(mr.a)((function(e){return{root:{paddingLeft:e.spacing(4),paddingRight:e.spacing(4),borderLeft:"4px solid rgba(0,0,0,0)","&.Mui-selected, &.Mui-selected:hover":{borderLeft:"4px solid ".concat(e.palette.primary.main),backgroundColor:"#2c2c2c",color:"#f9f9f9"}},button:{"&:hover":{backgroundColor:"#2c2c2c",color:"#f9f9f9","@media (hover: none)":{backgroundColor:"#2c2c2c",color:"#f9f9f9"}}}}}))(F.a),yr=Object(j.a)((function(e){return Object(h.a)({icon:{color:"inherit"},activeIcon:{color:e.palette.primary.main}})}));function wr(e){var t=e.iconStart,n=e.iconEnd,a=e.path,r=e.label,c=yr(),i=Object(R.f)(),o=Boolean(a&&Object(R.d)(i.pathname,a));return Object(m.jsxs)(vr,{button:!0,selected:o,disableRipple:!0,children:[Object(m.jsx)(gr.a,{className:o?c.activeIcon:c.icon,children:t}),Object(m.jsx)(W.a,{primary:r}),Object(m.jsx)(gr.a,{className:o?c.activeIcon:c.icon,children:n})]})}var kr=n(936),Sr=Object(j.a)((function(e){return Object(h.a)({icon:{color:"inherit"},iconSmall:{height:e.spacing(2)},root:{height:e.spacing(4),paddingLeft:e.spacing(1),paddingRight:e.spacing(4),color:"#f9f9f9",borderLeft:"0px solid rgba(0,0,0,0)","&.Mui-selected, &.Mui-selected:hover":{borderLeft:"0px solid ".concat(e.palette.primary.main),backgroundColor:"#2c2c2c"}},rootError:{backgroundColor:"rgba(255, 58, 82, 0.25)"},button:{"&:hover":{backgroundColor:"#2c2c2c",color:"white","@media (hover: none)":{backgroundColor:"#2c2c2c",color:"white"}}},smallerText:{fontSize:"0.9rem"}})}));function Cr(e){var t=e.path,n=Object(a.useContext)(Ve),r=n.status,c=n.isLoading,i=Sr(),o=Object(R.f)(),s=Boolean(t&&Object(R.d)(o.pathname,t));return Object(m.jsxs)(F.a,{button:!0,classes:{root:"".concat(i.root," ").concat(r.all?"":i.rootError),button:i.button},selected:s,disableRipple:!0,children:[Object(m.jsx)(gr.a,{style:{marginLeft:"30px"},children:Object(m.jsx)(Ja,{isOk:r.all,isLoading:c})}),Object(m.jsx)(W.a,{primary:Object(m.jsx)(H.a,{className:i.smallerText,children:"Node ".concat(r.all?"OK":"Error")})}),Object(m.jsx)(gr.a,{className:i.icon,children:r.all?null:Object(m.jsx)(kr.a,{className:i.iconSmall})})]})}var Ar=[{label:"Info",path:pr.INFO,icon:A.a},{label:"Upgrade",path:pr.UPGRADE,icon:E.a},{label:"Files",path:pr.UPLOAD,icon:P.a},{label:"Feeds",path:pr.FEEDS,icon:T.a},{label:"Stamps",path:pr.STAMPS,icon:B.a},{label:"Accounting",path:pr.ACCOUNTING,icon:N.a},{label:"Settings",path:pr.SETTINGS,icon:D.a}],Er=Object(j.a)((function(e){return Object(h.a)({root:{flexWrap:"nowrap",minHeight:"100vh",paddingTop:e.spacing(8),paddingBottom:e.spacing(8)},drawer:{width:300,flexShrink:0},drawerPaper:{width:300,backgroundColor:"#212121"},logo:{marginLeft:e.spacing(8),marginRight:e.spacing(8)},icon:{height:e.spacing(4)},iconSmall:{height:e.spacing(2)},divider:{backgroundColor:"#2c2c2c",marginLeft:e.spacing(4),marginRight:e.spacing(4)},link:{color:"#9f9f9f",textDecoration:"none","&:hover":{textDecoration:"none","@media (hover: none)":{textDecoration:"none"}}}})}));function Pr(){var e=Er();return Object(m.jsx)(v.a,{className:e.drawer,variant:"permanent",anchor:"left",classes:{paper:e.drawerPaper},children:Object(m.jsxs)(y.a,{container:!0,direction:"column",justifyContent:"space-between",className:e.root,children:[Object(m.jsx)(y.a,{className:e.logo,children:Object(m.jsx)(u.b,{to:pr.INFO,children:Object(m.jsx)("img",{alt:"swarm",src:_})})}),Object(m.jsxs)(y.a,{children:[Object(m.jsx)(w.a,{children:Ar.map((function(t){return Object(m.jsx)(u.b,{to:t.path,className:e.link,children:Object(m.jsx)(wr,{iconStart:Object(m.jsx)(t.icon,{className:e.icon}),path:t.path,label:t.label},t.path)},t.path)}))}),Object(m.jsx)(k.a,{className:e.divider}),Object(m.jsx)(w.a,{children:Object(m.jsx)(S.a,{href:L.a.BEE_DOCS_HOST,target:"_blank",className:e.link,children:Object(m.jsx)(wr,{iconStart:Object(m.jsx)(I.a,{className:e.icon}),iconEnd:Object(m.jsx)(C.a,{className:e.iconSmall}),label:Object(m.jsx)("span",{children:"Docs"})})})})]}),Object(m.jsx)(y.a,{children:Object(m.jsx)(u.b,{to:pr.STATUS,className:e.link,children:Object(m.jsx)(Cr,{path:pr.STATUS})})})]})})}var Tr,Br=Object(j.a)((function(e){return Object(h.a)({content:{backgroundColor:e.palette.background.default,minHeight:"100vh"}})})),Nr=function(e){var t=Br(),n=Object(a.useContext)(Ve).isLoading;return Object(m.jsxs)("div",{style:{display:"flex"},children:[Object(m.jsx)(Pr,{}),Object(m.jsx)(d.a,{className:t.content,children:Object(m.jsx)(g,{children:Object(m.jsx)(m.Fragment,{children:n?Object(m.jsx)("div",{style:{textAlign:"center",width:"100%"},children:Object(m.jsx)(b.a,{})}):e.children})})})]})},Dr=n(378),Ir=n(201),_r=Object(Dr.a)({palette:{type:"light",background:{default:"#efefef"},primary:{light:"#fcf2e8",main:"#dd7700",dark:Ir.a[800]},secondary:{main:"#333333"}},typography:{fontFamily:["Work Sans","Montserrat","Nunito","Roboto",'"Helvetica Neue"',"Arial","sans-serif"].join(","),h1:{fontSize:"1.3rem",fontWeight:500},h2:{fontSize:"1rem",fontWeight:500},h3:{fontSize:"0.8rem",fontWeight:500},body2:{fontFamily:'"IBM Plex Mono", monospace',fontWeight:500,fontSize:"1rem"}}});_r.overrides={MuiListItem:{button:{"&:hover":{backgroundColor:"#fcf2e8",color:(Tr=_r).palette.primary.main,"@media (hover: none)":{backgroundColor:"#fcf2e8",color:Tr.palette.primary.main}}}},MuiContainer:{root:{padding:Tr.spacing(8)},maxWidthXs:{padding:Tr.spacing(8)},maxWidthSm:{padding:Tr.spacing(8)},maxWidthMd:{padding:Tr.spacing(8)},maxWidthLg:{padding:Tr.spacing(8)},maxWidthXl:{padding:Tr.spacing(8)}},MuiButton:{startIcon:{marginLeft:Tr.spacing(1)},endIcon:{marginRight:Tr.spacing(1)},outlined:{border:"none",borderRadius:Tr.spacing(10),color:Tr.palette.primary.main,backgroundColor:"#fcf2e8"},outlinedSizeSmall:{padding:Tr.spacing(1),paddingLeft:Tr.spacing(2),paddingRight:Tr.spacing(2),boxShadow:"none","&:hover":{backgroundColor:Tr.palette.primary.main,color:"white",boxShadow:"none","@media (hover: none)":{backgroundColor:Tr.palette.primary.main,color:"white",boxShadow:"none"}}},outlinedSizeLarge:{padding:Tr.spacing(4),borderRadius:0,boxShadow:"none","&:hover":{backgroundColor:Tr.palette.primary.main,color:"white",boxShadow:"none","@media (hover: none)":{backgroundColor:Tr.palette.primary.main,color:"white",boxShadow:"none"}}},containedSizeLarge:{padding:Tr.spacing(4),borderRadius:0,boxShadow:"none","&:hover":{backgroundColor:Tr.palette.primary.main,color:"white",boxShadow:"none","@media (hover: none)":{backgroundColor:Tr.palette.primary.main,color:"white",boxShadow:"none"}}},containedSizeSmall:{padding:Tr.spacing(1),paddingLeft:Tr.spacing(2),paddingRight:Tr.spacing(2),borderRadius:0,boxShadow:"none","&:hover":{backgroundColor:Tr.palette.primary.main,color:"white",boxShadow:"none","@media (hover: none)":{backgroundColor:Tr.palette.primary.main,color:"white",boxShadow:"none"}}},contained:{padding:Tr.spacing(2),backgroundColor:"white",boxShadow:"none",borderRadius:0,"&:hover":{backgroundColor:Tr.palette.primary.main,color:"white",boxShadow:"none","@media (hover: none)":{backgroundColor:Tr.palette.primary.main,color:"white",boxShadow:"none"}},"&:focus":{backgroundColor:Tr.palette.primary.main,color:"white"},"&:active":{backgroundColor:Tr.palette.primary.main,color:"white"},"&:disabled":{backgroundColor:"white"}}},MuiTab:{root:{backgroundColor:Tr.palette.background.paper,"&:hover":{backgroundColor:"#fcf2e8",color:Tr.palette.primary.main,opacity:1},"&$selected":{fontWeight:Tr.typography.fontWeightMedium}},textColorInherit:{opacity:.5}},MuiTabs:{root:{borderBottom:"none"},indicator:{backgroundColor:"transparent"}}},_r.props={MuiTab:{disableRipple:!0},MuiButtonBase:{disableRipple:!0}};var Lr=function(e){var t=e.beeApiUrl,n=e.beeDebugApiUrl,a=e.lockedApiSettings;return Object(m.jsx)("div",{className:"App",children:Object(m.jsx)(s.a,{theme:_r,children:Object(m.jsx)(Oe,{beeApiUrl:t,beeDebugApiUrl:n,lockedApiSettings:a,children:Object(m.jsx)(ze,{children:Object(m.jsx)(Sn,{children:Object(m.jsx)(fn,{children:Object(m.jsx)(dt,{children:Object(m.jsx)(Ga,{children:Object(m.jsx)(l.a,{children:Object(m.jsx)(u.a,{children:Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(o.a,{}),Object(m.jsx)(Nr,{children:Object(m.jsx)(xr,{})})]})})})})})})})})})})})},Rr=function(e){e&&e instanceof Function&&n.e(3).then(n.bind(null,953)).then((function(t){var n=t.getCLS,a=t.getFID,r=t.getFCP,c=t.getLCP,i=t.getTTFB;n(e),a(e),r(e),c(e),i(e)}))};i.a.render(Object(m.jsx)(r.a.StrictMode,{children:Object(m.jsx)(Lr,{})}),document.getElementById("root")),Rr()}},[[829,1,2]]]);
+//# sourceMappingURL=main.16628c3e.chunk.js.map
\ No newline at end of file
diff --git a/static/dashboard/static/js/main.16628c3e.chunk.js.map b/static/dashboard/static/js/main.16628c3e.chunk.js.map
new file mode 100644
index 0000000..f06a1d8
--- /dev/null
+++ b/static/dashboard/static/js/main.16628c3e.chunk.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["utils/index.ts","models/Token.ts","utils/identity.ts","config.ts","components/ErrorBoundary.tsx","assets/logo.svg","components/ExpandableList.tsx","components/ExpandableListItem.tsx","components/ExpandableListItemActions.tsx","components/ExpandableListItemKey.tsx","providers/Settings.tsx","components/ClipboardCopy.tsx","components/QRCodeModal.tsx","components/EthereumAddress.tsx","components/CashoutModal.tsx","pages/accounting/PeerBalances.tsx","components/TroubleshootConnectionCard.tsx","providers/Bee.tsx","hooks/apiHooks.tsx","hooks/accounting.ts","components/WithdrawDepositModal.tsx","containers/WithdrawModal.tsx","containers/DepositModal.tsx","pages/accounting/index.tsx","components/SwarmButton.tsx","providers/Feeds.tsx","components/SwarmDialog.tsx","components/CloseButton.tsx","components/TitleWithClose.tsx","pages/feeds/DeleteFeedDialog.tsx","components/Code.tsx","pages/feeds/ExportFeedDialog.tsx","components/SwarmTextInput.tsx","pages/feeds/ImportFeedDialog.tsx","pages/feeds/index.tsx","components/DocumentationText.tsx","components/HistoryHeader.tsx","components/SwarmSelect.tsx","pages/feeds/CreateNewFeed.tsx","components/ExpandableListItemLink.tsx","utils/file.ts","utils/image.ts","constants.ts","providers/File.tsx","pages/files/UploadArea.tsx","pages/feeds/FeedSubpage.tsx","providers/Stamps.tsx","pages/feeds/FeedPasswordDialog.tsx","pages/feeds/UpdateFeed.tsx","components/ExpandableListItemNote.tsx","components/ExpandableListItemInput.tsx","utils/local-storage.ts","utils/hash.ts","components/History.tsx","utils/date.ts","pages/files/FileNavigation.tsx","pages/files/Download.tsx","components/Loading.tsx","components/FitImage.tsx","components/StripedWrapper.tsx","pages/files/AssetIcon.tsx","pages/files/AssetPreview.tsx","pages/files/AssetSummary.tsx","pages/files/DownloadActionBar.tsx","pages/files/Share.tsx","components/ProgressIndicator.tsx","pages/stamps/PostageStampCreation.tsx","pages/stamps/PostageStampSelector.tsx","components/Capacity.tsx","pages/stamps/PostageStamp.tsx","pages/files/StampPreview.tsx","pages/files/UploadActionBar.tsx","pages/files/Upload.tsx","pages/files/UploadLander.tsx","utils/threshold.ts","components/TopologyStats.tsx","pages/info/index.tsx","pages/settings/index.tsx","components/ExpandableElement.tsx","pages/stamps/StampsTable.tsx","pages/stamps/index.tsx","pages/stamps/CreatePostageStampPage.tsx","components/TabsContainer.tsx","providers/Platform.tsx","components/CodeBlock.tsx","components/CodeBlockTabs.tsx","components/StatusIcon.tsx","pages/status/SetupSteps/DebugConnectionCheck.tsx","pages/status/SetupSteps/NodeConnectionCheck.tsx","pages/status/SetupSteps/VersionCheck.tsx","pages/status/SetupSteps/EthereumConnectionCheck.tsx","pages/status/SetupSteps/ChequebookDeployFund.tsx","pages/status/SetupSteps/PeerConnection.tsx","pages/status/index.tsx","utils/bzz-faucet.ts","utils/rpc.ts","routes.tsx","pages/upgrade/index.tsx","components/SideBarItem.tsx","components/SideBarStatus.tsx","components/SideBar.tsx","layout/Dashboard.tsx","theme.tsx","App.tsx","reportWebVitals.ts","index.tsx"],"names":["isInteger","value","BigNumber","isBigNumber","makeBigNumber","toString","TypeError","sleepMs","ms","a","Promise","resolve","setTimeout","unwrapPromiseSettlements","promiseSettledResults","promises","values","fulfilled","filter","promise","status","rejected","map","x","reason","String","makeRetriablePromise","fn","maxRetries","delayMs","reject","tries","results","extractSwarmHash","string","matches","match","uuidV4","replace","s","c","parseInt","crypto","getRandomValues","Uint8Array","formatEnum","charAt","toUpperCase","slice","toLowerCase","replaceAll","secondsToTimeString","seconds","unit","Math","round","toFixed","convertDepthToBytes","depth","convertAmountToSeconds","amount","pricePerBlock","calculateStampPrice","Token","BigInt","shortenText","text","length","separator","POSSIBLE_DECIMALS","decimals","includes","this","dividedBy","pow","digits","toDecimal","asString","indexOfSignificantDigit","reachedDecimalPoint","i","char","t","multipliedBy","generateWallet","buffer","Wallet","Buffer","from","persistIdentity","identities","identity","existingIndex","findIndex","uuid","splice","unshift","localStorage","setItem","JSON","stringify","persistIdentitiesWithoutUpdate","convertWalletToIdentity","type","name","password","Error","getPrivateKeyString","toV3String","identityString","address","getAddressString","importIdentity","data","getWallet","wallet","startsWith","parse","getWalletFromIdentity","fromPrivateKey","trimHexString","fromV3","updateFeed","beeApi","hash","stamp","feedHash","createFeedManifest","repeat","writer","makeFeedWriter","upload","getProcessEnv","key","process","config","BEE_API_HOST","BEE_DEBUG_API_HOST","BLOCKCHAIN_EXPLORER_URL","BEE_DOCS_HOST","BEE_DISCORD_HOST","GITHUB_REPO_URL","sessionStorage","getItem","ErrorBoundary","props","state","error","errorInfo","console","message","children","Component","useStyles","makeStyles","theme","createStyles","root","width","padding","margin","marginTop","spacing","rootLevel1","rootLevel2","header","backgroundColor","palette","background","paper","contentLevel0","contentLevel12","infoText","color","ExpandableList","label","level","defaultOpen","info","classes","useState","Boolean","open","setOpen","rootLevelClass","typographyVariant","contentLevelClass","className","ListItem","button","onClick","ListItemText","primary","Typography","variant","style","display","ExpandLess","ExpandMore","Collapse","in","timeout","unmountOnExit","marginBottom","wordBreak","copyValue","cursor","borderRadius","main","ExpandableListItem","tooltip","Grid","container","direction","justifyContent","alignItems","Tooltip","title","placement","arrow","IconButton","size","strokeWidth","wrapper","flexDirection","flexWrap","action","marginRight","ExpandableListItemActions","Array","isArray","borderLeft","headerOpen","content","keyMargin","ExpandableListItemKey","copied","setCopied","toggleOpen","tooltipClickHandler","tooltipCloseHandler","splitValues","nonPrefixLength","lengthWithoutPrefix","split","hasPrefix","test","spanText","onClose","component","initialValues","apiUrl","apiDebugUrl","beeDebugApi","setApiUrl","setDebugApiUrl","lockedApiSettings","Context","createContext","Consumer","Provider","beeApiUrl","beeDebugApiUrl","extLockedApiSettings","setBeeApi","setBeeDebugApi","url","debugUrl","useEffect","Bee","e","BeeDebug","ClipboardCopy","enqueueSnackbar","useSnackbar","marginLeft","height","QRCodeModal","FilterCenterFocusSharp","Dialog","textAlign","DialogTitle","id","bgColor","fgColor","includeMargin","renderAs","EthereumAddress","hideBlockie","paddingTop","truncate","maxWidth","overflow","textOverflow","whiteSpace","href","transaction","target","rel","CheckoutModal","peerId","uncashedAmount","loadingCashout","setLoadingCashout","useContext","SettingsContext","handleClose","Button","startIcon","substr","DialogContent","DialogContentText","overflowWrap","Container","CircularProgress","DialogActions","cashoutLastCheque","then","res","catch","finally","disabled","PeerBalances","accounting","isLoadingUncashed","totalUncashed","toFixedDecimal","peer","balance","received","sent","total","toBigNumber","isGreaterThan","icon","TroubleshootConnectionCard","item","align","Link","to","ROUTES","STATUS","startedInDevMode","window","location","search","all","version","blockchainConnection","debugApiConnection","apiConnection","topology","chequebook","latestPublishedVersion","undefined","latestUserVersion","latestUserVersionExact","isLatestBeeVersion","latestBeeVersionUrl","apiHealth","debugApiHealth","nodeAddresses","nodeInfo","chequebookAddress","peers","chequebookBalance","peerBalances","peerCheques","settlements","chainState","latestBeeRelease","isLoading","isRefreshing","lastUpdate","start","stop","refresh","getStatus","devMode","REACT_APP_DEV_MODE","beeMode","semver","satisfies","engines","bee","includePrerelease","ethereum","connected","totalBalance","Object","every","v","setApiHealth","setDebugApiHealth","setNodeAddresses","setNodeInfo","setNodeTopology","setChequebookAddress","setPeers","setChequebookBalance","setPeerBalances","setPeerCheques","setSettlements","setChainState","setLatestBeeRelease","isLoadingLatestBeeRelease","setLoading","setError","axios","get","useLatestBeeRelease","setIsLoading","setIsRefreshing","setLastUpdate","frequency","setFrequency","coerce","chequeBalanceWrapper","getChequebookBalance","availableBalance","peerBalanceWrapper","getAllBalances","balances","settlementsWrapper","getAllSettlements","totalReceived","totalSent","isConnected","getHealth","getNodeAddresses","getNodeInfo","getTopology","getPeers","getChequebookAddress","getLastCheques","getChainState","allSettled","Date","now","interval","setInterval","clearInterval","html_url","freq","useAccounting","setIsloadingUncashed","uncashedAmounts","setUncashedAmounts","gt","getLastCashoutAction","forEach","plus","minus","sort","b","diff","toNumber","mergeAccounting","WithdrawDepositModal","successMessage","errorMessage","dialogMessage","min","max","setAmount","amountToken","setAmountToken","amountError","setAmountError","handleAction","toBigInt","transactionHash","stopPropagation","Input","autoFocus","placeholder","fullWidth","onChange","fromDecimal","isLessThan","FormHelperText","WithdrawModal","withdrawTokens","DepositModal","depositTokens","Accounting","BeeContext","position","stroke","transition","cancelButton","spinnerWrapper","left","top","transform","SwarmButton","iconType","loading","cancel","React","createElement","join","event","currentTarget","blur","setIdentities","SwarmDialog","PaperProps","Box","p","sx","CloseButton","Close","fontWeight","TitleWithClose","DeleteFeedDialog","onConfirm","mb","Trash","X","pre","maxHeight","prettifyString","Code","prettify","ExportFeedDialog","Download","saveAs","Blob","Clipboard","navigator","clipboard","writeText","field","border","SwarmTextInput","optional","formik","defaultValue","TextField","required","InputProps","disableUnderline","textarea","displayNone","ImportFeedDialog","textareaValue","setTextareaValue","setName","fileInputRef","useRef","feed","onFeedReady","fileReader","FileReader","file","files","onload","result","readAsText","ref","TextareaAutosize","minRows","Upload","current","click","Check","Feeds","IdentityContext","navigate","useNavigate","selectedIdentity","setSelectedIdentity","showImport","setShowImport","showExport","setShowExport","showDelete","setShowDelete","onDialogClose","updatedFeeds","onDelete","PlusSquare","FEEDS_NEW","mt","FEEDS_PAGE","Info","fontSize","DocumentationText","pressable","HistoryHeader","mr","ArrowBack","select","option","SwarmSelect","options","Select","MenuProps","MenuListProps","disablePadding","square","MenuItem","identityName","CreateNewFeed","FeedsContext","getAllPostageBatch","stamps","FEEDS","onSubmit","submitForm","bgcolor","openLinkIcon","ExpandableListItemLink","link","navigationType","allowClipboard","displayValue","onNavigation","OpenInNewSharp","ArrowForward","indexHtmls","detectIndexHtml","paths","getPath","exactMatch","find","indexPath","prefix","y","commonPrefix","getHumanReadableFileSize","bytes","getAssetNameFromFiles","f","path","webkitRelativePath","packageFile","fullPath","lastModified","stream","arrayBuffer","resize","reader","readAsDataURL","src","img","Image","dimensions","imgWidth","imgHeight","ratioWidth","ratioHeight","ratio","getDimensions","elem","document","ctx","getContext","drawImage","canvas","toBlob","blob","onerror","META_FILE_NAME","PREVIEW_FILE_NAME","PREVIEW_DIMENSIONS","defaultUploadOrigin","origin","setFiles","uploadOrigin","setUploadOrigin","metadata","setMetadata","previewUri","setPreviewUri","previewBlob","setPreviewBlob","reduce","isWebsite","count","getMetadata","URL","revokeObjectURL","createObjectURL","areaWrapper","dropzone","default","outline","zIndex","opacity","buttonWrapper","UploadArea","showHelp","strictWebsiteMode","setStrictWebsiteMode","setVersion","getDropzoneInputDomElement","querySelector","onUploadCollectionClick","element","setAttribute","dropzoneClass","FilePaths","indexDocument","UPLOAD_IN_PROGRESS","filesLimit","maxFileSize","showPreviews","removeAttribute","FilePlus","FolderPlus","PlusCircle","FeedSubpage","useParams","available","setAvailable","downloadData","swarmCid","enrichStamp","postageBatch","bucketDepth","usage","utilization","usageText","ceil","setStamps","FeedPasswordDialog","feedName","onProceed","onCancel","setPassword","UpdateFeed","StampContext","selectedStamp","setSelectedStamp","showPasswordPrompt","setShowPasswordPrompt","onFeedUpdate","Reflect","batchID","batchId","Bookmark","typography","ExpandableListItemNote","HISTORY_KEYS","unselectableLabel","userSelect","WebkitUserSelect","MozUserSelect","msUserSelect","confirmLabel","confirmLabelDisabled","expandedOnly","helperText","mapperFn","locked","inputValue","setInputValue","InputBase","hidden","Search","shortenHash","sliceLength","putHistory","history","getHistorySafe","createdAt","items","parsed","isHistoryItem","determineHistoryName","History","localStorageKey","setItems","date","trim","flexGrow","leftTab","rightTab","FileNavigation","active","Tabs","newValue","DOWNLOAD","UPLOAD","Tab","referenceError","setReferenceError","identifier","manifestJs","ManifestJs","resolveFeedManifest","feedIdentifier","isManifest","getIndexDocumentPath","DOWNLOAD_HISTORY","HASH","onSwarmIdentifier","Utils","isHexString","recognizeSwarmHash","Loading","image","objectFit","FitImage","inlineStyles","alt","StripedWrapper","AssetIcon","AssetPreview","previewComponent","Web","AssetSummary","DownloadActionBar","onOpen","onDownload","onUpdateFeed","hasIndexDocument","Share","reference","downloading","setDownloading","swarmEntries","setSwarmEntries","setIndexDocument","notFound","setNotFound","preview","setPreview","getHashes","entries","previewFile","keys","downloadFile","mtdt","remoteMetadata","zip","JSZip","generateAsync","prepare","FEEDS_UPDATE","flex","todo","inProgress","done","ProgressIndicator","steps","index","pickClass","initialFormValues","PostageStampCreation","onFinished","StampsContext","getTtl","isCurrentPriceAvailable","currentPrice","Number","getPrice","isNaN","price","toSignificantDigits","actions","createPostageBatch","resetForm","setSubmitting","validate","errors","isLessThanOrEqualTo","isValid","isSubmitting","PostageStampSelector","onSelect","stampId","Capacity","integerUsage","used","free","PostageStamp","shorten","StampPreview","UploadActionBar","step","onUpload","onGoBack","isUploading","hasStamp","uploadLabel","stampMode","setStampMode","Layers","ArrowLeft","setStep","setStamp","setUploading","FileContext","uploadFiles","fls","idx","substrStart","mtd","metafile","File","push","UPLOAD_HISTORY","UploadLander","OPTIMAL_POPULATION","GENERIC_ERROR","THRESHOLDS","connectedPeers","minimumValue","explanation","score","population","toLocaleString","pickThreshold","thresholds","maximumScore","last","TopologyStats","maximumTotalScore","sum","actualTotalScore","percentageText","Status","publicKey","pssPublicKey","overlay","underlay","addr","Settings","ExpandableElement","expandable","StampsTable","postageStamps","Stamp","STAMPS_NEW","CreatePostageStampPage","STAMPS","TabPanel","other","role","SimpleTabs","indexChanged","setValue","Platforms","SupportedPlatforms","CodeBlock","language","showLineNumbers","code","macOS","Linux","platform","setPlatform","os","userAgent","iOS","Windows","Android","getOS","isSupportedPlatform","CodeBlockTabs","linux","mac","StatusIcon","isOk","NodeConnectionCheck","elevation","severity","VersionCheck","EthereumConnectionCheck","ChequebookDeployFund","PeerConnection","NodeSetupWorkflow","requestBzz","fetch","method","PROVIDER","headers","body","jsonrpc","params","response","json","partialERC20tokenABI","constant","inputs","outputs","payable","provider","providers","JsonRpcProvider","tokenAddress","contract","Contract","balanceOf","Rpc","eth_getBalance","eth_getBalanceERC20","UpgradePage","setBalance","balanceBzz","setBalanceBzz","rpcProvider","setRpcProvider","port","host","Card","Send","ArrowUp","BaseRouter","UPGRADE","ACCOUNTING","SETTINGS","INFO","StyledListItem","withStyles","paddingLeft","paddingRight","activeIcon","SideBarItem","iconStart","iconEnd","useLocation","isSelected","matchPath","pathname","selected","disableRipple","ListItemIcon","iconSmall","rootError","smallerText","navBarItems","Home","FileText","DollarSign","minHeight","paddingBottom","drawer","flexShrink","drawerPaper","logo","divider","textDecoration","SideBar","Drawer","anchor","Logo","List","Divider","Dashboard","createTheme","light","dark","orange","secondary","fontFamily","h1","h2","h3","body2","overrides","MuiListItem","MuiContainer","maxWidthXs","maxWidthSm","maxWidthMd","maxWidthLg","maxWidthXl","MuiButton","endIcon","outlined","outlinedSizeSmall","boxShadow","outlinedSizeLarge","containedSizeLarge","containedSizeSmall","contained","MuiTab","fontWeightMedium","textColorInherit","MuiTabs","borderBottom","indicator","MuiButtonBase","App","ThemeProvider","CssBaseline","reportWebVitals","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","ReactDOM","render","StrictMode","getElementById"],"mappings":"srBAUO,SAASA,EAAUC,GACxB,OAAQC,YAAUC,YAAYF,IAAUA,EAAMD,aAAiC,kBAAVC,EAYhE,SAASG,EAAcH,GAC5B,GAAIC,YAAUC,YAAYF,GAAQ,OAAOA,EAEzC,GAAqB,kBAAVA,EAAoB,OAAO,IAAIC,YAAUD,GAEpD,GAAqB,kBAAVA,EAAoB,OAAO,IAAIC,YAAUD,EAAMI,YAG1D,GAAqB,kBAAVJ,EAAwD,OAAO,IAAIC,YAAUD,GAExF,MAAM,IAAIK,UAAJ,uEAA8EL,EAA9E,mBAA8FA,IAa/F,SAAeM,EAAtB,kC,4CAAO,WAAuBC,GAAvB,SAAAC,EAAA,sEACC,IAAIC,SAAc,SAAAC,GAAO,OAC7BC,YAAW,WACTD,MACCH,MAJA,4C,sBA4BA,SAASK,EACdC,GAEA,IAjBuCC,EAiBjCC,EAbC,CAAEC,WAJ8BF,EAiBFD,GAhBVI,QAAO,SAAAC,GAAO,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AgBN,EAA9B,EAA8BA,kBAA9B,OACV,qBAAKrE,UAAU,MAAf,SACE,cAACq4B,EAAA,EAAD,CAAer6B,MAAOA,GAAtB,SACE,cAAC,GAAD,CAAkB0G,UAAWA,EAAWC,eAAgBA,EAAgBN,kBAAmBA,EAA3F,SACE,cAAC,GAAD,UACE,cAAC,GAAD,UACE,cAAC,GAAD,UACE,cAAC,GAAD,UACE,cAAC,GAAD,UACE,cAAC,IAAD,UACE,cAAC,IAAD,UACE,qCACE,cAACi0B,EAAA,EAAD,IACA,cAAC,GAAD,UACE,cAAC,GAAD,8BCtBXC,GAZS,SAACC,GACnBA,GAAeA,aAAuBC,UACxC,8BAAqBvwB,MAAK,YAAkD,IAA/CwwB,EAA8C,EAA9CA,OAAQC,EAAsC,EAAtCA,OAAQC,EAA8B,EAA9BA,OAAQC,EAAsB,EAAtBA,OAAQC,EAAc,EAAdA,QAC3DJ,EAAOF,GACPG,EAAOH,GACPI,EAAOJ,GACPK,EAAOL,GACPM,EAAQN,OCHdO,IAASC,OACP,cAAC,IAAMC,WAAP,UACE,cAAC,GAAD,MAEF5b,SAAS6b,eAAe,SAM1BX,O","file":"static/js/main.16628c3e.chunk.js","sourcesContent":["import { BigNumber } from 'bignumber.js'\nimport { Token } from '../models/Token'\n\n/**\n * Test if value is an integer\n *\n * @param value Value to be tested if it is an integer\n *\n * @returns True if the passed in value is integer\n */\nexport function isInteger(value: unknown): value is BigNumber | bigint {\n return (BigNumber.isBigNumber(value) && value.isInteger()) || typeof value === 'bigint'\n}\n\n/**\n *Convert value into a BigNumber if not already\n *\n * @param value Value to be converted\n *\n * @throws {TypeError} if the value is not convertible to a BigNumber\n *\n * @returns BigNumber - but it may still be NaN or Infinite\n */\nexport function makeBigNumber(value: BigNumber | BigInt | number | string): BigNumber | never {\n if (BigNumber.isBigNumber(value)) return value\n\n if (typeof value === 'string') return new BigNumber(value)\n\n if (typeof value === 'bigint') return new BigNumber(value.toString())\n\n // FIXME: bee-js still returns some values as numbers and even outside of SAFE INTEGER bounds\n if (typeof value === 'number' /* && Number.isSafeInteger(value)*/) return new BigNumber(value)\n\n throw new TypeError(`Not a BigNumber or BigNumber convertible value. Type: ${typeof value} value: ${value}`)\n}\n\nexport type PromiseSettlements = {\n fulfilled: PromiseFulfilledResult[]\n rejected: PromiseRejectedResult[]\n}\n\nexport type UnwrappedPromiseSettlements = {\n fulfilled: T[]\n rejected: string[]\n}\n\nexport async function sleepMs(ms: number): Promise {\n await new Promise(resolve =>\n setTimeout(() => {\n resolve()\n }, ms),\n )\n}\n\n/**\n * Maps the returned results of `Promise.allSettled` to an object\n * with `fulfilled` and `rejected` arrays for easy access.\n *\n * The results still need to be unwrapped to get the fulfilled values or rejection reasons.\n */\nexport function mapPromiseSettlements(promises: PromiseSettledResult[]): PromiseSettlements {\n const fulfilled = promises.filter(promise => promise.status === 'fulfilled') as PromiseFulfilledResult[]\n const rejected = promises.filter(promise => promise.status === 'rejected') as PromiseRejectedResult[]\n\n return { fulfilled, rejected }\n}\n\n/**\n * Maps the returned values of `Promise.allSettled` to an object\n * with `fulfilled` and `rejected` arrays for easy access.\n *\n * For rejected promises, the value is the stringified `reason`,\n * or `'Unknown error'` string when it is unavailable.\n */\nexport function unwrapPromiseSettlements(\n promiseSettledResults: PromiseSettledResult[],\n): UnwrappedPromiseSettlements {\n const values = mapPromiseSettlements(promiseSettledResults)\n const fulfilled = values.fulfilled.map(x => x.value)\n const rejected = values.rejected.map(x => (x.reason ? String(x.reason) : 'Unknown error'))\n\n return { fulfilled, rejected }\n}\n\n/**\n * Wraps a `Promise` or async function inside a new `Promise`,\n * which retries the original function up to `maxRetries` times,\n * waiting `delayMs` milliseconds between failed attempts.\n *\n * If all attempts fail, then this `Promise` also rejects.\n */\nexport function makeRetriablePromise(fn: () => Promise, maxRetries = 3, delayMs = 1000): Promise {\n return new Promise(async (resolve, reject) => {\n for (let tries = 0; tries < maxRetries; tries++) {\n try {\n const results = await fn()\n resolve(results)\n\n return\n } catch (error) {\n if (tries < maxRetries - 1) {\n await sleepMs(delayMs)\n } else {\n reject(error)\n }\n }\n }\n })\n}\n\nexport function extractSwarmHash(string: string): string | null {\n const matches = string.match(/[a-fA-F0-9]{64,128}/)\n\n return (matches && matches[0]) || null\n}\n\nexport function uuidV4(): string {\n const pattern = '10000000-1000-4000-8000-100000000000'\n\n return pattern.replace(/[018]/g, (s: string) => {\n const c = parseInt(s, 10)\n\n return (c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))).toString(16)\n })\n}\n\nexport function formatEnum(string: string): string {\n return (string.charAt(0).toUpperCase() + string.slice(1).toLowerCase()).replaceAll('_', ' ')\n}\n\nexport function secondsToTimeString(seconds: number): string {\n let unit = seconds\n\n if (unit < 120) {\n return `${seconds} seconds`\n }\n unit /= 60\n\n if (unit < 120) {\n return `${Math.round(unit)} minutes`\n }\n unit /= 60\n\n if (unit < 48) {\n return `${Math.round(unit)} hours`\n }\n unit /= 24\n\n if (unit < 14) {\n return `${Math.round(unit)} days`\n }\n unit /= 7\n\n if (unit < 52) {\n return `${Math.round(unit)} weeks`\n }\n unit /= 52\n\n return `${unit.toFixed(1)} years`\n}\n\nexport function convertDepthToBytes(depth: number): number {\n return 2 ** depth * 4096\n}\n\nexport function convertAmountToSeconds(amount: number, pricePerBlock: number): number {\n // TODO: blocktime should come directly from the blockchain as it may differ between different networks\n const blockTime = 5 // On mainnet there is 5 seconds between blocks\n\n // See https://github.com/ethersphere/bee/blob/66f079930d739182c4c79eb6008784afeeba1096/pkg/debugapi/postage.go#L410-L413\n return (amount * blockTime) / pricePerBlock\n}\n\nexport function calculateStampPrice(depth: number, amount: bigint): Token {\n // See https://github.com/ethersphere/bee/blob/66f079930d739182c4c79eb6008784afeeba1096/pkg/debugapi/postage.go#L410-L413\n return new Token(amount * BigInt(2 ** depth)) // FIXME: the 2 ** depth should be performed on bigint already\n}\n\nexport function shortenText(text: string, length = 20, separator = '[…]'): string {\n if (text.length <= length * 2 + separator.length) {\n return text\n }\n\n return `${text.slice(0, length)}${separator}${text.slice(-length)}`\n}\n","import { BigNumber } from 'bignumber.js'\nimport { isInteger, makeBigNumber } from '../utils'\n\nconst POSSIBLE_DECIMALS = [18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\ntype digits = typeof POSSIBLE_DECIMALS[number]\n\nconst BZZ_DECIMALS = 16\n\nexport class Token {\n private amount: BigNumber // Represented in the base units, so it is always an integer value\n private readonly decimals: digits\n\n constructor(amount: BigNumber | string | BigInt, decimals: digits = BZZ_DECIMALS) {\n const a = makeBigNumber(amount)\n\n if (!isInteger(a) || !POSSIBLE_DECIMALS.includes(decimals)) throw new TypeError('Not a valid token values')\n\n this.amount = a\n this.decimals = decimals\n }\n\n /**\n * Construct new Token from a digit representation\n *\n * @param amount Amount of a token in the digits (1 token = 10^decimals)\n * @param decimals Number of decimals for the token (must be integer)\n *\n * @throws {TypeError} If the decimals is not an integer or the amount after conversion is not an integer\n *\n * @returns new Token\n */\n static fromDecimal(amount: BigNumber | string | BigInt, decimals: digits = BZZ_DECIMALS): Token | never {\n const a = makeBigNumber(amount)\n\n // No need to do any validation here, it is done when the new token is created\n const t = a.multipliedBy(new BigNumber(10).pow(decimals))\n\n return new Token(t, decimals)\n }\n\n get toBigInt(): BigInt {\n return BigInt(this.amount.toFixed(0))\n }\n\n get toString(): string {\n return this.amount.toFixed(0)\n }\n\n get toBigNumber(): BigNumber {\n return new BigNumber(this.amount)\n }\n\n get toDecimal(): BigNumber {\n return this.amount.dividedBy(new BigNumber(10).pow(this.decimals))\n }\n\n toFixedDecimal(digits = 7): string {\n return this.toDecimal.toFixed(digits)\n }\n\n toSignificantDigits(digits = 4): string {\n const asString = this.toDecimal.toFixed(16)\n\n let indexOfSignificantDigit = -1\n let reachedDecimalPoint = false\n\n for (let i = 0; i < asString.length; i++) {\n const char = asString[i]\n\n if (char === '.') {\n reachedDecimalPoint = true\n indexOfSignificantDigit = i + 1\n } else if (reachedDecimalPoint && char !== '0') {\n indexOfSignificantDigit = i\n break\n }\n }\n\n return asString.slice(0, indexOfSignificantDigit + digits)\n }\n}\n","import { Bee, Reference } from '@ethersphere/bee-js'\nimport Wallet from 'ethereumjs-wallet'\nimport { uuidV4 } from '.'\nimport { Identity, IdentityType } from '../providers/Feeds'\n\nexport function generateWallet(): Wallet {\n const buffer = new Uint8Array(32)\n crypto.getRandomValues(buffer)\n const wallet = new Wallet(Buffer.from(buffer))\n\n return wallet\n}\n\nexport function persistIdentity(identities: Identity[], identity: Identity): void {\n const existingIndex = identities.findIndex(x => x.uuid === identity.uuid)\n\n if (existingIndex !== -1) {\n identities.splice(existingIndex, 1)\n }\n identities.unshift(identity)\n localStorage.setItem('feeds', JSON.stringify(identities))\n}\n\nexport function persistIdentitiesWithoutUpdate(identities: Identity[]): void {\n localStorage.setItem('feeds', JSON.stringify(identities))\n}\n\nexport async function convertWalletToIdentity(\n identity: Wallet,\n type: IdentityType,\n name: string,\n password?: string,\n): Promise {\n if (type === 'V3' && !password) {\n throw Error('V3 passwords require password')\n }\n\n const identityString =\n type === 'PRIVATE_KEY' ? identity.getPrivateKeyString() : await identity.toV3String(password as string)\n\n return {\n uuid: uuidV4(),\n name,\n type: password ? 'V3' : 'PRIVATE_KEY',\n address: identity.getAddressString(),\n identity: identityString,\n }\n}\n\nexport async function importIdentity(name: string, data: string): Promise {\n if (data.length === 64) {\n const wallet = await getWallet('PRIVATE_KEY', data)\n\n return {\n uuid: uuidV4(),\n name,\n type: 'PRIVATE_KEY',\n identity: data,\n address: wallet.getAddressString(),\n }\n }\n\n if (data.length === 66 && data.toLowerCase().startsWith('0x')) {\n const wallet = await getWallet('PRIVATE_KEY', data.slice(2))\n\n return { uuid: uuidV4(), name, type: 'PRIVATE_KEY', identity: data, address: wallet.getAddressString() }\n }\n try {\n const { address } = JSON.parse(data)\n\n return { uuid: uuidV4(), name, type: 'V3', identity: data, address }\n } catch {\n return null\n }\n}\n\nfunction getWalletFromIdentity(identity: Identity, password?: string): Promise {\n return getWallet(identity.type, identity.identity, password)\n}\n\nasync function getWallet(type: IdentityType, data: string, password?: string): Promise {\n return type === 'PRIVATE_KEY'\n ? Wallet.fromPrivateKey(Buffer.from(trimHexString(data), 'hex'))\n : await Wallet.fromV3(data, password as string)\n}\n\nexport async function updateFeed(\n beeApi: Bee,\n identity: Identity,\n hash: string,\n stamp: string,\n password?: string,\n): Promise {\n const wallet = await getWalletFromIdentity(identity, password)\n\n if (!identity.feedHash) {\n identity.feedHash = await beeApi.createFeedManifest(stamp, 'sequence', '00'.repeat(32), wallet.getAddressString())\n }\n\n const writer = beeApi.makeFeedWriter('sequence', '00'.repeat(32), wallet.getPrivateKeyString())\n await writer.upload(stamp, hash as Reference)\n}\n\nfunction trimHexString(string: string): string {\n if (string.toLowerCase().startsWith('0x')) {\n return string.slice(2)\n }\n\n return string\n}\n","function getProcessEnv(key: string): string | undefined | false {\n return typeof process === 'object' && process.env[key]\n}\n\nclass Config {\n public readonly BEE_API_HOST: string\n public readonly BEE_DEBUG_API_HOST: string\n public readonly BLOCKCHAIN_EXPLORER_URL: string\n public readonly BEE_DOCS_HOST: string\n public readonly BEE_DISCORD_HOST: string\n public readonly GITHUB_REPO_URL: string\n\n constructor() {\n this.BEE_API_HOST =\n sessionStorage.getItem('api_host') || getProcessEnv('REACT_APP_BEE_HOST') || 'http://localhost:1633'\n this.BEE_DEBUG_API_HOST =\n sessionStorage.getItem('debug_api_host') || getProcessEnv('REACT_APP_BEE_DEBUG_HOST') || 'http://localhost:1635'\n this.BLOCKCHAIN_EXPLORER_URL =\n getProcessEnv('REACT_APP_BLOCKCHAIN_EXPLORER_URL') || 'https://blockscout.com/xdai/mainnet'\n this.BEE_DOCS_HOST = getProcessEnv('REACT_APP_BEE_DOCS_HOST') || 'https://docs.ethswarm.org/docs/'\n this.BEE_DISCORD_HOST = getProcessEnv('REACT_APP_BEE_DISCORD_HOST') || 'https://discord.gg/eKr9XPv7'\n this.GITHUB_REPO_URL =\n getProcessEnv('REACT_APP_BEE_GITHUB_REPO_URL') || 'https://api.github.com/repos/ethersphere/bee'\n }\n}\n\nexport const config = new Config()\n\nexport default config\n","import { Component, ErrorInfo, ReactElement } from 'react'\n\ninterface Props {\n children: ReactElement\n}\n\ninterface State {\n error: Error | null\n}\n\nexport default class ErrorBoundary extends Component {\n constructor(props: Props) {\n super(props)\n this.state = { error: null }\n }\n\n static getDerivedStateFromError(error: Error): { error: Error } {\n // Update state so the next render will show the fallback UI.\n return { error }\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo): void {\n // You can also log the error to an error reporting service\n console.error({ error, errorInfo }) // eslint-disable-line\n }\n\n render(): ReactElement {\n if (this.state.error) {\n // You can render any custom fallback UI\n return
Something went wrong. Error: {this.state.error.message}
\n \n \n {/* This has to be wrapped in two spans otherwise either the tooltip or the highlighting does not work*/}\n \n \n {splitValues.map((s, i) => (\n \n {s}\n \n ))}\n \n \n \n \n
\n Create new feed\n \n \n To create a feed you will need to create an identity. Please refer to the{' '}\n \n official Bee documentation\n {' '}\n to understand how feeds work.\n \n \n \n {({ submitForm, values }) => (\n \n )}\n \n