@abtnode/webapp 1.17.7-beta-20251229-223813-e1e6c5e3 → 1.17.7-beta-20251230-120126-2836fe04

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 (195) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-BBi3P2IC.js → AdapterDayjs-D4yhIBjp.js} +1 -1
  4. package/dist/assets/{Add-DBDPvM2L.js → Add-BqehlncY.js} +1 -1
  5. package/dist/assets/ArrowDropDown-Cc-RKnnq.js +1 -0
  6. package/dist/assets/{Autocomplete-6CVDh-bw.js → Autocomplete-DQwU_oez.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-CIhr-IBH.js → Breadcrumbs-DWjoGi7V.js} +1 -1
  8. package/dist/assets/{ButtonGroup-Um1mBtyg.js → ButtonGroup-CiscHb2s.js} +1 -1
  9. package/dist/assets/{CSSTransition-BcU1vShi.js → CSSTransition-R4tGAk7r.js} +1 -1
  10. package/dist/assets/{CallMerge-CqN4JiFM.js → CallMerge-BeazH3jg.js} +1 -1
  11. package/dist/assets/{CardContent-C16B5Bpa.js → CardContent-C5NwNVow.js} +1 -1
  12. package/dist/assets/{ChevronLeft-Ds4qWfjb.js → ChevronLeft-BaZj3l6K.js} +1 -1
  13. package/dist/assets/{ChevronRight-BFqUOmvp.js → ChevronRight-CpLm1bKY.js} +1 -1
  14. package/dist/assets/{Clear-L4-iFi83.js → Clear-siFOH-um.js} +1 -1
  15. package/dist/assets/{Delete-DVp4fJb1.js → Delete-8zGU1uok.js} +1 -1
  16. package/dist/assets/{DeleteOutline-CDxyWfLx.js → DeleteOutline-BiwjsR6p.js} +1 -1
  17. package/dist/assets/{Done-D7TYY_5X.js → Done-DzBppTPg.js} +1 -1
  18. package/dist/assets/{Edit-DYn1CF5Y.js → Edit-CKpLr219.js} +1 -1
  19. package/dist/assets/{ErrorOutline-By74cLGJ.js → ErrorOutline-B0v25XAB.js} +1 -1
  20. package/dist/assets/{FilterList-Czj4Os71.js → FilterList-Be5ZzrNM.js} +1 -1
  21. package/dist/assets/{Google-DZPfsfDE.js → Google-BB2TEIzp.js} +1 -1
  22. package/dist/assets/{HelpOutline-DS85eUTc.js → HelpOutline-D4ZrboH1.js} +1 -1
  23. package/dist/assets/{KeyboardArrowDown-C53dgTNk.js → KeyboardArrowDown-DdCuxSq1.js} +1 -1
  24. package/dist/assets/{Launch-l1uaKrAG.js → Launch-BiV6tbTp.js} +1 -1
  25. package/dist/assets/{Link-Bs8vi6ND.js → Link-Cogxu9aB.js} +1 -1
  26. package/dist/assets/{ListItemButton-KbcDtzXD.js → ListItemButton-C9pXyehQ.js} +1 -1
  27. package/dist/assets/{ListSubheader-C-Lxj5FB.js → ListSubheader-I1pRAfr2.js} +1 -1
  28. package/dist/assets/{LoadingButton-CZNIV9Ok.js → LoadingButton-BCz99YbN.js} +1 -1
  29. package/dist/assets/{MoreVert-DaM6pG5s.js → MoreVert-BOGr0n7e.js} +1 -1
  30. package/dist/assets/{OpenInNew-BQeSMHR-.js → OpenInNew-CCra_7I0.js} +1 -1
  31. package/dist/assets/{Refresh-BJnu5a0L.js → Refresh-EilcFp8b.js} +1 -1
  32. package/dist/assets/{Replay-BV6q004T.js → Replay-N-tBrT6I.js} +1 -1
  33. package/dist/assets/{Search-CApGhXwm.js → Search-BwAHZ5GK.js} +1 -1
  34. package/dist/assets/{Stepper-B2_oAcOZ.js → Stepper-Bn1MKAsJ.js} +1 -1
  35. package/dist/assets/TableSearch-BFj05c9C.js +51 -0
  36. package/dist/assets/{ToggleButtonGroup-t3tLzS74.js → ToggleButtonGroup-npFh1mr6.js} +1 -1
  37. package/dist/assets/{UnfoldMore-D2Y42T3n.js → UnfoldMore-DVoycFqc.js} +1 -1
  38. package/dist/assets/{Verified-QiB22jgm.js → Verified-CWEd1DVE.js} +1 -1
  39. package/dist/assets/{VerifiedUser-kPobsDlg.js → VerifiedUser-CigB8Fdv.js} +1 -1
  40. package/dist/assets/{ViewList-Ceb1JHIv.js → ViewList-D7TqVQ4P.js} +1 -1
  41. package/dist/assets/{_createAggregator-g-PBWDTI.js → _createAggregator-CQ-mLfMP.js} +1 -1
  42. package/dist/assets/{actions-BCMsejAj.js → actions-CDHomwcW.js} +2 -2
  43. package/dist/assets/{actions-Dp-VL6XB.js → actions-GoWYDb6F.js} +1 -1
  44. package/dist/assets/{agreement-Bun3wUY-.js → agreement-BhNIuQec.js} +3 -3
  45. package/dist/assets/api-CSBvUv9A.js +1 -0
  46. package/dist/assets/{appearance-yP6FtjZ0.js → appearance-Bux4sdxO.js} +1 -1
  47. package/dist/assets/{audit-logs-bPLYn_cc.js → audit-logs-CpckHt6s.js} +1 -1
  48. package/dist/assets/{base-chart-BZha7l7D.js → base-chart-CxDa_CaZ.js} +1 -1
  49. package/dist/assets/{blocklet-Nw4kpsVs.js → blocklet-D4otp8nH.js} +1 -1
  50. package/dist/assets/{chain-WdOor_5_.js → chain-CfwM2JWo.js} +1 -1
  51. package/dist/assets/{click-to-copy-DjkhfhsV.js → click-to-copy-CcQkmf0B.js} +1 -1
  52. package/dist/assets/cloneDeep-B3VWXnFc.js +1 -0
  53. package/dist/assets/{config-navigation-Pdv-g1jO.js → config-navigation-DVGyxdD_.js} +3 -3
  54. package/dist/assets/{connect-to-D2aJnmIt.js → connect-to-CbHwvZLx.js} +3 -3
  55. package/dist/assets/{cssMode-CbVfvomN.js → cssMode-CtObRSSW.js} +1 -1
  56. package/dist/assets/{delete-confirm-DCHvoTQs.js → delete-confirm-DfVCfmx_.js} +1 -1
  57. package/dist/assets/{depsEqual-LiU_ATMs.js → depsEqual-BF3eoqLy.js} +1 -1
  58. package/dist/assets/{detail-B-lIb4O1.js → detail-DYfAWDl1.js} +3 -3
  59. package/dist/assets/domains-CC4Opwi7.js +28 -0
  60. package/dist/assets/{download-DHuOHOVu.js → download-scJq5nd3.js} +1 -1
  61. package/dist/assets/{edit.svg-D0_FvYeH.js → edit.svg-BgAMrWjM.js} +1 -1
  62. package/dist/assets/emotion-cache.browser.esm-DyzCXqsA.js +1 -0
  63. package/dist/assets/engine-KybwGdMh.js +1 -0
  64. package/dist/assets/{freemarker2-Dbd2dz2J.js → freemarker2-D5TW5Eft.js} +1 -1
  65. package/dist/assets/{get-safe-url-DDm_hPj1.js → get-safe-url-HOLWsAs0.js} +1 -1
  66. package/dist/assets/getValidReactChildren-Ck9KmKnh.js +1 -0
  67. package/dist/assets/{graphqlMode-BNREvohj.js → graphqlMode-Bblq7qR7.js} +2 -2
  68. package/dist/assets/{handlebars-Ce_TkpEQ.js → handlebars-WxLGbhWH.js} +1 -1
  69. package/dist/assets/{html-CUmDiv7k.js → html-DuZCuVkX.js} +1 -1
  70. package/dist/assets/{html-title-D3mv3IQk.js → html-title-CifiMfjt.js} +1 -1
  71. package/dist/assets/{htmlMode-Ca_TsxJH.js → htmlMode-0w5arQMe.js} +1 -1
  72. package/dist/assets/{iframe-Dt-xbP5x.js → iframe-Dq0hkTrq.js} +1 -1
  73. package/dist/assets/{index-B2WmX6Fx.js → index-B24ZOg0s.js} +8 -8
  74. package/dist/assets/{index-C8CmKnU4.js → index-B3lwT4Ol.js} +2 -2
  75. package/dist/assets/{index-CTWQgRaZ.js → index-BD7A3_Da.js} +1 -1
  76. package/dist/assets/{index-BLI3C2o7.js → index-BGcMePQ8.js} +1 -1
  77. package/dist/assets/{index-CAA1AdyJ.js → index-BPA__Xw6.js} +2 -2
  78. package/dist/assets/index-BcmOVFqY.js +1 -0
  79. package/dist/assets/index-BnXKKyQZ.js +155 -0
  80. package/dist/assets/{index-CQogNORn.js → index-C8Yc1xhR.js} +13 -13
  81. package/dist/assets/{index-B11n09kE.js → index-C9Doh9s3.js} +1 -1
  82. package/dist/assets/{index-CODEE-RB.js → index-CFu4UTTj.js} +1 -1
  83. package/dist/assets/{index-D0-rZXcm.js → index-CGzi7zV_.js} +1 -1
  84. package/dist/assets/{index-Ci1hoD9j.js → index-CH_WzJ6f.js} +2 -2
  85. package/dist/assets/{index-WbuPRmjd.js → index-CIAqUMHH.js} +1 -1
  86. package/dist/assets/{index-IWOqJkOB.js → index-CNVrqxCI.js} +1 -1
  87. package/dist/assets/{index-BHAdZ1FZ.js → index-COhyQV8C.js} +2 -2
  88. package/dist/assets/{index-DT5BIL2_.js → index-CXTibO7-.js} +1 -1
  89. package/dist/assets/{index-umVLVZjs.js → index-CbKLDJsb.js} +1 -1
  90. package/dist/assets/{index-Dtkcfmzb.js → index-Ci0V4E2u.js} +11 -11
  91. package/dist/assets/{index-DtJVzdtH.js → index-CrQaw0BF.js} +2 -2
  92. package/dist/assets/{index-2VA5XrmO.js → index-Cs8W6nmK.js} +11 -11
  93. package/dist/assets/index-CzQzijaC.js +1 -0
  94. package/dist/assets/index-D2gNdot7.js +79 -0
  95. package/dist/assets/{index-CQYzPG_n.js → index-D57ncOaj.js} +1 -1
  96. package/dist/assets/{index-CypG4Dbq.js → index-D93jIJAg.js} +1 -1
  97. package/dist/assets/{index-jT3H-jhB.js → index-DAMZQWKn.js} +1 -1
  98. package/dist/assets/index-DBJqSNjU.js +1 -0
  99. package/dist/assets/{index-CvZItgju.js → index-DDG-ZEI-.js} +1 -1
  100. package/dist/assets/{index-BQNKAwfZ.js → index-DN9WepcN.js} +1 -1
  101. package/dist/assets/{index-B0O0JwRT.js → index-DPs8sVol.js} +1 -1
  102. package/dist/assets/index-DVOJBn33.js +20 -0
  103. package/dist/assets/{index-CR1U7OM5.js → index-DWm5KlVP.js} +1 -1
  104. package/dist/assets/{index-CdxsHt3r.js → index-DYW_sHYx.js} +3 -3
  105. package/dist/assets/index-DhXU_Vz9.js +1 -0
  106. package/dist/assets/{index-KI2LGzUW.js → index-DidKpbc0.js} +1 -1
  107. package/dist/assets/{index-z-tbDeE3.js → index-DyIPXbau.js} +1 -1
  108. package/dist/assets/{index-Dt9htCod.js → index-DzQWOvtr.js} +3 -3
  109. package/dist/assets/{index-CADLzzXJ.js → index-OtVuze_0.js} +3 -3
  110. package/dist/assets/{index-DJ9zSKl1.js → index-ZCO60mrW.js} +1 -1
  111. package/dist/assets/{index-CL2N86sI.js → index-_-mWQ6ov.js} +12 -12
  112. package/dist/assets/{index-DQItZ4UM.js → index-b78VjA-Y.js} +1 -1
  113. package/dist/assets/{index-BxX_nqnW.js → index-nvPO7sCa.js} +2 -2
  114. package/dist/assets/{index-kRFEBldM.js → index-rsjiYKAZ.js} +2 -2
  115. package/dist/assets/{index-D319vBae.js → index-wIt3UxPD.js} +9 -9
  116. package/dist/assets/{index-BsjY45Cd.js → index-yQeeHJJ2.js} +1 -1
  117. package/dist/assets/{index.esm-Zck39Kvz.js → index.esm-B06DCVM7.js} +1 -1
  118. package/dist/assets/install-from-url-B0gehZWB.js +1 -0
  119. package/dist/assets/{invitation-4F28SRYz.js → invitation-DjNwS-Ha.js} +3 -3
  120. package/dist/assets/{is-path-prefix-equal-BJMXSv43.js → is-path-prefix-equal-Dr7EUhi7.js} +1 -1
  121. package/dist/assets/{item-C1JxTPT2.js → item-Bojg28Ma.js} +6 -6
  122. package/dist/assets/{javascript-B0m7UVIe.js → javascript-xUySVVaa.js} +1 -1
  123. package/dist/assets/{jsonMode-CgwGbFre.js → jsonMode-aXjE405B.js} +1 -1
  124. package/dist/assets/{liquid-BZyWy1Tr.js → liquid-CqO0loMD.js} +1 -1
  125. package/dist/assets/{list-header-BZRIF_iO.js → list-header-D5a_5edu.js} +1 -1
  126. package/dist/assets/{lock.svg-Ba4McgFD.js → lock.svg-Bnm1mppT.js} +1 -1
  127. package/dist/assets/{log-BFB-zvPt.js → log-Dh6sGyEk.js} +1 -1
  128. package/dist/assets/{lottie-react.esm-CGSms1Pf.js → lottie-react.esm-uLWIPZ8N.js} +1 -1
  129. package/dist/assets/{mdx-BRVCuIrx.js → mdx-gAWRd386.js} +1 -1
  130. package/dist/assets/{memory-B2j_d87p.js → memory-BwHtkqHB.js} +1 -1
  131. package/dist/assets/{metric-DpvjSsZq.js → metric-Q_9BNbHj.js} +1 -1
  132. package/dist/assets/omit-DeumLxdH.js +1 -0
  133. package/dist/assets/overview-DZjSoaFM.js +13 -0
  134. package/dist/assets/{permission-DTFazP7s.js → permission-B8q324ya.js} +1 -1
  135. package/dist/assets/{preference-DYVCo0KF.js → preference-DjOBLR-v.js} +6 -6
  136. package/dist/assets/{python-B-wSNZ_T.js → python-DnlpLwjq.js} +1 -1
  137. package/dist/assets/{raf-schd.esm-B7_MlDzu.js → raf-schd.esm-B2LNukSh.js} +1 -1
  138. package/dist/assets/{razor-BR_HjGgi.js → razor-JAsAlMne.js} +1 -1
  139. package/dist/assets/{rotate-session-key-Bz5QE7gB.js → rotate-session-key-BFiVoa6I.js} +1 -1
  140. package/dist/assets/{runtime-DM0B8rA4.js → runtime-BB_E-r_A.js} +1 -1
  141. package/dist/assets/schema-DC2ou5i0.js +1 -0
  142. package/dist/assets/sdk-DZJdUnPV.js +1 -0
  143. package/dist/assets/{service-DkoTQaTk.js → service-DLwgL4rt.js} +1 -1
  144. package/dist/assets/{shorten-label-BR48Ofqe.js → shorten-label-CybgQDYs.js} +1 -1
  145. package/dist/assets/{simple-select-D38wTw_o.js → simple-select-DJn1UT5H.js} +1 -1
  146. package/dist/assets/{spaces-YFYDpL5l.js → spaces-DBXblECR.js} +1 -1
  147. package/dist/assets/{status-B_ZSV6JY.js → status-CW0QYGeF.js} +1 -1
  148. package/dist/assets/{status-BTCwUhiG.js → status-DG36cpK9.js} +1 -1
  149. package/dist/assets/{switch-control-Fq47wOrt.js → switch-control-Bzy_oqas.js} +1 -1
  150. package/dist/assets/{table-icons-DYQRHdVu.js → table-icons-DKoPQwjv.js} +1 -1
  151. package/dist/assets/{team-DKJfzzKD.js → team-DLwXXgYX.js} +1 -1
  152. package/dist/assets/{toLower-62VYhzjn.js → toLower-CXuGXHcC.js} +1 -1
  153. package/dist/assets/toUpper-DN59t43l.js +1 -0
  154. package/dist/assets/traffic-DSdpsMku.js +1 -0
  155. package/dist/assets/{tsMode-CxSxmJBQ.js → tsMode-Dh0Ri32L.js} +1 -1
  156. package/dist/assets/{typescript-Dnu6Xv3U.js → typescript-D316NgIh.js} +1 -1
  157. package/dist/assets/{url-evaluation-Cf4MPEtF.js → url-evaluation-DMCBEvQj.js} +1 -1
  158. package/dist/assets/{url-join-P8kMCiOB.js → url-join-DoFkjCNr.js} +1 -1
  159. package/dist/assets/{use-mobile-BnTDQjTV.js → use-mobile-BGG1Yti5.js} +1 -1
  160. package/dist/assets/{use-mobile-D1KGwOlr.js → use-mobile-DqSNKVo1.js} +1 -1
  161. package/dist/assets/{useAsync-SwSlukzF.js → useAsync-ByRujkOO.js} +1 -1
  162. package/dist/assets/{useAsyncRetry-BQEwzyM4.js → useAsyncRetry-CLcTront.js} +1 -1
  163. package/dist/assets/{useLocalStorage-41az-hAK.js → useLocalStorage-DjnxkTrj.js} +1 -1
  164. package/dist/assets/{useThemeProps-Cw6i_sME.js → useThemeProps-CFIloaX5.js} +1 -1
  165. package/dist/assets/{util-C9NPDRP-.js → util-DvscRj0S.js} +1 -1
  166. package/dist/assets/{wait-container-GLOlfScg.js → wait-container-BPFMrDUL.js} +3 -3
  167. package/dist/assets/{without-wallet-rfYvx_29.js → without-wallet-D2bQnWJt.js} +1 -1
  168. package/dist/assets/wrap-locale-BbIFvnmJ.js +1 -0
  169. package/dist/assets/{xml-D06mM15g.js → xml-BGgxhX96.js} +1 -1
  170. package/dist/assets/{yaml-DrMeEOdm.js → yaml-9hmveKGV.js} +1 -1
  171. package/dist/index.html +1 -1
  172. package/package.json +1 -1
  173. package/dist/assets/ArrowDropDown-CqYw-eY9.js +0 -1
  174. package/dist/assets/TableSearch-CKjIHAce.js +0 -51
  175. package/dist/assets/api-DDSUcMPT.js +0 -1
  176. package/dist/assets/cloneDeep-Bl8wZyrm.js +0 -1
  177. package/dist/assets/domains-CeCMQUBm.js +0 -28
  178. package/dist/assets/emotion-cache.browser.esm-D1-P5QGD.js +0 -1
  179. package/dist/assets/engine-D8Acg7DY.js +0 -1
  180. package/dist/assets/getValidReactChildren-DpcxJbs9.js +0 -1
  181. package/dist/assets/index-2lzs7bat.js +0 -1
  182. package/dist/assets/index-BPuMob2k.js +0 -1
  183. package/dist/assets/index-Be8ehpQE.js +0 -1
  184. package/dist/assets/index-CKHOafPq.js +0 -79
  185. package/dist/assets/index-CaDcvTD7.js +0 -155
  186. package/dist/assets/index-DdYx-VNK.js +0 -1
  187. package/dist/assets/index-DjQqmpzQ.js +0 -20
  188. package/dist/assets/install-from-url-BXftFn4t.js +0 -1
  189. package/dist/assets/omit-CyTnrDNo.js +0 -1
  190. package/dist/assets/overview-DkMLRtwO.js +0 -13
  191. package/dist/assets/schema-BKPaewSy.js +0 -1
  192. package/dist/assets/sdk-CXClyXm7.js +0 -1
  193. package/dist/assets/toUpper-CBmQ5f7q.js +0 -1
  194. package/dist/assets/traffic-Dh_MwZxy.js +0 -1
  195. package/dist/assets/wrap-locale-C-Q-ES8F.js +0 -1
