@abtnode/webapp 1.16.32-beta-17be26d7 → 1.16.32-beta-f35ca4b8

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 (170) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{Add-DaKGD4dI.js → Add-CrVU4iag.js} +1 -1
  4. package/dist/assets/{ArrowDropDown-ChTH4y6x.js → ArrowDropDown-Dcn5e8ly.js} +1 -1
  5. package/dist/assets/{Autocomplete-4JAYTzWy.js → Autocomplete-aIdNDEL-.js} +1 -1
  6. package/dist/assets/{Breadcrumbs-CSvwbIEG.js → Breadcrumbs-CXRVOUaw.js} +1 -1
  7. package/dist/assets/{ButtonGroup-CZh258li.js → ButtonGroup-7mkCQlrm.js} +1 -1
  8. package/dist/assets/{CheckCircle-C9wvczio.js → CheckCircle-Bfk4fg63.js} +1 -1
  9. package/dist/assets/{ChevronLeft-BcAe4jGL.js → ChevronLeft-C0tWZhe0.js} +1 -1
  10. package/dist/assets/{ChevronRight-D3x_9psV.js → ChevronRight-Cy58kVA1.js} +1 -1
  11. package/dist/assets/{Close-Yb6PTPgZ.js → Close-uSQDOggL.js} +1 -1
  12. package/dist/assets/{Delete-DUmhYiAq.js → Delete-Dc7SNaDg.js} +1 -1
  13. package/dist/assets/{DeleteOutline-D5ZTK7Ka.js → DeleteOutline-DCHqqi5l.js} +1 -1
  14. package/dist/assets/{Done-DlneRio5.js → Done-BgYDb8pl.js} +1 -1
  15. package/dist/assets/{Edit-Bxg4cu8b.js → Edit-DS4SRT1Z.js} +1 -1
  16. package/dist/assets/{EditIcon-DZ4AA4ec.js → EditIcon-D-sfdNT0.js} +1 -1
  17. package/dist/assets/{ExpandMore-DpwumCaI.js → ExpandMore-DkEFEOxf.js} +1 -1
  18. package/dist/assets/{Google-ppCuuQRJ.js → Google-dURdg8SH.js} +1 -1
  19. package/dist/assets/{Https-ChBXh5m-.js → Https-CQFYbmfg.js} +1 -1
  20. package/dist/assets/{InputAdornment-I3Qa54dS.js → InputAdornment-C8mYs2cn.js} +1 -1
  21. package/dist/assets/{InputLabel-x5fGAphs.js → InputLabel-B1j7mM5X.js} +1 -1
  22. package/dist/assets/{LastPage-CFPei4j4.js → LastPage-DvyF__jR.js} +1 -1
  23. package/dist/assets/{Launch-DawysiT2.js → Launch-C9TnBby2.js} +1 -1
  24. package/dist/assets/{Link-Cl6uWJH_.js → Link-tptEI5Ov.js} +1 -1
  25. package/dist/assets/{LoadingButton-Bw0KBLnj.js → LoadingButton-BJeZNO98.js} +1 -1
  26. package/dist/assets/{LockIcon-CnkvxSHY.js → LockIcon-CCYDgiA9.js} +1 -1
  27. package/dist/assets/{Loop-BuLkY4qW.js → Loop-BV9sPKwB.js} +1 -1
  28. package/dist/assets/{MoreHoriz-C_qvzy_d.js → MoreHoriz-p0VaffeZ.js} +1 -1
  29. package/dist/assets/{MoreVert-DSqbsAYy.js → MoreVert-D7U3C1RJ.js} +1 -1
  30. package/dist/assets/{Pagination-CtEI84NR.js → Pagination-BNBOxoP7.js} +1 -1
  31. package/dist/assets/{Public-DTWYgdJa.js → Public-DldRmgtm.js} +1 -1
  32. package/dist/assets/{SchemaReference.es-DDBbuRq5.js → SchemaReference.es-Cj1qFzwO.js} +1 -1
  33. package/dist/assets/{Search-LvG1ITyu.js → Search-C72vhPrR.js} +1 -1
  34. package/dist/assets/{Select-DsA6mJ7A.js → Select-D1lY3LQG.js} +1 -1
  35. package/dist/assets/{Skeleton-DkInRABR.js → Skeleton-bksK9EQ0.js} +1 -1
  36. package/dist/assets/{Slider-ZuZU2f6x.js → Slider-CbEQ27T8.js} +1 -1
  37. package/dist/assets/{Stepper-AWCpL8Wp.js → Stepper-Doz-_QYU.js} +1 -1
  38. package/dist/assets/{TextField-CRqdsKdk.js → TextField-kQx3sAGR.js} +1 -1
  39. package/dist/assets/{ToggleButtonGroup-AtNMdn7e.js → ToggleButtonGroup-C1syeauh.js} +1 -1
  40. package/dist/assets/{ViewColumn-BCkzYaEc.js → ViewColumn-CBqnaawo.js} +1 -1
  41. package/dist/assets/{ViewList-5t3FBolC.js → ViewList-J5q5F0G_.js} +1 -1
  42. package/dist/assets/{actions-S3zHaigm.js → actions-C4t1PEJi.js} +1 -1
  43. package/dist/assets/{actions-BkAN9H2U.js → actions-Cn5PkGYM.js} +1 -1
  44. package/dist/assets/{agreement-mUf-NNwH.js → agreement-BW_X8O9K.js} +1 -1
  45. package/dist/assets/api-vPjN6Bfi.js +1 -0
  46. package/dist/assets/{app-avatar-CZMX5yC0.js → app-avatar-CzTx2uPE.js} +1 -1
  47. package/dist/assets/{audit-logs-C6NHUyCb.js → audit-logs-CBBPjsSt.js} +1 -1
  48. package/dist/assets/blocklet-cMQmhjnL.js +1 -0
  49. package/dist/assets/{brace-fold.es-BL24oDCP.js → brace-fold.es-3bhfSN2I.js} +1 -1
  50. package/dist/assets/{bundle-avatar-B_KhS55w.js → bundle-avatar-C6lYc46c.js} +1 -1
  51. package/dist/assets/{chart-TH03FheV.js → chart-B1HGYnJR.js} +1 -1
  52. package/dist/assets/{click-to-copy-DLjgvWtN.js → click-to-copy-DYkJUEds.js} +1 -1
  53. package/dist/assets/{closebrackets.es-CRue5Lj9.js → closebrackets.es-DeVqbYP2.js} +1 -1
  54. package/dist/assets/{codemirror.es-D6n4hw-Q.js → codemirror.es-Du4qRjp0.js} +1 -1
  55. package/dist/assets/{comment.es-CMqHFDro.js → comment.es-CCo2X9yk.js} +1 -1
  56. package/dist/assets/{config-navigation-BkjjlNR1.js → config-navigation-Cl0W33eM.js} +1 -1
  57. package/dist/assets/{delete-confirm-DSDxj3rA.js → delete-confirm-BeJKD7Bp.js} +1 -1
  58. package/dist/assets/{detail-BXayVQVW.js → detail-BpGjVixl.js} +3 -3
  59. package/dist/assets/{dialog.es-D689jSEc.js → dialog.es-PugcSzA-.js} +1 -1
  60. package/dist/assets/{download-BzRIfvfp.js → download-Botg6F7n.js} +1 -1
  61. package/dist/assets/{foldgutter.es-B9YVusGB.js → foldgutter.es-BGL4JV26.js} +1 -1
  62. package/dist/assets/getValidReactChildren-C3Ot9SvD.js +1 -0
  63. package/dist/assets/{hint.es-CskV4nd4.js → hint.es-Byg_BqGI.js} +1 -1
  64. package/dist/assets/{hint.es2-CfwqzILV.js → hint.es2-DOHf5haL.js} +1 -1
  65. package/dist/assets/{iframe-ZIaXI_5u.js → iframe-B0_yxwdl.js} +1 -1
  66. package/dist/assets/{index-CPveBdmQ.js → index-1quYfQ0h.js} +26 -26
  67. package/dist/assets/{index-D7RYoUXY.js → index-8nWfzKes.js} +1 -1
  68. package/dist/assets/{index-DK-C26MA.js → index-8yVQ7VYg.js} +1 -1
  69. package/dist/assets/{index-BZ5mGJWw.js → index-B-dgg_7V.js} +1 -1
  70. package/dist/assets/{index-2il1V33n.js → index-BGEa7wgm.js} +1 -1
  71. package/dist/assets/{index-DToDGE56.js → index-BGNI59h2.js} +1 -1
  72. package/dist/assets/{index-C-WTI7Cb.js → index-Bd88oXZE.js} +3 -3
  73. package/dist/assets/{index-CqCsZC4C.js → index-BjImoaPY.js} +1 -1
  74. package/dist/assets/{index-Dew8IExT.js → index-BpBCpY0O.js} +1 -1
  75. package/dist/assets/{index-2hMSNFcX.js → index-C0A64lpg.js} +1 -1
  76. package/dist/assets/{index-DDuCsifa.js → index-C0Ux2a-4.js} +1 -1
  77. package/dist/assets/{index-UkVmuOk4.js → index-C2-bicAv.js} +1 -1
  78. package/dist/assets/{index-D7uj8y87.js → index-C8AIaLfh.js} +1 -1
  79. package/dist/assets/{index-ikTCZuew.js → index-C8_Sa1ZZ.js} +1 -1
  80. package/dist/assets/{index-D8jEuOKc.js → index-C9QWROlO.js} +6 -6
  81. package/dist/assets/{index-DJbyuP0k.js → index-CAPmDJRT.js} +1 -1
  82. package/dist/assets/{index-CnJqCwcF.js → index-CBYC6xoV.js} +1 -1
  83. package/dist/assets/{index-Cr3n4oxk.js → index-CE43hPAy.js} +1 -1
  84. package/dist/assets/{index-IhPupL71.js → index-CcGSwTMt.js} +12 -12
  85. package/dist/assets/{index-BmM7M1I1.js → index-Cd0Mo1_w.js} +1 -1
  86. package/dist/assets/{index-BISktdZp.js → index-Co-UUK3y.js} +1 -1
  87. package/dist/assets/{index-D8MQ9ZVB.js → index-D0VO7WgE.js} +1 -1
  88. package/dist/assets/{index-By4cIMG9.js → index-D6UaRj0X.js} +1 -1
  89. package/dist/assets/{index-CrvugMt9.js → index-DALpnmZa.js} +1 -1
  90. package/dist/assets/{index-B5btqJ4H.js → index-DBUN7I_x.js} +1 -1
  91. package/dist/assets/{index-DKtCLP01.js → index-DNeFUdjP.js} +1 -1
  92. package/dist/assets/{index-B1dhqxPU.js → index-DP0Qx805.js} +1 -1
  93. package/dist/assets/{index-CAr2bcCQ.js → index-DQBtl0fk.js} +1 -1
  94. package/dist/assets/{index-zAZnE_sV.js → index-DQO2RskJ.js} +1 -1
  95. package/dist/assets/{index-BEhFvOUG.js → index-DUZgU2qh.js} +1 -1
  96. package/dist/assets/{index-cBkUep-u.js → index-DeaRODgK.js} +1 -1
  97. package/dist/assets/{index-ePYaxWaQ.js → index-DeiblLLO.js} +1 -1
  98. package/dist/assets/{index-CK4JTdjQ.js → index-Dfddf3Zf.js} +1 -1
  99. package/dist/assets/{index-CNUQDecb.js → index-DhNPGktt.js} +1 -1
  100. package/dist/assets/{index-CrJbtDDR.js → index-Kac2SwHT.js} +1 -1
  101. package/dist/assets/{index-ZzQVQqI_.js → index-OJDHb5ZY.js} +1 -1
  102. package/dist/assets/{index-Do26lepM.js → index-UsBHl2fn.js} +5 -5
  103. package/dist/assets/{index-X_twkRjU.js → index-_cR88l1n.js} +1 -1
  104. package/dist/assets/{index-Cw0JQB9z.js → index-dKvWGHlG.js} +1 -1
  105. package/dist/assets/{index-CGxA_e3u.js → index-euGBouHi.js} +3 -3
  106. package/dist/assets/{index-DAyoBn_4.js → index-fLBtZX_u.js} +1 -1
  107. package/dist/assets/{index-BZeec5qC.js → index-o6UEpCzX.js} +1 -1
  108. package/dist/assets/{index-BGLg0vvo.js → index-vahMKwUj.js} +10 -10
  109. package/dist/assets/{index.es-Ce1reDLt.js → index.es-BxVSrDG1.js} +1 -1
  110. package/dist/assets/{index.esm-D4aSKUKj.js → index.esm-DkiKGA7O.js} +1 -1
  111. package/dist/assets/{info-addon.es-Gw4G3zLm.js → info-addon.es-BpgVPfAf.js} +1 -1
  112. package/dist/assets/{info.es-DwIeLjFc.js → info.es-DUGHSeuV.js} +1 -1
  113. package/dist/assets/{install-from-url-41g9-VzW.js → install-from-url-DOdPcOLo.js} +1 -1
  114. package/dist/assets/{invitation-Cn2oy3yS.js → invitation-B8rpCHkF.js} +1 -1
  115. package/dist/assets/{is-path-prefix-equal-DNcDIcWb.js → is-path-prefix-equal-B3nYZSlR.js} +1 -1
  116. package/dist/assets/{isEqual-Bqorz6b9.js → isEqual-Bh4I8aKs.js} +1 -1
  117. package/dist/assets/{item-SOaEd0D1.js → item-FJYzqgxR.js} +31 -31
  118. package/dist/assets/{javascript.es-H569uOzV.js → javascript.es-DJeH8pQ5.js} +1 -1
  119. package/dist/assets/{jump-to-line.es-BEsHX6V3.js → jump-to-line.es-CHS7Cpce.js} +1 -1
  120. package/dist/assets/{jump.es-Ckm7XeeY.js → jump.es-B8fZ5UkD.js} +1 -1
  121. package/dist/assets/{line-BpgEsi16.js → line-BxqlcjK5.js} +3 -3
  122. package/dist/assets/{lint.es-BqlNOL8M.js → lint.es-dNi4Ghyk.js} +1 -1
  123. package/dist/assets/{lint.es2-BDoZAwzu.js → lint.es2-C58OpqsC.js} +1 -1
  124. package/dist/assets/{lint.es3-_dkyqTUe.js → lint.es3-BvXIsXsu.js} +1 -1
  125. package/dist/assets/{list-header-dggL7_n2.js → list-header-Dj2MozqK.js} +1 -1
  126. package/dist/assets/{log-Dl3vYHcH.js → log-wE1x1bn4.js} +1 -1
  127. package/dist/assets/{lottie-C3nxmlxK.js → lottie-C_o2afe-.js} +1 -1
  128. package/dist/assets/{matchbrackets.es-tA0nPUuc.js → matchbrackets.es-rYpajz6C.js} +1 -1
  129. package/dist/assets/{memory-Bu0JELz3.js → memory-BP-6gvQx.js} +1 -1
  130. package/dist/assets/{mode.es-D4L5Xyl2.js → mode.es-Bl1GOgFG.js} +1 -1
  131. package/dist/assets/{mode.es2-CUsDPFgy.js → mode.es2-BGLi7eHl.js} +1 -1
  132. package/dist/assets/{mode.es3-Ch4z8bv5.js → mode.es3-CuL41pUD.js} +1 -1
  133. package/dist/assets/{onlineParser.es-DzN1JLcS.js → onlineParser.es-DqkyzxAH.js} +1 -1
  134. package/dist/assets/{overview-C7jzc_u_.js → overview-DbeljR0t.js} +1 -1
  135. package/dist/assets/{react-X622xIru.js → react-Cq9eJ3Pl.js} +3 -3
  136. package/dist/assets/{redux-rfMuaiI1.js → redux-b00FNul4.js} +1 -1
  137. package/dist/assets/{resource-dialog-D-vI8e9q.js → resource-dialog-BmGWI1C9.js} +1 -1
  138. package/dist/assets/{runtime-DP943eRP.js → runtime-CpZ4o9fb.js} +1 -1
  139. package/dist/assets/{schema-DeVB3oly.js → schema-BijIBYj3.js} +1 -1
  140. package/dist/assets/sdk-CwPZ3suW.js +1 -0
  141. package/dist/assets/{search.es-BaUbACv2.js → search.es-Bt-btCjo.js} +1 -1
  142. package/dist/assets/{searchcursor.es-39IycBFs.js → searchcursor.es-DZhpv8ff.js} +1 -1
  143. package/dist/assets/{service-BimlVy43.js → service-CR1LOIU5.js} +1 -1
  144. package/dist/assets/{shorten-label-CBdfm00-.js → shorten-label-e4SQFDIH.js} +1 -1
  145. package/dist/assets/{show-hint.es-DMpxvfoA.js → show-hint.es-JabryCH1.js} +1 -1
  146. package/dist/assets/{slicedToArray-7c7-iQ0t.js → slicedToArray-C3c8ZMzC.js} +2 -2
  147. package/dist/assets/{spaces-UaG0_4_u.js → spaces-Bu2IhfbA.js} +1 -1
  148. package/dist/assets/{status-BGxv0mkt.js → status-kAhSFHIM.js} +1 -1
  149. package/dist/assets/{sublime.es-qDoQTC8D.js → sublime.es-CxnSzwic.js} +1 -1
  150. package/dist/assets/{switch-control-D6_lOJtw.js → switch-control-FJGNlGgR.js} +1 -1
  151. package/dist/assets/{table-icons-C1Wv7bvQ.js → table-icons-CWkkl61x.js} +1 -1
  152. package/dist/assets/{team-BOnxiYnY.js → team-BLioMvZg.js} +1 -1
  153. package/dist/assets/{toUpper-C-8-jotc.js → toUpper-gLmZ1q0C.js} +1 -1
  154. package/dist/assets/{traffic-Hfc3zrFY.js → traffic-BBsVBreQ.js} +1 -1
  155. package/dist/assets/{url-evaluation-DRU1r0m1.js → url-evaluation-DZQMDJ58.js} +1 -1
  156. package/dist/assets/{url-join-gOj2D4JC.js → url-join-BR2c59F6.js} +1 -1
  157. package/dist/assets/{use-blocklet-info-for-connect-did-spaces-BqkHUfqx.js → use-blocklet-info-for-connect-did-spaces-DqWceY_h.js} +1 -1
  158. package/dist/assets/{useLocalStorage-VUDmm0Mk.js → useLocalStorage-kQm6yPnj.js} +1 -1
  159. package/dist/assets/{useThemeProps-_vPkb6TM.js → useThemeProps-DzCadJBj.js} +1 -1
  160. package/dist/assets/{util-CKYVxmGJ.js → util-D5KPPsSc.js} +1 -1
  161. package/dist/assets/{wait-container-BbsYBUX1.js → wait-container-BiujCyhV.js} +1 -1
  162. package/dist/assets/{withStyles-DM17B_mO.js → withStyles-eMUb1FPy.js} +1 -1
  163. package/dist/assets/{wrap-locale-BYabtx-L.js → wrap-locale-BpbnnA7O.js} +1 -1
  164. package/dist/index.html +1 -1
  165. package/dist/service-worker.js +1 -1
  166. package/package.json +1 -1
  167. package/dist/assets/api-DaQrSR6d.js +0 -1
  168. package/dist/assets/blocklet-_qJbakx7.js +0 -1
  169. package/dist/assets/getValidReactChildren-DAG74NDJ.js +0 -1
  170. package/dist/assets/sdk-BqXPS3TR.js +0 -1
