@abtnode/webapp 1.16.15-beta-58d50c9a → 1.16.15-beta-e143b1cf
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 +16 -15
- package/build/index.html +1 -1
- package/build/service-worker.js +1 -1
- package/build/static/js/2264.00afbd6c.chunk.js +1 -0
- package/build/static/js/4301.d30d43e8.chunk.js +2 -0
- package/build/static/js/{1005.75ed0870.chunk.js → 4906.3a7dc76f.chunk.js} +1 -1
- package/build/static/js/5808.92fed0e0.chunk.js +1 -0
- package/build/static/js/6412.8221cbb1.chunk.js +1 -0
- package/build/static/js/6457.e28eaaed.chunk.js +1 -0
- package/build/static/js/6511.c18b3cf2.chunk.js +1 -0
- package/build/static/js/6591.5d3fec1b.chunk.js +1 -0
- package/build/static/js/{7126.dd96dba6.chunk.js → 7126.09e935ec.chunk.js} +1 -1
- package/build/static/js/8059.680ccc09.chunk.js +1 -0
- package/build/static/js/8382.9d7dd685.chunk.js +1 -0
- package/build/static/js/8973.ada96056.chunk.js +1 -0
- package/build/static/js/9875.bd7a86c6.chunk.js +1 -0
- package/build/static/js/main.8bae391f.js +2 -0
- package/package.json +1 -1
- package/build/static/js/1569.96f538bf.chunk.js +0 -1
- package/build/static/js/2264.abbeee46.chunk.js +0 -1
- package/build/static/js/4168.a4beefbf.chunk.js +0 -1
- package/build/static/js/4331.72894f4e.chunk.js +0 -1
- package/build/static/js/5032.da91d5e6.chunk.js +0 -1
- package/build/static/js/5257.683b2b23.chunk.js +0 -2
- package/build/static/js/6412.f8cd3f1d.chunk.js +0 -1
- package/build/static/js/6511.7ca30f70.chunk.js +0 -1
- package/build/static/js/7786.4cf4e7bf.chunk.js +0 -1
- package/build/static/js/9801.dd5edb8d.chunk.js +0 -1
- package/build/static/js/main.9cfbab68.js +0 -2
- /package/build/static/css/{9801.9cab926a.chunk.css → 8973.9cab926a.chunk.css} +0 -0
- /package/build/static/js/{5257.683b2b23.chunk.js.LICENSE.txt → 4301.d30d43e8.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.9cfbab68.js.LICENSE.txt → main.8bae391f.js.LICENSE.txt} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 5257.683b2b23.chunk.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[5257],{49384:function(e,r,t){"use strict";t.d(r,{Z:function(){return k}});var n=t(33028),i=t(59740),a=t(55898),u=t.n(a),o=t(61549),c=t.n(o),s=t(74410),l=t.n(s),f=(t(79619),t(75239)),d=t(22736),p=t.n(d),v=t(47336),m=t.n(v),g=t(70066),h=t.n(g),b=t(10515),y=t.n(b),x=t(14520),O=t(96266),w=["value","locale","withoutSuffix","from","to","type","tz"];function k(e){var r=e.value,t=e.locale,a=e.withoutSuffix,u=e.from,o=e.to,c=e.type,s=e.tz,d=(0,i.Z)(e,w);if(!r)return"-";var p,v="zh"===t?"zh-cn":"en-us",m=l()(r).locale(v);s&&m.tz(s),p=u?m.from(u,a):o?m.to(o,a):m.fromNow(a);var g=(0,x.B2)(r,{locale:v,tz:s}),h=p,b=g;return"absolute"===c&&(h=g,b=p),(0,O.jsx)(f.Z,{title:b,placement:"top-end",enterTouchDelay:0,children:(0,O.jsx)("span",(0,n.Z)((0,n.Z)({},d),{},{children:h}))})}l().extend(p()),l().extend(m()),l().extend(h()),l().extend(y()),l().extend(c()),l().updateLocale("zh-cn",{relativeTime:{future:"%s\u540e",past:"%s\u524d",s:"\u51e0\u79d2",m:"1 \u5206\u949f",mm:"%d \u5206\u949f",h:"1 \u5c0f\u65f6",hh:"%d \u5c0f\u65f6",d:"1 \u5929",dd:"%d \u5929",M:"1 \u4e2a\u6708",MM:"%d \u4e2a\u6708",y:"1 \u5e74",yy:"%d \u5e74"}}),(0,x.ot)(l()),k.propTypes={value:u().oneOfType([u().string,u().number]).isRequired,locale:u().string,withoutSuffix:u().bool,from:u().oneOfType([u().string,u().number]),to:u().oneOfType([u().string,u().number]),type:u().oneOf(["relative","absolute"]),tz:u().string},k.defaultProps={locale:"en",withoutSuffix:!1,from:"",to:"",type:"relative",tz:void 0}},55673:function(e,r,t){"use strict";var n=t(71600);r.Z=void 0;var i=n(t(56930)),a=t(96266),u=(0,i.default)((0,a.jsx)("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp");r.Z=u},76005:function(e,r,t){"use strict";var n=t(71600);r.Z=void 0;var i=n(t(56930)),a=t(96266),u=(0,i.default)((0,a.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");r.Z=u},45568:function(e,r,t){"use strict";var n=t(71600);r.Z=void 0;var i=n(t(56930)),a=t(96266),u=(0,i.default)((0,a.jsx)("path",{d:"M12 3 2 21h20L12 3zm1 5.92L18.6 19H13V8.92zm-2 0V19H5.4L11 8.92z"}),"Details");r.Z=u},8732:function(e,r,t){"use strict";var n=t(71600);r.Z=void 0;var i=n(t(56930)),a=t(96266),u=(0,i.default)((0,a.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}),"Error");r.Z=u},34966:function(e,r,t){"use strict";var n=t(71600);r.Z=void 0;var i=n(t(56930)),a=t(96266),u=(0,i.default)((0,a.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"InfoOutlined");r.Z=u},84639:function(e,r,t){"use strict";var n=t(71600);r.Z=void 0;var i=n(t(56930)),a=t(96266),u=(0,i.default)((0,a.jsx)("path",{d:"M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"}),"Send");r.Z=u},21017:function(e,r,t){"use strict";var n=t(71600);r.Z=void 0;var i=n(t(56930)),a=t(96266),u=(0,i.default)((0,a.jsx)("path",{d:"M2 20h20v-4H2v4zm2-3h2v2H4v-2zM2 4v4h20V4H2zm4 3H4V5h2v2zm-4 7h20v-4H2v4zm2-3h2v2H4v-2z"}),"Storage");r.Z=u},50725:function(e,r,t){"use strict";var n=t(71600);r.Z=void 0;var i=n(t(56930)),a=t(96266),u=(0,i.default)((0,a.jsx)("path",{d:"m19 15-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z"}),"SubdirectoryArrowRight");r.Z=u},65140:function(e,r,t){"use strict";t.d(r,{Z:function(){return E}});var n=t(56666),i=t(31461),a=t(7896),u=t(5057),o=t(8271),c=t(91213),s=t(66685),l=t(39273),f=t(42908),d=t(57471),p=t(96266),v=(0,d.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"),m=(0,d.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"),g=t(62773),h=(0,g.ZP)("span")({position:"relative",display:"flex"}),b=(0,g.ZP)(v)({transform:"scale(1)"}),y=(0,g.ZP)(m)((function(e){var r=e.theme,t=e.ownerState;return(0,a.Z)({left:0,position:"absolute",transform:"scale(0)",transition:r.transitions.create("transform",{easing:r.transitions.easing.easeIn,duration:r.transitions.duration.shortest})},t.checked&&{transform:"scale(1)",transition:r.transitions.create("transform",{easing:r.transitions.easing.easeOut,duration:r.transitions.duration.shortest})})}));var x=function(e){var r=e.checked,t=void 0!==r&&r,n=e.classes,i=void 0===n?{}:n,u=e.fontSize,o=(0,a.Z)({},e,{checked:t});return(0,p.jsxs)(h,{className:i.root,ownerState:o,children:[(0,p.jsx)(b,{fontSize:u,className:i.background,ownerState:o}),(0,p.jsx)(y,{fontSize:u,className:i.dot,ownerState:o})]})},O=t(6285),w=t(26393),k=t(42903);var j=t(31821),D=t(18561);function A(e){return(0,D.Z)("MuiRadio",e)}var S=(0,j.Z)("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary"]),C=["checked","checkedIcon","color","icon","name","onChange","size","className"],Z=(0,g.ZP)(l.Z,{shouldForwardProp:function(e){return(0,g.FO)(e)||"classes"===e},name:"MuiRadio",slot:"Root",overridesResolver:function(e,r){var t=e.ownerState;return[r.root,r["color".concat((0,O.Z)(t.color))]]}})((function(e){var r=e.theme,t=e.ownerState;return(0,a.Z)({color:(r.vars||r).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:r.vars?"rgba(".concat("default"===t.color?r.vars.palette.action.activeChannel:r.vars.palette[t.color].mainChannel," / ").concat(r.vars.palette.action.hoverOpacity,")"):(0,s.Fq)("default"===t.color?r.palette.action.active:r.palette[t.color].main,r.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&(0,n.Z)({},"&.".concat(S.checked),{color:(r.vars||r).palette[t.color].main}),(0,n.Z)({},"&.".concat(S.disabled),{color:(r.vars||r).palette.action.disabled}))}));var F=(0,p.jsx)(x,{checked:!0}),R=(0,p.jsx)(x,{}),E=u.forwardRef((function(e,r){var t,n,s,l,d=(0,f.Z)({props:e,name:"MuiRadio"}),v=d.checked,m=d.checkedIcon,g=void 0===m?F:m,h=d.color,b=void 0===h?"primary":h,y=d.icon,x=void 0===y?R:y,j=d.name,D=d.onChange,S=d.size,E=void 0===S?"medium":S,V=d.className,_=(0,i.Z)(d,C),z=(0,a.Z)({},d,{color:b,size:E}),P=function(e){var r=e.classes,t=e.color,n={root:["root","color".concat((0,O.Z)(t))]};return(0,a.Z)({},r,(0,c.Z)(n,A,r))}(z),L=u.useContext(k.Z),M=v,T=(0,w.Z)(D,L&&L.onChange),B=j;return L&&("undefined"===typeof M&&(s=L.value,M="object"===typeof(l=d.value)&&null!==l?s===l:String(s)===String(l)),"undefined"===typeof B&&(B=L.name)),(0,p.jsx)(Z,(0,a.Z)({type:"radio",icon:u.cloneElement(x,{fontSize:null!=(t=R.props.fontSize)?t:E}),checkedIcon:u.cloneElement(g,{fontSize:null!=(n=F.props.fontSize)?n:E}),ownerState:z,classes:P,name:B,checked:M,onChange:T,ref:r,className:(0,o.Z)(P.root,V)},_))}))},87916:function(e,r,t){"use strict";var n=t(96234),i=t(7896),a=t(31461),u=t(5057),o=t(25506),c=t(2286),s=t(58708),l=t(42903),f=t(80538),d=t(96266),p=["actions","children","defaultValue","name","onChange","value"],v=u.forwardRef((function(e,r){var t=e.actions,v=e.children,m=e.defaultValue,g=e.name,h=e.onChange,b=e.value,y=(0,a.Z)(e,p),x=u.useRef(null),O=(0,s.Z)({controlled:b,default:m,name:"RadioGroup"}),w=(0,n.Z)(O,2),k=w[0],j=w[1];u.useImperativeHandle(t,(function(){return{focus:function(){var e=x.current.querySelector("input:not(:disabled):checked");e||(e=x.current.querySelector("input:not(:disabled)")),e&&e.focus()}}}),[]);var D=(0,c.Z)(r,x),A=(0,f.Z)(g),S=u.useMemo((function(){return{name:A,onChange:function(e){j(e.target.value),h&&h(e,e.target.value)},value:k}}),[A,h,j,k]);return(0,d.jsx)(l.Z.Provider,{value:S,children:(0,d.jsx)(o.Z,(0,i.Z)({role:"radiogroup",ref:D},y,{children:v}))})}));r.Z=v},42903:function(e,r,t){"use strict";var n=t(5057).createContext(void 0);r.Z=n},50844:function(e,r,t){"use strict";t.d(r,{Z:function(){return p}});var n=t(7896),i=t(31461),a=t(5057),u=t(56129),o=t.n(u),c=t(92877);var s=t(95335),l=t(96266),f=["defaultTheme","withTheme","name"],d=["classes"],p=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t){var u=r.defaultTheme,p=r.withTheme,v=void 0!==p&&p,m=r.name,g=(0,i.Z)(r,f);var h=m,b=(0,c.Z)(e,(0,n.Z)({defaultTheme:u,Component:t,name:m||t.displayName,classNamePrefix:h},g)),y=a.forwardRef((function(e,r){var a,o=(0,i.Z)(e,d),c=b((0,n.Z)({},t.defaultProps,e)),f=o;return("string"===typeof m||v)&&(a=(0,s.Z)()||u,m&&(f=function(e){var r=e.theme,t=e.name,i=e.props;if(!r||!r.components||!r.components[t]||!r.components[t].defaultProps)return i;var a,u=(0,n.Z)({},i),o=r.components[t].defaultProps;for(a in o)void 0===u[a]&&(u[a]=o[a]);return u}({theme:a,name:m,props:o})),v&&!f.theme&&(f.theme=a)),(0,l.jsx)(t,(0,n.Z)({ref:r,classes:c},f))}));return o()(y,t),y}}},25963:function(e,r){"use strict";r.Z=function(e,r){if(e&&r){var t=Array.isArray(r)?r:r.split(","),n=e.name||"",i=(e.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return t.some((function(e){var r=e.trim().toLowerCase();return"."===r.charAt(0)?n.toLowerCase().endsWith(r):r.endsWith("/*")?a===r.replace(/\/.*$/,""):i===r}))}return!0}},79619:function(e,r,t){e.exports=function(e){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=r(e),n={name:"zh-cn",weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u5468\u65e5_\u5468\u4e00_\u5468\u4e8c_\u5468\u4e09_\u5468\u56db_\u5468\u4e94_\u5468\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),ordinal:function(e,r){return"W"===r?e+"\u5468":e+"\u65e5"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5Ah\u70b9mm\u5206",LLLL:"YYYY\u5e74M\u6708D\u65e5ddddAh\u70b9mm\u5206",l:"YYYY/M/D",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},relativeTime:{future:"%s\u5185",past:"%s\u524d",s:"\u51e0\u79d2",m:"1 \u5206\u949f",mm:"%d \u5206\u949f",h:"1 \u5c0f\u65f6",hh:"%d \u5c0f\u65f6",d:"1 \u5929",dd:"%d \u5929",M:"1 \u4e2a\u6708",MM:"%d \u4e2a\u6708",y:"1 \u5e74",yy:"%d \u5e74"},meridiem:function(e,r){var t=100*e+r;return t<600?"\u51cc\u6668":t<900?"\u65e9\u4e0a":t<1100?"\u4e0a\u5348":t<1300?"\u4e2d\u5348":t<1800?"\u4e0b\u5348":"\u665a\u4e0a"}};return t.default.locale(n,null,!0),n}(t(74410))},10515:function(e){e.exports=function(){"use strict";return function(e,r,t){t.updateLocale=function(e,r){var n=t.Ls[e];if(n)return(r?Object.keys(r):[]).forEach((function(e){n[e]=r[e]})),n}}}()},49525:function(e,r,t){"use strict";t.d(r,{uI:function(){return ue}});var n=t(5057),i=t(55898),a=t.n(i),u=t(27812),o=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function c(e,r){var t=function(e){var r=e.name;if(r&&-1!==r.lastIndexOf(".")&&!e.type){var t=r.split(".").pop().toLowerCase(),n=o.get(t);n&&Object.defineProperty(e,"type",{value:n,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!==typeof t.path){var n=e.webkitRelativePath;Object.defineProperty(t,"path",{value:"string"===typeof r?r:"string"===typeof n&&n.length>0?n:e.name,writable:!1,configurable:!1,enumerable:!0})}return t}var s=[".DS_Store","Thumbs.db"];function l(e){return"object"===typeof e&&null!==e}function f(e){return m(e.target.files).map((function(e){return c(e)}))}function d(e){return(0,u.__awaiter)(this,void 0,void 0,(function(){return(0,u.__generator)(this,(function(r){switch(r.label){case 0:return[4,Promise.all(e.map((function(e){return e.getFile()})))];case 1:return[2,r.sent().map((function(e){return c(e)}))]}}))}))}function p(e,r){return(0,u.__awaiter)(this,void 0,void 0,(function(){var t;return(0,u.__generator)(this,(function(n){switch(n.label){case 0:return null===e?[2,[]]:e.items?(t=m(e.items).filter((function(e){return"file"===e.kind})),"drop"!==r?[2,t]:[4,Promise.all(t.map(g))]):[3,2];case 1:return[2,v(h(n.sent()))];case 2:return[2,v(m(e.files).map((function(e){return c(e)})))]}}))}))}function v(e){return e.filter((function(e){return-1===s.indexOf(e.name)}))}function m(e){if(null===e)return[];for(var r=[],t=0;t<e.length;t++){var n=e[t];r.push(n)}return r}function g(e){if("function"!==typeof e.webkitGetAsEntry)return b(e);var r=e.webkitGetAsEntry();return r&&r.isDirectory?x(r):b(e)}function h(e){return e.reduce((function(e,r){return(0,u.__spread)(e,Array.isArray(r)?h(r):[r])}),[])}function b(e){var r=e.getAsFile();if(!r)return Promise.reject(e+" is not a File");var t=c(r);return Promise.resolve(t)}function y(e){return(0,u.__awaiter)(this,void 0,void 0,(function(){return(0,u.__generator)(this,(function(r){return[2,e.isDirectory?x(e):O(e)]}))}))}function x(e){var r=e.createReader();return new Promise((function(e,t){var n=[];!function i(){var a=this;r.readEntries((function(r){return(0,u.__awaiter)(a,void 0,void 0,(function(){var a,o,c;return(0,u.__generator)(this,(function(u){switch(u.label){case 0:if(r.length)return[3,5];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,Promise.all(n)];case 2:return a=u.sent(),e(a),[3,4];case 3:return o=u.sent(),t(o),[3,4];case 4:return[3,6];case 5:c=Promise.all(r.map(y)),n.push(c),i(),u.label=6;case 6:return[2]}}))}))}),(function(e){t(e)}))}()}))}function O(e){return(0,u.__awaiter)(this,void 0,void 0,(function(){return(0,u.__generator)(this,(function(r){return[2,new Promise((function(r,t){e.file((function(t){var n=c(t,e.fullPath);r(n)}),(function(e){t(e)}))}))]}))}))}var w=t(25963);function k(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function j(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?k(Object(t),!0).forEach((function(r){D(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function D(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function A(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var n,i,a=[],u=!0,o=!1;try{for(t=t.call(e);!(u=(n=t.next()).done)&&(a.push(n.value),!r||a.length!==r);u=!0);}catch(c){o=!0,i=c}finally{try{u||null==t.return||t.return()}finally{if(o)throw i}}return a}(e,r)||function(e,r){if(!e)return;if("string"===typeof e)return S(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return S(e,r)}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var C="file-invalid-type",Z="file-too-large",F="file-too-small",R="too-many-files",E=function(e){e=Array.isArray(e)&&1===e.length?e[0]:e;var r=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:C,message:"File type must be ".concat(r)}},V=function(e){return{code:Z,message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},_=function(e){return{code:F,message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},z={code:R,message:"Too many files"};function P(e,r){var t="application/x-moz-file"===e.type||(0,w.Z)(e,r);return[t,t?null:E(r)]}function L(e,r,t){if(M(e.size))if(M(r)&&M(t)){if(e.size>t)return[!1,V(t)];if(e.size<r)return[!1,_(r)]}else{if(M(r)&&e.size<r)return[!1,_(r)];if(M(t)&&e.size>t)return[!1,V(t)]}return[!0,null]}function M(e){return void 0!==e&&null!==e}function T(e){return"function"===typeof e.isPropagationStopped?e.isPropagationStopped():"undefined"!==typeof e.cancelBubble&&e.cancelBubble}function B(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function N(e){e.preventDefault()}function Y(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return r.some((function(r){return!T(e)&&r&&r.apply(void 0,[e].concat(n)),T(e)}))}}function I(){return"showOpenFilePicker"in window}function H(e){return e="string"===typeof e?e.split(","):e,[{description:"everything",accept:Array.isArray(e)?e.filter((function(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)})).reduce((function(e,r){return j(j({},e),{},D({},r,[]))}),{}):{}}]}var U=["children"],W=["open"],K=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],q=["refKey","onChange","onClick"];function G(e){return function(e){if(Array.isArray(e))return J(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Q(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var n,i,a=[],u=!0,o=!1;try{for(t=t.call(e);!(u=(n=t.next()).done)&&(a.push(n.value),!r||a.length!==r);u=!0);}catch(c){o=!0,i=c}finally{try{u||null==t.return||t.return()}finally{if(o)throw i}}return a}(e,r)||Q(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(e,r){if(e){if("string"===typeof e)return J(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?J(e,r):void 0}}function J(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function X(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function ee(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?X(Object(t),!0).forEach((function(r){re(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):X(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function re(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function te(e,r){if(null==e)return{};var t,n,i=function(e,r){if(null==e)return{};var t,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(i[t]=e[t]);return i}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var ne=(0,n.forwardRef)((function(e,r){var t=e.children,i=ue(te(e,U)),a=i.open,u=te(i,W);return(0,n.useImperativeHandle)(r,(function(){return{open:a}}),[a]),n.createElement(n.Fragment,null,t(ee(ee({},u),{},{open:a})))}));ne.displayName="Dropzone";var ie={disabled:!1,getFilesFromEvent:function(e){return(0,u.__awaiter)(this,void 0,void 0,(function(){return(0,u.__generator)(this,(function(r){return l(e)&&l(e.dataTransfer)?[2,p(e.dataTransfer,e.type)]:function(e){return l(e)&&l(e.target)}(e)?[2,f(e)]:Array.isArray(e)&&e.every((function(e){return"getFile"in e&&"function"===typeof e.getFile}))?[2,d(e)]:[2,[]]}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1};ne.defaultProps=ie,ne.propTypes={children:a().func,accept:a().oneOfType([a().string,a().arrayOf(a().string)]),multiple:a().bool,preventDropOnDocument:a().bool,noClick:a().bool,noKeyboard:a().bool,noDrag:a().bool,noDragEventsBubbling:a().bool,minSize:a().number,maxSize:a().number,maxFiles:a().number,disabled:a().bool,getFilesFromEvent:a().func,onFileDialogCancel:a().func,onFileDialogOpen:a().func,useFsAccessApi:a().bool,onDragEnter:a().func,onDragLeave:a().func,onDragOver:a().func,onDrop:a().func,onDropAccepted:a().func,onDropRejected:a().func,validator:a().func};var ae={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function ue(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=ee(ee({},ie),e),t=r.accept,i=r.disabled,a=r.getFilesFromEvent,u=r.maxSize,o=r.minSize,c=r.multiple,s=r.maxFiles,l=r.onDragEnter,f=r.onDragLeave,d=r.onDragOver,p=r.onDrop,v=r.onDropAccepted,m=r.onDropRejected,g=r.onFileDialogCancel,h=r.onFileDialogOpen,b=r.useFsAccessApi,y=r.preventDropOnDocument,x=r.noClick,O=r.noKeyboard,w=r.noDrag,k=r.noDragEventsBubbling,j=r.validator,D=(0,n.useMemo)((function(){return"function"===typeof h?h:ce}),[h]),S=(0,n.useMemo)((function(){return"function"===typeof g?g:ce}),[g]),C=(0,n.useRef)(null),Z=(0,n.useRef)(null),F=$((0,n.useReducer)(oe,ae),2),R=F[0],E=F[1],V=R.isFocused,_=R.isFileDialogActive,M=R.draggedFiles,U=function(){_&&setTimeout((function(){Z.current&&(Z.current.files.length||(E({type:"closeDialog"}),S()))}),300)};(0,n.useEffect)((function(){return b&&I()?function(){}:(window.addEventListener("focus",U,!1),function(){window.removeEventListener("focus",U,!1)})}),[Z,_,S,b]);var W=(0,n.useRef)([]),Q=function(e){C.current&&C.current.contains(e.target)||(e.preventDefault(),W.current=[])};(0,n.useEffect)((function(){return y&&(document.addEventListener("dragover",N,!1),document.addEventListener("drop",Q,!1)),function(){y&&(document.removeEventListener("dragover",N),document.removeEventListener("drop",Q))}}),[C,y]);var J=(0,n.useCallback)((function(e){e.preventDefault(),e.persist(),be(e),W.current=[].concat(G(W.current),[e.target]),B(e)&&Promise.resolve(a(e)).then((function(r){T(e)&&!k||(E({draggedFiles:r,isDragActive:!0,type:"setDraggedFiles"}),l&&l(e))}))}),[a,l,k]),X=(0,n.useCallback)((function(e){e.preventDefault(),e.persist(),be(e);var r=B(e);if(r&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(t){}return r&&d&&d(e),!1}),[d,k]),ne=(0,n.useCallback)((function(e){e.preventDefault(),e.persist(),be(e);var r=W.current.filter((function(e){return C.current&&C.current.contains(e)})),t=r.indexOf(e.target);-1!==t&&r.splice(t,1),W.current=r,r.length>0||(E({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),B(e)&&f&&f(e))}),[C,f,k]),ue=(0,n.useCallback)((function(e,r){var n=[],i=[];e.forEach((function(e){var r=$(P(e,t),2),a=r[0],c=r[1],s=$(L(e,o,u),2),l=s[0],f=s[1],d=j?j(e):null;if(a&&l&&!d)n.push(e);else{var p=[c,f];d&&(p=p.concat(d)),i.push({file:e,errors:p.filter((function(e){return e}))})}})),(!c&&n.length>1||c&&s>=1&&n.length>s)&&(n.forEach((function(e){i.push({file:e,errors:[z]})})),n.splice(0)),E({acceptedFiles:n,fileRejections:i,type:"setFiles"}),p&&p(n,i,r),i.length>0&&m&&m(i,r),n.length>0&&v&&v(n,r)}),[E,c,t,o,u,s,p,v,m,j]),se=(0,n.useCallback)((function(e){e.preventDefault(),e.persist(),be(e),W.current=[],B(e)&&Promise.resolve(a(e)).then((function(r){T(e)&&!k||ue(r,e)})),E({type:"reset"})}),[a,ue,k]),le=(0,n.useCallback)((function(){if(b&&I()){E({type:"openDialog"}),D();var e={multiple:c,types:H(t)};window.showOpenFilePicker(e).then((function(e){return a(e)})).then((function(e){return ue(e,null)})).catch((function(e){return S(e)})).finally((function(){return E({type:"closeDialog"})}))}else Z.current&&(E({type:"openDialog"}),D(),Z.current.value=null,Z.current.click())}),[E,D,S,b,ue,t,c]),fe=(0,n.useCallback)((function(e){C.current&&C.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),le()))}),[C,Z,le]),de=(0,n.useCallback)((function(){E({type:"focus"})}),[]),pe=(0,n.useCallback)((function(){E({type:"blur"})}),[]),ve=(0,n.useCallback)((function(){x||(!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}(e)||function(e){return-1!==e.indexOf("Edge/")}(e)}()?le():setTimeout(le,0))}),[Z,x,le]),me=function(e){return i?null:e},ge=function(e){return O?null:me(e)},he=function(e){return w?null:me(e)},be=function(e){k&&e.stopPropagation()},ye=(0,n.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.refKey,t=void 0===r?"ref":r,n=e.role,a=e.onKeyDown,u=e.onFocus,o=e.onBlur,c=e.onClick,s=e.onDragEnter,l=e.onDragOver,f=e.onDragLeave,d=e.onDrop,p=te(e,K);return ee(ee(re({onKeyDown:ge(Y(a,fe)),onFocus:ge(Y(u,de)),onBlur:ge(Y(o,pe)),onClick:me(Y(c,ve)),onDragEnter:he(Y(s,J)),onDragOver:he(Y(l,X)),onDragLeave:he(Y(f,ne)),onDrop:he(Y(d,se)),role:"string"===typeof n&&""!==n?n:"button"},t,C),i||O?{}:{tabIndex:0}),p)}}),[C,fe,de,pe,ve,J,X,ne,se,O,w,i]),xe=(0,n.useCallback)((function(e){e.stopPropagation()}),[]),Oe=(0,n.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.refKey,n=void 0===r?"ref":r,i=e.onChange,a=e.onClick,u=te(e,q);return ee(ee({},re({accept:t,multiple:c,type:"file",style:{display:"none"},onChange:me(Y(i,se)),onClick:me(Y(a,xe)),autoComplete:"off",tabIndex:-1},n,Z)),u)}}),[Z,t,c,se,i]),we=M.length,ke=we>0&&function(e){var r=e.files,t=e.accept,n=e.minSize,i=e.maxSize,a=e.multiple,u=e.maxFiles;return!(!a&&r.length>1||a&&u>=1&&r.length>u)&&r.every((function(e){var r=A(P(e,t),1)[0],a=A(L(e,n,i),1)[0];return r&&a}))}({files:M,accept:t,minSize:o,maxSize:u,multiple:c,maxFiles:s}),je=we>0&&!ke;return ee(ee({},R),{},{isDragAccept:ke,isDragReject:je,isFocused:V&&!i,getRootProps:ye,getInputProps:Oe,rootRef:C,inputRef:Z,open:me(le)})}function oe(e,r){switch(r.type){case"focus":return ee(ee({},e),{},{isFocused:!0});case"blur":return ee(ee({},e),{},{isFocused:!1});case"openDialog":return ee(ee({},ae),{},{isFileDialogActive:!0});case"closeDialog":return ee(ee({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var t=r.isDragActive,n=r.draggedFiles;return ee(ee({},e),{},{draggedFiles:n,isDragActive:t});case"setFiles":return ee(ee({},e),{},{acceptedFiles:r.acceptedFiles,fileRejections:r.fileRejections});case"reset":return ee({},ae);default:return e}}function ce(){}},77018:function(e,r,t){"use strict";t.d(r,{Qr:function(){return Re},cI:function(){return je},qo:function(){return Fe}});var n=t(41361),i=t(32723),a=t(96234),u=t(34795),o=t(56666),c=t(68079),s=t(5057),l=function(e){return e instanceof HTMLElement},f={BLUR:"blur",CHANGE:"change",INPUT:"input"},d={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},p="select",v="undefined",m="max",g="min",h="maxLength",b="minLength",y="pattern",x="required",O="validate";var w=function(e){return null==e},k=function(e){return"object"===typeof e},j=function(e){return!w(e)&&!Array.isArray(e)&&k(e)&&!(e instanceof Date)},D=function(e){return/^\w*$/.test(e)},A=function(e){return e.filter(Boolean)},S=function(e){return A(e.replace(/["|']/g,"").replace(/\[/g,".").replace(/\]/g,"").split("."))};function C(e,r,t){for(var n=-1,i=D(r)?[r]:S(r),a=i.length,u=a-1;++n<a;){var o=i[n],c=t;if(n!==u){var s=e[o];c=j(s)||Array.isArray(s)?s:isNaN(+i[n+1])?{}:[]}e[o]=c,e=e[o]}return e}var Z=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var t in e)D(t)?r[t]=e[t]:C(r,t,e[t]);return r},F=function(e){return void 0===e},R=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0,n=A(r.split(/[,[\].]+?/)).reduce((function(e,r){return w(e)?e:e[r]}),e);return F(n)||n===e?F(e[r])?t:e[r]:n},E=function(e,r){for(var t in e)if(R(r,t)){var n=e[t];if(n){if(n.ref.focus&&F(n.ref.focus()))break;if(n.options){n.options[0].ref.focus();break}}}},V=function(e,r){l(e)&&e.removeEventListener&&(e.removeEventListener(f.INPUT,r),e.removeEventListener(f.CHANGE,r),e.removeEventListener(f.BLUR,r))},_={isValid:!1,value:null},z=function(e){return Array.isArray(e)?e.reduce((function(e,r){return r&&r.ref.checked?{isValid:!0,value:r.ref.value}:e}),_):_},P=function(e){return(0,c.Z)(e).filter((function(e){return e.selected})).map((function(e){return e.value}))},L=function(e){return"radio"===e.type},M=function(e){return"file"===e.type},T=function(e){return"checkbox"===e.type},B=function(e){return e.type==="".concat(p,"-multiple")},N={value:!1,isValid:!1},Y={value:!0,isValid:!0},I=function(e){if(Array.isArray(e)){if(e.length>1){var r=e.filter((function(e){return e&&e.ref.checked})).map((function(e){return e.ref.value}));return{value:r,isValid:!!r.length}}var t=e[0].ref,n=t.checked,i=t.value,a=t.attributes;return n?a&&!F(a.value)?F(i)||""===i?Y:{value:i,isValid:!0}:Y:N}return N};function H(e,r,t,n,i){var a=e.current[r];if(a){var u=a.ref,o=u.value,c=u.disabled,s=a.ref,l=a.valueAsNumber,f=a.valueAsDate,d=a.setValueAs;if(c&&n)return;return M(s)?s.files:L(s)?z(a.options).value:B(s)?P(s.options):T(s)?I(a.options).value:i?o:l?""===o?NaN:+o:f?s.valueAsDate:d?d(o):o}if(t)return R(t.current,r)}function U(e){return!e||e instanceof HTMLElement&&e.nodeType!==Node.DOCUMENT_NODE&&U(e.parentNode)}var W=function(e){return j(e)&&!Object.keys(e).length},K=function(e){return"boolean"===typeof e};function q(e,r){var t,n=D(r)?[r]:S(r),i=1==n.length?e:function(e,r){for(var t=r.slice(0,-1).length,n=0;n<t;)e=F(e)?n++:e[r[n++]];return e}(e,n),a=n[n.length-1];i&&delete i[a];for(var u=0;u<n.slice(0,-1).length;u++){var o=-1,c=void 0,s=n.slice(0,-(u+1)),l=s.length-1;for(u>0&&(t=e);++o<s.length;){var f=s[o];c=c?c[f]:e[f],l===o&&(j(c)&&W(c)||Array.isArray(c)&&!c.filter((function(e){return j(e)&&!W(e)||K(e)})).length)&&(t?delete t[f]:delete e[f]),t=c}}return e}var G=function(e,r){return e&&e.ref===r};var $=function(e){return w(e)||!k(e)};function Q(e,r){if($(e)||$(r))return r;for(var t in r){var n=e[t],i=r[t];try{e[t]=j(n)&&j(i)||Array.isArray(n)&&Array.isArray(i)?Q(n,i):i}catch(a){}}return e}function J(e,r,t){if($(e)||$(r)||e instanceof Date||r instanceof Date)return e===r;if(!(0,s.isValidElement)(e)){var n=Object.keys(e),i=Object.keys(r);if(n.length!==i.length)return!1;for(var a=0,u=n;a<u.length;a++){var o=u[a],c=e[o];if(!t||"ref"!==o){var l=r[o];if((j(c)||Array.isArray(c))&&(j(l)||Array.isArray(l))?!J(c,l,t):c!==l)return!1}}}return!0}function X(e,r,t,n,i){for(var a=-1;++a<e.length;){for(var u in e[a])Array.isArray(e[a][u])?(!t[a]&&(t[a]={}),t[a][u]=[],X(e[a][u],R(r[a]||{},u,[]),t[a][u],t[a],u)):J(R(r[a]||{},u),e[a][u])?C(t[a]||{},u):t[a]=Object.assign(Object.assign({},t[a]),(0,o.Z)({},u,!0));n&&!t.length&&delete n[i]}return t}var ee=function(e,r,t){return Q(X(e,r,t.slice(0,e.length)),X(r,e,t.slice(0,e.length)))},re=function(e){return"string"===typeof e},te=function(e,r,t,n,i){var a={},u=function(r){(F(i)||(re(i)?r.startsWith(i):Array.isArray(i)&&i.find((function(e){return r.startsWith(e)}))))&&(a[r]=H(e,r,void 0,n))};for(var o in e.current)u(o);return t?Z(a):Q(r,Z(a))},ne=function(e){var r=e.errors,t=e.name,n=e.error,i=e.validFields,a=e.fieldsWithValidation,u=F(n),o=R(r,t);return u&&!!o||!u&&!J(o,n,!0)||u&&R(a,t)&&!R(i,t)},ie=function(e){return e instanceof RegExp},ae=function(e){return j(e)&&!ie(e)?e:{value:e,message:""}},ue=function(e){return"function"===typeof e},oe=function(e){return re(e)||(0,s.isValidElement)(e)};function ce(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"validate";if(oe(e)||K(e)&&!e)return{type:t,message:oe(e)?e:"",ref:r}}var se=function(e,r,t,n,i){return r?Object.assign(Object.assign({},t[e]),{types:Object.assign(Object.assign({},t[e]&&t[e].types?t[e].types:{}),(0,o.Z)({},n,i||!0))}):{}},le=function(){var e=(0,u.Z)((0,i.Z)().mark((function e(r,t,n,u){var o,c,s,l,f,d,p,v,k,D,A,S,C,Z,F,R,E,V,_,P,M,B,N,Y,U,q,G,$,Q,J,X,ee,te,ne,le,fe,de,pe,ve,me,ge,he,be,ye,xe,Oe;return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=n.ref,c=n.ref.value,s=n.options,l=n.required,f=n.maxLength,d=n.minLength,p=n.min,v=n.max,k=n.pattern,D=n.validate,A=o.name,S={},C=L(o),Z=T(o),F=C||Z,R=""===c,E=se.bind(null,A,t,S),V=function(e,r,t){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:h,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:b,a=e?r:t;S[A]=Object.assign({type:e?n:i,message:a,ref:o},E(e?n:i,a))},!l||!(!C&&!Z&&(R||w(c))||K(c)&&!c||Z&&!I(s).isValid||C&&!z(s).isValid)){e.next=15;break}if(_=oe(l)?{value:!!l,message:l}:ae(l),P=_.value,M=_.message,!P){e.next=15;break}if(S[A]=Object.assign({type:x,message:M,ref:F?((r.current[A].options||[])[0]||{}).ref:o},E(x,M)),t){e.next=15;break}return e.abrupt("return",S);case 15:if(w(p)&&w(v)||""===c){e.next=23;break}if(Y=ae(v),U=ae(p),isNaN(c)?(G=o.valueAsDate||new Date(c),re(Y.value)&&(B=G>new Date(Y.value)),re(U.value)&&(N=G<new Date(U.value))):(q=o.valueAsNumber||parseFloat(c),w(Y.value)||(B=q>Y.value),w(U.value)||(N=q<U.value)),!B&&!N){e.next=23;break}if(V(!!B,Y.message,U.message,m,g),t){e.next=23;break}return e.abrupt("return",S);case 23:if(!re(c)||R||!f&&!d){e.next=32;break}if($=ae(f),Q=ae(d),J=!w($.value)&&c.length>$.value,X=!w(Q.value)&&c.length<Q.value,!J&&!X){e.next=32;break}if(V(J,$.message,Q.message),t){e.next=32;break}return e.abrupt("return",S);case 32:if(!re(c)||!k||R){e.next=38;break}if(ee=ae(k),te=ee.value,ne=ee.message,!ie(te)||te.test(c)){e.next=38;break}if(S[A]=Object.assign({type:y,message:ne,ref:o},E(y,ne)),t){e.next=38;break}return e.abrupt("return",S);case 38:if(!D){e.next=71;break}if(le=H(r,A,u,!1,!0),fe=F&&s?s[0].ref:o,!ue(D)){e.next=52;break}return e.next=44,D(le);case 44:if(de=e.sent,!(pe=ce(de,fe))){e.next=50;break}if(S[A]=Object.assign(Object.assign({},pe),E(O,pe.message)),t){e.next=50;break}return e.abrupt("return",S);case 50:e.next=71;break;case 52:if(!j(D)){e.next=71;break}ve={},me=0,ge=Object.entries(D);case 55:if(!(me<ge.length)){e.next=67;break}if(he=(0,a.Z)(ge[me],2),be=he[0],ye=he[1],W(ve)||t){e.next=59;break}return e.abrupt("break",67);case 59:return e.next=61,ye(le);case 61:xe=e.sent,(Oe=ce(xe,fe,be))&&(ve=Object.assign(Object.assign({},Oe),E(be,Oe.message)),t&&(S[A]=ve));case 64:me++,e.next=55;break;case 67:if(W(ve)){e.next=71;break}if(S[A]=Object.assign({ref:fe},ve),t){e.next=71;break}return e.abrupt("return",S);case 71:return e.abrupt("return",S);case 72:case"end":return e.stop()}}),e)})));return function(r,t,n,i){return e.apply(this,arguments)}}(),fe=function e(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];for(var i in t){var a=r+(j(t)?".".concat(i):"[".concat(i,"]"));$(t[i])?n.push(a):e(a,t[i],n)}return n},de=function(e,r,t,n,i){var a=void 0;return t.add(r),W(e)||(a=R(e,r),(j(a)||Array.isArray(a))&&fe(r,a).forEach((function(e){return t.add(e)}))),F(a)?i?n:R(n,r):a},pe=function(e){var r=e.isOnBlur,t=e.isOnChange,n=e.isOnTouch,i=e.isTouched,a=e.isReValidateOnBlur,u=e.isReValidateOnChange,o=e.isBlurEvent,c=e.isSubmitted;return!e.isOnAll&&(!c&&n?!(i||o):(c?a:r)?!o:!(c?u:t)||o)},ve=function(e){return e.substring(0,e.indexOf("["))},me=function(e,r){return RegExp("^".concat(r,"([|.)\\d+").replace(/\[/g,"\\[").replace(/\]/g,"\\]")).test(e)},ge=function(e,r){return(0,c.Z)(e).some((function(e){return me(r,e)}))},he=function(e){return e.type==="".concat(p,"-one")};var be=typeof window!==v&&typeof document!==v;function ye(e){var r,t;if($(e)||be&&(e instanceof File||l(e)))return e;if(!["Set","Map","Object","Date","Array"].includes(null===(r=e.constructor)||void 0===r?void 0:r.name))return e;if(e instanceof Date)return t=new Date(e.getTime());if(e instanceof Set){t=new Set;var i,a=(0,n.Z)(e);try{for(a.s();!(i=a.n()).done;){var u=i.value;t.add(u)}}catch(d){a.e(d)}finally{a.f()}return t}if(e instanceof Map){t=new Map;var o,c=(0,n.Z)(e.keys());try{for(c.s();!(o=c.n()).done;){var s=o.value;t.set(s,ye(e.get(s)))}}catch(d){c.e(d)}finally{c.f()}return t}for(var f in t=Array.isArray(e)?[]:{},e)t[f]=ye(e[f]);return t}var xe=function(e){return{isOnSubmit:!e||e===d.onSubmit,isOnBlur:e===d.onBlur,isOnChange:e===d.onChange,isOnAll:e===d.all,isOnTouch:e===d.onTouched}},Oe=function(e){return L(e)||T(e)},we=typeof window===v,ke=be?"Proxy"in window:typeof Proxy!==v;function je(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.mode,t=void 0===r?d.onSubmit:r,p=e.reValidateMode,v=void 0===p?d.onChange:p,m=e.resolver,g=e.context,h=e.defaultValues,b=void 0===h?{}:h,y=e.shouldFocusError,x=void 0===y||y,O=e.shouldUnregister,k=void 0===O||O,S=e.criteriaMode,_=(0,s.useRef)({}),z=(0,s.useRef)({}),P=(0,s.useRef)({}),N=(0,s.useRef)(new Set),Y=(0,s.useRef)({}),I=(0,s.useRef)({}),K=(0,s.useRef)({}),Q=(0,s.useRef)({}),X=(0,s.useRef)(b),ie=(0,s.useRef)(!1),ae=(0,s.useRef)(!1),oe=(0,s.useRef)(),ce=(0,s.useRef)({}),se=(0,s.useRef)({}),me=(0,s.useRef)(g),je=(0,s.useRef)(m),De=(0,s.useRef)(new Set),Ae=(0,s.useRef)(xe(t)),Se=Ae.current,Ce=Se.isOnSubmit,Ze=Se.isOnTouch,Fe=S===d.all,Re=(0,s.useState)({isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touched:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!Ce,errors:{}}),Ee=(0,a.Z)(Re,2),Ve=Ee[0],_e=Ee[1],ze=(0,s.useRef)({isDirty:!ke,dirtyFields:!ke,touched:!ke||Ze,isValidating:!ke,isSubmitting:!ke,isValid:!ke}),Pe=(0,s.useRef)(Ve),Le=(0,s.useRef)(),Me=(0,s.useRef)(xe(v)).current,Te=Me.isOnBlur,Be=Me.isOnChange;me.current=g,je.current=m,Pe.current=Ve,ce.current=k?{}:W(ce.current)?ye(b):ce.current;var Ne=(0,s.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ie.current||(Pe.current=Object.assign(Object.assign({},Pe.current),e),_e(Pe.current))}),[]),Ye=function(){return ze.current.isValidating&&Ne({isValidating:!0})},Ie=(0,s.useCallback)((function(e,r){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4?arguments[4]:void 0,a=t||ne({errors:Pe.current.errors,error:r,name:e,validFields:Q.current,fieldsWithValidation:K.current}),u=R(Pe.current.errors,e);r?(q(Q.current,e),a=a||!u||!J(u,r,!0),C(Pe.current.errors,e,r)):((R(K.current,e)||je.current)&&(C(Q.current,e,!0),a=a||u),q(Pe.current.errors,e)),(a&&!w(t)||!W(n)||ze.current.isValidating)&&Ne(Object.assign(Object.assign(Object.assign({},n),je.current?{isValid:!!i}:{}),{isValidating:!1}))}),[]),He=(0,s.useCallback)((function(e,r){var t=_.current[e],n=t.ref,i=t.options,a=be&&l(n)&&w(r)?"":r;L(n)?(i||[]).forEach((function(e){var r=e.ref;return r.checked=r.value===a})):M(n)&&!re(a)?n.files=a:B(n)?(0,c.Z)(n.options).forEach((function(e){return e.selected=a.includes(e.value)})):T(n)&&i?i.length>1?i.forEach((function(e){var r=e.ref;return r.checked=Array.isArray(a)?!!a.find((function(e){return e===r.value})):a===r.value})):i[0].ref.checked=!!a:n.value=a}),[]),Ue=(0,s.useCallback)((function(e,r){if(ze.current.isDirty){var t=rr();return e&&r&&C(t,e,r),!J(t,X.current)}return!1}),[]),We=(0,s.useCallback)((function(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(ze.current.isDirty||ze.current.dirtyFields){var t=!J(R(X.current,e),H(_,e,ce)),n=R(Pe.current.dirtyFields,e),i=Pe.current.isDirty;t?C(Pe.current.dirtyFields,e,!0):q(Pe.current.dirtyFields,e);var a={isDirty:Ue(),dirtyFields:Pe.current.dirtyFields},u=ze.current.isDirty&&i!==a.isDirty||ze.current.dirtyFields&&n!==R(Pe.current.dirtyFields,e);return u&&r&&Ne(a),u?a:{}}return{}}),[]),Ke=(0,s.useCallback)(function(){var e=(0,u.Z)((0,i.Z)().mark((function e(r,t){var n;return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.next=4;break;case 4:return e.next=6,le(_,Fe,_.current[r],ce);case 6:return e.t0=r,n=e.sent[e.t0],Ie(r,n,t),e.abrupt("return",F(n));case 10:case"end":return e.stop()}}),e)})));return function(r,t){return e.apply(this,arguments)}}(),[Ie,Fe]),qe=(0,s.useCallback)(function(){var e=(0,u.Z)((0,i.Z)().mark((function e(r){var t,n,a,u,o;return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,je.current(rr(),me.current,Fe);case 2:if(t=e.sent,n=t.errors,a=Pe.current.isValid,!Array.isArray(r)){e.next=11;break}return u=r.map((function(e){var r=R(n,e);return r?C(Pe.current.errors,e,r):q(Pe.current.errors,e),!r})).every(Boolean),Ne({isValid:W(n),isValidating:!1}),e.abrupt("return",u);case 11:return o=R(n,r),Ie(r,o,a!==W(n),{},W(n)),e.abrupt("return",!o);case 14:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}(),[Ie,Fe]),Ge=(0,s.useCallback)(function(){var e=(0,u.Z)((0,i.Z)().mark((function e(r){var t,n;return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r||Object.keys(_.current),Ye(),!je.current){e.next=4;break}return e.abrupt("return",qe(t));case 4:if(!Array.isArray(t)){e.next=11;break}return!r&&(Pe.current.errors={}),e.next=8,Promise.all(t.map(function(){var e=(0,u.Z)((0,i.Z)().mark((function e(r){return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ke(r,null);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}()));case 8:return n=e.sent,Ne({isValidating:!1}),e.abrupt("return",n.every(Boolean));case 11:return e.next=13,Ke(t);case 13:return e.abrupt("return",e.sent);case 14:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}(),[qe,Ke]),$e=(0,s.useCallback)((function(e,r,t){var i=t.shouldDirty,a=t.shouldValidate,u={};C(u,e,r);var o,c=(0,n.Z)(fe(e,r));try{for(c.s();!(o=c.n()).done;){var s=o.value;_.current[s]&&(He(s,R(u,s)),i&&We(s),a&&Ge(s))}}catch(l){c.e(l)}finally{c.f()}}),[Ge,He,We]),Qe=(0,s.useCallback)((function(e,r,t){if(!k&&!$(r)&&C(ce.current,e,Array.isArray(r)?(0,c.Z)(r):Object.assign({},r)),_.current[e])He(e,r),t.shouldDirty&&We(e),t.shouldValidate&&Ge(e);else if(!$(r)&&($e(e,r,t),De.current.has(e))){var n=ve(e)||e;C(z.current,e,r),se.current[n]((0,o.Z)({},n,R(z.current,n))),(ze.current.isDirty||ze.current.dirtyFields)&&t.shouldDirty&&(C(Pe.current.dirtyFields,e,ee(r,R(X.current,e,[]),R(Pe.current.dirtyFields,e,[]))),Ne({isDirty:!J(Object.assign(Object.assign({},rr()),(0,o.Z)({},e,r)),X.current)}))}!k&&C(ce.current,e,r)}),[We,He,$e]),Je=function(e){return ae.current||N.current.has(e)||N.current.has((e.match(/\w+/)||[])[0])},Xe=function(e){var r=!0;if(!W(Y.current))for(var t in Y.current)e&&Y.current[t].size&&!Y.current[t].has(e)&&!Y.current[t].has(ve(e))||(I.current[t](),r=!1);return r};function er(e){if(!k){var r,t=ye(e),i=(0,n.Z)(De.current);try{for(i.s();!(r=i.n()).done;){var a=r.value;D(a)&&!t[a]&&(t=Object.assign(Object.assign({},t),(0,o.Z)({},a,[])))}}catch(u){i.e(u)}finally{i.f()}return t}return e}function rr(e){if(re(e))return H(_,e,ce);if(Array.isArray(e)){var r,t={},i=(0,n.Z)(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;C(t,a,H(_,a,ce))}}catch(u){i.e(u)}finally{i.f()}return t}return er(te(_,ye(ce.current),k))}oe.current=oe.current?oe.current:function(){var e=(0,u.Z)((0,i.Z)().mark((function e(r){var t,n,a,u,o,c,s,l,d,p,v,m,g,h,b;return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.type,n=r.target,a=n.name,!(u=_.current[a])){e.next=32;break}if(s=t===f.BLUR,l=pe(Object.assign({isBlurEvent:s,isReValidateOnChange:Be,isReValidateOnBlur:Te,isTouched:!!R(Pe.current.touched,a),isSubmitted:Pe.current.isSubmitted},Ae.current)),d=We(a,!1),p=!W(d)||!s&&Je(a),s&&!R(Pe.current.touched,a)&&ze.current.touched&&(C(Pe.current.touched,a,!0),d=Object.assign(Object.assign({},d),{touched:Pe.current.touched})),!k&&T(n)&&C(ce.current,a,H(_,a)),!l){e.next=13;break}return!s&&Xe(a),e.abrupt("return",(!W(d)||p&&W(d))&&Ne(d));case 13:if(Ye(),!je.current){e.next=26;break}return e.next=17,je.current(rr(),me.current,Fe);case 17:v=e.sent,m=v.errors,g=Pe.current.isValid,o=R(m,a),T(n)&&!o&&je.current&&(h=ve(a),(b=R(m,h,{})).type&&b.message&&(o=b),h&&(b||R(Pe.current.errors,h))&&(a=h)),c=W(m),g!==c&&(p=!0),e.next=30;break;case 26:return e.next=28,le(_,Fe,u,ce);case 28:e.t0=a,o=e.sent[e.t0];case 30:!s&&Xe(a),Ie(a,o,p,d,c);case 32:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}();var tr=(0,s.useCallback)((0,u.Z)((0,i.Z)().mark((function e(){var r,t,n,a,u,o=arguments;return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>0&&void 0!==o[0]?o[0]:{},t=W(_.current)?X.current:{},e.next=4,je.current(Object.assign(Object.assign(Object.assign({},t),rr()),r),me.current,Fe);case 4:if(e.t0=e.sent,e.t0){e.next=7;break}e.t0={};case 7:n=e.t0,a=n.errors,u=W(a),Pe.current.isValid!==u&&Ne({isValid:u});case 11:case"end":return e.stop()}}),e)}))),[Fe]),nr=(0,s.useCallback)((function(e,r){!function(e,r,t,n,i,a){var u=t.ref,o=t.ref.name,c=e.current[o];if(!i){var s=H(e,o,n);!F(s)&&C(n.current,o,s)}u.type&&c?L(u)||T(u)?Array.isArray(c.options)&&c.options.length?(A(c.options).forEach((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;(U(e.ref)&&G(e,e.ref)||a)&&(V(e.ref,r),q(c.options,"[".concat(t,"]")))})),c.options&&!A(c.options).length&&delete e.current[o]):delete e.current[o]:(U(u)&&G(c,u)||a)&&(V(u,r),delete e.current[o]):delete e.current[o]}(_,oe.current,e,ce,k,r),k&&(q(Q.current,e.ref.name),q(K.current,e.ref.name))}),[k]),ir=(0,s.useCallback)((function(e){if(ae.current)Ne();else{var r,t=(0,n.Z)(N.current);try{for(t.s();!(r=t.n()).done;){if(r.value.startsWith(e)){Ne();break}}}catch(i){t.e(i)}finally{t.f()}Xe(e)}}),[]),ar=(0,s.useCallback)((function(e,r){e&&(nr(e,r),k&&!A(e.options||[]).length&&(q(Pe.current.errors,e.ref.name),C(Pe.current.dirtyFields,e.ref.name,!0),Ne({isDirty:Ue()}),ze.current.isValid&&je.current&&tr(),ir(e.ref.name)))}),[tr,nr]);var ur=(0,s.useCallback)((function(e,r,t){var n=t?Y.current[t]:N.current,i=te(_,ye(ce.current),k,!1,e);if(re(e)){var a=ve(e)||e;return De.current.has(a)&&(i=Object.assign(Object.assign({},P.current),i)),de(i,e,n,F(R(X.current,e))?r:R(X.current,e),!0)}var u=F(r)?X.current:r;return Array.isArray(e)?e.reduce((function(e,r){return Object.assign(Object.assign({},e),(0,o.Z)({},r,de(i,r,n,u)))}),{}):(ae.current=F(t),Z(!W(i)&&i||u))}),[]);function or(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var t,n=e.name,i=e.type,a=e.value,u=Object.assign({ref:e},r),o=_.current,s=Oe(e),d=ge(De.current,n),p=function(r){return be&&(!l(e)||r===e)},v=o[n],m=!0;if(v&&(s?Array.isArray(v.options)&&A(v.options).find((function(e){return a===e.ref.value&&p(e.ref)})):p(v.ref)))o[n]=Object.assign(Object.assign({},v),r);else{v=i?s?Object.assign({options:[].concat((0,c.Z)(A(v&&v.options||[])),[{ref:e}]),ref:{type:i,name:n}},r):Object.assign({},u):u,o[n]=v;var g=F(R(ce.current,n));W(X.current)&&g||(t=R(g?X.current:ce.current,n),(m=F(t))||d||He(n,t)),W(r)||(C(K.current,n,!0),!Ce&&ze.current.isValid&&le(_,Fe,v,ce).then((function(e){var r=Pe.current.isValid;W(e)?C(Q.current,n,!0):q(Q.current,n),r!==W(e)&&Ne()}))),!k||d&&m||!d&&q(Pe.current.dirtyFields,n),i&&function(e,r,t){var n=e.ref;l(n)&&t&&(n.addEventListener(r?f.CHANGE:f.INPUT,t),n.addEventListener(f.BLUR,t))}(s&&v.options?v.options[v.options.length-1]:v,s||he(e),oe.current)}}var cr=(0,s.useCallback)((function(e,r){return function(){var t=(0,u.Z)((0,i.Z)().mark((function t(n){var a,u,o,c,s,l,f,d,p,v;return(0,i.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n&&n.preventDefault&&(n.preventDefault(),n.persist()),a={},u=er(te(_,ye(ce.current),k,!0)),ze.current.isSubmitting&&Ne({isSubmitting:!0}),t.prev=4,!je.current){t.next=15;break}return t.next=8,je.current(u,me.current,Fe);case 8:o=t.sent,c=o.errors,s=o.values,Pe.current.errors=a=c,u=s,t.next=27;break;case 15:l=0,f=Object.values(_.current);case 16:if(!(l<f.length)){t.next=27;break}if(!(d=f[l])){t.next=24;break}return p=d.ref.name,t.next=22,le(_,Fe,d,ce);case 22:(v=t.sent)[p]?(C(a,p,v[p]),q(Q.current,p)):R(K.current,p)&&(q(Pe.current.errors,p),C(Q.current,p,!0));case 24:l++,t.next=16;break;case 27:if(!W(a)||!Object.keys(Pe.current.errors).every((function(e){return e in _.current}))){t.next=33;break}return Ne({errors:{},isSubmitting:!0}),t.next=31,e(u,n);case 31:t.next=39;break;case 33:if(Pe.current.errors=Object.assign(Object.assign({},Pe.current.errors),a),t.t0=r,!t.t0){t.next=38;break}return t.next=38,r(Pe.current.errors,n);case 38:x&&E(_.current,Pe.current.errors);case 39:return t.prev=39,Pe.current.isSubmitting=!1,Ne({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:W(Pe.current.errors),submitCount:Pe.current.submitCount+1}),t.finish(39);case 43:case"end":return t.stop()}}),t,null,[[4,,39,43]])})));return function(e){return t.apply(this,arguments)}}()}),[x,Fe]);(0,s.useEffect)((function(){m&&ze.current.isValid&&tr(),Le.current=Le.current||!be?Le.current:function(e,r){var t=new MutationObserver((function(){for(var t=0,i=Object.values(e.current);t<i.length;t++){var a=i[t];if(a&&a.options){var u,o=(0,n.Z)(a.options);try{for(o.s();!(u=o.n()).done;){var c=u.value;c&&c.ref&&U(c.ref)&&r(a)}}catch(s){o.e(s)}finally{o.f()}}else a&&U(a.ref)&&r(a)}}));return t.observe(window.document,{childList:!0,subtree:!0}),t}(_,ar)}),[ar,X.current]),(0,s.useEffect)((function(){return function(){Le.current&&Le.current.disconnect(),ie.current=!0,Object.values(_.current).forEach((function(e){return ar(e,!0)}))}}),[]),!m&&ze.current.isValid&&(Ve.isValid=J(Q.current,K.current)&&W(Pe.current.errors));var sr={trigger:Ge,setValue:(0,s.useCallback)((function(e,r,t){Qe(e,r,t||{}),Je(e)&&Ne(),Xe(e)}),[Qe,Ge]),getValues:(0,s.useCallback)(rr,[]),register:(0,s.useCallback)((function(e,r){if(!we)if(re(e))or({name:e},r);else{if(!j(e)||!("name"in e))return function(r){return r&&or(r,e)};or(e,r)}}),[X.current]),unregister:(0,s.useCallback)((function(e){var r,t=(0,n.Z)(Array.isArray(e)?e:[e]);try{for(t.s();!(r=t.n()).done;){var i=r.value;ar(_.current[i],!0)}}catch(a){t.e(a)}finally{t.f()}}),[]),formState:ke?new Proxy(Ve,{get:function(e,r){if(r in e)return ze.current[r]=!0,e[r]}}):Ve},lr=(0,s.useMemo)((function(){return Object.assign({isFormDirty:Ue,updateWatchedValue:ir,shouldUnregister:k,updateFormState:Ne,removeFieldEventListener:nr,watchInternal:ur,mode:Ae.current,reValidateMode:{isReValidateOnBlur:Te,isReValidateOnChange:Be},validateResolver:m?tr:void 0,fieldsRef:_,resetFieldArrayFunctionRef:se,useWatchFieldsRef:Y,useWatchRenderFunctionsRef:I,fieldArrayDefaultValuesRef:z,validFieldsRef:Q,fieldsWithValidationRef:K,fieldArrayNamesRef:De,readFormStateRef:ze,formStateRef:Pe,defaultValuesRef:X,shallowFieldsStateRef:ce,fieldArrayValuesRef:P},sr)}),[X.current,ir,k,nr,ur]);return Object.assign({watch:function(e,r){return ur(e,r)},control:lr,handleSubmit:cr,reset:(0,s.useCallback)((function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(be)for(var t=0,n=Object.values(_.current);t<n.length;t++){var i=n[t];if(i){var a=i.ref,u=i.options,o=Oe(a)&&Array.isArray(u)?u[0].ref:a;if(l(o))try{o.closest("form").reset();break}catch(c){}}}_.current={},X.current=Object.assign({},e||X.current),e&&Xe(""),Object.values(se.current).forEach((function(e){return ue(e)&&e()})),ce.current=k?{}:ye(e||X.current),function(e){var r=e.errors,t=e.isDirty,n=e.isSubmitted,i=e.touched,a=e.isValid,u=e.submitCount,o=e.dirtyFields;a||(Q.current={},K.current={}),z.current={},N.current=new Set,ae.current=!1,Ne({submitCount:u?Pe.current.submitCount:0,isDirty:!!t&&Pe.current.isDirty,isSubmitted:!!n&&Pe.current.isSubmitted,isValid:!!a&&Pe.current.isValid,dirtyFields:o?Pe.current.dirtyFields:{},touched:i?Pe.current.touched:{},errors:r?Pe.current.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})}(r)}),[]),clearErrors:(0,s.useCallback)((function(e){e&&(Array.isArray(e)?e:[e]).forEach((function(e){return _.current[e]&&D(e)?delete Pe.current.errors[e]:q(Pe.current.errors,e)})),Ne({errors:e?Pe.current.errors:{}})}),[]),setError:(0,s.useCallback)((function(e,r){var t=(_.current[e]||{}).ref;C(Pe.current.errors,e,Object.assign(Object.assign({},r),{ref:t})),Ne({isValid:!1}),r.shouldFocus&&t&&t.focus&&t.focus()}),[]),errors:Ve.errors},sr)}function De(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]])}return t}var Ae=(0,s.createContext)(null);Ae.displayName="RHFContext";var Se=function(){return(0,s.useContext)(Ae)},Ce=function(){var e=typeof performance===v?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(r){var t=(16*Math.random()+e)%16|0;return("x"==r?t:3&t|8).toString(16)}))};function Ze(e){var r=e.name,t=e.rules,n=e.defaultValue,i=e.control,u=e.onFocus,o=Se();var c=i||o.control,l=c.defaultValuesRef,f=c.setValue,d=c.register,p=c.unregister,v=c.trigger,m=c.mode,g=c.reValidateMode,h=g.isReValidateOnBlur,b=g.isReValidateOnChange,y=c.formState,x=c.formStateRef.current,O=x.isSubmitted,w=x.touched,k=x.errors,D=c.updateFormState,A=c.readFormStateRef,S=c.fieldsRef,Z=c.fieldArrayNamesRef,E=c.shallowFieldsStateRef,V=!ge(Z.current,r),_=function(){return!F(R(E.current,r))&&V?R(E.current,r):F(n)?R(l.current,r):n},z=(0,s.useState)(_()),P=(0,a.Z)(z,2),L=P[0],M=P[1],T=(0,s.useRef)(L),B=(0,s.useRef)({focus:function(){return null}}),N=(0,s.useRef)(u||function(){ue(B.current.focus)&&B.current.focus()}),Y=(0,s.useCallback)((function(e){return!pe(Object.assign({isBlurEvent:e,isReValidateOnBlur:h,isReValidateOnChange:b,isSubmitted:O,isTouched:!!R(w,r)},m))}),[h,b,O,w,r,m]),I=(0,s.useCallback)((function(e){var r=function(e){return $(e)||!j(e.target)||j(e.target)&&!e.type?e:F(e.target.value)?e.target.checked:e.target.value}((0,a.Z)(e,1)[0]);return M(r),T.current=r,r}),[]),H=(0,s.useCallback)((function(e){S.current[r]?S.current[r]=Object.assign({ref:S.current[r].ref},t):(d(Object.defineProperties({name:r,focus:N.current},{value:{set:function(e){M(e),T.current=e},get:function(){return T.current}}}),t),e=F(R(l.current,r))),e&&V&&M(_())}),[t,r,d]);(0,s.useEffect)((function(){return function(){return p(r)}}),[r]),(0,s.useEffect)((function(){H()}),[H]),(0,s.useEffect)((function(){!S.current[r]&&H(!0)}));var U=(0,s.useCallback)((function(){A.current.touched&&!R(w,r)&&(C(w,r,!0),D({touched:w})),Y(!0)&&v(r)}),[r,D,Y,v,A]),W=(0,s.useCallback)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return f(r,I(t),{shouldValidate:Y(),shouldDirty:!0})}),[f,r,Y]);return{field:{onChange:W,onBlur:U,name:r,value:L,ref:B},meta:Object.defineProperties({invalid:!!R(k,r)},{isDirty:{get:function(){return!!R(y.dirtyFields,r)}},isTouched:{get:function(){return!!R(y.touched,r)}}})}}function Fe(e){var r=e.control,t=e.name,n=e.defaultValue,i=Se();var a=r||i.control,u=a.useWatchFieldsRef,c=a.useWatchRenderFunctionsRef,l=a.watchInternal,f=a.defaultValuesRef,d=(0,s.useState)()[1],p=(0,s.useRef)(),v=(0,s.useRef)(n);return(0,s.useEffect)((function(){var e=p.current=Ce(),r=c.current,n=u.current;return n[e]=new Set,r[e]=function(){return d({})},l(t,v.current,e),function(){delete n[e],delete r[e]}}),[t,c,u,l,v]),p.current?l(t,v.current,p.current):F(n)?re(t)?R(f.current,t):Array.isArray(t)?t.reduce((function(e,r){return Object.assign(Object.assign({},e),(0,o.Z)({},r,R(f.current,r)))}),{}):f.current:n}var Re=function(e){e.rules;var r=e.as,t=e.render,n=(e.defaultValue,e.control,e.onFocus,De(e,["rules","as","render","defaultValue","control","onFocus"])),i=Ze(e),a=i.field,u=i.meta,o=Object.assign(Object.assign({},n),a);return r?(0,s.isValidElement)(r)?(0,s.cloneElement)(r,o):(0,s.createElement)(r,o):t?t(a,u):null}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
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),v=t(74490),x=t(45267),g=t(46954),Z=t(44067),b=t(96266),j=["actions"],y=["icon","text","onClick","disabled"];function k(e){var n=e.actions,t=(0,l.Z)(e,j),r=(0,u.useState)(null),i=(0,c.Z)(r,2),d=i[0],p=i[1],m=Boolean(d),k=function(e){try{e.stopPropagation(),e.preventDefault()}catch(n){}p(null)};return(0,b.jsxs)(C,(0,s.Z)((0,s.Z)({},t),{},{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){}p(e.currentTarget)},size:"small",children:(0,b.jsx)(x.Z,{})}),(0,b.jsx)(h.Z,{id:"actions-menu","data-cy":"actions-menu",anchorEl:d,keepMounted:!0,open:m,onClose:k,PaperProps:{},children:n.map((function(e,n){if("function"===typeof e)return e({close:k});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)(v.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:k();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},k.defaultProps={actions:[]};var C=m.default.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(39075),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.default.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 un}});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),v=t.n(h),x=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(39075),D=t(28726),S=t(68051),P=t(18945),R=t(75760),T=t(49384),I=t(35432),E=t(10381),N=t(42061),A=t(86229),z=t(92816),B=t(58238),L=t(17425),_=t(29054),U=t(63406),W=t(14491),O=t(44846),q=t(55372),F=t(11750),M=t(74490),V=t(51177),K=t(47020),J=t(6041),H=t(80576),X=t(88574),$=t(50185),G=t(96266);function Y(e){var n=e.teamDid,t=e.roles,r=e.onCancel,i=e.onSuccess,a=e.onError,u=e.endpoint,d=(0,B.h6)().api,p=(0,l.useState)(!1),m=(0,c.Z)(p,2),f=m[0],h=m[1],v=(0,l.useState)(""),g=(0,c.Z)(v,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),L=z[0],_=z[1],U=(0,l.useState)(""),Y=(0,c.Z)(U,2),Q=Y[0],ne=Y[1],te=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(L){e.next=3;break}return b(y("team.member.error.passportEmpty")),e.abrupt("return");case 3:return t=Q.trim(),b(null),h(!0),e.prev=6,e.next=9,d.createMemberInvitation({input:{teamDid:n,role:L,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,W.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,G.jsxs)(F.Z,{component:"div",children:[(0,G.jsxs)(H.Z,{style:{width:"100%"},variant:"outlined",children:[(0,G.jsx)(J.Z,{children:y("common.passport")}),(0,G.jsx)(V.Z,{"data-cy":"invite-member-select-role",value:L,onChange:function(e){b(null),_(e.target.value)},fullWidth:!0,label:y("common.passport"),disabled:f,onKeyPress:function(e){"Enter"===e.key&&(e.preventDefault(),te())},children:t.filter((function(e){return"owner"!==e.name})).map((function(e){return(0,G.jsx)(M.Z,{value:e.name,"data-cy":"invite-member-select-option-".concat(e.name),children:(0,G.jsx)("span",{children:e.title||e.name})},e.name)}))})]}),(0,G.jsx)("div",{style:{marginTop:20,marginBottom:10}}),(0,G.jsx)(K.Z,{label:y("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:Q,onChange:function(e){b(null),ne(e.target.value)},disabled:f,"data-cy":"invite-member-input-remark"}),(0,G.jsx)("div",{style:{marginTop:20,marginBottom:10}})]}),cancel:y("common.cancel"),confirm:y("team.member.inviteDialog.createInviteLink"),onCancel:r,onConfirm:te},{body:function(){var e=(0,W.ly)({inviteId:E.inviteId,endpoint:u});return(0,G.jsxs)("div",{children:[(0,G.jsx)(ee,{children:y("team.member.inviteDialog.createSuccessTip",{expireDate:(0,W.B2)(E.expireDate,k)})}),(0,G.jsx)("div",{style:{marginTop:"40px"}}),(0,G.jsx)($.Z,{children:e})]})},confirm:y("common.confirm"),onConfirm:i}][P];return(0,G.jsxs)(x.Z,{title:y("common.invite"),fullWidth:!0,open:!0,showCloseButton:!1,actions:(0,G.jsxs)(G.Fragment,{children:[re.cancel&&(0,G.jsx)(D.Z,{onClick:re.onCancel,color:"inherit",children:re.cancel}),(0,G.jsxs)(D.Z,{onClick:re.onConfirm,color:"primary",disabled:f||!L,variant:"contained",autoFocus:!0,children:[f&&(0,G.jsx)(O.Z,{size:16}),re.confirm]})]}),children:[(0,G.jsx)(q.Z,{component:"div",children:"function"===typeof re.body?re.body():re.body}),!!Z&&(0,G.jsx)(X.Z,{type:"error",variant:"icon",children:Z})]})}Y.propTypes={teamDid:f().string.isRequired,onCancel:f().func.isRequired,onSuccess:f().func.isRequired,onError:f().func,roles:f().array,endpoint:f().string},Y.defaultProps={onError:function(){},roles:[],endpoint:""};var Q,ee=u.default.div(r||(r=(0,i.Z)(["\n font-size: 16px;\n font-weight: bold;\n"]))),ne=t(26796),te=t(43681),re=t.n(te),ie=t(46999),ae=t(73545);function oe(e){var n=e.teamDid,t=e.onCancel,r=e.onSuccess,i=e.onError,a=e.endpoint,u=(0,B.h6)(),d=u.api,p=u.info,m=(0,l.useContext)(ae.B).api,f=(0,l.useState)(!1),h=(0,c.Z)(f,2),v=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],L=(0,l.useState)(""),_=(0,c.Z)(L,2),U=_[0],M=_[1],V=(0,l.useState)(""),J=(0,c.Z)(V,2),H=J[0],Y=J[1],Q=!!re()(p,"ownerNft.did"),ee=(0,ne.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(!Q){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,G.jsx)(x.Z,{title:b("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:t,children:(0,G.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,G.jsx)(O.Z,{})})});if(ee.error)return(0,G.jsx)(x.Z,{title:b("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:t,children:(0,G.jsx)(X.Z,{type:"error",variant:"icon",children:(0,W.Z)(ee.error)})});var te=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:H.trim()}});case 5:t=e.sent,r=t.inviteInfo,M(r),z(se.length-1),e.next=16;break;case 11:e.prev=11,e.t0=e.catch(2),a=(0,W.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)}}(),oe=function(){I(!1),z(0)},se=[{body:(0,G.jsxs)(F.Z,{component:"div",children:[(0,G.jsxs)(X.Z,{type:"warning",children:[(0,G.jsx)(F.Z,{children:b("team.transferNode.inviteDialog.tips.progress")}),(0,G.jsx)(F.Z,{children:b("team.transferNode.inviteDialog.tips.newOwnerPermissions")})]}),(0,G.jsx)(X.Z,{type:"warning",children:(0,G.jsx)(F.Z,{children:b("team.transferNode.inviteDialog.tips.revoke")})}),(0,G.jsx)("div",{style:{marginTop:20,marginBottom:10}}),(0,G.jsx)(K.Z,{label:b("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:H,onChange:function(e){S(null),Y(e.target.value)},disabled:v,"data-cy":"transfer-node-input-remark"}),(0,G.jsx)("div",{style:{marginTop:20,marginBottom:10}})]}),cancel:b("common.cancel"),confirm:b("team.transferNode.inviteDialog.createInviteLink"),onCancel:t,onConfirm:Q&&!re()(ee,"value.delegated")?function(){I(!0),z(1)}:te},{body:function(){return(0,G.jsx)(ie.default,{action:"delegate-transfer-nft",open:T,locale:j,checkFn:m.get,onClose:oe,onSuccess:te,checkTimeout:3e5,webWalletUrl:(0,W.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,W.ly)({inviteId:U.inviteId,endpoint:a});return(0,G.jsxs)("div",{children:[(0,G.jsx)(ce,{children:b("team.transferNode.inviteDialog.createSuccessTip",{expireDate:(0,W.B2)(U.expireDate,j)})}),(0,G.jsx)("div",{style:{marginTop:"40px"}}),(0,G.jsx)($.Z,{children:e})]})},confirm:b("common.confirm"),onConfirm:r}],le=se[A];return(0,G.jsxs)(x.Z,{title:b("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,showCloseButton:!1,actions:(0,G.jsxs)(G.Fragment,{children:[le.cancel&&(0,G.jsx)(D.Z,{onClick:le.onCancel,color:"inherit",children:le.cancel}),(0,G.jsxs)(D.Z,{onClick:le.onConfirm,color:"primary",disabled:v,variant:"contained",autoFocus:!0,children:[v&&(0,G.jsx)(O.Z,{size:16}),le.confirm]})]}),children:[(0,G.jsx)(q.Z,{component:"div",children:"function"===typeof le.body?le.body():le.body}),!!C&&(0,G.jsx)(X.Z,{type:"error",variant:"icon",children:C})]})}oe.propTypes={teamDid:f().string.isRequired,onCancel:f().func.isRequired,onSuccess:f().func.isRequired,onError:f().func,endpoint:f().string},oe.defaultProps={onError:function(){},endpoint:""};var se,ce=u.default.div(Q||(Q=(0,i.Z)(["\n font-size: 16px;\n font-weight: bold;\n"]))),le=(t(59740),t(62681)),ue=t(94464),de=t(64886),pe=t(12987),me=t(71246),fe=t(12673),he=t(76811),ve=t(70461),xe=t(9729);function ge(e){var n=e.issuances,t=e.teamDid,r=e.onRefresh,i=(0,B.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),v=h[0],x=h[1],g=(0,l.useState)(!1),b=(0,c.Z)(g,2),j=b[0],y=b[1],k=(0,L.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),A.Z.error(e.t0.message);case 13:return e.prev=13,y(!1),x(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),x(null)},S=function(e){return k?(0,W._)({id:e.id,endpoint:k}):""};function P(e){var n=e.data;return(0,G.jsxs)("div",{className:"issuance",children:[(0,G.jsxs)(Z.Z,{display:"flex",justifyContent:"space-between",children:[(0,G.jsx)(U.Z,{permission:u?"":"mutate_team",role:u?W.Wf:[],children:function(e){return e?(0,G.jsx)(xe.Z,{passport:{title:n.title,name:n.name},onDelete:function(){return x({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,G.jsx)(xe.Z,{passport:{title:n.title,name:n.name}})}}),(0,G.jsxs)("div",{style:{color:"#999"},children:[p("common.expires"),":\xa0",(0,W.B2)(n.expireDate,m)]})]}),(0,G.jsx)(Z.Z,{mt:2,children:(0,G.jsx)($.Z,{children:S(n)})})]})}return(0,G.jsxs)(Ze,{children:[n.map((function(e){return(0,G.jsx)(P,{data:e})})),v&&(0,G.jsx)(ve.Z,{title:v.title,description:v.description,confirm:v.confirm,cancel:v.cancel,params:v.params,onConfirm:v.onConfirm,onCancel:v.onCancel})]})}var Ze=u.default.div(se||(se=(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"])));ge.propTypes={teamDid:f().string.isRequired,issuances:f().array,onRefresh:f().func},ge.defaultProps={issuances:[],onRefresh:function(){}};var be,je=t(68079),ye=t(26538),ke=t.n(ye),Ce=t(5178),we=t(32322),De=t(87806),Se=t(25710),Pe=t(82638),Re=t(18901);function Te(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,B.h6)().api,f=(0,l.useState)(!1),h=(0,c.Z)(f,2),v=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,W.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,G.jsxs)(x.Z,{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,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(D.Z,{onClick:a,color:"inherit",size:"small",children:k("common.cancel")}),(0,G.jsxs)(D.Z,{onClick:T,color:"primary",size:"small",disabled:v||!P,variant:"contained",autoFocus:!0,"data-cy":"issue-passport-create-btn",children:[v&&(0,G.jsx)(O.Z,{size:16}),k(r?"team.passport.issuance.create.title":"oauth.issued")]})]}),children:[(0,G.jsx)(q.Z,{component:"div",children:(0,G.jsx)(F.Z,{component:"div",children:(0,G.jsxs)(H.Z,{style:{width:"100%"},variant:"outlined",children:[(0,G.jsx)(J.Z,{children:k("common.passport")}),(0,G.jsx)(V.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:v,onKeyPress:function(e){"Enter"===e.key&&(e.preventDefault(),T())},children:i.filter((function(e){return p||"owner"!==e.name})).map((function(e){return(0,G.jsx)(M.Z,{value:e.name,"data-cy":"issue-passport-select-option-".concat(e.name),children:(0,G.jsx)("span",{children:e.title||e.name})},e.name)}))})]})})}),!!j&&(0,G.jsx)(X.Z,{type:"error",variant:"icon",children:j})]})}function Ie(e){var n=e.action,t=e.passport,r=(0,w.PE)().t,i=(0,L.DJ)().roles.find((function(e){return e.name===t.role}));return(0,G.jsxs)("div",{children:[(0,G.jsx)("div",{children:r("enable"===n?"team.member.enablePassportDescription":"team.member.revokePassportDescription")}),i&&(0,G.jsx)(Z.Z,{mt:3,fontWeight:"bold",children:r("team.member.passportPermissionTitle")}),i&&(0,G.jsx)(Z.Z,{mt:1,children:i.description})]})}function Ee(e){var n,t=e.user,r=e.onCreate,i=e.createPassportSvg,u=(0,w.PE)().t,d=(0,ae.T)().session,p=(0,L.DJ)(),m=p.roles,f=p.teamDid,h=p.teamIssuerDid,v=p.refresh,x=p.enablePassportIssuance,b=p.trustedPassports,j=p.passportColor,k=p.blocklet,C=(0,_.y0)().appIdList,S=(0,B.h6)(),R=S.api,T=S.inService,E=(0,l.useState)(!1),N=(0,c.Z)(E,2),z=N[0],O=N[1],q=(0,l.useState)(null),F=(0,c.Z)(q,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)(""),Y=(0,c.Z)($,2),Q=Y[0],ee=Y[1],ne=[h].concat((0,je.Z)(C||[])).filter(Boolean),te=(re()(t,"passports")||[]).map((function(e){return(0,a.Z)((0,a.Z)({},e),{},{revoked:e.status===I.PASSPORT_STATUS.REVOKED})})),ie=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(!z){e.next=2;break}return e.abrupt("return");case 2:return O(!0),e.prev=3,r=n.status===I.PASSPORT_STATUS.REVOKED?"enableUserPassport":"revokeUserPassport",e.next=7,R[r]({input:{teamDid:f,userDid:t.did,passportId:n.id}});case 7:v(),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),A.Z.error((0,W.Z)(e.t0));case 13:return e.prev=13,O(!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)}}(),oe=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")}},se=te.filter((function(e){return!Q||e.title.includes(Q)||e.name.includes(Q)}));return(0,G.jsxs)(Ne,{children:[(0,G.jsxs)(Re.Z,{children:[(0,G.jsx)("div",{className:"left",children:(0,G.jsx)(Pe.Z,{placeholder:u("team.passport.search"),value:Q,onChange:function(e){return ee(e.target.value)}})}),(0,G.jsx)("div",{className:"right",children:x&&!!t.approved&&(0,G.jsx)(U.Z,{permission:T?"":"mutate_team",role:T?W.Wf:[],children:(0,G.jsxs)(D.Z,{variant:"contained",color:"primary","data-cy":"issue-passport",onClick:function(){return X(!0)},children:[(0,G.jsx)(y.Z,{style:{fontSize:16,marginRight:4}}),u("team.passport.issue")]})})})]}),(0,G.jsxs)(Z.Z,{children:[se.map((function(e){return(0,G.jsx)(U.Z,{permission:T?"":"mutate_team",role:T?W.Wf:[],children:function(n){return(0,G.jsxs)(Z.Z,{className:"passport-item",display:"flex",justifyContent:"space-between",alignItems:"center",mt:3,children:[(0,G.jsxs)(Z.Z,{display:"flex",alignItems:"center",children:[(0,G.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,G.jsxs)("div",{className:"body",children:[(0,G.jsxs)(Z.Z,{className:"title",display:"flex",alignItems:"center",children:[ke()(e.title),(0,G.jsxs)("div",{className:"status-icons",children:[!!ne.length&&!ne.includes(e.issuer.id)&&(0,G.jsx)(P.Z,{}),e.revoked&&(0,G.jsx)(De.Z,{})]})]}),e.expirationDate&&(0,G.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,G.jsxs)("div",{className:"tip",children:[e.issuer.id!==h&&!b.some((function(n){return n.issuerDid===e.issuer.id}))&&(0,G.jsx)(g.Z,{title:u("team.passport.notTrustedIssuerTip"),children:(0,G.jsx)(Z.Z,{component:Ce.Z,style:{fontSize:"1.3em"},color:"error.main",mr:.5})}),(0,G.jsx)("span",{children:u("team.passport.issueBy",{name:e.issuer.name})})]})]})]}),(0,G.jsx)(Z.Z,{children:oe(n,e).revokable?(0,G.jsxs)(D.Z,{variant:"outlined",color:e.revoked?"primary":"secondary",onClick:function(){return(n=e).status===I.PASSPORT_STATUS.REVOKED?V({title:u("team.member.enablePassport"),description:(0,G.jsx)(Ie,{action:"enable",passport:n}),confirm:u("common.enable"),cancel:u("common.cancel"),onConfirm:function(){ie(n)},onCancel:function(){O(!1),V(null)},color:"primary"}):V({title:u("team.member.revokePassport"),description:(0,G.jsx)(Ie,{action:"revoke",passport:n}),confirm:u("common.revoke"),cancel:u("common.cancel"),onConfirm:function(){ie(n)},onCancel:function(){O(!1),V(null)}});var n},children:[e.revoked?(0,G.jsx)(y.Z,{style:{fontSize:16,marginRight:4}}):(0,G.jsx)(De.Z,{style:{height:16,marginRight:4}}),e.revoked?u("common.enable"):u("common.revoke")]}):(0,G.jsx)(g.Z,{title:oe(n,e).message,children:(0,G.jsx)(Ce.Z,{style:{color:"#ddd"}})})})]})}},e.id)})),!se.length&&(0,G.jsx)(Se.Z,{children:u("common.empty")})]}),H&&(0,G.jsx)(Te,{teamDid:f,ownerDid:t.did,needReceive:(0,we.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,G.jsx)(ve.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})]})}Te.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},Te.defaultProps={onError:function(){},roles:[],showOwnerPassport:!1,needReceive:!0},Ie.propTypes={action:f().string.isRequired,passport:f().object.isRequired},Ie.defaultProps={},Ee.propTypes={user:f().object.isRequired,createPassportSvg:f().func.isRequired,onCreate:f().func},Ee.defaultProps={onCreate:function(){}};var Ne=u.default.div(be||(be=(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"]))),Ae=function(e,n){return e.nodeOwner&&e.nodeOwner.did===n},ze=function(e,n){return e&&e.did===n};function Be(e){var n,t=e.user,r=e.onCancel,i=e.onSuccess,a=e.onError,u=e.children,d=(0,B.h6)(),p=d.api,m=d.info,f=d.inService,h=(0,ae.T)().session,v=(0,L.DJ)(),x=v.teamDid,g=v.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:x,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),A.Z.error((0,W.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&&!Ae(m,t.did))&&!ze(h.user,t.did))?(0,G.jsxs)(G.Fragment,{children:["function"===typeof u?u({can:n,open:function(){return P(!0)}}):u,S?(0,G.jsx)(ve.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}Be.propTypes={user:f().object,onSuccess:f().func,onCancel:f().func,onError:f().func,children:f().oneOfType([f().object,f().func])},Be.defaultProps={user:{},onSuccess:function(){},onCancel:function(){},onError:function(){},children:null};var Le,_e,Ue,We=t(6352),Oe=t.n(We);function qe(e,n,t){if(e&&e.startsWith(I.USER_AVATAR_URL_PREFIX)){var r=window.env.apiPrefix||"/";return t?Oe()(r,I.USER_AVATAR_PATH_PREFIX,e.replace(I.USER_AVATAR_URL_PREFIX,"")):Oe()(r,I.USER_AVATAR_PATH_PREFIX,n,e.replace(I.USER_AVATAR_URL_PREFIX,""))}return e}function Fe(e){return(e.user.connectedAccounts||[]).map((function(e){return(0,G.jsx)(de.Z,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:e.provider,children:(0,G.jsx)(z.Z,{did:e.did})},e.did)}))}f().string.isRequired,Fe.propTypes={user:f().object.isRequired,onChangeUser:f().func},Fe.defaultProps={onChangeUser:function(){}};var Me="info";function Ve(e){var n=e.userDid,t=e.onCancel,r=e.initTab,i=e.createPassportSvg,a=(0,B.h6)(),c=a.api,u=a.ws.useSubscription,d=a.inService,p=(0,L.DJ)(),m=p.roles,f=p.teamDid,h=p.enablePassportIssuance,v=(0,w.PE)(),g=v.t,b=v.locale,j=(0,fe.Z)({user:null,issuances:null,tab:r||Me}),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}}},getPassportIssuances:{input:{teamDid:n,ownerDid:t}}});case 3:(r=e.sent).getUser.user&&(r.getUser.user.avatar=qe(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),A.Z.error((0,W.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(I.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=Me)}),[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=Me;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:Me,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,G.jsx)(Z.Z,{display:"flex",alignItems:"center",children:C[(null===(e=j.user)||void 0===e?void 0:e.sourceProvider)||I.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,W.B2)(j.user.lastLoginAt,b)},{name:g("team.member.lastLoginIp"),value:j.user.lastLoginIp||""},{name:g("common.createdAt"),value:(0,W.B2)(j.user.createdAt,b)},{name:g("common.remark"),value:j.user.remark||"--"}].filter(Boolean):[]).map((function(e){return e.name===g("common.did")?(0,G.jsx)(de.Z,{valueComponent:"div",nameWidth:120,name:e.name,nameFormatter:function(){return g("common.did")},children:e.value},e.name):(0,G.jsx)(de.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,G.jsx)(Fe,{user:j.user,onChangeUser:k})}},passports:{label:g("common.passport"),value:"passports",component:function(){return(0,G.jsx)(Ee,{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,G.jsx)(ge,{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)||he.LOGIN_PROVIDER.WALLET)}));var n})),P=D[j.tab]||D.info;return(0,G.jsx)(x.Z,{title:g("common.member"),onClose:t,open:!0,PaperProps:{style:{maxWidth:632,minHeight:"80vh"}},fullWidth:!0,actions:j.user&&(0,G.jsx)(U.Z,{permission:d?"":"mutate_team",role:d?W.Wf:[],children:(0,G.jsx)(Be,{user:j.user,children:function(e){var n=e.open;return(0,G.jsxs)(Xe,{onClick:n,children:[j.user.approved?(0,G.jsx)(pe.Z,{style:{fontSize:"1.2em",marginRight:"0.4em"}}):(0,G.jsx)(me.Z,{style:{fontSize:"1.2em",marginRight:"0.4em"}}),j.user.approved?g("team.member.forbidLogin"):g("team.member.allowLogin")]})}})}),children:(0,G.jsxs)(Je,{children:[!j.user&&(0,G.jsx)(He,{children:(0,G.jsx)(O.Z,{})}),j.user&&(0,G.jsxs)("div",{children:[(0,G.jsxs)(Z.Z,{display:"flex",alignItems:"center",className:"info",children:[(0,G.jsx)(le.Z,{src:j.user.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),(0,G.jsxs)(Z.Z,{children:[(0,G.jsx)(Z.Z,{className:"name",children:j.user.fullName}),(0,G.jsx)(Z.Z,{className:"did",mt:1,children:(0,G.jsx)(z.Z,{did:j.user.did})})]})]}),(0,G.jsx)(Z.Z,{mx:3,className:"tabs",children:(0,G.jsx)(ue.Z,{tabs:S,current:j.tab,onChange:function(e){j.tab=e},scrollButtons:"auto"})}),(0,G.jsx)("div",{className:"body",children:(0,G.jsx)(P.component,{})})]})]})})}Ve.propTypes={userDid:f().string.isRequired,onCancel:f().func.isRequired,createPassportSvg:f().func.isRequired,initTab:f().string},Ve.defaultProps={initTab:Me};var Ke,Je=u.default.div(Le||(Le=(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"]))),He=u.default.div(_e||(_e=(0,i.Z)(["\n flex: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n height: 200px;\n"]))),Xe=u.default.div(Ue||(Ue=(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"]))),$e=t(27773);function Ge(){var e=(0,B.h6)(),n=e.api,t=e.inService,r=(0,l.useContext)(w.RD),i=r.t,a=r.locale,u=(0,L.DJ)(),d=u.teamDid,p=u.invitations,m=u.refresh,f=u.endpoint,h=(0,l.useState)(null),v=(0,c.Z)(h,2),x=v[0],g=v[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,W._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,W.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,G.jsx)($.Z,{children:S(n)}):(0,G.jsx)(O.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,G.jsx)(T.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,G.jsx)(U.Z,{permission:t?"":"mutate_team",role:t?W.Wf:[],children:(0,G.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,G.jsx)($e.default,{style:{fontSize:"1.2em"}}),i("common.delete")]})})}}}];return(0,G.jsxs)(Ye,{children:[p.length?(0,G.jsx)(R.Z,{locale:a,data:(0,je.Z)(p),columns:P,verticalKeyWidth:100,options:{download:!1,filter:!1,print:!1}}):(0,G.jsx)(Se.Z,{children:i("common.empty")}),x&&(0,G.jsx)(ve.Z,{title:x.title,description:x.description,confirm:x.confirm,cancel:x.cancel,params:x.params,onConfirm:x.onConfirm,onCancel:x.onCancel})]})}var Ye=u.default.div(Ke||(Ke=(0,i.Z)(["\n margin-top: -20px;\n"])));Ge.propTypes={},Ge.defaultProps={};var Qe,en=t(46954),nn=t(44067),tn=t(92726);function rn(e){var n=e.user,t=e.onIssuePassport,r=(0,L.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,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(tn.Z,{"data-cy":"member-actions",actions:[{icon:(0,G.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,G.jsx)(Be,{user:n,children:function(e){var r=e.open;return(0,G.jsxs)(M.Z,{dense:!0,onClick:function(e){e.stopPropagation(),t(),r(e)},"data-cy":"action-toggle-block",children:[(0,G.jsx)(en.Z,{style:{minWidth:24,marginRight:8},children:n.approved?(0,G.jsx)(pe.Z,{}):(0,G.jsx)(me.Z,{})}),(0,G.jsx)(nn.Z,{primary:n.approved?o("team.member.forbidLogin"):o("team.member.allowLogin")})]})}},"toggle-approval")}]}),d&&(0,G.jsx)(Te,{teamDid:i,ownerDid:n.did,needReceive:(0,we.h1)(n)===n.did,roles:a,onCancel:function(){return p(!1)},onSuccess:function(){t(),p(!1)}})]})}rn.propTypes={user:f().object.isRequired,onIssuePassport:f().func},rn.defaultProps={onIssuePassport:function(){}};var an="$all",on="$none",sn=function(e,n){var t=e.find((function(e){return e.key===n}));return(null===t||void 0===t?void 0:t.value)||0},cn=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 ln(e){var n=e.user,t=(0,l.useContext)(w.RD).t,r=(0,G.jsxs)("div",{className:"member-block",children:[(0,G.jsxs)("div",{className:"member-avatar",children:[(0,G.jsx)(C.Z,{src:"".concat(n.avatar,"?imageFilter=resize&w=48&h=48"),size:24,did:n.did,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),!n.approved&&(0,G.jsx)("did",{className:"badge-block"}),n.isFromExternal&&(0,G.jsx)(g.Z,{title:t("team.passport.externalPassport"),children:(0,G.jsx)(Z.Z,{ml:1,className:"icon",children:(0,G.jsx)(P.Z,{})})})]}),(0,G.jsx)("div",{className:"member-text",children:n.fullName})]});return n.approved?r:(0,G.jsx)(Z.Z,{display:"flex",alignItems:"center",children:(0,G.jsx)(g.Z,{title:t("team.member.forbidLoginDescription"),children:r})})}function un(e){var n=e.type,t=e.createPassportSvg,r=(0,_.y0)().appIdList,i=void 0===r?[]:r,u=(0,L.DJ)(),d=u.teamDid,m=u.invitations,f=u.teamIssuerDid,h=u.roles,g=u.refresh,C=u.enablePassportIssuance,P=u.endpoint,O=u.api,q=(0,B.h6)(),F=q.inService,M=q.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],Q=X[1],ee=(0,l.useState)(!1),ne=(0,c.Z)(ee,2),te=ne[0],re=ne[1],ie=(0,l.useState)(!1),ae=(0,c.Z)(ie,2),se=ae[0],ce=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],ve=fe[1],xe=(0,l.useState)([]),ge=(0,c.Z)(xe,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,E.Z)({did:void 0}),Te=(0,c.Z)(Re,1)[0],Ie="members-".concat(d),Ee=(0,R.$)(Ie),Ne=(0,l.useState)({role:an,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,N.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,O.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:sn(Se,e.name)}}));Le.unshift({name:an,title:"All Members",num:sn(Se,an)}),Le.push({name:on,title:"Other",num:sn(Se,on)});var _e=function(){var e={};ze.hideBlocked&&(e.approved=!0),e.role=ze.role,ze.searchText&&(e.search=ze.searchText),ve(!0),O.getUsers({query:e,paging:{page:ze.page,pageSize:ze.pageSize}}).then((function(e){ve(!1),(e.users||[]).forEach((function(e){e.isFromExternal=cn(e,p()(i)?[f]:i),e.avatar=qe(e.avatar,d,F),e.passports=(e.passports||[]).filter((function(e){return e.issuer}))})),be(e.users||[]),Ce(e.paging.total)})).catch((function(e){ve(!1),A.Z.error(e.message)}))},Ue=function(){O.getUsersCountPerRole().then((function(e){Pe(e.counts||[])})).catch((function(e){A.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(I.EVENTS.USER_UPDATED,We,[ze]),M(I.EVENTS.USER_ADDED,We,[ze]);var Oe=C,Fe=[{label:K("common.name"),name:"fullName",options:{customBodyRenderLite:function(e){var n=Ze[e];return(0,G.jsx)("div",{"data-cy":"member-name-".concat(n.fullName),children:(0,G.jsx)(ln,{user:n})},n.did)}}},{label:K("common.address"),name:"did",options:{customBodyRender:function(e){return(0,G.jsx)(z.Z,{size:14,responsive:!0,copyable:!1,did:e})}}},{label:K("team.member.lastLogin"),name:"lastLoginAt",options:{customBodyRender:function(e){return(0,G.jsx)(T.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||I.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,G.jsx)(U.Z,{permission:F?"":"mutate_team",role:F?W.Wf:[],children:(0,G.jsx)(rn,{user:n,onIssuePassport:function(){return pe((0,a.Z)((0,a.Z)({},n),{},{initTab:"issuances"}))}})})}}}],Me=[];Oe&&(Me.push((0,G.jsxs)(D.Z,{variant:"outlined",style:{flexShrink:0,marginRight:16},color:"primary",size:"small",onClick:function(){ce(!0)},children:[(0,G.jsx)(S.Z,{style:{height:"1em",marginRight:4}}),K("common.inviting"),m.length?" (".concat(m.length,")"):""]}),(0,G.jsx)(U.Z,{permission:F?"":"mutate_team",role:F?W.Wf:[],children:(0,G.jsxs)(D.Z,{style:{flexShrink:0,marginRight:16},variant:"contained",edge:"end",color:"primary",size:"small","data-cy":"invite-member",onClick:function(){return Q(!0)},children:[(0,G.jsx)(y.Z,{style:{fontSize:"1.3em",marginRight:4}}),K("team.invite")]})})),"server"===n&&Me.push((0,G.jsx)(U.Z,{role:"owner",children:(0,G.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,G.jsx)(k.Z,{style:{fontSize:"1.3em",marginRight:4}}),K("team.transferNode.name")]})})));var Ke={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,G.jsxs)(dn,{children:[(0,G.jsxs)(Z.Z,{className:"main",display:"flex",children:[(0,G.jsx)("div",{className:"left",children:(0,G.jsx)("div",{className:"tabs",children:Le.map((function(e){return(0,G.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,G.jsx)("span",{className:"text",children:e.title}),(0,G.jsx)("span",{className:v()("badge",{"is-rect":e.num>999}),children:e.num})]},e.name)}))})}),(0,G.jsx)("div",{className:"right",children:(0,G.jsx)(R.Z,{className:"main-table",verticalKeyWidth:100,locale:J,durable:Ie,durableKeys:["page","rowsPerPage"],title:(0,G.jsx)("div",{className:"table-toolbar-left",children:(0,G.jsx)(b.Z,{control:(0,G.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:Fe,customButtons:Me,options:Ke,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,G.jsx)(x.Z,{title:K("common.inviting"),onClose:function(){return ce(!1)},open:se,maxWidth:"lg",fullWidth:!0,children:(0,G.jsx)(Ge,{})}),de&&(0,G.jsx)(Ve,{onCancel:function(){return pe(null)},userDid:de.did,createPassportSvg:t,initTab:de.initTab}),$&&(0,G.jsx)(Y,{teamDid:d,endpoint:P,roles:h,onCancel:function(){return Q(!1)},onSuccess:function(){g(),Q(!1)}}),te&&(0,G.jsx)(oe,{teamDid:d,endpoint:P,roles:h,onCancel:function(){return re(!1)},onSuccess:function(){g(),re(!1)}})]})}ln.propTypes={user:f().object.isRequired};var dn=u.default.div(Qe||(Qe=(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-text {\n margin-left: 10px;\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}));un.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.default)((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).default.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 +0,0 @@
|
|
|
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),o=t(33518),i=t(85493),c=t(15849),u=t(39075),s=t(11750),l=t(39434),p=t(39948),d=t(10697),f=t(94464),v=t(88574),m=t(28726),h=t(38242),b=t(81010),g=t(87363),x=(t(68534),t(86229)),k=t(1722),y=t(96234),w=t(35432),Z=t(46999),j=t(58238),P=t(29054),S=t(73545),D=t(14491),_=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},B=function(e,n,t){var r=e.hostname,a=e.href;if(!n)return a;if(t){var o,i=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!i)return a;var c=i[0],u=(((null===(o=n.site)||void 0===o?void 0:o.domainAliases)||[]).map((function(e){return e.value})).filter(Boolean).find((function(e){return e.endsWith(w.DEFAULT_DID_DOMAIN)}))||"").replace(".".concat(w.DEFAULT_DID_DOMAIN),"");return u?a.replace(r,"".concat(u,"-").concat(c,".").concat(w.DEFAULT_IP_DOMAIN_SUFFIX)):a}return a.replace(n.meta.bundleDid,n.appPid)};function N(){var e=(0,u.PE)().t,n=(0,S.T)().api,t=(0,P.y0)().blocklet,r=(0,j.h6)().inService,o=(0,a.useState)(!1),i=(0,y.Z)(o,2),c=i[0],s=i[1],l=(0,a.useState)(5),d=(0,y.Z)(l,2),f=d[0],b=d[1],g=t&&t.structVersion!==w.APP_STRUCT_VERSION;return[g&&(0,L.jsxs)(v.Z,{type:"warning",style:{margin:"12px 0"},children:[(0,L.jsxs)(p.Z,{display:"flex",alignItems:"center",children:[(0,L.jsx)(m.Z,{variant:"contained",size:"small",color:"primary",onClick:function(){return function(){try{if("running"===t.status)return void x.Z.error(e("blocklet.migrate.tip.running"));var n=E(t);if(n)return void x.Z.error(e("blocklet.migrate.tip.duplicate",{name:n}));s(!0)}catch(r){x.Z.error((0,D.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)(Z.default,{popup:!0,open:c,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:n.get,checkTimeout:3e5,onSuccess:function(){var e=B(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,_.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 s(!1)}},"connect")]}N.propTypes={};var C,I=t(35966),U=t(49946),A=t(44846),O=t(78123),G=t(75793),R=t(17022),T=t(13671),z=t(74094),F=t(7199),K=(0,a.lazy)((function(){return t.e(5032).then(t.bind(t,65032))})),M=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(8537),t.e(105),t.e(8719),t.e(5285),t.e(6547),t.e(5760),t.e(2452),t.e(4331),t.e(1569),t.e(4168),t.e(9801)]).then(t.bind(t,71320))})),V=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(105),t.e(6547),t.e(3245),t.e(2452),t.e(2701),t.e(4775)]).then(t.bind(t,14775))})),W=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(442),t.e(9662),t.e(7676),t.e(4620)]).then(t.bind(t,11146))})),$=(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))})),q=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(8537),t.e(105),t.e(8719),t.e(5285),t.e(6547),t.e(5760),t.e(2657),t.e(6412),t.e(3216)]).then(t.bind(t,46412))})),X=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(8537),t.e(105),t.e(8719),t.e(5285),t.e(4901),t.e(1685),t.e(9744)]).then(t.bind(t,85555))})),J=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(8537),t.e(105),t.e(8719),t.e(5285),t.e(4901),t.e(442),t.e(9366),t.e(7604),t.e(1237),t.e(7638),t.e(1685),t.e(4407),t.e(3245),t.e(9244),t.e(6287),t.e(4168),t.e(2264),t.e(7126)]).then(t.bind(t,77126))})),Y=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(9327),t.e(8219)]).then(t.bind(t,92379))})),H=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(8537),t.e(105),t.e(8719),t.e(5285),t.e(6547),t.e(5760),t.e(7534)]).then(t.bind(t,87534))})),Q=(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(8719),t.e(5285),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,i.useNavigate)(),t=(0,i.useParams)().tab,r=void 0===t?"overview":t,o=(0,T.y0)(),y=o.did,Z=o.blocklet,j=o.error,P=o.client,S=o.actions,D=S.setBlocklet,_=S.refreshBlocklet,E=(0,G.h6)().refresh,B=(0,u.PE)().t,C=(0,a.useCallback)((function(){return(0,L.jsx)(W,{scope:y})}),[y]),U=(null===Z||void 0===Z||null===(e=Z.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,z.bV)(e,U)},re=function(e){n("/blocklets/".concat(y,"/").concat(e))},oe=!Z||(0,z.wS)(Z.status)?[]:(0,h.getAppMissingConfigs)(Z),ie=null,ce=[{label:B("common.overview"),value:"overview"},{breadcrumbsLabel:B("common.components"),label:(0,L.jsx)(d.Z,{color:"error",variant:"dot",invisible:!oe.length,children:B("common.components")}),value:"components"}];if(j)ie=(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(v.Z,{type:"error",variant:"icon",children:(0,z.Z)(j)}),(0,L.jsx)(m.Z,{onClick:function(){return _()},children:(0,L.jsx)("span",{style:{textDecoration:"underline"},children:B("common.retry")})})]});else if(Z){var ue,se={overview:(0,L.jsx)(K,{}),configuration:M,navigation:V,services:X,members:(0,L.jsx)(q,{type:"blocklet",createPassportSvg:te}),passports:$,components:J,"audit-logs":C,logs:Y,runtime:(0,L.jsx)(H,{}),traffic:(0,L.jsx)(Q,{client:P,did:y}),storage:(0,L.jsx)(ee,{})};"configuration"===r&&(0,z.wS)(Z.status)&&re("overview"),(0,z.wS)(Z.status)||(ce.push({label:B("common.members"),value:"members"}),ce.push({label:B("common.passport"),value:"passports"}),ce.push({label:B("common.configuration"),value:"configuration"})),ce.push({label:B("common.auditLogs"),value:"audit-logs"}),Z&&null!==(ue=Z.children)&&void 0!==ue&&ue.length&&Z.structVersion===w.APP_STRUCT_VERSION&&ce.push({label:B("common.logs"),value:"logs"}),ce.push({label:B("common.configNavigation"),value:"navigation"}),ce.push({label:B("common.runtime"),value:"runtime"}),ce.push({label:B("common.traffic"),value:"traffic"}),ce.push({label:B("common.storage"),value:"storage"}),(0,h.getBlockletServices)(Z).length&&ce.splice(2,0,{label:B("blocklet.services"),value:"services"});var le=se[r]||se.overview;ie=(0,L.jsxs)(g.g,{type:"components",children:[!(0,h.isExternalBlocklet)(Z)&&(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)(I.Z,{children:(0,L.jsx)(A.Z,{})}),children:(0,a.isValidElement)(le)?le:(0,L.jsx)(le,{blocklet:Z,onUpdate:function(e){e&&D(e),_()},createPassportSvg:te})})})]})}else ie=(0,L.jsx)(I.Z,{children:(0,L.jsx)(A.Z,{})});var pe=ce.find((function(e){return e.value===r})),de=Z?R.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:B("common.blocklets")}),(0,L.jsx)(c.NavLink,{to:"/blocklets/".concat(y,"/overview"),style:function(e){return e?{color:"inherit"}:{}},children:B("common.detail")}),(0,L.jsx)(s.Z,{color:"textSecondary",children:pe?pe.breadcrumbsLabel||pe.label:""})]}),(0,L.jsxs)(s.Z,{component:"div",className:"page-header",children:[(0,L.jsxs)(s.Z,{component:"h2",variant:"h4",className:"page-title",color:"textPrimary",children:[Z?(0,L.jsx)(k.Z,{blocklet:Z,style:{marginRight:16}}):null,Z?(0,L.jsxs)(p.Z,{display:"flex",alignItems:"center",children:[(0,L.jsx)(p.Z,{children:(0,h.getDisplayName)(Z)}),"unknown"!==(null===Z||void 0===Z?void 0:Z.status)&&(0,L.jsx)(b.Z,{size:"12px",style:{marginLeft:8},status:Z.status,source:Z.source})]}):"".concat(B("common.blocklet")," ").concat(B("common.detail"))]}),(0,L.jsx)(F.Z,{permission:"mutate_blocklets",children:!!Z&&!(0,h.isExternalBlocklet)(Z)&&(0,L.jsx)(O.Z,{className:"page-actions",blocklet:Z,onStart:function(){},onComplete:function(e){var t=e.action,r=e.error;r?x.Z.error(r.message):"remove"===t?(E(),n("/blocklets")):_()},variant:"group"})})]}),(0,L.jsx)(N,{}),ie]})})}function re(){var e=(0,i.useParams)().did;return e?(0,L.jsx)(T.$8,{did:e,children:(0,L.jsx)(U.wV,{children:(0,L.jsx)(te,{})})}):null}var ae=o.default.main(C||(C=(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 D},XN:function(){return _}});var r=t(32723),a=t(33028),o=t(34795),i=t(96234),c=t(5057),u=t(55898),s=t.n(u),l=t(86229),p=t(39075),d=t(76811),f=t(29054),v=t(84584),m=t(41899),h=t(58238),b=t(65873);function g(e){return x.apply(this,arguments)}function x(){return x=(0,o.Z)((0,r.Z)().mark((function e(n){var t,i,c,u,s;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.blockletDid,i=n.nodeApi,c=n.spaceGateways,u=!1,e.next=4,Promise.all(c.map(function(){var e=(0,o.Z)((0,r.Z)().mark((function e(n){var t,o;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.name,e.next=3,(0,v.nU)(n.endpoint);case 3:return o=e.sent,(0,b.isEmpty)(o)||o===t||(t=o,u=!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(s=e.sent,!u){e.next=8;break}return e.next=8,Promise.all(s.filter((function(e){return e.did})).map((function(e){return i.updateBlockletSpaceGateway({input:{did:t,where:{did:e.did},spaceGateway:(0,a.Z)({},e)}})})));case 8:return e.abrupt("return",s);case 9:case"end":return e.stop()}}),e)}))),x.apply(this,arguments)}var k=t(99875);var y=t(14491);function w(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{deps:[],setLoading:function(){}},t=n.deps,a=n.setLoading,u=(0,f.y0)().blocklet,s=(0,c.useState)([]),p=(0,i.Z)(s,2),d=p[0],v=p[1],g=(0,h.h6)().api,x=(0,b.debounce)((0,o.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),u){e.next=5;break}return v([]),e.abrupt("return");case 5:return e.next=7,g.getBlockletBackups({input:{did:u.meta.did}});case 7:n=e.sent,t=n.backups,v(null!==t&&void 0!==t?t:[]),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),console.error(e.t0),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,m.Z)((0,o.Z)((0,r.Z)().mark((function e(){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:x();case 1:case"end":return e.stop()}}),e)}))),[null===u||void 0===u||null===(e=u.meta)||void 0===e?void 0:e.did].concat(t)),{backups:d}}var Z=function(e){var n=e.appDid,t=w().backups,r=(0,c.useState)({message:"",progress:0,completed:!1}),o=(0,i.Z)(r,2),u=o[0],s=o[1];return(0,(0,h.h6)().ws.useSubscription)(d.BlockletEvents.backupProgress,(function(e){n===(null===e||void 0===e?void 0:e.appDid)&&s((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,i.Z)(t,1)[0];s((function(){return{message:n.message,progress:n.progress,completed:Boolean(n.progress>=100)}}))}}),[t]),u},j=t(96266),P=(0,c.createContext)({}),S=P.Provider;P.Consumer;function D(e){var n=e.children,t=(0,p.PE)().t,u=(0,h.h6)().api,s=(0,f.y0)().blocklet,b=(0,c.useState)(!1),x=(0,i.Z)(b,2),y=x[0],P=x[1],D=(0,c.useState)(!1),_=(0,i.Z)(D,2),L=_[0],E=_[1],B=function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.setLoading,a=n.refresh,u=(0,f.y0)(),s=u.blocklet,p=u.actions.refreshBlocklet,d=null===s||void 0===s||null===(e=s.meta)||void 0===e?void 0:e.did,v=(0,c.useState)([]),b=(0,i.Z)(v,2),x=b[0],y=b[1],w=(0,h.h6)().api;return(0,m.Z)((0,o.Z)((0,r.Z)().mark((function e(){var n,a,o;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,w.getBlockletSpaceGateways({input:{did:d}});case 7:return n=e.sent,a=n.spaceGateways,e.next=11,g({blockletDid:d,nodeApi:w,spaceGateways:a});case 11:o=e.sent,y(null!==o&&void 0!==o?o:[]),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:x}}({refresh:L,setLoading:P}),N=B.spaceGateways,C=Z({appDid:null===s||void 0===s?void 0:s.appDid}),I=(0,c.useState)(!1),U=(0,i.Z)(I,2),A=U[0],O=U[1],G=(0,c.useMemo)((function(){return(0,v.mo)(null===s||void 0===s?void 0:s.environments)}),[s,L,A]),R=(0,c.useState)(!1),T=(0,i.Z)(R,2),z=T[0],F=w({deps:[C],setLoading:T[1]}).backups,K=(0,c.useState)(null===N||void 0===N?void 0:N.find((function(e){return e.endpoint===G}))),M=(0,i.Z)(K,2),V=M[0],W=M[1],$=function(){var e=(0,o.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 N.push((0,a.Z)((0,a.Z)({},n),{},{loading:!0})),e.next=3,u.addBlockletSpaceGateway({input:{did:s.meta.did,spaceGateway:n}});case 3:if(G===t){e.next=6;break}return e.next=6,u.configBlocklet({input:{did:[s.meta.did],configs:[{key:d.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t}]}});case 6:J(),W(n);case 8:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),q=function(){var e=(0,o.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!==G){e.next=5;break}return l.Z.warning(t("storage.spaces.gateway.delete.failedForConnected")),e.abrupt("return");case 5:return e.next=7,u.deleteBlockletSpaceGateway({input:{did:s.meta.did,spaceGatewayDid:null===n||void 0===n?void 0:n.did}});case 7:J(),W(n);case 9:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),X=function(){var e=(0,o.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,u.updateBlockletSpaceGateway({input:{did:s.meta.did,where:{did:n.did},spaceGateway:n}});case 2:if(G===n.endpoint){e.next=5;break}return e.next=5,u.configBlocklet({input:{did:[s.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"})),J();case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),J=function(){E((function(e){return!e}))};return(0,j.jsx)(S,{value:{spaceGateways:N,selectedSpaceGateway:V,addSpaceGateway:$,deleteSpaceGateway:q,updateSpaceGateway:X,refreshSpaceGateways:J,spaceGatewaysLoading:y,spaceGatewayIsSelected:function(e){return(null===e||void 0===e?void 0:e.endpoint)===G},backupEndpoint:G,backupProgress:C,backups:F,backupsLoading:z,refreshBackupEndpoint:function(){O((function(e){return!e}))}},children:n})}function _(){return(0,c.useContext)(P)}D.propTypes={children:s().any.isRequired},D.defaultProps={}},60344:function(e,n,t){t.d(n,{hi:function(){return o},od:function(){return a.a}});var r=t(10458),a=t.n(r);a().defaults.timeout=1e4;var o=a().create()},84584:function(e,n,t){t.d(n,{Jf:function(){return y},LQ:function(){return f},Nb:function(){return v},Xv:function(){return p},mo:function(){return h},nD:function(){return d},nU:function(){return x},w2:function(){return b}});var r=t(32723),a=t(34795),o=t(82434),i=t.n(o),c=t(76811),u=t(65873),s=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 v(e){return m.apply(this,arguments)}function m(){return(m=(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,i()(n)){e.next=3;break}return e.abrupt("return",!1);case 3:return e.next=5,s.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 g.apply(this,arguments)}function g(){return(g=(0,a.Z)((0,r.Z)().mark((function e(n){var t,a,o,c;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i()(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,s.hi.get(t,{timeout:5e3});case 6:return a=e.sent,o=a.status,c=a.data,e.abrupt("return",200===o&&(0,u.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 x(e){return k.apply(this,arguments)}function k(){return(k=(0,a.Z)((0,r.Z)().mark((function e(n){var t,a,o;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i()(n)){e.next=3;break}return e.abrupt("return","");case 3:return e.next=5,s.hi.head(n,{timeout:3e3});case 5:return t=e.sent,a=t.headers,o=a["x-space-name"],e.abrupt("return",o?decodeURIComponent(o):"");case 11:return e.prev=11,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return","");case 15:case"end":return e.stop()}}),e,null,[[0,11]])})))).apply(this,arguments)}function y(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/").at(-4);return l(n,"/api/space/nft/display?spaceDid=".concat(t))}},99875:function(e,n,t){var r=t(73408).default,a=t(27609).default,o=t(91461).default,i=t(43111).default;Object.defineProperty(n,"Z",{enumerable:!0,get:function(){return Z.default}});var c,u=t(35432),s=P(t(5855)),l=P(t(82434)),p=P(t(77247)),d=P(t(90049)),f=P(t(6352)),v=P(t(43681)),m=P(t(59408)),h=P(t(3257)),b=t(76811),g=t(49714),x=P(t(41365)),k=P(t(94874)),y=P(t(57156)),w=P(t(45239)),Z=P(t(72443)),j=P(t(1577));function P(e){return e&&e.__esModule?e:{default:e}}function S(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(!e)return"";var r="http";"https:"===window.location.protocol&&((0,g.isIpEcho)(e)||(0,g.isSlpDomain)(e)||(0,g.isDidDomain)(e))&&(r="https");var a="",o=Number(window.location.port);o&&![80,443].includes(o)&&(a=":".concat(o));var i=new URL("".concat(r,"://").concat(e).concat(a));i.pathname=n;var c=i.href.replace(/\/$/,"");if(!t||!Object.keys(t))return c;var u=new URLSearchParams;return Object.keys(t).forEach((function(e){u.append(e,t[e])})),"".concat(c).concat("/"===i.pathname?"/":"","?").concat(u.toString())}var D=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en";return"tw"===e?"zh":e};var _=function(e){return e.replace(/^\?/,"").split("&").map((function(e){return e.split("=")})).filter((function(e){return!!i(e,1)[0]})).reduce((function(e,n){var t=n[0],r=decodeURIComponent(n[1])||!0;return e[t]=r,e}),{})};var L=function(e,n){return n.startsWith("/assets")?n:"/assets/".concat(e,"/").concat(n)};var E=function(){var e=o(a().mark((function e(n){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,g.evaluateURLs)(n);case 3:return t=e.sent,e.abrupt("return",t[0].url);case 7:return e.prev=7,e.t0=e.catch(0),console.warn("get accessible url failed"),e.abrupt("return","");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(n){return e.apply(this,arguments)}}();function B(e){for(var n=decodeURIComponent(e);n!==decodeURIComponent(n);)n=decodeURIComponent(n);return n}function N(){return(N=o(a().mark((function e(n,t){var r,o;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,k.default.post((0,f.default)(n,"/api/gql/"),JSON.stringify({query:'{\n getAssetState(address: "'.concat(t,'") {\n state {\n address\n data {\n typeUrl\n value\n }\n issuer\n owner\n parent\n }\n }\n }')}),{headers:{"Content-Type":"application/json",Accept:"application/json"},timeout:6e4});case 2:return r=e.sent,(o=(0,v.default)(r.data,"data.getAssetState.state"))&&"json"===o.data.typeUrl&&(o.data.value=JSON.parse(o.data.value)),e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}null===(c=window.env)||void 0===c||c.groupPathPrefix,u.ROLES.ADMIN,u.ROLES.OWNER;var C=function(e){return!!e&&(e.endsWith(u.DEFAULT_DID_DOMAIN)||e.endsWith(u.DEFAULT_IP_DOMAIN_SUFFIX))};var I=function(){var e=o(a().mark((function e(n){var t,r,o,i,c,u,s,l,p,d,v,m;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.launcherUrl,r=void 0===t?"":t,o=n.nftId,i=void 0===o?"":o,c=n.locale,u=void 0===c?"en":c,r){e.next=3;break}return e.abrupt("return","");case 3:return s=(0,f.default)(r,"/instances"),e.prev=4,e.next=7,k.default.get((0,f.default)(r,"__blocklet__.js?type=json"),{timeout:5e3});case 7:p=e.sent,d=p.data,v=null===(l=d.componentMountPoints)||void 0===l?void 0:l.find((function(e){return"z8iZy4P83i6AgnNdNUexsh2kBcsDHoqcwPavn"===e.did})),m=new URL(r),s=(0,f.default)(m.origin,null===v||void 0===v?void 0:v.mountPoint,"/nfts"),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),console.error(e.t0);case 17:return e.abrupt("return",(0,f.default)(s,"/".concat(i,"/subscription?locale=").concat(u,"&return-url=").concat(encodeURIComponent(window.location.href))));case 18:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(n){return e.apply(this,arguments)}}()}}]);
|