@abtnode/blocklet-services 1.16.18-beta-adeeb0b3 → 1.16.18-beta-aa01bd8e
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/index.js +1 -0
- package/api/libs/connect/session.js +45 -33
- package/api/middlewares/check-running.js +1 -1
- package/api/routes/blocklet.js +18 -0
- package/api/routes/federated.js +10 -9
- package/api/routes/oauth.js +79 -60
- package/api/routes/user-session.js +23 -16
- package/api/routes/user.js +160 -22
- package/api/services/auth/connect/invite.js +21 -12
- package/api/util/federated.js +13 -12
- package/api/validators/login.js +12 -0
- package/build/asset-manifest.json +100 -80
- 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/{807.65f26433.chunk.css → 4448.de9040c4.chunk.css} +1 -1
- package/build/static/js/1.138935fc.chunk.js +2 -0
- package/build/static/js/{1148.4b2a7347.chunk.js → 1148.e614f706.chunk.js} +2 -2
- package/build/static/js/1343.69031e0b.chunk.js +2 -0
- package/build/static/js/1581.ed4544c6.chunk.js +2 -0
- package/build/static/js/2026.514f995a.chunk.js +2 -0
- package/build/static/js/{2291.7ffdc7df.chunk.js → 2291.37b0ad3a.chunk.js} +2 -2
- package/build/static/js/{3490.4d3a51ea.chunk.js → 2362.ab5308a8.chunk.js} +2 -2
- package/build/static/js/2506.dd9284b6.chunk.js +2 -0
- package/build/static/js/{2838.fcdea2fa.chunk.js → 2838.ec459fda.chunk.js} +3 -3
- package/build/static/js/{3025.a48c96f5.chunk.js → 3025.aa129833.chunk.js} +2 -2
- package/build/static/js/3076.28658ffc.chunk.js +2 -0
- package/build/static/js/3683.6f169a32.chunk.js +2 -0
- package/build/static/js/3920.5c63a2b9.chunk.js +3 -0
- package/build/static/js/3979.f9a5aa48.chunk.js +3 -0
- package/build/static/js/{807.249d2d01.chunk.js.LICENSE.txt → 3979.f9a5aa48.chunk.js.LICENSE.txt} +0 -18
- package/build/static/js/3994.e53e7ce2.chunk.js +2 -0
- package/build/static/js/4009.65d1c083.chunk.js +2 -0
- package/build/static/js/{4023.1658794f.chunk.js → 4023.a2e9db00.chunk.js} +2 -2
- package/build/static/js/4247.c25f1945.chunk.js +2 -0
- package/build/static/js/{4319.8d9e189e.chunk.js → 4319.9f120992.chunk.js} +2 -2
- package/build/static/js/4448.f0c62086.chunk.js +3 -0
- package/build/static/js/4448.f0c62086.chunk.js.LICENSE.txt +17 -0
- package/build/static/js/4461.26253c6a.chunk.js +2 -0
- package/build/static/js/4802.cd83ecef.chunk.js +2 -0
- package/build/static/js/4882.0435e418.chunk.js +2 -0
- package/build/static/js/5547.8447edf9.chunk.js +3 -0
- package/build/static/js/556.4d5cc702.chunk.js +3 -0
- package/build/static/js/{5683.47011724.chunk.js → 5683.051a03c1.chunk.js} +2 -2
- package/build/static/js/6032.48c0a152.chunk.js +2 -0
- package/build/static/js/6139.5867193a.chunk.js +2 -0
- package/build/static/js/655.cdee65b4.chunk.js +2 -0
- package/build/static/js/{6771.a1510398.chunk.js → 6771.920fa5b6.chunk.js} +3 -3
- package/build/static/js/7006.bb90b167.chunk.js +2 -0
- package/build/static/js/779.383b4b4a.chunk.js +2 -0
- package/build/static/js/{7832.741ac84f.chunk.js → 7832.81aaf011.chunk.js} +2 -2
- package/build/static/js/{7858.e4167dfd.chunk.js → 7858.4e5b7c88.chunk.js} +2 -2
- package/build/static/js/8181.86477cc5.chunk.js +2 -0
- package/build/static/js/8604.ece06cf7.chunk.js +3 -0
- package/build/static/js/{8622.f9639db9.chunk.js → 8622.66a81bc0.chunk.js} +2 -2
- package/build/static/js/8944.07bcf75f.chunk.js +2 -0
- package/build/static/js/8983.19b79a23.chunk.js +2 -0
- package/build/static/js/9017.56c20b17.chunk.js +2 -0
- package/build/static/js/9582.2c539fcf.chunk.js +2 -0
- package/build/static/js/9880.13ac9520.chunk.js +2 -0
- package/build/static/js/9996.5545ea26.chunk.js +2 -0
- package/build/static/js/main.63103d24.js +3 -0
- package/build/static/js/{main.50d5cec4.js.LICENSE.txt → main.63103d24.js.LICENSE.txt} +1 -1
- package/package.json +34 -34
- package/build/static/js/1431.29b0bc0a.chunk.js +0 -3
- package/build/static/js/2093.3ce9b59d.chunk.js +0 -3
- package/build/static/js/2686.890b32ed.chunk.js +0 -2
- package/build/static/js/4022.5ec79b56.chunk.js +0 -2
- package/build/static/js/4461.f412553b.chunk.js +0 -2
- package/build/static/js/4802.fe56c787.chunk.js +0 -2
- package/build/static/js/5465.dd0f7a20.chunk.js +0 -2
- package/build/static/js/5547.5a341867.chunk.js +0 -3
- package/build/static/js/5662.03f06ae0.chunk.js +0 -2
- package/build/static/js/5673.0dd67df6.chunk.js +0 -2
- package/build/static/js/5960.35db200d.chunk.js +0 -2
- package/build/static/js/6139.cabc22a2.chunk.js +0 -2
- package/build/static/js/6498.698608f8.chunk.js +0 -2
- package/build/static/js/6868.881bd141.chunk.js +0 -2
- package/build/static/js/7006.8f0645e5.chunk.js +0 -2
- package/build/static/js/7367.15383006.chunk.js +0 -2
- package/build/static/js/779.b64e7db1.chunk.js +0 -2
- package/build/static/js/807.249d2d01.chunk.js +0 -3
- package/build/static/js/8604.a8ef404e.chunk.js +0 -3
- package/build/static/js/8641.506d61d5.chunk.js +0 -2
- package/build/static/js/8944.2d60df14.chunk.js +0 -2
- package/build/static/js/main.50d5cec4.js +0 -3
- /package/build/static/js/{2838.fcdea2fa.chunk.js.LICENSE.txt → 2838.ec459fda.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{2093.3ce9b59d.chunk.js.LICENSE.txt → 3920.5c63a2b9.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{5547.5a341867.chunk.js.LICENSE.txt → 5547.8447edf9.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{1431.29b0bc0a.chunk.js.LICENSE.txt → 556.4d5cc702.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{6771.a1510398.chunk.js.LICENSE.txt → 6771.920fa5b6.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{8604.a8ef404e.chunk.js.LICENSE.txt → 8604.ece06cf7.chunk.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[7006],{98123:function(e,r,o){var a,t=o(56666),i=o(31461),n=o(7896),s=o(30969),l=o(87023),d=o(26540),c=o(42641),u=o(86171),f=o(45971),m=o(24099),p=o(57761),v=o(17363),Z=o(37574),h=["children","className","component","disabled","error","filled","focused","margin","required","variant"],b=(0,f.ZP)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:function(e,r){var o=e.ownerState;return[r.root,o.size&&r["size".concat((0,m.Z)(o.size))],o.contained&&r.contained,o.filled&&r.filled]}})((function(e){var r,o=e.theme,a=e.ownerState;return(0,n.Z)({color:(o.vars||o).palette.text.secondary},o.typography.caption,(r={textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0},(0,t.Z)(r,"&.".concat(p.Z.disabled),{color:(o.vars||o).palette.text.disabled}),(0,t.Z)(r,"&.".concat(p.Z.error),{color:(o.vars||o).palette.error.main}),r),"small"===a.size&&{marginTop:4},a.contained&&{marginLeft:14,marginRight:14})})),x=s.forwardRef((function(e,r){var o=(0,v.Z)({props:e,name:"MuiFormHelperText"}),t=o.children,s=o.className,f=o.component,x=void 0===f?"p":f,k=(0,i.Z)(o,h),w=(0,u.Z)(),F=(0,c.Z)({props:o,muiFormControl:w,states:["variant","size","disabled","error","filled","focused","required"]}),z=(0,n.Z)({},o,{component:x,contained:"filled"===F.variant||"outlined"===F.variant,variant:F.variant,size:F.size,disabled:F.disabled,error:F.error,filled:F.filled,focused:F.focused,required:F.required}),q=function(e){var r=e.classes,o=e.contained,a=e.size,t=e.disabled,i=e.error,n=e.filled,s=e.focused,l=e.required,c={root:["root",t&&"disabled",i&&"error",a&&"size".concat((0,m.Z)(a)),o&&"contained",s&&"focused",n&&"filled",l&&"required"]};return(0,d.Z)(c,p.E,r)}(z);return(0,Z.jsx)(b,(0,n.Z)({as:x,ownerState:z,className:(0,l.Z)(q.root,s),ref:r},k,{children:" "===t?a||(a=(0,Z.jsx)("span",{className:"notranslate",children:"\u200b"})):t}))}));r.Z=x},57761:function(e,r,o){o.d(r,{E:function(){return i}});var a=o(62746),t=o(2975);function i(e){return(0,t.Z)("MuiFormHelperText",e)}var n=(0,a.Z)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);r.Z=n},51385:function(e,r,o){o.d(r,{Z:function(){return g}});var a=o(56666),t=o(31461),i=o(7896),n=o(30969),s=o(26540),l=o(87023),d=o(42641),c=o(86171),u=o(24099),f=o(17363),m=o(45971),p=o(62746),v=o(2975);function Z(e){return(0,v.Z)("MuiFormLabel",e)}var h=(0,p.Z)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),b=o(37574),x=["children","className","color","component","disabled","error","filled","focused","required"],k=(0,m.ZP)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:function(e,r){var o=e.ownerState;return(0,i.Z)({},r.root,"secondary"===o.color&&r.colorSecondary,o.filled&&r.filled)}})((function(e){var r,o=e.theme,t=e.ownerState;return(0,i.Z)({color:(o.vars||o).palette.text.secondary},o.typography.body1,(r={lineHeight:"1.4375em",padding:0,position:"relative"},(0,a.Z)(r,"&.".concat(h.focused),{color:(o.vars||o).palette[t.color].main}),(0,a.Z)(r,"&.".concat(h.disabled),{color:(o.vars||o).palette.text.disabled}),(0,a.Z)(r,"&.".concat(h.error),{color:(o.vars||o).palette.error.main}),r))})),w=(0,m.ZP)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:function(e,r){return r.asterisk}})((function(e){var r=e.theme;return(0,a.Z)({},"&.".concat(h.error),{color:(r.vars||r).palette.error.main})})),F=n.forwardRef((function(e,r){var o=(0,f.Z)({props:e,name:"MuiFormLabel"}),a=o.children,n=o.className,m=o.component,p=void 0===m?"label":m,v=(0,t.Z)(o,x),h=(0,c.Z)(),F=(0,d.Z)({props:o,muiFormControl:h,states:["color","required","focused","disabled","error","filled"]}),z=(0,i.Z)({},o,{color:F.color||"primary",component:p,disabled:F.disabled,error:F.error,filled:F.filled,focused:F.focused,required:F.required}),q=function(e){var r=e.classes,o=e.color,a=e.focused,t=e.disabled,i=e.error,n=e.filled,l=e.required,d={root:["root","color".concat((0,u.Z)(o)),t&&"disabled",i&&"error",n&&"filled",a&&"focused",l&&"required"],asterisk:["asterisk",i&&"error"]};return(0,s.Z)(d,Z,r)}(z);return(0,b.jsxs)(k,(0,i.Z)({as:p,ownerState:z,className:(0,l.Z)(q.root,n),ref:r},v,{children:[a,F.required&&(0,b.jsxs)(w,{ownerState:z,"aria-hidden":!0,className:q.asterisk,children:["\u2009","*"]})]}))})),z=o(50504),q=["disableAnimation","margin","shrink","variant","className"],R=(0,m.ZP)(F,{shouldForwardProp:function(e){return(0,m.FO)(e)||"classes"===e},name:"MuiInputLabel",slot:"Root",overridesResolver:function(e,r){var o=e.ownerState;return[(0,a.Z)({},"& .".concat(h.asterisk),r.asterisk),r.root,o.formControl&&r.formControl,"small"===o.size&&r.sizeSmall,o.shrink&&r.shrink,!o.disableAnimation&&r.animated,o.focused&&r.focused,r[o.variant]]}})((function(e){var r=e.theme,o=e.ownerState;return(0,i.Z)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},o.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===o.size&&{transform:"translate(0, 17px) scale(1)"},o.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!o.disableAnimation&&{transition:r.transitions.create(["color","transform","max-width"],{duration:r.transitions.duration.shorter,easing:r.transitions.easing.easeOut})},"filled"===o.variant&&(0,i.Z)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===o.size&&{transform:"translate(12px, 13px) scale(1)"},o.shrink&&(0,i.Z)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===o.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===o.variant&&(0,i.Z)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===o.size&&{transform:"translate(14px, 9px) scale(1)"},o.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))})),g=n.forwardRef((function(e,r){var o=(0,f.Z)({name:"MuiInputLabel",props:e}),a=o.disableAnimation,n=void 0!==a&&a,m=o.shrink,p=o.className,v=(0,t.Z)(o,q),Z=(0,c.Z)(),h=m;"undefined"===typeof h&&Z&&(h=Z.filled||Z.focused||Z.adornedStart);var x=(0,d.Z)({props:o,muiFormControl:Z,states:["size","variant","required","focused"]}),k=(0,i.Z)({},o,{disableAnimation:n,formControl:Z,shrink:h,size:x.size,variant:x.variant,required:x.required,focused:x.focused}),w=function(e){var r=e.classes,o=e.formControl,a=e.size,t=e.shrink,n=e.disableAnimation,l=e.variant,d=e.required,c={root:["root",o&&"formControl",!n&&"animated",t&&"shrink",a&&"normal"!==a&&"size".concat((0,u.Z)(a)),l],asterisk:[d&&"asterisk"]},f=(0,s.Z)(c,z.Y,r);return(0,i.Z)({},r,f)}(k);return(0,b.jsx)(R,(0,i.Z)({"data-shrink":h,ownerState:k,ref:r,className:(0,l.Z)(w.root,p)},v,{classes:w}))}))},50504:function(e,r,o){o.d(r,{Y:function(){return i}});var a=o(62746),t=o(2975);function i(e){return(0,t.Z)("MuiInputLabel",e)}var n=(0,a.Z)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);r.Z=n},87006:function(e,r,o){var a=o(7896),t=o(31461),i=o(30969),n=o(87023),s=o(26540),l=o(3210),d=o(45971),c=o(17363),u=o(48525),f=o(42412),m=o(33656),p=o(51385),v=o(87535),Z=o(98123),h=o(39130),b=o(99453),x=o(37574),k=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],w={standard:u.Z,filled:f.Z,outlined:m.Z},F=(0,d.ZP)(v.Z,{name:"MuiTextField",slot:"Root",overridesResolver:function(e,r){return r.root}})({}),z=i.forwardRef((function(e,r){var o=(0,c.Z)({props:e,name:"MuiTextField"}),i=o.autoComplete,d=o.autoFocus,u=void 0!==d&&d,f=o.children,m=o.className,v=o.color,z=void 0===v?"primary":v,q=o.defaultValue,R=o.disabled,g=void 0!==R&&R,S=o.error,y=void 0!==S&&S,C=o.FormHelperTextProps,M=o.fullWidth,P=void 0!==M&&M,N=o.helperText,T=o.id,I=o.InputLabelProps,L=o.inputProps,W=o.InputProps,j=o.inputRef,A=o.label,H=o.maxRows,E=o.minRows,_=o.multiline,O=void 0!==_&&_,B=o.name,V=o.onBlur,Y=o.onChange,D=o.onFocus,G=o.placeholder,J=o.required,K=void 0!==J&&J,Q=o.rows,U=o.select,X=void 0!==U&&U,$=o.SelectProps,ee=o.type,re=o.value,oe=o.variant,ae=void 0===oe?"outlined":oe,te=(0,t.Z)(o,k),ie=(0,a.Z)({},o,{autoFocus:u,color:z,disabled:g,error:y,fullWidth:P,multiline:O,required:K,select:X,variant:ae}),ne=function(e){var r=e.classes;return(0,s.Z)({root:["root"]},b.I,r)}(ie);var se={};"outlined"===ae&&(I&&"undefined"!==typeof I.shrink&&(se.notched=I.shrink),se.label=A),X&&($&&$.native||(se.id=void 0),se["aria-describedby"]=void 0);var le=(0,l.Z)(T),de=N&&le?"".concat(le,"-helper-text"):void 0,ce=A&&le?"".concat(le,"-label"):void 0,ue=w[ae],fe=(0,x.jsx)(ue,(0,a.Z)({"aria-describedby":de,autoComplete:i,autoFocus:u,defaultValue:q,fullWidth:P,multiline:O,name:B,rows:Q,maxRows:H,minRows:E,type:ee,value:re,id:le,inputRef:j,onBlur:V,onChange:Y,onFocus:D,placeholder:G,inputProps:L},se,W));return(0,x.jsxs)(F,(0,a.Z)({className:(0,n.Z)(ne.root,m),disabled:g,error:y,fullWidth:P,ref:r,required:K,color:z,variant:ae,ownerState:ie},te,{children:[null!=A&&""!==A&&(0,x.jsx)(p.Z,(0,a.Z)({htmlFor:le,id:ce},I,{children:A})),X?(0,x.jsx)(h.Z,(0,a.Z)({"aria-describedby":de,id:le,labelId:ce,value:re,input:fe},$,{children:f})):fe,N&&(0,x.jsx)(Z.Z,(0,a.Z)({id:de},C,{children:N}))]}))}));r.Z=z},99453:function(e,r,o){o.d(r,{I:function(){return i}});var a=o(62746),t=o(2975);function i(e){return(0,t.Z)("MuiTextField",e)}var n=(0,a.Z)("MuiTextField",["root"]);r.Z=n}}]);
|
|
2
|
+
//# sourceMappingURL=7006.bb90b167.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 v},mc:function(){return m}});var r=t(32723),a=t(34795),o=t(96234),c=t(30969),s=t(17708),i=t(50576),u=t(30134),l=t(41395),p=t(59505),d=t(23938),f=t(37574),h=(0,c.createContext)({}),x=h.Provider;h.Consumer;function m(e){var n=e.children,t=(0,s.Z)("spaceGatewayForInstall",null),h=(0,o.Z)(t,2),m=h[0],v=h[1],k=(0,d.y0)(),w=k.blocklet,b=k.actions.refreshBlocklet,y=(0,c.useMemo)((function(){return(0,u.EJ)(w)}),[w]),g=(0,l.h6)().api,Z=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 v(n),e.next=3,E(n.endpoint);case 3:b();case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),E=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,g.configBlocklet({input:{did:[w.meta.did],configs:[{key:p.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:n}]}});case 2:b();case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,c.useEffect)((function(){function e(){return(e=(0,a.Z)((0,r.Z)().mark((function e(){var n,t;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(m){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,(0,u.nU)(m.endpoint,m.name);case 4:n=e.sent,t=(0,i.merge)(m,{name:n}),v(t);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[]),(0,f.jsx)(x,{value:{spaceGateway:m,deleteSpaceGateway:function(){v(null),b()},updateSpaceGateway:Z,storageEndpoint:y,settingStorageEndpoint:E},children:n})}function v(){return(0,c.useContext)(h)}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),f=t(19611),h=t.n(f),x=t(54470),m=t(38361),v=t(66629),k=t(43001),w=t(75255),b=t(26022),y=t(94308),g=t(99574),Z=t(19006),E=t(47650),j=t(20244),P=t(7017),L=t(59505),_=t(38507),C=t(23938),N=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})),S=t(74197),I=t(41981),R=t(37574),O=(0,l.lazy)((function(){return t.e(3033).then(t.bind(t,73033))})),T=(0,l.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(4319),t.e(2972)]).then(t.bind(t,55537))})),A=(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))})),K=(0,l.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(468),t.e(9596)]).then(t.bind(t,42123))})),U=(0,l.lazy)((function(){return Promise.all([t.e(2026),t.e(8983)]).then(t.bind(t,38641))})),M=(0,l.lazy)((function(){return t.e(9900).then(t.bind(t,89900))})),F=(0,l.lazy)((function(){return t.e(5982).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)(),f=(0,C.y0)(),k=f.meta,z=f.blocklet,W=f.actions,H=f.loading,$=localStorage.getItem("blocklet-server-url"),q=(0,_.tX)("fromLauncher");(0,l.useEffect)((function(){W.refreshMeta(),W.refreshBlocklet({showError:!1}),(0,_.NU)()}),[]),(0,l.useEffect)((function(){W.refreshFuel({showError:!1})}),[null===z||void 0===z||null===(e=z.meta)||void 0===e?void 0:e.did]);var X="".concat(j.WELLKNOWN_SERVICE_PATH_PREFIX,"/setup"),J=[{key:"connect",name:o("setup.steps.connect"),path:h()(X,"connect")},{key:"access",name:o("setup.steps.access"),path:h()(X,"access")},{key:"domain",name:o("setup.steps.domain"),path:h()(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===L.BLOCKLET_APP_SPACE_ENDPOINTS.REQUIRED)return{key:"did-space",name:(0,R.jsxs)(R.Fragment,{children:[o("setup.steps.didSpace")," ",(0,R.jsx)(B,{})]}),path:h()(X,"did-space")};if(t===L.BLOCKLET_APP_SPACE_ENDPOINTS.OPTIONAL)return{key:"did-space",name:(0,R.jsx)(R.Fragment,{children:o("setup.steps.didSpace")}),path:h()(X,"did-space")};throw new Error("capabilities.didSpace cannot take the value ".concat(t))}(z),{key:"config",name:(0,R.jsxs)(R.Fragment,{children:[o("setup.steps.config")," ",(0,_.o2)(k)&&(0,R.jsx)(B,{})]}),path:h()(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,R.jsxs)(R.Fragment,{children:[o("setup.steps.fuel")," ",(0,R.jsx)(B,{})]}),path:h()(X,"fuel")}:null].filter(Boolean),Y=J.findIndex((function(e){return"".concat(_.Bq.replace(/\/$/,"")).concat(X,"/").concat(e.key)===window.location.pathname})),Q=h()(_.Bq,j.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo"),V=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=J.findIndex((function(e){return e.key===n})),d(a>-1?"".concat(h()(X,J[a].key)).concat(r):"".concat(h()(X,"complete")).concat(r))):J[Y+1]?d("".concat(h()(X,J[Y+1].key)).concat(r)):d("".concat(h()(X,"complete")).concat(r)),e.next=4,W.refreshBlocklet();case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),ee=function(){d(-1)};function ne(e,n){return z?(0,R.jsx)(e,(0,s.Z)((0,s.Z)({blocklet:z},n),{},{onNext:V,onPrevious:ee})):(0,R.jsx)(m.Z,{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",children:(0,R.jsx)(y.Z,{})})}var te=function(){window.open($)},re=r?(0,R.jsx)(Z.Z,{onClick:te,width:"32",height:"32",style:{cursor:"pointer"}}):(0,R.jsx)(E.Z,{onClick:te,width:"128",height:"48",style:{marginTop:-1,cursor:"pointer"}}),ae=[{key:"install",name:o("launchBlocklet.steps.installApp"),path:h()(X,"install")},{key:"setup",name:o("setup.steps.launchApp"),children:J}],oe=[{key:"agreement",name:o("launchBlocklet.introduction"),path:h()(X,"agreement")}].concat(ae);return q&&(oe=[{key:"purchase-space",name:o("launchBlocklet.steps.purchaseSpace")},{key:"prepare-space",name:o("launchBlocklet.steps.prepareSpace")}].concat(ae)),(0,R.jsx)(G,{steps:oe,children:(0,R.jsx)(S.cK,{children:(0,R.jsxs)(I.mc,{children:[(0,R.jsx)(x.Global,{styles:D}),(0,R.jsx)(v.Z,{locale:c,loading:H,blockletMeta:(0,s.Z)((0,s.Z)({},k),{},{title:(0,P.getDisplayName)((0,s.Z)((0,s.Z)({},z),{},{meta:k}))}),navLogo:re,pcWidth:"80%",style:{height:"100%"},logoUrl:Q,useOfSkeleton:!1,headerEndAddons:(0,R.jsx)(g.Z,{SessionContext:N.B3,sessionManagerProps:{disableLogout:!0}}),launchingText:o("setup.title"),children:(0,R.jsxs)(p.Routes,{children:[(0,R.jsx)(p.Route,{path:"connect",element:(0,R.jsx)(O,{onNext:V})}),(0,R.jsx)(p.Route,{path:"domain",element:ne(K)}),(0,R.jsx)(p.Route,{path:"did-space",element:ne(A)}),(0,R.jsx)(p.Route,{path:"config",element:ne(T)}),(0,R.jsx)(p.Route,{path:"access",element:ne(U)}),(0,R.jsx)(p.Route,{path:"fuel",element:ne(M)}),(0,R.jsx)(p.Route,{path:"complete",element:ne(F)}),(0,R.jsx)(p.Route,{path:"*",element:(0,R.jsx)(p.Navigate,{to:"connect".concat(window.location.search),replace:!0})})]})})]})})})}var D=(0,x.css)(a||(a=(0,c.Z)(["\n html,\n body,\n #root,\n #root > .wrapper {\n height: 100%;\n }\n"]))),G=(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(87843),f=t(26681),h=t(26022),x=t(46513),m=t(91077),v=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)(h.RD).locale,b=(0,p.useLocation)(),y={"/store":{endpoint:"https://store.blocklet.io"},"/dashboard":{path:"/conceptual/overview"},"/settings/router":{path:"/conceptual/server-architecture"}};return(0,v.jsxs)(w,{children:[t.map((function(e,n){return(0,c.cloneElement)(e,{key:n})})),r&&(0,v.jsx)(f.Z,{"data-cy":"locale-addon",icon:x.Z,size:23,showText:!1,className:"locale-addon"}),a&&(0,v.jsx)(l.Z,{onClick:function(){var e=b.pathname,n={};e.indexOf("/store")>-1?n=y["/store"]:y[e]&&(n=y[e]),window.open("".concat(n.endpoint||"https://developer.blocklet.io/docs","/").concat(k).concat(n.path||""),"_blank")},children:(0,v.jsx)(m.Z,{})}),s&&(0,v.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 Z},Jf:function(){return g},LQ:function(){return f},Nb:function(){return h},Xv:function(){return p},ag:function(){return v},mo:function(){return m},nD:function(){return d},nU:function(){return b},w2:function(){return k}});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 f(e){return e.replace(/\/$/,"").split("/").at(-4)}function h(e){return x.apply(this,arguments)}function x(){return(x=(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 m(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 v(e){var n=new URL(e);return(0,u.xn)(n.origin,n.pathname)}function k(e){return w.apply(this,arguments)}function w(){return(w=(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=v(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 b(e){return y.apply(this,arguments)}function y(){return(y=(0,a.Z)((0,r.Z)().mark((function e(n){var t,a,o;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","");case 3:return e.next=5,l.hi.head(n,{timeout:3e3});case 5:return t=e.sent,a=t.headers,o=a["x-space-name"],e.abrupt("return",o?decodeURIComponent(o):"");case 11:return e.prev=11,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return","");case 15:case"end":return e.stop()}}),e,null,[[0,11]])})))).apply(this,arguments)}function g(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 Z=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}}}]);
|
|
2
|
+
//# sourceMappingURL=779.383b4b4a.chunk.js.map
|