@@ -1,4 +1,4 @@
1
- import{g as c}from"./index-D8jEuOKc.js";var i={exports:{}};/*!
1
+ import{g as c}from"./index-C9QWROlO.js";var i={exports:{}};/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
@@ -1,4 +1,4 @@
1
- import{g as We,Y as Ge,n as P,Q as v,Z as Q,j as e,$ as ke,r as x,P as E,t as _,a0 as ue,a1 as be,q as C,a2 as se,a3 as He,E as M,M as K,a4 as qe,m as A,T as Ve,a5 as Ye,B,D as Qe,C as ve,x as Ke,K as Se,a6 as Je,a7 as Ze,a8 as Xe,u as I,f as et,a9 as W,v as te,F as tt,aa as oe,A as je,w as re,ab as st,W as ne,i as J,y as Ce,z as Z,ac as ot,ad as rt,ae as Pe,af as nt,b as D,ag as at,O as it,ah as lt,R as ct,J as Re,ai as dt,aj as pt,ak as Te,al as Ee,am as De,an as Be,ao as Ue,ap as N,aq as Oe,ar as _e,as as Fe,at as ht}from"./index-D8jEuOKc.js";import{P as H,L as mt,A as ut,S as Ae,a as Le}from"./index-D8MQ9ZVB.js";import{A as ft,D as ae,u as xt,W as gt,P as wt,L as $e,d as Ne,a as Me}from"./wait-container-BbsYBUX1.js";import{_ as fe}from"./useLocalStorage-VUDmm0Mk.js";import{d as yt}from"./Launch-DawysiT2.js";import{d as kt}from"./DeleteOutline-D5ZTK7Ka.js";import{g as bt,i as vt}from"./spaces-UaG0_4_u.js";import{T as St}from"./TextField-CRqdsKdk.js";import{i as xe}from"./isEqual-Bqorz6b9.js";import{d as jt}from"./MoreVert-DSqbsAYy.js";import{E as Ct}from"./index-DK-C26MA.js";import"./url-join-gOj2D4JC.js";import"./Skeleton-DkInRABR.js";import"./Close-Yb6PTPgZ.js";import"./lottie-C3nxmlxK.js";import"./api-DaQrSR6d.js";import"./Select-DsA6mJ7A.js";import"./InputLabel-x5fGAphs.js";var Pt=Ge;function Rt(t){return Pt(t).toLowerCase()}var Tt=Rt;const Et=We(Tt);function ie({children:t,selected:i}){return e.jsxs(Dt,{children:[t,e.jsx(v,{className:`selected-container ${i?"selected":""}`,children:e.jsx(ke,{className:"selected-icon"})})]})}const Dt=P(v)`
1
+ import{g as We,Y as Ge,n as P,Q as v,Z as Q,j as e,$ as ke,r as x,P as E,t as _,a0 as ue,a1 as be,q as C,a2 as se,a3 as He,E as M,M as K,a4 as qe,m as A,T as Ve,a5 as Ye,B,D as Qe,C as ve,x as Ke,K as Se,a6 as Je,a7 as Ze,a8 as Xe,u as I,f as et,a9 as W,v as te,F as tt,aa as oe,A as je,w as re,ab as st,W as ne,i as J,y as Ce,z as Z,ac as ot,ad as rt,ae as Pe,af as nt,b as D,ag as at,O as it,ah as lt,R as ct,J as Re,ai as dt,aj as pt,ak as Te,al as Ee,am as De,an as Be,ao as Ue,ap as N,aq as Oe,ar as _e,as as Fe,at as ht}from"./index-C9QWROlO.js";import{P as H,L as mt,A as ut,S as Ae,a as Le}from"./index-D0VO7WgE.js";import{A as ft,D as ae,u as xt,W as gt,P as wt,L as $e,d as Ne,a as Me}from"./wait-container-BiujCyhV.js";import{_ as fe}from"./useLocalStorage-kQm6yPnj.js";import{d as yt}from"./Launch-C9TnBby2.js";import{d as kt}from"./DeleteOutline-DCHqqi5l.js";import{g as bt,i as vt}from"./spaces-Bu2IhfbA.js";import{T as St}from"./TextField-kQx3sAGR.js";import{i as xe}from"./isEqual-Bh4I8aKs.js";import{d as jt}from"./MoreVert-D7U3C1RJ.js";import{E as Ct}from"./index-8yVQ7VYg.js";import"./url-join-BR2c59F6.js";import"./Skeleton-bksK9EQ0.js";import"./Close-uSQDOggL.js";import"./lottie-C_o2afe-.js";import"./api-vPjN6Bfi.js";import"./Select-D1lY3LQG.js";import"./InputLabel-B1j7mM5X.js";var Pt=Ge;function Rt(t){return Pt(t).toLowerCase()}var Tt=Rt;const Et=We(Tt);function ie({children:t,selected:i}){return e.jsxs(Dt,{children:[t,e.jsx(v,{className:`selected-container ${i?"selected":""}`,children:e.jsx(ke,{className:"selected-icon"})})]})}const Dt=P(v)`
2
2
  position: relative;
3
3
 
4
4
  .selected-container {
@@ -1,4 +1,4 @@
1
- import{bJ as Vc,j as h,P as E,n as D0,C as bM,r as V,eZ as tb,cJ as Cc,cO as qb,k as gz,g as rb,J as Qz,cy as Pc,$ as Fc,e_ as jc,eA as Yc,dt as Ic,du as Uc,e$ as Hc,f0 as Kc,m as Qc,X as Jc,aK as $c,aL as Zc,f1 as MA,eD as wz,bb as bA,ez as zA,s as pA}from"./index-D8jEuOKc.js";import{j as OA}from"./url-join-gOj2D4JC.js";import{S as h2}from"./Skeleton-DkInRABR.js";import{C as oA}from"./Close-Yb6PTPgZ.js";import{l as cA}from"./lottie-C3nxmlxK.js";const AA=Vc([h.jsx("circle",{cx:"12",cy:"19",r:"2"},"0"),h.jsx("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function nb({value:M,size:z,style:O,...o}){return h.jsxs(eA,{style:{width:z,height:z,...O},...o,children:[h.jsx(bM,{variant:"determinate",role:"progressbar",value:100,size:z,"aria-label":"decorative progress bar",thickness:10,style:{color:"#dddddd"}}),h.jsx(bM,{variant:"determinate",value:M,role:"progressbar",size:z,thickness:10,"aria-label":"main progress bar"})]})}nb.propTypes={value:E.number.isRequired,size:E.number,style:E.object};nb.defaultProps={size:10,style:{}};const eA=D0.span`
1
+ import{bJ as Vc,j as h,P as E,n as D0,C as bM,r as V,eZ as tb,cJ as Cc,cO as qb,k as gz,g as rb,J as Qz,cy as Pc,$ as Fc,e_ as jc,eA as Yc,dt as Ic,du as Uc,e$ as Hc,f0 as Kc,m as Qc,X as Jc,aK as $c,aL as Zc,f1 as MA,eD as wz,bb as bA,ez as zA,s as pA}from"./index-C9QWROlO.js";import{j as OA}from"./url-join-BR2c59F6.js";import{S as h2}from"./Skeleton-bksK9EQ0.js";import{C as oA}from"./Close-uSQDOggL.js";import{l as cA}from"./lottie-C_o2afe-.js";const AA=Vc([h.jsx("circle",{cx:"12",cy:"19",r:"2"},"0"),h.jsx("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function nb({value:M,size:z,style:O,...o}){return h.jsxs(eA,{style:{width:z,height:z,...O},...o,children:[h.jsx(bM,{variant:"determinate",role:"progressbar",value:100,size:z,"aria-label":"decorative progress bar",thickness:10,style:{color:"#dddddd"}}),h.jsx(bM,{variant:"determinate",value:M,role:"progressbar",size:z,thickness:10,"aria-label":"main progress bar"})]})}nb.propTypes={value:E.number.isRequired,size:E.number,style:E.object};nb.defaultProps={size:10,style:{}};const eA=D0.span`
2
2
  display: inline-block;
3
3
  position: relative;
4
4
  > * {
@@ -1,4 +1,4 @@
1
- import{u as R,j as o,C,aw as F,cz as T,A as b,t as W,ct as D,r,aU as _,k as d,q as x,ak as k,ad as z,y as E,av as O,z as $,bk as q,n as A}from"./index-D8jEuOKc.js";import{I as K}from"./invitation-Cn2oy3yS.js";import"./index-CNUQDecb.js";import"./index-2il1V33n.js";import"./sdk-BqXPS3TR.js";import"./CheckCircle-C9wvczio.js";import"./wrap-locale-BYabtx-L.js";function M(v){const{api:i,session:f}=F(),{info:s}=R(),c=T(),p=b(),{t:l,locale:m}=W(),{encryptKey:P,decrypt:N}=D(),[S,w]=r.useState(!1),h=r.useMemo(()=>new URLSearchParams(c.search).get("inviteId"),[c]),a=_(async()=>{if(!h)return null;let e;const{data:n}=await i.get("/api/invitation",{params:{inviteId:h}}),t=!!d(s,"ownerNft.did")&&n.role.name==="owner";if(t){const u=new URL(window.location.href);u.pathname=x(k(),"/api/did/invite/token"),u.searchParams.set("_ek_",P),u.searchParams.set("inviteId",h);const{data:j}=await i.get(u.href);e=j}return{invitation:n,nextWorkflow:e,needReceiveNFT:t}}),L=r.useCallback(()=>{w(!0)},[]),y=r.useCallback(()=>{if(a.error)throw a.error;return a.value.invitation},[a]),g=r.useCallback(async e=>{e&&z(N(e.sessionToken));const n=new URLSearchParams(c.search);n.delete("inviteId");const t=n.toString();await f.refresh(),p(`/${t&&`?${t}`}`,{replace:!0})},[c,p,f]);if(a.loading)return o.jsx(C,{});const I=()=>{const e=new URL(window.location.href);e.pathname=x(k(),"/api/did/invite/status"),e.searchParams.set("_t_",a.value.nextWorkflow.token),e.searchParams.set("locale",m);const n=setInterval(async()=>{const{data:t}=await i.get(e.href);t.status==="succeed"&&(clearInterval(n),f.updateConnectedInfo(t),g(t))},2e3)},U=()=>{w(!1)};return o.jsxs(B,{className:"page-invite",children:[d(a,"value.needReceiveNFT")&&o.jsx(E,{action:"login",popup:!0,className:"connect",open:S,locale:m,baseUrl:s.launcher.url,checkFn:O.create({baseURL:s.launcher.url}).get,onSuccess:I,onClose:U,checkTimeout:5*60*1e3,webWalletUrl:$(s),extraParams:{nw:d(a,"value.nextWorkflow.url")},messages:{title:l("invite.transferNFTDialog.title",{name:s.name}),scan:l("invite.transferNFTDialog.scan"),confirm:l("invite.transferNFTDialog.confirm"),success:l("invite.transferNFTDialog.success")},prefix:"/.well-known/service/api/did"}),o.jsx(K,{...v,getDataFn:y,createPassportSvg:e=>q(e,s),checkFn:i.get,onLoginSuccess:g,passportColor:"default",onReceive:d(a,"value.needReceiveNFT")?L:null})]})}const B=A.div`
1
+ import{u as R,j as o,C,aw as F,cz as T,A as b,t as W,ct as D,r,aU as _,k as d,q as x,ak as k,ad as z,y as E,av as O,z as $,bk as q,n as A}from"./index-C9QWROlO.js";import{I as K}from"./invitation-B8rpCHkF.js";import"./index-DhNPGktt.js";import"./index-BGEa7wgm.js";import"./sdk-CwPZ3suW.js";import"./CheckCircle-Bfk4fg63.js";import"./wrap-locale-BpbnnA7O.js";function M(v){const{api:i,session:f}=F(),{info:s}=R(),c=T(),p=b(),{t:l,locale:m}=W(),{encryptKey:P,decrypt:N}=D(),[S,w]=r.useState(!1),h=r.useMemo(()=>new URLSearchParams(c.search).get("inviteId"),[c]),a=_(async()=>{if(!h)return null;let e;const{data:n}=await i.get("/api/invitation",{params:{inviteId:h}}),t=!!d(s,"ownerNft.did")&&n.role.name==="owner";if(t){const u=new URL(window.location.href);u.pathname=x(k(),"/api/did/invite/token"),u.searchParams.set("_ek_",P),u.searchParams.set("inviteId",h);const{data:j}=await i.get(u.href);e=j}return{invitation:n,nextWorkflow:e,needReceiveNFT:t}}),L=r.useCallback(()=>{w(!0)},[]),y=r.useCallback(()=>{if(a.error)throw a.error;return a.value.invitation},[a]),g=r.useCallback(async e=>{e&&z(N(e.sessionToken));const n=new URLSearchParams(c.search);n.delete("inviteId");const t=n.toString();await f.refresh(),p(`/${t&&`?${t}`}`,{replace:!0})},[c,p,f]);if(a.loading)return o.jsx(C,{});const I=()=>{const e=new URL(window.location.href);e.pathname=x(k(),"/api/did/invite/status"),e.searchParams.set("_t_",a.value.nextWorkflow.token),e.searchParams.set("locale",m);const n=setInterval(async()=>{const{data:t}=await i.get(e.href);t.status==="succeed"&&(clearInterval(n),f.updateConnectedInfo(t),g(t))},2e3)},U=()=>{w(!1)};return o.jsxs(B,{className:"page-invite",children:[d(a,"value.needReceiveNFT")&&o.jsx(E,{action:"login",popup:!0,className:"connect",open:S,locale:m,baseUrl:s.launcher.url,checkFn:O.create({baseURL:s.launcher.url}).get,onSuccess:I,onClose:U,checkTimeout:5*60*1e3,webWalletUrl:$(s),extraParams:{nw:d(a,"value.nextWorkflow.url")},messages:{title:l("invite.transferNFTDialog.title",{name:s.name}),scan:l("invite.transferNFTDialog.scan"),confirm:l("invite.transferNFTDialog.confirm"),success:l("invite.transferNFTDialog.success")},prefix:"/.well-known/service/api/did"}),o.jsx(K,{...v,getDataFn:y,createPassportSvg:e=>q(e,s),checkFn:i.get,onLoginSuccess:g,passportColor:"default",onReceive:d(a,"value.needReceiveNFT")?L:null})]})}const B=A.div`
2
2
  width: 100vw;
3
3
  height: 100%;
4
4
  min-height: 100vh;
@@ -1 +1 @@
1
- import{r as E,t as j,A as I,j as e,X as W,C as k,cr as T,Q as v,y as L,E as h,H as N,u as R,z as S,am as U,ad as b}from"./index-D8jEuOKc.js";import{w as F}from"./wrap-locale-BYabtx-L.js";function _({SessionContext:t,webWalletUrl:a,onSuccess:c}){var g,u;const{api:o,session:n}=E.useContext(t),{t:s,locale:m}=j(),w=I(),{searchParams:l}=new URL(window.location.href),d=l.get("redirect"),P=async(r,C)=>{c(r,C),await n.refresh(),h.success(s("exchangePassport.success")),setTimeout(()=>{if(d){const i=decodeURIComponent(d);i.startsWith(N.WELLKNOWN_SERVICE_PATH_PREFIX)?w(i,{replace:!0}):window.location=i}else window.location=window.env.pathPrefix||window.env.apiPrefix||"/"},3e3)},f=r=>{h.error(r.message)},x={},p=l.get("componentId");return p&&(x.componentId=p),n.loading?e.jsx(W,{children:e.jsx(k,{})}):e.jsx(T,{did:((g=window==null?void 0:window.blocklet)==null?void 0:g.appPid)||((u=window==null?void 0:window.env)==null?void 0:u.appPid),children:e.jsx(v,{sx:{width:"560px",maxWidth:"100%",height:"100%"},children:e.jsx(L,{className:"connect",action:"exchange-passport",checkFn:o.get,checkTimeout:10*60*1e3,webWalletUrl:a,onSuccess:P,onError:f,locale:m,messages:{title:s("exchangePassport.dialog.title"),scan:s("exchangePassport.dialog.scan"),confirm:s("exchangePassport.dialog.confirm"),success:s("exchangePassport.dialog.success")},extraParams:x,extraContent:null})})})}const y=F(_);function H(){const{info:t}=R(),a=S(t),c=(o,n)=>{o.sessionToken&&b(n(o.sessionToken))};return e.jsx(y,{SessionContext:U,webWalletUrl:a,onSuccess:c})}export{H as default};
1
+ import{r as E,t as j,A as I,j as e,X as W,C as k,cr as T,Q as v,y as L,E as h,H as N,u as R,z as S,am as U,ad as b}from"./index-C9QWROlO.js";import{w as F}from"./wrap-locale-BpbnnA7O.js";function _({SessionContext:t,webWalletUrl:a,onSuccess:c}){var g,u;const{api:o,session:n}=E.useContext(t),{t:s,locale:m}=j(),w=I(),{searchParams:l}=new URL(window.location.href),d=l.get("redirect"),P=async(r,C)=>{c(r,C),await n.refresh(),h.success(s("exchangePassport.success")),setTimeout(()=>{if(d){const i=decodeURIComponent(d);i.startsWith(N.WELLKNOWN_SERVICE_PATH_PREFIX)?w(i,{replace:!0}):window.location=i}else window.location=window.env.pathPrefix||window.env.apiPrefix||"/"},3e3)},f=r=>{h.error(r.message)},x={},p=l.get("componentId");return p&&(x.componentId=p),n.loading?e.jsx(W,{children:e.jsx(k,{})}):e.jsx(T,{did:((g=window==null?void 0:window.blocklet)==null?void 0:g.appPid)||((u=window==null?void 0:window.env)==null?void 0:u.appPid),children:e.jsx(v,{sx:{width:"560px",maxWidth:"100%",height:"100%"},children:e.jsx(L,{className:"connect",action:"exchange-passport",checkFn:o.get,checkTimeout:10*60*1e3,webWalletUrl:a,onSuccess:P,onError:f,locale:m,messages:{title:s("exchangePassport.dialog.title"),scan:s("exchangePassport.dialog.scan"),confirm:s("exchangePassport.dialog.confirm"),success:s("exchangePassport.dialog.success")},extraParams:x,extraContent:null})})})}const y=F(_);function H(){const{info:t}=R(),a=S(t),c=(o,n)=>{o.sessionToken&&b(n(o.sessionToken))};return e.jsx(y,{SessionContext:U,webWalletUrl:a,onSuccess:c})}export{H as default};
@@ -1,4 +1,4 @@
1
- import{q as ge,n as N,P as S,r as D,f as ke,j as e,C as V,i as je,u as me,t as K,v as ye,w as Ce,D as ve,B as z,x as Se,m as E,y as Be,z as we,A as de,E as $,F as De,d as Te,H as Ae,J as Ee,K as se,M as Ie,N as W,O as oe,Q as j,R as Le,S as R,U as Pe,V as Re,X as _e}from"./index-D8jEuOKc.js";import{_ as Fe}from"./useLocalStorage-VUDmm0Mk.js";import{g as Ne,D as Ue}from"./index-UkVmuOk4.js";import{E as Oe}from"./index-DK-C26MA.js";import{B as ne}from"./status-BGxv0mkt.js";import{D as Me,u as We,B as le}from"./actions-S3zHaigm.js";import{l as re}from"./index-B1dhqxPU.js";import{u as pe,W as ze}from"./url-evaluation-DRU1r0m1.js";import{I as $e,B as qe}from"./install-from-url-41g9-VzW.js";import{B as ae}from"./app-avatar-CZMX5yC0.js";import{d as Ve}from"./Add-DaKGD4dI.js";import{S as A}from"./index-cBkUep-u.js";import{i as Ke,a as Qe}from"./schema-DeVB3oly.js";import{T as ie}from"./TextField-CRqdsKdk.js";import{F as Xe,S as He}from"./Select-DsA6mJ7A.js";import"./useThemeProps-_vPkb6TM.js";import"./index-ZzQVQqI_.js";import"./redux-rfMuaiI1.js";import"./ViewColumn-BCkzYaEc.js";import"./Delete-DUmhYiAq.js";import"./InputLabel-x5fGAphs.js";import"./LastPage-CFPei4j4.js";import"./Search-LvG1ITyu.js";import"./MoreVert-DSqbsAYy.js";import"./ButtonGroup-CZh258li.js";import"./getValidReactChildren-DAG74NDJ.js";import"./isEqual-Bqorz6b9.js";import"./index-zAZnE_sV.js";import"./Stepper-AWCpL8Wp.js";import"./ExpandMore-DpwumCaI.js";import"./index-D7RYoUXY.js";const Je=(p,c)=>{if(!p)return"";const m=new URL(p),l=new URLSearchParams(m.searchParams),b=new URL(ge(m.origin,c));return b.search=l.toString(),b.toString()};function F({blocklet:p,skipAccessibilityCheck:c=!1,...m}){const{t:l}=D.useContext(ke),{urls:b,loading:n,recommendedUrl:u}=pe(p);if(n&&!c)return e.jsx(V,{size:12,...m});const f=c?b[0]:u;return f?e.jsx(Ye,{...m,children:e.jsx(Ge,{children:e.jsx(je,{href:f,target:"_blank",className:"blocklet-interface",underline:"hover",children:l("common.open")})})}):l("blocklet.router.noAccessibleUrl")}const Ge=N.div`
1
+ import{q as ge,n as N,P as S,r as D,f as ke,j as e,C as V,i as je,u as me,t as K,v as ye,w as Ce,D as ve,B as z,x as Se,m as E,y as Be,z as we,A as de,E as $,F as De,d as Te,H as Ae,J as Ee,K as se,M as Ie,N as W,O as oe,Q as j,R as Le,S as R,U as Pe,V as Re,X as _e}from"./index-C9QWROlO.js";import{_ as Fe}from"./useLocalStorage-kQm6yPnj.js";import{g as Ne,D as Ue}from"./index-C2-bicAv.js";import{E as Oe}from"./index-8yVQ7VYg.js";import{B as ne}from"./status-kAhSFHIM.js";import{D as Me,u as We,B as le}from"./actions-C4t1PEJi.js";import{l as re}from"./index-DP0Qx805.js";import{u as pe,W as ze}from"./url-evaluation-DZQMDJ58.js";import{I as $e,B as qe}from"./install-from-url-DOdPcOLo.js";import{B as ae}from"./app-avatar-CzTx2uPE.js";import{d as Ve}from"./Add-CrVU4iag.js";import{S as A}from"./index-DeaRODgK.js";import{i as Ke,a as Qe}from"./schema-BijIBYj3.js";import{T as ie}from"./TextField-kQx3sAGR.js";import{F as Xe,S as He}from"./Select-D1lY3LQG.js";import"./useThemeProps-DzCadJBj.js";import"./index-OJDHb5ZY.js";import"./redux-b00FNul4.js";import"./ViewColumn-CBqnaawo.js";import"./Delete-Dc7SNaDg.js";import"./InputLabel-B1j7mM5X.js";import"./LastPage-DvyF__jR.js";import"./Search-C72vhPrR.js";import"./MoreVert-D7U3C1RJ.js";import"./ButtonGroup-7mkCQlrm.js";import"./getValidReactChildren-C3Ot9SvD.js";import"./isEqual-Bh4I8aKs.js";import"./index-DQO2RskJ.js";import"./Stepper-Doz-_QYU.js";import"./ExpandMore-DkEFEOxf.js";import"./index-8nWfzKes.js";const Je=(p,c)=>{if(!p)return"";const m=new URL(p),l=new URLSearchParams(m.searchParams),b=new URL(ge(m.origin,c));return b.search=l.toString(),b.toString()};function F({blocklet:p,skipAccessibilityCheck:c=!1,...m}){const{t:l}=D.useContext(ke),{urls:b,loading:n,recommendedUrl:u}=pe(p);if(n&&!c)return e.jsx(V,{size:12,...m});const f=c?b[0]:u;return f?e.jsx(Ye,{...m,children:e.jsx(Ge,{children:e.jsx(je,{href:f,target:"_blank",className:"blocklet-interface",underline:"hover",children:l("common.open")})})}):l("blocklet.router.noAccessibleUrl")}const Ge=N.div`
2
2
  display: flex;
3
3
  margin: 4px 0;
4
4
  `,Ye=N.div`
@@ -1 +1 @@
1
- import{u as d,j as o,C as f,A as h,aw as v,cg as C,ch as u,Q as j,bk as I,ad as P,H as k}from"./index-D8jEuOKc.js";import{I as R}from"./invitation-Cn2oy3yS.js";import"./index-CNUQDecb.js";import"./index-2il1V33n.js";import"./sdk-BqXPS3TR.js";import"./CheckCircle-C9wvczio.js";import"./wrap-locale-BYabtx-L.js";function S(n){const{searchParams:i}=new URL(window.location.href),g=h(),{api:a,session:r}=v(),{info:l}=d(),c=i.get("redirect"),p=i.get("id"),t=C(async()=>{if(!p)return null;const{data:e}=await a.get("/api/invitation",{params:{inviteId:p,mode:"issue-passport"}});return e}),m=u(()=>{if(t.error)throw t.error;return t==null?void 0:t.data}),w=u(async(e,x=s=>s)=>{e&&(e.sessionToken&&P(x(e.sessionToken)),await r.refresh()),setTimeout(()=>{if(c){const s=decodeURIComponent(c);s.startsWith(k.WELLKNOWN_SERVICE_PATH_PREFIX)?g(s,{replace:!0}):window.location=s}else window.location=window.env.pathPrefix||"/"},50)});return t.loading?o.jsx(f,{}):o.jsx(j,{className:"page-invite",sx:{width:"100vw",height:"100%",minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#f6f8fa",overflow:"auto",padding:"20px"},children:o.jsx(R,{...n,action:"issue-passport",getDataFn:m,createPassportSvg:e=>I(e,l),checkFn:a.get,onLoginSuccess:w,passportColor:"default",onLogin:r.login})})}function H(){return d().loading?o.jsx(f,{}):o.jsx(S,{})}export{H as default};
1
+ import{u as d,j as o,C as f,A as h,aw as v,cg as C,ch as u,Q as j,bk as I,ad as P,H as k}from"./index-C9QWROlO.js";import{I as R}from"./invitation-B8rpCHkF.js";import"./index-DhNPGktt.js";import"./index-BGEa7wgm.js";import"./sdk-CwPZ3suW.js";import"./CheckCircle-Bfk4fg63.js";import"./wrap-locale-BpbnnA7O.js";function S(n){const{searchParams:i}=new URL(window.location.href),g=h(),{api:a,session:r}=v(),{info:l}=d(),c=i.get("redirect"),p=i.get("id"),t=C(async()=>{if(!p)return null;const{data:e}=await a.get("/api/invitation",{params:{inviteId:p,mode:"issue-passport"}});return e}),m=u(()=>{if(t.error)throw t.error;return t==null?void 0:t.data}),w=u(async(e,x=s=>s)=>{e&&(e.sessionToken&&P(x(e.sessionToken)),await r.refresh()),setTimeout(()=>{if(c){const s=decodeURIComponent(c);s.startsWith(k.WELLKNOWN_SERVICE_PATH_PREFIX)?g(s,{replace:!0}):window.location=s}else window.location=window.env.pathPrefix||"/"},50)});return t.loading?o.jsx(f,{}):o.jsx(j,{className:"page-invite",sx:{width:"100vw",height:"100%",minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#f6f8fa",overflow:"auto",padding:"20px"},children:o.jsx(R,{...n,action:"issue-passport",getDataFn:m,createPassportSvg:e=>I(e,l),checkFn:a.get,onLoginSuccess:w,passportColor:"default",onLogin:r.login})})}function H(){return d().loading?o.jsx(f,{}):o.jsx(S,{})}export{H as default};
@@ -1 +1 @@
1
- import{cO as P,eC as M,eD as E,eE as g,eF as Y,eG as N,eH as j}from"./index-D8jEuOKc.js";import{a as X}from"./isEqual-Bqorz6b9.js";var V={},i={},d={},G=P&&P.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(d,"__esModule",{value:!0});d.toStrictHex=d.toBytes=d.toBits=d.DID_PREFIX=void 0;const K=G(M),H=g,v="did:abt:";d.DID_PREFIX=v;const q=e=>{try{if((0,H.isHexStrict)(e))return E.from((0,H.stripHexPrefix)(e),"hex");let t=(0,H.fromBase58)(e.replace(v,""));for(;t.length<26;)t=E.concat([E.from([0]),t]);return t}catch(t){throw new Error(`Cannot convert DID string to byte array: ${t.message}`)}};d.toBytes=q;const J=(e,t)=>(0,K.default)((0,H.toBN)(e).toString(2),t,"0");d.toBits=J;const W=(e,t)=>{const s=e.replace(/^0x/i,"");return typeof t=="number"&&t%2===0?(0,K.default)(e,t,"0"):s.length%2===0?s:`0${s}`};d.toStrictHex=W;var C=P&&P.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0});i.DidType=i.toChecksumAddress=i.isEthereumDid=i.isEthereumType=i.toTypeInfoStr=i.toTypeInfo=i.fromTypeInfo=i.DID_TYPE_ETHEREUM=i.DID_TYPE_ARCBLOCK=void 0;const m=g,D=C(Y),z=C(X),A=C(N),o=j,T=d,b={pk:"key",address:"encoding"},B={role:o.types.RoleType.ROLE_ACCOUNT,pk:o.types.KeyType.ED25519,hash:o.types.HashType.SHA3,address:o.types.EncodingType.BASE58};i.DID_TYPE_ARCBLOCK=B;const R={role:o.types.RoleType.ROLE_ACCOUNT,pk:o.types.KeyType.ETHEREUM,hash:o.types.HashType.KECCAK,address:o.types.EncodingType.BASE16};i.DID_TYPE_ETHEREUM=R;const F=e=>{const t=["pk","hash","address"];return(0,z.default)((0,A.default)(e,t),(0,A.default)(R,t))};i.isEthereumType=F;const L=e=>{const t=(0,m.toAddress)(e);return/^(0x)?[0-9a-f]{40}$/i.test(t)?/^(0x|0X)?[0-9a-f]{40}$/.test(t)||/^(0x|0X)?[0-9A-F]{40}$/.test(t)?!0:Q(t):!1};i.isEthereumDid=L;const Q=e=>{const t=e.replace(/^0x/i,""),s=o.Hasher.Keccak.hash256(t.toLowerCase()).replace(/^0x/i,"");for(let r=0;r<40;r++)if(parseInt(s[r],16)>7&&t[r].toUpperCase()!==t[r]||parseInt(s[r],16)<=7&&t[r].toLowerCase()!==t[r])return!1;return!0},Z=e=>{if(typeof e>"u")return"";if(!/^(0x)?[0-9a-f]{40}$/i.test(e))throw new Error(`Given address "${e}" is not a valid Ethereum address.`);const t=e.toLowerCase().replace(/^0x/i,""),s=o.Hasher.Keccak.hash256(t).replace(/^0x/i,"");let r="0x";for(let n=0;n<t.length;n++)parseInt(s[n],16)>7?r+=t[n].toUpperCase():r+=t[n];return r};i.toChecksumAddress=Z;function k(e={}){let t={};["default","arcblock"].includes(e)?t=B:["eth","ethereum"].includes(e)?t=R:t={...B,...e};const{role:s,pk:r,hash:n,address:u}=t;Object.keys(t).forEach(l=>{const _=(0,D.default)(`${b[l]||l}Type`);if(Object.values(o.types[_]).includes(t[l])===!1)throw new Error(`Unsupported ${l} type: ${t[l]}`)});const p={role:s,pk:r,hash:n,address:u};return F(p)===!1&&[o.types.RoleType.ROLE_NODE,o.types.RoleType.ROLE_VALIDATOR,o.types.RoleType.ROLE_TETHER,o.types.RoleType.ROLE_SWAP].includes(p.role)&&(p.hash=o.types.HashType.SHA2),p}i.DidType=k;k.toJSON=e=>Object.keys(e).reduce((t,s)=>{const r=(0,D.default)(`${b[s]||s}Type`),n=Object.keys(o.types[r]),u=Object.values(o.types[r]);return t[s]=n[u.indexOf(e[s])],t},{});k.fromJSON=e=>Object.keys(e).reduce((t,s)=>{const r=(0,D.default)(`${b[s]||s}Type`),n=Object.keys(o.types[r]),u=Object.values(o.types[r]);return t[s]=u[n.indexOf(e[s])],t},{});const x=e=>{const t=k(e),s=(0,T.toBits)(t.role,6),r=(0,T.toBits)(t.pk,5),n=(0,T.toBits)(t.hash,5),u=`${s}${r}${n}`,p=(0,m.stripHexPrefix)((0,m.numberToHex)(parseInt(u,2)));return(0,T.toStrictHex)(p,4)};i.fromTypeInfo=x;const w=e=>{let t={};try{if(L(e))t=R;else{const r=(0,T.toBytes)(e).slice(0,2),n=(0,T.toStrictHex)(E.from(r).toString("hex")),u=(0,T.toBits)(new m.BN(n,16),16),p=u.slice(0,6),l=u.slice(6,11),_=u.slice(11,16);t={role:parseInt(p,2),pk:parseInt(l,2),hash:parseInt(_,2),address:(0,m.isHex)((0,m.toAddress)(e))?o.types.EncodingType.BASE16:o.types.EncodingType.BASE58}}return Object.keys(t).forEach(s=>{Object.values(o.types[`${(0,D.default)(b[s]||s)}Type`]).includes(t[s])===!1&&delete t[s]}),t}catch{return t}};i.toTypeInfo=w;const ee=e=>{const t=w(e);return Object.keys(t).reduce((s,r)=>{const n=o.types[`${(0,D.default)(b[r]||r)}Type`];return s[r]=Object.keys(n).find(u=>n[u]===t[r]),s},{})};i.toTypeInfoStr=ee;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DID_TYPE_ETHEREUM=e.DID_TYPE_ARCBLOCK=e.DID_PREFIX=e.DidType=e.fromTypeInfo=e.toTypeInfoStr=e.toTypeInfo=e.isEthereumType=e.isEthereumDid=e.isValid=e.isFromPublicKey=e.toDid=e.toAddress=e.fromHash=e.fromPublicKeyHash=e.fromPublicKey=e.fromSecretKey=e.toStrictHex=e.types=void 0;const t=j;Object.defineProperty(e,"types",{enumerable:!0,get:function(){return t.types}});const s=g;Object.defineProperty(e,"toAddress",{enumerable:!0,get:function(){return s.toAddress}}),Object.defineProperty(e,"toDid",{enumerable:!0,get:function(){return s.toDid}});const r=i;Object.defineProperty(e,"DidType",{enumerable:!0,get:function(){return r.DidType}}),Object.defineProperty(e,"DID_TYPE_ARCBLOCK",{enumerable:!0,get:function(){return r.DID_TYPE_ARCBLOCK}}),Object.defineProperty(e,"DID_TYPE_ETHEREUM",{enumerable:!0,get:function(){return r.DID_TYPE_ETHEREUM}}),Object.defineProperty(e,"fromTypeInfo",{enumerable:!0,get:function(){return r.fromTypeInfo}}),Object.defineProperty(e,"isEthereumDid",{enumerable:!0,get:function(){return r.isEthereumDid}}),Object.defineProperty(e,"isEthereumType",{enumerable:!0,get:function(){return r.isEthereumType}}),Object.defineProperty(e,"toTypeInfo",{enumerable:!0,get:function(){return r.toTypeInfo}}),Object.defineProperty(e,"toTypeInfoStr",{enumerable:!0,get:function(){return r.toTypeInfoStr}});const n=d;Object.defineProperty(e,"DID_PREFIX",{enumerable:!0,get:function(){return n.DID_PREFIX}}),Object.defineProperty(e,"toStrictHex",{enumerable:!0,get:function(){return n.toStrictHex}});const u=(y,a)=>{const c=(0,r.DidType)(a),f=(0,t.getSigner)(c.pk).getPublicKey(y);return p(f.indexOf("0x")===0?f:`0x${f}`,c)};e.fromSecretKey=u;const p=(y,a)=>{const c=(0,r.DidType)(a),h=(0,t.getHasher)(c.hash)(y,1);return l(h,c)};e.fromPublicKey=p;const l=(y,a)=>{const c=(0,r.DidType)(a),f=(0,s.stripHexPrefix)(y).slice(0,40),h=(0,t.getHasher)(c.hash),I=(0,r.fromTypeInfo)(c),S=(0,s.stripHexPrefix)(h(`0x${I}${f}`,1)).slice(0,8),O=`0x${I}${f}${S}`;return(0,r.isEthereumType)(c)?(0,r.toChecksumAddress)(`0x${y.slice(-40)}`):c.address===t.types.EncodingType.BASE58?(0,s.toBase58)(O):O};e.fromPublicKeyHash=l;const _=(y,a=t.types.RoleType.ROLE_ACCOUNT)=>{const c=Object.keys(t.types.RoleType),f=Object.values(t.types.RoleType);if(f.indexOf(a)===-1)throw new Error(`Unsupported role type ${a} when gen ddi from hash`);const h=(0,r.DidType)({role:t.types.RoleType[c[f.indexOf(a)]]});return l(y,h)};e.fromHash=_;const U=(y,a)=>{if($(y)===!1)return!1;const c=(0,r.toTypeInfo)(y),f=p(a,c),h=y.replace(n.DID_PREFIX,"");return f===h};e.isFromPublicKey=U;const $=y=>{if(!y)return!1;const a=(0,s.toAddress)(String(y)),{hash:c}=(0,r.toTypeInfo)(a);if(typeof c>"u")return!1;if((0,r.isEthereumDid)(a))return!0;const f=(0,t.getHasher)(c),h=(0,n.toBytes)(a),I=(0,n.toStrictHex)(E.from(h.slice(0,22)).toString("hex")),S=(0,n.toStrictHex)(E.from(h.slice(22,26)).toString("hex")),O=(0,s.stripHexPrefix)(f(`0x${I}`,1)).slice(0,8);return S===O};e.isValid=$})(V);export{V as l};
1
+ import{cO as P,eC as M,eD as E,eE as g,eF as Y,eG as N,eH as j}from"./index-C9QWROlO.js";import{a as X}from"./isEqual-Bh4I8aKs.js";var V={},i={},d={},G=P&&P.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(d,"__esModule",{value:!0});d.toStrictHex=d.toBytes=d.toBits=d.DID_PREFIX=void 0;const K=G(M),H=g,v="did:abt:";d.DID_PREFIX=v;const q=e=>{try{if((0,H.isHexStrict)(e))return E.from((0,H.stripHexPrefix)(e),"hex");let t=(0,H.fromBase58)(e.replace(v,""));for(;t.length<26;)t=E.concat([E.from([0]),t]);return t}catch(t){throw new Error(`Cannot convert DID string to byte array: ${t.message}`)}};d.toBytes=q;const J=(e,t)=>(0,K.default)((0,H.toBN)(e).toString(2),t,"0");d.toBits=J;const W=(e,t)=>{const s=e.replace(/^0x/i,"");return typeof t=="number"&&t%2===0?(0,K.default)(e,t,"0"):s.length%2===0?s:`0${s}`};d.toStrictHex=W;var C=P&&P.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0});i.DidType=i.toChecksumAddress=i.isEthereumDid=i.isEthereumType=i.toTypeInfoStr=i.toTypeInfo=i.fromTypeInfo=i.DID_TYPE_ETHEREUM=i.DID_TYPE_ARCBLOCK=void 0;const m=g,D=C(Y),z=C(X),A=C(N),o=j,T=d,b={pk:"key",address:"encoding"},B={role:o.types.RoleType.ROLE_ACCOUNT,pk:o.types.KeyType.ED25519,hash:o.types.HashType.SHA3,address:o.types.EncodingType.BASE58};i.DID_TYPE_ARCBLOCK=B;const R={role:o.types.RoleType.ROLE_ACCOUNT,pk:o.types.KeyType.ETHEREUM,hash:o.types.HashType.KECCAK,address:o.types.EncodingType.BASE16};i.DID_TYPE_ETHEREUM=R;const F=e=>{const t=["pk","hash","address"];return(0,z.default)((0,A.default)(e,t),(0,A.default)(R,t))};i.isEthereumType=F;const L=e=>{const t=(0,m.toAddress)(e);return/^(0x)?[0-9a-f]{40}$/i.test(t)?/^(0x|0X)?[0-9a-f]{40}$/.test(t)||/^(0x|0X)?[0-9A-F]{40}$/.test(t)?!0:Q(t):!1};i.isEthereumDid=L;const Q=e=>{const t=e.replace(/^0x/i,""),s=o.Hasher.Keccak.hash256(t.toLowerCase()).replace(/^0x/i,"");for(let r=0;r<40;r++)if(parseInt(s[r],16)>7&&t[r].toUpperCase()!==t[r]||parseInt(s[r],16)<=7&&t[r].toLowerCase()!==t[r])return!1;return!0},Z=e=>{if(typeof e>"u")return"";if(!/^(0x)?[0-9a-f]{40}$/i.test(e))throw new Error(`Given address "${e}" is not a valid Ethereum address.`);const t=e.toLowerCase().replace(/^0x/i,""),s=o.Hasher.Keccak.hash256(t).replace(/^0x/i,"");let r="0x";for(let n=0;n<t.length;n++)parseInt(s[n],16)>7?r+=t[n].toUpperCase():r+=t[n];return r};i.toChecksumAddress=Z;function k(e={}){let t={};["default","arcblock"].includes(e)?t=B:["eth","ethereum"].includes(e)?t=R:t={...B,...e};const{role:s,pk:r,hash:n,address:u}=t;Object.keys(t).forEach(l=>{const _=(0,D.default)(`${b[l]||l}Type`);if(Object.values(o.types[_]).includes(t[l])===!1)throw new Error(`Unsupported ${l} type: ${t[l]}`)});const p={role:s,pk:r,hash:n,address:u};return F(p)===!1&&[o.types.RoleType.ROLE_NODE,o.types.RoleType.ROLE_VALIDATOR,o.types.RoleType.ROLE_TETHER,o.types.RoleType.ROLE_SWAP].includes(p.role)&&(p.hash=o.types.HashType.SHA2),p}i.DidType=k;k.toJSON=e=>Object.keys(e).reduce((t,s)=>{const r=(0,D.default)(`${b[s]||s}Type`),n=Object.keys(o.types[r]),u=Object.values(o.types[r]);return t[s]=n[u.indexOf(e[s])],t},{});k.fromJSON=e=>Object.keys(e).reduce((t,s)=>{const r=(0,D.default)(`${b[s]||s}Type`),n=Object.keys(o.types[r]),u=Object.values(o.types[r]);return t[s]=u[n.indexOf(e[s])],t},{});const x=e=>{const t=k(e),s=(0,T.toBits)(t.role,6),r=(0,T.toBits)(t.pk,5),n=(0,T.toBits)(t.hash,5),u=`${s}${r}${n}`,p=(0,m.stripHexPrefix)((0,m.numberToHex)(parseInt(u,2)));return(0,T.toStrictHex)(p,4)};i.fromTypeInfo=x;const w=e=>{let t={};try{if(L(e))t=R;else{const r=(0,T.toBytes)(e).slice(0,2),n=(0,T.toStrictHex)(E.from(r).toString("hex")),u=(0,T.toBits)(new m.BN(n,16),16),p=u.slice(0,6),l=u.slice(6,11),_=u.slice(11,16);t={role:parseInt(p,2),pk:parseInt(l,2),hash:parseInt(_,2),address:(0,m.isHex)((0,m.toAddress)(e))?o.types.EncodingType.BASE16:o.types.EncodingType.BASE58}}return Object.keys(t).forEach(s=>{Object.values(o.types[`${(0,D.default)(b[s]||s)}Type`]).includes(t[s])===!1&&delete t[s]}),t}catch{return t}};i.toTypeInfo=w;const ee=e=>{const t=w(e);return Object.keys(t).reduce((s,r)=>{const n=o.types[`${(0,D.default)(b[r]||r)}Type`];return s[r]=Object.keys(n).find(u=>n[u]===t[r]),s},{})};i.toTypeInfoStr=ee;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DID_TYPE_ETHEREUM=e.DID_TYPE_ARCBLOCK=e.DID_PREFIX=e.DidType=e.fromTypeInfo=e.toTypeInfoStr=e.toTypeInfo=e.isEthereumType=e.isEthereumDid=e.isValid=e.isFromPublicKey=e.toDid=e.toAddress=e.fromHash=e.fromPublicKeyHash=e.fromPublicKey=e.fromSecretKey=e.toStrictHex=e.types=void 0;const t=j;Object.defineProperty(e,"types",{enumerable:!0,get:function(){return t.types}});const s=g;Object.defineProperty(e,"toAddress",{enumerable:!0,get:function(){return s.toAddress}}),Object.defineProperty(e,"toDid",{enumerable:!0,get:function(){return s.toDid}});const r=i;Object.defineProperty(e,"DidType",{enumerable:!0,get:function(){return r.DidType}}),Object.defineProperty(e,"DID_TYPE_ARCBLOCK",{enumerable:!0,get:function(){return r.DID_TYPE_ARCBLOCK}}),Object.defineProperty(e,"DID_TYPE_ETHEREUM",{enumerable:!0,get:function(){return r.DID_TYPE_ETHEREUM}}),Object.defineProperty(e,"fromTypeInfo",{enumerable:!0,get:function(){return r.fromTypeInfo}}),Object.defineProperty(e,"isEthereumDid",{enumerable:!0,get:function(){return r.isEthereumDid}}),Object.defineProperty(e,"isEthereumType",{enumerable:!0,get:function(){return r.isEthereumType}}),Object.defineProperty(e,"toTypeInfo",{enumerable:!0,get:function(){return r.toTypeInfo}}),Object.defineProperty(e,"toTypeInfoStr",{enumerable:!0,get:function(){return r.toTypeInfoStr}});const n=d;Object.defineProperty(e,"DID_PREFIX",{enumerable:!0,get:function(){return n.DID_PREFIX}}),Object.defineProperty(e,"toStrictHex",{enumerable:!0,get:function(){return n.toStrictHex}});const u=(y,a)=>{const c=(0,r.DidType)(a),f=(0,t.getSigner)(c.pk).getPublicKey(y);return p(f.indexOf("0x")===0?f:`0x${f}`,c)};e.fromSecretKey=u;const p=(y,a)=>{const c=(0,r.DidType)(a),h=(0,t.getHasher)(c.hash)(y,1);return l(h,c)};e.fromPublicKey=p;const l=(y,a)=>{const c=(0,r.DidType)(a),f=(0,s.stripHexPrefix)(y).slice(0,40),h=(0,t.getHasher)(c.hash),I=(0,r.fromTypeInfo)(c),S=(0,s.stripHexPrefix)(h(`0x${I}${f}`,1)).slice(0,8),O=`0x${I}${f}${S}`;return(0,r.isEthereumType)(c)?(0,r.toChecksumAddress)(`0x${y.slice(-40)}`):c.address===t.types.EncodingType.BASE58?(0,s.toBase58)(O):O};e.fromPublicKeyHash=l;const _=(y,a=t.types.RoleType.ROLE_ACCOUNT)=>{const c=Object.keys(t.types.RoleType),f=Object.values(t.types.RoleType);if(f.indexOf(a)===-1)throw new Error(`Unsupported role type ${a} when gen ddi from hash`);const h=(0,r.DidType)({role:t.types.RoleType[c[f.indexOf(a)]]});return l(y,h)};e.fromHash=_;const U=(y,a)=>{if($(y)===!1)return!1;const c=(0,r.toTypeInfo)(y),f=p(a,c),h=y.replace(n.DID_PREFIX,"");return f===h};e.isFromPublicKey=U;const $=y=>{if(!y)return!1;const a=(0,s.toAddress)(String(y)),{hash:c}=(0,r.toTypeInfo)(a);if(typeof c>"u")return!1;if((0,r.isEthereumDid)(a))return!0;const f=(0,t.getHasher)(c),h=(0,n.toBytes)(a),I=(0,n.toStrictHex)(E.from(h.slice(0,22)).toString("hex")),S=(0,n.toStrictHex)(E.from(h.slice(22,26)).toString("hex")),O=(0,s.stripHexPrefix)(f(`0x${I}`,1)).slice(0,8);return S===O};e.isValid=$})(V);export{V as l};
@@ -1,4 +1,4 @@
1
- import{r as P,j as t,t as J,u as Z,aj as De,cs as ee,N as Q,n as U,B as tt,P as de,aw as st,A as $e,ct as nt,w as at,cu as rt,ab as ot,av as ye,bm as je,q as K,b as oe,E as ue,M as ke,ag as lt,R as G,X,C as A,O as ze,i as pe,W as it,y as ct,z as Ee,af as dt,cv as ut,ad as pt,c7 as Te,cw as Ae,a9 as ht,H as mt,aC as le,J as ft,ai as gt,ak as vt,al as xt,am as bt,cx as yt,an as jt,K as kt,ao as wt,ap as q,aq as Pt,ar as Ct}from"./index-D8jEuOKc.js";import{L as Y,P as Me,A as _t,S as Lt,a as Bt}from"./index-D8MQ9ZVB.js";import{u as Ut,A as St,W as Ot,P as It,D as we,L as Pe,d as Ce,a as _e}from"./wait-container-BbsYBUX1.js";import{C as Ve,d as Nt,A as Rt}from"./agreement-mUf-NNwH.js";import{a as Dt}from"./api-DaQrSR6d.js";import{i as $t}from"./isEqual-Bqorz6b9.js";import{_ as zt}from"./useLocalStorage-VUDmm0Mk.js";import{t as Et}from"./schema-DeVB3oly.js";import{s as Tt}from"./logo-BKA11TRi.js";import"./url-join-gOj2D4JC.js";import"./Skeleton-DkInRABR.js";import"./Close-Yb6PTPgZ.js";import"./lottie-C3nxmlxK.js";import"./index-IhPupL71.js";import"./index-B1dhqxPU.js";import"./index-D7RYoUXY.js";var he={};Object.defineProperty(he,"__esModule",{value:!0});var Fe=he.default=void 0;At(P);var w=t;function At(e){return e&&e.__esModule?e:{default:e}}function Le(e,s){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);s&&(a=a.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,a)}return n}function Be(e){for(var s=1;s<arguments.length;s++){var n=arguments[s]!=null?arguments[s]:{};s%2?Le(Object(n),!0).forEach(function(a){Mt(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Le(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Mt(e,s,n){return(s=Vt(s))in e?Object.defineProperty(e,s,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[s]=n,e}function Vt(e){var s=Ft(e,"string");return typeof s=="symbol"?s:s+""}function Ft(e,s){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,s||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(e)}var me=function(s){return(0,w.jsxs)("svg",Be(Be({},s),{},{children:[(0,w.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 10.642L31.72 0 13.288 10.642v14.152L1 31.89v21.283l18.432 10.642 12.258-7.077.03.017.03-.017 12.258 7.077L62.44 53.172V31.89l-12.288-7.095V10.642zM60.52 32.997l-12.288-7.094V11.75L31.72 2.217 15.208 11.75v14.153L2.92 32.997v19.067l16.512 9.533L31.69 54.52l.03.017.03-.017 12.258 7.077 16.512-9.533V32.997z",fill:"url(#paint0_linear_615_428)"}),(0,w.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 24.83L31.72 14.19 13.288 24.831v21.283L31.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L31.72 54.539l-16.512-9.533V25.939zm14.52-3.756l.484.284 12.202 7.142 1.073.61V40.4l-.408.287-.461.32-12.89 7.545-7.743-4.503.02-17.35 7.722-4.516zm-5.822 20.762l.017-15.145 5.804-3.393 11.728 6.866.112.063v8.066L29.725 46.33l-5.819-3.384zm4.04-12.717l1.442-.827L38.2 34.53v1.66l-8.845 5.146-1.443-.833.034-10.273zm7.862 5.133l-5.971 3.474.023-6.935 5.948 3.46z",fill:"url(#paint1_linear_615_428)"}),(0,w.jsxs)("defs",{children:[(0,w.jsxs)("linearGradient",{id:"paint0_linear_615_428",x1:"31.72",y1:"95.721",x2:"95.488",y2:"34.325",gradientUnits:"userSpaceOnUse",children:[(0,w.jsx)("stop",{stopColor:"#0FA4B7"}),(0,w.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,w.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,w.jsxs)("linearGradient",{id:"paint1_linear_615_428",x1:"28.437",y1:"99.246",x2:"98.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,w.jsx)("stop",{stopColor:"#0FA4B7"}),(0,w.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,w.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};me.defaultProps={width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};me.displayName="launcher-logo-notext";Fe=he.default=me;var fe={};Object.defineProperty(fe,"__esModule",{value:!0});var We=fe.default=void 0;Wt(P);var x=t;function Wt(e){return e&&e.__esModule?e:{default:e}}function Ue(e,s){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);s&&(a=a.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,a)}return n}function Se(e){for(var s=1;s<arguments.length;s++){var n=arguments[s]!=null?arguments[s]:{};s%2?Ue(Object(n),!0).forEach(function(a){Ht(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ue(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Ht(e,s,n){return(s=qt(s))in e?Object.defineProperty(e,s,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[s]=n,e}function qt(e){var s=Kt(e,"string");return typeof s=="symbol"?s:s+""}function Kt(e,s){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,s||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(e)}var ge=function(s){return(0,x.jsxs)("svg",Se(Se({},s),{},{children:[(0,x.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M80.005 25.994V10h7.737a3.79 3.79 0 0 1 3.79 3.79v1.149a3.777 3.777 0 0 1-1.035 2.602 3.788 3.788 0 0 1 1.901 3.286v1.377a3.79 3.79 0 0 1-3.79 3.79h-8.603zm1.684-8.957h6.226a2.105 2.105 0 0 0 1.932-2.098v-1.15a2.105 2.105 0 0 0-2.105-2.105h-6.053v5.353zm0 7.273v-5.582l6.92-.007c1.163 0 2.105.943 2.105 2.106v1.377a2.105 2.105 0 0 1-2.105 2.106h-6.92zM97.255 10v15.994h-1.762V10h1.762zm8.733 4.319h-1.827a3.81 3.81 0 0 0-3.811 3.81v4.054a3.81 3.81 0 0 0 3.811 3.81h1.827a3.811 3.811 0 0 0 3.811-3.81V18.13a3.811 3.811 0 0 0-3.811-3.81zm-1.827 1.762a2.05 2.05 0 0 0-2.049 2.048v4.054a2.05 2.05 0 0 0 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049V18.13a2.048 2.048 0 0 0-2.048-2.048h-1.827zM125.204 26v-5.754h2.148L130.674 26h2.035l-3.821-6.618 2.993-5.184h-2.035l-2.474 4.286h-2.168V10h-1.762v16h1.762zm-5.556-7.56v-.31a2.048 2.048 0 0 0-2.048-2.05h-1.827a2.048 2.048 0 0 0-2.049 2.05v4.053c0 1.132.917 2.049 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049v-.311h1.762v.311a3.81 3.81 0 0 1-3.81 3.81h-1.827a3.81 3.81 0 0 1-3.811-3.81V18.13a3.81 3.81 0 0 1 3.811-3.81h1.827a3.81 3.81 0 0 1 3.81 3.81v.312h-1.762zm17.918 7.554V10h-1.762v15.994h1.762zm4.989-5.357v1.546c0 1.132.917 2.049 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049v-.311h1.762v.311a3.81 3.81 0 0 1-3.81 3.81h-1.827a3.81 3.81 0 0 1-3.811-3.81V18.13a3.81 3.81 0 0 1 3.811-3.81h1.827a3.81 3.81 0 0 1 3.81 3.81v.746h.001v1.762h-7.687zm5.924-1.762h-5.924v-.746c0-1.131.917-2.048 2.049-2.048h1.827c1.131 0 2.048.917 2.048 2.048v.746zm5.489-1.912H152.4v-1.762h1.568v-2.848h1.684v2.848h4.077v1.762h-4.077v5.677a1.669 1.669 0 1 0 3.339 0v-.35h1.684v.35a3.353 3.353 0 1 1-6.707 0v-5.677z",fill:"#121319"}),(0,x.jsx)("path",{d:"M92.112 50.259v3.108H80.254V33.123h3.766v17.136h8.092zM101.843 47.235c-.999.047-1.839.135-2.52.266-.681.121-1.227.28-1.638.476-.41.196-.705.425-.882.686a1.49 1.49 0 0 0-.266.854c0 .606.177 1.04.532 1.302.364.261.835.392 1.414.392.71 0 1.32-.126 1.834-.378.523-.261 1.031-.654 1.526-1.176v-2.422zm-7.924-6.23c1.652-1.512 3.64-2.268 5.964-2.268.84 0 1.591.14 2.254.42.663.27 1.223.653 1.68 1.148a4.765 4.765 0 0 1 1.036 1.75c.243.681.364 1.428.364 2.24v9.072h-1.568c-.327 0-.579-.047-.756-.14-.177-.103-.317-.303-.42-.602l-.308-1.036c-.364.327-.719.616-1.064.868a6.54 6.54 0 0 1-1.078.616 5.498 5.498 0 0 1-1.204.378c-.42.093-.887.14-1.4.14-.607 0-1.167-.08-1.68-.238a3.775 3.775 0 0 1-1.33-.742 3.297 3.297 0 0 1-.868-1.218c-.206-.486-.308-1.05-.308-1.694a3.308 3.308 0 0 1 .77-2.114 5.12 5.12 0 0 1 1.078-.924c.438-.29.975-.541 1.61-.756a13.74 13.74 0 0 1 2.24-.518c.85-.14 1.82-.224 2.912-.252v-.84c0-.962-.205-1.67-.616-2.128-.411-.467-1.003-.7-1.778-.7-.56 0-1.027.065-1.4.196-.364.13-.686.28-.966.448-.28.159-.537.303-.77.434-.224.13-.476.196-.756.196-.243 0-.448-.06-.616-.182a1.67 1.67 0 0 1-.406-.448l-.616-1.106zM120.85 39.003v14.364h-2.114c-.458 0-.747-.21-.868-.63l-.238-1.148a7.862 7.862 0 0 1-1.946 1.456c-.71.364-1.545.546-2.506.546-.784 0-1.48-.13-2.086-.392a4.236 4.236 0 0 1-1.512-1.134 5.016 5.016 0 0 1-.938-1.722 7.52 7.52 0 0 1-.308-2.212v-9.128h3.458v9.128c0 .877.2 1.559.602 2.044.41.476 1.022.714 1.834.714.597 0 1.157-.13 1.68-.392a6.037 6.037 0 0 0 1.484-1.106V39.003h3.458zM127.512 40.767c.29-.29.593-.556.91-.798a5.623 5.623 0 0 1 2.184-1.036 5.542 5.542 0 0 1 1.344-.154c.784 0 1.48.135 2.086.406a3.957 3.957 0 0 1 1.512 1.12 4.69 4.69 0 0 1 .924 1.722c.215.663.322 1.395.322 2.198v9.142h-3.458v-9.142c0-.878-.2-1.554-.602-2.03-.401-.486-1.012-.728-1.834-.728-.597 0-1.157.135-1.68.406-.522.27-1.017.64-1.484 1.106v10.388h-3.458V39.003h2.114c.448 0 .742.21.882.63l.238 1.134zM150.373 42.04c-.103.132-.205.234-.308.309-.093.075-.233.112-.42.112a.982.982 0 0 1-.518-.154 9.315 9.315 0 0 0-.602-.364 3.902 3.902 0 0 0-.84-.364c-.317-.112-.714-.168-1.19-.168-.607 0-1.139.112-1.596.336-.457.215-.84.527-1.148.938-.299.41-.523.91-.672 1.498-.149.578-.224 1.236-.224 1.974 0 .765.079 1.447.238 2.044.168.597.406 1.101.714 1.512.308.401.681.71 1.12.924.439.205.933.308 1.484.308.551 0 .994-.066 1.33-.196.345-.14.635-.29.868-.448.233-.168.434-.318.602-.448a.925.925 0 0 1 .588-.21c.28 0 .49.107.63.322l.994 1.26a6.449 6.449 0 0 1-1.246 1.134 7.144 7.144 0 0 1-1.4.728 7.208 7.208 0 0 1-1.484.378 10.3 10.3 0 0 1-1.512.112 6.448 6.448 0 0 1-2.506-.49 6 6 0 0 1-2.058-1.456c-.588-.635-1.055-1.41-1.4-2.324-.336-.924-.504-1.974-.504-3.15 0-1.055.149-2.03.448-2.926.308-.906.756-1.685 1.344-2.338a6.09 6.09 0 0 1 2.184-1.554c.868-.373 1.867-.56 2.996-.56 1.073 0 2.011.172 2.814.518.812.345 1.54.84 2.184 1.484l-.91 1.26zM157.049 40.543a7.51 7.51 0 0 1 1.848-1.274c.672-.327 1.46-.49 2.366-.49.784 0 1.479.135 2.086.406.606.261 1.11.634 1.512 1.12.41.476.718 1.05.924 1.722.214.663.322 1.395.322 2.198v9.142h-3.458v-9.142c0-.878-.201-1.554-.602-2.03-.402-.486-1.013-.728-1.834-.728-.598 0-1.158.135-1.68.406-.523.27-1.018.64-1.484 1.106v10.388h-3.458V32.563h3.458v7.98zM178.649 44.533a3.95 3.95 0 0 0-.196-1.26 2.908 2.908 0 0 0-.559-1.05 2.562 2.562 0 0 0-.967-.7c-.382-.178-.83-.266-1.343-.266-.999 0-1.788.285-2.367.854-.569.57-.933 1.377-1.091 2.422h6.523zm-6.593 2.086c.056.737.186 1.377.392 1.918.205.532.475.975.811 1.33.336.345.733.607 1.191.784.466.168.98.252 1.54.252s1.04-.066 1.442-.196c.41-.13.765-.276 1.063-.434.308-.159.575-.304.799-.434.233-.13.457-.196.671-.196.29 0 .504.107.644.322l.995 1.26a5.93 5.93 0 0 1-1.289 1.134 7.641 7.641 0 0 1-1.498.728 8.291 8.291 0 0 1-1.581.378c-.532.074-1.05.112-1.554.112a7.766 7.766 0 0 1-2.786-.49 6.352 6.352 0 0 1-2.24-1.47c-.635-.653-1.134-1.456-1.498-2.408-.364-.962-.546-2.072-.546-3.332 0-.98.158-1.9.476-2.758.317-.868.77-1.62 1.358-2.254a6.462 6.462 0 0 1 2.17-1.526c.858-.373 1.824-.56 2.898-.56.905 0 1.74.144 2.506.434a5.41 5.41 0 0 1 1.973 1.274c.551.55.981 1.232 1.289 2.044.317.803.475 1.722.475 2.758 0 .523-.055.877-.167 1.064-.112.177-.327.266-.644.266h-8.89zM187.615 41.495c.448-.859.98-1.53 1.596-2.016.616-.495 1.344-.742 2.184-.742.662 0 1.194.145 1.596.434l-.224 2.59c-.047.168-.117.29-.21.364a.558.558 0 0 1-.35.098c-.14 0-.35-.023-.63-.07a4.704 4.704 0 0 0-.798-.07c-.383 0-.724.056-1.022.168-.299.112-.57.275-.812.49a3.359 3.359 0 0 0-.63.756c-.178.298-.346.64-.504 1.022v8.848h-3.458V39.003h2.03c.354 0 .602.065.742.196.14.121.233.345.28.672l.21 1.624z",fill:"#121319"}),(0,x.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 10.642L30.72 0 12.288 10.642v14.152L0 31.89v21.283l18.432 10.642 12.258-7.077.03.017.03-.017 12.258 7.077L61.44 53.172V31.89l-12.288-7.095V10.642zM59.52 32.997l-12.288-7.094V11.75L30.72 2.217 14.208 11.75v14.153L1.92 32.997v19.067l16.512 9.533L30.69 54.52l.03.017.03-.017 12.258 7.077 16.512-9.533V32.997z",fill:"url(#paint0_linear_615_416)"}),(0,x.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 24.83L30.72 14.19 12.288 24.831v21.283L30.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L30.72 54.539l-16.512-9.533V25.939zm14.52-3.756l.484.284 12.202 7.142 1.073.61V40.4l-.408.287-.461.32-12.89 7.545-7.743-4.503.02-17.35 7.722-4.516zm-5.822 20.762l.017-15.145 5.804-3.393 11.728 6.866.112.063v8.066L28.725 46.33l-5.819-3.384zm4.04-12.717l1.442-.827L37.2 34.53v1.66l-8.845 5.146-1.443-.833.034-10.273zm7.862 5.133l-5.971 3.474.023-6.935 5.948 3.46z",fill:"url(#paint1_linear_615_416)"}),(0,x.jsxs)("defs",{children:[(0,x.jsxs)("linearGradient",{id:"paint0_linear_615_416",x1:"30.72",y1:"95.721",x2:"94.488",y2:"34.325",gradientUnits:"userSpaceOnUse",children:[(0,x.jsx)("stop",{stopColor:"#0FA4B7"}),(0,x.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,x.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,x.jsxs)("linearGradient",{id:"paint1_linear_615_416",x1:"27.437",y1:"99.246",x2:"97.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,x.jsx)("stop",{stopColor:"#0FA4B7"}),(0,x.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,x.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};ge.defaultProps={width:"193",height:"64",viewBox:"0 0 193 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};ge.displayName="launcher-logo";We=fe.default=ge;function Gt(){const{t:e}=J(),{info:s}=Z(),n=De(),a=decodeURIComponent(n.get("accessUrl")||""),{meta:c}=ee();return t.jsx(Xt,{children:t.jsx("div",{className:"body",children:t.jsx(Y,{variant:"success",title:Q.getDisplayName({meta:c},!0),subTitle:e("launchBlocklet.installSuccess",{serverName:s.name}),footer:t.jsx(Qt,{href:a,rel:"noreferrer","data-cy":"open-blocklet",children:e("common.open")})})})})}const Qt=U.a`
1
+ import{r as P,j as t,t as J,u as Z,aj as De,cs as ee,N as Q,n as U,B as tt,P as de,aw as st,A as $e,ct as nt,w as at,cu as rt,ab as ot,av as ye,bm as je,q as K,b as oe,E as ue,M as ke,ag as lt,R as G,X,C as A,O as ze,i as pe,W as it,y as ct,z as Ee,af as dt,cv as ut,ad as pt,c7 as Te,cw as Ae,a9 as ht,H as mt,aC as le,J as ft,ai as gt,ak as vt,al as xt,am as bt,cx as yt,an as jt,K as kt,ao as wt,ap as q,aq as Pt,ar as Ct}from"./index-C9QWROlO.js";import{L as Y,P as Me,A as _t,S as Lt,a as Bt}from"./index-D0VO7WgE.js";import{u as Ut,A as St,W as Ot,P as It,D as we,L as Pe,d as Ce,a as _e}from"./wait-container-BiujCyhV.js";import{C as Ve,d as Nt,A as Rt}from"./agreement-BW_X8O9K.js";import{a as Dt}from"./api-vPjN6Bfi.js";import{i as $t}from"./isEqual-Bh4I8aKs.js";import{_ as zt}from"./useLocalStorage-kQm6yPnj.js";import{t as Et}from"./schema-BijIBYj3.js";import{s as Tt}from"./logo-BKA11TRi.js";import"./url-join-BR2c59F6.js";import"./Skeleton-bksK9EQ0.js";import"./Close-uSQDOggL.js";import"./lottie-C_o2afe-.js";import"./index-CcGSwTMt.js";import"./index-DP0Qx805.js";import"./index-8nWfzKes.js";var he={};Object.defineProperty(he,"__esModule",{value:!0});var Fe=he.default=void 0;At(P);var w=t;function At(e){return e&&e.__esModule?e:{default:e}}function Le(e,s){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);s&&(a=a.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,a)}return n}function Be(e){for(var s=1;s<arguments.length;s++){var n=arguments[s]!=null?arguments[s]:{};s%2?Le(Object(n),!0).forEach(function(a){Mt(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Le(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Mt(e,s,n){return(s=Vt(s))in e?Object.defineProperty(e,s,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[s]=n,e}function Vt(e){var s=Ft(e,"string");return typeof s=="symbol"?s:s+""}function Ft(e,s){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,s||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(e)}var me=function(s){return(0,w.jsxs)("svg",Be(Be({},s),{},{children:[(0,w.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 10.642L31.72 0 13.288 10.642v14.152L1 31.89v21.283l18.432 10.642 12.258-7.077.03.017.03-.017 12.258 7.077L62.44 53.172V31.89l-12.288-7.095V10.642zM60.52 32.997l-12.288-7.094V11.75L31.72 2.217 15.208 11.75v14.153L2.92 32.997v19.067l16.512 9.533L31.69 54.52l.03.017.03-.017 12.258 7.077 16.512-9.533V32.997z",fill:"url(#paint0_linear_615_428)"}),(0,w.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 24.83L31.72 14.19 13.288 24.831v21.283L31.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L31.72 54.539l-16.512-9.533V25.939zm14.52-3.756l.484.284 12.202 7.142 1.073.61V40.4l-.408.287-.461.32-12.89 7.545-7.743-4.503.02-17.35 7.722-4.516zm-5.822 20.762l.017-15.145 5.804-3.393 11.728 6.866.112.063v8.066L29.725 46.33l-5.819-3.384zm4.04-12.717l1.442-.827L38.2 34.53v1.66l-8.845 5.146-1.443-.833.034-10.273zm7.862 5.133l-5.971 3.474.023-6.935 5.948 3.46z",fill:"url(#paint1_linear_615_428)"}),(0,w.jsxs)("defs",{children:[(0,w.jsxs)("linearGradient",{id:"paint0_linear_615_428",x1:"31.72",y1:"95.721",x2:"95.488",y2:"34.325",gradientUnits:"userSpaceOnUse",children:[(0,w.jsx)("stop",{stopColor:"#0FA4B7"}),(0,w.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,w.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,w.jsxs)("linearGradient",{id:"paint1_linear_615_428",x1:"28.437",y1:"99.246",x2:"98.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,w.jsx)("stop",{stopColor:"#0FA4B7"}),(0,w.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,w.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};me.defaultProps={width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};me.displayName="launcher-logo-notext";Fe=he.default=me;var fe={};Object.defineProperty(fe,"__esModule",{value:!0});var We=fe.default=void 0;Wt(P);var x=t;function Wt(e){return e&&e.__esModule?e:{default:e}}function Ue(e,s){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);s&&(a=a.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,a)}return n}function Se(e){for(var s=1;s<arguments.length;s++){var n=arguments[s]!=null?arguments[s]:{};s%2?Ue(Object(n),!0).forEach(function(a){Ht(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ue(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Ht(e,s,n){return(s=qt(s))in e?Object.defineProperty(e,s,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[s]=n,e}function qt(e){var s=Kt(e,"string");return typeof s=="symbol"?s:s+""}function Kt(e,s){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,s||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(e)}var ge=function(s){return(0,x.jsxs)("svg",Se(Se({},s),{},{children:[(0,x.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M80.005 25.994V10h7.737a3.79 3.79 0 0 1 3.79 3.79v1.149a3.777 3.777 0 0 1-1.035 2.602 3.788 3.788 0 0 1 1.901 3.286v1.377a3.79 3.79 0 0 1-3.79 3.79h-8.603zm1.684-8.957h6.226a2.105 2.105 0 0 0 1.932-2.098v-1.15a2.105 2.105 0 0 0-2.105-2.105h-6.053v5.353zm0 7.273v-5.582l6.92-.007c1.163 0 2.105.943 2.105 2.106v1.377a2.105 2.105 0 0 1-2.105 2.106h-6.92zM97.255 10v15.994h-1.762V10h1.762zm8.733 4.319h-1.827a3.81 3.81 0 0 0-3.811 3.81v4.054a3.81 3.81 0 0 0 3.811 3.81h1.827a3.811 3.811 0 0 0 3.811-3.81V18.13a3.811 3.811 0 0 0-3.811-3.81zm-1.827 1.762a2.05 2.05 0 0 0-2.049 2.048v4.054a2.05 2.05 0 0 0 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049V18.13a2.048 2.048 0 0 0-2.048-2.048h-1.827zM125.204 26v-5.754h2.148L130.674 26h2.035l-3.821-6.618 2.993-5.184h-2.035l-2.474 4.286h-2.168V10h-1.762v16h1.762zm-5.556-7.56v-.31a2.048 2.048 0 0 0-2.048-2.05h-1.827a2.048 2.048 0 0 0-2.049 2.05v4.053c0 1.132.917 2.049 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049v-.311h1.762v.311a3.81 3.81 0 0 1-3.81 3.81h-1.827a3.81 3.81 0 0 1-3.811-3.81V18.13a3.81 3.81 0 0 1 3.811-3.81h1.827a3.81 3.81 0 0 1 3.81 3.81v.312h-1.762zm17.918 7.554V10h-1.762v15.994h1.762zm4.989-5.357v1.546c0 1.132.917 2.049 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049v-.311h1.762v.311a3.81 3.81 0 0 1-3.81 3.81h-1.827a3.81 3.81 0 0 1-3.811-3.81V18.13a3.81 3.81 0 0 1 3.811-3.81h1.827a3.81 3.81 0 0 1 3.81 3.81v.746h.001v1.762h-7.687zm5.924-1.762h-5.924v-.746c0-1.131.917-2.048 2.049-2.048h1.827c1.131 0 2.048.917 2.048 2.048v.746zm5.489-1.912H152.4v-1.762h1.568v-2.848h1.684v2.848h4.077v1.762h-4.077v5.677a1.669 1.669 0 1 0 3.339 0v-.35h1.684v.35a3.353 3.353 0 1 1-6.707 0v-5.677z",fill:"#121319"}),(0,x.jsx)("path",{d:"M92.112 50.259v3.108H80.254V33.123h3.766v17.136h8.092zM101.843 47.235c-.999.047-1.839.135-2.52.266-.681.121-1.227.28-1.638.476-.41.196-.705.425-.882.686a1.49 1.49 0 0 0-.266.854c0 .606.177 1.04.532 1.302.364.261.835.392 1.414.392.71 0 1.32-.126 1.834-.378.523-.261 1.031-.654 1.526-1.176v-2.422zm-7.924-6.23c1.652-1.512 3.64-2.268 5.964-2.268.84 0 1.591.14 2.254.42.663.27 1.223.653 1.68 1.148a4.765 4.765 0 0 1 1.036 1.75c.243.681.364 1.428.364 2.24v9.072h-1.568c-.327 0-.579-.047-.756-.14-.177-.103-.317-.303-.42-.602l-.308-1.036c-.364.327-.719.616-1.064.868a6.54 6.54 0 0 1-1.078.616 5.498 5.498 0 0 1-1.204.378c-.42.093-.887.14-1.4.14-.607 0-1.167-.08-1.68-.238a3.775 3.775 0 0 1-1.33-.742 3.297 3.297 0 0 1-.868-1.218c-.206-.486-.308-1.05-.308-1.694a3.308 3.308 0 0 1 .77-2.114 5.12 5.12 0 0 1 1.078-.924c.438-.29.975-.541 1.61-.756a13.74 13.74 0 0 1 2.24-.518c.85-.14 1.82-.224 2.912-.252v-.84c0-.962-.205-1.67-.616-2.128-.411-.467-1.003-.7-1.778-.7-.56 0-1.027.065-1.4.196-.364.13-.686.28-.966.448-.28.159-.537.303-.77.434-.224.13-.476.196-.756.196-.243 0-.448-.06-.616-.182a1.67 1.67 0 0 1-.406-.448l-.616-1.106zM120.85 39.003v14.364h-2.114c-.458 0-.747-.21-.868-.63l-.238-1.148a7.862 7.862 0 0 1-1.946 1.456c-.71.364-1.545.546-2.506.546-.784 0-1.48-.13-2.086-.392a4.236 4.236 0 0 1-1.512-1.134 5.016 5.016 0 0 1-.938-1.722 7.52 7.52 0 0 1-.308-2.212v-9.128h3.458v9.128c0 .877.2 1.559.602 2.044.41.476 1.022.714 1.834.714.597 0 1.157-.13 1.68-.392a6.037 6.037 0 0 0 1.484-1.106V39.003h3.458zM127.512 40.767c.29-.29.593-.556.91-.798a5.623 5.623 0 0 1 2.184-1.036 5.542 5.542 0 0 1 1.344-.154c.784 0 1.48.135 2.086.406a3.957 3.957 0 0 1 1.512 1.12 4.69 4.69 0 0 1 .924 1.722c.215.663.322 1.395.322 2.198v9.142h-3.458v-9.142c0-.878-.2-1.554-.602-2.03-.401-.486-1.012-.728-1.834-.728-.597 0-1.157.135-1.68.406-.522.27-1.017.64-1.484 1.106v10.388h-3.458V39.003h2.114c.448 0 .742.21.882.63l.238 1.134zM150.373 42.04c-.103.132-.205.234-.308.309-.093.075-.233.112-.42.112a.982.982 0 0 1-.518-.154 9.315 9.315 0 0 0-.602-.364 3.902 3.902 0 0 0-.84-.364c-.317-.112-.714-.168-1.19-.168-.607 0-1.139.112-1.596.336-.457.215-.84.527-1.148.938-.299.41-.523.91-.672 1.498-.149.578-.224 1.236-.224 1.974 0 .765.079 1.447.238 2.044.168.597.406 1.101.714 1.512.308.401.681.71 1.12.924.439.205.933.308 1.484.308.551 0 .994-.066 1.33-.196.345-.14.635-.29.868-.448.233-.168.434-.318.602-.448a.925.925 0 0 1 .588-.21c.28 0 .49.107.63.322l.994 1.26a6.449 6.449 0 0 1-1.246 1.134 7.144 7.144 0 0 1-1.4.728 7.208 7.208 0 0 1-1.484.378 10.3 10.3 0 0 1-1.512.112 6.448 6.448 0 0 1-2.506-.49 6 6 0 0 1-2.058-1.456c-.588-.635-1.055-1.41-1.4-2.324-.336-.924-.504-1.974-.504-3.15 0-1.055.149-2.03.448-2.926.308-.906.756-1.685 1.344-2.338a6.09 6.09 0 0 1 2.184-1.554c.868-.373 1.867-.56 2.996-.56 1.073 0 2.011.172 2.814.518.812.345 1.54.84 2.184 1.484l-.91 1.26zM157.049 40.543a7.51 7.51 0 0 1 1.848-1.274c.672-.327 1.46-.49 2.366-.49.784 0 1.479.135 2.086.406.606.261 1.11.634 1.512 1.12.41.476.718 1.05.924 1.722.214.663.322 1.395.322 2.198v9.142h-3.458v-9.142c0-.878-.201-1.554-.602-2.03-.402-.486-1.013-.728-1.834-.728-.598 0-1.158.135-1.68.406-.523.27-1.018.64-1.484 1.106v10.388h-3.458V32.563h3.458v7.98zM178.649 44.533a3.95 3.95 0 0 0-.196-1.26 2.908 2.908 0 0 0-.559-1.05 2.562 2.562 0 0 0-.967-.7c-.382-.178-.83-.266-1.343-.266-.999 0-1.788.285-2.367.854-.569.57-.933 1.377-1.091 2.422h6.523zm-6.593 2.086c.056.737.186 1.377.392 1.918.205.532.475.975.811 1.33.336.345.733.607 1.191.784.466.168.98.252 1.54.252s1.04-.066 1.442-.196c.41-.13.765-.276 1.063-.434.308-.159.575-.304.799-.434.233-.13.457-.196.671-.196.29 0 .504.107.644.322l.995 1.26a5.93 5.93 0 0 1-1.289 1.134 7.641 7.641 0 0 1-1.498.728 8.291 8.291 0 0 1-1.581.378c-.532.074-1.05.112-1.554.112a7.766 7.766 0 0 1-2.786-.49 6.352 6.352 0 0 1-2.24-1.47c-.635-.653-1.134-1.456-1.498-2.408-.364-.962-.546-2.072-.546-3.332 0-.98.158-1.9.476-2.758.317-.868.77-1.62 1.358-2.254a6.462 6.462 0 0 1 2.17-1.526c.858-.373 1.824-.56 2.898-.56.905 0 1.74.144 2.506.434a5.41 5.41 0 0 1 1.973 1.274c.551.55.981 1.232 1.289 2.044.317.803.475 1.722.475 2.758 0 .523-.055.877-.167 1.064-.112.177-.327.266-.644.266h-8.89zM187.615 41.495c.448-.859.98-1.53 1.596-2.016.616-.495 1.344-.742 2.184-.742.662 0 1.194.145 1.596.434l-.224 2.59c-.047.168-.117.29-.21.364a.558.558 0 0 1-.35.098c-.14 0-.35-.023-.63-.07a4.704 4.704 0 0 0-.798-.07c-.383 0-.724.056-1.022.168-.299.112-.57.275-.812.49a3.359 3.359 0 0 0-.63.756c-.178.298-.346.64-.504 1.022v8.848h-3.458V39.003h2.03c.354 0 .602.065.742.196.14.121.233.345.28.672l.21 1.624z",fill:"#121319"}),(0,x.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 10.642L30.72 0 12.288 10.642v14.152L0 31.89v21.283l18.432 10.642 12.258-7.077.03.017.03-.017 12.258 7.077L61.44 53.172V31.89l-12.288-7.095V10.642zM59.52 32.997l-12.288-7.094V11.75L30.72 2.217 14.208 11.75v14.153L1.92 32.997v19.067l16.512 9.533L30.69 54.52l.03.017.03-.017 12.258 7.077 16.512-9.533V32.997z",fill:"url(#paint0_linear_615_416)"}),(0,x.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 24.83L30.72 14.19 12.288 24.831v21.283L30.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L30.72 54.539l-16.512-9.533V25.939zm14.52-3.756l.484.284 12.202 7.142 1.073.61V40.4l-.408.287-.461.32-12.89 7.545-7.743-4.503.02-17.35 7.722-4.516zm-5.822 20.762l.017-15.145 5.804-3.393 11.728 6.866.112.063v8.066L28.725 46.33l-5.819-3.384zm4.04-12.717l1.442-.827L37.2 34.53v1.66l-8.845 5.146-1.443-.833.034-10.273zm7.862 5.133l-5.971 3.474.023-6.935 5.948 3.46z",fill:"url(#paint1_linear_615_416)"}),(0,x.jsxs)("defs",{children:[(0,x.jsxs)("linearGradient",{id:"paint0_linear_615_416",x1:"30.72",y1:"95.721",x2:"94.488",y2:"34.325",gradientUnits:"userSpaceOnUse",children:[(0,x.jsx)("stop",{stopColor:"#0FA4B7"}),(0,x.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,x.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,x.jsxs)("linearGradient",{id:"paint1_linear_615_416",x1:"27.437",y1:"99.246",x2:"97.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,x.jsx)("stop",{stopColor:"#0FA4B7"}),(0,x.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,x.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};ge.defaultProps={width:"193",height:"64",viewBox:"0 0 193 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};ge.displayName="launcher-logo";We=fe.default=ge;function Gt(){const{t:e}=J(),{info:s}=Z(),n=De(),a=decodeURIComponent(n.get("accessUrl")||""),{meta:c}=ee();return t.jsx(Xt,{children:t.jsx("div",{className:"body",children:t.jsx(Y,{variant:"success",title:Q.getDisplayName({meta:c},!0),subTitle:e("launchBlocklet.installSuccess",{serverName:s.name}),footer:t.jsx(Qt,{href:a,rel:"noreferrer","data-cy":"open-blocklet",children:e("common.open")})})})})}const Qt=U.a`
2
2
  display: block;
3
3
  height: 36px;
4
4
  color: ${e=>e.theme.palette.primary.main};
@@ -1,4 +1,4 @@
1
- import{j as r,m as i,P as e,d5 as c,d6 as f,s as u}from"./index-D8jEuOKc.js";function l({name:t,nameFormatter:o,layout:a,children:n,valueComponent:s,nameWidth:m,...p}){return r.jsxs(d,{layout:a,width:m,...p,children:[r.jsx(i,{color:"textSecondary",className:"info-row__name",children:o(t)}),n&&r.jsx(i,{color:"textPrimary",component:s,className:"info-row__value",children:n})]})}l.propTypes={name:e.any.isRequired,layout:e.oneOf(["horizontal","vertical"]),children:e.any,nameFormatter:e.func,valueComponent:e.string,nameWidth:e.number};l.defaultProps={children:null,nameWidth:90,nameFormatter:t=>{const o=t.split(" ").map(a=>c(f(a))).join(" ");return typeof t=="string"?o:t},valueComponent:"div",layout:"horizontal"};const d=u("div")`
1
+ import{j as r,m as i,P as e,d5 as c,d6 as f,s as u}from"./index-C9QWROlO.js";function l({name:t,nameFormatter:o,layout:a,children:n,valueComponent:s,nameWidth:m,...p}){return r.jsxs(d,{layout:a,width:m,...p,children:[r.jsx(i,{color:"textSecondary",className:"info-row__name",children:o(t)}),n&&r.jsx(i,{color:"textPrimary",component:s,className:"info-row__value",children:n})]})}l.propTypes={name:e.any.isRequired,layout:e.oneOf(["horizontal","vertical"]),children:e.any,nameFormatter:e.func,valueComponent:e.string,nameWidth:e.number};l.defaultProps={children:null,nameWidth:90,nameFormatter:t=>{const o=t.split(" ").map(a=>c(f(a))).join(" ");return typeof t=="string"?o:t},valueComponent:"div",layout:"horizontal"};const d=u("div")`
2
2
  display: flex;
3
3
  flex-direction: ${t=>t.layout==="vertical"?"column":"row"};
4
4
  justify-content: flex-start;
@@ -1,4 +1,4 @@
1
- import{r as p,c as me,u as Z,e as Ie,aE as Er,j as e,H as E,aF as cn,aG as Bn,aH as Pr,aI as dn,aJ as qe,aK as xe,aL as ye,P as u,n as V,t as $,ac as re,aM as un,aN as Ar,aO as mn,aP as Ir,E as te,R as fn,m as L,V as ne,ax as de,C as K,K as he,B as Y,aQ as Wn,M as ue,Q as ee,f as Rt,S as qn,aR as kr,aS as Lr,a9 as Or,aT as Fr,aU as Nr,aV as Ur,A as Hn,W as pn,T as gn,k as Q,aW as Tt,a as yt,U as oe,b as et,aX as Kn,aY as Gn,aZ as Yn,a_ as $r,a2 as Mr,a$ as zr,b0 as Br,b1 as Wr,b2 as qr,b3 as Hr,b4 as He,a7 as Kr,d as Vn,N as Gr,b5 as Yr,aD as ze,a8 as ft,a5 as pt,b6 as Vr,a6 as vt,i as Xn,O as Xr,b7 as Qr,b8 as we,b9 as _e,ba as Zr,bb as Jr,D as Qn,x as bt,ai as ei,h as ti,at as hn,bc as ni,bd as xn,aj as ri,be as ii,bf as oi,bg as ai}from"./index-D8jEuOKc.js";import{T as si}from"./index-BZ5mGJWw.js";import{d as li}from"./ArrowDropDown-ChTH4y6x.js";import{u as Et,C as ie,a as yn}from"./index.esm-D4aSKUKj.js";import{S as pe}from"./switch-control-D6_lOJtw.js";import{d as jt,i as ci}from"./is-path-prefix-equal-DNcDIcWb.js";import{T as G,F as di}from"./TextField-CRqdsKdk.js";import{D as Zn,g as ui}from"./index-UkVmuOk4.js";import{d as Jn}from"./Link-Cl6uWJH_.js";import{d as ke}from"./Delete-DUmhYiAq.js";import{C as Pt}from"./delete-confirm-DSDxj3rA.js";import{I as Ke}from"./index-zAZnE_sV.js";import{s as mi}from"./logo-BKA11TRi.js";import{_ as fi}from"./useLocalStorage-VUDmm0Mk.js";import{L as pi}from"./LoadingButton-Bw0KBLnj.js";import{C as gi,d as er}from"./Public-DTWYgdJa.js";import{d as At}from"./Add-DaKGD4dI.js";import{a as hi,W as Be}from"./url-evaluation-DRU1r0m1.js";import{B as tr,D as vn,R as xi,a as yi}from"./status-BGxv0mkt.js";import{d as vi}from"./CheckCircle-C9wvczio.js";import{d as bi}from"./ExpandMore-DpwumCaI.js";import{d as ji}from"./ChevronRight-D3x_9psV.js";import{d as Ci}from"./MoreVert-DSqbsAYy.js";import{d as nr}from"./Edit-Bxg4cu8b.js";import{d as Si,a as rr}from"./Https-ChBXh5m-.js";import{w as wi}from"./withStyles-DM17B_mO.js";import{S as _i}from"./Slider-ZuZU2f6x.js";import"./index-Cw0JQB9z.js";import"./Select-DsA6mJ7A.js";import"./InputLabel-x5fGAphs.js";import"./useThemeProps-_vPkb6TM.js";import"./index-ZzQVQqI_.js";import"./redux-rfMuaiI1.js";import"./ViewColumn-BCkzYaEc.js";import"./LastPage-CFPei4j4.js";import"./Search-LvG1ITyu.js";import"./index-DK-C26MA.js";import"./click-to-copy-DLjgvWtN.js";import"./shorten-label-CBdfm00-.js";const ge="Dashboard",ir=p.createContext({}),{Provider:Di,Consumer:ds}=ir,bn=[ge,E.DOMAIN_FOR_IP_SITE,E.DOMAIN_FOR_IP_SITE_REGEXP],Ri=(t,n)=>{if(t.name===E.DOMAIN_FOR_DEFAULT_SITE)return-1;if(n.name===E.DOMAIN_FOR_DEFAULT_SITE)return 1;const r=bn.includes(t.name),i=bn.includes(n.name);return r&&i?dn(t.name,n.name):r?-1:i?1:dn(t.name,n.name)},Ti=({sites:t,nodePort:n})=>{const r=window.location.host,o=(t||[]).map(a=>{const{id:l,rules:c=[],corsAllowedOrigins:h=[]}=a;let{domain:d,domainAliases:m}=a;m=m||[],[E.DOMAIN_FOR_IP_SITE,E.DOMAIN_FOR_IP_SITE_REGEXP].includes(d)&&(d=ge,m.find(f=>f.value===r)||m.unshift({protected:!1,value:r}));const g={id:l,name:d,type:"domain",items:[],domainAliases:m,isProtected:a.isProtected,corsAllowedOrigins:h};return(c||[]).forEach(f=>{const{id:y,isProtected:b,from:{pathPrefix:v},to:C}=f;if(C.type===E.ROUTING_RULE_TYPES.BLOCKLET){let T="";Number.parseInt(C.port,10)===Number.parseInt(n,10)?(T="Blocklet Server Dashboard",C.type=E.ROUTING_RULE_TYPES.DAEMON):T=C.did,g.items.push({id:y,name:cn(v||"/"),title:T,type:"rule",isProtected:b,pathPrefix:v,to:C})}else g.items.push({id:y,pathPrefix:v,name:cn(v||"/"),title:"Blocklet Server Dashboard",type:"rule",isProtected:b,to:C})}),g.items=Bn(g.items,f=>f.name),g}).sort(Ri),s=o.reduce((a,l)=>{let{name:c}=l;return c.endsWith(E.BLOCKLET_SITE_GROUP_SUFFIX)&&([c]=c.split(".")),a[c]={...l,rules:l.items},a},{});return{sites:o,siteMap:s}},Ei=({did:t,domain:n,mountPoint:r,siteMap:i,params:o}={})=>{if(!i)return null;const s=i[t];if(!s)return null;const a=n||(s.domainAliases||[])[0];if(!a)return null;let l=r;if(!l){const c=s.rules.filter(h=>!h.name.startsWith(E.WELLKNOWN_PATH_PREFIX))[0];l=c?c.name:"/"}return qe(a.value,l,o)},Pi=({did:t,mountPoint:n,siteMap:r,params:i}={})=>{if(!r)return[];const o=r[t];if(!o)return[];const s=o.domainAliases||[];if(!s.length)return[];let a=n;if(!a){const l=o.rules.filter(c=>!c.name.startsWith(E.WELLKNOWN_PATH_PREFIX))[0];a=l?l.name:"/"}return s.map(l=>qe(l.value,a,i))},Ai=t=>{const n=t.map(i=>i.domain).filter(i=>![E.DOMAIN_FOR_IP_SITE_REGEXP,E.DOMAIN_FOR_DEFAULT_SITE].includes(i));let r=[];return t.forEach(i=>r.push(...i.domainAliases||[])),r=r.map(i=>typeof i=="string"?{value:i,isProtected:!1}:i),{domains:n,domainsAliases:r}};function jn({children:t}){const n=me(),{info:r}=Z(),[i,o]=p.useState([]),[s,a]=p.useState([]),[l,c]=p.useState([]),h=Ie(async()=>{const{sites:w}=await n.getRoutingSites({input:{snapshotHash:""}}),S=w||[];await Promise.all(S.map(async D=>(D.domainAliases=await Er(D.domainAliases,{getIP:Pr}),D)));const I=Ai(S);o(S),a(I.domains),c([window.location.hostname,...I.domains,...I.domainsAliases.map(D=>D.value)])},[r]),d=(w,S)=>{o(I=>I.map(D=>D.id===w?S.domain?S:{...S,domain:D.domain}:D))},m=w=>n.takeRoutingSnapshot({input:{dryRun:!1,message:encodeURIComponent(w)}}),g=async w=>{const S=await n.addRoutingSite({input:w});o(i.concat(S.site))},f=async(w,S)=>{const I=await n.updateRoutingSite({input:{id:w,...S}});if(I.site&&I.site.id){const D=i.findIndex(U=>U.id===I.site.id);D!==-1&&(i.splice(D,1,I.site),o([].concat(i)))}},y=async w=>{await n.deleteRoutingSite({input:{id:w}}),o(i.filter(S=>S.id!==w))},b=async(w,S,I)=>{const D=await n.addDomainAlias({input:{id:w,domainAlias:S,force:I}});d(w,D.site)},v=async(w,S)=>{const I=await n.deleteDomainAlias({input:{id:w,domainAlias:S}});d(w,I.site)},C=async(w,S)=>{const{site:I}=await n.addRoutingRule({input:{id:w,rule:S}});d(w,I)},T=async(w,S)=>{const{site:I}=await n.updateRoutingRule({input:{id:w,rule:S}});d(w,I)},j=async(w,S)=>{const{site:I}=await n.deleteRoutingRule({input:{id:w,ruleId:S}});d(w,I)},x={loading:h.loading,error:h.error,refresh:h.retry,api:n,actions:{addSite:g,updateSite:f,deleteSite:y,addDomainAlias:b,deleteDomainAlias:v,takeSnapshot:m,addRule:C,updateRule:T,deleteRule:j}},{sites:P,siteMap:R}=Ti({sites:i,nodePort:r.port});return x.sites=P,x.siteMap=R,x.domains=s,x.allDomains=l,x.getBlockletUrl=({did:w,domain:S,mountPoint:I,params:D})=>Ei({did:w,domain:S,mountPoint:I,siteMap:x.siteMap,params:D}),x.getBlockletUrls=({did:w,mountPoint:S,params:I})=>Pi({did:w,mountPoint:S,siteMap:x.siteMap,params:I}),e.jsx(Di,{value:{routing:x},children:t})}function se(){const{routing:t}=p.useContext(ir);return t}function It(t){const n=[E.DOMAIN_FOR_IP_SITE_REGEXP,E.DOMAIN_FOR_DEFAULT_SITE,E.DOMAIN_FOR_IP_SITE];return typeof window<"u"&&typeof window.location<"u"&&n.push(window.location.hostname),n.includes(t)}var kt={},Ii=ye;Object.defineProperty(kt,"__esModule",{value:!0});var or=kt.default=void 0,ki=Ii(xe()),Li=e;or=kt.default=(0,ki.default)((0,Li.jsx)("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp");function Oi(){return null}function Lt({confirm:t}){const[n,r]=p.useState(null),{t:i}=$(),o=()=>{r(null)},s=async l=>{if(l){let c=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";c==="/"?un.push(`${l.pathname}`):(c.endsWith("/")&&(c=c.substring(0,c.length-1)),un.push(`${c}${l.pathname}`)),window.location.reload()}},a=(l,...c)=>{let h=typeof t=="function"?t(l,...c):t;return h?(typeof h=="string"&&(h={description:h}),r({title:i("common.noticeTitle"),description:i("common.leavePageTip"),confirm:i("common.confirm"),cancel:i("common.cancel"),onConfirm:()=>s(l),onCancel:()=>o(),...h}),!1):!0};return e.jsxs(Fi,{children:[e.jsx(Oi,{message:a}),n&&e.jsx(re,{title:n.title,description:n.description,confirm:n.confirm,cancel:n.cancel,params:n.params,onConfirm:n.onConfirm,onCancel:n.onCancel})]})}Lt.propTypes={confirm:u.oneOfType([u.object,u.string,u.func])};Lt.defaultProps={confirm:null};const Fi=V.div`
1
+ import{r as p,c as me,u as Z,e as Ie,aE as Er,j as e,H as E,aF as cn,aG as Bn,aH as Pr,aI as dn,aJ as qe,aK as xe,aL as ye,P as u,n as V,t as $,ac as re,aM as un,aN as Ar,aO as mn,aP as Ir,E as te,R as fn,m as L,V as ne,ax as de,C as K,K as he,B as Y,aQ as Wn,M as ue,Q as ee,f as Rt,S as qn,aR as kr,aS as Lr,a9 as Or,aT as Fr,aU as Nr,aV as Ur,A as Hn,W as pn,T as gn,k as Q,aW as Tt,a as yt,U as oe,b as et,aX as Kn,aY as Gn,aZ as Yn,a_ as $r,a2 as Mr,a$ as zr,b0 as Br,b1 as Wr,b2 as qr,b3 as Hr,b4 as He,a7 as Kr,d as Vn,N as Gr,b5 as Yr,aD as ze,a8 as ft,a5 as pt,b6 as Vr,a6 as vt,i as Xn,O as Xr,b7 as Qr,b8 as we,b9 as _e,ba as Zr,bb as Jr,D as Qn,x as bt,ai as ei,h as ti,at as hn,bc as ni,bd as xn,aj as ri,be as ii,bf as oi,bg as ai}from"./index-C9QWROlO.js";import{T as si}from"./index-B-dgg_7V.js";import{d as li}from"./ArrowDropDown-Dcn5e8ly.js";import{u as Et,C as ie,a as yn}from"./index.esm-DkiKGA7O.js";import{S as pe}from"./switch-control-FJGNlGgR.js";import{d as jt,i as ci}from"./is-path-prefix-equal-B3nYZSlR.js";import{T as G,F as di}from"./TextField-kQx3sAGR.js";import{D as Zn,g as ui}from"./index-C2-bicAv.js";import{d as Jn}from"./Link-tptEI5Ov.js";import{d as ke}from"./Delete-Dc7SNaDg.js";import{C as Pt}from"./delete-confirm-BeJKD7Bp.js";import{I as Ke}from"./index-DQO2RskJ.js";import{s as mi}from"./logo-BKA11TRi.js";import{_ as fi}from"./useLocalStorage-kQm6yPnj.js";import{L as pi}from"./LoadingButton-BJeZNO98.js";import{C as gi,d as er}from"./Public-DldRmgtm.js";import{d as At}from"./Add-CrVU4iag.js";import{a as hi,W as Be}from"./url-evaluation-DZQMDJ58.js";import{B as tr,D as vn,R as xi,a as yi}from"./status-kAhSFHIM.js";import{d as vi}from"./CheckCircle-Bfk4fg63.js";import{d as bi}from"./ExpandMore-DkEFEOxf.js";import{d as ji}from"./ChevronRight-Cy58kVA1.js";import{d as Ci}from"./MoreVert-D7U3C1RJ.js";import{d as nr}from"./Edit-DS4SRT1Z.js";import{d as Si,a as rr}from"./Https-CQFYbmfg.js";import{w as wi}from"./withStyles-eMUb1FPy.js";import{S as _i}from"./Slider-CbEQ27T8.js";import"./index-dKvWGHlG.js";import"./Select-D1lY3LQG.js";import"./InputLabel-B1j7mM5X.js";import"./useThemeProps-DzCadJBj.js";import"./index-OJDHb5ZY.js";import"./redux-b00FNul4.js";import"./ViewColumn-CBqnaawo.js";import"./LastPage-DvyF__jR.js";import"./Search-C72vhPrR.js";import"./index-8yVQ7VYg.js";import"./click-to-copy-DYkJUEds.js";import"./shorten-label-e4SQFDIH.js";const ge="Dashboard",ir=p.createContext({}),{Provider:Di,Consumer:ds}=ir,bn=[ge,E.DOMAIN_FOR_IP_SITE,E.DOMAIN_FOR_IP_SITE_REGEXP],Ri=(t,n)=>{if(t.name===E.DOMAIN_FOR_DEFAULT_SITE)return-1;if(n.name===E.DOMAIN_FOR_DEFAULT_SITE)return 1;const r=bn.includes(t.name),i=bn.includes(n.name);return r&&i?dn(t.name,n.name):r?-1:i?1:dn(t.name,n.name)},Ti=({sites:t,nodePort:n})=>{const r=window.location.host,o=(t||[]).map(a=>{const{id:l,rules:c=[],corsAllowedOrigins:h=[]}=a;let{domain:d,domainAliases:m}=a;m=m||[],[E.DOMAIN_FOR_IP_SITE,E.DOMAIN_FOR_IP_SITE_REGEXP].includes(d)&&(d=ge,m.find(f=>f.value===r)||m.unshift({protected:!1,value:r}));const g={id:l,name:d,type:"domain",items:[],domainAliases:m,isProtected:a.isProtected,corsAllowedOrigins:h};return(c||[]).forEach(f=>{const{id:y,isProtected:b,from:{pathPrefix:v},to:C}=f;if(C.type===E.ROUTING_RULE_TYPES.BLOCKLET){let T="";Number.parseInt(C.port,10)===Number.parseInt(n,10)?(T="Blocklet Server Dashboard",C.type=E.ROUTING_RULE_TYPES.DAEMON):T=C.did,g.items.push({id:y,name:cn(v||"/"),title:T,type:"rule",isProtected:b,pathPrefix:v,to:C})}else g.items.push({id:y,pathPrefix:v,name:cn(v||"/"),title:"Blocklet Server Dashboard",type:"rule",isProtected:b,to:C})}),g.items=Bn(g.items,f=>f.name),g}).sort(Ri),s=o.reduce((a,l)=>{let{name:c}=l;return c.endsWith(E.BLOCKLET_SITE_GROUP_SUFFIX)&&([c]=c.split(".")),a[c]={...l,rules:l.items},a},{});return{sites:o,siteMap:s}},Ei=({did:t,domain:n,mountPoint:r,siteMap:i,params:o}={})=>{if(!i)return null;const s=i[t];if(!s)return null;const a=n||(s.domainAliases||[])[0];if(!a)return null;let l=r;if(!l){const c=s.rules.filter(h=>!h.name.startsWith(E.WELLKNOWN_PATH_PREFIX))[0];l=c?c.name:"/"}return qe(a.value,l,o)},Pi=({did:t,mountPoint:n,siteMap:r,params:i}={})=>{if(!r)return[];const o=r[t];if(!o)return[];const s=o.domainAliases||[];if(!s.length)return[];let a=n;if(!a){const l=o.rules.filter(c=>!c.name.startsWith(E.WELLKNOWN_PATH_PREFIX))[0];a=l?l.name:"/"}return s.map(l=>qe(l.value,a,i))},Ai=t=>{const n=t.map(i=>i.domain).filter(i=>![E.DOMAIN_FOR_IP_SITE_REGEXP,E.DOMAIN_FOR_DEFAULT_SITE].includes(i));let r=[];return t.forEach(i=>r.push(...i.domainAliases||[])),r=r.map(i=>typeof i=="string"?{value:i,isProtected:!1}:i),{domains:n,domainsAliases:r}};function jn({children:t}){const n=me(),{info:r}=Z(),[i,o]=p.useState([]),[s,a]=p.useState([]),[l,c]=p.useState([]),h=Ie(async()=>{const{sites:w}=await n.getRoutingSites({input:{snapshotHash:""}}),S=w||[];await Promise.all(S.map(async D=>(D.domainAliases=await Er(D.domainAliases,{getIP:Pr}),D)));const I=Ai(S);o(S),a(I.domains),c([window.location.hostname,...I.domains,...I.domainsAliases.map(D=>D.value)])},[r]),d=(w,S)=>{o(I=>I.map(D=>D.id===w?S.domain?S:{...S,domain:D.domain}:D))},m=w=>n.takeRoutingSnapshot({input:{dryRun:!1,message:encodeURIComponent(w)}}),g=async w=>{const S=await n.addRoutingSite({input:w});o(i.concat(S.site))},f=async(w,S)=>{const I=await n.updateRoutingSite({input:{id:w,...S}});if(I.site&&I.site.id){const D=i.findIndex(U=>U.id===I.site.id);D!==-1&&(i.splice(D,1,I.site),o([].concat(i)))}},y=async w=>{await n.deleteRoutingSite({input:{id:w}}),o(i.filter(S=>S.id!==w))},b=async(w,S,I)=>{const D=await n.addDomainAlias({input:{id:w,domainAlias:S,force:I}});d(w,D.site)},v=async(w,S)=>{const I=await n.deleteDomainAlias({input:{id:w,domainAlias:S}});d(w,I.site)},C=async(w,S)=>{const{site:I}=await n.addRoutingRule({input:{id:w,rule:S}});d(w,I)},T=async(w,S)=>{const{site:I}=await n.updateRoutingRule({input:{id:w,rule:S}});d(w,I)},j=async(w,S)=>{const{site:I}=await n.deleteRoutingRule({input:{id:w,ruleId:S}});d(w,I)},x={loading:h.loading,error:h.error,refresh:h.retry,api:n,actions:{addSite:g,updateSite:f,deleteSite:y,addDomainAlias:b,deleteDomainAlias:v,takeSnapshot:m,addRule:C,updateRule:T,deleteRule:j}},{sites:P,siteMap:R}=Ti({sites:i,nodePort:r.port});return x.sites=P,x.siteMap=R,x.domains=s,x.allDomains=l,x.getBlockletUrl=({did:w,domain:S,mountPoint:I,params:D})=>Ei({did:w,domain:S,mountPoint:I,siteMap:x.siteMap,params:D}),x.getBlockletUrls=({did:w,mountPoint:S,params:I})=>Pi({did:w,mountPoint:S,siteMap:x.siteMap,params:I}),e.jsx(Di,{value:{routing:x},children:t})}function se(){const{routing:t}=p.useContext(ir);return t}function It(t){const n=[E.DOMAIN_FOR_IP_SITE_REGEXP,E.DOMAIN_FOR_DEFAULT_SITE,E.DOMAIN_FOR_IP_SITE];return typeof window<"u"&&typeof window.location<"u"&&n.push(window.location.hostname),n.includes(t)}var kt={},Ii=ye;Object.defineProperty(kt,"__esModule",{value:!0});var or=kt.default=void 0,ki=Ii(xe()),Li=e;or=kt.default=(0,ki.default)((0,Li.jsx)("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp");function Oi(){return null}function Lt({confirm:t}){const[n,r]=p.useState(null),{t:i}=$(),o=()=>{r(null)},s=async l=>{if(l){let c=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";c==="/"?un.push(`${l.pathname}`):(c.endsWith("/")&&(c=c.substring(0,c.length-1)),un.push(`${c}${l.pathname}`)),window.location.reload()}},a=(l,...c)=>{let h=typeof t=="function"?t(l,...c):t;return h?(typeof h=="string"&&(h={description:h}),r({title:i("common.noticeTitle"),description:i("common.leavePageTip"),confirm:i("common.confirm"),cancel:i("common.cancel"),onConfirm:()=>s(l),onCancel:()=>o(),...h}),!1):!0};return e.jsxs(Fi,{children:[e.jsx(Oi,{message:a}),n&&e.jsx(re,{title:n.title,description:n.description,confirm:n.confirm,cancel:n.cancel,params:n.params,onConfirm:n.onConfirm,onCancel:n.onCancel})]})}Lt.propTypes={confirm:u.oneOfType([u.object,u.string,u.func])};Lt.defaultProps={confirm:null};const Fi=V.div`
2
2
  margin-bottom: 24px;
3
3
  .top-btns-alert {
4
4
  @media (max-width: ${t=>t.theme.breakpoints.values.sm}px) {
@@ -1,4 +1,4 @@
1
- import{r,U as u,j as e,dZ as p,dO as I,eQ as M,eR as S,P as t,ez as b,s as m,eS as E}from"./index-D8jEuOKc.js";import{d as v}from"./ExpandMore-DpwumCaI.js";import{B as A}from"./ButtonGroup-CZh258li.js";function d(s){const{size:f,color:i,menu:a,children:l,variant:h,onClick:x,menuButtonProps:y,...g}=s,[j,c]=r.useState(!1),o=r.useRef(null),k=Array.isArray(a)?a.map((n,z)=>r.isValidElement(n)?n:r.createElement(u,{...n,key:z})):a,B=()=>{c(n=>!n)},C=n=>{o.current&&o.current.contains(n.target)||c(!1)},P=n=>{n.target.closest(".MuiMenuItem-root")&&c(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs(L,{variant:h,size:f,color:i,ref:o,...g,children:[typeof l=="function"?l():e.jsx(p,{onClick:x,color:i,children:l}),e.jsx(p,{onClick:B,color:i,...y,"aria-label":"more functions",children:e.jsx(v,{})})]}),e.jsx(O,{open:j,anchorEl:o.current,placement:"bottom-end",disablePortal:!1,children:e.jsx(I,{children:e.jsx(M,{onClickAway:C,children:e.jsx(S,{onClick:P,children:k})})})})]})}d.propTypes={size:t.string,color:t.string,menu:t.oneOfType([t.node,t.array]),children:t.node,variant:t.oneOf(["outlined","contained"]),onClick:t.func,menuButtonProps:t.object};d.defaultProps={size:"medium",color:"primary",menu:[],children:null,variant:"contained",onClick:b,menuButtonProps:{}};d.Item=u;const L=m(A)`
1
+ import{r,U as u,j as e,dZ as p,dO as I,eQ as M,eR as S,P as t,ez as b,s as m,eS as E}from"./index-C9QWROlO.js";import{d as v}from"./ExpandMore-DkEFEOxf.js";import{B as A}from"./ButtonGroup-7mkCQlrm.js";function d(s){const{size:f,color:i,menu:a,children:l,variant:h,onClick:x,menuButtonProps:y,...g}=s,[j,c]=r.useState(!1),o=r.useRef(null),k=Array.isArray(a)?a.map((n,z)=>r.isValidElement(n)?n:r.createElement(u,{...n,key:z})):a,B=()=>{c(n=>!n)},C=n=>{o.current&&o.current.contains(n.target)||c(!1)},P=n=>{n.target.closest(".MuiMenuItem-root")&&c(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs(L,{variant:h,size:f,color:i,ref:o,...g,children:[typeof l=="function"?l():e.jsx(p,{onClick:x,color:i,children:l}),e.jsx(p,{onClick:B,color:i,...y,"aria-label":"more functions",children:e.jsx(v,{})})]}),e.jsx(O,{open:j,anchorEl:o.current,placement:"bottom-end",disablePortal:!1,children:e.jsx(I,{children:e.jsx(M,{onClickAway:C,children:e.jsx(S,{onClick:P,children:k})})})})]})}d.propTypes={size:t.string,color:t.string,menu:t.oneOfType([t.node,t.array]),children:t.node,variant:t.oneOf(["outlined","contained"]),onClick:t.func,menuButtonProps:t.object};d.defaultProps={size:"medium",color:"primary",menu:[],children:null,variant:"contained",onClick:b,menuButtonProps:{}};d.Item=u;const L=m(A)`
2
2
  > .MuiButtonBase-root:last-of-type {
3
3
  min-width: 2em;
4
4
  padding-left: 0;
@@ -1,4 +1,4 @@
1
- var Ft=Object.defineProperty;var zt=(e,t,n)=>t in e?Ft(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Q=(e,t,n)=>zt(e,typeof t!="symbol"?t+"":t,n);import{r as S,aP as Ht,f_ as Dt,j as d,cd as ce,fN as G,f$ as et,P as u,g0 as Bt,aO as Ut,ch as Qt,a2 as Vt,eS as Wt,eQ as Zt,g1 as Gt,dO as Jt,d1 as A,a6 as Yt,a7 as Xt,g2 as Kt,Q as P,g3 as en,m as tn,g4 as nn,g5 as on,B as rn,g6 as sn,fL as tt,t as te,g7 as cn,g8 as an,cm as ln,g9 as un,s as M,ga as fn,gb as nt,c3 as ot,gc as dn,aA as rt,bT as de,ai as pn,co as st,gd as hn}from"./index-D8jEuOKc.js";import{d as gn}from"./ExpandMore-DpwumCaI.js";/**
1
+ var Ft=Object.defineProperty;var zt=(e,t,n)=>t in e?Ft(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Q=(e,t,n)=>zt(e,typeof t!="symbol"?t+"":t,n);import{r as S,aP as Ht,fZ as Dt,j as d,cd as ce,fN as G,f_ as et,P as u,f$ as Bt,aO as Ut,ch as Qt,a2 as Vt,eS as Wt,eQ as Zt,g0 as Gt,dO as Jt,d1 as A,a6 as Yt,a7 as Xt,g1 as Kt,Q as P,g2 as en,m as tn,g3 as nn,g4 as on,B as rn,g5 as sn,fL as tt,t as te,g6 as cn,g7 as an,cm as ln,g8 as un,s as M,g9 as fn,ga as nt,c3 as ot,gb as dn,aA as rt,bT as de,ai as pn,co as st,gc as hn}from"./index-C9QWROlO.js";import{d as gn}from"./ExpandMore-DkEFEOxf.js";/**
2
2
  * (c) Iconify
3
3
  *
4
4
  * For the full copyright and license information, please view the license.txt
@@ -1,4 +1,4 @@
1
- import{aK as S,aL as _,j as e,bl as D,r as p,f as O,m as u,aZ as U,a_ as E,V as F,cb as V,B as $,C as k,bd as K,a6 as Q,a7 as R,O as Z,cc as w,cd as A,ce as L,a8 as I,a5 as P,ax as T,a2 as M,Q as G,at as H,n as J,P as i,o as W,cf as X}from"./index-D8jEuOKc.js";import{f as Y}from"./index-BojVbZw0.js";import{P as ee}from"./Pagination-CtEI84NR.js";import"./LastPage-CFPei4j4.js";var x={},te=_;Object.defineProperty(x,"__esModule",{value:!0});var g=x.default=void 0,ie=te(S()),ae=e;g=x.default=(0,ie.default)((0,ae.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff");function h({api:a,paging:o,loading:c,notifications:s,updateNotifications:r,teamDid:j}){const{inService:d}=D(),[m,q]=p.useState(!0),[y,b]=p.useState(!1),{t:n,locale:v}=p.useContext(O),z=async()=>{b(!0);const t=s.filter(l=>l.read===!1).map(l=>l.id).join(",");d?await a.readBlockletNotifications({input:{id:t,teamDid:j}}):await a.readNotifications({input:{id:t}}),r(),b(!1)},N=async t=>{d?await a.readBlockletNotifications({input:{id:t,teamDid:j}}):await a.readNotifications({input:{id:t}}),r()},f=m?s:s.filter(t=>t.read===!1),B=s.filter(t=>t.read===!1).length>0,C=t=>e.jsxs("div",{className:"title",children:[t.title," ",e.jsx("span",{className:"time-ago",title:H(t.createdAt,v),children:Y(new Date(t.createdAt),W(v))})]});return e.jsxs(se,{children:[e.jsxs(u,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:[n("notification.title"),e.jsxs(u,{component:"span",className:"notification-actions",children:[e.jsx(U,{control:e.jsx(E,{checked:m,onChange:()=>q(!m),name:"showRead",color:"primary"}),label:n("notification.showRead")}),e.jsx(F,{permission:d?"":"mutate_notification",role:d?V:[],children:B&&e.jsxs($,{disabled:y,onClick:z,className:"",children:[y&&e.jsx(k,{size:16,style:{marginRight:"1em"}}),n("notification.markAllAsRead")]})})]})]}),e.jsx(K,{}),e.jsxs(Q,{className:"notification-list",children:[c&&e.jsx(k,{size:[32,20],style:{opacity:"0.8",zIndex:1e4,position:"fixed",top:30,left:"50%",marginLeft:-16}}),f.length===0&&e.jsx(u,{component:"p",variant:"body1",className:"notification-tip",children:n("notification.empty")}),f.length>0&&f.map(t=>t.action?e.jsxs(R,{component:Z,to:t.action,alignItems:"flex-start",disabled:t.read,children:[e.jsx(w,{className:"list-item-avatar",children:e.jsxs(e.Fragment,{children:[e.jsx(A,{children:t.entityType.substr(0,1).toUpperCase()}),e.jsx(L,{className:"notification-tag",status:t.severity})]})}),e.jsx(I,{className:"list-item-text",classes:{secondary:"list-item-secondary-text"},primary:C(t),secondary:t.description}),t.read===!1&&e.jsx(P,{children:e.jsx(T,{title:n("notification.markAsRead"),children:e.jsx(M,{edge:"end","aria-label":"delete",onClick:()=>N(t.id),size:"large",children:e.jsx(g,{})})})})]},t.id):e.jsxs(R,{alignItems:"flex-start",disabled:t.read,children:[e.jsx(w,{className:"list-item-avatar",children:e.jsxs(e.Fragment,{children:[e.jsx(A,{children:t.entityType.substr(0,1).toUpperCase()}),e.jsx(L,{className:"notification-tag",status:t.severity})]})}),e.jsx(I,{className:"list-item-text",classes:{secondary:"list-item-secondary-text"},primary:C(t),secondary:t.description}),t.read===!1&&e.jsx(P,{children:e.jsx(T,{title:n("notification.markAsRead"),children:e.jsx(M,{edge:"end","aria-label":"delete",onClick:()=>N(t.id),size:"large",children:e.jsx(g,{})})})})]},t.id))]}),!!f.length&&o.pageCount>1&&e.jsx(G,{mt:2,display:"flex",justifyContent:"flex-end",children:e.jsx(ee,{disabled:c,count:o.pageCount,page:o.page,onChange:(t,l)=>{r({page:l})}})})]})}const se=J.div`
1
+ import{aK as S,aL as _,j as e,bl as D,r as p,f as O,m as u,aZ as U,a_ as E,V as F,cb as V,B as $,C as k,bd as K,a6 as Q,a7 as R,O as Z,cc as w,cd as A,ce as L,a8 as I,a5 as P,ax as T,a2 as M,Q as G,at as H,n as J,P as i,o as W,cf as X}from"./index-C9QWROlO.js";import{f as Y}from"./index-BojVbZw0.js";import{P as ee}from"./Pagination-BNBOxoP7.js";import"./LastPage-DvyF__jR.js";var x={},te=_;Object.defineProperty(x,"__esModule",{value:!0});var g=x.default=void 0,ie=te(S()),ae=e;g=x.default=(0,ie.default)((0,ae.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff");function h({api:a,paging:o,loading:c,notifications:s,updateNotifications:r,teamDid:j}){const{inService:d}=D(),[m,q]=p.useState(!0),[y,b]=p.useState(!1),{t:n,locale:v}=p.useContext(O),z=async()=>{b(!0);const t=s.filter(l=>l.read===!1).map(l=>l.id).join(",");d?await a.readBlockletNotifications({input:{id:t,teamDid:j}}):await a.readNotifications({input:{id:t}}),r(),b(!1)},N=async t=>{d?await a.readBlockletNotifications({input:{id:t,teamDid:j}}):await a.readNotifications({input:{id:t}}),r()},f=m?s:s.filter(t=>t.read===!1),B=s.filter(t=>t.read===!1).length>0,C=t=>e.jsxs("div",{className:"title",children:[t.title," ",e.jsx("span",{className:"time-ago",title:H(t.createdAt,v),children:Y(new Date(t.createdAt),W(v))})]});return e.jsxs(se,{children:[e.jsxs(u,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:[n("notification.title"),e.jsxs(u,{component:"span",className:"notification-actions",children:[e.jsx(U,{control:e.jsx(E,{checked:m,onChange:()=>q(!m),name:"showRead",color:"primary"}),label:n("notification.showRead")}),e.jsx(F,{permission:d?"":"mutate_notification",role:d?V:[],children:B&&e.jsxs($,{disabled:y,onClick:z,className:"",children:[y&&e.jsx(k,{size:16,style:{marginRight:"1em"}}),n("notification.markAllAsRead")]})})]})]}),e.jsx(K,{}),e.jsxs(Q,{className:"notification-list",children:[c&&e.jsx(k,{size:[32,20],style:{opacity:"0.8",zIndex:1e4,position:"fixed",top:30,left:"50%",marginLeft:-16}}),f.length===0&&e.jsx(u,{component:"p",variant:"body1",className:"notification-tip",children:n("notification.empty")}),f.length>0&&f.map(t=>t.action?e.jsxs(R,{component:Z,to:t.action,alignItems:"flex-start",disabled:t.read,children:[e.jsx(w,{className:"list-item-avatar",children:e.jsxs(e.Fragment,{children:[e.jsx(A,{children:t.entityType.substr(0,1).toUpperCase()}),e.jsx(L,{className:"notification-tag",status:t.severity})]})}),e.jsx(I,{className:"list-item-text",classes:{secondary:"list-item-secondary-text"},primary:C(t),secondary:t.description}),t.read===!1&&e.jsx(P,{children:e.jsx(T,{title:n("notification.markAsRead"),children:e.jsx(M,{edge:"end","aria-label":"delete",onClick:()=>N(t.id),size:"large",children:e.jsx(g,{})})})})]},t.id):e.jsxs(R,{alignItems:"flex-start",disabled:t.read,children:[e.jsx(w,{className:"list-item-avatar",children:e.jsxs(e.Fragment,{children:[e.jsx(A,{children:t.entityType.substr(0,1).toUpperCase()}),e.jsx(L,{className:"notification-tag",status:t.severity})]})}),e.jsx(I,{className:"list-item-text",classes:{secondary:"list-item-secondary-text"},primary:C(t),secondary:t.description}),t.read===!1&&e.jsx(P,{children:e.jsx(T,{title:n("notification.markAsRead"),children:e.jsx(M,{edge:"end","aria-label":"delete",onClick:()=>N(t.id),size:"large",children:e.jsx(g,{})})})})]},t.id))]}),!!f.length&&o.pageCount>1&&e.jsx(G,{mt:2,display:"flex",justifyContent:"flex-end",children:e.jsx(ee,{disabled:c,count:o.pageCount,page:o.page,onChange:(t,l)=>{r({page:l})}})})]})}const se=J.div`
2
2
  min-height: 60vh;
3
3
 
4
4
  .page-header {
@@ -1,4 +1,4 @@
1
- import{P as o,s as C,j as n,Q as u,aK as x,aL as g,ai as j,t as T}from"./index-D8jEuOKc.js";function i({icon:e,title:t,description:s,extra:I,...O}){return n.jsxs(w,{...O,children:[e,typeof t=="string"?n.jsx(u,{mt:3,fontSize:22,fontWeight:400,color:"#47494E",textAlign:"center",children:t}):t,typeof s=="string"?n.jsx(u,{mt:1,fontSize:14,color:"#7F828B",textAlign:"center",children:s}):s,n.jsx(u,{mt:3,children:I})]})}i.propTypes={icon:o.element,title:o.oneOfType([o.string,o.element]),description:o.oneOfType([o.string,o.element]),actions:o.any,extra:o.element};i.defaultProps={icon:void 0,title:"",description:"",actions:null,extra:void 0};const w=C("div")`
1
+ import{P as o,s as C,j as n,Q as u,aK as x,aL as g,ai as j,t as T}from"./index-C9QWROlO.js";function i({icon:e,title:t,description:s,extra:I,...O}){return n.jsxs(w,{...O,children:[e,typeof t=="string"?n.jsx(u,{mt:3,fontSize:22,fontWeight:400,color:"#47494E",textAlign:"center",children:t}):t,typeof s=="string"?n.jsx(u,{mt:1,fontSize:14,color:"#7F828B",textAlign:"center",children:s}):s,n.jsx(u,{mt:3,children:I})]})}i.propTypes={icon:o.element,title:o.oneOfType([o.string,o.element]),description:o.oneOfType([o.string,o.element]),actions:o.any,extra:o.element};i.defaultProps={icon:void 0,title:"",description:"",actions:null,extra:void 0};const w=C("div")`
2
2
  box-sizing: border-box;
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -1,4 +1,4 @@
1
- import{r as H,j as o,fw as ho,ch as Ye,fx as go,aK as yr,aL as vr,fe as dt,Q as J,as as br,ax as Ke,m as xe,dW as yo,d1 as Hr,fy as vo,t as ke,fz as xr,fA as bo,aG as xo,cg as wo,dZ as ir,S as jt,eE as _n,eH as Ct,fB as mt,eV as Ce,fC as Eo,fk as Nn,fD as jo,fE as So,fl as Ln,fF as wr,fG as Ao,fH as Po,fI as Oo,fJ as Io,eD as ar,g as Ro,cO as Gr,eK as To,N as Co,bl as Ne,aO as Bn,U as St,eL as Do,fK as Er,at as ht,D as Ze,B as Ae,C as ot,x as jr,K as nt,M as Xe,P as $,fL as _o,k as sr,aU as No,y as Lo,z as Bo,n as Le,fd as ko,f as gt,ac as Dt,V as Fe,cb as Qe,E as it,fM as Uo,b as Je,d5 as qo,v as kn,H as Se,q as cr,W as At,cd as Fo,fN as Ko,fO as Un,aQ as Mo,aD as $o,a8 as zo,cA as Vo,a2 as Wo,bp as Ho,aZ as Go,a_ as Yo,R as Zo}from"./index-D8jEuOKc.js";import{c as Jo}from"./index-BmM7M1I1.js";import{d as Pt}from"./Add-DaKGD4dI.js";import{d as Xo}from"./Loop-BuLkY4qW.js";import{d as Qo}from"./ViewList-5t3FBolC.js";import{L as ei,S as ti,d as qn}from"./list-header-dggL7_n2.js";import{D as Sr,g as ri}from"./index-UkVmuOk4.js";import"./index-ePYaxWaQ.js";import{c as qt,U as Ft,d as Fn}from"./resource-dialog-D-vI8e9q.js";import{T as ni}from"./index-BZ5mGJWw.js";import{E as Kn}from"./index-DK-C26MA.js";import"./index-CNUQDecb.js";import"./index-Cw0JQB9z.js";import{l as Mn}from"./index-B1dhqxPU.js";import{o as $n}from"./index-ZG7jWpak.js";import{W as zn}from"./url-evaluation-DRU1r0m1.js";import{a as $e}from"./team-BOnxiYnY.js";import{u as Vn}from"./blocklet-_qJbakx7.js";import{C as _t}from"./click-to-copy-DLjgvWtN.js";import{F as lr,S as ur}from"./Select-DsA6mJ7A.js";import{I as fr}from"./InputLabel-x5fGAphs.js";import{T as Wn}from"./TextField-CRqdsKdk.js";import{I as dr}from"./index-zAZnE_sV.js";import{b as oi}from"./sdk-BqXPS3TR.js";import{d as ii}from"./Delete-DUmhYiAq.js";import{A as ai}from"./actions-BkAN9H2U.js";import{S as si}from"./shorten-label-CBdfm00-.js";var Ar={};Object.defineProperty(Ar,"__esModule",{value:!0});var Hn=Ar.default=void 0;ci(H);var tt=o;function ci(e){return e&&e.__esModule?e:{default:e}}function Yr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Zr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yr(Object(r),!0).forEach(function(n){li(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function li(e,t,r){return(t=ui(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ui(e){var t=fi(e,"string");return typeof t=="symbol"?t:t+""}function fi(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Pr=function(t){return(0,tt.jsxs)("svg",Zr(Zr({},t),{},{children:[(0,tt.jsx)("g",{clipPath:"url(#clip0)",children:(0,tt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1.598A4.092 4.092 0 1 0 9 9.78a4.092 4.092 0 0 0 0-8.183zM7.274 3.964a2.44 2.44 0 1 1 3.452 3.451 2.44 2.44 0 0 1-3.452-3.451zm.093 6.343A4.091 4.091 0 0 0 3.275 14.4v2.722c0 .155.126.281.281.281h1.09a.281.281 0 0 0 .28-.281v-2.722a2.44 2.44 0 0 1 2.44-2.44h3.267a2.442 2.442 0 0 1 2.44 2.44v2.722c0 .155.127.281.282.281h1.088a.281.281 0 0 0 .282-.281v-2.722a4.091 4.091 0 0 0-4.092-4.091H7.367z"})}),(0,tt.jsx)("defs",{children:(0,tt.jsx)("clipPath",{id:"clip0",children:(0,tt.jsx)("path",{transform:"translate(0 .5)",d:"M0 0h18v18H0z"})})})]}))};Pr.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};Pr.displayName="person";Hn=Ar.default=Pr;var Et={},di=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Gn="%[a-f0-9]{2}",Jr=new RegExp("("+Gn+")|([^%]+?)","gi"),Xr=new RegExp("("+Gn+")+","gi");function pr(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],pr(r),pr(n))}function pi(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(Jr)||[],r=1;r<t.length;r++)e=pr(t,r).join(""),t=e.match(Jr)||[];return e}}function mi(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=Xr.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=pi(r[0]);n!==r[0]&&(t[r[0]]=n)}r=Xr.exec(e)}t["%C2"]="�";for(var s=Object.keys(t),u=0;u<s.length;u++){var p=s[u];e=e.replace(new RegExp(p,"g"),t[p])}return e}var hi=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return mi(e)}},gi=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},yi=function(e,t){for(var r={},n=Object.keys(e),s=Array.isArray(t),u=0;u<n.length;u++){var p=n[u],y=e[p];(s?t.indexOf(p)!==-1:t(p,y,e))&&(r[p]=y)}return r};(function(e){const t=di,r=hi,n=gi,s=yi,u=c=>c==null;function p(c){switch(c.arrayFormat){case"index":return i=>(a,f)=>{const b=a.length;return f===void 0||c.skipNull&&f===null||c.skipEmptyString&&f===""?a:f===null?[...a,[E(i,c),"[",b,"]"].join("")]:[...a,[E(i,c),"[",E(b,c),"]=",E(f,c)].join("")]};case"bracket":return i=>(a,f)=>f===void 0||c.skipNull&&f===null||c.skipEmptyString&&f===""?a:f===null?[...a,[E(i,c),"[]"].join("")]:[...a,[E(i,c),"[]=",E(f,c)].join("")];case"comma":case"separator":return i=>(a,f)=>f==null||f.length===0?a:a.length===0?[[E(i,c),"=",E(f,c)].join("")]:[[a,E(f,c)].join(c.arrayFormatSeparator)];default:return i=>(a,f)=>f===void 0||c.skipNull&&f===null||c.skipEmptyString&&f===""?a:f===null?[...a,E(i,c)]:[...a,[E(i,c),"=",E(f,c)].join("")]}}function y(c){let i;switch(c.arrayFormat){case"index":return(a,f,b)=>{if(i=/\[(\d*)\]$/.exec(a),a=a.replace(/\[\d*\]$/,""),!i){b[a]=f;return}b[a]===void 0&&(b[a]={}),b[a][i[1]]=f};case"bracket":return(a,f,b)=>{if(i=/(\[\])$/.exec(a),a=a.replace(/\[\]$/,""),!i){b[a]=f;return}if(b[a]===void 0){b[a]=[f];return}b[a]=[].concat(b[a],f)};case"comma":case"separator":return(a,f,b)=>{const I=typeof f=="string"&&f.includes(c.arrayFormatSeparator),j=typeof f=="string"&&!I&&d(f,c).includes(c.arrayFormatSeparator);f=j?d(f,c):f;const L=I||j?f.split(c.arrayFormatSeparator).map(z=>d(z,c)):f===null?f:d(f,c);b[a]=L};default:return(a,f,b)=>{if(b[a]===void 0){b[a]=f;return}b[a]=[].concat(b[a],f)}}}function w(c){if(typeof c!="string"||c.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function E(c,i){return i.encode?i.strict?t(c):encodeURIComponent(c):c}function d(c,i){return i.decode?r(c):c}function O(c){return Array.isArray(c)?c.sort():typeof c=="object"?O(Object.keys(c)).sort((i,a)=>Number(i)-Number(a)).map(i=>c[i]):c}function x(c){const i=c.indexOf("#");return i!==-1&&(c=c.slice(0,i)),c}function A(c){let i="";const a=c.indexOf("#");return a!==-1&&(i=c.slice(a)),i}function S(c){c=x(c);const i=c.indexOf("?");return i===-1?"":c.slice(i+1)}function N(c,i){return i.parseNumbers&&!Number.isNaN(Number(c))&&typeof c=="string"&&c.trim()!==""?c=Number(c):i.parseBooleans&&c!==null&&(c.toLowerCase()==="true"||c.toLowerCase()==="false")&&(c=c.toLowerCase()==="true"),c}function P(c,i){i=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},i),w(i.arrayFormatSeparator);const a=y(i),f=Object.create(null);if(typeof c!="string"||(c=c.trim().replace(/^[?#&]/,""),!c))return f;for(const b of c.split("&")){if(b==="")continue;let[I,j]=n(i.decode?b.replace(/\+/g," "):b,"=");j=j===void 0?null:["comma","separator"].includes(i.arrayFormat)?j:d(j,i),a(d(I,i),j,f)}for(const b of Object.keys(f)){const I=f[b];if(typeof I=="object"&&I!==null)for(const j of Object.keys(I))I[j]=N(I[j],i);else f[b]=N(I,i)}return i.sort===!1?f:(i.sort===!0?Object.keys(f).sort():Object.keys(f).sort(i.sort)).reduce((b,I)=>{const j=f[I];return j&&typeof j=="object"&&!Array.isArray(j)?b[I]=O(j):b[I]=j,b},Object.create(null))}e.extract=S,e.parse=P,e.stringify=(c,i)=>{if(!c)return"";i=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},i),w(i.arrayFormatSeparator);const a=j=>i.skipNull&&u(c[j])||i.skipEmptyString&&c[j]==="",f=p(i),b={};for(const j of Object.keys(c))a(j)||(b[j]=c[j]);const I=Object.keys(b);return i.sort!==!1&&I.sort(i.sort),I.map(j=>{const L=c[j];return L===void 0?"":L===null?E(j,i):Array.isArray(L)?L.reduce(f(j),[]).join("&"):E(j,i)+"="+E(L,i)}).filter(j=>j.length>0).join("&")},e.parseUrl=(c,i)=>{i=Object.assign({decode:!0},i);const[a,f]=n(c,"#");return Object.assign({url:a.split("?")[0]||"",query:P(S(c),i)},i&&i.parseFragmentIdentifier&&f?{fragmentIdentifier:d(f,i)}:{})},e.stringifyUrl=(c,i)=>{i=Object.assign({encode:!0,strict:!0},i);const a=x(c.url).split("?")[0]||"",f=e.extract(c.url),b=e.parse(f,{sort:!1}),I=Object.assign(b,c.query);let j=e.stringify(I,i);j&&(j=`?${j}`);let L=A(c.url);return c.fragmentIdentifier&&(L=`#${E(c.fragmentIdentifier,i)}`),`${a}${j}${L}`},e.pick=(c,i,a)=>{a=Object.assign({parseFragmentIdentifier:!0},a);const{url:f,query:b,fragmentIdentifier:I}=e.parseUrl(c,a);return e.stringifyUrl({url:f,query:s(b,i),fragmentIdentifier:I},a)},e.exclude=(c,i,a)=>{const f=Array.isArray(i)?b=>!i.includes(b):(b,I)=>!i(b,I);return e.pick(c,f,a)}})(Et);const ut=go,vi={parseNumbers:!1,parseBooleans:!1},bi={skipNull:!1,skipEmptyString:!1},xi=(e,t)=>{var r,n;const{navigateMode:s="push",parseOptions:u,stringifyOptions:p}={},y=Object.assign(Object.assign({},vi),u),w=Object.assign(Object.assign({},bi),p),E=ut.useLocation(),d=(r=ut.useHistory)===null||r===void 0?void 0:r.call(ut),O=(n=ut.useNavigate)===null||n===void 0?void 0:n.call(ut),x=ho(),A=H.useRef(typeof e=="function"?e():e||{}),S=H.useMemo(()=>Et.parse(E.search,y),[E.search]),N=H.useMemo(()=>Object.assign(Object.assign({},A.current),S),[S]);return[N,Ye(c=>{const i=typeof c=="function"?c(N):c;x(),d&&d[s]({hash:E.hash,search:Et.stringify(Object.assign(Object.assign({},S),i),w)||"?"},E.state),O&&O({hash:E.hash,search:Et.stringify(Object.assign(Object.assign({},S),i),w)||"?"},{replace:s==="replace",state:E.state})})]},wi=xi;var Or={},Ei=vr;Object.defineProperty(Or,"__esModule",{value:!0});var Yn=Or.default=void 0,ji=Ei(yr()),Si=o;Yn=Or.default=(0,ji.default)((0,Si.jsx)("path",{d:"m23 12-2.44-2.79.34-3.69-3.61-.82-1.89-3.2L12 2.96 8.6 1.5 6.71 4.69 3.1 5.5l.34 3.7L1 12l2.44 2.79-.34 3.7 3.61.82L8.6 22.5l3.4-1.47 3.4 1.46 1.89-3.19 3.61-.82-.34-3.69zm-12.91 4.72-3.8-3.81 1.48-1.48 2.32 2.33 5.85-5.87 1.48 1.48z"}),"Verified");let Ai=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t}};const Qr=e=>globalThis.DOMException===void 0?new Ai(e):new DOMException(e),en=e=>{const t=e.reason===void 0?Qr("This operation was aborted."):e.reason;return t instanceof Error?t:Qr(t)};async function Pi(e,t,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:n=!0,signal:s}={}){return new Promise((u,p)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(r)||r===Number.POSITIVE_INFINITY)&&r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);const y=[],w=[],E=new Map;let d=!1,O=!1,x=!1,A=0,S=0;const N=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),P=i=>{d=!0,O=!0,p(i)};s&&(s.aborted&&P(en(s)),s.addEventListener("abort",()=>{P(en(s))}));const c=async()=>{if(O)return;const i=await N.next(),a=S;if(S++,i.done){if(x=!0,A===0&&!O){if(!n&&w.length>0){P(new AggregateError(w));return}if(O=!0,E.size===0){u(y);return}const f=[];for(const[b,I]of y.entries())E.get(b)!==tn&&f.push(I);u(f)}return}A++,(async()=>{try{const f=await i.value;if(O)return;const b=await t(f,a);b===tn&&E.set(a,b),y[a]=b,A--,await c()}catch(f){if(n)P(f);else{w.push(f),A--;try{await c()}catch(b){P(b)}}}})()};(async()=>{for(let i=0;i<r;i++){try{await c()}catch(a){P(a);break}if(x||d)break}})()})}const tn=Symbol("skip");async function Oi(e,t){return Pi(e,r=>r(),t)}function Ii({user:e,sessionUser:t}){const r=dt(()=>{var n;return(n=(e==null?void 0:e.passports)||[])==null?void 0:n.find(s=>s.name===t.role)},[e==null?void 0:e.passports,t==null?void 0:t.role]);return o.jsxs(J,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.jsx(br,{size:40,variant:"circle",shape:"circle",src:t.avatar,did:t.did,sx:{flexShrink:0}}),o.jsxs(J,{sx:{flex:1,overflow:"hidden"},children:[o.jsxs(J,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.jsx(Ke,{title:t.fullName,children:o.jsx(xe,{sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flex:1},children:t.fullName})}),o.jsx(yo,{label:(r==null?void 0:r.title)||(r==null?void 0:r.name)||"Guest",size:"small",variant:"outlined",sx:{flexShrink:0,fontWeight:"bold",fontSize:"12px",color:Hr.textBase,borderColor:Hr.strokeBorderStrong,backgroundColor:"transparent",textTransform:"capitalize",pr:.5,pl:0,height:"auto"}})]}),o.jsx(Ke,{title:t.email,children:o.jsx(xe,{variant:"body2",color:"grey",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t.email})})]})]})}const Ri={zh:{confirm:"确认",cancel:"取消",visitorId:"设备标识",deviceType:"设备类型",platform:"操作系统",walletOS:"钱包类型",role:"角色",fullname:"姓名",email:"邮箱",avatar:"头像",user:"用户",createdAt:"首次活动时间",updatedAt:"最近活动时间",lastLoginIp:"最近活动地址",actions:"操作",logoutAll:"注销所有会话",logoutAllTips:"不会注销当前会话",logout:"注销",currentSession:"当前会话",unknown:"未知",expired:"已过期",remove:"删除",logoutThisSession:"注销指定会话",logoutThisSessionConfirm:"确定要注销此会话吗?",logoutAllSession:"注销所有会话",logoutAllSessionConfirm:"确定要注销所有会话吗?"},en:{confirm:"Confirm",cancel:"Cancel",visitorId:"Device ID",deviceType:"Device Type",platform:"Platform",walletOS:"Wallet OS",role:"Role",fullname:"Fullname",email:"Email",avatar:"Avatar",user:"User",createdAt:"First Active Time",updatedAt:"Last Active Time",actions:"Actions",lastLoginIp:"Last Login IP",logoutAll:"Logout all",logoutAllTips:"Will not logout current session",logout:"Logout",currentSession:"Current Session",unknown:"Unknown",expired:"Expired",remove:"Remove",logoutThisSession:"Logout this session",logoutThisSessionConfirm:"Are you sure to logout this session?",logoutAllSession:"Logout all sessions",logoutAllSessionConfirm:"Are you sure to logout all sessions?"}},Zn="Reserved IP",rn="ip-region-cache";async function Ti(e){const t=`https://ipapi.co/${e}/json/`,n=await(await fetch(t)).json();let s="";return n.error?n.reserved&&(s=Zn):s=[n.country_name,n.region,n.city].filter(Boolean).join("/"),s}async function Ci(e){const t=`https://api.ip.sb/geoip/${e}`,n=await(await fetch(t)).json();let s="";return n.error?n.reserved&&(s=Zn):s=[n.country,n.region,n.city].filter(Boolean).join("/"),s}async function Di(e){let t="",r={};try{const n=localStorage.getItem(rn);n&&(r=JSON.parse(n))}catch{r={}}if(r[e])t=r[e];else{try{t=await Ci(e)}catch{console.warn("Fail to get ip region from ip.sb")}if(!t)try{t=await Ti(e)}catch{console.warn("Fail to get ip region from ip-api.co")}}if(t){const n=Object.keys(r);n.length>100&&delete r[n[0]],r[e]&&delete r[e],r[e]=t,localStorage.setItem(rn,JSON.stringify(r))}return t}async function _i(e){return Promise.all(e.map(t=>Di(t)))}const nn=e=>new Ft(e,{browser:[[/(ArcWallet)\/([\w\.]+)/i],[Ft.BROWSER.NAME,Ft.BROWSER.VERSION]]}).getResult();function Ni({user:e,showAction:t=!0,showUser:r=!0}){const n=vo(),{locale:s}=ke(),{confirmApi:u,confirmHolder:p}=xr(),y=Ye((i,a={})=>bo(Ri,i,s,"en",a)),w=Ye(async()=>{let i=e==null?void 0:e.userSessions;i||(i=await qt.userSession.getUserSessions({did:e.did}));try{const f=i==null?void 0:i.map((j,L)=>[L,j.lastLoginIp]).filter(j=>!!j[1]),b=f==null?void 0:f.map(j=>j[1]),I=await _i(b);for(let j=0;j<I.length;j++){const L=I[j],z=f[j],X=i[z[0]];X.ipRegion=L}}catch(f){console.warn("Failed to convert ip to region"),console.error(f)}const a=new Date().getTime();return xo(i,f=>f.visitorId===n?-1:a-new Date(f.updatedAt).getTime())}),E=wo(w),d=dt(()=>E.data||[],[E.data]),O=dt(()=>d.reduce((i,a)=>(i[a.lastLoginIp]=a.ipRegion,i),{}),[d]),x=Ye(({visitorId:i})=>{u.open({title:y("logoutThisSession"),content:y("logoutThisSessionConfirm"),confirmButtonText:y("confirm"),cancelButtonText:y("cancel"),onConfirm:async()=>{await qt.user.logout({visitorId:i}),E.refresh(),u.close()}})}),A=dt(()=>d.filter(a=>a.visitorId!==n),[d]),S=Ye(()=>{u.open({title:y("logoutAllSession"),content:y("logoutAllSessionConfirm"),confirmButtonText:y("confirm"),cancelButtonText:y("cancel"),onConfirm:async()=>{const i=A.map(a=>()=>qt.user.logout({visitorId:a.visitorId}));await Oi(i,{concurrency:3,stopOnError:!1}),E.refresh(),u.close()}})}),N=[];t&&N.push(o.jsx(Ke,{title:y("logoutAllTips"),children:o.jsx(ir,{sx:{ml:.5},size:"small",variant:"contained",color:"error",onClick:S,disabled:A.length===0,children:y("logoutAll")})},"logoutAll"));const P=dt(()=>({search:!1,sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!1,searchDebounceTime:600}),[]),c=[{label:y("platform"),name:"platform",options:{customBodyRenderLite:i=>{var b,I;const a=d[i],f=nn(a.ua);return o.jsx(J,{children:[(b=f.os)==null?void 0:b.name,(I=f.os)==null?void 0:I.version].filter(Boolean).join("/")||y("unknown")})}}},{label:y("deviceType"),name:"deviceType",options:{customBodyRenderLite:i=>{var b,I;const a=d[i],f=nn(a.ua);return o.jsx(J,{children:[(b=f.browser)==null?void 0:b.name,(I=f.browser)==null?void 0:I.version].filter(Boolean).join("/")||y("unknown")})}}},{label:y("walletOS"),name:"walletOS",options:{customBodyRenderLite:i=>{var f;const a=d[i];return o.jsx(J,{children:((f=a.extra)==null?void 0:f.walletOS)||y("unknown")})}}},r&&{label:y("user"),name:"user",options:{customBodyRenderLite:i=>{const a=d[i];return o.jsx(J,{sx:{minWidth:150,maxWidth:250},children:o.jsx(Ii,{sessionUser:a.user,user:e})})}}},{label:y("createdAt"),name:"createdAt",options:{customBodyRenderLite:i=>{const a=d[i];return a.createdAt?o.jsx(jt,{value:a.createdAt,relativeRange:3*86400*1e3,locale:s}):y("unknown")}}},{label:y("updatedAt"),name:"updatedAt",options:{customBodyRenderLite:i=>{const a=d[i];return a.status==="expired"?y("expired"):o.jsx(jt,{value:a.updatedAt,relativeRange:3*86400*1e3,locale:s})}}},{label:y("lastLoginIp"),name:"lastLoginIp",options:{customBodyRenderLite:i=>{const a=d[i];return o.jsx(J,{children:O[a.lastLoginIp]?o.jsxs(o.Fragment,{children:[o.jsx(xe,{variant:"body2",children:O[a.lastLoginIp]}),o.jsx(xe,{variant:"body2",color:"grey",children:a.lastLoginIp||y("unknown")})]}):o.jsx(xe,{children:a.lastLoginIp||y("unknown")})})}}},t&&{label:y("actions"),name:"actions",options:{customBodyRenderLite:i=>{const a=d[i];return o.jsx(J,{children:o.jsx(ir,{sx:{whiteSpace:"nowrap",fontSize:"12px",px:1},disabled:n===a.visitorId,variant:"outlined",size:"small",color:"error",onClick:()=>x({visitorId:a.visitorId}),children:a.status==="expired"?y("remove"):n===a.visitorId?y("currentSession"):y("logout")})})}}}].filter(Boolean);return o.jsxs(J,{sx:{".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"}},children:[p,o.jsx(Sr,{locale:s,data:d,columns:c,customButtons:N,options:P,loading:E.loading})]})}var he={};Object.defineProperty(he,"__esModule",{value:!0});he.isValid=he.fromJSON=he.fromRandom=he.fromAddress=he.fromPublicKey=he.fromSecretKey=he.Wallet=he.WalletType=void 0;const yt=_n,Ot=Ct,Ie=Mn;he.WalletType=Ie.DidType;function at(e,t="default"){const r=(0,Ie.DidType)(t),n=(0,Ot.getSigner)(r.pk),s=(0,Ot.getHasher)(r.hash);return{type:r,secretKey:e.sk,publicKey:e.pk,address:e.pk?(0,Ie.fromPublicKey)(e.pk,r):e.address,hash(u,p=1,y="hex"){return s(u,p,y)},sign(u,p=!0,y="hex"){if(!e.sk)throw new Error("Cannot sign data without a secretKey");if(p){const w=s(u,1);return n.sign(w,e.sk,y)}return n.sign(u,e.sk,y)},verify(u,p,y=!0){if(!e.pk)throw new Error("Cannot verify data without a publicKey");const w=y?s(u,1):u;return n.verify(w,p,e.pk)},ethHash(u){if(typeof n.ethHash!="function")throw new Error("ethHash is not supported by signer");return n.ethHash(u)},ethSign(u,p=!0){if(!e.sk)throw new Error("Cannot sign data without a secretKey");if(typeof n.ethHash!="function")throw new Error("ethSign is not supported by signer");return p?n.ethSign(n.ethHash(u),(0,yt.toHex)(e.sk)):n.ethSign(u,(0,yt.toHex)(e.sk))},ethVerify(u,p,y=!0){if(typeof n.ethHash!="function")throw new Error("ethVerify is not supported by signer");const w=y?n.ethHash(u):u;return n.ethRecover(w,p)===this.address},toAddress(){return e.pk?(0,Ie.fromPublicKey)(e.pk,r):e.address},toJSON(){return{type:Ie.DidType.toJSON(r),sk:(0,yt.toHex)(e.sk),pk:(0,yt.toHex)(e.pk),address:this.address}}}}he.Wallet=at;function Li(e,t="default"){const r=(0,Ie.DidType)(t),n={sk:e,pk:(0,Ot.getSigner)(r.pk).getPublicKey(e)};return at(n,r)}he.fromSecretKey=Li;function Bi(e,t="default"){return at({pk:e},(0,Ie.DidType)(t))}he.fromPublicKey=Bi;function ki(e){return at({address:(0,Ie.toAddress)(e)},(0,Ie.toTypeInfo)(e))}he.fromAddress=ki;function Ui(e="default"){const t=(0,Ie.DidType)(e),n=(0,Ot.getSigner)(t.pk).genKeyPair();return at({sk:n.secretKey,pk:n.publicKey},t)}he.fromRandom=Ui;function qi(e){const t=Ie.DidType.fromJSON(e.type);return at(e,t)}he.fromJSON=qi;function Fi(e,t=!0){return!(!e||typeof e!="object"||typeof e.verify!="function"||typeof e.toAddress!="function"||typeof e.toJSON!="function"||!e.type||!e.publicKey||t&&(!e.secretKey||typeof e.sign!="function"))}he.isValid=Fi;var Kt={exports:{}},Mt={},on;function Jn(){if(on)return Mt;on=1;function e(i){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e(i)}function t(i,a,f){return Object.defineProperty(i,"prototype",{writable:!1}),i}function r(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function n(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),a&&s(i,a)}function s(i,a){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,I){return b.__proto__=I,b},s(i,a)}function u(i){var a=w();return function(){var b=E(i),I;if(a){var j=E(this).constructor;I=Reflect.construct(b,arguments,j)}else I=b.apply(this,arguments);return p(this,I)}}function p(i,a){if(a&&(e(a)==="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(i)}function y(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function E(i){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(f){return f.__proto__||Object.getPrototypeOf(f)},E(i)}var d={},O,x;function A(i,a,f){f||(f=Error);function b(j,L,z){return typeof a=="string"?a:a(j,L,z)}var I=function(j){n(z,j);var L=u(z);function z(X,Q,G){var ee;return r(this,z),ee=L.call(this,b(X,Q,G)),ee.code=i,ee}return t(z)}(f);d[i]=I}function S(i,a){if(Array.isArray(i)){var f=i.length;return i=i.map(function(b){return String(b)}),f>2?"one of ".concat(a," ").concat(i.slice(0,f-1).join(", "),", or ")+i[f-1]:f===2?"one of ".concat(a," ").concat(i[0]," or ").concat(i[1]):"of ".concat(a," ").concat(i[0])}else return"of ".concat(a," ").concat(String(i))}function N(i,a,f){return i.substr(0,a.length)===a}function P(i,a,f){return(f===void 0||f>i.length)&&(f=i.length),i.substring(f-a.length,f)===a}function c(i,a,f){return typeof f!="number"&&(f=0),f+a.length>i.length?!1:i.indexOf(a,f)!==-1}return A("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),A("ERR_INVALID_ARG_TYPE",function(i,a,f){O===void 0&&(O=mr()),O(typeof i=="string","'name' must be a string");var b;typeof a=="string"&&N(a,"not ")?(b="must not be",a=a.replace(/^not /,"")):b="must be";var I;if(P(i," argument"))I="The ".concat(i," ").concat(b," ").concat(S(a,"type"));else{var j=c(i,".")?"property":"argument";I='The "'.concat(i,'" ').concat(j," ").concat(b," ").concat(S(a,"type"))}return I+=". Received type ".concat(e(f)),I},TypeError),A("ERR_INVALID_ARG_VALUE",function(i,a){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";x===void 0&&(x=mt);var b=x.inspect(a);return b.length>128&&(b="".concat(b.slice(0,128),"...")),"The argument '".concat(i,"' ").concat(f,". Received ").concat(b)},TypeError),A("ERR_INVALID_RETURN_VALUE",function(i,a,f){var b;return f&&f.constructor&&f.constructor.name?b="instance of ".concat(f.constructor.name):b="type ".concat(e(f)),"Expected ".concat(i,' to be returned from the "').concat(a,'"')+" function but got ".concat(b,".")},TypeError),A("ERR_MISSING_ARGS",function(){for(var i=arguments.length,a=new Array(i),f=0;f<i;f++)a[f]=arguments[f];O===void 0&&(O=mr()),O(a.length>0,"At least one arg needs to be specified");var b="The ",I=a.length;switch(a=a.map(function(j){return'"'.concat(j,'"')}),I){case 1:b+="".concat(a[0]," argument");break;case 2:b+="".concat(a[0]," and ").concat(a[1]," arguments");break;default:b+=a.slice(0,I-1).join(", "),b+=", and ".concat(a[I-1]," arguments");break}return"".concat(b," must be specified")},TypeError),Mt.codes=d,Mt}var $t,an;function Ki(){if(an)return $t;an=1;function e(R,T){var F=Object.keys(R);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(R);T&&(D=D.filter(function(W){return Object.getOwnPropertyDescriptor(R,W).enumerable})),F.push.apply(F,D)}return F}function t(R){for(var T=1;T<arguments.length;T++){var F=arguments[T]!=null?arguments[T]:{};T%2?e(Object(F),!0).forEach(function(D){r(R,D,F[D])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(F)):e(Object(F)).forEach(function(D){Object.defineProperty(R,D,Object.getOwnPropertyDescriptor(F,D))})}return R}function r(R,T,F){return T=p(T),T in R?Object.defineProperty(R,T,{value:F,enumerable:!0,configurable:!0,writable:!0}):R[T]=F,R}function n(R,T){if(!(R instanceof T))throw new TypeError("Cannot call a class as a function")}function s(R,T){for(var F=0;F<T.length;F++){var D=T[F];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(R,p(D.key),D)}}function u(R,T,F){return T&&s(R.prototype,T),Object.defineProperty(R,"prototype",{writable:!1}),R}function p(R){var T=y(R,"string");return i(T)==="symbol"?T:String(T)}function y(R,T){if(i(R)!=="object"||R===null)return R;var F=R[Symbol.toPrimitive];if(F!==void 0){var D=F.call(R,T||"default");if(i(D)!=="object")return D;throw new TypeError("@@toPrimitive must return a primitive value.")}return(T==="string"?String:Number)(R)}function w(R,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(T&&T.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),Object.defineProperty(R,"prototype",{writable:!1}),T&&P(R,T)}function E(R){var T=S();return function(){var D=c(R),W;if(T){var g=c(this).constructor;W=Reflect.construct(D,arguments,g)}else W=D.apply(this,arguments);return d(this,W)}}function d(R,T){if(T&&(i(T)==="object"||typeof T=="function"))return T;if(T!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return O(R)}function O(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function x(R){var T=typeof Map=="function"?new Map:void 0;return x=function(D){if(D===null||!N(D))return D;if(typeof D!="function")throw new TypeError("Super expression must either be null or a function");if(typeof T<"u"){if(T.has(D))return T.get(D);T.set(D,W)}function W(){return A(D,arguments,c(this).constructor)}return W.prototype=Object.create(D.prototype,{constructor:{value:W,enumerable:!1,writable:!0,configurable:!0}}),P(W,D)},x(R)}function A(R,T,F){return S()?A=Reflect.construct.bind():A=function(W,g,m){var v=[null];v.push.apply(v,g);var B=Function.bind.apply(W,v),_=new B;return m&&P(_,m.prototype),_},A.apply(null,arguments)}function S(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function N(R){return Function.toString.call(R).indexOf("[native code]")!==-1}function P(R,T){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(D,W){return D.__proto__=W,D},P(R,T)}function c(R){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(F){return F.__proto__||Object.getPrototypeOf(F)},c(R)}function i(R){"@babel/helpers - typeof";return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},i(R)}var a=mt,f=a.inspect,b=Jn(),I=b.codes.ERR_INVALID_ARG_TYPE;function j(R,T,F){return(F===void 0||F>R.length)&&(F=R.length),R.substring(F-T.length,F)===T}function L(R,T){if(T=Math.floor(T),R.length==0||T==0)return"";var F=R.length*T;for(T=Math.floor(Math.log(T)/Math.log(2));T;)R+=R,T--;return R+=R.substring(0,F-R.length),R}var z="",X="",Q="",G="",ee={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},we=10;function Y(R){var T=Object.keys(R),F=Object.create(Object.getPrototypeOf(R));return T.forEach(function(D){F[D]=R[D]}),Object.defineProperty(F,"message",{value:R.message}),F}function de(R){return f(R,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function Ee(R,T,F){var D="",W="",g=0,m="",v=!1,B=de(R),_=B.split(`
1
+ import{r as H,j as o,fw as ho,ch as Ye,fx as go,aK as yr,aL as vr,fe as dt,Q as J,as as br,ax as Ke,m as xe,dW as yo,d1 as Hr,fy as vo,t as ke,fz as xr,fA as bo,aG as xo,cg as wo,dZ as ir,S as jt,eE as _n,eH as Ct,fB as mt,eV as Ce,fC as Eo,fk as Nn,fD as jo,fE as So,fl as Ln,fF as wr,fG as Ao,fH as Po,fI as Oo,fJ as Io,eD as ar,g as Ro,cO as Gr,eK as To,N as Co,bl as Ne,aO as Bn,U as St,eL as Do,fK as Er,at as ht,D as Ze,B as Ae,C as ot,x as jr,K as nt,M as Xe,P as $,fL as _o,k as sr,aU as No,y as Lo,z as Bo,n as Le,fd as ko,f as gt,ac as Dt,V as Fe,cb as Qe,E as it,fM as Uo,b as Je,d5 as qo,v as kn,H as Se,q as cr,W as At,cd as Fo,fN as Ko,fO as Un,aQ as Mo,aD as $o,a8 as zo,cA as Vo,a2 as Wo,bp as Ho,aZ as Go,a_ as Yo,R as Zo}from"./index-C9QWROlO.js";import{c as Jo}from"./index-Cd0Mo1_w.js";import{d as Pt}from"./Add-CrVU4iag.js";import{d as Xo}from"./Loop-BV9sPKwB.js";import{d as Qo}from"./ViewList-J5q5F0G_.js";import{L as ei,S as ti,d as qn}from"./list-header-Dj2MozqK.js";import{D as Sr,g as ri}from"./index-C2-bicAv.js";import"./index-DeiblLLO.js";import{c as qt,U as Ft,d as Fn}from"./resource-dialog-BmGWI1C9.js";import{T as ni}from"./index-B-dgg_7V.js";import{E as Kn}from"./index-8yVQ7VYg.js";import"./index-DhNPGktt.js";import"./index-dKvWGHlG.js";import{l as Mn}from"./index-DP0Qx805.js";import{o as $n}from"./index-ZG7jWpak.js";import{W as zn}from"./url-evaluation-DZQMDJ58.js";import{a as $e}from"./team-BLioMvZg.js";import{u as Vn}from"./blocklet-cMQmhjnL.js";import{C as _t}from"./click-to-copy-DYkJUEds.js";import{F as lr,S as ur}from"./Select-D1lY3LQG.js";import{I as fr}from"./InputLabel-B1j7mM5X.js";import{T as Wn}from"./TextField-kQx3sAGR.js";import{I as dr}from"./index-DQO2RskJ.js";import{b as oi}from"./sdk-CwPZ3suW.js";import{d as ii}from"./Delete-Dc7SNaDg.js";import{A as ai}from"./actions-Cn5PkGYM.js";import{S as si}from"./shorten-label-e4SQFDIH.js";var Ar={};Object.defineProperty(Ar,"__esModule",{value:!0});var Hn=Ar.default=void 0;ci(H);var tt=o;function ci(e){return e&&e.__esModule?e:{default:e}}function Yr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Zr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yr(Object(r),!0).forEach(function(n){li(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function li(e,t,r){return(t=ui(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ui(e){var t=fi(e,"string");return typeof t=="symbol"?t:t+""}function fi(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Pr=function(t){return(0,tt.jsxs)("svg",Zr(Zr({},t),{},{children:[(0,tt.jsx)("g",{clipPath:"url(#clip0)",children:(0,tt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1.598A4.092 4.092 0 1 0 9 9.78a4.092 4.092 0 0 0 0-8.183zM7.274 3.964a2.44 2.44 0 1 1 3.452 3.451 2.44 2.44 0 0 1-3.452-3.451zm.093 6.343A4.091 4.091 0 0 0 3.275 14.4v2.722c0 .155.126.281.281.281h1.09a.281.281 0 0 0 .28-.281v-2.722a2.44 2.44 0 0 1 2.44-2.44h3.267a2.442 2.442 0 0 1 2.44 2.44v2.722c0 .155.127.281.282.281h1.088a.281.281 0 0 0 .282-.281v-2.722a4.091 4.091 0 0 0-4.092-4.091H7.367z"})}),(0,tt.jsx)("defs",{children:(0,tt.jsx)("clipPath",{id:"clip0",children:(0,tt.jsx)("path",{transform:"translate(0 .5)",d:"M0 0h18v18H0z"})})})]}))};Pr.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};Pr.displayName="person";Hn=Ar.default=Pr;var Et={},di=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Gn="%[a-f0-9]{2}",Jr=new RegExp("("+Gn+")|([^%]+?)","gi"),Xr=new RegExp("("+Gn+")+","gi");function pr(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],pr(r),pr(n))}function pi(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(Jr)||[],r=1;r<t.length;r++)e=pr(t,r).join(""),t=e.match(Jr)||[];return e}}function mi(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=Xr.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=pi(r[0]);n!==r[0]&&(t[r[0]]=n)}r=Xr.exec(e)}t["%C2"]="�";for(var s=Object.keys(t),u=0;u<s.length;u++){var p=s[u];e=e.replace(new RegExp(p,"g"),t[p])}return e}var hi=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return mi(e)}},gi=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},yi=function(e,t){for(var r={},n=Object.keys(e),s=Array.isArray(t),u=0;u<n.length;u++){var p=n[u],y=e[p];(s?t.indexOf(p)!==-1:t(p,y,e))&&(r[p]=y)}return r};(function(e){const t=di,r=hi,n=gi,s=yi,u=c=>c==null;function p(c){switch(c.arrayFormat){case"index":return i=>(a,f)=>{const b=a.length;return f===void 0||c.skipNull&&f===null||c.skipEmptyString&&f===""?a:f===null?[...a,[E(i,c),"[",b,"]"].join("")]:[...a,[E(i,c),"[",E(b,c),"]=",E(f,c)].join("")]};case"bracket":return i=>(a,f)=>f===void 0||c.skipNull&&f===null||c.skipEmptyString&&f===""?a:f===null?[...a,[E(i,c),"[]"].join("")]:[...a,[E(i,c),"[]=",E(f,c)].join("")];case"comma":case"separator":return i=>(a,f)=>f==null||f.length===0?a:a.length===0?[[E(i,c),"=",E(f,c)].join("")]:[[a,E(f,c)].join(c.arrayFormatSeparator)];default:return i=>(a,f)=>f===void 0||c.skipNull&&f===null||c.skipEmptyString&&f===""?a:f===null?[...a,E(i,c)]:[...a,[E(i,c),"=",E(f,c)].join("")]}}function y(c){let i;switch(c.arrayFormat){case"index":return(a,f,b)=>{if(i=/\[(\d*)\]$/.exec(a),a=a.replace(/\[\d*\]$/,""),!i){b[a]=f;return}b[a]===void 0&&(b[a]={}),b[a][i[1]]=f};case"bracket":return(a,f,b)=>{if(i=/(\[\])$/.exec(a),a=a.replace(/\[\]$/,""),!i){b[a]=f;return}if(b[a]===void 0){b[a]=[f];return}b[a]=[].concat(b[a],f)};case"comma":case"separator":return(a,f,b)=>{const I=typeof f=="string"&&f.includes(c.arrayFormatSeparator),j=typeof f=="string"&&!I&&d(f,c).includes(c.arrayFormatSeparator);f=j?d(f,c):f;const L=I||j?f.split(c.arrayFormatSeparator).map(z=>d(z,c)):f===null?f:d(f,c);b[a]=L};default:return(a,f,b)=>{if(b[a]===void 0){b[a]=f;return}b[a]=[].concat(b[a],f)}}}function w(c){if(typeof c!="string"||c.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function E(c,i){return i.encode?i.strict?t(c):encodeURIComponent(c):c}function d(c,i){return i.decode?r(c):c}function O(c){return Array.isArray(c)?c.sort():typeof c=="object"?O(Object.keys(c)).sort((i,a)=>Number(i)-Number(a)).map(i=>c[i]):c}function x(c){const i=c.indexOf("#");return i!==-1&&(c=c.slice(0,i)),c}function A(c){let i="";const a=c.indexOf("#");return a!==-1&&(i=c.slice(a)),i}function S(c){c=x(c);const i=c.indexOf("?");return i===-1?"":c.slice(i+1)}function N(c,i){return i.parseNumbers&&!Number.isNaN(Number(c))&&typeof c=="string"&&c.trim()!==""?c=Number(c):i.parseBooleans&&c!==null&&(c.toLowerCase()==="true"||c.toLowerCase()==="false")&&(c=c.toLowerCase()==="true"),c}function P(c,i){i=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},i),w(i.arrayFormatSeparator);const a=y(i),f=Object.create(null);if(typeof c!="string"||(c=c.trim().replace(/^[?#&]/,""),!c))return f;for(const b of c.split("&")){if(b==="")continue;let[I,j]=n(i.decode?b.replace(/\+/g," "):b,"=");j=j===void 0?null:["comma","separator"].includes(i.arrayFormat)?j:d(j,i),a(d(I,i),j,f)}for(const b of Object.keys(f)){const I=f[b];if(typeof I=="object"&&I!==null)for(const j of Object.keys(I))I[j]=N(I[j],i);else f[b]=N(I,i)}return i.sort===!1?f:(i.sort===!0?Object.keys(f).sort():Object.keys(f).sort(i.sort)).reduce((b,I)=>{const j=f[I];return j&&typeof j=="object"&&!Array.isArray(j)?b[I]=O(j):b[I]=j,b},Object.create(null))}e.extract=S,e.parse=P,e.stringify=(c,i)=>{if(!c)return"";i=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},i),w(i.arrayFormatSeparator);const a=j=>i.skipNull&&u(c[j])||i.skipEmptyString&&c[j]==="",f=p(i),b={};for(const j of Object.keys(c))a(j)||(b[j]=c[j]);const I=Object.keys(b);return i.sort!==!1&&I.sort(i.sort),I.map(j=>{const L=c[j];return L===void 0?"":L===null?E(j,i):Array.isArray(L)?L.reduce(f(j),[]).join("&"):E(j,i)+"="+E(L,i)}).filter(j=>j.length>0).join("&")},e.parseUrl=(c,i)=>{i=Object.assign({decode:!0},i);const[a,f]=n(c,"#");return Object.assign({url:a.split("?")[0]||"",query:P(S(c),i)},i&&i.parseFragmentIdentifier&&f?{fragmentIdentifier:d(f,i)}:{})},e.stringifyUrl=(c,i)=>{i=Object.assign({encode:!0,strict:!0},i);const a=x(c.url).split("?")[0]||"",f=e.extract(c.url),b=e.parse(f,{sort:!1}),I=Object.assign(b,c.query);let j=e.stringify(I,i);j&&(j=`?${j}`);let L=A(c.url);return c.fragmentIdentifier&&(L=`#${E(c.fragmentIdentifier,i)}`),`${a}${j}${L}`},e.pick=(c,i,a)=>{a=Object.assign({parseFragmentIdentifier:!0},a);const{url:f,query:b,fragmentIdentifier:I}=e.parseUrl(c,a);return e.stringifyUrl({url:f,query:s(b,i),fragmentIdentifier:I},a)},e.exclude=(c,i,a)=>{const f=Array.isArray(i)?b=>!i.includes(b):(b,I)=>!i(b,I);return e.pick(c,f,a)}})(Et);const ut=go,vi={parseNumbers:!1,parseBooleans:!1},bi={skipNull:!1,skipEmptyString:!1},xi=(e,t)=>{var r,n;const{navigateMode:s="push",parseOptions:u,stringifyOptions:p}={},y=Object.assign(Object.assign({},vi),u),w=Object.assign(Object.assign({},bi),p),E=ut.useLocation(),d=(r=ut.useHistory)===null||r===void 0?void 0:r.call(ut),O=(n=ut.useNavigate)===null||n===void 0?void 0:n.call(ut),x=ho(),A=H.useRef(typeof e=="function"?e():e||{}),S=H.useMemo(()=>Et.parse(E.search,y),[E.search]),N=H.useMemo(()=>Object.assign(Object.assign({},A.current),S),[S]);return[N,Ye(c=>{const i=typeof c=="function"?c(N):c;x(),d&&d[s]({hash:E.hash,search:Et.stringify(Object.assign(Object.assign({},S),i),w)||"?"},E.state),O&&O({hash:E.hash,search:Et.stringify(Object.assign(Object.assign({},S),i),w)||"?"},{replace:s==="replace",state:E.state})})]},wi=xi;var Or={},Ei=vr;Object.defineProperty(Or,"__esModule",{value:!0});var Yn=Or.default=void 0,ji=Ei(yr()),Si=o;Yn=Or.default=(0,ji.default)((0,Si.jsx)("path",{d:"m23 12-2.44-2.79.34-3.69-3.61-.82-1.89-3.2L12 2.96 8.6 1.5 6.71 4.69 3.1 5.5l.34 3.7L1 12l2.44 2.79-.34 3.7 3.61.82L8.6 22.5l3.4-1.47 3.4 1.46 1.89-3.19 3.61-.82-.34-3.69zm-12.91 4.72-3.8-3.81 1.48-1.48 2.32 2.33 5.85-5.87 1.48 1.48z"}),"Verified");let Ai=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t}};const Qr=e=>globalThis.DOMException===void 0?new Ai(e):new DOMException(e),en=e=>{const t=e.reason===void 0?Qr("This operation was aborted."):e.reason;return t instanceof Error?t:Qr(t)};async function Pi(e,t,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:n=!0,signal:s}={}){return new Promise((u,p)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(r)||r===Number.POSITIVE_INFINITY)&&r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);const y=[],w=[],E=new Map;let d=!1,O=!1,x=!1,A=0,S=0;const N=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),P=i=>{d=!0,O=!0,p(i)};s&&(s.aborted&&P(en(s)),s.addEventListener("abort",()=>{P(en(s))}));const c=async()=>{if(O)return;const i=await N.next(),a=S;if(S++,i.done){if(x=!0,A===0&&!O){if(!n&&w.length>0){P(new AggregateError(w));return}if(O=!0,E.size===0){u(y);return}const f=[];for(const[b,I]of y.entries())E.get(b)!==tn&&f.push(I);u(f)}return}A++,(async()=>{try{const f=await i.value;if(O)return;const b=await t(f,a);b===tn&&E.set(a,b),y[a]=b,A--,await c()}catch(f){if(n)P(f);else{w.push(f),A--;try{await c()}catch(b){P(b)}}}})()};(async()=>{for(let i=0;i<r;i++){try{await c()}catch(a){P(a);break}if(x||d)break}})()})}const tn=Symbol("skip");async function Oi(e,t){return Pi(e,r=>r(),t)}function Ii({user:e,sessionUser:t}){const r=dt(()=>{var n;return(n=(e==null?void 0:e.passports)||[])==null?void 0:n.find(s=>s.name===t.role)},[e==null?void 0:e.passports,t==null?void 0:t.role]);return o.jsxs(J,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.jsx(br,{size:40,variant:"circle",shape:"circle",src:t.avatar,did:t.did,sx:{flexShrink:0}}),o.jsxs(J,{sx:{flex:1,overflow:"hidden"},children:[o.jsxs(J,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.jsx(Ke,{title:t.fullName,children:o.jsx(xe,{sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flex:1},children:t.fullName})}),o.jsx(yo,{label:(r==null?void 0:r.title)||(r==null?void 0:r.name)||"Guest",size:"small",variant:"outlined",sx:{flexShrink:0,fontWeight:"bold",fontSize:"12px",color:Hr.textBase,borderColor:Hr.strokeBorderStrong,backgroundColor:"transparent",textTransform:"capitalize",pr:.5,pl:0,height:"auto"}})]}),o.jsx(Ke,{title:t.email,children:o.jsx(xe,{variant:"body2",color:"grey",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t.email})})]})]})}const Ri={zh:{confirm:"确认",cancel:"取消",visitorId:"设备标识",deviceType:"设备类型",platform:"操作系统",walletOS:"钱包类型",role:"角色",fullname:"姓名",email:"邮箱",avatar:"头像",user:"用户",createdAt:"首次活动时间",updatedAt:"最近活动时间",lastLoginIp:"最近活动地址",actions:"操作",logoutAll:"注销所有会话",logoutAllTips:"不会注销当前会话",logout:"注销",currentSession:"当前会话",unknown:"未知",expired:"已过期",remove:"删除",logoutThisSession:"注销指定会话",logoutThisSessionConfirm:"确定要注销此会话吗?",logoutAllSession:"注销所有会话",logoutAllSessionConfirm:"确定要注销所有会话吗?"},en:{confirm:"Confirm",cancel:"Cancel",visitorId:"Device ID",deviceType:"Device Type",platform:"Platform",walletOS:"Wallet OS",role:"Role",fullname:"Fullname",email:"Email",avatar:"Avatar",user:"User",createdAt:"First Active Time",updatedAt:"Last Active Time",actions:"Actions",lastLoginIp:"Last Login IP",logoutAll:"Logout all",logoutAllTips:"Will not logout current session",logout:"Logout",currentSession:"Current Session",unknown:"Unknown",expired:"Expired",remove:"Remove",logoutThisSession:"Logout this session",logoutThisSessionConfirm:"Are you sure to logout this session?",logoutAllSession:"Logout all sessions",logoutAllSessionConfirm:"Are you sure to logout all sessions?"}},Zn="Reserved IP",rn="ip-region-cache";async function Ti(e){const t=`https://ipapi.co/${e}/json/`,n=await(await fetch(t)).json();let s="";return n.error?n.reserved&&(s=Zn):s=[n.country_name,n.region,n.city].filter(Boolean).join("/"),s}async function Ci(e){const t=`https://api.ip.sb/geoip/${e}`,n=await(await fetch(t)).json();let s="";return n.error?n.reserved&&(s=Zn):s=[n.country,n.region,n.city].filter(Boolean).join("/"),s}async function Di(e){let t="",r={};try{const n=localStorage.getItem(rn);n&&(r=JSON.parse(n))}catch{r={}}if(r[e])t=r[e];else{try{t=await Ci(e)}catch{console.warn("Fail to get ip region from ip.sb")}if(!t)try{t=await Ti(e)}catch{console.warn("Fail to get ip region from ip-api.co")}}if(t){const n=Object.keys(r);n.length>100&&delete r[n[0]],r[e]&&delete r[e],r[e]=t,localStorage.setItem(rn,JSON.stringify(r))}return t}async function _i(e){return Promise.all(e.map(t=>Di(t)))}const nn=e=>new Ft(e,{browser:[[/(ArcWallet)\/([\w\.]+)/i],[Ft.BROWSER.NAME,Ft.BROWSER.VERSION]]}).getResult();function Ni({user:e,showAction:t=!0,showUser:r=!0}){const n=vo(),{locale:s}=ke(),{confirmApi:u,confirmHolder:p}=xr(),y=Ye((i,a={})=>bo(Ri,i,s,"en",a)),w=Ye(async()=>{let i=e==null?void 0:e.userSessions;i||(i=await qt.userSession.getUserSessions({did:e.did}));try{const f=i==null?void 0:i.map((j,L)=>[L,j.lastLoginIp]).filter(j=>!!j[1]),b=f==null?void 0:f.map(j=>j[1]),I=await _i(b);for(let j=0;j<I.length;j++){const L=I[j],z=f[j],X=i[z[0]];X.ipRegion=L}}catch(f){console.warn("Failed to convert ip to region"),console.error(f)}const a=new Date().getTime();return xo(i,f=>f.visitorId===n?-1:a-new Date(f.updatedAt).getTime())}),E=wo(w),d=dt(()=>E.data||[],[E.data]),O=dt(()=>d.reduce((i,a)=>(i[a.lastLoginIp]=a.ipRegion,i),{}),[d]),x=Ye(({visitorId:i})=>{u.open({title:y("logoutThisSession"),content:y("logoutThisSessionConfirm"),confirmButtonText:y("confirm"),cancelButtonText:y("cancel"),onConfirm:async()=>{await qt.user.logout({visitorId:i}),E.refresh(),u.close()}})}),A=dt(()=>d.filter(a=>a.visitorId!==n),[d]),S=Ye(()=>{u.open({title:y("logoutAllSession"),content:y("logoutAllSessionConfirm"),confirmButtonText:y("confirm"),cancelButtonText:y("cancel"),onConfirm:async()=>{const i=A.map(a=>()=>qt.user.logout({visitorId:a.visitorId}));await Oi(i,{concurrency:3,stopOnError:!1}),E.refresh(),u.close()}})}),N=[];t&&N.push(o.jsx(Ke,{title:y("logoutAllTips"),children:o.jsx(ir,{sx:{ml:.5},size:"small",variant:"contained",color:"error",onClick:S,disabled:A.length===0,children:y("logoutAll")})},"logoutAll"));const P=dt(()=>({search:!1,sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!1,searchDebounceTime:600}),[]),c=[{label:y("platform"),name:"platform",options:{customBodyRenderLite:i=>{var b,I;const a=d[i],f=nn(a.ua);return o.jsx(J,{children:[(b=f.os)==null?void 0:b.name,(I=f.os)==null?void 0:I.version].filter(Boolean).join("/")||y("unknown")})}}},{label:y("deviceType"),name:"deviceType",options:{customBodyRenderLite:i=>{var b,I;const a=d[i],f=nn(a.ua);return o.jsx(J,{children:[(b=f.browser)==null?void 0:b.name,(I=f.browser)==null?void 0:I.version].filter(Boolean).join("/")||y("unknown")})}}},{label:y("walletOS"),name:"walletOS",options:{customBodyRenderLite:i=>{var f;const a=d[i];return o.jsx(J,{children:((f=a.extra)==null?void 0:f.walletOS)||y("unknown")})}}},r&&{label:y("user"),name:"user",options:{customBodyRenderLite:i=>{const a=d[i];return o.jsx(J,{sx:{minWidth:150,maxWidth:250},children:o.jsx(Ii,{sessionUser:a.user,user:e})})}}},{label:y("createdAt"),name:"createdAt",options:{customBodyRenderLite:i=>{const a=d[i];return a.createdAt?o.jsx(jt,{value:a.createdAt,relativeRange:3*86400*1e3,locale:s}):y("unknown")}}},{label:y("updatedAt"),name:"updatedAt",options:{customBodyRenderLite:i=>{const a=d[i];return a.status==="expired"?y("expired"):o.jsx(jt,{value:a.updatedAt,relativeRange:3*86400*1e3,locale:s})}}},{label:y("lastLoginIp"),name:"lastLoginIp",options:{customBodyRenderLite:i=>{const a=d[i];return o.jsx(J,{children:O[a.lastLoginIp]?o.jsxs(o.Fragment,{children:[o.jsx(xe,{variant:"body2",children:O[a.lastLoginIp]}),o.jsx(xe,{variant:"body2",color:"grey",children:a.lastLoginIp||y("unknown")})]}):o.jsx(xe,{children:a.lastLoginIp||y("unknown")})})}}},t&&{label:y("actions"),name:"actions",options:{customBodyRenderLite:i=>{const a=d[i];return o.jsx(J,{children:o.jsx(ir,{sx:{whiteSpace:"nowrap",fontSize:"12px",px:1},disabled:n===a.visitorId,variant:"outlined",size:"small",color:"error",onClick:()=>x({visitorId:a.visitorId}),children:a.status==="expired"?y("remove"):n===a.visitorId?y("currentSession"):y("logout")})})}}}].filter(Boolean);return o.jsxs(J,{sx:{".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"}},children:[p,o.jsx(Sr,{locale:s,data:d,columns:c,customButtons:N,options:P,loading:E.loading})]})}var he={};Object.defineProperty(he,"__esModule",{value:!0});he.isValid=he.fromJSON=he.fromRandom=he.fromAddress=he.fromPublicKey=he.fromSecretKey=he.Wallet=he.WalletType=void 0;const yt=_n,Ot=Ct,Ie=Mn;he.WalletType=Ie.DidType;function at(e,t="default"){const r=(0,Ie.DidType)(t),n=(0,Ot.getSigner)(r.pk),s=(0,Ot.getHasher)(r.hash);return{type:r,secretKey:e.sk,publicKey:e.pk,address:e.pk?(0,Ie.fromPublicKey)(e.pk,r):e.address,hash(u,p=1,y="hex"){return s(u,p,y)},sign(u,p=!0,y="hex"){if(!e.sk)throw new Error("Cannot sign data without a secretKey");if(p){const w=s(u,1);return n.sign(w,e.sk,y)}return n.sign(u,e.sk,y)},verify(u,p,y=!0){if(!e.pk)throw new Error("Cannot verify data without a publicKey");const w=y?s(u,1):u;return n.verify(w,p,e.pk)},ethHash(u){if(typeof n.ethHash!="function")throw new Error("ethHash is not supported by signer");return n.ethHash(u)},ethSign(u,p=!0){if(!e.sk)throw new Error("Cannot sign data without a secretKey");if(typeof n.ethHash!="function")throw new Error("ethSign is not supported by signer");return p?n.ethSign(n.ethHash(u),(0,yt.toHex)(e.sk)):n.ethSign(u,(0,yt.toHex)(e.sk))},ethVerify(u,p,y=!0){if(typeof n.ethHash!="function")throw new Error("ethVerify is not supported by signer");const w=y?n.ethHash(u):u;return n.ethRecover(w,p)===this.address},toAddress(){return e.pk?(0,Ie.fromPublicKey)(e.pk,r):e.address},toJSON(){return{type:Ie.DidType.toJSON(r),sk:(0,yt.toHex)(e.sk),pk:(0,yt.toHex)(e.pk),address:this.address}}}}he.Wallet=at;function Li(e,t="default"){const r=(0,Ie.DidType)(t),n={sk:e,pk:(0,Ot.getSigner)(r.pk).getPublicKey(e)};return at(n,r)}he.fromSecretKey=Li;function Bi(e,t="default"){return at({pk:e},(0,Ie.DidType)(t))}he.fromPublicKey=Bi;function ki(e){return at({address:(0,Ie.toAddress)(e)},(0,Ie.toTypeInfo)(e))}he.fromAddress=ki;function Ui(e="default"){const t=(0,Ie.DidType)(e),n=(0,Ot.getSigner)(t.pk).genKeyPair();return at({sk:n.secretKey,pk:n.publicKey},t)}he.fromRandom=Ui;function qi(e){const t=Ie.DidType.fromJSON(e.type);return at(e,t)}he.fromJSON=qi;function Fi(e,t=!0){return!(!e||typeof e!="object"||typeof e.verify!="function"||typeof e.toAddress!="function"||typeof e.toJSON!="function"||!e.type||!e.publicKey||t&&(!e.secretKey||typeof e.sign!="function"))}he.isValid=Fi;var Kt={exports:{}},Mt={},on;function Jn(){if(on)return Mt;on=1;function e(i){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e(i)}function t(i,a,f){return Object.defineProperty(i,"prototype",{writable:!1}),i}function r(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function n(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(a&&a.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),a&&s(i,a)}function s(i,a){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,I){return b.__proto__=I,b},s(i,a)}function u(i){var a=w();return function(){var b=E(i),I;if(a){var j=E(this).constructor;I=Reflect.construct(b,arguments,j)}else I=b.apply(this,arguments);return p(this,I)}}function p(i,a){if(a&&(e(a)==="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(i)}function y(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function E(i){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(f){return f.__proto__||Object.getPrototypeOf(f)},E(i)}var d={},O,x;function A(i,a,f){f||(f=Error);function b(j,L,z){return typeof a=="string"?a:a(j,L,z)}var I=function(j){n(z,j);var L=u(z);function z(X,Q,G){var ee;return r(this,z),ee=L.call(this,b(X,Q,G)),ee.code=i,ee}return t(z)}(f);d[i]=I}function S(i,a){if(Array.isArray(i)){var f=i.length;return i=i.map(function(b){return String(b)}),f>2?"one of ".concat(a," ").concat(i.slice(0,f-1).join(", "),", or ")+i[f-1]:f===2?"one of ".concat(a," ").concat(i[0]," or ").concat(i[1]):"of ".concat(a," ").concat(i[0])}else return"of ".concat(a," ").concat(String(i))}function N(i,a,f){return i.substr(0,a.length)===a}function P(i,a,f){return(f===void 0||f>i.length)&&(f=i.length),i.substring(f-a.length,f)===a}function c(i,a,f){return typeof f!="number"&&(f=0),f+a.length>i.length?!1:i.indexOf(a,f)!==-1}return A("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),A("ERR_INVALID_ARG_TYPE",function(i,a,f){O===void 0&&(O=mr()),O(typeof i=="string","'name' must be a string");var b;typeof a=="string"&&N(a,"not ")?(b="must not be",a=a.replace(/^not /,"")):b="must be";var I;if(P(i," argument"))I="The ".concat(i," ").concat(b," ").concat(S(a,"type"));else{var j=c(i,".")?"property":"argument";I='The "'.concat(i,'" ').concat(j," ").concat(b," ").concat(S(a,"type"))}return I+=". Received type ".concat(e(f)),I},TypeError),A("ERR_INVALID_ARG_VALUE",function(i,a){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";x===void 0&&(x=mt);var b=x.inspect(a);return b.length>128&&(b="".concat(b.slice(0,128),"...")),"The argument '".concat(i,"' ").concat(f,". Received ").concat(b)},TypeError),A("ERR_INVALID_RETURN_VALUE",function(i,a,f){var b;return f&&f.constructor&&f.constructor.name?b="instance of ".concat(f.constructor.name):b="type ".concat(e(f)),"Expected ".concat(i,' to be returned from the "').concat(a,'"')+" function but got ".concat(b,".")},TypeError),A("ERR_MISSING_ARGS",function(){for(var i=arguments.length,a=new Array(i),f=0;f<i;f++)a[f]=arguments[f];O===void 0&&(O=mr()),O(a.length>0,"At least one arg needs to be specified");var b="The ",I=a.length;switch(a=a.map(function(j){return'"'.concat(j,'"')}),I){case 1:b+="".concat(a[0]," argument");break;case 2:b+="".concat(a[0]," and ").concat(a[1]," arguments");break;default:b+=a.slice(0,I-1).join(", "),b+=", and ".concat(a[I-1]," arguments");break}return"".concat(b," must be specified")},TypeError),Mt.codes=d,Mt}var $t,an;function Ki(){if(an)return $t;an=1;function e(R,T){var F=Object.keys(R);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(R);T&&(D=D.filter(function(W){return Object.getOwnPropertyDescriptor(R,W).enumerable})),F.push.apply(F,D)}return F}function t(R){for(var T=1;T<arguments.length;T++){var F=arguments[T]!=null?arguments[T]:{};T%2?e(Object(F),!0).forEach(function(D){r(R,D,F[D])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(F)):e(Object(F)).forEach(function(D){Object.defineProperty(R,D,Object.getOwnPropertyDescriptor(F,D))})}return R}function r(R,T,F){return T=p(T),T in R?Object.defineProperty(R,T,{value:F,enumerable:!0,configurable:!0,writable:!0}):R[T]=F,R}function n(R,T){if(!(R instanceof T))throw new TypeError("Cannot call a class as a function")}function s(R,T){for(var F=0;F<T.length;F++){var D=T[F];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(R,p(D.key),D)}}function u(R,T,F){return T&&s(R.prototype,T),Object.defineProperty(R,"prototype",{writable:!1}),R}function p(R){var T=y(R,"string");return i(T)==="symbol"?T:String(T)}function y(R,T){if(i(R)!=="object"||R===null)return R;var F=R[Symbol.toPrimitive];if(F!==void 0){var D=F.call(R,T||"default");if(i(D)!=="object")return D;throw new TypeError("@@toPrimitive must return a primitive value.")}return(T==="string"?String:Number)(R)}function w(R,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(T&&T.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),Object.defineProperty(R,"prototype",{writable:!1}),T&&P(R,T)}function E(R){var T=S();return function(){var D=c(R),W;if(T){var g=c(this).constructor;W=Reflect.construct(D,arguments,g)}else W=D.apply(this,arguments);return d(this,W)}}function d(R,T){if(T&&(i(T)==="object"||typeof T=="function"))return T;if(T!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return O(R)}function O(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function x(R){var T=typeof Map=="function"?new Map:void 0;return x=function(D){if(D===null||!N(D))return D;if(typeof D!="function")throw new TypeError("Super expression must either be null or a function");if(typeof T<"u"){if(T.has(D))return T.get(D);T.set(D,W)}function W(){return A(D,arguments,c(this).constructor)}return W.prototype=Object.create(D.prototype,{constructor:{value:W,enumerable:!1,writable:!0,configurable:!0}}),P(W,D)},x(R)}function A(R,T,F){return S()?A=Reflect.construct.bind():A=function(W,g,m){var v=[null];v.push.apply(v,g);var B=Function.bind.apply(W,v),_=new B;return m&&P(_,m.prototype),_},A.apply(null,arguments)}function S(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function N(R){return Function.toString.call(R).indexOf("[native code]")!==-1}function P(R,T){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(D,W){return D.__proto__=W,D},P(R,T)}function c(R){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(F){return F.__proto__||Object.getPrototypeOf(F)},c(R)}function i(R){"@babel/helpers - typeof";return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},i(R)}var a=mt,f=a.inspect,b=Jn(),I=b.codes.ERR_INVALID_ARG_TYPE;function j(R,T,F){return(F===void 0||F>R.length)&&(F=R.length),R.substring(F-T.length,F)===T}function L(R,T){if(T=Math.floor(T),R.length==0||T==0)return"";var F=R.length*T;for(T=Math.floor(Math.log(T)/Math.log(2));T;)R+=R,T--;return R+=R.substring(0,F-R.length),R}var z="",X="",Q="",G="",ee={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},we=10;function Y(R){var T=Object.keys(R),F=Object.create(Object.getPrototypeOf(R));return T.forEach(function(D){F[D]=R[D]}),Object.defineProperty(F,"message",{value:R.message}),F}function de(R){return f(R,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function Ee(R,T,F){var D="",W="",g=0,m="",v=!1,B=de(R),_=B.split(`
2
2
  `),U=de(T).split(`
3
3
  `),K=0,oe="";if(F==="strictEqual"&&i(R)==="object"&&i(T)==="object"&&R!==null&&T!==null&&(F="strictEqualObject"),_.length===1&&U.length===1&&_[0]!==U[0]){var ue=_[0].length+U[0].length;if(ue<=we){if((i(R)!=="object"||R===null)&&(i(T)!=="object"||T===null)&&(R!==0||T!==0))return"".concat(ee[F],`
4
4