@abtnode/webapp 1.16.16-beta-e038cde7 → 1.16.16-beta-d6c5ed65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/build/asset-manifest.json +25 -25
- package/build/index.html +1 -1
- package/build/service-worker.js +1 -1
- package/build/static/js/{2334.2277b9a2.chunk.js → 2334.80922946.chunk.js} +1 -1
- package/build/static/js/{3389.bbd62a76.chunk.js → 3389.e8ffb928.chunk.js} +1 -1
- package/build/static/js/{373.1bcf03f8.chunk.js → 373.ebfccf8c.chunk.js} +1 -1
- package/build/static/js/4718.5dedb2bb.chunk.js +2 -0
- package/build/static/js/4775.ae60d291.chunk.js +1 -0
- package/build/static/js/{4906.c2c01c10.chunk.js → 4906.0feba7a6.chunk.js} +1 -1
- package/build/static/js/{5526.d759de88.chunk.js → 5526.ca427968.chunk.js} +2 -2
- package/build/static/js/5555.46ed37f5.chunk.js +1 -0
- package/build/static/js/{5808.c81d46a7.chunk.js → 5808.76c78a42.chunk.js} +1 -1
- package/build/static/js/{5904.afb2521a.chunk.js → 5904.41f0cec6.chunk.js} +1 -1
- package/build/static/js/{6412.e559c8f4.chunk.js → 6412.ae4af2c3.chunk.js} +1 -1
- package/build/static/js/{6511.20b2bda0.chunk.js → 6511.d2aa1c44.chunk.js} +1 -1
- package/build/static/js/6651.b79345ec.chunk.js +2 -0
- package/build/static/js/{6950.39b50c6e.chunk.js → 6950.d0f37362.chunk.js} +1 -1
- package/build/static/js/{6960.ed78ea9f.chunk.js → 6960.12044cf7.chunk.js} +1 -1
- package/build/static/js/7020.5aaf930e.chunk.js +1 -0
- package/build/static/js/7126.1acd7749.chunk.js +1 -0
- package/build/static/js/{7327.523610c0.chunk.js → 7327.2495f350.chunk.js} +1 -1
- package/build/static/js/7718.68cb259e.chunk.js +1 -0
- package/build/static/js/{7913.df3492dc.chunk.js → 7913.510dab4d.chunk.js} +1 -1
- package/build/static/js/{8973.b052330c.chunk.js → 8973.395a342c.chunk.js} +1 -1
- package/build/static/js/{8986.09896e72.chunk.js → 8986.0d4999c0.chunk.js} +1 -1
- package/build/static/js/{9249.c3058bf3.chunk.js → 9249.4df85d2d.chunk.js} +1 -1
- package/build/static/js/main.035c3bc5.js +2 -0
- package/build/static/js/{main.168167e0.js.LICENSE.txt → main.035c3bc5.js.LICENSE.txt} +1 -1
- package/package.json +1 -1
- package/build/static/js/4718.cb2b5d99.chunk.js +0 -2
- package/build/static/js/4775.dde53f2e.chunk.js +0 -1
- package/build/static/js/5015.4b2a6f82.chunk.js +0 -1
- package/build/static/js/7020.995924d8.chunk.js +0 -1
- package/build/static/js/7126.6c873294.chunk.js +0 -1
- package/build/static/js/7718.e4a5899b.chunk.js +0 -1
- package/build/static/js/9272.1db6e724.chunk.js +0 -2
- package/build/static/js/main.168167e0.js +0 -2
- /package/build/static/js/{4718.cb2b5d99.chunk.js.LICENSE.txt → 4718.5dedb2bb.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{5526.d759de88.chunk.js.LICENSE.txt → 5526.ca427968.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{9272.1db6e724.chunk.js.LICENSE.txt → 6651.b79345ec.chunk.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[5904],{35258:function(o,e,t){"use strict";var a=t(71600);e.Z=void 0;var r=a(t(56930)),n=t(96266),i=(0,r.default)((0,n.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");e.Z=i},70648:function(o,e,t){"use strict";var a=t(71600);e.Z=void 0;var r=a(t(56930)),n=t(96266),i=(0,r.default)((0,n.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");e.Z=i},22754:function(o,e,t){"use strict";var a=t(71600);e.Z=void 0;var r=a(t(56930)),n=t(96266),i=(0,r.default)((0,n.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");e.Z=i},49647:function(o,e,t){"use strict";var a=t(71600);e.Z=void 0;var r=a(t(56930)),n=t(96266),i=(0,r.default)((0,n.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");e.Z=i},32207:function(o,e,t){"use strict";var a=t(71600);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=a(t(56930)),n=t(96266),i=(0,r.default)((0,n.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");e.default=i},17545:function(o,e,t){"use strict";var a=t(71600);e.Z=void 0;var r=a(t(56930)),n=t(96266),i=(0,r.default)((0,n.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");e.Z=i},98451:function(o,e,t){"use strict";var a=t(71600);e.Z=void 0;var r=a(t(56930)),n=t(96266),i=(0,r.default)((0,n.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");e.Z=i},80633:function(o,e,t){"use strict";t.d(e,{Z:function(){return R}});var a=t(56666),r=t(31461),n=t(7896),i=t(5057),c=t(8271),l=t(91213),d=t(66685),s=t(6285),u=t(62773),v=t(42908),p=t(31821),f=t(18561);function h(o){return(0,f.Z)("MuiButtonGroup",o)}var Z=(0,p.Z)("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","fullWidth","vertical","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary"]),g=t(17681),b=t(96266),m=["children","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"],x=(0,u.ZP)("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:function(o,e){var t=o.ownerState;return[(0,a.Z)({},"& .".concat(Z.grouped),e.grouped),(0,a.Z)({},"& .".concat(Z.grouped),e["grouped".concat((0,s.Z)(t.orientation))]),(0,a.Z)({},"& .".concat(Z.grouped),e["grouped".concat((0,s.Z)(t.variant))]),(0,a.Z)({},"& .".concat(Z.grouped),e["grouped".concat((0,s.Z)(t.variant)).concat((0,s.Z)(t.orientation))]),(0,a.Z)({},"& .".concat(Z.grouped),e["grouped".concat((0,s.Z)(t.variant)).concat((0,s.Z)(t.color))]),e.root,e[t.variant],!0===t.disableElevation&&e.disableElevation,t.fullWidth&&e.fullWidth,"vertical"===t.orientation&&e.vertical]}})((function(o){var e=o.theme,t=o.ownerState;return(0,n.Z)({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[2]},t.disableElevation&&{boxShadow:"none"},t.fullWidth&&{width:"100%"},"vertical"===t.orientation&&{flexDirection:"column"},(0,a.Z)({},"& .".concat(Z.grouped),(0,n.Z)({minWidth:40,"&:not(:first-of-type)":(0,n.Z)({},"horizontal"===t.orientation&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},"vertical"===t.orientation&&{borderTopRightRadius:0,borderTopLeftRadius:0},"outlined"===t.variant&&"horizontal"===t.orientation&&{marginLeft:-1},"outlined"===t.variant&&"vertical"===t.orientation&&{marginTop:-1}),"&:not(:last-of-type)":(0,n.Z)({},"horizontal"===t.orientation&&{borderTopRightRadius:0,borderBottomRightRadius:0},"vertical"===t.orientation&&{borderBottomRightRadius:0,borderBottomLeftRadius:0},"text"===t.variant&&"horizontal"===t.orientation&&(0,a.Z)({borderRight:e.vars?"1px solid rgba(".concat(e.vars.palette.common.onBackgroundChannel," / 0.23)"):"1px solid ".concat("light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")},"&.".concat(Z.disabled),{borderRight:"1px solid ".concat((e.vars||e).palette.action.disabled)}),"text"===t.variant&&"vertical"===t.orientation&&(0,a.Z)({borderBottom:e.vars?"1px solid rgba(".concat(e.vars.palette.common.onBackgroundChannel," / 0.23)"):"1px solid ".concat("light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")},"&.".concat(Z.disabled),{borderBottom:"1px solid ".concat((e.vars||e).palette.action.disabled)}),"text"===t.variant&&"inherit"!==t.color&&{borderColor:e.vars?"rgba(".concat(e.vars.palette[t.color].mainChannel," / 0.5)"):(0,d.Fq)(e.palette[t.color].main,.5)},"outlined"===t.variant&&"horizontal"===t.orientation&&{borderRightColor:"transparent"},"outlined"===t.variant&&"vertical"===t.orientation&&{borderBottomColor:"transparent"},"contained"===t.variant&&"horizontal"===t.orientation&&(0,a.Z)({borderRight:"1px solid ".concat((e.vars||e).palette.grey[400])},"&.".concat(Z.disabled),{borderRight:"1px solid ".concat((e.vars||e).palette.action.disabled)}),"contained"===t.variant&&"vertical"===t.orientation&&(0,a.Z)({borderBottom:"1px solid ".concat((e.vars||e).palette.grey[400])},"&.".concat(Z.disabled),{borderBottom:"1px solid ".concat((e.vars||e).palette.action.disabled)}),"contained"===t.variant&&"inherit"!==t.color&&{borderColor:(e.vars||e).palette[t.color].dark},{"&:hover":(0,n.Z)({},"outlined"===t.variant&&"horizontal"===t.orientation&&{borderRightColor:"currentColor"},"outlined"===t.variant&&"vertical"===t.orientation&&{borderBottomColor:"currentColor"})}),"&:hover":(0,n.Z)({},"contained"===t.variant&&{boxShadow:"none"})},"contained"===t.variant&&{boxShadow:"none"})))})),R=i.forwardRef((function(o,e){var t=(0,v.Z)({props:o,name:"MuiButtonGroup"}),a=t.children,d=t.className,u=t.color,p=void 0===u?"primary":u,f=t.component,Z=void 0===f?"div":f,R=t.disabled,z=void 0!==R&&R,C=t.disableElevation,S=void 0!==C&&C,y=t.disableFocusRipple,w=void 0!==y&&y,k=t.disableRipple,M=void 0!==k&&k,j=t.fullWidth,L=void 0!==j&&j,B=t.orientation,P=void 0===B?"horizontal":B,E=t.size,V=void 0===E?"medium":E,T=t.variant,W=void 0===T?"outlined":T,H=(0,r.Z)(t,m),N=(0,n.Z)({},t,{color:p,component:Z,disabled:z,disableElevation:S,disableFocusRipple:w,disableRipple:M,fullWidth:L,orientation:P,size:V,variant:W}),O=function(o){var e=o.classes,t=o.color,a=o.disabled,r=o.disableElevation,n=o.fullWidth,i=o.orientation,c=o.variant,d={root:["root",c,"vertical"===i&&"vertical",n&&"fullWidth",r&&"disableElevation"],grouped:["grouped","grouped".concat((0,s.Z)(i)),"grouped".concat((0,s.Z)(c)),"grouped".concat((0,s.Z)(c)).concat((0,s.Z)(i)),"grouped".concat((0,s.Z)(c)).concat((0,s.Z)(t)),a&&"disabled"]};return(0,l.Z)(d,h,e)}(N),F=i.useMemo((function(){return{className:O.grouped,color:p,disabled:z,disableElevation:S,disableFocusRipple:w,disableRipple:M,fullWidth:L,size:V,variant:W}}),[p,z,S,w,M,L,V,W,O.grouped]);return(0,b.jsx)(x,(0,n.Z)({as:Z,role:"group",className:(0,c.Z)(O.root,d),ref:e,ownerState:N},H,{children:(0,b.jsx)(g.Z.Provider,{value:F,children:a})}))}))},65140:function(o,e,t){"use strict";t.d(e,{Z:function(){return P}});var a=t(56666),r=t(31461),n=t(7896),i=t(5057),c=t(8271),l=t(91213),d=t(66685),s=t(39273),u=t(42908),v=t(57471),p=t(96266),f=(0,v.Z)((0,p.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),h=(0,v.Z)((0,p.jsx)("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked"),Z=t(62773),g=(0,Z.ZP)("span")({position:"relative",display:"flex"}),b=(0,Z.ZP)(f)({transform:"scale(1)"}),m=(0,Z.ZP)(h)((function(o){var e=o.theme,t=o.ownerState;return(0,n.Z)({left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest})},t.checked&&{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})})}));var x=function(o){var e=o.checked,t=void 0!==e&&e,a=o.classes,r=void 0===a?{}:a,i=o.fontSize,c=(0,n.Z)({},o,{checked:t});return(0,p.jsxs)(g,{className:r.root,ownerState:c,children:[(0,p.jsx)(b,{fontSize:i,className:r.background,ownerState:c}),(0,p.jsx)(m,{fontSize:i,className:r.dot,ownerState:c})]})},R=t(6285),z=t(26393),C=t(42903);var S=t(31821),y=t(18561);function w(o){return(0,y.Z)("MuiRadio",o)}var k=(0,S.Z)("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary"]),M=["checked","checkedIcon","color","icon","name","onChange","size","className"],j=(0,Z.ZP)(s.Z,{shouldForwardProp:function(o){return(0,Z.FO)(o)||"classes"===o},name:"MuiRadio",slot:"Root",overridesResolver:function(o,e){var t=o.ownerState;return[e.root,e["color".concat((0,R.Z)(t.color))]]}})((function(o){var e=o.theme,t=o.ownerState;return(0,n.Z)({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?"rgba(".concat("default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel," / ").concat(e.vars.palette.action.hoverOpacity,")"):(0,d.Fq)("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&(0,a.Z)({},"&.".concat(k.checked),{color:(e.vars||e).palette[t.color].main}),(0,a.Z)({},"&.".concat(k.disabled),{color:(e.vars||e).palette.action.disabled}))}));var L=(0,p.jsx)(x,{checked:!0}),B=(0,p.jsx)(x,{}),P=i.forwardRef((function(o,e){var t,a,d,s,v=(0,u.Z)({props:o,name:"MuiRadio"}),f=v.checked,h=v.checkedIcon,Z=void 0===h?L:h,g=v.color,b=void 0===g?"primary":g,m=v.icon,x=void 0===m?B:m,S=v.name,y=v.onChange,k=v.size,P=void 0===k?"medium":k,E=v.className,V=(0,r.Z)(v,M),T=(0,n.Z)({},v,{color:b,size:P}),W=function(o){var e=o.classes,t=o.color,a={root:["root","color".concat((0,R.Z)(t))]};return(0,n.Z)({},e,(0,l.Z)(a,w,e))}(T),H=i.useContext(C.Z),N=f,O=(0,z.Z)(y,H&&H.onChange),F=S;return H&&("undefined"===typeof N&&(d=H.value,N="object"===typeof(s=v.value)&&null!==s?d===s:String(d)===String(s)),"undefined"===typeof F&&(F=H.name)),(0,p.jsx)(j,(0,n.Z)({type:"radio",icon:i.cloneElement(x,{fontSize:null!=(t=B.props.fontSize)?t:P}),checkedIcon:i.cloneElement(Z,{fontSize:null!=(a=L.props.fontSize)?a:P}),ownerState:T,classes:W,name:F,checked:N,onChange:O,ref:e,className:(0,c.Z)(W.root,E)},V))}))},87916:function(o,e,t){"use strict";var a=t(96234),r=t(7896),n=t(31461),i=t(5057),c=t(25506),l=t(2286),d=t(58708),s=t(42903),u=t(80538),v=t(96266),p=["actions","children","defaultValue","name","onChange","value"],f=i.forwardRef((function(o,e){var t=o.actions,f=o.children,h=o.defaultValue,Z=o.name,g=o.onChange,b=o.value,m=(0,n.Z)(o,p),x=i.useRef(null),R=(0,d.Z)({controlled:b,default:h,name:"RadioGroup"}),z=(0,a.Z)(R,2),C=z[0],S=z[1];i.useImperativeHandle(t,(function(){return{focus:function(){var o=x.current.querySelector("input:not(:disabled):checked");o||(o=x.current.querySelector("input:not(:disabled)")),o&&o.focus()}}}),[]);var y=(0,l.Z)(e,x),w=(0,u.Z)(Z),k=i.useMemo((function(){return{name:w,onChange:function(o){S(o.target.value),g&&g(o,o.target.value)},value:C}}),[w,g,S,C]);return(0,v.jsx)(s.Z.Provider,{value:k,children:(0,v.jsx)(c.Z,(0,r.Z)({role:"radiogroup",ref:y},m,{children:f}))})}));e.Z=f},42903:function(o,e,t){"use strict";var a=t(5057).createContext(void 0);e.Z=a},3895:function(o,e,t){var a=t(98323),r=t(97247),n=t(89479),i=t(73470),c=t(74631),l=t(51565);o.exports=function(o,e,t,d){var s=-1,u=r,v=!0,p=o.length,f=[],h=e.length;if(!p)return f;t&&(e=i(e,c(t))),d?(u=n,v=!1):e.length>=200&&(u=l,v=!1,e=new a(e));o:for(;++s<p;){var Z=o[s],g=null==t?Z:t(Z);if(Z=d||0!==Z?Z:0,v&&g===g){for(var b=h;b--;)if(e[b]===g)continue o;f.push(Z)}else u(e,g,d)||f.push(Z)}return f}},13973:function(o,e,t){var a=t(3895),r=t(61350),n=t(43676);o.exports=function(o,e,t){var i=o.length;if(i<2)return i?n(o[0]):[];for(var c=-1,l=Array(i);++c<i;)for(var d=o[c],s=-1;++s<i;)s!=c&&(l[c]=a(l[c]||d,o[s],e,t));return n(r(l,1),e,t)}},69163:function(o,e,t){var a=t(5948),r=t(86456),n=t(13973),i=t(7244),c=t(59408),l=r((function(o){var e=c(o);return e="function"==typeof e?e:void 0,n(a(o,i),void 0,e)}));o.exports=l},33665:function(o,e,t){"use strict";function a(o){if(null==o)throw new TypeError("Cannot destructure "+o)}t.d(e,{Z:function(){return a}})}}]);
|
|
1
|
+
(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[5904],{35258:function(o,e,t){"use strict";var a=t(71600);e.Z=void 0;var r=a(t(56930)),n=t(96266),i=(0,r.default)((0,n.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");e.Z=i},70648:function(o,e,t){"use strict";var a=t(71600);e.Z=void 0;var r=a(t(56930)),n=t(96266),i=(0,r.default)((0,n.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");e.Z=i},22754:function(o,e,t){"use strict";var a=t(71600);e.Z=void 0;var r=a(t(56930)),n=t(96266),i=(0,r.default)((0,n.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");e.Z=i},49647:function(o,e,t){"use strict";var a=t(71600);e.Z=void 0;var r=a(t(56930)),n=t(96266),i=(0,r.default)((0,n.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");e.Z=i},32207:function(o,e,t){"use strict";var a=t(71600);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=a(t(56930)),n=t(96266),i=(0,r.default)((0,n.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");e.default=i},17545:function(o,e,t){"use strict";var a=t(71600);e.Z=void 0;var r=a(t(56930)),n=t(96266),i=(0,r.default)((0,n.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");e.Z=i},98451:function(o,e,t){"use strict";var a=t(71600);e.Z=void 0;var r=a(t(56930)),n=t(96266),i=(0,r.default)((0,n.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");e.Z=i},80633:function(o,e,t){"use strict";t.d(e,{Z:function(){return z}});var a=t(56666),r=t(31461),n=t(7896),i=t(5057),c=t(8271),l=t(91213),d=t(66685),s=t(6285),u=t(62773),v=t(42908),p=t(31821),f=t(18561);function h(o){return(0,f.Z)("MuiButtonGroup",o)}var Z=(0,p.Z)("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","fullWidth","vertical","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary"]),g=t(17681),b=t(96266),m=["children","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"],x=(0,u.ZP)("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:function(o,e){var t=o.ownerState;return[(0,a.Z)({},"& .".concat(Z.grouped),e.grouped),(0,a.Z)({},"& .".concat(Z.grouped),e["grouped".concat((0,s.Z)(t.orientation))]),(0,a.Z)({},"& .".concat(Z.grouped),e["grouped".concat((0,s.Z)(t.variant))]),(0,a.Z)({},"& .".concat(Z.grouped),e["grouped".concat((0,s.Z)(t.variant)).concat((0,s.Z)(t.orientation))]),(0,a.Z)({},"& .".concat(Z.grouped),e["grouped".concat((0,s.Z)(t.variant)).concat((0,s.Z)(t.color))]),e.root,e[t.variant],!0===t.disableElevation&&e.disableElevation,t.fullWidth&&e.fullWidth,"vertical"===t.orientation&&e.vertical]}})((function(o){var e=o.theme,t=o.ownerState;return(0,n.Z)({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[2]},t.disableElevation&&{boxShadow:"none"},t.fullWidth&&{width:"100%"},"vertical"===t.orientation&&{flexDirection:"column"},(0,a.Z)({},"& .".concat(Z.grouped),(0,n.Z)({minWidth:40,"&:not(:first-of-type)":(0,n.Z)({},"horizontal"===t.orientation&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},"vertical"===t.orientation&&{borderTopRightRadius:0,borderTopLeftRadius:0},"outlined"===t.variant&&"horizontal"===t.orientation&&{marginLeft:-1},"outlined"===t.variant&&"vertical"===t.orientation&&{marginTop:-1}),"&:not(:last-of-type)":(0,n.Z)({},"horizontal"===t.orientation&&{borderTopRightRadius:0,borderBottomRightRadius:0},"vertical"===t.orientation&&{borderBottomRightRadius:0,borderBottomLeftRadius:0},"text"===t.variant&&"horizontal"===t.orientation&&(0,a.Z)({borderRight:e.vars?"1px solid rgba(".concat(e.vars.palette.common.onBackgroundChannel," / 0.23)"):"1px solid ".concat("light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")},"&.".concat(Z.disabled),{borderRight:"1px solid ".concat((e.vars||e).palette.action.disabled)}),"text"===t.variant&&"vertical"===t.orientation&&(0,a.Z)({borderBottom:e.vars?"1px solid rgba(".concat(e.vars.palette.common.onBackgroundChannel," / 0.23)"):"1px solid ".concat("light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")},"&.".concat(Z.disabled),{borderBottom:"1px solid ".concat((e.vars||e).palette.action.disabled)}),"text"===t.variant&&"inherit"!==t.color&&{borderColor:e.vars?"rgba(".concat(e.vars.palette[t.color].mainChannel," / 0.5)"):(0,d.Fq)(e.palette[t.color].main,.5)},"outlined"===t.variant&&"horizontal"===t.orientation&&{borderRightColor:"transparent"},"outlined"===t.variant&&"vertical"===t.orientation&&{borderBottomColor:"transparent"},"contained"===t.variant&&"horizontal"===t.orientation&&(0,a.Z)({borderRight:"1px solid ".concat((e.vars||e).palette.grey[400])},"&.".concat(Z.disabled),{borderRight:"1px solid ".concat((e.vars||e).palette.action.disabled)}),"contained"===t.variant&&"vertical"===t.orientation&&(0,a.Z)({borderBottom:"1px solid ".concat((e.vars||e).palette.grey[400])},"&.".concat(Z.disabled),{borderBottom:"1px solid ".concat((e.vars||e).palette.action.disabled)}),"contained"===t.variant&&"inherit"!==t.color&&{borderColor:(e.vars||e).palette[t.color].dark},{"&:hover":(0,n.Z)({},"outlined"===t.variant&&"horizontal"===t.orientation&&{borderRightColor:"currentColor"},"outlined"===t.variant&&"vertical"===t.orientation&&{borderBottomColor:"currentColor"})}),"&:hover":(0,n.Z)({},"contained"===t.variant&&{boxShadow:"none"})},"contained"===t.variant&&{boxShadow:"none"})))})),z=i.forwardRef((function(o,e){var t=(0,v.Z)({props:o,name:"MuiButtonGroup"}),a=t.children,d=t.className,u=t.color,p=void 0===u?"primary":u,f=t.component,Z=void 0===f?"div":f,z=t.disabled,R=void 0!==z&&z,C=t.disableElevation,S=void 0!==C&&C,y=t.disableFocusRipple,w=void 0!==y&&y,k=t.disableRipple,M=void 0!==k&&k,j=t.fullWidth,L=void 0!==j&&j,B=t.orientation,P=void 0===B?"horizontal":B,E=t.size,V=void 0===E?"medium":E,T=t.variant,W=void 0===T?"outlined":T,H=(0,r.Z)(t,m),N=(0,n.Z)({},t,{color:p,component:Z,disabled:R,disableElevation:S,disableFocusRipple:w,disableRipple:M,fullWidth:L,orientation:P,size:V,variant:W}),O=function(o){var e=o.classes,t=o.color,a=o.disabled,r=o.disableElevation,n=o.fullWidth,i=o.orientation,c=o.variant,d={root:["root",c,"vertical"===i&&"vertical",n&&"fullWidth",r&&"disableElevation"],grouped:["grouped","grouped".concat((0,s.Z)(i)),"grouped".concat((0,s.Z)(c)),"grouped".concat((0,s.Z)(c)).concat((0,s.Z)(i)),"grouped".concat((0,s.Z)(c)).concat((0,s.Z)(t)),a&&"disabled"]};return(0,l.Z)(d,h,e)}(N),F=i.useMemo((function(){return{className:O.grouped,color:p,disabled:R,disableElevation:S,disableFocusRipple:w,disableRipple:M,fullWidth:L,size:V,variant:W}}),[p,R,S,w,M,L,V,W,O.grouped]);return(0,b.jsx)(x,(0,n.Z)({as:Z,role:"group",className:(0,c.Z)(O.root,d),ref:e,ownerState:N},H,{children:(0,b.jsx)(g.Z.Provider,{value:F,children:a})}))}))},65140:function(o,e,t){"use strict";t.d(e,{Z:function(){return P}});var a=t(56666),r=t(31461),n=t(7896),i=t(5057),c=t(8271),l=t(91213),d=t(66685),s=t(39273),u=t(42908),v=t(57471),p=t(96266),f=(0,v.Z)((0,p.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),h=(0,v.Z)((0,p.jsx)("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked"),Z=t(62773),g=(0,Z.ZP)("span")({position:"relative",display:"flex"}),b=(0,Z.ZP)(f)({transform:"scale(1)"}),m=(0,Z.ZP)(h)((function(o){var e=o.theme,t=o.ownerState;return(0,n.Z)({left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest})},t.checked&&{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})})}));var x=function(o){var e=o.checked,t=void 0!==e&&e,a=o.classes,r=void 0===a?{}:a,i=o.fontSize,c=(0,n.Z)({},o,{checked:t});return(0,p.jsxs)(g,{className:r.root,ownerState:c,children:[(0,p.jsx)(b,{fontSize:i,className:r.background,ownerState:c}),(0,p.jsx)(m,{fontSize:i,className:r.dot,ownerState:c})]})},z=t(6285),R=t(26393),C=t(42903);var S=t(31821),y=t(18561);function w(o){return(0,y.Z)("MuiRadio",o)}var k=(0,S.Z)("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),M=["checked","checkedIcon","color","icon","name","onChange","size","className"],j=(0,Z.ZP)(s.Z,{shouldForwardProp:function(o){return(0,Z.FO)(o)||"classes"===o},name:"MuiRadio",slot:"Root",overridesResolver:function(o,e){var t=o.ownerState;return[e.root,e["color".concat((0,z.Z)(t.color))]]}})((function(o){var e=o.theme,t=o.ownerState;return(0,n.Z)({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?"rgba(".concat("default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel," / ").concat(e.vars.palette.action.hoverOpacity,")"):(0,d.Fq)("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&(0,a.Z)({},"&.".concat(k.checked),{color:(e.vars||e).palette[t.color].main}),(0,a.Z)({},"&.".concat(k.disabled),{color:(e.vars||e).palette.action.disabled}))}));var L=(0,p.jsx)(x,{checked:!0}),B=(0,p.jsx)(x,{}),P=i.forwardRef((function(o,e){var t,a,d,s,v=(0,u.Z)({props:o,name:"MuiRadio"}),f=v.checked,h=v.checkedIcon,Z=void 0===h?L:h,g=v.color,b=void 0===g?"primary":g,m=v.icon,x=void 0===m?B:m,S=v.name,y=v.onChange,k=v.size,P=void 0===k?"medium":k,E=v.className,V=(0,r.Z)(v,M),T=(0,n.Z)({},v,{color:b,size:P}),W=function(o){var e=o.classes,t=o.color,a=o.size,r={root:["root","color".concat((0,z.Z)(t)),"medium"!==a&&"size".concat((0,z.Z)(a))]};return(0,n.Z)({},e,(0,l.Z)(r,w,e))}(T),H=i.useContext(C.Z),N=f,O=(0,R.Z)(y,H&&H.onChange),F=S;return H&&("undefined"===typeof N&&(d=H.value,N="object"===typeof(s=v.value)&&null!==s?d===s:String(d)===String(s)),"undefined"===typeof F&&(F=H.name)),(0,p.jsx)(j,(0,n.Z)({type:"radio",icon:i.cloneElement(x,{fontSize:null!=(t=B.props.fontSize)?t:P}),checkedIcon:i.cloneElement(Z,{fontSize:null!=(a=L.props.fontSize)?a:P}),ownerState:T,classes:W,name:F,checked:N,onChange:O,ref:e,className:(0,c.Z)(W.root,E)},V))}))},87916:function(o,e,t){"use strict";var a=t(96234),r=t(7896),n=t(31461),i=t(5057),c=t(25506),l=t(2286),d=t(58708),s=t(42903),u=t(80538),v=t(96266),p=["actions","children","defaultValue","name","onChange","value"],f=i.forwardRef((function(o,e){var t=o.actions,f=o.children,h=o.defaultValue,Z=o.name,g=o.onChange,b=o.value,m=(0,n.Z)(o,p),x=i.useRef(null),z=(0,d.Z)({controlled:b,default:h,name:"RadioGroup"}),R=(0,a.Z)(z,2),C=R[0],S=R[1];i.useImperativeHandle(t,(function(){return{focus:function(){var o=x.current.querySelector("input:not(:disabled):checked");o||(o=x.current.querySelector("input:not(:disabled)")),o&&o.focus()}}}),[]);var y=(0,l.Z)(e,x),w=(0,u.Z)(Z),k=i.useMemo((function(){return{name:w,onChange:function(o){S(o.target.value),g&&g(o,o.target.value)},value:C}}),[w,g,S,C]);return(0,v.jsx)(s.Z.Provider,{value:k,children:(0,v.jsx)(c.Z,(0,r.Z)({role:"radiogroup",ref:y},m,{children:f}))})}));e.Z=f},42903:function(o,e,t){"use strict";var a=t(5057).createContext(void 0);e.Z=a},3895:function(o,e,t){var a=t(98323),r=t(97247),n=t(89479),i=t(73470),c=t(74631),l=t(51565);o.exports=function(o,e,t,d){var s=-1,u=r,v=!0,p=o.length,f=[],h=e.length;if(!p)return f;t&&(e=i(e,c(t))),d?(u=n,v=!1):e.length>=200&&(u=l,v=!1,e=new a(e));o:for(;++s<p;){var Z=o[s],g=null==t?Z:t(Z);if(Z=d||0!==Z?Z:0,v&&g===g){for(var b=h;b--;)if(e[b]===g)continue o;f.push(Z)}else u(e,g,d)||f.push(Z)}return f}},13973:function(o,e,t){var a=t(3895),r=t(61350),n=t(43676);o.exports=function(o,e,t){var i=o.length;if(i<2)return i?n(o[0]):[];for(var c=-1,l=Array(i);++c<i;)for(var d=o[c],s=-1;++s<i;)s!=c&&(l[c]=a(l[c]||d,o[s],e,t));return n(r(l,1),e,t)}},69163:function(o,e,t){var a=t(5948),r=t(86456),n=t(13973),i=t(7244),c=t(59408),l=r((function(o){var e=c(o);return e="function"==typeof e?e:void 0,n(a(o,i),void 0,e)}));o.exports=l},33665:function(o,e,t){"use strict";function a(o){if(null==o)throw new TypeError("Cannot destructure "+o)}t.d(e,{Z:function(){return a}})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[6412],{32322:function(e,n,t){n.h1=void 0;var r=t(76811);function i(e){return(null===e||void 0===e?void 0:e.connectedAccounts)||[]}function a(e){return i(e).find((function(e){return e.provider===r.LOGIN_PROVIDER.WALLET}))}n.h1=function(e){var n=a(e);return null===n||void 0===n?void 0:n.did}},92726:function(e,n,t){t.d(n,{Z:function(){return k}});var r,i=t(71171),a=t(32723),o=t(34795),s=t(33028),c=t(96234),l=t(59740),u=t(5057),d=t(55898),p=t.n(d),m=t(33518),f=t(67680),h=t(61533),x=t(74490),v=t(45267),g=t(46954),Z=t(44067),b=t(96266),j=["actions","size"],y=["icon","text","onClick","disabled"];function k(e){var n=e.actions,t=e.size,r=(0,l.Z)(e,j),i=(0,u.useState)(null),d=(0,c.Z)(i,2),p=d[0],m=d[1],k=Boolean(p),w=function(e){try{e.stopPropagation(),e.preventDefault()}catch(n){}m(null)};return(0,b.jsxs)(C,(0,s.Z)((0,s.Z)({},r),{},{children:[(0,b.jsx)(f.Z,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"actions-menu-icon",onClick:function(e){try{e.stopPropagation(),e.preventDefault()}catch(n){}m(e.currentTarget)},size:t,children:(0,b.jsx)(v.Z,{})}),(0,b.jsx)(h.Z,{id:"actions-menu","data-cy":"actions-menu",anchorEl:p,keepMounted:!0,open:k,onClose:w,PaperProps:{},children:n.map((function(e,n){if("function"===typeof e)return e({close:w});var t=e.icon,r=e.text,i=e.onClick,c=e.disabled,d=void 0!==c&&c,p=(0,l.Z)(e,y);return(0,u.createElement)(x.Z,(0,s.Z)((0,s.Z)({},p),{},{disabled:d,dense:!0,onClick:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(n){return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i(n);case 2:w();case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),key:n,"data-cy":"actions-menu-".concat(n)}),(0,b.jsx)(g.Z,{style:{minWidth:24,marginRight:8},children:t}),(0,b.jsx)(Z.Z,{primary:r}))}))})]}))}k.propTypes={actions:p().array,size:p().oneOf(["small","medium","large"])},k.defaultProps={actions:[],size:"small"};var C=m.Z.div(r||(r=(0,i.Z)([""])))},50185:function(e,n,t){t.d(n,{Z:function(){return p}});var r=t(33028),i=t(59740),a=t(5057),o=t(55898),s=t.n(o),c=t(12937),l=t(68420),u=t(96266),d=["children"];function p(e){var n=e.children,t=(0,i.Z)(e,d),o=(0,a.useContext)(l.RD).t;return(0,u.jsx)(c.Z,(0,r.Z)((0,r.Z)({tip:o("common.copyTip"),copiedTip:o("common.copiedTip")},t),{},{children:n}))}p.propTypes={children:s().any.isRequired}},9729:function(e,n,t){t.d(n,{Z:function(){return m}});var r,i=t(71171),a=t(33028),o=t(59740),s=t(55898),c=t.n(s),l=t(33518),u=t(13727),d=t(96266),p=["passport","onDelete"];function m(e){var n=e.passport,t=e.onDelete,r=(0,o.Z)(e,p);return(0,d.jsxs)(f,(0,a.Z)((0,a.Z)({},r),{},{children:[n.title||n.name," ",!!t&&(0,d.jsx)(u.default,{"data-cy":"delete-issuance",className:"delete",onClick:t})]}))}m.propTypes={passport:c().object.isRequired,onDelete:c().func},m.defaultProps={onDelete:null};var f=l.Z.span(r||(r=(0,i.Z)(["\n display: inline-flex;\n padding: 2px 8px;\n background: ",";\n border-radius: 100vw;\n font-weight: 400;\n font-size: 12px;\n line-height: 22px;\n color: #fff;\n align-items: center;\n .delete {\n font-size: 1em;\n margin-left: 6px;\n cursor: pointer;\n }\n"])),(function(e){return e.theme.palette.primary.main}))},46412:function(e,n,t){t.r(n),t.d(n,{default:function(){return pn}});var r,i=t(71171),a=t(33028),o=t(32723),s=t(34795),c=t(96234),l=t(5057),u=t(33518),d=t(75506),p=t.n(d),m=t(55898),f=t.n(m),h=t(52277),x=t.n(h),v=t(13128),g=t(75239),Z=t(39948),b=t(26174),j=t(88092),y=t(44919),k=t(80578),C=t(72333),w=t(68420),D=t(28726),S=t(68051),P=t(18945),R=t(49777),T=t(75760),I=t(49384),E=t(35432),N=t(10381),A=t(42061),z=t(86229),B=t(22228),L=t(17450),_=t(58238),U=t(17425),W=t(29054),O=t(63406),q=t(14491),F=t(44846),M=t(55372),V=t(11750),K=t(74490),J=t(51177),H=t(47020),X=t(6041),$=t(80576),G=t(88574),Y=t(50185),Q=t(96266);function ee(e){var n=e.teamDid,t=e.roles,r=e.onCancel,i=e.onSuccess,a=e.onError,u=e.endpoint,d=(0,_.h6)().api,p=(0,l.useState)(!1),m=(0,c.Z)(p,2),f=m[0],h=m[1],x=(0,l.useState)(""),g=(0,c.Z)(x,2),Z=g[0],b=g[1],j=(0,w.PE)(),y=j.t,k=j.locale,C=(0,l.useState)(0),S=(0,c.Z)(C,2),P=S[0],R=S[1],T=(0,l.useState)(""),I=(0,c.Z)(T,2),E=I[0],N=I[1],A=(0,l.useState)(""),z=(0,c.Z)(A,2),B=z[0],L=z[1],U=(0,l.useState)(""),W=(0,c.Z)(U,2),O=W[0],ee=W[1],ne=function(){var e=(0,s.Z)((0,o.Z)().mark((function e(){var t,r,i,s;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(B){e.next=3;break}return b(y("team.member.error.passportEmpty")),e.abrupt("return");case 3:return t=O.trim(),b(null),h(!0),e.prev=6,e.next=9,d.createMemberInvitation({input:{teamDid:n,role:B,remark:t}});case 9:r=e.sent,i=r.inviteInfo,N(i),R(1),e.next=20;break;case 15:e.prev=15,e.t0=e.catch(6),s=(0,q.Z)(e.t0),b(s),a(e.t0);case 20:return e.prev=20,h(!1),e.finish(20);case 23:case"end":return e.stop()}}),e,null,[[6,15,20,23]])})));return function(){return e.apply(this,arguments)}}(),re=[{body:(0,Q.jsxs)(V.Z,{component:"div",children:[(0,Q.jsxs)($.Z,{style:{width:"100%"},variant:"outlined",children:[(0,Q.jsx)(X.Z,{children:y("common.passport")}),(0,Q.jsx)(J.Z,{"data-cy":"invite-member-select-role",value:B,onChange:function(e){b(null),L(e.target.value)},fullWidth:!0,label:y("common.passport"),disabled:f,onKeyPress:function(e){"Enter"===e.key&&(e.preventDefault(),ne())},children:t.filter((function(e){return"owner"!==e.name})).map((function(e){return(0,Q.jsx)(K.Z,{value:e.name,"data-cy":"invite-member-select-option-".concat(e.name),children:(0,Q.jsx)("span",{children:e.title||e.name})},e.name)}))})]}),(0,Q.jsx)("div",{style:{marginTop:20,marginBottom:10}}),(0,Q.jsx)(H.Z,{label:y("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:O,onChange:function(e){b(null),ee(e.target.value)},disabled:f,"data-cy":"invite-member-input-remark"}),(0,Q.jsx)("div",{style:{marginTop:20,marginBottom:10}})]}),cancel:y("common.cancel"),confirm:y("team.member.inviteDialog.createInviteLink"),onCancel:r,onConfirm:ne},{body:function(){var e=(0,q.ly)({inviteId:E.inviteId,endpoint:u});return(0,Q.jsxs)("div",{children:[(0,Q.jsx)(te,{children:y("team.member.inviteDialog.createSuccessTip",{expireDate:(0,q.B2)(E.expireDate,k)})}),(0,Q.jsx)("div",{style:{marginTop:"40px"}}),(0,Q.jsx)(Y.Z,{children:e})]})},confirm:y("common.confirm"),onConfirm:i}][P];return(0,Q.jsxs)(v.ZP,{title:y("common.invite"),fullWidth:!0,open:!0,showCloseButton:!1,actions:(0,Q.jsxs)(Q.Fragment,{children:[re.cancel&&(0,Q.jsx)(D.Z,{onClick:re.onCancel,color:"inherit",children:re.cancel}),(0,Q.jsxs)(D.Z,{onClick:re.onConfirm,color:"primary",disabled:f||!B,variant:"contained",autoFocus:!0,children:[f&&(0,Q.jsx)(F.Z,{size:16}),re.confirm]})]}),children:[(0,Q.jsx)(M.Z,{component:"div",children:"function"===typeof re.body?re.body():re.body}),!!Z&&(0,Q.jsx)(G.Z,{type:"error",variant:"icon",children:Z})]})}ee.propTypes={teamDid:f().string.isRequired,onCancel:f().func.isRequired,onSuccess:f().func.isRequired,onError:f().func,roles:f().array,endpoint:f().string},ee.defaultProps={onError:function(){},roles:[],endpoint:""};var ne,te=u.Z.div(r||(r=(0,i.Z)(["\n font-size: 16px;\n font-weight: bold;\n"]))),re=t(26796),ie=t(43681),ae=t.n(ie),oe=t(86386),se=t(73545);function ce(e){var n=e.teamDid,t=e.onCancel,r=e.onSuccess,i=e.onError,a=e.endpoint,u=(0,_.h6)(),d=u.api,p=u.info,m=(0,l.useContext)(se.B).api,f=(0,l.useState)(!1),h=(0,c.Z)(f,2),x=h[0],g=h[1],Z=(0,w.PE)(),b=Z.t,j=Z.locale,y=(0,l.useState)(""),k=(0,c.Z)(y,2),C=k[0],S=k[1],P=(0,l.useState)(!1),R=(0,c.Z)(P,2),T=R[0],I=R[1],E=(0,l.useState)(0),N=(0,c.Z)(E,2),A=N[0],z=N[1],B=(0,l.useState)(""),L=(0,c.Z)(B,2),U=L[0],W=L[1],O=(0,l.useState)(""),K=(0,c.Z)(O,2),J=K[0],X=K[1],$=!!ae()(p,"ownerNft.did"),ee=(0,re.default)((0,s.Z)((0,o.Z)().mark((function e(){var n,t;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!$){e.next=6;break}return e.next=3,d.getDelegationState();case 3:return n=e.sent,t=n.state,e.abrupt("return",t);case 6:return e.abrupt("return",{delegated:!0});case 7:case"end":return e.stop()}}),e)}))));if(ee.loading)return(0,Q.jsx)(v.ZP,{title:b("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:t,children:(0,Q.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,Q.jsx)(F.Z,{})})});if(ee.error)return(0,Q.jsx)(v.ZP,{title:b("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:t,children:(0,Q.jsx)(G.Z,{type:"error",variant:"icon",children:(0,q.Z)(ee.error)})});var ne=function(){var e=(0,s.Z)((0,o.Z)().mark((function e(){var t,r,a;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return S(null),g(!0),e.prev=2,e.next=5,d.createTransferInvitation({input:{teamDid:n,role:"owner",remark:J.trim()}});case 5:t=e.sent,r=t.inviteInfo,W(r),z(ie.length-1),e.next=16;break;case 11:e.prev=11,e.t0=e.catch(2),a=(0,q.Z)(e.t0),S(a),i(e.t0);case 16:return e.prev=16,g(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[2,11,16,19]])})));return function(){return e.apply(this,arguments)}}(),te=function(){I(!1),z(0)},ie=[{body:(0,Q.jsxs)(V.Z,{component:"div",children:[(0,Q.jsxs)(G.Z,{type:"warning",children:[(0,Q.jsx)(V.Z,{children:b("team.transferNode.inviteDialog.tips.progress")}),(0,Q.jsx)(V.Z,{children:b("team.transferNode.inviteDialog.tips.newOwnerPermissions")})]}),(0,Q.jsx)(G.Z,{type:"warning",children:(0,Q.jsx)(V.Z,{children:b("team.transferNode.inviteDialog.tips.revoke")})}),(0,Q.jsx)("div",{style:{marginTop:20,marginBottom:10}}),(0,Q.jsx)(H.Z,{label:b("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:J,onChange:function(e){S(null),X(e.target.value)},disabled:x,"data-cy":"transfer-node-input-remark"}),(0,Q.jsx)("div",{style:{marginTop:20,marginBottom:10}})]}),cancel:b("common.cancel"),confirm:b("team.transferNode.inviteDialog.createInviteLink"),onCancel:t,onConfirm:$&&!ae()(ee,"value.delegated")?function(){I(!0),z(1)}:ne},{body:function(){return(0,Q.jsx)(oe.default,{action:"delegate-transfer-nft",open:T,locale:j,checkFn:m.get,onClose:te,onSuccess:ne,checkTimeout:3e5,webWalletUrl:(0,q.yP)(p),extraParams:{targetDID:p.did},messages:{title:b("team.transferNode.delegateDialog.title"),scan:b("team.transferNode.delegateDialog.scan"),confirm:b("team.transferNode.delegateDialog.confirm"),success:b("team.transferNode.delegateDialog.success")},popup:!0})}},{body:function(){var e=(0,q.ly)({inviteId:U.inviteId,endpoint:a});return(0,Q.jsxs)("div",{children:[(0,Q.jsx)(ue,{children:b("team.transferNode.inviteDialog.createSuccessTip",{expireDate:(0,q.B2)(U.expireDate,j)})}),(0,Q.jsx)("div",{style:{marginTop:"40px"}}),(0,Q.jsx)(Y.Z,{children:e})]})},confirm:b("common.confirm"),onConfirm:r}],ce=ie[A];return(0,Q.jsxs)(v.ZP,{title:b("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,showCloseButton:!1,actions:(0,Q.jsxs)(Q.Fragment,{children:[ce.cancel&&(0,Q.jsx)(D.Z,{onClick:ce.onCancel,color:"inherit",children:ce.cancel}),(0,Q.jsxs)(D.Z,{onClick:ce.onConfirm,color:"primary",disabled:x,variant:"contained",autoFocus:!0,children:[x&&(0,Q.jsx)(F.Z,{size:16}),ce.confirm]})]}),children:[(0,Q.jsx)(M.Z,{component:"div",children:"function"===typeof ce.body?ce.body():ce.body}),!!C&&(0,Q.jsx)(G.Z,{type:"error",variant:"icon",children:C})]})}ce.propTypes={teamDid:f().string.isRequired,onCancel:f().func.isRequired,onSuccess:f().func.isRequired,onError:f().func,endpoint:f().string},ce.defaultProps={onError:function(){},endpoint:""};var le,ue=u.Z.div(ne||(ne=(0,i.Z)(["\n font-size: 16px;\n font-weight: bold;\n"]))),de=(t(59740),t(62681)),pe=t(94464),me=t(64886),fe=t(12987),he=t(71246),xe=t(12673),ve=t(76811),ge=t(70461),Ze=t(9729);function be(e){var n=e.issuances,t=e.teamDid,r=e.onRefresh,i=(0,_.h6)(),a=i.api,u=i.inService,d=(0,l.useContext)(w.RD),p=d.t,m=d.locale,f=(0,l.useState)(null),h=(0,c.Z)(f,2),x=h[0],v=h[1],g=(0,l.useState)(!1),b=(0,c.Z)(g,2),j=b[0],y=b[1],k=(0,U.DJ)().endpoint,C=function(){var e=(0,s.Z)((0,o.Z)().mark((function e(n){var i;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.id,!j){e.next=3;break}return e.abrupt("return");case 3:return y(!0),e.prev=4,e.next=7,a.deletePassportIssuance({input:{teamDid:t,sessionId:i}});case 7:r(),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(4),z.Z.error(e.t0.message);case 13:return e.prev=13,y(!1),v(null),e.finish(13);case 17:case"end":return e.stop()}}),e,null,[[4,10,13,17]])})));return function(n){return e.apply(this,arguments)}}(),D=function(){y(!1),v(null)},S=function(e){return k?(0,q._)({id:e.id,endpoint:k}):""};function P(e){var n=e.data;return(0,Q.jsxs)("div",{className:"issuance",children:[(0,Q.jsxs)(Z.Z,{display:"flex",justifyContent:"space-between",children:[(0,Q.jsx)(O.Z,{permission:u?"":"mutate_team",role:u?q.Wf:[],children:function(e){return e?(0,Q.jsx)(Ze.Z,{passport:{title:n.title,name:n.name},onDelete:function(){return v({title:p("team.passport.issuance.delete.title"),description:p("team.passport.issuance.delete.description",{link:S(n)}),confirm:p("common.delConfirm"),cancel:p("common.cancel"),onConfirm:function(){C(n)},onCancel:D})}}):(0,Q.jsx)(Ze.Z,{passport:{title:n.title,name:n.name}})}}),(0,Q.jsxs)("div",{style:{color:"#999"},children:[p("common.expires"),":\xa0",(0,q.B2)(n.expireDate,m)]})]}),(0,Q.jsx)(Z.Z,{mt:2,children:(0,Q.jsx)(Y.Z,{children:S(n)})})]})}return(0,Q.jsxs)(je,{children:[n.map((function(e){return(0,Q.jsx)(P,{data:e})})),x&&(0,Q.jsx)(ge.Z,{title:x.title,description:x.description,confirm:x.confirm,cancel:x.cancel,params:x.params,onConfirm:x.onConfirm,onCancel:x.onCancel})]})}var je=u.Z.div(le||(le=(0,i.Z)(["\n .MuiTableHead-root {\n display: none;\n }\n .issuance {\n padding: 16px 0;\n border-bottom: 1px solid #f0f0f0;\n .MuiTypography-root {\n display: inline-block;\n width: 100%;\n background: #f3f3f3;\n border-radius: 4px;\n padding-top: 6px;\n padding-bottom: 6px;\n }\n }\n"])));be.propTypes={teamDid:f().string.isRequired,issuances:f().array,onRefresh:f().func},be.defaultProps={issuances:[],onRefresh:function(){}};var ye,ke=t(68079),Ce=t(26538),we=t.n(Ce),De=t(5178),Se=t(32322),Pe=t(87806),Re=t(25710),Te=t(82638),Ie=t(18901);function Ee(e){var n=e.teamDid,t=e.ownerDid,r=e.needReceive,i=e.roles,a=e.onCancel,u=e.onSuccess,d=e.onError,p=e.showOwnerPassport,m=(0,_.h6)().api,f=(0,l.useState)(!1),h=(0,c.Z)(f,2),x=h[0],g=h[1],Z=(0,l.useState)(""),b=(0,c.Z)(Z,2),j=b[0],y=b[1],k=(0,w.PE)().t,C=(0,l.useState)(""),S=(0,c.Z)(C,2),P=S[0],R=S[1],T=function(){var e=(0,s.Z)((0,o.Z)().mark((function e(){var r;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(P){e.next=3;break}return y(k("team.member.error.passportEmpty")),e.abrupt("return");case 3:return y(null),g(!0),e.prev=5,e.next=8,m.createPassportIssuance({input:{teamDid:n,name:P,ownerDid:t}});case 8:u(),e.next=16;break;case 11:e.prev=11,e.t0=e.catch(5),r=(0,q.Z)(e.t0),y(r),d(e.t0);case 16:return e.prev=16,g(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[5,11,16,19]])})));return function(){return e.apply(this,arguments)}}();return(0,Q.jsxs)(v.ZP,{title:k("team.passport.issue"),fullWidth:!0,open:!0,onClick:function(e){return e.stopPropagation()},onClose:a,disableEscapeKeyDown:!0,PaperProps:{style:{minHeight:"auto"}},actions:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(D.Z,{onClick:a,color:"inherit",size:"small",children:k("common.cancel")}),(0,Q.jsxs)(D.Z,{onClick:T,color:"primary",size:"small",disabled:x||!P,variant:"contained",autoFocus:!0,"data-cy":"issue-passport-create-btn",children:[x&&(0,Q.jsx)(F.Z,{size:16}),k(r?"team.passport.issuance.create.title":"oauth.issued")]})]}),children:[(0,Q.jsx)(M.Z,{component:"div",children:(0,Q.jsx)(V.Z,{component:"div",children:(0,Q.jsxs)($.Z,{style:{width:"100%"},variant:"outlined",children:[(0,Q.jsx)(X.Z,{children:k("common.passport")}),(0,Q.jsx)(J.Z,{"data-cy":"issue-passport-select-passport",value:P,onChange:function(e){y(null),R(e.target.value)},fullWidth:!0,label:k("common.passport"),disabled:x,onKeyPress:function(e){"Enter"===e.key&&(e.preventDefault(),T())},children:i.filter((function(e){return p||"owner"!==e.name})).map((function(e){return(0,Q.jsx)(K.Z,{value:e.name,"data-cy":"issue-passport-select-option-".concat(e.name),children:(0,Q.jsx)("span",{children:e.title||e.name})},e.name)}))})]})})}),!!j&&(0,Q.jsx)(G.Z,{type:"error",variant:"icon",children:j})]})}function Ne(e){var n=e.action,t=e.passport,r=(0,w.PE)().t,i=(0,U.DJ)().roles.find((function(e){return e.name===t.role}));return(0,Q.jsxs)("div",{children:[(0,Q.jsx)("div",{children:r("enable"===n?"team.member.enablePassportDescription":"team.member.revokePassportDescription")}),i&&(0,Q.jsx)(Z.Z,{mt:3,fontWeight:"bold",children:r("team.member.passportPermissionTitle")}),i&&(0,Q.jsx)(Z.Z,{mt:1,children:i.description})]})}function Ae(e){var n,t=e.user,r=e.onCreate,i=e.createPassportSvg,u=(0,w.PE)().t,d=(0,se.T)().session,p=(0,U.DJ)(),m=p.roles,f=p.teamDid,h=p.teamIssuerDid,x=p.refresh,v=p.enablePassportIssuance,b=p.trustedPassports,j=p.passportColor,k=p.blocklet,C=(0,W.y0)().appIdList,S=(0,_.h6)(),R=S.api,T=S.inService,I=(0,l.useState)(!1),N=(0,c.Z)(I,2),A=N[0],B=N[1],L=(0,l.useState)(null),F=(0,c.Z)(L,2),M=F[0],V=F[1],K=(0,l.useState)(!1),J=(0,c.Z)(K,2),H=J[0],X=J[1],$=(0,l.useState)(""),G=(0,c.Z)($,2),Y=G[0],ee=G[1],ne=[h].concat((0,ke.Z)(C||[])).filter(Boolean),te=(ae()(t,"passports")||[]).map((function(e){return(0,a.Z)((0,a.Z)({},e),{},{revoked:e.status===E.PASSPORT_STATUS.REVOKED})})),re=function(){var e=(0,s.Z)((0,o.Z)().mark((function e(n){var r;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!A){e.next=2;break}return e.abrupt("return");case 2:return B(!0),e.prev=3,r=n.status===E.PASSPORT_STATUS.REVOKED?"enableUserPassport":"revokeUserPassport",e.next=7,R[r]({input:{teamDid:f,userDid:t.did,passportId:n.id}});case 7:x(),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),z.Z.error((0,q.Z)(e.t0));case 13:return e.prev=13,B(!1),V(null),e.finish(13);case 17:case"end":return e.stop()}}),e,null,[[3,10,13,17]])})));return function(n){return e.apply(this,arguments)}}(),ie=function(e,n){return t.did===d.user.did&&d.user.passportId&&d.user.passportId===n.id?{revokable:!1,message:u("team.passport.shouldNotDeleteCurrent")}:e?f===n.issuer.id&&"owner"===n.name?{revokable:!1,message:u("team.passport.noPermission")}:{revokable:!0}:{revokable:!1,message:u("team.passport.noPermission")}},oe=te.filter((function(e){return!Y||e.title.includes(Y)||e.name.includes(Y)}));return(0,Q.jsxs)(ze,{children:[(0,Q.jsxs)(Ie.Z,{children:[(0,Q.jsx)("div",{className:"left",children:(0,Q.jsx)(Te.Z,{placeholder:u("team.passport.search"),value:Y,onChange:function(e){return ee(e.target.value)}})}),(0,Q.jsx)("div",{className:"right",children:v&&!!t.approved&&(0,Q.jsx)(O.Z,{permission:T?"":"mutate_team",role:T?q.Wf:[],children:(0,Q.jsxs)(D.Z,{variant:"contained",color:"primary","data-cy":"issue-passport",onClick:function(){return X(!0)},children:[(0,Q.jsx)(y.Z,{style:{fontSize:16,marginRight:4}}),u("team.passport.issue")]})})})]}),(0,Q.jsxs)(Z.Z,{children:[oe.map((function(e){return(0,Q.jsx)(O.Z,{permission:T?"":"mutate_team",role:T?q.Wf:[],children:function(n){return(0,Q.jsxs)(Z.Z,{className:"passport-item",display:"flex",justifyContent:"space-between",alignItems:"center",mt:3,children:[(0,Q.jsxs)(Z.Z,{display:"flex",alignItems:"center",children:[(0,Q.jsx)("div",{dangerouslySetInnerHTML:{__html:i({title:e.title||e.name,issuer:e.issuer&&e.issuer.name,issuerDid:e.issuer&&e.issuer.id,ownerName:t.fullName,ownerDid:t.did,ownerAvatarUrl:t.avatar,revoked:e.revoked,preferredColor:j,width:"150px"})}}),(0,Q.jsxs)("div",{className:"body",children:[(0,Q.jsxs)(Z.Z,{className:"title",display:"flex",alignItems:"center",children:[we()(e.title),(0,Q.jsxs)("div",{className:"status-icons",children:[!!ne.length&&!ne.includes(e.issuer.id)&&(0,Q.jsx)(P.Z,{}),e.revoked&&(0,Q.jsx)(Pe.Z,{})]})]}),e.expirationDate&&(0,Q.jsx)(Z.Z,{className:"title",display:"flex",alignItems:"center",children:u("team.passport.validUntil",{date:e.expirationDate})}),!!ne.length&&!ne.includes(e.issuer.id)&&(0,Q.jsxs)("div",{className:"tip",children:[e.issuer.id!==h&&!b.some((function(n){return n.issuerDid===e.issuer.id}))&&(0,Q.jsx)(g.Z,{title:u("team.passport.notTrustedIssuerTip"),children:(0,Q.jsx)(Z.Z,{component:De.Z,style:{fontSize:"1.3em"},color:"error.main",mr:.5})}),(0,Q.jsx)("span",{children:u("team.passport.issueBy",{name:e.issuer.name})})]})]})]}),(0,Q.jsx)(Z.Z,{children:ie(n,e).revokable?(0,Q.jsxs)(D.Z,{variant:"outlined",color:e.revoked?"primary":"secondary",onClick:function(){return(n=e).status===E.PASSPORT_STATUS.REVOKED?V({title:u("team.member.enablePassport"),description:(0,Q.jsx)(Ne,{action:"enable",passport:n}),confirm:u("common.enable"),cancel:u("common.cancel"),onConfirm:function(){re(n)},onCancel:function(){B(!1),V(null)},color:"primary"}):V({title:u("team.member.revokePassport"),description:(0,Q.jsx)(Ne,{action:"revoke",passport:n}),confirm:u("common.revoke"),cancel:u("common.cancel"),onConfirm:function(){re(n)},onCancel:function(){B(!1),V(null)}});var n},children:[e.revoked?(0,Q.jsx)(y.Z,{style:{fontSize:16,marginRight:4}}):(0,Q.jsx)(Pe.Z,{style:{height:16,marginRight:4}}),e.revoked?u("common.enable"):u("common.revoke")]}):(0,Q.jsx)(g.Z,{title:ie(n,e).message,children:(0,Q.jsx)(De.Z,{style:{color:"#ddd"}})})})]})}},e.id)})),!oe.length&&(0,Q.jsx)(Re.Z,{children:u("common.empty")})]}),H&&(0,Q.jsx)(Ee,{teamDid:f,ownerDid:t.did,needReceive:(0,Se.h1)(t)===t.did,roles:m,onCancel:function(){return X(!1)},onSuccess:function(){r(),X(!1)},showOwnerPassport:k&&!(null!==(n=k.settings)&&void 0!==n&&n.owner)}),M&&(0,Q.jsx)(ge.Z,{title:M.title,description:M.description,confirm:M.confirm,cancel:M.cancel,params:M.params,onConfirm:M.onConfirm,onCancel:M.onCancel,color:M.color})]})}Ee.propTypes={teamDid:f().string.isRequired,ownerDid:f().string.isRequired,needReceive:f().bool,onCancel:f().func.isRequired,onSuccess:f().func.isRequired,onError:f().func,roles:f().array,showOwnerPassport:f().bool},Ee.defaultProps={onError:function(){},roles:[],showOwnerPassport:!1,needReceive:!0},Ne.propTypes={action:f().string.isRequired,passport:f().object.isRequired},Ne.defaultProps={},Ae.propTypes={user:f().object.isRequired,createPassportSvg:f().func.isRequired,onCreate:f().func},Ae.defaultProps={onCreate:function(){}};var ze=u.Z.div(ye||(ye=(0,i.Z)(["\n .passport-item {\n .body {\n padding: 0;\n margin-left: 24px;\n margin-top: 0;\n }\n .title {\n font-weight: 400;\n font-size: 16px;\n line-height: 19px;\n color: #222222;\n }\n .tip {\n display: flex;\n align-items: center;\n font-size: 14px;\n margin-top: 6px;\n color: #bbb;\n }\n .status-icons {\n svg {\n fill: #bfbfbf;\n height: 1.2em;\n margin-left: 0.4em;\n }\n }\n .MuiButton-outlinedSecondary {\n color: #f16e6e;\n fill: #f16e6e;\n background: #fcf3f3;\n border: 0;\n &:hover {\n border: 0;\n }\n }\n }\n"]))),Be=function(e,n){return e.nodeOwner&&e.nodeOwner.did===n},Le=function(e,n){return e&&e.did===n};function _e(e){var n,t=e.user,r=e.onCancel,i=e.onSuccess,a=e.onError,u=e.children,d=(0,_.h6)(),p=d.api,m=d.info,f=d.inService,h=(0,se.T)().session,x=(0,U.DJ)(),v=x.teamDid,g=x.refresh,Z=(0,w.PE)().t,b=(0,l.useState)(!1),j=(0,c.Z)(b,2),y=j[0],k=j[1],C=(0,l.useState)(!1),D=(0,c.Z)(C,2),S=D[0],P=D[1],R=function(){var e=(0,s.Z)((0,o.Z)().mark((function e(n){var t,r;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.did,r=n.approved,!y){e.next=3;break}return e.abrupt("return");case 3:return k(!0),e.prev=4,e.next=7,p.updateUserApproval({input:{teamDid:v,user:{did:t,approved:!r}}});case 7:P(!1),i(),g(),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(4),z.Z.error((0,q.Z)(e.t0)),a();case 16:return e.prev=16,k(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[4,12,16,19]])})));return function(n){return e.apply(this,arguments)}}(),T={title:t.approved?Z("team.member.forbidLogin"):Z("team.member.allowLogin"),description:t.approved?Z("team.member.forbidLoginDescription"):Z("team.member.allowLoginDescription"),confirm:Z("common.confirm"),cancel:Z("common.cancel"),onConfirm:function(){R(t)},onCancel:function(){k(!1),P(!1),r()},color:t.approved?"error":"primary"};return(n=(f||m.nodeOwner&&!Be(m,t.did))&&!Le(h.user,t.did))?(0,Q.jsxs)(Q.Fragment,{children:["function"===typeof u?u({can:n,open:function(){return P(!0)}}):u,S?(0,Q.jsx)(ge.Z,{title:T.title,description:T.description,confirm:T.confirm,cancel:T.cancel,params:T.params,onConfirm:T.onConfirm,onCancel:T.onCancel,color:T.color}):null]}):null}_e.propTypes={user:f().object,onSuccess:f().func,onCancel:f().func,onError:f().func,children:f().oneOfType([f().object,f().func])},_e.defaultProps={user:{},onSuccess:function(){},onCancel:function(){},onError:function(){},children:null};var Ue,We,Oe,qe=t(6352),Fe=t.n(qe);function Me(e,n,t){if(e&&e.startsWith(E.USER_AVATAR_URL_PREFIX)){var r=window.env.apiPrefix||"/";return t?Fe()(r,E.USER_AVATAR_PATH_PREFIX,e.replace(E.USER_AVATAR_URL_PREFIX,"")):Fe()(r,E.USER_AVATAR_PATH_PREFIX,n,e.replace(E.USER_AVATAR_URL_PREFIX,""))}return e}function Ve(e){return(e.user.connectedAccounts||[]).map((function(e){return(0,Q.jsx)(me.Z,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:e.provider,children:(0,Q.jsx)(L.Z,{did:e.did})},e.did)}))}f().string.isRequired,Ve.propTypes={user:f().object.isRequired,onChangeUser:f().func},Ve.defaultProps={onChangeUser:function(){}};var Ke="info";function Je(e){var n=e.userDid,t=e.onCancel,r=e.initTab,i=e.createPassportSvg,a=(0,_.h6)(),c=a.api,u=a.ws.useSubscription,d=a.inService,p=(0,U.DJ)(),m=p.roles,f=p.teamDid,h=p.enablePassportIssuance,x=(0,w.PE)(),g=x.t,b=x.locale,j=(0,xe.Z)({user:null,issuances:null,tab:r||Ke}),y=function(){var e=(0,s.Z)((0,o.Z)().mark((function e(n,t){var r;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.doBatchQuery({getUser:{input:{teamDid:n,user:{did:t},options:{includeTags:!0}}},getPassportIssuances:{input:{teamDid:n,ownerDid:t}}});case 3:(r=e.sent).getUser.user&&(r.getUser.user.avatar=Me(r.getUser.user.avatar,n,d),r.getUser.user.passports=(r.getUser.user.passports||[]).filter((function(e){return e.issuer}))),j.user=r.getUser.user||{},j.issuances=r.getPassportIssuances.list||[],e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),z.Z.error((0,q.Z)(e.t0));case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(n,t){return e.apply(this,arguments)}}();(0,l.useEffect)((function(){f&&y(f,n)}),[n,f]);u(E.EVENTS.USER_UPDATED,(function(e){e.teamDid===f&&e.user&&e.user.did===n&&y(f,n)}),[n,f]),(0,l.useEffect)((function(){j.issuances&&!j.issuances.length&&"issuances"===j.tab&&(j.tab=Ke)}),[j.issuances]);var k=function(){var e=(0,s.Z)((0,o.Z)().mark((function e(n){return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y(f,n.did);case 2:j.tab=Ke;case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),C={auth0:"Auth0",wallet:"DID wallet",federated:"Federated"},D={info:{label:g("common.basicInfo"),value:Ke,component:function(){var e,n;return(j.user?[{name:g("team.member.name"),value:j.user.fullName},{name:g("common.email"),value:j.user.email},{name:g("team.member.source"),value:(0,Q.jsx)(Z.Z,{display:"flex",alignItems:"center",children:C[(null===(e=j.user)||void 0===e?void 0:e.sourceProvider)||E.USER_TYPE.WALLET]||(null===(n=j.user)||void 0===n?void 0:n.sourceProvider)})},{name:g("team.member.allowLogin"),value:j.user.approved?g("common.yes"):g("common.no")},{name:g("team.member.lastLogin"),value:(0,q.B2)(j.user.lastLoginAt,b)},{name:g("team.member.lastLoginIp"),value:j.user.lastLoginIp||""},{name:g("common.createdAt"),value:(0,q.B2)(j.user.createdAt,b)},{name:g("common.remark"),value:j.user.remark||"--"},Array.isArray(j.user.tags)&&j.user.tags.length>0?{name:g("common.tags"),value:j.user.tags.map((function(e){return(0,Q.jsx)(B.Z,{style:{background:e.color,color:(0,R.getTextColor)(e.color),marginRight:4},children:e.title},e.id)}))}:null].filter(Boolean):[]).map((function(e){return e.name===g("common.did")?(0,Q.jsx)(me.Z,{valueComponent:"div",nameWidth:120,name:e.name,nameFormatter:function(){return g("common.did")},children:e.value},e.name):(0,Q.jsx)(me.Z,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:e.name,children:e.value},e.name)}))}},oauth:{label:g("team.member.connectedAccounts"),value:"oauth",component:function(){return(0,Q.jsx)(Ve,{user:j.user,onChangeUser:k})}},passports:{label:g("common.passport"),value:"passports",component:function(){return(0,Q.jsx)(Ae,{user:j.user,teamDid:f,roles:m,createPassportSvg:i,onCreate:function(){y(f,n).then((function(){h&&j.issuances&&j.issuances.length&&(j.tab="issuances")}))},onRefresh:function(){y(f,n)}})}},issuances:{label:g("team.passport.issuance.pending"),value:"issuances",component:function(){return(0,Q.jsx)(be,{issuances:j.issuances||[],teamDid:f,onRefresh:function(){return y(f,n)}})}}},S=Object.values(D).map((function(e){return{label:e.label,value:e.value}})).filter((function(e){return"issuances"===e.value?h&&j.issuances&&!!j.issuances.length:"oauth"!==e.value||((null===(n=j.user)||void 0===n?void 0:n.connectedAccounts)||[]).find((function(e){var n;return e.provider!==((null===(n=j.user)||void 0===n?void 0:n.sourceProvider)||ve.LOGIN_PROVIDER.WALLET)}));var n})),P=D[j.tab]||D.info;return(0,Q.jsx)(v.ZP,{title:g("common.member"),onClose:t,open:!0,PaperProps:{style:{maxWidth:632,minHeight:"80vh"}},fullWidth:!0,actions:j.user&&(0,Q.jsx)(O.Z,{permission:d?"":"mutate_team",role:d?q.Wf:[],children:(0,Q.jsx)(_e,{user:j.user,children:function(e){var n=e.open;return(0,Q.jsxs)(Ge,{onClick:n,children:[j.user.approved?(0,Q.jsx)(fe.Z,{style:{fontSize:"1.2em",marginRight:"0.4em"}}):(0,Q.jsx)(he.Z,{style:{fontSize:"1.2em",marginRight:"0.4em"}}),j.user.approved?g("team.member.forbidLogin"):g("team.member.allowLogin")]})}})}),children:(0,Q.jsxs)(Xe,{children:[!j.user&&(0,Q.jsx)($e,{children:(0,Q.jsx)(F.Z,{})}),j.user&&(0,Q.jsxs)("div",{children:[(0,Q.jsxs)(Z.Z,{display:"flex",alignItems:"center",className:"info",children:[(0,Q.jsx)(de.Z,{src:j.user.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),(0,Q.jsxs)(Z.Z,{children:[(0,Q.jsx)(Z.Z,{className:"name",children:j.user.fullName}),(0,Q.jsx)(Z.Z,{className:"did",mt:1,children:(0,Q.jsx)(L.Z,{did:j.user.did})})]})]}),(0,Q.jsx)(Z.Z,{mx:3,className:"tabs",children:(0,Q.jsx)(pe.Z,{tabs:S,current:j.tab,onChange:function(e){j.tab=e},scrollButtons:"auto"})}),(0,Q.jsx)("div",{className:"body",children:(0,Q.jsx)(P.component,{})})]})]})})}Je.propTypes={userDid:f().string.isRequired,onCancel:f().func.isRequired,createPassportSvg:f().func.isRequired,initTab:f().string},Je.defaultProps={initTab:Ke};var He,Xe=u.Z.div(Ue||(Ue=(0,i.Z)(["\n .info {\n .name {\n font-weight: 400;\n font-size: 18px;\n line-height: 25px;\n color: #222222;\n }\n }\n\n .tabs {\n margin-top: 24px;\n margin-left: 0;\n margin-right: 0;\n }\n\n .body {\n margin-top: 24px;\n }\n"]))),$e=u.Z.div(We||(We=(0,i.Z)(["\n flex: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n height: 200px;\n"]))),Ge=u.Z.div(Oe||(Oe=(0,i.Z)(["\n flex-shrink: 0;\n width: 100%;\n height: 64px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n color: #999;\n fill: #999;\n font-size: 16px;\n border-top: 1px solid #f0f0f0;\n position: sticky;\n bottom: 0;\n background: #fff;\n z-index: 10;\n"]))),Ye=t(27773);function Qe(){var e=(0,_.h6)(),n=e.api,t=e.inService,r=(0,l.useContext)(w.RD),i=r.t,a=r.locale,u=(0,U.DJ)(),d=u.teamDid,p=u.invitations,m=u.refresh,f=u.endpoint,h=(0,l.useState)(null),x=(0,c.Z)(h,2),v=x[0],g=x[1],Z=(0,l.useState)(!1),b=(0,c.Z)(Z,2),j=b[0],y=b[1],k=function(){var e=(0,s.Z)((0,o.Z)().mark((function e(t){var r;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.inviteId,!j){e.next=3;break}return e.abrupt("return");case 3:return y(!0),e.prev=4,e.next=7,n.deleteInvitation({input:{teamDid:d,inviteId:r}});case 7:return m(),e.next=10,(0,q._v)(800);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),console.error(e.t0);case 15:return e.prev=15,y(!1),g(null),e.finish(15);case 19:case"end":return e.stop()}}),e,null,[[4,12,15,19]])})));return function(n){return e.apply(this,arguments)}}(),C=function(){y(!1),g(null)},S=function(e){return f?(0,q.ly)({inviteId:e.inviteId,endpoint:f}):""},P=[{label:i("team.inviting.link"),name:"inviteId",options:{sort:!1,customBodyRenderLite:function(e){var n=p[e];return f?(0,Q.jsx)(Y.Z,{children:S(n)}):(0,Q.jsx)(F.Z,{size:16})}}},{label:i("common.role"),name:"role",widtn:70},{label:i("common.remark"),name:"remark",options:{customBodyRender:function(e){return e||"--"}}},{label:i("team.inviting.inviter"),name:"inviter.fullName",options:{sort:!1,customBodyRender:function(e,n){var t,r=n.rowIndex,i=p[r];return null===i||void 0===i||null===(t=i.inviter)||void 0===t?void 0:t.fullName}}},{label:i("common.expires"),name:"expireDate",options:{customBodyRender:function(e){return(0,Q.jsx)(I.Z,{value:e,locale:a})}}},{label:i("common.actions"),name:"",width:100,align:"center",options:{sort:!1,customBodyRenderLite:function(e){var n=p[e];return(0,Q.jsx)(O.Z,{permission:t?"":"mutate_team",role:t?q.Wf:[],children:(0,Q.jsxs)(D.Z,{onClick:function(){return g({title:i("team.inviting.delete.title"),description:i("team.inviting.delete.description",{link:S(n)}),confirm:i("common.delConfirm"),cancel:i("common.cancel"),onConfirm:function(){return k(n)},onCancel:C})},size:"small",color:"error",variant:"text",children:[(0,Q.jsx)(Ye.default,{style:{fontSize:"1.2em"}}),i("common.delete")]})})}}}];return(0,Q.jsxs)(en,{children:[p.length?(0,Q.jsx)(T.Z,{locale:a,data:(0,ke.Z)(p),columns:P,verticalKeyWidth:100,options:{download:!1,filter:!1,print:!1}}):(0,Q.jsx)(Re.Z,{children:i("common.empty")}),v&&(0,Q.jsx)(ge.Z,{title:v.title,description:v.description,confirm:v.confirm,cancel:v.cancel,params:v.params,onConfirm:v.onConfirm,onCancel:v.onCancel})]})}var en=u.Z.div(He||(He=(0,i.Z)(["\n margin-top: -20px;\n"])));Qe.propTypes={},Qe.defaultProps={};var nn,tn=t(46954),rn=t(44067),an=t(92726);function on(e){var n=e.user,t=e.onIssuePassport,r=(0,U.DJ)(),i=r.teamDid,a=r.roles,o=(0,l.useContext)(w.RD).t,s=(0,l.useState)(!1),u=(0,c.Z)(s,2),d=u[0],p=u[1];return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(an.Z,{"data-cy":"member-actions",actions:[{icon:(0,Q.jsx)(y.Z,{fontSize:"small"}),text:o("team.passport.issue"),"data-cy":"action-issue-passport",onClick:function(e){e.stopPropagation(),p(!0)}},function(e){var t=e.close;return(0,Q.jsx)(_e,{user:n,children:function(e){var r=e.open;return(0,Q.jsxs)(K.Z,{dense:!0,onClick:function(e){e.stopPropagation(),t(),r(e)},"data-cy":"action-toggle-block",children:[(0,Q.jsx)(tn.Z,{style:{minWidth:24,marginRight:8},children:n.approved?(0,Q.jsx)(fe.Z,{}):(0,Q.jsx)(he.Z,{})}),(0,Q.jsx)(rn.Z,{primary:n.approved?o("team.member.forbidLogin"):o("team.member.allowLogin")})]})}},"toggle-approval")}]}),d&&(0,Q.jsx)(Ee,{teamDid:i,ownerDid:n.did,needReceive:(0,Se.h1)(n)===n.did,roles:a,onCancel:function(){return p(!1)},onSuccess:function(){t(),p(!1)}})]})}on.propTypes={user:f().object.isRequired,onIssuePassport:f().func},on.defaultProps={onIssuePassport:function(){}};var sn="$all",cn="$none",ln=function(e,n){var t=e.find((function(e){return e.key===n}));return(null===t||void 0===t?void 0:t.value)||0},un=function(e,n){var t=e.passports||[];return!!t.length&&!t.some((function(e){var t;return n.includes(null===(t=e.issuer)||void 0===t?void 0:t.id)}))};function dn(e){var n=e.user,t=(0,l.useContext)(w.RD).t,r=(0,Q.jsxs)("div",{className:"member-block",children:[(0,Q.jsxs)("div",{className:"member-avatar",children:[(0,Q.jsx)(C.Z,{src:"".concat(n.avatar,"?imageFilter=resize&w=48&h=48"),size:32,did:n.did,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),!n.approved&&(0,Q.jsx)("did",{className:"badge-block"}),n.isFromExternal&&(0,Q.jsx)(g.Z,{title:t("team.passport.externalPassport"),children:(0,Q.jsx)(Z.Z,{ml:1,className:"icon",children:(0,Q.jsx)(P.Z,{})})})]}),(0,Q.jsxs)("div",{className:"member-meta",children:[(0,Q.jsx)("div",{className:"member-text",children:n.fullName}),Array.isArray(n.tags)&&n.tags.length>0&&(0,Q.jsx)("div",{className:"member-tags",children:n.tags.map((function(e){return(0,Q.jsx)(B.Z,{style:{background:e.color,color:(0,R.getTextColor)(e.color),marginRight:4},children:e.title},e.id)}))})]})]});return n.approved?r:(0,Q.jsx)(Z.Z,{display:"flex",alignItems:"center",children:(0,Q.jsx)(g.Z,{title:t("team.member.forbidLoginDescription"),children:r})})}function pn(e){var n=e.type,t=e.createPassportSvg,r=(0,W.y0)().appIdList,i=void 0===r?[]:r,u=(0,U.DJ)(),d=u.teamDid,m=u.invitations,f=u.teamIssuerDid,h=u.roles,g=u.refresh,C=u.enablePassportIssuance,P=u.endpoint,R=u.api,B=(0,_.h6)(),F=B.inService,M=B.ws.useSubscription,V=(0,l.useContext)(w.RD),K=V.t,J=V.locale,H=(0,l.useState)(!1),X=(0,c.Z)(H,2),$=X[0],G=X[1],Y=(0,l.useState)(!1),ne=(0,c.Z)(Y,2),te=ne[0],re=ne[1],ie=(0,l.useState)(!1),ae=(0,c.Z)(ie,2),oe=ae[0],se=ae[1],le=(0,l.useState)(!1),ue=(0,c.Z)(le,2),de=ue[0],pe=ue[1],me=(0,l.useState)(!1),fe=(0,c.Z)(me,2),he=fe[0],xe=fe[1],ve=(0,l.useState)([]),ge=(0,c.Z)(ve,2),Ze=ge[0],be=ge[1],je=(0,l.useState)(),ye=(0,c.Z)(je,2),ke=ye[0],Ce=ye[1],we=(0,l.useState)([]),De=(0,c.Z)(we,2),Se=De[0],Pe=De[1],Re=(0,N.Z)({did:void 0}),Te=(0,c.Z)(Re,1)[0],Ie="members-".concat(d),Ee=(0,T.$)(Ie),Ne=(0,l.useState)({role:sn,searchText:Ee.searchText||"",hideBlocked:!1,pageSize:Ee.rowsPerPage||10,page:Ee.page?Ee.page+1:1}),Ae=(0,c.Z)(Ne,2),ze=Ae[0],Be=Ae[1];(0,A.Z)((0,s.Z)((0,o.Z)().mark((function e(){var n,t;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Te.did){e.next=6;break}return e.next=3,R.getUser({did:Te.did});case 3:n=e.sent,(t=n.user)&&pe(t);case 6:case"end":return e.stop()}}),e)}))));var Le=(h||[]).map((function(e){return{name:e.name,title:e.title,num:ln(Se,e.name)}}));Le.unshift({name:sn,title:"All Members",num:ln(Se,sn)}),Le.push({name:cn,title:"Other",num:ln(Se,cn)});var _e=function(){var e={includeTags:!0};ze.hideBlocked&&(e.approved=!0),e.role=ze.role,ze.searchText&&(e.search=ze.searchText),xe(!0),R.getUsers({query:e,paging:{page:ze.page,pageSize:ze.pageSize}}).then((function(e){xe(!1),(e.users||[]).forEach((function(e){e.isFromExternal=un(e,p()(i)?[f]:i),e.avatar=Me(e.avatar,d,F),e.passports=(e.passports||[]).filter((function(e){return e.issuer}))})),be(e.users||[]),Ce(e.paging.total)})).catch((function(e){xe(!1),z.Z.error(e.message)}))},Ue=function(){R.getUsersCountPerRole().then((function(e){Pe(e.counts||[])})).catch((function(e){z.Z.error(e.message)}))},We=function(e){e.teamDid===d&&(_e(),Ue())};(0,l.useEffect)((function(){_e()}),["".concat(ze.hideBlocked,"-").concat(ze.role,"-").concat(ze.page,"-").concat(ze.pageSize,"-").concat(ze.searchText)]),(0,l.useEffect)((function(){Ue()}),[]),M(E.EVENTS.USER_UPDATED,We,[ze]),M(E.EVENTS.USER_ADDED,We,[ze]);var Oe=C,qe=[{label:K("common.name"),name:"fullName",options:{customBodyRenderLite:function(e){var n=Ze[e];return(0,Q.jsx)("div",{"data-cy":"member-name-".concat(n.fullName),children:(0,Q.jsx)(dn,{user:n})},n.did)}}},{label:K("common.address"),name:"did",options:{customBodyRender:function(e){return(0,Q.jsx)(L.Z,{size:14,responsive:!0,copyable:!1,did:e})}}},{label:K("team.member.lastLogin"),name:"lastLoginAt",options:{customBodyRender:function(e){return(0,Q.jsx)(I.Z,{value:e,locale:J})}}},{label:K("team.member.lastLoginIp"),name:"lastLoginIp",options:{customBodyRender:function(e){return e||"-"}}},{label:K("team.member.source"),name:"sourceProvider",options:{customBodyRender:function(e){var n=e||E.USER_TYPE.WALLET;return{auth0:"Auth0",wallet:"DID wallet",federated:"Federated"}[n]||n}}},{label:K("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite:function(e){var n=Ze[e];return(0,Q.jsx)(O.Z,{permission:F?"":"mutate_team",role:F?q.Wf:[],children:(0,Q.jsx)(on,{user:n,onIssuePassport:function(){return pe((0,a.Z)((0,a.Z)({},n),{},{initTab:"issuances"}))}})})}}}],Fe=[];Oe&&(Fe.push((0,Q.jsxs)(D.Z,{variant:"outlined",style:{flexShrink:0,marginRight:16},color:"primary",size:"small",onClick:function(){se(!0)},children:[(0,Q.jsx)(S.Z,{style:{height:"1em",marginRight:4}}),K("common.inviting"),m.length?" (".concat(m.length,")"):""]}),(0,Q.jsx)(O.Z,{permission:F?"":"mutate_team",role:F?q.Wf:[],children:(0,Q.jsxs)(D.Z,{style:{flexShrink:0,marginRight:16},variant:"contained",edge:"end",color:"primary",size:"small","data-cy":"invite-member",onClick:function(){return G(!0)},children:[(0,Q.jsx)(y.Z,{style:{fontSize:"1.3em",marginRight:4}}),K("team.invite")]})})),"server"===n&&Fe.push((0,Q.jsx)(O.Z,{role:"owner",children:(0,Q.jsxs)(D.Z,{style:{flexShrink:0},variant:"contained",edge:"end",color:"error",size:"small","data-cy":"invite-member",onClick:function(){return re(!0)},children:[(0,Q.jsx)(k.Z,{style:{fontSize:"1.3em",marginRight:4}}),K("team.transferNode.name")]})})));var Ve={sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!0,onRowClick:function(e,n){var t=n.dataIndex,r=Ze[t];pe(r)},page:ze.page-1,rowsPerPage:ze.pageSize,count:ke,searchDebounceTime:600};return(0,Q.jsxs)(mn,{children:[(0,Q.jsxs)(Z.Z,{className:"main",display:"flex",children:[(0,Q.jsx)("div",{className:"left",children:(0,Q.jsx)("div",{className:"tabs",children:Le.map((function(e){return(0,Q.jsxs)("div",{className:"tab ".concat(ze.role===e.name?"active":""),onClick:function(){return n=e.name,void(he||Be((function(e){return(0,a.Z)((0,a.Z)({},e),{},{role:n,hideBlocked:!1,searchText:"",page:1})})));var n},children:[(0,Q.jsx)("span",{className:"text",children:e.title}),(0,Q.jsx)("span",{className:x()("badge",{"is-rect":e.num>999}),children:e.num})]},e.name)}))})}),(0,Q.jsx)("div",{className:"right",children:(0,Q.jsx)(T.Z,{className:"main-table",verticalKeyWidth:100,locale:J,durable:Ie,durableKeys:["page","rowsPerPage"],title:(0,Q.jsx)("div",{className:"table-toolbar-left",children:(0,Q.jsx)(b.Z,{control:(0,Q.jsx)(j.Z,{sx:{display:"flex !important"},disabled:he,color:"primary",checked:ze.hideBlocked,onChange:function(e){return n=e.target.checked,void Be((function(e){return(0,a.Z)((0,a.Z)({},e),{},{hideBlocked:n,page:1})}));var n}}),label:K("team.member.hideBlockedMember")})}),data:Ze,columns:qe,customButtons:Fe,options:Ve,loading:he,onChange:function(e){var n=e.page,t=e.rowsPerPage,r=e.searchText;ze.pageSize!==t?Be((function(e){return(0,a.Z)((0,a.Z)({},e),{},{pageSize:t,page:1})})):ze.page!==n+1?Be((function(e){return(0,a.Z)((0,a.Z)({},e),{},{page:n+1})})):ze.searchText!==r&&Be((function(e){return(0,a.Z)((0,a.Z)({},e),{},{searchText:r,page:1})}))}})})]}),(0,Q.jsx)(v.ZP,{title:K("common.inviting"),onClose:function(){return se(!1)},open:oe,maxWidth:"lg",fullWidth:!0,children:(0,Q.jsx)(Qe,{})}),de&&(0,Q.jsx)(Je,{onCancel:function(){return pe(null)},userDid:de.did,createPassportSvg:t,initTab:de.initTab}),$&&(0,Q.jsx)(ee,{teamDid:d,endpoint:P,roles:h,onCancel:function(){return G(!1)},onSuccess:function(){g(),G(!1)}}),te&&(0,Q.jsx)(ce,{teamDid:d,endpoint:P,roles:h,onCancel:function(){return re(!1)},onSuccess:function(){g(),re(!1)}})]})}dn.propTypes={user:f().object.isRequired};var mn=u.Z.div(nn||(nn=(0,i.Z)(["\n .main {\n .left {\n width: 168px;\n flex-shrink: 0;\n margin-right: 65px;\n .tabs {\n padding-top: 16px;\n .tab {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 8px 16px;\n transition: background 0.4s;\n\n width: 168px;\n height: 36px;\n border-radius: 8px;\n\n cursor: pointer;\n user-select: none;\n\n &:nth-child(n + 2) {\n margin-top: 24px;\n }\n\n &.active {\n background: #f2f2f2;\n }\n\n &:hover {\n background: #f2f2f2;\n }\n\n .text {\n font-weight: 400;\n font-size: 16px;\n line-height: 19px;\n\n color: #222222;\n }\n\n .badge {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 20px;\n height: 20px;\n border-radius: 100%;\n color: #fff;\n background: #666666;\n font-size: 10px;\n font-weight: 400;\n &.is-rect {\n width: auto;\n border-radius: 8px;\n padding: 0 4px;\n }\n }\n }\n }\n @media (max-width: ","px) {\n display: none;\n }\n }\n .right {\n flex-grow: 1;\n }\n }\n\n .member-block {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n .member-avatar {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .member-meta {\n margin-left: 10px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n }\n .badge-block {\n width: 14px;\n height: 14px;\n position: absolute;\n right: -4px;\n top: -4px;\n background: #ff5757;\n border-radius: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n &::after {\n content: '';\n width: 6px;\n height: 2px;\n background: #fefefe;\n }\n }\n }\n\n .table-toolbar-left {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 7px 0;\n }\n"])),(function(e){return e.theme.breakpoints.values.md}));pn.propTypes={type:f().oneOf(["server","blocklet"]).isRequired,createPassportSvg:f().func.isRequired}},82638:function(e,n,t){var r,i=t(33028),a=t(59740),o=t(71171),s=t(33518),c=t(47020),l=t(57201),u=t(96266),d=["children"],p=(0,s.Z)((function(e){var n=e.children,t=(0,a.Z)(e,d);return(0,u.jsx)(c.Z,(0,i.Z)((0,i.Z)({},t),{},{id:"outlined-basic",variant:"outlined",InputProps:{startAdornment:(0,u.jsx)(l.default,{})},size:"small",children:n}))}))(r||(r=(0,o.Z)(["\n .MuiOutlinedInput-root {\n color: #999;\n &.MuiInputBase-adornedStart .MuiSvgIcon-root {\n color: #bfbfbf;\n }\n opacity: 1;\n border-radius: 36px;\n background: #f8f8f8;\n padding-left: 16px;\n input {\n padding-left: 8px;\n font-weight: bold;\n &::placeholder {\n opacity: 1;\n color: #bfbfbf;\n }\n padding-top: 8.5px;\n padding-bottom: 8.5px;\n }\n }\n\n .MuiOutlinedInput-notchedOutline,\n .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline,\n .Mui-focused .MuiOutlinedInput-notchedOutline {\n border-color: #eee;\n border-width: 1px;\n }\n"])));n.Z=p},18901:function(e,n,t){var r,i=t(71171),a=t(33518).Z.div(r||(r=(0,i.Z)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 14px;\n .left,\n .right {\n }\n .right {\n display: flex;\n align-items: center;\n }\n .tabs {\n .MuiButton-root {\n border: none;\n color: #999;\n &.active {\n color: #222;\n }\n }\n }\n\n @media (max-width: 600px) {\n display: block;\n .right {\n margin-top: 12px;\n }\n }\n"])));n.Z=a}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[6412],{32322:function(e,n,t){n.h1=void 0;var r=t(76811);function i(e){return(null===e||void 0===e?void 0:e.connectedAccounts)||[]}function a(e){return i(e).find((function(e){return e.provider===r.LOGIN_PROVIDER.WALLET}))}n.h1=function(e){var n=a(e);return null===n||void 0===n?void 0:n.did}},92726:function(e,n,t){t.d(n,{Z:function(){return k}});var r,i=t(71171),a=t(32723),o=t(34795),s=t(33028),c=t(96234),l=t(59740),u=t(5057),d=t(55898),p=t.n(d),m=t(33518),f=t(67680),h=t(61533),x=t(74490),v=t(45267),g=t(46954),Z=t(44067),b=t(96266),j=["actions","size"],y=["icon","text","onClick","disabled"];function k(e){var n=e.actions,t=e.size,r=(0,l.Z)(e,j),i=(0,u.useState)(null),d=(0,c.Z)(i,2),p=d[0],m=d[1],k=Boolean(p),w=function(e){try{e.stopPropagation(),e.preventDefault()}catch(n){}m(null)};return(0,b.jsxs)(C,(0,s.Z)((0,s.Z)({},r),{},{children:[(0,b.jsx)(f.Z,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"actions-menu-icon",onClick:function(e){try{e.stopPropagation(),e.preventDefault()}catch(n){}m(e.currentTarget)},size:t,children:(0,b.jsx)(v.Z,{})}),(0,b.jsx)(h.Z,{id:"actions-menu","data-cy":"actions-menu",anchorEl:p,keepMounted:!0,open:k,onClose:w,PaperProps:{},children:n.map((function(e,n){if("function"===typeof e)return e({close:w});var t=e.icon,r=e.text,i=e.onClick,c=e.disabled,d=void 0!==c&&c,p=(0,l.Z)(e,y);return(0,u.createElement)(x.Z,(0,s.Z)((0,s.Z)({},p),{},{disabled:d,dense:!0,onClick:function(){var e=(0,o.Z)((0,a.Z)().mark((function e(n){return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i(n);case 2:w();case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),key:n,"data-cy":"actions-menu-".concat(n)}),(0,b.jsx)(g.Z,{style:{minWidth:24,marginRight:8},children:t}),(0,b.jsx)(Z.Z,{primary:r}))}))})]}))}k.propTypes={actions:p().array,size:p().oneOf(["small","medium","large"])},k.defaultProps={actions:[],size:"small"};var C=m.Z.div(r||(r=(0,i.Z)([""])))},50185:function(e,n,t){t.d(n,{Z:function(){return p}});var r=t(33028),i=t(59740),a=t(5057),o=t(55898),s=t.n(o),c=t(12937),l=t(68420),u=t(96266),d=["children"];function p(e){var n=e.children,t=(0,i.Z)(e,d),o=(0,a.useContext)(l.RD).t;return(0,u.jsx)(c.Z,(0,r.Z)((0,r.Z)({tip:o("common.copyTip"),copiedTip:o("common.copiedTip")},t),{},{children:n}))}p.propTypes={children:s().any.isRequired}},9729:function(e,n,t){t.d(n,{Z:function(){return m}});var r,i=t(71171),a=t(33028),o=t(59740),s=t(55898),c=t.n(s),l=t(33518),u=t(13727),d=t(96266),p=["passport","onDelete"];function m(e){var n=e.passport,t=e.onDelete,r=(0,o.Z)(e,p);return(0,d.jsxs)(f,(0,a.Z)((0,a.Z)({},r),{},{children:[n.title||n.name," ",!!t&&(0,d.jsx)(u.default,{"data-cy":"delete-issuance",className:"delete",onClick:t})]}))}m.propTypes={passport:c().object.isRequired,onDelete:c().func},m.defaultProps={onDelete:null};var f=l.Z.span(r||(r=(0,i.Z)(["\n display: inline-flex;\n padding: 2px 8px;\n background: ",";\n border-radius: 100vw;\n font-weight: 400;\n font-size: 12px;\n line-height: 22px;\n color: #fff;\n align-items: center;\n .delete {\n font-size: 1em;\n margin-left: 6px;\n cursor: pointer;\n }\n"])),(function(e){return e.theme.palette.primary.main}))},46412:function(e,n,t){t.r(n),t.d(n,{default:function(){return pn}});var r,i=t(71171),a=t(33028),o=t(32723),s=t(34795),c=t(96234),l=t(5057),u=t(33518),d=t(75506),p=t.n(d),m=t(55898),f=t.n(m),h=t(52277),x=t.n(h),v=t(13128),g=t(75239),Z=t(39948),b=t(26174),j=t(88092),y=t(44919),k=t(80578),C=t(72333),w=t(68420),D=t(28726),S=t(68051),P=t(18945),R=t(49777),T=t(75760),I=t(49384),E=t(35432),N=t(10381),A=t(42061),z=t(86229),B=t(22228),L=t(17450),_=t(58238),U=t(17425),W=t(29054),O=t(63406),q=t(14491),F=t(44846),M=t(55372),V=t(11750),K=t(74490),J=t(51177),H=t(47020),X=t(6041),$=t(80576),G=t(88574),Y=t(50185),Q=t(96266);function ee(e){var n=e.teamDid,t=e.roles,r=e.onCancel,i=e.onSuccess,a=e.onError,u=e.endpoint,d=(0,_.h6)().api,p=(0,l.useState)(!1),m=(0,c.Z)(p,2),f=m[0],h=m[1],x=(0,l.useState)(""),g=(0,c.Z)(x,2),Z=g[0],b=g[1],j=(0,w.PE)(),y=j.t,k=j.locale,C=(0,l.useState)(0),S=(0,c.Z)(C,2),P=S[0],R=S[1],T=(0,l.useState)(""),I=(0,c.Z)(T,2),E=I[0],N=I[1],A=(0,l.useState)(""),z=(0,c.Z)(A,2),B=z[0],L=z[1],U=(0,l.useState)(""),W=(0,c.Z)(U,2),O=W[0],ee=W[1],ne=function(){var e=(0,s.Z)((0,o.Z)().mark((function e(){var t,r,i,s;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(B){e.next=3;break}return b(y("team.member.error.passportEmpty")),e.abrupt("return");case 3:return t=O.trim(),b(null),h(!0),e.prev=6,e.next=9,d.createMemberInvitation({input:{teamDid:n,role:B,remark:t}});case 9:r=e.sent,i=r.inviteInfo,N(i),R(1),e.next=20;break;case 15:e.prev=15,e.t0=e.catch(6),s=(0,q.Z)(e.t0),b(s),a(e.t0);case 20:return e.prev=20,h(!1),e.finish(20);case 23:case"end":return e.stop()}}),e,null,[[6,15,20,23]])})));return function(){return e.apply(this,arguments)}}(),re=[{body:(0,Q.jsxs)(V.Z,{component:"div",children:[(0,Q.jsxs)($.Z,{style:{width:"100%"},variant:"outlined",children:[(0,Q.jsx)(X.Z,{children:y("common.passport")}),(0,Q.jsx)(J.Z,{"data-cy":"invite-member-select-role",value:B,onChange:function(e){b(null),L(e.target.value)},fullWidth:!0,label:y("common.passport"),disabled:f,onKeyPress:function(e){"Enter"===e.key&&(e.preventDefault(),ne())},children:t.filter((function(e){return"owner"!==e.name})).map((function(e){return(0,Q.jsx)(K.Z,{value:e.name,"data-cy":"invite-member-select-option-".concat(e.name),children:(0,Q.jsx)("span",{children:e.title||e.name})},e.name)}))})]}),(0,Q.jsx)("div",{style:{marginTop:20,marginBottom:10}}),(0,Q.jsx)(H.Z,{label:y("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:O,onChange:function(e){b(null),ee(e.target.value)},disabled:f,"data-cy":"invite-member-input-remark"}),(0,Q.jsx)("div",{style:{marginTop:20,marginBottom:10}})]}),cancel:y("common.cancel"),confirm:y("team.member.inviteDialog.createInviteLink"),onCancel:r,onConfirm:ne},{body:function(){var e=(0,q.ly)({inviteId:E.inviteId,endpoint:u});return(0,Q.jsxs)("div",{children:[(0,Q.jsx)(te,{children:y("team.member.inviteDialog.createSuccessTip",{expireDate:(0,q.B2)(E.expireDate,k)})}),(0,Q.jsx)("div",{style:{marginTop:"40px"}}),(0,Q.jsx)(Y.Z,{children:e})]})},confirm:y("common.confirm"),onConfirm:i}][P];return(0,Q.jsxs)(v.ZP,{title:y("common.invite"),fullWidth:!0,open:!0,showCloseButton:!1,actions:(0,Q.jsxs)(Q.Fragment,{children:[re.cancel&&(0,Q.jsx)(D.Z,{onClick:re.onCancel,color:"inherit",children:re.cancel}),(0,Q.jsxs)(D.Z,{onClick:re.onConfirm,color:"primary",disabled:f||!B,variant:"contained",autoFocus:!0,children:[f&&(0,Q.jsx)(F.Z,{size:16}),re.confirm]})]}),children:[(0,Q.jsx)(M.Z,{component:"div",children:"function"===typeof re.body?re.body():re.body}),!!Z&&(0,Q.jsx)(G.Z,{type:"error",variant:"icon",children:Z})]})}ee.propTypes={teamDid:f().string.isRequired,onCancel:f().func.isRequired,onSuccess:f().func.isRequired,onError:f().func,roles:f().array,endpoint:f().string},ee.defaultProps={onError:function(){},roles:[],endpoint:""};var ne,te=u.Z.div(r||(r=(0,i.Z)(["\n font-size: 16px;\n font-weight: bold;\n"]))),re=t(26796),ie=t(43681),ae=t.n(ie),oe=t(55916),se=t(73545);function ce(e){var n=e.teamDid,t=e.onCancel,r=e.onSuccess,i=e.onError,a=e.endpoint,u=(0,_.h6)(),d=u.api,p=u.info,m=(0,l.useContext)(se.B).api,f=(0,l.useState)(!1),h=(0,c.Z)(f,2),x=h[0],g=h[1],Z=(0,w.PE)(),b=Z.t,j=Z.locale,y=(0,l.useState)(""),k=(0,c.Z)(y,2),C=k[0],S=k[1],P=(0,l.useState)(!1),R=(0,c.Z)(P,2),T=R[0],I=R[1],E=(0,l.useState)(0),N=(0,c.Z)(E,2),A=N[0],z=N[1],B=(0,l.useState)(""),L=(0,c.Z)(B,2),U=L[0],W=L[1],O=(0,l.useState)(""),K=(0,c.Z)(O,2),J=K[0],X=K[1],$=!!ae()(p,"ownerNft.did"),ee=(0,re.default)((0,s.Z)((0,o.Z)().mark((function e(){var n,t;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!$){e.next=6;break}return e.next=3,d.getDelegationState();case 3:return n=e.sent,t=n.state,e.abrupt("return",t);case 6:return e.abrupt("return",{delegated:!0});case 7:case"end":return e.stop()}}),e)}))));if(ee.loading)return(0,Q.jsx)(v.ZP,{title:b("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:t,children:(0,Q.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,Q.jsx)(F.Z,{})})});if(ee.error)return(0,Q.jsx)(v.ZP,{title:b("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:t,children:(0,Q.jsx)(G.Z,{type:"error",variant:"icon",children:(0,q.Z)(ee.error)})});var ne=function(){var e=(0,s.Z)((0,o.Z)().mark((function e(){var t,r,a;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return S(null),g(!0),e.prev=2,e.next=5,d.createTransferInvitation({input:{teamDid:n,role:"owner",remark:J.trim()}});case 5:t=e.sent,r=t.inviteInfo,W(r),z(ie.length-1),e.next=16;break;case 11:e.prev=11,e.t0=e.catch(2),a=(0,q.Z)(e.t0),S(a),i(e.t0);case 16:return e.prev=16,g(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[2,11,16,19]])})));return function(){return e.apply(this,arguments)}}(),te=function(){I(!1),z(0)},ie=[{body:(0,Q.jsxs)(V.Z,{component:"div",children:[(0,Q.jsxs)(G.Z,{type:"warning",children:[(0,Q.jsx)(V.Z,{children:b("team.transferNode.inviteDialog.tips.progress")}),(0,Q.jsx)(V.Z,{children:b("team.transferNode.inviteDialog.tips.newOwnerPermissions")})]}),(0,Q.jsx)(G.Z,{type:"warning",children:(0,Q.jsx)(V.Z,{children:b("team.transferNode.inviteDialog.tips.revoke")})}),(0,Q.jsx)("div",{style:{marginTop:20,marginBottom:10}}),(0,Q.jsx)(H.Z,{label:b("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:J,onChange:function(e){S(null),X(e.target.value)},disabled:x,"data-cy":"transfer-node-input-remark"}),(0,Q.jsx)("div",{style:{marginTop:20,marginBottom:10}})]}),cancel:b("common.cancel"),confirm:b("team.transferNode.inviteDialog.createInviteLink"),onCancel:t,onConfirm:$&&!ae()(ee,"value.delegated")?function(){I(!0),z(1)}:ne},{body:function(){return(0,Q.jsx)(oe.default,{action:"delegate-transfer-nft",open:T,locale:j,checkFn:m.get,onClose:te,onSuccess:ne,checkTimeout:3e5,webWalletUrl:(0,q.yP)(p),extraParams:{targetDID:p.did},messages:{title:b("team.transferNode.delegateDialog.title"),scan:b("team.transferNode.delegateDialog.scan"),confirm:b("team.transferNode.delegateDialog.confirm"),success:b("team.transferNode.delegateDialog.success")},popup:!0})}},{body:function(){var e=(0,q.ly)({inviteId:U.inviteId,endpoint:a});return(0,Q.jsxs)("div",{children:[(0,Q.jsx)(ue,{children:b("team.transferNode.inviteDialog.createSuccessTip",{expireDate:(0,q.B2)(U.expireDate,j)})}),(0,Q.jsx)("div",{style:{marginTop:"40px"}}),(0,Q.jsx)(Y.Z,{children:e})]})},confirm:b("common.confirm"),onConfirm:r}],ce=ie[A];return(0,Q.jsxs)(v.ZP,{title:b("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,showCloseButton:!1,actions:(0,Q.jsxs)(Q.Fragment,{children:[ce.cancel&&(0,Q.jsx)(D.Z,{onClick:ce.onCancel,color:"inherit",children:ce.cancel}),(0,Q.jsxs)(D.Z,{onClick:ce.onConfirm,color:"primary",disabled:x,variant:"contained",autoFocus:!0,children:[x&&(0,Q.jsx)(F.Z,{size:16}),ce.confirm]})]}),children:[(0,Q.jsx)(M.Z,{component:"div",children:"function"===typeof ce.body?ce.body():ce.body}),!!C&&(0,Q.jsx)(G.Z,{type:"error",variant:"icon",children:C})]})}ce.propTypes={teamDid:f().string.isRequired,onCancel:f().func.isRequired,onSuccess:f().func.isRequired,onError:f().func,endpoint:f().string},ce.defaultProps={onError:function(){},endpoint:""};var le,ue=u.Z.div(ne||(ne=(0,i.Z)(["\n font-size: 16px;\n font-weight: bold;\n"]))),de=(t(59740),t(62681)),pe=t(94464),me=t(64886),fe=t(12987),he=t(71246),xe=t(12673),ve=t(76811),ge=t(70461),Ze=t(9729);function be(e){var n=e.issuances,t=e.teamDid,r=e.onRefresh,i=(0,_.h6)(),a=i.api,u=i.inService,d=(0,l.useContext)(w.RD),p=d.t,m=d.locale,f=(0,l.useState)(null),h=(0,c.Z)(f,2),x=h[0],v=h[1],g=(0,l.useState)(!1),b=(0,c.Z)(g,2),j=b[0],y=b[1],k=(0,U.DJ)().endpoint,C=function(){var e=(0,s.Z)((0,o.Z)().mark((function e(n){var i;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.id,!j){e.next=3;break}return e.abrupt("return");case 3:return y(!0),e.prev=4,e.next=7,a.deletePassportIssuance({input:{teamDid:t,sessionId:i}});case 7:r(),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(4),z.Z.error(e.t0.message);case 13:return e.prev=13,y(!1),v(null),e.finish(13);case 17:case"end":return e.stop()}}),e,null,[[4,10,13,17]])})));return function(n){return e.apply(this,arguments)}}(),D=function(){y(!1),v(null)},S=function(e){return k?(0,q._)({id:e.id,endpoint:k}):""};function P(e){var n=e.data;return(0,Q.jsxs)("div",{className:"issuance",children:[(0,Q.jsxs)(Z.Z,{display:"flex",justifyContent:"space-between",children:[(0,Q.jsx)(O.Z,{permission:u?"":"mutate_team",role:u?q.Wf:[],children:function(e){return e?(0,Q.jsx)(Ze.Z,{passport:{title:n.title,name:n.name},onDelete:function(){return v({title:p("team.passport.issuance.delete.title"),description:p("team.passport.issuance.delete.description",{link:S(n)}),confirm:p("common.delConfirm"),cancel:p("common.cancel"),onConfirm:function(){C(n)},onCancel:D})}}):(0,Q.jsx)(Ze.Z,{passport:{title:n.title,name:n.name}})}}),(0,Q.jsxs)("div",{style:{color:"#999"},children:[p("common.expires"),":\xa0",(0,q.B2)(n.expireDate,m)]})]}),(0,Q.jsx)(Z.Z,{mt:2,children:(0,Q.jsx)(Y.Z,{children:S(n)})})]})}return(0,Q.jsxs)(je,{children:[n.map((function(e){return(0,Q.jsx)(P,{data:e})})),x&&(0,Q.jsx)(ge.Z,{title:x.title,description:x.description,confirm:x.confirm,cancel:x.cancel,params:x.params,onConfirm:x.onConfirm,onCancel:x.onCancel})]})}var je=u.Z.div(le||(le=(0,i.Z)(["\n .MuiTableHead-root {\n display: none;\n }\n .issuance {\n padding: 16px 0;\n border-bottom: 1px solid #f0f0f0;\n .MuiTypography-root {\n display: inline-block;\n width: 100%;\n background: #f3f3f3;\n border-radius: 4px;\n padding-top: 6px;\n padding-bottom: 6px;\n }\n }\n"])));be.propTypes={teamDid:f().string.isRequired,issuances:f().array,onRefresh:f().func},be.defaultProps={issuances:[],onRefresh:function(){}};var ye,ke=t(68079),Ce=t(26538),we=t.n(Ce),De=t(5178),Se=t(32322),Pe=t(87806),Re=t(25710),Te=t(82638),Ie=t(18901);function Ee(e){var n=e.teamDid,t=e.ownerDid,r=e.needReceive,i=e.roles,a=e.onCancel,u=e.onSuccess,d=e.onError,p=e.showOwnerPassport,m=(0,_.h6)().api,f=(0,l.useState)(!1),h=(0,c.Z)(f,2),x=h[0],g=h[1],Z=(0,l.useState)(""),b=(0,c.Z)(Z,2),j=b[0],y=b[1],k=(0,w.PE)().t,C=(0,l.useState)(""),S=(0,c.Z)(C,2),P=S[0],R=S[1],T=function(){var e=(0,s.Z)((0,o.Z)().mark((function e(){var r;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(P){e.next=3;break}return y(k("team.member.error.passportEmpty")),e.abrupt("return");case 3:return y(null),g(!0),e.prev=5,e.next=8,m.createPassportIssuance({input:{teamDid:n,name:P,ownerDid:t}});case 8:u(),e.next=16;break;case 11:e.prev=11,e.t0=e.catch(5),r=(0,q.Z)(e.t0),y(r),d(e.t0);case 16:return e.prev=16,g(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[5,11,16,19]])})));return function(){return e.apply(this,arguments)}}();return(0,Q.jsxs)(v.ZP,{title:k("team.passport.issue"),fullWidth:!0,open:!0,onClick:function(e){return e.stopPropagation()},onClose:a,disableEscapeKeyDown:!0,PaperProps:{style:{minHeight:"auto"}},actions:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(D.Z,{onClick:a,color:"inherit",size:"small",children:k("common.cancel")}),(0,Q.jsxs)(D.Z,{onClick:T,color:"primary",size:"small",disabled:x||!P,variant:"contained",autoFocus:!0,"data-cy":"issue-passport-create-btn",children:[x&&(0,Q.jsx)(F.Z,{size:16}),k(r?"team.passport.issuance.create.title":"oauth.issued")]})]}),children:[(0,Q.jsx)(M.Z,{component:"div",children:(0,Q.jsx)(V.Z,{component:"div",children:(0,Q.jsxs)($.Z,{style:{width:"100%"},variant:"outlined",children:[(0,Q.jsx)(X.Z,{children:k("common.passport")}),(0,Q.jsx)(J.Z,{"data-cy":"issue-passport-select-passport",value:P,onChange:function(e){y(null),R(e.target.value)},fullWidth:!0,label:k("common.passport"),disabled:x,onKeyPress:function(e){"Enter"===e.key&&(e.preventDefault(),T())},children:i.filter((function(e){return p||"owner"!==e.name})).map((function(e){return(0,Q.jsx)(K.Z,{value:e.name,"data-cy":"issue-passport-select-option-".concat(e.name),children:(0,Q.jsx)("span",{children:e.title||e.name})},e.name)}))})]})})}),!!j&&(0,Q.jsx)(G.Z,{type:"error",variant:"icon",children:j})]})}function Ne(e){var n=e.action,t=e.passport,r=(0,w.PE)().t,i=(0,U.DJ)().roles.find((function(e){return e.name===t.role}));return(0,Q.jsxs)("div",{children:[(0,Q.jsx)("div",{children:r("enable"===n?"team.member.enablePassportDescription":"team.member.revokePassportDescription")}),i&&(0,Q.jsx)(Z.Z,{mt:3,fontWeight:"bold",children:r("team.member.passportPermissionTitle")}),i&&(0,Q.jsx)(Z.Z,{mt:1,children:i.description})]})}function Ae(e){var n,t=e.user,r=e.onCreate,i=e.createPassportSvg,u=(0,w.PE)().t,d=(0,se.T)().session,p=(0,U.DJ)(),m=p.roles,f=p.teamDid,h=p.teamIssuerDid,x=p.refresh,v=p.enablePassportIssuance,b=p.trustedPassports,j=p.passportColor,k=p.blocklet,C=(0,W.y0)().appIdList,S=(0,_.h6)(),R=S.api,T=S.inService,I=(0,l.useState)(!1),N=(0,c.Z)(I,2),A=N[0],B=N[1],L=(0,l.useState)(null),F=(0,c.Z)(L,2),M=F[0],V=F[1],K=(0,l.useState)(!1),J=(0,c.Z)(K,2),H=J[0],X=J[1],$=(0,l.useState)(""),G=(0,c.Z)($,2),Y=G[0],ee=G[1],ne=[h].concat((0,ke.Z)(C||[])).filter(Boolean),te=(ae()(t,"passports")||[]).map((function(e){return(0,a.Z)((0,a.Z)({},e),{},{revoked:e.status===E.PASSPORT_STATUS.REVOKED})})),re=function(){var e=(0,s.Z)((0,o.Z)().mark((function e(n){var r;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!A){e.next=2;break}return e.abrupt("return");case 2:return B(!0),e.prev=3,r=n.status===E.PASSPORT_STATUS.REVOKED?"enableUserPassport":"revokeUserPassport",e.next=7,R[r]({input:{teamDid:f,userDid:t.did,passportId:n.id}});case 7:x(),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),z.Z.error((0,q.Z)(e.t0));case 13:return e.prev=13,B(!1),V(null),e.finish(13);case 17:case"end":return e.stop()}}),e,null,[[3,10,13,17]])})));return function(n){return e.apply(this,arguments)}}(),ie=function(e,n){return t.did===d.user.did&&d.user.passportId&&d.user.passportId===n.id?{revokable:!1,message:u("team.passport.shouldNotDeleteCurrent")}:e?f===n.issuer.id&&"owner"===n.name?{revokable:!1,message:u("team.passport.noPermission")}:{revokable:!0}:{revokable:!1,message:u("team.passport.noPermission")}},oe=te.filter((function(e){return!Y||e.title.includes(Y)||e.name.includes(Y)}));return(0,Q.jsxs)(ze,{children:[(0,Q.jsxs)(Ie.Z,{children:[(0,Q.jsx)("div",{className:"left",children:(0,Q.jsx)(Te.Z,{placeholder:u("team.passport.search"),value:Y,onChange:function(e){return ee(e.target.value)}})}),(0,Q.jsx)("div",{className:"right",children:v&&!!t.approved&&(0,Q.jsx)(O.Z,{permission:T?"":"mutate_team",role:T?q.Wf:[],children:(0,Q.jsxs)(D.Z,{variant:"contained",color:"primary","data-cy":"issue-passport",onClick:function(){return X(!0)},children:[(0,Q.jsx)(y.Z,{style:{fontSize:16,marginRight:4}}),u("team.passport.issue")]})})})]}),(0,Q.jsxs)(Z.Z,{children:[oe.map((function(e){return(0,Q.jsx)(O.Z,{permission:T?"":"mutate_team",role:T?q.Wf:[],children:function(n){return(0,Q.jsxs)(Z.Z,{className:"passport-item",display:"flex",justifyContent:"space-between",alignItems:"center",mt:3,children:[(0,Q.jsxs)(Z.Z,{display:"flex",alignItems:"center",children:[(0,Q.jsx)("div",{dangerouslySetInnerHTML:{__html:i({title:e.title||e.name,issuer:e.issuer&&e.issuer.name,issuerDid:e.issuer&&e.issuer.id,ownerName:t.fullName,ownerDid:t.did,ownerAvatarUrl:t.avatar,revoked:e.revoked,preferredColor:j,width:"150px"})}}),(0,Q.jsxs)("div",{className:"body",children:[(0,Q.jsxs)(Z.Z,{className:"title",display:"flex",alignItems:"center",children:[we()(e.title),(0,Q.jsxs)("div",{className:"status-icons",children:[!!ne.length&&!ne.includes(e.issuer.id)&&(0,Q.jsx)(P.Z,{}),e.revoked&&(0,Q.jsx)(Pe.Z,{})]})]}),e.expirationDate&&(0,Q.jsx)(Z.Z,{className:"title",display:"flex",alignItems:"center",children:u("team.passport.validUntil",{date:e.expirationDate})}),!!ne.length&&!ne.includes(e.issuer.id)&&(0,Q.jsxs)("div",{className:"tip",children:[e.issuer.id!==h&&!b.some((function(n){return n.issuerDid===e.issuer.id}))&&(0,Q.jsx)(g.Z,{title:u("team.passport.notTrustedIssuerTip"),children:(0,Q.jsx)(Z.Z,{component:De.Z,style:{fontSize:"1.3em"},color:"error.main",mr:.5})}),(0,Q.jsx)("span",{children:u("team.passport.issueBy",{name:e.issuer.name})})]})]})]}),(0,Q.jsx)(Z.Z,{children:ie(n,e).revokable?(0,Q.jsxs)(D.Z,{variant:"outlined",color:e.revoked?"primary":"secondary",onClick:function(){return(n=e).status===E.PASSPORT_STATUS.REVOKED?V({title:u("team.member.enablePassport"),description:(0,Q.jsx)(Ne,{action:"enable",passport:n}),confirm:u("common.enable"),cancel:u("common.cancel"),onConfirm:function(){re(n)},onCancel:function(){B(!1),V(null)},color:"primary"}):V({title:u("team.member.revokePassport"),description:(0,Q.jsx)(Ne,{action:"revoke",passport:n}),confirm:u("common.revoke"),cancel:u("common.cancel"),onConfirm:function(){re(n)},onCancel:function(){B(!1),V(null)}});var n},children:[e.revoked?(0,Q.jsx)(y.Z,{style:{fontSize:16,marginRight:4}}):(0,Q.jsx)(Pe.Z,{style:{height:16,marginRight:4}}),e.revoked?u("common.enable"):u("common.revoke")]}):(0,Q.jsx)(g.Z,{title:ie(n,e).message,children:(0,Q.jsx)(De.Z,{style:{color:"#ddd"}})})})]})}},e.id)})),!oe.length&&(0,Q.jsx)(Re.Z,{children:u("common.empty")})]}),H&&(0,Q.jsx)(Ee,{teamDid:f,ownerDid:t.did,needReceive:(0,Se.h1)(t)===t.did,roles:m,onCancel:function(){return X(!1)},onSuccess:function(){r(),X(!1)},showOwnerPassport:k&&!(null!==(n=k.settings)&&void 0!==n&&n.owner)}),M&&(0,Q.jsx)(ge.Z,{title:M.title,description:M.description,confirm:M.confirm,cancel:M.cancel,params:M.params,onConfirm:M.onConfirm,onCancel:M.onCancel,color:M.color})]})}Ee.propTypes={teamDid:f().string.isRequired,ownerDid:f().string.isRequired,needReceive:f().bool,onCancel:f().func.isRequired,onSuccess:f().func.isRequired,onError:f().func,roles:f().array,showOwnerPassport:f().bool},Ee.defaultProps={onError:function(){},roles:[],showOwnerPassport:!1,needReceive:!0},Ne.propTypes={action:f().string.isRequired,passport:f().object.isRequired},Ne.defaultProps={},Ae.propTypes={user:f().object.isRequired,createPassportSvg:f().func.isRequired,onCreate:f().func},Ae.defaultProps={onCreate:function(){}};var ze=u.Z.div(ye||(ye=(0,i.Z)(["\n .passport-item {\n .body {\n padding: 0;\n margin-left: 24px;\n margin-top: 0;\n }\n .title {\n font-weight: 400;\n font-size: 16px;\n line-height: 19px;\n color: #222222;\n }\n .tip {\n display: flex;\n align-items: center;\n font-size: 14px;\n margin-top: 6px;\n color: #bbb;\n }\n .status-icons {\n svg {\n fill: #bfbfbf;\n height: 1.2em;\n margin-left: 0.4em;\n }\n }\n .MuiButton-outlinedSecondary {\n color: #f16e6e;\n fill: #f16e6e;\n background: #fcf3f3;\n border: 0;\n &:hover {\n border: 0;\n }\n }\n }\n"]))),Be=function(e,n){return e.nodeOwner&&e.nodeOwner.did===n},Le=function(e,n){return e&&e.did===n};function _e(e){var n,t=e.user,r=e.onCancel,i=e.onSuccess,a=e.onError,u=e.children,d=(0,_.h6)(),p=d.api,m=d.info,f=d.inService,h=(0,se.T)().session,x=(0,U.DJ)(),v=x.teamDid,g=x.refresh,Z=(0,w.PE)().t,b=(0,l.useState)(!1),j=(0,c.Z)(b,2),y=j[0],k=j[1],C=(0,l.useState)(!1),D=(0,c.Z)(C,2),S=D[0],P=D[1],R=function(){var e=(0,s.Z)((0,o.Z)().mark((function e(n){var t,r;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.did,r=n.approved,!y){e.next=3;break}return e.abrupt("return");case 3:return k(!0),e.prev=4,e.next=7,p.updateUserApproval({input:{teamDid:v,user:{did:t,approved:!r}}});case 7:P(!1),i(),g(),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(4),z.Z.error((0,q.Z)(e.t0)),a();case 16:return e.prev=16,k(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[4,12,16,19]])})));return function(n){return e.apply(this,arguments)}}(),T={title:t.approved?Z("team.member.forbidLogin"):Z("team.member.allowLogin"),description:t.approved?Z("team.member.forbidLoginDescription"):Z("team.member.allowLoginDescription"),confirm:Z("common.confirm"),cancel:Z("common.cancel"),onConfirm:function(){R(t)},onCancel:function(){k(!1),P(!1),r()},color:t.approved?"error":"primary"};return(n=(f||m.nodeOwner&&!Be(m,t.did))&&!Le(h.user,t.did))?(0,Q.jsxs)(Q.Fragment,{children:["function"===typeof u?u({can:n,open:function(){return P(!0)}}):u,S?(0,Q.jsx)(ge.Z,{title:T.title,description:T.description,confirm:T.confirm,cancel:T.cancel,params:T.params,onConfirm:T.onConfirm,onCancel:T.onCancel,color:T.color}):null]}):null}_e.propTypes={user:f().object,onSuccess:f().func,onCancel:f().func,onError:f().func,children:f().oneOfType([f().object,f().func])},_e.defaultProps={user:{},onSuccess:function(){},onCancel:function(){},onError:function(){},children:null};var Ue,We,Oe,qe=t(6352),Fe=t.n(qe);function Me(e,n,t){if(e&&e.startsWith(E.USER_AVATAR_URL_PREFIX)){var r=window.env.apiPrefix||"/";return t?Fe()(r,E.USER_AVATAR_PATH_PREFIX,e.replace(E.USER_AVATAR_URL_PREFIX,"")):Fe()(r,E.USER_AVATAR_PATH_PREFIX,n,e.replace(E.USER_AVATAR_URL_PREFIX,""))}return e}function Ve(e){return(e.user.connectedAccounts||[]).map((function(e){return(0,Q.jsx)(me.Z,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:e.provider,children:(0,Q.jsx)(L.Z,{did:e.did})},e.did)}))}f().string.isRequired,Ve.propTypes={user:f().object.isRequired,onChangeUser:f().func},Ve.defaultProps={onChangeUser:function(){}};var Ke="info";function Je(e){var n=e.userDid,t=e.onCancel,r=e.initTab,i=e.createPassportSvg,a=(0,_.h6)(),c=a.api,u=a.ws.useSubscription,d=a.inService,p=(0,U.DJ)(),m=p.roles,f=p.teamDid,h=p.enablePassportIssuance,x=(0,w.PE)(),g=x.t,b=x.locale,j=(0,xe.Z)({user:null,issuances:null,tab:r||Ke}),y=function(){var e=(0,s.Z)((0,o.Z)().mark((function e(n,t){var r;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.doBatchQuery({getUser:{input:{teamDid:n,user:{did:t},options:{includeTags:!0}}},getPassportIssuances:{input:{teamDid:n,ownerDid:t}}});case 3:(r=e.sent).getUser.user&&(r.getUser.user.avatar=Me(r.getUser.user.avatar,n,d),r.getUser.user.passports=(r.getUser.user.passports||[]).filter((function(e){return e.issuer}))),j.user=r.getUser.user||{},j.issuances=r.getPassportIssuances.list||[],e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),z.Z.error((0,q.Z)(e.t0));case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(n,t){return e.apply(this,arguments)}}();(0,l.useEffect)((function(){f&&y(f,n)}),[n,f]);u(E.EVENTS.USER_UPDATED,(function(e){e.teamDid===f&&e.user&&e.user.did===n&&y(f,n)}),[n,f]),(0,l.useEffect)((function(){j.issuances&&!j.issuances.length&&"issuances"===j.tab&&(j.tab=Ke)}),[j.issuances]);var k=function(){var e=(0,s.Z)((0,o.Z)().mark((function e(n){return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y(f,n.did);case 2:j.tab=Ke;case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),C={auth0:"Auth0",wallet:"DID wallet",federated:"Federated"},D={info:{label:g("common.basicInfo"),value:Ke,component:function(){var e,n;return(j.user?[{name:g("team.member.name"),value:j.user.fullName},{name:g("common.email"),value:j.user.email},{name:g("team.member.source"),value:(0,Q.jsx)(Z.Z,{display:"flex",alignItems:"center",children:C[(null===(e=j.user)||void 0===e?void 0:e.sourceProvider)||E.USER_TYPE.WALLET]||(null===(n=j.user)||void 0===n?void 0:n.sourceProvider)})},{name:g("team.member.allowLogin"),value:j.user.approved?g("common.yes"):g("common.no")},{name:g("team.member.lastLogin"),value:(0,q.B2)(j.user.lastLoginAt,b)},{name:g("team.member.lastLoginIp"),value:j.user.lastLoginIp||""},{name:g("common.createdAt"),value:(0,q.B2)(j.user.createdAt,b)},{name:g("common.remark"),value:j.user.remark||"--"},Array.isArray(j.user.tags)&&j.user.tags.length>0?{name:g("common.tags"),value:j.user.tags.map((function(e){return(0,Q.jsx)(B.Z,{style:{background:e.color,color:(0,R.getTextColor)(e.color),marginRight:4},children:e.title},e.id)}))}:null].filter(Boolean):[]).map((function(e){return e.name===g("common.did")?(0,Q.jsx)(me.Z,{valueComponent:"div",nameWidth:120,name:e.name,nameFormatter:function(){return g("common.did")},children:e.value},e.name):(0,Q.jsx)(me.Z,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:e.name,children:e.value},e.name)}))}},oauth:{label:g("team.member.connectedAccounts"),value:"oauth",component:function(){return(0,Q.jsx)(Ve,{user:j.user,onChangeUser:k})}},passports:{label:g("common.passport"),value:"passports",component:function(){return(0,Q.jsx)(Ae,{user:j.user,teamDid:f,roles:m,createPassportSvg:i,onCreate:function(){y(f,n).then((function(){h&&j.issuances&&j.issuances.length&&(j.tab="issuances")}))},onRefresh:function(){y(f,n)}})}},issuances:{label:g("team.passport.issuance.pending"),value:"issuances",component:function(){return(0,Q.jsx)(be,{issuances:j.issuances||[],teamDid:f,onRefresh:function(){return y(f,n)}})}}},S=Object.values(D).map((function(e){return{label:e.label,value:e.value}})).filter((function(e){return"issuances"===e.value?h&&j.issuances&&!!j.issuances.length:"oauth"!==e.value||((null===(n=j.user)||void 0===n?void 0:n.connectedAccounts)||[]).find((function(e){var n;return e.provider!==((null===(n=j.user)||void 0===n?void 0:n.sourceProvider)||ve.LOGIN_PROVIDER.WALLET)}));var n})),P=D[j.tab]||D.info;return(0,Q.jsx)(v.ZP,{title:g("common.member"),onClose:t,open:!0,PaperProps:{style:{maxWidth:632,minHeight:"80vh"}},fullWidth:!0,actions:j.user&&(0,Q.jsx)(O.Z,{permission:d?"":"mutate_team",role:d?q.Wf:[],children:(0,Q.jsx)(_e,{user:j.user,children:function(e){var n=e.open;return(0,Q.jsxs)(Ge,{onClick:n,children:[j.user.approved?(0,Q.jsx)(fe.Z,{style:{fontSize:"1.2em",marginRight:"0.4em"}}):(0,Q.jsx)(he.Z,{style:{fontSize:"1.2em",marginRight:"0.4em"}}),j.user.approved?g("team.member.forbidLogin"):g("team.member.allowLogin")]})}})}),children:(0,Q.jsxs)(Xe,{children:[!j.user&&(0,Q.jsx)($e,{children:(0,Q.jsx)(F.Z,{})}),j.user&&(0,Q.jsxs)("div",{children:[(0,Q.jsxs)(Z.Z,{display:"flex",alignItems:"center",className:"info",children:[(0,Q.jsx)(de.Z,{src:j.user.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),(0,Q.jsxs)(Z.Z,{children:[(0,Q.jsx)(Z.Z,{className:"name",children:j.user.fullName}),(0,Q.jsx)(Z.Z,{className:"did",mt:1,children:(0,Q.jsx)(L.Z,{did:j.user.did})})]})]}),(0,Q.jsx)(Z.Z,{mx:3,className:"tabs",children:(0,Q.jsx)(pe.Z,{tabs:S,current:j.tab,onChange:function(e){j.tab=e},scrollButtons:"auto"})}),(0,Q.jsx)("div",{className:"body",children:(0,Q.jsx)(P.component,{})})]})]})})}Je.propTypes={userDid:f().string.isRequired,onCancel:f().func.isRequired,createPassportSvg:f().func.isRequired,initTab:f().string},Je.defaultProps={initTab:Ke};var He,Xe=u.Z.div(Ue||(Ue=(0,i.Z)(["\n .info {\n .name {\n font-weight: 400;\n font-size: 18px;\n line-height: 25px;\n color: #222222;\n }\n }\n\n .tabs {\n margin-top: 24px;\n margin-left: 0;\n margin-right: 0;\n }\n\n .body {\n margin-top: 24px;\n }\n"]))),$e=u.Z.div(We||(We=(0,i.Z)(["\n flex: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n height: 200px;\n"]))),Ge=u.Z.div(Oe||(Oe=(0,i.Z)(["\n flex-shrink: 0;\n width: 100%;\n height: 64px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n color: #999;\n fill: #999;\n font-size: 16px;\n border-top: 1px solid #f0f0f0;\n position: sticky;\n bottom: 0;\n background: #fff;\n z-index: 10;\n"]))),Ye=t(27773);function Qe(){var e=(0,_.h6)(),n=e.api,t=e.inService,r=(0,l.useContext)(w.RD),i=r.t,a=r.locale,u=(0,U.DJ)(),d=u.teamDid,p=u.invitations,m=u.refresh,f=u.endpoint,h=(0,l.useState)(null),x=(0,c.Z)(h,2),v=x[0],g=x[1],Z=(0,l.useState)(!1),b=(0,c.Z)(Z,2),j=b[0],y=b[1],k=function(){var e=(0,s.Z)((0,o.Z)().mark((function e(t){var r;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.inviteId,!j){e.next=3;break}return e.abrupt("return");case 3:return y(!0),e.prev=4,e.next=7,n.deleteInvitation({input:{teamDid:d,inviteId:r}});case 7:return m(),e.next=10,(0,q._v)(800);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),console.error(e.t0);case 15:return e.prev=15,y(!1),g(null),e.finish(15);case 19:case"end":return e.stop()}}),e,null,[[4,12,15,19]])})));return function(n){return e.apply(this,arguments)}}(),C=function(){y(!1),g(null)},S=function(e){return f?(0,q.ly)({inviteId:e.inviteId,endpoint:f}):""},P=[{label:i("team.inviting.link"),name:"inviteId",options:{sort:!1,customBodyRenderLite:function(e){var n=p[e];return f?(0,Q.jsx)(Y.Z,{children:S(n)}):(0,Q.jsx)(F.Z,{size:16})}}},{label:i("common.role"),name:"role",widtn:70},{label:i("common.remark"),name:"remark",options:{customBodyRender:function(e){return e||"--"}}},{label:i("team.inviting.inviter"),name:"inviter.fullName",options:{sort:!1,customBodyRender:function(e,n){var t,r=n.rowIndex,i=p[r];return null===i||void 0===i||null===(t=i.inviter)||void 0===t?void 0:t.fullName}}},{label:i("common.expires"),name:"expireDate",options:{customBodyRender:function(e){return(0,Q.jsx)(I.Z,{value:e,locale:a})}}},{label:i("common.actions"),name:"",width:100,align:"center",options:{sort:!1,customBodyRenderLite:function(e){var n=p[e];return(0,Q.jsx)(O.Z,{permission:t?"":"mutate_team",role:t?q.Wf:[],children:(0,Q.jsxs)(D.Z,{onClick:function(){return g({title:i("team.inviting.delete.title"),description:i("team.inviting.delete.description",{link:S(n)}),confirm:i("common.delConfirm"),cancel:i("common.cancel"),onConfirm:function(){return k(n)},onCancel:C})},size:"small",color:"error",variant:"text",children:[(0,Q.jsx)(Ye.default,{style:{fontSize:"1.2em"}}),i("common.delete")]})})}}}];return(0,Q.jsxs)(en,{children:[p.length?(0,Q.jsx)(T.Z,{locale:a,data:(0,ke.Z)(p),columns:P,verticalKeyWidth:100,options:{download:!1,filter:!1,print:!1}}):(0,Q.jsx)(Re.Z,{children:i("common.empty")}),v&&(0,Q.jsx)(ge.Z,{title:v.title,description:v.description,confirm:v.confirm,cancel:v.cancel,params:v.params,onConfirm:v.onConfirm,onCancel:v.onCancel})]})}var en=u.Z.div(He||(He=(0,i.Z)(["\n margin-top: -20px;\n"])));Qe.propTypes={},Qe.defaultProps={};var nn,tn=t(46954),rn=t(44067),an=t(92726);function on(e){var n=e.user,t=e.onIssuePassport,r=(0,U.DJ)(),i=r.teamDid,a=r.roles,o=(0,l.useContext)(w.RD).t,s=(0,l.useState)(!1),u=(0,c.Z)(s,2),d=u[0],p=u[1];return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(an.Z,{"data-cy":"member-actions",actions:[{icon:(0,Q.jsx)(y.Z,{fontSize:"small"}),text:o("team.passport.issue"),"data-cy":"action-issue-passport",onClick:function(e){e.stopPropagation(),p(!0)}},function(e){var t=e.close;return(0,Q.jsx)(_e,{user:n,children:function(e){var r=e.open;return(0,Q.jsxs)(K.Z,{dense:!0,onClick:function(e){e.stopPropagation(),t(),r(e)},"data-cy":"action-toggle-block",children:[(0,Q.jsx)(tn.Z,{style:{minWidth:24,marginRight:8},children:n.approved?(0,Q.jsx)(fe.Z,{}):(0,Q.jsx)(he.Z,{})}),(0,Q.jsx)(rn.Z,{primary:n.approved?o("team.member.forbidLogin"):o("team.member.allowLogin")})]})}},"toggle-approval")}]}),d&&(0,Q.jsx)(Ee,{teamDid:i,ownerDid:n.did,needReceive:(0,Se.h1)(n)===n.did,roles:a,onCancel:function(){return p(!1)},onSuccess:function(){t(),p(!1)}})]})}on.propTypes={user:f().object.isRequired,onIssuePassport:f().func},on.defaultProps={onIssuePassport:function(){}};var sn="$all",cn="$none",ln=function(e,n){var t=e.find((function(e){return e.key===n}));return(null===t||void 0===t?void 0:t.value)||0},un=function(e,n){var t=e.passports||[];return!!t.length&&!t.some((function(e){var t;return n.includes(null===(t=e.issuer)||void 0===t?void 0:t.id)}))};function dn(e){var n=e.user,t=(0,l.useContext)(w.RD).t,r=(0,Q.jsxs)("div",{className:"member-block",children:[(0,Q.jsxs)("div",{className:"member-avatar",children:[(0,Q.jsx)(C.Z,{src:"".concat(n.avatar,"?imageFilter=resize&w=48&h=48"),size:32,did:n.did,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),!n.approved&&(0,Q.jsx)("did",{className:"badge-block"}),n.isFromExternal&&(0,Q.jsx)(g.Z,{title:t("team.passport.externalPassport"),children:(0,Q.jsx)(Z.Z,{ml:1,className:"icon",children:(0,Q.jsx)(P.Z,{})})})]}),(0,Q.jsxs)("div",{className:"member-meta",children:[(0,Q.jsx)("div",{className:"member-text",children:n.fullName}),Array.isArray(n.tags)&&n.tags.length>0&&(0,Q.jsx)("div",{className:"member-tags",children:n.tags.map((function(e){return(0,Q.jsx)(B.Z,{style:{background:e.color,color:(0,R.getTextColor)(e.color),marginRight:4},children:e.title},e.id)}))})]})]});return n.approved?r:(0,Q.jsx)(Z.Z,{display:"flex",alignItems:"center",children:(0,Q.jsx)(g.Z,{title:t("team.member.forbidLoginDescription"),children:r})})}function pn(e){var n=e.type,t=e.createPassportSvg,r=(0,W.y0)().appIdList,i=void 0===r?[]:r,u=(0,U.DJ)(),d=u.teamDid,m=u.invitations,f=u.teamIssuerDid,h=u.roles,g=u.refresh,C=u.enablePassportIssuance,P=u.endpoint,R=u.api,B=(0,_.h6)(),F=B.inService,M=B.ws.useSubscription,V=(0,l.useContext)(w.RD),K=V.t,J=V.locale,H=(0,l.useState)(!1),X=(0,c.Z)(H,2),$=X[0],G=X[1],Y=(0,l.useState)(!1),ne=(0,c.Z)(Y,2),te=ne[0],re=ne[1],ie=(0,l.useState)(!1),ae=(0,c.Z)(ie,2),oe=ae[0],se=ae[1],le=(0,l.useState)(!1),ue=(0,c.Z)(le,2),de=ue[0],pe=ue[1],me=(0,l.useState)(!1),fe=(0,c.Z)(me,2),he=fe[0],xe=fe[1],ve=(0,l.useState)([]),ge=(0,c.Z)(ve,2),Ze=ge[0],be=ge[1],je=(0,l.useState)(),ye=(0,c.Z)(je,2),ke=ye[0],Ce=ye[1],we=(0,l.useState)([]),De=(0,c.Z)(we,2),Se=De[0],Pe=De[1],Re=(0,N.Z)({did:void 0}),Te=(0,c.Z)(Re,1)[0],Ie="members-".concat(d),Ee=(0,T.$)(Ie),Ne=(0,l.useState)({role:sn,searchText:Ee.searchText||"",hideBlocked:!1,pageSize:Ee.rowsPerPage||10,page:Ee.page?Ee.page+1:1}),Ae=(0,c.Z)(Ne,2),ze=Ae[0],Be=Ae[1];(0,A.Z)((0,s.Z)((0,o.Z)().mark((function e(){var n,t;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Te.did){e.next=6;break}return e.next=3,R.getUser({did:Te.did});case 3:n=e.sent,(t=n.user)&&pe(t);case 6:case"end":return e.stop()}}),e)}))));var Le=(h||[]).map((function(e){return{name:e.name,title:e.title,num:ln(Se,e.name)}}));Le.unshift({name:sn,title:"All Members",num:ln(Se,sn)}),Le.push({name:cn,title:"Other",num:ln(Se,cn)});var _e=function(){var e={includeTags:!0};ze.hideBlocked&&(e.approved=!0),e.role=ze.role,ze.searchText&&(e.search=ze.searchText),xe(!0),R.getUsers({query:e,paging:{page:ze.page,pageSize:ze.pageSize}}).then((function(e){xe(!1),(e.users||[]).forEach((function(e){e.isFromExternal=un(e,p()(i)?[f]:i),e.avatar=Me(e.avatar,d,F),e.passports=(e.passports||[]).filter((function(e){return e.issuer}))})),be(e.users||[]),Ce(e.paging.total)})).catch((function(e){xe(!1),z.Z.error(e.message)}))},Ue=function(){R.getUsersCountPerRole().then((function(e){Pe(e.counts||[])})).catch((function(e){z.Z.error(e.message)}))},We=function(e){e.teamDid===d&&(_e(),Ue())};(0,l.useEffect)((function(){_e()}),["".concat(ze.hideBlocked,"-").concat(ze.role,"-").concat(ze.page,"-").concat(ze.pageSize,"-").concat(ze.searchText)]),(0,l.useEffect)((function(){Ue()}),[]),M(E.EVENTS.USER_UPDATED,We,[ze]),M(E.EVENTS.USER_ADDED,We,[ze]);var Oe=C,qe=[{label:K("common.name"),name:"fullName",options:{customBodyRenderLite:function(e){var n=Ze[e];return(0,Q.jsx)("div",{"data-cy":"member-name-".concat(n.fullName),children:(0,Q.jsx)(dn,{user:n})},n.did)}}},{label:K("common.address"),name:"did",options:{customBodyRender:function(e){return(0,Q.jsx)(L.Z,{size:14,responsive:!0,copyable:!1,did:e})}}},{label:K("team.member.lastLogin"),name:"lastLoginAt",options:{customBodyRender:function(e){return(0,Q.jsx)(I.Z,{value:e,locale:J})}}},{label:K("team.member.lastLoginIp"),name:"lastLoginIp",options:{customBodyRender:function(e){return e||"-"}}},{label:K("team.member.source"),name:"sourceProvider",options:{customBodyRenderLite:function(e){var n=Ze[e],t=n.sourceProvider||E.USER_TYPE.WALLET,r={auth0:"Auth0",wallet:"DID wallet",federated:"Federated"}[t]||t;return n.sourceAppPid?"".concat(r," (").concat(K("team.member.federated"),")"):r}}},{label:K("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite:function(e){var n=Ze[e];return(0,Q.jsx)(O.Z,{permission:F?"":"mutate_team",role:F?q.Wf:[],children:(0,Q.jsx)(on,{user:n,onIssuePassport:function(){return pe((0,a.Z)((0,a.Z)({},n),{},{initTab:"issuances"}))}})})}}}],Fe=[];Oe&&(Fe.push((0,Q.jsxs)(D.Z,{variant:"outlined",style:{flexShrink:0,marginRight:16},color:"primary",size:"small",onClick:function(){se(!0)},children:[(0,Q.jsx)(S.Z,{style:{height:"1em",marginRight:4}}),K("common.inviting"),m.length?" (".concat(m.length,")"):""]}),(0,Q.jsx)(O.Z,{permission:F?"":"mutate_team",role:F?q.Wf:[],children:(0,Q.jsxs)(D.Z,{style:{flexShrink:0,marginRight:16},variant:"contained",edge:"end",color:"primary",size:"small","data-cy":"invite-member",onClick:function(){return G(!0)},children:[(0,Q.jsx)(y.Z,{style:{fontSize:"1.3em",marginRight:4}}),K("team.invite")]})})),"server"===n&&Fe.push((0,Q.jsx)(O.Z,{role:"owner",children:(0,Q.jsxs)(D.Z,{style:{flexShrink:0},variant:"contained",edge:"end",color:"error",size:"small","data-cy":"invite-member",onClick:function(){return re(!0)},children:[(0,Q.jsx)(k.Z,{style:{fontSize:"1.3em",marginRight:4}}),K("team.transferNode.name")]})})));var Ve={sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!0,onRowClick:function(e,n){var t=n.dataIndex,r=Ze[t];pe(r)},page:ze.page-1,rowsPerPage:ze.pageSize,count:ke,searchDebounceTime:600};return(0,Q.jsxs)(mn,{children:[(0,Q.jsxs)(Z.Z,{className:"main",display:"flex",children:[(0,Q.jsx)("div",{className:"left",children:(0,Q.jsx)("div",{className:"tabs",children:Le.map((function(e){return(0,Q.jsxs)("div",{className:"tab ".concat(ze.role===e.name?"active":""),onClick:function(){return n=e.name,void(he||Be((function(e){return(0,a.Z)((0,a.Z)({},e),{},{role:n,hideBlocked:!1,searchText:"",page:1})})));var n},children:[(0,Q.jsx)("span",{className:"text",children:e.title}),(0,Q.jsx)("span",{className:x()("badge",{"is-rect":e.num>999}),children:e.num})]},e.name)}))})}),(0,Q.jsx)("div",{className:"right",children:(0,Q.jsx)(T.Z,{className:"main-table",verticalKeyWidth:100,locale:J,durable:Ie,durableKeys:["page","rowsPerPage"],title:(0,Q.jsx)("div",{className:"table-toolbar-left",children:(0,Q.jsx)(b.Z,{control:(0,Q.jsx)(j.Z,{sx:{display:"flex !important"},disabled:he,color:"primary",checked:ze.hideBlocked,onChange:function(e){return n=e.target.checked,void Be((function(e){return(0,a.Z)((0,a.Z)({},e),{},{hideBlocked:n,page:1})}));var n}}),label:K("team.member.hideBlockedMember")})}),data:Ze,columns:qe,customButtons:Fe,options:Ve,loading:he,onChange:function(e){var n=e.page,t=e.rowsPerPage,r=e.searchText;ze.pageSize!==t?Be((function(e){return(0,a.Z)((0,a.Z)({},e),{},{pageSize:t,page:1})})):ze.page!==n+1?Be((function(e){return(0,a.Z)((0,a.Z)({},e),{},{page:n+1})})):ze.searchText!==r&&Be((function(e){return(0,a.Z)((0,a.Z)({},e),{},{searchText:r,page:1})}))}})})]}),(0,Q.jsx)(v.ZP,{title:K("common.inviting"),onClose:function(){return se(!1)},open:oe,maxWidth:"lg",fullWidth:!0,children:(0,Q.jsx)(Qe,{})}),de&&(0,Q.jsx)(Je,{onCancel:function(){return pe(null)},userDid:de.did,createPassportSvg:t,initTab:de.initTab}),$&&(0,Q.jsx)(ee,{teamDid:d,endpoint:P,roles:h,onCancel:function(){return G(!1)},onSuccess:function(){g(),G(!1)}}),te&&(0,Q.jsx)(ce,{teamDid:d,endpoint:P,roles:h,onCancel:function(){return re(!1)},onSuccess:function(){g(),re(!1)}})]})}dn.propTypes={user:f().object.isRequired};var mn=u.Z.div(nn||(nn=(0,i.Z)(["\n .main {\n .left {\n width: 168px;\n flex-shrink: 0;\n margin-right: 65px;\n .tabs {\n padding-top: 16px;\n .tab {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 8px 16px;\n transition: background 0.4s;\n\n width: 168px;\n height: 36px;\n border-radius: 8px;\n\n cursor: pointer;\n user-select: none;\n\n &:nth-child(n + 2) {\n margin-top: 24px;\n }\n\n &.active {\n background: #f2f2f2;\n }\n\n &:hover {\n background: #f2f2f2;\n }\n\n .text {\n font-weight: 400;\n font-size: 16px;\n line-height: 19px;\n\n color: #222222;\n }\n\n .badge {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 20px;\n height: 20px;\n border-radius: 100%;\n color: #fff;\n background: #666666;\n font-size: 10px;\n font-weight: 400;\n &.is-rect {\n width: auto;\n border-radius: 8px;\n padding: 0 4px;\n }\n }\n }\n }\n @media (max-width: ","px) {\n display: none;\n }\n }\n .right {\n flex-grow: 1;\n }\n }\n\n .member-block {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n .member-avatar {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .member-meta {\n margin-left: 10px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n }\n .badge-block {\n width: 14px;\n height: 14px;\n position: absolute;\n right: -4px;\n top: -4px;\n background: #ff5757;\n border-radius: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n &::after {\n content: '';\n width: 6px;\n height: 2px;\n background: #fefefe;\n }\n }\n }\n\n .table-toolbar-left {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 7px 0;\n }\n"])),(function(e){return e.theme.breakpoints.values.md}));pn.propTypes={type:f().oneOf(["server","blocklet"]).isRequired,createPassportSvg:f().func.isRequired}},82638:function(e,n,t){var r,i=t(33028),a=t(59740),o=t(71171),s=t(33518),c=t(47020),l=t(57201),u=t(96266),d=["children"],p=(0,s.Z)((function(e){var n=e.children,t=(0,a.Z)(e,d);return(0,u.jsx)(c.Z,(0,i.Z)((0,i.Z)({},t),{},{id:"outlined-basic",variant:"outlined",InputProps:{startAdornment:(0,u.jsx)(l.default,{})},size:"small",children:n}))}))(r||(r=(0,o.Z)(["\n .MuiOutlinedInput-root {\n color: #999;\n &.MuiInputBase-adornedStart .MuiSvgIcon-root {\n color: #bfbfbf;\n }\n opacity: 1;\n border-radius: 36px;\n background: #f8f8f8;\n padding-left: 16px;\n input {\n padding-left: 8px;\n font-weight: bold;\n &::placeholder {\n opacity: 1;\n color: #bfbfbf;\n }\n padding-top: 8.5px;\n padding-bottom: 8.5px;\n }\n }\n\n .MuiOutlinedInput-notchedOutline,\n .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline,\n .Mui-focused .MuiOutlinedInput-notchedOutline {\n border-color: #eee;\n border-width: 1px;\n }\n"])));n.Z=p},18901:function(e,n,t){var r,i=t(71171),a=t(33518).Z.div(r||(r=(0,i.Z)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 14px;\n .left,\n .right {\n }\n .right {\n display: flex;\n align-items: center;\n }\n .tabs {\n .MuiButton-root {\n border: none;\n color: #999;\n &.active {\n color: #222;\n }\n }\n }\n\n @media (max-width: 600px) {\n display: block;\n .right {\n margin-top: 12px;\n }\n }\n"])));n.Z=a}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[6511],{86511:function(e,n,t){t.r(n),t.d(n,{default:function(){return re}});var r=t(71171),a=t(5057),i=t(33518),o=t(85493),c=t(15849),s=t(68420),u=t(11750),l=t(39434),p=t(39948),d=t(10697),f=t(94464),m=t(88574),v=t(28726),h=t(38242),b=t(81010),x=t(87363),g=(t(68534),t(86229)),k=t(1722),y=t(96234),Z=t(35432),w=t(86386),j=t(58238),P=t(29054),S=t(73545),B=t(14491),D=t(4651),L=t(96266),E=function(e){var n={},t=null;return(0,h.forEachBlockletSync)(e,(function(e){n[e.meta.bundleDid]?t=(0,h.getDisplayName)(e,!0):e.meta.bundleDid&&(n[e.meta.bundleDid]=!0)})),t},_=function(e,n,t){var r=e.hostname,a=e.href;if(!n)return a;if(t){var i,o=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!o)return a;var c=o[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(Z.DEFAULT_DID_DOMAIN)}))||"").replace(".".concat(Z.DEFAULT_DID_DOMAIN),"");return s?a.replace(r,"".concat(s,"-").concat(c,".").concat(Z.DEFAULT_IP_DOMAIN_SUFFIX)):a}return a.replace(n.meta.bundleDid,n.appPid)};function C(){var e=(0,s.PE)().t,n=(0,S.T)().api,t=(0,P.y0)().blocklet,r=(0,j.h6)().inService,i=(0,a.useState)(!1),o=(0,y.Z)(i,2),c=o[0],u=o[1],l=(0,a.useState)(5),d=(0,y.Z)(l,2),f=d[0],b=d[1],x=t&&t.structVersion!==Z.APP_STRUCT_VERSION;return[x&&(0,L.jsxs)(m.Z,{type:"warning",style:{margin:"12px 0"},children:[(0,L.jsxs)(p.Z,{display:"flex",alignItems:"center",children:[(0,L.jsx)(v.Z,{variant:"contained",size:"small",color:"primary",onClick:function(){return function(){try{if("running"===t.status)return void g.Z.error(e("blocklet.migrate.tip.running"));var n=E(t);if(n)return void g.Z.error(e("blocklet.migrate.tip.duplicate",{name:n}));u(!0)}catch(r){g.Z.error((0,B.Z)(r))}}()},style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),(0,L.jsx)("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map((function(n){return(0,L.jsx)(p.Z,{display:"flex",alignItems:"center",children:e("blocklet.migrate.intro.".concat(n))},n)}))]},"alert"),t&&(0,L.jsx)(w.default,{popup:!0,open:c,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:n.get,checkTimeout:3e5,onSuccess:function(){var e=_(window.location,t,r);setTimeout((function(){window.location.href=e}),5e3),b(5),setInterval((function(){b((function(e){return e-1}))}),1e3)},extraParams:{appDid:t.appDid,did:t.meta.did,wt:(0,D.iK)(t,!0),title:(0,h.getDisplayName)(t)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:f>=0?e("blocklet.migrate.success",{sec:f}):"Redirecting..."},onClose:function(){return u(!1)}},"connect")]}C.propTypes={};var N,G=t(35966),A=t(49946),I=t(44846),T=t(78123),O=t(75793),U=t(17022),z=t(13671),K=t(74094),R=t(7199),F=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(6457),t.e(6591)]).then(t.bind(t,86591))})),M=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(8537),t.e(105),t.e(2294),t.e(3716),t.e(6547),t.e(5760),t.e(2452),t.e(8059),t.e(5808),t.e(8973)]).then(t.bind(t,5119))})),V=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(105),t.e(6547),t.e(2452),t.e(5953),t.e(9272),t.e(4775)]).then(t.bind(t,14775))})),$=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(442),t.e(9662),t.e(7676),t.e(8986)]).then(t.bind(t,13239))})),X=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(1237),t.e(2305),t.e(5979),t.e(2537)]).then(t.bind(t,75979))})),Y=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(8537),t.e(105),t.e(2294),t.e(3716),t.e(6547),t.e(5760),t.e(2657),t.e(6412),t.e(3216)]).then(t.bind(t,46412))})),W=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(8537),t.e(105),t.e(2294),t.e(3716),t.e(4901),t.e(1685),t.e(5015)]).then(t.bind(t,85555))})),q=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(8537),t.e(105),t.e(2294),t.e(3716),t.e(4901),t.e(442),t.e(9366),t.e(5526),t.e(1237),t.e(7638),t.e(1685),t.e(4407),t.e(5953),t.e(3135),t.e(875),t.e(2264),t.e(7126)]).then(t.bind(t,77126))})),J=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(9327),t.e(8219)]).then(t.bind(t,92379))})),Q=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(8537),t.e(105),t.e(2294),t.e(3716),t.e(6547),t.e(5760),t.e(7534)]).then(t.bind(t,87534))})),H=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(4901),t.e(9963),t.e(2611)]).then(t.bind(t,42611))})),ee=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(8537),t.e(105),t.e(2294),t.e(3716),t.e(6547),t.e(5760),t.e(9366),t.e(9354),t.e(373)]).then(t.bind(t,90373))})),ne=function(e){return e.children};function te(){var e,n=(0,o.useNavigate)(),t=(0,o.useParams)().tab,r=void 0===t?"overview":t,i=(0,z.y0)(),y=i.did,w=i.blocklet,j=i.error,P=i.client,S=i.actions,B=S.setBlocklet,D=S.refreshBlocklet,E=(0,O.h6)().refresh,_=(0,s.PE)().t,N=(0,a.useCallback)((function(){return(0,L.jsx)($,{scope:y})}),[y]),A=(null===w||void 0===w||null===(e=w.environments.find((function(e){return"BLOCKLET_APP_URL"===e.key})))||void 0===e?void 0:e.value)||window.location.origin,te=function(e){return(0,K.bV)(e,A)},re=function(e){n("/blocklets/".concat(y,"/").concat(e))},ie=!w||(0,K.wS)(w.status)?[]:(0,h.getAppMissingConfigs)(w),oe=null,ce=[{label:_("common.overview"),value:"overview"},{breadcrumbsLabel:_("common.components"),label:(0,L.jsx)(d.Z,{color:"error",variant:"dot",invisible:!ie.length,children:_("common.components")}),value:"components"}];if(j)oe=(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(m.Z,{type:"error",variant:"icon",children:(0,K.Z)(j)}),(0,L.jsx)(v.Z,{onClick:function(){return D()},children:(0,L.jsx)("span",{style:{textDecoration:"underline"},children:_("common.retry")})})]});else if(w){var se,ue={overview:(0,L.jsx)(F,{}),configuration:M,navigation:V,services:W,members:(0,L.jsx)(Y,{type:"blocklet",createPassportSvg:te}),passports:X,components:q,"audit-logs":N,logs:J,runtime:(0,L.jsx)(Q,{}),traffic:(0,L.jsx)(H,{client:P,did:y}),storage:(0,L.jsx)(ee,{})};"configuration"===r&&(0,K.wS)(w.status)&&re("overview"),(0,K.wS)(w.status)||(ce.push({label:_("common.members"),value:"members"}),ce.push({label:_("common.passport"),value:"passports"}),ce.push({label:_("common.configuration"),value:"configuration"})),ce.push({label:_("common.auditLogs"),value:"audit-logs"}),w&&null!==(se=w.children)&&void 0!==se&&se.length&&w.structVersion===Z.APP_STRUCT_VERSION&&ce.push({label:_("common.logs"),value:"logs"}),ce.push({label:_("common.configNavigation"),value:"navigation"}),ce.push({label:_("common.runtime"),value:"runtime"}),ce.push({label:_("common.traffic"),value:"traffic"}),ce.push({label:_("common.storage"),value:"storage"}),(0,h.getBlockletServices)(w).length&&ce.splice(2,0,{label:_("blocklet.services"),value:"services"});var le=ue[r]||ue.overview;oe=(0,L.jsxs)(x.g,{type:"components",children:[!(0,h.isExternalBlocklet)(w)&&(0,L.jsx)(f.Z,{tabs:ce,current:r,onChange:re,scrollButtons:"auto"}),(0,L.jsx)("div",{className:"page-content",children:(0,L.jsx)(a.Suspense,{fallback:(0,L.jsx)(G.Z,{children:(0,L.jsx)(I.Z,{})}),children:(0,a.isValidElement)(le)?le:(0,L.jsx)(le,{blocklet:w,onUpdate:function(e){e&&B(e),D()},createPassportSvg:te})})})]})}else oe=(0,L.jsx)(G.Z,{children:(0,L.jsx)(I.Z,{})});var pe=ce.find((function(e){return e.value===r})),de=w?U.G6:ne;return(0,L.jsx)(de,{teamDid:y,children:(0,L.jsxs)(ae,{children:[(0,L.jsxs)(l.Z,{separator:"\u203a","aria-label":"breadcrumb",className:"page-breadcrumb",children:[(0,L.jsx)(c.Link,{color:"textSecondary",to:"/blocklets",children:_("common.blocklets")}),(0,L.jsx)(c.NavLink,{to:"/blocklets/".concat(y,"/overview"),style:function(e){return e?{color:"inherit"}:{}},children:_("common.detail")}),(0,L.jsx)(u.Z,{color:"textSecondary",children:pe?pe.breadcrumbsLabel||pe.label:""})]}),(0,L.jsxs)(u.Z,{component:"div",className:"page-header",children:[(0,L.jsxs)(u.Z,{component:"h2",variant:"h4",className:"page-title",color:"textPrimary",children:[w?(0,L.jsx)(k.Z,{blocklet:w,style:{marginRight:16}}):null,w?(0,L.jsxs)(p.Z,{display:"flex",alignItems:"center",children:[(0,L.jsx)(p.Z,{children:(0,h.getDisplayName)(w)}),"unknown"!==(null===w||void 0===w?void 0:w.status)&&(0,L.jsx)(b.Z,{size:"12px",style:{marginLeft:8},status:w.status,source:w.source})]}):"".concat(_("common.blocklet")," ").concat(_("common.detail"))]}),(0,L.jsx)(R.Z,{permission:"mutate_blocklets",children:!!w&&!(0,h.isExternalBlocklet)(w)&&(0,L.jsx)(T.Z,{className:"page-actions",blocklet:w,onStart:function(){},onComplete:function(e){var t=e.action,r=e.error;r?g.Z.error(r.message):"remove"===t?(E(),n("/blocklets")):D()},variant:"group"})})]}),(0,L.jsx)(C,{}),oe]})})}function re(){var e=(0,o.useParams)().did;return e?(0,L.jsx)(z.$8,{did:e,children:(0,L.jsx)(A.wV,{children:(0,L.jsx)(te,{})})}):null}var ae=i.Z.main(N||(N=(0,r.Z)(["\n .page-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .page-title {\n display: flex;\n align-items: center;\n\n .page-link {\n font-size: 15px;\n margin-top: 8px;\n margin-left: 8px;\n }\n }\n\n .page-content {\n margin-top: 16px;\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}))},49946:function(e,n,t){t.d(n,{wV:function(){return B},XN:function(){return D}});var r=t(32723),a=t(33028),i=t(34795),o=t(96234),c=t(5057),s=t(55898),u=t.n(s),l=t(86229),p=t(68420),d=t(76811),f=t(29054),m=t(84584),v=t(41899),h=t(58238),b=t(65873);function x(e){return g.apply(this,arguments)}function g(){return g=(0,i.Z)((0,r.Z)().mark((function e(n){var t,o,c,s,u;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.blockletDid,o=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,m.nU)(n.endpoint);case 3:return i=e.sent,(0,b.isEmpty)(i)||i===t||(t=i,s=!0),e.abrupt("return",(0,a.Z)((0,a.Z)({},n),{},{name:t}));case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()));case 4:if(u=e.sent,!s){e.next=8;break}return e.next=8,Promise.all(u.filter((function(e){return e.did})).map((function(e){return o.updateBlockletSpaceGateway({input:{did:t,where:{did:e.did},spaceGateway:(0,a.Z)({},e)}})})));case 8:return e.abrupt("return",u);case 9:case"end":return e.stop()}}),e)}))),g.apply(this,arguments)}var k=t(99875);var y=t(14491);function Z(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{deps:[],setLoading:function(){}},t=n.deps,a=n.setLoading,s=(0,f.y0)().blocklet,u=(0,c.useState)([]),p=(0,o.Z)(u,2),d=p[0],m=p[1],x=(0,h.h6)().api,g=(0,b.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,a(!0),s){e.next=5;break}return m([]),e.abrupt("return");case 5:return e.next=7,x.getBlockletBackups({input:{did:s.meta.did}});case 7:n=e.sent,t=n.backups,m(null!==t&&void 0!==t?t:[]),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),console.error(e.t0),l.Z.error((0,y.Z)(e.t0));case 16:return e.prev=16,a(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[0,12,16,19]])}))),2e3);return(0,v.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:g();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:d}}var w=function(e){var n=e.appDid,t=Z().backups,r=(0,c.useState)({message:"",progress:0,completed:!1}),i=(0,o.Z)(r,2),s=i[0],u=i[1];return(0,(0,h.h6)().ws.useSubscription)(d.BlockletEvents.backupProgress,(function(e){n===(null===e||void 0===e?void 0:e.appDid)&&u((function(){return(0,a.Z)({},e)}))}),[n]),(0,c.useEffect)((function(){var e;if(null!==t&&void 0!==t&&t.length&&(0,b.isNull)(null===(e=t[0])||void 0===e?void 0:e.status)){var n=(0,o.Z)(t,1)[0];u((function(){return{message:n.message,progress:n.progress,completed:Boolean(n.progress>=100)}}))}}),[t]),s},j=t(96266),P=(0,c.createContext)({}),S=P.Provider;P.Consumer;function B(e){var n=e.children,t=(0,p.PE)().t,s=(0,h.h6)().api,u=(0,f.y0)().blocklet,b=(0,c.useState)(!1),g=(0,o.Z)(b,2),y=g[0],P=g[1],B=(0,c.useState)(!1),D=(0,o.Z)(B,2),L=D[0],E=D[1],_=function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.setLoading,a=n.refresh,s=(0,f.y0)(),u=s.blocklet,p=s.actions.refreshBlocklet,d=null===u||void 0===u||null===(e=u.meta)||void 0===e?void 0:e.did,m=(0,c.useState)([]),b=(0,o.Z)(m,2),g=b[0],y=b[1],Z=(0,h.h6)().api;return(0,v.Z)((0,i.Z)((0,r.Z)().mark((function e(){var n,a,i;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,d){e.next=4;break}return y([]),e.abrupt("return");case 4:return null===t||void 0===t||t(!0),e.next=7,Z.getBlockletSpaceGateways({input:{did:d}});case 7:return n=e.sent,a=n.spaceGateways,e.next=11,x({blockletDid:d,nodeApi:Z,spaceGateways:a});case 11:i=e.sent,y(null!==i&&void 0!==i?i:[]),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(0),console.error(e.t0),l.Z.error((0,k.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]])}))),[d,p,a]),{spaceGateways:g}}({refresh:L,setLoading:P}),C=_.spaceGateways,N=w({appDid:null===u||void 0===u?void 0:u.appDid}),G=(0,c.useState)(!1),A=(0,o.Z)(G,2),I=A[0],T=A[1],O=(0,c.useMemo)((function(){return(0,m.mo)(null===u||void 0===u?void 0:u.environments)}),[u,L,I]),U=(0,c.useState)(!1),z=(0,o.Z)(U,2),K=z[0],R=Z({deps:[N],setLoading:z[1]}).backups,F=(0,c.useState)(null===C||void 0===C?void 0:C.find((function(e){return e.endpoint===O}))),M=(0,o.Z)(F,2),V=M[0],$=M[1],X=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 C.push((0,a.Z)((0,a.Z)({},n),{},{loading:!0})),e.next=3,s.addBlockletSpaceGateway({input:{did:u.meta.did,spaceGateway:n}});case 3:if(O===t){e.next=6;break}return e.next=6,s.configBlocklet({input:{did:[u.meta.did],configs:[{key:d.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t}]}});case 6:q(),$(n);case 8:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),Y=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!==O){e.next=5;break}return l.Z.warning(t("storage.spaces.gateway.delete.failedForConnected")),e.abrupt("return");case 5:return e.next=7,s.deleteBlockletSpaceGateway({input:{did:u.meta.did,spaceGatewayDid:null===n||void 0===n?void 0:n.did}});case 7:q(),$(n);case 9:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),W=function(){var e=(0,i.Z)((0,r.Z)().mark((function e(n){var a;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.updateBlockletSpaceGateway({input:{did:u.meta.did,where:{did:n.did},spaceGateway:n}});case 2:if(O===n.endpoint){e.next=5;break}return e.next=5,s.configBlocklet({input:{did:[u.meta.did],configs:[{key:d.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:n.endpoint}]}});case 5:l.Z.success(t("storage.spaces.connectedWithName",{name:null!==(a=null===n||void 0===n?void 0:n.name)&&void 0!==a?a:"DID Spaces"})),q();case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),q=function(){E((function(e){return!e}))};return(0,j.jsx)(S,{value:{spaceGateways:C,selectedSpaceGateway:V,addSpaceGateway:X,deleteSpaceGateway:Y,updateSpaceGateway:W,refreshSpaceGateways:q,spaceGatewaysLoading:y,spaceGatewayIsSelected:function(e){return(null===e||void 0===e?void 0:e.endpoint)===O},backupEndpoint:O,backupProgress:N,backups:R,backupsLoading:K,refreshBackupEndpoint:function(){T((function(e){return!e}))}},children:n})}function D(){return(0,c.useContext)(P)}B.propTypes={children:u().any.isRequired},B.defaultProps={}},60344:function(e,n,t){t.d(n,{hi:function(){return i},od:function(){return a.a}});var r=t(10458),a=t.n(r);a().defaults.timeout=1e4;var i=a().create()},84584:function(e,n,t){t.d(n,{Jf:function(){return y},LQ:function(){return f},Nb:function(){return m},Xv:function(){return p},mo:function(){return h},nD:function(){return d},nU:function(){return g},w2:function(){return b}});var r=t(32723),a=t(34795),i=t(82434),o=t.n(i),c=t(76811),s=t(65873),u=t(60344),l=t(6352);function p(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/"),r=t.at(-4),a=t.at(-2);return l(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 l(n,"space",t)}function f(e){return e.replace(/\/$/,"").split("/").at(-4)}function m(e){return v.apply(this,arguments)}function v(){return(v=(0,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,o()(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,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 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 b(e){return x.apply(this,arguments)}function x(){return(x=(0,a.Z)((0,r.Z)().mark((function e(n){var t,a,i,c;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,o()(n)){e.next=3;break}return e.abrupt("return",!1);case 3:return t=l(n,"space/api/did/one-click-authorization/token"),e.next=6,u.hi.get(t,{timeout:5e3});case 6:return a=e.sent,i=a.status,c=a.data,e.abrupt("return",200===i&&(0,s.isObject)(c));case 12:return e.prev=12,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,null,[[0,12]])})))).apply(this,arguments)}function g(e){return k.apply(this,arguments)}function k(){return(k=(0,a.Z)((0,r.Z)().mark((function e(n){var t,a,i;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,o()(n)){e.next=3;break}return e.abrupt("return","");case 3:return e.next=5,u.hi.head(n,{timeout:3e3});case 5:return t=e.sent,a=t.headers,i=a["x-space-name"],e.abrupt("return",i?decodeURIComponent(i):"");case 11:return e.prev=11,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return","");case 15:case"end":return e.stop()}}),e,null,[[0,11]])})))).apply(this,arguments)}function y(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/").at(-4);return l(n,"/api/space/nft/display?spaceDid=".concat(t))}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[6511],{86511:function(e,n,t){t.r(n),t.d(n,{default:function(){return re}});var r=t(71171),a=t(5057),i=t(33518),o=t(85493),c=t(15849),s=t(68420),u=t(11750),l=t(39434),p=t(39948),d=t(10697),f=t(94464),m=t(88574),v=t(28726),h=t(38242),b=t(81010),x=t(87363),g=(t(68534),t(86229)),k=t(1722),y=t(96234),Z=t(35432),w=t(55916),j=t(58238),P=t(29054),S=t(73545),B=t(14491),D=t(4651),L=t(96266),E=function(e){var n={},t=null;return(0,h.forEachBlockletSync)(e,(function(e){n[e.meta.bundleDid]?t=(0,h.getDisplayName)(e,!0):e.meta.bundleDid&&(n[e.meta.bundleDid]=!0)})),t},_=function(e,n,t){var r=e.hostname,a=e.href;if(!n)return a;if(t){var i,o=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!o)return a;var c=o[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(Z.DEFAULT_DID_DOMAIN)}))||"").replace(".".concat(Z.DEFAULT_DID_DOMAIN),"");return s?a.replace(r,"".concat(s,"-").concat(c,".").concat(Z.DEFAULT_IP_DOMAIN_SUFFIX)):a}return a.replace(n.meta.bundleDid,n.appPid)};function C(){var e=(0,s.PE)().t,n=(0,S.T)().api,t=(0,P.y0)().blocklet,r=(0,j.h6)().inService,i=(0,a.useState)(!1),o=(0,y.Z)(i,2),c=o[0],u=o[1],l=(0,a.useState)(5),d=(0,y.Z)(l,2),f=d[0],b=d[1],x=t&&t.structVersion!==Z.APP_STRUCT_VERSION;return[x&&(0,L.jsxs)(m.Z,{type:"warning",style:{margin:"12px 0"},children:[(0,L.jsxs)(p.Z,{display:"flex",alignItems:"center",children:[(0,L.jsx)(v.Z,{variant:"contained",size:"small",color:"primary",onClick:function(){return function(){try{if("running"===t.status)return void g.Z.error(e("blocklet.migrate.tip.running"));var n=E(t);if(n)return void g.Z.error(e("blocklet.migrate.tip.duplicate",{name:n}));u(!0)}catch(r){g.Z.error((0,B.Z)(r))}}()},style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),(0,L.jsx)("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map((function(n){return(0,L.jsx)(p.Z,{display:"flex",alignItems:"center",children:e("blocklet.migrate.intro.".concat(n))},n)}))]},"alert"),t&&(0,L.jsx)(w.default,{popup:!0,open:c,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:n.get,checkTimeout:3e5,onSuccess:function(){var e=_(window.location,t,r);setTimeout((function(){window.location.href=e}),5e3),b(5),setInterval((function(){b((function(e){return e-1}))}),1e3)},extraParams:{appDid:t.appDid,did:t.meta.did,wt:(0,D.iK)(t,!0),title:(0,h.getDisplayName)(t)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:f>=0?e("blocklet.migrate.success",{sec:f}):"Redirecting..."},onClose:function(){return u(!1)}},"connect")]}C.propTypes={};var N,G=t(35966),A=t(49946),I=t(44846),T=t(78123),O=t(75793),U=t(17022),z=t(13671),K=t(74094),R=t(7199),F=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(6457),t.e(6591)]).then(t.bind(t,86591))})),M=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(8537),t.e(105),t.e(2294),t.e(3716),t.e(6547),t.e(5760),t.e(2452),t.e(8059),t.e(5808),t.e(8973)]).then(t.bind(t,5119))})),V=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(105),t.e(6547),t.e(2452),t.e(5953),t.e(6651),t.e(4775)]).then(t.bind(t,14775))})),$=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(442),t.e(9662),t.e(7676),t.e(8986)]).then(t.bind(t,13239))})),X=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(1237),t.e(2305),t.e(5979),t.e(2537)]).then(t.bind(t,75979))})),Y=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(8537),t.e(105),t.e(2294),t.e(3716),t.e(6547),t.e(5760),t.e(2657),t.e(6412),t.e(3216)]).then(t.bind(t,46412))})),W=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(8537),t.e(105),t.e(2294),t.e(3716),t.e(4901),t.e(1685),t.e(5555)]).then(t.bind(t,85555))})),q=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(8537),t.e(105),t.e(2294),t.e(3716),t.e(4901),t.e(442),t.e(9366),t.e(5526),t.e(1237),t.e(7638),t.e(1685),t.e(4407),t.e(5953),t.e(3135),t.e(875),t.e(2264),t.e(7126)]).then(t.bind(t,77126))})),J=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(9327),t.e(8219)]).then(t.bind(t,92379))})),Q=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(8537),t.e(105),t.e(2294),t.e(3716),t.e(6547),t.e(5760),t.e(7534)]).then(t.bind(t,87534))})),H=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(4901),t.e(9963),t.e(2611)]).then(t.bind(t,42611))})),ee=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(8537),t.e(105),t.e(2294),t.e(3716),t.e(6547),t.e(5760),t.e(9366),t.e(9354),t.e(373)]).then(t.bind(t,90373))})),ne=function(e){return e.children};function te(){var e,n=(0,o.useNavigate)(),t=(0,o.useParams)().tab,r=void 0===t?"overview":t,i=(0,z.y0)(),y=i.did,w=i.blocklet,j=i.error,P=i.client,S=i.actions,B=S.setBlocklet,D=S.refreshBlocklet,E=(0,O.h6)().refresh,_=(0,s.PE)().t,N=(0,a.useCallback)((function(){return(0,L.jsx)($,{scope:y})}),[y]),A=(null===w||void 0===w||null===(e=w.environments.find((function(e){return"BLOCKLET_APP_URL"===e.key})))||void 0===e?void 0:e.value)||window.location.origin,te=function(e){return(0,K.bV)(e,A)},re=function(e){n("/blocklets/".concat(y,"/").concat(e))},ie=!w||(0,K.wS)(w.status)?[]:(0,h.getAppMissingConfigs)(w),oe=null,ce=[{label:_("common.overview"),value:"overview"},{breadcrumbsLabel:_("common.components"),label:(0,L.jsx)(d.Z,{color:"error",variant:"dot",invisible:!ie.length,children:_("common.components")}),value:"components"}];if(j)oe=(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(m.Z,{type:"error",variant:"icon",children:(0,K.Z)(j)}),(0,L.jsx)(v.Z,{onClick:function(){return D()},children:(0,L.jsx)("span",{style:{textDecoration:"underline"},children:_("common.retry")})})]});else if(w){var se,ue={overview:(0,L.jsx)(F,{}),configuration:M,navigation:V,services:W,members:(0,L.jsx)(Y,{type:"blocklet",createPassportSvg:te}),passports:X,components:q,"audit-logs":N,logs:J,runtime:(0,L.jsx)(Q,{}),traffic:(0,L.jsx)(H,{client:P,did:y}),storage:(0,L.jsx)(ee,{})};"configuration"===r&&(0,K.wS)(w.status)&&re("overview"),(0,K.wS)(w.status)||(ce.push({label:_("common.members"),value:"members"}),ce.push({label:_("common.passport"),value:"passports"}),ce.push({label:_("common.configuration"),value:"configuration"})),ce.push({label:_("common.auditLogs"),value:"audit-logs"}),w&&null!==(se=w.children)&&void 0!==se&&se.length&&w.structVersion===Z.APP_STRUCT_VERSION&&ce.push({label:_("common.logs"),value:"logs"}),ce.push({label:_("common.configNavigation"),value:"navigation"}),ce.push({label:_("common.runtime"),value:"runtime"}),ce.push({label:_("common.traffic"),value:"traffic"}),ce.push({label:_("common.storage"),value:"storage"}),(0,h.getBlockletServices)(w).length&&ce.splice(2,0,{label:_("blocklet.services"),value:"services"});var le=ue[r]||ue.overview;oe=(0,L.jsxs)(x.g,{type:"components",children:[!(0,h.isExternalBlocklet)(w)&&(0,L.jsx)(f.Z,{tabs:ce,current:r,onChange:re,scrollButtons:"auto"}),(0,L.jsx)("div",{className:"page-content",children:(0,L.jsx)(a.Suspense,{fallback:(0,L.jsx)(G.Z,{children:(0,L.jsx)(I.Z,{})}),children:(0,a.isValidElement)(le)?le:(0,L.jsx)(le,{blocklet:w,onUpdate:function(e){e&&B(e),D()},createPassportSvg:te})})})]})}else oe=(0,L.jsx)(G.Z,{children:(0,L.jsx)(I.Z,{})});var pe=ce.find((function(e){return e.value===r})),de=w?U.G6:ne;return(0,L.jsx)(de,{teamDid:y,children:(0,L.jsxs)(ae,{children:[(0,L.jsxs)(l.Z,{separator:"\u203a","aria-label":"breadcrumb",className:"page-breadcrumb",children:[(0,L.jsx)(c.Link,{color:"textSecondary",to:"/blocklets",children:_("common.blocklets")}),(0,L.jsx)(c.NavLink,{to:"/blocklets/".concat(y,"/overview"),style:function(e){return e?{color:"inherit"}:{}},children:_("common.detail")}),(0,L.jsx)(u.Z,{color:"textSecondary",children:pe?pe.breadcrumbsLabel||pe.label:""})]}),(0,L.jsxs)(u.Z,{component:"div",className:"page-header",children:[(0,L.jsxs)(u.Z,{component:"h2",variant:"h4",className:"page-title",color:"textPrimary",children:[w?(0,L.jsx)(k.Z,{blocklet:w,style:{marginRight:16}}):null,w?(0,L.jsxs)(p.Z,{display:"flex",alignItems:"center",children:[(0,L.jsx)(p.Z,{children:(0,h.getDisplayName)(w)}),"unknown"!==(null===w||void 0===w?void 0:w.status)&&(0,L.jsx)(b.Z,{size:"12px",style:{marginLeft:8},status:w.status,source:w.source})]}):"".concat(_("common.blocklet")," ").concat(_("common.detail"))]}),(0,L.jsx)(R.Z,{permission:"mutate_blocklets",children:!!w&&!(0,h.isExternalBlocklet)(w)&&(0,L.jsx)(T.Z,{className:"page-actions",blocklet:w,onStart:function(){},onComplete:function(e){var t=e.action,r=e.error;r?g.Z.error(r.message):"remove"===t?(E(),n("/blocklets")):D()},variant:"group"})})]}),(0,L.jsx)(C,{}),oe]})})}function re(){var e=(0,o.useParams)().did;return e?(0,L.jsx)(z.$8,{did:e,children:(0,L.jsx)(A.wV,{children:(0,L.jsx)(te,{})})}):null}var ae=i.Z.main(N||(N=(0,r.Z)(["\n .page-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .page-title {\n display: flex;\n align-items: center;\n\n .page-link {\n font-size: 15px;\n margin-top: 8px;\n margin-left: 8px;\n }\n }\n\n .page-content {\n margin-top: 16px;\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}))},49946:function(e,n,t){t.d(n,{wV:function(){return B},XN:function(){return D}});var r=t(32723),a=t(33028),i=t(34795),o=t(96234),c=t(5057),s=t(55898),u=t.n(s),l=t(86229),p=t(68420),d=t(76811),f=t(29054),m=t(84584),v=t(41899),h=t(58238),b=t(65873);function x(e){return g.apply(this,arguments)}function g(){return g=(0,i.Z)((0,r.Z)().mark((function e(n){var t,o,c,s,u;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.blockletDid,o=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,m.nU)(n.endpoint);case 3:return i=e.sent,(0,b.isEmpty)(i)||i===t||(t=i,s=!0),e.abrupt("return",(0,a.Z)((0,a.Z)({},n),{},{name:t}));case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()));case 4:if(u=e.sent,!s){e.next=8;break}return e.next=8,Promise.all(u.filter((function(e){return e.did})).map((function(e){return o.updateBlockletSpaceGateway({input:{did:t,where:{did:e.did},spaceGateway:(0,a.Z)({},e)}})})));case 8:return e.abrupt("return",u);case 9:case"end":return e.stop()}}),e)}))),g.apply(this,arguments)}var k=t(99875);var y=t(14491);function Z(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{deps:[],setLoading:function(){}},t=n.deps,a=n.setLoading,s=(0,f.y0)().blocklet,u=(0,c.useState)([]),p=(0,o.Z)(u,2),d=p[0],m=p[1],x=(0,h.h6)().api,g=(0,b.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,a(!0),s){e.next=5;break}return m([]),e.abrupt("return");case 5:return e.next=7,x.getBlockletBackups({input:{did:s.meta.did}});case 7:n=e.sent,t=n.backups,m(null!==t&&void 0!==t?t:[]),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),console.error(e.t0),l.Z.error((0,y.Z)(e.t0));case 16:return e.prev=16,a(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[0,12,16,19]])}))),2e3);return(0,v.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:g();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:d}}var w=function(e){var n=e.appDid,t=Z().backups,r=(0,c.useState)({message:"",progress:0,completed:!1}),i=(0,o.Z)(r,2),s=i[0],u=i[1];return(0,(0,h.h6)().ws.useSubscription)(d.BlockletEvents.backupProgress,(function(e){n===(null===e||void 0===e?void 0:e.appDid)&&u((function(){return(0,a.Z)({},e)}))}),[n]),(0,c.useEffect)((function(){var e;if(null!==t&&void 0!==t&&t.length&&(0,b.isNull)(null===(e=t[0])||void 0===e?void 0:e.status)){var n=(0,o.Z)(t,1)[0];u((function(){return{message:n.message,progress:n.progress,completed:Boolean(n.progress>=100)}}))}}),[t]),s},j=t(96266),P=(0,c.createContext)({}),S=P.Provider;P.Consumer;function B(e){var n=e.children,t=(0,p.PE)().t,s=(0,h.h6)().api,u=(0,f.y0)().blocklet,b=(0,c.useState)(!1),g=(0,o.Z)(b,2),y=g[0],P=g[1],B=(0,c.useState)(!1),D=(0,o.Z)(B,2),L=D[0],E=D[1],_=function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.setLoading,a=n.refresh,s=(0,f.y0)(),u=s.blocklet,p=s.actions.refreshBlocklet,d=null===u||void 0===u||null===(e=u.meta)||void 0===e?void 0:e.did,m=(0,c.useState)([]),b=(0,o.Z)(m,2),g=b[0],y=b[1],Z=(0,h.h6)().api;return(0,v.Z)((0,i.Z)((0,r.Z)().mark((function e(){var n,a,i;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,d){e.next=4;break}return y([]),e.abrupt("return");case 4:return null===t||void 0===t||t(!0),e.next=7,Z.getBlockletSpaceGateways({input:{did:d}});case 7:return n=e.sent,a=n.spaceGateways,e.next=11,x({blockletDid:d,nodeApi:Z,spaceGateways:a});case 11:i=e.sent,y(null!==i&&void 0!==i?i:[]),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(0),console.error(e.t0),l.Z.error((0,k.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]])}))),[d,p,a]),{spaceGateways:g}}({refresh:L,setLoading:P}),C=_.spaceGateways,N=w({appDid:null===u||void 0===u?void 0:u.appDid}),G=(0,c.useState)(!1),A=(0,o.Z)(G,2),I=A[0],T=A[1],O=(0,c.useMemo)((function(){return(0,m.mo)(null===u||void 0===u?void 0:u.environments)}),[u,L,I]),U=(0,c.useState)(!1),z=(0,o.Z)(U,2),K=z[0],R=Z({deps:[N],setLoading:z[1]}).backups,F=(0,c.useState)(null===C||void 0===C?void 0:C.find((function(e){return e.endpoint===O}))),M=(0,o.Z)(F,2),V=M[0],$=M[1],X=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 C.push((0,a.Z)((0,a.Z)({},n),{},{loading:!0})),e.next=3,s.addBlockletSpaceGateway({input:{did:u.meta.did,spaceGateway:n}});case 3:if(O===t){e.next=6;break}return e.next=6,s.configBlocklet({input:{did:[u.meta.did],configs:[{key:d.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t}]}});case 6:q(),$(n);case 8:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),Y=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!==O){e.next=5;break}return l.Z.warning(t("storage.spaces.gateway.delete.failedForConnected")),e.abrupt("return");case 5:return e.next=7,s.deleteBlockletSpaceGateway({input:{did:u.meta.did,spaceGatewayDid:null===n||void 0===n?void 0:n.did}});case 7:q(),$(n);case 9:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),W=function(){var e=(0,i.Z)((0,r.Z)().mark((function e(n){var a;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.updateBlockletSpaceGateway({input:{did:u.meta.did,where:{did:n.did},spaceGateway:n}});case 2:if(O===n.endpoint){e.next=5;break}return e.next=5,s.configBlocklet({input:{did:[u.meta.did],configs:[{key:d.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:n.endpoint}]}});case 5:l.Z.success(t("storage.spaces.connectedWithName",{name:null!==(a=null===n||void 0===n?void 0:n.name)&&void 0!==a?a:"DID Spaces"})),q();case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),q=function(){E((function(e){return!e}))};return(0,j.jsx)(S,{value:{spaceGateways:C,selectedSpaceGateway:V,addSpaceGateway:X,deleteSpaceGateway:Y,updateSpaceGateway:W,refreshSpaceGateways:q,spaceGatewaysLoading:y,spaceGatewayIsSelected:function(e){return(null===e||void 0===e?void 0:e.endpoint)===O},backupEndpoint:O,backupProgress:N,backups:R,backupsLoading:K,refreshBackupEndpoint:function(){T((function(e){return!e}))}},children:n})}function D(){return(0,c.useContext)(P)}B.propTypes={children:u().any.isRequired},B.defaultProps={}},60344:function(e,n,t){t.d(n,{hi:function(){return i},od:function(){return a.a}});var r=t(10458),a=t.n(r);a().defaults.timeout=1e4;var i=a().create()},84584:function(e,n,t){t.d(n,{Jf:function(){return y},LQ:function(){return f},Nb:function(){return m},Xv:function(){return p},mo:function(){return h},nD:function(){return d},nU:function(){return g},w2:function(){return b}});var r=t(32723),a=t(34795),i=t(82434),o=t.n(i),c=t(76811),s=t(65873),u=t(60344),l=t(6352);function p(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/"),r=t.at(-4),a=t.at(-2);return l(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 l(n,"space",t)}function f(e){return e.replace(/\/$/,"").split("/").at(-4)}function m(e){return v.apply(this,arguments)}function v(){return(v=(0,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,o()(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,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 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 b(e){return x.apply(this,arguments)}function x(){return(x=(0,a.Z)((0,r.Z)().mark((function e(n){var t,a,i,c;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,o()(n)){e.next=3;break}return e.abrupt("return",!1);case 3:return t=l(n,"space/api/did/one-click-authorization/token"),e.next=6,u.hi.get(t,{timeout:5e3});case 6:return a=e.sent,i=a.status,c=a.data,e.abrupt("return",200===i&&(0,s.isObject)(c));case 12:return e.prev=12,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,null,[[0,12]])})))).apply(this,arguments)}function g(e){return k.apply(this,arguments)}function k(){return(k=(0,a.Z)((0,r.Z)().mark((function e(n){var t,a,i;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,o()(n)){e.next=3;break}return e.abrupt("return","");case 3:return e.next=5,u.hi.head(n,{timeout:3e3});case 5:return t=e.sent,a=t.headers,i=a["x-space-name"],e.abrupt("return",i?decodeURIComponent(i):"");case 11:return e.prev=11,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return","");case 15:case"end":return e.stop()}}),e,null,[[0,11]])})))).apply(this,arguments)}function y(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/").at(-4);return l(n,"/api/space/nft/display?spaceDid=".concat(t))}}}]);
|