@abtnode/webapp 1.16.49-beta-20250823-082650-626c1473 → 1.16.49-beta-20250827-025603-2bb1a7ee

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 (186) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-CCV2cZO2.js → AdapterDayjs-DgT7PQDg.js} +1 -1
  4. package/dist/assets/{Add-CyNDL_k-.js → Add-Ch4u3455.js} +1 -1
  5. package/dist/assets/ArrowDropDown-DoacQuyL.js +1 -0
  6. package/dist/assets/{Autocomplete-CiCUwFEx.js → Autocomplete-BsZ127Zu.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-DRGS42Bm.js → Breadcrumbs-D7Lip4bW.js} +1 -1
  8. package/dist/assets/{ButtonGroup-CtdH1HDV.js → ButtonGroup-DXYZPP9y.js} +1 -1
  9. package/dist/assets/{CSSTransition-Fx_rKfN5.js → CSSTransition-BIwFkzHV.js} +1 -1
  10. package/dist/assets/{CallMerge-eGwHUOxa.js → CallMerge-UjcOUjeo.js} +1 -1
  11. package/dist/assets/{CardContent-Bm199lLV.js → CardContent-kIilJY3b.js} +1 -1
  12. package/dist/assets/{ChevronLeft-ccVGGgwe.js → ChevronLeft-czRc5alU.js} +1 -1
  13. package/dist/assets/{ChevronRight-DkWBbhkk.js → ChevronRight-Bqq7YTKn.js} +1 -1
  14. package/dist/assets/{Clear-CiwnL4KG.js → Clear-DeVIZRwO.js} +1 -1
  15. package/dist/assets/{DeleteOutline-BZsf5LEb.js → DeleteOutline-B3iouChg.js} +1 -1
  16. package/dist/assets/{Done-Ce1yOCQQ.js → Done-Bx8cHGFG.js} +1 -1
  17. package/dist/assets/{Edit-_KT4-UwT.js → Edit-CQZHQvSb.js} +1 -1
  18. package/dist/assets/{ErrorOutline-D_eF69j1.js → ErrorOutline-BPjUOx4r.js} +1 -1
  19. package/dist/assets/{FilterList-DrLayevh.js → FilterList-BNY6Og8Y.js} +1 -1
  20. package/dist/assets/{Google-D6kQ3L4a.js → Google-B9hW4wT-.js} +1 -1
  21. package/dist/assets/{HelpOutline-Co_HF89w.js → HelpOutline-B1i_b_nO.js} +1 -1
  22. package/dist/assets/{Launch-DhM4Sbq_.js → Launch-CSzmaWqG.js} +1 -1
  23. package/dist/assets/{Link-BLLpsHXK.js → Link-DkRb9Zjp.js} +1 -1
  24. package/dist/assets/{ListItemButton-B85clGhN.js → ListItemButton-f8Ed7XjQ.js} +1 -1
  25. package/dist/assets/{ListSubheader-DC_9Utyi.js → ListSubheader-C5DiljAS.js} +1 -1
  26. package/dist/assets/{LoadingButton-yIi_Wg1h.js → LoadingButton-BHBc1F7y.js} +1 -1
  27. package/dist/assets/{MoreVert-BNRNVzHq.js → MoreVert-DYnwNOGS.js} +1 -1
  28. package/dist/assets/{OpenInNew-_jBuUUU8.js → OpenInNew-DAHudgUs.js} +1 -1
  29. package/dist/assets/{Refresh-BQ3py77i.js → Refresh-rmtCmoU7.js} +1 -1
  30. package/dist/assets/{Search-CgNd44j3.js → Search-cPQK9ug7.js} +1 -1
  31. package/dist/assets/{Slider-CChimiAQ.js → Slider-DkeOiroV.js} +1 -1
  32. package/dist/assets/{Stepper-WISRB160.js → Stepper-DKw055ic.js} +1 -1
  33. package/dist/assets/{Switch-Dls1St8M.js → Switch-C1298_ep.js} +1 -1
  34. package/dist/assets/{TableSearch-Cq2ZjGX2.js → TableSearch-BV9V8FFM.js} +1 -1
  35. package/dist/assets/{ToggleButtonGroup-BhST-iqI.js → ToggleButtonGroup-CwkUnFdf.js} +1 -1
  36. package/dist/assets/{Verified-DcrboFo1.js → Verified-DWmPKGec.js} +1 -1
  37. package/dist/assets/{VerifiedUser-cJQh0v4d.js → VerifiedUser-BcSfaRSO.js} +1 -1
  38. package/dist/assets/{ViewList-B39g1Cm0.js → ViewList-D9GHWrd-.js} +1 -1
  39. package/dist/assets/{_createAggregator-BUGIwGBj.js → _createAggregator-D5fr8RWY.js} +1 -1
  40. package/dist/assets/{actions-B9LGsj6w.js → actions-CUZrsH2T.js} +1 -1
  41. package/dist/assets/{actions-AVKWKD8N.js → actions-DP7CCE0A.js} +1 -1
  42. package/dist/assets/{agreement-CYwIMY9D.js → agreement-BV75sBzV.js} +1 -1
  43. package/dist/assets/api-CGb5YYcP.js +1 -0
  44. package/dist/assets/{appearance-CLKNV9dN.js → appearance-DlQsRMbd.js} +1 -1
  45. package/dist/assets/{audit-logs-BlKGgNve.js → audit-logs-CKS3oKDg.js} +1 -1
  46. package/dist/assets/{base-chart-BpZuHtvk.js → base-chart-B0mOleV8.js} +1 -1
  47. package/dist/assets/{blocklet-Cmt2sJrg.js → blocklet-D5sXCmTb.js} +1 -1
  48. package/dist/assets/{chain-DBWSeogE.js → chain-DyM6t61U.js} +1 -1
  49. package/dist/assets/{click-to-copy-BHQeGc5Q.js → click-to-copy-DNxXoYqn.js} +1 -1
  50. package/dist/assets/client-CjKaS-AM.js +1 -0
  51. package/dist/assets/cloneDeep-CLOgqx2f.js +1 -0
  52. package/dist/assets/{collapse-BSEnOmME.js → collapse-DEo7JsR6.js} +1 -1
  53. package/dist/assets/{config-navigation-B2egvfB5.js → config-navigation-CbXKYIZU.js} +31 -31
  54. package/dist/assets/{connect-to-BrpViwa1.js → connect-to-DPydJE7E.js} +1 -1
  55. package/dist/assets/{cssMode-C4CfOom7.js → cssMode-D57p5pG2.js} +1 -1
  56. package/dist/assets/{delete-confirm-5zZBH8yO.js → delete-confirm-B4rXW4Pe.js} +1 -1
  57. package/dist/assets/{depsEqual-Chu35bsJ.js → depsEqual-CvC1pTCC.js} +1 -1
  58. package/dist/assets/{detail-BIG3Wy4a.js → detail-asQi_IfM.js} +3 -3
  59. package/dist/assets/{domains-B4KoZUjQ.js → domains-CX_CqV-G.js} +1 -1
  60. package/dist/assets/{download-DdxRq_ET.js → download-D_4cnxdu.js} +1 -1
  61. package/dist/assets/{edit.svg-Duh18hDj.js → edit.svg-dQX5dsWK.js} +1 -1
  62. package/dist/assets/emotion-cache.browser.esm-C2E3z37m.js +1 -0
  63. package/dist/assets/engine-D-5UZl2K.js +1 -0
  64. package/dist/assets/{freemarker2-B1QPgZkR.js → freemarker2-CArdZEw2.js} +1 -1
  65. package/dist/assets/{get-safe-url-BFNXt7rK.js → get-safe-url-DVMfuSqo.js} +1 -1
  66. package/dist/assets/getValidReactChildren-kj8Q_-qq.js +1 -0
  67. package/dist/assets/{graphqlMode-BYxsQfbo.js → graphqlMode-KtGgDmXD.js} +2 -2
  68. package/dist/assets/{handlebars-CF1niWLC.js → handlebars-B7jBib-v.js} +1 -1
  69. package/dist/assets/{html-DSDdVfgm.js → html-oQJls_as.js} +1 -1
  70. package/dist/assets/{html-title-FdukYTkz.js → html-title-DYatUBGG.js} +1 -1
  71. package/dist/assets/{htmlMode-KKRgY6T9.js → htmlMode-CcV0y_ea.js} +1 -1
  72. package/dist/assets/{iframe-BBW8YmnC.js → iframe-rY0H8qCp.js} +1 -1
  73. package/dist/assets/{index-DrMxR7ux.js → index-8iKeIeqV.js} +1 -1
  74. package/dist/assets/{index-Dc39Ep1O.js → index-B4epT753.js} +1 -1
  75. package/dist/assets/{index-DZRPUI-P.js → index-B5mbwIZU.js} +1 -1
  76. package/dist/assets/{index-ByEnjz7_.js → index-BBQl3YXc.js} +1 -1
  77. package/dist/assets/{index-fWrig1cJ.js → index-BM9C0U4C.js} +1 -1
  78. package/dist/assets/{index-JmWSLUGC.js → index-BOfYzYM1.js} +1 -1
  79. package/dist/assets/{index-TyxE76Ec.js → index-BPMSxTaz.js} +1 -1
  80. package/dist/assets/{index-SMQr0-z0.js → index-BU9w_a1C.js} +1 -1
  81. package/dist/assets/{index-D7GSic7V.js → index-Bc31amtW.js} +3 -3
  82. package/dist/assets/{index-BOED20oN.js → index-Bh1tj1NQ.js} +1 -1
  83. package/dist/assets/{index-mwTV4nae.js → index-BoyOmkPf.js} +1 -1
  84. package/dist/assets/{index-BiQgvI4J.js → index-BtGjcX5h.js} +1 -1
  85. package/dist/assets/{index-YZaa-4Bx.js → index-BvOthv_p.js} +1 -1
  86. package/dist/assets/{index-X_edenPh.js → index-ByQj1nxH.js} +1 -1
  87. package/dist/assets/{index-yarj_VFw.js → index-CHZ2Hj1F.js} +1 -1
  88. package/dist/assets/{index-B2aAXlh7.js → index-CMcG7BId.js} +1 -1
  89. package/dist/assets/{index-ChiaZhgT.js → index-Cdr7e6j7.js} +1 -1
  90. package/dist/assets/{index-BW7huu6e.js → index-CeEI-7co.js} +1 -1
  91. package/dist/assets/{index-Zkn_nLyD.js → index-Cgjtq1V6.js} +1 -1
  92. package/dist/assets/{index-DJ6r2HtS.js → index-Crxbu0QU.js} +1 -1
  93. package/dist/assets/{index-BZbJRgwL.js → index-Cuf2D7KQ.js} +1 -1
  94. package/dist/assets/{index-CEjBwN0B.js → index-D0BcAjhd.js} +1 -1
  95. package/dist/assets/{index-DoQLBKcD.js → index-D9ELchwn.js} +1 -1
  96. package/dist/assets/{index-VK5O0-Jy.js → index-DIyRVUnv.js} +1 -1
  97. package/dist/assets/{index-CWP-CUtR.js → index-DLoeJ7__.js} +24 -24
  98. package/dist/assets/{index-MkEIzeFu.js → index-DQaSrAPY.js} +1 -1
  99. package/dist/assets/{index-DC4dv6bl.js → index-DUBwzZmf.js} +1 -1
  100. package/dist/assets/{index-CZ4vDw6v.js → index-DXHR3--k.js} +5 -5
  101. package/dist/assets/{index-BqeIoJWi.js → index-DZsC-i3Q.js} +1 -1
  102. package/dist/assets/{index-CYNcoZTi.js → index-DmFmekgo.js} +1 -1
  103. package/dist/assets/{index-Cel1YaQM.js → index-Dn0EvY1Y.js} +1 -1
  104. package/dist/assets/{index-CxEItqDK.js → index-DqmcPN_T.js} +2 -2
  105. package/dist/assets/{index-DLpsm2mN.js → index-Ds3ZNUna.js} +1 -1
  106. package/dist/assets/index-DveCyslI.js +2900 -0
  107. package/dist/assets/{index-DnwZiXgX.js → index-E8Dsb96Q.js} +1 -1
  108. package/dist/assets/{index-vG_fevo9.js → index-GrS-fAG2.js} +1 -1
  109. package/dist/assets/index-IP4byzir.js +1 -0
  110. package/dist/assets/{index-_ubYroa3.js → index-Mk2NyklJ.js} +3 -3
  111. package/dist/assets/{index-jaPiqxwU.js → index-OiCpwwIx.js} +1 -1
  112. package/dist/assets/{index-VvQ0okvj.js → index-Qa0_hxwj.js} +2 -2
  113. package/dist/assets/{index-yUwivyV4.js → index-XXiQ04uV.js} +1 -1
  114. package/dist/assets/{index-C_JR3eYj.js → index-s7lDxtaC.js} +3 -3
  115. package/dist/assets/{index-Clrosnuk.js → index-ucRmjgXE.js} +1 -1
  116. package/dist/assets/{index-DYPBcENw.js → index-uuI6jPBT.js} +9 -9
  117. package/dist/assets/{index-OYUoLiKD.js → index-xb1TnDRk.js} +1 -1
  118. package/dist/assets/{index.esm-CxItsQTJ.js → index.esm-DiasnPqa.js} +1 -1
  119. package/dist/assets/{install-from-url-380qd7gt.js → install-from-url-8mdngQdY.js} +1 -1
  120. package/dist/assets/{invitation-DGCfHqGj.js → invitation-CiwbQYpJ.js} +1 -1
  121. package/dist/assets/{is-path-prefix-equal-m3gGIcl9.js → is-path-prefix-equal-CMKsPNms.js} +1 -1
  122. package/dist/assets/{item-DD_3E6bF.js → item-BH-ygI4o.js} +1 -1
  123. package/dist/assets/{javascript-CjrPNChY.js → javascript-CM-Bo65k.js} +1 -1
  124. package/dist/assets/{jsonMode-DXiVGLkr.js → jsonMode-Doi0IFDF.js} +1 -1
  125. package/dist/assets/{liquid-D-VmpCyh.js → liquid-CtOS3DHI.js} +1 -1
  126. package/dist/assets/{list-header-BCf9pfpu.js → list-header-BoiWZdzi.js} +1 -1
  127. package/dist/assets/{log-DZjV_8Yh.js → log-Cq5W3j6D.js} +1 -1
  128. package/dist/assets/{lottie-react.esm-DiR7wRdT.js → lottie-react.esm-CFh5XzUJ.js} +1 -1
  129. package/dist/assets/{mdx-DAOZ4lMY.js → mdx-CORDiZHt.js} +1 -1
  130. package/dist/assets/{memory-BpAl3sVA.js → memory-Du1xzgLY.js} +1 -1
  131. package/dist/assets/{metric-Dby59eDK.js → metric-BPWDK2q-.js} +1 -1
  132. package/dist/assets/omit-tjgzHgOk.js +1 -0
  133. package/dist/assets/{overview-CcowRwok.js → overview-DPp4v-vw.js} +1 -1
  134. package/dist/assets/{permission-BthIDENf.js → permission-Bh3W-Glu.js} +1 -1
  135. package/dist/assets/{preference-kBYeEwSF.js → preference-C-e0UrE0.js} +3 -3
  136. package/dist/assets/{python-CdbhBWHz.js → python-YXfcikin.js} +1 -1
  137. package/dist/assets/{raf-schd.esm-Dcqswq4F.js → raf-schd.esm-DbiDHgkB.js} +1 -1
  138. package/dist/assets/{razor-D3uR_CWd.js → razor-BSfMmxEY.js} +1 -1
  139. package/dist/assets/{rotate-session-key-DMSWrzBB.js → rotate-session-key-DSnDC3Yn.js} +1 -1
  140. package/dist/assets/{runtime-Bc6mIoVO.js → runtime-CNl_4hZq.js} +1 -1
  141. package/dist/assets/schema-Dpm0S_Pc.js +1 -0
  142. package/dist/assets/sdk-DVcqDdSI.js +1 -0
  143. package/dist/assets/{service-BwSP32Mz.js → service-CYnCvQx1.js} +1 -1
  144. package/dist/assets/{shorten-label-B3maSdfu.js → shorten-label-BBogsZkE.js} +1 -1
  145. package/dist/assets/{simple-select-DGVn7OCp.js → simple-select-CsSIqPmG.js} +1 -1
  146. package/dist/assets/{spaces-CRL9ftNo.js → spaces-CDfjjz-L.js} +1 -1
  147. package/dist/assets/{status-B6NUazE3.js → status-Cf0cZDqf.js} +1 -1
  148. package/dist/assets/{status-CmwFl99i.js → status-D63H8znQ.js} +1 -1
  149. package/dist/assets/{switch-control-CQve8WjK.js → switch-control-C8-zj-d1.js} +1 -1
  150. package/dist/assets/{table-icons-BFn_1E3e.js → table-icons-Beo1IIu2.js} +1 -1
  151. package/dist/assets/{team-ejN4nnN3.js → team-SxLWNHzW.js} +1 -1
  152. package/dist/assets/{toLower-Bvxl8_28.js → toLower-CuxkqnKE.js} +1 -1
  153. package/dist/assets/toUpper-BwUUHeJB.js +1 -0
  154. package/dist/assets/{traffic-BPJ-UAIv.js → traffic-DoPJK65-.js} +1 -1
  155. package/dist/assets/{tsMode-BE9xerv4.js → tsMode-DWeI5lxU.js} +1 -1
  156. package/dist/assets/{typescript-Bl04Dq2P.js → typescript-CyKDGIRp.js} +1 -1
  157. package/dist/assets/{url-evaluation-CfntFDAB.js → url-evaluation-DbhMaxOr.js} +1 -1
  158. package/dist/assets/{url-join-Cbq6GdOd.js → url-join-Dzq-hjGH.js} +1 -1
  159. package/dist/assets/{use-mobile-BSN4bEuW.js → use-mobile-BkwWQ6dv.js} +1 -1
  160. package/dist/assets/{use-mobile-B2yfhcBW.js → use-mobile-CHePhRTa.js} +1 -1
  161. package/dist/assets/{useAsync-Bp9zfZcB.js → useAsync-DHeZ0uWa.js} +1 -1
  162. package/dist/assets/{useAsyncRetry-B4rCQJf1.js → useAsyncRetry-mGvHNRPK.js} +1 -1
  163. package/dist/assets/{useLocalStorage-Bp5NtICI.js → useLocalStorage-8B4S8-z9.js} +1 -1
  164. package/dist/assets/{useThemeProps-BBt9_Zlf.js → useThemeProps-DLsZvoib.js} +1 -1
  165. package/dist/assets/{util-Cx9tbwYF.js → util-bM85v-Wn.js} +1 -1
  166. package/dist/assets/{wait-container-DuYkXev1.js → wait-container-BxkuU1pE.js} +1 -1
  167. package/dist/assets/{without-wallet-BYcJEzBd.js → without-wallet-B-_NO78A.js} +1 -1
  168. package/dist/assets/{wrap-locale-BrkbOfQd.js → wrap-locale-D4iB1nfm.js} +1 -1
  169. package/dist/assets/{xml-DA354x40.js → xml-DBr78n8c.js} +1 -1
  170. package/dist/assets/{yaml-BVTWBbvI.js → yaml-BZbdaO8z.js} +1 -1
  171. package/dist/index.html +1 -1
  172. package/dist/service-worker.js +1 -1
  173. package/package.json +1 -1
  174. package/dist/assets/ArrowDropDown-DBKeGP2I.js +0 -1
  175. package/dist/assets/api-a-vwp3t3.js +0 -1
  176. package/dist/assets/client-BhxOC8vI.js +0 -1
  177. package/dist/assets/cloneDeep-DUzeWN1z.js +0 -1
  178. package/dist/assets/emotion-cache.browser.esm-Ce-Ac5Zj.js +0 -1
  179. package/dist/assets/engine-B5ww7WNt.js +0 -1
  180. package/dist/assets/getValidReactChildren-DBpCDunv.js +0 -1
  181. package/dist/assets/index-BpKbArXc.js +0 -1
  182. package/dist/assets/index-CPobCYA2.js +0 -2895
  183. package/dist/assets/omit-C6T47lE8.js +0 -1
  184. package/dist/assets/schema-H7H3MB1A.js +0 -1
  185. package/dist/assets/sdk-CR-wTgx6.js +0 -1
  186. package/dist/assets/toUpper-j3cZVPNT.js +0 -1
