@abtnode/blocklet-services 1.16.38-beta-20250127-092551-3bb6da3b → 1.16.38-beta-20250206-084543-4d7b4331

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 (154) hide show
  1. package/api/socket/channel/did.js +2 -1
  2. package/dist/assets/{Add-0_yO_NcD.js → Add-DTHqaebJ.js} +1 -1
  3. package/dist/assets/{ArrowDropDown-CSe7vdhu.js → ArrowDropDown-DbyzWNvL.js} +1 -1
  4. package/dist/assets/{CheckCircle-C20J4AX-.js → CheckCircle-CFxGo9yf.js} +1 -1
  5. package/dist/assets/{ChevronLeft-CYpg5M_K.js → ChevronLeft-BfXQoYEz.js} +1 -1
  6. package/dist/assets/{ChevronRight-DORpkdoL.js → ChevronRight-CfoEIq_n.js} +1 -1
  7. package/dist/assets/{DeleteOutline-BaOxCgo3.js → DeleteOutline-BmH9ek4A.js} +1 -1
  8. package/dist/assets/{Done-Bsd0QwkQ.js → Done-EMi5bDwr.js} +1 -1
  9. package/dist/assets/{Download-BF8ec3kS.js → Download-Dhtefh1X.js} +1 -1
  10. package/dist/assets/{EditIcon-D6Lk4OxD.js → EditIcon-BGaX97FF.js} +1 -1
  11. package/dist/assets/{Error-CmnuwZkD.js → Error-Djqvk_X8.js} +1 -1
  12. package/dist/assets/{Google-F1HiAjHW.js → Google-MetxIaR3.js} +1 -1
  13. package/dist/assets/{InfoOutlined-DZAeG3v-.js → InfoOutlined-Bd6IN61C.js} +1 -1
  14. package/dist/assets/{Launch-DNY7Ut_B.js → Launch-DC2ZwJy0.js} +1 -1
  15. package/dist/assets/{LaunchOutlined-BUOyH9Rv.js → LaunchOutlined-CYryXNUL.js} +1 -1
  16. package/dist/assets/{LockIcon-BITD3hjp.js → LockIcon-BHLM_myO.js} +1 -1
  17. package/dist/assets/{Loop-gZ2g1v3i.js → Loop-Dwj655TP.js} +1 -1
  18. package/dist/assets/{MoreHoriz-CwoKs0Gg.js → MoreHoriz-B8ywH5RE.js} +1 -1
  19. package/dist/assets/{PlayArrow-C6dXJHO6.js → PlayArrow-vglCW7W4.js} +1 -1
  20. package/dist/assets/{QuestionMarkCircle-SCPzvU7T.js → QuestionMarkCircle-BDO28oyM.js} +1 -1
  21. package/dist/assets/{ServerLogo-DRTZsm8x.js → ServerLogo-D3ppBqIq.js} +1 -1
  22. package/dist/assets/{ViewList-DfGpYdZ-.js → ViewList-BEBx2X_O.js} +1 -1
  23. package/dist/assets/{access-control-DWS7Lowo.js → access-control-C15ttx-y.js} +1 -1
  24. package/dist/assets/{actions-BvtS-2sJ.js → actions-D-mxVcNU.js} +1 -1
  25. package/dist/assets/{add-component-core-DZPE4BRe.js → add-component-core-DNqTsrPg.js} +1 -1
  26. package/dist/assets/add-resource-C6AMLerq.js +1 -0
  27. package/dist/assets/{addon-CDVN9YCj.js → addon-_m1gJFAF.js} +1 -1
  28. package/dist/assets/analytics-DvHwLQn7.js +11 -0
  29. package/dist/assets/{ar-DV4YJwQy.js → ar-C89hW7LF.js} +1 -1
  30. package/dist/assets/{audit-logs-CJvI5okV.js → audit-logs-BCbtyCHg.js} +1 -1
  31. package/dist/assets/{base32-Bl4ek2bl.js → base32-BFfp490K.js} +1 -1
  32. package/dist/assets/{branding-CfeUWBA7.js → branding-D8S6jsa0.js} +2 -2
  33. package/dist/assets/{bundle-avatar-TEUPlhi2.js → bundle-avatar-C9ats955.js} +1 -1
  34. package/dist/assets/button-BmPwSTan.js +1 -0
  35. package/dist/assets/{click-to-copy-Ck4RKrL7.js → click-to-copy-_Hi7Yhx3.js} +1 -1
  36. package/dist/assets/{complete-CPnz5QUF.js → complete-DUg7uJ4N.js} +1 -1
  37. package/dist/assets/{component-Srk2_SVH.js → component-D1agqLE_.js} +1 -1
  38. package/dist/assets/{config-Cp3L8D_L.js → config-S6WZ6U3Y.js} +2 -2
  39. package/dist/assets/{config-navigation-a3GJWM1m.js → config-navigation-CMi0YByE.js} +6 -6
  40. package/dist/assets/{config-space-piVzY5c1.js → config-space-BtoXeFsn.js} +1 -1
  41. package/dist/assets/{config-kJZsVZD6.js → config-xTynYj5F.js} +1 -1
  42. package/dist/assets/{confirm-D7n9Rzfx.js → confirm-yYw8jeh5.js} +1 -1
  43. package/dist/assets/{connect-BZUv1d-6.js → connect-CT8urDCb.js} +1 -1
  44. package/dist/assets/{connect-rdXbvbmJ.js → connect-DMnZDuPy.js} +1 -1
  45. package/dist/assets/{connect-to-BzfmK9yx.js → connect-to-BtXA2Q7q.js} +1 -1
  46. package/dist/assets/{content-layout-CzrxMNjA.js → content-layout-DRV8Bqu8.js} +1 -1
  47. package/dist/assets/dashboard-D7xokuFw.js +217 -0
  48. package/dist/assets/{de-C2Y_05d1.js → de-BScxb0zD.js} +1 -1
  49. package/dist/assets/{did-address-CLeqbWiu.js → did-address-DL8dQh4X.js} +1 -1
  50. package/dist/assets/{domain-DgPzyf2N.js → domain-WlHroGqS.js} +1 -1
  51. package/dist/assets/{domain-list-BiYGOOY3.js → domain-list-CID5R830.js} +2 -2
  52. package/dist/assets/{email-5azpRba_.js → email-XNK7Gwt2.js} +1 -1
  53. package/dist/assets/{es-DPVOSPPn.js → es-B9f-yiTL.js} +1 -1
  54. package/dist/assets/{exchange-passport-Cus1rYsJ.js → exchange-passport-BkvQV3O8.js} +1 -1
  55. package/dist/assets/{form-text-input-Cf1j6PeI.js → form-text-input-B1uYH91s.js} +2 -2
  56. package/dist/assets/{fr-C8dIIOc9.js → fr-BguXQaFu.js} +1 -1
  57. package/dist/assets/{fuel-BaqDy7AE.js → fuel-uFxFD3IR.js} +1 -1
  58. package/dist/assets/{fullpage-Dx8PYbvz.js → fullpage-Dc1dR2nf.js} +1 -1
  59. package/dist/assets/{get-safe-url-BF9qL1PD.js → get-safe-url-B9qOA7gB.js} +1 -1
  60. package/dist/assets/{get-safe-url-BsKINLVF.js → get-safe-url-BTwyxtCV.js} +1 -1
  61. package/dist/assets/{hi-C5r4WQDs.js → hi-7nPwxLb7.js} +1 -1
  62. package/dist/assets/{home-D42zu2I_.js → home-BfUTLxOL.js} +1 -1
  63. package/dist/assets/{id-BQK45J6o.js → id-gU7ysJNs.js} +1 -1
  64. package/dist/assets/{iframe-Cn--d9nR.js → iframe-CDk6_C57.js} +1 -1
  65. package/dist/assets/{index-6oQLUjq6.js → index-1NdG9dcQ.js} +7 -7
  66. package/dist/assets/index-BBlaG9rd.js +77 -0
  67. package/dist/assets/{index-DpNGP1ih.js → index-BNjqST1U.js} +12 -12
  68. package/dist/assets/{index-CXVY5UoP.js → index-BQ9qcXAM.js} +7 -7
  69. package/dist/assets/{index-C0uUrAqS.js → index-BzpSavwm.js} +1 -1
  70. package/dist/assets/{index-DpOEjWGx.js → index-C8bsu4NM.js} +1 -1
  71. package/dist/assets/index-CEYigfYv.js +228 -0
  72. package/dist/assets/{index-BgGF6utP.js → index-CIjk07iX.js} +2 -2
  73. package/dist/assets/{index-CEbjBHHi.js → index-CKIpILov.js} +1 -1
  74. package/dist/assets/{index-BvLMNAG0.js → index-CeDgfE-R.js} +1 -1
  75. package/dist/assets/{index-BDfZ8xEV.js → index-D0faGVLi.js} +3 -3
  76. package/dist/assets/{index-D5mFr1eo.js → index-D4b-IulH.js} +1 -1
  77. package/dist/assets/index-DBoRYbIw.js +1 -0
  78. package/dist/assets/{index-DE_r-gh_.js → index-DGE6IUiK.js} +1 -1
  79. package/dist/assets/{index-CFT-L0SZ.js → index-DUqnq1p0.js} +1 -1
  80. package/dist/assets/{index-kk2gduJr.js → index-DX_lvtWO.js} +1 -1
  81. package/dist/assets/{index-CKsz_iVM.js → index-Hq7kqq19.js} +1 -1
  82. package/dist/assets/{index-uosYiNLl.js → index-QX3ZQRUn.js} +16 -16
  83. package/dist/assets/{index-DTzPwoh8.js → index-cBCi42Bf.js} +1 -1
  84. package/dist/assets/{invitation-DpOgzXor.js → invitation-BkpzegkF.js} +1 -1
  85. package/dist/assets/{invite-DmpCzOPN.js → invite-DSfHEBpk.js} +1 -1
  86. package/dist/assets/{issue-passport--83QQUn2.js → issue-passport-DRO3fhhX.js} +1 -1
  87. package/dist/assets/{item-7Z8_UB5K.js → item-D9PJoNKZ.js} +1 -1
  88. package/dist/assets/{ja-DsJERrpD.js → ja-C4BURK37.js} +1 -1
  89. package/dist/assets/{ko-t760ZSCl.js → ko-CeKzLbt8.js} +1 -1
  90. package/dist/assets/{launch-result-message-C_UhVRcl.js → launch-result-message-0WH2fKJs.js} +1 -1
  91. package/dist/assets/{layout-Dv_7-Fpq.js → layout-KUVrIKnH.js} +1 -1
  92. package/dist/assets/list-BmQp9JBM.js +160 -0
  93. package/dist/assets/{list-header-CfBPZZEw.js → list-header-Cm2JzuBu.js} +1 -1
  94. package/dist/assets/localization-BUyqSLbi.js +1 -0
  95. package/dist/assets/{log-CNjGA-yl.js → log-VT6HCVkp.js} +2 -2
  96. package/dist/assets/{login-DWrSz67b.js → login-BXw8BSYh.js} +1 -1
  97. package/dist/assets/{login-oauth-callback-VNeZxFH0.js → login-oauth-callback-D_ULXKRT.js} +1 -1
  98. package/dist/assets/{logo-uploader-DZm2nb0s.js → logo-uploader-B0QGvHYx.js} +5 -5
  99. package/dist/assets/{lost-passport-DFh2B6Gl.js → lost-passport-CMs5A43o.js} +1 -1
  100. package/dist/assets/{open-window-BvyLumiN.js → open-window-DFVq0Vka.js} +1 -1
  101. package/dist/assets/{overview-DNQZ-tgj.js → overview-JoUamf5H.js} +2 -2
  102. package/dist/assets/{page-header-CJHCTtBc.js → page-header-B2kRYRXR.js} +1 -1
  103. package/dist/assets/{permission-B0xKCybj.js → permission-CtM69wEM.js} +1 -1
  104. package/dist/assets/{preferences-BMgF6Djl.js → preferences-BI2Qy7wd.js} +1 -1
  105. package/dist/assets/{pt-BkjUa7uv.js → pt-o1EeyLhb.js} +1 -1
  106. package/dist/assets/publish-resource-D5Rx9baz.js +1 -0
  107. package/dist/assets/{react-beautiful-dnd.esm-DY38RjFx.js → react-beautiful-dnd.esm-C6Cs2eu-.js} +1 -1
  108. package/dist/assets/{relative-time-C36uWHLw.js → relative-time-D_pFZIBd.js} +1 -1
  109. package/dist/assets/{ru-1WsQFvuL.js → ru-BlfgKyTj.js} +1 -1
  110. package/dist/assets/sdk-DCjm9lEU.js +1 -0
  111. package/dist/assets/session-BTTAIWAT.js +1 -0
  112. package/dist/assets/{setup-lHrzljce.js → setup-C_n4S096.js} +3 -3
  113. package/dist/assets/{shorten-label-CYJeMT7h.js → shorten-label-BPVcqm_d.js} +1 -1
  114. package/dist/assets/{simple-select-CAyDBkK6.js → simple-select-Bly6GilY.js} +1 -1
  115. package/dist/assets/{slicedToArray-CV571vyX.js → slicedToArray--pkkXr1E.js} +2 -2
  116. package/dist/assets/{start-DNIWxyMi.js → start-B0Bo1ke7.js} +1 -1
  117. package/dist/assets/{step-actions-BYFwIhu4.js → step-actions-BdvB3K8O.js} +1 -1
  118. package/dist/assets/{studio-DBfgF1ck.js → studio-DADXtyow.js} +1 -1
  119. package/dist/assets/{switch-control-B8wYzo2_.js → switch-control-3273Ci8c.js} +1 -1
  120. package/dist/assets/{th-CecKmVWf.js → th-BHBtH1Zl.js} +1 -1
  121. package/dist/assets/{traffic-1TtyUzFO.js → traffic-CG1Pxqmj.js} +1 -1
  122. package/dist/assets/{transfer-Bh7VQuKL.js → transfer-O3YQ6b4a.js} +1 -1
  123. package/dist/assets/{unsubscribe-C_eX2N6S.js → unsubscribe-Dx2vvXHo.js} +1 -1
  124. package/dist/assets/{use-mobile-Bk8quGt9.js → use-mobile-CtFE3PKN.js} +1 -1
  125. package/dist/assets/{useAsyncRetry-EMRT9Ldq.js → useAsyncRetry-DO0NcRB-.js} +1 -1
  126. package/dist/assets/{useLocalStorage-tmIJr51I.js → useLocalStorage-BiHNUBhw.js} +1 -1
  127. package/dist/assets/user-center-LYxpEnYV.js +71 -0
  128. package/dist/assets/{util-BY6uUuCk.js → util-CB4v94Ia.js} +1 -1
  129. package/dist/assets/{util-CtKeCk_N.js → util-lgEyE78l.js} +1 -1
  130. package/dist/assets/{vendor-arcblock-Bf7AGBSd.js → vendor-arcblock-ZjreIevk.js} +3 -3
  131. package/dist/assets/{vendor-mui-core-CCMNKHtm.js → vendor-mui-core-DHnPlNQK.js} +8 -8
  132. package/dist/assets/{vendor-mui-x-DmPVvZFJ.js → vendor-mui-x-BcCkWIwf.js} +1 -1
  133. package/dist/assets/{vi-CDrTp7No.js → vi-CuGQRG8r.js} +1 -1
  134. package/dist/assets/wrap-locale-dvgNAAzE.js +1 -0
  135. package/dist/assets/zh-DfOtp2w7.js +4 -0
  136. package/dist/assets/{zh-tw-CUyoe2CD.js → zh-tw-DFpaHA6Z.js} +1 -1
  137. package/dist/index.html +3 -3
  138. package/dist/service-worker.js +1 -1
  139. package/package.json +21 -21
  140. package/dist/assets/add-resource-CYNZTaOG.js +0 -1
  141. package/dist/assets/analytics-0lVXNyXs.js +0 -11
  142. package/dist/assets/button-CzSgwkGN.js +0 -1
  143. package/dist/assets/dashboard-B_hsqmQK.js +0 -86
  144. package/dist/assets/index-BWKYj-2X.js +0 -228
  145. package/dist/assets/index-CSkA6M4K.js +0 -1
  146. package/dist/assets/index-fel1gHRy.js +0 -61
  147. package/dist/assets/list-yjVo8vxH.js +0 -160
  148. package/dist/assets/localization-CRwVeETn.js +0 -1
  149. package/dist/assets/publish-resource-B_OOg2Om.js +0 -1
  150. package/dist/assets/sdk-VtyRZZVE.js +0 -1
  151. package/dist/assets/session-DutPZhUI.js +0 -1
  152. package/dist/assets/user-center-pv7oyGUu.js +0 -71
  153. package/dist/assets/wrap-locale-BjJvyHQM.js +0 -1
  154. package/dist/assets/zh-Bqr2c2To.js +0 -4
