@abtnode/webapp 1.16.54-beta-20251031-043051-f3b56e3a → 1.17.0-beta-20251101-021648-3f521a7e

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 (188) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-B30A4e9V.js → AdapterDayjs-BQhqZd8R.js} +1 -1
  4. package/dist/assets/{Add-BqMKSndg.js → Add-DaNU9Vkn.js} +1 -1
  5. package/dist/assets/ArrowDropDown-DMPX6uVd.js +1 -0
  6. package/dist/assets/{Autocomplete-DNyfxOFp.js → Autocomplete-DB_xZW4q.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-D07iUOi2.js → Breadcrumbs-DzUXRqKQ.js} +1 -1
  8. package/dist/assets/{ButtonGroup-Dh6lYgZM.js → ButtonGroup-BAvFNy2i.js} +1 -1
  9. package/dist/assets/{CSSTransition-BfkQpTwd.js → CSSTransition-YK8aX8nK.js} +1 -1
  10. package/dist/assets/{CallMerge-B-Wn3wH-.js → CallMerge-D_gwsj0k.js} +1 -1
  11. package/dist/assets/{CardContent-D50ZN2XJ.js → CardContent-BCchlH2G.js} +1 -1
  12. package/dist/assets/{ChevronLeft-Uf3Zj0ny.js → ChevronLeft-CSCmHm5m.js} +1 -1
  13. package/dist/assets/{ChevronRight-CqQwaL1d.js → ChevronRight-qIIkSnQ7.js} +1 -1
  14. package/dist/assets/{Clear-G8IA_JS7.js → Clear-4n0vKAse.js} +1 -1
  15. package/dist/assets/{DeleteOutline-BVyycjCe.js → DeleteOutline-CoQ7wmqT.js} +1 -1
  16. package/dist/assets/{Done-C3Xrj0cc.js → Done-Cc4L9Foc.js} +1 -1
  17. package/dist/assets/{Edit-0Bz5MCrU.js → Edit-BNY88SKu.js} +1 -1
  18. package/dist/assets/{ErrorOutline-Da9J9PWf.js → ErrorOutline-BzGlqq16.js} +1 -1
  19. package/dist/assets/{FilterList-Cid-oBR0.js → FilterList-B1C7unqT.js} +1 -1
  20. package/dist/assets/{Google-zFyeAexf.js → Google-CwyoAMMB.js} +1 -1
  21. package/dist/assets/{HelpOutline-kYF98cPy.js → HelpOutline-DTDV8qzL.js} +1 -1
  22. package/dist/assets/{KeyboardArrowDown-PDLBPIxK.js → KeyboardArrowDown-Mi5aUj7A.js} +1 -1
  23. package/dist/assets/{Launch-Cw0IvqYQ.js → Launch-Bgnt4dnJ.js} +1 -1
  24. package/dist/assets/{Link-AjRLM7zT.js → Link-DNvDZnMC.js} +1 -1
  25. package/dist/assets/{ListItemButton-BH7vk_M8.js → ListItemButton-8ftrSfoo.js} +1 -1
  26. package/dist/assets/{ListSubheader-XzhijlHC.js → ListSubheader-Dtz-xi9-.js} +1 -1
  27. package/dist/assets/{LoadingButton-DX-iBNkr.js → LoadingButton-C4EStBea.js} +1 -1
  28. package/dist/assets/{MoreVert-YC-2RtuS.js → MoreVert-B909vYzl.js} +1 -1
  29. package/dist/assets/{OpenInNew-Cs4iLXNI.js → OpenInNew-Izq7Bt-3.js} +1 -1
  30. package/dist/assets/{Refresh-4WpQ7G17.js → Refresh-VB_fFdY-.js} +1 -1
  31. package/dist/assets/{Search-DVAqIV8y.js → Search-DYBL-x4y.js} +1 -1
  32. package/dist/assets/{Stepper-cPSi1Mx5.js → Stepper-tTKANW81.js} +1 -1
  33. package/dist/assets/{Switch-7IuDphWe.js → Switch-Bb-rNPtt.js} +1 -1
  34. package/dist/assets/{TableSearch-CuYawmb9.js → TableSearch-U9rZfIzu.js} +1 -1
  35. package/dist/assets/{ToggleButtonGroup-DzPH8xLQ.js → ToggleButtonGroup-DllrYs9I.js} +1 -1
  36. package/dist/assets/{UnfoldMore-BkCizcCL.js → UnfoldMore-CvwQJb-a.js} +1 -1
  37. package/dist/assets/{Verified-C_RgwaGs.js → Verified-DRT_g89L.js} +1 -1
  38. package/dist/assets/{VerifiedUser-cla-gxoO.js → VerifiedUser-C11cj6r8.js} +1 -1
  39. package/dist/assets/{ViewList-Bb5x5Htb.js → ViewList-D4XmJ9U0.js} +1 -1
  40. package/dist/assets/{_createAggregator-lATQ9S4G.js → _createAggregator-BEnlFxIE.js} +1 -1
  41. package/dist/assets/{actions-BTuanQTE.js → actions-BeMJBeZS.js} +1 -1
  42. package/dist/assets/{actions-DHHW8Ne9.js → actions-CQRwSERj.js} +1 -1
  43. package/dist/assets/{agreement-Dtg6hLTZ.js → agreement-CZn2P4zt.js} +1 -1
  44. package/dist/assets/api-CFN0QrWp.js +1 -0
  45. package/dist/assets/{appearance-DW09NETq.js → appearance-pSINhSXc.js} +1 -1
  46. package/dist/assets/{audit-logs-DBzxIdH4.js → audit-logs-CROZ_WeS.js} +1 -1
  47. package/dist/assets/{base-chart-mE2yuOdY.js → base-chart-SmGCWPp4.js} +1 -1
  48. package/dist/assets/{blocklet-Dr_LK1Q2.js → blocklet-DAH77r3I.js} +1 -1
  49. package/dist/assets/{chain-Dc18Nz_k.js → chain-Cx_Kwvvk.js} +1 -1
  50. package/dist/assets/{click-to-copy-PtCfJ87M.js → click-to-copy-DUObPiIX.js} +1 -1
  51. package/dist/assets/cloneDeep-BqrZti_p.js +1 -0
  52. package/dist/assets/{collapse-DXrrkJjt.js → collapse-XOI3eY05.js} +1 -1
  53. package/dist/assets/{config-navigation-C2qj2cw-.js → config-navigation-DkbC13Wz.js} +3 -3
  54. package/dist/assets/{connect-to-CQ8x9XUb.js → connect-to-BBdZysbI.js} +1 -1
  55. package/dist/assets/{cssMode-BKzDL91g.js → cssMode-C61rzvz6.js} +1 -1
  56. package/dist/assets/{delete-confirm-B5zJVhDV.js → delete-confirm-DmwS-waR.js} +1 -1
  57. package/dist/assets/{depsEqual-Dxl6Fkos.js → depsEqual-BKRl_wlt.js} +1 -1
  58. package/dist/assets/{detail-Qa1bqakf.js → detail-CMFXn2sE.js} +3 -3
  59. package/dist/assets/{domains-pIwj2yNQ.js → domains-BJ95cum-.js} +1 -1
  60. package/dist/assets/{download-sLIfOCnR.js → download-CJgs-EUD.js} +1 -1
  61. package/dist/assets/{edit.svg-BBcWA2Yv.js → edit.svg-CTCbuAl5.js} +1 -1
  62. package/dist/assets/emotion-cache.browser.esm-B4PDkYd9.js +1 -0
  63. package/dist/assets/engine-WQwoCQo7.js +1 -0
  64. package/dist/assets/{freemarker2-HuIW7jf4.js → freemarker2-DecxbyLU.js} +1 -1
  65. package/dist/assets/{get-safe-url-D_h8kBns.js → get-safe-url-GLo4lMcu.js} +1 -1
  66. package/dist/assets/getValidReactChildren-DmUPqavH.js +1 -0
  67. package/dist/assets/{graphqlMode-Dy0N-jd0.js → graphqlMode-RRYdnqJj.js} +2 -2
  68. package/dist/assets/{handlebars-BiP-Y0Yn.js → handlebars-BLvfXb97.js} +1 -1
  69. package/dist/assets/{html-xIZVKqOO.js → html-sJ4Nfb5L.js} +1 -1
  70. package/dist/assets/{html-title-BGLe2_e3.js → html-title-3cSvLxbM.js} +1 -1
  71. package/dist/assets/{htmlMode-CP4qCSLp.js → htmlMode-BH8IFPfN.js} +1 -1
  72. package/dist/assets/{iframe-C807ybR2.js → iframe-b7qWsXni.js} +1 -1
  73. package/dist/assets/{index-BMhMlOF3.js → index-5_DkNrKV.js} +1 -1
  74. package/dist/assets/{index-xeIZXHWV.js → index-9PkC8D-D.js} +1 -1
  75. package/dist/assets/{index-DoFlCh-O.js → index-B4qKQt-w.js} +1 -1
  76. package/dist/assets/{index-dbT-WrDi.js → index-B8gee_2L.js} +1 -1
  77. package/dist/assets/{index-DIAjkldX.js → index-BCXR4Ftk.js} +1 -1
  78. package/dist/assets/{index-CnHjhHdP.js → index-BGo2ji7B.js} +1 -1
  79. package/dist/assets/{index-ZBdt2zLB.js → index-BKazYwLa.js} +1 -1
  80. package/dist/assets/{index-DoLUCdoo.js → index-BPe78k6O.js} +1 -1
  81. package/dist/assets/{index-Bq1Ow9Ag.js → index-BTeQyE9h.js} +1 -1
  82. package/dist/assets/{index-YMUJi64L.js → index-BUXGT_ps.js} +1 -1
  83. package/dist/assets/{index-Cax6HGSy.js → index-BUsRmWrQ.js} +1 -1
  84. package/dist/assets/{index-CcbY3K1e.js → index-BdCFcn5n.js} +1 -1
  85. package/dist/assets/{index-C_WCV7QS.js → index-BpbQbuPw.js} +1 -1
  86. package/dist/assets/{index-jGiUSwaE.js → index-C4Up6pys.js} +1 -1
  87. package/dist/assets/{index-BSuv2S-j.js → index-C5x2cR57.js} +2 -2
  88. package/dist/assets/{index-CUY9KYjX.js → index-C76P2oZA.js} +3 -3
  89. package/dist/assets/{index-CZle5CbS.js → index-C7u44WUx.js} +1 -1
  90. package/dist/assets/{index-DfnCJwAx.js → index-C8k-wIkI.js} +1 -1
  91. package/dist/assets/{index-wvWBQjSc.js → index-CKujShY4.js} +1 -1
  92. package/dist/assets/{index-BveOElcP.js → index-CQXhp4qK.js} +3 -3
  93. package/dist/assets/{index-eA_btxYY.js → index-CY-DQJlJ.js} +9 -9
  94. package/dist/assets/{index-T0ij7gEZ.js → index-CY7IUyTQ.js} +1 -1
  95. package/dist/assets/{index-zI6sbIgD.js → index-CdTvqOME.js} +1 -1
  96. package/dist/assets/{index-CFpGjsgX.js → index-CeSdCZbW.js} +3 -3
  97. package/dist/assets/{index-aDyspHb_.js → index-ClNNfRgL.js} +1 -1
  98. package/dist/assets/{index-eWsGrR-q.js → index-CnKKagRA.js} +1 -1
  99. package/dist/assets/{index-Cww9znhR.js → index-CwQXKxtM.js} +1 -1
  100. package/dist/assets/{index-jRVN_1vm.js → index-D8P50S6m.js} +1 -1
  101. package/dist/assets/{index-Fs3E_gDS.js → index-D9BFE-KZ.js} +1 -1
  102. package/dist/assets/{index-BQjC5QVz.js → index-DCku-75F.js} +1 -1
  103. package/dist/assets/{index-Dea9QPzX.js → index-DEol2fO5.js} +1 -1
  104. package/dist/assets/{index-DZoHX92P.js → index-DM_ZE9pB.js} +1 -1
  105. package/dist/assets/{index-C76LlcBP.js → index-DQDzrpet.js} +1 -1
  106. package/dist/assets/{index-Cq343AIm.js → index-DR4wKA9U.js} +1 -1
  107. package/dist/assets/{index-VAKOMEgj.js → index-Daqes2Jo.js} +1 -1
  108. package/dist/assets/{index-DmY-ECSO.js → index-DuXo6h3x.js} +1 -1
  109. package/dist/assets/{index-C5LYAduR.js → index-DzMtvg-l.js} +1 -1
  110. package/dist/assets/{index-BfokqgHy.js → index-Dzuc8iT3.js} +2 -2
  111. package/dist/assets/{index-CfO1ocPd.js → index-R1YPOZ_R.js} +1 -1
  112. package/dist/assets/{index-C4kLAKHD.js → index-RiT8KfYO.js} +1 -1
  113. package/dist/assets/{index-DTOWo4jq.js → index-V6W4s-Vq.js} +1 -1
  114. package/dist/assets/index-aNMEeMCp.js +1 -0
  115. package/dist/assets/{index-DAP7V0hj.js → index-d0DSkbLN.js} +1 -1
  116. package/dist/assets/{index-BkVWAwPz.js → index-kdOFyCzK.js} +1 -1
  117. package/dist/assets/{index-fRxZFZ5g.js → index-qTsCZuXh.js} +3 -3
  118. package/dist/assets/{index-DUCYys1s.js → index-wAxFAH22.js} +1 -1
  119. package/dist/assets/{index-B840ZI2-.js → index-yJnNzvvC.js} +1 -1
  120. package/dist/assets/{index.esm-DzozubHa.js → index.esm-DfXlzNxJ.js} +1 -1
  121. package/dist/assets/{install-from-url-CgprkeO6.js → install-from-url-C-sswCsg.js} +1 -1
  122. package/dist/assets/{invitation-BKHc6hH4.js → invitation-DYBpGYHd.js} +1 -1
  123. package/dist/assets/{is-path-prefix-equal-B-eGi6RZ.js → is-path-prefix-equal-D9JGKIeT.js} +1 -1
  124. package/dist/assets/{item-lCXo2qau.js → item-B_RGzu57.js} +1 -1
  125. package/dist/assets/{javascript-Dpm5asP_.js → javascript-G_Ki5rLs.js} +1 -1
  126. package/dist/assets/{jsonMode-C1BoXm9W.js → jsonMode-CgCjEry4.js} +1 -1
  127. package/dist/assets/{liquid-DPLK1AAV.js → liquid-8Y_Hjzxa.js} +1 -1
  128. package/dist/assets/{list-header-C68bt277.js → list-header-BgLs_nU8.js} +1 -1
  129. package/dist/assets/{lock.svg-CvsvGAq6.js → lock.svg-DKwAmrmM.js} +1 -1
  130. package/dist/assets/{log-DvrNFWSu.js → log-SquOXmP7.js} +1 -1
  131. package/dist/assets/{lottie-react.esm-OxE6_tus.js → lottie-react.esm-B4tYA9FY.js} +1 -1
  132. package/dist/assets/{mdx-3eKvkGDE.js → mdx-CejS69kk.js} +1 -1
  133. package/dist/assets/{memory-CA11HykX.js → memory-Cuur0WuU.js} +1 -1
  134. package/dist/assets/{metric-DmeCDHRO.js → metric-D7ZLfEZL.js} +1 -1
  135. package/dist/assets/omit-B6Em65Pi.js +1 -0
  136. package/dist/assets/{overview-Ccocwg3J.js → overview-Dit0jZd_.js} +1 -1
  137. package/dist/assets/{permission-B-96KXQR.js → permission-DCAf_gW3.js} +1 -1
  138. package/dist/assets/{preference-D8eTwplp.js → preference-USV6ZnpJ.js} +3 -3
  139. package/dist/assets/{python-OBbKDfQA.js → python-9xl8LFOF.js} +1 -1
  140. package/dist/assets/{raf-schd.esm-Y4eP19zD.js → raf-schd.esm-DOQwQgek.js} +1 -1
  141. package/dist/assets/{razor-CtidL9Xi.js → razor-Bh3jB7rP.js} +1 -1
  142. package/dist/assets/{rotate-session-key-BxXPHSLd.js → rotate-session-key-C0GGERLw.js} +1 -1
  143. package/dist/assets/{runtime-Dcq9x2vY.js → runtime-a63NycI4.js} +1 -1
  144. package/dist/assets/schema-DILw2ZhE.js +1 -0
  145. package/dist/assets/sdk-CrF6oAGx.js +1 -0
  146. package/dist/assets/{service-SNwwJvI1.js → service-p6Kz-Ebl.js} +1 -1
  147. package/dist/assets/{shorten-label-Rku853mZ.js → shorten-label-ByAddcRT.js} +1 -1
  148. package/dist/assets/{simple-select-D-ySkAbw.js → simple-select-54E6Mx7r.js} +1 -1
  149. package/dist/assets/{spaces-BltTDIy4.js → spaces-D11mVhTA.js} +1 -1
  150. package/dist/assets/{status-vKMdrOM1.js → status-BOrqQCOU.js} +1 -1
  151. package/dist/assets/{status-CeJnlK1J.js → status-DN8224TB.js} +1 -1
  152. package/dist/assets/{switch-control-C_8dVEZN.js → switch-control-DIsd4bYh.js} +1 -1
  153. package/dist/assets/{table-icons-rcNxsEUa.js → table-icons-DE8O65AZ.js} +1 -1
  154. package/dist/assets/{team-Bz9weh46.js → team-D5YTqCCQ.js} +1 -1
  155. package/dist/assets/{toLower-Cg3LtCaI.js → toLower-BLHPf6nS.js} +1 -1
  156. package/dist/assets/toUpper-BO6HuJgG.js +1 -0
  157. package/dist/assets/{traffic-0lJHbFOR.js → traffic-D2tJoibq.js} +1 -1
  158. package/dist/assets/{tsMode-CU1vw8A1.js → tsMode-BP4eh0TA.js} +1 -1
  159. package/dist/assets/{typescript-A4RDRVZM.js → typescript-CO8UB8Ph.js} +1 -1
  160. package/dist/assets/{url-evaluation-D_cqsSRO.js → url-evaluation-CRBdYFML.js} +1 -1
  161. package/dist/assets/{url-join-CI8YXAz9.js → url-join-D0OB7xve.js} +1 -1
  162. package/dist/assets/{use-mobile-DzC9s-qv.js → use-mobile-CplJbK7t.js} +1 -1
  163. package/dist/assets/{use-mobile-BW2lFrSI.js → use-mobile-ENQw9KmE.js} +1 -1
  164. package/dist/assets/{useAsync-wJrllzXI.js → useAsync-ng0xVRWA.js} +1 -1
  165. package/dist/assets/{useAsyncRetry-JUvvbo59.js → useAsyncRetry-DQznqjsq.js} +1 -1
  166. package/dist/assets/{useLocalStorage-C-HC7dIw.js → useLocalStorage-BfHKsdtC.js} +1 -1
  167. package/dist/assets/{useThemeProps-xP0TFqAL.js → useThemeProps-BqRQljgd.js} +1 -1
  168. package/dist/assets/{util-DilHH-kW.js → util-BrkrFgTY.js} +1 -1
  169. package/dist/assets/{wait-container-0kquAukH.js → wait-container-CaFqAYZl.js} +1 -1
  170. package/dist/assets/{without-wallet-DRpZoYCR.js → without-wallet-DT7YhPXQ.js} +1 -1
  171. package/dist/assets/wrap-locale-BucbsnFR.js +1 -0
  172. package/dist/assets/{xml-C21FWWuV.js → xml-sQyE-LAY.js} +1 -1
  173. package/dist/assets/{yaml-Bw6oRx8U.js → yaml-DVrLI7b8.js} +1 -1
  174. package/dist/index.html +1 -1
  175. package/dist/service-worker.js +1 -1
  176. package/package.json +1 -1
  177. package/dist/assets/ArrowDropDown-CQnQ9y90.js +0 -1
  178. package/dist/assets/api-2w3ONNYp.js +0 -1
  179. package/dist/assets/cloneDeep-ClEOqAIj.js +0 -1
  180. package/dist/assets/emotion-cache.browser.esm-CHE9Rgf-.js +0 -1
  181. package/dist/assets/engine-V2gGW1_S.js +0 -1
  182. package/dist/assets/getValidReactChildren-2xps4qz5.js +0 -1
  183. package/dist/assets/index-ChGhj4bz.js +0 -1
  184. package/dist/assets/omit-DyDj32t1.js +0 -1
  185. package/dist/assets/schema-B9mRrKya.js +0 -1
  186. package/dist/assets/sdk-COh1FZhu.js +0 -1
  187. package/dist/assets/toUpper-RY2q0HbV.js +0 -1
  188. package/dist/assets/wrap-locale-CEzbOAhF.js +0 -1