@@ -1 +1 @@
1
- import{cn as g,r as o,g as x,co as r,B as u,j as s,N as m,cp as d}from"./index-CPobCYA2.js";function P(){const i=g(),{blocklets:c,refresh:l}=i,{t:p}=o.useContext(x),y=r.generateKey(),[a]=u();return o.useEffect(()=>{const n=r.getNotificationQueryParams(y)??{},t=a.get("entityId"),e=a.get("severity"),f={...n,...e?{severity:e==="all"?[]:e.split(","),paging:{...n.paging,page:1}}:{},...t?{entityId:t==="all"?[]:t.split(",")}:{},componentDid:[]};l(f)},[]),s.jsxs(m,{children:[s.jsx("h1",{children:p("notification.title")}),s.jsx(d,{tabType:"line",blocklets:c,context:i,filterType:"entity",type:"server"})]})}export{P as default};
1
+ import{cn as g,r as o,g as x,co as r,B as u,j as s,N as m,cp as d}from"./index-DveCyslI.js";function P(){const i=g(),{blocklets:c,refresh:l}=i,{t:p}=o.useContext(x),y=r.generateKey(),[a]=u();return o.useEffect(()=>{const n=r.getNotificationQueryParams(y)??{},t=a.get("entityId"),e=a.get("severity"),f={...n,...e?{severity:e==="all"?[]:e.split(","),paging:{...n.paging,page:1}}:{},...t?{entityId:t==="all"?[]:t.split(",")}:{},componentDid:[]};l(f)},[]),s.jsxs(m,{children:[s.jsx("h1",{children:p("notification.title")}),s.jsx(d,{tabType:"line",blocklets:c,context:i,filterType:"entity",type:"server"})]})}export{P as default};
@@ -1 +1 @@
1
- import{A as g,bm as v,u as y,j as r,Q as f,S as x,U as h}from"./index-CPobCYA2.js";import{L as S,D as j}from"./download-DdxRq_ET.js";import{u as L}from"./useLocalStorage-Bp5NtICI.js";import"./ButtonGroup-CtdH1HDV.js";import"./getValidReactChildren-DBpCDunv.js";function I(){const c=g(),[s,i]=L("server-logs-filter",{name:"abtnode",type:{abtnode:"error"}}),{name:t=s.name}=v(),{info:l}=y(),n=l.routing.provider,a=[{id:"abtnode",name:"Blocklet Server",types:["error","info","access","stdout","stderr","pm2"]},{id:"blocklet-services",name:"Blocklet Services",types:["error","info","access","stdout","stderr"]}];if(n){const e=`Service Gateway(${n})`;a.push({id:`service-gateway-${n}`,name:e,types:["error","access","security"]})}const d=e=>{i({...s,name:e.target.value}),c(`/logs/${e.target.value}`)},m=r.jsx(f,{sx:{minWidth:240},children:r.jsx(x,{value:t,onChange:d,size:"small",children:a.map(e=>r.jsx(h,{value:e.id,children:e.name},e.id))})}),o=a.find(e=>e.id===t)||a[0],p=o.types.indexOf(s.type[t]||"error"),u=e=>{i({name:t,type:{...s.type,[t]:e}})};return r.jsx(S,{name:o.name,logId:o.id,types:o.types,prepend:m,postpend:r.jsx(j,{id:l.did,name:"blocklet-server"}),defaultTypeIndex:p,onTypeChange:u},o.id)}export{I as default};
1
+ import{A as g,bm as v,u as y,j as r,Q as f,S as x,U as h}from"./index-DveCyslI.js";import{L as S,D as j}from"./download-D_4cnxdu.js";import{u as L}from"./useLocalStorage-8B4S8-z9.js";import"./ButtonGroup-DXYZPP9y.js";import"./getValidReactChildren-kj8Q_-qq.js";function I(){const c=g(),[s,i]=L("server-logs-filter",{name:"abtnode",type:{abtnode:"error"}}),{name:t=s.name}=v(),{info:l}=y(),n=l.routing.provider,a=[{id:"abtnode",name:"Blocklet Server",types:["error","info","access","stdout","stderr","pm2"]},{id:"blocklet-services",name:"Blocklet Services",types:["error","info","access","stdout","stderr"]}];if(n){const e=`Service Gateway(${n})`;a.push({id:`service-gateway-${n}`,name:e,types:["error","access","security"]})}const d=e=>{i({...s,name:e.target.value}),c(`/logs/${e.target.value}`)},m=r.jsx(f,{sx:{minWidth:240},children:r.jsx(x,{value:t,onChange:d,size:"small",children:a.map(e=>r.jsx(h,{value:e.id,children:e.name},e.id))})}),o=a.find(e=>e.id===t)||a[0],p=o.types.indexOf(s.type[t]||"error"),u=e=>{i({name:t,type:{...s.type,[t]:e}})};return r.jsx(S,{name:o.name,logId:o.id,types:o.types,prepend:m,postpend:r.jsx(j,{id:l.did,name:"blocklet-server"}),defaultTypeIndex:p,onTypeChange:u},o.id)}export{I as default};
@@ -1,4 +1,4 @@
1
- import{E as z,bn as I,bo as Ke,m as S,j as e,P as $,r as h,Q as X,R as G,S as Q,U as J,N as l,o as x,n as Re,v as U,C as Se,ad as ce,aV as Y,t as F,g as De,y as E,$ as le,aU as Ie,V as Be,s as P,au as $e,H as Pe,l as Ne,bp as W,W as Le,bq as de,br as pe,bs as me,bt as Ee,J as _e,T as B,bu as ze,az as ie,a4 as re,aR as ae,bk as We,bv as qe,X as Me,Y as Ue,A as Fe,u as He,bm as Oe,d as Ve,bw as Xe}from"./index-CPobCYA2.js";import{u as Ge,T as Qe}from"./html-title-FdukYTkz.js";import Je from"./audit-logs-BlKGgNve.js";import{T as ue,M as Ye}from"./index-CxEItqDK.js";import{r as xe,P as Ze}from"./index-X_edenPh.js";import{u as _,T as et}from"./team-ejN4nnN3.js";import{g as tt,H as st}from"./index-DJ6r2HtS.js";import{D as nt}from"./url-evaluation-CfntFDAB.js";import{E as ot}from"./Edit-_KT4-UwT.js";import{y as it}from"./index-mwTV4nae.js";import{A as rt}from"./Add-CyNDL_k-.js";import{l as H}from"./index-SMQr0-z0.js";import{C as O}from"./click-to-copy-BHQeGc5Q.js";import{f as at}from"./index-BojVbZw0.js";import{D as ct}from"./delete-confirm-5zZBH8yO.js";import{P as lt}from"./permission-BthIDENf.js";import{u as dt}from"./blocklet-Cmt2sJrg.js";import{A as pt}from"./actions-B9LGsj6w.js";import{u as fe}from"./use-mobile-BSN4bEuW.js";import{u as mt}from"./useAsyncRetry-B4rCQJf1.js";import"./TableSearch-Cq2ZjGX2.js";import"./Search-CgNd44j3.js";import"./Clear-CiwnL4KG.js";import"./useLocalStorage-Bp5NtICI.js";import"./index-BiQgvI4J.js";import"./decode-DPztD6kB.js";import"./shorten-label-B3maSdfu.js";import"./ViewList-B39g1Cm0.js";import"./use-mobile-B2yfhcBW.js";import"./client-BhxOC8vI.js";import"./AdapterDayjs-CCV2cZO2.js";import"./useThemeProps-BBt9_Zlf.js";import"./CSSTransition-Fx_rKfN5.js";import"./visuallyHidden-Dan1xhjv.js";import"./index-DrMxR7ux.js";import"./Verified-DcrboFo1.js";import"./DeleteOutline-BZsf5LEb.js";import"./ErrorOutline-D_eF69j1.js";import"./index-B2aAXlh7.js";import"./emotion-cache.browser.esm-Ce-Ac5Zj.js";import"./sdk-CR-wTgx6.js";import"./index-VK5O0-Jy.js";import"./ButtonGroup-CtdH1HDV.js";import"./getValidReactChildren-DBpCDunv.js";import"./Google-D6kQ3L4a.js";import"./cloneDeep-DUzeWN1z.js";import"./edit.svg-Duh18hDj.js";import"./list-header-BCf9pfpu.js";import"./chain-DBWSeogE.js";import"./ToggleButtonGroup-BhST-iqI.js";import"./FilterList-DrLayevh.js";import"./index-CEjBwN0B.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-Chu35bsJ.js";import"./MoreVert-BNRNVzHq.js";import"./useAsync-Bp9zfZcB.js";function Z({value:s}){const{t,locale:n}=S(),i=new Date;return new Date(s)<i?e.jsxs("span",{style:{color:"red"},children:[e.jsx($,{value:s,locale:n}),`${t("setting.accessKey.expired",{time:""})}`]}):e.jsx($,{mode:"daysLeft",value:s,locale:n,type:"all"})}Z.propTypes={value:x.string.isRequired};function ee({value:s,onChange:t,...n}){const{t:i}=S(),r=h.useMemo(()=>[{value:"signature",title:i("setting.accessKey.signature"),description:i("setting.accessKey.signatureDesc")},{value:"simple",title:i("setting.accessKey.simple"),description:i("setting.accessKey.simpleDesc")}],[i]);return e.jsxs(X,{style:{width:"100%"},variant:"outlined",...n,children:[e.jsx(G,{children:i("setting.accessKey.authType")}),e.jsx(Q,{value:s,onChange:t,fullWidth:!0,label:i("setting.accessKey.authType"),children:r.map(c=>e.jsx(J,{value:c.value,children:e.jsxs(l,{children:[e.jsx("span",{children:c.title}),e.jsx(l,{sx:{maxWidth:510,fontSize:12,color:"#999",whiteSpace:"normal"},children:c.description})]})},c.value))})]})}ee.propTypes={value:x.string.isRequired,onChange:x.func.isRequired};const te=()=>{const s=z.RBAC_CONFIG.roles.filter(r=>r.passport),{inService:t}=I(),{roles:n}=_(),i=[...s,...t?n:[]];return Ke(i,"name").filter(r=>r.name!==z.ROLES.OWNER)};function he(){const{session:s}=Re(),t=te();return h.useMemo(()=>{if(!s?.user?.role)return[];if(["owner","admin"].includes(s.user.role))return t;const i=t.filter(c=>c.name==="guest");return[...t.filter(c=>c.name!=="guest").filter(c=>s.user.passports.find(f=>f.role===c.name)),...i]},[t,s?.user?.passports,s?.user?.role])}function ge({onCreate:s=()=>{},remark:t=""}){const{api:n}=I(),{teamDid:i}=_(),{t:r}=S(),[c,f]=h.useState(!1),[u,j]=h.useState(null),p=he(),w=()=>{f(!1),j(null)},g=async m=>{const{remark:k,passport:y,authType:o}=m;f(!0);const C=await n.createAccessKey({input:{teamDid:i,remark:k.trim(),passport:y,expireAt:m.expireAt?new Date(m.expireAt).getTime():null,authType:o}}),{data:A}=C;s(A),j(null),f(!1)},d={title:`${r("common.create")} ${r("accessKey")}`,description:(m,k,y)=>e.jsxs(Y,{sx:{gap:3},children:[e.jsx(F,{label:r("setting.accessKey.tip"),autoComplete:"off",variant:"outlined",name:"remark",fullWidth:!0,autoFocus:!0,margin:"dense",value:m.remark,onChange:o=>{k({...m,remark:o.target.value,__disableConfirm:!m.passport||!o.target.value.trim()}),o.target.value.trim()?y(""):y(r("setting.accessKey.remarkInvalid"))},slotProps:{htmlInput:{"data-cy":"remark-input"}}}),e.jsxs(X,{style:{width:"100%"},variant:"outlined",children:[e.jsx(G,{children:r("setting.accessKey.passport")}),e.jsx(Q,{"data-cy":"create-access-key-select-passport",value:m.passport,onChange:o=>{const C=o.target.value;y(null),k({...m,passport:C,__disableConfirm:!m.remark||!C})},fullWidth:!0,label:r("setting.accessKey.passport"),disabled:c,children:p.map(o=>e.jsx(J,{value:o.name,"data-cy":`create-access-key-passport-option-${o.name}`,children:e.jsxs(l,{children:[e.jsx("span",{children:o.title||o.name}),e.jsx(l,{sx:{maxWidth:440,fontSize:12,color:"#999",whiteSpace:"normal",textAlign:"justify"},children:o.description})]})},o.name))})]}),e.jsx(ee,{value:m.authType,onChange:o=>{k({...m,authType:o.target.value})}}),e.jsx(ue,{placeholder:r("setting.accessKey.expireTime"),value:m.expireAt,onChange:o=>{k({...m,expireAt:o,__disableConfirm:!m.passport||!m.remark||!o})}})]}),confirm:r("common.confirm"),cancel:r("common.cancel"),color:"primary",params:{remark:t,authType:"signature",__disableConfirm:!t.trim()},onConfirm:g,onCancel:w};return e.jsxs(e.Fragment,{children:[e.jsxs(U,{sx:{color:"common.white"},edge:"end",variant:"contained",color:"primary","data-cy":"add-access-key-btn",onClick:()=>j(d),className:"rule-action",children:[c?e.jsx(Se,{size:16}):e.jsx(rt,{style:{fontSize:16}}),r("common.create")]}),u&&e.jsx(ce,{title:u.title,description:u.description,confirm:u.confirm,color:u.color,cancel:u.cancel,params:u.params,onConfirm:u.onConfirm,onCancel:u.onCancel})]})}ge.propTypes={remark:x.string,onCreate:x.func};function ye({onConfirm:s=()=>{},accessKeyId:t,accessKeySecret:n,hideSecret:i=!0}){const{t:r}=h.useContext(De),[c,f]=h.useState(!1),[u,j]=h.useState(()=>i),p=I(),w=()=>{j(!u)},g=y=>{f(y.target.checked)},d=E(window.location.origin,p?.info?.routing?.adminPath),m=h.useMemo(()=>i?`const Client = require('@blocklet/server-js');
1
+ import{E as z,bn as I,bo as Ke,m as S,j as e,P as B,r as h,Q as X,R as G,S as Q,U as J,N as l,o as x,n as Re,v as U,C as Se,ad as ce,aV as Y,t as F,g as De,y as E,$ as le,aU as Ie,V as $e,s as P,au as Be,H as Pe,l as Ne,bp as W,W as Le,bq as de,br as pe,bs as me,bt as Ee,J as _e,T as $,bu as ze,az as ie,a4 as re,aR as ae,bk as We,bv as qe,X as Me,Y as Ue,A as Fe,u as He,bm as Oe,d as Ve,bw as Xe}from"./index-DveCyslI.js";import{u as Ge,T as Qe}from"./html-title-DYatUBGG.js";import Je from"./audit-logs-CKS3oKDg.js";import{T as ue,M as Ye}from"./index-DqmcPN_T.js";import{r as xe,P as Ze}from"./index-ByQj1nxH.js";import{u as _,T as et}from"./team-SxLWNHzW.js";import{g as tt,H as st}from"./index-Crxbu0QU.js";import{D as nt}from"./url-evaluation-DbhMaxOr.js";import{E as ot}from"./Edit-CQZHQvSb.js";import{y as it}from"./index-BoyOmkPf.js";import{A as rt}from"./Add-Ch4u3455.js";import{l as H}from"./index-BU9w_a1C.js";import{C as O}from"./click-to-copy-DNxXoYqn.js";import{f as at}from"./index-BojVbZw0.js";import{D as ct}from"./delete-confirm-B4rXW4Pe.js";import{P as lt}from"./permission-Bh3W-Glu.js";import{u as dt}from"./blocklet-D5sXCmTb.js";import{A as pt}from"./actions-CUZrsH2T.js";import{u as fe}from"./use-mobile-BkwWQ6dv.js";import{u as mt}from"./useAsyncRetry-mGvHNRPK.js";import"./TableSearch-BV9V8FFM.js";import"./Search-cPQK9ug7.js";import"./Clear-DeVIZRwO.js";import"./useLocalStorage-8B4S8-z9.js";import"./index-BtGjcX5h.js";import"./decode-DPztD6kB.js";import"./shorten-label-BBogsZkE.js";import"./ViewList-D9GHWrd-.js";import"./use-mobile-CHePhRTa.js";import"./client-CjKaS-AM.js";import"./AdapterDayjs-DgT7PQDg.js";import"./useThemeProps-DLsZvoib.js";import"./CSSTransition-BIwFkzHV.js";import"./visuallyHidden-Dan1xhjv.js";import"./index-8iKeIeqV.js";import"./Verified-DWmPKGec.js";import"./DeleteOutline-B3iouChg.js";import"./ErrorOutline-BPjUOx4r.js";import"./index-CMcG7BId.js";import"./emotion-cache.browser.esm-C2E3z37m.js";import"./sdk-DVcqDdSI.js";import"./index-DIyRVUnv.js";import"./ButtonGroup-DXYZPP9y.js";import"./getValidReactChildren-kj8Q_-qq.js";import"./Google-B9hW4wT-.js";import"./cloneDeep-CLOgqx2f.js";import"./edit.svg-dQX5dsWK.js";import"./list-header-BoiWZdzi.js";import"./chain-DyM6t61U.js";import"./ToggleButtonGroup-CwkUnFdf.js";import"./FilterList-BNY6Og8Y.js";import"./index-D0BcAjhd.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-CvC1pTCC.js";import"./MoreVert-DYnwNOGS.js";import"./useAsync-DHeZ0uWa.js";function Z({value:s}){const{t,locale:n}=S(),i=new Date;return new Date(s)<i?e.jsxs("span",{style:{color:"red"},children:[e.jsx(B,{value:s,locale:n}),`${t("setting.accessKey.expired",{time:""})}`]}):e.jsx(B,{mode:"daysLeft",value:s,locale:n,type:"all"})}Z.propTypes={value:x.string.isRequired};function ee({value:s,onChange:t,...n}){const{t:i}=S(),r=h.useMemo(()=>[{value:"signature",title:i("setting.accessKey.signature"),description:i("setting.accessKey.signatureDesc")},{value:"simple",title:i("setting.accessKey.simple"),description:i("setting.accessKey.simpleDesc")}],[i]);return e.jsxs(X,{style:{width:"100%"},variant:"outlined",...n,children:[e.jsx(G,{children:i("setting.accessKey.authType")}),e.jsx(Q,{value:s,onChange:t,fullWidth:!0,label:i("setting.accessKey.authType"),children:r.map(c=>e.jsx(J,{value:c.value,children:e.jsxs(l,{children:[e.jsx("span",{children:c.title}),e.jsx(l,{sx:{maxWidth:510,fontSize:12,color:"#999",whiteSpace:"normal"},children:c.description})]})},c.value))})]})}ee.propTypes={value:x.string.isRequired,onChange:x.func.isRequired};const te=()=>{const s=z.RBAC_CONFIG.roles.filter(r=>r.passport),{inService:t}=I(),{roles:n}=_(),i=[...s,...t?n:[]];return Ke(i,"name").filter(r=>r.name!==z.ROLES.OWNER)};function he(){const{session:s}=Re(),t=te();return h.useMemo(()=>{if(!s?.user?.role)return[];if(["owner","admin"].includes(s.user.role))return t;const i=t.filter(c=>c.name==="guest");return[...t.filter(c=>c.name!=="guest").filter(c=>s.user.passports.find(f=>f.role===c.name)),...i]},[t,s?.user?.passports,s?.user?.role])}function ge({onCreate:s=()=>{},remark:t=""}){const{api:n}=I(),{teamDid:i}=_(),{t:r}=S(),[c,f]=h.useState(!1),[u,j]=h.useState(null),p=he(),w=()=>{f(!1),j(null)},g=async m=>{const{remark:k,passport:y,authType:o}=m;f(!0);const C=await n.createAccessKey({input:{teamDid:i,remark:k.trim(),passport:y,expireAt:m.expireAt?new Date(m.expireAt).getTime():null,authType:o}}),{data:A}=C;s(A),j(null),f(!1)},d={title:`${r("common.create")} ${r("accessKey")}`,description:(m,k,y)=>e.jsxs(Y,{sx:{gap:3},children:[e.jsx(F,{label:r("setting.accessKey.tip"),autoComplete:"off",variant:"outlined",name:"remark",fullWidth:!0,autoFocus:!0,margin:"dense",value:m.remark,onChange:o=>{k({...m,remark:o.target.value,__disableConfirm:!m.passport||!o.target.value.trim()}),o.target.value.trim()?y(""):y(r("setting.accessKey.remarkInvalid"))},slotProps:{htmlInput:{"data-cy":"remark-input"}}}),e.jsxs(X,{style:{width:"100%"},variant:"outlined",children:[e.jsx(G,{children:r("setting.accessKey.passport")}),e.jsx(Q,{"data-cy":"create-access-key-select-passport",value:m.passport,onChange:o=>{const C=o.target.value;y(null),k({...m,passport:C,__disableConfirm:!m.remark||!C})},fullWidth:!0,label:r("setting.accessKey.passport"),disabled:c,children:p.map(o=>e.jsx(J,{value:o.name,"data-cy":`create-access-key-passport-option-${o.name}`,children:e.jsxs(l,{children:[e.jsx("span",{children:o.title||o.name}),e.jsx(l,{sx:{maxWidth:440,fontSize:12,color:"#999",whiteSpace:"normal",textAlign:"justify"},children:o.description})]})},o.name))})]}),e.jsx(ee,{value:m.authType,onChange:o=>{k({...m,authType:o.target.value})}}),e.jsx(ue,{placeholder:r("setting.accessKey.expireTime"),value:m.expireAt,onChange:o=>{k({...m,expireAt:o,__disableConfirm:!m.passport||!m.remark||!o})}})]}),confirm:r("common.confirm"),cancel:r("common.cancel"),color:"primary",params:{remark:t,authType:"signature",__disableConfirm:!t.trim()},onConfirm:g,onCancel:w};return e.jsxs(e.Fragment,{children:[e.jsxs(U,{sx:{color:"common.white"},edge:"end",variant:"contained",color:"primary","data-cy":"add-access-key-btn",onClick:()=>j(d),className:"rule-action",children:[c?e.jsx(Se,{size:16}):e.jsx(rt,{style:{fontSize:16}}),r("common.create")]}),u&&e.jsx(ce,{title:u.title,description:u.description,confirm:u.confirm,color:u.color,cancel:u.cancel,params:u.params,onConfirm:u.onConfirm,onCancel:u.onCancel})]})}ge.propTypes={remark:x.string,onCreate:x.func};function ye({onConfirm:s=()=>{},accessKeyId:t,accessKeySecret:n,hideSecret:i=!0}){const{t:r}=h.useContext(De),[c,f]=h.useState(!1),[u,j]=h.useState(()=>i),p=I(),w=()=>{j(!u)},g=y=>{f(y.target.checked)},d=E(window.location.origin,p?.info?.routing?.adminPath),m=h.useMemo(()=>i?`const Client = require('@blocklet/server-js');
2
2
  const ensureServerEndpoint = require('@abtnode/util/lib/ensure-server-endpoint');
3
3
  const { joinURL } = require('ufo');
4
4
 
@@ -16,7 +16,7 @@ const result = await client.getBlocklet(
16
16
  { input: { did: rootDid, attachRuntimeInfo: false } },
17
17
  { headers: { 'x-access-blocklet': rootDid } }
18
18
  );
19
- `:p.inService?`curl -H "Authorization: Bearer ${n}" "${E(window.blocklet?.appUrl,z.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/did/session")}"`:`curl -H "Authorization: Bearer ${n}" "${E(d,"/api/did/session")}"`,[i,t,n,p.inService,d]),k=h.useMemo(()=>i?`blocklet deploy --endpoint ${p.inService?window.blocklet?.appUrl:d} --access-key ${t} --access-secret ${n} {blockletPath}/.blocklet/bundle;`:null,[i,t,n,p.inService,d]);return e.jsxs(le,{title:r("common.createSuccess"),fullWidth:!0,open:!0,disableEscapeKeyDown:!0,onClose:s,showCloseButton:!1,actions:e.jsx("div",{children:e.jsx(U,{disabled:i?!c:!1,onClick:s,color:"primary",autoFocus:!0,variant:"contained","data-cy":"submit-confirm-dialog",children:r("common.confirm")})}),"aria-labelledby":"simple-dialog-title",children:[e.jsx("div",{children:e.jsx(ut,{children:r(i?"setting.accessKey.saveSecretTip":"setting.accessKey.viewSecret")})}),e.jsx("div",{style:{marginTop:"20px"}}),e.jsxs(M,{children:[e.jsx(q,{children:r("setting.accessKey.accessKeyId")}),e.jsx(O,{children:t})]}),e.jsxs(M,{children:[e.jsx(q,{children:r("setting.accessKey.accessKeySecret")}),u?e.jsx(U,{"data-cy":"show-secret-btn",color:"primary",onClick:w,children:r("setting.accessKey.showSecret")}):e.jsx(O,{children:n})]}),!u&&e.jsxs(M,{children:[e.jsx(q,{children:`Access Key ${r("setting.accessKey.usage")}`}),e.jsx(H,{code:m,language:"shell"}),k&&e.jsx(H,{code:k,language:"shell"})]}),i&&e.jsx("div",{children:e.jsx(Ie,{value:"end",disabled:u,control:e.jsx(Be,{checked:c,onChange:g}),label:r("setting.accessKey.iKnow"),labelPlacement:"end"})})]})}ye.propTypes={accessKeyId:x.string.isRequired,accessKeySecret:x.string.isRequired,onConfirm:x.func,hideSecret:x.bool};const q=P.div`
19
+ `:p.inService?`curl -H "Authorization: Bearer ${n}" "${E(window.blocklet?.appUrl,z.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/did/session")}"`:`curl -H "Authorization: Bearer ${n}" "${E(d,"/api/did/session")}"`,[i,t,n,p.inService,d]),k=h.useMemo(()=>i?`blocklet deploy --endpoint ${p.inService?window.blocklet?.appUrl:d} --access-key ${t} --access-secret ${n} {blockletPath}/.blocklet/bundle;`:null,[i,t,n,p.inService,d]);return e.jsxs(le,{title:r("common.createSuccess"),fullWidth:!0,open:!0,disableEscapeKeyDown:!0,onClose:s,showCloseButton:!1,actions:e.jsx("div",{children:e.jsx(U,{disabled:i?!c:!1,onClick:s,color:"primary",autoFocus:!0,variant:"contained","data-cy":"submit-confirm-dialog",children:r("common.confirm")})}),"aria-labelledby":"simple-dialog-title",children:[e.jsx("div",{children:e.jsx(ut,{children:r(i?"setting.accessKey.saveSecretTip":"setting.accessKey.viewSecret")})}),e.jsx("div",{style:{marginTop:"20px"}}),e.jsxs(M,{children:[e.jsx(q,{children:r("setting.accessKey.accessKeyId")}),e.jsx(O,{children:t})]}),e.jsxs(M,{children:[e.jsx(q,{children:r("setting.accessKey.accessKeySecret")}),u?e.jsx(U,{"data-cy":"show-secret-btn",color:"primary",onClick:w,children:r("setting.accessKey.showSecret")}):e.jsx(O,{children:n})]}),!u&&e.jsxs(M,{children:[e.jsx(q,{children:`Access Key ${r("setting.accessKey.usage")}`}),e.jsx(H,{code:m,language:"shell"}),k&&e.jsx(H,{code:k,language:"shell"})]}),i&&e.jsx("div",{children:e.jsx(Ie,{value:"end",disabled:u,control:e.jsx($e,{checked:c,onChange:g}),label:r("setting.accessKey.iKnow"),labelPlacement:"end"})})]})}ye.propTypes={accessKeyId:x.string.isRequired,accessKeySecret:x.string.isRequired,onConfirm:x.func,hideSecret:x.bool};const q=P.div`
20
20
  display: flex;