@@ -1,4 +1,4 @@
1
- import{aF as G,j as e,r as b,aW as V,cB as Le,T as F,N as K,o as y,V as N,bf as ie,b9 as je,J as g,M as oe,W as J,eP as ve,fK as be,bE as Ft,bv as Lt,bw as Bt,bx as Mt,aO as Be,aP as $t,$ as H,s as W,bo as A,cw as le,C as O,U as Ke,au as Ot,dn as Et,bg as Ze,bh as _t,aH as U,H as z,bF as X,gq as qt,gr as Ht,i as Wt,v as B,b as Ut,a3 as Q,t as E,Q as ce,a4 as q,Z as Ce,aS as ae,X as ne,gs as Je,ad as Se,be as Qe,gt as Vt,q as Gt,fo as Yt,P as Xe,fg as et,bj as tt,g as Kt,D as Zt,ca as st,aV as Jt,R as Qt,bB as Xt,E as es,gu as Me,fI as ts,gv as ss,S as rs}from"./index-DtJVzdtH.js";import{H as we,g as ns}from"./index-IWOqJkOB.js";import{T as as}from"./html-title-D3mv3IQk.js";import{u as M}from"./team-DKJfzzKD.js";import{U as os}from"./ua-parser-DP5omx3I.js";import{u as is}from"./use-mobile-BnTDQjTV.js";import{v as se}from"./index-CypG4Dbq.js";import{w as Y,P as rt}from"./permission-DTFazP7s.js";import{C as ls}from"./Google-DZPfsfDE.js";import{u as cs}from"./blocklet-Nw4kpsVs.js";import{A as Te}from"./Add-DBDPvM2L.js";import{e as pe}from"./edit.svg-D0_FvYeH.js";import{M as nt}from"./TableSearch-CKjIHAce.js";import{L as at}from"./list-header-BZRIF_iO.js";import{g as ds}from"./chain-WdOor_5_.js";import{T as ot,a as re}from"./ToggleButtonGroup-t3tLzS74.js";import{C as ps}from"./lock.svg-Ba4McgFD.js";const us=G(e.jsx("path",{d:"m17.6 9.48 1.84-3.18c.16-.31.04-.69-.26-.85-.29-.15-.65-.06-.83.22l-1.88 3.24c-2.86-1.21-6.08-1.21-8.94 0L5.65 5.67c-.19-.29-.58-.38-.87-.2-.28.18-.37.54-.22.83L6.4 9.48C3.3 11.25 1.28 14.44 1 18h22c-.28-3.56-2.3-6.75-5.4-8.52M7 15.25c-.69 0-1.25-.56-1.25-1.25s.56-1.25 1.25-1.25 1.25.56 1.25 1.25-.56 1.25-1.25 1.25m10 0c-.69 0-1.25-.56-1.25-1.25s.56-1.25 1.25-1.25 1.25.56 1.25 1.25-.56 1.25-1.25 1.25"})),$e=G(e.jsx("path",{d:"M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z"})),it=G(e.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"})),me=G(e.jsx("path",{d:"M20 3H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6v2H8v2h8v-2h-2v-2h6c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"})),ms=G(e.jsx("path",{d:"M20 18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2zM4 6h16v10H4z"})),fs=G(e.jsx("path",{d:"M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1m-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m4.5-4H7V4h9z"})),xs=G(e.jsx("path",{d:"M21 4H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 1.99-.9 1.99-2L23 6c0-1.1-.9-2-2-2m-2 14H5V6h14z"})),fe=G(e.jsx("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m-5 14H4v-4h11zm0-5H4V9h11zm5 5h-4V9h4z"})),ue=s=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...s},b.createElement("path",{d:"M8.4375 4.3125H8.25C8.35313 4.3125 8.4375 4.22812 8.4375 4.125V4.3125H15.5625V4.125C15.5625 4.22812 15.6469 4.3125 15.75 4.3125H15.5625V6H17.25V4.125C17.25 3.29766 16.5773 2.625 15.75 2.625H8.25C7.42266 2.625 6.75 3.29766 6.75 4.125V6H8.4375V4.3125ZM20.25 6H3.75C3.33516 6 3 6.33516 3 6.75V7.5C3 7.60313 3.08437 7.6875 3.1875 7.6875H4.60312L5.18203 19.9453C5.21953 20.7445 5.88047 21.375 6.67969 21.375H17.3203C18.1219 21.375 18.7805 20.7469 18.818 19.9453L19.3969 7.6875H20.8125C20.9156 7.6875 21 7.60313 21 7.5V6.75C21 6.33516 20.6648 6 20.25 6ZM17.1398 19.6875H6.86016L6.29297 7.6875H17.707L17.1398 19.6875Z"}));function hs(s){return!s||typeof s!="string"?"break-all":s.includes(" ")?"break-word":"break-all"}function lt({logo:s="",name:n="",description:l="",size:p=40,variant:c="rounded",sx:u={},className:f="",logoName:a="",tooltip:d=null}){const r={width:p,height:p,...u},o=typeof n=="string"?n:s,i=e.jsxs(V,{direction:"row",spacing:1,className:`info-card-wrapper ${f}`,sx:{alignItems:"center",cursor:d?"pointer":"default"},children:[s?e.jsx(Le,{src:s,alt:a??o,variant:c,sx:r}):e.jsx(Le,{variant:c,sx:r,children:o?.slice(0,1)}),e.jsxs(V,{direction:"column",sx:{alignItems:"flex-start",justifyContent:"space-around",wordBreak:hs(n),minWidth:{xs:100,sm:140}},children:[e.jsx(F,{variant:"body1",component:"div",sx:{color:"text.primary"},children:n}),l&&e.jsx(F,{variant:"subtitle1",sx:{color:"text.secondary"},children:l})]})]});return d?e.jsx(K,{title:d,placement:"top-start",slotProps:{tooltip:{sx:{bgcolor:t=>t.palette.mode==="dark"?"#2a2e37":"#ffffff",color:t=>t.palette.mode==="dark"?"#ffffff":t.palette.text.primary,boxShadow:"0 2px 10px rgba(0, 0, 0, 0.15)",borderRadius:2,padding:"10px 16px",fontSize:14,maxWidth:400,minWidth:240,wordBreak:"break-word",border:t=>t.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0","& .MuiTooltip-arrow":{color:t=>t.palette.mode==="dark"?"#2a2e37":"#ffffff","&::before":{border:t=>t.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0",backgroundColor:t=>t.palette.mode==="dark"?"#2a2e37":"#ffffff"}}}}},children:i}):i}lt.propTypes={logo:y.string,name:y.oneOfType([y.string,y.node]).isRequired,description:y.oneOfType([y.string,y.node]),size:y.oneOfType([y.number,y.string]),variant:y.oneOf(["square","rounded","circular"]),sx:y.object,className:y.string,logoName:y.string,tooltip:y.oneOfType([y.string,y.node])};function gs(s){try{if(!s.trim())return{device:{icon:e.jsx(me,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:e.jsx(fe,{fontSize:"small"}),text:"Unknown Browser"}};const l=new os(s).getResult();let p="";const c=s.split(/\s+/).find(d=>d.startsWith("arcwallet"));if(c){const d=c.split("/");d.length>1&&Be.coerce(d[1])&&(p=Be.coerce(d[1]).version)}const u=(()=>{const{type:d="",model:r=""}=l.device;return d==="mobile"?{icon:e.jsx(fs,{fontSize:"small"}),text:r||"Mobile Device"}:d==="tablet"?{icon:e.jsx(xs,{fontSize:"small"}),text:r||"Tablet"}:{icon:e.jsx(ms,{fontSize:"small"}),text:r||"Desktop"}})(),f=(()=>{const{name:d="",version:r=""}=l.os;return d.toLowerCase().includes("mac")?{icon:e.jsx($e,{fontSize:"small"}),text:`${d} ${r}`}:d.toLowerCase().includes("ios")?{icon:e.jsx($e,{fontSize:"small"}),text:`${d} ${r}`}:d.toLowerCase().includes("android")?{icon:e.jsx(us,{fontSize:"small"}),text:`${d} ${r}`}:d.toLowerCase().includes("windows")?{icon:e.jsx(me,{fontSize:"small"}),text:`${d} ${r}`}:{icon:null,text:d?`${d} ${r}`:"Unknown OS"}})(),a=(()=>{const{name:d="",version:r=""}=l.browser;return{icon:e.jsx(fe,{fontSize:"small"}),text:d?`${d} ${r}`:"Unknown Browser"}})();return{device:u,os:f,browser:a,...p?{walletVersion:{icon:null,text:p}}:{}}}catch(n){return console.error("Error parsing user agent:",n),{device:{icon:e.jsx(me,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:e.jsx(fe,{fontSize:"small"}),text:"Unknown Browser"}}}}function ct({ua:s}){const n=gs(s);return e.jsx(V,{spacing:1,children:Object.entries(n).map(([l,{icon:p,text:c}])=>e.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(g,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:p}),e.jsx(F,{variant:"body2",sx:{display:"flex"},children:c})]},l))})}ct.propTypes={ua:y.string.isRequired};const dt=()=>{const{t:s}=N(),n={$all:s("common.all"),owner:"Owner",admin:"Admin",member:"Member",guest:"Guest"};return{SYSTEM_ROLES:n,formatRoleName:p=>{const c=(p||"").toLowerCase();return c.startsWith("$")?n[c]||c.slice(1):n[c]||c}}},ys=(s,n=!1)=>{const l=n?1:.6;switch(s){case"owner":return`rgba(232, 222, 255, ${l})`;case"admin":return`rgba(227, 242, 253, ${l})`;case"member":return`rgba(232, 245, 233, ${l})`;case"guest":return`rgba(245, 245, 245, ${l})`;default:return`rgba(245, 245, 245, ${l})`}},js=je(ve)(({role:s})=>({backgroundColor:ys(s.toLowerCase()),color:"#000000"})),vs=s=>{switch(s){case"valid":return n=>n.palette.success.light;case"expired":return n=>n.palette.text.disabled;case"revoked":return n=>n.palette.error.light;default:return n=>n.palette.warning.light}},bs=je(ve)(({theme:s,status:n})=>({backgroundColor:vs(n)(s),color:"#FFFFFF"}));function pt({did:s}){return e.jsx(J,{size:14,responsive:!1,compact:!0,copyable:!1,did:s})}pt.propTypes={did:y.string.isRequired};function ut({timestamp:s,locale:n}){return e.jsx(g,{sx:{minWidth:"100px"},children:e.jsx(oe,{value:s,locale:n})})}ut.propTypes={timestamp:y.number.isRequired,locale:y.string.isRequired};function mt({name:s="",role:n}){const{formatRoleName:l}=dt();return e.jsx(js,{label:l(s||n),size:"small",role:s||n,sx:{borderRadius:1}})}mt.propTypes={role:y.string.isRequired,name:y.string};function ft({status:s}){const{t:n}=N();return e.jsx(bs,{label:n(`team.passport.statusMap.${s}`),size:"small",status:s,sx:{borderRadius:1}})}ft.propTypes={status:y.string.isRequired};function xt({source:s}){const{t:n}=N();return s?n(`team.passport.sourceMaps.${s}`):"-"}xt.propTypes={source:y.string.isRequired};function ht({user:s,size:n="default",tooltip:l=!1,inService:p=!1}){const{teamDid:c}=M(),u=ie.useMemo(()=>be(s.avatar,c,p),[s.avatar,c,p]),f=ie.useMemo(()=>e.jsx(J,{did:s?.did,compact:!0,responsive:!1,sx:{whiteSpace:"nowrap"},size:12}),[s?.did]),a=Ft(()=>({...s,avatar:u}),[s,u]);return n==="small"?e.jsx(lt,{variant:"circular",logo:u,name:e.jsx(F,{sx:{maxWidth:320,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},className:"customer-link-name",children:s.fullName||s.email}),...n==="small"?{tooltip:l?e.jsx(J,{did:s?.did}):!1,size:24}:{description:f,size:36}}):e.jsx(Lt,{user:a,avatarSize:n==="small"?24:36,cardType:Mt.Detailed,infoType:Bt.Minimal,sx:{padding:0,border:"none"},showDid:!0,didProps:{compact:!0,responsive:!1},showHoverCard:!1})}ht.propTypes={user:y.object.isRequired,size:y.string,tooltip:y.bool,inService:y.bool};const Cs=ie.memo(ht),Ss=s=>e.jsx(pt,{did:s}),Ie=(s,n)=>e.jsx(mt,{name:s,role:n}),Re=s=>e.jsx(ft,{status:s}),gt=(s,n)=>e.jsx(ut,{timestamp:s,locale:n}),de=s=>e.jsx(xt,{source:s}),De=(s,n=!1)=>e.jsx(Cs,{user:s,inService:n}),ws=s=>e.jsx(ct,{ua:s}),Oe="info";function yt({createPassportSvg:s,passport:n,onCancel:l,onSwitchPassport:p=()=>{}}){const{t:c}=N(),u=$t({tab:Oe}),f={info:{label:c("common.basicInfo"),value:Oe,component:()=>e.jsx(jt,{passport:n,createPassportSvg:s})},logs:{label:c("common.logs"),value:"logs",component:()=>e.jsx(Ct,{passport:n})},related:{label:c("team.passport.related"),value:"related",component:()=>e.jsx(St,{passport:n,onSwitchPassport:p})}},a=Object.values(f).map(({label:o,value:i})=>({label:o,value:i})).filter(o=>o.value==="related"?n.parentDid:!0),d=f[u.tab]||f.info,r=o=>{u.tab=o};return e.jsx(H,{title:c("common.passport"),onClose:l,open:!0,PaperProps:{style:{maxWidth:800,minHeight:"80vh"}},fullWidth:!0,children:e.jsxs(Ts,{children:[e.jsx(g,{className:"tabs",children:e.jsx(as,{tabs:a,current:u.tab,onChange:r,scrollButtons:"auto"})}),e.jsx(g,{className:"body",children:e.jsx(d.component,{})})]})})}yt.propTypes={createPassportSvg:y.func.isRequired,passport:y.object.isRequired,onCancel:y.func.isRequired,onSwitchPassport:y.func};const Ts=W(g)`
1
+ import{aG as G,j as e,r as b,aW as V,cB as Le,T as F,Q as K,o as y,V as N,bf as ie,b9 as je,K as g,P as oe,W as Q,eP as ve,fK as be,bE as Ft,bv as Lt,bw as Bt,bx as Mt,aP as Be,aQ as $t,$ as W,s as H,bo as A,cw as le,C as O,Z as Ke,av as Ot,dn as Et,bg as Ze,bh as _t,aI as U,H as z,bF as X,gq as qt,gr as Wt,i as Ht,v as B,b as Ut,a4 as J,t as E,X as ce,a5 as q,J as Ce,aT as ae,_ as ne,gs as Qe,ae as Se,be as Je,gt as Vt,q as Gt,fo as Yt,S as Xe,fg as et,bj as tt,g as Kt,D as Zt,ca as st,aV as Qt,Y as Jt,bB as Xt,E as es,gu as Me,fI as ts,gv as ss,U as rs}from"./index-CrQaw0BF.js";import{H as we,g as ns}from"./index-CNVrqxCI.js";import{T as as}from"./html-title-CifiMfjt.js";import{u as M}from"./team-DLwXXgYX.js";import{U as os}from"./ua-parser-DP5omx3I.js";import{u as is}from"./use-mobile-BGG1Yti5.js";import{v as se}from"./index-D93jIJAg.js";import{w as Y,P as rt}from"./permission-B8q324ya.js";import{C as ls}from"./Google-BB2TEIzp.js";import{u as cs}from"./blocklet-D4otp8nH.js";import{A as Te}from"./Add-BqehlncY.js";import{e as pe}from"./edit.svg-BgAMrWjM.js";import{M as nt}from"./TableSearch-BFj05c9C.js";import{L as at}from"./list-header-D5a_5edu.js";import{g as ds}from"./chain-CfwM2JWo.js";import{T as ot,a as re}from"./ToggleButtonGroup-npFh1mr6.js";import{C as ps}from"./lock.svg-Bnm1mppT.js";const us=G(e.jsx("path",{d:"m17.6 9.48 1.84-3.18c.16-.31.04-.69-.26-.85-.29-.15-.65-.06-.83.22l-1.88 3.24c-2.86-1.21-6.08-1.21-8.94 0L5.65 5.67c-.19-.29-.58-.38-.87-.2-.28.18-.37.54-.22.83L6.4 9.48C3.3 11.25 1.28 14.44 1 18h22c-.28-3.56-2.3-6.75-5.4-8.52M7 15.25c-.69 0-1.25-.56-1.25-1.25s.56-1.25 1.25-1.25 1.25.56 1.25 1.25-.56 1.25-1.25 1.25m10 0c-.69 0-1.25-.56-1.25-1.25s.56-1.25 1.25-1.25 1.25.56 1.25 1.25-.56 1.25-1.25 1.25"})),$e=G(e.jsx("path",{d:"M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z"})),it=G(e.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"})),me=G(e.jsx("path",{d:"M20 3H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6v2H8v2h8v-2h-2v-2h6c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"})),ms=G(e.jsx("path",{d:"M20 18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2zM4 6h16v10H4z"})),fs=G(e.jsx("path",{d:"M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1m-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m4.5-4H7V4h9z"})),xs=G(e.jsx("path",{d:"M21 4H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 1.99-.9 1.99-2L23 6c0-1.1-.9-2-2-2m-2 14H5V6h14z"})),fe=G(e.jsx("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m-5 14H4v-4h11zm0-5H4V9h11zm5 5h-4V9h4z"})),ue=s=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...s},b.createElement("path",{d:"M8.4375 4.3125H8.25C8.35313 4.3125 8.4375 4.22812 8.4375 4.125V4.3125H15.5625V4.125C15.5625 4.22812 15.6469 4.3125 15.75 4.3125H15.5625V6H17.25V4.125C17.25 3.29766 16.5773 2.625 15.75 2.625H8.25C7.42266 2.625 6.75 3.29766 6.75 4.125V6H8.4375V4.3125ZM20.25 6H3.75C3.33516 6 3 6.33516 3 6.75V7.5C3 7.60313 3.08437 7.6875 3.1875 7.6875H4.60312L5.18203 19.9453C5.21953 20.7445 5.88047 21.375 6.67969 21.375H17.3203C18.1219 21.375 18.7805 20.7469 18.818 19.9453L19.3969 7.6875H20.8125C20.9156 7.6875 21 7.60313 21 7.5V6.75C21 6.33516 20.6648 6 20.25 6ZM17.1398 19.6875H6.86016L6.29297 7.6875H17.707L17.1398 19.6875Z"}));function hs(s){return!s||typeof s!="string"?"break-all":s.includes(" ")?"break-word":"break-all"}function lt({logo:s="",name:n="",description:l="",size:p=40,variant:c="rounded",sx:u={},className:f="",logoName:a="",tooltip:d=null}){const r={width:p,height:p,...u},o=typeof n=="string"?n:s,i=e.jsxs(V,{direction:"row",spacing:1,className:`info-card-wrapper ${f}`,sx:{alignItems:"center",cursor:d?"pointer":"default"},children:[s?e.jsx(Le,{src:s,alt:a??o,variant:c,sx:r}):e.jsx(Le,{variant:c,sx:r,children:o?.slice(0,1)}),e.jsxs(V,{direction:"column",sx:{alignItems:"flex-start",justifyContent:"space-around",wordBreak:hs(n),minWidth:{xs:100,sm:140}},children:[e.jsx(F,{variant:"body1",component:"div",sx:{color:"text.primary"},children:n}),l&&e.jsx(F,{variant:"subtitle1",sx:{color:"text.secondary"},children:l})]})]});return d?e.jsx(K,{title:d,placement:"top-start",slotProps:{tooltip:{sx:{bgcolor:t=>t.palette.mode==="dark"?"#2a2e37":"#ffffff",color:t=>t.palette.mode==="dark"?"#ffffff":t.palette.text.primary,boxShadow:"0 2px 10px rgba(0, 0, 0, 0.15)",borderRadius:2,padding:"10px 16px",fontSize:14,maxWidth:400,minWidth:240,wordBreak:"break-word",border:t=>t.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0","& .MuiTooltip-arrow":{color:t=>t.palette.mode==="dark"?"#2a2e37":"#ffffff","&::before":{border:t=>t.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0",backgroundColor:t=>t.palette.mode==="dark"?"#2a2e37":"#ffffff"}}}}},children:i}):i}lt.propTypes={logo:y.string,name:y.oneOfType([y.string,y.node]).isRequired,description:y.oneOfType([y.string,y.node]),size:y.oneOfType([y.number,y.string]),variant:y.oneOf(["square","rounded","circular"]),sx:y.object,className:y.string,logoName:y.string,tooltip:y.oneOfType([y.string,y.node])};function gs(s){try{if(!s.trim())return{device:{icon:e.jsx(me,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:e.jsx(fe,{fontSize:"small"}),text:"Unknown Browser"}};const l=new os(s).getResult();let p="";const c=s.split(/\s+/).find(d=>d.startsWith("arcwallet"));if(c){const d=c.split("/");d.length>1&&Be.coerce(d[1])&&(p=Be.coerce(d[1]).version)}const u=(()=>{const{type:d="",model:r=""}=l.device;return d==="mobile"?{icon:e.jsx(fs,{fontSize:"small"}),text:r||"Mobile Device"}:d==="tablet"?{icon:e.jsx(xs,{fontSize:"small"}),text:r||"Tablet"}:{icon:e.jsx(ms,{fontSize:"small"}),text:r||"Desktop"}})(),f=(()=>{const{name:d="",version:r=""}=l.os;return d.toLowerCase().includes("mac")?{icon:e.jsx($e,{fontSize:"small"}),text:`${d} ${r}`}:d.toLowerCase().includes("ios")?{icon:e.jsx($e,{fontSize:"small"}),text:`${d} ${r}`}:d.toLowerCase().includes("android")?{icon:e.jsx(us,{fontSize:"small"}),text:`${d} ${r}`}:d.toLowerCase().includes("windows")?{icon:e.jsx(me,{fontSize:"small"}),text:`${d} ${r}`}:{icon:null,text:d?`${d} ${r}`:"Unknown OS"}})(),a=(()=>{const{name:d="",version:r=""}=l.browser;return{icon:e.jsx(fe,{fontSize:"small"}),text:d?`${d} ${r}`:"Unknown Browser"}})();return{device:u,os:f,browser:a,...p?{walletVersion:{icon:null,text:p}}:{}}}catch(n){return console.error("Error parsing user agent:",n),{device:{icon:e.jsx(me,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:e.jsx(fe,{fontSize:"small"}),text:"Unknown Browser"}}}}function ct({ua:s}){const n=gs(s);return e.jsx(V,{spacing:1,children:Object.entries(n).map(([l,{icon:p,text:c}])=>e.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(g,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:p}),e.jsx(F,{variant:"body2",sx:{display:"flex"},children:c})]},l))})}ct.propTypes={ua:y.string.isRequired};const dt=()=>{const{t:s}=N(),n={$all:s("common.all"),owner:"Owner",admin:"Admin",member:"Member",guest:"Guest"};return{SYSTEM_ROLES:n,formatRoleName:p=>{const c=(p||"").toLowerCase();return c.startsWith("$")?n[c]||c.slice(1):n[c]||c}}},ys=(s,n=!1)=>{const l=n?1:.6;switch(s){case"owner":return`rgba(232, 222, 255, ${l})`;case"admin":return`rgba(227, 242, 253, ${l})`;case"member":return`rgba(232, 245, 233, ${l})`;case"guest":return`rgba(245, 245, 245, ${l})`;default:return`rgba(245, 245, 245, ${l})`}},js=je(ve)(({role:s})=>({backgroundColor:ys(s.toLowerCase()),color:"#000000"})),vs=s=>{switch(s){case"valid":return n=>n.palette.success.light;case"expired":return n=>n.palette.text.disabled;case"revoked":return n=>n.palette.error.light;default:return n=>n.palette.warning.light}},bs=je(ve)(({theme:s,status:n})=>({backgroundColor:vs(n)(s),color:"#FFFFFF"}));function pt({did:s}){return e.jsx(Q,{size:14,responsive:!1,compact:!0,copyable:!1,did:s})}pt.propTypes={did:y.string.isRequired};function ut({timestamp:s,locale:n}){return e.jsx(g,{sx:{minWidth:"100px"},children:e.jsx(oe,{value:s,locale:n})})}ut.propTypes={timestamp:y.number.isRequired,locale:y.string.isRequired};function mt({name:s="",role:n}){const{formatRoleName:l}=dt();return e.jsx(js,{label:l(s||n),size:"small",role:s||n,sx:{borderRadius:1}})}mt.propTypes={role:y.string.isRequired,name:y.string};function ft({status:s}){const{t:n}=N();return e.jsx(bs,{label:n(`team.passport.statusMap.${s}`),size:"small",status:s,sx:{borderRadius:1}})}ft.propTypes={status:y.string.isRequired};function xt({source:s}){const{t:n}=N();return s?n(`team.passport.sourceMaps.${s}`):"-"}xt.propTypes={source:y.string.isRequired};function ht({user:s,size:n="default",tooltip:l=!1,inService:p=!1}){const{teamDid:c}=M(),u=ie.useMemo(()=>be(s.avatar,c,p),[s.avatar,c,p]),f=ie.useMemo(()=>e.jsx(Q,{did:s?.did,compact:!0,responsive:!1,sx:{whiteSpace:"nowrap"},size:12}),[s?.did]),a=Ft(()=>({...s,avatar:u}),[s,u]);return n==="small"?e.jsx(lt,{variant:"circular",logo:u,name:e.jsx(F,{sx:{maxWidth:320,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},className:"customer-link-name",children:s.fullName||s.email}),...n==="small"?{tooltip:l?e.jsx(Q,{did:s?.did}):!1,size:24}:{description:f,size:36}}):e.jsx(Lt,{user:a,avatarSize:n==="small"?24:36,cardType:Mt.Detailed,infoType:Bt.Minimal,sx:{padding:0,border:"none"},showDid:!0,didProps:{compact:!0,responsive:!1},showHoverCard:!1})}ht.propTypes={user:y.object.isRequired,size:y.string,tooltip:y.bool,inService:y.bool};const Cs=ie.memo(ht),Ss=s=>e.jsx(pt,{did:s}),Ie=(s,n)=>e.jsx(mt,{name:s,role:n}),Re=s=>e.jsx(ft,{status:s}),gt=(s,n)=>e.jsx(ut,{timestamp:s,locale:n}),de=s=>e.jsx(xt,{source:s}),De=(s,n=!1)=>e.jsx(Cs,{user:s,inService:n}),ws=s=>e.jsx(ct,{ua:s}),Oe="info";function yt({createPassportSvg:s,passport:n,onCancel:l,onSwitchPassport:p=()=>{}}){const{t:c}=N(),u=$t({tab:Oe}),f={info:{label:c("common.basicInfo"),value:Oe,component:()=>e.jsx(jt,{passport:n,createPassportSvg:s})},logs:{label:c("common.logs"),value:"logs",component:()=>e.jsx(Ct,{passport:n})},related:{label:c("team.passport.related"),value:"related",component:()=>e.jsx(St,{passport:n,onSwitchPassport:p})}},a=Object.values(f).map(({label:o,value:i})=>({label:o,value:i})).filter(o=>o.value==="related"?n.parentDid:!0),d=f[u.tab]||f.info,r=o=>{u.tab=o};return e.jsx(W,{title:c("common.passport"),onClose:l,open:!0,PaperProps:{style:{maxWidth:800,minHeight:"80vh"}},fullWidth:!0,children:e.jsxs(Ts,{children:[e.jsx(g,{className:"tabs",children:e.jsx(as,{tabs:a,current:u.tab,onChange:r,scrollButtons:"auto"})}),e.jsx(g,{className:"body",children:e.jsx(d.component,{})})]})})}yt.propTypes={createPassportSvg:y.func.isRequired,passport:y.object.isRequired,onCancel:y.func.isRequired,onSwitchPassport:y.func};const Ts=H(g)`
2
2
  margin-top: -16px;
3
3
 
4
4
  .tabs {
@@ -9,7 +9,7 @@ import{aF as G,j as e,r as b,aW as V,cB as Le,T as F,N as K,o as y,V as N,bf as
9
9
  .body {
10
10
  margin-top: 24px;
11
11
  }
12
- `;function jt({createPassportSvg:s,passport:n}){const{t:l,locale:p}=N(),{teamDid:c}=M(),{inService:u}=A(),f=is(),a=[{items:[{label:l("common.role"),content:Ie(n.title)},{label:l("common.did"),content:e.jsx(J,{did:n.id})},{label:l("team.passport.status"),content:Re(n.status)},{label:l("common.type"),content:e.jsx(g,{sx:{display:"flex",gap:1,flexWrap:"wrap"},children:(n.type||[]).map(r=>e.jsx(ve,{label:r,variant:"outlined",size:"small",sx:{borderRadius:1}},r))})}]}],d=[{title:l("team.passport.owner"),items:[{label:l("team.passport.owner"),content:e.jsx(g,{children:De(n.user,u)})}]},{title:l("common.timeInfo"),items:[{label:l("team.passport.issuanceTime"),content:n.issuanceDate?e.jsx(oe,{value:n.issuanceDate,type:"all",locale:p}):"-"},{label:l("team.member.lastLogin"),content:n.lastLoginAt?e.jsx(oe,{value:n.lastLoginAt,type:"all",locale:p}):"-"},{label:l("common.expires"),content:n.expirationDate?e.jsx(oe,{value:n.expirationDate,type:"all",locale:p}):"-"}]},{title:l("blocklet.overview.source"),items:[{label:l("blocklet.overview.source"),content:de(n.source)}]}];return e.jsxs(Is,{gap:3,children:[e.jsxs(g,{sx:{display:"flex",flexDirection:f?"column":"row",alignItems:f?"flex-start":"center",justifyContent:f?"center":"flex-start",width:"100%",overflow:"hidden",gap:f?2:4},children:[e.jsx(g,{sx:{display:"flex",width:"180px"},className:"passport-image",dangerouslySetInnerHTML:{__html:s({scope:n.scope,role:n.role,title:n.scope==="kyc"?n.name:n.title,issuer:n.issuer&&n.issuer.name,issuerDid:n.issuer&&n.issuer.id,ownerName:n.user?.fullName,ownerDid:n.user?.did,ownerAvatarUrl:n.user?.avatar?be(n.user?.avatar,c,u):"",revoked:n.revoked,extra:n?.expirationDate?{key:"Exp",value:Ze(n.expirationDate).format("YYYY-MM-DD HH:mm:ss")}:null})}}),e.jsx(g,{className:"info-area",children:a.map(r=>e.jsxs(g,{children:[r.title&&e.jsx(F,{variant:"h6",sx:{mb:2},children:r.title}),e.jsx(g,{className:"info-grid",sx:{gap:"12px !important"},children:r.items.map(o=>e.jsxs(g,{className:"info-item",children:[e.jsx(g,{className:"info-label",sx:{maxWidth:40},children:e.jsx(F,{variant:"subtitle2",color:"textSecondary",children:o.label})}),e.jsx(g,{sx:{display:"flex",flexWrap:"wrap",gap:.5,minWidth:0},children:o.content})]},o.label))})]},r.title))})]}),e.jsx(_t,{}),e.jsx(g,{className:"info-area",children:d.map(r=>e.jsxs(g,{children:[e.jsx(F,{variant:"h5",sx:{mb:1.5},children:r.title}),e.jsx(g,{className:"info-grid",children:r.items.map(o=>e.jsxs(g,{className:"info-item",children:[e.jsx(g,{className:"info-label",children:e.jsx(F,{variant:"subtitle2",color:"textSecondary",children:o.label})}),e.jsx(g,{sx:{minWidth:500},children:o.content})]},o.label))})]},r.title))})]})}jt.propTypes={passport:y.object.isRequired,createPassportSvg:y.func.isRequired};const Is=W(V)`
12
+ `;function jt({createPassportSvg:s,passport:n}){const{t:l,locale:p}=N(),{teamDid:c}=M(),{inService:u}=A(),f=is(),a=[{items:[{label:l("common.role"),content:Ie(n.title)},{label:l("common.did"),content:e.jsx(Q,{did:n.id})},{label:l("team.passport.status"),content:Re(n.status)},{label:l("common.type"),content:e.jsx(g,{sx:{display:"flex",gap:1,flexWrap:"wrap"},children:(n.type||[]).map(r=>e.jsx(ve,{label:r,variant:"outlined",size:"small",sx:{borderRadius:1}},r))})}]}],d=[{title:l("team.passport.owner"),items:[{label:l("team.passport.owner"),content:e.jsx(g,{children:De(n.user,u)})}]},{title:l("common.timeInfo"),items:[{label:l("team.passport.issuanceTime"),content:n.issuanceDate?e.jsx(oe,{value:n.issuanceDate,type:"all",locale:p}):"-"},{label:l("team.member.lastLogin"),content:n.lastLoginAt?e.jsx(oe,{value:n.lastLoginAt,type:"all",locale:p}):"-"},{label:l("common.expires"),content:n.expirationDate?e.jsx(oe,{value:n.expirationDate,type:"all",locale:p}):"-"}]},{title:l("blocklet.overview.source"),items:[{label:l("blocklet.overview.source"),content:de(n.source)}]}];return e.jsxs(Is,{gap:3,children:[e.jsxs(g,{sx:{display:"flex",flexDirection:f?"column":"row",alignItems:f?"flex-start":"center",justifyContent:f?"center":"flex-start",width:"100%",overflow:"hidden",gap:f?2:4},children:[e.jsx(g,{sx:{display:"flex",width:"180px"},className:"passport-image",dangerouslySetInnerHTML:{__html:s({scope:n.scope,role:n.role,title:n.scope==="kyc"?n.name:n.title,issuer:n.issuer&&n.issuer.name,issuerDid:n.issuer&&n.issuer.id,ownerName:n.user?.fullName,ownerDid:n.user?.did,ownerAvatarUrl:n.user?.avatar?be(n.user?.avatar,c,u):"",revoked:n.revoked,extra:n?.expirationDate?{key:"Exp",value:Ze(n.expirationDate).format("YYYY-MM-DD HH:mm:ss")}:null})}}),e.jsx(g,{className:"info-area",children:a.map(r=>e.jsxs(g,{children:[r.title&&e.jsx(F,{variant:"h6",sx:{mb:2},children:r.title}),e.jsx(g,{className:"info-grid",sx:{gap:"12px !important"},children:r.items.map(o=>e.jsxs(g,{className:"info-item",children:[e.jsx(g,{className:"info-label",sx:{maxWidth:40},children:e.jsx(F,{variant:"subtitle2",color:"textSecondary",children:o.label})}),e.jsx(g,{sx:{display:"flex",flexWrap:"wrap",gap:.5,minWidth:0},children:o.content})]},o.label))})]},r.title))})]}),e.jsx(_t,{}),e.jsx(g,{className:"info-area",children:d.map(r=>e.jsxs(g,{children:[e.jsx(F,{variant:"h5",sx:{mb:1.5},children:r.title}),e.jsx(g,{className:"info-grid",children:r.items.map(o=>e.jsxs(g,{className:"info-item",children:[e.jsx(g,{className:"info-label",children:e.jsx(F,{variant:"subtitle2",color:"textSecondary",children:o.label})}),e.jsx(g,{sx:{minWidth:500},children:o.content})]},o.label))})]},r.title))})]})}jt.propTypes={passport:y.object.isRequired,createPassportSvg:y.func.isRequired};const Is=H(V)`
13
13
  .info-card {
14
14
  margin-bottom: 24px;
15
15
  overflow: hidden;
@@ -87,7 +87,7 @@ import{aF as G,j as e,r as b,aW as V,cB as Le,T as F,N as K,o as y,V as N,bf as
87
87
  margin: 0;
88
88
  }
89
89
  }
90
- `,vt=10,bt=1;function Ct({passport:s}){const{api:n}=A(),{teamDid:l}=M(),{t:p,locale:c}=N(),[u,f]=b.useState({pageSize:vt,page:bt}),{data:a,loading:d}=le(async()=>{const j={teamDid:l,query:{passportId:s.id},paging:{page:u.page,pageSize:u.pageSize}},x=await n.getPassportLogs({input:j});return{logs:x.passportLogs||[],total:x.paging.total}},{refreshDeps:[u.page,u.pageSize],onError:j=>z.error(j.message)}),r=b.useMemo(()=>a?.logs||[],[a?.logs]),o=j=>j.action===U.PASSPORT_LOG_ACTION.APPROVE||j.action===U.PASSPORT_LOG_ACTION.REVOKE?j?.metadata?.operator?.fullName?`${p("common.operator")}: ${j?.metadata?.operator?.fullName}`:null:j.action===U.PASSPORT_LOG_ACTION.ISSUE&&j.metadata?.action===U.PASSPORT_ISSUE_ACTION.ISSUE_ON_INVITE?j?.metadata?.inviter?.fullName?`${p("common.inviter")}: ${j?.metadata?.inviter?.fullName}`:null:`passportId: ${j.passportId}`,i=b.useMemo(()=>[{label:p("common.action"),name:"action",options:{customBodyRender:(j,{rowIndex:x})=>{const h=r[x];return e.jsx(K,{title:o(h),children:`${j} ${h.metadata?.action?`(${h.metadata.action})`:""}`})}}},{label:"IP",name:"operatorIp",options:{customBodyRender:j=>e.jsx(g,{sx:{display:"flex",alignItems:"center",gap:1},children:e.jsx("span",{children:j||"-"})})}},{label:"UA",width:250,name:"operatorUa",options:{customBodyRender:(j,{rowIndex:x})=>{const h=r[x];return e.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:1},children:[h.operatorUa&&e.jsx(g,{children:ws(h.operatorUa)}),h.operatorUa&&e.jsx(K,{title:h.operatorUa,children:e.jsx(Et,{fontSize:"small",color:"action",sx:{fontSize:16,cursor:"pointer"}})})]})}}},{label:p("common.createdAt"),name:"createdAt",options:{customBodyRender:j=>Ot(j,c)}}],[p,c,r]),t=({page:j,rowsPerPage:x})=>{u.pageSize!==x?f(h=>({...h,pageSize:x,page:1})):u.page!==j+1&&f(h=>({...h,page:j+1}))},m={sort:!1,download:!1,filter:!1,print:!1,viewColumns:!1,search:!1,page:u.page-1,rowsPerPage:u.pageSize,count:a?.total||0};return d?e.jsx(g,{sx:{py:2},children:e.jsx(V,{direction:"row",spacing:1,sx:{position:"relative",pb:2},children:e.jsx(O,{})})}):e.jsx(g,{children:e.jsx(we,{className:"logs-table",verticalKeyWidth:100,locale:c,data:r,columns:i,options:m,loading:d,onChange:t})})}Ct.propTypes={passport:y.object.isRequired};function St({passport:s,onSwitchPassport:n}){const{api:l}=A(),{teamDid:p}=M(),{t:c,locale:u}=N(),[f,a]=b.useState({pageSize:vt,page:bt}),{data:d,loading:r}=le(async()=>{const x={teamDid:p,passportId:s.parentDid,paging:{page:f.page,pageSize:f.pageSize}},h=await l.getRelatedPassports({input:x});return{passports:h.passports||[],total:h.paging.total}},{refreshDeps:[f.page,f.pageSize],onError:x=>z.error(x.message)}),o=b.useMemo(()=>d?.passports||[],[d?.passports]),i=b.useMemo(()=>[{label:c("team.passport.role"),name:"role",options:{customBodyRender:Ie}},{label:c("team.passport.owner"),name:"user",options:{customBodyRender:De}},{label:c("team.passport.status"),name:"status",options:{customBodyRender:Re}},{label:c("team.member.lastLogin"),name:"lastLoginAt",options:{customBodyRender:x=>gt(x,u)}},{label:c("blocklet.overview.source"),name:"source",options:{customBodyRender:de}}],[c,u]),t=({page:x,rowsPerPage:h})=>{f.pageSize!==h?a(v=>({...v,pageSize:h,page:1})):f.page!==x+1&&a(v=>({...v,page:x+1}))},m=b.useRef(null),j={sort:!1,download:!1,filter:!1,print:!1,viewColumns:!1,search:!1,page:f.page-1,rowsPerPage:f.pageSize,count:d?.total||0,onRowClick(x,{dataIndex:h},v){if(m.current?.contains(v.target)){const C=o[h];n(C)}}};return r?e.jsx(g,{sx:{py:2},children:e.jsx(V,{direction:"row",spacing:1,sx:{position:"relative",pb:2},children:e.jsx(O,{})})}):e.jsxs(V,{spacing:1,children:[e.jsx(Ke,{severity:"warning",children:c("team.passport.relatedDescription")}),e.jsx(g,{ref:m,sx:{".MuiTableRow-root":{cursor:"pointer"}},children:e.jsx(we,{className:"related-table",verticalKeyWidth:100,locale:u,data:o.filter(x=>x.id!==s.id),columns:i,options:j,loading:r,onChange:t})})]})}St.propTypes={passport:y.object.isRequired,onSwitchPassport:y.func.isRequired};function ke({onCancel:s,onSuccess:n}){const{api:l}=A(),{blocklet:p}=cs(),{t:c}=N(),[u,f]=b.useState(!1),a=(p.environments.find(t=>t.key==="BLOCKLET_PASSPORT_COLOR")||{}).value||"auto",d=a==="auto"?qt(p.appDid):a,[r,o]=b.useState(d),i=async()=>{const t=[{key:Ut.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR,value:r}];try{f(!0),await l.configBlocklet({input:{did:p.meta.did,configs:t}}),n()}catch(m){z.error(m.message)}finally{f(!1)}};return e.jsx(H,{title:c("team.passport.color"),onClose:s,open:!0,fullWidth:!0,actions:e.jsxs(e.Fragment,{children:[e.jsx(B,{onClick:s,color:"inherit",children:c("common.cancel")}),e.jsxs(B,{onClick:i,color:"primary",disabled:u,variant:"contained",autoFocus:!0,"data-cy":"color-btn-confirm",children:[u&&e.jsx(O,{size:16}),c("common.save")]})]}),children:e.jsxs(g,{className:"dialog-content",sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:[e.jsx(ls,{disableAlpha:!0,color:r,onChange:t=>o(t.hex)}),e.jsx("div",{style:{width:220,marginLeft:24},dangerouslySetInnerHTML:{__html:Ht({scope:"passport",role:"owner",title:"Owner",issuer:Wt.getDisplayName(p),issuerDid:p.appDid,ownerName:"Your Name",ownerDid:p.appDid,preferredColor:r})}})]})})}const Rs=Y(ke,"mutate_team"),Ds=Y(ke,"",X);function ks(s){const{inService:n}=A();return n?e.jsx(Ds,{...s}):e.jsx(Rs,{...s})}ke.propTypes={onCancel:y.func.isRequired,onSuccess:y.func.isRequired};var wt=function(n){return e.jsx("svg",{...n,children:e.jsx("path",{d:"M64.707 8.707a1 1 0 0 0 0-1.414L58.343.929a1 1 0 1 0-1.414 1.414L62.586 8l-5.657 5.657a1 1 0 0 0 1.414 1.414l6.364-6.364ZM0 9h64V7H0v2Z",fill:"#666"})})};wt.defaultProps={width:"65",height:"16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const Ps=(s,n)=>s?!n.some(l=>!l.from.passport||!l.to.role):!1;function Tt({onCancel:s,onSuccess:n,data:l={},trustedPassports:p=[]}){const{api:c}=A(),{roles:u,teamDid:f}=M(),{t:a}=N(),[d,r]=b.useState(!1),[o,i]=b.useState(l.issuerDid||""),[t,m]=b.useState(l.remark||""),[j,x]=b.useState(Q(l.mappings)||[]),h=p.findIndex(C=>C.issuerDid===l.issuerDid),v=async()=>{if(d)return;const C={issuerDid:o,remark:t,mappings:j.map(T=>({...T,to:{...T.to,ttl:T.to.ttl||0}}))},w=[...p];h===-1?w.unshift(C):w[h]=C;try{r(!0),await c.configTrustedPassports({input:{teamDid:f,trustedPassports:w}}),await ae(800),r(!1),z.success(a("common.saveSuccess")),n()}catch(T){r(!1),z.error(ne(T))}};return e.jsx(H,{title:a("team.passport.trustedIssuers"),open:!0,showCloseButton:!1,PaperProps:{style:{minHeight:"80vh"}},fullWidth:!0,prepend:e.jsx(q,{onClick:s,"data-cy":"trusted-issuer-close",size:"large",children:e.jsx(it,{})}),actions:e.jsxs(e.Fragment,{children:[e.jsx(B,{onClick:s,color:"inherit",children:a("common.cancel")}),e.jsxs(B,{onClick:()=>v(),color:"primary",disabled:!Ps(o,j)||!t||d,variant:"contained",autoFocus:!0,"data-cy":"save-mapping",children:[d&&e.jsx(O,{size:16}),a("common.save")]})]}),children:e.jsx(zs,{children:e.jsxs("div",{className:"dialog-content",children:[e.jsx(E,{fullWidth:!0,"data-cy":"input-issuer-did",placeholder:a("team.passport.issuerDid"),value:o,onChange:C=>{i(C.target.value)}}),e.jsx(E,{style:{marginTop:16},fullWidth:!0,"data-cy":"input-issuer-remark",placeholder:a("common.remark"),value:t,onChange:C=>{m(C.target.value)}}),e.jsxs(g,{sx:{mt:"30px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(g,{className:"dialog-h1",children:a("team.passport.mappingRule")}),e.jsx(g,{children:e.jsx(B,{variant:"outlined",color:"primary","data-cy":"add-mapping",onClick:()=>{x(C=>{const w=[...C];return w.unshift({from:{passport:""},to:{role:U.ROLES.GUEST}}),w})},children:a("team.add")})})]}),e.jsxs(g,{className:"list",sx:{mt:-.5},children:[j.map((C,w)=>e.jsxs(g,{className:"mapping-item",sx:{display:"flex",alignItems:"center",justifyContent:"space-between",my:1},children:[e.jsxs(g,{sx:{display:"flex",alignItems:"center",flexGrow:1},children:[e.jsx(g,{sx:{flexGrow:1,flexBasis:1},children:e.jsx(E,{fullWidth:!0,size:"small","data-cy":`input-${w}-from`,placeholder:"Issuer’s Passport Name/ID *",value:C.from.passport,onChange:T=>{const{value:D}=T.target;x(L=>{const I=[...L];return I[w].from.passport=D,I})},sx:{"& .MuiInputBase-input::placeholder":{fontSize:14},"& .Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"primary.main"}}})}),e.jsx(g,{sx:{flexShrink:0,mx:1,width:65,height:16},children:e.jsx(wt,{})}),e.jsx(g,{sx:{flexGrow:1,flexBasis:1},children:e.jsx(E,{fullWidth:!0,size:"small",select:!0,value:C.to.role,onChange:T=>{x(D=>{const L=[...D];return L[w].to.role=T.target.value,L})},variant:"outlined",children:u.filter(T=>T.name!=="owner").map(T=>e.jsx(ce,{value:T.name,"data-cy":`passport-mapping-select-option-${T.name}`,children:e.jsx("span",{children:T.title||T.name})},T.name))})})]}),e.jsx(g,{sx:{flexShrink:0},children:e.jsx(q,{onClick:()=>{x(T=>{const D=[...T];return D.splice(w,1),D})},size:"large",children:e.jsx(ue,{})})})]},`mapping-${w}`)),!j.length&&e.jsx(g,{sx:{my:2,color:"text.secondary",fontSize:"16px"},children:e.jsx(Ce,{children:a("common.empty")})})]})]})})})}Tt.propTypes={onCancel:y.func.isRequired,onSuccess:y.func.isRequired,trustedPassports:y.array,data:y.object};const zs=W.div`
90
+ `,vt=10,bt=1;function Ct({passport:s}){const{api:n}=A(),{teamDid:l}=M(),{t:p,locale:c}=N(),[u,f]=b.useState({pageSize:vt,page:bt}),{data:a,loading:d}=le(async()=>{const j={teamDid:l,query:{passportId:s.id},paging:{page:u.page,pageSize:u.pageSize}},x=await n.getPassportLogs({input:j});return{logs:x.passportLogs||[],total:x.paging.total}},{refreshDeps:[u.page,u.pageSize],onError:j=>z.error(j.message)}),r=b.useMemo(()=>a?.logs||[],[a?.logs]),o=j=>j.action===U.PASSPORT_LOG_ACTION.APPROVE||j.action===U.PASSPORT_LOG_ACTION.REVOKE?j?.metadata?.operator?.fullName?`${p("common.operator")}: ${j?.metadata?.operator?.fullName}`:null:j.action===U.PASSPORT_LOG_ACTION.ISSUE&&j.metadata?.action===U.PASSPORT_ISSUE_ACTION.ISSUE_ON_INVITE?j?.metadata?.inviter?.fullName?`${p("common.inviter")}: ${j?.metadata?.inviter?.fullName}`:null:`passportId: ${j.passportId}`,i=b.useMemo(()=>[{label:p("common.action"),name:"action",options:{customBodyRender:(j,{rowIndex:x})=>{const h=r[x];return e.jsx(K,{title:o(h),children:`${j} ${h.metadata?.action?`(${h.metadata.action})`:""}`})}}},{label:"IP",name:"operatorIp",options:{customBodyRender:j=>e.jsx(g,{sx:{display:"flex",alignItems:"center",gap:1},children:e.jsx("span",{children:j||"-"})})}},{label:"UA",width:250,name:"operatorUa",options:{customBodyRender:(j,{rowIndex:x})=>{const h=r[x];return e.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:1},children:[h.operatorUa&&e.jsx(g,{children:ws(h.operatorUa)}),h.operatorUa&&e.jsx(K,{title:h.operatorUa,children:e.jsx(Et,{fontSize:"small",color:"action",sx:{fontSize:16,cursor:"pointer"}})})]})}}},{label:p("common.createdAt"),name:"createdAt",options:{customBodyRender:j=>Ot(j,c)}}],[p,c,r]),t=({page:j,rowsPerPage:x})=>{u.pageSize!==x?f(h=>({...h,pageSize:x,page:1})):u.page!==j+1&&f(h=>({...h,page:j+1}))},m={sort:!1,download:!1,filter:!1,print:!1,viewColumns:!1,search:!1,page:u.page-1,rowsPerPage:u.pageSize,count:a?.total||0};return d?e.jsx(g,{sx:{py:2},children:e.jsx(V,{direction:"row",spacing:1,sx:{position:"relative",pb:2},children:e.jsx(O,{})})}):e.jsx(g,{children:e.jsx(we,{className:"logs-table",verticalKeyWidth:100,locale:c,data:r,columns:i,options:m,loading:d,onChange:t})})}Ct.propTypes={passport:y.object.isRequired};function St({passport:s,onSwitchPassport:n}){const{api:l}=A(),{teamDid:p}=M(),{t:c,locale:u}=N(),[f,a]=b.useState({pageSize:vt,page:bt}),{data:d,loading:r}=le(async()=>{const x={teamDid:p,passportId:s.parentDid,paging:{page:f.page,pageSize:f.pageSize}},h=await l.getRelatedPassports({input:x});return{passports:h.passports||[],total:h.paging.total}},{refreshDeps:[f.page,f.pageSize],onError:x=>z.error(x.message)}),o=b.useMemo(()=>d?.passports||[],[d?.passports]),i=b.useMemo(()=>[{label:c("team.passport.role"),name:"role",options:{customBodyRender:Ie}},{label:c("team.passport.owner"),name:"user",options:{customBodyRender:De}},{label:c("team.passport.status"),name:"status",options:{customBodyRender:Re}},{label:c("team.member.lastLogin"),name:"lastLoginAt",options:{customBodyRender:x=>gt(x,u)}},{label:c("blocklet.overview.source"),name:"source",options:{customBodyRender:de}}],[c,u]),t=({page:x,rowsPerPage:h})=>{f.pageSize!==h?a(v=>({...v,pageSize:h,page:1})):f.page!==x+1&&a(v=>({...v,page:x+1}))},m=b.useRef(null),j={sort:!1,download:!1,filter:!1,print:!1,viewColumns:!1,search:!1,page:f.page-1,rowsPerPage:f.pageSize,count:d?.total||0,onRowClick(x,{dataIndex:h},v){if(m.current?.contains(v.target)){const C=o[h];n(C)}}};return r?e.jsx(g,{sx:{py:2},children:e.jsx(V,{direction:"row",spacing:1,sx:{position:"relative",pb:2},children:e.jsx(O,{})})}):e.jsxs(V,{spacing:1,children:[e.jsx(Ke,{severity:"warning",children:c("team.passport.relatedDescription")}),e.jsx(g,{ref:m,sx:{".MuiTableRow-root":{cursor:"pointer"}},children:e.jsx(we,{className:"related-table",verticalKeyWidth:100,locale:u,data:o.filter(x=>x.id!==s.id),columns:i,options:j,loading:r,onChange:t})})]})}St.propTypes={passport:y.object.isRequired,onSwitchPassport:y.func.isRequired};function ke({onCancel:s,onSuccess:n}){const{api:l}=A(),{blocklet:p}=cs(),{t:c}=N(),[u,f]=b.useState(!1),a=(p.environments.find(t=>t.key==="BLOCKLET_PASSPORT_COLOR")||{}).value||"auto",d=a==="auto"?qt(p.appDid):a,[r,o]=b.useState(d),i=async()=>{const t=[{key:Ut.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR,value:r}];try{f(!0),await l.configBlocklet({input:{did:p.meta.did,configs:t}}),n()}catch(m){z.error(m.message)}finally{f(!1)}};return e.jsx(W,{title:c("team.passport.color"),onClose:s,open:!0,fullWidth:!0,actions:e.jsxs(e.Fragment,{children:[e.jsx(B,{onClick:s,color:"inherit",children:c("common.cancel")}),e.jsxs(B,{onClick:i,color:"primary",disabled:u,variant:"contained",autoFocus:!0,"data-cy":"color-btn-confirm",children:[u&&e.jsx(O,{size:16}),c("common.save")]})]}),children:e.jsxs(g,{className:"dialog-content",sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:[e.jsx(ls,{disableAlpha:!0,color:r,onChange:t=>o(t.hex)}),e.jsx("div",{style:{width:220,marginLeft:24},dangerouslySetInnerHTML:{__html:Wt({scope:"passport",role:"owner",title:"Owner",issuer:Ht.getDisplayName(p),issuerDid:p.appDid,ownerName:"Your Name",ownerDid:p.appDid,preferredColor:r})}})]})})}const Rs=Y(ke,"mutate_team"),Ds=Y(ke,"",X);function ks(s){const{inService:n}=A();return n?e.jsx(Ds,{...s}):e.jsx(Rs,{...s})}ke.propTypes={onCancel:y.func.isRequired,onSuccess:y.func.isRequired};var wt=function(n){return e.jsx("svg",{...n,children:e.jsx("path",{d:"M64.707 8.707a1 1 0 0 0 0-1.414L58.343.929a1 1 0 1 0-1.414 1.414L62.586 8l-5.657 5.657a1 1 0 0 0 1.414 1.414l6.364-6.364ZM0 9h64V7H0v2Z",fill:"#666"})})};wt.defaultProps={width:"65",height:"16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const Ps=(s,n)=>s?!n.some(l=>!l.from.passport||!l.to.role):!1;function Tt({onCancel:s,onSuccess:n,data:l={},trustedPassports:p=[]}){const{api:c}=A(),{roles:u,teamDid:f}=M(),{t:a}=N(),[d,r]=b.useState(!1),[o,i]=b.useState(l.issuerDid||""),[t,m]=b.useState(l.remark||""),[j,x]=b.useState(J(l.mappings)||[]),h=p.findIndex(C=>C.issuerDid===l.issuerDid),v=async()=>{if(d)return;const C={issuerDid:o,remark:t,mappings:j.map(T=>({...T,to:{...T.to,ttl:T.to.ttl||0}}))},w=[...p];h===-1?w.unshift(C):w[h]=C;try{r(!0),await c.configTrustedPassports({input:{teamDid:f,trustedPassports:w}}),await ae(800),r(!1),z.success(a("common.saveSuccess")),n()}catch(T){r(!1),z.error(ne(T))}};return e.jsx(W,{title:a("team.passport.trustedIssuers"),open:!0,showCloseButton:!1,PaperProps:{style:{minHeight:"80vh"}},fullWidth:!0,prepend:e.jsx(q,{onClick:s,"data-cy":"trusted-issuer-close",size:"large",children:e.jsx(it,{})}),actions:e.jsxs(e.Fragment,{children:[e.jsx(B,{onClick:s,color:"inherit",children:a("common.cancel")}),e.jsxs(B,{onClick:()=>v(),color:"primary",disabled:!Ps(o,j)||!t||d,variant:"contained",autoFocus:!0,"data-cy":"save-mapping",children:[d&&e.jsx(O,{size:16}),a("common.save")]})]}),children:e.jsx(zs,{children:e.jsxs("div",{className:"dialog-content",children:[e.jsx(E,{fullWidth:!0,"data-cy":"input-issuer-did",placeholder:a("team.passport.issuerDid"),value:o,onChange:C=>{i(C.target.value)}}),e.jsx(E,{style:{marginTop:16},fullWidth:!0,"data-cy":"input-issuer-remark",placeholder:a("common.remark"),value:t,onChange:C=>{m(C.target.value)}}),e.jsxs(g,{sx:{mt:"30px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(g,{className:"dialog-h1",children:a("team.passport.mappingRule")}),e.jsx(g,{children:e.jsx(B,{variant:"outlined",color:"primary","data-cy":"add-mapping",onClick:()=>{x(C=>{const w=[...C];return w.unshift({from:{passport:""},to:{role:U.ROLES.GUEST}}),w})},children:a("team.add")})})]}),e.jsxs(g,{className:"list",sx:{mt:-.5},children:[j.map((C,w)=>e.jsxs(g,{className:"mapping-item",sx:{display:"flex",alignItems:"center",justifyContent:"space-between",my:1},children:[e.jsxs(g,{sx:{display:"flex",alignItems:"center",flexGrow:1},children:[e.jsx(g,{sx:{flexGrow:1,flexBasis:1},children:e.jsx(E,{fullWidth:!0,size:"small","data-cy":`input-${w}-from`,placeholder:"Issuer’s Passport Name/ID *",value:C.from.passport,onChange:T=>{const{value:D}=T.target;x(L=>{const I=[...L];return I[w].from.passport=D,I})},sx:{"& .MuiInputBase-input::placeholder":{fontSize:14},"& .Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"primary.main"}}})}),e.jsx(g,{sx:{flexShrink:0,mx:1,width:65,height:16},children:e.jsx(wt,{})}),e.jsx(g,{sx:{flexGrow:1,flexBasis:1},children:e.jsx(E,{fullWidth:!0,size:"small",select:!0,value:C.to.role,onChange:T=>{x(D=>{const L=[...D];return L[w].to.role=T.target.value,L})},variant:"outlined",children:u.filter(T=>T.name!=="owner").map(T=>e.jsx(ce,{value:T.name,"data-cy":`passport-mapping-select-option-${T.name}`,children:e.jsx("span",{children:T.title||T.name})},T.name))})})]}),e.jsx(g,{sx:{flexShrink:0},children:e.jsx(q,{onClick:()=>{x(T=>{const D=[...T];return D.splice(w,1),D})},size:"large",children:e.jsx(ue,{})})})]},`mapping-${w}`)),!j.length&&e.jsx(g,{sx:{my:2,color:"text.secondary",fontSize:"16px"},children:e.jsx(Ce,{children:a("common.empty")})})]})]})})})}Tt.propTypes={onCancel:y.func.isRequired,onSuccess:y.func.isRequired,trustedPassports:y.array,data:y.object};const zs=H.div`
91
91
  .dialog-h1 {
92
92
  font-size: 18px;
93
93
  }
@@ -99,7 +99,7 @@ import{aF as G,j as e,r as b,aW as V,cB as Le,T as F,N as K,o as y,V as N,bf as
99
99
  }
100
100
  }
101
101
  }
102
- `;function Pe({onCancel:s,hasPermission:n=!1}){const{api:l}=A(),{teamDid:p,trustedPassports:c}=M(),{t:u}=N(),[f,a]=b.useState(null),[d,r]=b.useState(!1),[o,i]=b.useState(!1),[t,m]=b.useState(""),j=async h=>{if(d)return;const v=c.findIndex(w=>w.issuerDid===h);v===-1&&z.error("Cannot find passports");const C=[...c];C.splice(v,1);try{r(!0),await l.configTrustedPassports({input:{teamDid:p,trustedPassports:C}}),await ae(800),r(!1),z.success(u("common.saveSuccess")),a(!1)}catch(w){r(!1),z.error(w.message)}},x=c.filter(h=>!t||h.issuerDid.toLowerCase().includes(t.toLowerCase()));return e.jsxs(H,{title:u("team.passport.trustedIssuers"),open:!0,onClose:s,fullWidth:!0,PaperProps:{style:{minHeight:"80vh"}},children:[e.jsx(Ls,{children:e.jsxs("div",{className:"dialog-content",children:[e.jsx("div",{className:"dialog-h1",children:u("team.passport.trustedPassportIssuers")}),e.jsx(at,{sx:{mt:3},actions:e.jsxs(e.Fragment,{children:[e.jsx(nt,{options:{searchPlaceholder:u("team.passport.searchIssuerDid"),searchDebounceTime:600},search:t,searchText:t,searchTextUpdate:m,searchClose:()=>m(""),onSearchOpen:()=>{}}),n&&e.jsxs(B,{variant:"contained",color:"primary","data-cy":"add-trusted-issuer",onClick:()=>i({mode:"add"}),children:[e.jsx(Te,{style:{fontSize:16,marginRight:4}}),u("team.add")]})]})}),e.jsxs("div",{className:"list",children:[x.map(h=>e.jsxs(g,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"20px"},children:[e.jsxs(g,{sx:{flexShrink:0},children:[e.jsx(J,{copyable:!1,size:16,did:Je.toAddress(h.issuerDid),showDidLogo:!1}),!!h.remark&&e.jsx(g,{sx:{fontSize:12,maxWidth:"300px"},children:h.remark})]}),e.jsx(g,{sx:{color:"gray",ml:"28px",flexGrow:1},children:h.mappings&&h.mappings.length?`${h.mappings.length} ${u("team.passport.mappingRule")}`:u("team.passport.defaultRule")}),e.jsxs(g,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:[e.jsx(q,{onClick:()=>i({mode:"update",data:Q(h)}),"data-cy":"edit-mapping-rule",size:"large",children:e.jsx(pe,{})}),e.jsx(q,{"data-cy":"delete-mapping-rule",onClick:()=>a({title:u("common.delete"),description:u("common.delConfirmDescription",{data:h.issuerDid}),confirm:u("common.delConfirm"),cancel:u("common.cancel"),onConfirm:()=>j(h.issuerDid),onCancel:()=>{r(!1),a(null)}}),size:"large",children:e.jsx(ue,{})})]})]},h.issuerDid)),!c.length&&e.jsx(Ce,{children:u("common.empty")})]})]})}),o&&e.jsx(Tt,{mode:o.mode,data:o.data,trustedPassports:Q(c),onCancel:()=>i(null),onSuccess:()=>{i(null)}}),f&&e.jsx(Se,{title:f.title,description:f.description,confirm:f.confirm,cancel:f.cancel,params:f.params,onConfirm:f.onConfirm,onCancel:f.onCancel})]})}Pe.propTypes={onCancel:y.func.isRequired,hasPermission:y.bool};const As=Y(Pe,"mutate_team"),Ns=Y(Pe,"",X);function Fs(s){const{inService:n}=A();return n?e.jsx(Ns,{...s}):e.jsx(As,{...s})}const Ls=W.div`
102
+ `;function Pe({onCancel:s,hasPermission:n=!1}){const{api:l}=A(),{teamDid:p,trustedPassports:c}=M(),{t:u}=N(),[f,a]=b.useState(null),[d,r]=b.useState(!1),[o,i]=b.useState(!1),[t,m]=b.useState(""),j=async h=>{if(d)return;const v=c.findIndex(w=>w.issuerDid===h);v===-1&&z.error("Cannot find passports");const C=[...c];C.splice(v,1);try{r(!0),await l.configTrustedPassports({input:{teamDid:p,trustedPassports:C}}),await ae(800),r(!1),z.success(u("common.saveSuccess")),a(!1)}catch(w){r(!1),z.error(w.message)}},x=c.filter(h=>!t||h.issuerDid.toLowerCase().includes(t.toLowerCase()));return e.jsxs(W,{title:u("team.passport.trustedIssuers"),open:!0,onClose:s,fullWidth:!0,PaperProps:{style:{minHeight:"80vh"}},children:[e.jsx(Ls,{children:e.jsxs("div",{className:"dialog-content",children:[e.jsx("div",{className:"dialog-h1",children:u("team.passport.trustedPassportIssuers")}),e.jsx(at,{sx:{mt:3},actions:e.jsxs(e.Fragment,{children:[e.jsx(nt,{options:{searchPlaceholder:u("team.passport.searchIssuerDid"),searchDebounceTime:600},search:t,searchText:t,searchTextUpdate:m,searchClose:()=>m(""),onSearchOpen:()=>{}}),n&&e.jsxs(B,{variant:"contained",color:"primary","data-cy":"add-trusted-issuer",onClick:()=>i({mode:"add"}),children:[e.jsx(Te,{style:{fontSize:16,marginRight:4}}),u("team.add")]})]})}),e.jsxs("div",{className:"list",children:[x.map(h=>e.jsxs(g,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"20px"},children:[e.jsxs(g,{sx:{flexShrink:0},children:[e.jsx(Q,{copyable:!1,size:16,did:Qe.toAddress(h.issuerDid),showDidLogo:!1}),!!h.remark&&e.jsx(g,{sx:{fontSize:12,maxWidth:"300px"},children:h.remark})]}),e.jsx(g,{sx:{color:"gray",ml:"28px",flexGrow:1},children:h.mappings&&h.mappings.length?`${h.mappings.length} ${u("team.passport.mappingRule")}`:u("team.passport.defaultRule")}),e.jsxs(g,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:[e.jsx(q,{onClick:()=>i({mode:"update",data:J(h)}),"data-cy":"edit-mapping-rule",size:"large",children:e.jsx(pe,{})}),e.jsx(q,{"data-cy":"delete-mapping-rule",onClick:()=>a({title:u("common.delete"),description:u("common.delConfirmDescription",{data:h.issuerDid}),confirm:u("common.delConfirm"),cancel:u("common.cancel"),onConfirm:()=>j(h.issuerDid),onCancel:()=>{r(!1),a(null)}}),size:"large",children:e.jsx(ue,{})})]})]},h.issuerDid)),!c.length&&e.jsx(Ce,{children:u("common.empty")})]})]})}),o&&e.jsx(Tt,{mode:o.mode,data:o.data,trustedPassports:J(c),onCancel:()=>i(null),onSuccess:()=>{i(null)}}),f&&e.jsx(Se,{title:f.title,description:f.description,confirm:f.confirm,cancel:f.cancel,params:f.params,onConfirm:f.onConfirm,onCancel:f.onCancel})]})}Pe.propTypes={onCancel:y.func.isRequired,hasPermission:y.bool};const As=Y(Pe,"mutate_team"),Ns=Y(Pe,"",X);function Fs(s){const{inService:n}=A();return n?e.jsx(Ns,{...s}):e.jsx(As,{...s})}const Ls=H.div`
103
103
  .list {
104
104
  .MuiIconButton-root {
105
105
  svg {
@@ -107,7 +107,7 @@ import{aF as G,j as e,r as b,aW as V,cB as Le,T as F,N as K,o as y,V as N,bf as
107
107
  }
108
108
  }
109
109
  }
110
- `;var Bs=Vt();const Ee=Qe(Bs);function It({onCancel:s,onSuccess:n,data:l={},trustedFactories:p=[]}){const{api:c}=A(),{roles:u,teamDid:f}=M(),{t:a}=N(),[d,r]=Gt({loading:!1,fetching:!1,fetched:[],errored:[],factoryAddress:l.factoryAddress||"",remark:l.remark||"",role:l.passport?.role||"member",ttlPolicy:l.passport?.ttlPolicy||"never",ttl:Ee(+l.passport?.ttl||365*24*60*60*1e3),error:""}),o=p.findIndex(x=>x.factoryAddress===l.factoryAddress),i=async()=>{if(d.loading)return;const{factoryAddress:x,remark:h,role:v,ttlPolicy:C,ttl:w}=d,T={factoryAddress:x,remark:h,passport:{role:v,ttlPolicy:C,ttl:C==="never"?0:Ee(w)}},D=[...p];o===-1?D.unshift(T):D[o]=T;try{r({loading:!0}),await c.configTrustedFactories({input:{teamDid:f,trustedFactories:D}}),await ae(800),z.success(a("common.saveSuccess")),n()}catch(L){console.error(L),z.error(ne(L))}finally{r({loading:!1})}};b.useEffect(()=>{const x=d.fetched.find(v=>v.address===d.factoryAddress),h=d.errored.find(v=>v.address===d.factoryAddress);Je.isValid(d.factoryAddress)&&!d.fetching&&!x&&!h&&(r({fetching:!0}),ds(U.MAIN_CHAIN_ENDPOINT).getFactoryState({address:d.factoryAddress}).then(C=>{C.state?r({fetching:!1,fetched:[...d.fetched.filter(w=>w.address!==d.factoryAddress),C.state],remark:C.state.name}):r({fetching:!1,errored:[...d.errored.filter(w=>w.address!==d.factoryAddress),{address:d.factoryAddress}],error:a("team.passport.factory404",d)})}).catch(C=>{console.error(C),r({fetching:!1,error:ne(C)})}))},[d.factoryAddress,d.fetching]);let t=d.error;const m=d.factoryAddress?d.errored.find(x=>x.address===d.factoryAddress):null;!t&&m&&(t=a("team.passport.factory404",d));const j=d.factoryAddress?d.fetched.find(x=>x.address===d.factoryAddress):null;return!t&&j&&(t=j.description),t||(t=a("team.passport.factoryAddressTip")),e.jsx(H,{title:a("team.passport.trustedFactories"),open:!0,showCloseButton:!1,PaperProps:{style:{minHeight:"80vh"}},fullWidth:!0,prepend:e.jsx(q,{onClick:s,"data-cy":"close-trusted-factory",size:"large",children:e.jsx(it,{})}),actions:e.jsxs(e.Fragment,{children:[e.jsx(B,{onClick:s,color:"inherit",children:a("common.cancel")}),e.jsxs(B,{onClick:()=>i(),color:"primary",disabled:!d.factoryAddress||!d.remark||!d.role||d.loading||d.error||m,variant:"contained",autoFocus:!0,"data-cy":"save-trusted-factory",children:[d.loading&&e.jsx(O,{size:16}),a("common.save")]})]}),children:e.jsx(Ms,{children:e.jsxs("div",{className:"dialog-content",children:[e.jsx(E,{fullWidth:!0,error:!!d.error||!!m,"data-cy":"input-factory-address",label:a("team.passport.factoryAddress"),helperText:t,value:d.factoryAddress,onChange:x=>{r({factoryAddress:x.target.value,error:""})},slotProps:{input:{endAdornment:d.fetching?e.jsx(Yt,{position:"end",children:e.jsx(O,{size:16})}):null}}}),e.jsx(E,{style:{marginTop:32},fullWidth:!0,"data-cy":"input-factory-remark",label:a("common.remark"),value:d.remark,onChange:x=>{r({remark:x.target.value})}}),e.jsx(E,{style:{marginTop:32},fullWidth:!0,"data-cy":"input-passport-role",label:a("team.passport.role"),select:!0,value:d.role,onChange:x=>{r({role:x.target.value})},variant:"outlined",children:u.filter(x=>x.name!=="owner").map(x=>e.jsx(ce,{value:x.name,"data-cy":`passport-role-select-option-${x.name}`,children:e.jsx("span",{children:x.title||x.name})},x.name))}),e.jsxs("div",{style:{marginTop:32},children:[e.jsx(Xe,{children:a("team.passport.ttl")}),e.jsxs(ot,{color:"primary",size:"small",value:d.ttlPolicy,exclusive:!0,style:{marginTop:16},onChange:(x,h)=>r({ttlPolicy:h}),"data-cy":"input-passport-ttl-since","aria-label":"Expire Policy",children:[e.jsx(re,{value:"never","data-cy":"input-passport-ttl-never",children:e.jsx(K,{title:a("team.passport.ttlNeverTip"),children:e.jsx(F,{children:a("team.passport.ttlNever")})})}),e.jsx(re,{value:"mint","data-cy":"input-passport-ttl-mint",children:e.jsx(K,{title:a("team.passport.ttlMintTip"),children:e.jsx(F,{children:a("team.passport.ttlMint")})})}),e.jsx(re,{value:"exchange","data-cy":"input-passport-ttl-exchange",children:e.jsx(K,{title:a("team.passport.ttlExchangeTip"),children:e.jsx(F,{children:a("team.passport.ttlExchange")})})})]}),d.ttlPolicy!=="never"&&e.jsxs(e.Fragment,{children:[e.jsx(et,{fullWidth:!0,type:"text",style:{marginTop:16},"data-cy":"input-passport-ttl",value:d.ttl,onChange:x=>{r({ttl:x.target.value})}}),e.jsx(tt,{children:a("team.passport.ttlTip")})]})]})]})})})}It.propTypes={onCancel:y.func.isRequired,onSuccess:y.func.isRequired,trustedFactories:y.array,data:y.object};const Ms=W.div`
110
+ `;var Bs=Vt();const Ee=Je(Bs);function It({onCancel:s,onSuccess:n,data:l={},trustedFactories:p=[]}){const{api:c}=A(),{roles:u,teamDid:f}=M(),{t:a}=N(),[d,r]=Gt({loading:!1,fetching:!1,fetched:[],errored:[],factoryAddress:l.factoryAddress||"",remark:l.remark||"",role:l.passport?.role||"member",ttlPolicy:l.passport?.ttlPolicy||"never",ttl:Ee(+l.passport?.ttl||365*24*60*60*1e3),error:""}),o=p.findIndex(x=>x.factoryAddress===l.factoryAddress),i=async()=>{if(d.loading)return;const{factoryAddress:x,remark:h,role:v,ttlPolicy:C,ttl:w}=d,T={factoryAddress:x,remark:h,passport:{role:v,ttlPolicy:C,ttl:C==="never"?0:Ee(w)}},D=[...p];o===-1?D.unshift(T):D[o]=T;try{r({loading:!0}),await c.configTrustedFactories({input:{teamDid:f,trustedFactories:D}}),await ae(800),z.success(a("common.saveSuccess")),n()}catch(L){console.error(L),z.error(ne(L))}finally{r({loading:!1})}};b.useEffect(()=>{const x=d.fetched.find(v=>v.address===d.factoryAddress),h=d.errored.find(v=>v.address===d.factoryAddress);Qe.isValid(d.factoryAddress)&&!d.fetching&&!x&&!h&&(r({fetching:!0}),ds(U.MAIN_CHAIN_ENDPOINT).getFactoryState({address:d.factoryAddress}).then(C=>{C.state?r({fetching:!1,fetched:[...d.fetched.filter(w=>w.address!==d.factoryAddress),C.state],remark:C.state.name}):r({fetching:!1,errored:[...d.errored.filter(w=>w.address!==d.factoryAddress),{address:d.factoryAddress}],error:a("team.passport.factory404",d)})}).catch(C=>{console.error(C),r({fetching:!1,error:ne(C)})}))},[d.factoryAddress,d.fetching]);let t=d.error;const m=d.factoryAddress?d.errored.find(x=>x.address===d.factoryAddress):null;!t&&m&&(t=a("team.passport.factory404",d));const j=d.factoryAddress?d.fetched.find(x=>x.address===d.factoryAddress):null;return!t&&j&&(t=j.description),t||(t=a("team.passport.factoryAddressTip")),e.jsx(W,{title:a("team.passport.trustedFactories"),open:!0,showCloseButton:!1,PaperProps:{style:{minHeight:"80vh"}},fullWidth:!0,prepend:e.jsx(q,{onClick:s,"data-cy":"close-trusted-factory",size:"large",children:e.jsx(it,{})}),actions:e.jsxs(e.Fragment,{children:[e.jsx(B,{onClick:s,color:"inherit",children:a("common.cancel")}),e.jsxs(B,{onClick:()=>i(),color:"primary",disabled:!d.factoryAddress||!d.remark||!d.role||d.loading||d.error||m,variant:"contained",autoFocus:!0,"data-cy":"save-trusted-factory",children:[d.loading&&e.jsx(O,{size:16}),a("common.save")]})]}),children:e.jsx(Ms,{children:e.jsxs("div",{className:"dialog-content",children:[e.jsx(E,{fullWidth:!0,error:!!d.error||!!m,"data-cy":"input-factory-address",label:a("team.passport.factoryAddress"),helperText:t,value:d.factoryAddress,onChange:x=>{r({factoryAddress:x.target.value,error:""})},slotProps:{input:{endAdornment:d.fetching?e.jsx(Yt,{position:"end",children:e.jsx(O,{size:16})}):null}}}),e.jsx(E,{style:{marginTop:32},fullWidth:!0,"data-cy":"input-factory-remark",label:a("common.remark"),value:d.remark,onChange:x=>{r({remark:x.target.value})}}),e.jsx(E,{style:{marginTop:32},fullWidth:!0,"data-cy":"input-passport-role",label:a("team.passport.role"),select:!0,value:d.role,onChange:x=>{r({role:x.target.value})},variant:"outlined",children:u.filter(x=>x.name!=="owner").map(x=>e.jsx(ce,{value:x.name,"data-cy":`passport-role-select-option-${x.name}`,children:e.jsx("span",{children:x.title||x.name})},x.name))}),e.jsxs("div",{style:{marginTop:32},children:[e.jsx(Xe,{children:a("team.passport.ttl")}),e.jsxs(ot,{color:"primary",size:"small",value:d.ttlPolicy,exclusive:!0,style:{marginTop:16},onChange:(x,h)=>r({ttlPolicy:h}),"data-cy":"input-passport-ttl-since","aria-label":"Expire Policy",children:[e.jsx(re,{value:"never","data-cy":"input-passport-ttl-never",children:e.jsx(K,{title:a("team.passport.ttlNeverTip"),children:e.jsx(F,{children:a("team.passport.ttlNever")})})}),e.jsx(re,{value:"mint","data-cy":"input-passport-ttl-mint",children:e.jsx(K,{title:a("team.passport.ttlMintTip"),children:e.jsx(F,{children:a("team.passport.ttlMint")})})}),e.jsx(re,{value:"exchange","data-cy":"input-passport-ttl-exchange",children:e.jsx(K,{title:a("team.passport.ttlExchangeTip"),children:e.jsx(F,{children:a("team.passport.ttlExchange")})})})]}),d.ttlPolicy!=="never"&&e.jsxs(e.Fragment,{children:[e.jsx(et,{fullWidth:!0,type:"text",style:{marginTop:16},"data-cy":"input-passport-ttl",value:d.ttl,onChange:x=>{r({ttl:x.target.value})}}),e.jsx(tt,{children:a("team.passport.ttlTip")})]})]})]})})})}It.propTypes={onCancel:y.func.isRequired,onSuccess:y.func.isRequired,trustedFactories:y.array,data:y.object};const Ms=H.div`
111
111
  .dialog-h1 {
112
112
  font-size: 18px;
113
113
  }
@@ -119,7 +119,7 @@ import{aF as G,j as e,r as b,aW as V,cB as Le,T as F,N as K,o as y,V as N,bf as
119
119
  }
120
120
  }
121
121
  }
122
- `;function ze({onCancel:s,hasPermission:n=!1}){const{api:l}=A(),{teamDid:p,trustedFactories:c}=M(),{t:u}=N(),[f,a]=b.useState(null),[d,r]=b.useState(!1),[o,i]=b.useState(null),[t,m]=b.useState(""),j=async h=>{if(!d)try{r(!0),await l.configTrustedFactories({input:{teamDid:p,trustedFactories:c.filter(v=>v.factoryAddress!==h)}}),await ae(800),r(!1),z.success(u("common.saveSuccess")),a(null)}catch(v){r(!1),z.error(v.message)}},x=c.filter(h=>!t||h.factoryAddress.toLowerCase().includes(t.toLowerCase()));return e.jsxs(H,{title:u("team.passport.trustedFactories"),open:!0,onClose:s,fullWidth:!0,PaperProps:{style:{minHeight:"80vh"}},children:[e.jsx(_s,{children:e.jsxs("div",{className:"dialog-content",children:[e.jsx("div",{className:"dialog-h1",children:u("team.passport.trustedFactoriesTip")}),e.jsx(at,{sx:{mt:3},actions:e.jsxs(e.Fragment,{children:[e.jsx(nt,{options:{searchPlaceholder:u("team.passport.searchFactoryAddress"),searchDebounceTime:600},search:t,searchText:t,searchTextUpdate:m,searchClose:()=>m(""),onSearchOpen:()=>{}}),n&&e.jsxs(B,{variant:"contained",color:"primary",size:"small","data-cy":"add-trusted-factory",onClick:()=>i({mode:"add"}),children:[e.jsx(Te,{style:{fontSize:16,marginRight:4}}),u("team.add")]})]})}),e.jsxs("div",{className:"list",children:[x.map(h=>e.jsxs(g,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"20px"},children:[e.jsxs(g,{sx:{flexGrow:1},children:[e.jsx(J,{copyable:!1,did:h.factoryAddress,size:16,showDidLogo:!1}),!!h.remark&&e.jsx(g,{sx:{fontSize:12,maxWidth:"300px"},children:h.remark})]}),e.jsx(g,{sx:{color:"gray",mr:"24px"},children:e.jsx(Kt,{type:"success",children:h.passport.role})}),e.jsxs(g,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:[e.jsx(q,{onClick:()=>i({mode:"update",data:Q(h)}),"data-cy":"edit-trusted-factory",size:"large",children:e.jsx(pe,{})}),e.jsx(q,{"data-cy":"delete-trusted-factory",onClick:()=>a({title:u("common.delete"),description:u("common.delConfirmDescription",{data:h.factoryAddress}),confirm:u("common.delConfirm"),cancel:u("common.cancel"),onConfirm:()=>j(h.factoryAddress),onCancel:()=>{r(!1),a(null)}}),size:"large",children:e.jsx(ue,{})})]})]},h.factoryAddress)),!c.length&&e.jsx(Ce,{children:u("common.empty")})]})]})}),o&&e.jsx(It,{data:o.data,trustedFactories:Q(c),onCancel:()=>i(null),onSuccess:()=>{i(null)}}),f&&e.jsx(Se,{title:f.title,description:f.description,confirm:f.confirm,cancel:f.cancel,params:f.params,onConfirm:f.onConfirm,onCancel:f.onCancel})]})}ze.propTypes={onCancel:y.func.isRequired,hasPermission:y.bool};const $s=Y(ze,"mutate_team"),Os=Y(ze,"",X);function Es(s){const{inService:n}=A();return n?e.jsx(Os,{...s}):e.jsx($s,{...s})}const _s=W.div`
122
+ `;function ze({onCancel:s,hasPermission:n=!1}){const{api:l}=A(),{teamDid:p,trustedFactories:c}=M(),{t:u}=N(),[f,a]=b.useState(null),[d,r]=b.useState(!1),[o,i]=b.useState(null),[t,m]=b.useState(""),j=async h=>{if(!d)try{r(!0),await l.configTrustedFactories({input:{teamDid:p,trustedFactories:c.filter(v=>v.factoryAddress!==h)}}),await ae(800),r(!1),z.success(u("common.saveSuccess")),a(null)}catch(v){r(!1),z.error(v.message)}},x=c.filter(h=>!t||h.factoryAddress.toLowerCase().includes(t.toLowerCase()));return e.jsxs(W,{title:u("team.passport.trustedFactories"),open:!0,onClose:s,fullWidth:!0,PaperProps:{style:{minHeight:"80vh"}},children:[e.jsx(_s,{children:e.jsxs("div",{className:"dialog-content",children:[e.jsx("div",{className:"dialog-h1",children:u("team.passport.trustedFactoriesTip")}),e.jsx(at,{sx:{mt:3},actions:e.jsxs(e.Fragment,{children:[e.jsx(nt,{options:{searchPlaceholder:u("team.passport.searchFactoryAddress"),searchDebounceTime:600},search:t,searchText:t,searchTextUpdate:m,searchClose:()=>m(""),onSearchOpen:()=>{}}),n&&e.jsxs(B,{variant:"contained",color:"primary",size:"small","data-cy":"add-trusted-factory",onClick:()=>i({mode:"add"}),children:[e.jsx(Te,{style:{fontSize:16,marginRight:4}}),u("team.add")]})]})}),e.jsxs("div",{className:"list",children:[x.map(h=>e.jsxs(g,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"20px"},children:[e.jsxs(g,{sx:{flexGrow:1},children:[e.jsx(Q,{copyable:!1,did:h.factoryAddress,size:16,showDidLogo:!1}),!!h.remark&&e.jsx(g,{sx:{fontSize:12,maxWidth:"300px"},children:h.remark})]}),e.jsx(g,{sx:{color:"gray",mr:"24px"},children:e.jsx(Kt,{type:"success",children:h.passport.role})}),e.jsxs(g,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:[e.jsx(q,{onClick:()=>i({mode:"update",data:J(h)}),"data-cy":"edit-trusted-factory",size:"large",children:e.jsx(pe,{})}),e.jsx(q,{"data-cy":"delete-trusted-factory",onClick:()=>a({title:u("common.delete"),description:u("common.delConfirmDescription",{data:h.factoryAddress}),confirm:u("common.delConfirm"),cancel:u("common.cancel"),onConfirm:()=>j(h.factoryAddress),onCancel:()=>{r(!1),a(null)}}),size:"large",children:e.jsx(ue,{})})]})]},h.factoryAddress)),!c.length&&e.jsx(Ce,{children:u("common.empty")})]})]})}),o&&e.jsx(It,{data:o.data,trustedFactories:J(c),onCancel:()=>i(null),onSuccess:()=>{i(null)}}),f&&e.jsx(Se,{title:f.title,description:f.description,confirm:f.confirm,cancel:f.cancel,params:f.params,onConfirm:f.onConfirm,onCancel:f.onCancel})]})}ze.propTypes={onCancel:y.func.isRequired,hasPermission:y.bool};const $s=Y(ze,"mutate_team"),Os=Y(ze,"",X);function Es(s){const{inService:n}=A();return n?e.jsx(Os,{...s}):e.jsx($s,{...s})}const _s=H.div`
123
123
  .list {
124
124
  .MuiIconButton-root {
125
125
  svg {
@@ -127,12 +127,12 @@ import{aF as G,j as e,r as b,aW as V,cB as Le,T as F,N as K,o as y,V as N,bf as
127
127
  }
128
128
  }
129
129
  }
130
- `;var xe={exports:{}},he={exports:{}},_e;function qs(){return _e||(_e=1,function(){var s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(l,p){return l<<p|l>>>32-p},rotr:function(l,p){return l<<32-p|l>>>p},endian:function(l){if(l.constructor==Number)return n.rotl(l,8)&16711935|n.rotl(l,24)&4278255360;for(var p=0;p<l.length;p++)l[p]=n.endian(l[p]);return l},randomBytes:function(l){for(var p=[];l>0;l--)p.push(Math.floor(Math.random()*256));return p},bytesToWords:function(l){for(var p=[],c=0,u=0;c<l.length;c++,u+=8)p[u>>>5]|=l[c]<<24-u%32;return p},wordsToBytes:function(l){for(var p=[],c=0;c<l.length*32;c+=8)p.push(l[c>>>5]>>>24-c%32&255);return p},bytesToHex:function(l){for(var p=[],c=0;c<l.length;c++)p.push((l[c]>>>4).toString(16)),p.push((l[c]&15).toString(16));return p.join("")},hexToBytes:function(l){for(var p=[],c=0;c<l.length;c+=2)p.push(parseInt(l.substr(c,2),16));return p},bytesToBase64:function(l){for(var p=[],c=0;c<l.length;c+=3)for(var u=l[c]<<16|l[c+1]<<8|l[c+2],f=0;f<4;f++)c*8+f*6<=l.length*8?p.push(s.charAt(u>>>6*(3-f)&63)):p.push("=");return p.join("")},base64ToBytes:function(l){l=l.replace(/[^A-Z0-9+\/]/ig,"");for(var p=[],c=0,u=0;c<l.length;u=++c%4)u!=0&&p.push((s.indexOf(l.charAt(c-1))&Math.pow(2,-2*u+8)-1)<<u*2|s.indexOf(l.charAt(c))>>>6-u*2);return p}};he.exports=n}()),he.exports}var ge,qe;function He(){if(qe)return ge;qe=1;var s={utf8:{stringToBytes:function(n){return s.bin.stringToBytes(unescape(encodeURIComponent(n)))},bytesToString:function(n){return decodeURIComponent(escape(s.bin.bytesToString(n)))}},bin:{stringToBytes:function(n){for(var l=[],p=0;p<n.length;p++)l.push(n.charCodeAt(p)&255);return l},bytesToString:function(n){for(var l=[],p=0;p<n.length;p++)l.push(String.fromCharCode(n[p]));return l.join("")}}};return ge=s,ge}/*!
130
+ `;var xe={exports:{}},he={exports:{}},_e;function qs(){return _e||(_e=1,function(){var s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(l,p){return l<<p|l>>>32-p},rotr:function(l,p){return l<<32-p|l>>>p},endian:function(l){if(l.constructor==Number)return n.rotl(l,8)&16711935|n.rotl(l,24)&4278255360;for(var p=0;p<l.length;p++)l[p]=n.endian(l[p]);return l},randomBytes:function(l){for(var p=[];l>0;l--)p.push(Math.floor(Math.random()*256));return p},bytesToWords:function(l){for(var p=[],c=0,u=0;c<l.length;c++,u+=8)p[u>>>5]|=l[c]<<24-u%32;return p},wordsToBytes:function(l){for(var p=[],c=0;c<l.length*32;c+=8)p.push(l[c>>>5]>>>24-c%32&255);return p},bytesToHex:function(l){for(var p=[],c=0;c<l.length;c++)p.push((l[c]>>>4).toString(16)),p.push((l[c]&15).toString(16));return p.join("")},hexToBytes:function(l){for(var p=[],c=0;c<l.length;c+=2)p.push(parseInt(l.substr(c,2),16));return p},bytesToBase64:function(l){for(var p=[],c=0;c<l.length;c+=3)for(var u=l[c]<<16|l[c+1]<<8|l[c+2],f=0;f<4;f++)c*8+f*6<=l.length*8?p.push(s.charAt(u>>>6*(3-f)&63)):p.push("=");return p.join("")},base64ToBytes:function(l){l=l.replace(/[^A-Z0-9+\/]/ig,"");for(var p=[],c=0,u=0;c<l.length;u=++c%4)u!=0&&p.push((s.indexOf(l.charAt(c-1))&Math.pow(2,-2*u+8)-1)<<u*2|s.indexOf(l.charAt(c))>>>6-u*2);return p}};he.exports=n}()),he.exports}var ge,qe;function We(){if(qe)return ge;qe=1;var s={utf8:{stringToBytes:function(n){return s.bin.stringToBytes(unescape(encodeURIComponent(n)))},bytesToString:function(n){return decodeURIComponent(escape(s.bin.bytesToString(n)))}},bin:{stringToBytes:function(n){for(var l=[],p=0;p<n.length;p++)l.push(n.charCodeAt(p)&255);return l},bytesToString:function(n){for(var l=[],p=0;p<n.length;p++)l.push(String.fromCharCode(n[p]));return l.join("")}}};return ge=s,ge}/*!
131
131
  * Determine if an object is a Buffer
132
132
  *
133
133
  * @author Feross Aboukhadijeh <https://feross.org>
134
134
  * @license MIT
135
- */var ye,We;function Hs(){if(We)return ye;We=1,ye=function(l){return l!=null&&(s(l)||n(l)||!!l._isBuffer)};function s(l){return!!l.constructor&&typeof l.constructor.isBuffer=="function"&&l.constructor.isBuffer(l)}function n(l){return typeof l.readFloatLE=="function"&&typeof l.slice=="function"&&s(l.slice(0,0))}return ye}var Ue;function Ws(){return Ue||(Ue=1,function(){var s=qs(),n=He().utf8,l=Hs(),p=He().bin,c=function(u,f){u.constructor==String?f&&f.encoding==="binary"?u=p.stringToBytes(u):u=n.stringToBytes(u):l(u)?u=Array.prototype.slice.call(u,0):!Array.isArray(u)&&u.constructor!==Uint8Array&&(u=u.toString());for(var a=s.bytesToWords(u),d=u.length*8,r=1732584193,o=-271733879,i=-1732584194,t=271733878,m=0;m<a.length;m++)a[m]=(a[m]<<8|a[m]>>>24)&16711935|(a[m]<<24|a[m]>>>8)&4278255360;a[d>>>5]|=128<<d%32,a[(d+64>>>9<<4)+14]=d;for(var j=c._ff,x=c._gg,h=c._hh,v=c._ii,m=0;m<a.length;m+=16){var C=r,w=o,T=i,D=t;r=j(r,o,i,t,a[m+0],7,-680876936),t=j(t,r,o,i,a[m+1],12,-389564586),i=j(i,t,r,o,a[m+2],17,606105819),o=j(o,i,t,r,a[m+3],22,-1044525330),r=j(r,o,i,t,a[m+4],7,-176418897),t=j(t,r,o,i,a[m+5],12,1200080426),i=j(i,t,r,o,a[m+6],17,-1473231341),o=j(o,i,t,r,a[m+7],22,-45705983),r=j(r,o,i,t,a[m+8],7,1770035416),t=j(t,r,o,i,a[m+9],12,-1958414417),i=j(i,t,r,o,a[m+10],17,-42063),o=j(o,i,t,r,a[m+11],22,-1990404162),r=j(r,o,i,t,a[m+12],7,1804603682),t=j(t,r,o,i,a[m+13],12,-40341101),i=j(i,t,r,o,a[m+14],17,-1502002290),o=j(o,i,t,r,a[m+15],22,1236535329),r=x(r,o,i,t,a[m+1],5,-165796510),t=x(t,r,o,i,a[m+6],9,-1069501632),i=x(i,t,r,o,a[m+11],14,643717713),o=x(o,i,t,r,a[m+0],20,-373897302),r=x(r,o,i,t,a[m+5],5,-701558691),t=x(t,r,o,i,a[m+10],9,38016083),i=x(i,t,r,o,a[m+15],14,-660478335),o=x(o,i,t,r,a[m+4],20,-405537848),r=x(r,o,i,t,a[m+9],5,568446438),t=x(t,r,o,i,a[m+14],9,-1019803690),i=x(i,t,r,o,a[m+3],14,-187363961),o=x(o,i,t,r,a[m+8],20,1163531501),r=x(r,o,i,t,a[m+13],5,-1444681467),t=x(t,r,o,i,a[m+2],9,-51403784),i=x(i,t,r,o,a[m+7],14,1735328473),o=x(o,i,t,r,a[m+12],20,-1926607734),r=h(r,o,i,t,a[m+5],4,-378558),t=h(t,r,o,i,a[m+8],11,-2022574463),i=h(i,t,r,o,a[m+11],16,1839030562),o=h(o,i,t,r,a[m+14],23,-35309556),r=h(r,o,i,t,a[m+1],4,-1530992060),t=h(t,r,o,i,a[m+4],11,1272893353),i=h(i,t,r,o,a[m+7],16,-155497632),o=h(o,i,t,r,a[m+10],23,-1094730640),r=h(r,o,i,t,a[m+13],4,681279174),t=h(t,r,o,i,a[m+0],11,-358537222),i=h(i,t,r,o,a[m+3],16,-722521979),o=h(o,i,t,r,a[m+6],23,76029189),r=h(r,o,i,t,a[m+9],4,-640364487),t=h(t,r,o,i,a[m+12],11,-421815835),i=h(i,t,r,o,a[m+15],16,530742520),o=h(o,i,t,r,a[m+2],23,-995338651),r=v(r,o,i,t,a[m+0],6,-198630844),t=v(t,r,o,i,a[m+7],10,1126891415),i=v(i,t,r,o,a[m+14],15,-1416354905),o=v(o,i,t,r,a[m+5],21,-57434055),r=v(r,o,i,t,a[m+12],6,1700485571),t=v(t,r,o,i,a[m+3],10,-1894986606),i=v(i,t,r,o,a[m+10],15,-1051523),o=v(o,i,t,r,a[m+1],21,-2054922799),r=v(r,o,i,t,a[m+8],6,1873313359),t=v(t,r,o,i,a[m+15],10,-30611744),i=v(i,t,r,o,a[m+6],15,-1560198380),o=v(o,i,t,r,a[m+13],21,1309151649),r=v(r,o,i,t,a[m+4],6,-145523070),t=v(t,r,o,i,a[m+11],10,-1120210379),i=v(i,t,r,o,a[m+2],15,718787259),o=v(o,i,t,r,a[m+9],21,-343485551),r=r+C>>>0,o=o+w>>>0,i=i+T>>>0,t=t+D>>>0}return s.endian([r,o,i,t])};c._ff=function(u,f,a,d,r,o,i){var t=u+(f&a|~f&d)+(r>>>0)+i;return(t<<o|t>>>32-o)+f},c._gg=function(u,f,a,d,r,o,i){var t=u+(f&d|a&~d)+(r>>>0)+i;return(t<<o|t>>>32-o)+f},c._hh=function(u,f,a,d,r,o,i){var t=u+(f^a^d)+(r>>>0)+i;return(t<<o|t>>>32-o)+f},c._ii=function(u,f,a,d,r,o,i){var t=u+(a^(f|~d))+(r>>>0)+i;return(t<<o|t>>>32-o)+f},c._blocksize=16,c._digestsize=16,xe.exports=function(u,f){if(u==null)throw new Error("Illegal argument "+u);var a=s.wordsToBytes(c(u,f));return f&&f.asBytes?a:f&&f.asString?p.bytesToString(a):s.bytesToHex(a)}}()),xe.exports}var Us=Ws();const Vs=Qe(Us);function Ae({teamDid:s,onCancel:n,onSuccess:l,onError:p=()=>{},mode:c="create",item:u={},orgId:f=""}){const{api:a}=A(),[d,r]=b.useState(!1),[o,i]=b.useState(""),{t}=N(),[m,j]=b.useState(u.title||""),[x,h]=b.useState(u.description||""),[v,C]=b.useState(u?.extra?.display||"builtin"),[w,T]=b.useState(u?.extra?.types?u.extra.types.join(","):""),D=async()=>{const I=m.trim();if(!I){i(t("team.passport.error.titleEmpty"));return}if(I.length>64){i(t("team.passport.error.titleTooLong",{length:64}));return}const _=x.replace(/\n/g," ");if(!_){i(t("team.passport.error.descriptionEmpty"));return}const Z=c==="create"?Vs(f?`${f}-${I}`:I):u.name;i(null),r(!0);try{if(c==="create"){const $={teamDid:s,name:Z,title:I,description:_,...f?{orgId:f}:{}};v==="custom"&&($.extra=JSON.stringify({display:"custom",types:w.split(",")})),await a.createRole({input:$})}else{const $={teamDid:s,role:{name:Z,title:I,description:_},...f?{orgId:f}:{}};await a.updateRole({input:$})}l()}catch($){const ee=ne($);i(ee),p($)}finally{r(!1)}},L=e.jsxs("div",{children:[c==="update"&&e.jsx(F,{component:"div",style:{paddingTop:16},children:e.jsx(E,{label:"ID",autoComplete:"off",variant:"outlined",name:"url","data-cy":"mutate-role-input-name",fullWidth:!0,autoFocus:!0,value:u.name,disabled:!0})}),e.jsx(F,{component:"div",style:{marginTop:16},children:e.jsx(E,{label:t("common.title"),autoComplete:"off",variant:"outlined",name:"title","data-cy":"mutate-role-input-title",fullWidth:!0,autoFocus:!0,value:m,onChange:I=>{i(null),j(I.target.value)},disabled:c==="update"||d,helperText:t("team.passport.create.titleTip")})}),e.jsx(F,{component:"div",style:{marginTop:16,marginBottom:16},children:e.jsx(E,{label:t("common.description"),autoComplete:"off",variant:"outlined",name:"description","data-cy":"mutate-role-input-description",fullWidth:!0,autoFocus:!0,value:x,onChange:I=>{i(null),h(I.target.value)},disabled:d,multiline:!0,rows:3})}),c==="create"&&e.jsxs("div",{style:{marginBottom:16},children:[e.jsx(Xe,{children:t("common.display")}),e.jsxs(ot,{color:"primary",size:"small",value:v,exclusive:!0,style:{marginTop:16},disabled:d,onChange:(I,_)=>C(_),"data-cy":"input-role-display",children:[e.jsx(re,{value:"builtin","data-cy":"input-role-display-builtin",children:e.jsx(F,{children:t("team.passport.displayBuiltin")})}),e.jsx(re,{value:"custom","data-cy":"input-role-display-custom",children:e.jsx(F,{children:t("team.passport.displayCustom")})})]}),v==="custom"&&e.jsxs(e.Fragment,{children:[e.jsx(et,{fullWidth:!0,type:"text",style:{marginTop:16},"data-cy":"input-role-types",value:w,disabled:d,onChange:I=>{T(I.target.value)}}),e.jsx(tt,{children:t("team.passport.typesTip")})]})]})]});return e.jsxs(H,{title:c==="create"?t("team.passport.create.title"):"",fullWidth:!0,open:!0,onClose:n,showCloseButton:!1,actions:e.jsxs(e.Fragment,{children:[e.jsx(B,{onClick:n,color:"inherit",children:t("common.cancel")}),e.jsxs(B,{"data-cy":"mutate-role-confirm",onClick:D,color:"primary",disabled:d,variant:"contained",autoFocus:!0,children:[d&&e.jsx(O,{size:16}),t(c==="create"?"common.create":"common.update")]})]}),children:[e.jsx(Zt,{component:"div",children:L}),!!o&&e.jsx(Ke,{severity:"error",style:{width:"100%",margin:0},children:o})]})}Ae.propTypes={teamDid:y.string.isRequired,onCancel:y.func.isRequired,onSuccess:y.func.isRequired,onError:y.func,mode:y.oneOf(["create","update"]),item:y.object,orgId:y.string};function Ne({onCancel:s,onSuccess:n,onDelete:l,roleName:p,roles:c=void 0,hasPermission:u=!1,orgId:f=""}){const{api:a}=A(),{roles:d,permissions:r,teamDid:o,refresh:i,isNodeTeam:t}=M(),{t:m}=N(),[j,x]=b.useState([]),[h,v]=b.useState(!1),[C,w]=b.useState(null),[T,D]=b.useState(!1),L=b.useMemo(()=>c||d,[c,d]),I=Q(L.find(R=>R.name===p)),_=st(p),Z=async R=>{if(!T)try{D(!0),await a.deleteRole({input:{teamDid:o,name:R}}),l()}catch(P){z.error(P.message)}finally{D(!1),w(null)}},$=async(R,P)=>{const zt=(await a.getPermissionsByRole({input:{teamDid:R,role:{name:P}}})).permissions||[],At=r.map(Fe=>({...Fe,bind:zt.some(Nt=>Nt.name===Fe.name)}));x(At)},ee=async()=>{D(!0);const R=j.filter(P=>P.bind).map(P=>P.name);try{await a.updatePermissionsForRole({input:{teamDid:o,roleName:I.name,grantNames:R}}),z.success(m("common.saveSuccess")),n()}catch(P){z.error(ne(P))}finally{D(!1)}};b.useEffect(()=>{o&&p&&$(o,p)},[o,p]);const S=t||!u;let k=null;return t&&(k=e.jsxs("div",{className:"bind",children:[e.jsx("div",{className:"title",children:m("common.permission")}),e.jsx("div",{className:"list",children:j.filter(R=>S?R.bind:!0).map(R=>e.jsx("div",{className:"item",children:e.jsx(Jt,{control:e.jsx(Qt,{disabled:S,checked:R.bind,onChange:()=>{x(P=>P.map(te=>(te.name===R.name&&(te.bind=!te.bind),te)))},name:R.name}),label:R.description})}))})]})),e.jsxs(H,{title:m("common.passport"),onClose:s,open:!0,fullWidth:!0,toolbar:u&&!_&&e.jsxs(e.Fragment,{children:[e.jsx(q,{onClick:()=>v(I),"data-cy":`edit-passport-${I.name}`,size:"large",children:e.jsx(pe,{fill:"#bfbfbf"})}),e.jsx(q,{onClick:()=>w({title:m("team.passport.delete.title"),description:m("team.passport.delete.description",{name:I.title}),confirm:m("common.delConfirm"),cancel:m("common.cancel"),onConfirm:()=>{Z(I.name)},onCancel:()=>{D(!1),w(null)}}),"data-cy":`delete-passport-${I.name}`,size:"large",children:e.jsx(ue,{"data-cy":"close-passport-dialog",fill:"#bfbfbf"})})]}),actions:t&&!S&&e.jsxs(e.Fragment,{children:[e.jsx(B,{onClick:s,color:"inherit",children:m("common.cancel")}),e.jsxs(B,{onClick:ee,color:"primary",disabled:T||!I,variant:"contained",autoFocus:!0,"data-cy":"bind-permission-btn-confirm",children:[T&&e.jsx(O,{size:16}),m("common.save")]})]}),children:[e.jsxs(Zs,{children:[!I&&e.jsx(Js,{children:e.jsx(O,{})}),I&&e.jsxs("div",{className:"dialog-content",children:[e.jsxs("div",{className:"header",children:[e.jsx("div",{className:"title",children:I.title}),e.jsx("div",{className:"description",style:{marginTop:t?16:48},children:I.description})]}),k]})]}),h&&e.jsx(Ae,{teamDid:o,onCancel:()=>v(null),onSuccess:()=>{v(null),f?n():i()},mode:"update",roleName:h.name,item:h,orgId:f}),C&&e.jsx(Se,{title:C.title,description:C.description,confirm:C.confirm,cancel:C.cancel,params:C.params,onConfirm:C.onConfirm,onCancel:C.onCancel})]})}const Gs=Y(Ne,"mutate_team"),Ys=Y(Ne,"",X);function Ks(s){const{inService:n}=A();return n?e.jsx(Ys,{...s}):e.jsx(Gs,{...s})}Ne.propTypes={roleName:y.string.isRequired,onCancel:y.func.isRequired,onSuccess:y.func.isRequired,onDelete:y.func.isRequired,hasPermission:y.bool,roles:y.array,orgId:y.string};const Zs=W.div`
135
+ */var ye,He;function Ws(){if(He)return ye;He=1,ye=function(l){return l!=null&&(s(l)||n(l)||!!l._isBuffer)};function s(l){return!!l.constructor&&typeof l.constructor.isBuffer=="function"&&l.constructor.isBuffer(l)}function n(l){return typeof l.readFloatLE=="function"&&typeof l.slice=="function"&&s(l.slice(0,0))}return ye}var Ue;function Hs(){return Ue||(Ue=1,function(){var s=qs(),n=We().utf8,l=Ws(),p=We().bin,c=function(u,f){u.constructor==String?f&&f.encoding==="binary"?u=p.stringToBytes(u):u=n.stringToBytes(u):l(u)?u=Array.prototype.slice.call(u,0):!Array.isArray(u)&&u.constructor!==Uint8Array&&(u=u.toString());for(var a=s.bytesToWords(u),d=u.length*8,r=1732584193,o=-271733879,i=-1732584194,t=271733878,m=0;m<a.length;m++)a[m]=(a[m]<<8|a[m]>>>24)&16711935|(a[m]<<24|a[m]>>>8)&4278255360;a[d>>>5]|=128<<d%32,a[(d+64>>>9<<4)+14]=d;for(var j=c._ff,x=c._gg,h=c._hh,v=c._ii,m=0;m<a.length;m+=16){var C=r,w=o,T=i,D=t;r=j(r,o,i,t,a[m+0],7,-680876936),t=j(t,r,o,i,a[m+1],12,-389564586),i=j(i,t,r,o,a[m+2],17,606105819),o=j(o,i,t,r,a[m+3],22,-1044525330),r=j(r,o,i,t,a[m+4],7,-176418897),t=j(t,r,o,i,a[m+5],12,1200080426),i=j(i,t,r,o,a[m+6],17,-1473231341),o=j(o,i,t,r,a[m+7],22,-45705983),r=j(r,o,i,t,a[m+8],7,1770035416),t=j(t,r,o,i,a[m+9],12,-1958414417),i=j(i,t,r,o,a[m+10],17,-42063),o=j(o,i,t,r,a[m+11],22,-1990404162),r=j(r,o,i,t,a[m+12],7,1804603682),t=j(t,r,o,i,a[m+13],12,-40341101),i=j(i,t,r,o,a[m+14],17,-1502002290),o=j(o,i,t,r,a[m+15],22,1236535329),r=x(r,o,i,t,a[m+1],5,-165796510),t=x(t,r,o,i,a[m+6],9,-1069501632),i=x(i,t,r,o,a[m+11],14,643717713),o=x(o,i,t,r,a[m+0],20,-373897302),r=x(r,o,i,t,a[m+5],5,-701558691),t=x(t,r,o,i,a[m+10],9,38016083),i=x(i,t,r,o,a[m+15],14,-660478335),o=x(o,i,t,r,a[m+4],20,-405537848),r=x(r,o,i,t,a[m+9],5,568446438),t=x(t,r,o,i,a[m+14],9,-1019803690),i=x(i,t,r,o,a[m+3],14,-187363961),o=x(o,i,t,r,a[m+8],20,1163531501),r=x(r,o,i,t,a[m+13],5,-1444681467),t=x(t,r,o,i,a[m+2],9,-51403784),i=x(i,t,r,o,a[m+7],14,1735328473),o=x(o,i,t,r,a[m+12],20,-1926607734),r=h(r,o,i,t,a[m+5],4,-378558),t=h(t,r,o,i,a[m+8],11,-2022574463),i=h(i,t,r,o,a[m+11],16,1839030562),o=h(o,i,t,r,a[m+14],23,-35309556),r=h(r,o,i,t,a[m+1],4,-1530992060),t=h(t,r,o,i,a[m+4],11,1272893353),i=h(i,t,r,o,a[m+7],16,-155497632),o=h(o,i,t,r,a[m+10],23,-1094730640),r=h(r,o,i,t,a[m+13],4,681279174),t=h(t,r,o,i,a[m+0],11,-358537222),i=h(i,t,r,o,a[m+3],16,-722521979),o=h(o,i,t,r,a[m+6],23,76029189),r=h(r,o,i,t,a[m+9],4,-640364487),t=h(t,r,o,i,a[m+12],11,-421815835),i=h(i,t,r,o,a[m+15],16,530742520),o=h(o,i,t,r,a[m+2],23,-995338651),r=v(r,o,i,t,a[m+0],6,-198630844),t=v(t,r,o,i,a[m+7],10,1126891415),i=v(i,t,r,o,a[m+14],15,-1416354905),o=v(o,i,t,r,a[m+5],21,-57434055),r=v(r,o,i,t,a[m+12],6,1700485571),t=v(t,r,o,i,a[m+3],10,-1894986606),i=v(i,t,r,o,a[m+10],15,-1051523),o=v(o,i,t,r,a[m+1],21,-2054922799),r=v(r,o,i,t,a[m+8],6,1873313359),t=v(t,r,o,i,a[m+15],10,-30611744),i=v(i,t,r,o,a[m+6],15,-1560198380),o=v(o,i,t,r,a[m+13],21,1309151649),r=v(r,o,i,t,a[m+4],6,-145523070),t=v(t,r,o,i,a[m+11],10,-1120210379),i=v(i,t,r,o,a[m+2],15,718787259),o=v(o,i,t,r,a[m+9],21,-343485551),r=r+C>>>0,o=o+w>>>0,i=i+T>>>0,t=t+D>>>0}return s.endian([r,o,i,t])};c._ff=function(u,f,a,d,r,o,i){var t=u+(f&a|~f&d)+(r>>>0)+i;return(t<<o|t>>>32-o)+f},c._gg=function(u,f,a,d,r,o,i){var t=u+(f&d|a&~d)+(r>>>0)+i;return(t<<o|t>>>32-o)+f},c._hh=function(u,f,a,d,r,o,i){var t=u+(f^a^d)+(r>>>0)+i;return(t<<o|t>>>32-o)+f},c._ii=function(u,f,a,d,r,o,i){var t=u+(a^(f|~d))+(r>>>0)+i;return(t<<o|t>>>32-o)+f},c._blocksize=16,c._digestsize=16,xe.exports=function(u,f){if(u==null)throw new Error("Illegal argument "+u);var a=s.wordsToBytes(c(u,f));return f&&f.asBytes?a:f&&f.asString?p.bytesToString(a):s.bytesToHex(a)}}()),xe.exports}var Us=Hs();const Vs=Je(Us);function Ae({teamDid:s,onCancel:n,onSuccess:l,onError:p=()=>{},mode:c="create",item:u={},orgId:f=""}){const{api:a}=A(),[d,r]=b.useState(!1),[o,i]=b.useState(""),{t}=N(),[m,j]=b.useState(u.title||""),[x,h]=b.useState(u.description||""),[v,C]=b.useState(u?.extra?.display||"builtin"),[w,T]=b.useState(u?.extra?.types?u.extra.types.join(","):""),D=async()=>{const I=m.trim();if(!I){i(t("team.passport.error.titleEmpty"));return}if(I.length>64){i(t("team.passport.error.titleTooLong",{length:64}));return}const _=x.replace(/\n/g," ");if(!_){i(t("team.passport.error.descriptionEmpty"));return}const Z=c==="create"?Vs(f?`${f}-${I}`:I):u.name;i(null),r(!0);try{if(c==="create"){const $={teamDid:s,name:Z,title:I,description:_,...f?{orgId:f}:{}};v==="custom"&&($.extra=JSON.stringify({display:"custom",types:w.split(",")})),await a.createRole({input:$})}else{const $={teamDid:s,role:{name:Z,title:I,description:_},...f?{orgId:f}:{}};await a.updateRole({input:$})}l()}catch($){const ee=ne($);i(ee),p($)}finally{r(!1)}},L=e.jsxs("div",{children:[c==="update"&&e.jsx(F,{component:"div",style:{paddingTop:16},children:e.jsx(E,{label:"ID",autoComplete:"off",variant:"outlined",name:"url","data-cy":"mutate-role-input-name",fullWidth:!0,autoFocus:!0,value:u.name,disabled:!0})}),e.jsx(F,{component:"div",style:{marginTop:16},children:e.jsx(E,{label:t("common.title"),autoComplete:"off",variant:"outlined",name:"title","data-cy":"mutate-role-input-title",fullWidth:!0,autoFocus:!0,value:m,onChange:I=>{i(null),j(I.target.value)},disabled:c==="update"||d,helperText:t("team.passport.create.titleTip")})}),e.jsx(F,{component:"div",style:{marginTop:16,marginBottom:16},children:e.jsx(E,{label:t("common.description"),autoComplete:"off",variant:"outlined",name:"description","data-cy":"mutate-role-input-description",fullWidth:!0,autoFocus:!0,value:x,onChange:I=>{i(null),h(I.target.value)},disabled:d,multiline:!0,rows:3})}),c==="create"&&e.jsxs("div",{style:{marginBottom:16},children:[e.jsx(Xe,{children:t("common.display")}),e.jsxs(ot,{color:"primary",size:"small",value:v,exclusive:!0,style:{marginTop:16},disabled:d,onChange:(I,_)=>C(_),"data-cy":"input-role-display",children:[e.jsx(re,{value:"builtin","data-cy":"input-role-display-builtin",children:e.jsx(F,{children:t("team.passport.displayBuiltin")})}),e.jsx(re,{value:"custom","data-cy":"input-role-display-custom",children:e.jsx(F,{children:t("team.passport.displayCustom")})})]}),v==="custom"&&e.jsxs(e.Fragment,{children:[e.jsx(et,{fullWidth:!0,type:"text",style:{marginTop:16},"data-cy":"input-role-types",value:w,disabled:d,onChange:I=>{T(I.target.value)}}),e.jsx(tt,{children:t("team.passport.typesTip")})]})]})]});return e.jsxs(W,{title:c==="create"?t("team.passport.create.title"):"",fullWidth:!0,open:!0,onClose:n,showCloseButton:!1,actions:e.jsxs(e.Fragment,{children:[e.jsx(B,{onClick:n,color:"inherit",children:t("common.cancel")}),e.jsxs(B,{"data-cy":"mutate-role-confirm",onClick:D,color:"primary",disabled:d,variant:"contained",autoFocus:!0,children:[d&&e.jsx(O,{size:16}),t(c==="create"?"common.create":"common.update")]})]}),children:[e.jsx(Zt,{component:"div",children:L}),!!o&&e.jsx(Ke,{severity:"error",style:{width:"100%",margin:0},children:o})]})}Ae.propTypes={teamDid:y.string.isRequired,onCancel:y.func.isRequired,onSuccess:y.func.isRequired,onError:y.func,mode:y.oneOf(["create","update"]),item:y.object,orgId:y.string};function Ne({onCancel:s,onSuccess:n,onDelete:l,roleName:p,roles:c=void 0,hasPermission:u=!1,orgId:f=""}){const{api:a}=A(),{roles:d,permissions:r,teamDid:o,refresh:i,isNodeTeam:t}=M(),{t:m}=N(),[j,x]=b.useState([]),[h,v]=b.useState(!1),[C,w]=b.useState(null),[T,D]=b.useState(!1),L=b.useMemo(()=>c||d,[c,d]),I=J(L.find(R=>R.name===p)),_=st(p),Z=async R=>{if(!T)try{D(!0),await a.deleteRole({input:{teamDid:o,name:R}}),l()}catch(P){z.error(P.message)}finally{D(!1),w(null)}},$=async(R,P)=>{const zt=(await a.getPermissionsByRole({input:{teamDid:R,role:{name:P}}})).permissions||[],At=r.map(Fe=>({...Fe,bind:zt.some(Nt=>Nt.name===Fe.name)}));x(At)},ee=async()=>{D(!0);const R=j.filter(P=>P.bind).map(P=>P.name);try{await a.updatePermissionsForRole({input:{teamDid:o,roleName:I.name,grantNames:R}}),z.success(m("common.saveSuccess")),n()}catch(P){z.error(ne(P))}finally{D(!1)}};b.useEffect(()=>{o&&p&&$(o,p)},[o,p]);const S=t||!u;let k=null;return t&&(k=e.jsxs("div",{className:"bind",children:[e.jsx("div",{className:"title",children:m("common.permission")}),e.jsx("div",{className:"list",children:j.filter(R=>S?R.bind:!0).map(R=>e.jsx("div",{className:"item",children:e.jsx(Qt,{control:e.jsx(Jt,{disabled:S,checked:R.bind,onChange:()=>{x(P=>P.map(te=>(te.name===R.name&&(te.bind=!te.bind),te)))},name:R.name}),label:R.description})}))})]})),e.jsxs(W,{title:m("common.passport"),onClose:s,open:!0,fullWidth:!0,toolbar:u&&!_&&e.jsxs(e.Fragment,{children:[e.jsx(q,{onClick:()=>v(I),"data-cy":`edit-passport-${I.name}`,size:"large",children:e.jsx(pe,{fill:"#bfbfbf"})}),e.jsx(q,{onClick:()=>w({title:m("team.passport.delete.title"),description:m("team.passport.delete.description",{name:I.title}),confirm:m("common.delConfirm"),cancel:m("common.cancel"),onConfirm:()=>{Z(I.name)},onCancel:()=>{D(!1),w(null)}}),"data-cy":`delete-passport-${I.name}`,size:"large",children:e.jsx(ue,{"data-cy":"close-passport-dialog",fill:"#bfbfbf"})})]}),actions:t&&!S&&e.jsxs(e.Fragment,{children:[e.jsx(B,{onClick:s,color:"inherit",children:m("common.cancel")}),e.jsxs(B,{onClick:ee,color:"primary",disabled:T||!I,variant:"contained",autoFocus:!0,"data-cy":"bind-permission-btn-confirm",children:[T&&e.jsx(O,{size:16}),m("common.save")]})]}),children:[e.jsxs(Zs,{children:[!I&&e.jsx(Qs,{children:e.jsx(O,{})}),I&&e.jsxs("div",{className:"dialog-content",children:[e.jsxs("div",{className:"header",children:[e.jsx("div",{className:"title",children:I.title}),e.jsx("div",{className:"description",style:{marginTop:t?16:48},children:I.description})]}),k]})]}),h&&e.jsx(Ae,{teamDid:o,onCancel:()=>v(null),onSuccess:()=>{v(null),f?n():i()},mode:"update",roleName:h.name,item:h,orgId:f}),C&&e.jsx(Se,{title:C.title,description:C.description,confirm:C.confirm,cancel:C.cancel,params:C.params,onConfirm:C.onConfirm,onCancel:C.onCancel})]})}const Gs=Y(Ne,"mutate_team"),Ys=Y(Ne,"",X);function Ks(s){const{inService:n}=A();return n?e.jsx(Ys,{...s}):e.jsx(Gs,{...s})}Ne.propTypes={roleName:y.string.isRequired,onCancel:y.func.isRequired,onSuccess:y.func.isRequired,onDelete:y.func.isRequired,hasPermission:y.bool,roles:y.array,orgId:y.string};const Zs=H.div`
136
136
  .header {
137
137
  .title {
138
138
  font-weight: 400;
@@ -175,13 +175,13 @@ import{aF as G,j as e,r as b,aW as V,cB as Le,T as F,N as K,o as y,V as N,bf as
175
175
  padding-right: 12px;
176
176
  }
177
177
  }
178
- `,Js=W.div`
178
+ `,Qs=H.div`
179
179
  flex: 1;
180
180
  display: flex;
181
181
  justify-content: center;
182
182
  align-items: center;
183
183
  height: 200px;
184
- `,Ve=b.memo(({field:s,value:n,copyable:l})=>{const{local:p}=N();return n?e.jsxs(g,{onClick:c=>c.stopPropagation(),sx:{display:"flex",alignItems:"center",gap:1},children:[s?e.jsxs(Me,{variant:"subtitle1",color:"textSecondary",sx:{width:50,textAlign:"right"},children:[s,":"]}):null,e.jsx(Me,{variant:"body1",children:e.jsxs(g,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(K,{title:n,children:e.jsx("span",{className:"value-ellipsis",children:n})}),l?e.jsx(ts,{content:ss(n),locale:p,style:{marginLeft:"4px",color:"#999",fontSize:"0.8em",verticalAlign:"bottom"}}):null]})})]}):null}),Qs=b.memo(({role:s={},createPassportSvg:n,onUpdate:l,passportProps:p={},actions:c=null})=>{const{inService:u}=A(),f=es(d=>d.breakpoints.down("md")),a=b.useMemo(()=>s.name&&!U.ROLES[s.name.toUpperCase()],[s]);return e.jsxs(g,{"data-cy":`passport-${s.name}`,className:"item",onClick:()=>l(s),sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsxs(g,{sx:{display:"flex",alignItems:"center"},children:[e.jsx("div",{style:{width:150},dangerouslySetInnerHTML:{__html:n({title:s.title,ownerName:"Your Name",width:"150px",...p})}}),e.jsxs(g,{className:"title",sx:{ml:3},children:[e.jsx(Ve,{value:s.title}),a?e.jsx(Ve,{value:s.name,copyable:!0}):null]})]}),!f&&e.jsx(g,{className:"description",children:s.description}),c||e.jsx(rt,{permission:u?"":"mutate_team",role:u?X:[],children:e.jsx("div",{className:"action",children:st(s.name)?e.jsx(ps,{}):e.jsx(pe,{})})})]},s.name)});function Rt({createPassportSvg:s}){const{roles:n,teamIssuerDid:l,teamName:p,refresh:c,passportColor:u,teamDid:f,isNodeTeam:a}=M(),{t:d}=N(),[r,o]=b.useState(!1),[i,t]=b.useState(!1);return e.jsxs(Xs,{sx:{mt:0},children:[e.jsx(g,{sx:{display:"flex",justifyContent:"flex-end"},children:!a&&e.jsxs(Xt,{variant:"contained",edge:"end",color:"primary","data-cy":"create-role",onClick:()=>o(!0),children:[e.jsx(Te,{style:{fontSize:16,marginRight:4}}),d("team.passport.create.title")]})}),e.jsx(g,{className:"list",children:n.map(m=>e.jsx(Qs,{role:m,createPassportSvg:s,onUpdate:t,passportProps:{issuer:p,issuerDid:l,ownerDid:l,preferredColor:u}}))}),i&&e.jsx(Ks,{onCancel:()=>t(!1),onSuccess:()=>{t(!1),c()},onDelete:()=>{t(!1),c()},mode:"update",roleName:i.name,item:i}),r&&e.jsx(Ae,{teamDid:f,onCancel:()=>o(!1),onSuccess:()=>{o(!1),c()}})]})}const Xs=W(g)`
184
+ `,Ve=b.memo(({field:s,value:n,copyable:l})=>{const{local:p}=N();return n?e.jsxs(g,{onClick:c=>c.stopPropagation(),sx:{display:"flex",alignItems:"center",gap:1},children:[s?e.jsxs(Me,{variant:"subtitle1",color:"textSecondary",sx:{width:50,textAlign:"right"},children:[s,":"]}):null,e.jsx(Me,{variant:"body1",children:e.jsxs(g,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(K,{title:n,children:e.jsx("span",{className:"value-ellipsis",children:n})}),l?e.jsx(ts,{content:ss(n),locale:p,style:{marginLeft:"4px",color:"#999",fontSize:"0.8em",verticalAlign:"bottom"}}):null]})})]}):null}),Js=b.memo(({role:s={},createPassportSvg:n,onUpdate:l,passportProps:p={},actions:c=null})=>{const{inService:u}=A(),f=es(d=>d.breakpoints.down("md")),a=b.useMemo(()=>s.name&&!U.ROLES[s.name.toUpperCase()],[s]);return e.jsxs(g,{"data-cy":`passport-${s.name}`,className:"item",onClick:()=>l(s),sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsxs(g,{sx:{display:"flex",alignItems:"center"},children:[e.jsx("div",{style:{width:150},dangerouslySetInnerHTML:{__html:n({title:s.title,ownerName:"Your Name",width:"150px",...p})}}),e.jsxs(g,{className:"title",sx:{ml:3},children:[e.jsx(Ve,{value:s.title}),a?e.jsx(Ve,{value:s.name,copyable:!0}):null]})]}),!f&&e.jsx(g,{className:"description",children:s.description}),c||e.jsx(rt,{permission:u?"":"mutate_team",role:u?X:[],children:e.jsx("div",{className:"action",children:st(s.name)?e.jsx(ps,{}):e.jsx(pe,{})})})]},s.name)});function Rt({createPassportSvg:s}){const{roles:n,teamIssuerDid:l,teamName:p,refresh:c,passportColor:u,teamDid:f,isNodeTeam:a}=M(),{t:d}=N(),[r,o]=b.useState(!1),[i,t]=b.useState(!1);return e.jsxs(Xs,{sx:{mt:0},children:[e.jsx(g,{sx:{display:"flex",justifyContent:"flex-end"},children:!a&&e.jsxs(Xt,{variant:"contained",edge:"end",color:"primary","data-cy":"create-role",onClick:()=>o(!0),children:[e.jsx(Te,{style:{fontSize:16,marginRight:4}}),d("team.passport.create.title")]})}),e.jsx(g,{className:"list",children:n.map(m=>e.jsx(Js,{role:m,createPassportSvg:s,onUpdate:t,passportProps:{issuer:p,issuerDid:l,ownerDid:l,preferredColor:u}}))}),i&&e.jsx(Ks,{onCancel:()=>t(!1),onSuccess:()=>{t(!1),c()},onDelete:()=>{t(!1),c()},mode:"update",roleName:i.name,item:i}),r&&e.jsx(Ae,{teamDid:f,onCancel:()=>o(!1),onSuccess:()=>{o(!1),c()}})]})}const Xs=H(g)`
185
185
  .list {
186
186
  .item {
187
187
  padding: 12px;
@@ -219,7 +219,7 @@ import{aF as G,j as e,r as b,aW as V,cB as Le,T as F,N as K,o as y,V as N,bf as
219
219
  fill: ${({theme:s})=>s.palette.text.secondary};
220
220
  }
221
221
  }
222
- `;Rt.propTypes={createPassportSvg:y.func.isRequired};function Dt({createPassportSvg:s}){const{t:n}=N(),{api:l,inService:p}=A(),{teamDid:c,refresh:u,enablePassportIssuance:f,isNodeTeam:a}=M(),[d,r]=b.useState(!1),[o,i]=b.useState(!1),[t,m]=b.useState(!1),[j,x]=b.useState(!1),[h,v]=b.useState(!1),C=async w=>{if(w.stopPropagation(),!j){x(!0);try{await l.configPassportIssuance({input:{teamDid:c,enable:!f}}),u(),await ae(800),z.success(n("common.configSuccess"))}catch(T){z.error(T.message)}finally{x(!1)}}};return e.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:1,ml:1},children:[e.jsx(rt,{permission:p?"":"mutate_team",role:p?X:[],children:e.jsx(se,{variant:"outlined",menuButtonProps:{"data-cy":"trusted-issuers-more"},menu:e.jsxs(e.Fragment,{children:[e.jsx(se.Item,{onClick:()=>i(!0),"data-cy":"config-trusted-issuers",children:e.jsxs(g,{children:[n("team.passport.trustedPassportIssuers"),e.jsx(g,{sx:{fontSize:12,color:"#888"},children:n("team.passport.trustedPassportIssuersTip")})]})}),e.jsx(se.Item,{onClick:()=>m(!0),"data-cy":"config-show-trusted-factories",children:e.jsxs(g,{children:[n("team.passport.configFactories"),e.jsx(g,{sx:{fontSize:12,color:"#888"},children:n("team.passport.configFactoriesTip")})]})}),e.jsx(se.Item,{"data-cy":"config-show-issue-passport",onClick:C,children:e.jsxs(g,{sx:{display:"flex",alignItems:"center"},children:[j&&e.jsx(O,{size:16,style:{marginRight:8}}),e.jsxs(g,{children:[n(f?"team.passport.disableIssuance":"team.passport.enableIssuance"),e.jsx(g,{sx:{fontSize:12,color:"#888"},children:n(f?"team.passport.disableIssuanceTip":"team.passport.enableIssuanceTip")})]})]})}),!a&&e.jsx(se.Item,{onClick:()=>r(!0),"data-cy":"config-passport-color",children:e.jsxs(g,{children:[n("team.passport.configColor"),e.jsx(g,{sx:{fontSize:12,color:"#888"},children:n("team.passport.configColorTip")})]})})]}),children:()=>e.jsx(B,{variant:"outlined",onClick:()=>{v(!0)},children:n("team.passport.view")})})}),o&&e.jsx(Fs,{onCancel:()=>i(!1)}),t&&e.jsx(Es,{onCancel:()=>m(!1)}),d&&e.jsx(ks,{onCancel:()=>r(!1),onSuccess:()=>r(!1)}),h&&e.jsx(H,{open:!0,maxWidth:"lg",onClose:()=>v(!1),onBackdropClick:()=>v(!1),onEscapeKeyDown:()=>v(!1),title:n("team.passport.view"),children:e.jsx(Rt,{createPassportSvg:s,onCancel:()=>v(!1)})})]})}Dt.propTypes={createPassportSvg:y.func.isRequired};const Ge="$all",Ye="",kt=ie.memo(({createPassportSvg:s,passport:n,teamDid:l,inService:p})=>e.jsx(g,{sx:{display:"flex"},dangerouslySetInnerHTML:{__html:s({scope:n.scope,role:n.role,title:n.scope==="kyc"?n.name:n.title,issuer:n.issuer&&n.issuer.name,issuerDid:n.issuer&&n.issuer.id,ownerName:n.user?.fullName,ownerDid:n.user?.did,ownerAvatarUrl:n.user?.avatar?be(n.user?.avatar,l,p):"",revoked:n.revoked,width:"36px",extra:n?.expirationDate?{key:"Exp",value:Ze(n.expirationDate).format("YYYY-MM-DD HH:mm:ss")}:null})}}));kt.propTypes={passport:y.object.isRequired,createPassportSvg:y.func.isRequired,teamDid:y.string.isRequired,inService:y.bool.isRequired};function Pt({createPassportSvg:s}){const{api:n}=A(),{teamDid:l}=M(),{t:p,locale:c}=N(),{SYSTEM_ROLES:u}=dt(),{inService:f}=A(),[a,d]=b.useState(!1),r=`passports-${l}`,o=ns(r),[i,t]=b.useState({role:Ge,status:Ye,searchText:o.searchText||"",pageSize:o.rowsPerPage||10,page:o.page?o.page+1:1}),{data:m,loading:j}=le(async()=>(await n.getPassportRoleCounts({input:{teamDid:l}})).counts||[],{refreshDeps:[l]}),{data:x,loading:h}=le(async()=>{const S={};i.role!==Ge&&(S.role=i.role),i.status&&(S.status=i.status);const k=await n.getPassportsByRole({input:{teamDid:l,query:S,paging:{page:i.page,pageSize:i.pageSize}}});return{passports:k.passports||[],total:k.paging.total}},{refreshDeps:[i.role,i.status,i.page,i.pageSize],onError:S=>z.error(S.message)}),v=S=>m?.find(R=>R.key===S)?.value||0,C=b.useMemo(()=>Object.keys(u).map(S=>({name:S,title:u[S],num:v(S)})),[m,v]),w=b.useMemo(()=>[{label:p("team.passport.role"),name:"role",options:{customBodyRender:(S,{rowIndex:k})=>{const R=x?.passports[k];return e.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(kt,{createPassportSvg:s,passport:R,teamDid:l}),e.jsx(g,{children:Ie(R.title)})]})}}},{label:p("team.passport.owner"),name:"user",options:{customBodyRender:S=>De(S,f)}},{label:p("team.passport.status"),name:"status",options:{customBodyRender:Re}},{label:p("team.member.lastLogin"),name:"lastLoginAt",options:{customBodyRender:S=>gt(S,c)}},{label:p("common.address"),name:"id",options:{customBodyRender:Ss}},{label:p("blocklet.overview.source"),name:"source",options:{customBodyRender:(S,{rowIndex:k})=>{const R=x?.passports[k];return R.parentDid?de("recover"):de(R.source)}}}],[p,c,x?.passports,l,s,f]),T=S=>{t(k=>({...k,role:S,page:1}))},D=({page:S,rowsPerPage:k,searchText:R})=>{i.pageSize!==k?t(P=>({...P,searchText:"",pageSize:k,page:1})):i.page!==S+1?t(P=>({...P,searchText:"",page:S+1})):i.searchText!==R&&t(P=>({...P,searchText:R,page:1}))},L=b.useRef(null),I=x?.passports||[],_=i.searchText?I.filter(S=>S.id.includes(i.searchText)||(S?.user?.fullName||"").includes(i.searchText)):I,Z={sort:!1,download:!1,filter:!1,print:!1,viewColumns:!1,onRowClick(S,{dataIndex:k},R){if(L.current?.contains(R.target)){const P=x?.passports[k];d(P)}},page:i.page-1,rowsPerPage:i.pageSize,count:x?.total||0,searchDebounceTime:600},$=S=>{t(k=>({...k,status:S.target.value,page:1}))},ee=e.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsxs(g,{sx:{fontSize:16,fontWeight:400},children:[p("team.passport.status"),":"]}),e.jsxs(rs,{size:"small",value:i.status,onChange:$,displayEmpty:!0,sx:{minWidth:120,height:36,".MuiSelect-select":{py:.5,px:1.5}},children:[e.jsx(ce,{value:Ye,children:p("common.all")}),Object.values(U.PASSPORT_STATUS).map(S=>e.jsx(ce,{value:S,sx:{py:1},children:p(`team.passport.statusMap.${S}`)},S))]})]});return j?e.jsx(g,{sx:{py:2},children:e.jsx(V,{direction:"row",spacing:1,sx:{justifyContent:"center",alignItems:"center",position:"relative",pb:2},children:e.jsx(O,{})})}):e.jsxs(er,{children:[e.jsxs(g,{className:"main",sx:{display:"flex",mt:0,gap:3},children:[e.jsx(g,{className:"left",children:e.jsx(g,{className:"tabs",children:C.map(S=>e.jsxs(g,{className:`tab ${i.role===S.name?"active":""}`,onClick:()=>T(S.name),children:[e.jsx("span",{className:"text",children:S.title}),e.jsx(g,{sx:{color:"text.secondary"},children:S.num})]},S.name))})}),e.jsx(g,{ref:L,className:"right",children:e.jsx(we,{className:"main-table",verticalKeyWidth:100,locale:c,durable:r,durableKeys:["page","rowsPerPage"],data:_,columns:w,options:Z,loading:h,onChange:D,customButtons:[e.jsx(Dt,{createPassportSvg:s})],title:ee})})]}),a&&e.jsx(yt,{createPassportSvg:s,onCancel:()=>d(null),passport:a,onSwitchPassport:d})]})}Pt.propTypes={createPassportSvg:y.func.isRequired};const er=je(g)`
222
+ `;Rt.propTypes={createPassportSvg:y.func.isRequired};function Dt({createPassportSvg:s}){const{t:n}=N(),{api:l,inService:p}=A(),{teamDid:c,refresh:u,enablePassportIssuance:f,isNodeTeam:a}=M(),[d,r]=b.useState(!1),[o,i]=b.useState(!1),[t,m]=b.useState(!1),[j,x]=b.useState(!1),[h,v]=b.useState(!1),C=async w=>{if(w.stopPropagation(),!j){x(!0);try{await l.configPassportIssuance({input:{teamDid:c,enable:!f}}),u(),await ae(800),z.success(n("common.configSuccess"))}catch(T){z.error(T.message)}finally{x(!1)}}};return e.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:1,ml:1},children:[e.jsx(rt,{permission:p?"":"mutate_team",role:p?X:[],children:e.jsx(se,{variant:"outlined",menuButtonProps:{"data-cy":"trusted-issuers-more"},menu:e.jsxs(e.Fragment,{children:[e.jsx(se.Item,{onClick:()=>i(!0),"data-cy":"config-trusted-issuers",children:e.jsxs(g,{children:[n("team.passport.trustedPassportIssuers"),e.jsx(g,{sx:{fontSize:12,color:"#888"},children:n("team.passport.trustedPassportIssuersTip")})]})}),e.jsx(se.Item,{onClick:()=>m(!0),"data-cy":"config-show-trusted-factories",children:e.jsxs(g,{children:[n("team.passport.configFactories"),e.jsx(g,{sx:{fontSize:12,color:"#888"},children:n("team.passport.configFactoriesTip")})]})}),e.jsx(se.Item,{"data-cy":"config-show-issue-passport",onClick:C,children:e.jsxs(g,{sx:{display:"flex",alignItems:"center"},children:[j&&e.jsx(O,{size:16,style:{marginRight:8}}),e.jsxs(g,{children:[n(f?"team.passport.disableIssuance":"team.passport.enableIssuance"),e.jsx(g,{sx:{fontSize:12,color:"#888"},children:n(f?"team.passport.disableIssuanceTip":"team.passport.enableIssuanceTip")})]})]})}),!a&&e.jsx(se.Item,{onClick:()=>r(!0),"data-cy":"config-passport-color",children:e.jsxs(g,{children:[n("team.passport.configColor"),e.jsx(g,{sx:{fontSize:12,color:"#888"},children:n("team.passport.configColorTip")})]})})]}),children:()=>e.jsx(B,{variant:"outlined",onClick:()=>{v(!0)},children:n("team.passport.view")})})}),o&&e.jsx(Fs,{onCancel:()=>i(!1)}),t&&e.jsx(Es,{onCancel:()=>m(!1)}),d&&e.jsx(ks,{onCancel:()=>r(!1),onSuccess:()=>r(!1)}),h&&e.jsx(W,{open:!0,maxWidth:"lg",onClose:()=>v(!1),onBackdropClick:()=>v(!1),onEscapeKeyDown:()=>v(!1),title:n("team.passport.view"),children:e.jsx(Rt,{createPassportSvg:s,onCancel:()=>v(!1)})})]})}Dt.propTypes={createPassportSvg:y.func.isRequired};const Ge="$all",Ye="",kt=ie.memo(({createPassportSvg:s,passport:n,teamDid:l,inService:p})=>e.jsx(g,{sx:{display:"flex"},dangerouslySetInnerHTML:{__html:s({scope:n.scope,role:n.role,title:n.scope==="kyc"?n.name:n.title,issuer:n.issuer&&n.issuer.name,issuerDid:n.issuer&&n.issuer.id,ownerName:n.user?.fullName,ownerDid:n.user?.did,ownerAvatarUrl:n.user?.avatar?be(n.user?.avatar,l,p):"",revoked:n.revoked,width:"36px",extra:n?.expirationDate?{key:"Exp",value:Ze(n.expirationDate).format("YYYY-MM-DD HH:mm:ss")}:null})}}));kt.propTypes={passport:y.object.isRequired,createPassportSvg:y.func.isRequired,teamDid:y.string.isRequired,inService:y.bool.isRequired};function Pt({createPassportSvg:s}){const{api:n}=A(),{teamDid:l}=M(),{t:p,locale:c}=N(),{SYSTEM_ROLES:u}=dt(),{inService:f}=A(),[a,d]=b.useState(!1),r=`passports-${l}`,o=ns(r),[i,t]=b.useState({role:Ge,status:Ye,searchText:o.searchText||"",pageSize:o.rowsPerPage||10,page:o.page?o.page+1:1}),{data:m,loading:j}=le(async()=>(await n.getPassportRoleCounts({input:{teamDid:l}})).counts||[],{refreshDeps:[l]}),{data:x,loading:h}=le(async()=>{const S={};i.role!==Ge&&(S.role=i.role),i.status&&(S.status=i.status);const k=await n.getPassportsByRole({input:{teamDid:l,query:S,paging:{page:i.page,pageSize:i.pageSize}}});return{passports:k.passports||[],total:k.paging.total}},{refreshDeps:[i.role,i.status,i.page,i.pageSize],onError:S=>z.error(S.message)}),v=S=>m?.find(R=>R.key===S)?.value||0,C=b.useMemo(()=>Object.keys(u).map(S=>({name:S,title:u[S],num:v(S)})),[m,v]),w=b.useMemo(()=>[{label:p("team.passport.role"),name:"role",options:{customBodyRender:(S,{rowIndex:k})=>{const R=x?.passports[k];return e.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(kt,{createPassportSvg:s,passport:R,teamDid:l}),e.jsx(g,{children:Ie(R.title)})]})}}},{label:p("team.passport.owner"),name:"user",options:{customBodyRender:S=>De(S,f)}},{label:p("team.passport.status"),name:"status",options:{customBodyRender:Re}},{label:p("team.member.lastLogin"),name:"lastLoginAt",options:{customBodyRender:S=>gt(S,c)}},{label:p("common.address"),name:"id",options:{customBodyRender:Ss}},{label:p("blocklet.overview.source"),name:"source",options:{customBodyRender:(S,{rowIndex:k})=>{const R=x?.passports[k];return R.parentDid?de("recover"):de(R.source)}}}],[p,c,x?.passports,l,s,f]),T=S=>{t(k=>({...k,role:S,page:1}))},D=({page:S,rowsPerPage:k,searchText:R})=>{i.pageSize!==k?t(P=>({...P,searchText:"",pageSize:k,page:1})):i.page!==S+1?t(P=>({...P,searchText:"",page:S+1})):i.searchText!==R&&t(P=>({...P,searchText:R,page:1}))},L=b.useRef(null),I=x?.passports||[],_=i.searchText?I.filter(S=>S.id.includes(i.searchText)||(S?.user?.fullName||"").includes(i.searchText)):I,Z={sort:!1,download:!1,filter:!1,print:!1,viewColumns:!1,onRowClick(S,{dataIndex:k},R){if(L.current?.contains(R.target)){const P=x?.passports[k];d(P)}},page:i.page-1,rowsPerPage:i.pageSize,count:x?.total||0,searchDebounceTime:600},$=S=>{t(k=>({...k,status:S.target.value,page:1}))},ee=e.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsxs(g,{sx:{fontSize:16,fontWeight:400},children:[p("team.passport.status"),":"]}),e.jsxs(rs,{size:"small",value:i.status,onChange:$,displayEmpty:!0,sx:{minWidth:120,height:36,".MuiSelect-select":{py:.5,px:1.5}},children:[e.jsx(ce,{value:Ye,children:p("common.all")}),Object.values(U.PASSPORT_STATUS).map(S=>e.jsx(ce,{value:S,sx:{py:1},children:p(`team.passport.statusMap.${S}`)},S))]})]});return j?e.jsx(g,{sx:{py:2},children:e.jsx(V,{direction:"row",spacing:1,sx:{justifyContent:"center",alignItems:"center",position:"relative",pb:2},children:e.jsx(O,{})})}):e.jsxs(er,{children:[e.jsxs(g,{className:"main",sx:{display:"flex",mt:0,gap:3},children:[e.jsx(g,{className:"left",children:e.jsx(g,{className:"tabs",children:C.map(S=>e.jsxs(g,{className:`tab ${i.role===S.name?"active":""}`,onClick:()=>T(S.name),children:[e.jsx("span",{className:"text",children:S.title}),e.jsx(g,{sx:{color:"text.secondary"},children:S.num})]},S.name))})}),e.jsx(g,{ref:L,className:"right",children:e.jsx(we,{className:"main-table",verticalKeyWidth:100,locale:c,durable:r,durableKeys:["page","rowsPerPage"],data:_,columns:w,options:Z,loading:h,onChange:D,customButtons:[e.jsx(Dt,{createPassportSvg:s})],title:ee})})]}),a&&e.jsx(yt,{createPassportSvg:s,onCancel:()=>d(null),passport:a,onSwitchPassport:d})]})}Pt.propTypes={createPassportSvg:y.func.isRequired};const er=je(g)`
223
223
  .main {
224
224
  .left {
225
225
  width: 256px;
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DJ9zSKl1.js","./index-BojVbZw0.js","./index-jT3H-jhB.js","./metric-DpvjSsZq.js","./CardContent-C16B5Bpa.js","./click-to-copy-DjkhfhsV.js","./index-CKHOafPq.js","./useLocalStorage-41az-hAK.js","./ErrorOutline-By74cLGJ.js","./index-IWOqJkOB.js","./FilterList-Czj4Os71.js","./CSSTransition-BcU1vShi.js","./emotion-cache.browser.esm-D1-P5QGD.js","./index-CR1U7OM5.js","./redux-DfszZyTl.js","./typeof-QjJsDpFa.js","./depsEqual-LiU_ATMs.js","./TableSearch-CKjIHAce.js","./Search-CApGhXwm.js","./Clear-L4-iFi83.js","./MoreVert-DaM6pG5s.js","./status-B_ZSV6JY.js","./actions-BCMsejAj.js","./DeleteOutline-CDxyWfLx.js","./get-safe-url-DDm_hPj1.js","./ButtonGroup-Um1mBtyg.js","./getValidReactChildren-DpcxJbs9.js","./url-evaluation-Cf4MPEtF.js","./permission-DTFazP7s.js","./install-from-url-BXftFn4t.js","./without-wallet-rfYvx_29.js","./index-BLI3C2o7.js","./cloneDeep-Bl8wZyrm.js","./Delete-DVp4fJb1.js","./Autocomplete-6CVDh-bw.js","./ListSubheader-C-Lxj5FB.js","./ListItemButton-KbcDtzXD.js","./Stepper-B2_oAcOZ.js","./Launch-l1uaKrAG.js","./Add-DBDPvM2L.js","./index-CypG4Dbq.js","./schema-BKPaewSy.js","./index-CQogNORn.js","./toLower-62VYhzjn.js","./index-Ci1hoD9j.js","./url-join-P8kMCiOB.js","./wait-container-GLOlfScg.js","./use-mobile-BnTDQjTV.js","./spaces-YFYDpL5l.js","./api-DDSUcMPT.js","./index-DjQqmpzQ.js","./item-C1JxTPT2.js","./index-DdYx-VNK.js","./KeyboardArrowDown-C53dgTNk.js","./ChevronLeft-Ds4qWfjb.js","./ChevronRight-BFqUOmvp.js","./blocklet-Nw4kpsVs.js","./Verified-QiB22jgm.js","./VerifiedUser-kPobsDlg.js","./Done-D7TYY_5X.js","./delete-confirm-DCHvoTQs.js","./item-G0iZE90Q.css","./engine-D8Acg7DY.js","./ArrowDropDown-CqYw-eY9.js","./Breadcrumbs-CIhr-IBH.js","./index-2VA5XrmO.js","./html-title-D3mv3IQk.js","./index.esm-Zck39Kvz.js","./switch-control-Fq47wOrt.js","./Link-Bs8vi6ND.js","./actions-Dp-VL6XB.js","./logo-BKA11TRi.js","./Refresh-BJnu5a0L.js","./LoadingButton-CZNIV9Ok.js","./rotate-session-key-Bz5QE7gB.js","./visuallyHidden-Dan1xhjv.js","./is-path-prefix-equal-BJMXSv43.js","./Edit-DYn1CF5Y.js","./CallMerge-CqN4JiFM.js","./index-BQNKAwfZ.js","./download-DHuOHOVu.js","./index-KI2LGzUW.js","./audit-logs-bPLYn_cc.js","./index-DQItZ4UM.js","./decode-DPztD6kB.js","./index-gnjjKJuC.css","./UnfoldMore-D2Y42T3n.js","./shorten-label-BR48Ofqe.js","./team-DKJfzzKD.js","./index-DT5BIL2_.js","./ViewList-Ceb1JHIv.js","./Google-DZPfsfDE.js","./AdapterDayjs-BBi3P2IC.js","./useThemeProps-Cw6i_sME.js","./index-z-tbDeE3.js","./sdk-CXClyXm7.js","./ua-parser-DP5omx3I.js","./index-Dtkcfmzb.js","./edit.svg-D0_FvYeH.js","./list-header-BZRIF_iO.js","./chain-WdOor_5_.js","./ToggleButtonGroup-t3tLzS74.js","./lock.svg-Ba4McgFD.js","./useAsyncRetry-BQEwzyM4.js","./useAsync-SwSlukzF.js","./index-ZgkIHsf0.css","./detail-B-lIb4O1.js","./index-kRFEBldM.js","./index-BPuMob2k.js","./invitation-4F28SRYz.js","./wrap-locale-C-Q-ES8F.js","./index-WbuPRmjd.js","./index-CADLzzXJ.js","./index-CQYzPG_n.js","./index-CaDcvTD7.js","./agreement-Bun3wUY-.js","./index-D0-rZXcm.js","./index-BxX_nqnW.js","./index-CAA1AdyJ.js","./traffic-Dh_MwZxy.js","./iframe-Dt-xbP5x.js","./index-DBii9-f-.js","./base-chart-BZha7l7D.js","./index-B0O0JwRT.js","./index-DRYJ0xIl.js","./memory-B2j_d87p.js","./index-Be8ehpQE.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-ZCO60mrW.js","./index-BojVbZw0.js","./index-DAMZQWKn.js","./metric-Q_9BNbHj.js","./CardContent-C5NwNVow.js","./click-to-copy-CcQkmf0B.js","./index-D2gNdot7.js","./useLocalStorage-DjnxkTrj.js","./ErrorOutline-B0v25XAB.js","./index-CNVrqxCI.js","./FilterList-Be5ZzrNM.js","./CSSTransition-R4tGAk7r.js","./emotion-cache.browser.esm-DyzCXqsA.js","./index-DWm5KlVP.js","./redux-DfszZyTl.js","./typeof-QjJsDpFa.js","./depsEqual-BF3eoqLy.js","./TableSearch-BFj05c9C.js","./Search-BwAHZ5GK.js","./Clear-siFOH-um.js","./MoreVert-BOGr0n7e.js","./status-CW0QYGeF.js","./actions-CDHomwcW.js","./DeleteOutline-BiwjsR6p.js","./get-safe-url-HOLWsAs0.js","./ButtonGroup-CiscHb2s.js","./getValidReactChildren-Ck9KmKnh.js","./url-evaluation-DMCBEvQj.js","./permission-B8q324ya.js","./install-from-url-B0gehZWB.js","./without-wallet-D2bQnWJt.js","./index-BGcMePQ8.js","./cloneDeep-B3VWXnFc.js","./Delete-8zGU1uok.js","./Autocomplete-DQwU_oez.js","./ListSubheader-I1pRAfr2.js","./ListItemButton-C9pXyehQ.js","./Stepper-Bn1MKAsJ.js","./Launch-BiV6tbTp.js","./Add-BqehlncY.js","./index-D93jIJAg.js","./schema-DC2ou5i0.js","./index-C8Yc1xhR.js","./toLower-CXuGXHcC.js","./index-CH_WzJ6f.js","./url-join-DoFkjCNr.js","./wait-container-BPFMrDUL.js","./use-mobile-BGG1Yti5.js","./spaces-DBXblECR.js","./api-CSBvUv9A.js","./index-DVOJBn33.js","./item-Bojg28Ma.js","./index-DBJqSNjU.js","./KeyboardArrowDown-DdCuxSq1.js","./ChevronLeft-BaZj3l6K.js","./ChevronRight-CpLm1bKY.js","./blocklet-D4otp8nH.js","./Verified-CWEd1DVE.js","./VerifiedUser-CigB8Fdv.js","./Done-DzBppTPg.js","./delete-confirm-DfVCfmx_.js","./item-G0iZE90Q.css","./engine-KybwGdMh.js","./ArrowDropDown-Cc-RKnnq.js","./Breadcrumbs-DWjoGi7V.js","./index-Cs8W6nmK.js","./html-title-CifiMfjt.js","./index.esm-B06DCVM7.js","./switch-control-Bzy_oqas.js","./Link-Cogxu9aB.js","./actions-GoWYDb6F.js","./logo-BKA11TRi.js","./Refresh-EilcFp8b.js","./LoadingButton-BCz99YbN.js","./rotate-session-key-BFiVoa6I.js","./visuallyHidden-Dan1xhjv.js","./is-path-prefix-equal-Dr7EUhi7.js","./Edit-CKpLr219.js","./CallMerge-BeazH3jg.js","./index-DN9WepcN.js","./download-scJq5nd3.js","./index-DidKpbc0.js","./audit-logs-CpckHt6s.js","./index-b78VjA-Y.js","./decode-DPztD6kB.js","./index-gnjjKJuC.css","./UnfoldMore-DVoycFqc.js","./shorten-label-CybgQDYs.js","./team-DLwXXgYX.js","./index-CXTibO7-.js","./ViewList-D7TqVQ4P.js","./Google-BB2TEIzp.js","./AdapterDayjs-D4yhIBjp.js","./useThemeProps-CFIloaX5.js","./index-DyIPXbau.js","./sdk-DZJdUnPV.js","./ua-parser-DP5omx3I.js","./index-Ci0V4E2u.js","./edit.svg-BgAMrWjM.js","./list-header-D5a_5edu.js","./chain-CfwM2JWo.js","./ToggleButtonGroup-npFh1mr6.js","./lock.svg-Bnm1mppT.js","./useAsyncRetry-CLcTront.js","./useAsync-ByRujkOO.js","./index-ZgkIHsf0.css","./detail-DYfAWDl1.js","./index-rsjiYKAZ.js","./index-DhXU_Vz9.js","./invitation-DjNwS-Ha.js","./wrap-locale-BbIFvnmJ.js","./index-CIAqUMHH.js","./index-OtVuze_0.js","./index-D57ncOaj.js","./index-BnXKKyQZ.js","./agreement-BhNIuQec.js","./index-CGzi7zV_.js","./index-nvPO7sCa.js","./index-BPA__Xw6.js","./traffic-DSdpsMku.js","./iframe-Dq0hkTrq.js","./index-DBii9-f-.js","./base-chart-CxDa_CaZ.js","./index-DPs8sVol.js","./index-DRYJ0xIl.js","./memory-BwHtkqHB.js","./index-CzQzijaC.js"])))=>i.map(i=>d[i]);
2
2
  function _mergeNamespaces(De,Me){for(var He=0;He<Me.length;He++){const Ge=Me[He];if(typeof Ge!="string"&&!Array.isArray(Ge)){for(const Je in Ge)if(Je!=="default"&&!(Je in De)){const Ye=Object.getOwnPropertyDescriptor(Ge,Je);Ye&&Object.defineProperty(De,Je,Ye.get?Ye:{enumerable:!0,get:()=>Ge[Je]})}}}return Object.freeze(Object.defineProperty(De,Symbol.toStringTag,{value:"Module"}))}(function(){const Me=document.createElement("link").relList;if(Me&&Me.supports&&Me.supports("modulepreload"))return;for(const Je of document.querySelectorAll('link[rel="modulepreload"]'))Ge(Je);new MutationObserver(Je=>{for(const Ye of Je)if(Ye.type==="childList")for(const Ze of Ye.addedNodes)Ze.tagName==="LINK"&&Ze.rel==="modulepreload"&&Ge(Ze)}).observe(document,{childList:!0,subtree:!0});function He(Je){const Ye={};return Je.integrity&&(Ye.integrity=Je.integrity),Je.referrerPolicy&&(Ye.referrerPolicy=Je.referrerPolicy),Je.crossOrigin==="use-credentials"?Ye.credentials="include":Je.crossOrigin==="anonymous"?Ye.credentials="omit":Ye.credentials="same-origin",Ye}function Ge(Je){if(Je.ep)return;Je.ep=!0;const Ye=He(Je);fetch(Je.href,Ye)}})();var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs$1(De){return De&&De.__esModule&&Object.prototype.hasOwnProperty.call(De,"default")?De.default:De}function getAugmentedNamespace(De){if(Object.prototype.hasOwnProperty.call(De,"__esModule"))return De;var Me=De.default;if(typeof Me=="function"){var He=function Ge(){var Je=!1;try{Je=this instanceof Ge}catch{}return Je?Reflect.construct(Me,arguments,this.constructor):Me.apply(this,arguments)};He.prototype=Me.prototype}else He={};return Object.defineProperty(He,"__esModule",{value:!0}),Object.keys(De).forEach(function(Ge){var Je=Object.getOwnPropertyDescriptor(De,Ge);Object.defineProperty(He,Ge,Je.get?Je:{enumerable:!0,get:function(){return De[Ge]}})}),He}var jsxRuntime={exports:{}},reactJsxRuntime_production={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.js
@@ -2911,4 +2911,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2911
2911
  padding-top: 16px;
2912
2912
  ${De=>De.scrollable?"":"overflow: hidden"};
2913
2913
  }
2914
- `;function GlobalSubscriber(){const{t:De}=V$2(),{session:Me}=useSessionContext$1(),{info:He,refresh:Ge}=useNodeContext();return useSubscription(constantExports.TeamEvents.userUpdated,({teamDid:Je,user:Ye})=>{Je===He.did&&Ye&&!Ye.approved&&Me&&Me.user&&Me.user.did===Ye.did&&(H$7.warning(De("session.blockAccess"),{autoHideDuration:10*1e3}),Me.logout())}),useSubscription(constantExports$1.EVENTS.NOTIFICATION_CREATE,Je=>{Je.entityType==="node"&&Ge({silent:!0})}),useSubscription(constantExports$1.EVENTS.NODE_UPDATED,()=>{Ge({silent:!0})}),null}const authorize=({user:De,launchType:Me,nftId:He})=>{if(!De)return!1;if(Me==="serverless"){if(!He)throw new Error("nftId is required");return De?.controller?.nftId===He}return(De.permissions||[]).includes("mutate_blocklets")},isServerlessBlockletInstalled=De=>De.isGetBlocklet&&De.runtimeBlocklet?.controller?.consumedAt,getRestoredAccessUrl=async De=>{const Me=getBlockletUrls({blocklet:De});let He="";return He=Me.find(Ge=>{try{const{hostname:Je}=new URL(Ge);return urlEvaluationExports.isSlpDomain(Je)}catch(Je){return console.error(Je),!1}}),He||(He=await getAccessibleUrl(Me)),He},LaunchBlockletContext=reactExports.createContext({}),{Provider:Provider$1,Consumer:Consumer$1}=LaunchBlockletContext;function LaunchBlockletProvider({children:De}){const{session:Me}=useSessionContext$1(),{t:He}=V$2(),{api:Ge,info:Je}=useNodeContext(),[Ye]=useSearchParams(),Ze=Ye.get("launchType"),et=Ye.get("fromLauncher"),Qe=Ye.get("blocklet_meta_url")||"",nt=Ye.get("nftId")||"",tt=Ye.get("from")||"",rt=Ye.get("launcherSessionId")||"",ot=Ye.get("launcherUrl")||"",at=tt==="url",lt=tt==="empty",ut=at||lt?"":new URL(Qe).origin,[dt,ct]=reactExports.useState({meta:null,appDid:Ye.get("appDid")||null,sessionId:Ye.get("sessionId")||null,isFree:!0,isExternal:!1,isInstalling:!1,isInstalled:!1,isRunning:!1,launcherSession:null,registryUrl:""}),ft=(mt,bt)=>ct(Et=>({...Et,appDid:mt,sessionId:bt})),ht=authorize({user:Me.user,launchType:Ze,nftId:nt}),[yt,gt]=reactExports.useState(null),[St,Rt]=reactExports.useState(!0),_t=reactExports.useMemo(()=>Je?getServerUrl(Je):"",[Je]),Pt=async mt=>{if(!mt)throw new Error("appDid should not be empty");const{blocklet:bt}=await Ge.getBlocklet({input:{did:mt,attachConfig:!1}});if(!bt)return null;const Et=constantExports.BlockletStatus[bt.status],Tt=!!nt,Ct=Et<constantExports.BlockletStatus.installed,At=Et===constantExports.BlockletStatus.installed,kt=Et===constantExports.BlockletStatus.running;return ct(wt=>({...wt,isInstalled:At,isRunning:kt,isExternal:Tt,isInstalling:Ct})),{isInstalled:At,isRunning:kt,isExternal:Tt,isInstalling:Ct}},Lt=async()=>{if(Rt(!0),lt){ct(mt=>({...mt,meta:{title:Ye.get("title")||"",description:Ye.get("description")||""}})),Rt(!1);return}try{if(!Qe&&!lt)throw new Error(He("common.invalidParam"));const[{meta:mt,isFree:bt,registryUrl:Et},{launcherSession:Tt,error:Ct}]=await Promise.all([Ge.getBlockletMetaFromUrl({input:{url:Qe,checkPrice:!0}}),rt?Ge.getLauncherSession({input:{launcherSessionId:rt,launcherUrl:ot}}):Promise.resolve({})]);if(rt&&!Tt)throw new Error(`Launch session invalid: ${Ct}`);if(!mt)throw new Error(He("LaunchBlockletBlocklet.error.loadMetaFailed"));let At={};ht&&dt.appDid&&(At=await Pt(dt.appDid)),ct(kt=>({...kt,...At,meta:mt,isFree:bt,registryUrl:Et,launcherSession:Tt}))}catch(mt){console.error(mt),gt(mt.message)}finally{Rt(!1)}};reactExports.useEffect(()=>{Me?.user?.role===constantExports$1.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&Me?.user?.controller?.nftId!==nt&&Me.logout(),Lt()},[]),reactExports.useEffect(()=>{St||!dt.meta||(ht?dt.appDid&&Pt(dt.appDid).catch(mt=>{H$7.error(mt.message)}):(ct(mt=>({...mt,isInstalled:!1,isRunning:!1,isExternal:!1})),gt(null)))},[ht]);const It={meta:dt.meta,isFree:dt.isFree,appDid:dt.appDid,sessionId:dt.sessionId,isInstalling:dt.isInstalling,isInstalled:dt.isInstalled,isExternal:dt.isExternal,isRunning:dt.isRunning,serverUrl:_t,storeUrl:dt.registryUrl||ut,blockletMetaUrl:Qe,fromLauncher:et,loading:St,error:yt,api:Ge,getBlocklet:Pt,setAppDid:ft,launcherUrl:ot,launcherSession:dt.launcherSession,launcherSessionId:rt,launchType:Ze};return jsxRuntimeExports.jsx(Provider$1,{value:It,children:De})}function useLaunchBlockletContext(){return reactExports.useContext(LaunchBlockletContext)}var useAsyncExports=requireUseAsync();const useAsync=getDefaultExportFromCjs$1(useAsyncExports);function useQuery(){return new URLSearchParams(useLocation().search)}const BlockletAppContext=reactExports.createContext(),{Provider,Consumer}=BlockletAppContext;function BlockletAppProvider({children:De}){const He=useQuery().get("blocklet_meta_url"),Ge=useAsync(async()=>{const{data:Ye}=await axios.get(He);return Ye});if(Ge.loading)return jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(CircularProgress,{})});const Je={meta:Ge.value,error:Ge.error};return jsxRuntimeExports.jsx(Provider,{value:Je,children:De})}BlockletAppProvider.propTypes={children:o$i.any.isRequired};function useBlockletAppContext(){return reactExports.useContext(BlockletAppContext)}const Dashboard=reactExports.lazy(()=>__vitePreload(()=>import("./index-DJ9zSKl1.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)),BlockletList=reactExports.lazy(()=>__vitePreload(()=>import("./index-CKHOafPq.js"),__vite__mapDeps([6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,2,33,34,35,36,37,38,39,40,41]),import.meta.url)),BlockletRestore=reactExports.lazy(()=>__vitePreload(()=>import("./index-CQogNORn.js"),__vite__mapDeps([42,43,44,45,46,47,24,7,38,23,48,49,20]),import.meta.url)),BlockletStore=reactExports.lazy(()=>__vitePreload(()=>import("./index-DjQqmpzQ.js"),__vite__mapDeps([50,7,51,52,53,54,55,18,56,34,35,57,58,39,38,59,23,60,5,20,24,25,26,61,62,28,63,64]),import.meta.url)),Settings=reactExports.lazy(()=>__vitePreload(()=>import("./index-2VA5XrmO.js"),__vite__mapDeps([65,66,63,67,68,28,9,10,11,12,13,14,15,16,17,18,19,20,69,70,33,60,5,2,71,27,7,72,73,74,75,39,21,76,55,77,78,4]),import.meta.url)),LogPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-BQNKAwfZ.js"),__vite__mapDeps([79,80,25,26,7]),import.meta.url)),TeamPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-KI2LGzUW.js"),__vite__mapDeps([81,66,82,17,18,19,7,83,84,85,86,87,88,56,27,89,39,90,9,10,11,12,13,14,15,16,20,40,25,26,67,91,32,34,35,28,5,92,93,75,2,57,23,8,94,95,52,47,33,70,96,97,98,99,100,101,102,72,77,1,60,103,104,105]),import.meta.url)),BlockletDetail=reactExports.lazy(()=>__vitePreload(()=>import("./detail-B-lIb4O1.js"),__vite__mapDeps([106,66,21,22,7,20,23,24,25,26,27,28,56,107,88,64]),import.meta.url)),EULAPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-B11n09kE.js"),[],import.meta.url)),Notifications=reactExports.lazy(()=>__vitePreload(()=>import("./index-umVLVZjs.js"),[],import.meta.url)),IssuePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-BPuMob2k.js"),__vite__mapDeps([108,109,107,94,12,95,110,111,24]),import.meta.url)),LostPassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-CADLzzXJ.js"),__vite__mapDeps([112,90,59,94,12,110,111,24,37]),import.meta.url)),ExchangePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-CQYzPG_n.js"),__vite__mapDeps([113,110,111,24]),import.meta.url)),BlockletLauncher=reactExports.lazy(()=>__vitePreload(()=>import("./index-CaDcvTD7.js"),__vite__mapDeps([114,44,45,46,47,103,104,115,83,84,85,24,30,31,49,41,7,71,62]),import.meta.url)),NotFoundPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-D0-rZXcm.js"),__vite__mapDeps([116,107]),import.meta.url)),Invite=reactExports.lazy(()=>__vitePreload(()=>import("./index-BxX_nqnW.js"),__vite__mapDeps([117,109,107,94,12,95,110,111]),import.meta.url)),Console=reactExports.lazy(()=>__vitePreload(()=>import("./index-C8CmKnU4.js"),[],import.meta.url)),AnalyticsPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-CAA1AdyJ.js"),__vite__mapDeps([118,66,119,120,54,55,121,15,122,123,92,93,11,75,9,10,12,13,14,16,17,18,19,20,124,125,4,7,101,26]),import.meta.url)),GenKeyPair=reactExports.lazy(()=>__vitePreload(()=>import("./index-Be8ehpQE.js"),__vite__mapDeps([126,107]),import.meta.url));function useSharedContext(){const De=useNodeContext(),{session:Me}=useSessionContext$1(),{wallet:He}=d$d(),Ge=Me.user&&Me.user.did;return reactExports.useEffect(()=>{const Je=getWsClient();return Ge?Je.connect():Je.isConnected()&&Je.disconnect(),()=>{Je.isConnected()&&Je.disconnect()}},[Ge]),reactExports.useEffect(()=>{if(He)return()=>{};const Je=()=>{document.visibilityState==="visible"&&Me.refresh()};return document.addEventListener("visibilitychange",Je),()=>{document.removeEventListener("visibilitychange",Je)}},[]),{node:De,session:Me}}function ProtectedApp(){const{t:De}=V$2(),{node:Me,session:He}=useSharedContext(),Ge=useLocation();reactExports.useEffect(()=>{window.tracker&&typeof window.tracker.pageView=="function"&&window.tracker.pageView(`${Ge.pathname}${Ge.search}`)},[Ge]),reactExports.useEffect(()=>{He?.user?.role===constantExports$1.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&He.logout()},[He?.user?.role]);const Je=jsxRuntimeExports.jsx(CircularProgress,{});if(Me.loading||He.loading)return jsxRuntimeExports.jsx(o$f,{children:Je});if(!Me.info.initialized)return getAuthMethodExports.getServerAuthMethod(Me.info)==="nft"?jsxRuntimeExports.jsx(NodeVerifyOwner,{action:"verify-owner"}):jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(NodeConnectOwner,{})});if(Me.info.upgradeSessionId)return jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(MaintainProgress,{})});if(!He.user)return jsxRuntimeExports.jsx(NodeLogin,{loadingEle:Je});const Ye=jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(CircularProgress,{})});return jsxRuntimeExports.jsx(BlockletsProvider,{children:jsxRuntimeExports.jsxs(NotificationProvider,{children:[jsxRuntimeExports.jsx(Health,{}),jsxRuntimeExports.jsx(CheckNodeStatus,{}),jsxRuntimeExports.jsx(GlobalSubscriber,{}),jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:Ye,children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"/dashboard",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:"Dashboard",children:jsxRuntimeExports.jsx(Dashboard,{})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.blocklets"),children:jsxRuntimeExports.jsx(BlockletList,{})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets/:did/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:"Blocklets",children:jsxRuntimeExports.jsx(BlockletDetail,{})})}),jsxRuntimeExports.jsx(Route,{path:"/settings/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.setting"),children:jsxRuntimeExports.jsx(Settings,{})})}),jsxRuntimeExports.jsx(Route,{path:"/eula",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("setup.steps.eula"),children:jsxRuntimeExports.jsx(EULAPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/store",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.store"),children:jsxRuntimeExports.jsx(BlockletStore,{})})}),jsxRuntimeExports.jsx(Route,{path:"/console",element:jsxRuntimeExports.jsx(DashboardRoute,{title:`GraphQL ${De("common.console")}`,scrollable:!1,fullWidth:!0,children:jsxRuntimeExports.jsx(Console,{})})}),jsxRuntimeExports.jsx(Route,{path:"/notifications",element:jsxRuntimeExports.jsx(DashboardRoute,{title:De("notification.title"),children:jsxRuntimeExports.jsx(Notifications,{})})}),jsxRuntimeExports.jsx(Route,{path:"/team/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.team"),children:jsxRuntimeExports.jsx(TeamPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/logs/:name?",element:jsxRuntimeExports.jsx(DashboardRoute,{scrollable:!1,fullWidth:!0,title:De("common.logs"),children:jsxRuntimeExports.jsx(LogPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/analytics/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.analytics"),children:jsxRuntimeExports.jsx(AnalyticsPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/",element:jsxRuntimeExports.jsx(Navigate,{to:"/dashboard",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/team",element:jsxRuntimeExports.jsx(Navigate,{to:"/team/members",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/analytics",element:jsxRuntimeExports.jsx(Navigate,{to:"/analytics/traffic",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/router",element:jsxRuntimeExports.jsx(Navigate,{to:"/router/rules",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/settings",element:jsxRuntimeExports.jsx(Navigate,{to:"/settings/basic",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/marketplace",element:jsxRuntimeExports.jsx(Navigate,{to:"/store",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/marketplace/:did",element:jsxRuntimeExports.jsx(Navigate,{to:"/store/:did",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"*",element:jsxRuntimeExports.jsx(NotFoundPage,{})})]})})]})})}function UnprotectedWrapper({children:De}){const{node:Me,session:He}=useSharedContext();return Me.loading||!He.initialized&&He.loading?jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(CircularProgress,{})}):Me.info.upgradeSessionId?jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(MaintainProgress,{})}):De}function App(){const{changeLocale:De}=V$2(),Me=useQuery();reactExports.useEffect(()=>{const Ge=Me.get("locale");Ge&&["zh","en"].includes(Ge)&&De(Ge)},[]);const He=jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(CircularProgress,{})});return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:He,children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/issue-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(IssuePassport,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/lost-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(LostPassport,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/exchange-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(ExchangePassport,{})})}),jsxRuntimeExports.jsx(Route,{path:"/accept-server",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(NodeVerifyOwner,{action:"accept-server"})})}),jsxRuntimeExports.jsx(Route,{path:"/gen-key-pair/",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(GenKeyPair,{})})}),jsxRuntimeExports.jsx(Route,{path:"/launch-blocklet/*",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(LaunchBlockletProvider,{children:jsxRuntimeExports.jsx(BlockletLauncher,{})})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets/restore/*",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(BlockletAppProvider,{children:jsxRuntimeExports.jsx(BlockletRestore,{})})})}),jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/invite`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(Invite,{})})}),jsxRuntimeExports.jsx(Route,{path:"/*",element:jsxRuntimeExports.jsx(ProtectedApp,{})})]})})}function AppWrapper(){const De=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";return jsxRuntimeExports.jsx(BrowserRouter,{history:history$1,basename:De,children:jsxRuntimeExports.jsx(Root,{children:jsxRuntimeExports.jsx(App,{})})})}const root=clientExports.createRoot(document.getElementById("root"));root.render(jsxRuntimeExports.jsx(AppWrapper,{}));const prefix=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";register(`${prefix}/service-worker.js`.replace(/\/+/g,"/"),{registrationOptions:{scope:prefix},registered(){console.info("Service worker has been registered.")},ready(){console.info("Service worker is active.")},cached(){console.info("Content has been cached for offline use.")},updatefound(){console.info("New content is downloading.")},updated(){console.info("New content is available; please refresh.")},offline(){console.info("No internet connection found. App is running in offline mode.")},error(De){console.error("Error during service worker registration:",De)}});export{$$4 as $,useNavigate as A,useSearchParams as B,CircularProgress as C,DialogContentText as D,useMediaQuery as E,Link$1 as F,Grid$1 as G,H$7 as H,BlockletAppAvatar as I,Box as J,isEmpty as K,Link as L,oe as M,Tooltip as N,FormControl as O,InputLabel as P,MenuItem as Q,Checkbox as R,Select as S,Typography as T,Alert as U,V$2 as V,WrappedDidAddress as W,formatError as X,o$f as Y,y$8 as Z,CheckIcon$2 as _,useSubscription as a,urlPathFriendlyExports as a$,propTypesExports as a0,api as a1,merge as a2,cloneDeep as a3,IconButton as a4,R$4 as a5,ListItemSecondaryAction as a6,List as a7,ListItem as a8,ListItemText as a9,ErrorBoundary as aA,k$1 as aB,formatRegistryLogoPath as aC,Icon as aD,ListItemIcon as aE,createSvgIcon as aF,ensureDomainAliases as aG,constantExports$1 as aH,normalizePathPrefix as aI,sortBy as aJ,getIp as aK,stringSortHandlerAsc as aL,getAccessUrl as aM,history$1 as aN,semver as aO,useReactive as aP,useAsyncEffect as aQ,InfoOutlinedIcon as aR,sleep as aS,useMemoizedFn as aT,checkInputByType as aU,FormControlLabel as aV,Stack$1 as aW,useAsync as aX,axios as aY,shouldCheckDomainStatus as aZ,formatMountPoint as a_,getServerUrl as aa,useBlockletAppContext as ab,getAuthMethodExports as ac,ConfirmDialog as ad,getRestoredAccessUrl as ae,setSessionToken as af,isEqual as ag,isServerlessBlockletInstalled as ah,Debug as ai,getWsClient as aj,useQuery as ak,getPathPrefix as al,Global as am,Routes as an,Route as ao,Navigate as ap,HeaderAddon as aq,SessionContext as ar,css as as,$$5 as at,formatToDatetime as au,alpha$1 as av,getLaunchAgreementUrl as aw,axios$2 as ax,useSessionContext$1 as ay,getBlockletMetaUrl as az,constantExports as b,emphasize as b$,Menu as b0,checkIsWildcardDomain as b1,Popover as b2,Card as b3,formatToDate as b4,sortDomains as b5,A$6 as b6,Collapse as b7,CheckCircle as b8,styled as b9,f$7 as bA,Button as bB,createPassportSvg as bC,getWalletType as bD,useCreation as bE,BlockletAdminRoles as bF,isInstalling as bG,Badge as bH,createAppPassportSvg as bI,NavLink as bJ,__vitePreload as bK,SetCache as bL,arrayIncludes$1 as bM,arrayIncludesWith as bN,cacheHas as bO,baseUniq as bP,baseFlatten as bQ,baseRest as bR,last as bS,arrayFilter as bT,isArrayLikeObject as bU,t$a as bV,isDownloading as bW,getBlockletUrl as bX,getBlockletUrlParams as bY,ButtonBase as bZ,memoTheme as b_,isUrl as ba,__awaiter as bb,__generator as bc,__spread as bd,getDefaultExportFromCjs$1 as be,U$3 as bf,dayjs as bg,Divider as bh,isCertificateMatch as bi,FormHelperText as bj,FormGroup as bk,o$c as bl,NodeContext as bm,useParams as bn,useNodeContext$1 as bo,uniqBy as bp,l as bq,e$c as br,l$r as bs,copy as bt,libExports$1 as bu,B$4 as bv,o$9 as bw,l$k as bx,BlockletAvatar as by,ClickAwayListener as bz,createCompounder as c,useMount as c$,generateUtilityClasses as c0,generateUtilityClass as c1,useDefaultProps as c2,useSlotProps as c3,clsx$1 as c4,composeClasses as c5,__read as c6,toSlotDomain as c7,omit as c8,fixBlocklet as c9,d$d as cA,Avatar as cB,isFromWallet as cC,usePassportId as cD,isFunction$3 as cE,Container$3 as cF,K$4 as cG,getLauncherBaseURL as cH,SvgIcon as cI,Buffer$1 as cJ,parseURL as cK,withHttps as cL,useLaunchBlockletContext as cM,z$2 as cN,authorize as cO,E$9 as cP,ArrowForwardIcon as cQ,isNewStoreUrl as cR,getAccessibleUrl as cS,getBlockletLogoUrl as cT,t as cU,M$9 as cV,__spreadArrays as cW,__assign as cX,h$5 as cY,useLocation as cZ,l$8 as c_,isProtectedRole as ca,baseOrderBy as cb,isArray$1 as cc,rootShouldForwardProp as cd,useFormControl as ce,createChainedFunction$1 as cf,useSlot as cg,capitalize$1 as ch,SwitchBase as ci,createSimplePaletteValueFilter as cj,useControlled as ck,useForkRef as cl,useId as cm,getBlockletUrls as cn,defaultCheckAccessible as co,urlEvaluationExports as cp,memoize as cq,ButtonGroupContext as cr,ButtonGroupButtonContext as cs,useNotificationContext as ct,utilExports as cu,NotificationList as cv,useRequest as cw,isNumber$3 as cx,useLatest as cy,f$9 as cz,useBlockletsContext as d,applyStyles$1 as d$,s$8 as d0,formatDateTime as d1,getExplorerLink as d2,patchJsxToLocale as d3,T$6 as d4,getSessionToken as d5,LinearProgress as d6,SvgLogo as d7,isNumber$1 as d8,useEnhancedEffect$1 as d9,emotionUtils_browser_esm as dA,requireJsxRuntime as dB,requirePropTypes as dC,requireReactDom as dD,isObject$3 as dE,require$$0$2 as dF,require$$6$2 as dG,requireConstant$1 as dH,$e$1 as dI,noop$1 as dJ,Paper as dK,MenuList as dL,Popper as dM,_inheritsLoose$1 as dN,ReactDOM as dO,_objectWithoutPropertiesLoose$1 as dP,TransitionGroup as dQ,ENTERED as dR,ENTERING as dS,EXITING as dT,TransitionGroupContext as dU,Transition as dV,config$1 as dW,popperGenerator as dX,eventListeners as dY,popperOffsets$1 as dZ,computeStyles$1 as d_,debounce$2 as da,ownerWindow as db,useRtl as dc,KeyboardArrowLeft as dd,KeyboardArrowRight as de,useEventCallback$1 as df,ownerDocument as dg,getCommonHtmlTitle as dh,HelmetExport as di,requireReact as dj,i$e as dk,te$2 as dl,se$2 as dm,InfoIcon$2 as dn,upperFirst as dp,camelCase as dq,Skeleton as dr,R$6 as ds,isArrayLike as dt,baseIteratee as du,keys as dv,toInteger as dw,baseFindIndex as dx,commonjsGlobal as dy,getAugmentedNamespace as dz,useAsyncRetry as e,_extends$2 as e$,afterMain as e0,afterRead as e1,afterWrite as e2,arrow$1 as e3,auto as e4,basePlacements as e5,beforeMain as e6,beforeRead as e7,beforeWrite as e8,bottom as e9,process$1 as eA,requireLib$4 as eB,requireLib$5 as eC,requireLib$3 as eD,requireConstant$2 as eE,requireUrlPathFriendly as eF,b$9 as eG,data$t as eH,global$2 as eI,hoistStatics as eJ,isEqual$3 as eK,usePreviousProps as eL,setRef as eM,ClearIcon as eN,ArrowDropDownIcon as eO,Chip as eP,filledInputClasses as eQ,inputBaseClasses as eR,outlinedInputClasses as eS,inputClasses as eT,ListContext as eU,getListItemButtonUtilityClass as eV,listItemButtonClasses as eW,emotionReact_browser_esm as eX,emotionCache_browser_esm as eY,cloneDeep$1 as eZ,forceReflow as e_,clippingParents as ea,createPopper as eb,createPopper$1 as ec,detectOverflow as ed,end as ee,flip$1 as ef,hide$1 as eg,left as eh,main as ei,modifierPhases as ej,offset$1 as ek,placements as el,popper as em,preventOverflow$1 as en,read as eo,reference as ep,right as eq,start as er,top as es,variationPlacements as et,viewport as eu,write as ev,requireReactIs as ew,emotionStyled_browser_esm as ex,emotionSerialize_esm as ey,emotionSheet_esm as ez,useTheme as f,requireElliptic as f$,toString$2 as f0,mergeThemeOptions as f1,StyledEngineProvider as f2,ThemeProvider as f3,ThemeProvider$3 as f4,s$3 as f5,CloseIcon as f6,isString$1 as f7,createTheme as f8,createAxios as f9,isFocusVisible as fA,isHostComponent as fB,slotShouldForwardProp as fC,requireNormalizePathPrefix as fD,debounce as fE,useInterval as fF,formatTime as fG,CloseFullscreenIcon as fH,S$9 as fI,TablePagination as fJ,parseAvatar as fK,__rest as fL,useEffectWithTarget$1 as fM,__values as fN,tmp as fO,useUpdate as fP,requireUtil$6 as fQ,requireObjectKeys$1 as fR,requireShams$1 as fS,requireCallBound as fT,requireEsObjectAtoms as fU,requireDefineDataProperty as fV,requireHasPropertyDescriptors as fW,requireCallBind as fX,requireCallBound$1 as fY,requireSafeBuffer$1 as fZ,requireBrowser$f as f_,pick as fa,omitBy as fb,flat as fc,MenuIcon as fd,useDebounceFn as fe,Dialog as ff,OutlinedInput as fg,data as fh,Drawer as fi,parseQuery as fj,parseFilename as fk,stringifyParsedURL as fl,Grow as fm,Wt as fn,InputAdornment as fo,tooltipClasses as fp,requireEngine as fq,__spreadArray as fr,useEventListener as fs,le$6 as ft,getTargetElement as fu,MoreHorizIcon as fv,lighten as fw,darken as fx,clamp as fy,extractEventHandlers as fz,p$3 as g,useTheme$4 as g$,requireCryptoBrowserify as g0,requireRipemd160 as g1,requireLib$1 as g2,requireUtil$2 as g3,uniq as g4,useLocalStorageState as g5,InputBase as g6,useSize as g7,DialogTitle as g8,DialogContent as g9,arrayMap as gA,baseMap as gB,baseForOwn as gC,isPlainObject$2 as gD,require$$13 as gE,throttle$2 as gF,isUndefined$1 as gG,useTimeout as gH,Fade as gI,FocusTrap as gJ,dialogClasses as gK,s$i as gL,n$8 as gM,purify as gN,Buffer$1$1 as gO,Q$3 as gP,require$$0$1 as gQ,requireIsAbsoluteUrl as gR,requireDist$1 as gS,requireBrowser$3 as gT,require$$4$2 as gU,resolveProps as gV,useThemeProps as gW,defaultTheme$1 as gX,THEME_ID as gY,en$2 as gZ,isIndex as g_,DialogActions as ga,pickBy as gb,shouldForwardProp as gc,resolveComponentProps as gd,getInviteLink as ge,e$e as gf,getIssuePassportLink as gg,uniqBy$1 as gh,isNodeOwner as gi,isSelf as gj,Q$2 as gk,i$f as gl,I$4 as gm,Y$3 as gn,PQueue as go,getBlockletAccessibleUrl as gp,A$2 as gq,createPassportSvg$1 as gr,libExports$3 as gs,requireMs as gt,E$3 as gu,trim as gv,getBlockletSDK as gw,identity$1 as gx,arrayEach as gy,baseEach as gz,get$1 as h,data$z as h$,objectAssign as h0,__extends as h1,isServerless as h2,requireJsonStableStringify as h3,isFunction$2 as h4,omit$1 as h5,TableContext as h6,Tablelvl2Context as h7,g$d as h8,useUnmount as h9,withTrailingSlash as hA,data$C as hB,keyframes as hC,createUseStorageState as hD,isBrowser$1 as hE,root$1 as hF,isNil$1 as hG,require$$12 as hH,requireHoistNonReactStatics_cjs as hI,_assertThisInitialized$1 as hJ,reactDomExports as hK,loadIcon as hL,withoutLeadingSlash as hM,fetchSvgAsPng as hN,blobToFile as hO,withoutTrailingSlash as hP,u$2 as hQ,Ce as hR,t$g as hS,i as hT,R$9 as hU,p$f as hV,usePrevious as hW,browserExports$1 as hX,BlockletSDK as hY,highlightExports as hZ,funcExports as h_,isDidDomainOrIpEchoDomain as ha,ExpandLess as hb,validateDomain as hc,requireDist$2 as hd,requireAxios as he,trim$1 as hf,requirePRetry as hg,TableCell as hh,xe$1 as hi,getSystemDomains as hj,copyArray as hk,baseIndexOf as hl,ke as hm,useAppLogo as hn,getTransferAppLink as ho,requireBn$1 as hp,require$$3 as hq,updateWindowEnv as hr,requireAssertString as hs,isEmail as ht,isURL as hu,data$D as hv,M$5 as hw,isNil as hx,requireBase32 as hy,Re as hz,utilExports$1 as i,createStore as i$,useSnackbar as i0,common$3 as i1,green as i2,amber as i3,SnackbarContent as i4,d$f as i5,t$1 as i6,useDebounce as i7,Y as i8,g$3 as i9,NotificationContent$1 as iA,AvatarGroup as iB,requireCjs as iC,useTheme$2 as iD,baseAssignValue as iE,isValidClusterSize as iF,extractStatusUrlFromNextWorkflow as iG,pWaitFor as iH,hasRequiredSteps as iI,getStoreList as iJ,commonjsRequire as iK,require_interface as iL,requireHasown as iM,requireBrowser$1 as iN,requireSemver as iO,require$$4$1 as iP,flatten as iQ,trimEnd as iR,base32Exports as iS,flatExports as iT,Xt as iU,AxiosError as iV,o$h as iW,isNull as iX,orange as iY,purple as iZ,useStore as i_,b as ia,g$8 as ib,withErrorBoundary as ic,z$1 as id,M$6 as ie,Ke as ig,G$1 as ih,requireZh$1 as ii,requireDayjs_min as ij,K$6 as ik,l$w as il,isPlainObject$1 as im,xe as io,useBlockletLogo as ip,Toolbar as iq,_setPrototypeOf as ir,isString$3 as is,FormLabel as it,RelativeTime as iu,isIncludeActivity as iv,isUserActor as iw,ActorAvatar as ix,SendComponentAvatar as iy,Activity as iz,jsxRuntimeExports as j,create$1 as j0,t$h as j1,clientExports as j2,ke$1 as j3,retry as j4,isNetworkError as j5,requirePTimeout as j6,n$5 as j7,Modal as j8,GlobalStyles$2 as j9,filesize as k,prettyMs as l,formatLocale as m,useSessionContext as n,o$i as o,p$e as p,useSetState as q,reactExports as r,styled$3 as s,TextField as t,useNodeContext as u,n$4 as v,no as w,getWebWalletUrl as x,joinURL as y,withQuery as z};
2914
+ `;function GlobalSubscriber(){const{t:De}=V$2(),{session:Me}=useSessionContext$1(),{info:He,refresh:Ge}=useNodeContext();return useSubscription(constantExports.TeamEvents.userUpdated,({teamDid:Je,user:Ye})=>{Je===He.did&&Ye&&!Ye.approved&&Me&&Me.user&&Me.user.did===Ye.did&&(H$7.warning(De("session.blockAccess"),{autoHideDuration:10*1e3}),Me.logout())}),useSubscription(constantExports$1.EVENTS.NOTIFICATION_CREATE,Je=>{Je.entityType==="node"&&Ge({silent:!0})}),useSubscription(constantExports$1.EVENTS.NODE_UPDATED,()=>{Ge({silent:!0})}),null}const authorize=({user:De,launchType:Me,nftId:He})=>{if(!De)return!1;if(Me==="serverless"){if(!He)throw new Error("nftId is required");return De?.controller?.nftId===He}return(De.permissions||[]).includes("mutate_blocklets")},isServerlessBlockletInstalled=De=>De.isGetBlocklet&&De.runtimeBlocklet?.controller?.consumedAt,getRestoredAccessUrl=async De=>{const Me=getBlockletUrls({blocklet:De});let He="";return He=Me.find(Ge=>{try{const{hostname:Je}=new URL(Ge);return urlEvaluationExports.isSlpDomain(Je)}catch(Je){return console.error(Je),!1}}),He||(He=await getAccessibleUrl(Me)),He},LaunchBlockletContext=reactExports.createContext({}),{Provider:Provider$1,Consumer:Consumer$1}=LaunchBlockletContext;function LaunchBlockletProvider({children:De}){const{session:Me}=useSessionContext$1(),{t:He}=V$2(),{api:Ge,info:Je}=useNodeContext(),[Ye]=useSearchParams(),Ze=Ye.get("launchType"),et=Ye.get("fromLauncher"),Qe=Ye.get("blocklet_meta_url")||"",nt=Ye.get("nftId")||"",tt=Ye.get("from")||"",rt=Ye.get("launcherSessionId")||"",ot=Ye.get("launcherUrl")||"",at=tt==="url",lt=tt==="empty",ut=at||lt?"":new URL(Qe).origin,[dt,ct]=reactExports.useState({meta:null,appDid:Ye.get("appDid")||null,sessionId:Ye.get("sessionId")||null,isFree:!0,isExternal:!1,isInstalling:!1,isInstalled:!1,isRunning:!1,launcherSession:null,registryUrl:""}),ft=(mt,bt)=>ct(Et=>({...Et,appDid:mt,sessionId:bt})),ht=authorize({user:Me.user,launchType:Ze,nftId:nt}),[yt,gt]=reactExports.useState(null),[St,Rt]=reactExports.useState(!0),_t=reactExports.useMemo(()=>Je?getServerUrl(Je):"",[Je]),Pt=async mt=>{if(!mt)throw new Error("appDid should not be empty");const{blocklet:bt}=await Ge.getBlocklet({input:{did:mt,attachConfig:!1}});if(!bt)return null;const Et=constantExports.BlockletStatus[bt.status],Tt=!!nt,Ct=Et<constantExports.BlockletStatus.installed,At=Et===constantExports.BlockletStatus.installed,kt=Et===constantExports.BlockletStatus.running;return ct(wt=>({...wt,isInstalled:At,isRunning:kt,isExternal:Tt,isInstalling:Ct})),{isInstalled:At,isRunning:kt,isExternal:Tt,isInstalling:Ct}},Lt=async()=>{if(Rt(!0),lt){ct(mt=>({...mt,meta:{title:Ye.get("title")||"",description:Ye.get("description")||""}})),Rt(!1);return}try{if(!Qe&&!lt)throw new Error(He("common.invalidParam"));const[{meta:mt,isFree:bt,registryUrl:Et},{launcherSession:Tt,error:Ct}]=await Promise.all([Ge.getBlockletMetaFromUrl({input:{url:Qe,checkPrice:!0}}),rt?Ge.getLauncherSession({input:{launcherSessionId:rt,launcherUrl:ot}}):Promise.resolve({})]);if(rt&&!Tt)throw new Error(`Launch session invalid: ${Ct}`);if(!mt)throw new Error(He("LaunchBlockletBlocklet.error.loadMetaFailed"));let At={};ht&&dt.appDid&&(At=await Pt(dt.appDid)),ct(kt=>({...kt,...At,meta:mt,isFree:bt,registryUrl:Et,launcherSession:Tt}))}catch(mt){console.error(mt),gt(mt.message)}finally{Rt(!1)}};reactExports.useEffect(()=>{Me?.user?.role===constantExports$1.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&Me?.user?.controller?.nftId!==nt&&Me.logout(),Lt()},[]),reactExports.useEffect(()=>{St||!dt.meta||(ht?dt.appDid&&Pt(dt.appDid).catch(mt=>{H$7.error(mt.message)}):(ct(mt=>({...mt,isInstalled:!1,isRunning:!1,isExternal:!1})),gt(null)))},[ht]);const It={meta:dt.meta,isFree:dt.isFree,appDid:dt.appDid,sessionId:dt.sessionId,isInstalling:dt.isInstalling,isInstalled:dt.isInstalled,isExternal:dt.isExternal,isRunning:dt.isRunning,serverUrl:_t,storeUrl:dt.registryUrl||ut,blockletMetaUrl:Qe,fromLauncher:et,loading:St,error:yt,api:Ge,getBlocklet:Pt,setAppDid:ft,launcherUrl:ot,launcherSession:dt.launcherSession,launcherSessionId:rt,launchType:Ze};return jsxRuntimeExports.jsx(Provider$1,{value:It,children:De})}function useLaunchBlockletContext(){return reactExports.useContext(LaunchBlockletContext)}var useAsyncExports=requireUseAsync();const useAsync=getDefaultExportFromCjs$1(useAsyncExports);function useQuery(){return new URLSearchParams(useLocation().search)}const BlockletAppContext=reactExports.createContext(),{Provider,Consumer}=BlockletAppContext;function BlockletAppProvider({children:De}){const He=useQuery().get("blocklet_meta_url"),Ge=useAsync(async()=>{const{data:Ye}=await axios.get(He);return Ye});if(Ge.loading)return jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(CircularProgress,{})});const Je={meta:Ge.value,error:Ge.error};return jsxRuntimeExports.jsx(Provider,{value:Je,children:De})}BlockletAppProvider.propTypes={children:o$i.any.isRequired};function useBlockletAppContext(){return reactExports.useContext(BlockletAppContext)}const Dashboard=reactExports.lazy(()=>__vitePreload(()=>import("./index-ZCO60mrW.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)),BlockletList=reactExports.lazy(()=>__vitePreload(()=>import("./index-D2gNdot7.js"),__vite__mapDeps([6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,2,33,34,35,36,37,38,39,40,41]),import.meta.url)),BlockletRestore=reactExports.lazy(()=>__vitePreload(()=>import("./index-C8Yc1xhR.js"),__vite__mapDeps([42,43,44,45,46,47,24,7,38,23,48,49,20]),import.meta.url)),BlockletStore=reactExports.lazy(()=>__vitePreload(()=>import("./index-DVOJBn33.js"),__vite__mapDeps([50,7,51,52,53,54,55,18,56,34,35,57,58,39,38,59,23,60,5,20,24,25,26,61,62,28,63,64]),import.meta.url)),Settings=reactExports.lazy(()=>__vitePreload(()=>import("./index-Cs8W6nmK.js"),__vite__mapDeps([65,66,63,67,68,28,9,10,11,12,13,14,15,16,17,18,19,20,69,70,33,60,5,2,71,27,7,72,73,74,75,39,21,76,55,77,78,4]),import.meta.url)),LogPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-DN9WepcN.js"),__vite__mapDeps([79,80,25,26,7]),import.meta.url)),TeamPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-DidKpbc0.js"),__vite__mapDeps([81,66,82,17,18,19,7,83,84,85,86,87,88,56,27,89,39,90,9,10,11,12,13,14,15,16,20,40,25,26,67,91,32,34,35,28,5,92,93,75,2,57,23,8,94,95,52,47,33,70,96,97,98,99,100,101,102,72,77,1,60,103,104,105]),import.meta.url)),BlockletDetail=reactExports.lazy(()=>__vitePreload(()=>import("./detail-DYfAWDl1.js"),__vite__mapDeps([106,66,21,22,7,20,23,24,25,26,27,28,56,107,88,64]),import.meta.url)),EULAPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-C9Doh9s3.js"),[],import.meta.url)),Notifications=reactExports.lazy(()=>__vitePreload(()=>import("./index-CbKLDJsb.js"),[],import.meta.url)),IssuePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-DhXU_Vz9.js"),__vite__mapDeps([108,109,107,94,12,95,110,111,24]),import.meta.url)),LostPassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-OtVuze_0.js"),__vite__mapDeps([112,90,59,94,12,110,111,24,37]),import.meta.url)),ExchangePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-D57ncOaj.js"),__vite__mapDeps([113,110,111,24]),import.meta.url)),BlockletLauncher=reactExports.lazy(()=>__vitePreload(()=>import("./index-BnXKKyQZ.js"),__vite__mapDeps([114,44,45,46,47,103,104,115,83,84,85,24,30,31,49,41,7,71,62]),import.meta.url)),NotFoundPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-CGzi7zV_.js"),__vite__mapDeps([116,107]),import.meta.url)),Invite=reactExports.lazy(()=>__vitePreload(()=>import("./index-nvPO7sCa.js"),__vite__mapDeps([117,109,107,94,12,95,110,111]),import.meta.url)),Console=reactExports.lazy(()=>__vitePreload(()=>import("./index-B3lwT4Ol.js"),[],import.meta.url)),AnalyticsPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-BPA__Xw6.js"),__vite__mapDeps([118,66,119,120,54,55,121,15,122,123,92,93,11,75,9,10,12,13,14,16,17,18,19,20,124,125,4,7,101,26]),import.meta.url)),GenKeyPair=reactExports.lazy(()=>__vitePreload(()=>import("./index-CzQzijaC.js"),__vite__mapDeps([126,107]),import.meta.url));function useSharedContext(){const De=useNodeContext(),{session:Me}=useSessionContext$1(),{wallet:He}=d$d(),Ge=Me.user&&Me.user.did;return reactExports.useEffect(()=>{const Je=getWsClient();return Ge?Je.connect():Je.isConnected()&&Je.disconnect(),()=>{Je.isConnected()&&Je.disconnect()}},[Ge]),reactExports.useEffect(()=>{if(He)return()=>{};const Je=()=>{document.visibilityState==="visible"&&Me.refresh()};return document.addEventListener("visibilitychange",Je),()=>{document.removeEventListener("visibilitychange",Je)}},[]),{node:De,session:Me}}function ProtectedApp(){const{t:De}=V$2(),{node:Me,session:He}=useSharedContext(),Ge=useLocation();reactExports.useEffect(()=>{window.tracker&&typeof window.tracker.pageView=="function"&&window.tracker.pageView(`${Ge.pathname}${Ge.search}`)},[Ge]),reactExports.useEffect(()=>{He?.user?.role===constantExports$1.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&He.logout()},[He?.user?.role]);const Je=jsxRuntimeExports.jsx(CircularProgress,{});if(Me.loading||He.loading)return jsxRuntimeExports.jsx(o$f,{children:Je});if(!Me.info.initialized)return getAuthMethodExports.getServerAuthMethod(Me.info)==="nft"?jsxRuntimeExports.jsx(NodeVerifyOwner,{action:"verify-owner"}):jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(NodeConnectOwner,{})});if(Me.info.upgradeSessionId)return jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(MaintainProgress,{})});if(!He.user)return jsxRuntimeExports.jsx(NodeLogin,{loadingEle:Je});const Ye=jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(CircularProgress,{})});return jsxRuntimeExports.jsx(BlockletsProvider,{children:jsxRuntimeExports.jsxs(NotificationProvider,{children:[jsxRuntimeExports.jsx(Health,{}),jsxRuntimeExports.jsx(CheckNodeStatus,{}),jsxRuntimeExports.jsx(GlobalSubscriber,{}),jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:Ye,children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"/dashboard",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:"Dashboard",children:jsxRuntimeExports.jsx(Dashboard,{})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.blocklets"),children:jsxRuntimeExports.jsx(BlockletList,{})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets/:did/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:"Blocklets",children:jsxRuntimeExports.jsx(BlockletDetail,{})})}),jsxRuntimeExports.jsx(Route,{path:"/settings/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.setting"),children:jsxRuntimeExports.jsx(Settings,{})})}),jsxRuntimeExports.jsx(Route,{path:"/eula",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("setup.steps.eula"),children:jsxRuntimeExports.jsx(EULAPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/store",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.store"),children:jsxRuntimeExports.jsx(BlockletStore,{})})}),jsxRuntimeExports.jsx(Route,{path:"/console",element:jsxRuntimeExports.jsx(DashboardRoute,{title:`GraphQL ${De("common.console")}`,scrollable:!1,fullWidth:!0,children:jsxRuntimeExports.jsx(Console,{})})}),jsxRuntimeExports.jsx(Route,{path:"/notifications",element:jsxRuntimeExports.jsx(DashboardRoute,{title:De("notification.title"),children:jsxRuntimeExports.jsx(Notifications,{})})}),jsxRuntimeExports.jsx(Route,{path:"/team/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.team"),children:jsxRuntimeExports.jsx(TeamPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/logs/:name?",element:jsxRuntimeExports.jsx(DashboardRoute,{scrollable:!1,fullWidth:!0,title:De("common.logs"),children:jsxRuntimeExports.jsx(LogPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/analytics/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.analytics"),children:jsxRuntimeExports.jsx(AnalyticsPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/",element:jsxRuntimeExports.jsx(Navigate,{to:"/dashboard",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/team",element:jsxRuntimeExports.jsx(Navigate,{to:"/team/members",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/analytics",element:jsxRuntimeExports.jsx(Navigate,{to:"/analytics/traffic",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/router",element:jsxRuntimeExports.jsx(Navigate,{to:"/router/rules",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/settings",element:jsxRuntimeExports.jsx(Navigate,{to:"/settings/basic",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/marketplace",element:jsxRuntimeExports.jsx(Navigate,{to:"/store",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/marketplace/:did",element:jsxRuntimeExports.jsx(Navigate,{to:"/store/:did",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"*",element:jsxRuntimeExports.jsx(NotFoundPage,{})})]})})]})})}function UnprotectedWrapper({children:De}){const{node:Me,session:He}=useSharedContext();return Me.loading||!He.initialized&&He.loading?jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(CircularProgress,{})}):Me.info.upgradeSessionId?jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(MaintainProgress,{})}):De}function App(){const{changeLocale:De}=V$2(),Me=useQuery();reactExports.useEffect(()=>{const Ge=Me.get("locale");Ge&&["zh","en"].includes(Ge)&&De(Ge)},[]);const He=jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(CircularProgress,{})});return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:He,children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/issue-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(IssuePassport,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/lost-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(LostPassport,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/exchange-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(ExchangePassport,{})})}),jsxRuntimeExports.jsx(Route,{path:"/accept-server",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(NodeVerifyOwner,{action:"accept-server"})})}),jsxRuntimeExports.jsx(Route,{path:"/gen-key-pair/",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(GenKeyPair,{})})}),jsxRuntimeExports.jsx(Route,{path:"/launch-blocklet/*",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(LaunchBlockletProvider,{children:jsxRuntimeExports.jsx(BlockletLauncher,{})})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets/restore/*",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(BlockletAppProvider,{children:jsxRuntimeExports.jsx(BlockletRestore,{})})})}),jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/invite`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(Invite,{})})}),jsxRuntimeExports.jsx(Route,{path:"/*",element:jsxRuntimeExports.jsx(ProtectedApp,{})})]})})}function AppWrapper(){const De=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";return jsxRuntimeExports.jsx(BrowserRouter,{history:history$1,basename:De,children:jsxRuntimeExports.jsx(Root,{children:jsxRuntimeExports.jsx(App,{})})})}const root=clientExports.createRoot(document.getElementById("root"));root.render(jsxRuntimeExports.jsx(AppWrapper,{}));const prefix=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";register(`${prefix}/service-worker.js`.replace(/\/+/g,"/"),{registrationOptions:{scope:prefix},registered(){console.info("Service worker has been registered.")},ready(){console.info("Service worker is active.")},cached(){console.info("Content has been cached for offline use.")},updatefound(){console.info("New content is downloading.")},updated(){console.info("New content is available; please refresh.")},offline(){console.info("No internet connection found. App is running in offline mode.")},error(De){console.error("Error during service worker registration:",De)}});export{$$4 as $,useNavigate as A,useSearchParams as B,CircularProgress as C,DialogContentText as D,useMediaQuery as E,useMemoizedFn as F,Grid$1 as G,H$7 as H,o$f as I,y$8 as J,Box as K,Link as L,BlockletAppAvatar as M,Link$1 as N,isEmpty as O,oe as P,Tooltip as Q,FormControl as R,InputLabel as S,Typography as T,Select as U,V$2 as V,WrappedDidAddress as W,MenuItem as X,Checkbox as Y,Alert as Z,formatError as _,useSubscription as a,urlPathFriendlyExports as a$,CheckIcon$2 as a0,propTypesExports as a1,api as a2,merge as a3,cloneDeep as a4,IconButton as a5,R$4 as a6,ListItemSecondaryAction as a7,List as a8,ListItem as a9,getBlockletMetaUrl as aA,ErrorBoundary as aB,k$1 as aC,formatRegistryLogoPath as aD,Icon as aE,ListItemIcon as aF,createSvgIcon as aG,ensureDomainAliases as aH,constantExports$1 as aI,normalizePathPrefix as aJ,sortBy as aK,getIp as aL,stringSortHandlerAsc as aM,getAccessUrl as aN,history$1 as aO,semver as aP,useReactive as aQ,useAsyncEffect as aR,InfoOutlinedIcon as aS,sleep as aT,checkInputByType as aU,FormControlLabel as aV,Stack$1 as aW,useAsync as aX,axios as aY,shouldCheckDomainStatus as aZ,formatMountPoint as a_,ListItemText as aa,getServerUrl as ab,useBlockletAppContext as ac,getAuthMethodExports as ad,ConfirmDialog as ae,getRestoredAccessUrl as af,setSessionToken as ag,isEqual as ah,isServerlessBlockletInstalled as ai,Debug as aj,getWsClient as ak,useQuery as al,getPathPrefix as am,Global as an,Routes as ao,Route as ap,Navigate as aq,HeaderAddon as ar,SessionContext as as,css as at,$$5 as au,formatToDatetime as av,alpha$1 as aw,getLaunchAgreementUrl as ax,axios$2 as ay,useSessionContext$1 as az,constantExports as b,emphasize as b$,Menu as b0,checkIsWildcardDomain as b1,Popover as b2,Card as b3,formatToDate as b4,sortDomains as b5,A$6 as b6,Collapse as b7,CheckCircle as b8,styled as b9,f$7 as bA,Button as bB,createPassportSvg as bC,getWalletType as bD,useCreation as bE,BlockletAdminRoles as bF,isInstalling as bG,Badge as bH,createAppPassportSvg as bI,NavLink as bJ,__vitePreload as bK,SetCache as bL,arrayIncludes$1 as bM,arrayIncludesWith as bN,cacheHas as bO,baseUniq as bP,baseFlatten as bQ,baseRest as bR,last as bS,arrayFilter as bT,isArrayLikeObject as bU,t$a as bV,isDownloading as bW,getBlockletUrl as bX,getBlockletUrlParams as bY,ButtonBase as bZ,memoTheme as b_,isUrl as ba,__awaiter as bb,__generator as bc,__spread as bd,getDefaultExportFromCjs$1 as be,U$3 as bf,dayjs as bg,Divider as bh,isCertificateMatch as bi,FormHelperText as bj,FormGroup as bk,o$c as bl,NodeContext as bm,useParams as bn,useNodeContext$1 as bo,uniqBy as bp,l as bq,e$c as br,l$r as bs,copy as bt,libExports$1 as bu,B$4 as bv,o$9 as bw,l$k as bx,BlockletAvatar as by,ClickAwayListener as bz,createCompounder as c,useMount as c$,generateUtilityClasses as c0,generateUtilityClass as c1,useDefaultProps as c2,useSlotProps as c3,clsx$1 as c4,composeClasses as c5,__read as c6,toSlotDomain as c7,omit as c8,fixBlocklet as c9,d$d as cA,Avatar as cB,isFromWallet as cC,usePassportId as cD,isFunction$3 as cE,Container$3 as cF,K$4 as cG,getLauncherBaseURL as cH,SvgIcon as cI,Buffer$1 as cJ,parseURL as cK,withHttps as cL,useLaunchBlockletContext as cM,z$2 as cN,authorize as cO,E$9 as cP,ArrowForwardIcon as cQ,isNewStoreUrl as cR,getAccessibleUrl as cS,getBlockletLogoUrl as cT,t as cU,M$9 as cV,__spreadArrays as cW,__assign as cX,h$5 as cY,useLocation as cZ,l$8 as c_,isProtectedRole as ca,baseOrderBy as cb,isArray$1 as cc,rootShouldForwardProp as cd,useFormControl as ce,createChainedFunction$1 as cf,useSlot as cg,capitalize$1 as ch,SwitchBase as ci,createSimplePaletteValueFilter as cj,useControlled as ck,useForkRef as cl,useId as cm,getBlockletUrls as cn,defaultCheckAccessible as co,urlEvaluationExports as cp,memoize as cq,ButtonGroupContext as cr,ButtonGroupButtonContext as cs,useNotificationContext as ct,utilExports as cu,NotificationList as cv,useRequest as cw,isNumber$3 as cx,useLatest as cy,f$9 as cz,useBlockletsContext as d,applyStyles$1 as d$,s$8 as d0,formatDateTime as d1,getExplorerLink as d2,patchJsxToLocale as d3,T$6 as d4,getSessionToken as d5,LinearProgress as d6,SvgLogo as d7,isNumber$1 as d8,useEnhancedEffect$1 as d9,emotionUtils_browser_esm as dA,requireJsxRuntime as dB,requirePropTypes as dC,requireReactDom as dD,isObject$3 as dE,require$$0$2 as dF,require$$6$2 as dG,requireConstant$1 as dH,$e$1 as dI,noop$1 as dJ,Paper as dK,MenuList as dL,Popper as dM,_inheritsLoose$1 as dN,ReactDOM as dO,_objectWithoutPropertiesLoose$1 as dP,TransitionGroup as dQ,ENTERED as dR,ENTERING as dS,EXITING as dT,TransitionGroupContext as dU,Transition as dV,config$1 as dW,popperGenerator as dX,eventListeners as dY,popperOffsets$1 as dZ,computeStyles$1 as d_,debounce$2 as da,ownerWindow as db,useRtl as dc,KeyboardArrowLeft as dd,KeyboardArrowRight as de,useEventCallback$1 as df,ownerDocument as dg,getCommonHtmlTitle as dh,HelmetExport as di,requireReact as dj,i$e as dk,te$2 as dl,se$2 as dm,InfoIcon$2 as dn,upperFirst as dp,camelCase as dq,Skeleton as dr,R$6 as ds,isArrayLike as dt,baseIteratee as du,keys as dv,toInteger as dw,baseFindIndex as dx,commonjsGlobal as dy,getAugmentedNamespace as dz,useAsyncRetry as e,_extends$2 as e$,afterMain as e0,afterRead as e1,afterWrite as e2,arrow$1 as e3,auto as e4,basePlacements as e5,beforeMain as e6,beforeRead as e7,beforeWrite as e8,bottom as e9,process$1 as eA,requireLib$4 as eB,requireLib$5 as eC,requireLib$3 as eD,requireConstant$2 as eE,requireUrlPathFriendly as eF,b$9 as eG,data$t as eH,global$2 as eI,hoistStatics as eJ,isEqual$3 as eK,usePreviousProps as eL,setRef as eM,ClearIcon as eN,ArrowDropDownIcon as eO,Chip as eP,filledInputClasses as eQ,inputBaseClasses as eR,outlinedInputClasses as eS,inputClasses as eT,ListContext as eU,getListItemButtonUtilityClass as eV,listItemButtonClasses as eW,emotionReact_browser_esm as eX,emotionCache_browser_esm as eY,cloneDeep$1 as eZ,forceReflow as e_,clippingParents as ea,createPopper as eb,createPopper$1 as ec,detectOverflow as ed,end as ee,flip$1 as ef,hide$1 as eg,left as eh,main as ei,modifierPhases as ej,offset$1 as ek,placements as el,popper as em,preventOverflow$1 as en,read as eo,reference as ep,right as eq,start as er,top as es,variationPlacements as et,viewport as eu,write as ev,requireReactIs as ew,emotionStyled_browser_esm as ex,emotionSerialize_esm as ey,emotionSheet_esm as ez,useTheme as f,requireElliptic as f$,toString$2 as f0,mergeThemeOptions as f1,StyledEngineProvider as f2,ThemeProvider as f3,ThemeProvider$3 as f4,s$3 as f5,CloseIcon as f6,isString$1 as f7,createTheme as f8,createAxios as f9,isFocusVisible as fA,isHostComponent as fB,slotShouldForwardProp as fC,requireNormalizePathPrefix as fD,debounce as fE,useInterval as fF,formatTime as fG,CloseFullscreenIcon as fH,S$9 as fI,TablePagination as fJ,parseAvatar as fK,__rest as fL,useEffectWithTarget$1 as fM,__values as fN,tmp as fO,useUpdate as fP,requireUtil$6 as fQ,requireObjectKeys$1 as fR,requireShams$1 as fS,requireCallBound as fT,requireEsObjectAtoms as fU,requireDefineDataProperty as fV,requireHasPropertyDescriptors as fW,requireCallBind as fX,requireCallBound$1 as fY,requireSafeBuffer$1 as fZ,requireBrowser$f as f_,pick as fa,omitBy as fb,flat as fc,MenuIcon as fd,useDebounceFn as fe,Dialog as ff,OutlinedInput as fg,data as fh,Drawer as fi,parseQuery as fj,parseFilename as fk,stringifyParsedURL as fl,Grow as fm,Wt as fn,InputAdornment as fo,tooltipClasses as fp,requireEngine as fq,__spreadArray as fr,useEventListener as fs,le$6 as ft,getTargetElement as fu,MoreHorizIcon as fv,lighten as fw,darken as fx,clamp as fy,extractEventHandlers as fz,p$3 as g,useTheme$4 as g$,requireCryptoBrowserify as g0,requireRipemd160 as g1,requireLib$1 as g2,requireUtil$2 as g3,uniq as g4,useLocalStorageState as g5,InputBase as g6,useSize as g7,DialogTitle as g8,DialogContent as g9,arrayMap as gA,baseMap as gB,baseForOwn as gC,isPlainObject$2 as gD,require$$13 as gE,throttle$2 as gF,isUndefined$1 as gG,useTimeout as gH,Fade as gI,FocusTrap as gJ,dialogClasses as gK,s$i as gL,n$8 as gM,purify as gN,Buffer$1$1 as gO,Q$3 as gP,require$$0$1 as gQ,requireIsAbsoluteUrl as gR,requireDist$1 as gS,requireBrowser$3 as gT,require$$4$2 as gU,resolveProps as gV,useThemeProps as gW,defaultTheme$1 as gX,THEME_ID as gY,en$2 as gZ,isIndex as g_,DialogActions as ga,pickBy as gb,shouldForwardProp as gc,resolveComponentProps as gd,getInviteLink as ge,e$e as gf,getIssuePassportLink as gg,uniqBy$1 as gh,isNodeOwner as gi,isSelf as gj,Q$2 as gk,i$f as gl,I$4 as gm,Y$3 as gn,PQueue as go,getBlockletAccessibleUrl as gp,A$2 as gq,createPassportSvg$1 as gr,libExports$3 as gs,requireMs as gt,E$3 as gu,trim as gv,getBlockletSDK as gw,identity$1 as gx,arrayEach as gy,baseEach as gz,get$1 as h,data$z as h$,objectAssign as h0,__extends as h1,isServerless as h2,requireJsonStableStringify as h3,isFunction$2 as h4,omit$1 as h5,TableContext as h6,Tablelvl2Context as h7,g$d as h8,useUnmount as h9,withTrailingSlash as hA,data$C as hB,keyframes as hC,createUseStorageState as hD,isBrowser$1 as hE,root$1 as hF,isNil$1 as hG,require$$12 as hH,requireHoistNonReactStatics_cjs as hI,_assertThisInitialized$1 as hJ,reactDomExports as hK,loadIcon as hL,withoutLeadingSlash as hM,fetchSvgAsPng as hN,blobToFile as hO,withoutTrailingSlash as hP,u$2 as hQ,Ce as hR,t$g as hS,i as hT,R$9 as hU,p$f as hV,usePrevious as hW,browserExports$1 as hX,BlockletSDK as hY,highlightExports as hZ,funcExports as h_,isDidDomainOrIpEchoDomain as ha,ExpandLess as hb,validateDomain as hc,requireDist$2 as hd,requireAxios as he,trim$1 as hf,requirePRetry as hg,TableCell as hh,xe$1 as hi,getSystemDomains as hj,copyArray as hk,baseIndexOf as hl,ke as hm,useAppLogo as hn,getTransferAppLink as ho,requireBn$1 as hp,require$$3 as hq,updateWindowEnv as hr,requireAssertString as hs,isEmail as ht,isURL as hu,data$D as hv,M$5 as hw,isNil as hx,requireBase32 as hy,Re as hz,utilExports$1 as i,createStore as i$,useSnackbar as i0,common$3 as i1,green as i2,amber as i3,SnackbarContent as i4,d$f as i5,t$1 as i6,useDebounce as i7,Y as i8,g$3 as i9,NotificationContent$1 as iA,AvatarGroup as iB,requireCjs as iC,useTheme$2 as iD,baseAssignValue as iE,isValidClusterSize as iF,extractStatusUrlFromNextWorkflow as iG,pWaitFor as iH,hasRequiredSteps as iI,getStoreList as iJ,commonjsRequire as iK,require_interface as iL,requireHasown as iM,requireBrowser$1 as iN,requireSemver as iO,require$$4$1 as iP,flatten as iQ,trimEnd as iR,base32Exports as iS,flatExports as iT,Xt as iU,AxiosError as iV,o$h as iW,isNull as iX,orange as iY,purple as iZ,useStore as i_,b as ia,g$8 as ib,withErrorBoundary as ic,z$1 as id,M$6 as ie,Ke as ig,G$1 as ih,requireZh$1 as ii,requireDayjs_min as ij,K$6 as ik,l$w as il,isPlainObject$1 as im,xe as io,useBlockletLogo as ip,Toolbar as iq,_setPrototypeOf as ir,isString$3 as is,FormLabel as it,RelativeTime as iu,isIncludeActivity as iv,isUserActor as iw,ActorAvatar as ix,SendComponentAvatar as iy,Activity as iz,jsxRuntimeExports as j,create$1 as j0,t$h as j1,clientExports as j2,ke$1 as j3,retry as j4,isNetworkError as j5,requirePTimeout as j6,n$5 as j7,Modal as j8,GlobalStyles$2 as j9,filesize as k,prettyMs as l,formatLocale as m,useSessionContext as n,o$i as o,p$e as p,useSetState as q,reactExports as r,styled$3 as s,TextField as t,useNodeContext as u,n$4 as v,no as w,getWebWalletUrl as x,joinURL as y,withQuery as z};