@@ -1 +1 @@
1
- import{u as f,j as s,C as d,A as w,ax as v,cr as C,cs as u,ae as j,aH as I,K as P,bx as S}from"./index-BfokqgHy.js";import{I as E}from"./invitation-BKHc6hH4.js";import{g as R}from"./get-safe-url-D_h8kBns.js";import"./index-T0ij7gEZ.js";import"./index-C4kLAKHD.js";import"./emotion-cache.browser.esm-CHE9Rgf-.js";import"./sdk-COh1FZhu.js";import"./wrap-locale-CEzbOAhF.js";import"./index-CcbY3K1e.js";function T(n){const{searchParams:a}=new URL(window.location.href),g=w(),{api:i,session:r}=v(),{info:l}=f(),c=a.get("redirect"),p=a.get("id"),o=C(async()=>{if(!p)return null;const{data:t}=await i.get("/api/invitation",{params:{inviteId:p,mode:"issue-passport"}});return t}),m=u(()=>{if(o.error)throw o.error;return o?.data}),x=u(async(t,h=e=>e)=>{t&&(t.sessionToken&&j(h(t.sessionToken)),await r.refresh()),setTimeout(()=>{if(c){const e=decodeURIComponent(c);e.startsWith(I.WELLKNOWN_SERVICE_PATH_PREFIX)?g(e,{replace:!0}):window.location.href=R(e)}else window.location.href=window.env.pathPrefix||"/"},50)});return o.loading?s.jsx(d,{}):s.jsx(P,{className:"page-invite",sx:{width:"100vw",height:"100%",minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#f6f8fa",overflow:"auto",padding:"20px"},children:s.jsx(E,{...n,action:"issue-passport",getDataFn:m,createPassportSvg:t=>S(t,l),checkFn:i.get,onLoginSuccess:x,passportColor:"default",onLogin:r.login})})}function b(){return f().loading?s.jsx(d,{}):s.jsx(T,{})}export{b as default};
1
+ import{u as f,j as s,C as d,A as w,ax as v,cr as C,cs as u,ae as j,aH as I,K as P,bx as S}from"./index-Dzuc8iT3.js";import{I as E}from"./invitation-DYBpGYHd.js";import{g as R}from"./get-safe-url-GLo4lMcu.js";import"./index-CY7IUyTQ.js";import"./index-RiT8KfYO.js";import"./emotion-cache.browser.esm-B4PDkYd9.js";import"./sdk-CrF6oAGx.js";import"./wrap-locale-BucbsnFR.js";import"./index-BdCFcn5n.js";function T(n){const{searchParams:a}=new URL(window.location.href),g=w(),{api:i,session:r}=v(),{info:l}=f(),c=a.get("redirect"),p=a.get("id"),o=C(async()=>{if(!p)return null;const{data:t}=await i.get("/api/invitation",{params:{inviteId:p,mode:"issue-passport"}});return t}),m=u(()=>{if(o.error)throw o.error;return o?.data}),x=u(async(t,h=e=>e)=>{t&&(t.sessionToken&&j(h(t.sessionToken)),await r.refresh()),setTimeout(()=>{if(c){const e=decodeURIComponent(c);e.startsWith(I.WELLKNOWN_SERVICE_PATH_PREFIX)?g(e,{replace:!0}):window.location.href=R(e)}else window.location.href=window.env.pathPrefix||"/"},50)});return o.loading?s.jsx(d,{}):s.jsx(P,{className:"page-invite",sx:{width:"100vw",height:"100%",minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#f6f8fa",overflow:"auto",padding:"20px"},children:s.jsx(E,{...n,action:"issue-passport",getDataFn:m,createPassportSvg:t=>S(t,l),checkFn:i.get,onLoginSuccess:x,passportColor:"default",onLogin:r.login})})}function b(){return f().loading?s.jsx(d,{}):s.jsx(T,{})}export{b as default};
@@ -1,4 +1,4 @@
1
- import{bY as Ge,bX as Ke,r as h,bZ as Fe,j as e,b8 as ee,b$ as $e,cc as J,c0 as Ye,bV as He,ce as qe,aF as he,M as q,bn as A,cr as Ce,H as B,X as V,bf as E,fB as we,aQ as Be,b as N,iO as Ve,V as D,gD as Qe,o as m,x as Xe,aw as De,y as fe,ak as Ze,p as Je,C as L,T as j,k as et,s as tt,f as ot,iP as X,hZ as Z,iQ as st,K as S,aV as G,aH as T,L as nt,g as H,dj as at,ay as Se,Q as F,aE as $,a8 as Y,a4 as rt,dG as it,gt as ct,a$ as lt,v as pe,w as dt,G as be,Y as Ee,bz as xe,B as pt}from"./index-BfokqgHy.js";import{T as ut}from"./html-title-BGLe2_e3.js";import{u as U}from"./blocklet-Dr_LK1Q2.js";import{u as mt}from"./use-mobile-BW2lFrSI.js";import{c as Ie,d as ft,e as xt,f as gt,g as ue,h as ht,b as St,u as yt,C as bt,D as kt,a as jt}from"./connect-to-CQ8x9XUb.js";import"./index-DIAjkldX.js";import"./index-BojVbZw0.js";import"./api-2w3ONNYp.js";import{d as Ct,a as wt,g as Bt,i as Dt,e as ge,f as Et,h as It,j as Tt}from"./spaces-BltTDIy4.js";import{v as Rt}from"./index-Bq1Ow9Ag.js";import{E as zt}from"./index-DoFlCh-O.js";import{H as vt}from"./HelpOutline-kYF98cPy.js";import{H as Pt}from"./index-CnHjhHdP.js";import{x as At}from"./index-DRYJ0xIl.js";import{c as Lt}from"./actions-DHHW8Ne9.js";import{D as Ut}from"./DeleteOutline-BVyycjCe.js";import{g as ke}from"./get-safe-url-D_h8kBns.js";import{S as Ot}from"./switch-control-C_8dVEZN.js";import{L as je}from"./list-header-C68bt277.js";import"./OpenInNew-Cs4iLXNI.js";import"./ButtonGroup-Dh6lYgZM.js";import"./getValidReactChildren-2xps4qz5.js";import"./FilterList-Cid-oBR0.js";import"./CSSTransition-BfkQpTwd.js";import"./emotion-cache.browser.esm-CHE9Rgf-.js";import"./index-DTOWo4jq.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-Dxl6Fkos.js";import"./index-zI6sbIgD.js";import"./TableSearch-CuYawmb9.js";import"./Search-DVAqIV8y.js";import"./Clear-G8IA_JS7.js";import"./MoreVert-YC-2RtuS.js";import"./useLocalStorage-C-HC7dIw.js";import"./url-evaluation-D_cqsSRO.js";import"./permission-B-96KXQR.js";import"./Switch-7IuDphWe.js";function Mt(t){return Ge("MuiIcon",t)}Ke("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Nt=t=>{const{color:o,fontSize:n,classes:s}=t,r={root:["root",o!=="inherit"&&`color${J(o)}`,`fontSize${J(n)}`]};return Ye(r,Mt,s)},_t=ee("span",{name:"MuiIcon",slot:"Root",overridesResolver:(t,o)=>{const{ownerState:n}=t;return[o.root,n.color!=="inherit"&&o[`color${J(n.color)}`],o[`fontSize${J(n.fontSize)}`]]}})(He(({theme:t})=>({userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,variants:[{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:t.typography.pxToRem(20)}},{props:{fontSize:"medium"},style:{fontSize:t.typography.pxToRem(24)}},{props:{fontSize:"large"},style:{fontSize:t.typography.pxToRem(36)}},{props:{color:"action"},style:{color:(t.vars||t).palette.action.active}},{props:{color:"disabled"},style:{color:(t.vars||t).palette.action.disabled}},{props:{color:"inherit"},style:{color:void 0}},...Object.entries(t.palette).filter(qe()).map(([o])=>({props:{color:o},style:{color:(t.vars||t).palette[o].main}}))]}))),ye=h.forwardRef(function(o,n){const s=Fe({props:o,name:"MuiIcon"}),{baseClassName:r="material-icons",className:a,color:c="inherit",component:i="span",fontSize:d="medium",...l}=s,p={...s,baseClassName:r,color:c,component:i,fontSize:d},f=Nt(p);return e.jsx(_t,{as:i,className:$e(r,"notranslate",f.root,a),ownerState:p,"aria-hidden":!0,ref:n,...l})});ye.muiName="Icon";const Wt=he(e.jsx("path",{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"})),Gt=he(e.jsx("path",{d:"M14.69 2.21 4.33 11.49c-.64.58-.28 1.65.58 1.73L13 14l-4.85 6.76c-.22.31-.19.74.08 1.01.3.3.77.31 1.08.02l10.36-9.28c.64-.58.28-1.65-.58-1.73L11 10l4.85-6.76c.22-.31.19-.74-.08-1.01-.3-.3-.77-.31-1.08-.02"})),Kt=he(e.jsx("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}));async function Ft({blockletDid:t,nodeApi:o,spaceGateways:n}){let s=!1;const r=await Promise.all(n.map(async a=>{let{name:c}=a;const i=await Ct(a.endpoint);return!q(i)&&i!==c&&(c=i,s=!0),{...a,name:c}}));return s&&await Promise.all(r.filter(a=>a.did).map(a=>o.updateBlockletSpaceGateway({input:{did:t,where:{did:a.did},spaceGateway:{...a}}}))),r}function $t({refresh:t}={}){const{blocklet:o}=U(),n=o?.meta?.did,{api:s}=A();return Ce(async()=>{if(!n)return[];const{spaceGateways:r}=await s.getBlockletSpaceGateways({input:{did:n}});return await Ft({blockletDid:n,nodeApi:s,spaceGateways:r})??[]},{refreshDeps:[n,t],onError(r){r?.message?.includes("not logged")?console.warn(r):(console.error(r),B.error(V(r)))}})}function Te({deps:t,setLoading:o,backupDate:n}={deps:[],setLoading:()=>{},backupDate:new Date}){const{blocklet:s}=U(),[r,a]=h.useState([]),{api:c}=A(),[i,d]=h.useMemo(()=>n?[E(n).startOf("day").toISOString(),E(n).endOf("day").toISOString()]:[E().startOf("year").toISOString(),E().endOf("day").toISOString()],[n]),l=we(async()=>{try{if(o(!0),!s){a([]);return}const{backups:p}=await c.getBlockletBackups({input:{did:s.meta.did,startTime:i,endTime:d}});a(p??[])}catch(p){console.error(p),B.error(V(p))}finally{o(!1)}},1e3);return Be(async()=>{l()},[s?.meta?.did].concat(t)),{backups:r}}function Yt({appDid:t}){const{backups:o}=Te(),[n,s]=h.useState({message:"",progress:0,completed:!1}),r=A(),{ws:{useSubscription:a}}=r;return a(N.BlockletEvents.backupProgress,c=>{t===c?.appDid&&s(()=>({...c}))},[t]),h.useEffect(()=>{if(o?.length&&Ve(o[0]?.status)){const[c]=o;s(()=>({message:c.message,progress:c.progress,completed:c.progress>=100}))}},[o]),n}function Ht({deps:t=[],setLoading:o=()=>{}}={}){const{blocklet:n}=U(),[s,r]=h.useState([]),{api:a}=A(),c=h.useCallback(we(async()=>{if(!a||!n?.meta?.did){r([]);return}try{o(!0);const i=E(),d=i.subtract(1,"year"),{summary:l}=await a.getBlockletBackupSummary({input:{did:n.meta.did,startTime:d.toISOString(),endTime:i.toISOString()}});r(Array.isArray(l)?l:[])}catch(i){console.error("Failed to fetch backup summary:",i),B.error(V(i)),r([])}finally{o(!1)}},1e3),[]);return Be(async()=>(await c(),()=>{c.cancel()}),[n?.meta?.did].concat(t)),{backupSummary:s}}const Re=h.createContext({}),{Provider:qt,Consumer:Ho}=Re;function ze({children:t}){const{t:o}=D(),{api:n}=A(),{blocklet:s}=U(),[r,a]=h.useState(null),[c,i]=h.useState(!1),{data:d,loading:l,mutate:p}=$t({refresh:c}),f=Qe(d),x=Yt({appDid:s?.appDid}),u=h.useMemo(()=>wt(s?.environments),[s?.environments]),[k,w]=h.useState(!1),[y,b]=h.useState(0),{backups:te}=Te({deps:[y,r],setLoading:w,backupDate:r}),[oe,se]=h.useState(0),{backupSummary:ne}=Ht({deps:[oe]}),[_,M]=h.useState(d?.find(g=>g.endpoint===u)),I=s?.settings?.autoBackup,z=()=>{i(g=>!g)},ae=()=>{se(g=>g+1)},re=()=>{b(g=>g+1)},K=async g=>{await n.updateAutoBackup({input:{did:s.meta.did,autoBackup:g}})},Q=async()=>{await n.abortBlockletBackup({input:{appPid:s.meta.did}})},ie=async(g,P)=>{try{p(R=>{const v=[...R];return v.push({...g,loading:!0}),v}),await n.addBlockletSpaceGateway({input:{did:s.meta.did,spaceGateway:g}}),u!==P&&await n.configBlocklet({input:{did:[s.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:P}]}}),M(g),z(),B.success(o("storage.spaces.connectedWithName",{name:g?.name??"DID Spaces"}))}catch(R){throw console.error(R),p(v=>[...v].filter(W=>W.did!==g.did)),R}},ce=async g=>{g&&(g.endpoint===u&&(await n.configBlocklet({input:{did:[s.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:""}]}}),I?.enabled&&await K({enabled:!1})),await n.deleteBlockletSpaceGateway({input:{did:s.meta.did,spaceGatewayDid:g?.did}}),p(P=>{const R=[...P];return R.splice(R.indexOf(g),1),R}),M(g),z())},le=async g=>{await Promise.all([n.updateBlockletSpaceGateway({input:{did:s.meta.did,where:{did:g.did},spaceGateway:g}}),u!==g.endpoint&&n.configBlocklet({input:{did:[s.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:g.endpoint}]}})]),B.success(o("storage.spaces.connectedWithName",{name:g?.name??"DID Spaces"})),z()},C=g=>g?.endpoint===u;return e.jsx(qt,{value:{spaceGateways:d||[],selectedSpaceGateway:_,addSpaceGateway:ie,deleteSpaceGateway:ce,updateSpaceGateway:le,refreshSpaceGateways:z,spaceGatewaysLoading:l,spaceGatewaysFirstLoading:f,spaceGatewayIsSelected:C,updateAutoBackup:K,abortBlockletBackup:Q,backupEndpoint:u,backupProgress:x,backups:te,backupSummary:ne,refreshBackupSummary:ae,refreshBackups:re,setBackupDate:a,backupsLoading:k,autoBackup:I},children:t})}ze.propTypes={children:m.any.isRequired};function O(){return h.useContext(Re)}function ve({...t}){const{blocklet:o}=U(),{info:n}=A(),{t:s}=D(),r=Ie({blocklet:o}),a=Xe(n),{spaceGateways:c,addSpaceGateway:i}=O(),d={checkFn:De.create({baseURL:fe(window.location.origin,Ze())}).get,webWalletUrl:a,extraParams:{appPid:o.appPid,appDid:r.appDid,appName:r.appName,appDescription:r.appDescription,appUrl:r.appUrl,referrer:r.referrer,scopes:r.scopes,nodeDid:n.did}},l=async({endpoint:f,name:x,did:u})=>{const k=await Bt(f);if(!await Dt(k)){B.error(s("storage.spaces.gateway.add.invalidUrl"));return}if(c.some(b=>b.endpoint===f)){B.error(s("storage.spaces.gateway.add.duplicate",{name:x}));return}await i({name:x,did:u,url:k,endpoint:f},f)},p=async({spaceGateway:f})=>{try{await l(f)}catch(x){console.error(x),B.error(V(x))}};return e.jsx(ft,{...t,connectScope:"app",options:d,onSuccess:p})}function Vt(){const{api:t}=A(),{blocklet:o}=U(),{data:n,loading:s}=Ce(()=>t.getBlocklet({input:{did:o?.meta?.did,attachDiskInfo:!0,attachRuntimeInfo:!0}}),{ready:!!o?.meta?.did,refreshDeps:[o?.meta?.did]});return{blocklet:n?.blocklet??null,loading:s}}function Pe({...t}){const{t:o}=h.useContext(Je),{blocklet:n,loading:s}=Vt();if(n?.diskInfo){const r=(i,d,l)=>e.jsxs(j,{children:[i," ",e.jsx("strong",{children:d?et(d):"empty"})]}),a=n.environments.reduce((i,d)=>(i[d.key]=d.value,i),{}),c=[{key:"appDir",name:o("blocklet.diskInfo.appDir"),value:r(a.BLOCKLET_APP_DIR,n.diskInfo.app)},{key:"dataDir",name:o("blocklet.diskInfo.dataDir"),value:r(a.BLOCKLET_DATA_DIR,n.diskInfo.data)},{key:"logDir",name:o("blocklet.diskInfo.logDir"),value:r(a.BLOCKLET_LOG_DIR,n.diskInfo.log)},{key:"cacheDir",name:o("blocklet.diskInfo.cacheDir"),value:r(a.BLOCKLET_CACHE_DIR,n.diskInfo.cache)}];return e.jsx(Qt,{component:"div",...t,children:c.map(i=>e.jsx(Rt,{valueComponent:"div",nameWidth:120,name:i.name,children:i.value},i.key))})}return s?e.jsx(L,{}):e.jsx(j,{children:o("blocklet.diskInfo.empty")})}const Qt=tt(j)``;function Ae(){const{t}=D(),{setBackupDate:o,backupSummary:n}=O(),s=xt({key:"lg"}),r=h.useRef(null),a=ot(),c=h.useCallback(l=>{o(l)},[o]),i=h.useMemo(()=>{const l=E().add(1,"day"),p=l.subtract(1,"year"),f=new Map(n.map(u=>[u.date,{date:u.date,successCount:u.successCount,errorCount:u.errorCount}])),x=[];for(let u=p.clone();E(u).isBefore(l);u=u.add(1,"day")){const k=u.format("YYYY-MM-DD");x.push(f.get(k)||{date:k,successCount:0,errorCount:0})}return x},[n]),d=h.useMemo(()=>({grid:{containLabel:!0,right:10,top:30,bottom:12},tooltip:{formatter:k=>{const{date:w,successCount:y,errorCount:b}=i[k.dataIndex]||{date:k.data[0],successCount:0,errorCount:0};return[`<div>${t("common.time")}: ${w}</div>`,`<div>${t("common.succeeded")}: ${y}</div>`,`<div>${t("common.failed")}: ${b}</div>`].join(`
1
+ import{bY as Ge,bX as Ke,r as h,bZ as Fe,j as e,b8 as ee,b$ as $e,cc as J,c0 as Ye,bV as He,ce as qe,aF as he,M as q,bn as A,cr as Ce,H as B,X as V,bf as E,fB as we,aQ as Be,b as N,iO as Ve,V as D,gD as Qe,o as m,x as Xe,aw as De,y as fe,ak as Ze,p as Je,C as L,T as j,k as et,s as tt,f as ot,iP as X,hZ as Z,iQ as st,K as S,aV as G,aH as T,L as nt,g as H,dj as at,ay as Se,Q as F,aE as $,a8 as Y,a4 as rt,dG as it,gt as ct,a$ as lt,v as pe,w as dt,G as be,Y as Ee,bz as xe,B as pt}from"./index-Dzuc8iT3.js";import{T as ut}from"./html-title-3cSvLxbM.js";import{u as U}from"./blocklet-DAH77r3I.js";import{u as mt}from"./use-mobile-ENQw9KmE.js";import{c as Ie,d as ft,e as xt,f as gt,g as ue,h as ht,b as St,u as yt,C as bt,D as kt,a as jt}from"./connect-to-BBdZysbI.js";import"./index-BCXR4Ftk.js";import"./index-BojVbZw0.js";import"./api-CFN0QrWp.js";import{d as Ct,a as wt,g as Bt,i as Dt,e as ge,f as Et,h as It,j as Tt}from"./spaces-D11mVhTA.js";import{v as Rt}from"./index-BTeQyE9h.js";import{E as zt}from"./index-B4qKQt-w.js";import{H as vt}from"./HelpOutline-DTDV8qzL.js";import{H as Pt}from"./index-BGo2ji7B.js";import{x as At}from"./index-DRYJ0xIl.js";import{c as Lt}from"./actions-CQRwSERj.js";import{D as Ut}from"./DeleteOutline-CoQ7wmqT.js";import{g as ke}from"./get-safe-url-GLo4lMcu.js";import{S as Ot}from"./switch-control-DIsd4bYh.js";import{L as je}from"./list-header-BgLs_nU8.js";import"./OpenInNew-Izq7Bt-3.js";import"./ButtonGroup-BAvFNy2i.js";import"./getValidReactChildren-DmUPqavH.js";import"./FilterList-B1C7unqT.js";import"./CSSTransition-YK8aX8nK.js";import"./emotion-cache.browser.esm-B4PDkYd9.js";import"./index-V6W4s-Vq.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-BKRl_wlt.js";import"./index-CdTvqOME.js";import"./TableSearch-U9rZfIzu.js";import"./Search-DYBL-x4y.js";import"./Clear-4n0vKAse.js";import"./MoreVert-B909vYzl.js";import"./useLocalStorage-BfHKsdtC.js";import"./url-evaluation-CRBdYFML.js";import"./permission-DCAf_gW3.js";import"./Switch-Bb-rNPtt.js";function Mt(t){return Ge("MuiIcon",t)}Ke("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Nt=t=>{const{color:o,fontSize:n,classes:s}=t,r={root:["root",o!=="inherit"&&`color${J(o)}`,`fontSize${J(n)}`]};return Ye(r,Mt,s)},_t=ee("span",{name:"MuiIcon",slot:"Root",overridesResolver:(t,o)=>{const{ownerState:n}=t;return[o.root,n.color!=="inherit"&&o[`color${J(n.color)}`],o[`fontSize${J(n.fontSize)}`]]}})(He(({theme:t})=>({userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,variants:[{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:t.typography.pxToRem(20)}},{props:{fontSize:"medium"},style:{fontSize:t.typography.pxToRem(24)}},{props:{fontSize:"large"},style:{fontSize:t.typography.pxToRem(36)}},{props:{color:"action"},style:{color:(t.vars||t).palette.action.active}},{props:{color:"disabled"},style:{color:(t.vars||t).palette.action.disabled}},{props:{color:"inherit"},style:{color:void 0}},...Object.entries(t.palette).filter(qe()).map(([o])=>({props:{color:o},style:{color:(t.vars||t).palette[o].main}}))]}))),ye=h.forwardRef(function(o,n){const s=Fe({props:o,name:"MuiIcon"}),{baseClassName:r="material-icons",className:a,color:c="inherit",component:i="span",fontSize:d="medium",...l}=s,p={...s,baseClassName:r,color:c,component:i,fontSize:d},f=Nt(p);return e.jsx(_t,{as:i,className:$e(r,"notranslate",f.root,a),ownerState:p,"aria-hidden":!0,ref:n,...l})});ye.muiName="Icon";const Wt=he(e.jsx("path",{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"})),Gt=he(e.jsx("path",{d:"M14.69 2.21 4.33 11.49c-.64.58-.28 1.65.58 1.73L13 14l-4.85 6.76c-.22.31-.19.74.08 1.01.3.3.77.31 1.08.02l10.36-9.28c.64-.58.28-1.65-.58-1.73L11 10l4.85-6.76c.22-.31.19-.74-.08-1.01-.3-.3-.77-.31-1.08-.02"})),Kt=he(e.jsx("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}));async function Ft({blockletDid:t,nodeApi:o,spaceGateways:n}){let s=!1;const r=await Promise.all(n.map(async a=>{let{name:c}=a;const i=await Ct(a.endpoint);return!q(i)&&i!==c&&(c=i,s=!0),{...a,name:c}}));return s&&await Promise.all(r.filter(a=>a.did).map(a=>o.updateBlockletSpaceGateway({input:{did:t,where:{did:a.did},spaceGateway:{...a}}}))),r}function $t({refresh:t}={}){const{blocklet:o}=U(),n=o?.meta?.did,{api:s}=A();return Ce(async()=>{if(!n)return[];const{spaceGateways:r}=await s.getBlockletSpaceGateways({input:{did:n}});return await Ft({blockletDid:n,nodeApi:s,spaceGateways:r})??[]},{refreshDeps:[n,t],onError(r){r?.message?.includes("not logged")?console.warn(r):(console.error(r),B.error(V(r)))}})}function Te({deps:t,setLoading:o,backupDate:n}={deps:[],setLoading:()=>{},backupDate:new Date}){const{blocklet:s}=U(),[r,a]=h.useState([]),{api:c}=A(),[i,d]=h.useMemo(()=>n?[E(n).startOf("day").toISOString(),E(n).endOf("day").toISOString()]:[E().startOf("year").toISOString(),E().endOf("day").toISOString()],[n]),l=we(async()=>{try{if(o(!0),!s){a([]);return}const{backups:p}=await c.getBlockletBackups({input:{did:s.meta.did,startTime:i,endTime:d}});a(p??[])}catch(p){console.error(p),B.error(V(p))}finally{o(!1)}},1e3);return Be(async()=>{l()},[s?.meta?.did].concat(t)),{backups:r}}function Yt({appDid:t}){const{backups:o}=Te(),[n,s]=h.useState({message:"",progress:0,completed:!1}),r=A(),{ws:{useSubscription:a}}=r;return a(N.BlockletEvents.backupProgress,c=>{t===c?.appDid&&s(()=>({...c}))},[t]),h.useEffect(()=>{if(o?.length&&Ve(o[0]?.status)){const[c]=o;s(()=>({message:c.message,progress:c.progress,completed:c.progress>=100}))}},[o]),n}function Ht({deps:t=[],setLoading:o=()=>{}}={}){const{blocklet:n}=U(),[s,r]=h.useState([]),{api:a}=A(),c=h.useCallback(we(async()=>{if(!a||!n?.meta?.did){r([]);return}try{o(!0);const i=E(),d=i.subtract(1,"year"),{summary:l}=await a.getBlockletBackupSummary({input:{did:n.meta.did,startTime:d.toISOString(),endTime:i.toISOString()}});r(Array.isArray(l)?l:[])}catch(i){console.error("Failed to fetch backup summary:",i),B.error(V(i)),r([])}finally{o(!1)}},1e3),[]);return Be(async()=>(await c(),()=>{c.cancel()}),[n?.meta?.did].concat(t)),{backupSummary:s}}const Re=h.createContext({}),{Provider:qt,Consumer:Ho}=Re;function ze({children:t}){const{t:o}=D(),{api:n}=A(),{blocklet:s}=U(),[r,a]=h.useState(null),[c,i]=h.useState(!1),{data:d,loading:l,mutate:p}=$t({refresh:c}),f=Qe(d),x=Yt({appDid:s?.appDid}),u=h.useMemo(()=>wt(s?.environments),[s?.environments]),[k,w]=h.useState(!1),[y,b]=h.useState(0),{backups:te}=Te({deps:[y,r],setLoading:w,backupDate:r}),[oe,se]=h.useState(0),{backupSummary:ne}=Ht({deps:[oe]}),[_,M]=h.useState(d?.find(g=>g.endpoint===u)),I=s?.settings?.autoBackup,z=()=>{i(g=>!g)},ae=()=>{se(g=>g+1)},re=()=>{b(g=>g+1)},K=async g=>{await n.updateAutoBackup({input:{did:s.meta.did,autoBackup:g}})},Q=async()=>{await n.abortBlockletBackup({input:{appPid:s.meta.did}})},ie=async(g,P)=>{try{p(R=>{const v=[...R];return v.push({...g,loading:!0}),v}),await n.addBlockletSpaceGateway({input:{did:s.meta.did,spaceGateway:g}}),u!==P&&await n.configBlocklet({input:{did:[s.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:P}]}}),M(g),z(),B.success(o("storage.spaces.connectedWithName",{name:g?.name??"DID Spaces"}))}catch(R){throw console.error(R),p(v=>[...v].filter(W=>W.did!==g.did)),R}},ce=async g=>{g&&(g.endpoint===u&&(await n.configBlocklet({input:{did:[s.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:""}]}}),I?.enabled&&await K({enabled:!1})),await n.deleteBlockletSpaceGateway({input:{did:s.meta.did,spaceGatewayDid:g?.did}}),p(P=>{const R=[...P];return R.splice(R.indexOf(g),1),R}),M(g),z())},le=async g=>{await Promise.all([n.updateBlockletSpaceGateway({input:{did:s.meta.did,where:{did:g.did},spaceGateway:g}}),u!==g.endpoint&&n.configBlocklet({input:{did:[s.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:g.endpoint}]}})]),B.success(o("storage.spaces.connectedWithName",{name:g?.name??"DID Spaces"})),z()},C=g=>g?.endpoint===u;return e.jsx(qt,{value:{spaceGateways:d||[],selectedSpaceGateway:_,addSpaceGateway:ie,deleteSpaceGateway:ce,updateSpaceGateway:le,refreshSpaceGateways:z,spaceGatewaysLoading:l,spaceGatewaysFirstLoading:f,spaceGatewayIsSelected:C,updateAutoBackup:K,abortBlockletBackup:Q,backupEndpoint:u,backupProgress:x,backups:te,backupSummary:ne,refreshBackupSummary:ae,refreshBackups:re,setBackupDate:a,backupsLoading:k,autoBackup:I},children:t})}ze.propTypes={children:m.any.isRequired};function O(){return h.useContext(Re)}function ve({...t}){const{blocklet:o}=U(),{info:n}=A(),{t:s}=D(),r=Ie({blocklet:o}),a=Xe(n),{spaceGateways:c,addSpaceGateway:i}=O(),d={checkFn:De.create({baseURL:fe(window.location.origin,Ze())}).get,webWalletUrl:a,extraParams:{appPid:o.appPid,appDid:r.appDid,appName:r.appName,appDescription:r.appDescription,appUrl:r.appUrl,referrer:r.referrer,scopes:r.scopes,nodeDid:n.did}},l=async({endpoint:f,name:x,did:u})=>{const k=await Bt(f);if(!await Dt(k)){B.error(s("storage.spaces.gateway.add.invalidUrl"));return}if(c.some(b=>b.endpoint===f)){B.error(s("storage.spaces.gateway.add.duplicate",{name:x}));return}await i({name:x,did:u,url:k,endpoint:f},f)},p=async({spaceGateway:f})=>{try{await l(f)}catch(x){console.error(x),B.error(V(x))}};return e.jsx(ft,{...t,connectScope:"app",options:d,onSuccess:p})}function Vt(){const{api:t}=A(),{blocklet:o}=U(),{data:n,loading:s}=Ce(()=>t.getBlocklet({input:{did:o?.meta?.did,attachDiskInfo:!0,attachRuntimeInfo:!0}}),{ready:!!o?.meta?.did,refreshDeps:[o?.meta?.did]});return{blocklet:n?.blocklet??null,loading:s}}function Pe({...t}){const{t:o}=h.useContext(Je),{blocklet:n,loading:s}=Vt();if(n?.diskInfo){const r=(i,d,l)=>e.jsxs(j,{children:[i," ",e.jsx("strong",{children:d?et(d):"empty"})]}),a=n.environments.reduce((i,d)=>(i[d.key]=d.value,i),{}),c=[{key:"appDir",name:o("blocklet.diskInfo.appDir"),value:r(a.BLOCKLET_APP_DIR,n.diskInfo.app)},{key:"dataDir",name:o("blocklet.diskInfo.dataDir"),value:r(a.BLOCKLET_DATA_DIR,n.diskInfo.data)},{key:"logDir",name:o("blocklet.diskInfo.logDir"),value:r(a.BLOCKLET_LOG_DIR,n.diskInfo.log)},{key:"cacheDir",name:o("blocklet.diskInfo.cacheDir"),value:r(a.BLOCKLET_CACHE_DIR,n.diskInfo.cache)}];return e.jsx(Qt,{component:"div",...t,children:c.map(i=>e.jsx(Rt,{valueComponent:"div",nameWidth:120,name:i.name,children:i.value},i.key))})}return s?e.jsx(L,{}):e.jsx(j,{children:o("blocklet.diskInfo.empty")})}const Qt=tt(j)``;function Ae(){const{t}=D(),{setBackupDate:o,backupSummary:n}=O(),s=xt({key:"lg"}),r=h.useRef(null),a=ot(),c=h.useCallback(l=>{o(l)},[o]),i=h.useMemo(()=>{const l=E().add(1,"day"),p=l.subtract(1,"year"),f=new Map(n.map(u=>[u.date,{date:u.date,successCount:u.successCount,errorCount:u.errorCount}])),x=[];for(let u=p.clone();E(u).isBefore(l);u=u.add(1,"day")){const k=u.format("YYYY-MM-DD");x.push(f.get(k)||{date:k,successCount:0,errorCount:0})}return x},[n]),d=h.useMemo(()=>({grid:{containLabel:!0,right:10,top:30,bottom:12},tooltip:{formatter:k=>{const{date:w,successCount:y,errorCount:b}=i[k.dataIndex]||{date:k.data[0],successCount:0,errorCount:0};return[`<div>${t("common.time")}: ${w}</div>`,`<div>${t("common.succeeded")}: ${y}</div>`,`<div>${t("common.failed")}: ${b}</div>`].join(`
2
2
  `)},backgroundColor:a.palette.background.paper,borderColor:a.palette.divider,textStyle:{color:a.palette.text.primary,fontSize:14},extraCssText:`box-shadow: ${a.shadows[2]}; border-radius: 4px;`,padding:[8,10]},visualMap:{show:!1,min:-12,max:12,pieces:[{min:Number.MIN_SAFE_INTEGER,max:-9,color:X[600]},{min:-9,max:-6,color:X[500]},{min:-6,max:-3,color:X[400]},{min:-3,max:-1,color:X[300]},{min:0,max:0,color:a.palette.grey[200]},{min:1,max:3,color:Z[300]},{min:3,max:6,color:Z[400]},{min:6,max:9,color:Z[500]},{min:9,max:Number.MAX_SAFE_INTEGER,color:Z[600]}],orient:"horizontal",left:"center",bottom:12,itemWidth:12,itemHeight:12,textStyle:{color:a.palette.text.secondary,fontSize:12}},calendar:{top:30,left:50,right:10,bottom:4,cellSize:[8,8],splitLine:{show:!1},itemStyle:{borderWidth:2,borderColor:a.palette.background.default,color:a.palette.background.default},dayLabel:{show:!0,firstDay:0,nameMap:["","Mon","","Wed","","Fri",""],position:"start",margin:4,fontSize:10,color:a.palette.text.primary,fontWeight:"400",width:20},monthLabel:{show:!0,nameMap:"cn",align:"left",color:a.palette.text.primary,fontWeight:"400",fontSize:12,position:"start",margin:4,width:30,padding:[0,2]},yearLabel:{show:!1},range:[E().subtract(11,"month").startOf("month").format("YYYY-MM-DD"),E().endOf("month").format("YYYY-MM-DD")],orient:"horizontal"},series:{type:"heatmap",coordinateSystem:"calendar",data:i.map(k=>[k.date,k.errorCount?-k.errorCount:k.successCount]),label:{show:!1},itemStyle:{borderWidth:2,borderColor:a.palette.background.default,borderRadius:4},emphasis:{itemStyle:{borderWidth:2,borderColor:st[200],color:"inherit"}}}}),[i,t,a]);return e.jsxs(e.Fragment,{children:[e.jsx(S,{ref:r,sx:{maxWidth:"1280px",border:"1px solid",borderColor:"divider",padding:"8px",overflowX:"auto"},children:e.jsx(S,{sx:{width:"1200px",height:"180px",position:"relative"},children:e.jsx(zt,{option:d,style:{height:"100%",width:"100%"},notMerge:!0,lazyUpdate:!1,opts:{renderer:"canvas"},onEvents:{click:l=>{l.componentType==="series"&&l.data&&c(l.data[0])}}})})}),e.jsx(S,{sx:{display:"flex",justifyContent:"flex-end",mt:1,mr:s?2:5,mb:2},children:e.jsxs(G,{direction:s?"column":"row",spacing:s?2:1,sx:{width:"100%",justifyContent:"flex-start",alignItems:s?"flex-start":"center"},children:[e.jsxs(G,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[e.jsx(S,{sx:{width:32,height:12,borderRadius:.5,background:"linear-gradient(90deg, #8B5000 0%, #A36200 33%, #C17700 66%, #E29000 100%)"}}),e.jsx(j,{variant:"body2",sx:{color:"text.secondary"},children:t("storage.spaces.backup.failed")})]}),e.jsxs(G,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[e.jsx(S,{sx:{width:32,height:12,borderRadius:.5,bgcolor:"grey.200",border:"1px solid",borderColor:"grey.200"}}),e.jsx(j,{variant:"body2",sx:{color:"text.secondary"},children:t("storage.spaces.backup.without")})]}),e.jsxs(G,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[e.jsx(S,{sx:{width:32,height:12,borderRadius:.5,background:"linear-gradient(90deg, #9be9a8 0%, #40c463 33%, #30a14e 66%, #216e39 100%)"}}),e.jsx(j,{variant:"body2",sx:{color:"text.secondary"},children:t("storage.spaces.backup.succeeded")})]})]})})]})}const Xt=ee(({className:t,...o})=>e.jsx(Se,{...o,classes:{popper:t}}))(()=>({".MuiTooltip-tooltip":{backgroundColor:"transparent",padding:0,margin:0,boxShadow:"none",maxWidth:"none"},".MuiTooltip-arrow":{color:"rgba(230, 235, 245, 1)"}}));function Le({status:t,message:o="",createdAt:n}){const{t:s}=D(),r=t===T.BACKUPS.STATUS.PROGRESS&&E().diff(n,"hours")>=T.BACKUPS.TIMEOUT_HOURS,a=r&&s("common.timeoutError"),c=t===T.BACKUPS.STATUS.PROGRESS&&!r,i=t===T.BACKUPS.STATUS.SUCCEEDED&&!r;return c?e.jsxs(j,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},children:[e.jsx(L,{sx:{marginRight:"4px"},size:"12px"}),s("common.progress")]}):i?e.jsx(H,{type:"success",children:s("common.succeeded")}):e.jsxs(S,{sx:{display:"inline-flex",alignItems:"center"},children:[e.jsx(H,{type:"error",children:s("common.failed")}),e.jsx(Se,{style:{display:"flex",alignItems:"center",flexShrink:0},title:o||a,children:e.jsx(ye,{children:e.jsx(vt,{style:{width:"24px",height:"24px"},color:"error"})})})]})}Le.propTypes={status:m.string.isRequired,message:m.string,createdAt:m.string.isRequired};function Ue({metadata:t={}}){const{t:o}=D();if(q(t))return e.jsx(H,{type:"success",children:o("common.succeeded")});const n=t.count||0,s=t.size||0,r=At(s,{iec:!0}),a=e.jsxs(S,{sx:{p:1,borderRadius:1,boxShadow:2,color:"black",backgroundColor:"white"},children:[e.jsxs(j,{variant:"body2",children:[o("common.fileCount"),": ",n]}),e.jsxs(j,{variant:"body2",children:[o("common.fileSize"),": ",r]})]});return e.jsxs(S,{sx:{display:"inline-flex",alignItems:"center"},children:[e.jsx(H,{type:"success",children:o("common.succeeded")}),e.jsx(Xt,{title:a,style:{display:"flex",alignItems:"center",flexShrink:0},placement:"left",children:e.jsx(ye,{children:e.jsx(at,{style:{width:"24px",height:"24px"},color:"primary"})})})]})}Ue.propTypes={metadata:m.object};function Oe(){const{t,locale:o}=D(),{spaceGateways:n,backups:s,backupsLoading:r}=O(),a=h.useMemo(()=>[{label:"DID Space",name:"target",options:{customBodyRenderLite:i=>{const{targetUrl:d,targetName:l,status:p,createdAt:f}=s[i],x=p===T.BACKUPS.STATUS.PROGRESS&&E().diff(f,"hours")>=T.BACKUPS.TIMEOUT_HOURS,u=p===T.BACKUPS.STATUS.SUCCEEDED&&!x,k=l||n.find(w=>d?.includes(ge(w?.endpoint)))?.name||"Unknown DID Space";return u?e.jsx(nt,{href:d,target:"_blank",sx:{fontSize:"16px"},children:k}):e.jsx(j,{variant:"body1",sx:{fontSize:"16px"},children:k})}}},{label:t("common.strategy"),name:"strategy",options:{customBodyRender:i=>{const d=t(i===0?"common.auto":"common.manual");return e.jsx(H,{children:d})}}},{label:t("common.startTime"),name:"createdAt",options:{customBodyRender:i=>E(i).format("YYYY-MM-DD HH:mm:ss")}},{label:t("common.endTime"),name:"updatedAt",options:{customBodyRender:i=>q(i)?"":E(i).format("YYYY-MM-DD HH:mm:ss")}},{label:t("common.status"),name:"status",options:{customBodyRenderLite:i=>{const d=s?.[i]??{},{status:l,message:p,createdAt:f,metadata:x}=d,u=l===T.BACKUPS.STATUS.PROGRESS&&E().diff(f,"hours")>=T.BACKUPS.TIMEOUT_HOURS,k=l===T.BACKUPS.STATUS.PROGRESS&&!u,w=l===T.BACKUPS.STATUS.SUCCEEDED&&!u;return k?e.jsxs(j,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},children:[e.jsx(L,{sx:{marginRight:"4px"},size:"12px"}),t("common.progress")]}):w?e.jsx(Ue,{metadata:x}):e.jsx(Le,{status:l,message:p,createdAt:f})}}}],[s,n,t]),c=h.useMemo(()=>!s?.length,[s]);return e.jsx(e.Fragment,{children:c?e.jsx(S,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100px",color:"#9397A1",marginTop:"16px",marginBottom:"24px"},children:t("storage.spaces.record.emptyData")}):e.jsx(Pt,{title:"",loading:r,data:s,columns:a,emptyNode:t("storage.spaces.record.emptyData",o),options:{download:!1,filter:!1,print:!1,search:!1,viewColumns:!1}})})}function Zt(){const{t}=D();return e.jsxs(S,{children:[e.jsxs(S,{sx:{display:"flex",gap:3,flexDirection:{xs:"column",md:"row"}},children:[e.jsxs(S,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",minWidth:240},children:[e.jsx(gt,{style:{cursor:"pointer",width:"150px",height:"100%",maxHeight:160}}),e.jsx(j,{sx:{my:2,textAlign:"center",color:"text.secondary"},children:t("storage.spaces.connect.provider")}),e.jsx(ve,{})]}),e.jsxs(S,{sx:{flexGrow:1,minWidth:0},children:[e.jsx(S,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:t("storage.spaces.backup.records")})}),e.jsx(Ae,{})]})]}),e.jsx(Oe,{sx:{marginTop:"24px"}}),e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold",mb:2,mt:2},children:t("common.dataStorage")}),e.jsx(Pe,{})]})}function Me({spaceGateway:t,onConfirm:o=()=>{},onCancel:n=()=>{}}){const{t:s}=D(),[r,a]=h.useState(!1),[c,i]=h.useState(!1),d=(f,x)=>{f?.preventDefault(),f?.stopPropagation(),a(x)},l=async f=>{try{f?.stopPropagation(),i(!0),await o?.(t),a(!1)}catch(x){console.error(x),B.error(`${s("storage.space.gateway.delete.failed")}: ${V(x)}`)}finally{a(!1),i(!1)}},p=f=>{d(f,!1),n?.(f)};return e.jsxs(e.Fragment,{children:[e.jsxs(F,{color:"red",onClick:f=>d(f,!0),children:[e.jsx($,{style:{minWidth:24,color:"red"},children:e.jsx(Ut,{fontSize:"small"})}),e.jsx(Y,{style:{color:"red"},children:s("common.disconnect")})]}),e.jsx(rt,{title:s("storage.spaces.gateway.delete.title"),open:r,confirmButton:{text:s("common.confirm"),props:{size:"small",variant:"contained",color:"error",loading:c}},cancelButton:{text:s("common.cancel"),props:{size:"small",variant:"outlined",disabled:c}},onConfirm:l,onCancel:p,children:e.jsx(j,{sx:{wordWrap:"break-word"},children:s("storage.spaces.gateway.delete.descForBackup",{name:`${t?.name}`})})})]})}Me.propTypes={spaceGateway:m.shape({name:m.string.isRequired,url:m.string.isRequired,protected:m.bool}).isRequired,onConfirm:m.func,onCancel:m.func};function Ne({spaceGateway:t,selected:o,onDelete:n=()=>{},onConnect:s=()=>{},enableSwitchToSpace:r=!0,backupInProgress:a=!1,...c}){const{abortBlockletBackup:i}=O(),[d,l]=h.useState(null),{t:p}=D(),[f,x]=h.useState(!1),u=(y,b)=>{y.stopPropagation(),y.preventDefault(),l(b&&y.currentTarget)},k=async y=>{try{x(!0),u(y,!1),await s(t)}catch(b){console.error(b),B.error(b.message)}finally{x(!1)}},w=async y=>{try{x(!0),u(y,!1),await i()}catch(b){console.error(b),B.error(b.message)}finally{x(!1)}};return e.jsxs(e.Fragment,{children:[f||t?.loading?e.jsx(L,{sx:{ml:1},size:"24px"}):e.jsx(it,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",variant:"outlined",size:"small",onClick:y=>u(y,!0),...c,children:e.jsx(ct,{})}),e.jsxs(lt,{id:"simple-menu",anchorEl:d,keepMounted:!0,open:!!d,onClose:y=>u(y,!1),children:[e.jsxs(F,{onClick:y=>{u(y,!1),window.open(ke(t.endpoint?Et(t.endpoint):t.url,{allowDomains:null}))},children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Wt,{fontSize:"small"})}),e.jsx(Y,{children:p("common.open")})]}),e.jsxs(F,{onClick:y=>{u(y,!1),window.open(ke(It(t.endpoint),{allowDomains:null}))},children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Kt,{fontSize:"small"})}),e.jsx(Y,{children:p("storage.spaces.strategy.viewBackupFiles")})]}),!o&&r&&e.jsxs(F,{onClick:k,children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Gt,{fontSize:"small"})}),e.jsx(Y,{children:p("storage.spaces.connect.switchToSpace")})]}),a&&e.jsxs(F,{onClick:w,children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Lt,{fontSize:"small"})}),e.jsx(Y,{children:p("storage.spaces.connect.abortBlockletBackup")})]}),!a&&e.jsx(Me,{spaceGateway:t,onConfirm:async()=>{l(null),await n?.(t)},onCancel:()=>l(null)})]})]})}Ne.propTypes={spaceGateway:m.shape({name:m.string.isRequired,url:m.string.isRequired,protected:m.bool,endpoint:m.string.isRequired,loading:m.bool}).isRequired,selected:m.bool.isRequired,enableSwitchToSpace:m.bool,onDelete:m.func,onConnect:m.func,backupInProgress:m.bool};const Jt=ee(({className:t,...o})=>e.jsx(Se,{...o,classes:{popper:t}}))(()=>({".MuiTooltip-tooltip":{backgroundColor:"transparent",padding:0,margin:0,boxShadow:"none",maxWidth:"none"},".MuiTooltip-arrow":{color:"rgba(230, 235, 245, 1)"}}));function _e({spaceGateway:t,spaceStatus:o,selected:n,onConnected:s=()=>{},onDeleted:r=()=>{},onBackedUp:a=()=>{}}){const{t:c,locale:i}=D(),{blocklet:d}=U(),{api:l,info:{did:p}}=A(),{appDid:f,appName:x,appDescription:u,scopes:k,appUrl:w,referrer:y}=Ie({blocklet:d}),{backupProgress:b,updateSpaceGateway:te,deleteSpaceGateway:oe,refreshBackupSummary:se,refreshBackups:ne}=O(),[_,M]=h.useState(!1),[I,z]=h.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:c("storage.spaces.authorize.title",{appName:x},i),scan:c("storage.spaces.authorize.scan",{appName:x},i),confirm:"",success:e.jsx(j,{gutterBottom:!0,children:c("storage.spaces.authorize.success")})},onClose:()=>{z(C=>({...C,open:!1}))}}),ae=n&&!_&&o===ue.DISCONNECTED,re=n&&!_&&!t.loading&&o===ue.CONNECTED,K=n&&_&&o===ue.CONNECTED&&b?.progress>=0,Q=async()=>{try{if(await Tt(t?.endpoint)){await l.configBlocklet({input:{did:[d.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t.endpoint}]}}),B.success(c("storage.spaces.connect.switchToSpaceSucceeded",{name:t.name?`(${t.name})`:""})),s?.(null,t);return}}catch(C){console.error(C),s?.(C,t);return}z(C=>({...C,open:!0,prefix:fe(t.url,"space/api/did"),baseUrl:new URL(t.url).origin,checkFn:De.create({baseURL:fe(t.url,"space")}).get,extraParams:{appDid:f,appName:x,appDescription:u,scopes:k,appUrl:w,referrer:y,nodeDid:p,spaceDid:t.did}}))},ie=async(C,g)=>{const P=g(C.endpoint),R=ge(P),v=C.space?g(C.space):{};if(t.did&&R!==t.did){z(We=>({...We,open:!1}));const W=c("storage.spaces.gateway.switch.failedForMismatchSpace",{name:v?.name?v.name:""});B.error(W),s?.(new Error(W),t);return}const de={...t,name:v.name??"DID Space",did:v.did??ge(P),endpoint:P};await te(de),z(W=>({...W,open:!1})),s?.(null,de)},ce=async()=>{try{if(_)return;M(!0),await l.backupBlocklet({input:{appDid:d.appDid,to:"spaces"}})}catch(C){console.error(C),B.error(C.message),a?.(C,t)}finally{M(!0)}},le=async()=>{try{await oe(t),B.success(c("storage.spaces.gateway.delete.succeeded",{name:t.name?`(${t.name})`:""})),r?.(null,t)}catch(C){console.error(C),r?.(C,t)}};return h.useEffect(()=>{b?.completed?(n&&(b?.progress===100?(B.success(c("storage.spaces.backupSuccessfully")),a?.(null,t)):b.message&&a?.(new Error(b?.message),t),b.progress=0,b.message=""),M(!1),se(),ne()):b.progress&&M(!0)},[b]),e.jsxs(e.Fragment,{children:[e.jsxs(S,{sx:{display:"flex",alignItems:"center",".action-btn":{borderRadius:1,marginLeft:1}},children:[re&&e.jsx(pe,{className:"action-btn",variant:"outlined",size:"small",onClick:ce,children:c("storage.spaces.strategy.backupNow")}),ae&&e.jsx(pe,{className:"action-btn",variant:"outlined",size:"small",onClick:Q,children:c("storage.spaces.disconnected.reconnectNow")}),K&&e.jsx(Jt,{title:b?.message&&e.jsx(S,{sx:{p:1,borderRadius:1,boxShadow:2,color:"black",backgroundColor:"white"},children:e.jsx(j,{variant:"body2",children:b.message})}),children:e.jsxs(pe,{className:"action-btn",variant:"outlined",size:"small",sx:{minWidth:70},children:[e.jsx(L,{variant:"determinate",value:b?.progress,size:14,sx:{mr:1}}),b?.progress,"%"]})}),e.jsx(dt,{forceConnected:!1,saveConnect:!1,prefix:I.prefix,open:I.open,popup:!0,action:I.action,baseUrl:I.baseUrl,checkFn:I.checkFn,onSuccess:ie,onClose:I.onClose,checkTimeout:I.checkTimeout,extraParams:I.extraParams,messages:I.messages,locale:i},"get-endpoint")]}),e.jsx(Ne,{sx:{minWidth:32,padding:"2px 4px",ml:1},spaceGateway:t,selected:n,onDelete:le,onConnect:Q,enableSwitchToSpace:b?.completed||q(b?.message),backupInProgress:K})]})}_e.propTypes={spaceGateway:m.shape({did:m.string.isRequired,name:m.string.isRequired,url:m.string.isRequired,endpoint:m.string.isRequired,protected:m.bool,loading:m.bool}).isRequired,spaceStatus:m.string.isRequired,selected:m.bool.isRequired,onConnected:m.func,onDeleted:m.func,onBackedUp:m.func};function eo({...t}){const{t:o}=D();return e.jsxs(S,{...t,children:[e.jsx(S,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:o("storage.spaces.backup.records")})}),e.jsx(Ae,{}),e.jsx(Oe,{})]})}function to({...t}){const{t:o}=D(),{autoBackup:n,updateAutoBackup:s}=O(),r=async()=>{try{const a=!n?.enabled;await s({enabled:a}),B.success(o(a?"storage.spaces.autoBackup.enabled":"storage.spaces.autoBackup.disabled"))}catch(a){B.error(a.message)}};return e.jsx(Ot,{checked:!!n?.enabled,onChange:r,name:"enableWelcomePage",labelProps:{label:e.jsx(j,{sx:{marginRight:"8px"},children:e.jsx("span",{children:o("storage.spaces.autoBackup.title")})})},style:{...t.style}})}function oo(){const{t}=D(),{spaceGateways:o,spaceGatewaysLoading:n,spaceGatewayIsSelected:s}=O(),r=n&&!o?.length,a=({spaceGateway:c,spaceStatus:i,selected:d,refresh:l})=>e.jsx(_e,{spaceGateway:c,spaceStatus:i,selected:d,onConnected:()=>l(),onBackedUp:p=>p&&l()});return e.jsxs(S,{sx:{display:"flex",flexDirection:"column"},children:[e.jsxs(S,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},gap:{xs:1,md:2},justifyContent:{xs:"center",md:"flex-start"},alignItems:{xs:"flex-start",md:"center"}},children:[e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold",flexGrow:1},children:t("storage.spaces.connected.title")}),e.jsx(to,{}),e.jsx(ve,{})]}),e.jsx(S,{sx:{mt:2},children:r?e.jsx(S,{sx:{display:"flex",justifyContent:"center"},children:e.jsx(L,{})}):e.jsx(be,{container:!0,spacing:2,children:e.jsx(e.Fragment,{children:o.map(c=>e.jsx(be,{size:{xs:12,md:6},children:e.jsx(ht,{endpoint:c.endpoint,selected:s(c),action:a},c.endpoint)},c.endpoint))})})}),e.jsx(eo,{sx:{marginTop:"24px"}}),e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold",mb:2},children:t("common.dataStorage")}),e.jsx(Pe,{})]})}function so(){const{spaceGatewaysFirstLoading:t,spaceGateways:o}=O();return t?e.jsx(Ee,{relative:"parent",children:e.jsx(L,{})}):q(o)?e.jsx(Zt,{}):e.jsx(oo,{})}function no(){return e.jsx(ze,{children:e.jsx(so,{})})}function ao(){const{spaceGateway:t,settingStorageEndpoint:o,updateSpaceGateway:n,hasStorageEndpoint:s,loading:r,storageEndpoint:a}=yt(),c=xe(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"16px"}));return r?e.jsx(Ee,{relative:"parent",children:e.jsx(L,{})}):e.jsxs(S,{sx:{maxWidth:"md",position:"relative"},children:[s?e.jsx(bt,{spaceGateway:t,settingStorageEndpoint:o}):e.jsx(kt,{}),e.jsx(S,{sx:c,children:e.jsx(jt,{onConnect:n,storageEndpoint:a})})]})}function ro(){const{t}=D();return e.jsxs(St,{children:[e.jsxs(G,{spacing:1,sx:{marginBottom:2},children:[e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:t("storage.appLevel.title")}),e.jsx(j,{sx:{color:"text.secondary"},children:t("storage.appLevel.description")})]}),e.jsx(ao,{})]})}function io({navOrientation:t="vertical",...o}){const{t:n,locale:s}=D(),{blocklet:r}=U(),a=mt({key:"md"}),[c,i]=pt(),d=c.get("tab")||"backup",l=a?"horizontal":t,p=xe(()=>{const w=[{label:n("common.backup"),value:"backup"}],y=r?.capabilities?.didSpace;return(y===N.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||y===N.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP)&&w.push({label:n("common.storage"),value:"storage"}),w},[s,l]),x=xe(()=>({backup:e.jsx(no,{}),storage:e.jsx(ro,{})}))[d],u=w=>{i(y=>(w==="backup"?y.delete("tab"):y.set("tab",w),y))};if(p.length<=1)return e.jsx(me,{children:x});const k=e.jsx(ut,{tabs:p,current:d,orientation:l,onChange:u,sx:[{borderRight:1,height:"100%",borderColor:"divider"},l==="horizontal"&&{borderRight:0}]});if(l==="vertical")return e.jsx(S,{...o,children:e.jsxs(G,{direction:{md:"column",lg:"row"},sx:{gap:2},children:[e.jsx(S,{sx:{flexShrink:0},children:e.jsx(je,{left:k})}),e.jsx(S,{sx:{flexGrow:1,minWidth:0},children:e.jsx(me,{sx:{mt:1},children:x})})]})});if(l==="horizontal")return e.jsxs(S,{...o,children:[e.jsx(je,{left:k}),e.jsx(me,{sx:{mt:2},children:x})]})}io.propTypes={navOrientation:m.oneOf(["vertical","horizontal"])};const me=ee(S)`
3
3
  position: relative;
4
4
  min-height: 66vh;
@@ -1 +1 @@
1
- import{r as P,V as E,A as C,j as e,Y as W,C as j,cC as I,K as T,w as k,H as u,aH as S,u as U,x as v,aq as N,ae as R}from"./index-BfokqgHy.js";import{w as b}from"./wrap-locale-CEzbOAhF.js";import{g as L}from"./get-safe-url-D_h8kBns.js";import"./index-CcbY3K1e.js";function H({SessionContext:n,webWalletUrl:a,onSuccess:r}){const{api:o,session:t}=P.useContext(n),{t:s,locale:g}=E(),h=C(),{searchParams:l}=new URL(window.location.href),p=l.get("redirect"),m=async(c,w)=>{r(c,w),await t.refresh(),u.success(s("exchangePassport.success")),setTimeout(()=>{if(p){const i=decodeURIComponent(p);i.startsWith(S.WELLKNOWN_SERVICE_PATH_PREFIX)?h(i,{replace:!0}):window.location.href=L(i)}else window.location.href=window.env.pathPrefix||window.env.apiPrefix||"/"},3e3)},f=c=>{u.error(c.message)},d={},x=l.get("componentId");return x&&(d.componentId=x),t.loading?e.jsx(W,{children:e.jsx(j,{})}):e.jsx(I,{did:window?.blocklet?.appPid||window?.env?.appPid,children:e.jsx(T,{sx:{maxWidth:"100%",height:"100%"},children:e.jsx(k,{popup:!0,open:!0,className:"connect",action:"exchange-passport",checkFn:o.get,checkTimeout:10*60*1e3,webWalletUrl:a,onSuccess:m,onError:f,locale:g,messages:{title:s("exchangePassport.dialog.title"),scan:s("exchangePassport.dialog.scan"),confirm:s("exchangePassport.dialog.confirm"),success:s("exchangePassport.dialog.success")},extraParams:d,extraContent:null,hideCloseButton:!0})})})}const K=b(H);function V(){const{info:n}=U(),a=v(n),r=(o,t)=>{o.sessionToken&&R(t(o.sessionToken))};return e.jsx(K,{SessionContext:N,webWalletUrl:a,onSuccess:r})}export{V as default};
1
+ import{r as P,V as E,A as C,j as e,Y as W,C as j,cC as I,K as T,w as k,H as u,aH as S,u as U,x as v,aq as N,ae as R}from"./index-Dzuc8iT3.js";import{w as b}from"./wrap-locale-BucbsnFR.js";import{g as L}from"./get-safe-url-GLo4lMcu.js";import"./index-BdCFcn5n.js";function H({SessionContext:n,webWalletUrl:a,onSuccess:r}){const{api:o,session:t}=P.useContext(n),{t:s,locale:g}=E(),h=C(),{searchParams:l}=new URL(window.location.href),p=l.get("redirect"),m=async(c,w)=>{r(c,w),await t.refresh(),u.success(s("exchangePassport.success")),setTimeout(()=>{if(p){const i=decodeURIComponent(p);i.startsWith(S.WELLKNOWN_SERVICE_PATH_PREFIX)?h(i,{replace:!0}):window.location.href=L(i)}else window.location.href=window.env.pathPrefix||window.env.apiPrefix||"/"},3e3)},f=c=>{u.error(c.message)},d={},x=l.get("componentId");return x&&(d.componentId=x),t.loading?e.jsx(W,{children:e.jsx(j,{})}):e.jsx(I,{did:window?.blocklet?.appPid||window?.env?.appPid,children:e.jsx(T,{sx:{maxWidth:"100%",height:"100%"},children:e.jsx(k,{popup:!0,open:!0,className:"connect",action:"exchange-passport",checkFn:o.get,checkTimeout:10*60*1e3,webWalletUrl:a,onSuccess:m,onError:f,locale:g,messages:{title:s("exchangePassport.dialog.title"),scan:s("exchangePassport.dialog.scan"),confirm:s("exchangePassport.dialog.confirm"),success:s("exchangePassport.dialog.success")},extraParams:d,extraContent:null,hideCloseButton:!0})})})}const K=b(H);function V(){const{info:n}=U(),a=v(n),r=(o,t)=>{o.sessionToken&&R(t(o.sessionToken))};return e.jsx(K,{SessionContext:N,webWalletUrl:a,onSuccess:r})}export{V as default};
@@ -1,4 +1,4 @@
1
- import{bd as c}from"./index-BfokqgHy.js";var n={exports:{}};/*!
1
+ import{bd as c}from"./index-Dzuc8iT3.js";var n={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 +1 @@
1
- import{co as x,r as n,p as g,cp as r,B as u,j as s,K as m,cq as d}from"./index-BfokqgHy.js";function P(){const i=x(),{blocklets:c,refresh:p}=i,{t:l}=n.useContext(g),y=r.generateKey(),[a]=u();return n.useEffect(()=>{const o=r.getNotificationQueryParams(y)??{},t=a.get("entityId"),e=a.get("severity"),f={...o,...e?{severity:e==="all"?[]:e.split(","),paging:{...o.paging,page:1}}:{},...t?{entityId:t==="all"?[]:t.split(",")}:{},componentDid:[]};p(f)},[]),s.jsxs(m,{children:[s.jsx("h1",{children:l("notification.title")}),s.jsx(d,{tabType:"line",blocklets:c,context:i,filterType:"entity",type:"server"})]})}export{P as default};
1
+ import{co as x,r as n,p as g,cp as r,B as u,j as s,K as m,cq as d}from"./index-Dzuc8iT3.js";function P(){const i=x(),{blocklets:c,refresh:p}=i,{t:l}=n.useContext(g),y=r.generateKey(),[a]=u();return n.useEffect(()=>{const o=r.getNotificationQueryParams(y)??{},t=a.get("entityId"),e=a.get("severity"),f={...o,...e?{severity:e==="all"?[]:e.split(","),paging:{...o.paging,page:1}}:{},...t?{entityId:t==="all"?[]:t.split(",")}:{},componentDid:[]};p(f)},[]),s.jsxs(m,{children:[s.jsx("h1",{children:l("notification.title")}),s.jsx(d,{tabType:"line",blocklets:c,context:i,filterType:"entity",type:"server"})]})}export{P as default};
@@ -1,4 +1,4 @@
1
- import{aF as de,j as e,hh as Ts,hi as Es,bM as Is,r as q,s as xe,K as $,f3 as kt,t as U,eM as ft,a3 as ae,C as Ee,bi as zt,dJ as Ds,o as T,hj as Ls,b2 as Ht,cx as qs,cQ as Ms,dm as Bs,T as Y,dE as it,bn as ne,bA as mt,p as ue,hk as zs,bB as pt,b as W,bg as G,dG as ee,H as Z,aV as ie,V as oe,n as Nt,q as Hs,w as Ft,ac as Ns,i as Zt,gd as Fs,hl as Zs,at as Vs,aU as X,R as Te,$ as ke,D as Us,U as Ws,v as re,X as at,hm as Js,hn as Ks,ey as Gs,eA as Ys,F as je,aH as J,g1 as Xs,cY as St,W as Qs,fl as Vt,ay as te,aR as Ct,ho as er,f7 as Re,cs as E,bz as ge,aD as se,O as Q,aP as ye,hp as qe,a1 as tr,hq as Je,c3 as Ce,eB as sr,hr as rr,dF as ce,f as Oe,y as Ut,bw as ot,M as nr,cE as Wt,gc as ir,gj as Ze,hs as ar,b9 as or,L as lr,cr as Be,aK as He,ht as cr,Q as dr,bp as ur,af as Rt,a2 as Jt,bj as Ne,hu as Kt,b6 as hr,gD as we,f8 as Gt,cW as Yt,B as fr,b5 as Ot,fa as mr,ff as pr,G as Ke,J as gr,bu as yr}from"./index-BfokqgHy.js";import{F as xr,a as lt,s as vr,L as _e,S as br,B as jr}from"./preference-D8eTwplp.js";import{N as $t}from"./ChevronRight-CqQwaL1d.js";import{T as Fe}from"./html-title-BGLe2_e3.js";import{w as Ie,P as _r}from"./permission-B-96KXQR.js";import{u as gt}from"./index-ChGhj4bz.js";import{D as wr}from"./Done-C3Xrj0cc.js";import{R as kr,S as M}from"./collapse-DXrrkJjt.js";import{A as Sr,a as At}from"./Autocomplete-DNyfxOFp.js";import{C as Cr,R as Rr,S as Or,P as $r}from"./rotate-session-key-BxXPHSLd.js";import{u as le}from"./blocklet-Dr_LK1Q2.js";import{C as Ar}from"./click-to-copy-PtCfJ87M.js";import{u as Ve}from"./team-Bz9weh46.js";import{v as Xt}from"./index-Bq1Ow9Ag.js";import{g as Pr}from"./chain-Dc18Nz_k.js";import{V as Tr,d as Er}from"./status-CeJnlK1J.js";import{S as pe}from"./Switch-7IuDphWe.js";import{B as Ir}from"./index-DfnCJwAx.js";import{y as Dr}from"./index-zI6sbIgD.js";import{I as Lr,J as qr,K as Mr,L as Br}from"./index-DTOWo4jq.js";import{u as ve,C as H,b as Pt}from"./index.esm-DzozubHa.js";import{S as ze,u as zr}from"./switch-control-C_8dVEZN.js";import{D as Tt,R as Qt,a as es}from"./url-evaluation-D_cqsSRO.js";import{A as Et}from"./Add-BqMKSndg.js";import{H as Ue}from"./index-CnHjhHdP.js";import{l as Hr}from"./index-BkVWAwPz.js";import{u as ts}from"./use-mobile-BW2lFrSI.js";import{S as Ge}from"./simple-select-D-ySkAbw.js";import{G as Nr}from"./actions-DHHW8Ne9.js";import{C as Fr}from"./CardContent-D50ZN2XJ.js";import"./omit-DyDj32t1.js";import"./index-YMUJi64L.js";import"./edit.svg-BBcWA2Yv.js";import"./ArrowDropDown-CQnQ9y90.js";import"./ButtonGroup-Dh6lYgZM.js";import"./getValidReactChildren-2xps4qz5.js";import"./index-Cq343AIm.js";import"./iframe-C807ybR2.js";import"./ListSubheader-XzhijlHC.js";import"./visuallyHidden-Dan1xhjv.js";import"./ErrorOutline-Da9J9PWf.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./FilterList-Cid-oBR0.js";import"./CSSTransition-BfkQpTwd.js";import"./emotion-cache.browser.esm-CHE9Rgf-.js";import"./depsEqual-Dxl6Fkos.js";import"./TableSearch-CuYawmb9.js";import"./Search-DVAqIV8y.js";import"./Clear-G8IA_JS7.js";import"./MoreVert-YC-2RtuS.js";import"./useLocalStorage-C-HC7dIw.js";import"./get-safe-url-D_h8kBns.js";const ss=de([e.jsx("path",{d:"M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.37-1-1.72M20 9v6h-7V9zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2z"},"0"),e.jsx("circle",{cx:"16",cy:"12",r:"1.5"},"1")]),Zr=de([e.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),e.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),Vr=de(e.jsx("path",{d:"M21 8V7l-3 2-3-2v1l3 2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2M8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3m6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1zm8-6h-8V6h8z"})),Ur=de(e.jsx("path",{d:"M24 9v2h-6V9zM8 4C5.79 4 4 5.79 4 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4m4.51-8.95C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95m4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17"})),Wr=de(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),Jr=de(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),ct=de(e.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z"})),Kr=de([e.jsx("path",{d:"M18 11c.7 0 1.37.1 2 .29V10c0-1.1-.9-2-2-2h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6.26c-.79-1.13-1.26-2.51-1.26-4 0-3.87 3.13-7 7-7M8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9z"},"0"),e.jsx("path",{d:"M18 13c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0 2c.83 0 1.5.67 1.5 1.5S18.83 18 18 18s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5m0 6c-1.03 0-1.94-.52-2.48-1.32.73-.42 1.57-.68 2.48-.68s1.75.26 2.48.68c-.54.8-1.45 1.32-2.48 1.32"},"1")]),Gr=de(e.jsx("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8z"})),Yr=de(e.jsx("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"})),rs=de(e.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 2m4.24 16L12 15.45 7.77 18l1.12-4.81-3.73-3.23 4.92-.42L12 5l1.92 4.53 4.92.42-3.73 3.23z"})),Xr=de(e.jsx("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"})),Qr=de(e.jsx("path",{d:"M16 13c3.09-2.81 6-5.44 6-7.7C22 3.45 20.55 2 18.7 2c-1.04 0-2.05.49-2.7 1.25C15.34 2.49 14.34 2 13.3 2 11.45 2 10 3.45 10 5.3c0 2.26 2.91 4.89 6 7.7m-2.7-9c.44 0 .89.21 1.18.55L16 6.34l1.52-1.79c.29-.34.74-.55 1.18-.55.74 0 1.3.56 1.3 1.3 0 1.12-2.04 3.17-4 4.99-1.96-1.82-4-3.88-4-4.99 0-.74.56-1.3 1.3-1.3M19 16h-2c0-1.2-.75-2.28-1.87-2.7L8.97 11H1v11h6v-1.44l7 1.94 8-2.5v-1c0-1.66-1.34-3-3-3M3 20v-7h2v7zm10.97.41L7 18.48V13h1.61l5.82 2.17c.34.13.57.46.57.83 0 0-1.99-.05-2.3-.15l-2.38-.79-.63 1.9 2.38.79c.51.17 1.04.26 1.58.26H19c.39 0 .74.23.9.56z"}));var en=Array.prototype,It=en.splice;function tn(v,R,O,C){var _=Es,j=-1,p=R.length,i=v;for(v===R&&(R=Ts(R));++j<p;)for(var m=0,f=R[j],h=f;(m=_(i,h,m))>-1;)i!==v&&It.call(i,m,1),It.call(v,m,1);return v}function sn(v,R){return v&&v.length&&R&&R.length?tn(v,R):v}var rn=Is(sn);const nn={width:24,height:24,body:'<path fill="currentColor" d="M4.975 15q-.425 0-.7-.288T4 14q0-.425.288-.713T5 13h14.025q.425 0 .7.288T20 14q0 .425-.288.713T19 15H4.975Zm0 4q-.425 0-.7-.288T4 18q0-.425.288-.713T5 17h14.025q.425 0 .7.288T20 18q0 .425-.288.713T19 19H4.975Zm0-8q-.425 0-.7-.288T4 10q0-.425.288-.713T5 9h14.025q.425 0 .7.288T20 10q0 .425-.288.713T19 11H4.975Zm0-4q-.425 0-.7-.288T4 6q0-.425.288-.713T5 5h14.025q.425 0 .7.288T20 6q0 .425-.288.713T19 7H4.975Z"/>'};function ns({label:v="",disabled:R=!1,required:O=!1,initialValue:C="",onChange:_=()=>{},style:j={},onSubmit:p=()=>{},triggers:i=[],options:m=[],formatterBeforeSubmit:f=n=>n.join(","),helperText:h="",placeholder:t="",renderImage:l=()=>null,renderLabel:o=()=>"",filterKeys:r=["name"],noEmpty:s=!1,...c}){const[n,a]=q.useState(!1),[u,g]=q.useState(!1),[y,k]=q.useState(""),w=q.useRef(null),[d,x]=q.useState(C),[b,S]=q.useState(d),A=q.useMemo(()=>{if(!m)return{};const z={};return m.forEach(I=>{z[I.code]=I}),z},[m]),P=()=>{if(!m)return[];if(!y)return m.map(I=>I.code);const z=new RegExp(y.toLowerCase());return m.filter(I=>{for(let B=0;B<r.length;B++){const F=r[B];if(z.test(I[F]?.toLowerCase()))return!0}return!1}).map(I=>I.code)},L=async()=>{g(!0);try{await p(typeof f=="function"?f(b):b)===!1?S(d):s&&!b.length?(S(C),x(C)):(S(b),x(b))}catch{S(d)}finally{g(!1),a(!1)}},D=(z,I)=>{if(!Array.isArray(I)){S([]),_([]);return}const B=I.filter(F=>A[F]);if(!B.length){S([]),_([]);return}S(B),_(B)},N=z=>{z.stopPropagation(),a(!0),setTimeout(()=>{if(w.current){const I=w.current.querySelector("input");I&&I.focus()}},500)},V=n?e.jsx(Sr,{ref:w,options:m,value:b,onChange:D,inputValue:y,onInputChange:(z,I)=>{k(I)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:P,getOptionLabel:z=>A[z]?.name,renderInput:z=>e.jsx(U,{...z,label:"",placeholder:t}),renderOption:(z,I)=>{const B=b.indexOf(I)!==-1;return q.createElement(an,{component:"li",...z,key:I},l(A[I]||{}),e.jsx($,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:B?"700":"normal"},children:o(I,A[I])||A[I]?.name}),e.jsx($,{component:kt,sx:{opacity:.5,width:18,height:18},style:{visibility:B?"visible":"hidden"}}))},...c,slots:{popper:on}}):e.jsx($,{className:"form-item-input slot",onClick:N,style:{whiteSpace:"pre-wrap",cursor:"text"},sx:{px:1},children:b.filter(z=>m.some(I=>I.code===z)).map(z=>e.jsx(ft,{label:m.find(I=>I.code===z).name,style:{marginRight:8},size:"small"},z))});return e.jsx(xr,{className:"form",style:j,children:e.jsxs($,{className:"form-item",children:[e.jsxs($,{className:"form-item-label",children:[v,O&&e.jsx(kr,{})]}),e.jsxs($,{className:"form-item-body",children:[e.jsx($,{className:"form-item-input",children:V}),n?e.jsx($,{className:"form-item-action",children:e.jsxs(e.Fragment,{children:[e.jsx(ae,{"data-cy":"schema-form-item-confirm",onClick:L,disabled:R||u,size:"large",children:u?e.jsx(Ee,{size:24}):e.jsx(wr,{})}),e.jsx(ae,{"data-cy":"schema-form-item-cancel",onClick:()=>{S(d),a(!1)},disabled:R||u,size:"large",children:e.jsx(kt,{})})]})}):null]}),n&&h&&e.jsx(zt,{children:h})]})})}ns.propTypes={style:T.object,onSubmit:T.func,onChange:T.func,label:T.string,initialValue:T.string,required:T.bool,disabled:T.bool,triggers:T.array,options:T.array,helperText:T.string,formatterBeforeSubmit:T.func,placeholder:T.string,renderImage:T.func,filterKeys:T.arrayOf(T.string),noEmpty:T.bool,renderLabel:T.func};const an=xe.div`
1
+ import{aF as de,j as e,hh as Ts,hi as Es,bM as Is,r as q,s as xe,K as $,f3 as kt,t as U,eM as ft,a3 as ae,C as Ee,bi as zt,dJ as Ds,o as T,hj as Ls,b2 as Ht,cx as qs,cQ as Ms,dm as Bs,T as Y,dE as it,bn as ne,bA as mt,p as ue,hk as zs,bB as pt,b as W,bg as G,dG as ee,H as Z,aV as ie,V as oe,n as Nt,q as Hs,w as Ft,ac as Ns,i as Zt,gd as Fs,hl as Zs,at as Vs,aU as X,R as Te,$ as ke,D as Us,U as Ws,v as re,X as at,hm as Js,hn as Ks,ey as Gs,eA as Ys,F as je,aH as J,g1 as Xs,cY as St,W as Qs,fl as Vt,ay as te,aR as Ct,ho as er,f7 as Re,cs as E,bz as ge,aD as se,O as Q,aP as ye,hp as qe,a1 as tr,hq as Je,c3 as Ce,eB as sr,hr as rr,dF as ce,f as Oe,y as Ut,bw as ot,M as nr,cE as Wt,gc as ir,gj as Ze,hs as ar,b9 as or,L as lr,cr as Be,aK as He,ht as cr,Q as dr,bp as ur,af as Rt,a2 as Jt,bj as Ne,hu as Kt,b6 as hr,gD as we,f8 as Gt,cW as Yt,B as fr,b5 as Ot,fa as mr,ff as pr,G as Ke,J as gr,bu as yr}from"./index-Dzuc8iT3.js";import{F as xr,a as lt,s as vr,L as _e,S as br,B as jr}from"./preference-USV6ZnpJ.js";import{N as $t}from"./ChevronRight-qIIkSnQ7.js";import{T as Fe}from"./html-title-3cSvLxbM.js";import{w as Ie,P as _r}from"./permission-DCAf_gW3.js";import{u as gt}from"./index-aNMEeMCp.js";import{D as wr}from"./Done-Cc4L9Foc.js";import{R as kr,S as M}from"./collapse-XOI3eY05.js";import{A as Sr,a as At}from"./Autocomplete-DB_xZW4q.js";import{C as Cr,R as Rr,S as Or,P as $r}from"./rotate-session-key-C0GGERLw.js";import{u as le}from"./blocklet-DAH77r3I.js";import{C as Ar}from"./click-to-copy-DUObPiIX.js";import{u as Ve}from"./team-D5YTqCCQ.js";import{v as Xt}from"./index-BTeQyE9h.js";import{g as Pr}from"./chain-Cx_Kwvvk.js";import{V as Tr,d as Er}from"./status-DN8224TB.js";import{S as pe}from"./Switch-Bb-rNPtt.js";import{B as Ir}from"./index-C8k-wIkI.js";import{y as Dr}from"./index-CdTvqOME.js";import{I as Lr,J as qr,K as Mr,L as Br}from"./index-V6W4s-Vq.js";import{u as ve,C as H,b as Pt}from"./index.esm-DfXlzNxJ.js";import{S as ze,u as zr}from"./switch-control-DIsd4bYh.js";import{D as Tt,R as Qt,a as es}from"./url-evaluation-CRBdYFML.js";import{A as Et}from"./Add-DaNU9Vkn.js";import{H as Ue}from"./index-BGo2ji7B.js";import{l as Hr}from"./index-kdOFyCzK.js";import{u as ts}from"./use-mobile-ENQw9KmE.js";import{S as Ge}from"./simple-select-54E6Mx7r.js";import{G as Nr}from"./actions-CQRwSERj.js";import{C as Fr}from"./CardContent-BCchlH2G.js";import"./omit-B6Em65Pi.js";import"./index-BUXGT_ps.js";import"./edit.svg-CTCbuAl5.js";import"./ArrowDropDown-DMPX6uVd.js";import"./ButtonGroup-BAvFNy2i.js";import"./getValidReactChildren-DmUPqavH.js";import"./index-DR4wKA9U.js";import"./iframe-b7qWsXni.js";import"./ListSubheader-Dtz-xi9-.js";import"./visuallyHidden-Dan1xhjv.js";import"./ErrorOutline-BzGlqq16.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./FilterList-B1C7unqT.js";import"./CSSTransition-YK8aX8nK.js";import"./emotion-cache.browser.esm-B4PDkYd9.js";import"./depsEqual-BKRl_wlt.js";import"./TableSearch-U9rZfIzu.js";import"./Search-DYBL-x4y.js";import"./Clear-4n0vKAse.js";import"./MoreVert-B909vYzl.js";import"./useLocalStorage-BfHKsdtC.js";import"./get-safe-url-GLo4lMcu.js";const ss=de([e.jsx("path",{d:"M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.37-1-1.72M20 9v6h-7V9zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2z"},"0"),e.jsx("circle",{cx:"16",cy:"12",r:"1.5"},"1")]),Zr=de([e.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),e.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),Vr=de(e.jsx("path",{d:"M21 8V7l-3 2-3-2v1l3 2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2M8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3m6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1zm8-6h-8V6h8z"})),Ur=de(e.jsx("path",{d:"M24 9v2h-6V9zM8 4C5.79 4 4 5.79 4 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4m4.51-8.95C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95m4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17"})),Wr=de(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),Jr=de(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),ct=de(e.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z"})),Kr=de([e.jsx("path",{d:"M18 11c.7 0 1.37.1 2 .29V10c0-1.1-.9-2-2-2h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6.26c-.79-1.13-1.26-2.51-1.26-4 0-3.87 3.13-7 7-7M8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9z"},"0"),e.jsx("path",{d:"M18 13c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0 2c.83 0 1.5.67 1.5 1.5S18.83 18 18 18s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5m0 6c-1.03 0-1.94-.52-2.48-1.32.73-.42 1.57-.68 2.48-.68s1.75.26 2.48.68c-.54.8-1.45 1.32-2.48 1.32"},"1")]),Gr=de(e.jsx("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8z"})),Yr=de(e.jsx("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"})),rs=de(e.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 2m4.24 16L12 15.45 7.77 18l1.12-4.81-3.73-3.23 4.92-.42L12 5l1.92 4.53 4.92.42-3.73 3.23z"})),Xr=de(e.jsx("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"})),Qr=de(e.jsx("path",{d:"M16 13c3.09-2.81 6-5.44 6-7.7C22 3.45 20.55 2 18.7 2c-1.04 0-2.05.49-2.7 1.25C15.34 2.49 14.34 2 13.3 2 11.45 2 10 3.45 10 5.3c0 2.26 2.91 4.89 6 7.7m-2.7-9c.44 0 .89.21 1.18.55L16 6.34l1.52-1.79c.29-.34.74-.55 1.18-.55.74 0 1.3.56 1.3 1.3 0 1.12-2.04 3.17-4 4.99-1.96-1.82-4-3.88-4-4.99 0-.74.56-1.3 1.3-1.3M19 16h-2c0-1.2-.75-2.28-1.87-2.7L8.97 11H1v11h6v-1.44l7 1.94 8-2.5v-1c0-1.66-1.34-3-3-3M3 20v-7h2v7zm10.97.41L7 18.48V13h1.61l5.82 2.17c.34.13.57.46.57.83 0 0-1.99-.05-2.3-.15l-2.38-.79-.63 1.9 2.38.79c.51.17 1.04.26 1.58.26H19c.39 0 .74.23.9.56z"}));var en=Array.prototype,It=en.splice;function tn(v,R,O,C){var _=Es,j=-1,p=R.length,i=v;for(v===R&&(R=Ts(R));++j<p;)for(var m=0,f=R[j],h=f;(m=_(i,h,m))>-1;)i!==v&&It.call(i,m,1),It.call(v,m,1);return v}function sn(v,R){return v&&v.length&&R&&R.length?tn(v,R):v}var rn=Is(sn);const nn={width:24,height:24,body:'<path fill="currentColor" d="M4.975 15q-.425 0-.7-.288T4 14q0-.425.288-.713T5 13h14.025q.425 0 .7.288T20 14q0 .425-.288.713T19 15H4.975Zm0 4q-.425 0-.7-.288T4 18q0-.425.288-.713T5 17h14.025q.425 0 .7.288T20 18q0 .425-.288.713T19 19H4.975Zm0-8q-.425 0-.7-.288T4 10q0-.425.288-.713T5 9h14.025q.425 0 .7.288T20 10q0 .425-.288.713T19 11H4.975Zm0-4q-.425 0-.7-.288T4 6q0-.425.288-.713T5 5h14.025q.425 0 .7.288T20 6q0 .425-.288.713T19 7H4.975Z"/>'};function ns({label:v="",disabled:R=!1,required:O=!1,initialValue:C="",onChange:_=()=>{},style:j={},onSubmit:p=()=>{},triggers:i=[],options:m=[],formatterBeforeSubmit:f=n=>n.join(","),helperText:h="",placeholder:t="",renderImage:l=()=>null,renderLabel:o=()=>"",filterKeys:r=["name"],noEmpty:s=!1,...c}){const[n,a]=q.useState(!1),[u,g]=q.useState(!1),[y,k]=q.useState(""),w=q.useRef(null),[d,x]=q.useState(C),[b,S]=q.useState(d),A=q.useMemo(()=>{if(!m)return{};const z={};return m.forEach(I=>{z[I.code]=I}),z},[m]),P=()=>{if(!m)return[];if(!y)return m.map(I=>I.code);const z=new RegExp(y.toLowerCase());return m.filter(I=>{for(let B=0;B<r.length;B++){const F=r[B];if(z.test(I[F]?.toLowerCase()))return!0}return!1}).map(I=>I.code)},L=async()=>{g(!0);try{await p(typeof f=="function"?f(b):b)===!1?S(d):s&&!b.length?(S(C),x(C)):(S(b),x(b))}catch{S(d)}finally{g(!1),a(!1)}},D=(z,I)=>{if(!Array.isArray(I)){S([]),_([]);return}const B=I.filter(F=>A[F]);if(!B.length){S([]),_([]);return}S(B),_(B)},N=z=>{z.stopPropagation(),a(!0),setTimeout(()=>{if(w.current){const I=w.current.querySelector("input");I&&I.focus()}},500)},V=n?e.jsx(Sr,{ref:w,options:m,value:b,onChange:D,inputValue:y,onInputChange:(z,I)=>{k(I)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:P,getOptionLabel:z=>A[z]?.name,renderInput:z=>e.jsx(U,{...z,label:"",placeholder:t}),renderOption:(z,I)=>{const B=b.indexOf(I)!==-1;return q.createElement(an,{component:"li",...z,key:I},l(A[I]||{}),e.jsx($,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:B?"700":"normal"},children:o(I,A[I])||A[I]?.name}),e.jsx($,{component:kt,sx:{opacity:.5,width:18,height:18},style:{visibility:B?"visible":"hidden"}}))},...c,slots:{popper:on}}):e.jsx($,{className:"form-item-input slot",onClick:N,style:{whiteSpace:"pre-wrap",cursor:"text"},sx:{px:1},children:b.filter(z=>m.some(I=>I.code===z)).map(z=>e.jsx(ft,{label:m.find(I=>I.code===z).name,style:{marginRight:8},size:"small"},z))});return e.jsx(xr,{className:"form",style:j,children:e.jsxs($,{className:"form-item",children:[e.jsxs($,{className:"form-item-label",children:[v,O&&e.jsx(kr,{})]}),e.jsxs($,{className:"form-item-body",children:[e.jsx($,{className:"form-item-input",children:V}),n?e.jsx($,{className:"form-item-action",children:e.jsxs(e.Fragment,{children:[e.jsx(ae,{"data-cy":"schema-form-item-confirm",onClick:L,disabled:R||u,size:"large",children:u?e.jsx(Ee,{size:24}):e.jsx(wr,{})}),e.jsx(ae,{"data-cy":"schema-form-item-cancel",onClick:()=>{S(d),a(!1)},disabled:R||u,size:"large",children:e.jsx(kt,{})})]})}):null]}),n&&h&&e.jsx(zt,{children:h})]})})}ns.propTypes={style:T.object,onSubmit:T.func,onChange:T.func,label:T.string,initialValue:T.string,required:T.bool,disabled:T.bool,triggers:T.array,options:T.array,helperText:T.string,formatterBeforeSubmit:T.func,placeholder:T.string,renderImage:T.func,filterKeys:T.arrayOf(T.string),noEmpty:T.bool,renderLabel:T.func};const an=xe.div`
2
2
  display: flex;
3
3
  justify-content: space-between;
4
4
  align-items: center;
@@ -1,4 +1,4 @@
1
- import{aj as ee,A as T,r as f,a as te,b as se,V as j,u as S,x as re,av as A,i as F,j as t,w as q,aw as oe,T as C,y as k,$,o as m,ax as ne,ay as ae,v as _,C as N,az as ie,H as W,X as M,aA as le,aB as ce,K as E,aC as ue,L as de,aD as pe,a9 as he,s as O,a6 as fe,a7 as me,aE as ge,a8 as xe}from"./index-BfokqgHy.js";import{u as L}from"./useLocalStorage-C-HC7dIw.js";import{C as be,c as ke,e as ye,_ as je,a as Se,d as we,s as ve,S as V,b as Pe,A as Ce}from"./item-lCXo2qau.js";import{e as D}from"./engine-V2gGW1_S.js";import{g as U}from"./get-safe-url-D_h8kBns.js";import{P as z}from"./permission-B-96KXQR.js";import{A as Re}from"./ArrowDropDown-CQnQ9y90.js";import{B as Le}from"./Breadcrumbs-D07iUOi2.js";import"./index-eWsGrR-q.js";import"./KeyboardArrowDown-PDLBPIxK.js";import"./ChevronLeft-Uf3Zj0ny.js";import"./ChevronRight-CqQwaL1d.js";import"./Search-DVAqIV8y.js";import"./index-zI6sbIgD.js";import"./blocklet-Dr_LK1Q2.js";import"./Autocomplete-DNyfxOFp.js";import"./ListSubheader-XzhijlHC.js";import"./Verified-C_RgwaGs.js";import"./VerifiedUser-cla-gxoO.js";import"./Add-BqMKSndg.js";import"./Launch-Cw0IvqYQ.js";import"./Done-C3Xrj0cc.js";import"./DeleteOutline-BVyycjCe.js";import"./delete-confirm-B5zJVhDV.js";import"./click-to-copy-PtCfJ87M.js";import"./MoreVert-YC-2RtuS.js";import"./ButtonGroup-Dh6lYgZM.js";import"./getValidReactChildren-2xps4qz5.js";function Be(e){const r=ee(),c=T(),[s,o]=L(`sid:blocklet:purchase:${e}`),[l,u]=f.useState(!1),[d,a]=f.useState(null),p=()=>{const{pathname:n,searchParams:b}=new URL(window.location.href),g=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";b.get("sid")&&(o(""),c(n.replace(g,"/"),{replace:!0}))},i=!!(r.get("assetDid")&&s&&r.get("sid")===s);return te(se.BlockletEvents.purchaseChange,n=>{n.did===e&&(a(n.session),["declined","confirmed","error"].includes(n.session.status)&&(u(!0),setTimeout(p,2e3)))}),f.useEffect(()=>{d&&d.id!==s&&o(d.id)},[d]),{hasCompleted:l,hasPurchased:i,session:d,setSession:a,doRedirect:p}}function De(e){setTimeout(()=>{window.location.href=U(e,{allowDomains:null})},1e3)}function K({meta:e,onCancel:r,handlePaySuccess:c=De,storeUrl:s}){const{t:o}=j(),{info:l}=S(),[u,d]=f.useState("both"),[a,p]=f.useState(1),i=re(l),n=A(e,l,s),b=P=>{P!==u&&d(P)},g=()=>{u&&(p(2),u==="verify"&&(window.location.href=U(n)))},w=(P,B)=>{B!=="backdropClick"&&r()},x=()=>{c(n)},h=F.getDisplayName({meta:e});if(u==="purchase"&&a===2)return t.jsx(q,{open:!0,popup:!0,baseUrl:s,action:"acquire-asset",checkFn:oe.create({baseURL:k(s,"/store")}).get,onSuccess:x,onClose:r,checkTimeout:60*5e3,extraParams:{factory:e.nftFactory},webWalletUrl:i,disableClose:!0,saveConnect:!1,showDownload:!1,messages:{title:o("store.purchase.auth.title",{name:h}),scan:o("store.purchase.auth.scan"),confirm:o("store.purchase.auth.confirm"),success:t.jsxs(t.Fragment,{children:[t.jsx(C,{gutterBottom:!0,children:o("store.purchase.auth.success")}),t.jsxs(C,{variant:"subtitle2",children:[" ",o("store.purchase.autoLaunch",{name:h})]})]})}});const v=$;return t.jsx(v,{title:o("store.purchase.title",{name:h}),disableEscapeKeyDown:!0,open:!0,fullWidth:!0,onClose:w,children:t.jsx("div",{style:{marginBottom:16},children:t.jsx(be,{action:u,onNext:g,onSelect:b})})})}K.propTypes={...ke,storeUrl:m.string.isRequired,handlePaySuccess:m.func};function H({meta:e,buttonText:r,storeUrl:c,isResource:s=!1}){const{t:o}=j(),l=T(),{info:u}=S(),{api:d}=ne(),a=F.isFreeBlocklet(e)===!1,[p,i]=f.useState(!1),{hasPurchased:n}=Be(e.did),[b,g]=f.useState(!1),[w]=L("instant-blocklet-install",!1),[x,h]=f.useState(!1),v=f.useMemo(()=>p?o(a?"blocklet.status.purchasing":"blocklet.status.waiting"):"",[p,o,a]),P=f.useMemo(()=>s?o("blocklet.status.resource"):a?r.purchase:r.launch,[a,r,s]),B=y=>{y.preventDefault(),y.stopPropagation();try{if(i(!0),a){g(!0);return}if(w){h(!0);return}if(!a){const R=A(e,u,c);window.location.href=U(R)}}catch(R){W.error(M(R),{autoHideDuration:5e3}),console.error("Blocklet installed failed",R)}finally{i(!1)}},Y=()=>{i(!1),g(!1)},J=y=>{i(!1),h(!1),l(`/blocklets/${y.appDid}/components`)},Z=()=>{i(!1),h(!1)};return t.jsxs(t.Fragment,{children:[t.jsx(ye,{children:t.jsx(z,{permission:"mutate_blocklets",children:y=>t.jsx(ae,{title:s?o("launchBlocklet.error.resourceBlocklet"):"",children:t.jsx(_,{onClick:B,size:"small",sx:{cursor:s?"not-allowed":"pointer",overflow:"hidden"},disabled:!!(v||!y),variant:"outlined",color:"primary","data-cy":"install-blocklet",children:v?t.jsxs(t.Fragment,{children:[t.jsx(N,{size:16,style:{marginRight:3}}),v]}):P},e.did)})})}),(n||b)&&t.jsx(K,{method:"launch",meta:e,mode:"both",onCancel:Y,storeUrl:c}),x&&t.jsx(q,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:d.get,checkTimeout:5*60*1e3,onSuccess:J,extraParams:{title:e.title,blockletMetaUrl:decodeURIComponent(ie(c,e.did).trim())},messages:{title:o("setup.keyPair.title"),scan:o("setup.keyPair.scan"),confirm:o("setup.keyPair.confirm"),success:o("setup.keyPair.success")},onClose:Z})]})}H.propTypes={isResource:m.bool,meta:m.object.isRequired,buttonText:m.shape({purchase:m.string.isRequired,launch:m.string.isRequired}).isRequired,storeUrl:m.string.isRequired};const Ee=(e,r,c)=>{const s=he(r);return k(c,`/blocklets/${e.did}/?server-url=${s}`)},I=({meta:e,attribute:r,value:c})=>e._formatted?e._formatted[r]:c,Ue=(e,r)=>{if(!e||!r)return"";try{return k(r,e)}catch(c){return console.warn("Failed to construct avatar URL:",c),""}};function G({blocklet:e,endpoint:r="",serverVersion:c=""}){const{t:s}=j(),o=S();let l=k(o.imgPrefix,"blocklet.png");const u=r;if(u.startsWith("http")&&e.logo)l=k(u,ue(e.did,e.logo,e.version));else{let n=(window.env.apiPrefix||"/").replace(/^\/+/,"").replace(/\/+$/,"");n&&(n=`/${n}`),l=k(n,`/blocklet/logo/${e.did}`)}try{const i=new URL(l);i.searchParams.set("v",e.version||+new Date),l=i.href}catch{}const d=i=>i.currentTarget.contains(i.target)?!0:(i.preventDefault(),!1),a={meta:e,buttonText:{purchase:s("common.purchase"),launch:s("common.launch")},storeUrl:u},p=t.jsx("div",{style:{display:"flex",alignItems:"center"},children:t.jsx(Se,{serverVersion:c,requirementVersion:e.requirements?.server,size:"small",children:t.jsx(H,{isResource:!(D.hasStartEngine(e)||D.isGatewayBlocklet(e)||D.isPackBlocklet(e)),...a})})});return t.jsx(de,{href:Ee(e,o.info,r),style:{color:"initial",textDecoration:"none"},onClick:d,target:"_blank",children:t.jsx(Ie,{title:I({meta:e,attribute:"title",value:e.title||e.name}),did:e.did,description:I({meta:e,attribute:"description",value:e.description}),cover:e.logo?l:"",version:e.version,onButtonClick:null,icons:e.docker?.image?[{key:"docker",icon:t.jsx(E,{sx:{display:"flex",color:"primary.main"},children:t.jsx(pe,{icon:we})}),title:s("blocklet.dockerImage")}]:[],official:e.isOfficial?{tooltip:s("blocklet.component.isOfficial")}:void 0,author:e.owner.fullName,avatar:Ue(e.owner.avatar,r),download:e.stats.downloads,button:p})})}G.propTypes={blocklet:m.object.isRequired,serverVersion:m.string,endpoint:m.string};function Q({storeUrl:e,handleSearchSelect:r=null,extraFilter:c=void 0,...s}){const{locale:o}=j(),l=S(),[u,d]=f.useState({}),a=n=>{d(n)},p=e,i=l?.info?.version;return f.useEffect(()=>{d({})},[p]),t.jsx(le,{FallbackComponent:ce,resetKeys:[p],children:t.jsx(E,{...s,sx:{"& .title-bar":{pt:0},".blocklet-list":{mt:0},"& h2":{display:"none"}},children:t.jsx(je,{layout:{showExplore:!1,showTitle:!0},blockletRender:n=>t.jsx(G,{...n,endpoint:p}),baseSearch:!0,endpoint:p,locale:o,onFilterChange:a,onSearchSelect:r,filters:u,extraFilter:c,serverVersion:i})})})}Q.propTypes={storeUrl:m.string.isRequired,handleSearchSelect:m.func,extraFilter:m.func};const Ie=O(ve)`
1
+ import{aj as ee,A as T,r as f,a as te,b as se,V as j,u as S,x as re,av as A,i as F,j as t,w as q,aw as oe,T as C,y as k,$,o as m,ax as ne,ay as ae,v as _,C as N,az as ie,H as W,X as M,aA as le,aB as ce,K as E,aC as ue,L as de,aD as pe,a9 as he,s as O,a6 as fe,a7 as me,aE as ge,a8 as xe}from"./index-Dzuc8iT3.js";import{u as L}from"./useLocalStorage-BfHKsdtC.js";import{C as be,c as ke,e as ye,_ as je,a as Se,d as we,s as ve,S as V,b as Pe,A as Ce}from"./item-B_RGzu57.js";import{e as D}from"./engine-WQwoCQo7.js";import{g as U}from"./get-safe-url-GLo4lMcu.js";import{P as z}from"./permission-DCAf_gW3.js";import{A as Re}from"./ArrowDropDown-DMPX6uVd.js";import{B as Le}from"./Breadcrumbs-DzUXRqKQ.js";import"./index-CnKKagRA.js";import"./KeyboardArrowDown-Mi5aUj7A.js";import"./ChevronLeft-CSCmHm5m.js";import"./ChevronRight-qIIkSnQ7.js";import"./Search-DYBL-x4y.js";import"./index-CdTvqOME.js";import"./blocklet-DAH77r3I.js";import"./Autocomplete-DB_xZW4q.js";import"./ListSubheader-Dtz-xi9-.js";import"./Verified-DRT_g89L.js";import"./VerifiedUser-C11cj6r8.js";import"./Add-DaNU9Vkn.js";import"./Launch-Bgnt4dnJ.js";import"./Done-Cc4L9Foc.js";import"./DeleteOutline-CoQ7wmqT.js";import"./delete-confirm-DmwS-waR.js";import"./click-to-copy-DUObPiIX.js";import"./MoreVert-B909vYzl.js";import"./ButtonGroup-BAvFNy2i.js";import"./getValidReactChildren-DmUPqavH.js";function Be(e){const r=ee(),c=T(),[s,o]=L(`sid:blocklet:purchase:${e}`),[l,u]=f.useState(!1),[d,a]=f.useState(null),p=()=>{const{pathname:n,searchParams:b}=new URL(window.location.href),g=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";b.get("sid")&&(o(""),c(n.replace(g,"/"),{replace:!0}))},i=!!(r.get("assetDid")&&s&&r.get("sid")===s);return te(se.BlockletEvents.purchaseChange,n=>{n.did===e&&(a(n.session),["declined","confirmed","error"].includes(n.session.status)&&(u(!0),setTimeout(p,2e3)))}),f.useEffect(()=>{d&&d.id!==s&&o(d.id)},[d]),{hasCompleted:l,hasPurchased:i,session:d,setSession:a,doRedirect:p}}function De(e){setTimeout(()=>{window.location.href=U(e,{allowDomains:null})},1e3)}function K({meta:e,onCancel:r,handlePaySuccess:c=De,storeUrl:s}){const{t:o}=j(),{info:l}=S(),[u,d]=f.useState("both"),[a,p]=f.useState(1),i=re(l),n=A(e,l,s),b=P=>{P!==u&&d(P)},g=()=>{u&&(p(2),u==="verify"&&(window.location.href=U(n)))},w=(P,B)=>{B!=="backdropClick"&&r()},x=()=>{c(n)},h=F.getDisplayName({meta:e});if(u==="purchase"&&a===2)return t.jsx(q,{open:!0,popup:!0,baseUrl:s,action:"acquire-asset",checkFn:oe.create({baseURL:k(s,"/store")}).get,onSuccess:x,onClose:r,checkTimeout:60*5e3,extraParams:{factory:e.nftFactory},webWalletUrl:i,disableClose:!0,saveConnect:!1,showDownload:!1,messages:{title:o("store.purchase.auth.title",{name:h}),scan:o("store.purchase.auth.scan"),confirm:o("store.purchase.auth.confirm"),success:t.jsxs(t.Fragment,{children:[t.jsx(C,{gutterBottom:!0,children:o("store.purchase.auth.success")}),t.jsxs(C,{variant:"subtitle2",children:[" ",o("store.purchase.autoLaunch",{name:h})]})]})}});const v=$;return t.jsx(v,{title:o("store.purchase.title",{name:h}),disableEscapeKeyDown:!0,open:!0,fullWidth:!0,onClose:w,children:t.jsx("div",{style:{marginBottom:16},children:t.jsx(be,{action:u,onNext:g,onSelect:b})})})}K.propTypes={...ke,storeUrl:m.string.isRequired,handlePaySuccess:m.func};function H({meta:e,buttonText:r,storeUrl:c,isResource:s=!1}){const{t:o}=j(),l=T(),{info:u}=S(),{api:d}=ne(),a=F.isFreeBlocklet(e)===!1,[p,i]=f.useState(!1),{hasPurchased:n}=Be(e.did),[b,g]=f.useState(!1),[w]=L("instant-blocklet-install",!1),[x,h]=f.useState(!1),v=f.useMemo(()=>p?o(a?"blocklet.status.purchasing":"blocklet.status.waiting"):"",[p,o,a]),P=f.useMemo(()=>s?o("blocklet.status.resource"):a?r.purchase:r.launch,[a,r,s]),B=y=>{y.preventDefault(),y.stopPropagation();try{if(i(!0),a){g(!0);return}if(w){h(!0);return}if(!a){const R=A(e,u,c);window.location.href=U(R)}}catch(R){W.error(M(R),{autoHideDuration:5e3}),console.error("Blocklet installed failed",R)}finally{i(!1)}},Y=()=>{i(!1),g(!1)},J=y=>{i(!1),h(!1),l(`/blocklets/${y.appDid}/components`)},Z=()=>{i(!1),h(!1)};return t.jsxs(t.Fragment,{children:[t.jsx(ye,{children:t.jsx(z,{permission:"mutate_blocklets",children:y=>t.jsx(ae,{title:s?o("launchBlocklet.error.resourceBlocklet"):"",children:t.jsx(_,{onClick:B,size:"small",sx:{cursor:s?"not-allowed":"pointer",overflow:"hidden"},disabled:!!(v||!y),variant:"outlined",color:"primary","data-cy":"install-blocklet",children:v?t.jsxs(t.Fragment,{children:[t.jsx(N,{size:16,style:{marginRight:3}}),v]}):P},e.did)})})}),(n||b)&&t.jsx(K,{method:"launch",meta:e,mode:"both",onCancel:Y,storeUrl:c}),x&&t.jsx(q,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:d.get,checkTimeout:5*60*1e3,onSuccess:J,extraParams:{title:e.title,blockletMetaUrl:decodeURIComponent(ie(c,e.did).trim())},messages:{title:o("setup.keyPair.title"),scan:o("setup.keyPair.scan"),confirm:o("setup.keyPair.confirm"),success:o("setup.keyPair.success")},onClose:Z})]})}H.propTypes={isResource:m.bool,meta:m.object.isRequired,buttonText:m.shape({purchase:m.string.isRequired,launch:m.string.isRequired}).isRequired,storeUrl:m.string.isRequired};const Ee=(e,r,c)=>{const s=he(r);return k(c,`/blocklets/${e.did}/?server-url=${s}`)},I=({meta:e,attribute:r,value:c})=>e._formatted?e._formatted[r]:c,Ue=(e,r)=>{if(!e||!r)return"";try{return k(r,e)}catch(c){return console.warn("Failed to construct avatar URL:",c),""}};function G({blocklet:e,endpoint:r="",serverVersion:c=""}){const{t:s}=j(),o=S();let l=k(o.imgPrefix,"blocklet.png");const u=r;if(u.startsWith("http")&&e.logo)l=k(u,ue(e.did,e.logo,e.version));else{let n=(window.env.apiPrefix||"/").replace(/^\/+/,"").replace(/\/+$/,"");n&&(n=`/${n}`),l=k(n,`/blocklet/logo/${e.did}`)}try{const i=new URL(l);i.searchParams.set("v",e.version||+new Date),l=i.href}catch{}const d=i=>i.currentTarget.contains(i.target)?!0:(i.preventDefault(),!1),a={meta:e,buttonText:{purchase:s("common.purchase"),launch:s("common.launch")},storeUrl:u},p=t.jsx("div",{style:{display:"flex",alignItems:"center"},children:t.jsx(Se,{serverVersion:c,requirementVersion:e.requirements?.server,size:"small",children:t.jsx(H,{isResource:!(D.hasStartEngine(e)||D.isGatewayBlocklet(e)||D.isPackBlocklet(e)),...a})})});return t.jsx(de,{href:Ee(e,o.info,r),style:{color:"initial",textDecoration:"none"},onClick:d,target:"_blank",children:t.jsx(Ie,{title:I({meta:e,attribute:"title",value:e.title||e.name}),did:e.did,description:I({meta:e,attribute:"description",value:e.description}),cover:e.logo?l:"",version:e.version,onButtonClick:null,icons:e.docker?.image?[{key:"docker",icon:t.jsx(E,{sx:{display:"flex",color:"primary.main"},children:t.jsx(pe,{icon:we})}),title:s("blocklet.dockerImage")}]:[],official:e.isOfficial?{tooltip:s("blocklet.component.isOfficial")}:void 0,author:e.owner.fullName,avatar:Ue(e.owner.avatar,r),download:e.stats.downloads,button:p})})}G.propTypes={blocklet:m.object.isRequired,serverVersion:m.string,endpoint:m.string};function Q({storeUrl:e,handleSearchSelect:r=null,extraFilter:c=void 0,...s}){const{locale:o}=j(),l=S(),[u,d]=f.useState({}),a=n=>{d(n)},p=e,i=l?.info?.version;return f.useEffect(()=>{d({})},[p]),t.jsx(le,{FallbackComponent:ce,resetKeys:[p],children:t.jsx(E,{...s,sx:{"& .title-bar":{pt:0},".blocklet-list":{mt:0},"& h2":{display:"none"}},children:t.jsx(je,{layout:{showExplore:!1,showTitle:!0},blockletRender:n=>t.jsx(G,{...n,endpoint:p}),baseSearch:!0,endpoint:p,locale:o,onFilterChange:a,onSearchSelect:r,filters:u,extraFilter:c,serverVersion:i})})})}Q.propTypes={storeUrl:m.string.isRequired,handleSearchSelect:m.func,extraFilter:m.func};const Ie=O(ve)`
2
2
  .ms-highlight {
3
3
  color: ${e=>e.theme.palette.primary.main};
4
4
  }
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-Fs3E_gDS.js","./index-BojVbZw0.js","./index-Bq1Ow9Ag.js","./metric-DmeCDHRO.js","./click-to-copy-PtCfJ87M.js","./index-C_WCV7QS.js","./useLocalStorage-C-HC7dIw.js","./index-CnHjhHdP.js","./FilterList-Cid-oBR0.js","./CSSTransition-BfkQpTwd.js","./emotion-cache.browser.esm-CHE9Rgf-.js","./index-DTOWo4jq.js","./redux-DfszZyTl.js","./typeof-QjJsDpFa.js","./depsEqual-Dxl6Fkos.js","./index-zI6sbIgD.js","./TableSearch-CuYawmb9.js","./Search-DVAqIV8y.js","./Clear-G8IA_JS7.js","./MoreVert-YC-2RtuS.js","./status-vKMdrOM1.js","./actions-DHHW8Ne9.js","./url-evaluation-D_cqsSRO.js","./get-safe-url-D_h8kBns.js","./ButtonGroup-Dh6lYgZM.js","./getValidReactChildren-2xps4qz5.js","./permission-B-96KXQR.js","./install-from-url-CgprkeO6.js","./without-wallet-DRpZoYCR.js","./index-YMUJi64L.js","./cloneDeep-ClEOqAIj.js","./Autocomplete-DNyfxOFp.js","./ListSubheader-XzhijlHC.js","./ListItemButton-BH7vk_M8.js","./Stepper-cPSi1Mx5.js","./Launch-Cw0IvqYQ.js","./Add-BqMKSndg.js","./index-DIAjkldX.js","./schema-B9mRrKya.js","./index-ZBdt2zLB.js","./toLower-Cg3LtCaI.js","./index-jGiUSwaE.js","./url-join-CI8YXAz9.js","./wait-container-0kquAukH.js","./use-mobile-BW2lFrSI.js","./DeleteOutline-BVyycjCe.js","./spaces-BltTDIy4.js","./api-2w3ONNYp.js","./index-C5LYAduR.js","./item-lCXo2qau.js","./index-eWsGrR-q.js","./KeyboardArrowDown-PDLBPIxK.js","./ChevronLeft-Uf3Zj0ny.js","./ChevronRight-CqQwaL1d.js","./blocklet-Dr_LK1Q2.js","./Verified-C_RgwaGs.js","./VerifiedUser-cla-gxoO.js","./Done-C3Xrj0cc.js","./delete-confirm-B5zJVhDV.js","./item-G0iZE90Q.css","./engine-V2gGW1_S.js","./ArrowDropDown-CQnQ9y90.js","./Breadcrumbs-D07iUOi2.js","./index-aDyspHb_.js","./html-title-BGLe2_e3.js","./index.esm-DzozubHa.js","./switch-control-C_8dVEZN.js","./Switch-7IuDphWe.js","./Link-AjRLM7zT.js","./logo-BKA11TRi.js","./Refresh-4WpQ7G17.js","./LoadingButton-DX-iBNkr.js","./rotate-session-key-BxXPHSLd.js","./visuallyHidden-Dan1xhjv.js","./is-path-prefix-equal-B-eGi6RZ.js","./Edit-0Bz5MCrU.js","./CallMerge-B-Wn3wH-.js","./CardContent-D50ZN2XJ.js","./index-CZle5CbS.js","./download-sLIfOCnR.js","./index-dbT-WrDi.js","./audit-logs-DBzxIdH4.js","./index-BQjC5QVz.js","./decode-DPztD6kB.js","./index-gnjjKJuC.css","./UnfoldMore-BkCizcCL.js","./shorten-label-Rku853mZ.js","./team-Bz9weh46.js","./index-DUCYys1s.js","./ViewList-Bb5x5Htb.js","./Google-zFyeAexf.js","./AdapterDayjs-B30A4e9V.js","./useThemeProps-xP0TFqAL.js","./ErrorOutline-Da9J9PWf.js","./index-C4kLAKHD.js","./sdk-COh1FZhu.js","./actions-BTuanQTE.js","./ua-parser-DP5omx3I.js","./index-B840ZI2-.js","./edit.svg-BBcWA2Yv.js","./list-header-C68bt277.js","./chain-Dc18Nz_k.js","./ToggleButtonGroup-DzPH8xLQ.js","./lock.svg-CvsvGAq6.js","./index-BkVWAwPz.js","./index-ZgkIHsf0.css","./useAsyncRetry-JUvvbo59.js","./useAsync-wJrllzXI.js","./detail-Qa1bqakf.js","./index-T0ij7gEZ.js","./index-Dea9QPzX.js","./invitation-BKHc6hH4.js","./wrap-locale-CEzbOAhF.js","./index-CcbY3K1e.js","./index-CFpGjsgX.js","./index-C76LlcBP.js","./index-CfO1ocPd.js","./agreement-Dtg6hLTZ.js","./index-DoLUCdoo.js","./index-Cww9znhR.js","./index-jRVN_1vm.js","./traffic-0lJHbFOR.js","./iframe-C807ybR2.js","./index-DBii9-f-.js","./base-chart-mE2yuOdY.js","./index-DoFlCh-O.js","./index-DRYJ0xIl.js","./memory-CA11HykX.js","./index-DAP7V0hj.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-D9BFE-KZ.js","./index-BojVbZw0.js","./index-BTeQyE9h.js","./metric-D7ZLfEZL.js","./click-to-copy-DUObPiIX.js","./index-BpbQbuPw.js","./useLocalStorage-BfHKsdtC.js","./index-BGo2ji7B.js","./FilterList-B1C7unqT.js","./CSSTransition-YK8aX8nK.js","./emotion-cache.browser.esm-B4PDkYd9.js","./index-V6W4s-Vq.js","./redux-DfszZyTl.js","./typeof-QjJsDpFa.js","./depsEqual-BKRl_wlt.js","./index-CdTvqOME.js","./TableSearch-U9rZfIzu.js","./Search-DYBL-x4y.js","./Clear-4n0vKAse.js","./MoreVert-B909vYzl.js","./status-BOrqQCOU.js","./actions-CQRwSERj.js","./url-evaluation-CRBdYFML.js","./get-safe-url-GLo4lMcu.js","./ButtonGroup-BAvFNy2i.js","./getValidReactChildren-DmUPqavH.js","./permission-DCAf_gW3.js","./install-from-url-C-sswCsg.js","./without-wallet-DT7YhPXQ.js","./index-BUXGT_ps.js","./cloneDeep-BqrZti_p.js","./Autocomplete-DB_xZW4q.js","./ListSubheader-Dtz-xi9-.js","./ListItemButton-8ftrSfoo.js","./Stepper-tTKANW81.js","./Launch-Bgnt4dnJ.js","./Add-DaNU9Vkn.js","./index-BCXR4Ftk.js","./schema-DILw2ZhE.js","./index-BKazYwLa.js","./toLower-BLHPf6nS.js","./index-C4Up6pys.js","./url-join-D0OB7xve.js","./wait-container-CaFqAYZl.js","./use-mobile-ENQw9KmE.js","./DeleteOutline-CoQ7wmqT.js","./spaces-D11mVhTA.js","./api-CFN0QrWp.js","./index-DzMtvg-l.js","./item-B_RGzu57.js","./index-CnKKagRA.js","./KeyboardArrowDown-Mi5aUj7A.js","./ChevronLeft-CSCmHm5m.js","./ChevronRight-qIIkSnQ7.js","./blocklet-DAH77r3I.js","./Verified-DRT_g89L.js","./VerifiedUser-C11cj6r8.js","./Done-Cc4L9Foc.js","./delete-confirm-DmwS-waR.js","./item-G0iZE90Q.css","./engine-WQwoCQo7.js","./ArrowDropDown-DMPX6uVd.js","./Breadcrumbs-DzUXRqKQ.js","./index-ClNNfRgL.js","./html-title-3cSvLxbM.js","./index.esm-DfXlzNxJ.js","./switch-control-DIsd4bYh.js","./Switch-Bb-rNPtt.js","./Link-DNvDZnMC.js","./logo-BKA11TRi.js","./Refresh-VB_fFdY-.js","./LoadingButton-C4EStBea.js","./rotate-session-key-C0GGERLw.js","./visuallyHidden-Dan1xhjv.js","./is-path-prefix-equal-D9JGKIeT.js","./Edit-BNY88SKu.js","./CallMerge-D_gwsj0k.js","./CardContent-BCchlH2G.js","./index-C7u44WUx.js","./download-CJgs-EUD.js","./index-B8gee_2L.js","./audit-logs-CROZ_WeS.js","./index-DCku-75F.js","./decode-DPztD6kB.js","./index-gnjjKJuC.css","./UnfoldMore-CvwQJb-a.js","./shorten-label-ByAddcRT.js","./team-D5YTqCCQ.js","./index-wAxFAH22.js","./ViewList-D4XmJ9U0.js","./Google-CwyoAMMB.js","./AdapterDayjs-BQhqZd8R.js","./useThemeProps-BqRQljgd.js","./ErrorOutline-BzGlqq16.js","./index-RiT8KfYO.js","./sdk-CrF6oAGx.js","./actions-BeMJBeZS.js","./ua-parser-DP5omx3I.js","./index-yJnNzvvC.js","./edit.svg-CTCbuAl5.js","./list-header-BgLs_nU8.js","./chain-Cx_Kwvvk.js","./ToggleButtonGroup-DllrYs9I.js","./lock.svg-DKwAmrmM.js","./index-kdOFyCzK.js","./index-ZgkIHsf0.css","./useAsyncRetry-DQznqjsq.js","./useAsync-ng0xVRWA.js","./detail-CMFXn2sE.js","./index-CY7IUyTQ.js","./index-DEol2fO5.js","./invitation-DYBpGYHd.js","./wrap-locale-BucbsnFR.js","./index-BdCFcn5n.js","./index-CeSdCZbW.js","./index-DQDzrpet.js","./index-R1YPOZ_R.js","./agreement-CZn2P4zt.js","./index-BPe78k6O.js","./index-CwQXKxtM.js","./index-D8P50S6m.js","./traffic-D2tJoibq.js","./iframe-b7qWsXni.js","./index-DBii9-f-.js","./base-chart-SmGCWPp4.js","./index-B4qKQt-w.js","./index-DRYJ0xIl.js","./memory-Cuur0WuU.js","./index-d0DSkbLN.js"])))=>i.map(i=>d[i]);
2
2
  function _mergeNamespaces(De,Me){for(var qe=0;qe<Me.length;qe++){const He=Me[qe];if(typeof He!="string"&&!Array.isArray(He)){for(const Ge in He)if(Ge!=="default"&&!(Ge in De)){const Je=Object.getOwnPropertyDescriptor(He,Ge);Je&&Object.defineProperty(De,Ge,Je.get?Je:{enumerable:!0,get:()=>He[Ge]})}}}return Object.freeze(Object.defineProperty(De,Symbol.toStringTag,{value:"Module"}))}(function(){const Me=document.createElement("link").relList;if(Me&&Me.supports&&Me.supports("modulepreload"))return;for(const Ge of document.querySelectorAll('link[rel="modulepreload"]'))He(Ge);new MutationObserver(Ge=>{for(const Je of Ge)if(Je.type==="childList")for(const Ye of Je.addedNodes)Ye.tagName==="LINK"&&Ye.rel==="modulepreload"&&He(Ye)}).observe(document,{childList:!0,subtree:!0});function qe(Ge){const Je={};return Ge.integrity&&(Je.integrity=Ge.integrity),Ge.referrerPolicy&&(Je.referrerPolicy=Ge.referrerPolicy),Ge.crossOrigin==="use-credentials"?Je.credentials="include":Ge.crossOrigin==="anonymous"?Je.credentials="omit":Je.credentials="same-origin",Je}function He(Ge){if(Ge.ep)return;Ge.ep=!0;const Je=qe(Ge);fetch(Ge.href,Je)}})();var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs$1(De){return De&&De.__esModule&&Object.prototype.hasOwnProperty.call(De,"default")?De.default:De}function getAugmentedNamespace(De){if(Object.prototype.hasOwnProperty.call(De,"__esModule"))return De;var Me=De.default;if(typeof Me=="function"){var qe=function He(){var Ge=!1;try{Ge=this instanceof He}catch{}return Ge?Reflect.construct(Me,arguments,this.constructor):Me.apply(this,arguments)};qe.prototype=Me.prototype}else qe={};return Object.defineProperty(qe,"__esModule",{value:!0}),Object.keys(De).forEach(function(He){var Ge=Object.getOwnPropertyDescriptor(De,He);Object.defineProperty(qe,He,Ge.get?Ge:{enumerable:!0,get:function(){return De[He]}})}),qe}var jsxRuntime={exports:{}},reactJsxRuntime_production={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.js
@@ -2900,4 +2900,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2900
2900
  padding-top: 16px;
2901
2901
  ${De=>De.scrollable?"":"overflow: hidden"};
2902
2902
  }
2903
- `;function GlobalSubscriber(){const{t:De}=V$2(),{session:Me}=useSessionContext$1(),{info:qe,refresh:He}=useNodeContext();return useSubscription(constantExports.TeamEvents.userUpdated,({teamDid:Ge,user:Je})=>{Ge===qe.did&&Je&&!Je.approved&&Me&&Me.user&&Me.user.did===Je.did&&(H$7.warning(De("session.blockAccess"),{autoHideDuration:10*1e3}),Me.logout())}),useSubscription(constantExports$1.EVENTS.NOTIFICATION_CREATE,Ge=>{Ge.entityType==="node"&&He({silent:!0})}),useSubscription(constantExports$1.EVENTS.NODE_UPDATED,()=>{He({silent:!0})}),null}const authorize=({user:De,launchType:Me,nftId:qe})=>{if(!De)return!1;if(Me==="serverless"){if(!qe)throw new Error("nftId is required");return De?.controller?.nftId===qe}return(De.permissions||[]).includes("mutate_blocklets")},isServerlessBlockletInstalled=De=>De.isGetBlocklet&&De.runtimeBlocklet?.controller?.consumedAt,getRestoredAccessUrl=async De=>{const Me=getBlockletUrls({blocklet:De});let qe="";return qe=Me.find(He=>{try{const{hostname:Ge}=new URL(He);return urlEvaluationExports.isSlpDomain(Ge)}catch(Ge){return console.error(Ge),!1}}),qe||(qe=await getAccessibleUrl(Me)),qe},LaunchBlockletContext=reactExports.createContext({}),{Provider:Provider$1,Consumer:Consumer$1}=LaunchBlockletContext;function LaunchBlockletProvider({children:De}){const{session:Me}=useSessionContext$1(),{t:qe}=V$2(),{api:He,info:Ge}=useNodeContext(),[Je]=useSearchParams(),Ye=Je.get("launchType"),Qe=Je.get("fromLauncher"),Ze=Je.get("blocklet_meta_url")||"",nt=Je.get("nftId")||"",tt=Je.get("from")||"",rt=Je.get("launcherSessionId")||"",ot=Je.get("launcherUrl")||"",at=tt==="url",lt=tt==="empty",ut=at||lt?"":new URL(Ze).origin,[dt,ct]=reactExports.useState({meta:null,appDid:Je.get("appDid")||null,sessionId:Je.get("sessionId")||null,isFree:!0,isExternal:!1,isInstalling:!1,isInstalled:!1,isRunning:!1,launcherSession:null,registryUrl:""}),ft=(mt,bt)=>ct(Et=>({...Et,appDid:mt,sessionId:bt})),ht=authorize({user:Me.user,launchType:Ye,nftId:nt}),[yt,gt]=reactExports.useState(null),[Ct,St]=reactExports.useState(!0),wt=reactExports.useMemo(()=>Ge?getServerUrl(Ge):"",[Ge]),Pt=async mt=>{if(!mt)throw new Error("appDid should not be empty");const{blocklet:bt}=await He.getBlocklet({input:{did:mt,attachConfig:!1}});if(!bt)return null;const Et=constantExports.BlockletStatus[bt.status],Rt=!!nt,Tt=Et<constantExports.BlockletStatus.installed,At=Et===constantExports.BlockletStatus.installed,kt=Et===constantExports.BlockletStatus.running;return ct(_t=>({..._t,isInstalled:At,isRunning:kt,isExternal:Rt,isInstalling:Tt})),{isInstalled:At,isRunning:kt,isExternal:Rt,isInstalling:Tt}},Lt=async()=>{if(St(!0),lt){ct(mt=>({...mt,meta:{title:Je.get("title")||"",description:Je.get("description")||""}})),St(!1);return}try{if(!Ze&&!lt)throw new Error(qe("common.invalidParam"));const[{meta:mt,isFree:bt,registryUrl:Et},{launcherSession:Rt,error:Tt}]=await Promise.all([He.getBlockletMetaFromUrl({input:{url:Ze,checkPrice:!0}}),rt?He.getLauncherSession({input:{launcherSessionId:rt,launcherUrl:ot}}):Promise.resolve({})]);if(rt&&!Rt)throw new Error(`Launch session invalid: ${Tt}`);if(!mt)throw new Error(qe("LaunchBlockletBlocklet.error.loadMetaFailed"));let At={};ht&&dt.appDid&&(At=await Pt(dt.appDid)),ct(kt=>({...kt,...At,meta:mt,isFree:bt,registryUrl:Et,launcherSession:Rt}))}catch(mt){console.error(mt),gt(mt.message)}finally{St(!1)}};reactExports.useEffect(()=>{Me?.user?.role===constantExports$1.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&Me?.user?.controller?.nftId!==nt&&Me.logout(),Lt()},[]),reactExports.useEffect(()=>{Ct||!dt.meta||(ht?dt.appDid&&Pt(dt.appDid).catch(mt=>{H$7.error(mt.message)}):(ct(mt=>({...mt,isInstalled:!1,isRunning:!1,isExternal:!1})),gt(null)))},[ht]);const Ot={meta:dt.meta,isFree:dt.isFree,appDid:dt.appDid,sessionId:dt.sessionId,isInstalling:dt.isInstalling,isInstalled:dt.isInstalled,isExternal:dt.isExternal,isRunning:dt.isRunning,serverUrl:wt,storeUrl:dt.registryUrl||ut,blockletMetaUrl:Ze,fromLauncher:Qe,loading:Ct,error:yt,api:He,getBlocklet:Pt,setAppDid:ft,launcherUrl:ot,launcherSession:dt.launcherSession,launcherSessionId:rt,launchType:Ye};return jsxRuntimeExports.jsx(Provider$1,{value:Ot,children:De})}function useLaunchBlockletContext(){return reactExports.useContext(LaunchBlockletContext)}var useAsyncExports=requireUseAsync();const useAsync=getDefaultExportFromCjs$1(useAsyncExports);function useQuery(){return new URLSearchParams(useLocation().search)}const BlockletAppContext=reactExports.createContext(),{Provider,Consumer}=BlockletAppContext;function BlockletAppProvider({children:De}){const qe=useQuery().get("blocklet_meta_url"),He=useAsync(async()=>{const{data:Je}=await axios.get(qe);return Je});if(He.loading)return jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(CircularProgress,{})});const Ge={meta:He.value,error:He.error};return jsxRuntimeExports.jsx(Provider,{value:Ge,children:De})}BlockletAppProvider.propTypes={children:o$h.any.isRequired};function useBlockletAppContext(){return reactExports.useContext(BlockletAppContext)}const Dashboard=reactExports.lazy(()=>__vitePreload(()=>import("./index-Fs3E_gDS.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),BlockletList=reactExports.lazy(()=>__vitePreload(()=>import("./index-C_WCV7QS.js"),__vite__mapDeps([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,2,31,32,33,34,35,36,37,38]),import.meta.url)),BlockletRestore=reactExports.lazy(()=>__vitePreload(()=>import("./index-ZBdt2zLB.js"),__vite__mapDeps([39,40,41,42,43,44,23,6,35,45,46,47,19,15]),import.meta.url)),BlockletStore=reactExports.lazy(()=>__vitePreload(()=>import("./index-C5LYAduR.js"),__vite__mapDeps([48,6,49,50,51,52,53,17,15,54,31,32,55,56,36,35,57,45,58,4,19,23,24,25,59,60,26,61,62]),import.meta.url)),Settings=reactExports.lazy(()=>__vitePreload(()=>import("./index-aDyspHb_.js"),__vite__mapDeps([63,64,61,65,66,67,26,7,8,9,10,11,12,13,14,15,16,17,18,19,68,22,58,4,2,69,6,70,71,72,73,36,20,74,53,75,76,77]),import.meta.url)),LogPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-CZle5CbS.js"),__vite__mapDeps([78,79,24,25,6]),import.meta.url)),TeamPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-dbT-WrDi.js"),__vite__mapDeps([80,64,81,15,16,17,18,6,82,83,84,85,86,87,54,22,88,36,89,7,8,9,10,11,12,13,14,19,37,24,25,65,90,30,31,32,26,4,91,92,73,2,55,45,93,94,95,50,44,96,97,98,99,100,101,102,103,75,104,105,1,58,106,107]),import.meta.url)),BlockletDetail=reactExports.lazy(()=>__vitePreload(()=>import("./detail-Qa1bqakf.js"),__vite__mapDeps([108,64,20,21,6,19,22,23,24,25,26,54,109,87,62]),import.meta.url)),EULAPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-wvWBQjSc.js"),[],import.meta.url)),Notifications=reactExports.lazy(()=>__vitePreload(()=>import("./index-VAKOMEgj.js"),[],import.meta.url)),IssuePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-Dea9QPzX.js"),__vite__mapDeps([110,111,109,94,10,95,112,113,23]),import.meta.url)),LostPassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-CFpGjsgX.js"),__vite__mapDeps([114,89,57,94,10,112,113,23,34]),import.meta.url)),ExchangePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-C76LlcBP.js"),__vite__mapDeps([115,112,113,23]),import.meta.url)),BlockletLauncher=reactExports.lazy(()=>__vitePreload(()=>import("./index-CfO1ocPd.js"),__vite__mapDeps([116,41,42,43,44,106,107,117,82,83,84,23,28,29,47,38,6,69,60]),import.meta.url)),NotFoundPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-DoLUCdoo.js"),__vite__mapDeps([118,109]),import.meta.url)),Invite=reactExports.lazy(()=>__vitePreload(()=>import("./index-Cww9znhR.js"),__vite__mapDeps([119,111,109,94,10,95,112,113]),import.meta.url)),Console=reactExports.lazy(()=>__vitePreload(()=>import("./index-BSuv2S-j.js"),[],import.meta.url)),AnalyticsPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-jRVN_1vm.js"),__vite__mapDeps([120,64,121,122,52,53,123,13,124,125,91,92,9,73,7,8,10,11,12,14,15,16,17,18,19,126,127,77,6,102,25]),import.meta.url)),GenKeyPair=reactExports.lazy(()=>__vitePreload(()=>import("./index-DAP7V0hj.js"),__vite__mapDeps([128,109]),import.meta.url));function useSharedContext(){const De=useNodeContext(),{session:Me}=useSessionContext$1(),{wallet:qe}=d$e(),He=Me.user&&Me.user.did;return reactExports.useEffect(()=>{const Ge=getWsClient();return He?Ge.connect():Ge.isConnected()&&Ge.disconnect(),()=>{Ge.isConnected()&&Ge.disconnect()}},[He]),reactExports.useEffect(()=>{if(qe)return()=>{};const Ge=()=>{document.visibilityState==="visible"&&Me.refresh()};return document.addEventListener("visibilitychange",Ge),()=>{document.removeEventListener("visibilitychange",Ge)}},[]),{node:De,session:Me}}function ProtectedApp(){const{t:De}=V$2(),{node:Me,session:qe}=useSharedContext(),He=useLocation();reactExports.useEffect(()=>{window.tracker&&typeof window.tracker.pageView=="function"&&window.tracker.pageView(`${He.pathname}${He.search}`)},[He]),reactExports.useEffect(()=>{qe?.user?.role===constantExports$1.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&qe.logout()},[qe?.user?.role]);const Ge=jsxRuntimeExports.jsx(CircularProgress,{});if(Me.loading||qe.loading)return jsxRuntimeExports.jsx(o$f,{children:Ge});if(!Me.info.initialized)return getAuthMethodExports.getServerAuthMethod(Me.info)==="nft"?jsxRuntimeExports.jsx(NodeVerifyOwner,{action:"verify-owner"}):jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(NodeConnectOwner,{})});if(Me.info.upgradeSessionId)return jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(MaintainProgress,{})});if(!qe.user)return jsxRuntimeExports.jsx(NodeLogin,{loadingEle:Ge});const Je=jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(CircularProgress,{})});return jsxRuntimeExports.jsx(BlockletsProvider,{children:jsxRuntimeExports.jsxs(NotificationProvider,{children:[jsxRuntimeExports.jsx(Health,{}),jsxRuntimeExports.jsx(CheckNodeStatus,{}),jsxRuntimeExports.jsx(GlobalSubscriber,{}),jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:Je,children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"/dashboard",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:"Dashboard",children:jsxRuntimeExports.jsx(Dashboard,{})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.blocklets"),children:jsxRuntimeExports.jsx(BlockletList,{})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets/:did/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:"Blocklets",children:jsxRuntimeExports.jsx(BlockletDetail,{})})}),jsxRuntimeExports.jsx(Route,{path:"/settings/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.setting"),children:jsxRuntimeExports.jsx(Settings,{})})}),jsxRuntimeExports.jsx(Route,{path:"/eula",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("setup.steps.eula"),children:jsxRuntimeExports.jsx(EULAPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/store",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.store"),children:jsxRuntimeExports.jsx(BlockletStore,{})})}),jsxRuntimeExports.jsx(Route,{path:"/console",element:jsxRuntimeExports.jsx(DashboardRoute,{title:`GraphQL ${De("common.console")}`,scrollable:!1,fullWidth:!0,children:jsxRuntimeExports.jsx(Console,{})})}),jsxRuntimeExports.jsx(Route,{path:"/notifications",element:jsxRuntimeExports.jsx(DashboardRoute,{title:De("common.notifications"),children:jsxRuntimeExports.jsx(Notifications,{})})}),jsxRuntimeExports.jsx(Route,{path:"/team/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.team"),children:jsxRuntimeExports.jsx(TeamPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/logs/:name?",element:jsxRuntimeExports.jsx(DashboardRoute,{scrollable:!1,fullWidth:!0,title:De("common.logs"),children:jsxRuntimeExports.jsx(LogPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/analytics/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.analytics"),children:jsxRuntimeExports.jsx(AnalyticsPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/",element:jsxRuntimeExports.jsx(Navigate,{to:"/dashboard",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/team",element:jsxRuntimeExports.jsx(Navigate,{to:"/team/members",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/analytics",element:jsxRuntimeExports.jsx(Navigate,{to:"/analytics/traffic",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/router",element:jsxRuntimeExports.jsx(Navigate,{to:"/router/rules",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/settings",element:jsxRuntimeExports.jsx(Navigate,{to:"/settings/basic",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/marketplace",element:jsxRuntimeExports.jsx(Navigate,{to:"/store",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/marketplace/:did",element:jsxRuntimeExports.jsx(Navigate,{to:"/store/:did",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"*",element:jsxRuntimeExports.jsx(NotFoundPage,{})})]})})]})})}function UnprotectedWrapper({children:De}){const{node:Me,session:qe}=useSharedContext();return Me.loading||!qe.initialized&&qe.loading?jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(CircularProgress,{})}):Me.info.upgradeSessionId?jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(MaintainProgress,{})}):De}function App(){const{changeLocale:De}=V$2(),Me=useQuery();reactExports.useEffect(()=>{const He=Me.get("locale");He&&["zh","en"].includes(He)&&De(He)},[]);const qe=jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(CircularProgress,{})});return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:qe,children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/issue-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(IssuePassport,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/lost-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(LostPassport,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/exchange-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(ExchangePassport,{})})}),jsxRuntimeExports.jsx(Route,{path:"/accept-server",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(NodeVerifyOwner,{action:"accept-server"})})}),jsxRuntimeExports.jsx(Route,{path:"/gen-key-pair/",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(GenKeyPair,{})})}),jsxRuntimeExports.jsx(Route,{path:"/launch-blocklet/*",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(LaunchBlockletProvider,{children:jsxRuntimeExports.jsx(BlockletLauncher,{})})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets/restore/*",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(BlockletAppProvider,{children:jsxRuntimeExports.jsx(BlockletRestore,{})})})}),jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/invite`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(Invite,{})})}),jsxRuntimeExports.jsx(Route,{path:"/*",element:jsxRuntimeExports.jsx(ProtectedApp,{})})]})})}function AppWrapper(){const De=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";return jsxRuntimeExports.jsx(BrowserRouter,{history:history$1,basename:De,children:jsxRuntimeExports.jsx(Root,{children:jsxRuntimeExports.jsx(App,{})})})}const root=clientExports.createRoot(document.getElementById("root"));root.render(jsxRuntimeExports.jsx(AppWrapper,{}));const prefix=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";register(`${prefix}/service-worker.js`.replace(/\/+/g,"/"),{registrationOptions:{scope:prefix},registered(){console.info("Service worker has been registered.")},ready(){console.info("Service worker is active.")},cached(){console.info("Content has been cached for offline use.")},updatefound(){console.info("New content is downloading.")},updated(){console.info("New content is available; please refresh.")},offline(){console.info("No internet connection found. App is running in offline mode.")},error(De){console.error("Error during service worker registration:",De)}});export{$$4 as $,useNavigate as A,useSearchParams as B,CircularProgress as C,DialogContentText as D,useMediaQuery as E,libExports$3 as F,Grid$1 as G,H$7 as H,Link$1 as I,BlockletAppAvatar as J,Box as K,Link as L,isEmpty as M,et as N,FormControl as O,InputLabel as P,MenuItem as Q,Checkbox as R,Select as S,Typography as T,Alert as U,V$2 as V,WrappedDidAddress as W,formatError as X,o$f as Y,CheckIcon$2 as Z,propTypesExports as _,useSubscription as a,Menu as a$,api as a0,merge as a1,cloneDeep as a2,IconButton as a3,R$3 as a4,ListItemSecondaryAction as a5,List as a6,ListItem as a7,ListItemText as a8,getServerUrl as a9,ErrorBoundary as aA,k$1 as aB,formatRegistryLogoPath as aC,Icon as aD,ListItemIcon as aE,createSvgIcon as aF,ensureDomainAliases as aG,constantExports$1 as aH,getIp as aI,normalizePathPrefix as aJ,sortBy as aK,stringSortHandlerAsc as aL,getAccessUrl as aM,history$1 as aN,semver as aO,useReactive as aP,useAsyncEffect as aQ,InfoOutlinedIcon as aR,sleep as aS,checkInputByType as aT,FormControlLabel as aU,Stack$1 as aV,useAsync as aW,axios as aX,shouldCheckDomainStatus as aY,formatMountPoint as aZ,urlPathFriendlyExports as a_,useBlockletAppContext as aa,getAuthMethodExports as ab,ConfirmDialog as ac,getRestoredAccessUrl as ad,setSessionToken as ae,isEqual as af,isServerlessBlockletInstalled as ag,Debug as ah,getWsClient as ai,useQuery as aj,getPathPrefix as ak,Global as al,Routes as am,Route as an,Navigate as ao,HeaderAddon as ap,SessionContext as aq,css as ar,$$5 as as,formatToDatetime as at,alpha$1 as au,getLaunchAgreementUrl as av,axios$2 as aw,useSessionContext$1 as ax,Tooltip as ay,getBlockletMetaUrl as az,constantExports as b,clsx$1 as b$,checkIsWildcardDomain as b0,Popover as b1,Card as b2,formatToDate as b3,sortDomains as b4,C$a as b5,Collapse as b6,CheckCircle as b7,styled as b8,isUrl as b9,BlockletAdminRoles as bA,isInstalling as bB,Badge as bC,createAppPassportSvg as bD,NavLink as bE,__vitePreload as bF,SetCache as bG,arrayIncludes$1 as bH,arrayIncludesWith as bI,cacheHas as bJ,baseUniq as bK,baseFlatten as bL,baseRest as bM,last as bN,arrayFilter as bO,isArrayLikeObject as bP,t$a as bQ,isDownloading as bR,getBlockletUrl as bS,getBlockletUrlParams as bT,ButtonBase as bU,memoTheme as bV,emphasize as bW,generateUtilityClasses as bX,generateUtilityClass as bY,useDefaultProps as bZ,useSlotProps as b_,__awaiter as ba,__generator as bb,__spread as bc,getDefaultExportFromCjs$1 as bd,U$3 as be,dayjs$1 as bf,Divider as bg,isCertificateMatch as bh,FormHelperText as bi,FormGroup as bj,o$c as bk,NodeContext as bl,useParams as bm,useNodeContext$1 as bn,uniqBy as bo,l as bp,libExports$1 as bq,B$5 as br,o$9 as bs,l$h as bt,BlockletAvatar as bu,ClickAwayListener as bv,f$8 as bw,createPassportSvg as bx,getWalletType as by,useCreation as bz,createCompounder as c,T$7 as c$,composeClasses as c0,__read as c1,toSlotDomain as c2,omit as c3,fixBlocklet as c4,isProtectedRole as c5,baseOrderBy as c6,isArray$1 as c7,rootShouldForwardProp as c8,useFormControl as c9,isFunction$2 as cA,Container$3 as cB,K$4 as cC,getLauncherBaseURL as cD,SvgIcon as cE,Buffer$1 as cF,parseURL as cG,withHttps as cH,useLaunchBlockletContext as cI,z$3 as cJ,authorize as cK,ArrowForwardIcon as cL,isNewStoreUrl as cM,getAccessibleUrl as cN,getBlockletLogoUrl as cO,t as cP,M$7 as cQ,__spreadArrays as cR,__assign as cS,h$6 as cT,useLocation as cU,l$8 as cV,useMount as cW,s$8 as cX,formatDateTime as cY,getExplorerLink as cZ,patchJsxToLocale as c_,createChainedFunction$1 as ca,useSlot as cb,capitalize$1 as cc,SwitchBase as cd,createSimplePaletteValueFilter as ce,useControlled as cf,useForkRef as cg,useId as ch,getBlockletUrls as ci,defaultCheckAccessible as cj,urlEvaluationExports as ck,memoize as cl,ButtonGroupContext as cm,ButtonGroupButtonContext as cn,useNotificationContext as co,utilExports as cp,NotificationList as cq,useRequest as cr,useMemoizedFn as cs,isNumber$3 as ct,useLatest as cu,dayjs as cv,d$e as cw,Avatar as cx,isFromWallet as cy,usePassportId as cz,useBlockletsContext as d,afterWrite as d$,getSessionToken as d0,LinearProgress as d1,SvgLogo as d2,isNumber$1 as d3,useEnhancedEffect$1 as d4,debounce$2 as d5,ownerWindow as d6,useRtl as d7,KeyboardArrowLeft as d8,KeyboardArrowRight as d9,isObject$3 as dA,require$$0$2 as dB,require$$5$1 as dC,requireConstant$1 as dD,$e$1 as dE,noop$1 as dF,Button as dG,Paper as dH,MenuList as dI,Popper as dJ,_inheritsLoose$1 as dK,ReactDOM as dL,_objectWithoutPropertiesLoose$1 as dM,TransitionGroup as dN,ENTERED as dO,ENTERING as dP,EXITING as dQ,TransitionGroupContext as dR,Transition as dS,config$1 as dT,popperGenerator as dU,eventListeners as dV,popperOffsets$1 as dW,computeStyles$1 as dX,applyStyles$1 as dY,afterMain as dZ,afterRead as d_,useEventCallback$1 as da,ownerDocument as db,l$o as dc,getCommonHtmlTitle as dd,HelmetExport as de,requireReact as df,i$f as dg,oe$2 as dh,ne$2 as di,InfoIcon$2 as dj,upperFirst as dk,camelCase as dl,Skeleton as dm,R$5 as dn,isArrayLike as dp,baseIteratee as dq,keys as dr,toInteger as ds,baseFindIndex as dt,commonjsGlobal as du,getAugmentedNamespace as dv,emotionUtils_browser_esm as dw,requireJsxRuntime as dx,requirePropTypes as dy,requireReactDom as dz,useAsyncRetry as e,StyledEngineProvider as e$,arrow$1 as e0,auto as e1,basePlacements as e2,beforeMain as e3,beforeRead as e4,beforeWrite as e5,bottom as e6,clippingParents as e7,createPopper as e8,createPopper$1 as e9,requireLib$3 as eA,requireConstant$2 as eB,requireUrlPathFriendly as eC,b$8 as eD,data$s as eE,global$2 as eF,hoistStatics as eG,isEqual$3 as eH,usePreviousProps as eI,setRef as eJ,ClearIcon as eK,ArrowDropDownIcon as eL,Chip as eM,filledInputClasses as eN,inputBaseClasses as eO,outlinedInputClasses as eP,inputClasses as eQ,ListContext as eR,getListItemButtonUtilityClass as eS,listItemButtonClasses as eT,emotionReact_browser_esm as eU,emotionCache_browser_esm as eV,cloneDeep$1 as eW,forceReflow as eX,_extends$2 as eY,toString$2 as eZ,mergeThemeOptions as e_,detectOverflow as ea,end as eb,flip$1 as ec,hide$1 as ed,left as ee,main as ef,modifierPhases as eg,offset$1 as eh,placements as ei,popper as ej,preventOverflow$1 as ek,read as el,reference as em,right as en,start as eo,top as ep,variationPlacements as eq,viewport as er,write as es,requireReactIs as et,emotionStyled_browser_esm as eu,emotionSerialize_esm as ev,emotionSheet_esm as ew,process$1 as ex,requireLib$4 as ey,requireLib$5 as ez,useTheme as f,requireLib$1 as f$,ThemeProvider as f0,ThemeProvider$3 as f1,s$3 as f2,CloseIcon as f3,isString$1 as f4,createTheme as f5,createAxios as f6,pick as f7,omitBy as f8,flat as f9,requireNormalizePathPrefix as fA,debounce as fB,useInterval as fC,formatTime as fD,CloseFullscreenIcon as fE,S$8 as fF,TablePagination as fG,parseAvatar as fH,__rest as fI,useEffectWithTarget$1 as fJ,__values as fK,tmp as fL,useUpdate as fM,requireUtil$6 as fN,requireObjectKeys$1 as fO,requireShams$1 as fP,requireCallBound as fQ,requireEsObjectAtoms as fR,requireDefineDataProperty as fS,requireHasPropertyDescriptors as fT,requireCallBind as fU,requireCallBound$1 as fV,requireSafeBuffer$1 as fW,requireBrowser$f as fX,requireElliptic as fY,requireCryptoBrowserify as fZ,requireRipemd160 as f_,MenuIcon as fa,useDebounceFn as fb,Dialog as fc,OutlinedInput as fd,data as fe,Drawer as ff,parseQuery as fg,parseFilename as fh,stringifyParsedURL as fi,Grow as fj,Wt as fk,InputAdornment as fl,tooltipClasses as fm,e$c as fn,requireEngine as fo,__spreadArray as fp,useEventListener as fq,le$7 as fr,getTargetElement as fs,clamp as ft,extractEventHandlers as fu,isFocusVisible as fv,isHostComponent as fw,lighten as fx,darken as fy,slotShouldForwardProp as fz,p$3 as g,isServerless as g$,requireUtil$2 as g0,uniq as g1,useLocalStorageState as g2,InputBase as g3,useSize as g4,DialogTitle as g5,DialogContent as g6,DialogActions as g7,pickBy as g8,shouldForwardProp as g9,isPlainObject$2 as gA,require$$12 as gB,throttle$2 as gC,isUndefined$1 as gD,useTimeout as gE,Fade as gF,FocusTrap as gG,dialogClasses as gH,localizedFormatPlugin as gI,n$8 as gJ,purify as gK,Buffer$1$1 as gL,Q$2 as gM,require$$0$1 as gN,requireIsAbsoluteUrl as gO,requireDist$1 as gP,requireBrowser$3 as gQ,require$$3 as gR,resolveProps as gS,useThemeProps as gT,defaultTheme$1 as gU,THEME_ID as gV,en$2 as gW,isIndex as gX,useTheme$4 as gY,objectAssign as gZ,__extends as g_,resolveComponentProps as ga,getInviteLink as gb,copy as gc,e$e as gd,getIssuePassportLink as ge,uniqBy$1 as gf,isNodeOwner as gg,isSelf as gh,Q$1 as gi,I$3 as gj,Y$3 as gk,PQueue as gl,getBlockletAccessibleUrl as gm,A$1 as gn,createPassportSvg$1 as go,requireMs as gp,E$3 as gq,trim as gr,getBlockletSDK as gs,MoreHorizIcon as gt,identity$1 as gu,arrayEach as gv,baseEach as gw,arrayMap as gx,baseMap as gy,baseForOwn as gz,get$1 as h,SnackbarContent as h$,requireJsonStableStringify as h0,isFunction$1 as h1,omit$1 as h2,TableContext as h3,Tablelvl2Context as h4,g$f as h5,useUnmount as h6,isDidDomainOrIpEchoDomain as h7,ExpandLess as h8,validateDomain as h9,isBrowser$1 as hA,root$1 as hB,isNil$1 as hC,require$$11 as hD,requireHoistNonReactStatics_cjs as hE,_assertThisInitialized$1 as hF,reactDomExports as hG,loadIcon as hH,withoutLeadingSlash as hI,fetchSvgAsPng as hJ,blobToFile as hK,withoutTrailingSlash as hL,u$2 as hM,Ce as hN,t$h as hO,i as hP,R$8 as hQ,p$e as hR,browserExports$1 as hS,BlockletSDK as hT,highlightExports as hU,funcExports as hV,data$y as hW,useSnackbar as hX,common$3 as hY,green as hZ,amber as h_,requireDist$2 as ha,requireAxios as hb,trim$1 as hc,requirePRetry as hd,TableCell as he,xe$1 as hf,getSystemDomains as hg,copyArray as hh,baseIndexOf as hi,ke as hj,useAppLogo as hk,getTransferAppLink as hl,requireBn$1 as hm,require$$2 as hn,updateWindowEnv as ho,M$3 as hp,isNil as hq,requireBase32 as hr,Re$1 as hs,withTrailingSlash as ht,data$B as hu,keyframes as hv,requireAssertString as hw,isEmail as hx,isURL as hy,createUseStorageState as hz,utilExports$1 as i,Modal as i$,d$g as i0,t$1 as i1,useDebounce as i2,Y as i3,g$3 as i4,b as i5,g$a as i6,withErrorBoundary as i7,z$2 as i8,M$4 as i9,getStoreList as iA,commonjsRequire as iB,require_interface as iC,requireHasown as iD,requireBrowser$1 as iE,requireSemver as iF,require$$4$1 as iG,flatten as iH,trimEnd as iI,base32Exports as iJ,flatExports as iK,qt as iL,AxiosError as iM,I$6 as iN,isNull as iO,orange as iP,purple as iQ,useStore as iR,createStore as iS,create$1 as iT,t$i as iU,clientExports as iV,ke$1 as iW,retry as iX,isNetworkError as iY,requirePTimeout as iZ,n$5 as i_,Be as ia,G as ib,xe as ic,useBlockletLogo as id,isPlainObject$1 as ie,Toolbar as ig,_setPrototypeOf as ih,isString$3 as ii,FormLabel as ij,RelativeTime as ik,isIncludeActivity as il,isUserActor as im,ActorAvatar as io,SendComponentAvatar as ip,Activity as iq,NotificationContent$1 as ir,AvatarGroup as is,requireCjs as it,useTheme$2 as iu,baseAssignValue as iv,isValidClusterSize as iw,extractStatusUrlFromNextWorkflow as ix,pWaitFor as iy,hasRequiredSteps as iz,jsxRuntimeExports as j,GlobalStyles$2 as j0,filesize as k,prettyMs as l,formatLocale as m,useSessionContext as n,o$h as o,p$d as p,useSetState as q,reactExports as r,styled$3 as s,TextField as t,useNodeContext as u,n$4 as v,lo as w,getWebWalletUrl as x,joinURL as y,withQuery as z};
2903
+ `;function GlobalSubscriber(){const{t:De}=V$2(),{session:Me}=useSessionContext$1(),{info:qe,refresh:He}=useNodeContext();return useSubscription(constantExports.TeamEvents.userUpdated,({teamDid:Ge,user:Je})=>{Ge===qe.did&&Je&&!Je.approved&&Me&&Me.user&&Me.user.did===Je.did&&(H$7.warning(De("session.blockAccess"),{autoHideDuration:10*1e3}),Me.logout())}),useSubscription(constantExports$1.EVENTS.NOTIFICATION_CREATE,Ge=>{Ge.entityType==="node"&&He({silent:!0})}),useSubscription(constantExports$1.EVENTS.NODE_UPDATED,()=>{He({silent:!0})}),null}const authorize=({user:De,launchType:Me,nftId:qe})=>{if(!De)return!1;if(Me==="serverless"){if(!qe)throw new Error("nftId is required");return De?.controller?.nftId===qe}return(De.permissions||[]).includes("mutate_blocklets")},isServerlessBlockletInstalled=De=>De.isGetBlocklet&&De.runtimeBlocklet?.controller?.consumedAt,getRestoredAccessUrl=async De=>{const Me=getBlockletUrls({blocklet:De});let qe="";return qe=Me.find(He=>{try{const{hostname:Ge}=new URL(He);return urlEvaluationExports.isSlpDomain(Ge)}catch(Ge){return console.error(Ge),!1}}),qe||(qe=await getAccessibleUrl(Me)),qe},LaunchBlockletContext=reactExports.createContext({}),{Provider:Provider$1,Consumer:Consumer$1}=LaunchBlockletContext;function LaunchBlockletProvider({children:De}){const{session:Me}=useSessionContext$1(),{t:qe}=V$2(),{api:He,info:Ge}=useNodeContext(),[Je]=useSearchParams(),Ye=Je.get("launchType"),Qe=Je.get("fromLauncher"),Ze=Je.get("blocklet_meta_url")||"",nt=Je.get("nftId")||"",tt=Je.get("from")||"",rt=Je.get("launcherSessionId")||"",ot=Je.get("launcherUrl")||"",at=tt==="url",lt=tt==="empty",ut=at||lt?"":new URL(Ze).origin,[dt,ct]=reactExports.useState({meta:null,appDid:Je.get("appDid")||null,sessionId:Je.get("sessionId")||null,isFree:!0,isExternal:!1,isInstalling:!1,isInstalled:!1,isRunning:!1,launcherSession:null,registryUrl:""}),ft=(mt,bt)=>ct(Et=>({...Et,appDid:mt,sessionId:bt})),ht=authorize({user:Me.user,launchType:Ye,nftId:nt}),[yt,gt]=reactExports.useState(null),[Ct,St]=reactExports.useState(!0),wt=reactExports.useMemo(()=>Ge?getServerUrl(Ge):"",[Ge]),Pt=async mt=>{if(!mt)throw new Error("appDid should not be empty");const{blocklet:bt}=await He.getBlocklet({input:{did:mt,attachConfig:!1}});if(!bt)return null;const Et=constantExports.BlockletStatus[bt.status],Rt=!!nt,Tt=Et<constantExports.BlockletStatus.installed,At=Et===constantExports.BlockletStatus.installed,kt=Et===constantExports.BlockletStatus.running;return ct(_t=>({..._t,isInstalled:At,isRunning:kt,isExternal:Rt,isInstalling:Tt})),{isInstalled:At,isRunning:kt,isExternal:Rt,isInstalling:Tt}},Lt=async()=>{if(St(!0),lt){ct(mt=>({...mt,meta:{title:Je.get("title")||"",description:Je.get("description")||""}})),St(!1);return}try{if(!Ze&&!lt)throw new Error(qe("common.invalidParam"));const[{meta:mt,isFree:bt,registryUrl:Et},{launcherSession:Rt,error:Tt}]=await Promise.all([He.getBlockletMetaFromUrl({input:{url:Ze,checkPrice:!0}}),rt?He.getLauncherSession({input:{launcherSessionId:rt,launcherUrl:ot}}):Promise.resolve({})]);if(rt&&!Rt)throw new Error(`Launch session invalid: ${Tt}`);if(!mt)throw new Error(qe("LaunchBlockletBlocklet.error.loadMetaFailed"));let At={};ht&&dt.appDid&&(At=await Pt(dt.appDid)),ct(kt=>({...kt,...At,meta:mt,isFree:bt,registryUrl:Et,launcherSession:Rt}))}catch(mt){console.error(mt),gt(mt.message)}finally{St(!1)}};reactExports.useEffect(()=>{Me?.user?.role===constantExports$1.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&Me?.user?.controller?.nftId!==nt&&Me.logout(),Lt()},[]),reactExports.useEffect(()=>{Ct||!dt.meta||(ht?dt.appDid&&Pt(dt.appDid).catch(mt=>{H$7.error(mt.message)}):(ct(mt=>({...mt,isInstalled:!1,isRunning:!1,isExternal:!1})),gt(null)))},[ht]);const Ot={meta:dt.meta,isFree:dt.isFree,appDid:dt.appDid,sessionId:dt.sessionId,isInstalling:dt.isInstalling,isInstalled:dt.isInstalled,isExternal:dt.isExternal,isRunning:dt.isRunning,serverUrl:wt,storeUrl:dt.registryUrl||ut,blockletMetaUrl:Ze,fromLauncher:Qe,loading:Ct,error:yt,api:He,getBlocklet:Pt,setAppDid:ft,launcherUrl:ot,launcherSession:dt.launcherSession,launcherSessionId:rt,launchType:Ye};return jsxRuntimeExports.jsx(Provider$1,{value:Ot,children:De})}function useLaunchBlockletContext(){return reactExports.useContext(LaunchBlockletContext)}var useAsyncExports=requireUseAsync();const useAsync=getDefaultExportFromCjs$1(useAsyncExports);function useQuery(){return new URLSearchParams(useLocation().search)}const BlockletAppContext=reactExports.createContext(),{Provider,Consumer}=BlockletAppContext;function BlockletAppProvider({children:De}){const qe=useQuery().get("blocklet_meta_url"),He=useAsync(async()=>{const{data:Je}=await axios.get(qe);return Je});if(He.loading)return jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(CircularProgress,{})});const Ge={meta:He.value,error:He.error};return jsxRuntimeExports.jsx(Provider,{value:Ge,children:De})}BlockletAppProvider.propTypes={children:o$h.any.isRequired};function useBlockletAppContext(){return reactExports.useContext(BlockletAppContext)}const Dashboard=reactExports.lazy(()=>__vitePreload(()=>import("./index-D9BFE-KZ.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),BlockletList=reactExports.lazy(()=>__vitePreload(()=>import("./index-BpbQbuPw.js"),__vite__mapDeps([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,2,31,32,33,34,35,36,37,38]),import.meta.url)),BlockletRestore=reactExports.lazy(()=>__vitePreload(()=>import("./index-BKazYwLa.js"),__vite__mapDeps([39,40,41,42,43,44,23,6,35,45,46,47,19,15]),import.meta.url)),BlockletStore=reactExports.lazy(()=>__vitePreload(()=>import("./index-DzMtvg-l.js"),__vite__mapDeps([48,6,49,50,51,52,53,17,15,54,31,32,55,56,36,35,57,45,58,4,19,23,24,25,59,60,26,61,62]),import.meta.url)),Settings=reactExports.lazy(()=>__vitePreload(()=>import("./index-ClNNfRgL.js"),__vite__mapDeps([63,64,61,65,66,67,26,7,8,9,10,11,12,13,14,15,16,17,18,19,68,22,58,4,2,69,6,70,71,72,73,36,20,74,53,75,76,77]),import.meta.url)),LogPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-C7u44WUx.js"),__vite__mapDeps([78,79,24,25,6]),import.meta.url)),TeamPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-B8gee_2L.js"),__vite__mapDeps([80,64,81,15,16,17,18,6,82,83,84,85,86,87,54,22,88,36,89,7,8,9,10,11,12,13,14,19,37,24,25,65,90,30,31,32,26,4,91,92,73,2,55,45,93,94,95,50,44,96,97,98,99,100,101,102,103,75,104,105,1,58,106,107]),import.meta.url)),BlockletDetail=reactExports.lazy(()=>__vitePreload(()=>import("./detail-CMFXn2sE.js"),__vite__mapDeps([108,64,20,21,6,19,22,23,24,25,26,54,109,87,62]),import.meta.url)),EULAPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-CKujShY4.js"),[],import.meta.url)),Notifications=reactExports.lazy(()=>__vitePreload(()=>import("./index-Daqes2Jo.js"),[],import.meta.url)),IssuePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-DEol2fO5.js"),__vite__mapDeps([110,111,109,94,10,95,112,113,23]),import.meta.url)),LostPassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-CeSdCZbW.js"),__vite__mapDeps([114,89,57,94,10,112,113,23,34]),import.meta.url)),ExchangePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-DQDzrpet.js"),__vite__mapDeps([115,112,113,23]),import.meta.url)),BlockletLauncher=reactExports.lazy(()=>__vitePreload(()=>import("./index-R1YPOZ_R.js"),__vite__mapDeps([116,41,42,43,44,106,107,117,82,83,84,23,28,29,47,38,6,69,60]),import.meta.url)),NotFoundPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-BPe78k6O.js"),__vite__mapDeps([118,109]),import.meta.url)),Invite=reactExports.lazy(()=>__vitePreload(()=>import("./index-CwQXKxtM.js"),__vite__mapDeps([119,111,109,94,10,95,112,113]),import.meta.url)),Console=reactExports.lazy(()=>__vitePreload(()=>import("./index-C5x2cR57.js"),[],import.meta.url)),AnalyticsPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-D8P50S6m.js"),__vite__mapDeps([120,64,121,122,52,53,123,13,124,125,91,92,9,73,7,8,10,11,12,14,15,16,17,18,19,126,127,77,6,102,25]),import.meta.url)),GenKeyPair=reactExports.lazy(()=>__vitePreload(()=>import("./index-d0DSkbLN.js"),__vite__mapDeps([128,109]),import.meta.url));function useSharedContext(){const De=useNodeContext(),{session:Me}=useSessionContext$1(),{wallet:qe}=d$e(),He=Me.user&&Me.user.did;return reactExports.useEffect(()=>{const Ge=getWsClient();return He?Ge.connect():Ge.isConnected()&&Ge.disconnect(),()=>{Ge.isConnected()&&Ge.disconnect()}},[He]),reactExports.useEffect(()=>{if(qe)return()=>{};const Ge=()=>{document.visibilityState==="visible"&&Me.refresh()};return document.addEventListener("visibilitychange",Ge),()=>{document.removeEventListener("visibilitychange",Ge)}},[]),{node:De,session:Me}}function ProtectedApp(){const{t:De}=V$2(),{node:Me,session:qe}=useSharedContext(),He=useLocation();reactExports.useEffect(()=>{window.tracker&&typeof window.tracker.pageView=="function"&&window.tracker.pageView(`${He.pathname}${He.search}`)},[He]),reactExports.useEffect(()=>{qe?.user?.role===constantExports$1.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&qe.logout()},[qe?.user?.role]);const Ge=jsxRuntimeExports.jsx(CircularProgress,{});if(Me.loading||qe.loading)return jsxRuntimeExports.jsx(o$f,{children:Ge});if(!Me.info.initialized)return getAuthMethodExports.getServerAuthMethod(Me.info)==="nft"?jsxRuntimeExports.jsx(NodeVerifyOwner,{action:"verify-owner"}):jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(NodeConnectOwner,{})});if(Me.info.upgradeSessionId)return jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(MaintainProgress,{})});if(!qe.user)return jsxRuntimeExports.jsx(NodeLogin,{loadingEle:Ge});const Je=jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(CircularProgress,{})});return jsxRuntimeExports.jsx(BlockletsProvider,{children:jsxRuntimeExports.jsxs(NotificationProvider,{children:[jsxRuntimeExports.jsx(Health,{}),jsxRuntimeExports.jsx(CheckNodeStatus,{}),jsxRuntimeExports.jsx(GlobalSubscriber,{}),jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:Je,children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"/dashboard",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:"Dashboard",children:jsxRuntimeExports.jsx(Dashboard,{})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.blocklets"),children:jsxRuntimeExports.jsx(BlockletList,{})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets/:did/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:"Blocklets",children:jsxRuntimeExports.jsx(BlockletDetail,{})})}),jsxRuntimeExports.jsx(Route,{path:"/settings/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.setting"),children:jsxRuntimeExports.jsx(Settings,{})})}),jsxRuntimeExports.jsx(Route,{path:"/eula",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("setup.steps.eula"),children:jsxRuntimeExports.jsx(EULAPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/store",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.store"),children:jsxRuntimeExports.jsx(BlockletStore,{})})}),jsxRuntimeExports.jsx(Route,{path:"/console",element:jsxRuntimeExports.jsx(DashboardRoute,{title:`GraphQL ${De("common.console")}`,scrollable:!1,fullWidth:!0,children:jsxRuntimeExports.jsx(Console,{})})}),jsxRuntimeExports.jsx(Route,{path:"/notifications",element:jsxRuntimeExports.jsx(DashboardRoute,{title:De("notification.title"),children:jsxRuntimeExports.jsx(Notifications,{})})}),jsxRuntimeExports.jsx(Route,{path:"/team/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.team"),children:jsxRuntimeExports.jsx(TeamPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/logs/:name?",element:jsxRuntimeExports.jsx(DashboardRoute,{scrollable:!1,fullWidth:!0,title:De("common.logs"),children:jsxRuntimeExports.jsx(LogPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/analytics/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.analytics"),children:jsxRuntimeExports.jsx(AnalyticsPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/",element:jsxRuntimeExports.jsx(Navigate,{to:"/dashboard",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/team",element:jsxRuntimeExports.jsx(Navigate,{to:"/team/members",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/analytics",element:jsxRuntimeExports.jsx(Navigate,{to:"/analytics/traffic",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/router",element:jsxRuntimeExports.jsx(Navigate,{to:"/router/rules",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/settings",element:jsxRuntimeExports.jsx(Navigate,{to:"/settings/basic",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/marketplace",element:jsxRuntimeExports.jsx(Navigate,{to:"/store",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/marketplace/:did",element:jsxRuntimeExports.jsx(Navigate,{to:"/store/:did",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"*",element:jsxRuntimeExports.jsx(NotFoundPage,{})})]})})]})})}function UnprotectedWrapper({children:De}){const{node:Me,session:qe}=useSharedContext();return Me.loading||!qe.initialized&&qe.loading?jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(CircularProgress,{})}):Me.info.upgradeSessionId?jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(MaintainProgress,{})}):De}function App(){const{changeLocale:De}=V$2(),Me=useQuery();reactExports.useEffect(()=>{const He=Me.get("locale");He&&["zh","en"].includes(He)&&De(He)},[]);const qe=jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(CircularProgress,{})});return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:qe,children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/issue-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(IssuePassport,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/lost-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(LostPassport,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/exchange-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(ExchangePassport,{})})}),jsxRuntimeExports.jsx(Route,{path:"/accept-server",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(NodeVerifyOwner,{action:"accept-server"})})}),jsxRuntimeExports.jsx(Route,{path:"/gen-key-pair/",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(GenKeyPair,{})})}),jsxRuntimeExports.jsx(Route,{path:"/launch-blocklet/*",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(LaunchBlockletProvider,{children:jsxRuntimeExports.jsx(BlockletLauncher,{})})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets/restore/*",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(BlockletAppProvider,{children:jsxRuntimeExports.jsx(BlockletRestore,{})})})}),jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/invite`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(Invite,{})})}),jsxRuntimeExports.jsx(Route,{path:"/*",element:jsxRuntimeExports.jsx(ProtectedApp,{})})]})})}function AppWrapper(){const De=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";return jsxRuntimeExports.jsx(BrowserRouter,{history:history$1,basename:De,children:jsxRuntimeExports.jsx(Root,{children:jsxRuntimeExports.jsx(App,{})})})}const root=clientExports.createRoot(document.getElementById("root"));root.render(jsxRuntimeExports.jsx(AppWrapper,{}));const prefix=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";register(`${prefix}/service-worker.js`.replace(/\/+/g,"/"),{registrationOptions:{scope:prefix},registered(){console.info("Service worker has been registered.")},ready(){console.info("Service worker is active.")},cached(){console.info("Content has been cached for offline use.")},updatefound(){console.info("New content is downloading.")},updated(){console.info("New content is available; please refresh.")},offline(){console.info("No internet connection found. App is running in offline mode.")},error(De){console.error("Error during service worker registration:",De)}});export{$$4 as $,useNavigate as A,useSearchParams as B,CircularProgress as C,DialogContentText as D,useMediaQuery as E,libExports$3 as F,Grid$1 as G,H$7 as H,Link$1 as I,BlockletAppAvatar as J,Box as K,Link as L,isEmpty as M,et as N,FormControl as O,InputLabel as P,MenuItem as Q,Checkbox as R,Select as S,Typography as T,Alert as U,V$2 as V,WrappedDidAddress as W,formatError as X,o$f as Y,CheckIcon$2 as Z,propTypesExports as _,useSubscription as a,Menu as a$,api as a0,merge as a1,cloneDeep as a2,IconButton as a3,R$3 as a4,ListItemSecondaryAction as a5,List as a6,ListItem as a7,ListItemText as a8,getServerUrl as a9,ErrorBoundary as aA,k$1 as aB,formatRegistryLogoPath as aC,Icon as aD,ListItemIcon as aE,createSvgIcon as aF,ensureDomainAliases as aG,constantExports$1 as aH,getIp as aI,normalizePathPrefix as aJ,sortBy as aK,stringSortHandlerAsc as aL,getAccessUrl as aM,history$1 as aN,semver as aO,useReactive as aP,useAsyncEffect as aQ,InfoOutlinedIcon as aR,sleep as aS,checkInputByType as aT,FormControlLabel as aU,Stack$1 as aV,useAsync as aW,axios as aX,shouldCheckDomainStatus as aY,formatMountPoint as aZ,urlPathFriendlyExports as a_,useBlockletAppContext as aa,getAuthMethodExports as ab,ConfirmDialog as ac,getRestoredAccessUrl as ad,setSessionToken as ae,isEqual as af,isServerlessBlockletInstalled as ag,Debug as ah,getWsClient as ai,useQuery as aj,getPathPrefix as ak,Global as al,Routes as am,Route as an,Navigate as ao,HeaderAddon as ap,SessionContext as aq,css as ar,$$5 as as,formatToDatetime as at,alpha$1 as au,getLaunchAgreementUrl as av,axios$2 as aw,useSessionContext$1 as ax,Tooltip as ay,getBlockletMetaUrl as az,constantExports as b,clsx$1 as b$,checkIsWildcardDomain as b0,Popover as b1,Card as b2,formatToDate as b3,sortDomains as b4,C$a as b5,Collapse as b6,CheckCircle as b7,styled as b8,isUrl as b9,BlockletAdminRoles as bA,isInstalling as bB,Badge as bC,createAppPassportSvg as bD,NavLink as bE,__vitePreload as bF,SetCache as bG,arrayIncludes$1 as bH,arrayIncludesWith as bI,cacheHas as bJ,baseUniq as bK,baseFlatten as bL,baseRest as bM,last as bN,arrayFilter as bO,isArrayLikeObject as bP,t$a as bQ,isDownloading as bR,getBlockletUrl as bS,getBlockletUrlParams as bT,ButtonBase as bU,memoTheme as bV,emphasize as bW,generateUtilityClasses as bX,generateUtilityClass as bY,useDefaultProps as bZ,useSlotProps as b_,__awaiter as ba,__generator as bb,__spread as bc,getDefaultExportFromCjs$1 as bd,U$3 as be,dayjs$1 as bf,Divider as bg,isCertificateMatch as bh,FormHelperText as bi,FormGroup as bj,o$c as bk,NodeContext as bl,useParams as bm,useNodeContext$1 as bn,uniqBy as bo,l as bp,libExports$1 as bq,B$5 as br,o$9 as bs,l$h as bt,BlockletAvatar as bu,ClickAwayListener as bv,f$8 as bw,createPassportSvg as bx,getWalletType as by,useCreation as bz,createCompounder as c,T$7 as c$,composeClasses as c0,__read as c1,toSlotDomain as c2,omit as c3,fixBlocklet as c4,isProtectedRole as c5,baseOrderBy as c6,isArray$1 as c7,rootShouldForwardProp as c8,useFormControl as c9,isFunction$2 as cA,Container$3 as cB,K$4 as cC,getLauncherBaseURL as cD,SvgIcon as cE,Buffer$1 as cF,parseURL as cG,withHttps as cH,useLaunchBlockletContext as cI,z$3 as cJ,authorize as cK,ArrowForwardIcon as cL,isNewStoreUrl as cM,getAccessibleUrl as cN,getBlockletLogoUrl as cO,t as cP,M$7 as cQ,__spreadArrays as cR,__assign as cS,h$6 as cT,useLocation as cU,l$8 as cV,useMount as cW,s$8 as cX,formatDateTime as cY,getExplorerLink as cZ,patchJsxToLocale as c_,createChainedFunction$1 as ca,useSlot as cb,capitalize$1 as cc,SwitchBase as cd,createSimplePaletteValueFilter as ce,useControlled as cf,useForkRef as cg,useId as ch,getBlockletUrls as ci,defaultCheckAccessible as cj,urlEvaluationExports as ck,memoize as cl,ButtonGroupContext as cm,ButtonGroupButtonContext as cn,useNotificationContext as co,utilExports as cp,NotificationList as cq,useRequest as cr,useMemoizedFn as cs,isNumber$3 as ct,useLatest as cu,dayjs as cv,d$e as cw,Avatar as cx,isFromWallet as cy,usePassportId as cz,useBlockletsContext as d,afterWrite as d$,getSessionToken as d0,LinearProgress as d1,SvgLogo as d2,isNumber$1 as d3,useEnhancedEffect$1 as d4,debounce$2 as d5,ownerWindow as d6,useRtl as d7,KeyboardArrowLeft as d8,KeyboardArrowRight as d9,isObject$3 as dA,require$$0$2 as dB,require$$5$1 as dC,requireConstant$1 as dD,$e$1 as dE,noop$1 as dF,Button as dG,Paper as dH,MenuList as dI,Popper as dJ,_inheritsLoose$1 as dK,ReactDOM as dL,_objectWithoutPropertiesLoose$1 as dM,TransitionGroup as dN,ENTERED as dO,ENTERING as dP,EXITING as dQ,TransitionGroupContext as dR,Transition as dS,config$1 as dT,popperGenerator as dU,eventListeners as dV,popperOffsets$1 as dW,computeStyles$1 as dX,applyStyles$1 as dY,afterMain as dZ,afterRead as d_,useEventCallback$1 as da,ownerDocument as db,l$o as dc,getCommonHtmlTitle as dd,HelmetExport as de,requireReact as df,i$f as dg,oe$2 as dh,ne$2 as di,InfoIcon$2 as dj,upperFirst as dk,camelCase as dl,Skeleton as dm,R$5 as dn,isArrayLike as dp,baseIteratee as dq,keys as dr,toInteger as ds,baseFindIndex as dt,commonjsGlobal as du,getAugmentedNamespace as dv,emotionUtils_browser_esm as dw,requireJsxRuntime as dx,requirePropTypes as dy,requireReactDom as dz,useAsyncRetry as e,StyledEngineProvider as e$,arrow$1 as e0,auto as e1,basePlacements as e2,beforeMain as e3,beforeRead as e4,beforeWrite as e5,bottom as e6,clippingParents as e7,createPopper as e8,createPopper$1 as e9,requireLib$3 as eA,requireConstant$2 as eB,requireUrlPathFriendly as eC,b$8 as eD,data$s as eE,global$2 as eF,hoistStatics as eG,isEqual$3 as eH,usePreviousProps as eI,setRef as eJ,ClearIcon as eK,ArrowDropDownIcon as eL,Chip as eM,filledInputClasses as eN,inputBaseClasses as eO,outlinedInputClasses as eP,inputClasses as eQ,ListContext as eR,getListItemButtonUtilityClass as eS,listItemButtonClasses as eT,emotionReact_browser_esm as eU,emotionCache_browser_esm as eV,cloneDeep$1 as eW,forceReflow as eX,_extends$2 as eY,toString$2 as eZ,mergeThemeOptions as e_,detectOverflow as ea,end as eb,flip$1 as ec,hide$1 as ed,left as ee,main as ef,modifierPhases as eg,offset$1 as eh,placements as ei,popper as ej,preventOverflow$1 as ek,read as el,reference as em,right as en,start as eo,top as ep,variationPlacements as eq,viewport as er,write as es,requireReactIs as et,emotionStyled_browser_esm as eu,emotionSerialize_esm as ev,emotionSheet_esm as ew,process$1 as ex,requireLib$4 as ey,requireLib$5 as ez,useTheme as f,requireLib$1 as f$,ThemeProvider as f0,ThemeProvider$3 as f1,s$3 as f2,CloseIcon as f3,isString$1 as f4,createTheme as f5,createAxios as f6,pick as f7,omitBy as f8,flat as f9,requireNormalizePathPrefix as fA,debounce as fB,useInterval as fC,formatTime as fD,CloseFullscreenIcon as fE,S$8 as fF,TablePagination as fG,parseAvatar as fH,__rest as fI,useEffectWithTarget$1 as fJ,__values as fK,tmp as fL,useUpdate as fM,requireUtil$6 as fN,requireObjectKeys$1 as fO,requireShams$1 as fP,requireCallBound as fQ,requireEsObjectAtoms as fR,requireDefineDataProperty as fS,requireHasPropertyDescriptors as fT,requireCallBind as fU,requireCallBound$1 as fV,requireSafeBuffer$1 as fW,requireBrowser$f as fX,requireElliptic as fY,requireCryptoBrowserify as fZ,requireRipemd160 as f_,MenuIcon as fa,useDebounceFn as fb,Dialog as fc,OutlinedInput as fd,data as fe,Drawer as ff,parseQuery as fg,parseFilename as fh,stringifyParsedURL as fi,Grow as fj,Wt as fk,InputAdornment as fl,tooltipClasses as fm,e$c as fn,requireEngine as fo,__spreadArray as fp,useEventListener as fq,le$7 as fr,getTargetElement as fs,clamp as ft,extractEventHandlers as fu,isFocusVisible as fv,isHostComponent as fw,lighten as fx,darken as fy,slotShouldForwardProp as fz,p$3 as g,isServerless as g$,requireUtil$2 as g0,uniq as g1,useLocalStorageState as g2,InputBase as g3,useSize as g4,DialogTitle as g5,DialogContent as g6,DialogActions as g7,pickBy as g8,shouldForwardProp as g9,isPlainObject$2 as gA,require$$12 as gB,throttle$2 as gC,isUndefined$1 as gD,useTimeout as gE,Fade as gF,FocusTrap as gG,dialogClasses as gH,localizedFormatPlugin as gI,n$8 as gJ,purify as gK,Buffer$1$1 as gL,Q$2 as gM,require$$0$1 as gN,requireIsAbsoluteUrl as gO,requireDist$1 as gP,requireBrowser$3 as gQ,require$$3 as gR,resolveProps as gS,useThemeProps as gT,defaultTheme$1 as gU,THEME_ID as gV,en$2 as gW,isIndex as gX,useTheme$4 as gY,objectAssign as gZ,__extends as g_,resolveComponentProps as ga,getInviteLink as gb,copy as gc,e$e as gd,getIssuePassportLink as ge,uniqBy$1 as gf,isNodeOwner as gg,isSelf as gh,Q$1 as gi,I$3 as gj,Y$3 as gk,PQueue as gl,getBlockletAccessibleUrl as gm,A$1 as gn,createPassportSvg$1 as go,requireMs as gp,E$3 as gq,trim as gr,getBlockletSDK as gs,MoreHorizIcon as gt,identity$1 as gu,arrayEach as gv,baseEach as gw,arrayMap as gx,baseMap as gy,baseForOwn as gz,get$1 as h,SnackbarContent as h$,requireJsonStableStringify as h0,isFunction$1 as h1,omit$1 as h2,TableContext as h3,Tablelvl2Context as h4,g$f as h5,useUnmount as h6,isDidDomainOrIpEchoDomain as h7,ExpandLess as h8,validateDomain as h9,isBrowser$1 as hA,root$1 as hB,isNil$1 as hC,require$$11 as hD,requireHoistNonReactStatics_cjs as hE,_assertThisInitialized$1 as hF,reactDomExports as hG,loadIcon as hH,withoutLeadingSlash as hI,fetchSvgAsPng as hJ,blobToFile as hK,withoutTrailingSlash as hL,u$2 as hM,Ce as hN,t$h as hO,i as hP,R$8 as hQ,p$e as hR,browserExports$1 as hS,BlockletSDK as hT,highlightExports as hU,funcExports as hV,data$y as hW,useSnackbar as hX,common$3 as hY,green as hZ,amber as h_,requireDist$2 as ha,requireAxios as hb,trim$1 as hc,requirePRetry as hd,TableCell as he,xe$1 as hf,getSystemDomains as hg,copyArray as hh,baseIndexOf as hi,ke as hj,useAppLogo as hk,getTransferAppLink as hl,requireBn$1 as hm,require$$2 as hn,updateWindowEnv as ho,M$3 as hp,isNil as hq,requireBase32 as hr,Re$1 as hs,withTrailingSlash as ht,data$B as hu,keyframes as hv,requireAssertString as hw,isEmail as hx,isURL as hy,createUseStorageState as hz,utilExports$1 as i,Modal as i$,d$g as i0,t$1 as i1,useDebounce as i2,Y as i3,g$3 as i4,b as i5,g$a as i6,withErrorBoundary as i7,z$2 as i8,M$4 as i9,getStoreList as iA,commonjsRequire as iB,require_interface as iC,requireHasown as iD,requireBrowser$1 as iE,requireSemver as iF,require$$4$1 as iG,flatten as iH,trimEnd as iI,base32Exports as iJ,flatExports as iK,qt as iL,AxiosError as iM,I$6 as iN,isNull as iO,orange as iP,purple as iQ,useStore as iR,createStore as iS,create$1 as iT,t$i as iU,clientExports as iV,ke$1 as iW,retry as iX,isNetworkError as iY,requirePTimeout as iZ,n$5 as i_,Be as ia,G as ib,xe as ic,useBlockletLogo as id,isPlainObject$1 as ie,Toolbar as ig,_setPrototypeOf as ih,isString$3 as ii,FormLabel as ij,RelativeTime as ik,isIncludeActivity as il,isUserActor as im,ActorAvatar as io,SendComponentAvatar as ip,Activity as iq,NotificationContent$1 as ir,AvatarGroup as is,requireCjs as it,useTheme$2 as iu,baseAssignValue as iv,isValidClusterSize as iw,extractStatusUrlFromNextWorkflow as ix,pWaitFor as iy,hasRequiredSteps as iz,jsxRuntimeExports as j,GlobalStyles$2 as j0,filesize as k,prettyMs as l,formatLocale as m,useSessionContext as n,o$h as o,p$d as p,useSetState as q,reactExports as r,styled$3 as s,TextField as t,useNodeContext as u,n$4 as v,lo as w,getWebWalletUrl as x,joinURL as y,withQuery as z};