21
21
  justify-content: space-between;
22
22
  align-items: center;
@@ -27,14 +27,14 @@ const result = await client.getBlocklet(
27
27
  `,ut=P.div`
28
28
  font-size: 16px;
29
29
  font-weight: bold;
30
- `;function be({accessKeyId:s,time:t,remark:n,onDelete:i=()=>{},onClose:r=()=>{}}){const{t:c,locale:f}=S(),{api:u}=I(),{teamDid:j}=_(),p=()=>{r()},w=async()=>{try{await u.deleteAccessKey({input:{teamDid:j,accessKeyId:s}}),i()}catch(m){Pe.error(m?.message)}finally{p()}},g=m=>({key:`<b>${s}</b>`,name:`<b>${n}</b>`,time:$e(m,f),timeAge:at(new Date(m),Ne(f))}),d={keyName:n,title:c("setting.accessKey.title"),description:t?`${c("setting.accessKey.description",g(t))}`:`${c("setting.accessKey.descriptionNoTime",{key:`<b>${s}</b>`,name:`<b>${n}</b>`})}`,confirmPlaceholder:c("setting.accessKey.confirm_desc",{name:n}),confirm:c("common.delConfirm"),cancel:c("common.cancel"),onConfirm:w,onCancel:p};return e.jsx(ct,{keyName:d.keyName,title:d.title,description:d.description,confirmPlaceholder:d.confirmPlaceholder,confirm:d.confirm,cancel:d.cancel,params:d.params,onConfirm:d.onConfirm,onCancel:d.onCancel})}be.propTypes={accessKeyId:x.string.isRequired,time:x.string.isRequired,remark:x.string.isRequired,onDelete:x.func,onClose:x.func};function je({accessKeyId:s,remark:t="",onUpdate:n=()=>{},passport:i="",expireAt:r="",authType:c="signature",onClose:f=()=>{}}){const{api:u}=I(),{teamDid:j}=_(),{t:p}=S(),[w,g]=h.useState(!1),d=he(),m=()=>{g(!1),f()},k=async o=>{const{accessKeyId:C,remark:A="",passport:b,expireAt:v,authType:N}=o;g(!0),await u.updateAccessKey({input:{teamDid:j,accessKeyId:C,remark:A.trim(),passport:b,expireAt:v?new Date(v).getTime():null,authType:N}}),n(),m()},y={title:`${p("common.update")} ${p("accessKey")}`,description:(o,C,A)=>e.jsxs(Y,{sx:{gap:3},children:[e.jsx(F,{label:p("setting.accessKey.accessKeyId"),autoComplete:"off",variant:"outlined",name:"accessKeyId",fullWidth:!0,autoFocus:!0,margin:"dense",value:o.accessKeyId,disabled:!0}),e.jsx(F,{label:p("common.remark"),autoComplete:"off",variant:"outlined",name:"remark",fullWidth:!0,autoFocus:!0,value:o.remark,onChange:b=>{C({...o,remark:b.target.value,__disableConfirm:!b.target.value.trim()}),b.target.value.trim()?A(""):A(p("setting.accessKey.remarkInvalid"))}}),e.jsxs(X,{style:{width:"100%"},variant:"outlined",children:[e.jsx(G,{children:p("setting.accessKey.passport")}),e.jsx(Q,{"data-cy":"update-access-key-select-passport",value:o.passport,onChange:b=>{const v=b.target.value;A(null),C({...o,passport:v,__disableConfirm:!o.remark||!v})},fullWidth:!0,label:p("setting.accessKey.passport"),disabled:w,children:d.map(b=>e.jsx(J,{value:b.name,"data-cy":`update-access-key-passport-option-${b.name}`,children:e.jsxs(l,{children:[e.jsx("span",{children:b.title||b.name}),e.jsx(l,{sx:{maxWidth:440,fontSize:12,color:"#999",whiteSpace:"normal",textAlign:"justify"},children:b.description})]})},b.name))})]}),e.jsx(ee,{disabled:!0,value:o.authType,onChange:b=>{C({...o,authType:b.target.value})}}),e.jsx(ue,{placeholder:p("setting.accessKey.expireTime"),value:o.expireAt,onChange:b=>{C({...o,expireAt:b,__disableConfirm:!o.passport||!o.remark||!b})}})]}),confirm:p("common.confirm"),cancel:p("common.cancel"),color:"primary",params:{accessKeyId:s,remark:t,passport:i,expireAt:r,authType:c},onConfirm:k,onCancel:m};return e.jsx(ce,{title:y.title,description:y.description,confirm:y.confirm,color:y.color,cancel:y.cancel,params:y.params,onConfirm:y.onConfirm,onCancel:y.onCancel})}je.propTypes={accessKeyId:x.string.isRequired,remark:x.string,passport:x.string,expireAt:x.string,authType:x.string,onUpdate:x.func,onClose:x.func};function Ce({accessKey:s,onCancel:t}){const{t:n}=S();return e.jsx(le,{title:n("accessKey"),onClose:t,open:!0,PaperProps:{style:{maxWidth:800}},fullWidth:!0,children:e.jsx(xt,{children:e.jsx(ve,{accessKey:s})})})}Ce.propTypes={accessKey:x.object.isRequired,onCancel:x.func.isRequired};const xt=P(l)`
30
+ `;function be({accessKeyId:s,time:t,remark:n,onDelete:i=()=>{},onClose:r=()=>{}}){const{t:c,locale:f}=S(),{api:u}=I(),{teamDid:j}=_(),p=()=>{r()},w=async()=>{try{await u.deleteAccessKey({input:{teamDid:j,accessKeyId:s}}),i()}catch(m){Pe.error(m?.message)}finally{p()}},g=m=>({key:`<b>${s}</b>`,name:`<b>${n}</b>`,time:Be(m,f),timeAge:at(new Date(m),Ne(f))}),d={keyName:n,title:c("setting.accessKey.title"),description:t?`${c("setting.accessKey.description",g(t))}`:`${c("setting.accessKey.descriptionNoTime",{key:`<b>${s}</b>`,name:`<b>${n}</b>`})}`,confirmPlaceholder:c("setting.accessKey.confirm_desc",{name:n}),confirm:c("common.delConfirm"),cancel:c("common.cancel"),onConfirm:w,onCancel:p};return e.jsx(ct,{keyName:d.keyName,title:d.title,description:d.description,confirmPlaceholder:d.confirmPlaceholder,confirm:d.confirm,cancel:d.cancel,params:d.params,onConfirm:d.onConfirm,onCancel:d.onCancel})}be.propTypes={accessKeyId:x.string.isRequired,time:x.string.isRequired,remark:x.string.isRequired,onDelete:x.func,onClose:x.func};function je({accessKeyId:s,remark:t="",onUpdate:n=()=>{},passport:i="",expireAt:r="",authType:c="signature",onClose:f=()=>{}}){const{api:u}=I(),{teamDid:j}=_(),{t:p}=S(),[w,g]=h.useState(!1),d=he(),m=()=>{g(!1),f()},k=async o=>{const{accessKeyId:C,remark:A="",passport:b,expireAt:v,authType:N}=o;g(!0),await u.updateAccessKey({input:{teamDid:j,accessKeyId:C,remark:A.trim(),passport:b,expireAt:v?new Date(v).getTime():null,authType:N}}),n(),m()},y={title:`${p("common.update")} ${p("accessKey")}`,description:(o,C,A)=>e.jsxs(Y,{sx:{gap:3},children:[e.jsx(F,{label:p("setting.accessKey.accessKeyId"),autoComplete:"off",variant:"outlined",name:"accessKeyId",fullWidth:!0,autoFocus:!0,margin:"dense",value:o.accessKeyId,disabled:!0}),e.jsx(F,{label:p("common.remark"),autoComplete:"off",variant:"outlined",name:"remark",fullWidth:!0,autoFocus:!0,value:o.remark,onChange:b=>{C({...o,remark:b.target.value,__disableConfirm:!b.target.value.trim()}),b.target.value.trim()?A(""):A(p("setting.accessKey.remarkInvalid"))}}),e.jsxs(X,{style:{width:"100%"},variant:"outlined",children:[e.jsx(G,{children:p("setting.accessKey.passport")}),e.jsx(Q,{"data-cy":"update-access-key-select-passport",value:o.passport,onChange:b=>{const v=b.target.value;A(null),C({...o,passport:v,__disableConfirm:!o.remark||!v})},fullWidth:!0,label:p("setting.accessKey.passport"),disabled:w,children:d.map(b=>e.jsx(J,{value:b.name,"data-cy":`update-access-key-passport-option-${b.name}`,children:e.jsxs(l,{children:[e.jsx("span",{children:b.title||b.name}),e.jsx(l,{sx:{maxWidth:440,fontSize:12,color:"#999",whiteSpace:"normal",textAlign:"justify"},children:b.description})]})},b.name))})]}),e.jsx(ee,{disabled:!0,value:o.authType,onChange:b=>{C({...o,authType:b.target.value})}}),e.jsx(ue,{placeholder:p("setting.accessKey.expireTime"),value:o.expireAt,onChange:b=>{C({...o,expireAt:b,__disableConfirm:!o.passport||!o.remark||!b})}})]}),confirm:p("common.confirm"),cancel:p("common.cancel"),color:"primary",params:{accessKeyId:s,remark:t,passport:i,expireAt:r,authType:c},onConfirm:k,onCancel:m};return e.jsx(ce,{title:y.title,description:y.description,confirm:y.confirm,color:y.color,cancel:y.cancel,params:y.params,onConfirm:y.onConfirm,onCancel:y.onCancel})}je.propTypes={accessKeyId:x.string.isRequired,remark:x.string,passport:x.string,expireAt:x.string,authType:x.string,onUpdate:x.func,onClose:x.func};function Ce({accessKey:s,onCancel:t}){const{t:n}=S();return e.jsx(le,{title:n("accessKey"),onClose:t,open:!0,PaperProps:{style:{maxWidth:800}},fullWidth:!0,children:e.jsx(xt,{children:e.jsx(ve,{accessKey:s})})})}Ce.propTypes={accessKey:x.object.isRequired,onCancel:x.func.isRequired};const xt=P(l)`
31
31
  margin-top: -16px;
32
32
 
33
33
  .tabs {
34
34
  margin-left: 0;
35
35
  margin-right: 0;
36
36
  }
37
- `;function ve({accessKey:s}){const{t,locale:n}=S(),{blocklet:i}=dt(),r=I(),c=te(),f=(i?.children||[]).find(g=>g?.meta?.did===s.componentDid),u=c.find(g=>g.name===s.passport),j=u?u.title:s.passport,p=h.useMemo(()=>r.inService?`curl -H "Authorization: Bearer blocklet-${W.toBase58(s.accessKeyPublic)}" "${E(window.blocklet?.appUrl,z.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/did/session")}"`:`curl -H "Authorization: Bearer blocklet-${W.toBase58(s.accessKeyPublic)}" "${E(window.location.origin,r?.info?.routing?.adminPath,"/api/did/session")}"`,[s.accessKeyPublic,r.inService,r?.info?.routing?.adminPath]),w=[{title:t("common.baseInfo"),items:[{label:t("setting.accessKey.accessKeyId"),content:e.jsx(Le,{did:s.accessKeyId,showQrcode:!0})},...s.authType==="simple"?[{label:t("setting.accessKey.accessKeySecret"),content:e.jsx(O,{children:`blocklet-${W.toBase58(s.accessKeyPublic)}`})}]:[],{label:t("common.role"),content:e.jsx(l,{children:xe(j,s.passport)})},{label:t("common.createdVia"),content:s.createdVia},{label:t("common.createdBy"),content:s.createdBy?e.jsx(de,{showDid:!0,did:s.createdBy,cardType:me.Detailed,infoType:pe.Minimal,sx:{border:0,padding:0}}):"-"}]},{title:t("common.timeInfo"),items:[{label:t("common.createdAt"),content:s.createdAt?e.jsx($,{value:s.createdAt,type:"all",locale:n}):"-"},{label:t("common.lastUsedAt"),content:s.lastUsedAt?e.jsx($,{value:s.lastUsedAt,type:"all",locale:n}):"-"},{label:t("common.expiredAt"),content:s.expireAt?e.jsx(Z,{value:s.expireAt}):t("common.neverExpired")}]},{title:t("common.otherInfo"),items:[{label:t("setting.accessKey.authType"),content:s.authType},{label:t("common.remark"),content:s.remark},...s.authType!=="signature"?[{label:t("setting.accessKey.resourceType"),content:s.resourceType||"-"},{label:t("setting.accessKey.resourceId"),content:s.resourceId||"-"}]:[],...f?[{label:t("setting.accessKey.component"),content:e.jsxs(l,{sx:{width:{xs:250,sm:400},display:"flex",alignItems:"center"},children:[e.jsx(Ee,{blocklet:f,ancestors:[i]}),e.jsx(l,{sx:{ml:"16px",minWidth:0},children:e.jsxs(l,{className:"component-header",children:[e.jsx(l,{className:"component-name",children:_e.getDisplayName(f,!0)}),e.jsx(l,{className:"component-version",children:f?.meta?.version})]})})]},f)}]:[],s.authType!=="signature"?{label:t("setting.accessKey.usage"),content:e.jsx(H,{code:p,language:"shell"})}:null].filter(Boolean)}];return e.jsx(ft,{gap:3,children:e.jsx(l,{className:"info-area",children:w.map(g=>e.jsxs(l,{sx:{mb:3},children:[e.jsx(B,{variant:"h6",sx:{mb:1.5},children:g.title}),e.jsx(l,{className:"info-grid",children:g.items.map(d=>e.jsxs(l,{className:"info-item",children:[e.jsx(l,{className:"info-label",children:e.jsx(B,{variant:"subtitle2",color:"textSecondary",children:d.label})}),e.jsx(l,{sx:{flex:1,minWidth:0},children:d.content})]},d.label))})]},g.title))})})}ve.propTypes={accessKey:x.object.isRequired};const ft=P(Y)`
37
+ `;function ve({accessKey:s}){const{t,locale:n}=S(),{blocklet:i}=dt(),r=I(),c=te(),f=(i?.children||[]).find(g=>g?.meta?.did===s.componentDid),u=c.find(g=>g.name===s.passport),j=u?u.title:s.passport,p=h.useMemo(()=>r.inService?`curl -H "Authorization: Bearer blocklet-${W.toBase58(s.accessKeyPublic)}" "${E(window.blocklet?.appUrl,z.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/did/session")}"`:`curl -H "Authorization: Bearer blocklet-${W.toBase58(s.accessKeyPublic)}" "${E(window.location.origin,r?.info?.routing?.adminPath,"/api/did/session")}"`,[s.accessKeyPublic,r.inService,r?.info?.routing?.adminPath]),w=[{title:t("common.baseInfo"),items:[{label:t("setting.accessKey.accessKeyId"),content:e.jsx(Le,{did:s.accessKeyId,showQrcode:!0})},...s.authType==="simple"?[{label:t("setting.accessKey.accessKeySecret"),content:e.jsx(O,{children:`blocklet-${W.toBase58(s.accessKeyPublic)}`})}]:[],{label:t("common.role"),content:e.jsx(l,{children:xe(j,s.passport)})},{label:t("common.createdVia"),content:s.createdVia},{label:t("common.createdBy"),content:s.createdBy?e.jsx(de,{showDid:!0,did:s.createdBy,cardType:me.Detailed,infoType:pe.Minimal,sx:{border:0,padding:0}}):"-"}]},{title:t("common.timeInfo"),items:[{label:t("common.createdAt"),content:s.createdAt?e.jsx(B,{value:s.createdAt,type:"all",locale:n}):"-"},{label:t("common.lastUsedAt"),content:s.lastUsedAt?e.jsx(B,{value:s.lastUsedAt,type:"all",locale:n}):"-"},{label:t("common.expiredAt"),content:s.expireAt?e.jsx(Z,{value:s.expireAt}):t("common.neverExpired")}]},{title:t("common.otherInfo"),items:[{label:t("setting.accessKey.authType"),content:s.authType},{label:t("common.remark"),content:s.remark},...s.authType!=="signature"?[{label:t("setting.accessKey.resourceType"),content:s.resourceType||"-"},{label:t("setting.accessKey.resourceId"),content:s.resourceId||"-"}]:[],...f?[{label:t("setting.accessKey.component"),content:e.jsxs(l,{sx:{width:{xs:250,sm:400},display:"flex",alignItems:"center"},children:[e.jsx(Ee,{blocklet:f,ancestors:[i]}),e.jsx(l,{sx:{ml:"16px",minWidth:0},children:e.jsxs(l,{className:"component-header",children:[e.jsx(l,{className:"component-name",children:_e.getDisplayName(f,!0)}),e.jsx(l,{className:"component-version",children:f?.meta?.version})]})})]},f)}]:[],s.authType!=="signature"?{label:t("setting.accessKey.usage"),content:e.jsx(H,{code:p,language:"shell"})}:null].filter(Boolean)}];return e.jsx(ft,{gap:3,children:e.jsx(l,{className:"info-area",children:w.map(g=>e.jsxs(l,{sx:{mb:3},children:[e.jsx($,{variant:"h6",sx:{mb:1.5},children:g.title}),e.jsx(l,{className:"info-grid",children:g.items.map(d=>e.jsxs(l,{className:"info-item",children:[e.jsx(l,{className:"info-label",children:e.jsx($,{variant:"subtitle2",color:"textSecondary",children:d.label})}),e.jsx(l,{sx:{flex:1,minWidth:0},children:d.content})]},d.label))})]},g.title))})})}ve.propTypes={accessKey:x.object.isRequired};const ft=P(Y)`
38
38
  .info-card {
39
39
  margin-bottom: 24px;
40
40
  overflow: hidden;
@@ -107,7 +107,7 @@ const result = await client.getBlocklet(
107
107
  margin: 0;
108
108
  }
109
109
  }