@@ -1,86 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/overview-DNQZ-tgj.js","assets/vendor-mui-core-CCMNKHtm.js","assets/vendor-react-D-afvo_7.js","assets/vendor-arcblock-Bf7AGBSd.js","assets/vendor-utils-5TjOM6td.js","assets/vendor-hooks-BKxTDk_P.js","assets/vendor-arcblock-DhgPdlEj.css","assets/keyboard-arrow-down-rounded-DadBVmpO.js","assets/index-DTzPwoh8.js","assets/index-uosYiNLl.js","assets/did-address-CLeqbWiu.js","assets/domain-list-BiYGOOY3.js","assets/Add-0_yO_NcD.js","assets/base32-Bl4ek2bl.js","assets/LockIcon-BITD3hjp.js","assets/CheckCircle-C20J4AX-.js","assets/util-CtKeCk_N.js","assets/useSetState-Crt4S51m.js","assets/permission-B0xKCybj.js","assets/session-DutPZhUI.js","assets/useAsyncRetry-EMRT9Ldq.js","assets/useAsync-Ua5iss51.js","assets/confirm-D7n9Rzfx.js","assets/format-error-C0Ke3VXF.js","assets/InfoOutlined-DZAeG3v-.js","assets/api-K65cLqol.js","assets/actions-BvtS-2sJ.js","assets/MoreHoriz-CwoKs0Gg.js","assets/useLocalStorage-tmIJr51I.js","assets/PlayArrow-C6dXJHO6.js","assets/get-safe-url-BsKINLVF.js","assets/index-CSkA6M4K.js","assets/index-DpNGP1ih.js","assets/index-DoZ2YM4T.js","assets/Loop-gZ2g1v3i.js","assets/ViewList-DfGpYdZ-.js","assets/list-header-CfBPZZEw.js","assets/click-to-copy-Ck4RKrL7.js","assets/DeleteOutline-BaOxCgo3.js","assets/util-BY6uUuCk.js","assets/sdk-VtyRZZVE.js","assets/index-DpOEjWGx.js","assets/shorten-label-CYJeMT7h.js","assets/index-CXVY5UoP.js","assets/EditIcon-D6Lk4OxD.js","assets/Google-F1HiAjHW.js","assets/cloneDeep-BRiLvZjr.js","assets/index-6oQLUjq6.js","assets/iframe-Cn--d9nR.js","assets/config-kJZsVZD6.js","assets/form-text-input-Cf1j6PeI.js","assets/Done-Bsd0QwkQ.js","assets/logo-uploader-DZm2nb0s.js","assets/ArrowDropDown-CSe7vdhu.js","assets/ChevronRight-DORpkdoL.js","assets/bundle-avatar-TEUPlhi2.js","assets/simple-select-CAyDBkK6.js","assets/isEmail-BWNRBSAy.js","assets/switch-control-B8wYzo2_.js","assets/audit-logs-CJvI5okV.js","assets/index-BvLMNAG0.js","assets/index-D4PP6P2d.css","assets/relative-time-C36uWHLw.js","assets/index-C0uUrAqS.js","assets/index-fel1gHRy.js","assets/list-yjVo8vxH.js","assets/index-DE_r-gh_.js","assets/traffic-1TtyUzFO.js","assets/LaunchOutlined-BUOyH9Rv.js","assets/ChevronLeft-CYpg5M_K.js","assets/index-D5mFr1eo.js","assets/vendor-mui-x-DmPVvZFJ.js","assets/log-CNjGA-yl.js","assets/Download-BF8ec3kS.js","assets/log-D33dFtt_.css","assets/index-BWKYj-2X.js","assets/Error-CmnuwZkD.js","assets/react-beautiful-dnd.esm-DY38RjFx.js","assets/raf-schd.esm-Cxhj8umC.js","assets/QuestionMarkCircle-SCPzvU7T.js","assets/item-7Z8_UB5K.js","assets/Launch-DNY7Ut_B.js","assets/config-navigation-a3GJWM1m.js","assets/slicedToArray-CV571vyX.js","assets/index-C2fPoxDR.js","assets/index-kk2gduJr.js","assets/use-mobile-Bk8quGt9.js","assets/connect-to-BzfmK9yx.js","assets/config-space-piVzY5c1.js","assets/component-Srk2_SVH.js","assets/index-DcfIKM1A.js","assets/add-component-core-DZPE4BRe.js","assets/launch-result-message-C_UhVRcl.js","assets/page-header-CJHCTtBc.js","assets/index-BgGF6utP.js","assets/content-layout-CzrxMNjA.js","assets/add-component-core-D-IRi6XF.css","assets/analytics-0lVXNyXs.js"])))=>i.map(i=>d[i]);
2
- import{y as Be,f as k,h as Y,z as qe,A as Ir,b as Tr,B as Lr,C as Pr,D as hn,E as le,F as mn,G as Rr,o as ye,H as Dr,I as Or,k as zt,g as Ar,j as Mr,m as Ft,l as $r,n as kr,J as Re,e as Te,K as Nr,_ as B,L as Br,M as Vt,N as Ur,c as Ht}from"./index-uosYiNLl.js";import{a1 as U,j as a,E as _,aa as lt,I as gn,ak as zr,ad as vn,ah as Fr,al as Vr,bm as Hr,a2 as ee,bn as qr,bq as Kr,T as ue,bx as Gr,aN as qt,by as Kt,a3 as O,a4 as Xe,bz as yn,bA as xn,bB as bn,bp as Sn,t as Ue,A as oe,aj as wn,aK as Wr}from"./vendor-mui-core-CCMNKHtm.js";import{_ as z,a8 as Qr,a0 as jn,a9 as Xr,a1 as ut,b as $,X as Gt,j as K,e as Z,Y as Yr,aa as Zr,ab as Jr,C as Ae,ac as eo,Q as to,ad as no,ae as ro,H as oo,R as so,af as io}from"./vendor-arcblock-Bf7AGBSd.js";import{r as x,L as Cn,f as ao,k as co,l as lo}from"./vendor-react-D-afvo_7.js";import{s as uo,d as Wt}from"./vendor-hooks-BKxTDk_P.js";import{_ as Qt}from"./useLocalStorage-tmIJr51I.js";import{C as Xt}from"./confirm-D7n9Rzfx.js";import{d as fo}from"./PlayArrow-C6dXJHO6.js";import{x as _n,a6 as po}from"./vendor-utils-5TjOM6td.js";import{g as Yt}from"./get-safe-url-BsKINLVF.js";import{f as dt}from"./format-error-C0Ke3VXF.js";import{p as En,B as ho}from"./index-CSkA6M4K.js";import{u as In}from"./session-DutPZhUI.js";import{D as mo,_ as Tn}from"./useAsyncRetry-EMRT9Ldq.js";import{_ as Ln}from"./useSetState-Crt4S51m.js";var ft={},go=U;Object.defineProperty(ft,"__esModule",{value:!0});var Pn=ft.default=void 0,vo=go(z()),yo=a;Pn=ft.default=(0,vo.default)((0,yo.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var pt={},xo=U;Object.defineProperty(pt,"__esModule",{value:!0});var Rn=pt.default=void 0,bo=xo(z()),So=a;Rn=pt.default=(0,bo.default)((0,So.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var ht={},wo=U;Object.defineProperty(ht,"__esModule",{value:!0});var Dn=ht.default=void 0,jo=wo(z()),Co=a;Dn=ht.default=(0,jo.default)((0,Co.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var mt={},_o=U;Object.defineProperty(mt,"__esModule",{value:!0});var On=mt.default=void 0,Eo=_o(z()),Io=a;On=mt.default=(0,Eo.default)((0,Io.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var gt={},To=U;Object.defineProperty(gt,"__esModule",{value:!0});var An=gt.default=void 0,Lo=To(z()),Po=a;An=gt.default=(0,Lo.default)((0,Po.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt");var vt={},Ro=U;Object.defineProperty(vt,"__esModule",{value:!0});var Mn=vt.default=void 0,Do=Ro(z()),Oo=a;Mn=vt.default=(0,Do.default)((0,Oo.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var yt={},Ao=U;Object.defineProperty(yt,"__esModule",{value:!0});var $n=yt.default=void 0,Mo=Ao(z()),$o=a;$n=yt.default=(0,Mo.default)((0,$o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9"}),"NotInterested");var xt={};Object.defineProperty(xt,"__esModule",{value:!0});var kn=xt.default=void 0;ko(x);var Zt=a;function ko(e){return e&&e.__esModule?e:{default:e}}function Jt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function en(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jt(Object(n),!0).forEach(function(r){No(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jt(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function No(e,t,n){return(t=Bo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bo(e){var t=Uo(e,"string");return typeof t=="symbol"?t:t+""}function Uo(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bt=function(t){return(0,Zt.jsx)("svg",en(en({},t),{},{children:(0,Zt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.32989 8.20744C11.2787 6.82349 13.6098 6.08 16 6.08C18.3902 6.08 20.7213 6.82349 22.6701 8.20744C24.6189 9.59139 26.089 11.5473 26.8766 13.804C27.6642 16.0607 27.7304 18.5066 27.0659 20.8026C26.4419 22.9587 25.2026 24.8823 23.5044 26.3404H8.49555C6.79735 24.8823 5.55809 22.9587 4.9341 20.8026C4.26961 18.5066 4.33575 16.0607 5.12337 13.804C5.91098 11.5473 7.38107 9.59139 9.32989 8.20744ZM16 3.52C13.0786 3.52 10.2295 4.42871 7.84764 6.1202C5.46575 7.81169 3.66898 10.2022 2.70634 12.9604C1.7437 15.7187 1.66286 18.708 2.47501 21.5143C3.28717 24.3205 4.95211 26.8046 7.23909 28.6224C7.46554 28.8024 7.74628 28.9004 8.03554 28.9004H23.9644C24.2537 28.9004 24.5344 28.8024 24.7609 28.6224C27.0479 26.8046 28.7128 24.3205 29.5249 21.5143C30.3371 18.708 30.2563 15.7187 29.2936 12.9604C28.331 10.2022 26.5342 7.81169 24.1523 6.1202C21.7704 4.42871 18.9214 3.52 16 3.52ZM21.8829 13.5921C22.3827 13.0923 22.3827 12.2818 21.8829 11.7819C21.383 11.2821 20.5725 11.2821 20.0727 11.7819L17.868 13.9866C17.3072 13.7012 16.6724 13.5404 16 13.5404C13.7221 13.5404 11.8755 15.3869 11.8755 17.6648C11.8755 19.9427 13.7221 21.7892 16 21.7892C18.2779 21.7892 20.1244 19.9427 20.1244 17.6648C20.1244 16.9924 19.9635 16.3576 19.6782 15.7968L21.8829 13.5921ZM14.4355 17.6648C14.4355 16.8008 15.136 16.1004 16 16.1004C16.864 16.1004 17.5644 16.8008 17.5644 17.6648C17.5644 18.5288 16.864 19.2292 16 19.2292C15.136 19.2292 14.4355 18.5288 14.4355 17.6648Z",fill:"currentColor"})}))};bt.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};bt.displayName="dashboard";kn=xt.default=bt;var St={},zo=U;Object.defineProperty(St,"__esModule",{value:!0});var Nn=St.default=void 0,Fo=zo(z()),Vo=a;Nn=St.default=(0,Fo.default)((0,Vo.jsx)("path",{d:"m18.25 7.6-5.5-3.18c-.46-.27-1.04-.27-1.5 0L5.75 7.6c-.46.27-.75.76-.75 1.3v6.35c0 .54.29 1.03.75 1.3l5.5 3.18c.46.27 1.04.27 1.5 0l5.5-3.18c.46-.27.75-.76.75-1.3V8.9c0-.54-.29-1.03-.75-1.3M7 14.96v-4.62l4 2.32v4.61zm5-4.03L8 8.61l4-2.31 4 2.31zm1 6.34v-4.61l4-2.32v4.62zM7 2H3.5C2.67 2 2 2.67 2 3.5V7h2V4h3zm10 0h3.5c.83 0 1.5.67 1.5 1.5V7h-2V4h-3zM7 22H3.5c-.83 0-1.5-.67-1.5-1.5V17h2v3h3zm10 0h3.5c.83 0 1.5-.67 1.5-1.5V17h-2v3h-3z"}),"ViewInAr");const ce={Start:fo,Stop:Pn,Restart:Rn,Reload:Dn,Remove:Qr,Config:On,Log:An,Group:Mn,Cancel:$n,Dashboard:kn,Overview:Nn},Ho=(e,t)=>{if(!e)return"";const n=new URL(e),r=new URLSearchParams(n.searchParams),o=new URL(_n(n.origin,t));return o.search=r.toString(),o.toString()},qo="internal",Ko="external";function wt({blocklet:e,onStart:t,onComplete:n,variant:r,hasPermission:o,getComponentUrl:s,useBlockletUrlEvaluation:i,...c}){const l=Be(),[u,d]=x.useState(null),[p,f]=x.useState(null),[y,S]=x.useState(!1),[h,L]=x.useState(null),{t:v}=x.useContext(jn),[I]=Qt("skip-blocklet-setup",!1),{loading:j,recommendedUrl:P}=i(e),[T]=Qt("blocklet-type-filter",qo),g=k.isInProgress(e.status),[C,b]=x.useState(!1);x.useEffect(()=>{var D,N;if(!(e!=null&&e.controller))return;b(((N=(D=e==null?void 0:e.controller)==null?void 0:D.status)==null?void 0:N.value)===Y.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var V,X,ne;try{const H=await l.api.getLauncherSession({input:{launcherSessionId:(V=e==null?void 0:e.controller)==null?void 0:V.launcherSessionId,launcherUrl:(X=e==null?void 0:e.controller)==null?void 0:X.launcherUrl}});if(H!=null&&H.error){console.error("get launcher session failed",H.error);return}b([$.LAUNCH_SESSION_STATUS.overdue,$.LAUNCH_SESSION_STATUS.canceled,$.LAUNCH_SESSION_STATUS.terminated].includes((ne=H==null?void 0:H.launcherSession)==null?void 0:ne.status))}catch(H){console.error("call getLauncherSession error",H)}})()},[]);const{inService:w}=l,E=(m,D,N=!1)=>async()=>{const V=async _e=>{var Ie;t({action:m,blocklet:e}),S(!0),f(m);let Ee=!1;try{if(m==="remove")await D(_e);else if(m==="start"){if(!k.hasRunnableComponent(e)){K.error(v("blocklet.noComponent"));return}if(!w&&!I&&!((Ie=e.settings)!=null&&Ie.initialized)&&e.mode!==Y.BLOCKLET_MODES.DEVELOPMENT){if(!P||!Gt(P)){K.error(v("blocklet.gotoVisitError"));return}const G=Ir(l.info),Ut=new URL(P);Ut.searchParams.set("serverUrl",G),window.open(Yt(Ut.href,{allowDomains:null})),n({action:m,blocklet:e});return}const re=e.children.filter(G=>!k.isInProgress(G.status)&&G.status!=="running").map(G=>G.meta.did),ae={did:e.meta.did,componentDids:re};await D({input:ae})}else if(["stop","restart","reload"].includes(m)){const re=e.children.filter(G=>G.status==="running").map(G=>G.meta.did),ae={did:e.meta.did,componentDids:re};await D({input:ae})}else{const re={did:e.meta.did};await D({input:re})}m==="remove"?Ee=!0:await Tr(1e3),m==="reload"&&K.success(v("blocklet.reloadSuccess")),L(null),n({action:m,blocklet:e})}catch(re){const ae=`Blocklet ${m} failed: ${dt(re)}`;throw n({action:m,blocklet:e,error:new Error(ae)}),new Error(ae)}finally{Ee||S(!1)}},X=()=>{S(!1),L(null)},ne=k.getDisplayName(e,!0),H=e.mode===Y.BLOCKLET_MODES.DEVELOPMENT?{description:()=>a.jsx(ue,{component:"div",children:a.jsx(ue,{gutterBottom:!0,children:v("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(_e,Ee)=>a.jsxs(ue,{component:"div",children:[a.jsx(ue,{gutterBottom:!0,children:v("blocklet.action.removeApplicationDescription")}),a.jsxs(Gr,{name:"removeType",value:_e.removeType,onChange:Ie=>Ee({..._e,removeType:Ie.target.value}),children:[a.jsx(qt,{value:"backup",control:a.jsx(Kt,{}),label:v("blocklet.action.removeApplicationAfterBackup")}),a.jsx(qt,{value:"complete",control:a.jsx(Kt,{}),label:v("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},Er={stop:{title:`${v("common.stop")} ${ne}`,description:v("blocklet.action.stopDescription"),confirm:v("blocklet.action.confirmStop"),cancel:v("common.cancel"),onConfirm:V,onCancel:X},restart:{title:`${v("common.restart")} ${ne}`,description:v("blocklet.action.restartDescription"),confirm:v("blocklet.action.confirmRestart"),cancel:v("common.cancel"),onConfirm:V,onCancel:X},remove:{title:`${v("common.remove")} ${ne}`,confirm:v("blocklet.action.confirmRemove"),cancel:v("common.cancel"),onConfirm:V,onCancel:X,...H},cancelDownload:{title:`${v("common.cancel")}`,description:v("blocklet.action.cancelDownloadDescription",{name:ne}),confirm:v("common.confirm"),cancel:v("common.cancel"),onConfirm:V,onCancel:X}};N?L(Er[m]):await V()},R=!!u,Q=m=>{try{m.stopPropagation(),m.preventDefault()}catch{}d(m.currentTarget)},F=m=>{try{m.stopPropagation(),m.preventDefault()}catch{}d(null)},je=async(m,D)=>{try{D.stopPropagation(),D.preventDefault()}catch{}if(typeof m.handler=="function")try{S(!0),f(m.action),await m.handler()}catch(N){console.error(`Blocklet ${m.name} failed: `,N)}finally{S(!1),d(null)}else d(null)},wr=!w&&k.isDeletableBlocklet(e)?{action:"remove",icon:ce.Remove,name:v("common.remove"),handler:E("remove",async({removeType:m})=>{m==="backup"&&await l.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await l.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:g}:null,jr={action:"remove",icon:({sx:m,...D})=>a.jsx(ce.Cancel,{sx:{...m,paddingRight:"2px",zoom:.95},...D}),name:v("common.cancel"),handler:E("cancelDownload",l.api.cancelDownloadBlocklet,!0)},Cr=k.getAppMissingConfigs(e),_r=()=>{var V;const m=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),D=s==null?void 0:s({mountPoint:m,blocklet:e});if(!D||!Gt(D)){K.error(v("blocklet.gotoVisitError"));return}const N=(V=e==null?void 0:e.site)==null?void 0:V.domainAliases;window.open(Yt(Ho(D,".well-known/service/admin"),{allowDomains:N==null?void 0:N.map(X=>X.value)}))};let Ce=[{action:"start",icon:ce.Start,inExternal:!0,name:v("common.start"),handler:E("start",l.api.startBlocklet),disabled:C||e.children.every(m=>m.status==="running")||qe(e.status)||j||g},{action:"stop",icon:ce.Stop,inExternal:!0,name:v("common.stop"),handler:E("stop",l.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:ce.Restart,name:v("common.restart"),handler:E("restart",l.api.restartBlocklet,!0),disabled:C||e.status!=="running"},qe(e.status)?jr:wr,{separator:!0},w?null:{action:"dashboard",icon:({style:m,...D})=>a.jsx(ce.Dashboard,{...D,style:{...m,width:"26px",height:"26px",paddingRight:"3px"}}),name:v("sidebar.dashboard"),handler:_r}].filter(Boolean);return T===Ko&&(Ce=Ce.filter(m=>m.inExternal)),r==="menu"?a.jsxs(tn,{"data-cy":"blocklet-actions",children:[a.jsx(gn,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:Q,size:"small",disabled:!o||!qe(e.status)&&y,children:a.jsx(Xr,{})}),a.jsxs(zr,{id:"actions-menu",anchorEl:u,keepMounted:!0,open:R,onClose:F,PaperProps:{},children:[Cr.length>0&&a.jsxs(vn,{style:{maxWidth:"400px"},severity:"error",children:[v("blocklet.config.missingRequired"),a.jsx("br",{}),a.jsx(Cn,{to:`/blocklets/${e.meta.did}/components`,children:v("blocklet.config.gotoFix")})]}),Ce.map((m,D)=>m.separator?a.jsx(Fr,{},`separator-${D}`):a.jsxs(Vr,{dense:!0,onClick:N=>je(m,N),disabled:y||m.disabled,"data-cy":`${m.action}-blocklet`,children:[a.jsx(Hr,{style:{minWidth:24},children:p===m.action&&y?a.jsx(ee,{size:16,sx:{marginRight:1}}):a.jsx(m.icon,{fontSize:"small"})}),a.jsx(qr,{primary:m.name})]},m.name))]}),h&&a.jsx(Xt,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]}):a.jsxs(tn,{"data-cy":"blocklet-actions",...c,children:[a.jsx(Kr,{children:Ce.filter(m=>!m.separator&&!m.onlyInMenu).map(m=>a.jsxs(ut,{title:m.name,"data-cy":`${m.action}-blocklet`,onClick:()=>je(m),disabled:!!m.disabled||y,children:[p===m.action&&y?a.jsx(ee,{size:16,sx:{marginRight:1}}):a.jsx(m.icon,{}),a.jsx("span",{className:"blocklet-action-text",children:m.name})]},m.name))}),h&&a.jsx(Xt,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]})}wt.propTypes={getComponentUrl:_.func,blocklet:_.object.isRequired,onStart:_.func.isRequired,onComplete:_.func.isRequired,variant:_.oneOf(["menu","group"]),hasPermission:_.bool,useBlockletUrlEvaluation:_.func};wt.defaultProps={getComponentUrl:null,variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e;return{loading:!1,recommendedUrl:(e=window==null?void 0:window.location)==null?void 0:e.href}}};const tn=lt.div`
3
- display: flex;
4
- align-items: center;
5
-
6
- @media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
7
- .MuiButton-root {
8
- padding: 4px;
9
- font-size: 10px;
10
- }
11
- }
12
- `,Go=x.memo(wt),Wo=e=>{const t={};let n=null;return k.forEachBlockletSync(e,r=>{t[r.meta.bundleDid]?n=k.getDisplayName(r,!0):r.meta.bundleDid&&(t[r.meta.bundleDid]=!0)}),n},Qo=(e,t,n)=>{var s;const{hostname:r,href:o}=e;if(!t)return o;if(n){const c=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!c)return o;const l=c[0],d=((((s=t.site)==null?void 0:s.domainAliases)||[]).map(p=>p.value).filter(Boolean).find(p=>p.endsWith($.DEFAULT_DID_DOMAIN))||"").replace(`.${$.DEFAULT_DID_DOMAIN}`,"");return d?o.replace(r,`${d}-${l}.${$.DEFAULT_IP_DOMAIN_SUFFIX}`):o}return o.replace(t.meta.bundleDid,t.appPid)};function Bn(){const{t:e}=Z(),{api:t}=In(),{blocklet:n}=Lr(),{inService:r}=Be(),[o,s]=x.useState(!1),[i,c]=x.useState(5),l=n&&n.structVersion!==$.APP_STRUCT_VERSION,u=()=>{try{if(n.status==="running"){K.error(e("blocklet.migrate.tip.running"));return}const f=Wo(n);if(f){K.error(e("blocklet.migrate.tip.duplicate",{name:f}));return}s(!0)}catch(f){K.error(dt(f))}},d=()=>{const f=Qo(window.location,n,r);setTimeout(()=>{window.location.href=f},5e3),c(5),setInterval(()=>{c(y=>y-1)},1e3)},p=()=>s(!1);return[l&&a.jsxs(vn,{severity:"warning",style:{margin:"12px 0"},children:[a.jsxs(O,{display:"flex",alignItems:"center",children:[a.jsx(ut,{variant:"contained",size:"small",color:"primary",onClick:()=>u(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),a.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(f=>a.jsx(O,{display:"flex",alignItems:"center",children:e(`blocklet.migrate.intro.${f}`)},f))]},"alert"),n&&a.jsx(Yr,{popup:!0,open:o,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:5*60*1e3,onSuccess:d,extraParams:{appDid:n.appDid,did:n.meta.did,wt:Pr(n,!0),title:k.getDisplayName(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:i>=0?e("blocklet.migrate.success",{sec:i}):"Redirecting..."},onClose:p},"connect")]}Bn.propTypes={};function jt({children:e,style:t,...n}){return a.jsx(Zr,{style:t,...n,children:e})}jt.propTypes={children:_.any.isRequired,style:_.object};jt.defaultProps={style:{}};const A={yellow:"#FFCF71",grey:"#aaaaaa",reverse:"#444",success:"#3ab39d",running:"#34BE74",error:"#D0021B",primary:"#1DC1C7"};function Ct({isResource:e,status:t,variant:n,source:r,progress:o,...s}){const{t:i}=x.useContext(jn),c={added:"primary",waiting:"warning",downloading:"warning",extracting:"warning",downloaded:"primary",installing:"warning",installed:"primary",starting:"warning",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"warning",restarting:"warning",corrupted:"error",deleting:"warning",resource:"primary"},l={added:A.grey,waiting:A.yellow,downloading:A.yellow,extracting:A.yellow,downloaded:A.grey,installing:A.yellow,installed:A.grey,starting:A.yellow,running:A.running,stopping:A.yellow,stopped:A.reverse,error:A.error,upgrading:A.yellow,restarting:A.yellow,corrupted:A.error,deleting:A.yellow,resource:A.primary},u=k.isInProgress(t),d=e&&t==="stopped"?"resource":t,p=i(`blocklet.status.${d}`);return n==="pin"?a.jsx(Xe,{title:i("blocklet.statusTip",{status:p}),children:a.jsxs(O,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",...s,children:[a.jsx(O,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:l[d],style:{opacity:.15}}),a.jsx(O,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:l[d]})]})}):n==="dot"?a.jsx(Xe,{title:i("blocklet.statusTip",{status:p}),children:a.jsx(mo,{color:l[d],...s})}):a.jsxs(jt,{type:c[d],...s,children:[u&&a.jsx(ee,{size:12,color:"inherit",style:{marginRight:5}}),p,d==="downloading"&&o?a.jsx("div",{style:{marginLeft:5},children:`${o} %`}):null]})}Ct.propTypes={status:_.string.isRequired,variant:_.oneOf(["dot","tag","pin"]),source:_.string,progress:_.number,isResource:_.bool};Ct.defaultProps={isResource:!1,variant:"tag",source:"",progress:0};const Un=x.createContext({});function _t({children:e,type:t}){const[n,r]=x.useState([]),o=x.useRef([]),s=l=>{if(!o.current.includes(l)){const u=[...o.current,l];r(u),o.current=u}},i=l=>{if(o.current.includes(l)){const u=o.current.filter(d=>d!==l);r(u),o.current=u}},c=l=>{const u=n.filter(p=>l.find(f=>f===p));po(u,n).forEach(p=>i(p))};return a.jsx(Un.Provider,{value:{type:t,deletingBlocklets:n,addDeletingDid:s,removeDeletingDid:i,matchDeletingDid:c},children:e})}_t.propTypes={type:_.string,children:_.node.isRequired};_t.defaultProps={type:"blocklets"};function ba(){return x.useContext(Un)}function M(e,t,n){return yn.call(t,"css")?a.jsx(xn,bn(e,t),n):a.jsx(e,t,n)}function Ke(e,t,n){return yn.call(t,"css")?a.jsxs(xn,bn(e,t),n):a.jsxs(e,t,n)}/**
13
- * (c) Iconify
14
- *
15
- * For the full copyright and license information, please view the license.txt or license.gpl.txt
16
- * files at https://github.com/iconify/iconify
17
- *
18
- * Licensed under MIT.
19
- *
20
- * @license MIT
21
- * @version 3.1.1
22
- */const zn=Object.freeze({left:0,top:0,width:16,height:16}),Me=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),xe=Object.freeze({...zn,...Me}),Ye=Object.freeze({...xe,body:"",hidden:!1});function Xo(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function nn(e,t){const n=Xo(e,t);for(const r in Ye)r in Me?r in e&&!(r in n)&&(n[r]=Me[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Yo(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function s(i){if(n[i])return o[i]=[];if(!(i in o)){o[i]=null;const c=r[i]&&r[i].parent,l=c&&s(c);l&&(o[i]=[c].concat(l))}return o[i]}return Object.keys(n).concat(Object.keys(r)).forEach(s),o}function Zo(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let s={};function i(c){s=nn(r[c]||o[c],s)}return i(t),n.forEach(i),nn(e,s)}function Jo(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=Yo(e);for(const o in r){const s=r[o];s&&(t(o,Zo(e,o,s)),n.push(o))}return n}const he=/^[a-z0-9]+(-[a-z0-9]+)*$/,fe=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const c=o.pop(),l=o.pop(),u={provider:o.length>0?o[0]:r,prefix:l,name:c};return t&&!De(u)?null:u}const s=o[0],i=s.split("-");if(i.length>1){const c={provider:r,prefix:i.shift(),name:i.join("-")};return t&&!De(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:s};return t&&!De(c,n)?null:c}return null},De=(e,t)=>e?!!((e.provider===""||e.provider.match(he))&&(t&&e.prefix===""||e.prefix.match(he))&&e.name.match(he)):!1,es={provider:"",aliases:{},not_found:{},...zn};function Ge(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function ts(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!Ge(e,es))return null;const n=t.icons;for(const o in n){const s=n[o];if(!o.match(he)||typeof s.body!="string"||!Ge(s,Ye))return null}const r=t.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(he)||typeof i!="string"||!n[i]&&!r[i]||!Ge(s,Ye))return null}return t}const $e=Object.create(null);function ns(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function W(e,t){const n=$e[e]||($e[e]=Object.create(null));return n[t]||(n[t]=ns(e,t))}function Et(e,t){return ts(t)?Jo(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function rs(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function os(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys($e)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys($e[o]||{})).forEach(i=>{const c=W(o,i);n=n.concat(Object.keys(c.icons).map(l=>(o!==""?"@"+o+":":"")+i+":"+l))})}),n}let It=!1;function ss(e){return It}function be(e){const t=typeof e=="string"?fe(e,!0,It):e;if(t){const n=W(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function is(e,t){const n=fe(e,!0,It);if(!n)return!1;const r=W(n.provider,n.prefix);return rs(r,n.name,t)}function Fn(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const n=e.prefix;if(!De({provider:t,prefix:n,name:"a"}))return!1;const r=W(t,n);return!!Et(r,e)}function as(e){return!!be(e)}function cs(e){const t=be(e);return t?{...xe,...t}:null}const Vn=Object.freeze({width:null,height:null}),Hn=Object.freeze({...Vn,...Me}),ls=/(-?[0-9.]*[0-9]+[0-9.]*)/g,us=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ze(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(ls);if(r===null||!r.length)return e;const o=[];let s=r.shift(),i=us.test(s);for(;;){if(i){const c=parseFloat(s);isNaN(c)?o.push(s):o.push(Math.ceil(c*t*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const ds=e=>e==="unset"||e==="undefined"||e==="none";function ze(e,t){const n={...xe,...e},r={...Hn,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(S=>{const h=[],L=S.hFlip,v=S.vFlip;let I=S.rotate;L?v?I+=2:(h.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),h.push("scale(-1 1)"),o.top=o.left=0):v&&(h.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),h.push("scale(1 -1)"),o.top=o.left=0);let j;switch(I<0&&(I-=Math.floor(I/4)*4),I=I%4,I){case 1:j=o.height/2+o.top,h.unshift("rotate(90 "+j.toString()+" "+j.toString()+")");break;case 2:h.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:j=o.width/2+o.left,h.unshift("rotate(-90 "+j.toString()+" "+j.toString()+")");break}I%2===1&&(o.left!==o.top&&(j=o.left,o.left=o.top,o.top=j),o.width!==o.height&&(j=o.width,o.width=o.height,o.height=j)),h.length&&(s='<g transform="'+h.join(" ")+'">'+s+"</g>")});const i=r.width,c=r.height,l=o.width,u=o.height;let d,p;i===null?(p=c===null?"1em":c==="auto"?u:c,d=Ze(p,l/u)):(d=i==="auto"?l:i,p=c===null?Ze(d,u/l):c==="auto"?u:c);const f={},y=(S,h)=>{ds(h)||(f[S]=h.toString())};return y("width",d),y("height",p),f.viewBox=o.left.toString()+" "+o.top.toString()+" "+l.toString()+" "+u.toString(),{attributes:f,body:s}}const fs=/\sid="(\S+)"/g,ps="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let hs=0;function qn(e,t=ps){const n=[];let r;for(;r=fs.exec(e);)n.push(r[1]);if(!n.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const i=typeof t=="function"?t(s):t+(hs++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+i+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const se={local:!0,session:!0},Kn={local:new Set,session:new Set};let Tt=!1;function ms(e){Tt=e}const rn="iconify2",ve="iconify",Gn=ve+"-count",on=ve+"-version",Wn=36e5,gs=168;function Je(e,t){try{return e.getItem(t)}catch{}}function Lt(e,t,n){try{return e.setItem(t,n),!0}catch{}}function sn(e,t){try{e.removeItem(t)}catch{}}function et(e,t){return Lt(e,Gn,t.toString())}function tt(e){return parseInt(Je(e,Gn))||0}let Le=typeof window>"u"?{}:window;function Qn(e){const t=e+"Storage";try{if(Le&&Le[t]&&typeof Le[t].length=="number")return Le[t]}catch{}se[e]=!1}function Xn(e,t){const n=Qn(e);if(!n)return;const r=Je(n,on);if(r!==rn){if(r){const c=tt(n);for(let l=0;l<c;l++)sn(n,ve+l.toString())}Lt(n,on,rn),et(n,0);return}const o=Math.floor(Date.now()/Wn)-gs,s=c=>{const l=ve+c.toString(),u=Je(n,l);if(typeof u=="string"){try{const d=JSON.parse(u);if(typeof d=="object"&&typeof d.cached=="number"&&d.cached>o&&typeof d.provider=="string"&&typeof d.data=="object"&&typeof d.data.prefix=="string"&&t(d,c))return!0}catch{}sn(n,l)}};let i=tt(n);for(let c=i-1;c>=0;c--)s(c)||(c===i-1?(i--,et(n,i)):Kn[e].add(c))}function Yn(){if(!Tt){ms(!0);for(const e in se)Xn(e,t=>{const n=t.data,r=t.provider,o=n.prefix,s=W(r,o);if(!Et(s,n).length)return!1;const i=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function Zn(e,t){switch(e){case"local":case"session":se[e]=t;break;case"all":for(const n in se)se[n]=t;break}}const nt=Object.create(null);function Jn(e,t){nt[e]=t}function rt(e){return nt[e]||nt[""]}function Pt(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Fe=Object.create(null),pe=["https://api.simplesvg.com","https://api.unisvg.com"],Oe=[];for(;pe.length>0;)pe.length===1||Math.random()>.5?Oe.push(pe.shift()):Oe.push(pe.pop());Fe[""]=Pt({resources:["https://api.iconify.design"].concat(Oe)});function er(e,t){const n=Pt(t);return n===null?!1:(Fe[e]=n,!0)}function Ve(e){return Fe[e]}function vs(){return Object.keys(Fe)}const ys=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let ke=ys();function xs(e){ke=e}function bs(){return ke}function Ss(e,t){const n=Ve(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(i=>{o=Math.max(o,i.length)});const s=t+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function ws(e){return e===404}const js=(e,t,n)=>{const r=[],o=Ss(e,t),s="icons";let i={type:s,provider:e,prefix:t,icons:[]},c=0;return n.forEach((l,u)=>{c+=l.length+1,c>=o&&u>0&&(r.push(i),i={type:s,provider:e,prefix:t,icons:[]},c=l.length),i.icons.push(l)}),r.push(i),r};function Cs(e){if(typeof e=="string"){const t=Ve(e);if(t)return t.path}return"/"}const _s=(e,t,n)=>{if(!ke){n("abort",424);return}let r=Cs(t.provider);switch(t.type){case"icons":{const s=t.prefix,c=t.icons.join(","),l=new URLSearchParams({icons:c});r+=s+".json?"+l.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;ke(e+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(ws(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},Es={prepare:js,send:_s};function Is(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,i=o.prefix,c=o.name,l=n[s]||(n[s]=Object.create(null)),u=l[i]||(l[i]=W(s,i));let d;c in u.icons?d=t.loaded:i===""||u.missing.has(c)?d=t.missing:d=t.pending;const p={provider:s,prefix:i,name:c};d.push(p)}),t}function tr(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function Ts(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,o=e.prefix;t.forEach(s=>{const i=s.icons,c=i.pending.length;i.pending=i.pending.filter(l=>{if(l.prefix!==o)return!0;const u=l.name;if(e.icons[u])i.loaded.push({provider:r,prefix:o,name:u});else if(e.missing.has(u))i.missing.push({provider:r,prefix:o,name:u});else return n=!0,!0;return!1}),i.pending.length!==c&&(n||tr([e],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let Ls=0;function Ps(e,t,n){const r=Ls++,o=tr.bind(null,n,r);if(!t.pending.length)return o;const s={id:r,icons:t,callback:e,abort:o};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}function Rs(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const s=typeof o=="string"?fe(o,t,n):o;s&&r.push(s)}),r}var Ds={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Os(e,t,n,r){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let i;if(e.random){let g=e.resources.slice(0);for(i=[];g.length>1;){const C=Math.floor(Math.random()*g.length);i.push(g[C]),g=g.slice(0,C).concat(g.slice(C+1))}i=i.concat(g)}else i=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let l="pending",u=0,d,p=null,f=[],y=[];typeof r=="function"&&y.push(r);function S(){p&&(clearTimeout(p),p=null)}function h(){l==="pending"&&(l="aborted"),S(),f.forEach(g=>{g.status==="pending"&&(g.status="aborted")}),f=[]}function L(g,C){C&&(y=[]),typeof g=="function"&&y.push(g)}function v(){return{startTime:c,payload:t,status:l,queriesSent:u,queriesPending:f.length,subscribe:L,abort:h}}function I(){l="failed",y.forEach(g=>{g(void 0,d)})}function j(){f.forEach(g=>{g.status==="pending"&&(g.status="aborted")}),f=[]}function P(g,C,b){const w=C!=="success";switch(f=f.filter(E=>E!==g),l){case"pending":break;case"failed":if(w||!e.dataAfterTimeout)return;break;default:return}if(C==="abort"){d=b,I();return}if(w){d=b,f.length||(i.length?T():I());return}if(S(),j(),!e.random){const E=e.resources.indexOf(g.resource);E!==-1&&E!==e.index&&(e.index=E)}l="completed",y.forEach(E=>{E(b)})}function T(){if(l!=="pending")return;S();const g=i.shift();if(g===void 0){if(f.length){p=setTimeout(()=>{S(),l==="pending"&&(j(),I())},e.timeout);return}I();return}const C={status:"pending",resource:g,callback:(b,w)=>{P(C,b,w)}};f.push(C),u++,p=setTimeout(T,e.rotate),n(g,t,C.callback)}return setTimeout(T),v}function nr(e){const t={...Ds,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function o(c,l,u){const d=Os(t,c,l,(p,f)=>{r(),u&&u(p,f)});return n.push(d),d}function s(c){return n.find(l=>c(l))||null}return{query:o,find:s,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function an(){}const We=Object.create(null);function As(e){if(!We[e]){const t=Ve(e);if(!t)return;const n=nr(t),r={config:t,redundancy:n};We[e]=r}return We[e]}function rr(e,t,n){let r,o;if(typeof e=="string"){const s=rt(e);if(!s)return n(void 0,424),an;o=s.send;const i=As(e);i&&(r=i.redundancy)}else{const s=Pt(e);if(s){r=nr(s);const i=e.resources?e.resources[0]:"",c=rt(i);c&&(o=c.send)}}return!r||!o?(n(void 0,424),an):r.query(t,o,n)().abort}function Ms(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in se)Xn(r,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function $s(e,t){Tt||Yn();function n(r){let o;if(!se[r]||!(o=Qn(r)))return;const s=Kn[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=tt(o),!et(o,i+1))return;const c={cached:Math.floor(Date.now()/Wn),provider:e.provider,data:t};return Lt(o,ve+i.toString(),JSON.stringify(c))}t.lastModified&&!Ms(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function cn(){}function ks(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Ts(e)}))}function Ns(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let s;if(!o||!(s=rt(n)))return;s.prepare(n,r,o).forEach(c=>{rr(n,c,l=>{if(typeof l!="object")c.icons.forEach(u=>{e.missing.add(u)});else try{const u=Et(e,l);if(!u.length)return;const d=e.pendingIcons;d&&u.forEach(p=>{d.delete(p)}),$s(e,l)}catch(u){console.error(u)}ks(e)})})}))}const Bs=e=>{const n=W(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},Rt=(e,t)=>{const n=Rs(e,!0,ss()),r=Is(n);if(!r.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(r.loaded,r.missing,r.pending,cn)}),()=>{l=!1}}const o=Object.create(null),s=[];let i,c;return r.pending.forEach(l=>{const{provider:u,prefix:d}=l;if(d===c&&u===i)return;i=u,c=d,s.push(W(u,d));const p=o[u]||(o[u]=Object.create(null));p[d]||(p[d]=[])}),r.pending.forEach(l=>{const{provider:u,prefix:d,name:p}=l,f=W(u,d),y=f.pendingIcons||(f.pendingIcons=new Set);y.has(p)||(y.add(p),o[u][d].push(p))}),s.forEach(l=>{const{provider:u,prefix:d}=l;o[u][d].length&&Ns(l,o[u][d])}),t?Ps(t,r,s):cn},Us=e=>new Promise((t,n)=>{const r=typeof e=="string"?fe(e,!0):e;if(!r){n(e);return}Rt([r||e],o=>{if(o.length&&r){const s=be(r);if(s){t({...xe,...s});return}}n(e)})});function or(e,t){const n={...e};for(const r in t){const o=t[r],s=typeof o;r in Vn?(o===null||o&&(s==="string"||s==="number"))&&(n[r]=o):s===typeof n[r]&&(n[r]=r==="rotate"?o%4:o)}return n}const He={...Hn,inline:!1},Qe="iconify",ot="iconify-inline",te="iconifyData"+Date.now();let ie=[];function Se(e){for(let t=0;t<ie.length;t++){const n=ie[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function sr(e,t=!1){let n=Se(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},ie.push(n),n)}function zs(){if(document.documentElement)return sr(document.documentElement);ie.push({node:()=>document.documentElement})}function Fs(e){ie=ie.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function we(){return ie}function Vs(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let me=null;const Hs={childList:!0,subtree:!0,attributes:!0};function ir(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,me&&me(e)}))}function qs(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let r=0;r<t.length;r++){const o=t[r];if(o.addedNodes&&o.addedNodes.length>0||o.type==="attributes"&&o.target[te]!==void 0){n.paused||ir(e);return}}}function ar(e,t){e.observer.instance.observe(t,Hs)}function Ne(e){let t=e.observer;if(t&&t.instance)return;const n=typeof e.node=="function"?e.node():e.node;!n||!window||(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(qs.bind(null,e)),ar(e,n),t.paused||ir(e))}function ln(){we().forEach(Ne)}function cr(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function Ks(e){const t=me!==null;if(me!==e&&(me=e,t&&we().forEach(cr)),t){ln();return}Vs(ln)}function st(e){(e?[e]:we()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const n=t.observer;if(n.paused++,n.paused>1||!n.instance)return;n.instance.disconnect()})}function Gs(e){if(e){const t=Se(e);t&&st(t)}else st()}function it(e){(e?[e]:we()).forEach(t=>{if(!t.observer){Ne(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const r=typeof t.node=="function"?t.node():t.node;if(r)n.instance?ar(t,r):Ne(t);else return}})}function Ws(e){if(e){const t=Se(e);t&&it(t)}else it()}function lr(e,t=!1){const n=sr(e,t);return Ne(n),n}function ur(e){const t=Se(e);t&&(cr(t),Fs(e))}function Qs(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,r=t.customisations;for(const o in He)if(n[o]!==r[o])return!0;return!1}function Xs(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return t}const Ys=/[\s,]+/;function Zs(e,t){t.split(Ys).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Js=["width","height"],ei=["inline","hFlip","vFlip"];function ti(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function ni(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&fe(t,!0);if(!n)return null;const r={...He,inline:e.classList&&e.classList.contains(ot)};Js.forEach(c=>{const l=e.getAttribute("data-"+c);l&&(r[c]=l)});const o=e.getAttribute("data-rotate");typeof o=="string"&&(r.rotate=Xs(o));const s=e.getAttribute("data-flip");typeof s=="string"&&Zs(r,s),ei.forEach(c=>{const l="data-"+c,u=ti(e.getAttribute(l),l);typeof u=="boolean"&&(r[c]=u)});const i=e.getAttribute("data-mode");return{name:t,icon:n,customisations:r,mode:i}}const ri="svg."+Qe+", i."+Qe+", span."+Qe+", i."+ot+", span."+ot;function oi(e){const t=[];return e.querySelectorAll(ri).forEach(n=>{const r=n[te]||n.tagName.toLowerCase()!=="svg"?ni(n):null;r&&t.push({node:n,props:r})}),t}function dr(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}let ge;function si(){try{ge=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{ge=null}}function ii(e){return ge===void 0&&si(),ge?ge.createHTML(e):e}function fr(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function pr(e,t,n,r){const o=e.classList;if(r){const i=r.classList;Array.from(i).forEach(c=>{o.add(c)})}const s=[];return t.forEach(i=>{o.contains(i)?n.has(i)&&s.push(i):(o.add(i),s.push(i))}),n.forEach(i=>{t.has(i)||o.remove(i)}),s}function hr(e,t,n){const r=e.style;(n||[]).forEach(s=>{r.removeProperty(s)});const o=[];for(const s in t)r.getPropertyValue(s)||(o.push(s),r.setProperty(s,t[s]));return o}function mr(e,t,n){let r;try{r=document.createElement("span")}catch{return e}const o=t.customisations,s=ze(n,o),i=e[te],c=dr(qn(s.body),{"aria-hidden":"true",role:"img",...s.attributes});r.innerHTML=ii(c);const l=r.childNodes[0],u=e.attributes;for(let S=0;S<u.length;S++){const h=u.item(S),L=h.name;L!=="class"&&!l.hasAttribute(L)&&l.setAttribute(L,h.value)}const d=fr(t.icon),p=pr(l,d,new Set(i&&i.addedClasses),e),f=hr(l,o.inline?{"vertical-align":"-0.125em"}:{},i&&i.addedStyles),y={...t,status:"loaded",addedClasses:p,addedStyles:f};return l[te]=y,e.parentNode&&e.parentNode.replaceChild(l,e),l}function ai(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ci(e){return"data:image/svg+xml,"+ai(e)}function li(e){return'url("'+ci(e)+'")'}const ui={display:"inline-block"},at={"background-color":"currentColor"},gr={"background-color":"transparent"},un={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},dn={"-webkit-mask":at,mask:at,background:gr};for(const e in dn){const t=dn[e];for(const n in un)t[e+"-"+n]=un[n]}function fn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function di(e,t,n,r){const o=t.customisations,s=ze(n,o),i=s.attributes,c=e[te],l=dr(s.body,{...i,width:n.width+"",height:n.height+""}),u=fr(t.icon),d=pr(e,u,new Set(c&&c.addedClasses)),f={"--svg":li(l),width:fn(i.width),height:fn(i.height),...ui,...r?at:gr};o.inline&&(f["vertical-align"]="-0.125em");const y=hr(e,f,c&&c.addedStyles),S={...t,status:"loaded",addedClasses:d,addedStyles:y};return e[te]=S,e}let Pe=!1;function fi(){Pe||(Pe=!0,setTimeout(()=>{Pe&&(Pe=!1,de())}))}function de(e,t=!1){const n=Object.create(null);function r(o,s){const{provider:i,prefix:c,name:l}=o,u=W(i,c),d=u.icons[l];if(d)return{status:"loaded",icon:d};if(u.missing.has(l))return{status:"missing"};if(s&&!Bs(o)){const p=n[i]||(n[i]=Object.create(null));(p[c]||(p[c]=new Set)).add(l)}return{status:"loading"}}(e?[e]:we()).forEach(o=>{const s=typeof o.node=="function"?o.node():o.node;if(!s||!s.querySelectorAll)return;let i=!1,c=!1;function l(u,d,p){if(c||(c=!0,st(o)),u.tagName.toUpperCase()!=="SVG"){const f=d.mode,y=f==="mask"||(f==="bg"?!1:f==="style"?p.body.indexOf("currentColor")!==-1:null);if(typeof y=="boolean"){di(u,d,{...xe,...p},y);return}}mr(u,d,p)}oi(s).forEach(({node:u,props:d})=>{const p=u[te];if(!p){const{status:y,icon:S}=r(d.icon,!0);if(S){l(u,d,S);return}i=i||y==="loading",u[te]={...d,status:y};return}let f;if(Qs(p,d)){if(f=r(d.icon,p.name!==d.name),!f.icon){i=i||f.status==="loading",Object.assign(p,{...d,status:f.status});return}}else{if(p.status!=="loading")return;if(f=r(d.icon,!1),!f.icon){p.status=f.status;return}}l(u,d,f.icon)}),o.temporary&&!i?ur(s):t&&i?lr(s,!0):c&&o.observer&&it(o)});for(const o in n){const s=n[o];for(const i in s){const c=s[i];Rt(Array.from(c).map(l=>({provider:o,prefix:i,name:l})),fi)}}}function pi(e){const t=Se(e);t?de(t):de({node:e,temporary:!0},!0)}function vr(e,t,n=!1){const r=be(e);if(!r)return null;const o=fe(e),s=or(He,t||{}),i=mr(document.createElement("span"),{name:e,icon:o,customisations:s},r);return n?i.outerHTML:i}function hi(){return"3.1.1"}function mi(e,t){return vr(e,t,!1)}function gi(e,t){return vr(e,t,!0)}function vi(e,t){const n=be(e);if(!n)return null;const r=or(He,t||{});return ze(n,r)}function yi(e){e?pi(e):de()}if(typeof document<"u"&&typeof window<"u"){zs();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!Fn(r))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{Ks(de),de()})}function xi(e,t){Zn(e,t!==!1)}function bi(e){Zn(e,!0)}Jn("",Es);if(typeof document<"u"&&typeof window<"u"){Yn();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const r="IconifyProviders["+n+"] is invalid.";try{const o=t[n];if(typeof o!="object"||!o||o.resources===void 0)continue;er(n,o)||console.error(r)}catch{console.error(r)}}}}const Si={getAPIConfig:Ve,setAPIModule:Jn,sendAPIQuery:rr,setFetch:xs,getFetch:bs,listAPIProviders:vs},wi={_api:Si,addAPIProvider:er,loadIcons:Rt,loadIcon:Us,iconExists:as,getIcon:cs,listIcons:os,addIcon:is,addCollection:Fn,replaceIDs:qn,calculateSize:Ze,buildIcon:ze,getVersion:hi,renderSVG:mi,renderHTML:gi,renderIcon:vi,scan:yi,observe:lr,stopObserving:ur,pauseObserver:Gs,resumeObserver:Ws,enableCache:xi,disableCache:bi};try{self.Iconify===void 0&&(self.Iconify=wi)}catch{}var Dt={},ji=U;Object.defineProperty(Dt,"__esModule",{value:!0});var yr=Dt.default=void 0,Ci=ji(z()),_i=a;yr=Dt.default=(0,Ci.default)((0,_i.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline");function Ot({infos:e}){const{t}=Z(),n=new URL("https://community.arcblock.io/discussions/add");e.forEach(o=>{n.searchParams.set(o.label,o.value)});const r=e.map(o=>`* ${o.label}: ${o.value}`).join(`
23
- `);return n.searchParams.set("report","server"),n.searchParams.set("context",`[Enter feedback here]
24
-
25
-
26
-
27
- <!--
28
- [Server Info]
29
- ${r}
30
- * Page: ${window.location.href}
31
- -->
32
- `),M(O,{sx:{mx:{xs:0,md:2}},children:M(Sn,{sx:{color:"text.primary"},target:"_blank",href:n.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}Ot.propTypes={infos:_.arrayOf(_.shape({label:_.string,value:_.string}))};Ot.defaultProps={infos:[]};var At={},Ei=U;Object.defineProperty(At,"__esModule",{value:!0});var ct=At.default=void 0,Ii=Ei(z()),pn=a;ct=At.default=(0,Ii.default)([(0,pn.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,pn.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");function J({children:e}){return Ue(n=>n.breakpoints.down("md"))?a.jsx(Xe,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:a.jsx(O,{sx:{display:"flex",alignItems:"center",gap:1},children:a.jsx(ct,{fontSize:"small"})})}):a.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:1},children:[a.jsx(ct,{fontSize:"small"}),e]})}J.propTypes={children:_.node.isRequired};const Ti="https://launcher.arcblock.io/",Li=30*24*60*60*1e3;function Mt({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...o}){var T,g,C,b,w,E;const{t:s,locale:i}=Z(),c=Be(),[l,u]=Ln({safeIframeRef:null,popoverAnchorEl:null}),d=x.useRef(null),p=Ue(R=>R.breakpoints.down("md")),{sx:f={},...y}=o,S=p?"mobile":"desktop",h=Tn(async()=>{const[R,Q]=await Promise.all([c.api.getLauncherSession({input:{launcherSessionId:r,launcherUrl:e}}),hn({launcherUrl:e||Ti,nftDid:n,launcherSessionId:r,locale:i})]);if(R!=null&&R.error)throw new Error(R.error);return{launcherSession:R.launcherSession,subscriptionURL:Q}},[i]);if(h.loading)return a.jsx(oe,{label:a.jsxs(J,{children:[!p&&s("expiration.desktop.loading"),a.jsx(ee,{size:16})]}),variant:"success",sx:{cursor:"pointer",...f},...y});if(h.error)return console.error(h.error),a.jsx(oe,{label:a.jsx(J,{children:s(`expiration.${S}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...f},...y,onClick:()=>h.retry()});const L=R=>{u({popoverAnchorEl:R.currentTarget})},v=()=>{u({popoverAnchorEl:null})},I=(T=h.value)==null?void 0:T.launcherSession;let j="success";[$.LAUNCH_SESSION_STATUS.overdue,$.LAUNCH_SESSION_STATUS.canceled,$.LAUNCH_SESSION_STATUS.terminated].includes((C=(g=h.value)==null?void 0:g.launcherSession)==null?void 0:C.status)&&(j="error");let P=null;if(I.expirationDate&&!I.subscription){const R=le(I.expirationDate).diff(le(),"ms");P=s(`expiration.${S}.tips.${j}`,{validity:En(R,{locale:mn(i),compact:!0,verbose:!0})}),R>0&&R<=Li&&(j="warning")}return a.jsxs(a.Fragment,{children:[a.jsx(oe,{label:a.jsx(J,{children:P||((w=(b=I==null?void 0:I.subscription)==null?void 0:b.product)==null?void 0:w.name)||s("common.subscription")}),color:j,variant:j!=="success"?"contained":"outlined",sx:{cursor:"pointer",...f},...y,onClick:L}),a.jsx(wn,{id:"popover-info",open:!!l.popoverAnchorEl,anchorEl:l.popoverAnchorEl,onClose:v,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:a.jsx("iframe",{ref:d,title:s("common.subscription"),width:"360px",height:"600px",style:{border:0},src:(E=h.value)==null?void 0:E.subscriptionURL})})]})}Mt.propTypes={chainHost:_.string.isRequired,nftId:_.string,launcherSessionId:_.string,sx:_.object,retention:_.number,launcherUrl:_.string.isRequired};Mt.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};const Pi=30*24*60*60*1e3,Ri="https://launcher.arcblock.io/";function $t({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...o}){var g,C,b,w,E,R,Q;const{t:s,locale:i}=Z(),[c,l]=Ln({safeIframeRef:null,popoverAnchorEl:null}),u=x.useRef(null),d=Ue(F=>F.breakpoints.down("md")),p=Be(),{sx:f={},...y}=o,S=d?"mobile":"desktop",h=Tn(async()=>{const[F,je]=await Promise.all([p.api.getLauncherSession({input:{launcherSessionId:r||n,launcherUrl:e}}),hn({launcherUrl:e||Ri,nftDid:n,launcherSessionId:r,locale:i})]);if(F!=null&&F.error)throw new Error(F.error);return{launcherSession:F.launcherSession,subscriptionURL:je}},[i]);if(h.loading)return a.jsx(oe,{label:a.jsxs(J,{children:[!d&&s("expiration.desktop.loading"),a.jsx(ee,{size:16})]}),variant:"success",sx:{cursor:"pointer",...f},...y});if(h.error)return console.error(h.error),a.jsx(oe,{label:a.jsx(J,{children:s(`expiration.${S}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...f},...y,onClick:()=>h.retry()});const L=(C=(g=h.value)==null?void 0:g.launcherSession)==null?void 0:C.expirationDate,v=le(L).isBefore(le()),I=le(L).diff(le(),"ms");let j="success";I<=Pi&&(j="warning"),v&&(j="error");const P=F=>{l({popoverAnchorEl:F.currentTarget})},T=()=>{l({popoverAnchorEl:null})};return a.jsxs(a.Fragment,{children:[((w=(b=h.value)==null?void 0:b.launcherSession)==null?void 0:w.subscription)&&a.jsx(oe,{label:a.jsx(J,{children:s("expiration.desktop.nextInvoice",{date:Rr(L,i)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...f},...y,onClick:P}),!((R=(E=h.value)==null?void 0:E.launcherSession)!=null&&R.subscription)&&a.jsx(oe,{label:a.jsx(J,{children:s(`expiration.${S}.tips.${j}`,{validity:En(I,{locale:mn(i),compact:!0,verbose:!0})})}),color:j,variant:j!=="success"?"contained":"outlined",sx:{cursor:"pointer",...f},...y,onClick:P}),a.jsx(wn,{id:"popover-info",open:!!c.popoverAnchorEl,anchorEl:c.popoverAnchorEl,onClose:T,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:a.jsx("iframe",{ref:u,title:s("common.subscription"),width:"360px",height:"600px",style:{border:0},src:(Q=h.value)==null?void 0:Q.subscriptionURL})})]})}$t.propTypes={chainHost:_.string.isRequired,nftId:_.string,launcherSessionId:_.string,sx:_.object,retention:_.number,launcherUrl:_.string.isRequired};$t.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};var kt={},Di=U;Object.defineProperty(kt,"__esModule",{value:!0});var xr=kt.default=void 0,Oi=Di(z()),Ai=a;xr=kt.default=(0,Oi.default)((0,Ai.jsx)("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"}),"Fullscreen");var Nt={},Mi=U;Object.defineProperty(Nt,"__esModule",{value:!0});var br=Nt.default=void 0,$i=Mi(z()),ki=a;br=Nt.default=(0,$i.default)((0,ki.jsx)("path",{d:"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"}),"FullscreenExit");function Ni(){const{inFullPage:e,toggleFullPage:t}=no();return M(gn,{onClick:t,children:e?M(br,{sx:{transform:"scale(1.3)"}}):M(xr,{sx:{transform:"scale(1.3)"}})})}function Bt({children:e}){var j,P,T;const{t}=Z(),{loading:n,error:r,actions:{refreshBlocklet:o},env:s,blocklet:i}=ye(),{info:c}=Dr(),l=ao(),u=Ue(g=>g.breakpoints.down("md")),[d,p]=x.useState(null),{appId:f,version:y}=s,S=[{label:"App ID",value:f},{label:"App Version",value:y},{label:"App Bundle Name",value:(j=i==null?void 0:i.meta)==null?void 0:j.bundleName},{label:"Server Id",value:c.did},{label:"Server Version",value:c.version}],h=g=>{var b,w,E,R;const C=Array.isArray(g)?g:[g];if(u||C.unshift(M(Ni,{})),i){const Q={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};Or(i)?C.unshift(M(Mt,{chainHost:(b=i==null?void 0:i.controller)==null?void 0:b.chainHost,nftId:(w=i==null?void 0:i.controller)==null?void 0:w.nftId,launcherSessionId:(E=i==null?void 0:i.controller)==null?void 0:E.launcherSessionId,launcherUrl:(R=i==null?void 0:i.controller)==null?void 0:R.launcherUrl,sx:Q})):c.ownerNft&&c.launcher&&C.unshift(M($t,{chainHost:c.launcher.chainHost,launcherUrl:c.launcher.url,nftId:c.ownerNft.did,launcherSessionId:c.ownerNft.launcherSessionId,sx:Q}))}return C},L=(P=((i==null?void 0:i.environments)||[]).find(g=>g.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE))==null?void 0:P.value,v=(T=((i==null?void 0:i.environments)||[]).find(g=>g.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))==null?void 0:T.value;return x.useEffect(()=>{if(u)p(null);else{const{appLogo:g,appLogoRect:C}=window.blocklet??{};(C||g)&&p(`${C||g}&v=${Date.now()}`)}},[L,v,u]),Ke(Bi,{legacy:!1,fullWidth:!0,headerAddons:h,headerProps:{logo:d?M("img",{src:d,alt:"logo"}):null},isMobile:u,footerProps:{addon:M(Ot,{infos:S})},children:[!i&&n&&M(Ae,{relative:"parent",children:M(ee,{})}),!i&&r&&Ke(Ae,{relative:"parent",children:[Ke(O,{display:"flex",alignItems:"center",children:[M(yr,{color:"error",sx:{marginRight:1}}),dt(r)]}),M(ut,{onClick:()=>o(),children:M("span",{style:{textDecoration:"underline"},children:t("common.retry")})})]}),!!i&&M(O,{flex:1,padding:u?2:3,display:"flex",flexDirection:"column",children:M(eo,{FallbackComponent:to,resetKeys:[l.pathname],children:e})})]})}Bt.propTypes={children:_.any};Bt.defaultProps={children:null};const Bi=lt(Jr)`
33
- div.dashboard-content {
34
- padding: 0;
35
- }
36
- .header-addons .locales {
37
- max-height: 400px;
38
- overflow-y: auto;
39
- }
40
- `;function Ui(){const{t:e,locale:t}=Z(),{blocklet:n,launcherSession:r}=ye(),[o,s]=uo({subscriptionURL:"#"});if(x.useEffect(()=>{var l,u;zt(n,r)&&Ar({launcherSessionId:(l=n==null?void 0:n.controller)==null?void 0:l.launcherSessionId,launcherUrl:(u=n==null?void 0:n.controller)==null?void 0:u.launcherUrl,locale:t}).then(d=>{s({subscriptionURL:d})}).catch(d=>{console.error("get subscription url error:",d)})},[n,r]),!n||!r||!Mr(n)||r.status===$.LAUNCH_SESSION_STATUS.installed)return"";let i=null,c="";return zt(n,r)?(i=a.jsx(Sn,{href:o.subscriptionURL,children:e("blocklet.manageSubscription")}),c=e("blocklet.suspendedCausedByExpired",{deadline:Ft(r==null?void 0:r.reservedUntil,t)})):$r(n,r)&&(i=a.jsx(Cn,{to:_n($.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),c=e("blocklet.suspendedCausedByTerminated",{canceledAt:Ft(r==null?void 0:r.terminatedAt,t),deadline:kr(r==null?void 0:r.terminatedAt,t)})),a.jsxs(O,{component:ro,type:"error",sx:{"&> .alert-content":{display:"block"}},children:[c,a.jsx(ue,{component:"span",sx:{marginLeft:"4px"},children:i})]})}const Sr=x.createContext({});function Sa(){return x.useContext(Sr)}const{Provider:zi,Consumer:wa}=Sr,{did:q,appId:Fi}=window.env;function Vi({children:e}){var g,C;const{t,locale:n}=Z(),{blocklet:r}=ye(),[o,s]=x.useState([]),[i,c]=x.useState([]),[l,u]=x.useState([]),d=k.getDisplayName(r),p=((g=((r==null?void 0:r.environments)||[]).find(b=>b.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR))==null?void 0:g.value)||"auto",f=(r==null?void 0:r.trustedPassports)||[],y=(r==null?void 0:r.trustedFactories)||[],S=(r==null?void 0:r.enablePassportIssuance)!==!1,h=async()=>{try{const b=await Te.doBatchQuery({getRoles:{input:{teamDid:q}},getPermissions:{input:{teamDid:q}},getInvitations:{input:{teamDid:q}}});c((b.getRoles.roles||[]).filter(w=>!$.RBAC_CONFIG.roles.some(E=>E.name===w.name&&(!E.passport||E.ci))).map(w=>(w.hasDescription=!!w.description,w.hasDescription||(w.description=t("team.passport.description",{teamName:d,title:w.title})),w))),u(b.getPermissions.permissions||[]),s(b.getInvitations.invitations||[])}catch(b){K.error(b.message)}},L=({did:b}={})=>{const w={teamDid:q,user:{did:b}};return Te.getUser({input:w})},v=({query:b,paging:w}={})=>{const E={teamDid:q};return w&&(E.paging=w),b&&(E.query=b),E.sort={lastLoginAt:-1},Te.getUsers({input:E})},I=()=>Te.getUsersCountPerRole({input:{teamDid:q}}),j=()=>h();x.useEffect(()=>{var b;(b=r==null?void 0:r.meta)!=null&&b.did&&h()},[(C=r==null?void 0:r.meta)==null?void 0:C.did]),x.useEffect(()=>{c(b=>b.map(w=>(w.hasDescription||(w.description=t("team.passport.description",{teamName:d,title:w.title})),{...w})))},[t,n]);const P=b=>{b.teamDid===q&&h()};Re(Y.TeamEvents.userAdded,P,[q]),Re(Y.TeamEvents.userRemoved,P,[q]),Re(Y.TeamEvents.userUpdated,P,[q]);const T={teamDid:q,teamIssuerDid:Fi,teamName:d,invitations:o,roles:i,permissions:l,trustedPassports:f,trustedFactories:y,isNodeTeam:!1,enablePassportIssuance:S,refresh:j,passportColor:p,endpoint:window.location.origin,blocklet:r,api:{getUser:L,getUsers:v,getUsersCountPerRole:I}};return a.jsx(zi,{value:T,children:e})}const Hi=x.lazy(()=>B(()=>import("./overview-DNQZ-tgj.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]))),qi=x.lazy(()=>B(()=>import("./index-DpNGP1ih.js"),__vite__mapDeps([32,2,1,4,33,3,5,6,12,34,35,36,9,10,18,19,37,23,21,8,38,22,39,40,41,26,27,42,28,29,30,31,20,17]))),Ki=x.lazy(()=>B(()=>import("./index-CXVY5UoP.js"),__vite__mapDeps([43,2,1,12,3,4,5,6,44,14,36,9,18,19,22,23,45,46,10,17,28,29,30,31,20,21]))),Gi=x.lazy(()=>B(()=>import("./index-6oQLUjq6.js"),__vite__mapDeps([47,2,1,48,3,4,5,6,49,50,51,52,9,33,44,53,54,55,31,34,18,19,22,23,17,37,56,57,58,7,12,8,13,28,29,30,20,21]))),Wi=x.lazy(()=>B(()=>import("./audit-logs-CJvI5okV.js"),__vite__mapDeps([59,1,2,60,61,3,4,5,6,28,9,62,31,63]))),Qi=x.lazy(()=>B(()=>import("./index-fel1gHRy.js"),__vite__mapDeps([64,2,1,4,3,5,6,9,39,10,42,33,65,66,55,31,62,24,67,20,21,48,68,69,54,70,23,71,28,22,29,30,19,17]))),Xi=x.lazy(()=>B(()=>import("./log-CNjGA-yl.js"),__vite__mapDeps([72,1,2,28,3,4,5,6,9,73,55,74]))),Yi=x.lazy(()=>B(()=>import("./index-BWKYj-2X.js"),__vite__mapDeps([75,2,1,9,3,4,5,6,12,76,22,23,19,10,77,78,55,42,73,79,17,33,66,41,25,54,71,38,80,81,51,37,30,53,60,61,63]))),Zi=x.lazy(()=>B(()=>import("./config-navigation-a3GJWM1m.js"),__vite__mapDeps([82,2,3,4,1,5,6,83,9,56,46,84,31,23,28,22,29,30,19,20,21,17]))),Ji=x.lazy(()=>B(()=>import("./index-kk2gduJr.js"),__vite__mapDeps([85,1,2,5,4,9,3,6,86,25,87,88,38,23,8,27,30,58]))),ea=x.lazy(()=>B(()=>import("./component-Srk2_SVH.js"),__vite__mapDeps([89,1,2,4,3,5,6,12,50,51,52,9,33,44,53,58,18,19,90,83,70,78,37,54,69,23,91,80,81,38,42,22,30,10,92,93,88,25,94,45,46,60,61,84,8,28,16,86,95,87,96,14,24,55,29,26,27,31,20,21,17]))),ta=x.lazy(()=>B(()=>import("./analytics-0lVXNyXs.js"),__vite__mapDeps([97,1,2,3,4,5,6,67,9,20,21,48,68,69,54,70,23,71,31,55,28,22,29,30,19,17])));function na(){var j,P;const e=co(),{tab:t="overview"}=lo(),{blocklet:n,actions:{refreshBlocklet:r}}=ye(),{t:o}=Z(),{session:s}=In(),i=Wt(()=>{var T;return(T=s==null?void 0:s.user)==null?void 0:T.did},[s]),c=Wt(()=>{var T;return((T=s.user)==null?void 0:T.role)&&Br.includes(s.user.role)},[s]),l=(j=n==null?void 0:n.meta)==null?void 0:j.did,u=T=>{e(`${$.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${T}`)},d=()=>{r()},p=!n||Vt(n.status)?[]:k.getAppMissingConfigs(n),f=[{label:o("common.overview"),value:"overview"},{label:a.jsx(Wr,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!p.length,children:o("common.components")}),value:"components"}];Vt(n==null?void 0:n.status)||f.push({label:o("common.configuration"),value:"configuration"}),f.push({label:o("common.auditLogs"),value:"audit-logs"}),c&&f.push({label:o("common.notificationRecords"),value:"notification-records"}),n&&((P=n.children)!=null&&P.length)&&n.structVersion===$.APP_STRUCT_VERSION&&f.push({label:o("common.logs"),value:"logs"}),f.push({label:o("common.configNavigation"),value:"navigation"});const y=a.jsx(Wi,{scope:l,categories:["blocklet","team","security","certificates","gateway"]});Re(`${i}/${$.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,T=>{const{severity:g,title:C,description:b}=T||{};g==="error"?K.error(b||C):K.success(b||C)},[],"user");const S=x.useCallback(()=>c?a.jsx(Qi,{blocklet:n}):a.jsx(so,{status:403}),[n,c]),h={overview:a.jsx(Hi,{}),members:a.jsx(O,{mt:-5,children:a.jsx(qi,{type:"blocklet",createPassportSvg:Ht})}),passports:a.jsx(O,{mt:-4.5,children:a.jsx(Ki,{createPassportSvg:Ht})}),components:ea,configuration:a.jsx(Gi,{blocklet:n,onUpdate:d}),"audit-logs":y,"notification-records":S,logs:Xi,navigation:Zi,"did-spaces":a.jsx(Ji,{navOrientation:"horizontal",sx:{mt:-4}}),analytics:a.jsx(O,{mt:-5,children:a.jsx(ta,{})}),publish:a.jsx(O,{mt:-3,children:a.jsx(Yi,{})})},L=h[t]||h.overview,v=!["members","passports","analytics","publish","notifications","did-spaces"].includes(t),I=n?a.jsxs(_t,{type:"components",children:[v&&a.jsx(O,{pt:3,children:a.jsx(io,{tabs:f,current:t,onChange:u,scrollButtons:"auto"})}),a.jsx("div",{className:"page-content",children:a.jsx(x.Suspense,{fallback:a.jsx(Ae,{relative:"parent",children:a.jsx(ee,{})}),children:x.isValidElement(L)?L:a.jsx(L,{blocklet:n})})})]}):a.jsx(Ae,{relative:"parent",children:a.jsx(ee,{})});return a.jsx(Ur,{children:a.jsx(Vi,{children:a.jsx(Bt,{children:a.jsxs(oa,{children:[v&&a.jsxs(O,{component:"div",className:"page-header",children:[a.jsxs(ue,{component:"h6",variant:"h6",className:"page-title",color:"textPrimary",children:[n?a.jsx(ho,{blocklet:n,style:{marginRight:16}}):null,n?a.jsxs(O,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,children:[a.jsx(O,{children:k.getDisplayName(n)}),(n==null?void 0:n.status)!=="unknown"&&a.jsx(Ct,{size:"12px",status:n.status,source:n.source,progress:n.progress})]}):`${o("common.blocklet")} ${o("common.detail")}`]}),n?a.jsx(Go,{className:"page-actions",hasPermission:!0,blocklet:n,onStart:()=>{},onComplete:({error:T}={})=>{T&&K.error(T.message)},variant:"group"}):null]}),a.jsx(Bn,{}),a.jsx(Ui,{}),I]})})})})}function ra(){var r;const{blocklet:e}=ye(),{t}=Z(),n=(r=e==null?void 0:e.meta)==null?void 0:r.did;return x.useEffect(()=>{const o=Nr();return n&&o.connect(),()=>{n&&o.isConnected()&&o.disconnect()}},[n]),a.jsxs(a.Fragment,{children:[a.jsx(oo,{children:a.jsx("title",{children:t("pageTitle.dashboard")})}),a.jsx(na,{})]})}const oa=lt.main`
41
- .page-header {
42
- display: flex;
43
- justify-content: space-between;
44
- align-items: center;
45
- flex-wrap: wrap;
46
- gap: 16px;
47
- }
48
-
49
- .page-title {
50
- display: flex;
51
- align-items: center;
52
-
53
- .page-link {
54
- font-size: 15px;
55
- margin-top: 8px;
56
- margin-left: 8px;
57
- }
58
- }
59
-
60
- .page-content {
61
- margin-top: 18px;
62
- }
63
-
64
- @media (max-width: ${e=>e.theme.breakpoints.values.md}px) {
65
- .page-header {
66
- flex-direction: column;
67
- align-items: flex-start;
68
- .page-actions,
69
- .MuiButtonGroup-root {
70
- width: 100%;
71
- }
72
- .MuiButtonGroup-root {
73
- .MuiButtonBase-root {
74
- flex: 1;
75
- }
76
- .blocklet-action-text {
77
- display: none;
78
- }
79
- }
80
- }
81
-
82
- .page-title {
83
- margin-bottom: 15px;
84
- }
85
- }
86
- `,ja=Object.freeze(Object.defineProperty({__proto__:null,default:ra},Symbol.toStringTag,{value:"Module"}));export{Ct as B,jt as W,Mn as a,Rn as b,ce as c,yr as d,Pn as e,ba as f,ja as g,Sa as u};