@abtnode/blocklet-services 1.16.19-beta-ba354e01 → 1.16.19-beta-beb58af7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/routes/user.js +35 -1
- package/api/validators/login.js +13 -0
- package/build/asset-manifest.json +65 -61
- package/build/index.html +1 -1
- package/build/service-worker.js +1 -1
- package/build/service-worker.js.map +1 -1
- package/build/static/css/{8702.3ffd8486.chunk.css → 5982.ac464505.chunk.css} +1 -1
- package/build/static/js/1035.ceeeaa2a.chunk.js +2 -0
- package/build/static/js/1275.34d2fab6.chunk.js +2 -0
- package/build/static/js/1318.11dffa16.chunk.js +2 -0
- package/build/static/js/1343.69031e0b.chunk.js +2 -0
- package/build/static/js/1809.2d1a1fe4.chunk.js +2 -0
- package/build/static/js/1946.383ddc49.chunk.js +2 -0
- package/build/static/js/{3490.4d3a51ea.chunk.js → 2362.ab5308a8.chunk.js} +2 -2
- package/build/static/js/3131.477fef7e.chunk.js +2 -0
- package/build/static/js/3842.9917fe86.chunk.js +3 -0
- package/build/static/js/3925.948d992d.chunk.js +2 -0
- package/build/static/js/{4881.8ba32996.chunk.js → 4881.1de6ed4a.chunk.js} +2 -2
- package/build/static/js/5047.2f665ae5.chunk.js +2 -0
- package/build/static/js/5070.5979037b.chunk.js +2 -0
- package/build/static/js/5434.523d071d.chunk.js +2 -0
- package/build/static/js/5785.5636e84e.chunk.js +2 -0
- package/build/static/js/5820.c40d570f.chunk.js +2 -0
- package/build/static/js/{8702.bb84d009.chunk.js → 5982.7fb6982b.chunk.js} +2 -2
- package/build/static/js/6326.2816fb2f.chunk.js +2 -0
- package/build/static/js/6400.0d9d1b25.chunk.js +2 -0
- package/build/static/js/{6629.a4a3fb70.chunk.js → 6629.fd9d74f5.chunk.js} +3 -3
- package/build/static/js/717.ec2ba6d0.chunk.js +2 -0
- package/build/static/js/7556.218caceb.chunk.js +2 -0
- package/build/static/js/779.cbad02fa.chunk.js +2 -0
- package/build/static/js/7858.dda2dc10.chunk.js +2 -0
- package/build/static/js/7973.7d559f93.chunk.js +3 -0
- package/build/static/js/8283.f3a42d0f.chunk.js +2 -0
- package/build/static/js/8944.d4773634.chunk.js +2 -0
- package/build/static/js/8983.f509aca0.chunk.js +2 -0
- package/build/static/js/{9194.8e4efb4f.chunk.js → 9194.6800abab.chunk.js} +2 -2
- package/build/static/js/9900.2dea9cda.chunk.js +2 -0
- package/build/static/js/main.41cd395e.js +3 -0
- package/package.json +34 -34
- package/build/static/js/1946.dd7542b8.chunk.js +0 -2
- package/build/static/js/218.74e73a26.chunk.js +0 -2
- package/build/static/js/2761.a62dc611.chunk.js +0 -2
- package/build/static/js/3131.0f8fd01b.chunk.js +0 -2
- package/build/static/js/3557.bfa0e436.chunk.js +0 -2
- package/build/static/js/3688.679796d1.chunk.js +0 -2
- package/build/static/js/3842.c535fcce.chunk.js +0 -3
- package/build/static/js/4160.e45b5ba1.chunk.js +0 -2
- package/build/static/js/5070.267c5f25.chunk.js +0 -2
- package/build/static/js/530.a11fe287.chunk.js +0 -2
- package/build/static/js/5673.0dd67df6.chunk.js +0 -2
- package/build/static/js/5710.a221ffa5.chunk.js +0 -2
- package/build/static/js/5856.8f363ad8.chunk.js +0 -3
- package/build/static/js/5982.2fbc5d75.chunk.js +0 -2
- package/build/static/js/6032.1a233c60.chunk.js +0 -2
- package/build/static/js/6112.55185ef9.chunk.js +0 -2
- package/build/static/js/779.ba47be45.chunk.js +0 -2
- package/build/static/js/7858.7726a169.chunk.js +0 -2
- package/build/static/js/7892.029c9f9b.chunk.js +0 -2
- package/build/static/js/8944.d6df0376.chunk.js +0 -2
- package/build/static/js/8983.c87cf7ed.chunk.js +0 -2
- package/build/static/js/9596.5b13ea7d.chunk.js +0 -2
- package/build/static/js/9900.31422ac9.chunk.js +0 -2
- package/build/static/js/main.9d12d0ab.js +0 -3
- /package/build/static/js/{3842.c535fcce.chunk.js.LICENSE.txt → 3842.9917fe86.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{6629.a4a3fb70.chunk.js.LICENSE.txt → 6629.fd9d74f5.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{5856.8f363ad8.chunk.js.LICENSE.txt → 7973.7d559f93.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.9d12d0ab.js.LICENSE.txt → main.41cd395e.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[717],{6032:function(e,t,n){n.r(t),n.d(t,{default:function(){return g}});var r=n(32723),a=n(34795),u=n(96234),o=n(30969),i=n(86822),c=n(30734),s=n(19611),p=n.n(s),l=n(95803),f=n.n(l),d=n(75255),h=n(50496),v=n(26022),m=n(7768),b=n(66710),w=n(90781),x=n(23938),k=n(37574);function g(){var e,t=(0,v.PE)().t,n=(0,x.y0)().blocklet,s=(0,i.lr)(),l=(0,u.Z)(s,1)[0],g=(0,c.useParams)().componentDid,Z=(0,d.Z)((function(e){return e.breakpoints.down("md")})),P="dialog"===l.get("mode"),y=null===n||void 0===n||null===(e=n.meta)||void 0===e?void 0:e.did,_=new URL(window.location.href),E=(_.searchParams.get("store")||"").split(",").filter(Boolean).map((function(e){try{return new URL(e.startsWith("http")?e:"https://".concat(e)).origin}catch(t){return console.error(t),null}})).filter(Boolean),C=(0,o.useState)(E.map((function(e){return{url:e,name:e.replace("https://","")}}))),L=(0,u.Z)(C,2),D=L[0],K=L[1],U=_.searchParams.get("resourceType")||"";(0,o.useEffect)((function(){(0,a.Z)((0,r.Z)().mark((function e(){var t;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.all(E.map(function(){var e=(0,a.Z)((0,r.Z)().mark((function e(t){var n,a,u;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=p()(t,"/api/store.json"),e.next=3,f().get(n);case 3:return a=e.sent,u=a.data,e.abrupt("return",{url:t,name:u.name});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 3:t=e.sent,K(t||[]),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.error(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))()}),[E.join(",")]);(0,o.useEffect)((function(){var e=(0,w.ZP)();return y&&e.connect(),function(){y&&e.isConnected()&&e.disconnect()}}),[y]);var B=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).inDialog,t=void 0===e||e;return(0,k.jsx)(b.Z,{stores:D,resourceType:U,mode:"embed",inDialog:t,storageKey:(0,m.fx)(U)})};return P?(0,k.jsx)(h.ZP,{className:"resource-dialog",title:t("blocklet.publish.addResource"),maxWidth:!1,fullWidth:!1,PaperProps:{style:Z?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:function(e,t){"backdropClick"!==t&&window.parent.postMessage({event:"resourceDialog.close",componentDid:g},"*")},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:B()}):B({inDialog:!1})}},54559:function(e,t,n){n.d(t,{hi:function(){return u},od:function(){return a.a}});var r=n(95803),a=n.n(r);a().defaults.timeout=1e4;var u=a().create()},30134:function(e,t,n){n.d(t,{EJ:function(){return y},Jf:function(){return P},LQ:function(){return d},Nb:function(){return h},UV:function(){return _},Xv:function(){return l},Z3:function(){return C},ag:function(){return w},mo:function(){return m},nD:function(){return f},nU:function(){return g},w2:function(){return x}});var r=n(32723),a=n(34795),u=n(92522),o=n.n(u),i=n(59505),c=n(50576),s=n(43430),p=n(54559);function l(e){var t=e.replace(/\/api\/space\/.+/,""),n=e.replace(/\/$/,"").split("/"),r=n.at(-4),a=n.at(-2);return(0,s.xn)(t,"space",r,"apps",a,"explorer?key=/apps/".concat(a,"/.did-objects/").concat(a,"/"))}function f(e){var t=e.replace(/\/api\/space\/.+/,""),n=e.replace(/\/$/,"").split("/").at(-4);return(0,s.xn)(t,"space",n)}function d(e){return e.replace(/\/$/,"").split("/").at(-4)}function h(e){return v.apply(this,arguments)}function v(){return(v=(0,a.Z)((0,r.Z)().mark((function e(t){var n,a;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,o()(t)){e.next=3;break}return e.abrupt("return",!1);case 3:return e.next=5,p.hi.head(t,{timeout:5e3});case 5:return n=e.sent,a=n.headers,e.abrupt("return","true"===a["x-listable"]&&"true"===a["x-readable"]&&"true"===a["x-writeable"]);case 10:return e.prev=10,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",!1);case 14:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function m(e){var t;return(null===e||void 0===e||null===(t=e.find((function(e){return e.key===i.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT})))||void 0===t?void 0:t.value)||""}function b(e){return null===e||void 0===e?void 0:e.replace(/\/api\/space\/.+/,"")}function w(e){var t=new URL(e);return(0,s.xn)(t.origin,t.pathname)}function x(e){return k.apply(this,arguments)}function k(){return(k=(0,a.Z)((0,r.Z)().mark((function e(t){var n,a,u,i,l;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,o()(t)){e.next=3;break}return e.abrupt("return",!1);case 3:return n=w(t),a=(0,s.xn)(n,"space/api/did/one-click-authorization/token"),e.next=7,p.hi.get(a,{timeout:5e3});case 7:return u=e.sent,i=u.status,l=u.data,e.abrupt("return",200===i&&(0,c.isObject)(l));case 13:return e.prev=13,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",!1);case 17:case"end":return e.stop()}}),e,null,[[0,13]])})))).apply(this,arguments)}function g(e){return Z.apply(this,arguments)}function Z(){return Z=(0,a.Z)((0,r.Z)().mark((function e(t){var n,a,u,i,c=arguments;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(c.length>1&&void 0!==c[1]?c[1]:{timeout:3e3}).timeout,e.prev=1,o()(t)){e.next=4;break}return e.abrupt("return","");case 4:return e.next=6,p.hi.head(t,{timeout:n});case 6:return a=e.sent,u=a.headers,i=u["x-space-name"],e.abrupt("return",i?decodeURIComponent(i):"");case 12:return e.prev=12,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return","");case 16:case"end":return e.stop()}}),e,null,[[1,12]])}))),Z.apply(this,arguments)}function P(e){var t=e.replace(/\/api\/space\/.+/,""),n=e.replace(/\/$/,"").split("/").at(-4);return(0,s.xn)(t,"/api/space/nft/display?spaceDid=".concat(n))}var y=function(e){var t,n;return(null===e||void 0===e||null===(t=e.configs)||void 0===t||null===(n=t.find((function(e){return e.key===i.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT})))||void 0===n?void 0:n.value)||null};function _(e){return E.apply(this,arguments)}function E(){return(E=(0,a.Z)((0,r.Z)().mark((function e(t){var n;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n={}).did=d(t),e.next=4,g(t);case 4:return n.name=e.sent,n.url=b(t),n.endpoint=t,e.abrupt("return",n);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function C(e){return L.apply(this,arguments)}function L(){return L=(0,a.Z)((0,r.Z)().mark((function e(t){var n,a,u,o,i,l,f,d,h,v=arguments;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=v.length>1&&void 0!==v[1]?v[1]:{timeout:3e4,withSearchParams:!0},(0,c.isString)(t)){e.next=3;break}throw new Error("url(".concat(t,") must be a string"));case 3:return u=t.startsWith("http")?t:"https://".concat(t),o=new URL(u),e.next=7,p.hi.get((0,s.xn)(o.origin,"/__blocklet__.js?type=json"),{timeout:a.timeout});case 7:if(i=e.sent,l=i.data,f=null===(n=l.componentMountPoints.findLast((function(e){return"z8iZnaYxnkMD5AKRjTKiCb8pQr1ut8UantAcf"===e.did})))||void 0===n?void 0:n.mountPoint){e.next=12;break}throw new Error("MountPoint(".concat(f,") not found"));case 12:return d=(0,s.xn)(o.origin,f),h=a.withSearchParams&&o.searchParams.get("spaceDid")?(0,s.xn)(d,"?spaceDid=".concat(o.searchParams.get("spaceDid"))):d,e.abrupt("return",h);case 15:case"end":return e.stop()}}),e)}))),L.apply(this,arguments)}}}]);
|
|
2
|
+
//# sourceMappingURL=717.ec2ba6d0.chunk.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[7556],{23299:function(t,e,r){"use strict";r.d(e,{Z:function(){return C}});var n,o=r(71171),i=r(33028),a=r(59740),s=r(24974),u=r.n(s),c=r(33359),l={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64"},f=r(30969),p=r(6200),m=r(55581),d=r(37574),h=function(t,e){e.name,e.alternative;return function(e){return(0,f.useEffect)((function(){}),[]),(0,d.jsx)(t,(0,i.Z)({},e))}},_=["name","color","size","variant","rounded","style","className","forwardedRef"],v={light:"fal",regular:"far",solid:"fas"};function b(t){var e=t.name,r=t.color,n=t.size,o=t.variant,s=t.rounded,u=t.style,c=t.className,l=t.forwardedRef,f=(0,a.Z)(t,_),p=(0,d.jsx)("i",{ref:l,className:"".concat(v[o]," fa-").concat(e," ").concat(s?"":c),style:Object.assign({color:r,fontSize:"".concat(n,"px")},u||{})});return s?(0,d.jsx)(y,(0,i.Z)((0,i.Z)({ref:l,size:n,color:r,className:c},f),{},{children:p})):p}b.propTypes={name:u().string.isRequired,className:u().string,color:u().string,rounded:u().bool,variant:u().string,size:u().number,style:u().object},b.defaultProps={rounded:!1,variant:"light",color:p.Z.grey[900],className:"",size:24,style:{}};var g,y=(0,m.zo)("span")(n||(n=(0,o.Z)(["\n width: ","px;\n height: ","px;\n border-radius: 50%;\n border: 1px solid ",";\n display: flex;\n justify-content: center;\n align-items: center;\n\n .fa,\n .fas,\n .fal,\n .far {\n line-height: ","px;\n }\n"])),(function(t){return 2*t.size}),(function(t){return 2*t.size}),(function(t){return t.color}),(function(t){return t.size})),x=h((0,f.forwardRef)((function(t,e){return(0,d.jsx)(b,(0,i.Z)((0,i.Z)({},t),{},{forwardedRef:e}))})),{name:"Icon",alternative:"SVG icons"}),T=r(79216),k=["type","children","style","className","variant"],w={error:{icon:"exclamation-circle",color:p.Z.error.main,borderColor:"#e35b54",backgroundColor:"rgba(227, 91, 84, 0.2)"},warning:{icon:"exclamation-triangle",color:p.Z.warning.main,borderColor:"#f7d040",backgroundColor:"rgba(247, 208, 64, 0.2)"},success:{icon:"check-circle",color:p.Z.success.main,borderColor:"#89ddd9",backgroundColor:"rgba(137, 221, 217, 0.2)"},tip:{icon:"info-circle",color:p.Z.grey[500],borderColor:"#222222",backgroundColor:"#EEEEEE"}};function Z(t){var e=(0,T.dG)(t,Z,["style"]),r=e.type,n=e.children,o=e.style,s=e.className,u=e.variant,f=(0,a.Z)(e,k),p=w[r]||w.success,m=p.icon,h=p.color,_=p.backgroundColor,v=p.borderColor,b=Object.assign({color:l[500],backgroundColor:"border"===u?_:"transparent",borderLeft:"border"===u?"5px solid ".concat(v):"none"},o);return(0,d.jsxs)(E,(0,i.Z)((0,i.Z)({},f),{},{className:"alert alert--".concat(r," alert--").concat(u," ").concat(s).trim(),style:b,children:["icon"===u&&(0,d.jsx)(x,{className:"alert-icon",name:m,size:24,style:{color:h}}),(0,d.jsx)(c.Z,{component:"div",className:"alert-content",children:n})]}))}Z.propTypes={type:u().oneOf(Object.keys(w)),children:u().any.isRequired,className:u().string,style:u().oneOfType([u().object,u().string]),variant:u().oneOf(["border","icon"])},Z.defaultProps={type:"tip",className:"",style:"{}",variant:"border"};var C=h(Z,{name:"Alert",alternative:"@mui/material/Alert"}),E=(0,m.zo)("div")(g||(g=(0,o.Z)(["\n display: flex;\n align-items: center;\n font-size: 16px;\n margin: 0;\n padding: 16px;\n margin: 16px 0;\n\n strong {\n margin: 0 5px;\n }\n\n .alert-icon {\n margin-right: 16px;\n }\n\n .alert-content {\n flex: 1;\n display: flex;\n flex-direction: column;\n }\n"])))},99398:function(t,e,r){"use strict";var n,o=r(71171),i=r(33028),a=r(59740),s=r(16380),u=r(24974),c=r.n(u),l=r(15405),f=r(37574),p=["title","subTitle","onClickBack"];function m(t){var e=t.title,r=t.subTitle,n=t.onClickBack,o=(0,a.Z)(t,p);return(0,f.jsxs)(d,(0,i.Z)((0,i.Z)({},o),{},{children:[n&&(0,f.jsx)(l.Z,{className:"back-btn",onClick:n}),(0,f.jsx)("div",{className:"title",children:e}),(0,f.jsx)("div",{className:"sub-title",children:r})]}))}var d=s.Z.div(n||(n=(0,o.Z)(["\n position: relative;\n width: 100%;\n text-align: center;\n\n .title {\n font-size: 24px;\n font-weight: 700;\n color: ",";\n\n "," {\n font-size: 20px;\n }\n }\n\n .sub-title {\n font-size: 14px;\n color: ",";\n padding: 0 14px;\n font-weight: 400;\n }\n\n .back-btn {\n position: absolute;\n left: 0;\n top: 8px;\n color: #9397a1;\n font-size: 18px;\n cursor: pointer;\n }\n"])),(function(t){return t.theme.palette.common.black}),(function(t){return t.theme.breakpoints.down("md")}),(function(t){return t.theme.palette.grey[600]}));e.Z=m,m.propTypes={title:c().string,subTitle:c().string,onClickBack:c().oneOfType([c().func,c().string])},m.defaultProps={title:"",subTitle:"",onClickBack:""}},15405:function(t,e,r){"use strict";var n=r(71600);e.Z=void 0;var o=n(r(48035)),i=r(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}),"ArrowBackIos");e.Z=a},10814:function(t,e,r){"use strict";var n=r(71600);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(48035)),i=r(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");e.default=a},23038:function(t,e,r){"use strict";var n=r(71600);e.Z=void 0;var o=n(r(48035)),i=r(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");e.Z=a},42082:function(t,e,r){"use strict";var n=r(27609).default,o=r(91461).default,i=r(814).default,a=r(98870).default,s=r(53100).default,u=r(68230).default,c=r(10669).default,l=r(78365).default,f=r(50562),p=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"],m=function(t){u(r,t);var e=c(r);function r(t){var n;(s(this,r),n=e.call(this),t instanceof Error)?(n.originalError=t,t=t.message):(n.originalError=new Error(t),n.originalError.stack=n.stack);return n.name="AbortError",n.message=t,n}return a(r)}(l(Error)),d=function(t,e,r){var n=r.retries-(e-1);return t.attemptNumber=e,t.retriesLeft=n,t},h=function(t,e){return new Promise((function(r,a){e=i({onFailedAttempt:function(){},retries:10},e);var s=f.operation(e);s.attempt(function(){var i=o(n().mark((function o(i){return n().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.t0=r,n.next=4,t(i);case 4:n.t1=n.sent,(0,n.t0)(n.t1),n.next=34;break;case 8:if(n.prev=8,n.t2=n.catch(0),n.t2 instanceof Error){n.next=13;break}return a(new TypeError('Non-error was thrown: "'.concat(n.t2,'". You should only throw errors.'))),n.abrupt("return");case 13:if(!(n.t2 instanceof m)){n.next=18;break}s.stop(),a(n.t2.originalError),n.next=34;break;case 18:if(!(n.t2 instanceof TypeError)||(o=n.t2.message,p.includes(o))){n.next=23;break}s.stop(),a(n.t2),n.next=34;break;case 23:return d(n.t2,i,e),n.prev=24,n.next=27,e.onFailedAttempt(n.t2);case 27:n.next=33;break;case 29:return n.prev=29,n.t3=n.catch(24),a(n.t3),n.abrupt("return");case 33:s.retry(n.t2)||a(s.mainError());case 34:case"end":return n.stop()}var o}),o,null,[[0,8],[24,29]])})));return function(t){return i.apply(this,arguments)}}())}))};t.exports=h,t.exports.default=h,t.exports.AbortError=m},17660:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(11681),o=r(30969),i=n.__importDefault(r(23075));e.default=function(t,e){void 0===e&&(e=[]);var r=i.default(t,e,{loading:!0}),n=r[0],a=r[1];return o.useEffect((function(){a()}),[a]),n}},23075:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(11681),o=r(30969),i=n.__importDefault(r(75410));e.default=function(t,e,r){void 0===e&&(e=[]),void 0===r&&(r={loading:!1});var a=o.useRef(0),s=i.default(),u=o.useState(r),c=u[0],l=u[1],f=o.useCallback((function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=++a.current;return c.loading||l((function(t){return n.__assign(n.__assign({},t),{loading:!0})})),t.apply(void 0,e).then((function(t){return s()&&o===a.current&&l({value:t,loading:!1}),t}),(function(t){return s()&&o===a.current&&l({error:t,loading:!1}),t}))}),e);return[c,f]}},22073:function(t,e,r){"use strict";var n=r(11681),o=r(30969),i=n.__importDefault(r(17660));e.Z=function(t,e){void 0===e&&(e=[]);var r=o.useState(0),a=r[0],s=r[1],u=i.default(t,n.__spreadArrays(e,[a])),c=u.loading,l=o.useCallback((function(){c||s((function(t){return t+1}))}),n.__spreadArrays(e,[c]));return n.__assign(n.__assign({},u),{retry:l})}},75410:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(30969);e.default=function(){var t=n.useRef(!1),e=n.useCallback((function(){return t.current}),[]);return n.useEffect((function(){return t.current=!0,function(){t.current=!1}}),[]),e}},43178:function(t,e,r){"use strict";var n=r(30969);e.Z=function(t){void 0===t&&(t={});var e=n.useState(t),r=e[0],o=e[1];return[r,n.useCallback((function(t){o((function(e){return Object.assign({},e,t instanceof Function?t(e):t)}))}),[])]}},50562:function(t,e,r){t.exports=r(69267)},69267:function(t,e,r){var n=r(77152);e.operation=function(t){var r=e.timeouts(t);return new n(r,{forever:t&&(t.forever||t.retries===1/0),unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})},e.timeouts=function(t){if(t instanceof Array)return[].concat(t);var e={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var r in t)e[r]=t[r];if(e.minTimeout>e.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var n=[],o=0;o<e.retries;o++)n.push(this.createTimeout(o,e));return t&&t.forever&&!n.length&&n.push(this.createTimeout(o,e)),n.sort((function(t,e){return t-e})),n},e.createTimeout=function(t,e){var r=e.randomize?Math.random()+1:1,n=Math.round(r*Math.max(e.minTimeout,1)*Math.pow(e.factor,t));return n=Math.min(n,e.maxTimeout)},e.wrap=function(t,r,n){if(r instanceof Array&&(n=r,r=null),!n)for(var o in n=[],t)"function"===typeof t[o]&&n.push(o);for(var i=0;i<n.length;i++){var a=n[i],s=t[a];t[a]=function(n){var o=e.operation(r),i=Array.prototype.slice.call(arguments,1),a=i.pop();i.push((function(t){o.retry(t)||(t&&(arguments[0]=o.mainError()),a.apply(this,arguments))})),o.attempt((function(){n.apply(t,i)}))}.bind(t,s),t[a].options=r}}},77152:function(t){function e(t,e){"boolean"===typeof e&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(t)),this._timeouts=t,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}t.exports=e,e.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},e.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},e.prototype.retry=function(t){if(this._timeout&&clearTimeout(this._timeout),!t)return!1;var e=(new Date).getTime();if(t&&e-this._operationStart>=this._maxRetryTime)return this._errors.push(t),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(t);var r=this._timeouts.shift();if(void 0===r){if(!this._cachedTimeouts)return!1;this._errors.splice(0,this._errors.length-1),r=this._cachedTimeouts.slice(-1)}var n=this;return this._timer=setTimeout((function(){n._attempts++,n._operationTimeoutCb&&(n._timeout=setTimeout((function(){n._operationTimeoutCb(n._attempts)}),n._operationTimeout),n._options.unref&&n._timeout.unref()),n._fn(n._attempts)}),r),this._options.unref&&this._timer.unref(),!0},e.prototype.attempt=function(t,e){this._fn=t,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout((function(){r._operationTimeoutCb()}),r._operationTimeout)),this._operationStart=(new Date).getTime(),this._fn(this._attempts)},e.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated"),this.attempt(t)},e.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated"),this.attempt(t)},e.prototype.start=e.prototype.try,e.prototype.errors=function(){return this._errors},e.prototype.attempts=function(){return this._attempts},e.prototype.mainError=function(){if(0===this._errors.length)return null;for(var t={},e=null,r=0,n=0;n<this._errors.length;n++){var o=this._errors[n],i=o.message,a=(t[i]||0)+1;t[i]=a,a>=r&&(e=o,r=a)}return e}}}]);
|
|
2
|
+
//# sourceMappingURL=7556.218caceb.chunk.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[779],{41981:function(e,n,t){t.d(n,{NU:function(){return k},mc:function(){return m}});var r=t(32723),a=t(34795),o=t(96234),c=t(30969),s=t(50576),i=t(30134),u=t(41395),l=t(59505),p=t(57982),d=t(1986),h=t(23938),f=t(37574),v=(0,c.createContext)({}),x=v.Provider;v.Consumer;function m(e){var n=e.children,t=(0,c.useState)(!1),v=(0,o.Z)(t,2),m=v[0],k=v[1],w=(0,c.useState)(null),b=(0,o.Z)(w,2),g=b[0],y=b[1],Z=(0,h.y0)(),E=Z.blocklet,P=Z.actions.refreshBlocklet,j=(0,c.useMemo)((function(){return(0,i.EJ)(E)}),[E]),_=(0,u.h6)().api;(0,p.Z)((0,a.Z)((0,r.Z)().mark((function e(){var n;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,k(!0),!(0,s.isEmpty)(j)){e.next=5;break}return y(null),e.abrupt("return");case 5:return e.next=7,(0,i.UV)(j);case 7:n=e.sent,y(n),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(0),console.error(e.t0),d.Z.error(e.t0.message);case 15:return e.prev=15,k(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[0,11,15,18]])}))),[j]);var L=function(){var e=(0,a.Z)((0,r.Z)().mark((function e(n){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y(n),e.next=3,C(n.endpoint);case 3:P();case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),C=function(){var e=(0,a.Z)((0,r.Z)().mark((function e(n){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_.configBlocklet({input:{did:[E.meta.did],configs:[{key:l.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:n}]}});case 2:P();case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),S=Boolean(j&&g);return(0,f.jsx)(x,{value:{loading:m,spaceGateway:g,deleteSpaceGateway:function(){y(null),P()},updateSpaceGateway:L,storageEndpoint:j,settingStorageEndpoint:C,hasStorageEndpoint:S},children:n})}function k(){return(0,c.useContext)(v)}m.defaultProps={}},30779:function(e,n,t){t.r(n),t.d(n,{default:function(){return z}});var r,a,o,c=t(71171),s=t(33028),i=t(32723),u=t(34795),l=t(30969),p=t(30734),d=t(16380),h=t(19611),f=t.n(h),v=t(54470),x=t(38361),m=t(66629),k=t(43001),w=t(75255),b=t(26022),g=t(94308),y=t(99574),Z=t(19006),E=t(47650),P=t(20244),j=t(7017),_=t(59505),L=t(38507),C=t(23938),S=t(4485),B=d.Z.span(r||(r=(0,c.Z)(["\n color: ",";\n &::before {\n content: '*';\n }\n"])),(function(e){return e.theme.palette.error.main})),N=t(74197),R=t(41981),I=t(37574),O=(0,l.lazy)((function(){return t.e(3033).then(t.bind(t,73033))})),A=(0,l.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(4319),t.e(4881),t.e(3842)]).then(t.bind(t,55537))})),T=(0,l.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(2362),t.e(1343),t.e(9657),t.e(3131)]).then(t.bind(t,33131))})),U=(0,l.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(6400),t.e(5820),t.e(7556),t.e(1318),t.e(1809),t.e(5785)]).then(t.bind(t,42123))})),K=(0,l.lazy)((function(){return Promise.all([t.e(2940),t.e(7313),t.e(8983)]).then(t.bind(t,38641))})),M=(0,l.lazy)((function(){return t.e(9900).then(t.bind(t,89900))})),D=(0,l.lazy)((function(){return t.e(8283).then(t.bind(t,35982))}));function z(){var e,n,t,r=(0,w.Z)((function(e){return e.breakpoints.down("md")})),a=(0,b.PE)(),o=a.t,c=a.locale,d=(0,p.useNavigate)(),h=(0,C.y0)(),k=h.meta,z=h.blocklet,G=h.actions,H=h.loading,$=localStorage.getItem("blocklet-server-url"),q=(0,S.Tt)().session,V=(0,L.tX)("fromLauncher");(0,l.useEffect)((function(){(0,L.NU)(),q.user&&(G.refreshMeta(),G.refreshBlocklet({showError:!1}))}),[q.user]),(0,l.useEffect)((function(){G.refreshFuel({showError:!1})}),[null===z||void 0===z||null===(e=z.meta)||void 0===e?void 0:e.did]);var X="".concat(P.WELLKNOWN_SERVICE_PATH_PREFIX,"/setup"),Y=[{key:"access",name:o("setup.steps.access"),path:f()(X,"access")},{key:"domain",name:o("setup.steps.domain"),path:f()(X,"domain")},function(e){var n,t=null===e||void 0===e||null===(n=e.capabilities)||void 0===n?void 0:n.didSpace;if(!t)return null;if(t===_.BLOCKLET_APP_SPACE_ENDPOINTS.REQUIRED)return{key:"did-space",name:(0,I.jsxs)(I.Fragment,{children:[o("setup.steps.didSpace")," ",(0,I.jsx)(B,{})]}),path:f()(X,"did-space")};if(t===_.BLOCKLET_APP_SPACE_ENDPOINTS.OPTIONAL)return{key:"did-space",name:(0,I.jsx)(I.Fragment,{children:o("setup.steps.didSpace")}),path:f()(X,"did-space")};throw new Error("capabilities.didSpace cannot take the value ".concat(t))}(z),{key:"config",name:(0,I.jsxs)(I.Fragment,{children:[o("setup.steps.config")," ",(0,L.o2)(k)&&(0,I.jsx)(B,{})]}),path:f()(X,"config")},null!==k&&void 0!==k&&null!==(n=k.requirements)&&void 0!==n&&null!==(t=n.fuels)&&void 0!==t&&t.length?{key:"fuel",name:(0,I.jsxs)(I.Fragment,{children:[o("setup.steps.fuel")," ",(0,I.jsx)(B,{})]}),path:f()(X,"fuel")}:null].filter(Boolean),J=Y.findIndex((function(e){return"".concat(L.Bq.replace(/\/$/,"")).concat(X,"/").concat(e.key)===window.location.pathname})),Q=f()(L.Bq,P.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo?v=".concat(null===z||void 0===z?void 0:z.updatedAt)),ee=function(){var e=(0,u.Z)((0,i.Z)().mark((function e(n){var t,r,a;return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new URL(window.location.href),r=t.search,n?(a=Y.findIndex((function(e){return e.key===n})),d(a>-1?"".concat(f()(X,Y[a].key)).concat(r):"".concat(f()(X,"complete")).concat(r))):Y[J+1]?d("".concat(f()(X,Y[J+1].key)).concat(r)):d("".concat(f()(X,"complete")).concat(r)),e.next=4,G.refreshBlocklet();case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),ne=function(){d(-1)};function te(e,n){return(0,I.jsxs)(O,{children:[!z&&(0,I.jsx)(x.Z,{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",children:(0,I.jsx)(g.Z,{})}),z&&(0,I.jsx)(e,(0,s.Z)((0,s.Z)({blocklet:z},n),{},{onNext:ee,onPrevious:ne}))]})}var re=function(){window.open($)},ae=r?(0,I.jsx)(Z.Z,{onClick:re,width:"32",height:"32",style:{cursor:"pointer"}}):(0,I.jsx)(E.Z,{onClick:re,width:"128",height:"48",style:{marginTop:-1,cursor:"pointer"}}),oe=[{key:"install",name:o("launchBlocklet.steps.installApp"),path:f()(X,"install")},{key:"setup",name:o("setup.steps.launchApp"),children:Y}],ce=[{key:"agreement",name:o("launchBlocklet.introduction"),path:f()(X,"agreement")}].concat(oe);return V&&(ce=[{key:"purchase-space",name:o("launchBlocklet.steps.purchaseSpace")},{key:"prepare-space",name:o("launchBlocklet.steps.prepareSpace")}].concat(oe)),(0,I.jsx)(W,{steps:ce,children:(0,I.jsx)(N.cK,{children:(0,I.jsxs)(R.mc,{children:[(0,I.jsx)(v.Global,{styles:F}),(0,I.jsx)(m.Z,{locale:c,loading:H,blockletMeta:(0,s.Z)((0,s.Z)({},k),{},{title:(0,j.getDisplayName)((0,s.Z)((0,s.Z)({},z),{},{meta:k}))}),navLogo:ae,pcWidth:"80%",style:{height:"100%"},logoUrl:Q,useOfSkeleton:!1,headerEndAddons:(0,I.jsx)(y.Z,{SessionContext:S.B3,sessionManagerProps:{disableLogout:!0}}),launchingText:o("setup.title"),children:(0,I.jsxs)(p.Routes,{children:[(0,I.jsx)(p.Route,{path:"access",element:te(K)}),(0,I.jsx)(p.Route,{path:"domain",element:te(U)}),(0,I.jsx)(p.Route,{path:"did-space",element:te(T)}),(0,I.jsx)(p.Route,{path:"config",element:te(A)}),(0,I.jsx)(p.Route,{path:"fuel",element:te(M)}),(0,I.jsx)(p.Route,{path:"complete",element:te(D)}),(0,I.jsx)(p.Route,{path:"*",element:(0,I.jsx)(p.Navigate,{to:"access".concat(window.location.search),replace:!0})})]})})]})})})}var F=(0,v.css)(a||(a=(0,c.Z)(["\n html,\n body,\n #root,\n #root > .wrapper {\n height: 100%;\n }\n"]))),W=(0,d.Z)(k.W)(o||(o=(0,c.Z)([""])))},99574:function(e,n,t){t.d(n,{Z:function(){return k}});var r,a=t(71171),o=t(33028),c=t(30969),s=t(16380),i=t(24974),u=t.n(i),l=t(94551),p=t(30734),d=t(33426),h=t(26681),f=t(26022),v=t(46513),x=t(91077),m=t(37574);function k(e){var n=e.SessionContext,t=e.extraItems,r=e.showLocale,a=e.showHelper,s=e.showSessionManager,i=e.sessionManagerProps,u=(0,c.useContext)(n).session,k=(0,c.useContext)(f.RD).locale,b=(0,p.useLocation)(),g={"/store":{endpoint:"https://store.blocklet.io"},"/dashboard":{path:"/conceptual/overview"},"/settings/router":{path:"/conceptual/server-architecture"}};return(0,m.jsxs)(w,{children:[t.map((function(e,n){return(0,c.cloneElement)(e,{key:n})})),r&&(0,m.jsx)(h.Z,{"data-cy":"locale-addon",icon:v.Z,size:23,showText:!1,className:"locale-addon"}),a&&(0,m.jsx)(l.Z,{onClick:function(){var e=b.pathname,n={};e.indexOf("/store")>-1?n=g["/store"]:g[e]&&(n=g[e]),window.open("".concat(n.endpoint||"https://developer.blocklet.io/docs","/").concat(k).concat(n.path||""),"_blank")},children:(0,m.jsx)(x.Z,{})}),s&&(0,m.jsx)(d.Z,(0,o.Z)((0,o.Z)({locale:k,session:u,size:24,showRole:!0},i),{},{showManageBlocklet:!1}))]})}k.propTypes={SessionContext:u().object.isRequired,webWalletUrl:u().string,extraItems:u().array,showLocale:u().bool,showSessionManager:u().bool,showHelper:u().bool,sessionManagerProps:u().object},k.defaultProps={webWalletUrl:"",extraItems:[],showLocale:!0,showSessionManager:!0,showHelper:!0,sessionManagerProps:{}};var w=s.Z.div(r||(r=(0,a.Z)(["\n display: flex;\n justify-content: center;\n align-items: center;\n\n .MuiIconButton-root svg {\n width: 26px;\n height: 26px;\n }\n\n .user-addon {\n .user-avatar {\n width: 28px;\n border-radius: 14px;\n height: auto;\n }\n }\n\n "," {\n > button,\n > a {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n"])),(function(e){return e.theme.breakpoints.down("md")}))},54559:function(e,n,t){t.d(n,{hi:function(){return o},od:function(){return a.a}});var r=t(95803),a=t.n(r);a().defaults.timeout=1e4;var o=a().create()},30134:function(e,n,t){t.d(n,{EJ:function(){return E},Jf:function(){return Z},LQ:function(){return h},Nb:function(){return f},UV:function(){return P},Xv:function(){return p},Z3:function(){return _},ag:function(){return k},mo:function(){return x},nD:function(){return d},nU:function(){return g},w2:function(){return w}});var r=t(32723),a=t(34795),o=t(92522),c=t.n(o),s=t(59505),i=t(50576),u=t(43430),l=t(54559);function p(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/"),r=t.at(-4),a=t.at(-2);return(0,u.xn)(n,"space",r,"apps",a,"explorer?key=/apps/".concat(a,"/.did-objects/").concat(a,"/"))}function d(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/").at(-4);return(0,u.xn)(n,"space",t)}function h(e){return e.replace(/\/$/,"").split("/").at(-4)}function f(e){return v.apply(this,arguments)}function v(){return(v=(0,a.Z)((0,r.Z)().mark((function e(n){var t,a;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,c()(n)){e.next=3;break}return e.abrupt("return",!1);case 3:return e.next=5,l.hi.head(n,{timeout:5e3});case 5:return t=e.sent,a=t.headers,e.abrupt("return","true"===a["x-listable"]&&"true"===a["x-readable"]&&"true"===a["x-writeable"]);case 10:return e.prev=10,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",!1);case 14:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function x(e){var n;return(null===e||void 0===e||null===(n=e.find((function(e){return e.key===s.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT})))||void 0===n?void 0:n.value)||""}function m(e){return null===e||void 0===e?void 0:e.replace(/\/api\/space\/.+/,"")}function k(e){var n=new URL(e);return(0,u.xn)(n.origin,n.pathname)}function w(e){return b.apply(this,arguments)}function b(){return(b=(0,a.Z)((0,r.Z)().mark((function e(n){var t,a,o,s,p;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,c()(n)){e.next=3;break}return e.abrupt("return",!1);case 3:return t=k(n),a=(0,u.xn)(t,"space/api/did/one-click-authorization/token"),e.next=7,l.hi.get(a,{timeout:5e3});case 7:return o=e.sent,s=o.status,p=o.data,e.abrupt("return",200===s&&(0,i.isObject)(p));case 13:return e.prev=13,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",!1);case 17:case"end":return e.stop()}}),e,null,[[0,13]])})))).apply(this,arguments)}function g(e){return y.apply(this,arguments)}function y(){return y=(0,a.Z)((0,r.Z)().mark((function e(n){var t,a,o,s,i=arguments;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=(i.length>1&&void 0!==i[1]?i[1]:{timeout:3e3}).timeout,e.prev=1,c()(n)){e.next=4;break}return e.abrupt("return","");case 4:return e.next=6,l.hi.head(n,{timeout:t});case 6:return a=e.sent,o=a.headers,s=o["x-space-name"],e.abrupt("return",s?decodeURIComponent(s):"");case 12:return e.prev=12,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return","");case 16:case"end":return e.stop()}}),e,null,[[1,12]])}))),y.apply(this,arguments)}function Z(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/").at(-4);return(0,u.xn)(n,"/api/space/nft/display?spaceDid=".concat(t))}var E=function(e){var n,t;return(null===e||void 0===e||null===(n=e.configs)||void 0===n||null===(t=n.find((function(e){return e.key===s.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT})))||void 0===t?void 0:t.value)||null};function P(e){return j.apply(this,arguments)}function j(){return(j=(0,a.Z)((0,r.Z)().mark((function e(n){var t;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t={}).did=h(n),e.next=4,g(n);case 4:return t.name=e.sent,t.url=m(n),t.endpoint=n,e.abrupt("return",t);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e){return L.apply(this,arguments)}function L(){return L=(0,a.Z)((0,r.Z)().mark((function e(n){var t,a,o,c,s,p,d,h,f,v=arguments;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=v.length>1&&void 0!==v[1]?v[1]:{timeout:3e4,withSearchParams:!0},(0,i.isString)(n)){e.next=3;break}throw new Error("url(".concat(n,") must be a string"));case 3:return o=n.startsWith("http")?n:"https://".concat(n),c=new URL(o),e.next=7,l.hi.get((0,u.xn)(c.origin,"/__blocklet__.js?type=json"),{timeout:a.timeout});case 7:if(s=e.sent,p=s.data,d=null===(t=p.componentMountPoints.findLast((function(e){return"z8iZnaYxnkMD5AKRjTKiCb8pQr1ut8UantAcf"===e.did})))||void 0===t?void 0:t.mountPoint){e.next=12;break}throw new Error("MountPoint(".concat(d,") not found"));case 12:return h=(0,u.xn)(c.origin,d),f=a.withSearchParams&&c.searchParams.get("spaceDid")?(0,u.xn)(h,"?spaceDid=".concat(c.searchParams.get("spaceDid"))):h,e.abrupt("return",f);case 15:case"end":return e.stop()}}),e)}))),L.apply(this,arguments)}}}]);
|
|
2
|
+
//# sourceMappingURL=779.cbad02fa.chunk.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[7858],{37858:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return F}});var r,a=t(71171),o=t(30969),s=t(16380),i=t(30734),c=t(86822),l=t(33359),d=t(1059),u=t(32901),p=t(38361),f=t(38219),h=t(70576),m=t(50624),v=t(315),g=t(89364),x=t(27724),b=t(59467),w=t(29996),Z=t(26022),j=t(92771),S=t(26328),y=t(20244),P=t(28595),k=t(96234),N=t(24974),C=t.n(N),I=t(37574);function z(e){var n,t=e.list,r=e.width,a=e.height,s=e.cardSpace,i=e.onSelect,c=e.defaultIndex,l=(0,o.useState)(0),d=(0,k.Z)(l,2),u=d[0],p=d[1],f=(0,o.useState)(0),h=(0,k.Z)(f,2),m=h[0],v=h[1],g=(0,o.useRef)(null),x=function(e){if(!(e<0||e>t.length-1)){p(e);var n=g.current.clientWidth;v(e*(r+s)-(n-r)/2+.5*s),i(e)}};(0,o.useEffect)((function(){x(c);g.current.addEventListener("touchmove",(function(e){return e.preventDefault()}),{passive:!1})}),[]);return(0,I.jsx)(R,{ref:g,onTouchStart:function(e){var t=e.touches[0];n=t.clientX},onTouchEnd:function(e){var t=e.changedTouches[0],r=n-t.clientX;Math.abs(r)>60&&x(r>0?u+1:u-1)},children:(0,I.jsx)("div",{className:"card-container",style:{transform:"translate(".concat(-m,"px, 0)")},children:t.map((function(e,n){return(0,I.jsx)("div",{className:"card-item ".concat(n===u?"selected":""),style:{width:r,height:a,margin:s/2},onClick:function(){return x(n)},children:(0,I.jsx)("div",{className:"card-content",dangerouslySetInnerHTML:{__html:e.src}})},e.id)}))})})}var R=s.Z.div(r||(r=(0,a.Z)(["\n overflow: hidden;\n mask-image: linear-gradient(to left, transparent, black 3%, black 97%, transparent);\n overflow: hidden;\n .card-container {\n display: flex;\n white-space: nowrap;\n width: max-content;\n transition: all ease 0.3s;\n }\n .card-item {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n cursor: pointer;\n\n .card-content {\n pointer-events: none;\n max-width: 100%;\n max-height: 100%;\n width: auto;\n height: auto;\n outline: #526ded solid 0;\n transition: all ease 0.2s;\n box-shadow: rgba(0, 0, 0, 0.2) 0 0 10px;\n }\n &.selected {\n cursor: default;\n .card-content {\n outline: #526ded solid 5px;\n }\n }\n }\n"])));z.propTypes={list:C().array,width:C().number,height:C().number,cardSpace:C().number,onSelect:C().func,defaultIndex:C().number},z.defaultProps={list:"",width:300,height:400,cardSpace:40,onSelect:function(){},defaultIndex:0};var M,A=t(36558),L=t(85752),_=t(86776);function H(e){var n=e.icon,t=e.active,r=e.completed,a={1:(0,I.jsx)(v.Z,{className:"step-icon"}),2:(0,I.jsx)(g.Z,{className:"step-icon"}),3:(0,I.jsx)(x.Z,{className:"step-icon"})},o=["step-icon-w"];return t&&o.push("step-icon-w--active"),r&&o.push("step-icon-w--completed"),(0,I.jsx)("div",{className:o.join(" "),children:a[String(n)]})}var T=(0,s.Z)(d.Z)(M||(M=(0,a.Z)(["\n padding-top: 46px;\n padding-bottom: 46px;\n height: 100%;\n overflow: auto;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n @media (max-width: ","px) {\n display: block;\n }\n .header {\n text-align: center;\n margin-bottom: 24px;\n }\n\n .stepper {\n padding: 24px;\n height: auto;\n width: 100%;\n min-height: 640px;\n display: flex;\n flex-direction: column;\n\n .stepper-progress {\n padding: 0;\n flex: 0;\n margin-bottom: 24px;\n\n .MuiStepLabel-label.MuiStepLabel-alternativeLabel {\n margin-top: 8px;\n }\n\n .MuiStepConnector-alternativeLabel {\n top: 24px;\n }\n\n .MuiStepConnector-lineHorizontal {\n height: 3px;\n border: none;\n background-color: #eaeaf0;\n border-radius: 1px;\n }\n\n .step-icon-w {\n background-color: ",";\n z-index: 1;\n color: ",";\n width: 50px;\n height: 50px;\n display: flex;\n border-radius: 50%;\n justify-content: center;\n align-items: center;\n .step-icon {\n font-size: 30px;\n }\n }\n\n .step-icon-w--active {\n background-color: ",";\n }\n\n .step-icon-w--completed {\n background-color: ",";\n }\n }\n\n .stepper-content {\n padding: 0 64px;\n flex: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 24px;\n\n .stepper-icon {\n margin-left: 40px;\n }\n\n .stepper-auth {\n padding: 0;\n\n .auth-title {\n margin-bottom: 16px;\n }\n }\n\n .stepper-tip {\n text-align: center;\n margin-bottom: 16px;\n }\n @media (max-width: ","px) {\n padding: 0;\n }\n }\n\n .stepper-actions {\n flex: 0;\n text-align: right;\n padding: 0 64px;\n display: none;\n .step-button {\n margin-right: 8px;\n }\n }\n\n .select-passport {\n width: 80%;\n @media (max-width: ","px) {\n width: 100%;\n }\n }\n\n .user-info {\n .name {\n font-weight: 500;\n font-size: 18px;\n line-height: 25px;\n color: #222222;\n }\n }\n }\n\n .connect {\n background: #fafafa;\n }\n"])),(function(e){return e.theme.breakpoints.values.sm}),(function(e){return e.theme.palette.grey[500]}),(function(e){return e.theme.palette.common.white}),(function(e){return e.theme.palette.primary.main}),(function(e){return e.theme.palette.secondary.main}),(function(e){return e.theme.breakpoints.values.sm}),(function(e){return e.theme.breakpoints.values.sm})),D=(0,L.Z)((function(e){var n=e.SessionContext,r=e.webWalletUrl,a=e.createPassportSvg,s=e.passportColor,d=(0,o.useContext)(n),v=d.api,g=d.session,x=(0,P.Z)({user:null,passport:null,success:!1,activeStep:0}),k=(0,_.Z)(),N=k.setPassportId,C=k.clearPassportId,R=(0,o.useContext)(Z.RD),M=R.t,L=R.locale,D=(0,i.useNavigate)(),E=(0,j.Z)().wallet,W=new URL(window.location.href).searchParams,F=function(){x.activeStep++},U=function(e){x.user=e.user},V=function(e){null!==e&&void 0!==e&&e.passportId&&N(e.passportId),x.success=!0,F()},B=function(){var e;if(E&&"1"===new URL(window.location.href).searchParams.get("fromWallet"))t.e(5434).then(t.t.bind(t,45434,23)).then((function(e){e.call("arcClosePage")}));else{try{g.logout()}catch(r){}var n=W.get("redirect");n?window.location.replace(n):((null===(e=window.env)||void 0===e?void 0:e.apiPrefix)||"").startsWith(y.WELLKNOWN_SERVICE_PATH_PREFIX)?D("".concat(y.WELLKNOWN_SERVICE_PATH_PREFIX,"/connect"),{replace:!0}):(C(),window.location.replace("/"))}},O=[{label:M("lostPassport.selectPassport"),content:function(){return x.user?(0,I.jsxs)(p.Z,{className:"select-passport",children:[(0,I.jsxs)(p.Z,{my:1,display:"flex",alignItems:"center",className:"user-info",children:[(0,I.jsx)(b.Z,{src:x.user.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),(0,I.jsxs)(p.Z,{children:[(0,I.jsx)(p.Z,{className:"name",children:x.user.fullName}),(0,I.jsx)(p.Z,{className:"did",mt:1,children:(0,I.jsx)(A.Z,{did:x.user.did})})]})]}),(0,I.jsx)("div",{children:(0,I.jsx)(z,{width:230,height:306,cardSpace:24,list:x.user.passportTypes.map((function(e){return{src:a({title:e.title,issuer:e.issuer.name,issuerDid:e.issuer.id,ownerDid:x.user.did,ownerName:x.user.fullName,ownerAvatarUrl:x.user.avatar,preferredColor:s||"auto"}),name:e.title,id:e.id}})),onSelect:function(e){return n={target:{value:x.user.passportTypes[e].name}},void(x.passport=n.target.value);var n},defaultIndex:0})}),(0,I.jsx)(p.Z,{textAlign:"center",children:(0,I.jsx)(w.Z,{variant:"contained",color:"primary",onClick:function(){F()},disabled:!x.passport,children:M("common.next")})})]}):(0,I.jsx)(S.Z,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-list",forceConnected:!1,autoConnect:!1,checkFn:v.get,checkTimeout:6e5,webWalletUrl:r,onSuccess:U,locale:L,messages:{title:M("lostPassport.dialog.title"),scan:M("lostPassport.dialog.scan"),confirm:M("lostPassport.dialog.confirm"),success:M("lostPassport.dialog.success")}})}},{label:M("lostPassport.receivePassport"),content:function(){var e,n,t={receiverDid:x.user.did,passportName:x.passport,teamDid:(null===(e=window)||void 0===e||null===(n=e.blocklet)||void 0===n?void 0:n.did)||""};return(0,I.jsx)(S.Z,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-issue",checkFn:v.get,checkTimeout:6e5,webWalletUrl:r,onSuccess:V,locale:L,messages:{title:"".concat(M("lostPassport.dialog.title")),scan:M("lostPassport.dialog.scan"),confirm:M("lostPassport.dialog.confirm"),success:M("lostPassport.dialog.success")},extraParams:t})}},{label:M("common.complete"),content:function(){return(0,I.jsxs)(p.Z,{textAlign:"center",children:[(0,I.jsx)(p.Z,{mb:3,color:"success.main",children:(0,I.jsx)(u.Z,{style:{fontSize:60}})}),(0,I.jsx)(l.Z,{component:"p",variant:"body1",className:"subheader",children:M("issuePassport.dialog.success")}),(0,I.jsx)(w.Z,{style:{marginTop:40},variant:"contained",color:"primary",onClick:B,children:M("issuePassport.dialog.loginWithPassport")})]})}}];return(0,I.jsx)(T,{children:(0,I.jsxs)("div",{className:"stepper",children:[(0,I.jsx)(f.Z,{className:"stepper-progress",alternativeLabel:!0,activeStep:x.activeStep,children:O.map((function(e){var n=e.label;return(0,I.jsx)(h.Z,{children:(0,I.jsx)(m.Z,{StepIconComponent:H,children:n})},n)}))}),(0,I.jsx)("div",{className:"stepper-content",children:O[x.activeStep].content()}),!x.success&&(0,I.jsx)(p.Z,{textAlign:"center",fontSize:12,children:(0,I.jsx)(c.rU,{to:"/",style:{color:"#4598FA"},children:M("lostPassport.return")})})]})})})),E=t(4485),W=t(38507);function F(){var e,n,t=(0,W.yP)();return(0,I.jsx)(D,{SessionContext:E.B3,webWalletUrl:t,createPassportSvg:W.Ju,passportColor:(null===(e=window)||void 0===e||null===(n=e.env)||void 0===n?void 0:n.passportColor)||"auto"})}},36558:function(e,n,t){"use strict";var r=t(33028),a=t(59740),o=t(24974),s=t.n(o),i=t(86822),c=t(19638),l=t(23586),d=t(37574),u=["did","href","external","avatarProps"];function p(e){var n=e.did,t=e.href,o=e.external,s=(e.avatarProps,(0,a.Z)(e,u)),p=(0,d.jsx)(l.Z,(0,r.Z)({did:n},s));return t?o?(0,d.jsx)(c.Z,{target:"_blank",href:t,underline:"hover",children:p}):(0,d.jsx)(i.rU,{to:t,children:p}):p}p.propTypes={did:s().string.isRequired,to:s().string,href:s().string,avatarProps:s().object,external:s().bool},p.defaultProps={to:"",href:"",avatarProps:{},external:!1},n.Z=p},86776:function(e,n,t){"use strict";function r(){return{getPassportId:function(){var e=localStorage.getItem("passportId")||"";return localStorage.removeItem("passportId"),e},setPassportId:function(e){localStorage.setItem("passportId",e)}}}t.d(n,{Z:function(){return r}})},19477:function(e,n,t){var r=t(2717),a=t(37095),o=t(93113);e.exports={translations:{zh:r(o),en:r(a)}}},85752:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});var r=t(33028),a=t(26022),o=t(19477),s=t(37574);function i(e){return function(n){return(0,s.jsx)(a.Iw,{translations:o.translations,children:(0,s.jsx)(e,(0,r.Z)({},n))})}}},32901:function(e,n,t){"use strict";var r=t(71600);n.Z=void 0;var a=r(t(48035)),o=t(37574),s=(0,a.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");n.Z=s},89364:function(e,n,t){"use strict";var r=t(71600);n.Z=void 0;var a=r(t(48035)),o=t(37574),s=(0,a.default)((0,o.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"}),"GetApp");n.Z=s},315:function(e,n,t){"use strict";var r=t(71600);n.Z=void 0;var a=r(t(48035)),o=t(37574),s=(0,a.default)((0,o.jsx)("path",{d:"M3 14h4v-4H3v4zm0 5h4v-4H3v4zM3 9h4V5H3v4zm5 5h13v-4H8v4zm0 5h13v-4H8v4zM8 5v4h13V5H8z"}),"ViewList");n.Z=s},59467:function(e,n,t){"use strict";t.d(n,{Z:function(){return Z}});var r=t(96234),a=t(31461),o=t(7896),s=t(30969),i=t(87023),c=t(26540),l=t(45971),d=t(17363),u=t(17469),p=t(37574),f=(0,u.Z)((0,p.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person"),h=t(62746),m=t(2975);function v(e){return(0,m.Z)("MuiAvatar",e)}(0,h.Z)("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);var g=["alt","children","className","component","imgProps","sizes","src","srcSet","variant"],x=(0,l.ZP)("div",{name:"MuiAvatar",slot:"Root",overridesResolver:function(e,n){var t=e.ownerState;return[n.root,n[t.variant],t.colorDefault&&n.colorDefault]}})((function(e){var n=e.theme,t=e.ownerState;return(0,o.Z)({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:n.typography.fontFamily,fontSize:n.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},"rounded"===t.variant&&{borderRadius:(n.vars||n).shape.borderRadius},"square"===t.variant&&{borderRadius:0},t.colorDefault&&(0,o.Z)({color:(n.vars||n).palette.background.default},n.vars?{backgroundColor:n.vars.palette.Avatar.defaultBg}:{backgroundColor:"light"===n.palette.mode?n.palette.grey[400]:n.palette.grey[600]}))})),b=(0,l.ZP)("img",{name:"MuiAvatar",slot:"Img",overridesResolver:function(e,n){return n.img}})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),w=(0,l.ZP)(f,{name:"MuiAvatar",slot:"Fallback",overridesResolver:function(e,n){return n.fallback}})({width:"75%",height:"75%"});var Z=s.forwardRef((function(e,n){var t=(0,d.Z)({props:e,name:"MuiAvatar"}),l=t.alt,u=t.children,f=t.className,h=t.component,m=void 0===h?"div":h,Z=t.imgProps,j=t.sizes,S=t.src,y=t.srcSet,P=t.variant,k=void 0===P?"circular":P,N=(0,a.Z)(t,g),C=null,I=function(e){var n=e.crossOrigin,t=e.referrerPolicy,a=e.src,o=e.srcSet,i=s.useState(!1),c=(0,r.Z)(i,2),l=c[0],d=c[1];return s.useEffect((function(){if(a||o){d(!1);var e=!0,r=new Image;return r.onload=function(){e&&d("loaded")},r.onerror=function(){e&&d("error")},r.crossOrigin=n,r.referrerPolicy=t,r.src=a,o&&(r.srcset=o),function(){e=!1}}}),[n,t,a,o]),l}((0,o.Z)({},Z,{src:S,srcSet:y})),z=S||y,R=z&&"error"!==I,M=(0,o.Z)({},t,{colorDefault:!R,component:m,variant:k}),A=function(e){var n=e.classes,t={root:["root",e.variant,e.colorDefault&&"colorDefault"],img:["img"],fallback:["fallback"]};return(0,c.Z)(t,v,n)}(M);return C=R?(0,p.jsx)(b,(0,o.Z)({alt:l,srcSet:y,src:S,sizes:j,ownerState:M,className:A.img},Z)):null!=u?u:z&&l?l[0]:(0,p.jsx)(w,{ownerState:M,className:A.fallback}),(0,p.jsx)(x,(0,o.Z)({as:m,ownerState:M,className:(0,i.Z)(A.root,f),ref:n},N,{children:C}))}))}}]);
|
|
2
|
+
//# sourceMappingURL=7858.dda2dc10.chunk.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see 7973.7d559f93.chunk.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[7973],{9715:function(e,n,t){"use strict";var r,o=t(71171),i=t(33028),a=t(59740),c=t(30969),s=t(24974),l=t.n(s),u=t(33359),f=t(79216),d=t(6200),v=t(55581),p=t(37574),h=["type","content","children","style","className","forwardedRef"],g={error:{color:d.Z.common.white,backgroundColor:d.Z.error.main},warning:{color:d.Z.common.white,backgroundColor:d.Z.warning.main},success:{color:d.Z.common.white,backgroundColor:d.Z.success.main},primary:{color:d.Z.common.white,backgroundColor:d.Z.primary.main},reverse:{color:"#fff",backgroundColor:"#222"}};function m(e){var n=(0,f.dG)(e,m,["style"]),t=n.type,r=n.content,o=n.children,c=n.style,s=n.className,l=n.forwardedRef,u=(0,a.Z)(n,h),b=(0,v.Fg)().palette,x=Object.assign({},g[t]||g.primary,c);return b[t]&&Object.assign(x,{color:b[t].contrastText||d.Z.common.white,backgroundColor:b[t].main}),(0,p.jsx)(y,(0,i.Z)((0,i.Z)({ref:l,component:"span",className:s,style:x},u),{},{children:r||o}))}m.propTypes={children:l().any.isRequired,type:l().oneOf(Object.keys(g)),content:l().string,className:l().string,style:l().oneOfType([l().object,l().string])},m.defaultProps={type:"primary",content:"",className:"",style:{}};var b=(0,c.forwardRef)((function(e,n){return(0,p.jsx)(m,(0,i.Z)((0,i.Z)({},e),{},{forwardedRef:n}))}));n.Z=b;var y=(0,v.zo)(u.Z)(r||(r=(0,o.Z)(["\n && {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n padding: 2px 10px;\n height: 20px;\n line-height: 20px;\n font-size: 12px;\n font-weight: 500;\n border-radius: 4px;\n }\n"])))},39563:function(e,n,t){"use strict";var r=t(33028),o=t(68079),i=t(59740),a=(t(86204),t(30969)),c=t(24974),s=t.n(c),l=t(41333),u=t(26022),f=t(10556),d=t(26862),v=t(97347),p=t(56368),h=t(11689),g=t(23906),m=t(37574),b=["meta","fallbackUrl","invalidPathFallback","headerAddons","sessionManagerProps","links"];function y(e){var n,t=e.meta,c=e.fallbackUrl,s=e.invalidPathFallback,d=e.headerAddons,y=e.sessionManagerProps,x=e.links,w=(0,i.Z)(e,b);(0,g.x)();var O=(0,a.useContext)(l.B3),j=null===O||void 0===O||null===(n=O.session)||void 0===n?void 0:n.user,Z=null===j||void 0===j?void 0:j.role,S=((0,u.PE)()||{}).locale,k=(0,a.useMemo)((function(){var e=Object.assign({},window.blocklet,t);try{return(0,p.RX)(e)}catch(n){return console.error("Failed to format blocklet info",n,e),e}}),[t]),M=(0,a.useMemo)((function(){var e,n=(0,p.KN)(null===k||void 0===k||null===(e=k.navigation)||void 0===e?void 0:e.dashboard,S)||[];n=(0,p.Kb)(n,Z),n=(0,v._J)(n,(function(e){return{title:e.title,url:e.link,icon:e.icon?(0,m.jsx)("iconify-icon",{icon:e.icon}):null,external:!0,children:e.items}}),"items");var t=(0,v.Ik)(n).filter((function(e){return!!e.url})),r=(0,v.RX)(t.map((function(e){return e.url})));return-1!==r&&(t[r].active=!0),{localizedNav:n,flattened:t,matchedIndex:r}}),[k,S,Z]),E=M.localizedNav,z=M.flattened,C=M.matchedIndex,_="function"===typeof x?x(E):[].concat((0,o.Z)(E),(0,o.Z)(x));if((0,a.useLayoutEffect)((function(){!j||null!==z&&void 0!==z&&z.length||!c||(window.location.href=c)}),[c]),(0,a.useLayoutEffect)((function(){var e;j&&null!==z&&void 0!==z&&z.length&&-1===C&&(s?s():window.location.href=(null===(e=z[0])||void 0===e?void 0:e.url)||p.iU)}),[s,z,C]),!k.appName)return null;var I=k.appLogo,A=k.appLogoRect,N=k.appName,P=(0,m.jsx)(h.Z,{formattedBlocklet:k,addons:d,sessionManagerProps:y});return(0,m.jsx)(f.Z,(0,r.Z)((0,r.Z)({title:N,fullWidth:!0,sidebarWidth:128,legacy:!1,links:_},w),{},{headerProps:(0,r.Z)({homeLink:p.iU,logo:(0,m.jsx)("img",{src:A||I,alt:"logo"}),addons:P},w.headerProps)}))}y.propTypes={meta:d.I,fallbackUrl:s().string,invalidPathFallback:s().func,headerAddons:s().oneOfType([s().func,s().node]),sessionManagerProps:d.Z,links:s().oneOfType([s().array,s().func])},y.defaultProps={meta:{},fallbackUrl:p.iU,invalidPathFallback:null,headerAddons:void 0,sessionManagerProps:{showRole:!0,onLogout:function(){window.location.href=p.iU}},links:[]},n.Z=y},13328:function(e,n,t){"use strict";t.d(n,{BX:function(){return a},tZ:function(){return i}});var r=t(37574),o=t(3077);t(30969),t(34262),t(47814),t(60038),t(90681),r.Fragment;function i(e,n,t){return o.h.call(n,"css")?r.jsx(o.E,(0,o.c)(e,n),t):r.jsx(e,n,t)}function a(e,n,t){return o.h.call(n,"css")?r.jsxs(o.E,(0,o.c)(e,n),t):r.jsxs(e,n,t)}},91380:function(e,n,t){"use strict";var r=t(71600);n.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)([(0,i.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"},"0"),(0,i.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");n.Z=a},57256:function(e,n,t){"use strict";var r=t(71600);n.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"}),"Autorenew");n.Z=a},10814:function(e,n,t){"use strict";var r=t(71600);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");n.default=a},25177:function(e,n,t){"use strict";var r=t(71600);n.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline");n.Z=a},40817:function(e,n,t){"use strict";var r=t(71600);n.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}),"Fullscreen");n.Z=a},28915:function(e,n,t){"use strict";var r=t(71600);n.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}),"FullscreenExit");n.Z=a},98127:function(e,n,t){"use strict";var r=t(71600);n.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"}),"Group");n.Z=a},37973:function(e,n,t){"use strict";var r=t(71600);n.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert");n.Z=a},8825:function(e,n,t){"use strict";var r=t(71600);n.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");n.Z=a},51389:function(e,n,t){"use strict";var r=t(71600);n.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M18 17H6v-2h12v2zm0-4H6v-2h12v2zm0-4H6V7h12v2zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2v20z"}),"Receipt");n.Z=a},13875:function(e,n,t){"use strict";var r=t(71600);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"}),"Replay");n.default=a},14079:function(e,n,t){"use strict";var r=t(71600);n.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}),"Settings");n.Z=a},60003:function(e,n,t){"use strict";var r=t(71600);n.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");n.Z=a},51711:function(e,n,t){"use strict";t.d(n,{Z:function(){return O}});var r=t(56666),o=t(31461),i=t(7896),a=t(30969),c=t(87023),s=t(15460),l=t(26540);var u=t(82108),f=t(45971),d=t(17363),v=t(24099),p=t(62746),h=t(2975);function g(e){return(0,h.Z)("MuiBadge",e)}var m=(0,p.Z)("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),b=t(37574),y=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],x=(0,f.ZP)("span",{name:"MuiBadge",slot:"Root",overridesResolver:function(e,n){return n.root}})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),w=(0,f.ZP)("span",{name:"MuiBadge",slot:"Badge",overridesResolver:function(e,n){var t=e.ownerState;return[n.badge,n[t.variant],n["anchorOrigin".concat((0,v.Z)(t.anchorOrigin.vertical)).concat((0,v.Z)(t.anchorOrigin.horizontal)).concat((0,v.Z)(t.overlap))],"default"!==t.color&&n["color".concat((0,v.Z)(t.color))],t.invisible&&n.invisible]}})((function(e){var n=e.theme,t=e.ownerState;return(0,i.Z)({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:n.typography.fontFamily,fontWeight:n.typography.fontWeightMedium,fontSize:n.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:n.transitions.create("transform",{easing:n.transitions.easing.easeInOut,duration:n.transitions.duration.enteringScreen})},"default"!==t.color&&{backgroundColor:(n.vars||n).palette[t.color].main,color:(n.vars||n).palette[t.color].contrastText},"dot"===t.variant&&{borderRadius:4,height:8,minWidth:8,padding:0},"top"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap&&(0,r.Z)({top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%"},"&.".concat(m.invisible),{transform:"scale(0) translate(50%, -50%)"}),"bottom"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap&&(0,r.Z)({bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%"},"&.".concat(m.invisible),{transform:"scale(0) translate(50%, 50%)"}),"top"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap&&(0,r.Z)({top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%"},"&.".concat(m.invisible),{transform:"scale(0) translate(-50%, -50%)"}),"bottom"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap&&(0,r.Z)({bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%"},"&.".concat(m.invisible),{transform:"scale(0) translate(-50%, 50%)"}),"top"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"circular"===t.overlap&&(0,r.Z)({top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%"},"&.".concat(m.invisible),{transform:"scale(0) translate(50%, -50%)"}),"bottom"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"circular"===t.overlap&&(0,r.Z)({bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%"},"&.".concat(m.invisible),{transform:"scale(0) translate(50%, 50%)"}),"top"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"circular"===t.overlap&&(0,r.Z)({top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%"},"&.".concat(m.invisible),{transform:"scale(0) translate(-50%, -50%)"}),"bottom"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"circular"===t.overlap&&(0,r.Z)({bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%"},"&.".concat(m.invisible),{transform:"scale(0) translate(-50%, 50%)"}),t.invisible&&{transition:n.transitions.create("transform",{easing:n.transitions.easing.easeInOut,duration:n.transitions.duration.leavingScreen})})})),O=a.forwardRef((function(e,n){var t,r,a,f,p,h,m=(0,d.Z)({props:e,name:"MuiBadge"}),O=m.anchorOrigin,j=void 0===O?{vertical:"top",horizontal:"right"}:O,Z=m.className,S=m.component,k=m.components,M=void 0===k?{}:k,E=m.componentsProps,z=void 0===E?{}:E,C=m.children,_=m.overlap,I=void 0===_?"rectangular":_,A=m.color,N=void 0===A?"default":A,P=m.invisible,L=void 0!==P&&P,R=m.max,T=void 0===R?99:R,F=m.badgeContent,D=m.slots,U=m.slotProps,V=m.showZero,B=void 0!==V&&V,H=m.variant,W=void 0===H?"standard":H,q=(0,o.Z)(m,y),J=function(e){var n=e.badgeContent,t=e.invisible,r=void 0!==t&&t,o=e.max,i=void 0===o?99:o,a=e.showZero,c=void 0!==a&&a,l=(0,s.Z)({badgeContent:n,max:i}),u=r;!1!==r||0!==n||c||(u=!0);var f=u?l:e,d=f.badgeContent,v=f.max,p=void 0===v?i:v;return{badgeContent:d,invisible:u,max:p,displayValue:d&&Number(d)>p?"".concat(p,"+"):d}}({max:T,invisible:L,badgeContent:F,showZero:B}),$=J.badgeContent,G=J.invisible,X=J.max,Y=J.displayValue,K=(0,s.Z)({anchorOrigin:j,color:N,overlap:I,variant:W,badgeContent:F}),Q=G||null==$&&"dot"!==W,ee=Q?K:m,ne=ee.color,te=void 0===ne?N:ne,re=ee.overlap,oe=void 0===re?I:re,ie=ee.anchorOrigin,ae=void 0===ie?j:ie,ce=ee.variant,se=void 0===ce?W:ce,le="dot"!==se?Y:void 0,ue=(0,i.Z)({},m,{badgeContent:$,invisible:Q,max:X,displayValue:le,showZero:B,anchorOrigin:ae,color:te,overlap:oe,variant:se}),fe=function(e){var n=e.color,t=e.anchorOrigin,r=e.invisible,o=e.overlap,i=e.variant,a=e.classes,c=void 0===a?{}:a,s={root:["root"],badge:["badge",i,r&&"invisible","anchorOrigin".concat((0,v.Z)(t.vertical)).concat((0,v.Z)(t.horizontal)),"anchorOrigin".concat((0,v.Z)(t.vertical)).concat((0,v.Z)(t.horizontal)).concat((0,v.Z)(o)),"overlap".concat((0,v.Z)(o)),"default"!==n&&"color".concat((0,v.Z)(n))]};return(0,l.Z)(s,g,c)}(ue),de=null!=(t=null!=(r=null==D?void 0:D.root)?r:M.Root)?t:x,ve=null!=(a=null!=(f=null==D?void 0:D.badge)?f:M.Badge)?a:w,pe=null!=(p=null==U?void 0:U.root)?p:z.root,he=null!=(h=null==U?void 0:U.badge)?h:z.badge,ge=(0,u.y)({elementType:de,externalSlotProps:pe,externalForwardedProps:q,additionalProps:{ref:n,as:S},ownerState:ue,className:(0,c.Z)(null==pe?void 0:pe.className,fe.root,Z)}),me=(0,u.y)({elementType:ve,externalSlotProps:he,ownerState:ue,className:(0,c.Z)(fe.badge,null==he?void 0:he.className)});return(0,b.jsxs)(de,(0,i.Z)({},ge,{children:[C,(0,b.jsx)(ve,(0,i.Z)({},me,{children:le}))]}))}))},15460:function(e,n,t){"use strict";var r=t(30969);n.Z=function(e){var n=r.useRef({});return r.useEffect((function(){n.current=e})),n.current}},73360:function(e,n,t){var r=t(81294),o=t(24918),i=t(93528),a=t(26306),c=t(25098),s=t(82195);e.exports=function(e,n,t,l){var u=-1,f=o,d=!0,v=e.length,p=[],h=n.length;if(!v)return p;t&&(n=a(n,c(t))),l?(f=i,d=!1):n.length>=200&&(f=s,d=!1,n=new r(n));e:for(;++u<v;){var g=e[u],m=null==t?g:t(g);if(g=l||0!==g?g:0,d&&m===m){for(var b=h;b--;)if(n[b]===m)continue e;p.push(g)}else f(n,m,l)||p.push(g)}return p}},4005:function(e,n,t){var r=t(73360),o=t(53937),i=t(53970);e.exports=function(e,n,t){var a=e.length;if(a<2)return a?i(e[0]):[];for(var c=-1,s=Array(a);++c<a;)for(var l=e[c],u=-1;++u<a;)u!=c&&(s[c]=r(s[c]||l,e[u],n,t));return i(o(s,1),n,t)}},16986:function(e,n,t){var r=t(38047),o=t(90280),i=t(4005),a=t(95788),c=t(99985),s=o((function(e){var n=c(e);return n="function"==typeof n?n:void 0,i(r(e,a),void 0,n)}));e.exports=s},45819:function(e){"use strict";e.exports=function(e){if("number"!==typeof e)throw new TypeError("Expected a number");var n=e>0?Math.floor:Math.ceil;return{days:n(e/864e5),hours:n(e/36e5)%24,minutes:n(e/6e4)%60,seconds:n(e/1e3)%60,milliseconds:n(e)%1e3,microseconds:n(1e3*e)%1e3,nanoseconds:n(1e6*e)%1e3}}},93033:function(e,n,t){var r=t(2783),o=t(45279),i=t(96894).registerLang,a=t(15684);i("en_US",r),i("zh_CN",o),a.registerLang=i,e.exports=a},2783:function(e){e.exports={year:{long:"year",short:"y"},day:{long:"day",short:"d"},hour:{long:"hour",short:"h"},minute:{long:"minute",short:"m"},second:{long:"second",short:"s"},millisecond:{long:"millisecond",short:"ms"},microsecond:{long:"microsecond",short:"\xb5s"},nanosecond:{long:"nanosecond",short:"ns"}}},45279:function(e){e.exports={year:{long:"\u5e74",short:"\u5e74"},day:{long:"\u5929",short:"\u5929"},hour:{long:"\u5c0f\u65f6",short:"\u5c0f\u65f6"},minute:{long:"\u5206\u949f",short:"\u5206"},second:{long:"\u79d2\u949f",short:"\u79d2"},millisecond:{long:"\u6beb\u79d2",short:"\u6beb\u79d2"},microsecond:{long:"\u5fae\u79d2",short:"\u5fae\u79d2"},nanosecond:{long:"\u7eb3\u79d2",short:"\u7eb3\u79d2"}}},15684:function(e,n,t){var r=t(45819),o=t(96894).getLang;e.exports=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Number.isFinite(e))throw new TypeError("Expected a finite number");n.colonNotation&&(n.compact=!1,n.formatSubMilliseconds=!1,n.separateMilliseconds=!1,n.verbose=!1),n.compact&&(n.secondsDecimalDigits=0,n.millisecondsDecimalDigits=0);var t=o(n.locale),i=[],a=function(e,r,a){if(0!==i.length&&n.colonNotation||0!==e||n.colonNotation&&"minute"===r){var s,l,u,f=(t[r]||o("en_US")[r]).long,d=(t[r]||o("en_US")[r]).short,v=(a||e||"0").toString();if(n.colonNotation){s=i.length>0?":":"",l="";var p=v.includes(".")?v.split(".")[0].length:v.length,h=i.length>0?2:1;v="0".repeat(Math.max(0,h-p))+v}else s="",l="zh_CN"===n.locale?Object.values(c).filter((function(e){return e>0})).length>1?!c.days&&!c.hours&&c.minutes&&n.compact?f:d:c.minutes?f:d:n.verbose?" ".concat((u=f,1===e?u:"".concat(u,"s"))):d;i.push(s+v+l)}},c=r(e);if(a(Math.trunc(c.days/365),"year"),a(c.days%365,"day"),a(c.hours,"hour"),a(c.minutes,"minute"),n.separateMilliseconds||n.formatSubMilliseconds||!n.colonNotation&&e<1e3)if(a(c.seconds,"second"),n.formatSubMilliseconds)a(c.milliseconds,"millisecond"),a(c.microseconds,"microsecond"),a(c.nanoseconds,"nanosecond");else{var s=c.milliseconds+c.microseconds/1e3+c.nanoseconds/1e6,l="number"===typeof n.millisecondsDecimalDigits?n.millisecondsDecimalDigits:0,u=s>=1?Math.round(s):Math.ceil(s),f=l?s.toFixed(l):u;a(Number.parseFloat(f,10),"millisecond",f)}else{var d=function(e,n){var t=Math.floor(e*Math.pow(10,n)+1e-7);return(Math.round(t)/Math.pow(10,n)).toFixed(n)}(e/1e3%60,"number"===typeof n.secondsDecimalDigits?n.secondsDecimalDigits:1),v=n.keepDecimalsOnWholeSeconds?d:d.replace(/\.0+$/,"");a(Number.parseFloat(v,10),"second",v)}if(0===i.length){var p=(t.millisecond||o("en_US").millisecond).long,h=(t.millisecond||o("en_US").millisecond).short;return"zh_CN"===n.locale?"0".concat(n.verbose?"".concat(p):h):"0".concat(n.verbose?" ".concat(p,"s"):h)}if(n.compact)return i[0];if("number"===typeof n.unitCount){var g=n.colonNotation?"":" ";return i.slice(0,Math.max(n.unitCount,1)).join(g)}return n.colonNotation?i.join(""):i.join(" ")}},96894:function(e){var n=new Map;e.exports={registerLang:function(e,t){n.set(e,t)},getLang:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en_US";return n.get(e)||n.get("en_US")}}},17660:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(11681),o=t(30969),i=r.__importDefault(t(23075));n.default=function(e,n){void 0===n&&(n=[]);var t=i.default(e,n,{loading:!0}),r=t[0],a=t[1];return o.useEffect((function(){a()}),[a]),r}},23075:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(11681),o=t(30969),i=r.__importDefault(t(75410));n.default=function(e,n,t){void 0===n&&(n=[]),void 0===t&&(t={loading:!1});var a=o.useRef(0),c=i.default(),s=o.useState(t),l=s[0],u=s[1],f=o.useCallback((function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var o=++a.current;return l.loading||u((function(e){return r.__assign(r.__assign({},e),{loading:!0})})),e.apply(void 0,n).then((function(e){return c()&&o===a.current&&u({value:e,loading:!1}),e}),(function(e){return c()&&o===a.current&&u({error:e,loading:!1}),e}))}),n);return[l,f]}},22073:function(e,n,t){"use strict";var r=t(11681),o=t(30969),i=r.__importDefault(t(17660));n.Z=function(e,n){void 0===n&&(n=[]);var t=o.useState(0),a=t[0],c=t[1],s=i.default(e,r.__spreadArrays(n,[a])),l=s.loading,u=o.useCallback((function(){l||c((function(e){return e+1}))}),r.__spreadArrays(n,[l]));return r.__assign(r.__assign({},s),{retry:u})}},17708:function(e,n,t){"use strict";var r=t(30969),o=t(46378);n.Z=function(e,n,t){if(!o.isBrowser)return[n,o.noop,o.noop];if(!e)throw new Error("useLocalStorage key may not be falsy");var i=t?t.raw?function(e){return e}:t.deserializer:JSON.parse,a=r.useRef((function(e){try{var r=t?t.raw?String:t.serializer:JSON.stringify,o=localStorage.getItem(e);return null!==o?i(o):(n&&localStorage.setItem(e,r(n)),n)}catch(c){return n}})),c=r.useState((function(){return a.current(e)})),s=c[0],l=c[1];r.useLayoutEffect((function(){return l(a.current(e))}),[e]);var u=r.useCallback((function(n){try{var r="function"===typeof n?n(s):n;if("undefined"===typeof r)return;var o=void 0;o=t?t.raw?"string"===typeof r?r:JSON.stringify(r):t.serializer?t.serializer(r):JSON.stringify(r):JSON.stringify(r),localStorage.setItem(e,o),l(i(o))}catch(c){}}),[e,l]),f=r.useCallback((function(){try{localStorage.removeItem(e),l(void 0)}catch(c){}}),[e,l]);return[s,u,f]}},75410:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(30969);n.default=function(){var e=r.useRef(!1),n=r.useCallback((function(){return e.current}),[]);return r.useEffect((function(){return e.current=!0,function(){e.current=!1}}),[]),n}},43178:function(e,n,t){"use strict";var r=t(30969);n.Z=function(e){void 0===e&&(e={});var n=r.useState(e),t=n[0],o=n[1];return[t,r.useCallback((function(e){o((function(n){return Object.assign({},n,e instanceof Function?e(n):e)}))}),[])]}},53420:function(e,n,t){"use strict";var r=t(33028),o=/^[a-z0-9]+(-[a-z0-9]+)*$/,i=Object.freeze({left:0,top:0,width:16,height:16,rotate:0,vFlip:!1,hFlip:!1});function a(e){return(0,r.Z)((0,r.Z)({},i),e)}function c(e,n){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];var o=function n(t,o){if(void 0!==e.icons[t])return Object.assign({},e.icons[t]);if(o>5)return null;var a=e.aliases;if(a&&void 0!==a[t]){var c=a[t],s=n(c.parent,o+1);return s?function(e,n){var t=(0,r.Z)({},e);for(var o in i){var a=o;if(void 0!==n[a]){var c=n[a];if(void 0===t[a]){t[a]=c;continue}switch(a){case"rotate":t[a]=(t[a]+c)%4;break;case"hFlip":case"vFlip":t[a]=c!==t[a];break;default:t[a]=c}}}return t}(s,c):s}var l=e.chars;return!o&&l&&void 0!==l[t]?n(l[t],o+1):null}(n,0);if(o)for(var c in i)void 0===o[c]&&void 0!==e[c]&&(o[c]=e[c]);return o&&t?a(o):o}function s(e,n,t){t=t||{};var r=[];if("object"!==typeof e||"object"!==typeof e.icons)return r;e.not_found instanceof Array&&e.not_found.forEach((function(e){n(e,null),r.push(e)}));var o=e.icons;Object.keys(o).forEach((function(t){var o=c(e,t,!0);o&&(n(t,o),r.push(t))}));var a=t.aliases||"all";if("none"!==a&&"object"===typeof e.aliases){var s=e.aliases;Object.keys(s).forEach((function(t){if("variations"!==a||!function(e){for(var n in i)if(void 0!==e[n])return!0;return!1}(s[t])){var o=c(e,t,!0);o&&(n(t,o),r.push(t))}}))}return r}var l={provider:"string",aliases:"object",not_found:"object"};for(var u in i)l[u]=typeof i[u];function f(e){if("object"!==typeof e||null===e)return null;var n=e;if("string"!==typeof n.prefix||!e.icons||"object"!==typeof e.icons)return null;for(var t in l)if(void 0!==e[t]&&typeof e[t]!==l[t])return null;var r=n.icons;for(var a in r){var c=r[a];if(!a.match(o)||"string"!==typeof c.body)return null;for(var s in i)if(void 0!==c[s]&&typeof c[s]!==typeof i[s])return null}var u=n.aliases;if(u)for(var f in u){var d=u[f],v=d.parent;if(!f.match(o)||"string"!==typeof v||!r[v]&&!u[v])return null;for(var p in i)if(void 0!==d[p]&&typeof d[p]!==typeof i[p])return null}return n}var d=function(e,n,t){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=e.split(":");if("@"===e.slice(0,1)){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){var i=o.pop(),a=o.pop(),c={provider:o.length>0?o[0]:r,prefix:a,name:i};return n&&!v(c)?null:c}var s=o[0],l=s.split("-");if(l.length>1){var u={provider:r,prefix:l.shift(),name:l.join("-")};return n&&!v(u)?null:u}if(t&&""===r){var f={provider:r,prefix:"",name:s};return n&&!v(f,t)?null:f}return null},v=function(e,n){return!!e&&!(""!==e.provider&&!e.provider.match(o)||!(n&&""===e.prefix||e.prefix.match(o))||!e.name.match(o))},p=Object.create(null);try{var h=window||self;h&&1===h._iconifyStorage.version&&(p=h._iconifyStorage.storage)}catch(gn){}function g(e,n){void 0===p[e]&&(p[e]=Object.create(null));var t=p[e];return void 0===t[n]&&(t[n]=function(e,n){return{provider:e,prefix:n,icons:Object.create(null),missing:Object.create(null)}}(e,n)),t[n]}function m(e,n){if(!f(n))return[];var t=Date.now();return s(n,(function(n,r){r?e.icons[n]=r:e.missing[n]=t}))}function b(e,n){var t=e.icons[n];return void 0===t?null:t}var y=!1;function x(e){var n="string"===typeof e?d(e,!0,y):e;return n?b(g(n.provider,n.prefix),n.name):null}function w(e,n){var t=d(e,!0,y);return!!t&&function(e,n,t){try{if("string"===typeof t.body)return e.icons[n]=Object.freeze(a(t)),!0}catch(gn){}return!1}(g(t.provider,t.prefix),t.name,n)}function O(e,n){if("object"!==typeof e)return!1;if("string"!==typeof n&&(n="string"===typeof e.provider?e.provider:""),y&&""===n&&("string"!==typeof e.prefix||""===e.prefix)){var t=!1;return f(e)&&(e.prefix="",s(e,(function(e,n){n&&w(e,n)&&(t=!0)}))),t}return!("string"!==typeof e.prefix||!v({provider:n,prefix:e.prefix,name:"a"}))&&!!m(g(n,e.prefix),e)}var j=Object.freeze({inline:!1,width:null,height:null,hAlign:"center",vAlign:"middle",slice:!1,hFlip:!1,vFlip:!1,rotate:0});function Z(e,n){var t={};for(var r in e){var o=r;if(t[o]=e[o],void 0!==n[o]){var i=n[o];switch(o){case"inline":case"slice":"boolean"===typeof i&&(t[o]=i);break;case"hFlip":case"vFlip":!0===i&&(t[o]=!t[o]);break;case"hAlign":case"vAlign":"string"===typeof i&&""!==i&&(t[o]=i);break;case"width":case"height":("string"===typeof i&&""!==i||"number"===typeof i&&i||null===i)&&(t[o]=i);break;case"rotate":"number"===typeof i&&(t[o]+=i)}}}return t}var S=/(-?[0-9.]*[0-9]+[0-9.]*)/g,k=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function M(e,n,t){if(1===n)return e;if(t=void 0===t?100:t,"number"===typeof e)return Math.ceil(e*n*t)/t;if("string"!==typeof e)return e;var r=e.split(S);if(null===r||!r.length)return e;for(var o=[],i=r.shift(),a=k.test(i);;){if(a){var c=parseFloat(i);isNaN(c)?o.push(i):o.push(Math.ceil(c*n*t)/t)}else o.push(i);if(void 0===(i=r.shift()))return o.join("");a=!a}}function E(e){var n="";switch(e.hAlign){case"left":n+="xMin";break;case"right":n+="xMax";break;default:n+="xMid"}switch(e.vAlign){case"top":n+="YMin";break;case"bottom":n+="YMax";break;default:n+="YMid"}return n+=e.slice?" slice":" meet"}function z(e,n){var t,r,o={left:e.left,top:e.top,width:e.width,height:e.height},i=e.body;[e,n].forEach((function(e){var n,t=[],r=e.hFlip,a=e.vFlip,c=e.rotate;switch(r?a?c+=2:(t.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),t.push("scale(-1 1)"),o.top=o.left=0):a&&(t.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),t.push("scale(1 -1)"),o.top=o.left=0),c<0&&(c-=4*Math.floor(c/4)),c%=4){case 1:n=o.height/2+o.top,t.unshift("rotate(90 "+n.toString()+" "+n.toString()+")");break;case 2:t.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:n=o.width/2+o.left,t.unshift("rotate(-90 "+n.toString()+" "+n.toString()+")")}c%2===1&&(0===o.left&&0===o.top||(n=o.left,o.left=o.top,o.top=n),o.width!==o.height&&(n=o.width,o.width=o.height,o.height=n)),t.length&&(i='<g transform="'+t.join(" ")+'">'+i+"</g>")})),null===n.width&&null===n.height?t=M(r="1em",o.width/o.height):null!==n.width&&null!==n.height?(t=n.width,r=n.height):null!==n.height?t=M(r=n.height,o.width/o.height):r=M(t=n.width,o.height/o.width),"auto"===t&&(t=o.width),"auto"===r&&(r=o.height);var a={attributes:{width:t="string"===typeof t?t:t.toString()+"",height:r="string"===typeof r?r:r.toString()+"",preserveAspectRatio:E(n),viewBox:o.left.toString()+" "+o.top.toString()+" "+o.width.toString()+" "+o.height.toString()},body:i};return n.inline&&(a.inline=!0),a}var C=/\sid="(\S+)"/g,_="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),I=0;function A(e){for(var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_,r=[];n=C.exec(e);)r.push(n[1]);return r.length?(r.forEach((function(n){var r="function"===typeof t?t(n):t+(I++).toString(),o=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+r+"$3")})),e):e}var N="iconify2",P="iconify",L=P+"-count",R=P+"-version",T=36e5,F={local:!0,session:!0},D=!1,U={local:0,session:0},V={local:[],session:[]},B="undefined"===typeof window?{}:window;function H(e){var n=e+"Storage";try{if(B&&B[n]&&"number"===typeof B[n].length)return B[n]}catch(gn){}return F[e]=!1,null}function W(e,n,t){try{return e.setItem(L,t.toString()),U[n]=t,!0}catch(gn){return!1}}function q(e){var n=e.getItem(L);if(n){var t=parseInt(n);return t||0}return 0}var J=function(){if(!D){D=!0;var e=Math.floor(Date.now()/T)-168;for(var n in F)t(n)}function t(n){var t=H(n);if(t){var r=function(n){var r=P+n.toString(),o=t.getItem(r);if("string"!==typeof o)return!1;var i=!0;try{var a=JSON.parse(o);if("object"!==typeof a||"number"!==typeof a.cached||a.cached<e||"string"!==typeof a.provider||"object"!==typeof a.data||"string"!==typeof a.data.prefix)i=!1;else i=m(g(a.provider,a.data.prefix),a.data).length>0}catch(gn){i=!1}return i||t.removeItem(r),i};try{var o=t.getItem(R);if(o!==N)return o&&function(e){try{for(var n=q(e),t=0;t<n;t++)e.removeItem(P+t.toString())}catch(gn){}}(t),void function(e,n){try{e.setItem(R,N)}catch(gn){}W(e,n,0)}(t,n);for(var i=q(t),a=i-1;a>=0;a--)r(a)||(a===i-1?i--:V[n].push(a));W(t,n,i)}catch(gn){}}}},$={};function G(e,n){switch(e){case"local":case"session":F[e]=n;break;case"all":for(var t in F)F[t]=n}}var X=Object.create(null);function Y(e,n){X[e]=n}function K(e){return X[e]||X[""]}function Q(e){var n;if("string"===typeof e.resources)n=[e.resources];else if(!((n=e.resources)instanceof Array)||!n.length)return null;return{resources:n,path:void 0===e.path?"/":e.path,maxURL:e.maxURL?e.maxURL:500,rotate:e.rotate?e.rotate:750,timeout:e.timeout?e.timeout:5e3,random:!0===e.random,index:e.index?e.index:0,dataAfterTimeout:!1!==e.dataAfterTimeout}}for(var ee=Object.create(null),ne=["https://api.simplesvg.com","https://api.unisvg.com"],te=[];ne.length>0;)1===ne.length||Math.random()>.5?te.push(ne.shift()):te.push(ne.pop());function re(e,n){var t=Q(n);return null!==t&&(ee[e]=t,!0)}function oe(e){return ee[e]}ee[""]=Q({resources:["https://api.iconify.design"].concat(te)});var ie=function(e,n){var t=e,r=-1!==t.indexOf("?");return Object.keys(n).forEach((function(e){var o;try{o=function(e){switch(typeof e){case"boolean":return e?"true":"false";case"number":case"string":return encodeURIComponent(e);default:throw new Error("Invalid parameter")}}(n[e])}catch(gn){return}t+=(r?"&":"?")+encodeURIComponent(e)+"="+o,r=!0})),t},ae={},ce={},se=function(){var e;try{if("function"===typeof(e=fetch))return e}catch(gn){}return null}();var le={prepare:function(e,n,t){var r=[],o=ae[n];void 0===o&&(o=function(e,n){var t,r=oe(e);if(!r)return 0;if(r.maxURL){var o=0;r.resources.forEach((function(e){var n=e;o=Math.max(o,n.length)}));var i=ie(n+".json",{icons:""});t=r.maxURL-o-r.path.length-i.length}else t=0;var a=e+":"+n;return ce[e]=r.path,ae[a]=t,t}(e,n));var i="icons",a={type:i,provider:e,prefix:n,icons:[]},c=0;return t.forEach((function(t,s){(c+=t.length+1)>=o&&s>0&&(r.push(a),a={type:i,provider:e,prefix:n,icons:[]},c=t.length),a.icons.push(t)})),r.push(a),r},send:function(e,n,t){if(se){var r=function(e){if("string"===typeof e){if(void 0===ce[e]){var n=oe(e);if(!n)return"/";ce[e]=n.path}return ce[e]}return"/"}(n.provider);switch(n.type){case"icons":var o=n.prefix,i=n.icons.join(",");r+=ie(o+".json",{icons:i});break;case"custom":var a=n.uri;r+="/"===a.slice(0,1)?a.slice(1):a;break;default:return void t("abort",400)}var c=503;se(e+r).then((function(e){var n=e.status;if(200===n)return c=501,e.json();setTimeout((function(){t(function(e){return 404===e}(n)?"abort":"next",n)}))})).then((function(e){"object"===typeof e&&null!==e?setTimeout((function(){t("success",e)})):setTimeout((function(){t("next",c)}))})).catch((function(){t("next",c)}))}else t("abort",424)}};var ue=Object.create(null),fe=Object.create(null);function de(e,n){e.forEach((function(e){var t=e.provider;if(void 0!==ue[t]){var r=ue[t],o=e.prefix,i=r[o];i&&(r[o]=i.filter((function(e){return e.id!==n})))}}))}var ve=0;var pe={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function he(e,n,t,r){var o,i=e.resources.length,a=e.random?Math.floor(Math.random()*i):e.index;if(e.random){var c=e.resources.slice(0);for(o=[];c.length>1;){var s=Math.floor(Math.random()*c.length);o.push(c[s]),c=c.slice(0,s).concat(c.slice(s+1))}o=o.concat(c)}else o=e.resources.slice(a).concat(e.resources.slice(0,a));var l,u=Date.now(),f="pending",d=0,v=null,p=[],h=[];function g(){v&&(clearTimeout(v),v=null)}function m(){"pending"===f&&(f="aborted"),g(),p.forEach((function(e){"pending"===e.status&&(e.status="aborted")})),p=[]}function b(e,n){n&&(h=[]),"function"===typeof e&&h.push(e)}function y(){f="failed",h.forEach((function(e){e(void 0,l)}))}function x(){p.forEach((function(e){"pending"===e.status&&(e.status="aborted")})),p=[]}function w(){if("pending"===f){g();var r=o.shift();if(void 0===r)return p.length?void(v=setTimeout((function(){g(),"pending"===f&&(x(),y())}),e.timeout)):void y();var i={status:"pending",resource:r,callback:function(n,t){!function(n,t,r){var i="success"!==t;switch(p=p.filter((function(e){return e!==n})),f){case"pending":break;case"failed":if(i||!e.dataAfterTimeout)return;break;default:return}if("abort"===t)return l=r,void y();if(i)return l=r,void(p.length||(o.length?w():y()));if(g(),x(),!e.random){var a=e.resources.indexOf(n.resource);-1!==a&&a!==e.index&&(e.index=a)}f="completed",h.forEach((function(e){e(r)}))}(i,n,t)}};p.push(i),d++,v=setTimeout(w,e.rotate),t(r,n,i.callback)}}return"function"===typeof r&&h.push(r),setTimeout(w),function(){return{startTime:u,payload:n,status:f,queriesSent:d,queriesPending:p.length,subscribe:b,abort:m}}}function ge(e){var n=function(e){if("object"!==typeof e||"object"!==typeof e.resources||!(e.resources instanceof Array)||!e.resources.length)throw new Error("Invalid Reduncancy configuration");var n,t=Object.create(null);for(n in pe)void 0!==e[n]?t[n]=e[n]:t[n]=pe[n];return t}(e),t=[];function r(){t=t.filter((function(e){return"pending"===e().status}))}var o={query:function(e,o,i){var a=he(n,e,o,(function(e,n){r(),i&&i(e,n)}));return t.push(a),a},find:function(e){var n=t.find((function(n){return e(n)}));return void 0!==n?n:null},setIndex:function(e){n.index=e},getIndex:function(){return n.index},cleanup:r};return o}function me(){}var be=Object.create(null);function ye(e,n,t){var r,o;if("string"===typeof e){var i=K(e);if(!i)return t(void 0,424),me;o=i.send;var a=function(e){if(void 0===be[e]){var n=oe(e);if(!n)return;var t={config:n,redundancy:ge(n)};be[e]=t}return be[e]}(e);a&&(r=a.redundancy)}else{var c=Q(e);if(c){r=ge(c);var s=K(e.resources?e.resources[0]:"");s&&(o=s.send)}}return r&&o?r.query(n,o,t)().abort:(t(void 0,424),me)}function xe(){}var we=Object.create(null),Oe=Object.create(null),je=Object.create(null),Ze=Object.create(null);function Se(e,n){void 0===je[e]&&(je[e]=Object.create(null));var t=je[e];t[n]||(t[n]=!0,setTimeout((function(){t[n]=!1,function(e,n){void 0===fe[e]&&(fe[e]=Object.create(null));var t=fe[e];t[n]||(t[n]=!0,setTimeout((function(){if(t[n]=!1,void 0!==ue[e]&&void 0!==ue[e][n]){var r=ue[e][n].slice(0);if(r.length){var o=g(e,n),i=!1;r.forEach((function(t){var r=t.icons,a=r.pending.length;r.pending=r.pending.filter((function(t){if(t.prefix!==n)return!0;var a=t.name;if(void 0!==o.icons[a])r.loaded.push({provider:e,prefix:n,name:a});else{if(void 0===o.missing[a])return i=!0,!0;r.missing.push({provider:e,prefix:n,name:a})}return!1})),r.pending.length!==a&&(i||de([{provider:e,prefix:n}],t.id),t.callback(r.loaded.slice(0),r.missing.slice(0),r.pending.slice(0),t.abort))}))}}})))}(e,n)})))}var ke=Object.create(null);function Me(e,n,t){void 0===Oe[e]&&(Oe[e]=Object.create(null));var r=Oe[e];void 0===Ze[e]&&(Ze[e]=Object.create(null));var o=Ze[e];void 0===we[e]&&(we[e]=Object.create(null));var i=we[e];void 0===r[n]?r[n]=t:r[n]=r[n].concat(t).sort(),o[n]||(o[n]=!0,setTimeout((function(){o[n]=!1;var t=r[n];delete r[n];var a=K(e);a?a.prepare(e,n,t).forEach((function(t){ye(e,t,(function(r,o){var a=g(e,n);if("object"!==typeof r){if(404!==o)return;var c=Date.now();t.icons.forEach((function(e){a.missing[e]=c}))}else try{var s=m(a,r);if(!s.length)return;var l=i[n];s.forEach((function(e){delete l[e]})),$.store&&$.store(e,r)}catch(u){console.error(u)}Se(e,n)}))})):function(){var t=(""===e?"":"@"+e+":")+n,r=Math.floor(Date.now()/6e4);ke[t]<r&&(ke[t]=r,console.error('Unable to retrieve icons for "'+t+'" because API is not configured properly.'))}()})))}var Ee=function(e){var n=e.provider,t=e.prefix;return we[n]&&we[n][t]&&void 0!==we[n][t][e.name]},ze=function(e,n){var t,r=function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[];return e.forEach((function(e){var o="string"===typeof e?d(e,!1,t):e;n&&!v(o,t)||r.push({provider:o.provider,prefix:o.prefix,name:o.name})})),r}(e,!0,("boolean"===typeof t&&(y=t),y)),o=function(e){var n={loaded:[],missing:[],pending:[]},t=Object.create(null);e.sort((function(e,n){return e.provider!==n.provider?e.provider.localeCompare(n.provider):e.prefix!==n.prefix?e.prefix.localeCompare(n.prefix):e.name.localeCompare(n.name)}));var r={provider:"",prefix:"",name:""};return e.forEach((function(e){if(r.name!==e.name||r.prefix!==e.prefix||r.provider!==e.provider){r=e;var o=e.provider,i=e.prefix,a=e.name;void 0===t[o]&&(t[o]=Object.create(null));var c=t[o];void 0===c[i]&&(c[i]=g(o,i));var s=c[i],l={provider:o,prefix:i,name:a};(void 0!==s.icons[a]?n.loaded:""===i||void 0!==s.missing[a]?n.missing:n.pending).push(l)}})),n}(r);if(!o.pending.length){var i=!0;return n&&setTimeout((function(){i&&n(o.loaded,o.missing,o.pending,xe)})),function(){i=!1}}var a,c,s=Object.create(null),l=[];o.pending.forEach((function(e){var n=e.provider,t=e.prefix;if(t!==c||n!==a){a=n,c=t,l.push({provider:n,prefix:t}),void 0===we[n]&&(we[n]=Object.create(null));var r=we[n];void 0===r[t]&&(r[t]=Object.create(null)),void 0===s[n]&&(s[n]=Object.create(null));var o=s[n];void 0===o[t]&&(o[t]=[])}}));var u=Date.now();return o.pending.forEach((function(e){var n=e.provider,t=e.prefix,r=e.name,o=we[n][t];void 0===o[r]&&(o[r]=u,s[n][t].push(r))})),l.forEach((function(e){var n=e.provider,t=e.prefix;s[n][t].length&&Me(n,t,s[n][t])})),n?function(e,n,t){var r=ve++,o=de.bind(null,t,r);if(!n.pending.length)return o;var i={id:r,icons:n,callback:e,abort:o};return t.forEach((function(e){var n=e.provider,t=e.prefix;void 0===ue[n]&&(ue[n]=Object.create(null));var r=ue[n];void 0===r[t]&&(r[t]=[]),r[t].push(i)})),o}(n,o,l):xe},Ce="iconifyFinder"+Date.now(),_e="iconifyData"+Date.now();function Ie(e,n,t,r){var o;try{o=document.createElement("span")}catch(gn){return r?"":null}var i=z(t,Z(j,n)),a=e.element,c=e.finder,s=e.name,l=a?a.getAttribute("class"):"",u=c?c.classFilter(l?l.split(/\s+/):[]):[],f='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="'+("iconify iconify--"+s.prefix+(""===s.provider?"":" iconify--"+s.provider)+(u.length?" "+u.join(" "):""))+'">'+A(i.body)+"</svg>";o.innerHTML=f;var d=o.childNodes[0],v=d.style,p=i.attributes;if(Object.keys(p).forEach((function(e){d.setAttribute(e,p[e])})),i.inline&&(v.verticalAlign="-0.125em"),a){for(var h=a.attributes,g=0;g<h.length;g++){var m=h.item(g);if(m){var b=m.name;if("class"!==b&&"style"!==b&&void 0===p[b])try{d.setAttribute(b,m.value)}catch(gn){}}}for(var y=a.style,x=0;x<y.length;x++){var w=y[x];v[w]=y[w]}}if(c){var O={name:s,status:"loaded",customisations:n};d[_e]=O,d[Ce]=c}var S=r?o.innerHTML:d;return a&&a.parentNode?a.parentNode.replaceChild(d,a):o.removeChild(d),S}var Ae=[];function Ne(e){for(var n=0;n<Ae.length;n++){var t=Ae[n];if(("function"===typeof t.node?t.node():t.node)===e)return t}}function Pe(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=Ne(e);return t?(t.temporary&&(t.temporary=n),t):(t={node:e,temporary:n},Ae.push(t),t)}function Le(){return Ae}var Re=null,Te={childList:!0,subtree:!0,attributes:!0};function Fe(e){if(e.observer){var n=e.observer;n.pendingScan||(n.pendingScan=setTimeout((function(){delete n.pendingScan,Re&&Re(e)})))}}function De(e,n){if(e.observer){var t=e.observer;if(!t.pendingScan)for(var r=0;r<n.length;r++){var o=n[r];if(o.addedNodes&&o.addedNodes.length>0||"attributes"===o.type&&void 0!==o.target[Ce])return void(t.paused||Fe(e))}}}function Ue(e,n){e.observer.instance.observe(n,Te)}function Ve(e){var n=e.observer;if(!n||!n.instance){var t="function"===typeof e.node?e.node():e.node;t&&(n||(n={paused:0},e.observer=n),n.instance=new MutationObserver(De.bind(null,e)),Ue(e,t),n.paused||Fe(e))}}function Be(){Le().forEach(Ve)}function He(e){if(e.observer){var n=e.observer;n.pendingScan&&(clearTimeout(n.pendingScan),delete n.pendingScan),n.instance&&(n.instance.disconnect(),delete n.instance)}}function We(e){var n=null!==Re;Re!==e&&(Re=e,n&&Le().forEach(He)),n?Be():function(e){var n=document;"complete"===n.readyState||"loading"!==n.readyState&&!n.documentElement.doScroll?e():(n.addEventListener("DOMContentLoaded",e),window.addEventListener("load",e))}(Be)}function qe(e){(e?[e]:Le()).forEach((function(e){if(e.observer){var n=e.observer;if(n.paused++,!(n.paused>1)&&n.instance)n.instance.disconnect()}else e.observer={paused:1}}))}function Je(e){(e?[e]:Le()).forEach((function(e){if(e.observer){var n=e.observer;if(n.paused&&(n.paused--,!n.paused)){var t="function"===typeof e.node?e.node():e.node;if(!t)return;n.instance?Ue(e,t):Ve(e)}}else Ve(e)}))}function $e(e){var n=Pe(e,arguments.length>1&&void 0!==arguments[1]&&arguments[1]);return Ve(n),n}function Ge(e){var n=Ne(e);n&&(He(n),function(e){Ae=Ae.filter((function(n){var t="function"===typeof n.node?n.node():n.node;return e!==t}))}(e))}var Xe=[];function Ye(e){return"string"===typeof e&&(e=d(e)),null!==e&&v(e)?e:null}function Ke(e){var n=[];Xe.forEach((function(t){var r=t.find(e);Array.prototype.forEach.call(r,(function(e){var r=e;if(void 0===r[Ce]||r[Ce]===t){var o=Ye(t.name(r));if(null!==o){r[Ce]=t;var i={element:r,finder:t,name:o};n.push(i)}}}))}));var t=e.querySelectorAll("svg.iconify");return Array.prototype.forEach.call(t,(function(e){var t=e,r=t[Ce],o=t[_e];if(r&&o){var i=Ye(r.name(t));if(null!==i){var a,c=!1;if(i.prefix!==o.name.prefix||i.name!==o.name.name?c=!0:(a=r.customisations(t),function(e,n){var t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return!1;for(var o=0;o<t.length;o++){var i=t[o];if(n[i]!==e[i])return!1}return!0}(o.customisations,a)||(c=!0)),c){var s={element:t,finder:r,name:i,customisations:a};n.push(s)}}}})),n}var Qe=!1;function en(){Qe||(Qe=!0,setTimeout((function(){Qe&&(Qe=!1,tn())})))}var nn=function(e,n){return null!==e&&null!==n&&e.name===n.name&&e.prefix===n.prefix};function tn(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Qe=!1;var t=Object.create(null);(e?[e]:Le()).forEach((function(e){var r="function"===typeof e.node?e.node():e.node;if(r&&r.querySelectorAll){var o=!1,i=!1;Ke(r).forEach((function(n){var r=n.element,a=n.name,c=a.provider,s=a.prefix,l=a.name,u=r[_e];if(void 0!==u&&nn(u.name,a))switch(u.status){case"missing":return;case"loading":if(Ee({provider:c,prefix:s,name:l}))return void(o=!0)}var f=g(c,s);if(void 0===f.icons[l]){if(f.missing[l])return u={name:a,status:"missing",customisations:{}},void(r[_e]=u);if(!Ee({provider:c,prefix:s,name:l})){void 0===t[c]&&(t[c]=Object.create(null));var d=t[c];void 0===d[s]&&(d[s]=Object.create(null)),d[s][l]=!0}u={name:a,status:"loading",customisations:{}},r[_e]=u,o=!0}else{!i&&e.observer&&(qe(e),i=!0);var v=void 0!==n.customisations?n.customisations:n.finder.customisations(r);Ie(n,v,b(f,l))}})),e.temporary&&!o?Ge(r):n&&o?$e(r,!0):i&&e.observer&&Je(e)}})),Object.keys(t).forEach((function(e){var n=t[e];Object.keys(n).forEach((function(t){ze(Object.keys(n[t]).map((function(n){return{provider:e,prefix:t,name:n}})),en)}))}))}var rn=/[\s,]+/;function on(e,n){return e.hasAttribute(n)}function an(e,n){return e.getAttribute(n)}var cn=["inline","hFlip","vFlip"],sn=["width","height"],ln="iconify",un="iconify-inline",fn="i."+ln+", span."+ln+", i."+un+", span."+un,dn={find:function(e){return e.querySelectorAll(fn)},name:function(e){return on(e,"data-icon")?an(e,"data-icon"):null},customisations:function(e){var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{inline:!1},r=e.getAttribute("class");if(-1!==(r?r.split(/\s+/):[]).indexOf(un)&&(t.inline=!0),on(e,"data-rotate")){var o=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=e.replace(/^-?[0-9.]*/,"");function r(e){for(;e<0;)e+=4;return e%4}if(""===t){var o=parseInt(e);return isNaN(o)?0:r(o)}if(t!==e){var i=0;switch(t){case"%":i=25;break;case"deg":i=90}if(i){var a=parseFloat(e.slice(0,e.length-t.length));return isNaN(a)?0:(a/=i)%1===0?r(a):0}}return n}(an(e,"data-rotate"));o&&(t.rotate=o)}return on(e,"data-flip")&&(n=t,an(e,"data-flip").split(rn).forEach((function(e){switch(e.trim()){case"horizontal":n.hFlip=!0;break;case"vertical":n.vFlip=!0}}))),on(e,"data-align")&&function(e,n){n.split(rn).forEach((function(n){var t=n.trim();switch(t){case"left":case"center":case"right":e.hAlign=t;break;case"top":case"middle":case"bottom":e.vAlign=t;break;case"slice":case"crop":e.slice=!0;break;case"meet":e.slice=!1}}))}(t,an(e,"data-align")),cn.forEach((function(n){if(on(e,"data-"+n)){var r=function(e,n){var t=e.getAttribute(n);return t===n||"true"===t||""!==t&&"false"!==t&&null}(e,"data-"+n);"boolean"===typeof r&&(t[n]=r)}})),sn.forEach((function(n){if(on(e,"data-"+n)){var r=an(e,"data-"+n);""!==r&&(t[n]=r)}})),t},classFilter:function(e){var n=[];return e.forEach((function(e){"iconify"!==e&&""!==e&&"iconify--"!==e.slice(0,9)&&n.push(e)})),n}};function vn(e,n,t){var r=x(e);return r?Ie({name:d(e)},Z(j,"object"===typeof n?n:{}),r,t):null}if("undefined"!==typeof document&&"undefined"!==typeof window){!function(){if(document.documentElement)return Pe(document.documentElement);Ae.push({node:function(){return document.documentElement}})}(),function(e){-1===Xe.indexOf(e)&&Xe.push(e)}(dn);var pn=window;if(void 0!==pn.IconifyPreload){var hn=pn.IconifyPreload,gn="Invalid IconifyPreload syntax.";"object"===typeof hn&&null!==hn&&(hn instanceof Array?hn:[hn]).forEach((function(e){try{("object"!==typeof e||null===e||e instanceof Array||"object"!==typeof e.icons||"string"!==typeof e.prefix||!O(e))&&console.error(gn)}catch(n){console.error(gn)}}))}setTimeout((function(){We(tn),tn()}))}if(Y("",le),"undefined"!==typeof document&&"undefined"!==typeof window){$.store=function(e,n){function t(t){if(!F[t])return!1;var r=H(t);if(!r)return!1;var o=V[t].shift();if(void 0===o&&!W(r,t,(o=U[t])+1))return!1;try{var i={cached:Math.floor(Date.now()/T),provider:e,data:n};r.setItem(P+o.toString(),JSON.stringify(i))}catch(gn){return!1}return!0}D||J(),Object.keys(n.icons).length&&(n.not_found&&delete(n=Object.assign({},n)).not_found,t("local")||t("session"))},J();var mn=window;if(void 0!==mn.IconifyProviders){var bn=mn.IconifyProviders;if("object"===typeof bn&&null!==bn)for(var yn in bn){var xn="IconifyProviders["+yn+"] is invalid.";try{var wn=bn[yn];if("object"!==typeof wn||!wn||void 0===wn.resources)continue;re(yn,wn)||console.error(xn)}catch(jn){console.error(xn)}}}}var On={_api:{getAPIConfig:oe,setAPIModule:Y,sendAPIQuery:ye,setFetch:function(e){se=e},getFetch:function(){return se},listAPIProviders:function(){return Object.keys(ee)},mergeParams:ie},addAPIProvider:re,loadIcons:ze,loadIcon:function(e){return new Promise((function(n,t){var r="string"===typeof e?d(e):e;ze([r||e],(function(o){if(o.length&&r){var i=b(g(r.provider,r.prefix),r.name);if(i)return void n(i)}t(e)}))}))},iconExists:function(e){return null!==x(e)},getIcon:function(e){var n=x(e);return n?(0,r.Z)({},n):null},listIcons:function(e,n){var t=[];return("string"===typeof e?[e]:Object.keys(p)).forEach((function(e){("string"===typeof e&&"string"===typeof n?[n]:void 0===p[e]?[]:Object.keys(p[e])).forEach((function(n){var r=g(e,n),o=Object.keys(r.icons).map((function(t){return(""!==e?"@"+e+":":"")+n+":"+t}));t=t.concat(o)}))})),t},addIcon:w,addCollection:O,shareStorage:function(){try{var e=window||self;e&&!e._iconifyStorage&&(e._iconifyStorage={version:1,storage:p})}catch(gn){}},replaceIDs:A,calculateSize:M,buildIcon:function(e,n){return z(a(e),n?Z(j,n):j)},getVersion:function(){return"2.2.1"},renderSVG:function(e,n){return vn(e,n,!1)},renderHTML:function(e,n){return vn(e,n,!0)},renderIcon:function(e,n){var t=x(e);return t?z(t,Z(j,"object"===typeof n?n:{})):null},scan:function(e){e?function(e){var n=Ne(e);n?tn(n):tn({node:e,temporary:!0},!0)}(e):tn()},observe:$e,stopObserving:Ge,pauseObserver:function(e){if(e){var n=Ne(e);n&&qe(n)}else qe()},resumeObserver:function(e){if(e){var n=Ne(e);n&&Je(n)}else Je()},enableCache:function(e,n){G(e,!1!==n)},disableCache:function(e){G(e,!0)}};try{void 0===self.Iconify&&(self.Iconify=On)}catch(gn){}}}]);
|
|
3
|
+
//# sourceMappingURL=7973.7d559f93.chunk.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[8283],{39816:function(n,e,t){t.d(e,{Z:function(){return s}});var r=t(33028),i=t(33665),o=t(29996),a=t(37574);function s(n){var e=Object.assign({},((0,i.Z)(n),n));return(0,a.jsx)(o.Z,(0,r.Z)({className:"bottom-button",variant:"contained",color:"primary"},e))}},35982:function(n,e,t){t.r(e),t.d(e,{default:function(){return P}});var r,i,o,a,s=t(71171),l=t(32723),c=t(34795),u=t(96234),d=t(30969),p=t(16380),f=t(38361),m=t(26022),h=t(1986),g=t(24891),x=t(67615),b=t(94308),v=t(65248),Z=(0,p.Z)(v.Z)(r||(r=(0,s.Z)(["\n && .result-footer {\n height: 120px;\n > div {\n flex-wrap: wrap;\n }\n }\n"]))),y=t(99042),k=t(66744),w=t(39816),j=t(23938),S=t(38507),N=t(48952),T=t(37574);function P(n){var e=n.onPrevious,t=(0,m.PE)().t,r=(0,d.useState)(!1),i=(0,u.Z)(r,2),o=i[0],a=i[1],s=(0,d.useState)("starting"),p=(0,u.Z)(s,2),v=p[0],k=p[1],P=(0,d.useState)(),L=(0,u.Z)(P,2),C=L[0],E=L[1],U=(0,j.y0)().blocklet,q=(0,d.useState)(""),B=(0,u.Z)(q,2),O=B[0],A=B[1],F=(0,S.tX)("fromLauncher"),H=!["starting","running"].includes(v),I="starting"===v,M={stopped:t("blocklet.start"),starting:t("blocklet.starting"),running:t("blocklet.open")},X=function(){var n=new URL(window.location.href).searchParams.get("redirect");window.location.href=n?new URL(n,O).href:O},D=function(){var n=(0,c.Z)((0,l.Z)().mark((function n(){var e,r,i,o,s;return(0,l.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a(!0),k("starting"),n.prev=2,n.next=5,y.Z.post("/blocklet/start",{fromSetup:!0});case 5:return n.next=7,N.Z.getBlocklet({input:{did:U.meta.did}});case 7:e=n.sent,r=e.blocklet,i=(void 0===r?{}:r).status,a(!1),k(i),E("running"===i?null:t("setup.complete.notRunning")),n.next=23;break;case 16:n.prev=16,n.t0=n.catch(2),s=(null===n.t0||void 0===n.t0||null===(o=n.t0.response)||void 0===o?void 0:o.data)||n.t0.message,h.Z.error(s),a(!1),k("stopped"),E(s);case 23:case"end":return n.stop()}}),n,null,[[2,16]])})));return function(){return n.apply(this,arguments)}}();(0,d.useEffect)((function(){k(U.status),["starting","running"].includes(U.status)||D()}),[]),(0,d.useEffect)((function(){var n=function(){var n=(0,c.Z)((0,l.Z)().mark((function n(){var e;return(0,l.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,x.evaluateURLs)(U.site.domainAliases.map((function(n){return(0,g.Sk)(n.value,S.Bq)})));case 2:(e=n.sent).length>0&&A(e[0].url);case 4:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}();O||n()}),[U,O]);var G=localStorage.getItem("blocklet-server-url"),J=I||!O;return F&&!J&&(H?D():X()),(0,T.jsx)(_,{children:(0,T.jsx)(Z,{variant:C?"error":"success",title:t(C?"setup.complete.failedTitle":"setup.complete.title"),footer:(0,T.jsxs)(R,{children:[H&&(0,T.jsx)(w.Z,{variant:"outlined",disabled:o,onClick:function(){return e()},children:t("setup.previous")}),F?(0,T.jsxs)(z,{rel:"noreferrer",children:[(0,T.jsx)(b.Z,{size:16,style:{marginRight:14}})," ",t("common.redirecting")]}):(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(w.Z,{style:{marginLeft:H?24:0},disabled:o||I,onClick:function(){return H?D():X()},loading:J,children:M[v]||M.stopped}),("running"===v||C)&&!!G&&(0,T.jsx)(f.Z,{width:"100%",mt:2,children:(0,T.jsx)("a",{href:G,target:"_blank",rel:"noopener noreferrer",className:"back-to-server-link",children:t("setup.complete.backToServer")})}),C&&(0,T.jsx)(f.Z,{className:"error-message",fontSize:14,color:"#888",mt:1,children:C})]})]})})})}var _=(0,p.Z)(k.Z)(i||(i=(0,s.Z)(["\n justify-content: center;\n .icon-success {\n width: 64px;\n height: 64px;\n color: ",";\n }\n .back-to-server-link {\n color: ",";\n }\n .error-message {\n color: ",";\n height: 15em;\n overflow: hidden;\n overflow-y: scroll;\n }\n"])),(function(n){return n.theme.palette.success.main}),(function(n){return n.theme.palette.primary.main}),(function(n){return n.theme.palette.error.main}));P.defaultProps={onPrevious:function(){}};var R=(0,p.Z)(f.Z)(o||(o=(0,s.Z)(["\n width: 100%;\n margin-top: auto;\n padding-top: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n .bottom-button {\n min-width: 200px;\n }\n "," {\n .bottom-button {\n width: 100%;\n }\n }\n"])),(function(n){return n.theme.breakpoints.down("md")})),z=p.Z.a(a||(a=(0,s.Z)(["\n display: flex;\n justify-content: center;\n align-items: center;\n height: 36px;\n color: ",";\n"])),(function(n){return n.theme.palette.primary.main}))},66744:function(n,e,t){var r,i=t(71171),o=t(16380),a=t(44876),s=(0,o.Z)(a.Z)(r||(r=(0,i.Z)(["\n display: flex;\n flex-direction: column;\n padding-bottom: 16px;\n "," {\n padding-top: 34px;\n padding-bottom: 34px;\n }\n .header {\n width: 100%;\n margin-bottom: 34px;\n "," {\n margin-bottom: 64px;\n }\n }\n .container-main {\n position: relative;\n flex: 1;\n width: 100%;\n }\n .container-inner {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n overflow-y: auto;\n }\n"])),(function(n){return n.theme.breakpoints.up("md")}),(function(n){return n.theme.breakpoints.up("md")}));e.Z=s},44876:function(n,e,t){t.d(e,{Z:function(){return p}});var r,i=t(71171),o=t(33028),a=t(59740),s=t(16380),l=t(24974),c=t.n(l),u=t(37574),d=["children"];function p(n){var e=n.children,t=(0,a.Z)(n,d);return(0,u.jsx)(f,(0,o.Z)((0,o.Z)({},t),{},{children:e}))}p.propTypes={children:c().any.isRequired};var f=s.Z.div(r||(r=(0,i.Z)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n height: 100%;\n\n .header {\n text-align: center;\n }\n\n .body {\n display: flex;\n flex-direction: column;\n align-items: center;\n margin-top: 30px;\n width: 100%;\n min-height: 200px;\n flex: 1;\n\n "," {\n padding: 24px;\n }\n\n "," {\n padding: 0 16px 16px;\n }\n }\n\n .footer {\n display: flex;\n justify-content: center;\n\n "," {\n padding-bottom: 34px;\n }\n\n "," {\n margin-top: auto;\n padding-bottom: 10px;\n }\n }\n"])),(function(n){return n.theme.breakpoints.up("md")}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.breakpoints.up("sm")}),(function(n){return n.theme.breakpoints.down("md")}))},65248:function(n,e,t){var r,i=t(71171),o=t(33028),a=t(59740),s=t(24974),l=t.n(s),c=t(16380),u=t(38996),d=t(88581),p=t(94308),f=t(72973),m=t(37574),h=["variant","title","subTitle","footer"];function g(n){var e,t=n.variant,r=n.title,i=n.subTitle,s=n.footer,l=(0,a.Z)(n,h);switch(t){case"error":e=d.default;break;case"info":e=f.Z;break;case"loading":e=p.Z;break;default:e=u.default}return(0,m.jsx)(x,(0,o.Z)((0,o.Z)({variant:t},l),{},{children:(0,m.jsxs)("div",{className:"result-body",children:[(0,m.jsx)("span",{className:"result-icon color-".concat(t),children:(0,m.jsx)(e,{})}),(0,m.jsx)("div",{className:"result-title color-".concat(t," ").concat(r?"":"ele-hide"),children:r}),(0,m.jsx)("div",{className:"result-sub-title ".concat(i?"":"ele-hide"),children:i}),s&&(0,m.jsx)("div",{className:"result-footer",children:s})]})}))}g.propTypes={variant:l().oneOf(["success","error","info","loading"]),title:l().string,subTitle:l().any,footer:l().any},g.defaultProps={variant:"success",title:"",subTitle:"",footer:null},e.Z=g;var x=c.Z.div(r||(r=(0,i.Z)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n width: 100%;\n height: 100%;\n\n .result-body {\n padding: 0 14px;\n max-width: 500px;\n text-align: center;\n margin-top: -64px;\n }\n\n .result-icon {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 24px;\n width: 48px;\n height: 48px;\n border-radius: 100%;\n color: ",";\n transition: all ease 0.3s;\n &.color-success {\n background-color: ",";\n }\n &.color-error {\n background-color: ",";\n }\n &.color-info {\n background-color: ",";\n }\n }\n\n .result-title {\n height: 34px;\n font-size: 21px;\n margin-bottom: 8px;\n font-weight: bolder;\n transition: all ease 0.3s;\n transition-delay: 0.2s;\n &.color-success {\n color: ",";\n }\n &.color-error {\n color: ",";\n }\n &.color-info {\n color: ",";\n }\n &.ele-hide {\n height: 0;\n opacity: 0;\n margin-bottom: 0;\n }\n }\n\n .result-sub-title {\n margin: 0 auto;\n min-height: 17px;\n color: ",";\n font-size: 14px;\n line-height: 1.21em; // 0.01\u53ef\u4ee5\u89e3\u51b3\u89c6\u7f51\u819c\u5c4f\u8f7b\u5fae\u504f\u79fb\u95ee\u9898\n transition: all ease 0.3s;\n transition-delay: 0.2s;\n word-break: break-word;\n &.ele-hide {\n line-height: 0;\n opacity: 0;\n min-height: 0;\n }\n }\n\n .result-footer {\n padding-top: 24px;\n transition: all ease 0.3s;\n transition-delay: 0.2s;\n }\n"])),(function(n){return n.theme.palette.common.white}),(function(n){return n.theme.palette.success.main}),(function(n){return n.theme.palette.error.main}),(function(n){return n.theme.palette.primary.main}),(function(n){return n.theme.palette.success.main}),(function(n){return n.theme.palette.error.main}),(function(n){return n.theme.palette.primary.main}),(function(n){return n.theme.palette.grey[700]}))},72973:function(n,e,t){var r=t(71600);e.Z=void 0;var i=r(t(48035)),o=t(37574),a=(0,i.default)([(0,o.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,o.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");e.Z=a}}]);
|
|
2
|
+
//# sourceMappingURL=8283.f3a42d0f.chunk.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[8944],{38944:function(e,n,t){t.r(n),t.d(n,{default:function(){return an}});var r,o=t(71171),i=t(16380),a=t(30969),c=t(30734),s=t(238),l=t(38361),u=t(33359),d=t(94308),p=t(51711),f=t(26022),v=t(19865),m=t(7017),h=t(20244),g=t(24891),x=t(43820),Z=t(94282),b=t(33028),k=t(32723),y=t(34795),w=t(96234),E=t(59740),P=t(24974),C=t.n(P),j=t(86822),D=t(17708),B=t(94551),L=t(48082),S=t(75295),_=t(27265),R=t(2689),T=t(37973),O=t(93310),A=t(86008),N=t(76492),U=t(97517),I=t(49884),G=t(18877),K=t(29996),z=t(59505),F=t(1986),M=t(90617),V=t(41395),q=t(8479),X=t(55008),Y=t(45008),H=t(37574),W=["blocklet","onStart","onComplete","variant","hasPermission","useBlockletUrlEvaluation"];function Q(e){var n,t,r,o,i=e.blocklet,s=e.onStart,l=e.onComplete,p=e.variant,v=e.hasPermission,h=e.useBlockletUrlEvaluation,x=(0,E.Z)(e,W),Z=(0,c.useNavigate)(),P=(0,V.h6)(),C=(0,a.useState)(null),Q=(0,w.Z)(C,2),$=Q[0],ee=Q[1],ne=(0,a.useState)(null),te=(0,w.Z)(ne,2),re=te[0],oe=te[1],ie=(0,a.useState)(!1),ae=(0,w.Z)(ie,2),ce=ae[0],se=ae[1],le=(0,a.useState)(null),ue=(0,w.Z)(le,2),de=ue[0],pe=ue[1],fe=(0,a.useContext)(f.RD).t,ve=(0,D.Z)("skip-blocklet-setup",!1),me=(0,w.Z)(ve,1)[0],he=h(i),ge=he.loading,xe=he.recommendedUrl,Ze=(0,Y.y0)().nftState,be=(0,m.isInProgress)(i.status),ke=(null===i||void 0===i||null===(n=i.controller)||void 0===n||null===(t=n.status)||void 0===t?void 0:t.value)===z.BLOCKLET_CONTROLLER_STATUS.suspended;null!==Ze&&void 0!==Ze&&Ze.expired||(null===i||void 0===i||null===(r=i.controller)||void 0===r||null===(o=r.status)||void 0===o?void 0:o.reason)!==z.SUSPENDED_REASON.expired||(ke=!1);var ye=P.inService,we=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,y.Z)((0,k.Z)().mark((function r(){var o,a,c,d,p;return(0,k.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(o=function(){var t=(0,y.Z)((0,k.Z)().mark((function t(r){var o,a,c,u,d,p,f,v,h,x;return(0,k.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s({action:e,blocklet:i}),se(!0),oe(e),o=!1,t.prev=4,"remove"!==e){t.next=10;break}return t.next=8,n(r);case 8:case 25:case 32:t.next=37;break;case 10:if("start"!==e){t.next=27;break}if((0,m.hasRunnableComponent)(i)){t.next=14;break}return F.Z.error(fe("blocklet.noComponent")),t.abrupt("return");case 14:if(ye||me||null!==(a=i.settings)&&void 0!==a&&a.initialized||i.mode===z.BLOCKLET_MODES.DEVELOPMENT){t.next=21;break}return c=(0,M.RU)(P.info),(u=new URL(xe)).searchParams.set("serverUrl",c),window.open(u.href),l({action:e,blocklet:i}),t.abrupt("return");case 21:return d=i.children.filter((function(e){return!(0,m.isInProgress)(e.status)&&"running"!==e.status})).map((function(e){return e.meta.did})),p={did:i.meta.did,componentDids:d},t.next=25,n({input:p});case 27:if(!["stop","restart","reload"].includes(e)){t.next=34;break}return f=i.children.filter((function(e){return"running"===e.status})).map((function(e){return e.meta.did})),v={did:i.meta.did,componentDids:f},t.next=32,n({input:v});case 34:return h={did:i.meta.did},t.next=37,n({input:h});case 37:if("remove"!==e){t.next=41;break}o=!0,t.next=43;break;case 41:return t.next=43,(0,g._v)(1e3);case 43:"reload"===e&&F.Z.success(fe("blocklet.reloadSuccess")),pe(null),l({action:e,blocklet:i}),t.next=53;break;case 48:throw t.prev=48,t.t0=t.catch(4),x="Blocklet ".concat(e," failed: ").concat((0,g.Z)(t.t0)),l({action:e,blocklet:i,error:new Error(x)}),new Error(x);case 53:return t.prev=53,o||se(!1),t.finish(53);case 56:case"end":return t.stop()}}),t,null,[[4,48,53,56]])})));return function(e){return t.apply(this,arguments)}}(),a=function(){se(!1),pe(null)},c=(0,m.getDisplayName)(i,!0),d=i.mode===z.BLOCKLET_MODES.DEVELOPMENT?{description:function(){return(0,H.jsx)(u.Z,{component:"div",children:(0,H.jsx)(u.Z,{gutterBottom:!0,children:fe("blocklet.action.removeApplicationDescription")})})},params:{removeType:"complete"}}:{description:function(e,n){return(0,H.jsxs)(u.Z,{component:"div",children:[(0,H.jsx)(u.Z,{gutterBottom:!0,children:fe("blocklet.action.removeApplicationDescription")}),(0,H.jsxs)(U.Z,{name:"removeType",value:e.removeType,onChange:function(t){return n((0,b.Z)((0,b.Z)({},e),{},{removeType:t.target.value}))},children:[(0,H.jsx)(I.Z,{value:"backup",control:(0,H.jsx)(N.Z,{}),label:fe("blocklet.action.removeApplicationAfterBackup")}),(0,H.jsx)(I.Z,{value:"complete",control:(0,H.jsx)(N.Z,{}),label:fe("blocklet.action.removeApplicationComplete")})]})]})},params:{removeType:"backup"}},p={stop:{title:"".concat(fe("common.stop")," ").concat(c),description:fe("blocklet.action.stopDescription"),confirm:fe("blocklet.action.confirmStop"),cancel:fe("common.cancel"),onConfirm:o,onCancel:a},restart:{title:"".concat(fe("common.restart")," ").concat(c),description:fe("blocklet.action.restartDescription"),confirm:fe("blocklet.action.confirmRestart"),cancel:fe("common.cancel"),onConfirm:o,onCancel:a},remove:(0,b.Z)({title:"".concat(fe("common.remove")," ").concat(c),confirm:fe("blocklet.action.confirmRemove"),cancel:fe("common.cancel"),onConfirm:o,onCancel:a},d),cancelDownload:{title:"".concat(fe("common.cancel")),description:fe("blocklet.action.cancelDownloadDescription",{name:c}),confirm:fe("common.confirm"),cancel:fe("common.cancel"),onConfirm:o,onCancel:a}},!t){r.next=9;break}pe(p[e]),r.next=11;break;case 9:return r.next=11,o();case 11:case"end":return r.stop()}}),r)})))},Ee=Boolean($),Pe=function(){var e=(0,y.Z)((0,k.Z)().mark((function e(n,t){return(0,k.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{t.stopPropagation(),t.preventDefault()}catch(r){}if("function"!==typeof n.handler){e.next=18;break}return e.prev=2,se(!0),oe(n.action),e.next=7,n.handler();case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),console.error("Blocklet ".concat(n.name," failed: "),e.t0);case 12:return e.prev=12,se(!1),ee(null),e.finish(12);case 16:e.next=19;break;case 18:ee(null);case 19:case"end":return e.stop()}}),e,null,[[2,9,12,16]])})));return function(n,t){return e.apply(this,arguments)}}(),Ce=!ye&&(0,m.isDeletableBlocklet)(i)?{action:"remove",icon:X.Z.Remove,name:fe("common.remove"),handler:we("remove",function(){var e=(0,y.Z)((0,k.Z)().mark((function e(n){return(0,k.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("backup"!==n.removeType){e.next=4;break}return e.next=4,P.api.backupBlocklet({input:{appDid:i.appDid,to:"disk"}});case 4:return e.next=6,P.api.deleteBlocklet({input:{did:i.meta.did,keepData:!1}});case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),!0),disabled:be}:null,je={action:"remove",icon:X.Z.Remove,name:fe("common.cancel"),handler:we("cancelDownload",P.api.cancelDownloadBlocklet,!0)},De=(0,m.getAppMissingConfigs)(i),Be=[{action:"start",icon:X.Z.Start,name:fe("common.start"),handler:we("start",P.api.startBlocklet),disabled:ke||i.children.every((function(e){return"running"===e.status}))||(0,g.XN)(i.status)||ge||be},{action:"stop",icon:X.Z.Stop,name:fe("common.stop"),handler:we("stop",P.api.stopBlocklet,!0),disabled:!["running","starting"].includes(i.status)},{action:"restart",icon:X.Z.Restart,name:fe("common.restart"),handler:we("restart",P.api.restartBlocklet,!0),disabled:ke||"running"!==i.status},{action:"reload",icon:X.Z.Reload,name:fe("common.reload"),handler:we("reload",P.api.reloadBlocklet),disabled:ke||"running"!==i.status},(0,g.XN)(i.status)?je:Ce,{separator:!0},{onlyInMenu:!0,action:"config",icon:X.Z.Config,name:fe("common.config"),handler:function(){Z("/blocklets/".concat(i.meta.did,"/configuration"))},disabled:(0,g.XN)(i.status)},{onlyInMenu:!0,action:"team",icon:X.Z.Group,name:fe("common.manageTeam"),handler:function(){Z("/blocklets/".concat(i.meta.did,"/members"))},disabled:(0,g.XN)(i.status)},{onlyInMenu:!0,action:"log",icon:X.Z.Log,name:fe("common.log"),handler:function(){Z("/logs/blocklet-".concat(i.meta.did))},disabled:(0,g.XN)(i.status)}].filter(Boolean);return"menu"===p?(0,H.jsxs)(J,{"data-cy":"blocklet-actions",children:[(0,H.jsx)(B.Z,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":i.meta.did,onClick:function(e){try{e.stopPropagation(),e.preventDefault()}catch(n){}ee(e.currentTarget)},size:"small",disabled:!v||!(0,g.XN)(i.status)&&ce,children:(0,H.jsx)(T.Z,{})}),(0,H.jsxs)(L.Z,{id:"actions-menu",anchorEl:$,keepMounted:!0,open:Ee,onClose:function(e){try{e.stopPropagation(),e.preventDefault()}catch(n){}ee(null)},PaperProps:{},children:[De.length>0&&(0,H.jsxs)(G.Z,{style:{maxWidth:"400px"},severity:"error",children:[fe("blocklet.config.missingRequired"),(0,H.jsx)("br",{}),(0,H.jsx)(j.rU,{to:"/blocklets/".concat(i.meta.did,"/components"),children:fe("blocklet.config.gotoFix")})]}),Be.map((function(e,n){return e.separator?(0,H.jsx)(S.Z,{},"separator-".concat(n)):(0,H.jsxs)(R.Z,{dense:!0,onClick:function(n){return Pe(e,n)},disabled:ce||e.disabled,"data-cy":"".concat(e.action,"-blocklet"),children:[(0,H.jsx)(O.Z,{style:{minWidth:24},children:re===e.action&&ce?(0,H.jsx)(d.Z,{size:16,sx:{marginRight:1}}):(0,H.jsx)(e.icon,{fontSize:"small"})}),(0,H.jsx)(A.Z,{primary:e.name})]},e.name)}))]}),de&&(0,H.jsx)(q.Z,{title:de.title,description:de.description,confirm:de.confirm,cancel:de.cancel,params:de.params,onConfirm:de.onConfirm,onCancel:de.onCancel})]}):(0,H.jsxs)(J,(0,b.Z)((0,b.Z)({"data-cy":"blocklet-actions"},x),{},{children:[(0,H.jsx)(_.Z,{children:Be.filter((function(e){return!e.separator&&!e.onlyInMenu})).map((function(e){return(0,H.jsxs)(K.Z,{title:e.name,"data-cy":"".concat(e.action,"-blocklet"),onClick:function(){return Pe(e)},disabled:Boolean(e.disabled)||ce,children:[re===e.action&&ce?(0,H.jsx)(d.Z,{size:16,sx:{marginRight:1}}):(0,H.jsx)(e.icon,{}),(0,H.jsx)("span",{className:"blocklet-action-text",children:e.name})]},e.name)}))}),de&&(0,H.jsx)(q.Z,{title:de.title,description:de.description,confirm:de.confirm,cancel:de.cancel,params:de.params,onConfirm:de.onConfirm,onCancel:de.onCancel})]}))}Q.propTypes={blocklet:C().object.isRequired,onStart:C().func.isRequired,onComplete:C().func.isRequired,variant:C().oneOf(["menu","group"]),hasPermission:C().bool,useBlockletUrlEvaluation:C().func},Q.defaultProps={variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:function(){var e,n;return{loading:!1,recommendedUrl:null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.href}}};var J=i.Z.div(r||(r=(0,o.Z)(["\n display: flex;\n align-items: center;\n\n @media (max-width: ","px) {\n .MuiButton-root {\n padding: 4px;\n font-size: 10px;\n }\n }\n"])),(function(e){return e.theme.breakpoints.values.sm})),$=t(84802),ee=t(23299),ne=t(26328),te=t(77370),re=function(e){var n={},t=null;return(0,m.forEachBlockletSync)(e,(function(e){n[e.meta.bundleDid]?t=(0,m.getDisplayName)(e,!0):e.meta.bundleDid&&(n[e.meta.bundleDid]=!0)})),t},oe=function(e,n,t){var r=e.hostname,o=e.href;if(!n)return o;if(t){var i,a=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!a)return o;var c=a[0],s=(((null===(i=n.site)||void 0===i?void 0:i.domainAliases)||[]).map((function(e){return e.value})).filter(Boolean).find((function(e){return e.endsWith(h.DEFAULT_DID_DOMAIN)}))||"").replace(".".concat(h.DEFAULT_DID_DOMAIN),"");return s?o.replace(r,"".concat(s,"-").concat(c,".").concat(h.DEFAULT_IP_DOMAIN_SUFFIX)):o}return o.replace(n.meta.bundleDid,n.appPid)};function ie(){var e=(0,f.PE)().t,n=(0,te.T)().api,t=(0,Y.y0)().blocklet,r=(0,V.h6)().inService,o=(0,a.useState)(!1),i=(0,w.Z)(o,2),c=i[0],s=i[1],u=(0,a.useState)(5),d=(0,w.Z)(u,2),p=d[0],v=d[1],x=t&&t.structVersion!==h.APP_STRUCT_VERSION;return[x&&(0,H.jsxs)(ee.Z,{type:"warning",style:{margin:"12px 0"},children:[(0,H.jsxs)(l.Z,{display:"flex",alignItems:"center",children:[(0,H.jsx)(K.Z,{variant:"contained",size:"small",color:"primary",onClick:function(){return function(){try{if("running"===t.status)return void F.Z.error(e("blocklet.migrate.tip.running"));var n=re(t);if(n)return void F.Z.error(e("blocklet.migrate.tip.duplicate",{name:n}));s(!0)}catch(r){F.Z.error((0,g.Z)(r))}}()},style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),(0,H.jsx)("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map((function(n){return(0,H.jsx)(l.Z,{display:"flex",alignItems:"center",children:e("blocklet.migrate.intro.".concat(n))},n)}))]},"alert"),t&&(0,H.jsx)(ne.Z,{popup:!0,open:c,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:n.get,checkTimeout:3e5,onSuccess:function(){var e=oe(window.location,t,r);setTimeout((function(){window.location.href=e}),5e3),v(5),setInterval((function(){v((function(e){return e-1}))}),1e3)},extraParams:{appDid:t.appDid,did:t.meta.did,wt:(0,M.iK)(t,!0),title:(0,m.getDisplayName)(t)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:p>=0?e("blocklet.migrate.success",{sec:p}):"Redirecting..."},onClose:function(){return s(!1)}},"connect")]}ie.propTypes={};var ae=t(99030),ce=t(90781),se=t(23938),le=t(74197),ue=t(80670),de=t(48952),pe=ue.Gy.Provider,fe=(ue.Gy.Consumer,window.env),ve=fe.did,me=fe.appId;function he(e){var n,t,r=e.children,o=(0,se.y0)().blocklet,i=(0,a.useState)([]),c=(0,w.Z)(i,2),s=c[0],l=c[1],u=(0,a.useState)([]),d=(0,w.Z)(u,2),p=d[0],f=d[1],v=(0,a.useState)([]),g=(0,w.Z)(v,2),x=g[0],Z=g[1],b=(0,m.getDisplayName)(o),E=(null===(n=((null===o||void 0===o?void 0:o.environments)||[]).find((function(e){return e.key===z.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR})))||void 0===n?void 0:n.value)||"auto",P=(null===o||void 0===o?void 0:o.trustedPassports)||[],C=(null===o||void 0===o?void 0:o.trustedFactories)||[],j=!1!==(null===o||void 0===o?void 0:o.enablePassportIssuance),D=function(){var e=(0,y.Z)((0,k.Z)().mark((function e(){var n;return(0,k.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,de.Z.doBatchQuery({getRoles:{input:{teamDid:ve}},getPermissions:{input:{teamDid:ve}},getInvitations:{input:{teamDid:ve}}});case 3:n=e.sent,f((n.getRoles.roles||[]).filter((function(e){return!h.RBAC_CONFIG.roles.some((function(n){return n.name===e.name&&(!n.passport||n.ci)}))})).map((function(e){return e.description=e.description||"Use this passport to connect ".concat(b," as ").concat(e.title),e}))),Z(n.getPermissions.permissions||[]),l(n.getInvitations.invitations||[]),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),F.Z.error(e.t0.message);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}();(0,a.useEffect)((function(){var e;null!==o&&void 0!==o&&null!==(e=o.meta)&&void 0!==e&&e.did&&D()}),[null===o||void 0===o||null===(t=o.meta)||void 0===t?void 0:t.did]);var B=function(e){e.teamDid===ve&&D(ve)};(0,ce.mU)(h.EVENTS.USER_ADDED,B,[ve]),(0,ce.mU)(h.EVENTS.USER_REMOVED,B,[ve]),(0,ce.mU)(h.EVENTS.USER_UPDATED,B,[ve]);var L={teamDid:ve,teamIssuerDid:me,teamName:b,invitations:s,roles:p,permissions:x,trustedPassports:P,trustedFactories:C,isNodeTeam:!1,enablePassportIssuance:j,refresh:function(){return D()},passportColor:E,endpoint:window.location.origin,blocklet:o,api:{getUser:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).did,n={teamDid:ve,user:{did:e}};return de.Z.getUser({input:n})},getUsers:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.query,t=e.paging,r={teamDid:ve};return t&&(r.paging=t),n&&(r.query=n),r.sort={lastLoginAt:-1},de.Z.getUsers({input:r})},getUsersCountPerRole:function(){return de.Z.getUsersCountPerRole({input:{teamDid:ve}})}}};return(0,H.jsx)(pe,{value:L,children:r})}t(53420);var ge=t(25177),xe=t(75255),Ze=t(51921),be=t(40817),ke=t(28915),ye=t(19638),we=t(13328);function Ee(e){var n=e.infos,t=(0,f.PE)().t,r=n.map((function(e){return"* ".concat(e.label,": ").concat(e.value)})).join("\n"),o=new URL("https://github.com/blocklet/blocklet-site/issues/new");return o.searchParams.set("title","[Feedback]"),o.searchParams.set("body","\x3c!-- [Enter feedback here] --\x3e\n\n\n\n\x3c!--\nDocument Details\n".concat(r,"\n* Page: ").concat(window.location.href,"\n--\x3e\n")),(0,we.tZ)(l.Z,{sx:{mx:{xs:0,md:2}},children:(0,we.tZ)(ye.Z,{sx:{color:"text.primary"},target:"_blank",href:o.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}Ee.propTypes={infos:C().arrayOf(C().shape({label:C().string,value:C().string}))},Ee.defaultProps={infos:[]};var Pe=t(37433),Ce=t(39563),je=t(63771),De=t(19886),Be=t.n(De),Le=t(91380),Se=t(7173),_e=t(83176),Re=t(93033),Te=t.n(Re),Oe=t(22073),Ae=t(43178),Ne=["launcherUrl","chainHost","nftId","retention"],Ue=["sx"];function Ie(e){var n,t,r=e.launcherUrl,o=e.chainHost,i=e.nftId,c=(e.retention,(0,E.Z)(e,Ne)),s=(0,f.PE)(),u=s.t,p=s.locale,v=(0,Ae.Z)({safeIframeRef:null,popoverAnchorEl:null}),m=(0,w.Z)(v,2),h=m[0],x=m[1],Z=(0,a.useRef)(null),P=c.sx,C=void 0===P?{}:P,j=(0,E.Z)(c,Ue),D=(0,Oe.Z)((0,y.Z)((0,k.Z)().mark((function e(){var n,t,a,c;return(0,k.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([(0,g.Nh)(o,i),(0,g.qZ)({launcherUrl:r||"https://launcher.arcblock.io/",nftId:i,locale:p})]);case 2:return n=e.sent,t=(0,w.Z)(n,2),a=t[0],c=t[1],e.abrupt("return",{asset:a,subscriptionURL:c});case 7:case"end":return e.stop()}}),e)}))),[p]);if(D.loading)return(0,H.jsxs)(l.Z,(0,b.Z)((0,b.Z)({sx:(0,b.Z)({display:"flex",alignItems:"center",color:"grey",gap:1},C)},j),{},{children:[(0,H.jsx)(d.Z,{size:16}),u("expiration.loading")]}));if(D.error)return console.error(D.error),(0,H.jsx)(Se.Z,(0,b.Z)((0,b.Z)({label:u("expiration.loadFailed"),color:"error",variant:"success",sx:(0,b.Z)({cursor:"pointer"},C)},j),{},{onClick:function(){return D.retry()}}));var B=(0,g.D9)(null===(n=D.value)||void 0===n?void 0:n.asset),L=Be()(B).isBefore(Be()()),S=Be()(B).diff(Be()(),"ms"),_="success";S<=2592e6&&(_="warning"),L&&(_="error");return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Se.Z,(0,b.Z)((0,b.Z)({label:(0,H.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,H.jsx)(Le.Z,{sx:{mr:"4px"},fontSize:"small"}),u("expiration.tips.".concat(_),{validity:Te()(S,{locale:(0,g.tA)(p),compact:!0,verbose:!0})})]}),color:_,variant:"success"!==_?"contained":"outlined",sx:(0,b.Z)({cursor:"pointer"},C)},j),{},{onClick:function(e){x({popoverAnchorEl:e.currentTarget})}})),(0,H.jsx)(_e.ZP,{id:"popover-info",open:Boolean(h.popoverAnchorEl),anchorEl:h.popoverAnchorEl,onClose:function(){x({popoverAnchorEl:null})},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:(0,H.jsx)("iframe",{ref:Z,title:u("common.subscription"),width:"360px",height:"600px",style:{border:0},src:null===(t=D.value)||void 0===t?void 0:t.subscriptionURL})})]})}Ie.propTypes={chainHost:C().string.isRequired,nftId:C().string.isRequired,sx:C().object,retention:C().number,launcherUrl:C().string.isRequired},Ie.defaultProps={sx:{},retention:0};var Ge,Ke=Ie;function ze(){var e=(0,je.gP)(),n=e.inFullPage,t=e.toggleFullPage;return(0,we.tZ)(B.Z,{onClick:t,children:n?(0,we.tZ)(ke.Z,{}):(0,we.tZ)(be.Z,{})})}function Fe(e){var n,t=e.children,r=(0,f.PE)().t,o=(0,se.y0)(),i=o.loading,a=o.error,u=o.actions.refreshBlocklet,p=o.env,v=o.blocklet,m=(0,le.h6)().info,x=(0,c.useLocation)(),Z=(0,xe.Z)((function(e){return e.breakpoints.down("md")})),b=[{label:"App ID",value:p.appId},{label:"App Version",value:p.version},{label:"App Bundle Name",value:null===v||void 0===v||null===(n=v.meta)||void 0===n?void 0:n.bundleName},{label:"Server Id",value:m.did},{label:"Server Version",value:m.version}],k={};return Z&&(k.logo=null),(0,we.BX)(Ve,{legacy:!1,fullWidth:!0,headerAddons:function(e){var n=Array.isArray(e)?e:[e];if(n.unshift((0,we.tZ)(ze,{})),v){var t,r,o,i={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};if((0,M.ep)(v))n.unshift((0,we.tZ)(Ke,{chainHost:null===v||void 0===v||null===(t=v.controller)||void 0===t?void 0:t.chainHost,nftId:null===v||void 0===v||null===(r=v.controller)||void 0===r?void 0:r.nftId,launcherUrl:null===v||void 0===v||null===(o=v.controller)||void 0===o?void 0:o.launcherUrl,retention:h.EXPIRED_BLOCKLET_DATA_RETENTION_DAYS,sx:i}));else m.ownerNft&&m.launcher&&n.unshift((0,we.tZ)(Ke,{chainHost:m.launcher.chainHost,nftId:m.ownerNft.did,launcherUrl:m.launcher.url,sx:i}))}return n},headerProps:k,isMobile:Z,footerProps:{addon:(0,we.tZ)(Ee,{infos:b})},children:[!v&&i&&(0,we.tZ)(s.Z,{relative:"parent",children:(0,we.tZ)(d.Z,{})}),!v&&a&&(0,we.BX)(s.Z,{relative:"parent",children:[(0,we.BX)(l.Z,{display:"flex",alignItems:"center",children:[(0,we.tZ)(ge.Z,{color:"error",sx:{marginRight:1}}),(0,g.Z)(a)]}),(0,we.tZ)(K.Z,{onClick:function(){return u()},children:(0,we.tZ)("span",{style:{textDecoration:"underline"},children:r("common.retry")})})]}),!!v&&(0,we.tZ)(l.Z,{flex:1,padding:Z?2:3,display:"flex",flexDirection:"column",children:(0,we.tZ)(Ze.ErrorBoundary,{FallbackComponent:Pe.H,resetKeys:[x.pathname],children:t})})]})}Fe.defaultProps={children:null};var Me,Ve=(0,i.Z)(Ce.Z)(Ge||(Ge=(0,o.Z)(["\n div.dashboard-content {\n padding: 0;\n }\n"]))),qe=t(38507),Xe=(0,a.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(5820),t.e(1809),t.e(6326)]).then(t.bind(t,56326))})),Ye=(0,a.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(3994),t.e(655),t.e(9582),t.e(2631),t.e(9017),t.e(2291),t.e(4961),t.e(2653)]).then(t.bind(t,92653))})),He=(0,a.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(4319),t.e(8604),t.e(3593)]).then(t.bind(t,23593))})),We=(0,a.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(3994),t.e(655),t.e(9582),t.e(2631),t.e(9017),t.e(2291),t.e(3953),t.e(9529),t.e(716),t.e(4802)]).then(t.bind(t,121))})),Qe=(0,a.lazy)((function(){return Promise.all([t.e(5683),t.e(7606),t.e(3154),t.e(6771)]).then(t.bind(t,26771))})),Je=(0,a.lazy)((function(){return Promise.all([t.e(5683),t.e(5645),t.e(5982)]).then(t.bind(t,25205))})),$e=(0,a.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(3994),t.e(655),t.e(9582),t.e(2631),t.e(9017),t.e(2291),t.e(1249),t.e(356)]).then(t.bind(t,60356))})),en=(0,a.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(3994),t.e(655),t.e(2631),t.e(3953),t.e(5725),t.e(4917),t.e(5403),t.e(4023)]).then(t.bind(t,4023))})),nn=(0,a.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(3994),t.e(655),t.e(9582),t.e(2631),t.e(9017),t.e(2291),t.e(1),t.e(9657),t.e(8792)]).then(t.bind(t,58792))})),tn=(0,a.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(3994),t.e(655),t.e(9582),t.e(9017),t.e(4319),t.e(6629),t.e(9997),t.e(5725),t.e(7606),t.e(476),t.e(9996),t.e(424),t.e(4009),t.e(3979),t.e(9657),t.e(4881),t.e(9194),t.e(1946)]).then(t.bind(t,91946))})),rn=(0,a.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(3994),t.e(655),t.e(9582),t.e(2631),t.e(9017),t.e(2291),t.e(9996),t.e(4009),t.e(7832),t.e(5569)]).then(t.bind(t,65569))}));function on(){var e,n,t=(0,c.useNavigate)(),r=(0,c.useParams)().tab,o=void 0===r?"overview":r,i=(0,se.y0)(),b=i.blocklet,k=i.actions.refreshBlocklet,y=(0,f.PE)().t,w=null===b||void 0===b||null===(e=b.meta)||void 0===e?void 0:e.did,E=!b||(0,g.wS)(b.status)?[]:(0,m.getAppMissingConfigs)(b),P=[{label:y("common.overview"),value:"overview"},{label:(0,H.jsx)(p.Z,{color:"error",variant:"dot",invisible:!E.length,children:y("common.components")}),value:"components"}];(0,g.wS)(null===b||void 0===b?void 0:b.status)||P.push({label:y("common.configuration"),value:"configuration"}),P.push({label:y("common.auditLogs"),value:"audit-logs"}),b&&null!==(n=b.children)&&void 0!==n&&n.length&&b.structVersion===h.APP_STRUCT_VERSION&&P.push({label:y("common.logs"),value:"logs"}),P.push({label:y("common.configNavigation"),value:"navigation"}),P.push({label:y("common.storage"),value:"storage"}),P.push({label:y("common.publish"),value:"publish"});var C=(0,H.jsx)(Qe,{scope:w,categories:["blocklet","team","security","certificates","gateway"]});(0,ce.mU)(h.EVENTS.NOTIFICATION_CREATE,(function(e){var n=e||{},t=n.severity,r=n.title,o=n.description;"error"===t?F.Z.error(o||r):F.Z.success(o||r)}),[w]);var j={overview:(0,H.jsx)(Xe,{}),members:(0,H.jsx)(l.Z,{mt:-5,children:(0,H.jsx)(Ye,{type:"blocklet",createPassportSvg:qe.Ju})}),passports:(0,H.jsx)(l.Z,{mt:-4.5,children:(0,H.jsx)(He,{createPassportSvg:qe.Ju})}),components:tn,configuration:(0,H.jsx)(We,{blocklet:b,onUpdate:function(){k()}}),"audit-logs":C,logs:Je,navigation:en,storage:(0,H.jsx)(nn,{}),analytics:(0,H.jsx)(l.Z,{mt:-5,children:(0,H.jsx)(rn,{})}),publish:(0,H.jsx)($e,{})},D=j[o]||j.overview,B=!["members","passports","analytics"].includes(o),L=b?(0,H.jsxs)(x.g,{type:"components",children:[B&&(0,H.jsx)(v.Z,{tabs:P,current:o,onChange:function(e){t("".concat(h.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin/").concat(e))},scrollButtons:"auto"}),(0,H.jsx)("div",{className:"page-content",children:(0,H.jsx)(a.Suspense,{fallback:(0,H.jsx)(s.Z,{relative:"parent",children:(0,H.jsx)(d.Z,{})}),children:(0,a.isValidElement)(D)?D:(0,H.jsx)(D,{blocklet:b})})})]}):(0,H.jsx)(s.Z,{relative:"parent",children:(0,H.jsx)(d.Z,{})});return(0,H.jsx)(le.cK,{children:(0,H.jsx)(he,{children:(0,H.jsx)(Fe,{children:(0,H.jsx)(ae.wV,{children:(0,H.jsxs)(cn,{children:[B&&(0,H.jsxs)(l.Z,{component:"div",className:"page-header",children:[(0,H.jsxs)(u.Z,{component:"h2",variant:"h4",className:"page-title",color:"textPrimary",children:[b?(0,H.jsx)($.Z,{blocklet:b,style:{marginRight:16}}):null,b?(0,H.jsxs)(l.Z,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,children:[(0,H.jsx)(l.Z,{children:(0,m.getDisplayName)(b)}),"unknown"!==(null===b||void 0===b?void 0:b.status)&&(0,H.jsx)(Z.Z,{size:"12px",status:b.status,source:b.source})]}):"".concat(y("common.blocklet")," ").concat(y("common.detail"))]}),b?(0,H.jsx)(Q,{className:"page-actions",hasPermission:!0,blocklet:b,onStart:function(){},onComplete:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).error;e&&F.Z.error(e.message)},variant:"group"}):null]}),(0,H.jsx)(ie,{}),L]})})})})})}function an(){var e,n=(0,se.y0)().blocklet,t=null===n||void 0===n||null===(e=n.meta)||void 0===e?void 0:e.did;return(0,a.useEffect)((function(){var e=(0,ce.ZP)();return t&&e.connect(),function(){t&&e.isConnected()&&e.disconnect()}}),[t]),(0,H.jsx)(on,{})}var cn=i.Z.main(Me||(Me=(0,o.Z)(["\n .page-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n gap: 16px;\n }\n\n .page-title {\n display: flex;\n align-items: center;\n\n .page-link {\n font-size: 15px;\n margin-top: 8px;\n margin-left: 8px;\n }\n }\n\n .page-content {\n margin-top: 18px;\n }\n\n @media (max-width: ","px) {\n .page-header {\n flex-direction: column;\n align-items: flex-start;\n .page-actions,\n .MuiButtonGroup-root {\n width: 100%;\n }\n .MuiButtonGroup-root {\n .MuiButtonBase-root {\n flex: 1;\n }\n .blocklet-action-text {\n display: none;\n }\n }\n }\n\n .page-title {\n margin-bottom: 15px;\n }\n }\n"])),(function(e){return e.theme.breakpoints.values.md}))},84802:function(e,n,t){t.d(n,{Z:function(){return f}});var r=t(33028),o=t(59740),i=t(24974),a=t.n(i),c=t(59467),s=t(62399),l=t(59505),u=t(15300),d=t(37574),p=["blocklet","style","size"];function f(e){var n,t=e.blocklet,i=e.style,a=e.size,f=(0,o.Z)(e,p),v=(0,u.Z)({blocklet:t}).logoUrl,m=f.variant,h=(0,d.jsx)("img",{src:v,alt:"",style:{width:a}});t.meta.logo||((null===(n=(t.configs||[]).find((function(e){return e.key===l.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE})))||void 0===n?void 0:n.value)||(h=(0,d.jsx)(s.Z,{did:t.meta.did||"",responsive:!0})));return(0,d.jsx)(c.Z,(0,r.Z)((0,r.Z)({variant:m||"square",style:Object.assign({backgroundColor:"transparent",width:a,height:a,borderRadius:10},i)},f),{},{children:h}))}f.propTypes={blocklet:a().object.isRequired,style:a().object,size:a().oneOfType([a().number,a().string])},f.defaultProps={style:{},size:40}},55008:function(e,n,t){var r=t(10814),o=t(8825),i=t(60003),a=t(13875),c=t(57256),s=t(14079),l=t(51389),u=t(98127);n.Z={Start:o.Z,Stop:i.Z,Restart:a.default,Reload:c.Z,Remove:r.default,Config:s.Z,Log:l.Z,Group:u.Z}},94282:function(e,n,t){t.d(n,{Z:function(){return g}});var r=t(33028),o=t(59740),i=t(30969),a=t(24974),c=t.n(a),s=t(94308),l=t(6779),u=t(26022),d=t(7017),p=t(19708),f=t(61472),v=t(37574),m=["status","variant","source"],h={yellow:"#FFCF71",grey:"#888888"};function g(e){var n=e.status,t=e.variant,a=(e.source,(0,o.Z)(e,m)),c=(0,i.useContext)(u.RD).t,g={added:h.grey,waiting:h.yellow,downloading:h.yellow,downloaded:h.grey,installing:h.yellow,installed:h.grey,starting:h.yellow,running:"success",stopping:h.yellow,stopped:h.grey,error:"error",upgrading:h.yellow,restarting:h.yellow,corrupted:"error",deleting:h.yellow},x=(0,d.isInProgress)(n),Z=c("blocklet.status.".concat(n));return"dot"===t?(0,v.jsx)(l.Z,{title:c("blocklet.statusTip",{status:Z}),children:(0,v.jsx)(p.Z,(0,r.Z)({color:g[n]},a))}):(0,v.jsxs)(f.Z,(0,r.Z)((0,r.Z)({type:{added:"primary",waiting:"warning",downloading:"warning",downloaded:"primary",installing:"warning",installed:"primary",starting:"warning",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"warning",restarting:"warning",corrupted:"error",deleting:"warning"}[n]},a),{},{children:[x&&(0,v.jsx)(s.Z,{size:12,color:"inherit",style:{marginRight:5}}),Z]}))}g.propTypes={status:c().string.isRequired,variant:c().oneOf(["dot","tag"]),source:c().string},g.defaultProps={variant:"tag",source:""}},99030:function(e,n,t){t.d(n,{wV:function(){return j},XN:function(){return D}});var r=t(32723),o=t(33028),i=t(34795),a=t(96234),c=t(30969),s=t(24974),l=t.n(s),u=t(1986),d=t(26022),p=t(59505),f=t(45008),v=t(30134),m=t(57982),h=t(41395),g=t(50576);function x(e){return Z.apply(this,arguments)}function Z(){return Z=(0,i.Z)((0,r.Z)().mark((function e(n){var t,a,c,s,l;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.blockletDid,a=n.nodeApi,c=n.spaceGateways,s=!1,e.next=4,Promise.all(c.map(function(){var e=(0,i.Z)((0,r.Z)().mark((function e(n){var t,i;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.name,e.next=3,(0,v.nU)(n.endpoint);case 3:return i=e.sent,(0,g.isEmpty)(i)||i===t||(t=i,s=!0),e.abrupt("return",(0,o.Z)((0,o.Z)({},n),{},{name:t}));case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()));case 4:if(l=e.sent,!s){e.next=8;break}return e.next=8,Promise.all(l.filter((function(e){return e.did})).map((function(e){return a.updateBlockletSpaceGateway({input:{did:t,where:{did:e.did},spaceGateway:(0,o.Z)({},e)}})})));case 8:return e.abrupt("return",l);case 9:case"end":return e.stop()}}),e)}))),Z.apply(this,arguments)}var b=t(85710);var k=t(24891);function y(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{deps:[],setLoading:function(){}},t=n.deps,o=n.setLoading,s=(0,f.y0)().blocklet,l=(0,c.useState)([]),d=(0,a.Z)(l,2),p=d[0],v=d[1],x=(0,h.h6)().api,Z=(0,g.debounce)((0,i.Z)((0,r.Z)().mark((function e(){var n,t;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,o(!0),s){e.next=5;break}return v([]),e.abrupt("return");case 5:return e.next=7,x.getBlockletBackups({input:{did:s.meta.did}});case 7:n=e.sent,t=n.backups,v(null!==t&&void 0!==t?t:[]),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),console.error(e.t0),u.Z.error((0,k.Z)(e.t0));case 16:return e.prev=16,o(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[0,12,16,19]])}))),2e3);return(0,m.Z)((0,i.Z)((0,r.Z)().mark((function e(){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Z();case 1:case"end":return e.stop()}}),e)}))),[null===s||void 0===s||null===(e=s.meta)||void 0===e?void 0:e.did].concat(t)),{backups:p}}var w=function(e){var n=e.appDid,t=y().backups,r=(0,c.useState)({message:"",progress:0,completed:!1}),i=(0,a.Z)(r,2),s=i[0],l=i[1];return(0,(0,h.h6)().ws.useSubscription)(p.BlockletEvents.backupProgress,(function(e){n===(null===e||void 0===e?void 0:e.appDid)&&l((function(){return(0,o.Z)({},e)}))}),[n]),(0,c.useEffect)((function(){var e;if(null!==t&&void 0!==t&&t.length&&(0,g.isNull)(null===(e=t[0])||void 0===e?void 0:e.status)){var n=(0,a.Z)(t,1)[0];l((function(){return{message:n.message,progress:n.progress,completed:Boolean(n.progress>=100)}}))}}),[t]),s};var E=t(37574),P=(0,c.createContext)({}),C=P.Provider;P.Consumer;function j(e){var n=e.children,t=(0,d.PE)().t,s=(0,h.h6)().api,l=(0,f.y0)().blocklet,g=(0,c.useState)(!1),Z=(0,a.Z)(g,2),k=Z[0],P=Z[1],j=(0,c.useState)(!1),D=(0,a.Z)(j,2),B=D[0],L=D[1],S=function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.setLoading,o=n.refresh,s=(0,f.y0)(),l=s.blocklet,d=s.actions.refreshBlocklet,p=null===l||void 0===l||null===(e=l.meta)||void 0===e?void 0:e.did,v=(0,c.useState)([]),g=(0,a.Z)(v,2),Z=g[0],k=g[1],y=(0,h.h6)().api;return(0,m.Z)((0,i.Z)((0,r.Z)().mark((function e(){var n,o,i;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,p){e.next=4;break}return k([]),e.abrupt("return");case 4:return null===t||void 0===t||t(!0),e.next=7,y.getBlockletSpaceGateways({input:{did:p}});case 7:return n=e.sent,o=n.spaceGateways,e.next=11,x({blockletDid:p,nodeApi:y,spaceGateways:o});case 11:i=e.sent,k(null!==i&&void 0!==i?i:[]),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(0),console.error(e.t0),u.Z.error((0,b.Z)(e.t0));case 19:return e.prev=19,null===t||void 0===t||t(!1),e.finish(19);case 22:case"end":return e.stop()}}),e,null,[[0,15,19,22]])}))),[p,d,o]),{spaceGateways:Z}}({refresh:B,setLoading:P}),_=S.spaceGateways,R=w({appDid:null===l||void 0===l?void 0:l.appDid}),T=(0,c.useState)(!1),O=(0,a.Z)(T,2),A=O[0],N=O[1],U=(0,c.useMemo)((function(){return(0,v.mo)(null===l||void 0===l?void 0:l.environments)}),[l,B,A]),I=(0,c.useState)(!1),G=(0,a.Z)(I,2),K=G[0],z=y({deps:[R],setLoading:G[1]}).backups,F=(0,c.useState)(null===_||void 0===_?void 0:_.find((function(e){return e.endpoint===U}))),M=(0,a.Z)(F,2),V=M[0],q=M[1],X=(0,c.useState)(!1),Y=(0,a.Z)(X,2),H=Y[0],W=Y[1],Q=function(){var e,n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{deps:[]}).deps,t=(0,f.y0)().blocklet,o=(0,h.h6)().api,s=(0,c.useState)(null),l=(0,a.Z)(s,2),u=l[0],d=l[1];return(0,m.Z)((0,i.Z)((0,r.Z)().mark((function e(){var n,i,a;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===t||void 0===t||null===(n=t.meta)||void 0===n||!n.did){e.next=6;break}return e.next=3,o.getAutoBackup({input:{did:t.meta.did}});case 3:i=e.sent,a=i.autoBackup,d(a);case 6:case"end":return e.stop()}}),e)}))),[null===t||void 0===t||null===(e=t.meta)||void 0===e?void 0:e.did].concat(n)),u}({deps:[H]}),J=function(){L((function(e){return!e}))},$=function(){var e=(0,i.Z)((0,r.Z)().mark((function e(n,t){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return _.push((0,o.Z)((0,o.Z)({},n),{},{loading:!0})),e.next=3,s.addBlockletSpaceGateway({input:{did:l.meta.did,spaceGateway:n}});case 3:if(U===t){e.next=6;break}return e.next=6,s.configBlocklet({input:{did:[l.meta.did],configs:[{key:p.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t}]}});case 6:J(),q(n);case 8:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),ee=function(){var e=(0,i.Z)((0,r.Z)().mark((function e(n){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return");case 2:if(n.endpoint!==U){e.next=5;break}return u.Z.warning(t("storage.spaces.gateway.delete.failedForConnected")),e.abrupt("return");case 5:return e.next=7,s.deleteBlockletSpaceGateway({input:{did:l.meta.did,spaceGatewayDid:null===n||void 0===n?void 0:n.did}});case 7:J(),q(n);case 9:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),ne=function(){var e=(0,i.Z)((0,r.Z)().mark((function e(n){var o;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.updateBlockletSpaceGateway({input:{did:l.meta.did,where:{did:n.did},spaceGateway:n}});case 2:if(U===n.endpoint){e.next=5;break}return e.next=5,s.configBlocklet({input:{did:[l.meta.did],configs:[{key:p.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:n.endpoint}]}});case 5:u.Z.success(t("storage.spaces.connectedWithName",{name:null!==(o=null===n||void 0===n?void 0:n.name)&&void 0!==o?o:"DID Spaces"})),J();case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),te=function(){var e=(0,i.Z)((0,r.Z)().mark((function e(n){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.updateAutoBackup({input:{did:l.meta.did,autoBackup:n}});case 2:W((function(e){return!e}));case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,E.jsx)(C,{value:{spaceGateways:_,selectedSpaceGateway:V,addSpaceGateway:$,deleteSpaceGateway:ee,updateSpaceGateway:ne,refreshSpaceGateways:J,spaceGatewaysLoading:k,spaceGatewayIsSelected:function(e){return(null===e||void 0===e?void 0:e.endpoint)===U},updateAutoBackup:te,backupEndpoint:U,backupProgress:R,backups:z,backupsLoading:K,refreshBackupEndpoint:function(){N((function(e){return!e}))},autoBackup:Q},children:n})}function D(){return(0,c.useContext)(P)}j.propTypes={children:l().any.isRequired},j.defaultProps={}},43820:function(e,n,t){t.d(n,{K:function(){return f},g:function(){return p}});var r=t(68079),o=t(96234),i=t(30969),a=t(24974),c=t.n(a),s=t(16986),l=t.n(s),u=t(37574),d=(0,i.createContext)({});function p(e){var n=e.children,t=e.type,a=(0,i.useState)([]),c=(0,o.Z)(a,2),s=c[0],p=c[1],f=(0,i.useRef)([]),v=function(e){if(f.current.includes(e)){var n=f.current.filter((function(n){return n!==e}));p(n),f.current=n}};return(0,u.jsx)(d.Provider,{value:{type:t,deletingBlocklets:s,addDeletingDid:function(e){if(!f.current.includes(e)){var n=[].concat((0,r.Z)(f.current),[e]);p(n),f.current=n}},removeDeletingDid:v,matchDeletingDid:function(e){var n=s.filter((function(n){return e.find((function(e){return e===n}))}));l()(n,s).forEach((function(e){return v(e)}))}},children:n})}function f(){return(0,i.useContext)(d)}p.propTypes={type:c().string,children:c().node.isRequired},p.defaultProps={type:"blocklets"}},80670:function(e,n,t){t.d(n,{DJ:function(){return i},Gy:function(){return o}});var r=t(30969),o=(0,r.createContext)({});o.Provider,o.Consumer;function i(){return(0,r.useContext)(o)}},19708:function(e,n,t){var r,o=t(71171),i=t(16380),a={success:"#3ab39d",error:"#D0021B"},c="10px",s=i.Z.div(r||(r=(0,o.Z)(["\n display: inline-block;\n min-width: ",";\n min-height: ",";\n background: ",";\n border-radius: 100%;\n"])),(function(e){return e.size||c}),(function(e){return e.size||c}),(function(e){return a[e.color]||e.color||a.success}));n.Z=s},15300:function(e,n,t){t.d(n,{Z:function(){return l}});var r=t(19611),o=t.n(r),i=t(59505),a=t(41395),c=t(24891),s=function(e,n){var t,r="?v=";n?r+=(0,c.Qi)(n):r+="".concat(null===e||void 0===e||null===(t=e.meta)||void 0===t?void 0:t.version).concat((0,c.wS)(null===e||void 0===e?void 0:e.status)?"~":"");return r};function l(e){var n,t,r,c,l=e.blocklet,u=(0,a.h6)().inService,d=null===(n=((null===l||void 0===l?void 0:l.environments)||[]).find((function(e){return e.key===i.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE})))||void 0===n?void 0:n.value,p=null===(t=((null===l||void 0===l?void 0:l.environments)||[]).find((function(e){return e.key===i.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT})))||void 0===t?void 0:t.value,f=null===(r=((null===l||void 0===l?void 0:l.environments)||[]).find((function(e){return e.key===i.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON})))||void 0===r?void 0:r.value,v=(null===(c=window.env)||void 0===c?void 0:c.apiPrefix)||"/";return{logoUrl:o()(v,"/blocklet/logo/".concat(u?"":l.meta.did),s(l,d)),rectLogoUrl:o()(v,"/blocklet/logo-rect/".concat(u?"":l.meta.did),s(l,p)),faviconUrl:o()(v,"/blocklet/logo-favicon/".concat(u?"":l.meta.did),s(l,f))}}},61472:function(e,n,t){t.d(n,{Z:function(){return u}});var r=t(33028),o=t(59740),i=t(24974),a=t.n(i),c=t(9715),s=t(37574),l=["children","style"];function u(e){var n=e.children,t=e.style,i=(0,o.Z)(e,l);return(0,s.jsx)(c.Z,(0,r.Z)((0,r.Z)({style:t},i),{},{children:n}))}u.propTypes={children:a().any.isRequired,style:a().object},u.defaultProps={style:{}}},54559:function(e,n,t){t.d(n,{hi:function(){return i},od:function(){return o.a}});var r=t(95803),o=t.n(r);o().defaults.timeout=1e4;var i=o().create()},30134:function(e,n,t){t.d(n,{EJ:function(){return E},Jf:function(){return w},LQ:function(){return f},Nb:function(){return v},UV:function(){return P},Xv:function(){return d},Z3:function(){return j},ag:function(){return x},mo:function(){return h},nD:function(){return p},nU:function(){return k},w2:function(){return Z}});var r=t(32723),o=t(34795),i=t(92522),a=t.n(i),c=t(59505),s=t(50576),l=t(43430),u=t(54559);function d(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/"),r=t.at(-4),o=t.at(-2);return(0,l.xn)(n,"space",r,"apps",o,"explorer?key=/apps/".concat(o,"/.did-objects/").concat(o,"/"))}function p(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/").at(-4);return(0,l.xn)(n,"space",t)}function f(e){return e.replace(/\/$/,"").split("/").at(-4)}function v(e){return m.apply(this,arguments)}function m(){return(m=(0,o.Z)((0,r.Z)().mark((function e(n){var t,o;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,a()(n)){e.next=3;break}return e.abrupt("return",!1);case 3:return e.next=5,u.hi.head(n,{timeout:5e3});case 5:return t=e.sent,o=t.headers,e.abrupt("return","true"===o["x-listable"]&&"true"===o["x-readable"]&&"true"===o["x-writeable"]);case 10:return e.prev=10,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",!1);case 14:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function h(e){var n;return(null===e||void 0===e||null===(n=e.find((function(e){return e.key===c.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT})))||void 0===n?void 0:n.value)||""}function g(e){return null===e||void 0===e?void 0:e.replace(/\/api\/space\/.+/,"")}function x(e){var n=new URL(e);return(0,l.xn)(n.origin,n.pathname)}function Z(e){return b.apply(this,arguments)}function b(){return(b=(0,o.Z)((0,r.Z)().mark((function e(n){var t,o,i,c,d;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,a()(n)){e.next=3;break}return e.abrupt("return",!1);case 3:return t=x(n),o=(0,l.xn)(t,"space/api/did/one-click-authorization/token"),e.next=7,u.hi.get(o,{timeout:5e3});case 7:return i=e.sent,c=i.status,d=i.data,e.abrupt("return",200===c&&(0,s.isObject)(d));case 13:return e.prev=13,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",!1);case 17:case"end":return e.stop()}}),e,null,[[0,13]])})))).apply(this,arguments)}function k(e){return y.apply(this,arguments)}function y(){return y=(0,o.Z)((0,r.Z)().mark((function e(n){var t,o,i,c,s=arguments;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=(s.length>1&&void 0!==s[1]?s[1]:{timeout:3e3}).timeout,e.prev=1,a()(n)){e.next=4;break}return e.abrupt("return","");case 4:return e.next=6,u.hi.head(n,{timeout:t});case 6:return o=e.sent,i=o.headers,c=i["x-space-name"],e.abrupt("return",c?decodeURIComponent(c):"");case 12:return e.prev=12,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return","");case 16:case"end":return e.stop()}}),e,null,[[1,12]])}))),y.apply(this,arguments)}function w(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/").at(-4);return(0,l.xn)(n,"/api/space/nft/display?spaceDid=".concat(t))}var E=function(e){var n,t;return(null===e||void 0===e||null===(n=e.configs)||void 0===n||null===(t=n.find((function(e){return e.key===c.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT})))||void 0===t?void 0:t.value)||null};function P(e){return C.apply(this,arguments)}function C(){return(C=(0,o.Z)((0,r.Z)().mark((function e(n){var t;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t={}).did=f(n),e.next=4,k(n);case 4:return t.name=e.sent,t.url=g(n),t.endpoint=n,e.abrupt("return",t);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function j(e){return D.apply(this,arguments)}function D(){return D=(0,o.Z)((0,r.Z)().mark((function e(n){var t,o,i,a,c,d,p,f,v,m=arguments;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=m.length>1&&void 0!==m[1]?m[1]:{timeout:3e4,withSearchParams:!0},(0,s.isString)(n)){e.next=3;break}throw new Error("url(".concat(n,") must be a string"));case 3:return i=n.startsWith("http")?n:"https://".concat(n),a=new URL(i),e.next=7,u.hi.get((0,l.xn)(a.origin,"/__blocklet__.js?type=json"),{timeout:o.timeout});case 7:if(c=e.sent,d=c.data,p=null===(t=d.componentMountPoints.findLast((function(e){return"z8iZnaYxnkMD5AKRjTKiCb8pQr1ut8UantAcf"===e.did})))||void 0===t?void 0:t.mountPoint){e.next=12;break}throw new Error("MountPoint(".concat(p,") not found"));case 12:return f=(0,l.xn)(a.origin,p),v=o.withSearchParams&&a.searchParams.get("spaceDid")?(0,l.xn)(f,"?spaceDid=".concat(a.searchParams.get("spaceDid"))):f,e.abrupt("return",v);case 15:case"end":return e.stop()}}),e)}))),D.apply(this,arguments)}}}]);
|
|
2
|
+
//# sourceMappingURL=8944.d4773634.chunk.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[8983],{38641:function(n,e,t){t.r(e),t.d(e,{default:function(){return L}});var r=t(71171),o=t(32723),i=t(34795),a=t(96234),c=t(30969),l=t(16380),s=t(76492),u=t(97517),d=t(49884),p=t(87535),f=t(38361),v=t(88876),m=t(94702),h=t(26022),Z=t(1986),x=t(20244),b=t(7017),g=t(99398),k=t(24891),w=t(70115),y=t(23938),z=t(66744),C=t(32668),j=t(39816),S=t(55829),N=t(6779),A=t(94551),M=t(37574);function P(n){var e=n.children,t=(0,h.PE)().t;return(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[e,(0,M.jsx)(N.Z,{title:t("blocklet.config.access.publicInstanceTip"),children:(0,M.jsx)(A.Z,{children:(0,M.jsx)(S.Z,{fontSize:"small"})})})]})}var W,E=(0,c.memo)(P);function L(n){var e=n.onNext,t=(0,m.Z)(),r=(0,h.PE)(),l=r.t,z=r.locale,S=(0,c.useState)(!1),N=(0,a.Z)(S,2),A=N[0],P=N[1],W=(0,c.useState)(""),L=(0,a.Z)(W,2),_=L[0],I=L[1],B=(0,c.useState)(!1),H=(0,a.Z)(B,2),T=H[0],V=H[1],R=(0,y.y0)(),F=R.blocklet,q=R.actions,D=R.getPublicInstance;(0,c.useEffect)((function(){I((0,b.getWhoCanAccess)(F)),V(D(F))}),[F]);var Y=function(){var n=(0,i.Z)((0,o.Z)().mark((function n(e){return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,P(!0),n.next=4,(0,k._v)(800);case 4:return n.next=6,q.configWhoCanAccess(e);case 6:P(!1),n.next=13;break;case 9:n.prev=9,n.t0=n.catch(0),P(!1),Z.Z.error(n.t0.message);case 13:case"end":return n.stop()}}),n,null,[[0,9]])})));return function(e){return n.apply(this,arguments)}}(),G=function(){var n=(0,i.Z)((0,o.Z)().mark((function n(e){return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!A){n.next=2;break}return n.abrupt("return");case 2:return I(e.target.value),n.next=5,Y(e.target.value);case 5:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),J=function(){var n=(0,i.Z)((0,o.Z)().mark((function n(e){var t;return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.target.checked,n.prev=1,P(!0),n.next=5,q.configPublicToStore(t);case 5:P(!1),n.next=12;break;case 8:n.prev=8,n.t0=n.catch(1),P(!1),Z.Z.error(n.t0.message);case 12:case"end":return n.stop()}}),n,null,[[1,8]])})));return function(e){return n.apply(this,arguments)}}(),K={marginRight:4,fontSize:18,verticalAlign:"text-bottom",color:t.palette.text.secondary};return(0,M.jsxs)(O,{children:[(0,M.jsx)("div",{className:"header",children:(0,M.jsx)(g.Z,{title:l("blocklet.config.access.description")})}),(0,M.jsx)(p.Z,{component:"fieldset",children:(0,M.jsx)(u.Z,{name:"inherit",value:_,onChange:G,children:w.Z.map((function(n){return(0,M.jsxs)("div",{style:{marginBottom:16},children:[(0,M.jsx)(d.Z,{value:n.value,control:(0,M.jsx)(s.Z,{color:"primary"}),label:(0,M.jsxs)("span",{children:[(0,M.jsx)(n.icon,{style:K}),n.title[z]]})}),(0,M.jsxs)(f.Z,{className:"tip",children:[n.description[z],n.value===x.WHO_CAN_ACCESS.ALL&&_===x.WHO_CAN_ACCESS.ALL&&"registry"===F.source&&(0,M.jsx)(E,{children:(0,M.jsx)(d.Z,{style:{marginRight:0},value:n.value,control:(0,M.jsx)(v.Z,{size:"small"}),label:(0,M.jsx)("span",{children:l("blocklet.config.access.publicToStore")}),onChange:J,checked:T,disabled:A})})]})]},n.value)}))})}),(0,M.jsx)(C.Z,{mt:8,disabled:A,blocklet:F,onStartNow:function(){return e("complete")},children:(0,M.jsx)(j.Z,{loading:A,variant:"contained",disabled:A,onClick:function(){return e()},children:l("setup.continue")})})]})}L.defaultProps={onNext:function(){}};var O=(0,l.Z)(z.Z)(W||(W=(0,r.Z)(["\n height: 100%;\n overflow-y: auto;\n .header {\n width: 100%;\n }\n .tip {\n margin-left: 32px;\n font-size: 12px;\n margin-top: -8px;\n color: ",";\n }\n"])),(function(n){return n.theme.palette.text.secondary}))},39816:function(n,e,t){t.d(e,{Z:function(){return c}});var r=t(33028),o=t(33665),i=t(29996),a=t(37574);function c(n){var e=Object.assign({},((0,o.Z)(n),n));return(0,a.jsx)(i.Z,(0,r.Z)({className:"bottom-button",variant:"contained",color:"primary"},e))}},66744:function(n,e,t){var r,o=t(71171),i=t(16380),a=t(44876),c=(0,i.Z)(a.Z)(r||(r=(0,o.Z)(["\n display: flex;\n flex-direction: column;\n padding-bottom: 16px;\n "," {\n padding-top: 34px;\n padding-bottom: 34px;\n }\n .header {\n width: 100%;\n margin-bottom: 34px;\n "," {\n margin-bottom: 64px;\n }\n }\n .container-main {\n position: relative;\n flex: 1;\n width: 100%;\n }\n .container-inner {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n overflow-y: auto;\n }\n"])),(function(n){return n.theme.breakpoints.up("md")}),(function(n){return n.theme.breakpoints.up("md")}));e.Z=c},32668:function(n,e,t){t.d(e,{Z:function(){return f}});var r,o=t(71171),i=t(33028),a=t(16380),c=t(29996),l=t(26022),s=t(38361),u=t(23539),d=t(38507),p=t(37574);function f(n){var e=n.blocklet,t=n.onStartNow,r=n.children,o=n.disabled,a=n.startNowText,f=n.startNowProps,m=(0,l.PE)().t,h=(0,u.Z)();return!e||(0,d.bg)(e.meta)?(0,p.jsx)(v,{isMobile:h,children:r}):(0,p.jsxs)(v,{isMobile:h,children:[(0,p.jsx)(c.Z,(0,i.Z)((0,i.Z)({className:"start-now",variant:"outlined",disabled:o,onClick:function(){return t()}},f),{},{children:null!==a&&void 0!==a?a:m("setup.startNow")})),(0,p.jsx)(s.Z,{display:"flex",variant:"contained",color:"primary",alignItems:"center",marginLeft:"32px",children:r})]})}f.defaultProps={blocklet:null,onStartNow:function(){},children:null,disabled:!1,startNowText:void 0,startNowProps:{}};var v=(0,a.Z)(s.Z)(r||(r=(0,o.Z)(["\n padding-top: 24px;\n margin-top: auto;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n .start-now {\n min-width: 140px;\n }\n .bottom-button {\n min-width: 120px;\n }\n "," {\n width: 100%;\n }\n\n "," {\n .start-now {\n min-width: inherit;\n }\n .bottom-button {\n min-width: 100px;\n }\n }\n\n "," {\n justify-content: space-between;\n gap: '32px',\n }}\n"])),(function(n){return n.theme.breakpoints.down("lg")}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.isMobile}))},23539:function(n,e,t){t.d(e,{Z:function(){return i}});var r=t(94702),o=t(75255);function i(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{key:"sm"}).key,e=(0,r.Z)();return(0,o.Z)(e.breakpoints.down(n))}},44876:function(n,e,t){t.d(e,{Z:function(){return p}});var r,o=t(71171),i=t(33028),a=t(59740),c=t(16380),l=t(24974),s=t.n(l),u=t(37574),d=["children"];function p(n){var e=n.children,t=(0,a.Z)(n,d);return(0,u.jsx)(f,(0,i.Z)((0,i.Z)({},t),{},{children:e}))}p.propTypes={children:s().any.isRequired};var f=c.Z.div(r||(r=(0,o.Z)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n height: 100%;\n\n .header {\n text-align: center;\n }\n\n .body {\n display: flex;\n flex-direction: column;\n align-items: center;\n margin-top: 30px;\n width: 100%;\n min-height: 200px;\n flex: 1;\n\n "," {\n padding: 24px;\n }\n\n "," {\n padding: 0 16px 16px;\n }\n }\n\n .footer {\n display: flex;\n justify-content: center;\n\n "," {\n padding-bottom: 34px;\n }\n\n "," {\n margin-top: auto;\n padding-bottom: 10px;\n }\n }\n"])),(function(n){return n.theme.breakpoints.up("md")}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.breakpoints.up("sm")}),(function(n){return n.theme.breakpoints.down("md")}))},70115:function(n,e,t){var r=t(39517),o=t(87642),i=t(64076),a=t(20244);e.Z=[{value:a.WHO_CAN_ACCESS.ALL,icon:i.Z,title:{zh:"\u6240\u6709\u4eba\u53ef\u8bbf\u95ee",en:"Accessible to all"},description:{zh:"\u5411\u6240\u6709\u4eba\u5f00\u653e\uff0c\u65e0\u9700\u901a\u884c\u8bc1\u5373\u53ef\u8bbf\u95ee\u5e94\u7528",en:"Open to the world anyone can access without passport"}},{value:a.WHO_CAN_ACCESS.INVITED,icon:o.Z,title:{zh:"\u53ea\u6709\u88ab\u9080\u8bf7\u7684\u4eba\u53ef\u4ee5\u8bbf\u95ee",en:"Only invited people can access"},description:{zh:"\u7a0d\u540e\u60a8\u53ef\u4ee5\u5728\u7ba1\u7406\u9875\u9762\u4e2d\u9080\u8bf7\u6210\u5458",en:"You can invite members later in the admin page"}},{value:a.WHO_CAN_ACCESS.OWNER,icon:r.Z,title:{zh:"\u53ea\u6709\u5e94\u7528\u6240\u6709\u8005\u53ef\u4ee5\u8bbf\u95ee",en:"Only Owner of the blocklet can access"},description:{zh:"\u5fc5\u987b\u63d0\u4f9b\u6240\u6709\u8005\u901a\u884c\u8bc1\u624d\u80fd\u8bbf\u95ee\u5e94\u7528",en:"You must provide owner passport to access this application"}}]},99398:function(n,e,t){var r,o=t(71171),i=t(33028),a=t(59740),c=t(16380),l=t(24974),s=t.n(l),u=t(15405),d=t(37574),p=["title","subTitle","onClickBack"];function f(n){var e=n.title,t=n.subTitle,r=n.onClickBack,o=(0,a.Z)(n,p);return(0,d.jsxs)(v,(0,i.Z)((0,i.Z)({},o),{},{children:[r&&(0,d.jsx)(u.Z,{className:"back-btn",onClick:r}),(0,d.jsx)("div",{className:"title",children:e}),(0,d.jsx)("div",{className:"sub-title",children:t})]}))}var v=c.Z.div(r||(r=(0,o.Z)(["\n position: relative;\n width: 100%;\n text-align: center;\n\n .title {\n font-size: 24px;\n font-weight: 700;\n color: ",";\n\n "," {\n font-size: 20px;\n }\n }\n\n .sub-title {\n font-size: 14px;\n color: ",";\n padding: 0 14px;\n font-weight: 400;\n }\n\n .back-btn {\n position: absolute;\n left: 0;\n top: 8px;\n color: #9397a1;\n font-size: 18px;\n cursor: pointer;\n }\n"])),(function(n){return n.theme.palette.common.black}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.palette.grey[600]}));e.Z=f,f.propTypes={title:s().string,subTitle:s().string,onClickBack:s().oneOfType([s().func,s().string])},f.defaultProps={title:"",subTitle:"",onClickBack:""}},15405:function(n,e,t){var r=t(71600);e.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}),"ArrowBackIos");e.Z=a},87642:function(n,e,t){var r=t(71600);e.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"}),"ContactMail");e.Z=a},55829:function(n,e,t){var r=t(71600);e.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"InfoOutlined");e.Z=a},39517:function(n,e,t){var r=t(71600);e.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"}),"Lock");e.Z=a},64076:function(n,e,t){var r=t(71600);e.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"}),"Public");e.Z=a},88876:function(n,e,t){t.d(e,{Z:function(){return C}});var r=t(56666),o=t(31461),i=t(7896),a=t(30969),c=t(87023),l=t(26540),s=t(74262),u=t(71885),d=t(17469),p=t(37574),f=(0,d.Z)((0,p.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),v=(0,d.Z)((0,p.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),m=(0,d.Z)((0,p.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox"),h=t(24099),Z=t(17363),x=t(45971),b=t(72726),g=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],k=(0,x.ZP)(u.Z,{shouldForwardProp:function(n){return(0,x.FO)(n)||"classes"===n},name:"MuiCheckbox",slot:"Root",overridesResolver:function(n,e){var t=n.ownerState;return[e.root,t.indeterminate&&e.indeterminate,e["size".concat((0,h.Z)(t.size))],"default"!==t.color&&e["color".concat((0,h.Z)(t.color))]]}})((function(n){var e,t=n.theme,o=n.ownerState;return(0,i.Z)({color:(t.vars||t).palette.text.secondary},!o.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat("default"===o.color?t.vars.palette.action.activeChannel:t.vars.palette[o.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,s.Fq)("default"===o.color?t.palette.action.active:t.palette[o.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==o.color&&(e={},(0,r.Z)(e,"&.".concat(b.Z.checked,", &.").concat(b.Z.indeterminate),{color:(t.vars||t).palette[o.color].main}),(0,r.Z)(e,"&.".concat(b.Z.disabled),{color:(t.vars||t).palette.action.disabled}),e))})),w=(0,p.jsx)(v,{}),y=(0,p.jsx)(f,{}),z=(0,p.jsx)(m,{}),C=a.forwardRef((function(n,e){var t,r,s=(0,Z.Z)({props:n,name:"MuiCheckbox"}),u=s.checkedIcon,d=void 0===u?w:u,f=s.color,v=void 0===f?"primary":f,m=s.icon,x=void 0===m?y:m,C=s.indeterminate,j=void 0!==C&&C,S=s.indeterminateIcon,N=void 0===S?z:S,A=s.inputProps,M=s.size,P=void 0===M?"medium":M,W=s.className,E=(0,o.Z)(s,g),L=j?N:x,O=j?N:d,_=(0,i.Z)({},s,{color:v,indeterminate:j,size:P}),I=function(n){var e=n.classes,t=n.indeterminate,r=n.color,o=n.size,a={root:["root",t&&"indeterminate","color".concat((0,h.Z)(r)),"size".concat((0,h.Z)(o))]},c=(0,l.Z)(a,b.y,e);return(0,i.Z)({},e,c)}(_);return(0,p.jsx)(k,(0,i.Z)({type:"checkbox",inputProps:(0,i.Z)({"data-indeterminate":j},A),icon:a.cloneElement(L,{fontSize:null!=(t=L.props.fontSize)?t:P}),checkedIcon:a.cloneElement(O,{fontSize:null!=(r=O.props.fontSize)?r:P}),ownerState:_,ref:e,className:(0,c.Z)(I.root,W)},E,{classes:I}))}))},72726:function(n,e,t){t.d(e,{y:function(){return i}});var r=t(62746),o=t(2975);function i(n){return(0,o.Z)("MuiCheckbox",n)}var a=(0,r.Z)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);e.Z=a},87535:function(n,e,t){var r=t(96234),o=t(31461),i=t(7896),a=t(30969),c=t(87023),l=t(26540),s=t(17363),u=t(45971),d=t(81133),p=t(24099),f=t(86209),v=t(43611),m=t(35572),h=t(37574),Z=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],x=(0,u.ZP)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:function(n,e){var t=n.ownerState;return(0,i.Z)({},e.root,e["margin".concat((0,p.Z)(t.margin))],t.fullWidth&&e.fullWidth)}})((function(n){var e=n.ownerState;return(0,i.Z)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===e.margin&&{marginTop:16,marginBottom:8},"dense"===e.margin&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})})),b=a.forwardRef((function(n,e){var t=(0,s.Z)({props:n,name:"MuiFormControl"}),u=t.children,b=t.className,g=t.color,k=void 0===g?"primary":g,w=t.component,y=void 0===w?"div":w,z=t.disabled,C=void 0!==z&&z,j=t.error,S=void 0!==j&&j,N=t.focused,A=t.fullWidth,M=void 0!==A&&A,P=t.hiddenLabel,W=void 0!==P&&P,E=t.margin,L=void 0===E?"none":E,O=t.required,_=void 0!==O&&O,I=t.size,B=void 0===I?"medium":I,H=t.variant,T=void 0===H?"outlined":H,V=(0,o.Z)(t,Z),R=(0,i.Z)({},t,{color:k,component:y,disabled:C,error:S,fullWidth:M,hiddenLabel:W,margin:L,required:_,size:B,variant:T}),F=function(n){var e=n.classes,t=n.margin,r=n.fullWidth,o={root:["root","none"!==t&&"margin".concat((0,p.Z)(t)),r&&"fullWidth"]};return(0,l.Z)(o,m.e,e)}(R),q=a.useState((function(){var n=!1;return u&&a.Children.forEach(u,(function(e){if((0,f.Z)(e,["Input","Select"])){var t=(0,f.Z)(e,["Select"])?e.props.input:e;t&&(0,d.B7)(t.props)&&(n=!0)}})),n})),D=(0,r.Z)(q,2),Y=D[0],G=D[1],J=a.useState((function(){var n=!1;return u&&a.Children.forEach(u,(function(e){(0,f.Z)(e,["Input","Select"])&&((0,d.vd)(e.props,!0)||(0,d.vd)(e.props.inputProps,!0))&&(n=!0)})),n})),K=(0,r.Z)(J,2),Q=K[0],U=K[1],X=a.useState(!1),$=(0,r.Z)(X,2),nn=$[0],en=$[1];C&&nn&&en(!1);var tn,rn=void 0===N||C?nn:N,on=a.useMemo((function(){return{adornedStart:Y,setAdornedStart:G,color:k,disabled:C,error:S,filled:Q,focused:rn,fullWidth:M,hiddenLabel:W,size:B,onBlur:function(){en(!1)},onEmpty:function(){U(!1)},onFilled:function(){U(!0)},onFocus:function(){en(!0)},registerEffect:tn,required:_,variant:T}}),[Y,k,C,S,Q,rn,M,W,tn,_,B,T]);return(0,h.jsx)(v.Z.Provider,{value:on,children:(0,h.jsx)(x,(0,i.Z)({as:y,ownerState:R,className:(0,c.Z)(F.root,b),ref:e},V,{children:u}))})}));e.Z=b},43611:function(n,e,t){var r=t(30969).createContext(void 0);e.Z=r},35572:function(n,e,t){t.d(e,{e:function(){return i}});var r=t(62746),o=t(2975);function i(n){return(0,o.Z)("MuiFormControl",n)}var a=(0,r.Z)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);e.Z=a},42641:function(n,e,t){function r(n){var e=n.props,t=n.states,r=n.muiFormControl;return t.reduce((function(n,t){return n[t]=e[t],r&&"undefined"===typeof e[t]&&(n[t]=r[t]),n}),{})}t.d(e,{Z:function(){return r}})},86171:function(n,e,t){t.d(e,{Z:function(){return i}});var r=t(30969),o=t(43611);function i(){return r.useContext(o.Z)}},81133:function(n,e,t){function r(n){return null!=n&&!(Array.isArray(n)&&0===n.length)}function o(n){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&(r(n.value)&&""!==n.value||e&&r(n.defaultValue)&&""!==n.defaultValue)}function i(n){return n.startAdornment}t.d(e,{B7:function(){return i},vd:function(){return o}})}}]);
|
|
2
|
+
//# sourceMappingURL=8983.f509aca0.chunk.js.map
|