110
- `;function V({title:s,tooltipTitle:t,link:n}){const{t:i}=S(),r=fe(),[c,f]=h.useState(!1),u=()=>f(p=>!p),j=()=>f(!1);return r?e.jsxs(l,{sx:{color:"text.secondary",fontSize:"14px",lineHeight:1.5},children:[s,e.jsx(ze,{onClickAway:j,children:e.jsx("span",{children:e.jsx(ie,{open:c,onClose:j,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,title:e.jsxs(l,{sx:{fontSize:"14px",lineHeight:1.5},children:[t,e.jsx(l,{sx:{color:"primary.main",ml:.5},component:"a",href:n,target:"_blank",rel:"noopener noreferrer",children:i("dashboard.document")})]}),children:e.jsx(re,{size:"small",onClick:u,sx:{ml:.5},children:e.jsx(ae,{fontSize:"14"})})})})})]}):e.jsxs(l,{sx:{color:"text.secondary",fontSize:"14px",lineHeight:1.5},children:[s,e.jsx(ie,{enterTouchDelay:0,leaveTouchDelay:3e3,title:e.jsxs(l,{sx:{fontSize:"14px",lineHeight:1.5},children:[t,e.jsx(l,{sx:{color:"primary.main",ml:.5},component:"a",href:n,target:"_blank",rel:"noopener noreferrer",children:i("dashboard.document")})]}),children:e.jsx(re,{size:"small",sx:{ml:.5},children:e.jsx(ae,{fontSize:"14"})})})]})}V.propTypes={title:x.string.isRequired,tooltipTitle:x.string.isRequired,link:x.string.isRequired};function ke({isSelf:s=!1,columnSx:t={}}){const{t:n,locale:i}=S(),{api:r,inService:c}=I(),{teamDid:f}=_(),[u,j]=h.useState({}),[p,w]=h.useState(null),[g,d]=h.useState(null),[m,k]=h.useState(null),y=fe(),o=te(),C=h.useRef(null),A=`access-keys-${f}`,b=tt(A),[v,N]=h.useState({searchText:b.searchText||"",pageSize:b.rowsPerPage||10,page:1}),D=mt(async()=>{const a={teamDid:f,paging:{page:v.page,pageSize:v.pageSize}};return await r.getAccessKeys({input:a})},[v.page,v.pageSize]),{loading:Te,error:se}=D,L=h.useMemo(()=>D.value?.list||[],[D.value?.list]),ne=h.useMemo(()=>s?["accessKeyId","createdVia","createdBy","createdBy"]:[],[s]),we=h.useMemo(()=>[{label:n("common.name"),name:"remark",options:{customBodyRender:(a,{rowIndex:K})=>{const R=L[K];return e.jsx(l,{className:"remark",sx:We({display:"flex",alignItems:"center",gap:2},t),children:e.jsx(B,{children:R.remark||"N/A"})})}}},{label:"Access Key ID",name:"accessKeyId",options:{customBodyRender:a=>e.jsx(l,{sx:t,children:e.jsx(qe,{showDidLogo:!1,children:a})})}},{label:n("common.role"),name:"passport",options:{customBodyRender:a=>{const K=o.find(T=>T.name===a),R=K?K.title:a;return e.jsx(l,{sx:t,children:xe(R,a)})}}},{label:n("common.createdVia"),name:"createdVia",options:{customBodyRender:a=>e.jsx(B,{sx:t,children:a})}},{label:n("setting.accessKey.authType"),name:"authType",options:{customBodyRender:a=>e.jsx(B,{sx:t,children:n(`setting.accessKey.${a}`)})}},{label:n("common.createdAt"),name:"createdAt",options:{customBodyRender:a=>e.jsx(l,{sx:t,children:a?e.jsx($,{value:a,locale:i}):"-"})}},{label:n("common.lastUsedAt"),name:"lastUsedAt",options:{customBodyRender:a=>e.jsx(l,{sx:t,children:a?e.jsx($,{value:a,locale:i}):"-"})}},{label:n("common.expiredAt"),name:"expireAt",options:{customBodyRender:a=>e.jsx(l,{className:"expired-at",sx:t,children:a?e.jsx(Z,{value:a}):n("common.neverExpired")})}},{label:n("common.createdBy"),name:"createdBy",width:100,options:{customBodyRender:a=>e.jsx(l,{sx:t,children:a?e.jsx(de,{showDid:!0,did:a,cardType:me.Detailed,infoType:pe.Minimal,sx:{border:0,padding:0,...y&&{minWidth:"unset"}}}):"-"})}},{label:n("common.actions"),name:"actions",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRender:(a,{rowIndex:K})=>{const R=L[K];return e.jsx(l,{sx:t,children:e.jsx(pt,{"data-cy":"access-key-actions",actions:[{icon:e.jsx(ot,{}),text:n("common.edit"),onClick:T=>{T.stopPropagation(),k(R)}},{icon:e.jsx(nt,{}),text:n("common.delete"),onClick:T=>{T.stopPropagation(),d(R)}}]})})}}}].filter(a=>!ne.includes(a.name)),[L,i,n,o,d,k,t,y,ne]),Ae=({page:a,rowsPerPage:K,searchText:R})=>{v.pageSize!==K?N(T=>({...T,searchText:"",pageSize:K,page:1})):v.page!==a+1?N(T=>({...T,searchText:"",page:a+1})):v.searchText!==R&&N(T=>({...T,searchText:R,page:1}))},oe=v.searchText?L.filter(a=>a.accessKeyId.toLowerCase().includes(v.searchText.toLowerCase())||(a.remark||"").toLowerCase().includes(v.searchText.toLowerCase())):L;return se?e.jsx(Me,{severity:"error",children:Ue(se)}):e.jsxs(l,{ref:C,sx:{".custom-toobar-btns":{gap:"8px"},".custom-toobar-title .custom-toobar-title-inner>span":{display:"flex",alignItems:"center","white-space":"inherit",height:"100%"}},children:[y?e.jsx(V,{title:n("setting.accessKey.listTitle"),tooltipTitle:n("setting.accessKey.tooltipTitle"),link:`https://www.arcblock.io/docs/blocklet-developer/${i}/access-key`}):null,e.jsx(st,{durable:A,durableKeys:["page","rowsPerPage"],data:oe,columns:we,className:"pc-access-key-table",options:{sort:!1,download:!1,filter:!1,print:!1,viewColumns:!1,page:v.page-1,rowsPerPage:v.pageSize,count:D.value?.paging?.total||0,searchDebounceTime:600,onRowClick(a,{dataIndex:K},R){if(C.current?.contains(R.target)){const T=oe[K];w(T)}}},loading:Te,onChange:Ae,title:y?null:e.jsx(V,{title:n("setting.accessKey.listTitle"),tooltipTitle:n("setting.accessKey.tooltipTitle"),link:`https://www.arcblock.io/docs/blocklet-developer/${i}/access-key`}),customButtons:[e.jsx(lt,{permission:c?"":"mutate_accessKey",children:e.jsx(ge,{onCreate:a=>{const{accessKeyId:K,accessKeySecret:R,authType:T}=a;j({show:!0,accessKeyId:K,accessKeySecret:R,authType:T})}})})],emptyNode:e.jsx(it,{children:n("oauth.client.empty")})}),u.show&&e.jsx(ye,{hideSecret:u.authType==="signature",onConfirm:()=>{D.retry(),j({show:!1})},...u}),p&&e.jsx(Ce,{onCancel:()=>w(null),accessKey:p}),g&&e.jsx(be,{accessKeyId:g.accessKeyId,time:g.lastUsedAt,remark:g.remark||"N/A",onDelete:D.retry,onClose:()=>d(null)}),m&&e.jsx(je,{...m,onUpdate:D.retry,onClose:()=>k(null)})]})}ke.propTypes={isSelf:x.bool,columnSx:x.object};function ht(){return e.jsx(ke,{})}function Cs(){const s=Fe(),{t}=S(),{info:n}=He(),{tab:i="members"}=Oe(),r=o=>Xe(o,n),{data:c}=Ve(),f=h.useCallback(o=>{const C=c.find(A=>[A.meta.did,A.appDid,A.appPid].includes(o));return C?C.meta.title:"Server"},[c]),u=h.useRef(null);u.current=f;const j=h.useCallback(()=>e.jsx(Je,{showScope:!0,scopeFormatter:u.current}),[]),p=h.useCallback(()=>e.jsx(Ye,{type:"server",createPassportSvg:r}),[]),w=n.did,g=o=>{s(`/team/${o}`)},d={members:{label:t("common.members"),value:"members",component:p},passports:{label:t("team.member.passports"),value:"passports",component:Ze},"access-keys":{label:t("common.accessKey"),value:"access-keys",component:ht},"audit-logs":{label:t("common.auditLogs"),value:"audit-logs",component:j}},m=Ge(d[i],t("common.team")),k=Object.values(d).map(({label:o,value:C})=>({label:o,value:C})),y=d[i]||d.member;return e.jsxs(et,{teamDid:w,children:[m,e.jsxs(gt,{children:[e.jsx(B,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:t("common.team")}),e.jsx(Qe,{tabs:k,current:i,onChange:g,scrollButtons:"auto"}),e.jsx("div",{className:"page-content",children:e.jsx(y.component,{createPassportSvg:r})})]})]})}const gt=P.main`
110
+ `;function V({title:s,tooltipTitle:t,link:n}){const{t:i}=S(),r=fe(),[c,f]=h.useState(!1),u=()=>f(p=>!p),j=()=>f(!1);return r?e.jsxs(l,{sx:{color:"text.secondary",fontSize:"14px",lineHeight:1.5},children:[s,e.jsx(ze,{onClickAway:j,children:e.jsx("span",{children:e.jsx(ie,{open:c,onClose:j,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,title:e.jsxs(l,{sx:{fontSize:"14px",lineHeight:1.5},children:[t,e.jsx(l,{sx:{color:"primary.main",ml:.5},component:"a",href:n,target:"_blank",rel:"noopener noreferrer",children:i("dashboard.document")})]}),children:e.jsx(re,{size:"small",onClick:u,sx:{ml:.5},children:e.jsx(ae,{fontSize:"14"})})})})})]}):e.jsxs(l,{sx:{color:"text.secondary",fontSize:"14px",lineHeight:1.5},children:[s,e.jsx(ie,{enterTouchDelay:0,leaveTouchDelay:3e3,title:e.jsxs(l,{sx:{fontSize:"14px",lineHeight:1.5},children:[t,e.jsx(l,{sx:{color:"primary.main",ml:.5},component:"a",href:n,target:"_blank",rel:"noopener noreferrer",children:i("dashboard.document")})]}),children:e.jsx(re,{size:"small",sx:{ml:.5},children:e.jsx(ae,{fontSize:"14"})})})]})}V.propTypes={title:x.string.isRequired,tooltipTitle:x.string.isRequired,link:x.string.isRequired};function ke({isSelf:s=!1,columnSx:t={}}){const{t:n,locale:i}=S(),{api:r,inService:c}=I(),{teamDid:f}=_(),[u,j]=h.useState({}),[p,w]=h.useState(null),[g,d]=h.useState(null),[m,k]=h.useState(null),y=fe(),o=te(),C=h.useRef(null),A=`access-keys-${f}`,b=tt(A),[v,N]=h.useState({searchText:b.searchText||"",pageSize:b.rowsPerPage||10,page:1}),D=mt(async()=>{const a={teamDid:f,paging:{page:v.page,pageSize:v.pageSize}};return await r.getAccessKeys({input:a})},[v.page,v.pageSize]),{loading:Te,error:se}=D,L=h.useMemo(()=>D.value?.list||[],[D.value?.list]),ne=h.useMemo(()=>s?["accessKeyId","createdVia","createdBy","createdBy"]:[],[s]),we=h.useMemo(()=>[{label:n("common.name"),name:"remark",options:{customBodyRender:(a,{rowIndex:K})=>{const R=L[K];return e.jsx(l,{className:"remark",sx:We({display:"flex",alignItems:"center",gap:2},t),children:e.jsx($,{children:R.remark||"N/A"})})}}},{label:"Access Key ID",name:"accessKeyId",options:{customBodyRender:a=>e.jsx(l,{sx:t,children:e.jsx(qe,{showDidLogo:!1,children:a})})}},{label:n("common.role"),name:"passport",options:{customBodyRender:a=>{const K=o.find(T=>T.name===a),R=K?K.title:a;return e.jsx(l,{sx:t,children:xe(R,a)})}}},{label:n("common.createdVia"),name:"createdVia",options:{customBodyRender:a=>e.jsx($,{sx:t,children:a})}},{label:n("setting.accessKey.authType"),name:"authType",options:{customBodyRender:a=>e.jsx($,{sx:t,children:n(`setting.accessKey.${a}`)})}},{label:n("common.createdAt"),name:"createdAt",options:{customBodyRender:a=>e.jsx(l,{sx:t,children:a?e.jsx(B,{value:a,locale:i}):"-"})}},{label:n("common.lastUsedAt"),name:"lastUsedAt",options:{customBodyRender:a=>e.jsx(l,{sx:t,children:a?e.jsx(B,{value:a,locale:i}):"-"})}},{label:n("common.expiredAt"),name:"expireAt",options:{customBodyRender:a=>e.jsx(l,{className:"expired-at",sx:t,children:a?e.jsx(Z,{value:a}):n("common.neverExpired")})}},{label:n("common.createdBy"),name:"createdBy",width:100,options:{customBodyRender:a=>e.jsx(l,{sx:t,children:a?e.jsx(de,{showDid:!0,did:a,cardType:me.Detailed,infoType:pe.Minimal,sx:{border:0,padding:0,...y&&{minWidth:"unset"}}}):"-"})}},{label:n("common.actions"),name:"actions",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRender:(a,{rowIndex:K})=>{const R=L[K];return e.jsx(l,{sx:t,children:e.jsx(pt,{"data-cy":"access-key-actions",actions:[{icon:e.jsx(ot,{}),text:n("common.edit"),onClick:T=>{T.stopPropagation(),k(R)}},{icon:e.jsx(nt,{}),text:n("common.delete"),onClick:T=>{T.stopPropagation(),d(R)}}]})})}}}].filter(a=>!ne.includes(a.name)),[L,i,n,o,d,k,t,y,ne]),Ae=({page:a,rowsPerPage:K,searchText:R})=>{v.pageSize!==K?N(T=>({...T,searchText:"",pageSize:K,page:1})):v.page!==a+1?N(T=>({...T,searchText:"",page:a+1})):v.searchText!==R&&N(T=>({...T,searchText:R,page:1}))},oe=v.searchText?L.filter(a=>a.accessKeyId.toLowerCase().includes(v.searchText.toLowerCase())||(a.remark||"").toLowerCase().includes(v.searchText.toLowerCase())):L;return se?e.jsx(Me,{severity:"error",children:Ue(se)}):e.jsxs(l,{ref:C,sx:{".custom-toobar-btns":{gap:"8px"},".custom-toobar-title .custom-toobar-title-inner>span":{display:"flex",alignItems:"center","white-space":"inherit",height:"100%"}},children:[y?e.jsx(V,{title:n("setting.accessKey.listTitle"),tooltipTitle:n("setting.accessKey.tooltipTitle"),link:`https://www.arcblock.io/docs/blocklet-developer/${i}/access-key`}):null,e.jsx(st,{durable:A,durableKeys:["page","rowsPerPage"],data:oe,columns:we,className:"pc-access-key-table",options:{sort:!1,download:!1,filter:!1,print:!1,viewColumns:!1,page:v.page-1,rowsPerPage:v.pageSize,count:D.value?.paging?.total||0,searchDebounceTime:600,onRowClick(a,{dataIndex:K},R){if(C.current?.contains(R.target)){const T=oe[K];w(T)}}},loading:Te,onChange:Ae,title:y?null:e.jsx(V,{title:n("setting.accessKey.listTitle"),tooltipTitle:n("setting.accessKey.tooltipTitle"),link:`https://www.arcblock.io/docs/blocklet-developer/${i}/access-key`}),customButtons:[e.jsx(lt,{permission:c?"":"mutate_accessKey",children:e.jsx(ge,{onCreate:a=>{const{accessKeyId:K,accessKeySecret:R,authType:T}=a;j({show:!0,accessKeyId:K,accessKeySecret:R,authType:T})}})})],emptyNode:e.jsx(it,{children:n("oauth.client.empty")})}),u.show&&e.jsx(ye,{hideSecret:u.authType==="signature",onConfirm:()=>{D.retry(),j({show:!1})},...u}),p&&e.jsx(Ce,{onCancel:()=>w(null),accessKey:p}),g&&e.jsx(be,{accessKeyId:g.accessKeyId,time:g.lastUsedAt,remark:g.remark||"N/A",onDelete:D.retry,onClose:()=>d(null)}),m&&e.jsx(je,{...m,onUpdate:D.retry,onClose:()=>k(null)})]})}ke.propTypes={isSelf:x.bool,columnSx:x.object};function ht(){return e.jsx(ke,{})}function Cs(){const s=Fe(),{t}=S(),{info:n}=He(),{tab:i="members"}=Oe(),r=o=>Xe(o,n),{data:c}=Ve(),f=h.useCallback(o=>{const C=c.find(A=>[A.meta.did,A.appDid,A.appPid].includes(o));return C?C.meta.title:"Server"},[c]),u=h.useRef(null);u.current=f;const j=h.useCallback(()=>e.jsx(Je,{showScope:!0,scopeFormatter:u.current}),[]),p=h.useCallback(()=>e.jsx(Ye,{type:"server",createPassportSvg:r}),[]),w=n.did,g=o=>{s(`/team/${o}`)},d={members:{label:t("common.members"),value:"members",component:p},passports:{label:t("team.member.passports"),value:"passports",component:Ze},"access-keys":{label:t("common.accessKey"),value:"access-keys",component:ht},"audit-logs":{label:t("common.auditLogs"),value:"audit-logs",component:j}},m=Ge(d[i],t("common.team")),k=Object.values(d).map(({label:o,value:C})=>({label:o,value:C})),y=d[i]||d.member;return e.jsxs(et,{teamDid:w,children:[m,e.jsxs(gt,{children:[e.jsx($,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:t("common.team")}),e.jsx(Qe,{tabs:k,current:i,onChange:g,scrollButtons:"auto"}),e.jsx("div",{className:"page-content",children:e.jsx(y.component,{createPassportSvg:r})})]})]})}const gt=P.main`
111
111
  .page-header {
112
112
  display: flex;
113
113
  justify-content: space-between;
@@ -1 +1 @@
1
- import{eG as D}from"./index-CPobCYA2.js";function f(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function $(e){return f(e)==="object"}function re(e){return Array.isArray(e)&&e.length>0&&e.every(m=>"message"in m)}function Y(e,m){return e.length<124?e:m}const ne="graphql-transport-ws";var g;(function(e){e[e.InternalServerError=4500]="InternalServerError",e[e.InternalClientError=4005]="InternalClientError",e[e.BadRequest=4400]="BadRequest",e[e.BadResponse=4004]="BadResponse",e[e.Unauthorized=4401]="Unauthorized",e[e.Forbidden=4403]="Forbidden",e[e.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",e[e.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",e[e.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",e[e.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",e[e.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests"})(g||(g={}));var c;(function(e){e.ConnectionInit="connection_init",e.ConnectionAck="connection_ack",e.Ping="ping",e.Pong="pong",e.Subscribe="subscribe",e.Next="next",e.Error="error",e.Complete="complete"})(c||(c={}));function v(e){if(!$(e))throw new Error(`Message is expected to be an object, but got ${f(e)}`);if(!e.type)throw new Error("Message is missing the 'type' property");if(typeof e.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${f(e.type)}`);switch(e.type){case c.ConnectionInit:case c.ConnectionAck:case c.Ping:case c.Pong:{if(e.payload!=null&&!$(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break}case c.Subscribe:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!$(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${f(e.payload)}`);if(typeof e.payload.query!="string")throw new Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${f(e.payload.query)}`);if(e.payload.variables!=null&&!$(e.payload.variables))throw new Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${f(e.payload.variables)}`);if(e.payload.operationName!=null&&f(e.payload.operationName)!=="string")throw new Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${f(e.payload.operationName)}`);if(e.payload.extensions!=null&&!$(e.payload.extensions))throw new Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${f(e.payload.extensions)}`);break}case c.Next:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!$(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${f(e.payload)}`);break}case c.Error:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!re(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break}case c.Complete:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${e.type}"`)}return e}function oe(e,m){return v(typeof e=="string"?JSON.parse(e,m):e)}function W(e,m){return v(e),JSON.stringify(e,m)}var A=function(e){return this instanceof A?(this.v=e,this):new A(e)},ie=function(e,m,R){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var M=R.apply(e,m||[]),b,w=[];return b={},E("next"),E("throw"),E("return"),b[Symbol.asyncIterator]=function(){return this},b;function E(u){M[u]&&(b[u]=function(r){return new Promise(function(S,L){w.push([u,r,S,L])>1||I(u,r)})})}function I(u,r){try{q(M[u](r))}catch(S){G(w[0][3],S)}}function q(u){u.value instanceof A?Promise.resolve(u.value.v).then(z,F):G(w[0][2],u)}function z(u){I("next",u)}function F(u){I("throw",u)}function G(u,r){u(r),w.shift(),w.length&&I(w[0][0],w[0][1])}};function pe(e){const{url:m,connectionParams:R,lazy:M=!0,onNonLazyError:b=console.error,lazyCloseTimeout:w=0,keepAlive:E=0,disablePong:I,connectionAckWaitTimeout:q=0,retryAttempts:z=5,retryWait:F=async function(a){let t=1e3;for(let o=0;o<a;o++)t*=2;await new Promise(o=>setTimeout(o,t+Math.floor(Math.random()*2700+300)))},shouldRetry:G=J,isFatalConnectionProblem:u,on:r,webSocketImpl:S,generateID:L=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,a=>{const t=Math.random()*16|0;return(a=="x"?t:t&3|8).toString(16)})},jsonMessageReplacer:U,jsonMessageReviver:ee}=e;let T;if(S){if(!ae(S))throw new Error("Invalid WebSocket implementation provided");T=S}else typeof WebSocket<"u"?T=WebSocket:typeof D<"u"?T=D.WebSocket||D.MozWebSocket:typeof window<"u"&&(T=window.WebSocket||window.MozWebSocket);if(!T)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const N=T,d=(()=>{const n=(()=>{const t={};return{on(o,s){return t[o]=s,()=>{delete t[o]}},emit(o){var s;"id"in o&&((s=t[o.id])===null||s===void 0||s.call(t,o))}}})(),a={connecting:r?.connecting?[r.connecting]:[],opened:r?.opened?[r.opened]:[],connected:r?.connected?[r.connected]:[],ping:r?.ping?[r.ping]:[],pong:r?.pong?[r.pong]:[],message:r?.message?[n.emit,r.message]:[n.emit],closed:r?.closed?[r.closed]:[],error:r?.error?[r.error]:[]};return{onMessage:n.on,on(t,o){const s=a[t];return s.push(o),()=>{s.splice(s.indexOf(o),1)}},emit(t,...o){for(const s of[...a[t]])s(...o)}}})();function Q(n){const a=[d.on("error",t=>{a.forEach(o=>o()),n(t)}),d.on("closed",t=>{a.forEach(o=>o()),n(t)})]}let h,k=0,H,O=!1,j=0,C=!1;async function K(){clearTimeout(H);const[n,a]=await(h??(h=new Promise((s,y)=>(async()=>{if(O){if(await F(j),!k)return h=void 0,y({code:1e3,reason:"All Subscriptions Gone"});j++}d.emit("connecting",O);const i=new N(typeof m=="function"?await m():m,ne);let x,_;function B(){isFinite(E)&&E>0&&(clearTimeout(_),_=setTimeout(()=>{i.readyState===N.OPEN&&(i.send(W({type:c.Ping})),d.emit("ping",!1,void 0))},E))}Q(l=>{h=void 0,clearTimeout(x),clearTimeout(_),y(l),l instanceof Z&&(i.close(4499,"Terminated"),i.onerror=null,i.onclose=null)}),i.onerror=l=>d.emit("error",l),i.onclose=l=>d.emit("closed",l),i.onopen=async()=>{try{d.emit("opened",i);const l=typeof R=="function"?await R():R;if(i.readyState!==N.OPEN)return;i.send(W(l?{type:c.ConnectionInit,payload:l}:{type:c.ConnectionInit},U)),isFinite(q)&&q>0&&(x=setTimeout(()=>{i.close(g.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},q)),B()}catch(l){d.emit("error",l),i.close(g.InternalClientError,Y(l instanceof Error?l.message:new Error(l).message,"Internal client error"))}};let P=!1;i.onmessage=({data:l})=>{try{const p=oe(l,ee);if(d.emit("message",p),p.type==="ping"||p.type==="pong"){d.emit(p.type,!0,p.payload),p.type==="pong"?B():I||(i.send(W(p.payload?{type:c.Pong,payload:p.payload}:{type:c.Pong})),d.emit("pong",!1,p.payload));return}if(P)return;if(p.type!==c.ConnectionAck)throw new Error(`First message cannot be of type ${p.type}`);clearTimeout(x),P=!0,d.emit("connected",i,p.payload,O),O=!1,j=0,s([i,new Promise((ce,te)=>Q(te))])}catch(p){i.onmessage=null,d.emit("error",p),i.close(g.BadResponse,Y(p instanceof Error?p.message:new Error(p).message,"Bad response"))}}})())));n.readyState===N.CLOSING&&await a;let t=()=>{};const o=new Promise(s=>t=s);return[n,t,Promise.race([o.then(()=>{if(!k){const s=()=>n.close(1e3,"Normal Closure");isFinite(w)&&w>0?H=setTimeout(()=>{n.readyState===N.OPEN&&s()},w):s()}}),a])]}function V(n){if(J(n)&&(se(n.code)||[g.InternalServerError,g.InternalClientError,g.BadRequest,g.BadResponse,g.Unauthorized,g.SubprotocolNotAcceptable,g.SubscriberAlreadyExists,g.TooManyInitialisationRequests].includes(n.code)))throw n;if(C)return!1;if(J(n)&&n.code===1e3)return k>0;if(!z||j>=z||!G(n)||u?.(n))throw n;return O=!0}M||(async()=>{for(k++;;)try{const[,,n]=await K();await n}catch(n){try{if(!V(n))return}catch(a){return b?.(a)}}})();function X(n,a){const t=L(n);let o=!1,s=!1,y=()=>{k--,o=!0};return(async()=>{for(k++;;)try{const[i,x,_]=await K();if(o)return x();const B=d.onMessage(t,P=>{switch(P.type){case c.Next:{a.next(P.payload);return}case c.Error:{s=!0,o=!0,a.error(P.payload),y();return}case c.Complete:{o=!0,y();return}}});i.send(W({id:t,type:c.Subscribe,payload:n},U)),y=()=>{!o&&i.readyState===N.OPEN&&i.send(W({id:t,type:c.Complete},U)),k--,o=!0,x()},await _.finally(B);return}catch(i){if(!V(i))return}})().then(()=>{s||a.complete()}).catch(i=>{a.error(i)}),()=>{o||y()}}return{on:d.on,subscribe:X,iterate(n){const a=[],t={done:!1,error:null,resolve:()=>{}},o=X(n,{next(y){a.push(y),t.resolve()},error(y){t.done=!0,t.error=y,t.resolve()},complete(){t.done=!0,t.resolve()}}),s=function(){return ie(this,arguments,function*(){for(;;){for(a.length||(yield A(new Promise(x=>t.resolve=x)));a.length;)yield yield A(a.shift());if(t.error)throw t.error;if(t.done)return yield A(void 0)}})}();return s.throw=async y=>(t.done||(t.done=!0,t.error=y,t.resolve()),{done:!0,value:void 0}),s.return=async()=>(o(),{done:!0,value:void 0}),s},async dispose(){if(C=!0,h){const[n]=await h;n.close(1e3,"Normal Closure")}},terminate(){h&&d.emit("closed",new Z)}}}class Z extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function J(e){return $(e)&&"code"in e&&"reason"in e}function se(e){return[1e3,1001,1006,1005,1012,1013,1014].includes(e)?!1:e>=1e3&&e<=1999}function ae(e){return typeof e=="function"&&"constructor"in e&&"CLOSED"in e&&"CLOSING"in e&&"CONNECTING"in e&&"OPEN"in e}export{g as CloseCode,ne as GRAPHQL_TRANSPORT_WS_PROTOCOL,c as MessageType,Z as TerminatedCloseEvent,pe as createClient,oe as parseMessage,W as stringifyMessage,v as validateMessage};
1
+ import{eG as D}from"./index-DveCyslI.js";function f(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function $(e){return f(e)==="object"}function re(e){return Array.isArray(e)&&e.length>0&&e.every(m=>"message"in m)}function Y(e,m){return e.length<124?e:m}const ne="graphql-transport-ws";var g;(function(e){e[e.InternalServerError=4500]="InternalServerError",e[e.InternalClientError=4005]="InternalClientError",e[e.BadRequest=4400]="BadRequest",e[e.BadResponse=4004]="BadResponse",e[e.Unauthorized=4401]="Unauthorized",e[e.Forbidden=4403]="Forbidden",e[e.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",e[e.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",e[e.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",e[e.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",e[e.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests"})(g||(g={}));var c;(function(e){e.ConnectionInit="connection_init",e.ConnectionAck="connection_ack",e.Ping="ping",e.Pong="pong",e.Subscribe="subscribe",e.Next="next",e.Error="error",e.Complete="complete"})(c||(c={}));function v(e){if(!$(e))throw new Error(`Message is expected to be an object, but got ${f(e)}`);if(!e.type)throw new Error("Message is missing the 'type' property");if(typeof e.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${f(e.type)}`);switch(e.type){case c.ConnectionInit:case c.ConnectionAck:case c.Ping:case c.Pong:{if(e.payload!=null&&!$(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break}case c.Subscribe:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!$(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${f(e.payload)}`);if(typeof e.payload.query!="string")throw new Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${f(e.payload.query)}`);if(e.payload.variables!=null&&!$(e.payload.variables))throw new Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${f(e.payload.variables)}`);if(e.payload.operationName!=null&&f(e.payload.operationName)!=="string")throw new Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${f(e.payload.operationName)}`);if(e.payload.extensions!=null&&!$(e.payload.extensions))throw new Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${f(e.payload.extensions)}`);break}case c.Next:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!$(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${f(e.payload)}`);break}case c.Error:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!re(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break}case c.Complete:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${e.type}"`)}return e}function oe(e,m){return v(typeof e=="string"?JSON.parse(e,m):e)}function W(e,m){return v(e),JSON.stringify(e,m)}var A=function(e){return this instanceof A?(this.v=e,this):new A(e)},ie=function(e,m,R){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var M=R.apply(e,m||[]),b,w=[];return b={},E("next"),E("throw"),E("return"),b[Symbol.asyncIterator]=function(){return this},b;function E(u){M[u]&&(b[u]=function(r){return new Promise(function(S,L){w.push([u,r,S,L])>1||I(u,r)})})}function I(u,r){try{q(M[u](r))}catch(S){G(w[0][3],S)}}function q(u){u.value instanceof A?Promise.resolve(u.value.v).then(z,F):G(w[0][2],u)}function z(u){I("next",u)}function F(u){I("throw",u)}function G(u,r){u(r),w.shift(),w.length&&I(w[0][0],w[0][1])}};function pe(e){const{url:m,connectionParams:R,lazy:M=!0,onNonLazyError:b=console.error,lazyCloseTimeout:w=0,keepAlive:E=0,disablePong:I,connectionAckWaitTimeout:q=0,retryAttempts:z=5,retryWait:F=async function(a){let t=1e3;for(let o=0;o<a;o++)t*=2;await new Promise(o=>setTimeout(o,t+Math.floor(Math.random()*2700+300)))},shouldRetry:G=J,isFatalConnectionProblem:u,on:r,webSocketImpl:S,generateID:L=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,a=>{const t=Math.random()*16|0;return(a=="x"?t:t&3|8).toString(16)})},jsonMessageReplacer:U,jsonMessageReviver:ee}=e;let T;if(S){if(!ae(S))throw new Error("Invalid WebSocket implementation provided");T=S}else typeof WebSocket<"u"?T=WebSocket:typeof D<"u"?T=D.WebSocket||D.MozWebSocket:typeof window<"u"&&(T=window.WebSocket||window.MozWebSocket);if(!T)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const N=T,d=(()=>{const n=(()=>{const t={};return{on(o,s){return t[o]=s,()=>{delete t[o]}},emit(o){var s;"id"in o&&((s=t[o.id])===null||s===void 0||s.call(t,o))}}})(),a={connecting:r?.connecting?[r.connecting]:[],opened:r?.opened?[r.opened]:[],connected:r?.connected?[r.connected]:[],ping:r?.ping?[r.ping]:[],pong:r?.pong?[r.pong]:[],message:r?.message?[n.emit,r.message]:[n.emit],closed:r?.closed?[r.closed]:[],error:r?.error?[r.error]:[]};return{onMessage:n.on,on(t,o){const s=a[t];return s.push(o),()=>{s.splice(s.indexOf(o),1)}},emit(t,...o){for(const s of[...a[t]])s(...o)}}})();function Q(n){const a=[d.on("error",t=>{a.forEach(o=>o()),n(t)}),d.on("closed",t=>{a.forEach(o=>o()),n(t)})]}let h,k=0,H,O=!1,j=0,C=!1;async function K(){clearTimeout(H);const[n,a]=await(h??(h=new Promise((s,y)=>(async()=>{if(O){if(await F(j),!k)return h=void 0,y({code:1e3,reason:"All Subscriptions Gone"});j++}d.emit("connecting",O);const i=new N(typeof m=="function"?await m():m,ne);let x,_;function B(){isFinite(E)&&E>0&&(clearTimeout(_),_=setTimeout(()=>{i.readyState===N.OPEN&&(i.send(W({type:c.Ping})),d.emit("ping",!1,void 0))},E))}Q(l=>{h=void 0,clearTimeout(x),clearTimeout(_),y(l),l instanceof Z&&(i.close(4499,"Terminated"),i.onerror=null,i.onclose=null)}),i.onerror=l=>d.emit("error",l),i.onclose=l=>d.emit("closed",l),i.onopen=async()=>{try{d.emit("opened",i);const l=typeof R=="function"?await R():R;if(i.readyState!==N.OPEN)return;i.send(W(l?{type:c.ConnectionInit,payload:l}:{type:c.ConnectionInit},U)),isFinite(q)&&q>0&&(x=setTimeout(()=>{i.close(g.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},q)),B()}catch(l){d.emit("error",l),i.close(g.InternalClientError,Y(l instanceof Error?l.message:new Error(l).message,"Internal client error"))}};let P=!1;i.onmessage=({data:l})=>{try{const p=oe(l,ee);if(d.emit("message",p),p.type==="ping"||p.type==="pong"){d.emit(p.type,!0,p.payload),p.type==="pong"?B():I||(i.send(W(p.payload?{type:c.Pong,payload:p.payload}:{type:c.Pong})),d.emit("pong",!1,p.payload));return}if(P)return;if(p.type!==c.ConnectionAck)throw new Error(`First message cannot be of type ${p.type}`);clearTimeout(x),P=!0,d.emit("connected",i,p.payload,O),O=!1,j=0,s([i,new Promise((ce,te)=>Q(te))])}catch(p){i.onmessage=null,d.emit("error",p),i.close(g.BadResponse,Y(p instanceof Error?p.message:new Error(p).message,"Bad response"))}}})())));n.readyState===N.CLOSING&&await a;let t=()=>{};const o=new Promise(s=>t=s);return[n,t,Promise.race([o.then(()=>{if(!k){const s=()=>n.close(1e3,"Normal Closure");isFinite(w)&&w>0?H=setTimeout(()=>{n.readyState===N.OPEN&&s()},w):s()}}),a])]}function V(n){if(J(n)&&(se(n.code)||[g.InternalServerError,g.InternalClientError,g.BadRequest,g.BadResponse,g.Unauthorized,g.SubprotocolNotAcceptable,g.SubscriberAlreadyExists,g.TooManyInitialisationRequests].includes(n.code)))throw n;if(C)return!1;if(J(n)&&n.code===1e3)return k>0;if(!z||j>=z||!G(n)||u?.(n))throw n;return O=!0}M||(async()=>{for(k++;;)try{const[,,n]=await K();await n}catch(n){try{if(!V(n))return}catch(a){return b?.(a)}}})();function X(n,a){const t=L(n);let o=!1,s=!1,y=()=>{k--,o=!0};return(async()=>{for(k++;;)try{const[i,x,_]=await K();if(o)return x();const B=d.onMessage(t,P=>{switch(P.type){case c.Next:{a.next(P.payload);return}case c.Error:{s=!0,o=!0,a.error(P.payload),y();return}case c.Complete:{o=!0,y();return}}});i.send(W({id:t,type:c.Subscribe,payload:n},U)),y=()=>{!o&&i.readyState===N.OPEN&&i.send(W({id:t,type:c.Complete},U)),k--,o=!0,x()},await _.finally(B);return}catch(i){if(!V(i))return}})().then(()=>{s||a.complete()}).catch(i=>{a.error(i)}),()=>{o||y()}}return{on:d.on,subscribe:X,iterate(n){const a=[],t={done:!1,error:null,resolve:()=>{}},o=X(n,{next(y){a.push(y),t.resolve()},error(y){t.done=!0,t.error=y,t.resolve()},complete(){t.done=!0,t.resolve()}}),s=function(){return ie(this,arguments,function*(){for(;;){for(a.length||(yield A(new Promise(x=>t.resolve=x)));a.length;)yield yield A(a.shift());if(t.error)throw t.error;if(t.done)return yield A(void 0)}})}();return s.throw=async y=>(t.done||(t.done=!0,t.error=y,t.resolve()),{done:!0,value:void 0}),s.return=async()=>(o(),{done:!0,value:void 0}),s},async dispose(){if(C=!0,h){const[n]=await h;n.close(1e3,"Normal Closure")}},terminate(){h&&d.emit("closed",new Z)}}}class Z extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function J(e){return $(e)&&"code"in e&&"reason"in e}function se(e){return[1e3,1001,1006,1005,1012,1013,1014].includes(e)?!1:e>=1e3&&e<=1999}function ae(e){return typeof e=="function"&&"constructor"in e&&"CLOSED"in e&&"CLOSING"in e&&"CONNECTING"in e&&"OPEN"in e}export{g as CloseCode,ne as GRAPHQL_TRANSPORT_WS_PROTOCOL,c as MessageType,Z as TerminatedCloseEvent,pe as createClient,oe as parseMessage,W as stringifyMessage,v as validateMessage};
@@ -1 +1 @@
1
- import{r as o,g as n,j as t,s as r}from"./index-CPobCYA2.js";import{p as a}from"./index-jaPiqxwU.js";function c(){const{t:s}=o.useContext(n);return t.jsx(e,{style:{paddingTop:"25vh"},children:t.jsx(a,{status:"404",description:s("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const e=r.main``;export{c as default};
1
+ import{r as o,g as n,j as t,s as r}from"./index-DveCyslI.js";import{p as a}from"./index-OiCpwwIx.js";function c(){const{t:s}=o.useContext(n);return t.jsx(e,{style:{paddingTop:"25vh"},children:t.jsx(a,{status:"404",description:s("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const e=r.main``;export{c as default};
@@ -1,4 +1,4 @@
1
- import{aG as createSvgIcon,j as jsxRuntimeExports,r as reactExports$1,o,bd as getDefaultExportFromCjs,F as useMediaQuery,s as styled,dn as Skeleton,cP as M$1,_ as CheckIcon,az as Tooltip,dH as Button,T as Typography,N as Box,C as CircularProgress,f as useTheme,dB as isObject,e$ as mergeThemeOptions,f0 as StyledEngineProvider,f1 as ThemeProvider,f2 as ThemeProvider$1,f3 as s,Z as o$1,b8 as styled$1,f4 as CloseIcon,cE as Buffer,be as U,bE as __vitePreload,dG as noop,dd as l$2}from"./index-CPobCYA2.js";import{j as joinUrl}from"./url-join-Cbq6GdOd.js";const l$1=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"})),d$2=createSvgIcon([jsxRuntimeExports.jsx("circle",{cx:"12",cy:"19",r:"2"},"0"),jsxRuntimeExports.jsx("path",{d:"M10 3h4v12h-4z"},"1")]),k$2=reactExports$1.createContext(),{Provider:w$3}=k$2,d$1=(C,F,V=window.location.pathname.replace(/\/$/,"/"))=>C?F?C===V:new RegExp(C).test(V):!1;function P({children:C,steps:F,mode:V="history"}){const[D,B]=reactExports$1.useState("");!D&&F.length&&B(F[0].key);const O=F.map(X=>X.children?[{key:X.key,hasChild:!0},X.children.map(at=>({parentKey:X.key,key:at.key}))]:{key:X.key}).flat(1/0),j=O.filter(X=>!X.hasChild),H=X=>{let at;const rt=O.findIndex(ft=>ft.key===D?(at=ft.parentKey,!0):!1);if(at===X)return"current";const tt=O.findIndex(ft=>ft.key===X);if(tt!==-1){if(tt===rt)return"current";if(tt<rt)return"before"}return"after"};function G(X){B(X)}function K(X){if(typeof X=="function"){const at=X(j.findIndex(rt=>rt.key===D));B(j[at].key)}else B(j[X].key)}const it=j.findIndex(X=>X.key===D);reactExports$1.useEffect(()=>{if(V==="history"){let X="";F.some(at=>at.children&&at.children.length?at.children.some(rt=>d$1(rt.path,rt.exact)?(X=rt.key,!0):!1):d$1(at.path,at.exact)?(X=at.key,!0):!1),X&&B(X)}return()=>{}},[F,V]);const ot={steps:F,totalStepsCount:j.length,getStepStatus:H,setActiveStepByKey:G,setActiveStepByIndex:K,activeStep:it,canBackToStep:X=>V==="memory"&&it!==0&&X<it};return jsxRuntimeExports.jsx(w$3,{value:ot,children:C})}function T$1(){return reactExports$1.use(k$2)}P.propTypes={children:o.any.isRequired,steps:o.array.isRequired,mode:o.string};var lib,hasRequiredLib;function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1;var C=Object.prototype.hasOwnProperty,F=Object.prototype.toString;function V(D){if(D==null)return!0;if(typeof D=="boolean")return!1;if(typeof D=="number")return D===0;if(typeof D=="string"||typeof D=="function"||Array.isArray(D))return D.length===0;if(D instanceof Error)return D.message==="";if(D.toString==F)switch(D.toString()){case"[object File]":case"[object Map]":case"[object Set]":return D.size===0;case"[object Object]":{for(var B in D)if(C.call(D,B))return!1;return!0}}return!1}return lib=V,lib}var libExports=requireLib();const k$1=getDefaultExportFromCjs(libExports),S=""+new URL("blocklet-default-logo-Bspnu_ws.png",import.meta.url).href,t$1={en:{optional:"Optional",defaultNavSubTitle:"Launching"},zh:{optional:"可选",defaultNavSubTitle:"启动"}},a$1=C=>t$1[C]?t$1[C]:t$1.en,i=C=>C==="zh"?"启动":"Launching",g$2=C=>C?.title||C?.name||"";function T({blockletMeta:C={},subTitle:F="",logoUrl:V="",locale:D="",navLogo:B="",loading:O=!1}){const j=useMediaQuery(ot=>ot.breakpoints.down("md")),H=j?18:48,G=reactExports$1.useRef(null),[K,it]=reactExports$1.useState("");return reactExports$1.useEffect(()=>{G.current&&G.current.offsetHeight>34&&(K===""?it("middle"):K==="middle"&&it("small"))},[K]),jsxRuntimeExports.jsxs(R,{className:K==="small"?"center-mode":"",children:[j?jsxRuntimeExports.jsx("div",{className:"app-icon",children:B}):jsxRuntimeExports.jsxs("div",{className:"app-icon",children:[O&&jsxRuntimeExports.jsx(I,{blockletSize:H,isMobile:j}),!O&&jsxRuntimeExports.jsx(u$1,{blockletSize:H,logoUrl:V})]}),jsxRuntimeExports.jsxs("div",{className:"header-title",children:[j&&F&&jsxRuntimeExports.jsx("div",{className:"header-title-sub",children:F}),jsxRuntimeExports.jsxs("div",{className:"app-name-content",children:[!j&&jsxRuntimeExports.jsx("div",{className:"launching-context",children:F||i(D)}),jsxRuntimeExports.jsx("div",{className:`header-title-name ${K==="middle"||K==="small"?"middle-size":""}`,ref:G,children:jsxRuntimeExports.jsx(w$2,{logoUrl:V,isMobile:j,blockletMeta:C,blockletSize:H,loading:O})})]})]})]})}T.propTypes={blockletMeta:o.object,subTitle:o.any,logoUrl:o.string,locale:o.string,navLogo:o.any,loading:o.bool};function I({blockletSize:C,isMobile:F}){return F?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:100,height:16,alt:"icon",style:{marginTop:4}}):jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:C,height:C})}function u$1({logoUrl:C,blockletSize:F}){return jsxRuntimeExports.jsx(M$1,{width:F,height:F,src:C,alt:"blocklet icon",fallback:S,style:{verticalAlign:"text-bottom"}},`layout-app-icon-${C}`)}function w$2({isMobile:C,logoUrl:F,blockletMeta:V={},blockletSize:D,loading:B}){const O=g$2(V);return B?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:100,height:16,alt:"icon",style:{marginTop:4}}):k$1(V)?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:!1,width:100,height:16,alt:"icon",style:{marginTop:4}}):C?jsxRuntimeExports.jsxs(L$1,{children:[jsxRuntimeExports.jsx(u$1,{blockletSize:D,logoUrl:F}),jsxRuntimeExports.jsx("span",{className:"ellipsis-title",children:g$2(V)})]}):jsxRuntimeExports.jsx(E,{className:"app-link",target:"_blank",href:joinUrl(V?.registryUrl||"",`/blocklets/${V?.did}`),title:O,children:O})}const L$1=styled.div`
1
+ import{aG as createSvgIcon,j as jsxRuntimeExports,r as reactExports$1,o,bd as getDefaultExportFromCjs,F as useMediaQuery,s as styled,dn as Skeleton,cP as M$1,_ as CheckIcon,az as Tooltip,dH as Button,T as Typography,N as Box,C as CircularProgress,f as useTheme,dB as isObject,e$ as mergeThemeOptions,f0 as StyledEngineProvider,f1 as ThemeProvider,f2 as ThemeProvider$1,f3 as s,Z as o$1,b8 as styled$1,f4 as CloseIcon,cE as Buffer,be as U,bE as __vitePreload,dG as noop,dd as l$2}from"./index-DveCyslI.js";import{j as joinUrl}from"./url-join-Dzq-hjGH.js";const l$1=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"})),d$2=createSvgIcon([jsxRuntimeExports.jsx("circle",{cx:"12",cy:"19",r:"2"},"0"),jsxRuntimeExports.jsx("path",{d:"M10 3h4v12h-4z"},"1")]),k$2=reactExports$1.createContext(),{Provider:w$3}=k$2,d$1=(C,F,V=window.location.pathname.replace(/\/$/,"/"))=>C?F?C===V:new RegExp(C).test(V):!1;function P({children:C,steps:F,mode:V="history"}){const[D,B]=reactExports$1.useState("");!D&&F.length&&B(F[0].key);const O=F.map(X=>X.children?[{key:X.key,hasChild:!0},X.children.map(at=>({parentKey:X.key,key:at.key}))]:{key:X.key}).flat(1/0),j=O.filter(X=>!X.hasChild),H=X=>{let at;const rt=O.findIndex(ft=>ft.key===D?(at=ft.parentKey,!0):!1);if(at===X)return"current";const tt=O.findIndex(ft=>ft.key===X);if(tt!==-1){if(tt===rt)return"current";if(tt<rt)return"before"}return"after"};function G(X){B(X)}function K(X){if(typeof X=="function"){const at=X(j.findIndex(rt=>rt.key===D));B(j[at].key)}else B(j[X].key)}const it=j.findIndex(X=>X.key===D);reactExports$1.useEffect(()=>{if(V==="history"){let X="";F.some(at=>at.children&&at.children.length?at.children.some(rt=>d$1(rt.path,rt.exact)?(X=rt.key,!0):!1):d$1(at.path,at.exact)?(X=at.key,!0):!1),X&&B(X)}return()=>{}},[F,V]);const ot={steps:F,totalStepsCount:j.length,getStepStatus:H,setActiveStepByKey:G,setActiveStepByIndex:K,activeStep:it,canBackToStep:X=>V==="memory"&&it!==0&&X<it};return jsxRuntimeExports.jsx(w$3,{value:ot,children:C})}function T$1(){return reactExports$1.use(k$2)}P.propTypes={children:o.any.isRequired,steps:o.array.isRequired,mode:o.string};var lib,hasRequiredLib;function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1;var C=Object.prototype.hasOwnProperty,F=Object.prototype.toString;function V(D){if(D==null)return!0;if(typeof D=="boolean")return!1;if(typeof D=="number")return D===0;if(typeof D=="string"||typeof D=="function"||Array.isArray(D))return D.length===0;if(D instanceof Error)return D.message==="";if(D.toString==F)switch(D.toString()){case"[object File]":case"[object Map]":case"[object Set]":return D.size===0;case"[object Object]":{for(var B in D)if(C.call(D,B))return!1;return!0}}return!1}return lib=V,lib}var libExports=requireLib();const k$1=getDefaultExportFromCjs(libExports),S=""+new URL("blocklet-default-logo-Bspnu_ws.png",import.meta.url).href,t$1={en:{optional:"Optional",defaultNavSubTitle:"Launching"},zh:{optional:"可选",defaultNavSubTitle:"启动"}},a$1=C=>t$1[C]?t$1[C]:t$1.en,i=C=>C==="zh"?"启动":"Launching",g$2=C=>C?.title||C?.name||"";function T({blockletMeta:C={},subTitle:F="",logoUrl:V="",locale:D="",navLogo:B="",loading:O=!1}){const j=useMediaQuery(ot=>ot.breakpoints.down("md")),H=j?18:48,G=reactExports$1.useRef(null),[K,it]=reactExports$1.useState("");return reactExports$1.useEffect(()=>{G.current&&G.current.offsetHeight>34&&(K===""?it("middle"):K==="middle"&&it("small"))},[K]),jsxRuntimeExports.jsxs(R,{className:K==="small"?"center-mode":"",children:[j?jsxRuntimeExports.jsx("div",{className:"app-icon",children:B}):jsxRuntimeExports.jsxs("div",{className:"app-icon",children:[O&&jsxRuntimeExports.jsx(I,{blockletSize:H,isMobile:j}),!O&&jsxRuntimeExports.jsx(u$1,{blockletSize:H,logoUrl:V})]}),jsxRuntimeExports.jsxs("div",{className:"header-title",children:[j&&F&&jsxRuntimeExports.jsx("div",{className:"header-title-sub",children:F}),jsxRuntimeExports.jsxs("div",{className:"app-name-content",children:[!j&&jsxRuntimeExports.jsx("div",{className:"launching-context",children:F||i(D)}),jsxRuntimeExports.jsx("div",{className:`header-title-name ${K==="middle"||K==="small"?"middle-size":""}`,ref:G,children:jsxRuntimeExports.jsx(w$2,{logoUrl:V,isMobile:j,blockletMeta:C,blockletSize:H,loading:O})})]})]})]})}T.propTypes={blockletMeta:o.object,subTitle:o.any,logoUrl:o.string,locale:o.string,navLogo:o.any,loading:o.bool};function I({blockletSize:C,isMobile:F}){return F?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:100,height:16,alt:"icon",style:{marginTop:4}}):jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:C,height:C})}function u$1({logoUrl:C,blockletSize:F}){return jsxRuntimeExports.jsx(M$1,{width:F,height:F,src:C,alt:"blocklet icon",fallback:S,style:{verticalAlign:"text-bottom"}},`layout-app-icon-${C}`)}function w$2({isMobile:C,logoUrl:F,blockletMeta:V={},blockletSize:D,loading:B}){const O=g$2(V);return B?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:100,height:16,alt:"icon",style:{marginTop:4}}):k$1(V)?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:!1,width:100,height:16,alt:"icon",style:{marginTop:4}}):C?jsxRuntimeExports.jsxs(L$1,{children:[jsxRuntimeExports.jsx(u$1,{blockletSize:D,logoUrl:F}),jsxRuntimeExports.jsx("span",{className:"ellipsis-title",children:g$2(V)})]}):jsxRuntimeExports.jsx(E,{className:"app-link",target:"_blank",href:joinUrl(V?.registryUrl||"",`/blocklets/${V?.did}`),title:O,children:O})}const L$1=styled.div`
2
2
  .ellipsis-title {
3
3
  flex: 1;
4
4
  position: absolute;