@abtnode/blocklet-services 1.16.16-beta-d8a9fb09 → 1.16.16-beta-e038cde7

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.
Files changed (67) hide show
  1. package/api/index.js +1 -19
  2. package/build/asset-manifest.json +73 -75
  3. package/build/index.html +1 -1
  4. package/build/service-worker.js +1 -1
  5. package/build/service-worker.js.map +1 -1
  6. package/build/static/css/{7933.206451cb.chunk.css → 4706.7a92e9f9.chunk.css} +1 -1
  7. package/build/static/js/{1480.1bd9e744.chunk.js → 1480.30b94380.chunk.js} +2 -2
  8. package/build/static/js/{1565.7cd7dbe6.chunk.js → 1565.f0321c52.chunk.js} +2 -2
  9. package/build/static/js/{1660.99a83bd6.chunk.js → 1660.5c8ade93.chunk.js} +2 -2
  10. package/build/static/js/1760.95d0c320.chunk.js +2 -0
  11. package/build/static/js/2307.2e451912.chunk.js +2 -0
  12. package/build/static/js/{2393.77577cbe.chunk.js → 2393.c5bbedfd.chunk.js} +2 -2
  13. package/build/static/js/{2653.8a4cddb6.chunk.js → 2653.11a1ad57.chunk.js} +2 -2
  14. package/build/static/js/2686.07687254.chunk.js +2 -0
  15. package/build/static/js/{3595.1a588944.chunk.js → 3595.cbf763c8.chunk.js} +3 -3
  16. package/build/static/js/4042.3c8e0025.chunk.js +3 -0
  17. package/build/static/js/{1654.c1b500f3.chunk.js → 4420.55971847.chunk.js} +2 -2
  18. package/build/static/js/{7933.cc48ea3a.chunk.js → 4706.df5b600d.chunk.js} +3 -3
  19. package/build/static/js/{4716.16678b19.chunk.js → 4716.47aa133c.chunk.js} +2 -2
  20. package/build/static/js/476.1f6135d6.chunk.js +2 -0
  21. package/build/static/js/{4802.f624e01d.chunk.js → 4802.63425dd4.chunk.js} +2 -2
  22. package/build/static/js/5176.42904a22.chunk.js +2 -0
  23. package/build/static/js/{5628.bf14d522.chunk.js → 5628.773a32da.chunk.js} +2 -2
  24. package/build/static/js/6186.61596c22.chunk.js +2 -0
  25. package/build/static/js/6380.2b96be29.chunk.js +2 -0
  26. package/build/static/js/{6452.efb9ecb8.chunk.js → 6452.b1899621.chunk.js} +2 -2
  27. package/build/static/js/6465.e704f56b.chunk.js +3 -0
  28. package/build/static/js/6576.f78daf32.chunk.js +2 -0
  29. package/build/static/js/{6629.140fc148.chunk.js → 6629.36e61c26.chunk.js} +3 -3
  30. package/build/static/js/{6640.aa7594a6.chunk.js → 6640.53cdcb95.chunk.js} +2 -2
  31. package/build/static/js/{6737.e60eaf35.chunk.js → 6737.5f735a29.chunk.js} +2 -2
  32. package/build/static/js/{6856.ff481b63.chunk.js → 6856.e5c166e6.chunk.js} +2 -2
  33. package/build/static/js/7465.ba1027a7.chunk.js +3 -0
  34. package/build/static/js/8497.0cf2247d.chunk.js +2 -0
  35. package/build/static/js/8604.ad77a749.chunk.js +3 -0
  36. package/build/static/js/8706.3d16907a.chunk.js +2 -0
  37. package/build/static/js/{9409.8fa0e3ee.chunk.js → 9409.befe72b4.chunk.js} +2 -2
  38. package/build/static/js/941.6a4ed4dd.chunk.js +2 -0
  39. package/build/static/js/{9620.6ade2ff8.chunk.js → 9620.59bc85b8.chunk.js} +2 -2
  40. package/build/static/js/{9899.40ca0bf1.chunk.js → 9899.c8ff588e.chunk.js} +2 -2
  41. package/build/static/js/main.2ea1070b.js +3 -0
  42. package/package.json +22 -22
  43. package/build/static/js/1760.5a59e3d1.chunk.js +0 -2
  44. package/build/static/js/1980.ac2f4d0d.chunk.js +0 -2
  45. package/build/static/js/252.90214363.chunk.js +0 -3
  46. package/build/static/js/2686.04a60159.chunk.js +0 -2
  47. package/build/static/js/3453.b9bc1ad3.chunk.js +0 -2
  48. package/build/static/js/4461.d7dcfc2f.chunk.js +0 -2
  49. package/build/static/js/4900.67846de7.chunk.js +0 -2
  50. package/build/static/js/5176.5062c9df.chunk.js +0 -2
  51. package/build/static/js/5848.975c7f48.chunk.js +0 -2
  52. package/build/static/js/617.ecc73170.chunk.js +0 -3
  53. package/build/static/js/6186.0e9ccdee.chunk.js +0 -2
  54. package/build/static/js/6921.c8dd265b.chunk.js +0 -2
  55. package/build/static/js/7310.a1c91f37.chunk.js +0 -2
  56. package/build/static/js/7465.36f5103d.chunk.js +0 -3
  57. package/build/static/js/861.e0fca2ec.chunk.js +0 -2
  58. package/build/static/js/9260.333b6bd4.chunk.js +0 -3
  59. package/build/static/js/main.b48e7af6.js +0 -3
  60. /package/build/static/js/{3595.1a588944.chunk.js.LICENSE.txt → 3595.cbf763c8.chunk.js.LICENSE.txt} +0 -0
  61. /package/build/static/js/{9260.333b6bd4.chunk.js.LICENSE.txt → 4042.3c8e0025.chunk.js.LICENSE.txt} +0 -0
  62. /package/build/static/js/{7933.cc48ea3a.chunk.js.LICENSE.txt → 4706.df5b600d.chunk.js.LICENSE.txt} +0 -0
  63. /package/build/static/js/{617.ecc73170.chunk.js.LICENSE.txt → 6465.e704f56b.chunk.js.LICENSE.txt} +0 -0
  64. /package/build/static/js/{6629.140fc148.chunk.js.LICENSE.txt → 6629.36e61c26.chunk.js.LICENSE.txt} +0 -0
  65. /package/build/static/js/{7465.36f5103d.chunk.js.LICENSE.txt → 7465.ba1027a7.chunk.js.LICENSE.txt} +0 -0
  66. /package/build/static/js/{252.90214363.chunk.js.LICENSE.txt → 8604.ad77a749.chunk.js.LICENSE.txt} +0 -0
  67. /package/build/static/js/{main.b48e7af6.js.LICENSE.txt → main.2ea1070b.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
- (self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[1654],{56552:function(n,e,t){"use strict";t.d(e,{Z:function(){return c}});var i=t(33028),r=t(33665),o=t(29996),a=t(37574);function c(n){var e=Object.assign({},((0,r.Z)(n),n));return(0,a.jsx)(o.Z,(0,i.Z)({className:"bottom-button",variant:"contained",color:"primary"},e))}},91654:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return K}});var i,r=t(32723),o=t(59740),a=t(34795),c=t(68079),l=t(33028),s=t(96234),u=t(30969),d=t(88674),p=t.n(d),f=t(12700),m=t.n(f),h=t(43260),x=t.n(h),g=t(38361),v=t(75255),b=t(26022),Z=t(8016),y=t(94984),w=t(71171),k=t(16380),j=t(24974),C=t.n(j),P=t(37574);function T(n){var e=n.children,t=n.bottom,i=n.onBottomFix,r=(0,u.useRef)(null),o=(0,u.useRef)(null),a=(0,u.useRef)(null),c=(0,u.useRef)(null),l=(0,u.useState)(!1),d=(0,s.Z)(l,2),p=d[0],f=d[1];return(0,u.useEffect)((function(){var n,e,t=function(){n||(n=setTimeout((function(){o.current&&(o.current.scrollHeight>r.current.clientHeight-a.current.clientHeight?("fix"!==c.current&&(i("fix"),c.current="fix"),f(!0)):("scroll"!==c.current&&(i("scroll"),c.current="scroll"),f(!1))),n=null}),50))};return window.ResizeObserver?e=new ResizeObserver(t):window.addEventListener("resize",t),e.observe(r.current),e.observe(o.current),function(){e?e.disconnect():window.removeEventListener("resize",t),n&&clearTimeout(n)}}),[i]),(0,P.jsxs)(N,{ref:r,className:"".concat(p?"scroll-mode":""),children:[(0,P.jsx)("div",{className:"compact-context",ref:o,children:e}),(0,P.jsx)("div",{className:"fix-container",ref:a,children:t})]})}var N=k.Z.div(i||(i=(0,w.Z)(["\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n animation: fadein ease 0.5s;\n\n .fix-container {\n margin-top: auto;\n width: 100%;\n }\n\n &.scroll-mode {\n .compact-context {\n flex: 1;\n overflow-y: auto;\n }\n .fix-container {\n margin-top: auto;\n flex-shrink: 0;\n }\n }\n\n @keyframes fadein {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n"])));T.propTypes={children:C().any,bottom:C().element.isRequired,onBottomFix:C().func},T.defaultProps={children:[],onBottomFix:function(){}};var _=T,L=t(99398),E=t(7017),O=t(59505),R=t(64864),B=t(62975),I=t(96699),S=t(56552),z=["childDid"],D=["value"];function K(n){var e=n.onNext,t=n.onPrevious,i=(0,v.Z)((function(n){return n.breakpoints.down("md")})),d=(0,b.PE)().t,f=(0,u.useState)(!1),h=(0,s.Z)(f,2),w=h[0],k=h[1],j=(0,u.useState)(null),C=(0,s.Z)(j,2),T=C[0],N=C[1],K=(0,R.y0)(),A=K.blocklet,F=K.actions,q=(A.configs||[]).filter((function(n){return!O.BLOCKLET_CONFIGURABLE_KEY[n.key]})),M=A.environments.find((function(n){return"BLOCKLET_PASSPORT_COLOR"===n.key})),G=[{key:O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_NAME,description:d("blocklet.config.name"),value:A.environments.find((function(n){return"BLOCKLET_APP_NAME"===n.key})).value},{key:O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_DESCRIPTION,description:d("blocklet.config.description"),value:A.environments.find((function(n){return"BLOCKLET_APP_DESCRIPTION"===n.key})).value},{key:O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR,description:d("blocklet.config.passportColor"),value:M?M.value:"auto",componentType:"passport",componentProps:{blocklet:A}}],V=[];(0,E.forEachChildSync)(A,(function(n,e){var t=e.ancestors.slice(1).map((function(n){return n.meta.did}));V.push((n.configs||[]).map((function(e){return(0,l.Z)((0,l.Z)({},e),{},{childDid:t.concat(n.meta.did)})})))})),A.meta.group===O.BlockletGroup.gateway&&(q=q.filter((function(n){return!n.secure&&n.shared})));var Y=m()(x()([].concat((0,c.Z)(q),V)),"key").filter((function(n){return!!n.key})).sort((function(n,e){return n.required&&!e.required?-1:e.required&&!n.required?1:0})),H=(0,E.getAppMissingConfigs)(A).length,U=function(){var n=(0,a.Z)((0,r.Z)().mark((function n(e){var t,i,a;return(0,r.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=T.childDid,i=(0,o.Z)(T,z),a=[(0,l.Z)((0,l.Z)({},p()(i,["componentType","componentProps"])),{},{value:e})],n.prev=2,k(!0),n.next=6,F.configBlocklet({configs:a,childDid:t});case 6:n.next=11;break;case 8:n.prev=8,n.t0=n.catch(2),y.Z.error(n.t0.message);case 11:return n.prev=11,k(!1),n.finish(11);case 14:case"end":return n.stop()}}),n,null,[[2,8,11,14]])})));return function(e){return n.apply(this,arguments)}}(),W={},J=[].concat(G,(0,c.Z)(Y)).map((function(n){var e=n.value,t=(0,o.Z)(n,D);return W[n.key]=e,(0,l.Z)({},t)}));return(0,P.jsxs)(B.Z,{children:[(0,P.jsx)("div",{className:"header",style:{marginBottom:16},children:(0,P.jsx)(L.Z,{title:d("setup.config.title"),subTitle:d("setup.config.subTitle"),onClickBack:function(){t()}})}),(0,P.jsx)("div",{className:"container-main",children:(0,P.jsx)("div",{className:"container-inner",children:(0,P.jsx)(_,{bottom:(0,P.jsx)(I.Z,{mt:8,disabled:w||T,blocklet:A,onStartNow:function(){return e("complete")},children:(0,P.jsx)(g.Z,{display:"flex",alignItems:"center",children:(0,P.jsx)(S.Z,{variant:"outlined",disabled:w||H||T,onClick:function(){F.refreshFuel({showError:!1}),e()},children:d("setup.next")})})}),children:(0,P.jsx)(Z.Z,{style:{margin:"0 auto 20px",paddingTop:i?0:38},loading:w,schema:J,defaultValue:W,onChange:function(n,e){var t=e.action,i=e.currentItem;"edit"===t?N(i):["cancel","confirm"].includes(t)&&N(null),"confirm"===t&&U(n[i.key])}})})})})]})}K.defaultProps={onNext:function(){},onPrevious:function(){}}},62975:function(n,e,t){"use strict";t.d(e,{Z:function(){return h}});var i,r=t(71171),o=t(16380),a=t(33028),c=t(59740),l=t(24974),s=t.n(l),u=t(37574),d=["children"];function p(n){var e=n.children,t=(0,c.Z)(n,d);return(0,u.jsx)(m,(0,a.Z)((0,a.Z)({},t),{},{children:e}))}p.propTypes={children:s().any.isRequired};var f,m=o.Z.div(i||(i=(0,r.Z)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n height: 100%;\n\n .header {\n text-align: center;\n }\n\n .body {\n display: flex;\n flex-direction: column;\n align-items: center;\n margin-top: 30px;\n width: 100%;\n min-height: 200px;\n flex: 1;\n\n "," {\n padding: 24px;\n }\n\n "," {\n padding: 0 16px 16px;\n }\n }\n\n .footer {\n display: flex;\n justify-content: center;\n\n "," {\n padding-bottom: 34px;\n }\n\n "," {\n margin-top: auto;\n padding-bottom: 10px;\n }\n }\n"])),(function(n){return n.theme.breakpoints.up("md")}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.breakpoints.up("sm")}),(function(n){return n.theme.breakpoints.down("md")})),h=(0,o.Z)(p)(f||(f=(0,r.Z)(["\n display: flex;\n flex-direction: column;\n padding-bottom: 16px;\n "," {\n padding-top: 34px;\n padding-bottom: 34px;\n }\n .header {\n width: 100%;\n margin-bottom: 34px;\n "," {\n margin-bottom: 64px;\n }\n }\n .container-main {\n position: relative;\n flex: 1;\n width: 100%;\n }\n .container-inner {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n overflow-y: auto;\n }\n"])),(function(n){return n.theme.breakpoints.up("md")}),(function(n){return n.theme.breakpoints.up("md")}))},96699:function(n,e,t){"use strict";t.d(e,{Z:function(){return p}});var i,r,o=t(71171),a=t(16380),c=t(38361),l=t(26022),s=t(29996),u=t(38507),d=t(37574);function p(n){var e=n.blocklet,t=n.onStartNow,i=n.children,r=n.disabled,o=(0,l.PE)().t;return!e||(0,u.bg)(e.meta)?(0,d.jsx)(f,{children:i}):(0,d.jsxs)(m,{children:[(0,d.jsx)(s.Z,{className:"start-now",variant:"contained",color:"primary",disabled:r,onClick:function(){return t()},children:o("setup.startNow")}),(0,d.jsx)(c.Z,{display:"flex",alignItems:"center",children:i})]})}p.defaultProps={blocklet:null,onStartNow:function(){},children:null,disabled:!1};var f=(0,a.Z)(c.Z)(i||(i=(0,o.Z)(["\n padding-top: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n .bottom-button {\n min-width: 200px;\n }\n "," {\n .bottom-button {\n min-width: 150px;\n }\n }\n"])),(function(n){return n.theme.breakpoints.down("md")})),m=(0,a.Z)(c.Z)(r||(r=(0,o.Z)(["\n padding-bottom: 48px;\n padding-top: 24px;\n margin: 0 auto;\n width: 80%;\n display: flex;\n align-items: center;\n justify-content: space-around;\n .start-now {\n min-width: 140px;\n }\n .bottom-button {\n min-width: 120px;\n }\n "," {\n width: 100%;\n }\n\n "," {\n .start-now {\n min-width: 100px;\n }\n .bottom-button {\n min-width: 80px;\n }\n }\n"])),(function(n){return n.theme.breakpoints.down("lg")}),(function(n){return n.theme.breakpoints.down("md")}))},28412:function(n,e,t){"use strict";var i,r=t(71171),o=t(16380),a=t(38361);e.Z=(0,o.Z)(a.Z)(i||(i=(0,r.Z)(["\n width: 100%;\n flex-grow: 1;\n overflow-y: auto;\n "," {\n width: 100%;\n flex-shrink: 0;\n padding: 0 24px;\n transform: translate(0, 0);\n /* max-height: 60vh; */\n }\n\n .form-item {\n width: 100%;\n margin-bottom: 24px;\n position: relative;\n "," {\n flex-wrap: wrap;\n justify-content: space-between;\n width: 100%;\n flex-shrink: 0;\n }\n }\n\n .form-item-body {\n display: flex;\n align-items: center;\n width: 100%;\n margin-top: 4px;\n }\n\n .form-item-label {\n line-height: 1.2;\n font-size: 14px;\n color: #888;\n font-weight: bold;\n\n "," {\n text-align: left;\n width: auto;\n flex-grow: 1;\n }\n }\n\n .form-item-input {\n flex-grow: 1;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n &.slot {\n height: 40px;\n line-height: 40px;\n background: #f8f8f8;\n font-size: 16px;\n\n .MuiChip-root {\n margin-top: -4px;\n }\n }\n\n .MuiSelect-select {\n padding: 8px;\n }\n }\n\n .form-item-action {\n // width: 100px;\n text-align: left;\n margin-left: 12px;\n flex-shrink: 0;\n "," {\n width: auto;\n margin-left: 0px;\n }\n .MuiIconButton-root {\n padding: 8px;\n svg {\n fill: #888;\n }\n &.Mui-disabled {\n opacity: 0.4;\n }\n }\n }\n"])),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.breakpoints.down("md")}))},14458:function(n,e,t){"use strict";var i,r=t(71171),o=t(16380).Z.span(i||(i=(0,r.Z)(["\n color: ",";\n &::before {\n content: '*';\n }\n"])),(function(n){return n.theme.palette.error.main}));e.Z=o},8016:function(n,e,t){"use strict";t.d(e,{Z:function(){return I}});var i=t(71171),r=t(56666),o=t(33028),a=t(96234),c=t(30969),l=t(24974),s=t.n(l),u=t(16380),d=t(38361),p=t(1484),f=t(88581),m=t(27724),h=t(94551),x=t(94308),g=t(83176),v=t(98545),b={description:s().string,editing:s().bool,onChange:s().func,required:s().bool,value:s().any,componentProps:s().object,render:s().func,renderFormItem:s().func},Z=t(37574);function y(n){var e=n.editing,t=n.value,i=n.onChange,r=(0,c.useState)(!1),o=(0,a.Z)(r,2),l=o[0],s=o[1],u=(0,c.useRef)(),p=(0,c.useRef)(t);(0,c.useEffect)((function(){var n=null;return e&&(n=setTimeout((function(){s(!0)}),50)),function(){clearTimeout(n)}}),[e]);var f=function(n){p.current=n,i(n)},m=(0,Z.jsx)(d.Z,{className:"form-item-input slot",px:1,children:(0,Z.jsxs)(d.Z,{display:"flex",alignItems:"center",children:[t,"auto"!==t&&(0,Z.jsx)("div",{style:{marginLeft:4,backgroundColor:t,width:"1em",height:"1em",borderRadius:"0.2em"}})]})}),h=(0,Z.jsxs)(d.Z,{display:"flex",flexGrow:1,alignItems:"center",height:"40px",onKeyDown:function(){s(!1),i(p.current)},children:[(0,Z.jsx)(d.Z,{display:"flex",alignItems:"center",onClick:function(){return s(!0)},children:(0,Z.jsx)("div",{ref:u,style:{flexShrink:0,marginLeft:"8px",backgroundColor:t,width:"32px",height:"32px",boxSizing:"border-box",borderRadius:"8px",border:"1px solid #eee",cursor:"auto"===t?"default":"pointer"}})}),(0,Z.jsx)(g.ZP,{open:l,anchorEl:u.current,onClose:function(){return s(!1)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:(0,Z.jsx)(v.AI,{color:t,onChange:function(n){return f(n.hex)}})})]});return e?h:m}y.propTypes=b;var w=t(59740),k=t(87006),j=["editing","description","value","onChange","componentProps"];function C(n){var e=n.editing,t=n.description,i=n.value,r=n.onChange,a=n.componentProps,l=(0,w.Z)(n,j),s=a.placeholder,u=(0,c.useRef)(i),p=function(n){u.current=n,r(n)};return e?(0,Z.jsx)(k.Z,(0,o.Z)({style:{flex:1},fullWidth:!0,value:i,onChange:function(n){n.persist(),p(n.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:t||s,onKeyDown:function(n){"Enter"===n.key&&r(u.current,"confirm")}},l)):(0,Z.jsx)(d.Z,{px:1,className:"form-item-input slot",children:i})}C.propTypes=b,C.defaultProps={componentProps:{}};var P=t(52469),T=t.n(P),N=t(84938),_=t(7017),L=["editing","value","onChange","componentProps"];function E(n){var e=n.editing,t=n.value,i=n.onChange,r=n.componentProps,a=(0,w.Z)(n,L),c=r.blocklet,l="auto"===t?(0,N.getPassportColorFromDid)(c.appDid):t;return(0,Z.jsxs)(d.Z,{display:"flex",alignItems:"center",children:[(0,Z.jsx)("div",{style:{width:96,marginRight:12},dangerouslySetInnerHTML:{__html:T()({title:"Owner",issuer:(0,_.getDisplayName)(c),issuerDid:c.appDid,ownerName:"Your Name",ownerDid:c.appDid,preferredColor:t||"auto"})}}),(0,Z.jsx)(y,(0,o.Z)((0,o.Z)({},a),{},{editing:e,value:e?l:t,onChange:i,componentProps:r}))]})}E.propTypes=(0,o.Z)((0,o.Z)({},b),{},{componentProps:s().shape({blocklet:s().object.isRequired}).isRequired}),E.defaultProps={};var O,R=t(14458),B=t(28412);function I(n){var e=n.schema,t=n.loading,i=n.value,l=n.defaultValue,s=n.onChange,u=n.style,g=n.disabled,v="[object Object]"===Object.prototype.toString.call(i),b=(0,c.useState)(null),w=(0,a.Z)(b,2),k=w[0],j=w[1],P=(0,c.useState)(v?i:l),T=(0,a.Z)(P,2),N=T[0],_=T[1],L=(0,c.useRef)();function O(n,e,t){var i=n.key,a=n.secure,c=N[i]!==e,l=(0,o.Z)((0,o.Z)({},N),{},(0,r.Z)({},i,e));c&&_(l),s((0,r.Z)({},i,e),{allValues:l,action:t,currentItem:n}),"confirm"===t&&a&&_((0,o.Z)((0,o.Z)({},N),{},(0,r.Z)({},i,"__encrypted__"))),["confirm","cancel"].includes(t)?B(null):B(n)}function B(n){if(n)return L.current=N[n.key],void j(n);L.current=null,j(null)}return(0,Z.jsx)(S,{className:"form",style:u,children:null===e||void 0===e?void 0:e.map((function(n){var e=n.key,r=n.description,a=n.required,c=n.hidden,l=void 0!==c&&c,s=n.componentProps,u=void 0===s?{}:s;if(l)return null;var b=!(!k||e!==k.key),w=function(n,e){var t=e.editing,r=void 0!==t&&t,o=n.key,a=v?i[o]:N[o];return"__encrypted__"===a?r?"":"******":a}(n,{editing:b}),j=function(n,e){var t=e.editing,i=void 0!==t&&t,r=n.componentType,o=void 0===r?"input":r,a=n.render,c=n.renderFormItem;return i&&c?c:!i&&a?a:{input:C,color:y,passport:E}[null===o||void 0===o?void 0:o.toLowerCase()]}(n,{editing:b}),P={inputProps:{"data-cy":"schema-form-item-component"},key:e,description:r,editing:b,value:w,onChange:function(e){return O(n,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"change")},componentProps:u};return(0,Z.jsxs)(d.Z,{className:"form-item",children:[(0,Z.jsxs)(d.Z,{className:"form-item-label",style:{color:a&&!w?"#ff0000":"#333"},children:[r,a&&(0,Z.jsx)(R.Z,{})]}),(0,Z.jsxs)(d.Z,{className:"form-item-body",children:[(0,Z.jsx)(d.Z,{className:"form-item-input",children:(0,Z.jsx)(j,(0,o.Z)({},P))}),(0,Z.jsx)(d.Z,{className:"form-item-action",children:b?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(h.Z,{"data-cy":"schema-form-item-confirm",onClick:function(){O(n,w,"confirm")},disabled:g||t,size:"large",children:t?(0,Z.jsx)(x.Z,{size:24}):(0,Z.jsx)(m.Z,{})}),(0,Z.jsx)(h.Z,{"data-cy":"schema-form-item-cancel",onClick:function(){O(n,L.current,"cancel")},disabled:g||t,size:"large",children:(0,Z.jsx)(f.default,{})})]}):(0,Z.jsx)(h.Z,{"data-cy":"schema-form-item-edit",onClick:function(){O(n,N[e],"edit")},disabled:g||k,size:"large",children:(0,Z.jsx)(p.Z,{})})})]})]},e)}))})}I.propTypes={schema:s().array.isRequired,loading:s().bool,onChange:s().func.isRequired,value:s().object,defaultValue:s().object,style:s().object,disabled:s().bool},I.defaultProps={loading:!1,value:void 0,defaultValue:{},style:{},disabled:!1};var S=(0,u.Z)(B.Z)(O||(O=(0,i.Z)([""])))},99398:function(n,e,t){"use strict";var i,r=t(71171),o=t(33028),a=t(59740),c=t(16380),l=t(24974),s=t.n(l),u=t(15405),d=t(37574),p=["title","subTitle","onClickBack"];function f(n){var e=n.title,t=n.subTitle,i=n.onClickBack,r=(0,a.Z)(n,p);return(0,d.jsxs)(m,(0,o.Z)((0,o.Z)({},r),{},{children:[i&&(0,d.jsx)(u.Z,{className:"back-btn",onClick:i}),(0,d.jsx)("div",{className:"title",children:e}),(0,d.jsx)("div",{className:"sub-title",children:t})]}))}var m=c.Z.div(i||(i=(0,r.Z)(["\n position: relative;\n width: 100%;\n text-align: center;\n\n .title {\n font-size: 24px;\n font-weight: 700;\n color: ",";\n\n "," {\n font-size: 20px;\n }\n }\n\n .sub-title {\n font-size: 14px;\n color: ",";\n padding: 0 14px;\n font-weight: 400;\n }\n\n .back-btn {\n position: absolute;\n left: 0;\n top: 8px;\n color: #9397a1;\n font-size: 18px;\n cursor: pointer;\n }\n"])),(function(n){return n.theme.palette.common.black}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.palette.grey[600]}));e.Z=f,f.propTypes={title:s().string,subTitle:s().string,onClickBack:s().oneOfType([s().func,s().string])},f.defaultProps={title:"",subTitle:"",onClickBack:""}},15405:function(n,e,t){"use strict";var i=t(71600);e.Z=void 0;var r=i(t(48035)),o=t(37574),a=(0,r.default)((0,o.jsx)("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}),"ArrowBackIos");e.Z=a},27724:function(n,e,t){"use strict";var i=t(71600);e.Z=void 0;var r=i(t(48035)),o=t(37574),a=(0,r.default)((0,o.jsx)("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}),"Done");e.Z=a},12700:function(n,e,t){var i=t(48311),r=t(53970);n.exports=function(n,e){return n&&n.length?r(n,i(e,2)):[]}},33665:function(n,e,t){"use strict";function i(n){if(null==n)throw new TypeError("Cannot destructure "+n)}t.d(e,{Z:function(){return i}})}}]);
2
- //# sourceMappingURL=1654.c1b500f3.chunk.js.map
1
+ (self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[4420],{56552:function(n,e,t){"use strict";t.d(e,{Z:function(){return a}});var i=t(33028),r=t(33665),o=t(29996),c=t(37574);function a(n){var e=Object.assign({},((0,r.Z)(n),n));return(0,c.jsx)(o.Z,(0,i.Z)({className:"bottom-button",variant:"contained",color:"primary"},e))}},91654:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return K}});var i,r=t(32723),o=t(59740),c=t(34795),a=t(68079),l=t(33028),s=t(96234),u=t(30969),d=t(88674),f=t.n(d),p=t(12700),m=t.n(p),h=t(43260),x=t.n(h),g=t(38361),v=t(75255),b=t(26022),Z=t(8016),y=t(94984),w=t(71171),k=t(16380),j=t(24974),C=t.n(j),P=t(37574);function T(n){var e=n.children,t=n.bottom,i=n.onBottomFix,r=(0,u.useRef)(null),o=(0,u.useRef)(null),c=(0,u.useRef)(null),a=(0,u.useRef)(null),l=(0,u.useState)(!1),d=(0,s.Z)(l,2),f=d[0],p=d[1];return(0,u.useEffect)((function(){var n,e,t=function(){n||(n=setTimeout((function(){o.current&&(o.current.scrollHeight>r.current.clientHeight-c.current.clientHeight?("fix"!==a.current&&(i("fix"),a.current="fix"),p(!0)):("scroll"!==a.current&&(i("scroll"),a.current="scroll"),p(!1))),n=null}),50))};return window.ResizeObserver?e=new ResizeObserver(t):window.addEventListener("resize",t),e.observe(r.current),e.observe(o.current),function(){e?e.disconnect():window.removeEventListener("resize",t),n&&clearTimeout(n)}}),[i]),(0,P.jsxs)(N,{ref:r,className:"".concat(f?"scroll-mode":""),children:[(0,P.jsx)("div",{className:"compact-context",ref:o,children:e}),(0,P.jsx)("div",{className:"fix-container",ref:c,children:t})]})}var N=k.Z.div(i||(i=(0,w.Z)(["\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n animation: fadein ease 0.5s;\n\n .fix-container {\n margin-top: auto;\n width: 100%;\n }\n\n &.scroll-mode {\n .compact-context {\n flex: 1;\n overflow-y: auto;\n }\n .fix-container {\n margin-top: auto;\n flex-shrink: 0;\n }\n }\n\n @keyframes fadein {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n"])));T.propTypes={children:C().any,bottom:C().element.isRequired,onBottomFix:C().func},T.defaultProps={children:[],onBottomFix:function(){}};var _=T,L=t(99398),E=t(7017),O=t(59505),R=t(64864),B=t(62975),I=t(96699),S=t(56552),z=["childDid"],D=["value"];function K(n){var e=n.onNext,t=n.onPrevious,i=(0,v.Z)((function(n){return n.breakpoints.down("md")})),d=(0,b.PE)().t,p=(0,u.useState)(!1),h=(0,s.Z)(p,2),w=h[0],k=h[1],j=(0,u.useState)(null),C=(0,s.Z)(j,2),T=C[0],N=C[1],K=(0,R.y0)(),A=K.blocklet,F=K.actions,q=(A.configs||[]).filter((function(n){return!O.BLOCKLET_CONFIGURABLE_KEY[n.key]})),M=A.environments.find((function(n){return"BLOCKLET_PASSPORT_COLOR"===n.key})),G=[{key:O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_NAME,description:d("blocklet.config.name"),value:A.environments.find((function(n){return"BLOCKLET_APP_NAME"===n.key})).value},{key:O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_DESCRIPTION,description:d("blocklet.config.description"),value:A.environments.find((function(n){return"BLOCKLET_APP_DESCRIPTION"===n.key})).value},{key:O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR,description:d("blocklet.config.passportColor"),value:M?M.value:"auto",componentType:"passport",componentProps:{blocklet:A}}],V=[];(0,E.forEachChildSync)(A,(function(n,e){var t=e.ancestors.slice(1).map((function(n){return n.meta.did}));V.push((n.configs||[]).map((function(e){return(0,l.Z)((0,l.Z)({},e),{},{childDid:t.concat(n.meta.did)})})))})),A.meta.group===O.BlockletGroup.gateway&&(q=q.filter((function(n){return!n.secure&&n.shared})));var Y=m()(x()([].concat((0,a.Z)(q),V)),"key").filter((function(n){return!!n.key})).sort((function(n,e){return n.required&&!e.required?-1:e.required&&!n.required?1:0})),H=(0,E.getAppMissingConfigs)(A).length,U=function(){var n=(0,c.Z)((0,r.Z)().mark((function n(e){var t,i,c;return(0,r.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=T.childDid,i=(0,o.Z)(T,z),c=[(0,l.Z)((0,l.Z)({},f()(i,["componentType","componentProps"])),{},{value:e})],n.prev=2,k(!0),n.next=6,F.configBlocklet({configs:c,childDid:t});case 6:n.next=11;break;case 8:n.prev=8,n.t0=n.catch(2),y.Z.error(n.t0.message);case 11:return n.prev=11,k(!1),n.finish(11);case 14:case"end":return n.stop()}}),n,null,[[2,8,11,14]])})));return function(e){return n.apply(this,arguments)}}(),W={},J=[].concat(G,(0,a.Z)(Y)).map((function(n){var e=n.value,t=(0,o.Z)(n,D);return W[n.key]=e,(0,l.Z)({},t)}));return(0,P.jsxs)(B.Z,{children:[(0,P.jsx)("div",{className:"header",style:{marginBottom:16},children:(0,P.jsx)(L.Z,{title:d("setup.config.title"),subTitle:d("setup.config.subTitle"),onClickBack:function(){t()}})}),(0,P.jsx)("div",{className:"container-main",children:(0,P.jsx)("div",{className:"container-inner",children:(0,P.jsx)(_,{bottom:(0,P.jsx)(I.Z,{mt:8,disabled:w||T,blocklet:A,onStartNow:function(){return e("complete")},children:(0,P.jsx)(g.Z,{display:"flex",alignItems:"center",children:(0,P.jsx)(S.Z,{variant:"outlined",disabled:w||H||T,onClick:function(){F.refreshFuel({showError:!1}),e()},children:d("setup.next")})})}),children:(0,P.jsx)(Z.Z,{style:{margin:"0 auto 20px",paddingTop:i?0:38},loading:w,schema:J,defaultValue:W,onChange:function(n,e){var t=e.action,i=e.currentItem;"edit"===t?N(i):["cancel","confirm"].includes(t)&&N(null),"confirm"===t&&U(n[i.key])}})})})})]})}K.defaultProps={onNext:function(){},onPrevious:function(){}}},62975:function(n,e,t){"use strict";t.d(e,{Z:function(){return h}});var i,r=t(71171),o=t(16380),c=t(33028),a=t(59740),l=t(24974),s=t.n(l),u=t(37574),d=["children"];function f(n){var e=n.children,t=(0,a.Z)(n,d);return(0,u.jsx)(m,(0,c.Z)((0,c.Z)({},t),{},{children:e}))}f.propTypes={children:s().any.isRequired};var p,m=o.Z.div(i||(i=(0,r.Z)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n height: 100%;\n\n .header {\n text-align: center;\n }\n\n .body {\n display: flex;\n flex-direction: column;\n align-items: center;\n margin-top: 30px;\n width: 100%;\n min-height: 200px;\n flex: 1;\n\n "," {\n padding: 24px;\n }\n\n "," {\n padding: 0 16px 16px;\n }\n }\n\n .footer {\n display: flex;\n justify-content: center;\n\n "," {\n padding-bottom: 34px;\n }\n\n "," {\n margin-top: auto;\n padding-bottom: 10px;\n }\n }\n"])),(function(n){return n.theme.breakpoints.up("md")}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.breakpoints.up("sm")}),(function(n){return n.theme.breakpoints.down("md")})),h=(0,o.Z)(f)(p||(p=(0,r.Z)(["\n display: flex;\n flex-direction: column;\n padding-bottom: 16px;\n "," {\n padding-top: 34px;\n padding-bottom: 34px;\n }\n .header {\n width: 100%;\n margin-bottom: 34px;\n "," {\n margin-bottom: 64px;\n }\n }\n .container-main {\n position: relative;\n flex: 1;\n width: 100%;\n }\n .container-inner {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n overflow-y: auto;\n }\n"])),(function(n){return n.theme.breakpoints.up("md")}),(function(n){return n.theme.breakpoints.up("md")}))},96699:function(n,e,t){"use strict";t.d(e,{Z:function(){return f}});var i,r,o=t(71171),c=t(16380),a=t(38361),l=t(26022),s=t(29996),u=t(38507),d=t(37574);function f(n){var e=n.blocklet,t=n.onStartNow,i=n.children,r=n.disabled,o=(0,l.PE)().t;return!e||(0,u.bg)(e.meta)?(0,d.jsx)(p,{children:i}):(0,d.jsxs)(m,{children:[(0,d.jsx)(s.Z,{className:"start-now",variant:"contained",color:"primary",disabled:r,onClick:function(){return t()},children:o("setup.startNow")}),(0,d.jsx)(a.Z,{display:"flex",alignItems:"center",children:i})]})}f.defaultProps={blocklet:null,onStartNow:function(){},children:null,disabled:!1};var p=(0,c.Z)(a.Z)(i||(i=(0,o.Z)(["\n padding-top: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n .bottom-button {\n min-width: 200px;\n }\n "," {\n .bottom-button {\n min-width: 150px;\n }\n }\n"])),(function(n){return n.theme.breakpoints.down("md")})),m=(0,c.Z)(a.Z)(r||(r=(0,o.Z)(["\n padding-bottom: 48px;\n padding-top: 24px;\n margin: 0 auto;\n width: 80%;\n display: flex;\n align-items: center;\n justify-content: space-around;\n .start-now {\n min-width: 140px;\n }\n .bottom-button {\n min-width: 120px;\n }\n "," {\n width: 100%;\n }\n\n "," {\n .start-now {\n min-width: 100px;\n }\n .bottom-button {\n min-width: 80px;\n }\n }\n"])),(function(n){return n.theme.breakpoints.down("lg")}),(function(n){return n.theme.breakpoints.down("md")}))},28412:function(n,e,t){"use strict";var i,r=t(71171),o=t(16380),c=t(38361);e.Z=(0,o.Z)(c.Z)(i||(i=(0,r.Z)(["\n width: 100%;\n flex-grow: 1;\n overflow-y: auto;\n "," {\n width: 100%;\n flex-shrink: 0;\n padding: 0 24px;\n transform: translate(0, 0);\n /* max-height: 60vh; */\n }\n\n .form-item {\n width: 100%;\n margin-bottom: 24px;\n position: relative;\n "," {\n flex-wrap: wrap;\n justify-content: space-between;\n width: 100%;\n flex-shrink: 0;\n }\n }\n\n .form-item-body {\n display: flex;\n align-items: center;\n width: 100%;\n margin-top: 4px;\n }\n\n .form-item-label {\n line-height: 1.2;\n font-size: 14px;\n color: #888;\n font-weight: bold;\n\n "," {\n text-align: left;\n width: auto;\n flex-grow: 1;\n }\n }\n\n .form-item-input {\n flex-grow: 1;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n &.slot {\n height: 40px;\n line-height: 40px;\n background: #f8f8f8;\n font-size: 16px;\n\n .MuiChip-root {\n margin-top: -4px;\n }\n }\n\n .MuiSelect-select {\n padding: 8px;\n }\n }\n\n .form-item-action {\n // width: 100px;\n text-align: left;\n margin-left: 12px;\n flex-shrink: 0;\n "," {\n width: auto;\n margin-left: 0px;\n }\n .MuiIconButton-root {\n padding: 8px;\n svg {\n fill: #888;\n }\n &.Mui-disabled {\n opacity: 0.4;\n }\n }\n }\n"])),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.breakpoints.down("md")}))},14458:function(n,e,t){"use strict";var i,r=t(71171),o=t(16380).Z.span(i||(i=(0,r.Z)(["\n color: ",";\n &::before {\n content: '*';\n }\n"])),(function(n){return n.theme.palette.error.main}));e.Z=o},8016:function(n,e,t){"use strict";t.d(e,{Z:function(){return I}});var i=t(71171),r=t(56666),o=t(33028),c=t(96234),a=t(30969),l=t(24974),s=t.n(l),u=t(16380),d=t(38361),f=t(1484),p=t(88581),m=t(27724),h=t(94551),x=t(94308),g=t(83176),v=t(98545),b={description:s().string,editing:s().bool,onChange:s().func,required:s().bool,value:s().any,componentProps:s().object,render:s().func,renderFormItem:s().func},Z=t(37574);function y(n){var e=n.editing,t=n.value,i=n.onChange,r=(0,a.useState)(!1),o=(0,c.Z)(r,2),l=o[0],s=o[1],u=(0,a.useRef)(),f=(0,a.useRef)(t);(0,a.useEffect)((function(){var n=null;return e&&(n=setTimeout((function(){s(!0)}),50)),function(){clearTimeout(n)}}),[e]);var p=function(n){f.current=n,i(n)},m=(0,Z.jsx)(d.Z,{className:"form-item-input slot",px:1,children:(0,Z.jsxs)(d.Z,{display:"flex",alignItems:"center",children:[t,"auto"!==t&&(0,Z.jsx)("div",{style:{marginLeft:4,backgroundColor:t,width:"1em",height:"1em",borderRadius:"0.2em"}})]})}),h=(0,Z.jsxs)(d.Z,{display:"flex",flexGrow:1,alignItems:"center",height:"40px",onKeyDown:function(){s(!1),i(f.current)},children:[(0,Z.jsx)(d.Z,{display:"flex",alignItems:"center",onClick:function(){return s(!0)},children:(0,Z.jsx)("div",{ref:u,style:{flexShrink:0,marginLeft:"8px",backgroundColor:t,width:"32px",height:"32px",boxSizing:"border-box",borderRadius:"8px",border:"1px solid #eee",cursor:"auto"===t?"default":"pointer"}})}),(0,Z.jsx)(g.ZP,{open:l,anchorEl:u.current,onClose:function(){return s(!1)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:(0,Z.jsx)(v.AI,{color:t,onChange:function(n){return p(n.hex)}})})]});return e?h:m}y.propTypes=b;var w=t(59740),k=t(87006),j=["editing","description","value","onChange","componentProps"];function C(n){var e=n.editing,t=n.description,i=n.value,r=n.onChange,c=n.componentProps,l=(0,w.Z)(n,j),s=c.placeholder,u=(0,a.useRef)(i),f=function(n){u.current=n,r(n)};return e?(0,Z.jsx)(k.Z,(0,o.Z)({style:{flex:1},fullWidth:!0,value:i,onChange:function(n){n.persist(),f(n.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:t||s,onKeyDown:function(n){"Enter"===n.key&&r(u.current,"confirm")}},l)):(0,Z.jsx)(d.Z,{px:1,className:"form-item-input slot",children:i})}C.propTypes=b,C.defaultProps={componentProps:{}};var P=t(52469),T=t.n(P),N=t(84938),_=t(7017),L=["editing","value","onChange","componentProps"];function E(n){var e=n.editing,t=n.value,i=n.onChange,r=n.componentProps,c=(0,w.Z)(n,L),a=r.blocklet,l="auto"===t?(0,N.getPassportColorFromDid)(a.appDid):t;return(0,Z.jsxs)(d.Z,{display:"flex",alignItems:"center",children:[(0,Z.jsx)("div",{style:{width:96,marginRight:12},dangerouslySetInnerHTML:{__html:T()({title:"Owner",issuer:(0,_.getDisplayName)(a),issuerDid:a.appDid,ownerName:"Your Name",ownerDid:a.appDid,preferredColor:t||"auto"})}}),(0,Z.jsx)(y,(0,o.Z)((0,o.Z)({},c),{},{editing:e,value:e?l:t,onChange:i,componentProps:r}))]})}E.propTypes=(0,o.Z)((0,o.Z)({},b),{},{componentProps:s().shape({blocklet:s().object.isRequired}).isRequired}),E.defaultProps={};var O,R=t(14458),B=t(28412);function I(n){var e=n.schema,t=n.loading,i=n.value,l=n.defaultValue,s=n.onChange,u=n.style,g=n.disabled,v="[object Object]"===Object.prototype.toString.call(i),b=(0,a.useState)(null),w=(0,c.Z)(b,2),k=w[0],j=w[1],P=(0,a.useState)(v?i:l),T=(0,c.Z)(P,2),N=T[0],_=T[1],L=(0,a.useRef)();function O(n,e,t){var i=n.key,c=n.secure,a=N[i]!==e,l=(0,o.Z)((0,o.Z)({},N),{},(0,r.Z)({},i,e));a&&_(l),s((0,r.Z)({},i,e),{allValues:l,action:t,currentItem:n}),"confirm"===t&&c&&_((0,o.Z)((0,o.Z)({},N),{},(0,r.Z)({},i,"__encrypted__"))),["confirm","cancel"].includes(t)?B(null):B(n)}function B(n){if(n)return L.current=N[n.key],void j(n);L.current=null,j(null)}return(0,Z.jsx)(S,{className:"form",style:u,children:null===e||void 0===e?void 0:e.map((function(n){var e=n.key,r=n.description,c=n.required,a=n.hidden,l=void 0!==a&&a,s=n.componentProps,u=void 0===s?{}:s;if(l)return null;var b=!(!k||e!==k.key),w=function(n,e){var t=e.editing,r=void 0!==t&&t,o=n.key,c=v?i[o]:N[o];return"__encrypted__"===c?r?"":"******":c}(n,{editing:b}),j=function(n,e){var t=e.editing,i=void 0!==t&&t,r=n.componentType,o=void 0===r?"input":r,c=n.render,a=n.renderFormItem;return i&&a?a:!i&&c?c:{input:C,color:y,passport:E}[null===o||void 0===o?void 0:o.toLowerCase()]}(n,{editing:b}),P={inputProps:{"data-cy":"schema-form-item-component"},key:e,description:r,editing:b,value:w,onChange:function(e){return O(n,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"change")},componentProps:u};return(0,Z.jsxs)(d.Z,{className:"form-item",children:[(0,Z.jsxs)(d.Z,{className:"form-item-label",style:{color:c&&!w?"#ff0000":"#333"},children:[r,c&&(0,Z.jsx)(R.Z,{})]}),(0,Z.jsxs)(d.Z,{className:"form-item-body",children:[(0,Z.jsx)(d.Z,{className:"form-item-input",children:(0,Z.jsx)(j,(0,o.Z)({},P))}),(0,Z.jsx)(d.Z,{className:"form-item-action",children:b?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(h.Z,{"data-cy":"schema-form-item-confirm",onClick:function(){O(n,w,"confirm")},disabled:g||t,size:"large",children:t?(0,Z.jsx)(x.Z,{size:24}):(0,Z.jsx)(m.Z,{})}),(0,Z.jsx)(h.Z,{"data-cy":"schema-form-item-cancel",onClick:function(){O(n,L.current,"cancel")},disabled:g||t,size:"large",children:(0,Z.jsx)(p.default,{})})]}):(0,Z.jsx)(h.Z,{"data-cy":"schema-form-item-edit",onClick:function(){O(n,N[e],"edit")},disabled:g||k,size:"large",children:(0,Z.jsx)(f.Z,{})})})]})]},e)}))})}I.propTypes={schema:s().array.isRequired,loading:s().bool,onChange:s().func.isRequired,value:s().object,defaultValue:s().object,style:s().object,disabled:s().bool},I.defaultProps={loading:!1,value:void 0,defaultValue:{},style:{},disabled:!1};var S=(0,u.Z)(B.Z)(O||(O=(0,i.Z)([""])))},99398:function(n,e,t){"use strict";var i,r=t(71171),o=t(33028),c=t(59740),a=t(16380),l=t(24974),s=t.n(l),u=t(15405),d=t(37574),f=["title","subTitle","onClickBack"];function p(n){var e=n.title,t=n.subTitle,i=n.onClickBack,r=(0,c.Z)(n,f);return(0,d.jsxs)(m,(0,o.Z)((0,o.Z)({},r),{},{children:[i&&(0,d.jsx)(u.Z,{className:"back-btn",onClick:i}),(0,d.jsx)("div",{className:"title",children:e}),(0,d.jsx)("div",{className:"sub-title",children:t})]}))}var m=a.Z.div(i||(i=(0,r.Z)(["\n position: relative;\n width: 100%;\n text-align: center;\n\n .title {\n font-size: 24px;\n font-weight: 700;\n color: ",";\n\n "," {\n font-size: 20px;\n }\n }\n\n .sub-title {\n font-size: 14px;\n color: ",";\n padding: 0 14px;\n font-weight: 400;\n }\n\n .back-btn {\n position: absolute;\n left: 0;\n top: 8px;\n color: #9397a1;\n font-size: 18px;\n cursor: pointer;\n }\n"])),(function(n){return n.theme.palette.common.black}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.palette.grey[600]}));e.Z=p,p.propTypes={title:s().string,subTitle:s().string,onClickBack:s().oneOfType([s().func,s().string])},p.defaultProps={title:"",subTitle:"",onClickBack:""}},15405:function(n,e,t){"use strict";var i=t(71600);e.Z=void 0;var r=i(t(48035)),o=t(37574),c=(0,r.default)((0,o.jsx)("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}),"ArrowBackIos");e.Z=c},27724:function(n,e,t){"use strict";var i=t(71600);e.Z=void 0;var r=i(t(48035)),o=t(37574),c=(0,r.default)((0,o.jsx)("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}),"Done");e.Z=c},43611:function(n,e,t){"use strict";var i=t(30969).createContext(void 0);e.Z=i},42641:function(n,e,t){"use strict";function i(n){var e=n.props,t=n.states,i=n.muiFormControl;return t.reduce((function(n,t){return n[t]=e[t],i&&"undefined"===typeof e[t]&&(n[t]=i[t]),n}),{})}t.d(e,{Z:function(){return i}})},86171:function(n,e,t){"use strict";t.d(e,{Z:function(){return o}});var i=t(30969),r=t(43611);function o(){return i.useContext(r.Z)}},12700:function(n,e,t){var i=t(48311),r=t(53970);n.exports=function(n,e){return n&&n.length?r(n,i(e,2)):[]}},33665:function(n,e,t){"use strict";function i(n){if(null==n)throw new TypeError("Cannot destructure "+n)}t.d(e,{Z:function(){return i}})}}]);
2
+ //# sourceMappingURL=4420.55971847.chunk.js.map