@abtnode/webapp 1.16.15 → 1.16.16-beta-d8a9fb09

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 (117) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/build/asset-manifest.json +59 -59
  4. package/build/index.html +1 -1
  5. package/build/service-worker.js +1 -1
  6. package/build/static/js/{1366.80cb7943.chunk.js → 1366.035996e1.chunk.js} +2 -2
  7. package/build/static/js/1685.ad51d1ae.chunk.js +2 -0
  8. package/build/static/js/17.07b2c6ce.chunk.js +1 -0
  9. package/build/static/js/{2113.a0a3a688.chunk.js → 2113.7430fbc7.chunk.js} +1 -1
  10. package/build/static/js/2264.da57cd26.chunk.js +1 -0
  11. package/build/static/js/2294.d78e6ed6.chunk.js +1 -0
  12. package/build/static/js/{2305.1a17468a.chunk.js → 2305.1de337f9.chunk.js} +2 -2
  13. package/build/static/js/2334.390f073a.chunk.js +1 -0
  14. package/build/static/js/2537.0e8b4b3c.chunk.js +1 -0
  15. package/build/static/js/2611.453b18de.chunk.js +1 -0
  16. package/build/static/js/287.436815b1.chunk.js +1 -0
  17. package/build/static/js/3135.92de458b.chunk.js +1 -0
  18. package/build/static/js/{3245.878486bd.chunk.js → 3245.f859c2c5.chunk.js} +1 -1
  19. package/build/static/js/3704.e2d6cd48.chunk.js +2 -0
  20. package/build/static/js/3716.edb3d2ce.chunk.js +1 -0
  21. package/build/static/js/373.f3b27d9c.chunk.js +1 -0
  22. package/build/static/js/4407.61ba5c61.chunk.js +2 -0
  23. package/build/static/js/4448.f8411651.chunk.js +1 -0
  24. package/build/static/js/4471.b4cda6ce.chunk.js +1 -0
  25. package/build/static/js/{4775.566b21e6.chunk.js → 4775.dde53f2e.chunk.js} +1 -1
  26. package/build/static/js/4906.f594c3a7.chunk.js +1 -0
  27. package/build/static/js/5015.4b2a6f82.chunk.js +1 -0
  28. package/build/static/js/5074.c3560023.chunk.js +1 -0
  29. package/build/static/js/542.f9ed38ac.chunk.js +1 -0
  30. package/build/static/js/{7604.6ad5024b.chunk.js → 5526.fd2c4f9a.chunk.js} +2 -2
  31. package/build/static/js/5760.420f21b0.chunk.js +1 -0
  32. package/build/static/js/5804.d00d4267.chunk.js +1 -0
  33. package/build/static/js/5808.699d12fc.chunk.js +1 -0
  34. package/build/static/js/5928.a3e4f24e.chunk.js +1 -0
  35. package/build/static/js/5979.f3310ab6.chunk.js +1 -0
  36. package/build/static/js/6412.e1281d1a.chunk.js +1 -0
  37. package/build/static/js/6511.d3acc514.chunk.js +1 -0
  38. package/build/static/js/6580.59ebe9b2.chunk.js +1 -0
  39. package/build/static/js/6591.a18bd50c.chunk.js +1 -0
  40. package/build/static/js/{6931.acbe76ac.chunk.js → 6931.0aa9f62b.chunk.js} +1 -1
  41. package/build/static/js/6950.ea661eae.chunk.js +1 -0
  42. package/build/static/js/6960.15f4fcbf.chunk.js +1 -0
  43. package/build/static/js/{7020.35799de3.chunk.js → 7020.995924d8.chunk.js} +1 -1
  44. package/build/static/js/7126.10e43092.chunk.js +1 -0
  45. package/build/static/js/7327.33c2d17b.chunk.js +1 -0
  46. package/build/static/js/7534.e41084cc.chunk.js +1 -0
  47. package/build/static/js/7638.ae3e296a.chunk.js +1 -0
  48. package/build/static/js/{7676.b037def1.chunk.js → 7676.bc69ead5.chunk.js} +2 -2
  49. package/build/static/js/{7718.11941d75.chunk.js → 7718.e4a5899b.chunk.js} +1 -1
  50. package/build/static/js/{7913.60bf9666.chunk.js → 7913.d2d51ce2.chunk.js} +1 -1
  51. package/build/static/js/8059.d969b349.chunk.js +1 -0
  52. package/build/static/js/{8462.06893881.chunk.js → 8212.06eb9697.chunk.js} +1 -1
  53. package/build/static/js/8219.7e3bd847.chunk.js +1 -0
  54. package/build/static/js/8382.232e3b29.chunk.js +1 -0
  55. package/build/static/js/8973.6b8d2a7e.chunk.js +1 -0
  56. package/build/static/js/8986.09896e72.chunk.js +1 -0
  57. package/build/static/js/{9038.b426e282.chunk.js → 9038.cb77b205.chunk.js} +1 -1
  58. package/build/static/js/9041.2a0b2bc1.chunk.js +1 -0
  59. package/build/static/js/9249.fddf03b3.chunk.js +1 -0
  60. package/build/static/js/9272.ba198b07.chunk.js +2 -0
  61. package/build/static/js/{9354.6dc219d4.chunk.js → 9354.c3636ea4.chunk.js} +1 -1
  62. package/build/static/js/9963.2f462f42.chunk.js +1 -0
  63. package/build/static/js/main.56a3da7f.js +2 -0
  64. package/build/static/js/{main.08aa73b3.js.LICENSE.txt → main.56a3da7f.js.LICENSE.txt} +1 -1
  65. package/package.json +1 -1
  66. package/build/static/js/1685.1679bdbd.chunk.js +0 -2
  67. package/build/static/js/17.713812e2.chunk.js +0 -1
  68. package/build/static/js/2264.1bb35f21.chunk.js +0 -1
  69. package/build/static/js/2334.0b172bcb.chunk.js +0 -1
  70. package/build/static/js/2537.6b53c30e.chunk.js +0 -1
  71. package/build/static/js/2611.5f974cf9.chunk.js +0 -1
  72. package/build/static/js/2701.fd3340e3.chunk.js +0 -2
  73. package/build/static/js/3704.139947e9.chunk.js +0 -2
  74. package/build/static/js/373.4186f825.chunk.js +0 -1
  75. package/build/static/js/4407.0fbdcce5.chunk.js +0 -2
  76. package/build/static/js/4448.e395311c.chunk.js +0 -1
  77. package/build/static/js/4471.3c161621.chunk.js +0 -1
  78. package/build/static/js/4620.551c484b.chunk.js +0 -1
  79. package/build/static/js/4906.53f9d4cf.chunk.js +0 -1
  80. package/build/static/js/5074.ba8a496a.chunk.js +0 -1
  81. package/build/static/js/5285.93a44f4f.chunk.js +0 -1
  82. package/build/static/js/542.8f68a1a2.chunk.js +0 -1
  83. package/build/static/js/5760.e7d79d06.chunk.js +0 -1
  84. package/build/static/js/5804.16a15b7c.chunk.js +0 -1
  85. package/build/static/js/5808.d9f09727.chunk.js +0 -1
  86. package/build/static/js/5928.5547c6bf.chunk.js +0 -1
  87. package/build/static/js/5979.0302c2f7.chunk.js +0 -1
  88. package/build/static/js/6412.3a0769c9.chunk.js +0 -1
  89. package/build/static/js/6419.7040d60f.chunk.js +0 -1
  90. package/build/static/js/6511.2affe0af.chunk.js +0 -1
  91. package/build/static/js/6580.0759038f.chunk.js +0 -1
  92. package/build/static/js/6591.dc758fef.chunk.js +0 -1
  93. package/build/static/js/6950.a12e3c2c.chunk.js +0 -1
  94. package/build/static/js/6960.df1b5bef.chunk.js +0 -1
  95. package/build/static/js/7126.95bba107.chunk.js +0 -1
  96. package/build/static/js/7327.a5410af5.chunk.js +0 -1
  97. package/build/static/js/7534.0f093319.chunk.js +0 -1
  98. package/build/static/js/7638.4c7ee6d6.chunk.js +0 -1
  99. package/build/static/js/8059.680ccc09.chunk.js +0 -1
  100. package/build/static/js/8219.b5187ff9.chunk.js +0 -1
  101. package/build/static/js/8382.18c7c450.chunk.js +0 -1
  102. package/build/static/js/8719.27070c24.chunk.js +0 -1
  103. package/build/static/js/8973.9e4b78ce.chunk.js +0 -1
  104. package/build/static/js/9041.e02ca359.chunk.js +0 -1
  105. package/build/static/js/9244.01ad2b1f.chunk.js +0 -1
  106. package/build/static/js/9249.c13079fe.chunk.js +0 -1
  107. package/build/static/js/9744.b4732fbc.chunk.js +0 -1
  108. package/build/static/js/9963.d6ed27e8.chunk.js +0 -1
  109. package/build/static/js/main.08aa73b3.js +0 -2
  110. /package/build/static/js/{1366.80cb7943.chunk.js.LICENSE.txt → 1366.035996e1.chunk.js.LICENSE.txt} +0 -0
  111. /package/build/static/js/{1685.1679bdbd.chunk.js.LICENSE.txt → 1685.ad51d1ae.chunk.js.LICENSE.txt} +0 -0
  112. /package/build/static/js/{2305.1a17468a.chunk.js.LICENSE.txt → 2305.1de337f9.chunk.js.LICENSE.txt} +0 -0
  113. /package/build/static/js/{3704.139947e9.chunk.js.LICENSE.txt → 3704.e2d6cd48.chunk.js.LICENSE.txt} +0 -0
  114. /package/build/static/js/{4407.0fbdcce5.chunk.js.LICENSE.txt → 4407.61ba5c61.chunk.js.LICENSE.txt} +0 -0
  115. /package/build/static/js/{7604.6ad5024b.chunk.js.LICENSE.txt → 5526.fd2c4f9a.chunk.js.LICENSE.txt} +0 -0
  116. /package/build/static/js/{7676.b037def1.chunk.js.LICENSE.txt → 7676.bc69ead5.chunk.js.LICENSE.txt} +0 -0
  117. /package/build/static/js/{2701.fd3340e3.chunk.js.LICENSE.txt → 9272.ba198b07.chunk.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[4775],{19371:function(n,e,t){var i=t(38636).default,o=t(73408).default,r=t(814).default,a=this&&this.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(e,"__esModule",{value:!0}),e.splitNavigationBySection=e.flattenNavigation=e.checkLink=e.joinLink=e.cleanOrphanNavigation=e.filterNavigation=e.nestNavigationList=e.isMatchSection=e.deepWalk=e.parseNavigation=void 0;var l=a(t(10905)),c=a(t(50482)),s=a(t(8708)),u=a(t(3785)),d=a(t(24914)),f=a(t(25842)),v=a(t(6352)),m=a(t(56977)),p=a(t(6018)),h=t(65873),g="header",x="/",k="/",b="/",j=function(n){return!(!(0,p.default)(n)&&!function(n){return/^\/(?:[^/]+\/)*$/.test(n)||/^\/(?:[^/]+\/)*[^/]+$/.test(n)}(n))};function Z(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t.key,o=void 0===i?"children":i,r=t.order,a=void 0===r?"first":r;!function n(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=i.index,l=void 0===r?0:r,c=i.parent,s=void 0===c?null:c,u=i.level,d=void 0===u?0:u;Array.isArray(t)?t.forEach((function(e,t){n(e,{index:t,parent:s,level:d+1})})):t&&("first"===a&&e(t,s,{index:l,level:d}),n(t[o],{parent:t,level:d}),"last"===a&&e(t,s,{index:l,level:d}))}(n)}function y(n,e){return!(e!==g||!(0,u.default)(n))||(Array.isArray(n)?n.includes(e):n===e)}function N(n){try{return JSON.parse(n)}catch(e){return n}}function S(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,p.default)(e||""))return e;var t=m.default.join(n,e||k);return t.length>1&&t.endsWith("/")?t.slice(0,t.length-1):t}function L(n,e){var t=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).strict,i=n,r=e;return void 0===t||t||(i=i||"/",r=r||"/"),(0,h.isObject)(i)&&(0,h.isString)(r)&&j(r)?Object.keys(i).reduce((function(n,e){return n[e]=S(i[e],r),n}),{}):(0,h.isString)(i)&&j(i)&&(0,h.isObject)(r)?Object.keys(r).reduce((function(n,e){return n[e]=S(i,r[e]),n}),{}):(0,h.isString)(i)&&(0,h.isString)(r)?j(i)||j(r)?S(i,r):r:(0,h.isObject)(i)&&(0,h.isObject)(r)?o(new Set([].concat(o(Object.keys(i)),o(Object.keys(r))))).reduce((function(n,e){return n[e]=S(i[e],r[e]),n}),{}):r}function w(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.depth,i=void 0===t?1:t,r=e.transform,a=void 0===r?function(n){return n}:r,l=(0,f.default)(n),c=[];return Z(l,(function(n,e,t){var r=t.level;if(r>=i){var l=n.items,s=void 0===l?[]:l;if(s&&Array.isArray(s)&&s.length>0){delete n.items;var u=s.map((function(e){return a(e,n)}));if(e){var f;(f=e.items).push.apply(f,o(u))}else{var v=a((0,d.default)(n,["items"]),e);c.push.apply(c,[v].concat(o(u)))}}else if(1===r){var m=a((0,d.default)(n,["items"]),e);c.push(m)}}else 1===r&&c.push(n)}),{key:"items",order:"last"}),c}function P(n){var e,t=(0,f.default)(n),a=[],l=i(t);try{var c=function(){var n=e.value,t=(0,f.default)((0,d.default)(n,["items"])),l=[];function c(n,e){var i=function(n,e){return e&&Array.isArray(n.items)?n.items.filter((function(t){return(0,u.default)(t.section)?y(n.section,e):!!y(t.section,e)})).map((function(n){return r(r({},n),{},{section:e})})):[]}(n,e);l.push(r(r({},t),{},{section:e,items:i}))}if(Array.isArray(n.section)){var s,v=i(n.section);try{for(v.s();!(s=v.n()).done;){c(n,s.value)}}catch(k){v.e(k)}finally{v.f()}}else if(n.section){c(n,n.section)}else if(n.items&&n.items.length>0){var m,p=n.items.reduce((function(n,e){var t=(e||{}).section,i=void 0===t?[g]:t;return n.push.apply(n,o(i)),n}),[]),h=o(new Set(p)),x=i(h);try{for(x.s();!(m=x.n()).done;){c(n,m.value)}}catch(k){x.e(k)}finally{x.f()}}else l.push(r(r({},n),{},{section:g}));a.push.apply(a,l)};for(l.s();!(e=l.n()).done;)c()}catch(s){l.e(s)}finally{l.f()}return a}function C(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=(0,f.default)(n);return e.reduceRight((function(n,t,i){if(t.parent){var r=e.find((function(n){return t.section&&n.section?n.section===t.section&&n.id===t.parent:n.id===t.parent}));r&&(r.items||(r.items=[]),r.items=[t].concat(o(r.items))),e.splice(i,1)}return null}),null),e}e.checkLink=j,e.deepWalk=Z,e.isMatchSection=y,e.joinLink=function(n,e){var t=(0,f.default)(n);return Z(t,(function(n,t){var i=n.component||n.child;if(i){var o=e.find((function(n){return n.name===i}));o&&(n.link=L(o.link,n.link,{strict:!1}))}else t&&(n.link=L(t.link,n.link))}),{key:"items"}),t},e.flattenNavigation=w,e.splitNavigationBySection=P,e.nestNavigationList=C,e.filterNavigation=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=C(n);return Z(t,(function(n){if(null!==n&&void 0!==n&&n.component&&(e.some((function(e){return e.name===n.component}))||(n.visible=!1)),n.items&&n.items.length)for(var t=n.items.length-1;t>=0;t--)!1===n.items[t].visible&&n.items.splice(t,1)}),{key:"items"}),t.filter((function(n){var e;return!1!==n.visible&&!(n.items&&Array.isArray(n.items)&&n.items.length>0&&null!==(e=n.items)&&void 0!==e&&e.every((function(n){return!1===n.visible})))}))},e.cleanOrphanNavigation=function(n){return n.map((function(n){return n.items&&Array.isArray(n.items)&&1===n.items.length&&["header","footer","",void 0,null].includes(n.section)?n.items[0]:n}))},e.parseNavigation=function(){var n,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).beforeProcess,a=void 0===t?function(n){return n}:t,u=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],t=function t(a){var l,c,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=[],d=a.children,m=void 0===d?[]:d,p=a.meta,h=void 0===p?{}:p,b=(0,f.default)((null===h||void 0===h?void 0:h.navigation)||[]);!1!==(null===(l=a.meta)||void 0===l||null===(c=l.capabilities)||void 0===c?void 0:c.navigation)&&u.push.apply(u,o(b));var j,Z=s.name||"",y=s.mountPoint||x,N=a===n?"":h.name||"",S=a===n?"":a.mountPoint||x,L=i(m);try{var w=function(){var n,i,a,l,c=j.value,s=c.meta.name,d=c.mountPoint,f=[Z,N,s].filter(Boolean).join("."),m=c.meta.navigation||[],p=(0,v.default)(y,S,d);!1!==(null===(n=c.meta)||void 0===n||null===(i=n.capabilities)||void 0===i?void 0:i.navigation)&&e.push({did:c.meta.did,name:f,link:p,title:c.meta.title||"",navigation:m.map((function(n){return r({section:g},n)}))});var h=b.find((function(n){return!!n.component&&n.component===s}));if(h){if(!h.link)if(c.meta.navigation&&c.meta.navigation.length>0){var x,L,w=t(c,{mountPoint:S,name:N});w.length>0&&(h.items=null!==(x=h.items)&&void 0!==x?x:[],(L=h.items).push.apply(L,o(w)))}else h.link=k}else if(!1!==(null===(a=c.meta)||void 0===a||null===(l=a.capabilities)||void 0===l?void 0:l.navigation)){var P=t(c,{mountPoint:S,name:N}),C={title:c.meta.title,component:s,id:c.meta.did};P.length>0?(C.items=P,C.link=void 0):C.link=k,u.push(C)}};for(L.s();!(j=L.n()).done;)w()}catch(P){L.e(P)}finally{L.f()}return u}(n);return{navigationList:t,components:e}}(e),d=u.navigationList,m=u.components,p=(null===e||void 0===e||null===(n=e.settings)||void 0===n?void 0:n.navigations)||[],h=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,t=w((0,f.default)(n),{depth:e,transform:function(n,e){var t;return e&&(n._parent||(n._parent=e.id,e.component||(n.link=L(e.link,n.link))),n.section=n.section||e.section||[g],n.visible=null!==(t=n.visible)&&void 0!==t?t:e.visible),n.component=[e.component,n.component].filter(Boolean).join("."),n}});return Z(t,(function(n){n.items&&n.items.length>0&&n.items.reduceRight((function(e,t){if(t._parent){var i=n.items.findIndex((function(n){return n.id===t._parent}));i>=0&&n.items.splice(i,1),delete t._parent}return null}),null)}),{key:"items"}),t}(a(d)),j=w(P(function(n){var e=(0,f.default)(n).filter((function(n){return n.id}));return Z(e,(function(n,e){var t;if(n.items&&n.items.length){for(var i=n.items.length-1;i>=0;i--)n.items[i].id||n.items.splice(i,1);0===n.items.length&&n.component&&(n.link=n.link||k)}e&&(n.parent=e.id,n.id=[e.id,n.id].join(b)),n.from=n.from||"yaml",n.visible=null===(t=n.visible)||void 0===t||t}),{key:"items"}),e}(h)).reduce((function(n,e){var t=["bottom","social","sessionManager"].includes(e.section),i=!1,a=m.find((function(n){return"/"===n.link}));if(a&&e.id===a.did&&(i=!0),t||i){if(e.items&&e.items.length>0)return n.push.apply(n,o(e.items.map((function(n){var t=e.section,i=L(e.link,n.link),o=[e.component,n.component].filter(Boolean).join(".");return r(r({},n),{},{section:t,link:i,component:o,parent:""})})))),n;if(i)return n}return n.push(e),n}),[]),{transform:function(n,e){var t=n.component;return null!==e&&void 0!==e&&e.component&&(t=[e.component,n.component].filter(Boolean).join(".")),r(r({},n),{},{component:t})}});return{navigationList:(0,l.default)(p.map((function(n){var e=r({},n);return e.role&&(e.role=N(e.role)),e.section&&(e.section=N(e.section)),e.title&&(e.title=N(e.title)),e.link&&(e.link=N(e.link)),e})),j,(function(n,e){var t=["id","section"];return(0,c.default)((0,s.default)(n,t),(0,s.default)(e,t))})),components:m,builtinList:j}}},14775:function(n,e,t){t.r(e),t.d(e,{default:function(){return ge}});var i=t(33028),o=t(32723),r=t(34795),a=t(5057),l=t(39948),c=t(56556),s=t(80633),u=t(80576),d=t(6041),f=t(74490),v=t(25228),m=t(51177),p=t(95301),h=t(11750),g=t(39067),x=t(86229),k=t(55498),b=t(12673),j=t(13128),Z=t(68420),y=t(74639),N=t(92706),S=t.n(N),L=t(55898),w=t.n(L),P=t(37660),C=t(86272),O=t.n(C),A=t(26271),E=t.n(A),R=t(50482),T=t.n(R),M=t(20877),_=t(36095),D=t(96266);function I(n){var e=n.prevPath,t=n.nextPath,i=e.length,o=t.length;return!(i!==o||!T()(e.slice(0,i-1),t.slice(0,o-1)))}function W(n){var e=n.treeNode,t=(0,Z.PE)().locale;return(0,D.jsxs)(D.Fragment,{children:[e.icon&&(0,D.jsx)(k.JO,{style:{marginRight:4},icon:e.icon}),function(){var n=e.title,i=e.subtitle,o=n,r=i;return E()(n)&&(o=n[t]),!(0,a.isValidElement)(i)&&E()(i)&&(r=i[t]),(0,D.jsxs)(l.Z,{display:"flex",alignItems:"center",children:[(0,D.jsx)(h.Z,{variant:"subtitle1",fontSize:16,children:o}),i&&(0,D.jsx)(h.Z,{variant:"body2",color:"gray",ml:1.5,children:r})]})}()]})}function z(n){var e=n.treeData,t=n.setTreeData,o=n.renderActions,r=e.map((function(n){return(0,i.Z)((0,i.Z)({},n),{},{expanded:!0})})),a={};return"undefined"!==typeof window&&(a.context=window),(0,D.jsx)(_.W,(0,i.Z)((0,i.Z)({backend:M.HTML5Backend},a),{},{children:(0,D.jsx)(P.oP,{generateNodeProps:function(n){return{buttons:o({data:n.node,className:"list-item-actions"}),icons:(0,D.jsx)(k.JO,{icon:"ic:round-drag-indicator"}),title:(0,D.jsx)(W,{treeNode:n.node})}},maxDepth:2,isVirtualized:!1,treeData:r,onChange:t,canDrop:I,theme:O()})}))}W.propTypes={treeNode:w().object.isRequired},z.propTypes={treeData:w().object.isRequired,setTreeData:w().func,renderActions:w().func},z.defaultProps={setTreeData:function(){},renderActions:function(){}};var J=z,F=t(96234),q=t(56666),V=t(28726),B=t(75953),G=t(67680),U=t(53070),H=t(47020),Q=t(41899),K=t(11251),X=t(24914),$=t.n(X),Y=t(8708),nn=t.n(Y),en=t(82488),tn=t.n(en),on=t(78164),rn=t.n(on),an=t(75506),ln=t.n(an),cn=t(2765),sn=t.n(cn),un=t(25842),dn=t.n(un),fn=t(95550),vn=t(19371),mn=t(6352),pn=t.n(mn),hn=t(2842),gn=t(6018),xn=t.n(gn),kn=t(76811),bn=t(68079),jn=t(63838),Zn=t(65873),yn=t(27156),Nn=t(23985),Sn=t(11819),Ln=t(59740),wn=t(19654),Pn=t(90067),Cn=t(44067),On=t(12594),An=["fullWidth","multiple","required","label","placeholer","options","helperText","error","margin"];function En(n){var e=n.fullWidth,t=n.multiple,o=n.required,r=n.label,a=n.placeholer,c=n.options,s=n.helperText,v=n.error,p=n.margin,g=(0,Ln.Z)(n,An),x=c.find((function(n){return n.value===g.value})),k=null===x||void 0===x?void 0:x.title;return(0,D.jsxs)(u.Z,{margin:p,fullWidth:e,error:v,children:[(0,D.jsx)(d.Z,{children:"".concat(r).concat(o?"*":"")}),(0,D.jsxs)(m.Z,(0,i.Z)((0,i.Z)({multiple:t,input:(0,D.jsx)(On.Z,{defaultValue:k,sx:{flex:1},required:o,label:r,inputProps:{margin:p}}),renderValue:function(n){if(t)return(0,D.jsx)(l.Z,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:n.map((function(n){var e=c.find((function(e){return e.value===n}));return e&&e.title&&(0,D.jsx)(wn.Z,{size:"small",label:e.title},n)}))});var e=c.find((function(e){return e.value===n}));return e&&e.title&&(0,D.jsxs)(l.Z,{children:[(0,D.jsx)(h.Z,{component:"span",children:e.title}),(0,D.jsx)(h.Z,{marginLeft:1,component:"span",variant:"body2",color:"text.secondary",children:e.description})]})}},g),{},{children:[(0,D.jsx)(f.Z,{disabled:!0,children:(0,D.jsx)("em",{children:a})}),!t&&(0,D.jsx)(f.Z,{value:"",children:"None"}),c.map((function(n){return n&&n.value&&(0,D.jsxs)(f.Z,{value:n.value,children:[(0,D.jsx)(Cn.Z,{children:n.title}),n.description&&(0,D.jsx)(h.Z,{variant:"body2",color:"text.secondary",children:n.description})]},n.value)}))]})),(0,D.jsx)(Pn.Z,{children:s})]})}En.propTypes={error:w().bool,required:w().bool,multiple:w().bool,fullWidth:w().bool,label:w().string,placeholer:w().string,options:w().array,helperText:w().string,margin:w().string},En.defaultProps={error:!1,required:!1,multiple:!1,fullWidth:!1,label:"",placeholer:"",options:[],helperText:"",margin:""};var Rn=En,Tn="en";function Mn(n){var e=n.sx,t=n.onAdd,i=n.onChange,o=n.locales,r=n.localeMap,s=n.onRemoveLocale,u=(0,Z.PE)().t,d=(0,a.useRef)(),f=(0,a.useState)(null),v=(0,F.Z)(f,2),m=v[0],p=v[1],g=(0,b.Z)({currentLocale:Tn,localeList:[],inputLocale:"",localeError:""}),x=(0,a.useMemo)((function(){return!!m}),[m]),j=(0,a.useMemo)((function(){return o.includes(g.currentLocale)?g.currentLocale:Tn}),[o,g.currentLocale]),y=(0,a.useMemo)((function(){return Object.keys((0,Zn.omit)(r,[].concat((0,bn.Z)(g.localeList),[Tn]))).map((function(n){return{title:r[n],value:n}}))}),[g.localeList]);function N(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=function(n){return n?"en"!==n&&!g.localeList.includes(n)||u("navigation.form.localeExists",{value:n}):u("common.requiredErrorText",{name:"Locale"})}(null===n||void 0===n?void 0:n.trim());return g.localeError=!0!==e?e:"",e}function S(){var n,e=null===(n=g.inputLocale)||void 0===n?void 0:n.trim();!0===N(e)&&(L(),g.localeList.push(e),g.currentLocale=e,t(e))}function L(){p(null),g.inputLocale="",g.localeError=""}return(0,a.useEffect)((function(){g.localeList=(0,bn.Z)(o)}),[o,g]),(0,jn.Z)("enter",(function(){setTimeout((function(){S()}))}),{target:d}),(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(yn.Z,{sx:e,value:j,onChange:function(n,e){g.currentLocale=e,i(e)},children:[(0,D.jsx)(Nn.Z,{label:"Default (".concat(r[Tn],")"),value:"en"}),g.localeList.map((function(n){return(0,D.jsx)(Nn.Z,{sx:{position:"relative"},label:(0,D.jsxs)(D.Fragment,{children:[r[n],(0,D.jsx)(G.Z,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:function(e){!function(n,e){n.preventDefault(),n.stopPropagation(),g.localeList=(0,Zn.without)(g.localeList,e),s(e),e===g.currentLocale&&(g.currentLocale=Tn)}(e,n)},children:(0,D.jsx)(k.JO,{icon:"mdi:close",height:14})})]}),value:n},n)})),(0,D.jsx)(G.Z,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:function(n){p(n.currentTarget)},children:(0,D.jsx)(k.JO,{icon:"mdi:plus"})})]}),(0,D.jsx)(Sn.ZP,{open:x,anchorEl:m,onClose:L,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:(0,D.jsxs)(l.Z,{sx:{p:2,width:"270px"},children:[(0,D.jsx)(h.Z,{variant:"subtitle2",children:u("navigation.form.localePlaceholder")}),(0,D.jsx)(l.Z,{mt:1,children:(0,D.jsx)(Rn,{required:!0,fullWidth:!0,label:"Locale",value:g.inputLocale,options:y,onChange:function(n){var e=n.target.value;N(e),g.inputLocale=e},error:!!g.localeError,helperText:g.localeError||" "})}),(0,D.jsx)(l.Z,{display:"flex",justifyContent:"flex-end",children:(0,D.jsx)(c.Z,{size:"small",variant:"contained",onClick:S,children:u("common.confirm")})})]})})]})}Mn.propTypes={sx:w().any,onAdd:w().func,onChange:w().func,onRemoveLocale:w().func,localeMap:w().object,locales:w().array},Mn.defaultProps={sx:null,onAdd:function(){},onChange:function(){},onRemoveLocale:function(){},localeMap:{},locales:[]};var _n=Mn,Dn=t(17425),In=t(29054),Wn="en",zn={title:(0,q.Z)({},Wn,""),link:(0,q.Z)({},Wn,"")};function Jn(n){var e=n.icon,t=(0,a.useState)(!1),i=(0,F.Z)(t,2),l=i[0],c=i[1];return(0,Q.Z)((0,r.Z)((0,o.Z)().mark((function n(){return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c(!1),n.next=3,(0,k.GL)(e);case 3:c(!0);case 4:case"end":return n.stop()}}),n)}))),[e]),e?l?(0,D.jsx)(k.JO,{icon:e}):(0,D.jsx)(k.JO,{color:"#f06f6e",icon:"ic:baseline-error"}):(0,D.jsx)(k.JO,{icon:"codicon:blank"})}Jn.propTypes={icon:w().string.isRequired};var Fn=(0,a.forwardRef)((function(n,e){var t=n.section,c=n.components,s=n.rawNavigations,d=(0,Dn.DJ)().roles,f=(0,Z.PE)(),v=f.t,m=f.locale,p=(0,In.y0)().blocklet.environments.find((function(n){return"BLOCKLET_APP_LANGUAGES"===n.key})),g=(p?p.value.split(","):["en","zh"]).filter((function(n){return kn.SUPPORTED_LANGUAGES[n]})).reduce((function(n,e){return n[e]=kn.SUPPORTED_LANGUAGES[e].nativeName,n}),{}),y=(0,a.useRef)((function(){})),N=(0,K.Z)(!1),S=(0,F.Z)(N,2),L=S[0],w=S[1],P=w.setFalse,C=w.setTrue,O=(0,b.Z)({isRoot:!0,type:"add",linkDisabled:!1,locale:Wn,formState:dn()(zn),get localeList(){return rn()(Object.keys(this.formState.title),Wn)}}),A=(0,fn.cI)({mode:"onChange",defaultValues:{id:void 0,title:void 0,icon:void 0,link:void 0,component:void 0,parent:void 0,role:[]}}),R=A.handleSubmit,T=A.control,M=A.watch,_=A.setValue,I=A.clearErrors,W=A.formState.errors;(0,a.useEffect)((function(){_("title",O.formState.title[O.locale]),_("link",O.formState.link[O.locale])}),[_,O.locale,L]);var z=M("component"),J=M("title"),Q=M("link"),X=M("icon"),Y=M("parent");(0,a.useEffect)((function(){O.formState.title[O.locale]=J}),[J]),(0,a.useEffect)((function(){O.formState.link[O.locale]=Q}),[Q]);var en=(0,a.useMemo)((function(){return s.find((function(n){return z?c.find((function(n){return n.name===z})).did===n.id:n.id===Y}))}),[c,s,z,Y]),on=(0,a.useMemo)((function(){if(null!==en&&void 0!==en&&en.component){var n=(c.find((function(n){return n.name===en.component}))||{}).link,e=E()(n)?n[O.locale]:n;if(z)return(0,hn.QT)(e);var t=E()(en.link)?en.link[O.locale]:en.link;return(0,hn.QT)(pn()(e,t||"/"))}return null}),[c,O.locale,en,z]),an=(0,a.useMemo)((function(){var n=(en||{}).component,e=(c.find((function(e){return e.name===n}))||{}).navigation,i=void 0===e?[]:e;return(0,vn.flattenNavigation)(i,{transform:function(n,e){return null!==e&&void 0!==e&&e.section&&(n.section=n.section||e.section),n}}).filter((function(n){return n.link})).filter((function(n){return(0,vn.isMatchSection)(n.section,t)})).map((function(n){return{label:n.link,title:n.title[m]||n.title}}))}),[en,c,t,m]),cn=(0,a.useMemo)((function(){var n={add:v("common.create"),edit:v("common.edit")}[O.type];return n?"".concat(n," ").concat(v("navigation.navigation")):"--"}),[O.type,v]),un=(0,a.useCallback)((function(){O.isRoot=!0,O.locale=Wn,O.type="add",O.linkDisabled=!1,y.current=function(){},_("id",void 0),_("icon",void 0),_("title",void 0),_("link",void 0),_("component",void 0),_("parent",void 0),_("role",[]),O.formState=dn()(zn),I()}),[I,_,O]),mn=(0,a.useCallback)((function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return O.localeList.length>0&&(new Set(tn()(O.formState.title)).size>1&&(n.title=O.formState.title),new Set(tn()(O.formState.link)).size>1&&(n.link=O.formState.link)),ln()(n.role)&&(n.role=void 0),n}),[O.formState.link,O.formState.title,O.localeList]),gn=(0,a.useCallback)((function(){P(),setTimeout((function(){un()}))}),[un,P]),bn=(0,a.useCallback)((function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).parent,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};O.type="add",O.isRoot=!n,_("parent",null===n||void 0===n?void 0:n.id),y.current=function(n){e(gn,n)},C()}),[gn,C,_,O]),jn=(0,a.useCallback)((function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},t=n.id,i=n.title,o=n.icon,r=n.link,a=n.parent,l=n.component,c=n.role,s=void 0===c?[]:c;_("id",t),_("icon",o),"tmpl"===n.from&&(O.linkDisabled=!0),sn()(i)?O.formState.title=O.localeList.reduce((function(n,e){return n[e]=i,n}),(0,q.Z)({},Wn,i)):E()(i)?O.formState.title=dn()(i):O.formState.title={},sn()(r)?O.formState.link=O.localeList.reduce((function(n,e){return n[e]=r,n}),(0,q.Z)({},Wn,r)):E()(r)?O.formState.link=dn()(r):O.formState.link={},_("component",l),_("parent",a),_("role",s||[]),C(),O.type="edit",O.isRoot=!a,y.current=function(n){var t=nn()(n,["id","title","icon","link","role"]);e(gn,t)}}),[gn,C,_,O]);function Zn(n){var e=null===n||void 0===n?void 0:n.trim();return e?!(e.length>24)||v("navigation.form.titleTooLong",{len:24}):v("common.requiredErrorText",{name:v("navigation.form.title")})}function yn(){return(yn=(0,r.Z)((0,o.Z)().mark((function n(e){var t;return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(t=null===e||void 0===e?void 0:e.trim())){n.next=10;break}return n.prev=2,n.next=5,(0,k.GL)(t);case 5:n.next=10;break;case 7:return n.prev=7,n.t0=n.catch(2),n.abrupt("return",v("navigation.form.invalidIcon"));case 10:return n.abrupt("return",!0);case 11:case"end":return n.stop()}}),n,null,[[2,7]])})))).apply(this,arguments)}function Nn(n){var e=null===n||void 0===n?void 0:n.trim();return e?!!(0,vn.checkLink)(e)||v("navigation.form.invalidLink"):!!O.isRoot||v("common.requiredErrorText",{name:v("navigation.form.link")})}(0,a.useImperativeHandle)(e,(function(){return{add:bn,edit:jn,close:gn}}),[bn,gn,jn]);var Sn=(0,a.useCallback)((function(n){O.locale=n,O.formState.title[n]||(O.formState.title[n]=""),O.formState.link[n]||(O.formState.link[n]=""),setTimeout((function(){I()}))}),[I,O]),Ln=(0,a.useCallback)((function(){for(var n=O.formState,e=n.title,t=n.link,i=0,o=Object.keys(e);i<o.length;i++){var r=Zn(e[o[i]]);if(!0!==r)return r}for(var a=0,l=Object.keys(t);a<l.length;a++){var c=Nn(t[l[a]]);if(!0!==c)return c}return!0}),[O.formState]),wn=(0,a.useCallback)((function(n){var e=Ln();!0===e?y.current(mn(n)):x.Z.error(e)}),[Ln,mn]),Pn=(0,a.useCallback)((function(n){O.formState.title=$()(O.formState.title,n),O.formState.link=$()(O.formState.link,n)}),[O.formState]),Cn=(0,a.useCallback)((function(n){var e,t;O.locale=n,O.formState.title[n]=null===(e=O.formState.title)||void 0===e?void 0:e[Wn],O.formState.link[n]=null===(t=O.formState.link)||void 0===t?void 0:t[Wn],setTimeout((function(){I()}))}),[I,O]);return(0,D.jsxs)(j.Z,{open:L,title:cn,onClose:gn,actions:(0,D.jsx)(V.Z,{onClick:R(wn),color:"primary",autoFocus:!0,variant:"contained",children:v("common.confirm")}),children:[(0,D.jsx)(_n,{sx:{mb:1},onAdd:Cn,onChange:Sn,onRemoveLocale:Pn,localeMap:g,locales:O.localeList}),(0,D.jsxs)("form",{noValidate:!0,autoComplete:"off",children:[(0,D.jsx)(fn.Qr,{name:"title",control:T,rules:{validate:Zn},render:function(n){var e,t,o=n.field;return(0,D.jsx)(H.Z,(0,i.Z)({fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:v("navigation.form.titlePlaceholder"),label:v("navigation.form.title"),disabled:O.isEdit,error:!(null===W||void 0===W||null===(e=W.title)||void 0===e||!e.message),helperText:(null===W||void 0===W||null===(t=W.title)||void 0===t?void 0:t.message)||" "},o))}}),(0,D.jsx)(fn.Qr,{name:"icon",control:T,rules:{validate:function(n){return yn.apply(this,arguments)}},render:function(n){var e,t,o=n.field;return(0,D.jsx)(H.Z,(0,i.Z)((0,i.Z)({fullWidth:!0,variant:"outlined",margin:"dense",placeholder:v("navigation.form.iconPlaceholder"),label:v("navigation.form.icon"),error:!(null===W||void 0===W||null===(e=W.icon)||void 0===e||!e.message),disabled:O.locale!==Wn,helperText:(null===W||void 0===W||null===(t=W.icon)||void 0===t?void 0:t.message)||(0,D.jsx)(l.Z,{display:"flex",children:(0,D.jsxs)(l.Z,{component:"a",href:"https://icones.js.org",target:"_blank",display:"flex",alignItems:"center",children:[v("navigation.form.findMoreIcon")," ",(0,D.jsx)(k.JO,{style:{marginLeft:4},icon:"radix-icons:external-link"})]})})},o),{},{InputProps:{endAdornment:(0,D.jsx)(U.Z,{position:"end",children:(0,D.jsx)(G.Z,{sx:{cursor:"default"},disableFocusRipple:!0,disableRipple:!0,children:X&&(0,D.jsx)(Jn,{icon:X})})})}}))}}),O.isRoot&&(0,D.jsx)(fn.Qr,{name:"component",control:T,render:function(n){var e,t,o=n.field;return(0,D.jsx)(Rn,(0,i.Z)({fullWidth:!0,margin:"dense",disabled:"edit"===O.type||O.locale!==Wn,label:v("navigation.form.component"),placeholer:v("navigation.form.componentPlaceholder"),options:c.map((function(n){return{title:n.title,value:n.name,description:n.link}})),error:!(null===W||void 0===W||null===(e=W.component)||void 0===e||!e.message),helperText:(null===W||void 0===W||null===(t=W.component)||void 0===t?void 0:t.message)||" "},$()(o,"ref")))}}),(0,D.jsx)(fn.Qr,{name:"link",control:T,rules:{validate:Nn},render:function(n){var e=n.field;return(0,D.jsx)(u.Z,{fullWidth:!0,margin:"dense",children:(0,D.jsx)(B.Z,(0,i.Z)((0,i.Z)({disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:O.linkDisabled,isOptionEqualToValue:function(n){return n.label},options:an,renderInput:function(n){var e,t;return(0,D.jsx)(H.Z,(0,i.Z)((0,i.Z)({},n),{},{placeholder:v("navigation.form.linkPlaceholder"),label:v("navigation.form.link"),error:!(null===W||void 0===W||null===(e=W.link)||void 0===e||!e.message),helperText:(null===W||void 0===W||null===(t=W.link)||void 0===t?void 0:t.message)||"/abc/bcd or /abc or https://arcblock.io",InputProps:{startAdornment:on?(0,D.jsx)(U.Z,{position:"start",sx:{textDecoration:xn()(Q||"")?"line-through":""},children:on}):null}}))},renderOption:function(n,e){return(0,D.jsxs)(l.Z,(0,i.Z)((0,i.Z)({component:"li"},n),{},{children:[e.label,(0,D.jsx)(h.Z,{marginLeft:1,component:"span",variant:"body2",color:"text.secondary",children:e.title})]}))},margin:"dense"},e),{},{onChange:function(){},onInputChange:function(n,t){e.onChange(t)}}))})}}),["dashboard","sessionManager"].includes(t)&&(0,D.jsx)(fn.Qr,{name:"role",control:T,render:function(n){var e,t,o=n.field;return(0,D.jsx)(Rn,(0,i.Z)({fullWidth:!0,multiple:!0,margin:"dense",label:v("navigation.form.role"),placeholer:v("navigation.form.rolePlaceholder"),options:d.map((function(n){return{title:n.title,value:n.name}})),error:!(null===W||void 0===W||null===(e=W.role)||void 0===e||!e.message),helperText:(null===W||void 0===W||null===(t=W.role)||void 0===t?void 0:t.message)||" "},$()(o,"ref")))}})]})]})}));Fn.propTypes={section:w().string,components:w().array,rawNavigations:w().array},Fn.defaultProps={section:"",components:[],rawNavigations:[]};var qn=Fn;function Vn(n){var e=n.className,t=n.add,i=n.edit,o=n.toggle,r=n.del,l=n.data,c=n.section,s=(0,Z.PE)().t,u=["yaml","tmpl"].includes(l.from),d=(0,a.isValidElement)(l.subtitle);function f(n){n.preventDefault(),n.stopPropagation()}var v=(0,a.useCallback)((function(n){f(n),t(l)}),[t,l]),m=(0,a.useCallback)((function(n){f(n),i(l)}),[i,l]),p=(0,a.useCallback)((function(n){f(n),o(l)}),[o,l]),h=(0,a.useCallback)((function(n){f(n),r(l)}),[r,l]);return(0,D.jsxs)("div",{className:e,children:[!l.parent&&["header","footer","dashboard"].includes(c)&&(0,D.jsx)("span",{title:s(d?"navigation.action.noAddSub":"navigation.action.addSub"),children:(0,D.jsx)(G.Z,{size:"small",color:"success",onClick:v,disabled:d,children:(0,D.jsx)(k.JO,{icon:"mdi:plus-box-outline"})})}),(0,D.jsx)("span",{title:s(d?"navigation.action.noEdit":"navigation.action.edit"),children:(0,D.jsx)(G.Z,{size:"small",color:"primary",onClick:m,disabled:d,children:(0,D.jsx)(k.JO,{icon:"mdi:pencil"})})}),(0,D.jsx)("span",{title:d?s("navigation.action.noEdit"):l.visible?s("navigation.action.hide"):s("navigation.action.show"),children:(0,D.jsx)(G.Z,{size:"small",color:"warning",onClick:p,disabled:d,children:!1===l.visible?(0,D.jsx)(k.JO,{icon:"mdi:eye-off-outline"}):(0,D.jsx)(k.JO,{icon:"mdi:eye-outline"})})}),(0,D.jsx)("span",{title:s(u&&!d?"navigation.action.noDel":"navigation.action.del"),children:(0,D.jsx)(G.Z,{disabled:u&&!d,size:"small",color:"error",onClick:h,children:(0,D.jsx)(k.JO,{icon:"mdi:delete"})})})]})}Vn.propTypes={data:w().object.isRequired,className:w().string,add:w().func,edit:w().func,toggle:w().func,del:w().func,section:w().string},Vn.defaultProps={className:"",add:function(){},edit:function(){},toggle:function(){},del:function(){},section:""};var Bn=Vn,Gn=t(3785),Un=t.n(Gn),Hn=t(79683),Qn=t.n(Hn),Kn=t(35432),Xn=t(14491),$n="/",Yn="header",ne={sessionManager:[{id:"/sessionManager",title:{en:"Manage",zh:"\u7ba1\u7406"},section:["sessionManager"],icon:"ion:settings-outline",link:"".concat(Kn.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin"),role:["owner","admin"],from:"tmpl"}],dashboard:[{id:"/access",title:{en:"Access",zh:"\u8bbf\u95ee\u63a7\u5236"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"tmpl",items:[{id:"member",title:{en:"Members",zh:"\u6210\u5458"},icon:"ant-design:user-outlined",link:"".concat(Kn.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin/members"),from:"tmpl"},{id:"passport",title:{en:"Passport",zh:"\u901a\u884c\u8bc1"},icon:"icon-park-outline:passport",link:"".concat(Kn.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin/passports"),from:"tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"\u4eea\u8868\u76d8"},icon:"ant-design:dashboard-outlined",link:"".concat(Kn.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin"),from:"tmpl"}]}]};function ee(n,e){return n.section&&e.section?n.section===e.section&&n.id===e.id:n.id===e.id}function te(){var n=(0,In.y0)(),e=n.blocklet,t=n.actions,l=(0,vn.parseNavigation)(e,{beforeProcess:function(n){var e=dn()(n);return ne.dashboard.forEach((function(n){e.some((function(e){return e.id===n.id}))||e.push(n)})),e.some((function(n){return n.id&&(n.section||[]).includes("sessionManager")}))||e.push.apply(e,(0,bn.Z)(ne.sessionManager)),e}}),c=l.navigationList,s=l.components,u=l.builtinList,d=(0,b.Z)({rawNavigation:dn()(c),activeSection:Yn,components:s}),f=(0,a.useMemo)((function(){return(0,vn.nestNavigationList)(d.rawNavigation)}),[d.rawNavigation]),v=(0,a.useMemo)((function(){var n=(0,vn.filterNavigation)(d.rawNavigation,s),e=(0,vn.joinLink)(n,s);return(0,vn.cleanOrphanNavigation)(e)}),[s,d.rawNavigation]);function m(n){if(!n.id)return"";var e=(0,vn.flattenNavigation)((0,vn.joinLink)(f,s)),t=e.find((function(e){return e.id===n.id}));function i(n){var e=n.name;return(0,D.jsx)(wn.Z,{label:"Uninstalled: ".concat(e),color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}if(null!==t&&void 0!==t&&t.component){if(!s.some((function(n){return n.name===t.component})))return(0,D.jsx)(i,{name:t.component})}else if(t.parent){var o=e.find((function(n){return n.id===t.parent}));if(null!==o&&void 0!==o&&o.component&&!s.some((function(n){return n.name===o.component})))return(0,D.jsx)(i,{name:o.component})}return null===t||void 0===t?void 0:t.link}function p(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$n;return n.map((function(n){var t=s.find((function(e){return e.name===n.component})),i=(null===t||void 0===t?void 0:t.link)||e,o=n.items||[],r=n.link;return{title:n.title,subtitle:m(n),link:r,icon:n.icon,children:p(o,r||$n),section:n.section,visible:n.visible,parent:n.parent,component:n.component,id:n.id,role:n.role,from:n.from,__base:i}}))}function h(n){return g.apply(this,arguments)}function g(){return(g=(0,r.Z)((0,o.Z)().mark((function n(e){var r,a;return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.map((function(n){return Qn()(n,Un())})),a=r.map((function(n){var e=(0,i.Z)({},n);return e.role&&Array.isArray(e.role)&&(e.role=JSON.stringify(e.role)),e.section&&Array.isArray(e.section)&&(e.section=JSON.stringify(e.section)),e.title&&e.title instanceof Object&&(e.title=JSON.stringify(e.title)),e.link&&e.link instanceof Object&&(e.link=JSON.stringify(e.link)),e})),n.next=4,t.configNavigations(a);case 4:case"end":return n.stop()}}),n)})))).apply(this,arguments)}function x(){return(x=(0,r.Z)((0,o.Z)().mark((function n(){return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,h([]);case 2:d.rawNavigation=dn()(u);case 3:case"end":return n.stop()}}),n)})))).apply(this,arguments)}return{state:d,navigation:v,components:s,getNavigationFullLink:m,updateActiveSection:function(n){d.activeSection=n},updateNavigationItem:function(n){!function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=d.rawNavigation.map((function(e){var t=n.find((function(n){return ee((0,i.Z)((0,i.Z)({},n),{},{section:d.activeSection}),e)}));return t?(0,i.Z)((0,i.Z)({},e),t):e}));d.rawNavigation=e}([n])},delNavigationItem:function(n){var e=d.rawNavigation.filter((function(e){return e.id===n||e.parent===n})).map((function(n){return n.id}));d.rawNavigation=d.rawNavigation.filter((function(n){return!e.includes(n.id)}))},addNavigationItem:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=(0,i.Z)((0,i.Z)({},n),{},{id:(0,Xn.x0)(),section:d.activeSection,visible:!0});d.rawNavigation=[].concat((0,bn.Z)(d.rawNavigation),[e])},updateNavigationTree:function(n){var e=[];(0,vn.deepWalk)(n,(function(n,t){var o=(0,i.Z)((0,i.Z)({},$()(n,["children","expand"])),{},{parent:null===t||void 0===t?void 0:t.id});e.push(o)}));var t=d.rawNavigation.filter((function(n){if(!d.activeSection)return!1;var t=e.find((function(e){return ee(e,n)}));return!t||!(0,vn.isMatchSection)(t.section,d.activeSection)}));d.rawNavigation=[].concat((0,bn.Z)(t),e)},getNavigation:function(n){return p(dn()(f).filter((function(e){return(0,vn.isMatchSection)(e.section,n)})))},saveNavigationList:h,resetNavigation:function(){return x.apply(this,arguments)}}}var ie,oe=t(71171),re=t(1192),ae=t(2484),le=t(5873),ce=t(88764),se=t(55402),ue=t(23645),de=t(33518),fe=t(49522);function ve(n){var e=n.className,t=n.navigation,i=(0,In.y0)().blocklet,o=(0,fe.Z)({blocklet:i}).logoUrl,r={appId:i.appDid,appLogo:o,appName:i.meta.title,enableConnect:!0,enableLocale:!1,navigation:t};return(0,D.jsx)(ce.Z,{children:(0,D.jsxs)(l.Z,{className:e,children:[(0,D.jsx)(re.Z,{meta:r}),(0,D.jsx)(l.Z,{children:(0,D.jsx)(le.Z,{meta:r,invalidPathFallback:function(){},headerProps:{style:{display:"none"}},children:(0,D.jsx)(se.ZP,{container:!0,spacing:2,children:new Array(6).fill().map((function(n,e){return(0,D.jsxs)(se.ZP,{item:!0,xs:4,children:[(0,D.jsx)(ue.Z,{animation:!1,variant:"rectangular",width:"100%",height:120}),(0,D.jsxs)(l.Z,{sx:{pt:.5},children:[(0,D.jsx)(ue.Z,{animation:!1}),(0,D.jsx)(ue.Z,{width:"60%",animation:!1})]})]},e)}))})})}),(0,D.jsx)(ae.Z,{meta:r})]})})}ve.propTypes={className:w().string,navigation:w().array},ve.defaultProps={className:"",navigation:[]};var me=(0,de.default)(ve)(ie||(ie=(0,oe.Z)(["\n .dashboard {\n height: auto !important;\n }\n .dashboard-content + div {\n display: none;\n }\n"]))),pe={login:S(),logout:S(),switch:S(),switchDid:S(),switchProfile:S(),switchPassport:S(),useDid:function(){return{walletDid:"abcdefghijklmnopqrstuvwxyz"}},useOAuth:function(){return{logoutOAuth:S(),bindOAuth:S(),configs:{},switchOAuthPassport:S()}}},he={header:"Header",footer:"Footer",bottom:"Footer Link",social:"Footer Social",dashboard:"Dashboard",sessionManager:"SessionManager"};var ge=function(){var n=(0,Z.PE)().t,e=(0,In.y0)().blocklet,t=(0,a.useRef)(null),N=(0,Dn.DJ)().roles,S=(0,b.Z)({saveLoading:!1,resetLoading:!1,showResetConfirm:!1,mockRole:"owner"}),L=te(),w=L.state,P=L.navigation,C=L.getNavigation,O=L.saveNavigationList,A=L.resetNavigation,E=L.updateActiveSection,R=L.updateNavigationTree,T=L.updateNavigationItem,M=L.delNavigationItem,_=L.addNavigationItem,I=(0,a.useCallback)((function(n){t.current.add({parent:n},(function(n,e){_(e),n()}))}),[_]),W=(0,a.useCallback)((function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(n){case"edit":t.current.edit(e,(function(n,e){T(e),n()}));break;case"toggle":T({id:e.id,visible:!e.visible});break;case"del":M(e.id)}}),[M,T]),z=(0,a.useCallback)((0,r.Z)((0,o.Z)().mark((function e(){return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,S.saveLoading=!0,e.next=4,O(w.rawNavigation);case 4:x.Z.success(n("common.succeeded")),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),x.Z.error((0,D.jsxs)(l.Z,{children:[(0,D.jsx)(h.Z,{variant:"subtitle2",children:n("navigation.actionFailed")}),(0,D.jsx)(h.Z,{variant:"body1",children:(0,Xn.Z)(e.t0)||e.t0.error})]}));case 10:return e.prev=10,S.saveLoading=!1,e.finish(10);case 13:case"end":return e.stop()}}),e,null,[[0,7,10,13]])}))),[w.rawNavigation,S,O,n]),F=(0,a.useCallback)((0,r.Z)((0,o.Z)().mark((function e(){return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,S.resetLoading=!0,e.next=4,A();case 4:x.Z.success("\u91cd\u7f6e\u6210\u529f",{variant:"success"}),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),x.Z.error((0,D.jsxs)(l.Z,{children:[(0,D.jsx)(h.Z,{variant:"subtitle2",children:n("navigation.actionFailed")}),(0,D.jsx)(h.Z,{variant:"body1",children:(0,Xn.Z)(e.t0)||e.t0.error})]}));case 10:return e.prev=10,S.resetLoading=!1,e.finish(10);case 13:case"end":return e.stop()}}),e,null,[[0,7,10,13]])}))),[S,A,n]),q=(0,a.useMemo)((function(){return{session:(0,i.Z)((0,i.Z)({},pe),{},{user:{did:e.appDid,fullName:"Preview User",role:S.mockRole}})}}),[e.appDid,S.mockRole]);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(s.Z,{variant:"outlined",children:Object.keys(he).map((function(n){return(0,D.jsxs)(c.Z,{variant:w.activeSection===n?"contained":void 0,onClick:function(){return E(n)},children:[he[n]," (".concat(C(n).length,")")]},n)}))}),(0,D.jsxs)(p.Z,{variant:"dense",sx:{paddingLeft:"0px !important",paddingRight:"0px !important",mt:2},children:[(0,D.jsx)(h.Z,{variant:"h6",component:"div",sx:{flexGrow:1},children:"Config"}),(0,D.jsx)(s.Z,{variant:"outlined",children:(0,D.jsx)(g.Z,{size:"small",variant:"outlined",color:"error",startIcon:(0,D.jsx)(k.JO,{icon:"system-uicons:reset"}),sx:{mr:2},loading:S.resetLoading,loadingPosition:"start",onClick:function(){S.showResetConfirm=!0},children:"\u91cd\u7f6e"})}),(0,D.jsxs)(s.Z,{variant:"outlined",children:[(0,D.jsx)(c.Z,{size:"small",variant:"outlined",startIcon:(0,D.jsx)(k.JO,{icon:"mdi:plus"}),onClick:function(){return I()},children:"\u65b0\u5efa"}),(0,D.jsx)(g.Z,{size:"small",variant:"contained",startIcon:(0,D.jsx)(k.JO,{icon:"mdi:content-save"}),loading:S.saveLoading,loadingPosition:"start",onClick:z,children:"\u4fdd\u5b58"})]})]}),(0,D.jsx)(v.Z,{variant:"outlined",sx:{display:"flex",height:280,overflow:"hidden"},children:(0,D.jsx)(v.Z,{elevation:0,sx:{flex:1,overflow:"auto"},children:(0,D.jsx)(J,{treeData:C(w.activeSection),setTreeData:R,renderActions:function(n){var e=n.data,t=n.className;return(0,D.jsx)(Bn,{data:e,className:t,section:w.activeSection,add:function(){return I.apply(void 0,arguments)},del:function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return W.apply(void 0,["del"].concat(e))},edit:function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return W.apply(void 0,["edit"].concat(e))},toggle:function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return W.apply(void 0,["toggle"].concat(e))}})}})})}),(0,D.jsxs)(p.Z,{variant:"dense",sx:{paddingLeft:"0px !important",paddingRight:"0px !important",mt:3},children:[(0,D.jsx)(h.Z,{variant:"h6",component:"div",sx:{flexGrow:1},children:"Preview"}),(0,D.jsxs)(u.Z,{sx:{m:1,minWidth:120},size:"small",children:[(0,D.jsx)(d.Z,{children:"Role"}),(0,D.jsx)(m.Z,{value:S.mockRole,label:"Role",onChange:function(n){S.mockRole=n.target.value},children:N.map((function(n){return(0,D.jsx)(f.Z,{value:n.name,children:n.title},n.name)}))})]})]}),(0,D.jsx)(v.Z,{variant:"outlined",children:(0,D.jsx)(y.B3.Provider,{value:q,children:(0,D.jsx)(me,{navigation:P})})}),(0,D.jsx)(qn,{ref:t,section:w.activeSection,components:w.components,rawNavigations:w.rawNavigation}),(0,D.jsx)(j.I,{open:S.showResetConfirm,title:"\u662f\u5426\u6e05\u7a7a\u6240\u6709\u81ea\u5b9a\u4e49\u5bfc\u822a",onConfirm:function(){var n=(0,r.Z)((0,o.Z)().mark((function n(){return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,F();case 2:S.showResetConfirm=!1;case 3:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}(),onCancel:function(){S.showResetConfirm=!1},children:(0,D.jsx)("p",{children:"\u6e05\u7a7a\u540e\uff0c\u5bfc\u822a\u4f1a\u6062\u590d\u5230 Blocklet \u539f\u6709\u9ed8\u8ba4\u7684\u914d\u7f6e"})})]})}}}]);
1
+ "use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[4775],{19371:function(n,e,t){var i=t(38636).default,o=t(73408).default,r=t(814).default,a=this&&this.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(e,"__esModule",{value:!0}),e.splitNavigationBySection=e.flattenNavigation=e.checkLink=e.joinLink=e.cleanOrphanNavigation=e.filterNavigation=e.nestNavigationList=e.isMatchSection=e.deepWalk=e.parseNavigation=void 0;var l=a(t(10905)),c=a(t(50482)),s=a(t(8708)),u=a(t(3785)),d=a(t(24914)),f=a(t(25842)),v=a(t(6352)),m=a(t(56977)),p=a(t(6018)),h=t(65873),g="header",x="/",k="/",b="/",j=function(n){return!(!(0,p.default)(n)&&!function(n){return/^\/(?:[^/]+\/)*$/.test(n)||/^\/(?:[^/]+\/)*[^/]+$/.test(n)}(n))};function Z(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t.key,o=void 0===i?"children":i,r=t.order,a=void 0===r?"first":r;!function n(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=i.index,l=void 0===r?0:r,c=i.parent,s=void 0===c?null:c,u=i.level,d=void 0===u?0:u;Array.isArray(t)?t.forEach((function(e,t){n(e,{index:t,parent:s,level:d+1})})):t&&("first"===a&&e(t,s,{index:l,level:d}),n(t[o],{parent:t,level:d}),"last"===a&&e(t,s,{index:l,level:d}))}(n)}function y(n,e){return!(e!==g||!(0,u.default)(n))||(Array.isArray(n)?n.includes(e):n===e)}function N(n){try{return JSON.parse(n)}catch(e){return n}}function S(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,p.default)(e||""))return e;var t=m.default.join(n,e||k);return t.length>1&&t.endsWith("/")?t.slice(0,t.length-1):t}function L(n,e){var t=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).strict,i=n,r=e;return void 0===t||t||(i=i||"/",r=r||"/"),(0,h.isObject)(i)&&(0,h.isString)(r)&&j(r)?Object.keys(i).reduce((function(n,e){return n[e]=S(i[e],r),n}),{}):(0,h.isString)(i)&&j(i)&&(0,h.isObject)(r)?Object.keys(r).reduce((function(n,e){return n[e]=S(i,r[e]),n}),{}):(0,h.isString)(i)&&(0,h.isString)(r)?j(i)||j(r)?S(i,r):r:(0,h.isObject)(i)&&(0,h.isObject)(r)?o(new Set([].concat(o(Object.keys(i)),o(Object.keys(r))))).reduce((function(n,e){return n[e]=S(i[e],r[e]),n}),{}):r}function w(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.depth,i=void 0===t?1:t,r=e.transform,a=void 0===r?function(n){return n}:r,l=(0,f.default)(n),c=[];return Z(l,(function(n,e,t){var r=t.level;if(r>=i){var l=n.items,s=void 0===l?[]:l;if(s&&Array.isArray(s)&&s.length>0){delete n.items;var u=s.map((function(e){return a(e,n)}));if(e){var f;(f=e.items).push.apply(f,o(u))}else{var v=a((0,d.default)(n,["items"]),e);c.push.apply(c,[v].concat(o(u)))}}else if(1===r){var m=a((0,d.default)(n,["items"]),e);c.push(m)}}else 1===r&&c.push(n)}),{key:"items",order:"last"}),c}function P(n){var e,t=(0,f.default)(n),a=[],l=i(t);try{var c=function(){var n=e.value,t=(0,f.default)((0,d.default)(n,["items"])),l=[];function c(n,e){var i=function(n,e){return e&&Array.isArray(n.items)?n.items.filter((function(t){return(0,u.default)(t.section)?y(n.section,e):!!y(t.section,e)})).map((function(n){return r(r({},n),{},{section:e})})):[]}(n,e);l.push(r(r({},t),{},{section:e,items:i}))}if(Array.isArray(n.section)){var s,v=i(n.section);try{for(v.s();!(s=v.n()).done;){c(n,s.value)}}catch(k){v.e(k)}finally{v.f()}}else if(n.section){c(n,n.section)}else if(n.items&&n.items.length>0){var m,p=n.items.reduce((function(n,e){var t=(e||{}).section,i=void 0===t?[g]:t;return n.push.apply(n,o(i)),n}),[]),h=o(new Set(p)),x=i(h);try{for(x.s();!(m=x.n()).done;){c(n,m.value)}}catch(k){x.e(k)}finally{x.f()}}else l.push(r(r({},n),{},{section:g}));a.push.apply(a,l)};for(l.s();!(e=l.n()).done;)c()}catch(s){l.e(s)}finally{l.f()}return a}function C(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=(0,f.default)(n);return e.reduceRight((function(n,t,i){if(t.parent){var r=e.find((function(n){return t.section&&n.section?n.section===t.section&&n.id===t.parent:n.id===t.parent}));r&&(r.items||(r.items=[]),r.items=[t].concat(o(r.items))),e.splice(i,1)}return null}),null),e}e.checkLink=j,e.deepWalk=Z,e.isMatchSection=y,e.joinLink=function(n,e){var t=(0,f.default)(n);return Z(t,(function(n,t){var i=n.component||n.child;if(i){var o=e.find((function(n){return n.name===i}));o&&(n.link=L(o.link,n.link,{strict:!1}))}else t&&(n.link=L(t.link,n.link))}),{key:"items"}),t},e.flattenNavigation=w,e.splitNavigationBySection=P,e.nestNavigationList=C,e.filterNavigation=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=C(n);return Z(t,(function(n){if(null!==n&&void 0!==n&&n.component&&(e.some((function(e){return e.name===n.component}))||(n.visible=!1)),n.items&&n.items.length)for(var t=n.items.length-1;t>=0;t--)!1===n.items[t].visible&&n.items.splice(t,1)}),{key:"items"}),t.filter((function(n){var e;return!1!==n.visible&&!(n.items&&Array.isArray(n.items)&&n.items.length>0&&null!==(e=n.items)&&void 0!==e&&e.every((function(n){return!1===n.visible})))}))},e.cleanOrphanNavigation=function(n){return n.map((function(n){return n.items&&Array.isArray(n.items)&&1===n.items.length&&["header","footer","",void 0,null].includes(n.section)?n.items[0]:n}))},e.parseNavigation=function(){var n,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).beforeProcess,a=void 0===t?function(n){return n}:t,u=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],t=function t(a){var l,c,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=[],d=a.children,m=void 0===d?[]:d,p=a.meta,h=void 0===p?{}:p,b=(0,f.default)((null===h||void 0===h?void 0:h.navigation)||[]);!1!==(null===(l=a.meta)||void 0===l||null===(c=l.capabilities)||void 0===c?void 0:c.navigation)&&u.push.apply(u,o(b));var j,Z=s.name||"",y=s.mountPoint||x,N=a===n?"":h.name||"",S=a===n?"":a.mountPoint||x,L=i(m);try{var w=function(){var n,i,a,l,c=j.value,s=c.meta.name,d=c.mountPoint,f=[Z,N,s].filter(Boolean).join("."),m=c.meta.navigation||[],p=(0,v.default)(y,S,d);!1!==(null===(n=c.meta)||void 0===n||null===(i=n.capabilities)||void 0===i?void 0:i.navigation)&&e.push({did:c.meta.did,name:f,link:p,title:c.meta.title||"",navigation:m.map((function(n){return r({section:g},n)}))});var h=b.find((function(n){return!!n.component&&n.component===s}));if(h){if(!h.link)if(c.meta.navigation&&c.meta.navigation.length>0){var x,L,w=t(c,{mountPoint:S,name:N});w.length>0&&(h.items=null!==(x=h.items)&&void 0!==x?x:[],(L=h.items).push.apply(L,o(w)))}else h.link=k}else if(!1!==(null===(a=c.meta)||void 0===a||null===(l=a.capabilities)||void 0===l?void 0:l.navigation)){var P=t(c,{mountPoint:S,name:N}),C={title:c.meta.title,component:s,id:c.meta.did};P.length>0?(C.items=P,C.link=void 0):C.link=k,u.push(C)}};for(L.s();!(j=L.n()).done;)w()}catch(P){L.e(P)}finally{L.f()}return u}(n);return{navigationList:t,components:e}}(e),d=u.navigationList,m=u.components,p=(null===e||void 0===e||null===(n=e.settings)||void 0===n?void 0:n.navigations)||[],h=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,t=w((0,f.default)(n),{depth:e,transform:function(n,e){var t;return e&&(n._parent||(n._parent=e.id,e.component||(n.link=L(e.link,n.link))),n.section=n.section||e.section||[g],n.visible=null!==(t=n.visible)&&void 0!==t?t:e.visible),n.component=[e.component,n.component].filter(Boolean).join("."),n}});return Z(t,(function(n){n.items&&n.items.length>0&&n.items.reduceRight((function(e,t){if(t._parent){var i=n.items.findIndex((function(n){return n.id===t._parent}));i>=0&&n.items.splice(i,1),delete t._parent}return null}),null)}),{key:"items"}),t}(a(d)),j=w(P(function(n){var e=(0,f.default)(n).filter((function(n){return n.id}));return Z(e,(function(n,e){var t;if(n.items&&n.items.length){for(var i=n.items.length-1;i>=0;i--)n.items[i].id||n.items.splice(i,1);0===n.items.length&&n.component&&(n.link=n.link||k)}e&&(n.parent=e.id,n.id=[e.id,n.id].join(b)),n.from=n.from||"yaml",n.visible=null===(t=n.visible)||void 0===t||t}),{key:"items"}),e}(h)).reduce((function(n,e){var t=["bottom","social","sessionManager"].includes(e.section),i=!1,a=m.find((function(n){return"/"===n.link}));if(a&&e.id===a.did&&(i=!0),t||i){if(e.items&&e.items.length>0)return n.push.apply(n,o(e.items.map((function(n){var t=e.section,i=L(e.link,n.link),o=[e.component,n.component].filter(Boolean).join(".");return r(r({},n),{},{section:t,link:i,component:o,parent:""})})))),n;if(i)return n}return n.push(e),n}),[]),{transform:function(n,e){var t=n.component;return null!==e&&void 0!==e&&e.component&&(t=[e.component,n.component].filter(Boolean).join(".")),r(r({},n),{},{component:t})}});return{navigationList:(0,l.default)(p.map((function(n){var e=r({},n);return e.role&&(e.role=N(e.role)),e.section&&(e.section=N(e.section)),e.title&&(e.title=N(e.title)),e.link&&(e.link=N(e.link)),e})),j,(function(n,e){var t=["id","section"];return(0,c.default)((0,s.default)(n,t),(0,s.default)(e,t))})),components:m,builtinList:j}}},14775:function(n,e,t){t.r(e),t.d(e,{default:function(){return ge}});var i=t(33028),o=t(32723),r=t(34795),a=t(5057),l=t(39948),c=t(56556),s=t(80633),u=t(80576),d=t(6041),f=t(74490),v=t(25228),m=t(51177),p=t(95301),h=t(11750),g=t(39067),x=t(86229),k=t(55498),b=t(12673),j=t(13128),Z=t(68420),y=t(74639),N=t(92706),S=t.n(N),L=t(55898),w=t.n(L),P=t(37660),C=t(86272),O=t.n(C),A=t(26271),E=t.n(A),R=t(50482),T=t.n(R),M=t(20877),_=t(36095),D=t(96266);function I(n){var e=n.prevPath,t=n.nextPath,i=e.length,o=t.length;return!(i!==o||!T()(e.slice(0,i-1),t.slice(0,o-1)))}function W(n){var e=n.treeNode,t=(0,Z.PE)().locale;return(0,D.jsxs)(D.Fragment,{children:[e.icon&&(0,D.jsx)(k.JO,{style:{marginRight:4},icon:e.icon}),function(){var n=e.title,i=e.subtitle,o=n,r=i;return E()(n)&&(o=n[t]),!(0,a.isValidElement)(i)&&E()(i)&&(r=i[t]),(0,D.jsxs)(l.Z,{display:"flex",alignItems:"center",children:[(0,D.jsx)(h.Z,{variant:"subtitle1",fontSize:16,children:o}),i&&(0,D.jsx)(h.Z,{variant:"body2",color:"gray",ml:1.5,children:r})]})}()]})}function z(n){var e=n.treeData,t=n.setTreeData,o=n.renderActions,r=e.map((function(n){return(0,i.Z)((0,i.Z)({},n),{},{expanded:!0})})),a={};return"undefined"!==typeof window&&(a.context=window),(0,D.jsx)(_.W,(0,i.Z)((0,i.Z)({backend:M.HTML5Backend},a),{},{children:(0,D.jsx)(P.oP,{generateNodeProps:function(n){return{buttons:o({data:n.node,className:"list-item-actions"}),icons:(0,D.jsx)(k.JO,{icon:"ic:round-drag-indicator"}),title:(0,D.jsx)(W,{treeNode:n.node})}},maxDepth:2,isVirtualized:!1,treeData:r,onChange:t,canDrop:I,theme:O()})}))}W.propTypes={treeNode:w().object.isRequired},z.propTypes={treeData:w().object.isRequired,setTreeData:w().func,renderActions:w().func},z.defaultProps={setTreeData:function(){},renderActions:function(){}};var J=z,F=t(96234),q=t(56666),V=t(28726),B=t(75953),G=t(67680),U=t(53070),H=t(47020),Q=t(41899),K=t(11251),X=t(24914),$=t.n(X),Y=t(8708),nn=t.n(Y),en=t(82488),tn=t.n(en),on=t(78164),rn=t.n(on),an=t(75506),ln=t.n(an),cn=t(2765),sn=t.n(cn),un=t(25842),dn=t.n(un),fn=t(95550),vn=t(19371),mn=t(6352),pn=t.n(mn),hn=t(2842),gn=t(6018),xn=t.n(gn),kn=t(76811),bn=t(68079),jn=t(63838),Zn=t(65873),yn=t(27156),Nn=t(23985),Sn=t(11819),Ln=t(59740),wn=t(19654),Pn=t(90067),Cn=t(44067),On=t(12594),An=["fullWidth","multiple","required","label","placeholer","options","helperText","error","margin"];function En(n){var e=n.fullWidth,t=n.multiple,o=n.required,r=n.label,a=n.placeholer,c=n.options,s=n.helperText,v=n.error,p=n.margin,g=(0,Ln.Z)(n,An),x=c.find((function(n){return n.value===g.value})),k=null===x||void 0===x?void 0:x.title;return(0,D.jsxs)(u.Z,{margin:p,fullWidth:e,error:v,children:[(0,D.jsx)(d.Z,{children:"".concat(r).concat(o?"*":"")}),(0,D.jsxs)(m.Z,(0,i.Z)((0,i.Z)({multiple:t,input:(0,D.jsx)(On.Z,{defaultValue:k,sx:{flex:1},required:o,label:r,inputProps:{margin:p}}),renderValue:function(n){if(t)return(0,D.jsx)(l.Z,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:n.map((function(n){var e=c.find((function(e){return e.value===n}));return e&&e.title&&(0,D.jsx)(wn.Z,{size:"small",label:e.title},n)}))});var e=c.find((function(e){return e.value===n}));return e&&e.title&&(0,D.jsxs)(l.Z,{children:[(0,D.jsx)(h.Z,{component:"span",children:e.title}),(0,D.jsx)(h.Z,{marginLeft:1,component:"span",variant:"body2",color:"text.secondary",children:e.description})]})}},g),{},{children:[(0,D.jsx)(f.Z,{disabled:!0,children:(0,D.jsx)("em",{children:a})}),!t&&(0,D.jsx)(f.Z,{value:"",children:"None"}),c.map((function(n){return n&&n.value&&(0,D.jsxs)(f.Z,{value:n.value,children:[(0,D.jsx)(Cn.Z,{children:n.title}),n.description&&(0,D.jsx)(h.Z,{variant:"body2",color:"text.secondary",children:n.description})]},n.value)}))]})),(0,D.jsx)(Pn.Z,{children:s})]})}En.propTypes={error:w().bool,required:w().bool,multiple:w().bool,fullWidth:w().bool,label:w().string,placeholer:w().string,options:w().array,helperText:w().string,margin:w().string},En.defaultProps={error:!1,required:!1,multiple:!1,fullWidth:!1,label:"",placeholer:"",options:[],helperText:"",margin:""};var Rn=En,Tn="en";function Mn(n){var e=n.sx,t=n.onAdd,i=n.onChange,o=n.locales,r=n.localeMap,s=n.onRemoveLocale,u=(0,Z.PE)().t,d=(0,a.useRef)(),f=(0,a.useState)(null),v=(0,F.Z)(f,2),m=v[0],p=v[1],g=(0,b.Z)({currentLocale:Tn,localeList:[],inputLocale:"",localeError:""}),x=(0,a.useMemo)((function(){return!!m}),[m]),j=(0,a.useMemo)((function(){return o.includes(g.currentLocale)?g.currentLocale:Tn}),[o,g.currentLocale]),y=(0,a.useMemo)((function(){return Object.keys((0,Zn.omit)(r,[].concat((0,bn.Z)(g.localeList),[Tn]))).map((function(n){return{title:r[n],value:n}}))}),[g.localeList]);function N(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=function(n){return n?"en"!==n&&!g.localeList.includes(n)||u("navigation.form.localeExists",{value:n}):u("common.requiredErrorText",{name:"Locale"})}(null===n||void 0===n?void 0:n.trim());return g.localeError=!0!==e?e:"",e}function S(){var n,e=null===(n=g.inputLocale)||void 0===n?void 0:n.trim();!0===N(e)&&(L(),g.localeList.push(e),g.currentLocale=e,t(e))}function L(){p(null),g.inputLocale="",g.localeError=""}return(0,a.useEffect)((function(){g.localeList=(0,bn.Z)(o)}),[o,g]),(0,jn.Z)("enter",(function(){setTimeout((function(){S()}))}),{target:d}),(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(yn.Z,{sx:e,value:j,onChange:function(n,e){g.currentLocale=e,i(e)},children:[(0,D.jsx)(Nn.Z,{label:"Default (".concat(r[Tn],")"),value:"en"}),g.localeList.map((function(n){return(0,D.jsx)(Nn.Z,{sx:{position:"relative"},label:(0,D.jsxs)(D.Fragment,{children:[r[n],(0,D.jsx)(G.Z,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:function(e){!function(n,e){n.preventDefault(),n.stopPropagation(),g.localeList=(0,Zn.without)(g.localeList,e),s(e),e===g.currentLocale&&(g.currentLocale=Tn)}(e,n)},children:(0,D.jsx)(k.JO,{icon:"mdi:close",height:14})})]}),value:n},n)})),(0,D.jsx)(G.Z,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:function(n){p(n.currentTarget)},children:(0,D.jsx)(k.JO,{icon:"mdi:plus"})})]}),(0,D.jsx)(Sn.ZP,{open:x,anchorEl:m,onClose:L,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:(0,D.jsxs)(l.Z,{sx:{p:2,width:"270px"},children:[(0,D.jsx)(h.Z,{variant:"subtitle2",children:u("navigation.form.localePlaceholder")}),(0,D.jsx)(l.Z,{mt:1,children:(0,D.jsx)(Rn,{required:!0,fullWidth:!0,label:"Locale",value:g.inputLocale,options:y,onChange:function(n){var e=n.target.value;N(e),g.inputLocale=e},error:!!g.localeError,helperText:g.localeError||" "})}),(0,D.jsx)(l.Z,{display:"flex",justifyContent:"flex-end",children:(0,D.jsx)(c.Z,{size:"small",variant:"contained",onClick:S,children:u("common.confirm")})})]})})]})}Mn.propTypes={sx:w().any,onAdd:w().func,onChange:w().func,onRemoveLocale:w().func,localeMap:w().object,locales:w().array},Mn.defaultProps={sx:null,onAdd:function(){},onChange:function(){},onRemoveLocale:function(){},localeMap:{},locales:[]};var _n=Mn,Dn=t(17425),In=t(29054),Wn="en",zn={title:(0,q.Z)({},Wn,""),link:(0,q.Z)({},Wn,"")};function Jn(n){var e=n.icon,t=(0,a.useState)(!1),i=(0,F.Z)(t,2),l=i[0],c=i[1];return(0,Q.Z)((0,r.Z)((0,o.Z)().mark((function n(){return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c(!1),n.next=3,(0,k.GL)(e);case 3:c(!0);case 4:case"end":return n.stop()}}),n)}))),[e]),e?l?(0,D.jsx)(k.JO,{icon:e}):(0,D.jsx)(k.JO,{color:"#f06f6e",icon:"ic:baseline-error"}):(0,D.jsx)(k.JO,{icon:"codicon:blank"})}Jn.propTypes={icon:w().string.isRequired};var Fn=(0,a.forwardRef)((function(n,e){var t=n.section,c=n.components,s=n.rawNavigations,d=(0,Dn.DJ)().roles,f=(0,Z.PE)(),v=f.t,m=f.locale,p=(0,In.y0)().blocklet.environments.find((function(n){return"BLOCKLET_APP_LANGUAGES"===n.key})),g=(p?p.value.split(","):["en","zh"]).filter((function(n){return kn.SUPPORTED_LANGUAGES[n]})).reduce((function(n,e){return n[e]=kn.SUPPORTED_LANGUAGES[e].nativeName,n}),{}),y=(0,a.useRef)((function(){})),N=(0,K.Z)(!1),S=(0,F.Z)(N,2),L=S[0],w=S[1],P=w.setFalse,C=w.setTrue,O=(0,b.Z)({isRoot:!0,type:"add",linkDisabled:!1,locale:Wn,formState:dn()(zn),get localeList(){return rn()(Object.keys(this.formState.title),Wn)}}),A=(0,fn.cI)({mode:"onChange",defaultValues:{id:void 0,title:void 0,icon:void 0,link:void 0,component:void 0,parent:void 0,role:[]}}),R=A.handleSubmit,T=A.control,M=A.watch,_=A.setValue,I=A.clearErrors,W=A.formState.errors;(0,a.useEffect)((function(){_("title",O.formState.title[O.locale]),_("link",O.formState.link[O.locale])}),[_,O.locale,L]);var z=M("component"),J=M("title"),Q=M("link"),X=M("icon"),Y=M("parent");(0,a.useEffect)((function(){O.formState.title[O.locale]=J}),[J]),(0,a.useEffect)((function(){O.formState.link[O.locale]=Q}),[Q]);var en=(0,a.useMemo)((function(){return s.find((function(n){return z?c.find((function(n){return n.name===z})).did===n.id:n.id===Y}))}),[c,s,z,Y]),on=(0,a.useMemo)((function(){if(null!==en&&void 0!==en&&en.component){var n=(c.find((function(n){return n.name===en.component}))||{}).link,e=E()(n)?n[O.locale]:n;if(z)return(0,hn.QT)(e);var t=E()(en.link)?en.link[O.locale]:en.link;return(0,hn.QT)(pn()(e,t||"/"))}return null}),[c,O.locale,en,z]),an=(0,a.useMemo)((function(){var n=(en||{}).component,e=(c.find((function(e){return e.name===n}))||{}).navigation,i=void 0===e?[]:e;return(0,vn.flattenNavigation)(i,{transform:function(n,e){return null!==e&&void 0!==e&&e.section&&(n.section=n.section||e.section),n}}).filter((function(n){return n.link})).filter((function(n){return(0,vn.isMatchSection)(n.section,t)})).map((function(n){return{label:n.link,title:n.title[m]||n.title}}))}),[en,c,t,m]),cn=(0,a.useMemo)((function(){var n={add:v("common.create"),edit:v("common.edit")}[O.type];return n?"".concat(n," ").concat(v("navigation.navigation")):"--"}),[O.type,v]),un=(0,a.useCallback)((function(){O.isRoot=!0,O.locale=Wn,O.type="add",O.linkDisabled=!1,y.current=function(){},_("id",void 0),_("icon",void 0),_("title",void 0),_("link",void 0),_("component",void 0),_("parent",void 0),_("role",[]),O.formState=dn()(zn),I()}),[I,_,O]),mn=(0,a.useCallback)((function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return O.localeList.length>0&&(new Set(tn()(O.formState.title)).size>1&&(n.title=O.formState.title),new Set(tn()(O.formState.link)).size>1&&(n.link=O.formState.link)),ln()(n.role)&&(n.role=void 0),n}),[O.formState.link,O.formState.title,O.localeList]),gn=(0,a.useCallback)((function(){P(),setTimeout((function(){un()}))}),[un,P]),bn=(0,a.useCallback)((function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).parent,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};O.type="add",O.isRoot=!n,_("parent",null===n||void 0===n?void 0:n.id),y.current=function(n){e(gn,n)},C()}),[gn,C,_,O]),jn=(0,a.useCallback)((function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},t=n.id,i=n.title,o=n.icon,r=n.link,a=n.parent,l=n.component,c=n.role,s=void 0===c?[]:c;_("id",t),_("icon",o),"tmpl"===n.from&&(O.linkDisabled=!0),sn()(i)?O.formState.title=O.localeList.reduce((function(n,e){return n[e]=i,n}),(0,q.Z)({},Wn,i)):E()(i)?O.formState.title=dn()(i):O.formState.title={},sn()(r)?O.formState.link=O.localeList.reduce((function(n,e){return n[e]=r,n}),(0,q.Z)({},Wn,r)):E()(r)?O.formState.link=dn()(r):O.formState.link={},_("component",l),_("parent",a),_("role",s||[]),C(),O.type="edit",O.isRoot=!a,y.current=function(n){var t=nn()(n,["id","title","icon","link","role"]);e(gn,t)}}),[gn,C,_,O]);function Zn(n){var e=null===n||void 0===n?void 0:n.trim();return e?!(e.length>24)||v("navigation.form.titleTooLong",{len:24}):v("common.requiredErrorText",{name:v("navigation.form.title")})}function yn(){return(yn=(0,r.Z)((0,o.Z)().mark((function n(e){var t;return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(t=null===e||void 0===e?void 0:e.trim())){n.next=10;break}return n.prev=2,n.next=5,(0,k.GL)(t);case 5:n.next=10;break;case 7:return n.prev=7,n.t0=n.catch(2),n.abrupt("return",v("navigation.form.invalidIcon"));case 10:return n.abrupt("return",!0);case 11:case"end":return n.stop()}}),n,null,[[2,7]])})))).apply(this,arguments)}function Nn(n){var e=null===n||void 0===n?void 0:n.trim();return e?!!(0,vn.checkLink)(e)||v("navigation.form.invalidLink"):!!O.isRoot||v("common.requiredErrorText",{name:v("navigation.form.link")})}(0,a.useImperativeHandle)(e,(function(){return{add:bn,edit:jn,close:gn}}),[bn,gn,jn]);var Sn=(0,a.useCallback)((function(n){O.locale=n,O.formState.title[n]||(O.formState.title[n]=""),O.formState.link[n]||(O.formState.link[n]=""),setTimeout((function(){I()}))}),[I,O]),Ln=(0,a.useCallback)((function(){for(var n=O.formState,e=n.title,t=n.link,i=0,o=Object.keys(e);i<o.length;i++){var r=Zn(e[o[i]]);if(!0!==r)return r}for(var a=0,l=Object.keys(t);a<l.length;a++){var c=Nn(t[l[a]]);if(!0!==c)return c}return!0}),[O.formState]),wn=(0,a.useCallback)((function(n){var e=Ln();!0===e?y.current(mn(n)):x.Z.error(e)}),[Ln,mn]),Pn=(0,a.useCallback)((function(n){O.formState.title=$()(O.formState.title,n),O.formState.link=$()(O.formState.link,n)}),[O.formState]),Cn=(0,a.useCallback)((function(n){var e,t;O.locale=n,O.formState.title[n]=null===(e=O.formState.title)||void 0===e?void 0:e[Wn],O.formState.link[n]=null===(t=O.formState.link)||void 0===t?void 0:t[Wn],setTimeout((function(){I()}))}),[I,O]);return(0,D.jsxs)(j.ZP,{open:L,title:cn,onClose:gn,actions:(0,D.jsx)(V.Z,{onClick:R(wn),color:"primary",autoFocus:!0,variant:"contained",children:v("common.confirm")}),children:[(0,D.jsx)(_n,{sx:{mb:1},onAdd:Cn,onChange:Sn,onRemoveLocale:Pn,localeMap:g,locales:O.localeList}),(0,D.jsxs)("form",{noValidate:!0,autoComplete:"off",children:[(0,D.jsx)(fn.Qr,{name:"title",control:T,rules:{validate:Zn},render:function(n){var e,t,o=n.field;return(0,D.jsx)(H.Z,(0,i.Z)({fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:v("navigation.form.titlePlaceholder"),label:v("navigation.form.title"),disabled:O.isEdit,error:!(null===W||void 0===W||null===(e=W.title)||void 0===e||!e.message),helperText:(null===W||void 0===W||null===(t=W.title)||void 0===t?void 0:t.message)||" "},o))}}),(0,D.jsx)(fn.Qr,{name:"icon",control:T,rules:{validate:function(n){return yn.apply(this,arguments)}},render:function(n){var e,t,o=n.field;return(0,D.jsx)(H.Z,(0,i.Z)((0,i.Z)({fullWidth:!0,variant:"outlined",margin:"dense",placeholder:v("navigation.form.iconPlaceholder"),label:v("navigation.form.icon"),error:!(null===W||void 0===W||null===(e=W.icon)||void 0===e||!e.message),disabled:O.locale!==Wn,helperText:(null===W||void 0===W||null===(t=W.icon)||void 0===t?void 0:t.message)||(0,D.jsx)(l.Z,{display:"flex",children:(0,D.jsxs)(l.Z,{component:"a",href:"https://icones.js.org",target:"_blank",display:"flex",alignItems:"center",children:[v("navigation.form.findMoreIcon")," ",(0,D.jsx)(k.JO,{style:{marginLeft:4},icon:"radix-icons:external-link"})]})})},o),{},{InputProps:{endAdornment:(0,D.jsx)(U.Z,{position:"end",children:(0,D.jsx)(G.Z,{sx:{cursor:"default"},disableFocusRipple:!0,disableRipple:!0,children:X&&(0,D.jsx)(Jn,{icon:X})})})}}))}}),O.isRoot&&(0,D.jsx)(fn.Qr,{name:"component",control:T,render:function(n){var e,t,o=n.field;return(0,D.jsx)(Rn,(0,i.Z)({fullWidth:!0,margin:"dense",disabled:"edit"===O.type||O.locale!==Wn,label:v("navigation.form.component"),placeholer:v("navigation.form.componentPlaceholder"),options:c.map((function(n){return{title:n.title,value:n.name,description:n.link}})),error:!(null===W||void 0===W||null===(e=W.component)||void 0===e||!e.message),helperText:(null===W||void 0===W||null===(t=W.component)||void 0===t?void 0:t.message)||" "},$()(o,"ref")))}}),(0,D.jsx)(fn.Qr,{name:"link",control:T,rules:{validate:Nn},render:function(n){var e=n.field;return(0,D.jsx)(u.Z,{fullWidth:!0,margin:"dense",children:(0,D.jsx)(B.Z,(0,i.Z)((0,i.Z)({disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:O.linkDisabled,isOptionEqualToValue:function(n){return n.label},options:an,renderInput:function(n){var e,t;return(0,D.jsx)(H.Z,(0,i.Z)((0,i.Z)({},n),{},{placeholder:v("navigation.form.linkPlaceholder"),label:v("navigation.form.link"),error:!(null===W||void 0===W||null===(e=W.link)||void 0===e||!e.message),helperText:(null===W||void 0===W||null===(t=W.link)||void 0===t?void 0:t.message)||"/abc/bcd or /abc or https://arcblock.io",InputProps:{startAdornment:on?(0,D.jsx)(U.Z,{position:"start",sx:{textDecoration:xn()(Q||"")?"line-through":""},children:on}):null}}))},renderOption:function(n,e){return(0,D.jsxs)(l.Z,(0,i.Z)((0,i.Z)({component:"li"},n),{},{children:[e.label,(0,D.jsx)(h.Z,{marginLeft:1,component:"span",variant:"body2",color:"text.secondary",children:e.title})]}))},margin:"dense"},e),{},{onChange:function(){},onInputChange:function(n,t){e.onChange(t)}}))})}}),["dashboard","sessionManager"].includes(t)&&(0,D.jsx)(fn.Qr,{name:"role",control:T,render:function(n){var e,t,o=n.field;return(0,D.jsx)(Rn,(0,i.Z)({fullWidth:!0,multiple:!0,margin:"dense",label:v("navigation.form.role"),placeholer:v("navigation.form.rolePlaceholder"),options:d.map((function(n){return{title:n.title,value:n.name}})),error:!(null===W||void 0===W||null===(e=W.role)||void 0===e||!e.message),helperText:(null===W||void 0===W||null===(t=W.role)||void 0===t?void 0:t.message)||" "},$()(o,"ref")))}})]})]})}));Fn.propTypes={section:w().string,components:w().array,rawNavigations:w().array},Fn.defaultProps={section:"",components:[],rawNavigations:[]};var qn=Fn;function Vn(n){var e=n.className,t=n.add,i=n.edit,o=n.toggle,r=n.del,l=n.data,c=n.section,s=(0,Z.PE)().t,u=["yaml","tmpl"].includes(l.from),d=(0,a.isValidElement)(l.subtitle);function f(n){n.preventDefault(),n.stopPropagation()}var v=(0,a.useCallback)((function(n){f(n),t(l)}),[t,l]),m=(0,a.useCallback)((function(n){f(n),i(l)}),[i,l]),p=(0,a.useCallback)((function(n){f(n),o(l)}),[o,l]),h=(0,a.useCallback)((function(n){f(n),r(l)}),[r,l]);return(0,D.jsxs)("div",{className:e,children:[!l.parent&&["header","footer","dashboard"].includes(c)&&(0,D.jsx)("span",{title:s(d?"navigation.action.noAddSub":"navigation.action.addSub"),children:(0,D.jsx)(G.Z,{size:"small",color:"success",onClick:v,disabled:d,children:(0,D.jsx)(k.JO,{icon:"mdi:plus-box-outline"})})}),(0,D.jsx)("span",{title:s(d?"navigation.action.noEdit":"navigation.action.edit"),children:(0,D.jsx)(G.Z,{size:"small",color:"primary",onClick:m,disabled:d,children:(0,D.jsx)(k.JO,{icon:"mdi:pencil"})})}),(0,D.jsx)("span",{title:d?s("navigation.action.noEdit"):l.visible?s("navigation.action.hide"):s("navigation.action.show"),children:(0,D.jsx)(G.Z,{size:"small",color:"warning",onClick:p,disabled:d,children:!1===l.visible?(0,D.jsx)(k.JO,{icon:"mdi:eye-off-outline"}):(0,D.jsx)(k.JO,{icon:"mdi:eye-outline"})})}),(0,D.jsx)("span",{title:s(u&&!d?"navigation.action.noDel":"navigation.action.del"),children:(0,D.jsx)(G.Z,{disabled:u&&!d,size:"small",color:"error",onClick:h,children:(0,D.jsx)(k.JO,{icon:"mdi:delete"})})})]})}Vn.propTypes={data:w().object.isRequired,className:w().string,add:w().func,edit:w().func,toggle:w().func,del:w().func,section:w().string},Vn.defaultProps={className:"",add:function(){},edit:function(){},toggle:function(){},del:function(){},section:""};var Bn=Vn,Gn=t(3785),Un=t.n(Gn),Hn=t(79683),Qn=t.n(Hn),Kn=t(35432),Xn=t(14491),$n="/",Yn="header",ne={sessionManager:[{id:"/sessionManager",title:{en:"Manage",zh:"\u7ba1\u7406"},section:["sessionManager"],icon:"ion:settings-outline",link:"".concat(Kn.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin"),role:["owner","admin"],from:"tmpl"}],dashboard:[{id:"/access",title:{en:"Access",zh:"\u8bbf\u95ee\u63a7\u5236"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"tmpl",items:[{id:"member",title:{en:"Members",zh:"\u6210\u5458"},icon:"ant-design:user-outlined",link:"".concat(Kn.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin/members"),from:"tmpl"},{id:"passport",title:{en:"Passport",zh:"\u901a\u884c\u8bc1"},icon:"icon-park-outline:passport",link:"".concat(Kn.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin/passports"),from:"tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"\u4eea\u8868\u76d8"},icon:"ant-design:dashboard-outlined",link:"".concat(Kn.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin"),from:"tmpl"}]}]};function ee(n,e){return n.section&&e.section?n.section===e.section&&n.id===e.id:n.id===e.id}function te(){var n=(0,In.y0)(),e=n.blocklet,t=n.actions,l=(0,vn.parseNavigation)(e,{beforeProcess:function(n){var e=dn()(n);return ne.dashboard.forEach((function(n){e.some((function(e){return e.id===n.id}))||e.push(n)})),e.some((function(n){return n.id&&(n.section||[]).includes("sessionManager")}))||e.push.apply(e,(0,bn.Z)(ne.sessionManager)),e}}),c=l.navigationList,s=l.components,u=l.builtinList,d=(0,b.Z)({rawNavigation:dn()(c),activeSection:Yn,components:s}),f=(0,a.useMemo)((function(){return(0,vn.nestNavigationList)(d.rawNavigation)}),[d.rawNavigation]),v=(0,a.useMemo)((function(){var n=(0,vn.filterNavigation)(d.rawNavigation,s),e=(0,vn.joinLink)(n,s);return(0,vn.cleanOrphanNavigation)(e)}),[s,d.rawNavigation]);function m(n){if(!n.id)return"";var e=(0,vn.flattenNavigation)((0,vn.joinLink)(f,s)),t=e.find((function(e){return e.id===n.id}));function i(n){var e=n.name;return(0,D.jsx)(wn.Z,{label:"Uninstalled: ".concat(e),color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}if(null!==t&&void 0!==t&&t.component){if(!s.some((function(n){return n.name===t.component})))return(0,D.jsx)(i,{name:t.component})}else if(t.parent){var o=e.find((function(n){return n.id===t.parent}));if(null!==o&&void 0!==o&&o.component&&!s.some((function(n){return n.name===o.component})))return(0,D.jsx)(i,{name:o.component})}return null===t||void 0===t?void 0:t.link}function p(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$n;return n.map((function(n){var t=s.find((function(e){return e.name===n.component})),i=(null===t||void 0===t?void 0:t.link)||e,o=n.items||[],r=n.link;return{title:n.title,subtitle:m(n),link:r,icon:n.icon,children:p(o,r||$n),section:n.section,visible:n.visible,parent:n.parent,component:n.component,id:n.id,role:n.role,from:n.from,__base:i}}))}function h(n){return g.apply(this,arguments)}function g(){return(g=(0,r.Z)((0,o.Z)().mark((function n(e){var r,a;return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.map((function(n){return Qn()(n,Un())})),a=r.map((function(n){var e=(0,i.Z)({},n);return e.role&&Array.isArray(e.role)&&(e.role=JSON.stringify(e.role)),e.section&&Array.isArray(e.section)&&(e.section=JSON.stringify(e.section)),e.title&&e.title instanceof Object&&(e.title=JSON.stringify(e.title)),e.link&&e.link instanceof Object&&(e.link=JSON.stringify(e.link)),e})),n.next=4,t.configNavigations(a);case 4:case"end":return n.stop()}}),n)})))).apply(this,arguments)}function x(){return(x=(0,r.Z)((0,o.Z)().mark((function n(){return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,h([]);case 2:d.rawNavigation=dn()(u);case 3:case"end":return n.stop()}}),n)})))).apply(this,arguments)}return{state:d,navigation:v,components:s,getNavigationFullLink:m,updateActiveSection:function(n){d.activeSection=n},updateNavigationItem:function(n){!function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=d.rawNavigation.map((function(e){var t=n.find((function(n){return ee((0,i.Z)((0,i.Z)({},n),{},{section:d.activeSection}),e)}));return t?(0,i.Z)((0,i.Z)({},e),t):e}));d.rawNavigation=e}([n])},delNavigationItem:function(n){var e=d.rawNavigation.filter((function(e){return e.id===n||e.parent===n})).map((function(n){return n.id}));d.rawNavigation=d.rawNavigation.filter((function(n){return!e.includes(n.id)}))},addNavigationItem:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=(0,i.Z)((0,i.Z)({},n),{},{id:(0,Xn.x0)(),section:d.activeSection,visible:!0});d.rawNavigation=[].concat((0,bn.Z)(d.rawNavigation),[e])},updateNavigationTree:function(n){var e=[];(0,vn.deepWalk)(n,(function(n,t){var o=(0,i.Z)((0,i.Z)({},$()(n,["children","expand"])),{},{parent:null===t||void 0===t?void 0:t.id});e.push(o)}));var t=d.rawNavigation.filter((function(n){if(!d.activeSection)return!1;var t=e.find((function(e){return ee(e,n)}));return!t||!(0,vn.isMatchSection)(t.section,d.activeSection)}));d.rawNavigation=[].concat((0,bn.Z)(t),e)},getNavigation:function(n){return p(dn()(f).filter((function(e){return(0,vn.isMatchSection)(e.section,n)})))},saveNavigationList:h,resetNavigation:function(){return x.apply(this,arguments)}}}var ie,oe=t(71171),re=t(1192),ae=t(2484),le=t(5873),ce=t(88764),se=t(55402),ue=t(5939),de=t(33518),fe=t(49522);function ve(n){var e=n.className,t=n.navigation,i=(0,In.y0)().blocklet,o=(0,fe.Z)({blocklet:i}).logoUrl,r={appId:i.appDid,appLogo:o,appName:i.meta.title,enableConnect:!0,enableLocale:!1,navigation:t};return(0,D.jsx)(ce.Z,{children:(0,D.jsxs)(l.Z,{className:e,children:[(0,D.jsx)(re.Z,{meta:r}),(0,D.jsx)(l.Z,{children:(0,D.jsx)(le.Z,{meta:r,invalidPathFallback:function(){},headerProps:{style:{display:"none"}},children:(0,D.jsx)(se.ZP,{container:!0,spacing:2,children:new Array(6).fill().map((function(n,e){return(0,D.jsxs)(se.ZP,{item:!0,xs:4,children:[(0,D.jsx)(ue.Z,{animation:!1,variant:"rectangular",width:"100%",height:120}),(0,D.jsxs)(l.Z,{sx:{pt:.5},children:[(0,D.jsx)(ue.Z,{animation:!1}),(0,D.jsx)(ue.Z,{width:"60%",animation:!1})]})]},e)}))})})}),(0,D.jsx)(ae.Z,{meta:r})]})})}ve.propTypes={className:w().string,navigation:w().array},ve.defaultProps={className:"",navigation:[]};var me=(0,de.Z)(ve)(ie||(ie=(0,oe.Z)(["\n .dashboard {\n height: auto !important;\n }\n .dashboard-content + div {\n display: none;\n }\n"]))),pe={login:S(),logout:S(),switch:S(),switchDid:S(),switchProfile:S(),switchPassport:S(),useDid:function(){return{walletDid:"abcdefghijklmnopqrstuvwxyz"}},useOAuth:function(){return{logoutOAuth:S(),bindOAuth:S(),configs:{},switchOAuthPassport:S()}}},he={header:"Header",footer:"Footer",bottom:"Footer Link",social:"Footer Social",dashboard:"Dashboard",sessionManager:"SessionManager"};var ge=function(){var n=(0,Z.PE)().t,e=(0,In.y0)().blocklet,t=(0,a.useRef)(null),N=(0,Dn.DJ)().roles,S=(0,b.Z)({saveLoading:!1,resetLoading:!1,showResetConfirm:!1,mockRole:"owner"}),L=te(),w=L.state,P=L.navigation,C=L.getNavigation,O=L.saveNavigationList,A=L.resetNavigation,E=L.updateActiveSection,R=L.updateNavigationTree,T=L.updateNavigationItem,M=L.delNavigationItem,_=L.addNavigationItem,I=(0,a.useCallback)((function(n){t.current.add({parent:n},(function(n,e){_(e),n()}))}),[_]),W=(0,a.useCallback)((function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(n){case"edit":t.current.edit(e,(function(n,e){T(e),n()}));break;case"toggle":T({id:e.id,visible:!e.visible});break;case"del":M(e.id)}}),[M,T]),z=(0,a.useCallback)((0,r.Z)((0,o.Z)().mark((function e(){return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,S.saveLoading=!0,e.next=4,O(w.rawNavigation);case 4:x.Z.success(n("common.succeeded")),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),x.Z.error((0,D.jsxs)(l.Z,{children:[(0,D.jsx)(h.Z,{variant:"subtitle2",children:n("navigation.actionFailed")}),(0,D.jsx)(h.Z,{variant:"body1",children:(0,Xn.Z)(e.t0)||e.t0.error})]}));case 10:return e.prev=10,S.saveLoading=!1,e.finish(10);case 13:case"end":return e.stop()}}),e,null,[[0,7,10,13]])}))),[w.rawNavigation,S,O,n]),F=(0,a.useCallback)((0,r.Z)((0,o.Z)().mark((function e(){return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,S.resetLoading=!0,e.next=4,A();case 4:x.Z.success("\u91cd\u7f6e\u6210\u529f",{variant:"success"}),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),x.Z.error((0,D.jsxs)(l.Z,{children:[(0,D.jsx)(h.Z,{variant:"subtitle2",children:n("navigation.actionFailed")}),(0,D.jsx)(h.Z,{variant:"body1",children:(0,Xn.Z)(e.t0)||e.t0.error})]}));case 10:return e.prev=10,S.resetLoading=!1,e.finish(10);case 13:case"end":return e.stop()}}),e,null,[[0,7,10,13]])}))),[S,A,n]),q=(0,a.useMemo)((function(){return{session:(0,i.Z)((0,i.Z)({},pe),{},{user:{did:e.appDid,fullName:"Preview User",role:S.mockRole}})}}),[e.appDid,S.mockRole]);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(s.Z,{variant:"outlined",children:Object.keys(he).map((function(n){return(0,D.jsxs)(c.Z,{variant:w.activeSection===n?"contained":void 0,onClick:function(){return E(n)},children:[he[n]," (".concat(C(n).length,")")]},n)}))}),(0,D.jsxs)(p.Z,{variant:"dense",sx:{paddingLeft:"0px !important",paddingRight:"0px !important",mt:2},children:[(0,D.jsx)(h.Z,{variant:"h6",component:"div",sx:{flexGrow:1},children:"Config"}),(0,D.jsx)(s.Z,{variant:"outlined",children:(0,D.jsx)(g.Z,{size:"small",variant:"outlined",color:"error",startIcon:(0,D.jsx)(k.JO,{icon:"system-uicons:reset"}),sx:{mr:2},loading:S.resetLoading,loadingPosition:"start",onClick:function(){S.showResetConfirm=!0},children:"\u91cd\u7f6e"})}),(0,D.jsxs)(s.Z,{variant:"outlined",children:[(0,D.jsx)(c.Z,{size:"small",variant:"outlined",startIcon:(0,D.jsx)(k.JO,{icon:"mdi:plus"}),onClick:function(){return I()},children:"\u65b0\u5efa"}),(0,D.jsx)(g.Z,{size:"small",variant:"contained",startIcon:(0,D.jsx)(k.JO,{icon:"mdi:content-save"}),loading:S.saveLoading,loadingPosition:"start",onClick:z,children:"\u4fdd\u5b58"})]})]}),(0,D.jsx)(v.Z,{variant:"outlined",sx:{display:"flex",height:280,overflow:"hidden"},children:(0,D.jsx)(v.Z,{elevation:0,sx:{flex:1,overflow:"auto"},children:(0,D.jsx)(J,{treeData:C(w.activeSection),setTreeData:R,renderActions:function(n){var e=n.data,t=n.className;return(0,D.jsx)(Bn,{data:e,className:t,section:w.activeSection,add:function(){return I.apply(void 0,arguments)},del:function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return W.apply(void 0,["del"].concat(e))},edit:function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return W.apply(void 0,["edit"].concat(e))},toggle:function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return W.apply(void 0,["toggle"].concat(e))}})}})})}),(0,D.jsxs)(p.Z,{variant:"dense",sx:{paddingLeft:"0px !important",paddingRight:"0px !important",mt:3},children:[(0,D.jsx)(h.Z,{variant:"h6",component:"div",sx:{flexGrow:1},children:"Preview"}),(0,D.jsxs)(u.Z,{sx:{m:1,minWidth:120},size:"small",children:[(0,D.jsx)(d.Z,{children:"Role"}),(0,D.jsx)(m.Z,{value:S.mockRole,label:"Role",onChange:function(n){S.mockRole=n.target.value},children:N.map((function(n){return(0,D.jsx)(f.Z,{value:n.name,children:n.title},n.name)}))})]})]}),(0,D.jsx)(v.Z,{variant:"outlined",children:(0,D.jsx)(y.B3.Provider,{value:q,children:(0,D.jsx)(me,{navigation:P})})}),(0,D.jsx)(qn,{ref:t,section:w.activeSection,components:w.components,rawNavigations:w.rawNavigation}),(0,D.jsx)(j.I4,{open:S.showResetConfirm,title:"\u662f\u5426\u6e05\u7a7a\u6240\u6709\u81ea\u5b9a\u4e49\u5bfc\u822a",onConfirm:function(){var n=(0,r.Z)((0,o.Z)().mark((function n(){return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,F();case 2:S.showResetConfirm=!1;case 3:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}(),onCancel:function(){S.showResetConfirm=!1},children:(0,D.jsx)("p",{children:"\u6e05\u7a7a\u540e\uff0c\u5bfc\u822a\u4f1a\u6062\u590d\u5230 Blocklet \u539f\u6709\u9ed8\u8ba4\u7684\u914d\u7f6e"})})]})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[4906],{44906:function(e,t,n){n.r(t),n.d(t,{default:function(){return ue}});var r=n(71171),o=n(96234),a=n(5057),i=n(6352),s=n.n(i),l=n(33518),c=n(67654),u=n(11750),d=n(39948),h=n(39434),f=n(68420),m=n(5952),p=n(75793),x=n(59740),b=n(33028),v=n(38898),g=n(52439),Z=n(71569),k=n(61951),y=n(35432),j=n(44727),w=n(4651),P=n(74094),S=n(85493),R=n(38242),C=n(44846),D=n(28726),E=n(96501),F=n(86229),U=n(76811),L=n(23484),N=n(34937);var T=n(7199),_=n(10458),B=n.n(_),M=n(13128),W=n(73170),I=n(96266);function A(e){var t=e.meta,n=e.onCancel,r=e.handlePaySuccess,i=e.storeUrl,l=(0,f.PE)().t,c=(0,p.h6)().info,d=(0,a.useState)("both"),h=(0,o.Z)(d,2),m=h[0],x=h[1],b=(0,a.useState)(1),v=(0,o.Z)(b,2),g=v[0],Z=v[1],k=(0,P.yP)(c),y=(0,w.FM)(t,c,i),j=(0,R.getDisplayName)({meta:t});if("purchase"===m&&2===g)return(0,I.jsx)(E.default,{open:!0,popup:!0,baseUrl:i,action:"acquire-asset",checkFn:B().create({baseURL:s()(i,"/store")}).get,onSuccess:function(){r(y)},onClose:n,checkTimeout:3e5,extraParams:{factory:t.nftFactory},webWalletUrl:k,disableClose:!0,saveConnect:!1,showDownload:!1,messages:{title:l("store.purchase.auth.title",{name:j}),scan:l("store.purchase.auth.scan"),confirm:l("store.purchase.auth.confirm"),success:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(u.Z,{gutterBottom:!0,children:l("store.purchase.auth.success")}),(0,I.jsxs)(u.Z,{variant:"subtitle2",children:[" ",l("store.purchase.autoLaunch",{name:j})]})]})}});var S=M.ZP;return(0,I.jsx)(S,{title:l("store.purchase.title",{name:j}),disableEscapeKeyDown:!0,open:!0,fullWidth:!0,onClose:function(e,t){"backdropClick"!==t&&n()},children:(0,I.jsx)("div",{style:{marginBottom:16},children:(0,I.jsx)(W.AP,{action:m,onNext:function(){m&&(Z(2),"verify"===m&&(window.location.href=y))},onSelect:function(e){e!==m&&x(e)}})})})}A.defaultProps={handlePaySuccess:function(e){setTimeout((function(){window.location.href=e}),1e3)}};var K,O=A,z=n(25339);function H(e){var t=e.meta,n=e.buttonText,r=e.storeUrl,i=(0,f.PE)().t,s=(0,S.useNavigate)(),l=(0,p.h6)().info,u=(0,z.Tt)().api,d=!1===(0,R.isFreeBlocklet)(t),h=(0,a.useState)(!1),m=(0,o.Z)(h,2),x=m[0],b=m[1],v=function(e){var t=(0,L.Z)(),n=(0,S.useNavigate)(),r=(0,c.Z)("sid:blocklet:purchase:".concat(e)),i=(0,o.Z)(r,2),s=i[0],l=i[1],u=(0,a.useState)(!1),d=(0,o.Z)(u,2),h=d[0],f=d[1],m=(0,a.useState)(null),p=(0,o.Z)(m,2),x=p[0],b=p[1],v=function(){var e=new URL(window.location.href),t=e.pathname,r=e.searchParams,o=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";r.get("sid")&&(l(""),n(t.replace(o,"/"),{replace:!0}))},g=!(!t.get("assetDid")||!s||t.get("sid")!==s);return(0,N.mU)(U.BlockletEvents.purchaseChange,(function(t){t.did===e&&(b(t.session),["declined","confirmed","error"].includes(t.session.status)&&(f(!0),setTimeout(v,2e3)))})),(0,a.useEffect)((function(){x&&x.id!==s&&l(x.id)}),[x]),{hasCompleted:h,hasPurchased:g,session:x,setSession:b,doRedirect:v}}(t.did),g=v.hasPurchased,Z=(0,a.useState)(!1),k=(0,o.Z)(Z,2),y=k[0],_=k[1],B=(0,c.Z)("instant-blocklet-install",!1),M=(0,o.Z)(B,1)[0],W=(0,a.useState)(!1),A=(0,o.Z)(W,2),K=A[0],H=A[1],V=(0,a.useMemo)((function(){return x?i(d?"blocklet.status.purchasing":"blocklet.status.waiting"):""}),[x,i,d]),q=(0,a.useMemo)((function(){return d?n.purchase:n.launch}),[d,n]),$=function(e){e.preventDefault(),e.stopPropagation();try{if(b(!0),d)return void _(!0);if(M)return void H(!0);if(!d){var n=(0,w.FM)(t,l,r);return void(window.location.href=n)}}catch(o){F.Z.error((0,P.Z)(o),{autoHideDuration:5e3}),console.error("Blocklet installed failed",o)}finally{b(!1)}};return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(j.Kk,{children:(0,I.jsx)(T.Z,{permission:"mutate_blocklets",children:function(e){return(0,I.jsx)(D.Z,{onClick:$,size:"small",disabled:Boolean(V||!e),variant:"outlined",color:"primary","data-cy":"install-blocklet",children:V?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(C.Z,{size:16,style:{marginRight:3}}),V]}):q},t.did)}})}),(g||y)&&(0,I.jsx)(O,{method:"launch",meta:t,mode:"both",onCancel:function(){b(!1),_(!1)},storeUrl:r}),K&&(0,I.jsx)(E.default,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:u.get,checkTimeout:3e5,onSuccess:function(e){b(!1),H(!1),s("/blocklets/".concat(e.appDid,"/components"))},extraParams:{title:t.title,blockletMetaUrl:decodeURIComponent((0,P.Rn)(r,t.did).trim())},messages:{title:i("setup.keyPair.title"),scan:i("setup.keyPair.scan"),confirm:i("setup.keyPair.confirm"),success:i("setup.keyPair.success")},onClose:function(){b(!1),H(!1)}})]})}H.defaultProps={};var V=["storeUrl","handleSearchSelect","extraFilter"],q=function(e,t,n){var r=(0,w.RU)(t);return s()(n,"/blocklets/".concat(e.did,"/?server-url=").concat(r))},$=function(e){var t=e.meta,n=e.attribute,r=e.value;return t._formatted?t._formatted[n]:r};function G(e){var t=e.blocklet,n=e.endpoint,r=(0,f.PE)().t,o=(0,p.h6)(),a=s()(o.imgPrefix,"blocklet.png"),i=n;if(i.startsWith("http")&&t.logo)a=s()(i,(0,P.lk)(t.did,t.logo));else{var l=(window.env.apiPrefix||"/").replace(/^\/+/,"").replace(/\/+$/,"");l&&(l="/".concat(l)),a=s()(l,"/blocklet/logo/".concat(t.did))}var c=(null===o||void 0===o?void 0:o.info.mode)!==y.NODE_MODES.SERVERLESS,u={meta:t,buttonText:{purchase:r("common.purchase"),launch:r("common.launch")},storeUrl:i};return(0,I.jsx)(v.Z,{href:q(t,o.info,n),style:{color:"initial",textDecoration:"none"},onClick:function(e){return!!e.currentTarget.contains(e.target)||(e.preventDefault(),!1)},target:"_blank",children:(0,I.jsx)(Q,{title:$({meta:t,attribute:"title",value:t.title||t.name}),did:t.did,description:$({meta:t,attribute:"description",value:t.description}),cover:t.logo?a:"",version:t.version,button:c?(0,I.jsx)("div",{style:{display:"flex",alignItems:"center"},children:(0,I.jsx)(H,(0,b.Z)({},u))}):null})})}function J(e){var t,n=e.storeUrl,r=e.handleSearchSelect,i=e.extraFilter,s=(0,x.Z)(e,V),l=(0,f.PE)().locale,c=(0,p.h6)(),u=(0,a.useState)({}),d=(0,o.Z)(u,2),h=d[0],m=d[1],v=n,y=null===c||void 0===c||null===(t=c.info)||void 0===t?void 0:t.version;return(0,a.useEffect)((function(){m({})}),[v]),(0,I.jsx)(g.ErrorBoundary,{FallbackComponent:Z.H,resetKeys:[v],children:(0,I.jsx)("div",(0,b.Z)((0,b.Z)({},s),{},{children:(0,I.jsx)(k.Z,{blockletRender:function(e){var t=(0,b.Z)((0,b.Z)({},e),{},{endpoint:v});return(0,I.jsx)(G,(0,b.Z)({},t))},baseSearch:!0,endpoint:v,locale:l,onFilterChange:function(e){m(e)},onSearchSelect:r,filters:h,extraFilter:i,serverVersion:y})}))})}G.defaultProps={endpoint:""},J.defaultProps={handleSearchSelect:null,extraFilter:void 0};var Q=(0,l.Z)(j.ZP)(K||(K=(0,r.Z)(["\n .ms-highlight {\n color: ",";\n }\n"])),(function(e){return e.theme.palette.primary.main})),X=n(92877),Y=n(19577),ee=n(2478),te=n(44067),ne=n(46954),re=n(49390),oe=n(22714),ae=n(45170),ie=(0,X.Z)((function(){return{buttonText:{textTransform:"none !important"},iconRoot:{minWidth:24},menuName:{display:"flex",flexDirection:"column",marginRight:"100px","& span":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}}})),se=(0,a.forwardRef)((function(e,t){var n=e.onChange,r=e.onDelete,i=(0,p.h6)().info,s=(0,f.PE)().t,l=(0,a.useState)(!1),d=(0,o.Z)(l,2),h=d[0],x=d[1],b=(0,a.useState)(!1),v=(0,o.Z)(b,2),g=v[0],Z=v[1],k=(0,a.useState)(-1),y=(0,o.Z)(k,2),j=y[0],w=y[1],S=ie(),R=(0,c.Z)(m.W),E=(0,o.Z)(R,2),U=E[0],L=E[1],N=Math.max(i.blockletRegistryList.findIndex((function(e){return e.url===U})),0);return(0,a.useImperativeHandle)(t,(function(){return{setOpen:Z}})),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(T.Z,{permission:"mutate_node",children:function(e){return(0,I.jsx)(D.Z,{disabled:!e,classes:{text:S.buttonText},color:"secondary","data-cy":"store-toggle",onClick:function(){Z(!0)},endIcon:(0,I.jsx)(re.Z,{}),children:(0,I.jsx)(u.Z,{color:"secondary",children:i.blockletRegistryList[N].name})})}}),(0,I.jsx)(M.ZP,{title:s("store.blockletRegistry.switchRegistry"),disableEscapeKeyDown:!0,disablePortal:!1,fullWidth:!0,open:g,onClose:function(){return Z(!1)},children:(0,I.jsxs)(Y.Z,{className:S.tabPanel,children:[i.blockletRegistryList.map((function(e,t){return(0,I.jsxs)(ee.ZP,{button:!0,disabled:h,selected:N===t,"data-cy":"store-switch",onClick:function(){h||(t!==N?function(e){try{x(!0),w(e);var t=i.blockletRegistryList[e];L(t.url),n(t.url),Z(!1)}catch(r){console.error(r),F.Z.error("".concat(s("store.blockletRegistry.changeFailed")," ").concat((0,P.Z)(r)))}finally{x(!1)}}(t):Z(!1))},children:[(0,I.jsx)(ne.Z,{className:S.iconRoot,children:j===t&&h&&(0,I.jsx)(C.Z,{size:16})}),(0,I.jsx)(te.Z,{children:(0,I.jsx)(ae.Z,{teamDid:i.did,store:e,onDelete:function(){return r(e.url)}})})]},e.url)})),(0,I.jsx)(oe.Z,{disabled:h,onAdd:n,teamDid:i.did,blockletRegistryList:i.blockletRegistryList})]})})]})}));se.defaultProps={onChange:function(){},onDelete:function(){}};var le,ce=se;function ue(){var e=(0,f.PE)().t,t=(0,p.h6)().info,n=(0,c.Z)(m.W),r=(0,o.Z)(n,1)[0],i=t.blockletRegistryList,l=i.find((function(e){return r===e.url}))||i[0],x=(0,a.useState)(l.url),b=(0,o.Z)(x,2),v=b[0],g=b[1],Z=t.routing.adminPath,k=s()(window.location.origin,Z),y=(0,a.useRef)(null);return(0,I.jsxs)(de,{children:[(0,I.jsxs)(h.Z,{separator:"\u203a","aria-label":"breadcrumb",className:"page-breadcrumb",children:[(0,I.jsx)(u.Z,{color:"textPrimary",children:e("common.store")}),(0,I.jsx)(ce,{ref:y,onChange:function(e){return g(e)},onDelete:function(e){var n;v===e&&g(null===(n=t.blockletRegistryList[0])||void 0===n?void 0:n.url)}})]}),(0,I.jsx)(d.Z,{className:"store-header",display:"flex",justifyContent:"space-between",p:0,m:0,children:(0,I.jsx)(u.Z,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:e("store.headerDescription")})}),(0,I.jsx)(J,{className:"blocklet-list",handleSearchSelect:function(e){var t=e.detailUrl,n=new URL(t);n.searchParams.set("server-url",k);var r=document.createElement("a");r.setAttribute("target","_blank"),r.setAttribute("href",n.href),r.click()},storeUrl:v})]})}var de=l.Z.main(le||(le=(0,r.Z)(["\n @media (max-width: ","px) {\n .store-header {\n flex-direction: column;\n margin-bottom: 32px !important;\n }\n\n .page-header {\n margin-bottom: 16px !important;\n }\n }\n .blocklet-list {\n aside:hover {\n height: calc(100vh - 235px);\n }\n }\n"])),(function(e){return e.theme.breakpoints.values.sm}))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[5015],{85555:function(n,t,e){e.r(t),e.d(t,{default:function(){return p}});var a=e(33028),i=e(59740),o=e(5057),r=e(68420),l=e(28358),s=e(38242),d=e(74782),u=e(35918),h=e(96266),c=["blocklet"];function p(n){var t=n.blocklet,e=(0,i.Z)(n,c),p=(0,o.useContext)(r.RD).t,f=(0,s.getBlockletServices)(t);if(0===f.length)return(0,h.jsx)("div",{children:p("blocklet.noService")});var m=[{title:p("common.name"),field:"name"},{title:p("common.protocol"),field:"protocol"},{title:p("common.port"),field:"port"},{title:p("blocklet.upstreamPort"),field:"upstreamPort"}];return(0,h.jsx)(d.Z,(0,a.Z)((0,a.Z)({},e),{},{children:(0,h.jsx)(l.ZP,{columns:m,icons:(0,a.Z)({},u.Z),options:{sorting:!1,emptyRowsWhenPaging:!1,actionsColumnIndex:-1,tableLayout:"auto",maxBodyHeight:"100%",search:!1,pageSize:1e3,pageSizeOptions:[1e3]},localization:{body:{emptyDataSourceMessage:p("blocklet.noService")}},data:f})}))}},35918:function(n,t,e){var a=e(44919),i=e(42876),o=e(27773),r=e(11997),l=e(93734),s=e(76667),d=e(39293),u=e(36903),h=e(3422),c=e(92273),p=e(72906),f=e(57201),m=e(49390),g=e(33225),b=e(30770);t.Z={Add:a.Z,Check:i.default,Delete:o.default,Edit:s.default,Clear:r.default,DetailPanel:c.default,Filter:d.Z,FirstPage:u.default,LastPage:h.default,NextPage:c.default,PreviousPage:p.default,Search:f.default,ResetSearch:r.default,SortArrow:m.Z,Export:l.default,ThirdStateCheck:g.default,ViewColumn:b.default}},74782:function(n,t,e){var a,i=e(71171),o=e(33518).Z.div(a||(a=(0,i.Z)(["\n .MuiPaper-root {\n box-shadow: none !important;\n border: none !important;\n border-radius: 0 !important;\n background: transparent;\n }\n .MuiToolbar-root {\n background: transparent;\n padding-left: 0;\n display: none;\n }\n\n &.show-pagination {\n .MuiTablePagination-toolbar {\n display: flex;\n }\n }\n\n .MuiTableHead-root th {\n min-width: 100px;\n background: transparent;\n }\n\n .MuiTable-root {\n overflow-y: hidden;\n }\n .MuiTableRow-root {\n border: none !important;\n }\n\n .MuiTableCell-root {\n padding-right: 16px;\n &:last-of-type {\n padding-right: 0;\n }\n }\n\n /* @material-table/core@next \u517c\u5bb9 mui v5, \u4f46 pagination \u6837\u5f0f\u4f3c\u4e4e\u6709\u4e9b\u95ee\u9898, \u6682\u5730\u5b9a\u5236\u4e0b\u9762\u7684\u6837\u5f0f\u4fee\u590d, \u540e\u9762\u8003\u8651\u5f03\u7528 material-table */\n .MuiTablePagination-selectLabel,\n .MuiTablePagination-displayedRows {\n display: none;\n }\n .MuiTypography-caption {\n display: inline-block;\n }\n .MuiTablePagination-selectLabel + .MuiInputBase-root {\n margin-right: 8px;\n }\n"])));t.Z=o},44919:function(n,t,e){var a=e(71600);t.Z=void 0;var i=a(e(56930)),o=e(96266),r=(0,i.default)((0,o.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");t.Z=r},5939:function(n,t,e){e.d(t,{Z:function(){return A}});var a=e(71171),i=e(31461),o=e(7896),r=e(5057),l=e(8271),s=e(21371),d=e(91213),u=e(32493),h=e(66685),c=e(62773),p=e(42908),f=e(31821),m=e(18561);function g(n){return(0,m.Z)("MuiSkeleton",n)}(0,f.Z)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var b,v,w,Z,k,y,C,x,S=e(96266),M=["animation","className","component","height","style","variant","width"],P=(0,s.keyframes)(k||(k=b||(b=(0,a.Z)(["\n 0% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.4;\n }\n\n 100% {\n opacity: 1;\n }\n"])))),R=(0,s.keyframes)(y||(y=v||(v=(0,a.Z)(["\n 0% {\n transform: translateX(-100%);\n }\n\n 50% {\n /* +0.5s of delay between each loop */\n transform: translateX(100%);\n }\n\n 100% {\n transform: translateX(100%);\n }\n"])))),T=(0,c.ZP)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:function(n,t){var e=n.ownerState;return[t.root,t[e.variant],!1!==e.animation&&t[e.animation],e.hasChildren&&t.withChildren,e.hasChildren&&!e.width&&t.fitContent,e.hasChildren&&!e.height&&t.heightAuto]}})((function(n){var t=n.theme,e=n.ownerState,a=(0,u.Wy)(t.shape.borderRadius)||"px",i=(0,u.YL)(t.shape.borderRadius);return(0,o.Z)({display:"block",backgroundColor:t.vars?t.vars.palette.Skeleton.bg:(0,h.Fq)(t.palette.text.primary,"light"===t.palette.mode?.11:.13),height:"1.2em"},"text"===e.variant&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:"".concat(i).concat(a,"/").concat(Math.round(i/.6*10)/10).concat(a),"&:empty:before":{content:'"\\00a0"'}},"circular"===e.variant&&{borderRadius:"50%"},"rounded"===e.variant&&{borderRadius:(t.vars||t).shape.borderRadius},e.hasChildren&&{"& > *":{visibility:"hidden"}},e.hasChildren&&!e.width&&{maxWidth:"fit-content"},e.hasChildren&&!e.height&&{height:"auto"})}),(function(n){return"pulse"===n.ownerState.animation&&(0,s.css)(C||(C=w||(w=(0,a.Z)(["\n animation: "," 2s ease-in-out 0.5s infinite;\n "]))),P)}),(function(n){var t=n.ownerState,e=n.theme;return"wave"===t.animation&&(0,s.css)(x||(x=Z||(Z=(0,a.Z)(["\n position: relative;\n overflow: hidden;\n\n /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n\n &::after {\n animation: "," 2s linear 0.5s infinite;\n background: linear-gradient(\n 90deg,\n transparent,\n ",",\n transparent\n );\n content: '';\n position: absolute;\n transform: translateX(-100%); /* Avoid flash during server-side hydration */\n bottom: 0;\n left: 0;\n right: 0;\n top: 0;\n }\n "]))),R,(e.vars||e).palette.action.hover)})),A=r.forwardRef((function(n,t){var e=(0,p.Z)({props:n,name:"MuiSkeleton"}),a=e.animation,r=void 0===a?"pulse":a,s=e.className,u=e.component,h=void 0===u?"span":u,c=e.height,f=e.style,m=e.variant,b=void 0===m?"text":m,v=e.width,w=(0,i.Z)(e,M),Z=(0,o.Z)({},e,{animation:r,component:h,variant:b,hasChildren:Boolean(w.children)}),k=function(n){var t=n.classes,e=n.variant,a=n.animation,i=n.hasChildren,o=n.width,r=n.height,l={root:["root",e,a,i&&"withChildren",i&&!o&&"fitContent",i&&!r&&"heightAuto"]};return(0,d.Z)(l,g,t)}(Z);return(0,S.jsx)(T,(0,o.Z)({as:h,ref:t,className:(0,l.Z)(k.root,s),ownerState:Z},w,{style:(0,o.Z)({width:v,height:c},f)}))}))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[5074],{25074:function(t,e,n){n.r(e),n.d(e,{default:function(){return u}});var r,i=n(71171),o=n(5057),c=n(33518),a=n(68420),s=n(35474),l=n(96266);function u(){var t=(0,o.useContext)(a.RD).t;return(0,l.jsx)(d,{style:{paddingTop:"25vh"},children:(0,l.jsx)(s.Z,{status:"404",description:t("noMatch.desc"),style:{backgroundColor:"transparent"}})})}var d=c.Z.main(r||(r=(0,i.Z)([""])))},35474:function(t,e,n){n.d(e,{Z:function(){return W}});var r={};n.r(r),n.d(r,{ComingSoon:function(){return I},Error:function(){return O},Forbidden:function(){return T},Info:function(){return L},InternalServerError:function(){return F},Maintenance:function(){return A},PageNotFound:function(){return E}});var i,o=n(59740),c=n(56666),a=n(33028),s=n(55898),l=n.n(s),u=n(71171),d=n(39948),p=n(47685),f=n(96266),v=["icon","title","description","extra"];function x(t){var e=t.icon,n=t.title,r=t.description,i=t.extra,c=(0,o.Z)(t,v);return(0,f.jsxs)(Z,(0,a.Z)((0,a.Z)({},c),{},{children:[e,"string"===typeof n?(0,f.jsx)(d.Z,{mt:3,fontSize:22,fontWeight:400,color:"#47494E",textAlign:"center",children:n}):n,"string"===typeof r?(0,f.jsx)(d.Z,{mt:1,fontSize:14,color:"#7F828B",textAlign:"center",children:r}):r,(0,f.jsx)(d.Z,{mt:3,children:i})]}))}x.propTypes={icon:l().element,title:l().oneOfType([l().string,l().element]),description:l().oneOfType([l().string,l().element]),actions:l().any,extra:l().element},x.defaultProps={icon:void 0,title:"",description:"",actions:null,extra:void 0};var Z=(0,p.zo)("div")(i||(i=(0,u.Z)(["\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n padding: 16px;\n\n background-color: #f7f8fb;\n"]))),g=x,h=n(36134),m=n(11532),j={en:{404:{title:"404 - Page Not Found",description:"Sorry about that, the page you are looking for does not exist or has been moved."},403:{title:"403 \u2013 Forbidden",description:"Sorry, you are not authorized to access this page."},500:{title:"500 - Internal Server Error",description:"An internal server error has occurred. Please try again later."},error:{title:"Application Error",description:"Something went wrong. Please try again later."},maintenance:{title:"Offline for maintenance",description:"This app is undergoing maintenance right now. Please check back later."},comingSoon:{title:"Coming Soon",description:"Our website is under construction. We'll be here soon with our new website."}},zh:{404:{title:"404 - \u9875\u9762\u672a\u627e\u5230",description:"\u5f88\u62b1\u6b49\uff0c\u60a8\u6b63\u5728\u5bfb\u627e\u7684\u9875\u9762\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u79fb\u52a8\u3002"},403:{title:"403 \u2013 \u7981\u6b62\u8bbf\u95ee",description:"\u5f88\u62b1\u6b49\uff0c\u60a8\u6ca1\u6709\u6743\u9650\u8bbf\u95ee\u6b64\u9875\u9762\u3002"},500:{title:"500 - \u5185\u90e8\u670d\u52a1\u5668\u9519\u8bef",description:"\u53d1\u751f\u4e86\u4e00\u4e2a\u5185\u90e8\u670d\u52a1\u5668\u9519\u8bef\u3002\u8bf7\u7a0d\u540e\u518d\u8bd5\u3002"},error:{title:"Application Error",description:"\u51fa\u9519\u4e86, \u8bf7\u7a0d\u540e\u518d\u8bd5\u3002"},maintenance:{title:"\u7ef4\u62a4\u4e2d",description:"\u5e94\u7528\u7a0b\u5e8f\u6b63\u5728\u8fdb\u884c\u7ef4\u62a4\u3002\u8bf7\u7a0d\u540e\u518d\u67e5\u770b\u3002"},comingSoon:{title:"\u5373\u5c06\u4e0a\u7ebf",description:"\u6211\u4eec\u7684\u7f51\u7ad9\u6b63\u5728\u5efa\u8bbe\u4e2d\u3002\u6211\u4eec\u5f88\u5feb\u5c31\u4f1a\u5728\u8fd9\u91cc\u63a8\u51fa\u6211\u4eec\u7684\u65b0\u7f51\u7ad9\u3002"}}},b=n(68420),y=["locale"],S=["locale"],z=["locale"],w=["locale"],k=["locale"],C=["locale"],P=function(t){t=["zh","en"].includes(t)?t:"";var e=((0,b.PE)()||{locale:"en"}).locale,n=t||e;return j[n]?n:"en"};function E(t){var e=t.locale,n=(0,o.Z)(t,y);return e=P(e),(0,f.jsx)(g,(0,a.Z)({icon:(0,f.jsx)(M,{}),title:j[e][404].title,description:j[e][404].description},n))}function T(t){var e=t.locale,n=(0,o.Z)(t,S);return e=P(e),(0,f.jsx)(g,(0,a.Z)({icon:(0,f.jsx)(M,{}),title:j[e][403].title,description:j[e][403].description},n))}function F(t){var e=t.locale,n=(0,o.Z)(t,z);return e=P(e),(0,f.jsx)(g,(0,a.Z)({icon:(0,f.jsx)(M,{}),title:j[e][500].title,description:j[e][500].description},n))}function O(t){var e=t.locale,n=(0,o.Z)(t,w);return e=P(e),(0,f.jsx)(g,(0,a.Z)({icon:(0,f.jsx)(M,{}),title:j[e].error.title,description:j[e].error.description},n))}function A(t){var e=t.locale,n=(0,o.Z)(t,k);return e=P(e),(0,f.jsx)(g,(0,a.Z)({icon:(0,f.jsx)(_,{}),title:j[e].maintenance.title,description:j[e].maintenance.description},n))}function I(t){var e=t.locale,n=(0,o.Z)(t,C);return e=P(e),(0,f.jsx)(g,(0,a.Z)({icon:(0,f.jsx)(_,{}),title:j[e].comingSoon.title,description:j[e].comingSoon.description},n))}function L(t){return(0,f.jsx)(g,(0,a.Z)({icon:(0,f.jsx)(_,{})},t))}function M(t){var e=(0,p.Fg)();return(0,f.jsx)(m.Z,(0,a.Z)({style:{color:e.palette.error.main,fontSize:72}},t))}function _(t){var e=(0,p.Fg)();return(0,f.jsx)(h.Z,(0,a.Z)({style:{color:e.palette.info.main,fontSize:72}},t))}E.status="404",T.status="403",F.status="500",O.status="error",A.status="maintenance",I.status="comingSoon",L.status="info";var R=["status"],N=Object.keys(r).reduce((function(t,e){return(0,a.Z)((0,a.Z)({},t),{},(0,c.Z)({},r[e].status||e,r[e]))}),{});function V(t){var e=t.status,n=(0,o.Z)(t,R);if(e){if(N[e]){var r=N[e];return(0,f.jsx)(r,(0,a.Z)({},n))}throw new Error("Please provide a valid status for Result.status. Valid values are: ".concat(Object.keys(N).join(", ")))}return(0,f.jsx)(g,(0,a.Z)({},n))}V.propTypes=(0,a.Z)({status:l().oneOfType([l().string,l().number])},g.propTypes),V.defaultProps={status:""};var W=V},11532:function(t,e,n){var r=n(71600);e.Z=void 0;var i=r(n(56930)),o=n(96266),c=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm4.3 14.3c-.39.39-1.02.39-1.41 0L12 13.41 9.11 16.3c-.39.39-1.02.39-1.41 0a.9959.9959 0 0 1 0-1.41L10.59 12 7.7 9.11a.9959.9959 0 0 1 0-1.41c.39-.39 1.02-.39 1.41 0L12 10.59l2.89-2.89c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41L13.41 12l2.89 2.89c.38.38.38 1.02 0 1.41z"}),"CancelRounded");e.Z=c},36134:function(t,e,n){var r=n(71600);e.Z=void 0;var i=r(n(56930)),o=n(96266),c=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"Info");e.Z=c}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[542],{58854:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return u}});var o=t(85493),r=t(80576),a=t(51177),i=t(74490),l=t(43077),s=t(13644),d=t(75793),c=t(96266);function u(){var e=(0,o.useNavigate)(),n=(0,o.useParams)().name,t=void 0===n?"abtnode":n,u=(0,d.h6)().info,p=u.routing.provider,v=[{id:"abtnode",name:"Blocklet Server",types:["error","info","access","stdout","stderr"]},{id:"blocklet-services",name:"Blocklet Services",types:["error","info"]}];if(p){var f="Service Gateway(".concat(p,")");v.push({id:"service-gateway-".concat(p),name:f,types:["error","access"]})}var g=(0,c.jsx)(r.Z,{sx:{minWidth:240},children:(0,c.jsx)(a.Z,{value:t,onChange:function(n){e("/logs/".concat(n.target.value))},size:"small",children:v.map((function(e){return(0,c.jsx)(i.Z,{value:e.id,children:e.name},e.id)}))})}),m=v.find((function(e){return e.id===t}))||v[0];return(0,c.jsx)(l.l,{name:m.name,logId:m.id,types:m.types,prepend:g,postpend:(0,c.jsx)(s.Z,{id:u.did,name:"blocklet-server"})},m.id)}},24460:function(e,n,t){var o=t(93845);e.exports=function(e){return o(e.replace(/^[@./-]/,"").replace(/[@./_]/g,"-"))}},13644:function(e,n,t){"use strict";t.d(n,{Z:function(){return P}});var o=t(32723),r=t(34795),a=t(96234),i=t(5057),l=t(55898),s=t.n(l),d=t(1577),c=t.n(d),u=t(39948),p=t(63878),v=t(80576),f=t(51177),g=t(74490),m=t(44846),h=t(28726),b=t(68420),x=t(13128),Z=t(24460),y=t.n(Z),w=t(86229),R=t(58238),j=t(96266),C=[1,7];function P(e){var n=e.id,t=e.name,l=(0,b.PE)().t,s=(0,R.h6)(),d=s.restApi,Z=s.inService,P=(0,i.useState)(!1),k=(0,a.Z)(P,2),S=k[0],T=k[1],z=(0,i.useState)(!1),E=(0,a.Z)(z,2),M=E[0],F=E[1],D=(0,i.useState)(1),B=(0,a.Z)(D,2),N=B[0],I=B[1],W=function(){var e=(0,r.Z)((0,o.Z)().mark((function e(){var r,a,i,l;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!M){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,F(!0),r=Z?"":"/".concat(n),e.next=7,d.get("/download/log".concat(r,"?days=").concat(N),{responseType:"blob"});case 7:a=e.sent,i=URL.createObjectURL(a.data),(l=document.createElement("a")).href=i,l.setAttribute("download","".concat(y()(t||n),".").concat(c()().format("YYYYMMDDHHmmss"),".log.zip")),document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(i),F(!1),T(!1),e.next=24;break;case 20:e.prev=20,e.t0=e.catch(2),F(!1),w.Z.error(e.t0.message);case 24:case"end":return e.stop()}}),e,null,[[2,20]])})));return function(){return e.apply(this,arguments)}}();return[(0,j.jsx)(u.Z,{display:"flex",alignItems:"center",style:{gap:16},children:(0,j.jsxs)(h.Z,{"data-cy":"download-logs",variant:"outlined",onClick:function(){return T(!0)},disabled:M,children:[M?(0,j.jsx)(m.Z,{size:16}):(0,j.jsx)(p.Z,{fontSize:"small",style:{transform:"translateY(2px)"}}),(0,j.jsx)(u.Z,{ml:.5,children:l("common.download")})]})}),S&&(0,j.jsx)(x.ZP,{open:!0,onClose:function(){T(!1)},disableEscapeKeyDown:!0,title:l("common.download"),PaperProps:{style:{minHeight:"auto"}},actions:(0,j.jsxs)(h.Z,{"data-cy":"download-logs",variant:"outlined",onClick:function(){return W()},disabled:M,children:[M&&(0,j.jsx)(m.Z,{size:16}),(0,j.jsx)(u.Z,{ml:.5,children:l("common.confirm")})]}),children:(0,j.jsx)(u.Z,{mb:2,display:"flex",justifyContent:"center",children:(0,j.jsx)(v.Z,{size:"small",fullWidth:!0,children:(0,j.jsx)(f.Z,{value:N,onChange:function(e){I(e.target.value)},children:C.map((function(e){return(0,j.jsx)(g.Z,{value:e,children:l("log.lastDays.".concat(e))},e)}))})})})})]}P.propTypes={id:s().string.isRequired,name:s().string},P.defaultProps={name:""}},43077:function(e,n,t){"use strict";t.d(n,{l:function(){return j}});var o=t(71171),r=t(33028),a=t(96234),i=t(59740),l=t(5057),s=t(33518),d=t(55898),c=t.n(d),u=t(56556),p=t(80633),v=t(72904),f=t(6833),g=t(12726),m=t(14491);var h,b,x=function(){var e=(0,l.useState)(+new Date),n=(0,a.Z)(e,2),t=n[0],o=n[1];return(0,g.Z)((function(){o(+new Date)}),1e3),(0,m.mr)(t,"MMMM Do YYYY, h:mm:ss a")},Z=t(58238),y=t(96266),w=["name","logId","types","defaultTypeIndex","initialData","prepend","postpend","onTypeChange"],R=["logFile"];function j(e){var n=e.name,t=e.logId,o=e.types,s=e.defaultTypeIndex,d=e.initialData,c=e.prepend,f=e.postpend,g=e.onTypeChange,m=(0,i.Z)(e,w),h=(0,Z.h6)().ws.useSubscription,b={info:"Info",error:"Error",access:"Access",stdout:"stdout",stderr:"stderr"},x=(0,v.Z)((function(e){return e.breakpoints.down("md")})),R=(0,l.useState)(o[s||0]),j=(0,a.Z)(R,2),k=j[0],S=j[1],T=(0,l.useState)(),z=(0,a.Z)(T,2),E=z[0],M=z[1],F=(0,l.useRef)({});return(0,l.useEffect)((function(){o.forEach((function(e){var t=F.current[e];t&&(t.write("Collecting ".concat(e," logs for ").concat(n,"...")),t.write("\r\n\r\n"),d.forEach((function(e){return t.write(e)})))}))}),[]),h("log.".concat(t),(function(e){E||M(e.logFiles||{});var n=F.current[e.level];n&&(n.write(e.data.replace(/.\n/g,(function(e){return"\r\n"===e?e:"".concat(e[0],"\r\n\r\n")}))),n.write("\r\n\r\n"))}),[]),(0,y.jsxs)(C,(0,r.Z)((0,r.Z)({},m),{},{children:[(0,y.jsxs)("div",{className:"log-terminal-group-head",children:[(0,y.jsxs)("div",{className:"log-terminal-group-head-start",children:[c,(0,y.jsx)(p.Z,{variant:"outlined",size:x?"small":"medium",children:o.map((function(e){var n=e===k?{variant:"contained"}:{};return(0,y.jsx)(u.Z,(0,r.Z)((0,r.Z)({},n),{},{onClick:function(){S(e),g(e)},children:b[e]}),e)}))})]}),(0,y.jsx)("div",{className:"log-terminal-group-head-end",children:f})]}),(0,y.jsx)("div",{className:"log-terminal-group-terminals",children:o.map((function(e){return(0,y.jsx)(P,{ref:function(n){F.current[e]=n},logFile:null===E||void 0===E?void 0:E[e],style:{visibility:e===k?"visible":"hidden"}},e)}))})]}))}j.propTypes={name:c().string.isRequired,logId:c().string.isRequired,types:c().arrayOf(c().string),defaultTypeIndex:c().number,initialData:c().arrayOf(c().string),prepend:c().node,postpend:c().node,onTypeChange:c().func},j.defaultProps={types:["error","info","access","stdout","stderr"],defaultTypeIndex:0,initialData:[],prepend:null,postpend:null,onTypeChange:function(){}};var C=s.Z.div(h||(h=(0,o.Z)(["\n display: flex;\n flex-direction: column;\n height: 100%;\n .log-terminal-group-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding-bottom: 16px;\n }\n\n .log-terminal-group-head-start {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n gap: 16px;\n "," {\n flex-direction: column;\n align-items: start;\n }\n }\n\n .log-terminal-group-head-end {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n gap: 16px;\n "," {\n flex-direction: column;\n align-items: start;\n }\n }\n .log-terminal-group-terminals {\n flex: 1;\n position: relative;\n overflow: hidden;\n > * {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n }\n"])),(function(e){return e.theme.breakpoints.down("md")}),(function(e){return e.theme.breakpoints.down("md")})),P=(0,l.forwardRef)((function(e,n){var t=e.logFile,o=(0,i.Z)(e,R);return(0,y.jsxs)(k,(0,r.Z)((0,r.Z)({},o),{},{children:[(0,y.jsxs)("div",{className:"log-terminal-top",children:[(0,y.jsx)(x,{}),t&&(0,y.jsx)("span",{children:t})]}),(0,y.jsx)("div",{className:"log-terminal-container",style:{position:"relative"},children:(0,y.jsx)(f.Z,{ref:n,style:{width:"100%",boxSizing:"border-box",height:"100%"},options:{theme:{background:"#2C313C",foreground:"#EEEEEE"}}})})]}))}));P.propTypes={logFile:c().string},P.defaultProps={logFile:""};var k=s.Z.div(b||(b=(0,o.Z)(["\n height: 100%;\n display: flex;\n flex-direction: column;\n .log-terminal-top {\n flex: 0 0 auto;\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n padding: 8px;\n font-size: 14px;\n color: aquamarine;\n background: darkgray;\n word-break: break-word;\n }\n .log-terminal-container {\n flex: 1;\n height: 100%;\n padding: 8px;\n overflow: hidden;\n background: #2c313c;\n }\n\n .xterm-viewport::-webkit-scrollbar {\n width: 10px;\n }\n .xterm-viewport::-webkit-scrollbar-track {\n opacity: 0;\n }\n .xterm-viewport::-webkit-scrollbar-thumb {\n min-height: 20px;\n background-color: #ffffff20;\n }\n"])))},80633:function(e,n,t){"use strict";t.d(n,{Z:function(){return y}});var o=t(56666),r=t(31461),a=t(7896),i=t(5057),l=t(8271),s=t(91213),d=t(66685),c=t(6285),u=t(62773),p=t(42908),v=t(31821),f=t(18561);function g(e){return(0,f.Z)("MuiButtonGroup",e)}var m=(0,v.Z)("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","fullWidth","vertical","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary"]),h=t(17681),b=t(96266),x=["children","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"],Z=(0,u.ZP)("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:function(e,n){var t=e.ownerState;return[(0,o.Z)({},"& .".concat(m.grouped),n.grouped),(0,o.Z)({},"& .".concat(m.grouped),n["grouped".concat((0,c.Z)(t.orientation))]),(0,o.Z)({},"& .".concat(m.grouped),n["grouped".concat((0,c.Z)(t.variant))]),(0,o.Z)({},"& .".concat(m.grouped),n["grouped".concat((0,c.Z)(t.variant)).concat((0,c.Z)(t.orientation))]),(0,o.Z)({},"& .".concat(m.grouped),n["grouped".concat((0,c.Z)(t.variant)).concat((0,c.Z)(t.color))]),n.root,n[t.variant],!0===t.disableElevation&&n.disableElevation,t.fullWidth&&n.fullWidth,"vertical"===t.orientation&&n.vertical]}})((function(e){var n=e.theme,t=e.ownerState;return(0,a.Z)({display:"inline-flex",borderRadius:(n.vars||n).shape.borderRadius},"contained"===t.variant&&{boxShadow:(n.vars||n).shadows[2]},t.disableElevation&&{boxShadow:"none"},t.fullWidth&&{width:"100%"},"vertical"===t.orientation&&{flexDirection:"column"},(0,o.Z)({},"& .".concat(m.grouped),(0,a.Z)({minWidth:40,"&:not(:first-of-type)":(0,a.Z)({},"horizontal"===t.orientation&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},"vertical"===t.orientation&&{borderTopRightRadius:0,borderTopLeftRadius:0},"outlined"===t.variant&&"horizontal"===t.orientation&&{marginLeft:-1},"outlined"===t.variant&&"vertical"===t.orientation&&{marginTop:-1}),"&:not(:last-of-type)":(0,a.Z)({},"horizontal"===t.orientation&&{borderTopRightRadius:0,borderBottomRightRadius:0},"vertical"===t.orientation&&{borderBottomRightRadius:0,borderBottomLeftRadius:0},"text"===t.variant&&"horizontal"===t.orientation&&(0,o.Z)({borderRight:n.vars?"1px solid rgba(".concat(n.vars.palette.common.onBackgroundChannel," / 0.23)"):"1px solid ".concat("light"===n.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")},"&.".concat(m.disabled),{borderRight:"1px solid ".concat((n.vars||n).palette.action.disabled)}),"text"===t.variant&&"vertical"===t.orientation&&(0,o.Z)({borderBottom:n.vars?"1px solid rgba(".concat(n.vars.palette.common.onBackgroundChannel," / 0.23)"):"1px solid ".concat("light"===n.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")},"&.".concat(m.disabled),{borderBottom:"1px solid ".concat((n.vars||n).palette.action.disabled)}),"text"===t.variant&&"inherit"!==t.color&&{borderColor:n.vars?"rgba(".concat(n.vars.palette[t.color].mainChannel," / 0.5)"):(0,d.Fq)(n.palette[t.color].main,.5)},"outlined"===t.variant&&"horizontal"===t.orientation&&{borderRightColor:"transparent"},"outlined"===t.variant&&"vertical"===t.orientation&&{borderBottomColor:"transparent"},"contained"===t.variant&&"horizontal"===t.orientation&&(0,o.Z)({borderRight:"1px solid ".concat((n.vars||n).palette.grey[400])},"&.".concat(m.disabled),{borderRight:"1px solid ".concat((n.vars||n).palette.action.disabled)}),"contained"===t.variant&&"vertical"===t.orientation&&(0,o.Z)({borderBottom:"1px solid ".concat((n.vars||n).palette.grey[400])},"&.".concat(m.disabled),{borderBottom:"1px solid ".concat((n.vars||n).palette.action.disabled)}),"contained"===t.variant&&"inherit"!==t.color&&{borderColor:(n.vars||n).palette[t.color].dark},{"&:hover":(0,a.Z)({},"outlined"===t.variant&&"horizontal"===t.orientation&&{borderRightColor:"currentColor"},"outlined"===t.variant&&"vertical"===t.orientation&&{borderBottomColor:"currentColor"})}),"&:hover":(0,a.Z)({},"contained"===t.variant&&{boxShadow:"none"})},"contained"===t.variant&&{boxShadow:"none"})))})),y=i.forwardRef((function(e,n){var t=(0,p.Z)({props:e,name:"MuiButtonGroup"}),o=t.children,d=t.className,u=t.color,v=void 0===u?"primary":u,f=t.component,m=void 0===f?"div":f,y=t.disabled,w=void 0!==y&&y,R=t.disableElevation,j=void 0!==R&&R,C=t.disableFocusRipple,P=void 0!==C&&C,k=t.disableRipple,S=void 0!==k&&k,T=t.fullWidth,z=void 0!==T&&T,E=t.orientation,M=void 0===E?"horizontal":E,F=t.size,D=void 0===F?"medium":F,B=t.variant,N=void 0===B?"outlined":B,I=(0,r.Z)(t,x),W=(0,a.Z)({},t,{color:v,component:m,disabled:w,disableElevation:j,disableFocusRipple:P,disableRipple:S,fullWidth:z,orientation:M,size:D,variant:N}),L=function(e){var n=e.classes,t=e.color,o=e.disabled,r=e.disableElevation,a=e.fullWidth,i=e.orientation,l=e.variant,d={root:["root",l,"vertical"===i&&"vertical",a&&"fullWidth",r&&"disableElevation"],grouped:["grouped","grouped".concat((0,c.Z)(i)),"grouped".concat((0,c.Z)(l)),"grouped".concat((0,c.Z)(l)).concat((0,c.Z)(i)),"grouped".concat((0,c.Z)(l)).concat((0,c.Z)(t)),o&&"disabled"]};return(0,s.Z)(d,g,n)}(W),O=i.useMemo((function(){return{className:L.grouped,color:v,disabled:w,disableElevation:j,disableFocusRipple:P,disableRipple:S,fullWidth:z,size:D,variant:N}}),[v,w,j,P,S,z,D,N,L.grouped]);return(0,b.jsx)(Z,(0,a.Z)({as:m,role:"group",className:(0,l.Z)(L.root,d),ref:n,ownerState:W},I,{children:(0,b.jsx)(h.Z.Provider,{value:O,children:o})}))}))},61533:function(e,n,t){"use strict";var o=t(7896),r=t(31461),a=t(5057),i=(t(97408),t(8271)),l=t(91213),s=t(78305),d=t(1733),c=t(11819),u=t(62773),p=t(96366),v=t(42908),f=t(83210),g=t(96266),m=["onEntering"],h=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],b={vertical:"top",horizontal:"right"},x={vertical:"top",horizontal:"left"},Z=(0,u.ZP)(c.ZP,{shouldForwardProp:function(e){return(0,u.FO)(e)||"classes"===e},name:"MuiMenu",slot:"Root",overridesResolver:function(e,n){return n.root}})({}),y=(0,u.ZP)(c.XS,{name:"MuiMenu",slot:"Paper",overridesResolver:function(e,n){return n.paper}})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),w=(0,u.ZP)(d.Z,{name:"MuiMenu",slot:"List",overridesResolver:function(e,n){return n.list}})({outline:0}),R=a.forwardRef((function(e,n){var t,d,c=(0,v.Z)({props:e,name:"MuiMenu"}),u=c.autoFocus,R=void 0===u||u,j=c.children,C=c.className,P=c.disableAutoFocusItem,k=void 0!==P&&P,S=c.MenuListProps,T=void 0===S?{}:S,z=c.onClose,E=c.open,M=c.PaperProps,F=void 0===M?{}:M,D=c.PopoverClasses,B=c.transitionDuration,N=void 0===B?"auto":B,I=c.TransitionProps,W=(void 0===I?{}:I).onEntering,L=c.variant,O=void 0===L?"selectedMenu":L,Y=c.slots,H=void 0===Y?{}:Y,A=c.slotProps,q=void 0===A?{}:A,G=(0,r.Z)(c.TransitionProps,m),V=(0,r.Z)(c,h),_=(0,p.Z)(),U="rtl"===_.direction,K=(0,o.Z)({},c,{autoFocus:R,disableAutoFocusItem:k,MenuListProps:T,onEntering:W,PaperProps:F,transitionDuration:N,TransitionProps:G,variant:O}),Q=function(e){var n=e.classes;return(0,l.Z)({root:["root"],paper:["paper"],list:["list"]},f.Q,n)}(K),X=R&&!k&&E,J=a.useRef(null),$=-1;a.Children.map(j,(function(e,n){a.isValidElement(e)&&(e.props.disabled||("selectedMenu"===O&&e.props.selected||-1===$)&&($=n))}));var ee=null!=(t=H.paper)?t:y,ne=null!=(d=q.paper)?d:F,te=(0,s.y)({elementType:H.root,externalSlotProps:q.root,ownerState:K,className:[Q.root,C]}),oe=(0,s.y)({elementType:ee,externalSlotProps:ne,ownerState:K,className:Q.paper});return(0,g.jsx)(Z,(0,o.Z)({onClose:z,anchorOrigin:{vertical:"bottom",horizontal:U?"right":"left"},transformOrigin:U?b:x,slots:{paper:ee,root:H.root},slotProps:{root:te,paper:oe},open:E,ref:n,transitionDuration:N,TransitionProps:(0,o.Z)({onEntering:function(e,n){J.current&&J.current.adjustStyleForScrollbar(e,_),W&&W(e,n)}},G),ownerState:K},V,{classes:D,children:(0,g.jsx)(w,(0,o.Z)({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),z&&z(e,"tabKeyDown"))},actions:J,autoFocus:R&&(-1===$||k),autoFocusItem:X,variant:O},T,{className:(0,i.Z)(Q.list,T.className),children:j}))}))}));n.Z=R},83210:function(e,n,t){"use strict";t.d(n,{Q:function(){return a}});var o=t(31821),r=t(18561);function a(e){return(0,r.Z)("MuiMenu",e)}var i=(0,o.Z)("MuiMenu",["root","paper","list"]);n.Z=i}}]);