@abtnode/webapp 1.17.8-beta-20260116-080047-9fdd00d3 → 1.17.8-beta-20260119-102944-6ba93a16

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 (208) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-CHVRCEwB.js → AdapterDayjs-QPUTgQRV.js} +6 -6
  4. package/dist/assets/{Add-IxR__ozX.js → Add-vvp5juzF.js} +1 -1
  5. package/dist/assets/ArrowDropDown-CZ9_k8VG.js +1 -0
  6. package/dist/assets/{Autocomplete-OhxbbTq9.js → Autocomplete-BqPV4fCq.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-CfkRwQNu.js → Breadcrumbs-DEV3jkdC.js} +1 -1
  8. package/dist/assets/{ButtonGroup--8rwLvQ8.js → ButtonGroup-BDg4XqiR.js} +1 -1
  9. package/dist/assets/{CSSTransition-D4fabzL2.js → CSSTransition-CoGzojVI.js} +1 -1
  10. package/dist/assets/{CallMerge-Di3dNXj5.js → CallMerge-C5DyJ6fm.js} +1 -1
  11. package/dist/assets/{CardContent-CPUlyd-R.js → CardContent-rjL6kB_r.js} +1 -1
  12. package/dist/assets/{ChevronLeft-lzYf4tao.js → ChevronLeft-DqSG9UHo.js} +1 -1
  13. package/dist/assets/{ChevronRight-CO-Fv8kP.js → ChevronRight-DxsEcvUg.js} +1 -1
  14. package/dist/assets/{Clear-DriUx9_Q.js → Clear-Bq2o3otF.js} +1 -1
  15. package/dist/assets/{Delete-DkHujAB7.js → Delete-RCnwfW1g.js} +1 -1
  16. package/dist/assets/{DeleteOutline-DUcJA7eO.js → DeleteOutline-BXoQnWFj.js} +1 -1
  17. package/dist/assets/{Done-B_L7rkHk.js → Done-DVQ_2sA2.js} +1 -1
  18. package/dist/assets/{Edit-DgzPfnB_.js → Edit-DVXYin_T.js} +1 -1
  19. package/dist/assets/{EditOutlined-yXcT-6A0.js → EditOutlined-CHgCULNs.js} +1 -1
  20. package/dist/assets/{ErrorOutline-B7jRfGmR.js → ErrorOutline-qdJUw5q6.js} +1 -1
  21. package/dist/assets/{FilterList-DMbHmf0X.js → FilterList-Dfj9GsZN.js} +1 -1
  22. package/dist/assets/{Google-DMfPhzx4.js → Google-BtG0IwAt.js} +1 -1
  23. package/dist/assets/{HelpOutline-Be59cdK1.js → HelpOutline-DaGemEcX.js} +1 -1
  24. package/dist/assets/{Launch-B8FfXmf_.js → Launch-BsxqWG7C.js} +1 -1
  25. package/dist/assets/{Link-wdDqdiCm.js → Link-BRsXeoEC.js} +1 -1
  26. package/dist/assets/{ListItemButton-BHNRxd8I.js → ListItemButton-kpGgMj08.js} +1 -1
  27. package/dist/assets/{ListSubheader-UFJcQfY_.js → ListSubheader-BTZwmxdp.js} +1 -1
  28. package/dist/assets/{LoadingButton-CUdpFc0p.js → LoadingButton-DZ6V6Qhe.js} +1 -1
  29. package/dist/assets/{LottiePlayer.modern-Jxnonfmi.js → LottiePlayer.modern-H3Pn2YNu.js} +1 -1
  30. package/dist/assets/{MoreVert-BVgcfW7V.js → MoreVert-DxM-B8xa.js} +1 -1
  31. package/dist/assets/{OpenInNew-CEBJXmxa.js → OpenInNew-BUUx7OSU.js} +1 -1
  32. package/dist/assets/{Refresh-DrflkqFW.js → Refresh-BV0ShuHj.js} +1 -1
  33. package/dist/assets/{Replay-qvum4SpI.js → Replay-DyvF6A5F.js} +1 -1
  34. package/dist/assets/{Search-CtujvL0H.js → Search-m3CMNGDm.js} +1 -1
  35. package/dist/assets/{Stepper-CJfsKFpi.js → Stepper-DR0cCC-q.js} +1 -1
  36. package/dist/assets/{TableSearch-CdKaHbVQ.js → TableSearch-okRl0dqT.js} +1 -1
  37. package/dist/assets/{ToggleButtonGroup-BP4C4KFu.js → ToggleButtonGroup-DxIvj50j.js} +1 -1
  38. package/dist/assets/{UnfoldMore-BvZuyACH.js → UnfoldMore-CZT-4-ZR.js} +1 -1
  39. package/dist/assets/Verified-C1aYOY3u.js +1 -0
  40. package/dist/assets/{VerifiedUser-D0ltmMtV.js → VerifiedUser-CS3FW2sd.js} +1 -1
  41. package/dist/assets/{ViewList--urcCqVt.js → ViewList-CXrUBR0t.js} +1 -1
  42. package/dist/assets/{_createAggregator-G6HCftPW.js → _createAggregator-BunO9xPF.js} +1 -1
  43. package/dist/assets/{actions-5RspfWE_.js → actions-CoszoXjw.js} +1 -1
  44. package/dist/assets/{actions-DjLoksgL.js → actions-DE2r6nPV.js} +1 -1
  45. package/dist/assets/{actions-CQAb6_Rz.js → actions-MiEliG9R.js} +1 -1
  46. package/dist/assets/{agreement-b4V3Z14P.js → agreement-CiVQRYD2.js} +1 -1
  47. package/dist/assets/api-CKaiYijO.js +1 -0
  48. package/dist/assets/{appearance-AiyB_V1W.js → appearance-DtyCmGdO.js} +1 -1
  49. package/dist/assets/{ar-BHqjWgUQ.js → ar-DOhYGTlW.js} +1 -1
  50. package/dist/assets/{audit-logs-C4Hps2ag.js → audit-logs-DQ3aFS2x.js} +2 -2
  51. package/dist/assets/{babel-sNEik07f.js → babel-yl1c6pTl.js} +1 -1
  52. package/dist/assets/{base-chart-BE2BHY3Y.js → base-chart-G_tNYsY8.js} +1 -1
  53. package/dist/assets/{blocklet-lDvdqhrX.js → blocklet-CzBGFesP.js} +1 -1
  54. package/dist/assets/{chain-BQMbjNUU.js → chain-z8CuvP-V.js} +1 -1
  55. package/dist/assets/{click-to-copy-C6h97nXy.js → click-to-copy-DXIfZNln.js} +1 -1
  56. package/dist/assets/cloneDeep-BDiWjxRu.js +1 -0
  57. package/dist/assets/config-navigation-BYqsSWyl.js +472 -0
  58. package/dist/assets/{connect-B1msLBDb.js → connect-64-QZQcE.js} +3 -3
  59. package/dist/assets/{connect-to-DeMt1m5c.js → connect-to-CeGdVeiX.js} +3 -3
  60. package/dist/assets/{de-QUGQFv2K.js → de-CtKPdGk6.js} +1 -1
  61. package/dist/assets/{delete-confirm-DyLbGAy5.js → delete-confirm-Dh3X0iXU.js} +1 -1
  62. package/dist/assets/{depsEqual-CM0PEscV.js → depsEqual-Bfsv3kHf.js} +1 -1
  63. package/dist/assets/{detail-C3fs8uRl.js → detail-C4nQbO7d.js} +2 -2
  64. package/dist/assets/{domains-CVE_fz_I.js → domains-7n5twKTf.js} +2 -2
  65. package/dist/assets/{download-f9_CnIWg.js → download-CFyTq_FK.js} +1 -1
  66. package/dist/assets/{edit.svg-Bdq-FCGM.js → edit.svg-DBlxe-2U.js} +1 -1
  67. package/dist/assets/emotion-cache.browser.esm-Cu824RS4.js +1 -0
  68. package/dist/assets/engine-Bbh7Mw-7.js +1 -0
  69. package/dist/assets/{es-C4w6cL07.js → es-BSYtSZPg.js} +1 -1
  70. package/dist/assets/{fr-Bq3UipEu.js → fr-C35fi7h9.js} +1 -1
  71. package/dist/assets/{get-safe-url-RPQVYlWr.js → get-safe-url-BTJDduf6.js} +1 -1
  72. package/dist/assets/getValidReactChildren-T3CvLHYr.js +1 -0
  73. package/dist/assets/{graphql-5mE8kB37.js → graphql-Cnx2YXBE.js} +1 -1
  74. package/dist/assets/{graphqlMode-BHMSwqwV.js → graphqlMode-7KCJGlgj.js} +2 -2
  75. package/dist/assets/{hi-DGZy0DLh.js → hi-5fpYJkiW.js} +1 -1
  76. package/dist/assets/{html-title-DE0TrRVC.js → html-title-CQe12Cut.js} +1 -1
  77. package/dist/assets/{id-DOzDilAf.js → id-DoVb0JYr.js} +1 -1
  78. package/dist/assets/{iframe-B7aYePTd.js → iframe-BWle7w_S.js} +1 -1
  79. package/dist/assets/{index-r58wskKh.js → index-AaVex2Te.js} +1 -1
  80. package/dist/assets/{index-B4azxfc8.js → index-B8JpxHJE.js} +1 -1
  81. package/dist/assets/{index-hG-7kift.js → index-BCrgfevn.js} +2 -2
  82. package/dist/assets/index-BHLEff7q.js +369 -0
  83. package/dist/assets/{index-DbRhfp5G.js → index-BMGgZI9D.js} +1 -1
  84. package/dist/assets/{index-CaLjm3Sr.js → index-BXpvvqAs.js} +1 -1
  85. package/dist/assets/{index-D7yowN9E.js → index-BcZYQGNY.js} +8 -8
  86. package/dist/assets/{index-CEn1Olzp.js → index-Bg6faJyI.js} +1 -1
  87. package/dist/assets/{index-B2xyyyAv.js → index-Bv6Ryg7V.js} +1 -1
  88. package/dist/assets/index-BzFgWQ5w.js +1 -0
  89. package/dist/assets/{index-DaEqVg3j.js → index-C73PGWD5.js} +1 -1
  90. package/dist/assets/{index-B29Pha71.js → index-C97bSDg2.js} +3 -3
  91. package/dist/assets/index-CBCPHvf_.js +102 -0
  92. package/dist/assets/{index-B1mmOd5b.js → index-CJ_aJ5dR.js} +1 -1
  93. package/dist/assets/{index-DmCKwIHx.js → index-CQob6fmR.js} +4 -4
  94. package/dist/assets/{index-BqqU8gwj.js → index-CTjBZAn9.js} +1 -1
  95. package/dist/assets/{index-2l_1Jppv.js → index-CUGajpSS.js} +3 -3
  96. package/dist/assets/{index-CWB_ryH-.js → index-CXEKSKL7.js} +1 -1
  97. package/dist/assets/{index-BgYMQ-SO.js → index-ChmYDkPv.js} +2 -2
  98. package/dist/assets/{index-QndNtIi-.js → index-CoHxWTi-.js} +1 -1
  99. package/dist/assets/{index-9co-KaYp.js → index-D42m9V9f.js} +9 -9
  100. package/dist/assets/{index-EzJJEvjR.js → index-D4yrNQ5O.js} +3 -3
  101. package/dist/assets/{index-CPZ5M8hw.js → index-DBtWMsht.js} +1 -1
  102. package/dist/assets/{index-DaVz8byr.js → index-DHLFobHl.js} +3 -3
  103. package/dist/assets/{index-nVFW1KOC.js → index-DJt6Q1WW.js} +1 -1
  104. package/dist/assets/{index-BtOLGXbe.js → index-DSG25x4F.js} +1 -1
  105. package/dist/assets/{index-BfetuCUm.js → index-DTVaw2Hc.js} +4 -4
  106. package/dist/assets/{index-BfQLSa8k.js → index-DUEj1V-j.js} +1 -1
  107. package/dist/assets/{index-Cmj8zxd_.js → index-DVR29wYi.js} +14 -14
  108. package/dist/assets/index-Denq1UAZ.js +20 -0
  109. package/dist/assets/{index-BcjR7La5.js → index-DfCxzzye.js} +1 -1
  110. package/dist/assets/{index-Beek8Qoq.js → index-DftYcsPB.js} +6 -6
  111. package/dist/assets/{index-B0oOTjeC.js → index-DqCVCPmC.js} +1 -1
  112. package/dist/assets/{index-BIgX2N1A.js → index-DrI_kbUr.js} +6 -6
  113. package/dist/assets/{index-ByymZrPq.js → index-DtIwM7gL.js} +2 -2
  114. package/dist/assets/{index-BBu-RTSN.js → index-DyNVa2Lx.js} +1 -1
  115. package/dist/assets/{index-DYd4YT_K.js → index-G-jrPGsm.js} +1 -1
  116. package/dist/assets/{index-BX6YpiBs.js → index-Ii4Xi_du.js} +2 -2
  117. package/dist/assets/{index-BZ5rC2Lk.js → index-P2FBSyZf.js} +1 -1
  118. package/dist/assets/{index-Ca61GFb8.js → index-dCiAdDNg.js} +1 -1
  119. package/dist/assets/{index-Bm8Rp86x.js → index-kSplQjj2.js} +1 -1
  120. package/dist/assets/{index-82LLl9rh.js → index-nmsk2vjw.js} +2 -2
  121. package/dist/assets/{index-CVpBdzTr.js → index-nsujgMc_.js} +1 -1
  122. package/dist/assets/{index-D3SOJZGy.js → index-u76kHZTc.js} +3 -3
  123. package/dist/assets/{index-gwhKA5OT.js → index-xtzr7R_I.js} +1 -1
  124. package/dist/assets/{index.esm-C5mhDUsD.js → index.esm-iaB2Jgy_.js} +1 -1
  125. package/dist/assets/{install-from-url-DPdbO0Jq.js → install-from-url-CzhDO2C0.js} +1 -1
  126. package/dist/assets/{invitation-3RtS1iUK.js → invitation-C3HrxXln.js} +2 -2
  127. package/dist/assets/is-path-prefix-equal-dPdZJpAg.js +1 -0
  128. package/dist/assets/{isEmail-apFH2MvD.js → isEmail-CmCW4Fgq.js} +1 -1
  129. package/dist/assets/item-C6yFM2Os.js +163 -0
  130. package/dist/assets/{ja-DMq-YXDX.js → ja-DZPUwZ9l.js} +1 -1
  131. package/dist/assets/{jsonMode-RjxYywbi.js → jsonMode-BRueWwe6.js} +1 -1
  132. package/dist/assets/{ko-BrYbXurh.js → ko-q4i4r9g6.js} +1 -1
  133. package/dist/assets/{list-header-BNS6BF2P.js → list-header-s21LDuvb.js} +1 -1
  134. package/dist/assets/{lite-C-Ikw2GQ.js → lite-BBz66z5Z.js} +2 -2
  135. package/dist/assets/{lock.svg-BFdqOrkF.js → lock.svg-DK1hXFWn.js} +1 -1
  136. package/dist/assets/{log-DZlkZyGX.js → log-DRaCmTGd.js} +1 -1
  137. package/dist/assets/{login-method-item-ZVrK6tB1.js → login-method-item-DwSmGt8t.js} +1 -1
  138. package/dist/assets/{lottie-react.esm-A7yQ3Nfv.js → lottie-react.esm-DqwAKW0L.js} +1 -1
  139. package/dist/assets/{memory-CoCFCBkX.js → memory-VAHG3fjG.js} +1 -1
  140. package/dist/assets/{metric-B3S53u3H.js → metric-B6TET6QI.js} +1 -1
  141. package/dist/assets/{monaco-editor-CQ6Pm7Hi.js → monaco-editor-BH4xSgKB.js} +3 -3
  142. package/dist/assets/{mouseTarget-DxlEpFaz.js → mouseTarget-txK7mk_L.js} +1 -1
  143. package/dist/assets/omit-B-qG4p98.js +1 -0
  144. package/dist/assets/{overview-z9AW_vcO.js → overview-D3hqR9Yg.js} +1 -1
  145. package/dist/assets/{permission-C_g43OOf.js → permission-DET008IY.js} +1 -1
  146. package/dist/assets/{preference-1qTmAvHN.js → preference-pxwdMSFg.js} +8 -8
  147. package/dist/assets/{provider-icon-CoJ5ERXe.js → provider-icon-CCZmjsDZ.js} +1 -1
  148. package/dist/assets/{pt-Dl6732JN.js → pt-BFCHl6F1.js} +1 -1
  149. package/dist/assets/{raf-schd.esm-CU1FaTjd.js → raf-schd.esm-BuSKwIfR.js} +1 -1
  150. package/dist/assets/{rotate-session-key-CQOBWeRr.js → rotate-session-key-DE58Q8ag.js} +1 -1
  151. package/dist/assets/{ru-CVUeN9AX.js → ru-CSTl62kK.js} +1 -1
  152. package/dist/assets/runtime-b4EXN3II.js +1 -0
  153. package/dist/assets/schema-DE6tzaXQ.js +1 -0
  154. package/dist/assets/sdk-CxXstbZm.js +1 -0
  155. package/dist/assets/{service-iJdsq1ul.js → service-BpzqSJv4.js} +1 -1
  156. package/dist/assets/{shorten-label-CCnq_MUQ.js → shorten-label-PYNmzpP_.js} +1 -1
  157. package/dist/assets/{simple-select-0S1qRvRS.js → simple-select-BiJQdJOQ.js} +1 -1
  158. package/dist/assets/{spaces-BbUa6G9F.js → spaces-MVFShLV4.js} +1 -1
  159. package/dist/assets/{status-g0Lvwqad.js → status-LmBdrnlB.js} +1 -1
  160. package/dist/assets/{status-B4gHBixJ.js → status-UZAIOWNB.js} +1 -1
  161. package/dist/assets/{switch-control-CwXplLu0.js → switch-control-CE57fLeM.js} +1 -1
  162. package/dist/assets/{table-icons-BwS2Y2wV.js → table-icons-BG66cxZv.js} +1 -1
  163. package/dist/assets/{team-DETQHkho.js → team-DgQYntrc.js} +1 -1
  164. package/dist/assets/{th-32eBNQes.js → th-D75Dlluo.js} +1 -1
  165. package/dist/assets/{toLower-oQZ3J7Wi.js → toLower-DBVF4v1M.js} +1 -1
  166. package/dist/assets/toUpper-RYfZ9dsZ.js +1 -0
  167. package/dist/assets/{traffic-Cqk5X-Ty.js → traffic-7oEMp-9f.js} +1 -1
  168. package/dist/assets/trim-Dm26Hw3f.js +1 -0
  169. package/dist/assets/{url-evaluation-DyzOKILN.js → url-evaluation-CTsNt3ve.js} +1 -1
  170. package/dist/assets/{url-join-BM9fQWnd.js → url-join-oxVMh_nl.js} +1 -1
  171. package/dist/assets/{use-mobile-23djKzeO.js → use-mobile-BS_f_Fn7.js} +1 -1
  172. package/dist/assets/{use-mobile-BmaqHxmL.js → use-mobile-Czu8FCYf.js} +1 -1
  173. package/dist/assets/{useAsync-DtsKmLYR.js → useAsync-sbHIoH6-.js} +1 -1
  174. package/dist/assets/{useAsyncRetry-bd8YRPLB.js → useAsyncRetry-CCLyjAGj.js} +1 -1
  175. package/dist/assets/{useLocalStorage-Cf0vlWCe.js → useLocalStorage-CnqCtMp_.js} +1 -1
  176. package/dist/assets/{useThemeProps-CSqQ3Rdj.js → useThemeProps-DrXM-hmA.js} +1 -1
  177. package/dist/assets/{util-w8OtW6iJ.js → util-odWrmhcv.js} +1 -1
  178. package/dist/assets/{vi-DF8IinAc.js → vi-D1mKYrmb.js} +1 -1
  179. package/dist/assets/{wait-container-CoMsFqPE.js → wait-container-D_OCwH7P.js} +1 -1
  180. package/dist/assets/{without-wallet-U-jwKDa8.js → without-wallet-suCG1vjR.js} +1 -1
  181. package/dist/assets/wrap-locale-C0daq2dx.js +1 -0
  182. package/dist/assets/{zh-ByJkLAV1.js → zh-G2I44gfs.js} +1 -1
  183. package/dist/assets/{zh-tw-34G9tsUP.js → zh-tw-C4Juvs-i.js} +1 -1
  184. package/dist/index.html +1 -1
  185. package/package.json +1 -1
  186. package/dist/assets/ArrowDropDown-BLLloj8o.js +0 -1
  187. package/dist/assets/KeyboardArrowDown-Dlq5aN05.js +0 -1
  188. package/dist/assets/Verified-BAR-FN7O.js +0 -1
  189. package/dist/assets/api-Bv3RStR2.js +0 -1
  190. package/dist/assets/cloneDeep-CheRvpcx.js +0 -1
  191. package/dist/assets/config-navigation-D55MBXAB.js +0 -472
  192. package/dist/assets/emotion-cache.browser.esm-DxLNiXj3.js +0 -1
  193. package/dist/assets/engine-DGEfu7n8.js +0 -1
  194. package/dist/assets/getValidReactChildren-CVyZy5bG.js +0 -1
  195. package/dist/assets/index-CckoDRE8.js +0 -1
  196. package/dist/assets/index-DciiOEW2.js +0 -20
  197. package/dist/assets/index-Duu5UY8_.js +0 -1
  198. package/dist/assets/index-DxkMGrHs.js +0 -358
  199. package/dist/assets/index-K5eCanEK.js +0 -102
  200. package/dist/assets/is-path-prefix-equal-Cc6vYZ8N.js +0 -1
  201. package/dist/assets/item-BinI3jhy.js +0 -163
  202. package/dist/assets/omit-Bk5eP-SH.js +0 -1
  203. package/dist/assets/runtime-CVva7EgW.js +0 -1
  204. package/dist/assets/schema-7NDYbay9.js +0 -1
  205. package/dist/assets/sdk-Dvt1785F.js +0 -1
  206. package/dist/assets/toUpper-lxerpjTR.js +0 -1
  207. package/dist/assets/trim-D7km596D.js +0 -1
  208. package/dist/assets/wrap-locale-DxhU5ODE.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./overview-z9AW_vcO.js","./index-BIgX2N1A.js","./index-BLDnEtdF.css","./HelpOutline-Be59cdK1.js","./index-BojVbZw0.js","./index-CaLjm3Sr.js","./blocklet-lDvdqhrX.js","./team-DETQHkho.js","./url-evaluation-DyzOKILN.js","./status-g0Lvwqad.js","./index-CPZ5M8hw.js","./ErrorOutline-B7jRfGmR.js","./omit-Bk5eP-SH.js","./index-CVpBdzTr.js","./metric-B3S53u3H.js","./CardContent-CPUlyd-R.js","./spaces-BbUa6G9F.js","./api-Bv3RStR2.js","./domains-CVE_fz_I.js","./trim-D7km596D.js","./index-BfQLSa8k.js","./useAsync-DtsKmLYR.js","./permission-C_g43OOf.js","./Delete-DkHujAB7.js","./actions-5RspfWE_.js","./delete-confirm-DyLbGAy5.js","./click-to-copy-C6h97nXy.js","./status-B4gHBixJ.js","./VerifiedUser-D0ltmMtV.js","./Add-IxR__ozX.js","./CallMerge-Di3dNXj5.js","./toLower-oQZ3J7Wi.js","./use-mobile-BmaqHxmL.js","./util-w8OtW6iJ.js","./is-path-prefix-equal-Cc6vYZ8N.js","./engine-DGEfu7n8.js","./OpenInNew-CEBJXmxa.js","./LoadingButton-CUdpFc0p.js","./index-B4azxfc8.js","./actions-DjLoksgL.js","./useLocalStorage-Cf0vlWCe.js","./MoreVert-BVgcfW7V.js","./DeleteOutline-DUcJA7eO.js","./get-safe-url-RPQVYlWr.js","./ButtonGroup--8rwLvQ8.js","./getValidReactChildren-CVyZy5bG.js","./ChevronRight-CO-Fv8kP.js","./html-title-DE0TrRVC.js","./preference-1qTmAvHN.js","./index-CEn1Olzp.js","./Done-B_L7rkHk.js","./edit.svg-Bdq-FCGM.js","./ArrowDropDown-BLLloj8o.js","./index-DaEqVg3j.js","./iframe-B7aYePTd.js","./Autocomplete-OhxbbTq9.js","./ListSubheader-UFJcQfY_.js","./rotate-session-key-CQOBWeRr.js","./visuallyHidden-Dan1xhjv.js","./joi-browser.min-CUdv8seQ.js","./chain-BQMbjNUU.js","./switch-control-CwXplLu0.js","./index.esm-C5mhDUsD.js","./isEmail-apFH2MvD.js","./index-Bm8Rp86x.js","./redux-Ab4buSXY.js","./typeof-QjJsDpFa.js","./provider-icon-CoJ5ERXe.js","./passkey-rounded-_WDHIZVd.js","./simple-select-0S1qRvRS.js","./index-Ca61GFb8.js","./FilterList-DMbHmf0X.js","./CSSTransition-D4fabzL2.js","./emotion-cache.browser.esm-DxLNiXj3.js","./depsEqual-CM0PEscV.js","./TableSearch-CdKaHbVQ.js","./Search-CtujvL0H.js","./Clear-DriUx9_Q.js","./use-mobile-23djKzeO.js","./EditOutlined-yXcT-6A0.js","./appearance-AiyB_V1W.js","./config-navigation-D55MBXAB.js","./cloneDeep-CheRvpcx.js","./_createAggregator-G6HCftPW.js","./raf-schd.esm-CU1FaTjd.js","./ListItemButton-BHNRxd8I.js","./index-CckoDRE8.js","./KeyboardArrowDown-Dlq5aN05.js","./index-Duu5UY8_.js","./index-BfetuCUm.js","./shorten-label-CCnq_MUQ.js","./Replay-qvum4SpI.js","./Refresh-DrflkqFW.js","./traffic-Cqk5X-Ty.js","./ChevronLeft-lzYf4tao.js","./index-CVhk080O.js","./base-chart-BE2BHY3Y.js","./index-gwhKA5OT.js","./AdapterDayjs-CHVRCEwB.js","./useThemeProps-CSqQ3Rdj.js","./audit-logs-C4Hps2ag.js","./index-QndNtIi-.js","./index-ed1TwQco.css","./UnfoldMore-BvZuyACH.js","./index-D7yowN9E.js","./ua-parser-D6QF1h5N.js","./index-B0oOTjeC.js","./Google-DMfPhzx4.js","./list-header-BNS6BF2P.js","./ToggleButtonGroup-BP4C4KFu.js","./lock.svg-BFdqOrkF.js","./index-DxkMGrHs.js","./ViewList--urcCqVt.js","./Verified-BAR-FN7O.js","./index-K5eCanEK.js","./sdk-Dvt1785F.js","./actions-CQAb6_Rz.js","./login-method-item-ZVrK6tB1.js","./service-iJdsq1ul.js","./table-icons-BwS2Y2wV.js","./Edit-DgzPfnB_.js","./index-DmCKwIHx.js","./Link-wdDqdiCm.js","./item-BinI3jhy.js","./Launch-B8FfXmf_.js","./item-D4DUnQj0.css","./index-B29Pha71.js","./url-join-BM9fQWnd.js","./connect-to-DeMt1m5c.js","./index-D29L5UKE.js","./agreement-b4V3Z14P.js","./install-from-url-DPdbO0Jq.js","./without-wallet-U-jwKDa8.js","./Stepper-CJfsKFpi.js","./toUpper-lxerpjTR.js","./log-DZlkZyGX.js","./download-f9_CnIWg.js","./runtime-CVva7EgW.js","./memory-CoCFCBkX.js","./index-BX6YpiBs.js"])))=>i.map(i=>d[i]);
2
- import{V as He,d as qe,aS as Ct,r as b,l as F,j as d,at as Qe,B as Z,bD as Ge,D as Tt,aU as j,bE as jt,H as J,bF as Ke,a as We,u as Pt,b as At,bG as Dt,bH as Ot,bI as Lt,bJ as Ae,bK as Bt,bL as Mt,b2 as De,C as Oe,bM as Rt,bN as Nt,K as ue,bO as Ft,I,t as Vt}from"./index-BIgX2N1A.js";import{T as zt,u as $t}from"./html-title-DE0TrRVC.js";import{B as Ut}from"./status-B4gHBixJ.js";import{D as Ht,B as qt}from"./actions-DjLoksgL.js";import{u as Qt}from"./blocklet-lDvdqhrX.js";import{p as Gt}from"./index-BqqU8gwj.js";import{B as Kt,u as Wt,T as Jt}from"./team-DETQHkho.js";import{P as Xt}from"./permission-C_g43OOf.js";import{B as Yt}from"./Breadcrumbs-CfkRwQNu.js";import"./useLocalStorage-Cf0vlWCe.js";import"./MoreVert-BVgcfW7V.js";import"./DeleteOutline-DUcJA7eO.js";import"./get-safe-url-RPQVYlWr.js";import"./ButtonGroup--8rwLvQ8.js";import"./getValidReactChildren-CVyZy5bG.js";import"./url-evaluation-DyzOKILN.js";const Je=Object.freeze({left:0,top:0,width:16,height:16}),ee=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),H=Object.freeze({...Je,...ee}),me=Object.freeze({...H,body:"",hidden:!1});function Zt(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Le(e,t){const n=Zt(e,t);for(const r in me)r in ee?r in e&&!(r in n)&&(n[r]=ee[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function en(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function s(i){if(n[i])return o[i]=[];if(!(i in o)){o[i]=null;const c=r[i]&&r[i].parent,l=c&&s(c);l&&(o[i]=[c].concat(l))}return o[i]}return Object.keys(n).concat(Object.keys(r)).forEach(s),o}function tn(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let s={};function i(c){s=Le(r[c]||o[c],s)}return i(t),n.forEach(i),Le(e,s)}function nn(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=en(e);for(const o in r){const s=r[o];s&&(t(o,tn(e,o,s)),n.push(o))}return n}const V=/^[a-z0-9]+(-[a-z0-9]+)*$/,R=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const c=o.pop(),l=o.pop(),a={provider:o.length>0?o[0]:r,prefix:l,name:c};return t&&!X(a)?null:a}const s=o[0],i=s.split("-");if(i.length>1){const c={provider:r,prefix:i.shift(),name:i.join("-")};return t&&!X(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:s};return t&&!X(c,n)?null:c}return null},X=(e,t)=>e?!!((e.provider===""||e.provider.match(V))&&(t&&e.prefix===""||e.prefix.match(V))&&e.name.match(V)):!1,on={provider:"",aliases:{},not_found:{},...Je};function fe(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function rn(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!fe(e,on))return null;const n=t.icons;for(const o in n){const s=n[o];if(!o.match(V)||typeof s.body!="string"||!fe(s,me))return null}const r=t.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(V)||typeof i!="string"||!n[i]&&!r[i]||!fe(s,me))return null}return t}const te=Object.create(null);function sn(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function C(e,t){const n=te[e]||(te[e]=Object.create(null));return n[t]||(n[t]=sn(e,t))}function Ee(e,t){return rn(t)?nn(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function cn(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function an(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(te)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(te[o]||{})).forEach(i=>{const c=C(o,i);n=n.concat(Object.keys(c.icons).map(l=>(o!==""?"@"+o+":":"")+i+":"+l))})}),n}let _e=!1;function ln(e){return _e}function q(e){const t=typeof e=="string"?R(e,!0,_e):e;if(t){const n=C(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function un(e,t){const n=R(e,!0,_e);if(!n)return!1;const r=C(n.provider,n.prefix);return cn(r,n.name,t)}function Xe(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const n=e.prefix;if(!X({provider:t,prefix:n,name:"a"}))return!1;const r=C(t,n);return!!Ee(r,e)}function fn(e){return!!q(e)}function dn(e){const t=q(e);return t?{...H,...t}:null}const Ye=Object.freeze({width:null,height:null}),Ze=Object.freeze({...Ye,...ee}),pn=/(-?[0-9.]*[0-9]+[0-9.]*)/g,mn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function he(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(pn);if(r===null||!r.length)return e;const o=[];let s=r.shift(),i=mn.test(s);for(;;){if(i){const c=parseFloat(s);isNaN(c)?o.push(s):o.push(Math.ceil(c*t*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const hn=e=>e==="unset"||e==="undefined"||e==="none";function re(e,t){const n={...H,...e},r={...Ze,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(g=>{const y=[],E=g.hFlip,A=g.vFlip;let w=g.rotate;E?A?w+=2:(y.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),y.push("scale(-1 1)"),o.top=o.left=0):A&&(y.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),y.push("scale(1 -1)"),o.top=o.left=0);let S;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:S=o.height/2+o.top,y.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:y.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:S=o.width/2+o.left,y.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")");break}w%2===1&&(o.left!==o.top&&(S=o.left,o.left=o.top,o.top=S),o.width!==o.height&&(S=o.width,o.width=o.height,o.height=S)),y.length&&(s='<g transform="'+y.join(" ")+'">'+s+"</g>")});const i=r.width,c=r.height,l=o.width,a=o.height;let u,p;i===null?(p=c===null?"1em":c==="auto"?a:c,u=he(p,l/a)):(u=i==="auto"?l:i,p=c===null?he(u,a/l):c==="auto"?a:c);const f={},h=(g,y)=>{hn(y)||(f[g]=y.toString())};return h("width",u),h("height",p),f.viewBox=o.left.toString()+" "+o.top.toString()+" "+l.toString()+" "+a.toString(),{attributes:f,body:s}}const gn=/\sid="(\S+)"/g,bn="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let yn=0;function et(e,t=bn){const n=[];let r;for(;r=gn.exec(e);)n.push(r[1]);if(!n.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const i=typeof t=="function"?t(s):t+(yn++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+i+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const D={local:!0,session:!0},tt={local:new Set,session:new Set};let Ce=!1;function vn(e){Ce=e}const Be="iconify2",U="iconify",nt=U+"-count",Me=U+"-version",ot=36e5,xn=168;function ge(e,t){try{return e.getItem(t)}catch{}}function Te(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Re(e,t){try{e.removeItem(t)}catch{}}function be(e,t){return Te(e,nt,t.toString())}function ye(e){return parseInt(ge(e,nt))||0}let K=typeof window>"u"?{}:window;function rt(e){const t=e+"Storage";try{if(K&&K[t]&&typeof K[t].length=="number")return K[t]}catch{}D[e]=!1}function st(e,t){const n=rt(e);if(!n)return;const r=ge(n,Me);if(r!==Be){if(r){const c=ye(n);for(let l=0;l<c;l++)Re(n,U+l.toString())}Te(n,Me,Be),be(n,0);return}const o=Math.floor(Date.now()/ot)-xn,s=c=>{const l=U+c.toString(),a=ge(n,l);if(typeof a=="string"){try{const u=JSON.parse(a);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&t(u,c))return!0}catch{}Re(n,l)}};let i=ye(n);for(let c=i-1;c>=0;c--)s(c)||(c===i-1?(i--,be(n,i)):tt[e].add(c))}function it(){if(!Ce){vn(!0);for(const e in D)st(e,t=>{const n=t.data,r=t.provider,o=n.prefix,s=C(r,o);if(!Ee(s,n).length)return!1;const i=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function ct(e,t){switch(e){case"local":case"session":D[e]=t;break;case"all":for(const n in D)D[n]=t;break}}const ve=Object.create(null);function at(e,t){ve[e]=t}function xe(e){return ve[e]||ve[""]}function je(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const se=Object.create(null),N=["https://api.simplesvg.com","https://api.unisvg.com"],Y=[];for(;N.length>0;)N.length===1||Math.random()>.5?Y.push(N.shift()):Y.push(N.pop());se[""]=je({resources:["https://api.iconify.design"].concat(Y)});function lt(e,t){const n=je(t);return n===null?!1:(se[e]=n,!0)}function ie(e){return se[e]}function wn(){return Object.keys(se)}const Sn=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let ne=Sn();function In(e){ne=e}function kn(){return ne}function En(e,t){const n=ie(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(i=>{o=Math.max(o,i.length)});const s=t+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function _n(e){return e===404}const Cn=(e,t,n)=>{const r=[],o=En(e,t),s="icons";let i={type:s,provider:e,prefix:t,icons:[]},c=0;return n.forEach((l,a)=>{c+=l.length+1,c>=o&&a>0&&(r.push(i),i={type:s,provider:e,prefix:t,icons:[]},c=l.length),i.icons.push(l)}),r.push(i),r};function Tn(e){if(typeof e=="string"){const t=ie(e);if(t)return t.path}return"/"}const jn=(e,t,n)=>{if(!ne){n("abort",424);return}let r=Tn(t.provider);switch(t.type){case"icons":{const s=t.prefix,c=t.icons.join(","),l=new URLSearchParams({icons:c});r+=s+".json?"+l.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;ne(e+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(_n(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},Pn={prepare:Cn,send:jn};function An(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,i=o.prefix,c=o.name,l=n[s]||(n[s]=Object.create(null)),a=l[i]||(l[i]=C(s,i));let u;c in a.icons?u=t.loaded:i===""||a.missing.has(c)?u=t.missing:u=t.pending;const p={provider:s,prefix:i,name:c};u.push(p)}),t}function ut(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function Dn(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,o=e.prefix;t.forEach(s=>{const i=s.icons,c=i.pending.length;i.pending=i.pending.filter(l=>{if(l.prefix!==o)return!0;const a=l.name;if(e.icons[a])i.loaded.push({provider:r,prefix:o,name:a});else if(e.missing.has(a))i.missing.push({provider:r,prefix:o,name:a});else return n=!0,!0;return!1}),i.pending.length!==c&&(n||ut([e],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let On=0;function Ln(e,t,n){const r=On++,o=ut.bind(null,n,r);if(!t.pending.length)return o;const s={id:r,icons:t,callback:e,abort:o};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}function Bn(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const s=typeof o=="string"?R(o,t,n):o;s&&r.push(s)}),r}var Mn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Rn(e,t,n,r){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let i;if(e.random){let m=e.resources.slice(0);for(i=[];m.length>1;){const k=Math.floor(Math.random()*m.length);i.push(m[k]),m=m.slice(0,k).concat(m.slice(k+1))}i=i.concat(m)}else i=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let l="pending",a=0,u,p=null,f=[],h=[];typeof r=="function"&&h.push(r);function g(){p&&(clearTimeout(p),p=null)}function y(){l==="pending"&&(l="aborted"),g(),f.forEach(m=>{m.status==="pending"&&(m.status="aborted")}),f=[]}function E(m,k){k&&(h=[]),typeof m=="function"&&h.push(m)}function A(){return{startTime:c,payload:t,status:l,queriesSent:a,queriesPending:f.length,subscribe:E,abort:y}}function w(){l="failed",h.forEach(m=>{m(void 0,u)})}function S(){f.forEach(m=>{m.status==="pending"&&(m.status="aborted")}),f=[]}function L(m,k,_){const B=k!=="success";switch(f=f.filter(T=>T!==m),l){case"pending":break;case"failed":if(B||!e.dataAfterTimeout)return;break;default:return}if(k==="abort"){u=_,w();return}if(B){u=_,f.length||(i.length?v():w());return}if(g(),S(),!e.random){const T=e.resources.indexOf(m.resource);T!==-1&&T!==e.index&&(e.index=T)}l="completed",h.forEach(T=>{T(_)})}function v(){if(l!=="pending")return;g();const m=i.shift();if(m===void 0){if(f.length){p=setTimeout(()=>{g(),l==="pending"&&(S(),w())},e.timeout);return}w();return}const k={status:"pending",resource:m,callback:(_,B)=>{L(k,_,B)}};f.push(k),a++,p=setTimeout(v,e.rotate),n(m,t,k.callback)}return setTimeout(v),A}function ft(e){const t={...Mn,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function o(c,l,a){const u=Rn(t,c,l,(p,f)=>{r(),a&&a(p,f)});return n.push(u),u}function s(c){return n.find(l=>c(l))||null}return{query:o,find:s,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function Ne(){}const de=Object.create(null);function Nn(e){if(!de[e]){const t=ie(e);if(!t)return;const n=ft(t),r={config:t,redundancy:n};de[e]=r}return de[e]}function dt(e,t,n){let r,o;if(typeof e=="string"){const s=xe(e);if(!s)return n(void 0,424),Ne;o=s.send;const i=Nn(e);i&&(r=i.redundancy)}else{const s=je(e);if(s){r=ft(s);const i=e.resources?e.resources[0]:"",c=xe(i);c&&(o=c.send)}}return!r||!o?(n(void 0,424),Ne):r.query(t,o,n)().abort}function Fn(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in D)st(r,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function Vn(e,t){Ce||it();function n(r){let o;if(!D[r]||!(o=rt(r)))return;const s=tt[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=ye(o),!be(o,i+1))return;const c={cached:Math.floor(Date.now()/ot),provider:e.provider,data:t};return Te(o,U+i.toString(),JSON.stringify(c))}t.lastModified&&!Fn(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Fe(){}function zn(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Dn(e)}))}function $n(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let s;if(!o||!(s=xe(n)))return;s.prepare(n,r,o).forEach(c=>{dt(n,c,l=>{if(typeof l!="object")c.icons.forEach(a=>{e.missing.add(a)});else try{const a=Ee(e,l);if(!a.length)return;const u=e.pendingIcons;u&&a.forEach(p=>{u.delete(p)}),Vn(e,l)}catch(a){console.error(a)}zn(e)})})}))}const Un=e=>{const n=C(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},Pe=(e,t)=>{const n=Bn(e,!0,ln()),r=An(n);if(!r.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(r.loaded,r.missing,r.pending,Fe)}),()=>{l=!1}}const o=Object.create(null),s=[];let i,c;return r.pending.forEach(l=>{const{provider:a,prefix:u}=l;if(u===c&&a===i)return;i=a,c=u,s.push(C(a,u));const p=o[a]||(o[a]=Object.create(null));p[u]||(p[u]=[])}),r.pending.forEach(l=>{const{provider:a,prefix:u,name:p}=l,f=C(a,u),h=f.pendingIcons||(f.pendingIcons=new Set);h.has(p)||(h.add(p),o[a][u].push(p))}),s.forEach(l=>{const{provider:a,prefix:u}=l;o[a][u].length&&$n(l,o[a][u])}),t?Ln(t,r,s):Fe},Hn=e=>new Promise((t,n)=>{const r=typeof e=="string"?R(e,!0):e;if(!r){n(e);return}Pe([r||e],o=>{if(o.length&&r){const s=q(r);if(s){t({...H,...s});return}}n(e)})});function pt(e,t){const n={...e};for(const r in t){const o=t[r],s=typeof o;r in Ye?(o===null||o&&(s==="string"||s==="number"))&&(n[r]=o):s===typeof n[r]&&(n[r]=r==="rotate"?o%4:o)}return n}const ce={...Ze,inline:!1},pe="iconify",we="iconify-inline",P="iconifyData"+Date.now();let O=[];function Q(e){for(let t=0;t<O.length;t++){const n=O[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function mt(e,t=!1){let n=Q(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},O.push(n),n)}function qn(){if(document.documentElement)return mt(document.documentElement);O.push({node:()=>document.documentElement})}function Qn(e){O=O.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function G(){return O}function Gn(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let z=null;const Kn={childList:!0,subtree:!0,attributes:!0};function ht(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,z&&z(e)}))}function Wn(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let r=0;r<t.length;r++){const o=t[r];if(o.addedNodes&&o.addedNodes.length>0||o.type==="attributes"&&o.target[P]!==void 0){n.paused||ht(e);return}}}function gt(e,t){e.observer.instance.observe(t,Kn)}function oe(e){let t=e.observer;if(t&&t.instance)return;const n=typeof e.node=="function"?e.node():e.node;!n||!window||(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(Wn.bind(null,e)),gt(e,n),t.paused||ht(e))}function Ve(){G().forEach(oe)}function bt(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function Jn(e){const t=z!==null;if(z!==e&&(z=e,t&&G().forEach(bt)),t){Ve();return}Gn(Ve)}function Se(e){(e?[e]:G()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const n=t.observer;if(n.paused++,n.paused>1||!n.instance)return;n.instance.disconnect()})}function Xn(e){if(e){const t=Q(e);t&&Se(t)}else Se()}function Ie(e){(e?[e]:G()).forEach(t=>{if(!t.observer){oe(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const r=typeof t.node=="function"?t.node():t.node;if(r)n.instance?gt(t,r):oe(t);else return}})}function Yn(e){if(e){const t=Q(e);t&&Ie(t)}else Ie()}function yt(e,t=!1){const n=mt(e,t);return oe(n),n}function vt(e){const t=Q(e);t&&(bt(t),Qn(e))}function Zn(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,r=t.customisations;for(const o in ce)if(n[o]!==r[o])return!0;return!1}function eo(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return t}const to=/[\s,]+/;function no(e,t){t.split(to).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const oo=["width","height"],ro=["inline","hFlip","vFlip"];function so(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function io(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&R(t,!0);if(!n)return null;const r={...ce,inline:e.classList&&e.classList.contains(we)};oo.forEach(c=>{const l=e.getAttribute("data-"+c);l&&(r[c]=l)});const o=e.getAttribute("data-rotate");typeof o=="string"&&(r.rotate=eo(o));const s=e.getAttribute("data-flip");typeof s=="string"&&no(r,s),ro.forEach(c=>{const l="data-"+c,a=so(e.getAttribute(l),l);typeof a=="boolean"&&(r[c]=a)});const i=e.getAttribute("data-mode");return{name:t,icon:n,customisations:r,mode:i}}const co="svg."+pe+", i."+pe+", span."+pe+", i."+we+", span."+we;function ao(e){const t=[];return e.querySelectorAll(co).forEach(n=>{const r=n[P]||n.tagName.toLowerCase()!=="svg"?io(n):null;r&&t.push({node:n,props:r})}),t}function xt(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}let $;function lo(){try{$=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{$=null}}function uo(e){return $===void 0&&lo(),$?$.createHTML(e):e}function wt(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function St(e,t,n,r){const o=e.classList;if(r){const i=r.classList;Array.from(i).forEach(c=>{o.add(c)})}const s=[];return t.forEach(i=>{o.contains(i)?n.has(i)&&s.push(i):(o.add(i),s.push(i))}),n.forEach(i=>{t.has(i)||o.remove(i)}),s}function It(e,t,n){const r=e.style;(n||[]).forEach(s=>{r.removeProperty(s)});const o=[];for(const s in t)r.getPropertyValue(s)||(o.push(s),r.setProperty(s,t[s]));return o}function kt(e,t,n){let r;try{r=document.createElement("span")}catch{return e}const o=t.customisations,s=re(n,o),i=e[P],c=xt(et(s.body),{"aria-hidden":"true",role:"img",...s.attributes});r.innerHTML=uo(c);const l=r.childNodes[0],a=e.attributes;for(let g=0;g<a.length;g++){const y=a.item(g),E=y.name;E!=="class"&&!l.hasAttribute(E)&&l.setAttribute(E,y.value)}const u=wt(t.icon),p=St(l,u,new Set(i&&i.addedClasses),e),f=It(l,o.inline?{"vertical-align":"-0.125em"}:{},i&&i.addedStyles),h={...t,status:"loaded",addedClasses:p,addedStyles:f};return l[P]=h,e.parentNode&&e.parentNode.replaceChild(l,e),l}function fo(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function po(e){return"data:image/svg+xml,"+fo(e)}function mo(e){return'url("'+po(e)+'")'}const ho={display:"inline-block"},ke={"background-color":"currentColor"},Et={"background-color":"transparent"},ze={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},$e={"-webkit-mask":ke,mask:ke,background:Et};for(const e in $e){const t=$e[e];for(const n in ze)t[e+"-"+n]=ze[n]}function Ue(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function go(e,t,n,r){const o=t.customisations,s=re(n,o),i=s.attributes,c=e[P],l=xt(s.body,{...i,width:n.width+"",height:n.height+""}),a=wt(t.icon),u=St(e,a,new Set(c&&c.addedClasses)),f={"--svg":mo(l),width:Ue(i.width),height:Ue(i.height),...ho,...r?ke:Et};o.inline&&(f["vertical-align"]="-0.125em");const h=It(e,f,c&&c.addedStyles),g={...t,status:"loaded",addedClasses:u,addedStyles:h};return e[P]=g,e}let W=!1;function bo(){W||(W=!0,setTimeout(()=>{W&&(W=!1,M())}))}function M(e,t=!1){const n=Object.create(null);function r(o,s){const{provider:i,prefix:c,name:l}=o,a=C(i,c),u=a.icons[l];if(u)return{status:"loaded",icon:u};if(a.missing.has(l))return{status:"missing"};if(s&&!Un(o)){const p=n[i]||(n[i]=Object.create(null));(p[c]||(p[c]=new Set)).add(l)}return{status:"loading"}}(e?[e]:G()).forEach(o=>{const s=typeof o.node=="function"?o.node():o.node;if(!s||!s.querySelectorAll)return;let i=!1,c=!1;function l(a,u,p){if(c||(c=!0,Se(o)),a.tagName.toUpperCase()!=="SVG"){const f=u.mode,h=f==="mask"||(f==="bg"?!1:f==="style"?p.body.indexOf("currentColor")!==-1:null);if(typeof h=="boolean"){go(a,u,{...H,...p},h);return}}kt(a,u,p)}ao(s).forEach(({node:a,props:u})=>{const p=a[P];if(!p){const{status:h,icon:g}=r(u.icon,!0);if(g){l(a,u,g);return}i=i||h==="loading",a[P]={...u,status:h};return}let f;if(Zn(p,u)){if(f=r(u.icon,p.name!==u.name),!f.icon){i=i||f.status==="loading",Object.assign(p,{...u,status:f.status});return}}else{if(p.status!=="loading")return;if(f=r(u.icon,!1),!f.icon){p.status=f.status;return}}l(a,u,f.icon)}),o.temporary&&!i?vt(s):t&&i?yt(s,!0):c&&o.observer&&Ie(o)});for(const o in n){const s=n[o];for(const i in s){const c=s[i];Pe(Array.from(c).map(l=>({provider:o,prefix:i,name:l})),bo)}}}function yo(e){const t=Q(e);t?M(t):M({node:e,temporary:!0},!0)}function _t(e,t,n=!1){const r=q(e);if(!r)return null;const o=R(e),s=pt(ce,t||{}),i=kt(document.createElement("span"),{name:e,icon:o,customisations:s},r);return n?i.outerHTML:i}function vo(){return"3.1.1"}function xo(e,t){return _t(e,t,!1)}function wo(e,t){return _t(e,t,!0)}function So(e,t){const n=q(e);if(!n)return null;const r=pt(ce,t||{});return re(n,r)}function Io(e){e?yo(e):M()}if(typeof document<"u"&&typeof window<"u"){qn();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!Xe(r))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{Jn(M),M()})}function ko(e,t){ct(e,t!==!1)}function Eo(e){ct(e,!0)}at("",Pn);if(typeof document<"u"&&typeof window<"u"){it();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const r="IconifyProviders["+n+"] is invalid.";try{const o=t[n];if(typeof o!="object"||!o||o.resources===void 0)continue;lt(n,o)||console.error(r)}catch{console.error(r)}}}}const _o={getAPIConfig:ie,setAPIModule:at,sendAPIQuery:dt,setFetch:In,getFetch:kn,listAPIProviders:wn},Co={_api:_o,addAPIProvider:lt,loadIcons:Pe,loadIcon:Hn,iconExists:fn,getIcon:dn,listIcons:an,addIcon:un,addCollection:Xe,replaceIDs:et,calculateSize:he,buildIcon:re,getVersion:vo,renderSVG:xo,renderHTML:wo,renderIcon:So,scan:Io,observe:yt,stopObserving:vt,pauseObserver:Xn,resumeObserver:Yn,enableCache:ko,disableCache:Eo};try{self.Iconify===void 0&&(self.Iconify=Co)}catch{}const To=e=>{const t={};let n=null;return j.forEachBlockletSync(e,r=>{t[r.meta.bundleDid]?n=j.getDisplayName(r,!0):r.meta.bundleDid&&(t[r.meta.bundleDid]=!0)}),n},jo=(e,t,n)=>{const{hostname:r,href:o}=e;if(!t)return o;if(n){const i=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!i)return o;const c=i[0],a=((t.site?.domainAliases||[]).map(u=>u.value).filter(Boolean).find(u=>u.endsWith(F.DEFAULT_DID_DOMAIN))||"").replace(`.${F.DEFAULT_DID_DOMAIN}`,"");return a?o.replace(r,`${a}-${c}.${F.DEFAULT_IP_DOMAIN_SUFFIX}`):o}return o.replace(t.meta.bundleDid,t.appPid)};function Po(){const{t:e}=He(),{api:t}=qe(),{blocklet:n}=Qt(),{inService:r}=Ct(),[o,s]=b.useState(!1),[i,c]=b.useState(5),l=n&&n.structVersion!==F.APP_STRUCT_VERSION,a=()=>{try{if(j.isBlockletRunning(n)){J.error(e("blocklet.migrate.tip.running"));return}const f=To(n);if(f){J.error(e("blocklet.migrate.tip.duplicate",{name:f}));return}s(!0)}catch(f){J.error(Ke(f))}},u=()=>{const f=jo(window.location,n,r);setTimeout(()=>{window.location.href=f},5e3),c(5),setInterval(()=>{c(h=>h-1)},1e3)},p=()=>s(!1);return[l&&d.jsxs(Qe,{severity:"warning",style:{margin:"12px 0"},children:[d.jsxs(Z,{sx:{display:"flex",alignItems:"center"},children:[d.jsx(Ge,{variant:"contained",size:"small",color:"primary",onClick:()=>a(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),d.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(f=>d.jsx(Z,{sx:{display:"flex",alignItems:"center"},children:e(`blocklet.migrate.intro.${f}`)},f))]},"alert"),n&&d.jsx(Tt,{popup:!0,open:o,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:300*1e3,onSuccess:u,extraParams:{appDid:n.appDid,did:n.meta.did,wt:jt(n,!0),title:j.getDisplayName(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:i>=0?e("blocklet.migrate.success",{sec:i}):"Redirecting..."},onClose:p},"connect")]}const Ao=b.lazy(()=>I(()=>import("./overview-z9AW_vcO.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]),import.meta.url)),Do=b.lazy(()=>I(()=>import("./domains-CVE_fz_I.js"),__vite__mapDeps([18,1,2,19,20,21,6,22,23,24,25,26,27,28,15,29,30,31,32,5,33,34,35,36,37,10]),import.meta.url)),Oo=b.lazy(()=>I(()=>import("./index-B4azxfc8.js"),__vite__mapDeps([38,1,2,39,40,41,42,43,44,45,8,22,46,47,10,48,12,49,50,51,52,53,54,55,56,57,58,6,26,7,5,59,60,9,11,13,61,62,63,64,65,66,67,68,69,23,29,70,71,72,73,74,20,75,76,77,78,79,15]),import.meta.url)),Lo=b.lazy(()=>I(()=>import("./appearance-AiyB_V1W.js"),__vite__mapDeps([80,1,2,6,78]),import.meta.url)),Bo=b.lazy(()=>I(()=>import("./config-navigation-D55MBXAB.js"),__vite__mapDeps([81,1,2,12,82,49,83,74,6,64,65,66,84,7,8,39,40,41,42,43,44,45,22,62,69,47,77,52,17,55,56,85,32,86,87,76,29,36,88,54,37]),import.meta.url)),Mo=b.lazy(()=>I(()=>import("./index-BfetuCUm.js"),__vite__mapDeps([89,1,2,70,71,72,73,64,65,66,74,20,75,76,77,41,90,5,47,91,92,93,54,94,46,95,96,97,98,99,58]),import.meta.url)),Ro=b.lazy(()=>I(()=>import("./audit-logs-C4Hps2ag.js"),__vite__mapDeps([100,20,1,2,75,76,77,40,101,102,103,90,7,6,8]),import.meta.url)),No=b.lazy(()=>I(()=>import("./index-D7yowN9E.js").then(e=>e.i),__vite__mapDeps([104,1,2,70,71,72,73,64,65,66,74,20,75,76,77,41,47,7,6,8,105,78,106,44,45,22,107,82,29,51,108,60,109,110,19]),import.meta.url)),Fo=b.lazy(()=>I(()=>import("./index-DxkMGrHs.js").then(e=>e.i),__vite__mapDeps([111,1,2,29,112,70,71,72,73,64,65,66,74,20,75,76,77,41,13,106,44,45,7,6,8,62,107,82,55,56,103,79,22,26,98,99,58,47,5,113,42,11,114,115,116,19,68,117,63,86,78,23,24,90,105]),import.meta.url)),Vo=b.lazy(()=>I(()=>import("./service-iJdsq1ul.js"),__vite__mapDeps([118,1,2,119,71,72,73,95,66,84,65,99,47,29,23,77,120,46,94,76,52]),import.meta.url)),zo=b.lazy(()=>I(()=>import("./index-DmCKwIHx.js"),__vite__mapDeps([121,1,2,20,39,40,41,42,43,44,45,8,22,61,6,120,119,71,72,73,95,66,84,65,99,47,29,23,77,46,94,76,52,48,12,49,50,51,53,54,26,106,122,123,86,87,55,56,113,28,124,25,125,126,127,35,128,4,16,17,36,129,3,130,101,102,107,82,131,27,132,59,117,68,5,85,133,33,34,78,11,110,91,24,134,7]),import.meta.url)),$o=b.lazy(()=>I(()=>import("./log-DZlkZyGX.js"),__vite__mapDeps([135,1,2,40,136,44,45,56]),import.meta.url)),Uo=b.lazy(()=>I(()=>import("./runtime-CVva7EgW.js"),__vite__mapDeps([137,1,2,70,71,72,73,64,65,66,74,20,75,76,77,41,6,129,138,96,97,27,109,45]),import.meta.url)),Ho=b.lazy(()=>I(()=>import("./traffic-Cqk5X-Ty.js").then(e=>e.t),__vite__mapDeps([93,1,2,54,94,46,95,66,96,97,98,99,58,72]),import.meta.url)),qo=b.lazy(()=>I(()=>import("./index-BX6YpiBs.js"),__vite__mapDeps([139,1,2,47,6,78,128,4,16,17,42,36,129,3,106,44,45,5,97,70,71,72,73,64,65,66,74,20,75,76,77,41,43,61,108]),import.meta.url)),Qo=({children:e})=>e;function Go(){const e=Pt(),{tab:t="overview"}=We(),{did:n,blocklet:r,error:o,client:s,actions:{setBlocklet:i,refreshBlocklet:c}}=Wt(),{refresh:l}=At(),{t:a}=He(),{session:u}=qe(),{data:p}=Dt(),f=Ot(()=>u.user?.role&&Lt.includes(u.user.role),[u]),h=b.useCallback(()=>d.jsx(Ro,{scope:n,blocklets:p}),[n,p]),g=b.useCallback(()=>f?d.jsx(Mo,{blocklet:r}):d.jsx(Gt,{status:403}),[r,f]),y=r?.environments.find(x=>x.key==="BLOCKLET_APP_URL")?.value||window.location.origin,E=x=>Mt(x,y),A=x=>{e(`/blocklets/${n}/${x}`)},w=x=>{x&&i(x),c()},S=!r||Ae(r.status)?[]:j.getAppMissingConfigs(r);let L=null;const v=[{label:a("common.overview"),value:"overview"},{breadcrumbsLabel:a("common.components"),label:d.jsx(Bt,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!S.length,children:a("common.components")}),value:"components"}];if(o)L=d.jsxs(d.Fragment,{children:[d.jsx(Qe,{severity:"error",children:Ke(o)}),d.jsx(Ge,{onClick:()=>c(),children:d.jsx("span",{style:{textDecoration:"underline"},children:a("common.retry")})})]});else if(r){const x={overview:d.jsx(Ao,{}),domains:d.jsx(Do,{}),configuration:Oo,appearance:Lo,navigation:Bo,services:Vo,members:d.jsx(Fo,{type:"blocklet",createPassportSvg:E}),passports:No,components:zo,"audit-logs":h,notifications:g,logs:$o,runtime:d.jsx(Uo,{}),traffic:d.jsx(Ho,{client:s,did:n}),didSpaces:d.jsx(qo,{})};t==="configuration"&&Ae(r.status)&&A("overview"),v.push({label:a("common.domains"),value:"domains"}),v.push({label:a("common.members"),value:"members"}),v.push({label:a("team.member.passports"),value:"passports"}),v.push({label:a("common.configuration"),value:"configuration"}),v.push({label:a("common.appearance"),value:"appearance"}),v.push({label:a("common.auditLogs"),value:"audit-logs"}),f&&v.push({label:a("common.notificationRecords"),value:"notifications"}),r&&r.children?.length&&r.structVersion===F.APP_STRUCT_VERSION&&v.push({label:a("common.logs"),value:"logs"}),v.push({label:a("common.configNavigation"),value:"navigation"}),v.push({label:a("common.runtime"),value:"runtime"}),v.push({label:a("common.traffic"),value:"traffic"}),v.push({label:a("storage.spaces.title"),value:"didSpaces"}),j.getBlockletServices(r).length&&v.splice(2,0,{label:a("blocklet.services"),value:"services"});const le=x[t]||x.overview;L=d.jsxs(Ht,{type:"components",children:[!j.isExternalBlocklet(r)&&d.jsx(zt,{tabs:v,current:t,onChange:A,scrollButtons:"auto"}),d.jsx("div",{className:"page-content",children:d.jsx(b.Suspense,{fallback:d.jsx(De,{relative:"parent",children:d.jsx(Oe,{})}),children:b.isValidElement(le)?le:d.jsx(le,{blocklet:r,onUpdate:w,createPassportSvg:E})})})]})}else L=d.jsx(De,{relative:"parent",children:d.jsx(Oe,{})});const m=()=>{},k=({action:x,error:ae})=>{if(ae){J.error(ae.message);return}x==="remove"?(l(),e("/blocklets")):c()},_=v.find(x=>x.value===t),B=r?Jt:Qo,T=$t(_,r?.meta?.title||a("common.blocklets"));return d.jsxs(B,{teamDid:n,children:[T,d.jsxs(Ko,{children:[d.jsxs(Yt,{separator:"›","aria-label":"breadcrumb",className:"page-breadcrumb",children:[d.jsx(Rt,{color:"textSecondary",to:"/blocklets",children:a("common.blocklets")}),d.jsx(Nt,{to:`/blocklets/${n}/overview`,style:x=>x?{color:"inherit"}:{},children:a("common.detail")}),d.jsx(ue,{color:"textSecondary",children:_?_.breadcrumbsLabel||_.label:""})]}),d.jsxs(ue,{component:"div",className:"page-header",children:[d.jsxs(ue,{component:"h2",variant:"h4",className:"page-title",color:"textPrimary",children:[r?d.jsx(Ft,{blocklet:r,style:{marginRight:16}}):null,r?d.jsxs(Z,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1},children:[d.jsx(Z,{children:j.getDisplayName(r)}),r?.status!=="unknown"&&d.jsx(Ut,{size:"12px",status:r.status,source:r.source,progress:r.progress})]}):`${a("common.blocklet")} ${a("common.detail")}`]}),d.jsx(Xt,{permission:"mutate_blocklets",children:!!r&&!j.isExternalBlocklet(r)&&d.jsx(qt,{className:"page-actions",blocklet:r,onStart:m,onComplete:k,variant:"group",source:"blocklet-detail"})})]}),d.jsx(Po,{}),L]})]})}function fr(){const{did:e}=We();return e?d.jsx(Kt,{did:e,children:d.jsx(Go,{})}):null}const Ko=Vt.main`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./overview-D3hqR9Yg.js","./index-DrI_kbUr.js","./index-BLDnEtdF.css","./HelpOutline-DaGemEcX.js","./index-BojVbZw0.js","./index-BXpvvqAs.js","./blocklet-CzBGFesP.js","./team-DgQYntrc.js","./url-evaluation-CTsNt3ve.js","./status-LmBdrnlB.js","./index-DBtWMsht.js","./ErrorOutline-qdJUw5q6.js","./omit-B-qG4p98.js","./index-nsujgMc_.js","./metric-B6TET6QI.js","./CardContent-rjL6kB_r.js","./spaces-MVFShLV4.js","./api-CKaiYijO.js","./domains-7n5twKTf.js","./trim-Dm26Hw3f.js","./index-DUEj1V-j.js","./useAsync-sbHIoH6-.js","./permission-DET008IY.js","./Delete-RCnwfW1g.js","./actions-CoszoXjw.js","./delete-confirm-Dh3X0iXU.js","./click-to-copy-DXIfZNln.js","./status-UZAIOWNB.js","./VerifiedUser-CS3FW2sd.js","./Add-vvp5juzF.js","./CallMerge-C5DyJ6fm.js","./toLower-DBVF4v1M.js","./use-mobile-Czu8FCYf.js","./util-odWrmhcv.js","./is-path-prefix-equal-dPdZJpAg.js","./engine-Bbh7Mw-7.js","./OpenInNew-BUUx7OSU.js","./LoadingButton-DZ6V6Qhe.js","./index-B8JpxHJE.js","./actions-DE2r6nPV.js","./useLocalStorage-CnqCtMp_.js","./MoreVert-DxM-B8xa.js","./DeleteOutline-BXoQnWFj.js","./get-safe-url-BTJDduf6.js","./ButtonGroup-BDg4XqiR.js","./getValidReactChildren-T3CvLHYr.js","./ChevronRight-DxsEcvUg.js","./html-title-CQe12Cut.js","./preference-pxwdMSFg.js","./index-Bg6faJyI.js","./Done-DVQ_2sA2.js","./edit.svg-DBlxe-2U.js","./ArrowDropDown-CZ9_k8VG.js","./index-C73PGWD5.js","./iframe-BWle7w_S.js","./Autocomplete-BqPV4fCq.js","./ListSubheader-BTZwmxdp.js","./rotate-session-key-DE58Q8ag.js","./visuallyHidden-Dan1xhjv.js","./joi-browser.min-CUdv8seQ.js","./chain-z8CuvP-V.js","./switch-control-CE57fLeM.js","./index.esm-iaB2Jgy_.js","./isEmail-CmCW4Fgq.js","./index-kSplQjj2.js","./redux-Ab4buSXY.js","./typeof-QjJsDpFa.js","./provider-icon-CCZmjsDZ.js","./passkey-rounded-_WDHIZVd.js","./simple-select-BiJQdJOQ.js","./index-dCiAdDNg.js","./FilterList-Dfj9GsZN.js","./CSSTransition-CoGzojVI.js","./emotion-cache.browser.esm-Cu824RS4.js","./depsEqual-Bfsv3kHf.js","./TableSearch-okRl0dqT.js","./Search-m3CMNGDm.js","./Clear-Bq2o3otF.js","./use-mobile-BS_f_Fn7.js","./EditOutlined-CHgCULNs.js","./appearance-DtyCmGdO.js","./config-navigation-BYqsSWyl.js","./cloneDeep-BDiWjxRu.js","./_createAggregator-BunO9xPF.js","./raf-schd.esm-BuSKwIfR.js","./ListItemButton-kpGgMj08.js","./index-BzFgWQ5w.js","./index-DTVaw2Hc.js","./shorten-label-PYNmzpP_.js","./Replay-DyvF6A5F.js","./Refresh-BV0ShuHj.js","./traffic-7oEMp-9f.js","./ChevronLeft-DqSG9UHo.js","./index-CVhk080O.js","./base-chart-G_tNYsY8.js","./index-xtzr7R_I.js","./AdapterDayjs-QPUTgQRV.js","./useThemeProps-DrXM-hmA.js","./audit-logs-DQ3aFS2x.js","./index-CoHxWTi-.js","./index-ed1TwQco.css","./UnfoldMore-CZT-4-ZR.js","./index-BcZYQGNY.js","./ua-parser-D6QF1h5N.js","./index-DqCVCPmC.js","./Google-BtG0IwAt.js","./list-header-s21LDuvb.js","./ToggleButtonGroup-DxIvj50j.js","./lock.svg-DK1hXFWn.js","./index-BHLEff7q.js","./ViewList-CXrUBR0t.js","./Verified-C1aYOY3u.js","./index-CBCPHvf_.js","./sdk-CxXstbZm.js","./actions-MiEliG9R.js","./login-method-item-DwSmGt8t.js","./service-BpzqSJv4.js","./table-icons-BG66cxZv.js","./Edit-DVXYin_T.js","./index-CQob6fmR.js","./Link-BRsXeoEC.js","./item-C6yFM2Os.js","./Launch-BsxqWG7C.js","./item-D4DUnQj0.css","./index-C97bSDg2.js","./url-join-oxVMh_nl.js","./connect-to-CeGdVeiX.js","./index-D29L5UKE.js","./agreement-CiVQRYD2.js","./install-from-url-CzhDO2C0.js","./without-wallet-suCG1vjR.js","./Stepper-DR0cCC-q.js","./toUpper-RYfZ9dsZ.js","./log-DRaCmTGd.js","./download-CFyTq_FK.js","./runtime-b4EXN3II.js","./memory-VAHG3fjG.js","./index-Ii4Xi_du.js"])))=>i.map(i=>d[i]);
2
+ import{V as He,d as qe,aS as Ct,r as b,l as F,j as d,at as Qe,B as Z,bx as Ge,D as Tt,aU as j,by as jt,H as J,bz as Ke,a as We,u as Pt,b as At,bA as Dt,bB as Ot,bC as Lt,bD as Ae,bE as Bt,bF as Mt,b2 as De,C as Oe,bG as Rt,bH as Nt,K as ue,bI as Ft,I,t as Vt}from"./index-DrI_kbUr.js";import{T as zt,u as $t}from"./html-title-CQe12Cut.js";import{B as Ut}from"./status-UZAIOWNB.js";import{D as Ht,B as qt}from"./actions-DE2r6nPV.js";import{u as Qt}from"./blocklet-CzBGFesP.js";import{p as Gt}from"./index-CTjBZAn9.js";import{B as Kt,u as Wt,T as Jt}from"./team-DgQYntrc.js";import{P as Xt}from"./permission-DET008IY.js";import{B as Yt}from"./Breadcrumbs-DEV3jkdC.js";import"./useLocalStorage-CnqCtMp_.js";import"./MoreVert-DxM-B8xa.js";import"./DeleteOutline-BXoQnWFj.js";import"./get-safe-url-BTJDduf6.js";import"./ButtonGroup-BDg4XqiR.js";import"./getValidReactChildren-T3CvLHYr.js";import"./url-evaluation-CTsNt3ve.js";const Je=Object.freeze({left:0,top:0,width:16,height:16}),ee=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),H=Object.freeze({...Je,...ee}),me=Object.freeze({...H,body:"",hidden:!1});function Zt(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Le(e,t){const n=Zt(e,t);for(const r in me)r in ee?r in e&&!(r in n)&&(n[r]=ee[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function en(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function s(i){if(n[i])return o[i]=[];if(!(i in o)){o[i]=null;const c=r[i]&&r[i].parent,l=c&&s(c);l&&(o[i]=[c].concat(l))}return o[i]}return Object.keys(n).concat(Object.keys(r)).forEach(s),o}function tn(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let s={};function i(c){s=Le(r[c]||o[c],s)}return i(t),n.forEach(i),Le(e,s)}function nn(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=en(e);for(const o in r){const s=r[o];s&&(t(o,tn(e,o,s)),n.push(o))}return n}const V=/^[a-z0-9]+(-[a-z0-9]+)*$/,R=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const c=o.pop(),l=o.pop(),a={provider:o.length>0?o[0]:r,prefix:l,name:c};return t&&!X(a)?null:a}const s=o[0],i=s.split("-");if(i.length>1){const c={provider:r,prefix:i.shift(),name:i.join("-")};return t&&!X(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:s};return t&&!X(c,n)?null:c}return null},X=(e,t)=>e?!!((e.provider===""||e.provider.match(V))&&(t&&e.prefix===""||e.prefix.match(V))&&e.name.match(V)):!1,on={provider:"",aliases:{},not_found:{},...Je};function fe(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function rn(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!fe(e,on))return null;const n=t.icons;for(const o in n){const s=n[o];if(!o.match(V)||typeof s.body!="string"||!fe(s,me))return null}const r=t.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(V)||typeof i!="string"||!n[i]&&!r[i]||!fe(s,me))return null}return t}const te=Object.create(null);function sn(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function C(e,t){const n=te[e]||(te[e]=Object.create(null));return n[t]||(n[t]=sn(e,t))}function Ee(e,t){return rn(t)?nn(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function cn(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function an(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(te)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(te[o]||{})).forEach(i=>{const c=C(o,i);n=n.concat(Object.keys(c.icons).map(l=>(o!==""?"@"+o+":":"")+i+":"+l))})}),n}let _e=!1;function ln(e){return _e}function q(e){const t=typeof e=="string"?R(e,!0,_e):e;if(t){const n=C(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function un(e,t){const n=R(e,!0,_e);if(!n)return!1;const r=C(n.provider,n.prefix);return cn(r,n.name,t)}function Xe(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const n=e.prefix;if(!X({provider:t,prefix:n,name:"a"}))return!1;const r=C(t,n);return!!Ee(r,e)}function fn(e){return!!q(e)}function dn(e){const t=q(e);return t?{...H,...t}:null}const Ye=Object.freeze({width:null,height:null}),Ze=Object.freeze({...Ye,...ee}),pn=/(-?[0-9.]*[0-9]+[0-9.]*)/g,mn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function he(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(pn);if(r===null||!r.length)return e;const o=[];let s=r.shift(),i=mn.test(s);for(;;){if(i){const c=parseFloat(s);isNaN(c)?o.push(s):o.push(Math.ceil(c*t*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const hn=e=>e==="unset"||e==="undefined"||e==="none";function re(e,t){const n={...H,...e},r={...Ze,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(g=>{const y=[],E=g.hFlip,A=g.vFlip;let w=g.rotate;E?A?w+=2:(y.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),y.push("scale(-1 1)"),o.top=o.left=0):A&&(y.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),y.push("scale(1 -1)"),o.top=o.left=0);let S;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:S=o.height/2+o.top,y.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:y.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:S=o.width/2+o.left,y.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")");break}w%2===1&&(o.left!==o.top&&(S=o.left,o.left=o.top,o.top=S),o.width!==o.height&&(S=o.width,o.width=o.height,o.height=S)),y.length&&(s='<g transform="'+y.join(" ")+'">'+s+"</g>")});const i=r.width,c=r.height,l=o.width,a=o.height;let u,p;i===null?(p=c===null?"1em":c==="auto"?a:c,u=he(p,l/a)):(u=i==="auto"?l:i,p=c===null?he(u,a/l):c==="auto"?a:c);const f={},h=(g,y)=>{hn(y)||(f[g]=y.toString())};return h("width",u),h("height",p),f.viewBox=o.left.toString()+" "+o.top.toString()+" "+l.toString()+" "+a.toString(),{attributes:f,body:s}}const gn=/\sid="(\S+)"/g,bn="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let yn=0;function et(e,t=bn){const n=[];let r;for(;r=gn.exec(e);)n.push(r[1]);if(!n.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const i=typeof t=="function"?t(s):t+(yn++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+i+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const D={local:!0,session:!0},tt={local:new Set,session:new Set};let Ce=!1;function vn(e){Ce=e}const Be="iconify2",U="iconify",nt=U+"-count",Me=U+"-version",ot=36e5,xn=168;function ge(e,t){try{return e.getItem(t)}catch{}}function Te(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Re(e,t){try{e.removeItem(t)}catch{}}function be(e,t){return Te(e,nt,t.toString())}function ye(e){return parseInt(ge(e,nt))||0}let K=typeof window>"u"?{}:window;function rt(e){const t=e+"Storage";try{if(K&&K[t]&&typeof K[t].length=="number")return K[t]}catch{}D[e]=!1}function st(e,t){const n=rt(e);if(!n)return;const r=ge(n,Me);if(r!==Be){if(r){const c=ye(n);for(let l=0;l<c;l++)Re(n,U+l.toString())}Te(n,Me,Be),be(n,0);return}const o=Math.floor(Date.now()/ot)-xn,s=c=>{const l=U+c.toString(),a=ge(n,l);if(typeof a=="string"){try{const u=JSON.parse(a);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&t(u,c))return!0}catch{}Re(n,l)}};let i=ye(n);for(let c=i-1;c>=0;c--)s(c)||(c===i-1?(i--,be(n,i)):tt[e].add(c))}function it(){if(!Ce){vn(!0);for(const e in D)st(e,t=>{const n=t.data,r=t.provider,o=n.prefix,s=C(r,o);if(!Ee(s,n).length)return!1;const i=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function ct(e,t){switch(e){case"local":case"session":D[e]=t;break;case"all":for(const n in D)D[n]=t;break}}const ve=Object.create(null);function at(e,t){ve[e]=t}function xe(e){return ve[e]||ve[""]}function je(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const se=Object.create(null),N=["https://api.simplesvg.com","https://api.unisvg.com"],Y=[];for(;N.length>0;)N.length===1||Math.random()>.5?Y.push(N.shift()):Y.push(N.pop());se[""]=je({resources:["https://api.iconify.design"].concat(Y)});function lt(e,t){const n=je(t);return n===null?!1:(se[e]=n,!0)}function ie(e){return se[e]}function wn(){return Object.keys(se)}const Sn=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let ne=Sn();function In(e){ne=e}function kn(){return ne}function En(e,t){const n=ie(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(i=>{o=Math.max(o,i.length)});const s=t+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function _n(e){return e===404}const Cn=(e,t,n)=>{const r=[],o=En(e,t),s="icons";let i={type:s,provider:e,prefix:t,icons:[]},c=0;return n.forEach((l,a)=>{c+=l.length+1,c>=o&&a>0&&(r.push(i),i={type:s,provider:e,prefix:t,icons:[]},c=l.length),i.icons.push(l)}),r.push(i),r};function Tn(e){if(typeof e=="string"){const t=ie(e);if(t)return t.path}return"/"}const jn=(e,t,n)=>{if(!ne){n("abort",424);return}let r=Tn(t.provider);switch(t.type){case"icons":{const s=t.prefix,c=t.icons.join(","),l=new URLSearchParams({icons:c});r+=s+".json?"+l.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;ne(e+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(_n(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},Pn={prepare:Cn,send:jn};function An(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,i=o.prefix,c=o.name,l=n[s]||(n[s]=Object.create(null)),a=l[i]||(l[i]=C(s,i));let u;c in a.icons?u=t.loaded:i===""||a.missing.has(c)?u=t.missing:u=t.pending;const p={provider:s,prefix:i,name:c};u.push(p)}),t}function ut(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function Dn(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,o=e.prefix;t.forEach(s=>{const i=s.icons,c=i.pending.length;i.pending=i.pending.filter(l=>{if(l.prefix!==o)return!0;const a=l.name;if(e.icons[a])i.loaded.push({provider:r,prefix:o,name:a});else if(e.missing.has(a))i.missing.push({provider:r,prefix:o,name:a});else return n=!0,!0;return!1}),i.pending.length!==c&&(n||ut([e],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let On=0;function Ln(e,t,n){const r=On++,o=ut.bind(null,n,r);if(!t.pending.length)return o;const s={id:r,icons:t,callback:e,abort:o};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}function Bn(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const s=typeof o=="string"?R(o,t,n):o;s&&r.push(s)}),r}var Mn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Rn(e,t,n,r){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let i;if(e.random){let m=e.resources.slice(0);for(i=[];m.length>1;){const k=Math.floor(Math.random()*m.length);i.push(m[k]),m=m.slice(0,k).concat(m.slice(k+1))}i=i.concat(m)}else i=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let l="pending",a=0,u,p=null,f=[],h=[];typeof r=="function"&&h.push(r);function g(){p&&(clearTimeout(p),p=null)}function y(){l==="pending"&&(l="aborted"),g(),f.forEach(m=>{m.status==="pending"&&(m.status="aborted")}),f=[]}function E(m,k){k&&(h=[]),typeof m=="function"&&h.push(m)}function A(){return{startTime:c,payload:t,status:l,queriesSent:a,queriesPending:f.length,subscribe:E,abort:y}}function w(){l="failed",h.forEach(m=>{m(void 0,u)})}function S(){f.forEach(m=>{m.status==="pending"&&(m.status="aborted")}),f=[]}function L(m,k,_){const B=k!=="success";switch(f=f.filter(T=>T!==m),l){case"pending":break;case"failed":if(B||!e.dataAfterTimeout)return;break;default:return}if(k==="abort"){u=_,w();return}if(B){u=_,f.length||(i.length?v():w());return}if(g(),S(),!e.random){const T=e.resources.indexOf(m.resource);T!==-1&&T!==e.index&&(e.index=T)}l="completed",h.forEach(T=>{T(_)})}function v(){if(l!=="pending")return;g();const m=i.shift();if(m===void 0){if(f.length){p=setTimeout(()=>{g(),l==="pending"&&(S(),w())},e.timeout);return}w();return}const k={status:"pending",resource:m,callback:(_,B)=>{L(k,_,B)}};f.push(k),a++,p=setTimeout(v,e.rotate),n(m,t,k.callback)}return setTimeout(v),A}function ft(e){const t={...Mn,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function o(c,l,a){const u=Rn(t,c,l,(p,f)=>{r(),a&&a(p,f)});return n.push(u),u}function s(c){return n.find(l=>c(l))||null}return{query:o,find:s,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function Ne(){}const de=Object.create(null);function Nn(e){if(!de[e]){const t=ie(e);if(!t)return;const n=ft(t),r={config:t,redundancy:n};de[e]=r}return de[e]}function dt(e,t,n){let r,o;if(typeof e=="string"){const s=xe(e);if(!s)return n(void 0,424),Ne;o=s.send;const i=Nn(e);i&&(r=i.redundancy)}else{const s=je(e);if(s){r=ft(s);const i=e.resources?e.resources[0]:"",c=xe(i);c&&(o=c.send)}}return!r||!o?(n(void 0,424),Ne):r.query(t,o,n)().abort}function Fn(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in D)st(r,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function Vn(e,t){Ce||it();function n(r){let o;if(!D[r]||!(o=rt(r)))return;const s=tt[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=ye(o),!be(o,i+1))return;const c={cached:Math.floor(Date.now()/ot),provider:e.provider,data:t};return Te(o,U+i.toString(),JSON.stringify(c))}t.lastModified&&!Fn(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Fe(){}function zn(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Dn(e)}))}function $n(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let s;if(!o||!(s=xe(n)))return;s.prepare(n,r,o).forEach(c=>{dt(n,c,l=>{if(typeof l!="object")c.icons.forEach(a=>{e.missing.add(a)});else try{const a=Ee(e,l);if(!a.length)return;const u=e.pendingIcons;u&&a.forEach(p=>{u.delete(p)}),Vn(e,l)}catch(a){console.error(a)}zn(e)})})}))}const Un=e=>{const n=C(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},Pe=(e,t)=>{const n=Bn(e,!0,ln()),r=An(n);if(!r.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(r.loaded,r.missing,r.pending,Fe)}),()=>{l=!1}}const o=Object.create(null),s=[];let i,c;return r.pending.forEach(l=>{const{provider:a,prefix:u}=l;if(u===c&&a===i)return;i=a,c=u,s.push(C(a,u));const p=o[a]||(o[a]=Object.create(null));p[u]||(p[u]=[])}),r.pending.forEach(l=>{const{provider:a,prefix:u,name:p}=l,f=C(a,u),h=f.pendingIcons||(f.pendingIcons=new Set);h.has(p)||(h.add(p),o[a][u].push(p))}),s.forEach(l=>{const{provider:a,prefix:u}=l;o[a][u].length&&$n(l,o[a][u])}),t?Ln(t,r,s):Fe},Hn=e=>new Promise((t,n)=>{const r=typeof e=="string"?R(e,!0):e;if(!r){n(e);return}Pe([r||e],o=>{if(o.length&&r){const s=q(r);if(s){t({...H,...s});return}}n(e)})});function pt(e,t){const n={...e};for(const r in t){const o=t[r],s=typeof o;r in Ye?(o===null||o&&(s==="string"||s==="number"))&&(n[r]=o):s===typeof n[r]&&(n[r]=r==="rotate"?o%4:o)}return n}const ce={...Ze,inline:!1},pe="iconify",we="iconify-inline",P="iconifyData"+Date.now();let O=[];function Q(e){for(let t=0;t<O.length;t++){const n=O[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function mt(e,t=!1){let n=Q(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},O.push(n),n)}function qn(){if(document.documentElement)return mt(document.documentElement);O.push({node:()=>document.documentElement})}function Qn(e){O=O.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function G(){return O}function Gn(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let z=null;const Kn={childList:!0,subtree:!0,attributes:!0};function ht(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,z&&z(e)}))}function Wn(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let r=0;r<t.length;r++){const o=t[r];if(o.addedNodes&&o.addedNodes.length>0||o.type==="attributes"&&o.target[P]!==void 0){n.paused||ht(e);return}}}function gt(e,t){e.observer.instance.observe(t,Kn)}function oe(e){let t=e.observer;if(t&&t.instance)return;const n=typeof e.node=="function"?e.node():e.node;!n||!window||(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(Wn.bind(null,e)),gt(e,n),t.paused||ht(e))}function Ve(){G().forEach(oe)}function bt(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function Jn(e){const t=z!==null;if(z!==e&&(z=e,t&&G().forEach(bt)),t){Ve();return}Gn(Ve)}function Se(e){(e?[e]:G()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const n=t.observer;if(n.paused++,n.paused>1||!n.instance)return;n.instance.disconnect()})}function Xn(e){if(e){const t=Q(e);t&&Se(t)}else Se()}function Ie(e){(e?[e]:G()).forEach(t=>{if(!t.observer){oe(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const r=typeof t.node=="function"?t.node():t.node;if(r)n.instance?gt(t,r):oe(t);else return}})}function Yn(e){if(e){const t=Q(e);t&&Ie(t)}else Ie()}function yt(e,t=!1){const n=mt(e,t);return oe(n),n}function vt(e){const t=Q(e);t&&(bt(t),Qn(e))}function Zn(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,r=t.customisations;for(const o in ce)if(n[o]!==r[o])return!0;return!1}function eo(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return t}const to=/[\s,]+/;function no(e,t){t.split(to).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const oo=["width","height"],ro=["inline","hFlip","vFlip"];function so(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function io(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&R(t,!0);if(!n)return null;const r={...ce,inline:e.classList&&e.classList.contains(we)};oo.forEach(c=>{const l=e.getAttribute("data-"+c);l&&(r[c]=l)});const o=e.getAttribute("data-rotate");typeof o=="string"&&(r.rotate=eo(o));const s=e.getAttribute("data-flip");typeof s=="string"&&no(r,s),ro.forEach(c=>{const l="data-"+c,a=so(e.getAttribute(l),l);typeof a=="boolean"&&(r[c]=a)});const i=e.getAttribute("data-mode");return{name:t,icon:n,customisations:r,mode:i}}const co="svg."+pe+", i."+pe+", span."+pe+", i."+we+", span."+we;function ao(e){const t=[];return e.querySelectorAll(co).forEach(n=>{const r=n[P]||n.tagName.toLowerCase()!=="svg"?io(n):null;r&&t.push({node:n,props:r})}),t}function xt(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}let $;function lo(){try{$=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{$=null}}function uo(e){return $===void 0&&lo(),$?$.createHTML(e):e}function wt(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function St(e,t,n,r){const o=e.classList;if(r){const i=r.classList;Array.from(i).forEach(c=>{o.add(c)})}const s=[];return t.forEach(i=>{o.contains(i)?n.has(i)&&s.push(i):(o.add(i),s.push(i))}),n.forEach(i=>{t.has(i)||o.remove(i)}),s}function It(e,t,n){const r=e.style;(n||[]).forEach(s=>{r.removeProperty(s)});const o=[];for(const s in t)r.getPropertyValue(s)||(o.push(s),r.setProperty(s,t[s]));return o}function kt(e,t,n){let r;try{r=document.createElement("span")}catch{return e}const o=t.customisations,s=re(n,o),i=e[P],c=xt(et(s.body),{"aria-hidden":"true",role:"img",...s.attributes});r.innerHTML=uo(c);const l=r.childNodes[0],a=e.attributes;for(let g=0;g<a.length;g++){const y=a.item(g),E=y.name;E!=="class"&&!l.hasAttribute(E)&&l.setAttribute(E,y.value)}const u=wt(t.icon),p=St(l,u,new Set(i&&i.addedClasses),e),f=It(l,o.inline?{"vertical-align":"-0.125em"}:{},i&&i.addedStyles),h={...t,status:"loaded",addedClasses:p,addedStyles:f};return l[P]=h,e.parentNode&&e.parentNode.replaceChild(l,e),l}function fo(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function po(e){return"data:image/svg+xml,"+fo(e)}function mo(e){return'url("'+po(e)+'")'}const ho={display:"inline-block"},ke={"background-color":"currentColor"},Et={"background-color":"transparent"},ze={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},$e={"-webkit-mask":ke,mask:ke,background:Et};for(const e in $e){const t=$e[e];for(const n in ze)t[e+"-"+n]=ze[n]}function Ue(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function go(e,t,n,r){const o=t.customisations,s=re(n,o),i=s.attributes,c=e[P],l=xt(s.body,{...i,width:n.width+"",height:n.height+""}),a=wt(t.icon),u=St(e,a,new Set(c&&c.addedClasses)),f={"--svg":mo(l),width:Ue(i.width),height:Ue(i.height),...ho,...r?ke:Et};o.inline&&(f["vertical-align"]="-0.125em");const h=It(e,f,c&&c.addedStyles),g={...t,status:"loaded",addedClasses:u,addedStyles:h};return e[P]=g,e}let W=!1;function bo(){W||(W=!0,setTimeout(()=>{W&&(W=!1,M())}))}function M(e,t=!1){const n=Object.create(null);function r(o,s){const{provider:i,prefix:c,name:l}=o,a=C(i,c),u=a.icons[l];if(u)return{status:"loaded",icon:u};if(a.missing.has(l))return{status:"missing"};if(s&&!Un(o)){const p=n[i]||(n[i]=Object.create(null));(p[c]||(p[c]=new Set)).add(l)}return{status:"loading"}}(e?[e]:G()).forEach(o=>{const s=typeof o.node=="function"?o.node():o.node;if(!s||!s.querySelectorAll)return;let i=!1,c=!1;function l(a,u,p){if(c||(c=!0,Se(o)),a.tagName.toUpperCase()!=="SVG"){const f=u.mode,h=f==="mask"||(f==="bg"?!1:f==="style"?p.body.indexOf("currentColor")!==-1:null);if(typeof h=="boolean"){go(a,u,{...H,...p},h);return}}kt(a,u,p)}ao(s).forEach(({node:a,props:u})=>{const p=a[P];if(!p){const{status:h,icon:g}=r(u.icon,!0);if(g){l(a,u,g);return}i=i||h==="loading",a[P]={...u,status:h};return}let f;if(Zn(p,u)){if(f=r(u.icon,p.name!==u.name),!f.icon){i=i||f.status==="loading",Object.assign(p,{...u,status:f.status});return}}else{if(p.status!=="loading")return;if(f=r(u.icon,!1),!f.icon){p.status=f.status;return}}l(a,u,f.icon)}),o.temporary&&!i?vt(s):t&&i?yt(s,!0):c&&o.observer&&Ie(o)});for(const o in n){const s=n[o];for(const i in s){const c=s[i];Pe(Array.from(c).map(l=>({provider:o,prefix:i,name:l})),bo)}}}function yo(e){const t=Q(e);t?M(t):M({node:e,temporary:!0},!0)}function _t(e,t,n=!1){const r=q(e);if(!r)return null;const o=R(e),s=pt(ce,t||{}),i=kt(document.createElement("span"),{name:e,icon:o,customisations:s},r);return n?i.outerHTML:i}function vo(){return"3.1.1"}function xo(e,t){return _t(e,t,!1)}function wo(e,t){return _t(e,t,!0)}function So(e,t){const n=q(e);if(!n)return null;const r=pt(ce,t||{});return re(n,r)}function Io(e){e?yo(e):M()}if(typeof document<"u"&&typeof window<"u"){qn();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!Xe(r))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{Jn(M),M()})}function ko(e,t){ct(e,t!==!1)}function Eo(e){ct(e,!0)}at("",Pn);if(typeof document<"u"&&typeof window<"u"){it();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const r="IconifyProviders["+n+"] is invalid.";try{const o=t[n];if(typeof o!="object"||!o||o.resources===void 0)continue;lt(n,o)||console.error(r)}catch{console.error(r)}}}}const _o={getAPIConfig:ie,setAPIModule:at,sendAPIQuery:dt,setFetch:In,getFetch:kn,listAPIProviders:wn},Co={_api:_o,addAPIProvider:lt,loadIcons:Pe,loadIcon:Hn,iconExists:fn,getIcon:dn,listIcons:an,addIcon:un,addCollection:Xe,replaceIDs:et,calculateSize:he,buildIcon:re,getVersion:vo,renderSVG:xo,renderHTML:wo,renderIcon:So,scan:Io,observe:yt,stopObserving:vt,pauseObserver:Xn,resumeObserver:Yn,enableCache:ko,disableCache:Eo};try{self.Iconify===void 0&&(self.Iconify=Co)}catch{}const To=e=>{const t={};let n=null;return j.forEachBlockletSync(e,r=>{t[r.meta.bundleDid]?n=j.getDisplayName(r,!0):r.meta.bundleDid&&(t[r.meta.bundleDid]=!0)}),n},jo=(e,t,n)=>{const{hostname:r,href:o}=e;if(!t)return o;if(n){const i=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!i)return o;const c=i[0],a=((t.site?.domainAliases||[]).map(u=>u.value).filter(Boolean).find(u=>u.endsWith(F.DEFAULT_DID_DOMAIN))||"").replace(`.${F.DEFAULT_DID_DOMAIN}`,"");return a?o.replace(r,`${a}-${c}.${F.DEFAULT_IP_DOMAIN_SUFFIX}`):o}return o.replace(t.meta.bundleDid,t.appPid)};function Po(){const{t:e}=He(),{api:t}=qe(),{blocklet:n}=Qt(),{inService:r}=Ct(),[o,s]=b.useState(!1),[i,c]=b.useState(5),l=n&&n.structVersion!==F.APP_STRUCT_VERSION,a=()=>{try{if(j.isBlockletRunning(n)){J.error(e("blocklet.migrate.tip.running"));return}const f=To(n);if(f){J.error(e("blocklet.migrate.tip.duplicate",{name:f}));return}s(!0)}catch(f){J.error(Ke(f))}},u=()=>{const f=jo(window.location,n,r);setTimeout(()=>{window.location.href=f},5e3),c(5),setInterval(()=>{c(h=>h-1)},1e3)},p=()=>s(!1);return[l&&d.jsxs(Qe,{severity:"warning",style:{margin:"12px 0"},children:[d.jsxs(Z,{sx:{display:"flex",alignItems:"center"},children:[d.jsx(Ge,{variant:"contained",size:"small",color:"primary",onClick:()=>a(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),d.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(f=>d.jsx(Z,{sx:{display:"flex",alignItems:"center"},children:e(`blocklet.migrate.intro.${f}`)},f))]},"alert"),n&&d.jsx(Tt,{popup:!0,open:o,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:300*1e3,onSuccess:u,extraParams:{appDid:n.appDid,did:n.meta.did,wt:jt(n,!0),title:j.getDisplayName(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:i>=0?e("blocklet.migrate.success",{sec:i}):"Redirecting..."},onClose:p},"connect")]}const Ao=b.lazy(()=>I(()=>import("./overview-D3hqR9Yg.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]),import.meta.url)),Do=b.lazy(()=>I(()=>import("./domains-7n5twKTf.js"),__vite__mapDeps([18,1,2,19,20,21,6,22,23,24,25,26,27,28,15,29,30,31,32,5,33,34,35,36,37,10]),import.meta.url)),Oo=b.lazy(()=>I(()=>import("./index-B8JpxHJE.js"),__vite__mapDeps([38,1,2,39,40,41,42,43,44,45,8,22,46,47,10,48,12,49,50,51,52,53,54,55,56,57,58,6,26,7,5,59,60,9,11,13,61,62,63,64,65,66,67,68,69,23,29,70,71,72,73,74,20,75,76,77,78,79,15]),import.meta.url)),Lo=b.lazy(()=>I(()=>import("./appearance-DtyCmGdO.js"),__vite__mapDeps([80,1,2,6,78]),import.meta.url)),Bo=b.lazy(()=>I(()=>import("./config-navigation-BYqsSWyl.js"),__vite__mapDeps([81,1,2,12,82,49,83,74,6,64,65,66,84,7,8,39,40,41,42,43,44,45,22,62,69,47,77,52,17,55,56,85,32,86,54,37]),import.meta.url)),Mo=b.lazy(()=>I(()=>import("./index-DTVaw2Hc.js"),__vite__mapDeps([87,1,2,70,71,72,73,64,65,66,74,20,75,76,77,41,88,5,47,89,90,91,54,92,46,93,94,95,96,97,58]),import.meta.url)),Ro=b.lazy(()=>I(()=>import("./audit-logs-DQ3aFS2x.js"),__vite__mapDeps([98,20,1,2,75,76,77,40,99,100,101,88,7,6,8]),import.meta.url)),No=b.lazy(()=>I(()=>import("./index-BcZYQGNY.js").then(e=>e.i),__vite__mapDeps([102,1,2,70,71,72,73,64,65,66,74,20,75,76,77,41,47,7,6,8,103,78,104,44,45,22,105,82,29,51,106,60,107,108,19]),import.meta.url)),Fo=b.lazy(()=>I(()=>import("./index-BHLEff7q.js").then(e=>e.i),__vite__mapDeps([109,1,2,29,110,70,71,72,73,64,65,66,74,20,75,76,77,41,13,104,44,45,7,6,8,62,105,82,55,56,101,79,22,26,96,97,58,47,5,111,42,11,112,113,114,19,68,115,63,78,23,24,88,103]),import.meta.url)),Vo=b.lazy(()=>I(()=>import("./service-BpzqSJv4.js"),__vite__mapDeps([116,1,2,117,71,72,73,93,66,84,65,97,47,29,23,77,118,46,92,76,52]),import.meta.url)),zo=b.lazy(()=>I(()=>import("./index-CQob6fmR.js"),__vite__mapDeps([119,1,2,20,39,40,41,42,43,44,45,8,22,61,6,118,117,71,72,73,93,66,84,65,97,47,29,23,77,46,92,76,52,48,12,49,50,51,53,54,26,104,120,121,111,55,56,28,122,25,123,124,125,35,126,4,16,17,36,127,3,128,99,100,105,82,129,27,130,59,115,68,5,85,131,33,34,78,11,108,89,24,132,7]),import.meta.url)),$o=b.lazy(()=>I(()=>import("./log-DRaCmTGd.js"),__vite__mapDeps([133,1,2,40,134,44,45,56]),import.meta.url)),Uo=b.lazy(()=>I(()=>import("./runtime-b4EXN3II.js"),__vite__mapDeps([135,1,2,70,71,72,73,64,65,66,74,20,75,76,77,41,6,127,136,94,95,27,107,45]),import.meta.url)),Ho=b.lazy(()=>I(()=>import("./traffic-7oEMp-9f.js").then(e=>e.t),__vite__mapDeps([91,1,2,54,92,46,93,66,94,95,96,97,58,72]),import.meta.url)),qo=b.lazy(()=>I(()=>import("./index-Ii4Xi_du.js"),__vite__mapDeps([137,1,2,47,6,78,126,4,16,17,42,36,127,3,104,44,45,5,95,70,71,72,73,64,65,66,74,20,75,76,77,41,43,61,106]),import.meta.url)),Qo=({children:e})=>e;function Go(){const e=Pt(),{tab:t="overview"}=We(),{did:n,blocklet:r,error:o,client:s,actions:{setBlocklet:i,refreshBlocklet:c}}=Wt(),{refresh:l}=At(),{t:a}=He(),{session:u}=qe(),{data:p}=Dt(),f=Ot(()=>u.user?.role&&Lt.includes(u.user.role),[u]),h=b.useCallback(()=>d.jsx(Ro,{scope:n,blocklets:p}),[n,p]),g=b.useCallback(()=>f?d.jsx(Mo,{blocklet:r}):d.jsx(Gt,{status:403}),[r,f]),y=r?.environments.find(x=>x.key==="BLOCKLET_APP_URL")?.value||window.location.origin,E=x=>Mt(x,y),A=x=>{e(`/blocklets/${n}/${x}`)},w=x=>{x&&i(x),c()},S=!r||Ae(r.status)?[]:j.getAppMissingConfigs(r);let L=null;const v=[{label:a("common.overview"),value:"overview"},{breadcrumbsLabel:a("common.components"),label:d.jsx(Bt,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!S.length,children:a("common.components")}),value:"components"}];if(o)L=d.jsxs(d.Fragment,{children:[d.jsx(Qe,{severity:"error",children:Ke(o)}),d.jsx(Ge,{onClick:()=>c(),children:d.jsx("span",{style:{textDecoration:"underline"},children:a("common.retry")})})]});else if(r){const x={overview:d.jsx(Ao,{}),domains:d.jsx(Do,{}),configuration:Oo,appearance:Lo,navigation:Bo,services:Vo,members:d.jsx(Fo,{type:"blocklet",createPassportSvg:E}),passports:No,components:zo,"audit-logs":h,notifications:g,logs:$o,runtime:d.jsx(Uo,{}),traffic:d.jsx(Ho,{client:s,did:n}),didSpaces:d.jsx(qo,{})};t==="configuration"&&Ae(r.status)&&A("overview"),v.push({label:a("common.domains"),value:"domains"}),v.push({label:a("common.members"),value:"members"}),v.push({label:a("team.member.passports"),value:"passports"}),v.push({label:a("common.configuration"),value:"configuration"}),v.push({label:a("common.appearance"),value:"appearance"}),v.push({label:a("common.auditLogs"),value:"audit-logs"}),f&&v.push({label:a("common.notificationRecords"),value:"notifications"}),r&&r.children?.length&&r.structVersion===F.APP_STRUCT_VERSION&&v.push({label:a("common.logs"),value:"logs"}),v.push({label:a("common.configNavigation"),value:"navigation"}),v.push({label:a("common.runtime"),value:"runtime"}),v.push({label:a("common.traffic"),value:"traffic"}),v.push({label:a("storage.spaces.title"),value:"didSpaces"}),j.getBlockletServices(r).length&&v.splice(2,0,{label:a("blocklet.services"),value:"services"});const le=x[t]||x.overview;L=d.jsxs(Ht,{type:"components",children:[!j.isExternalBlocklet(r)&&d.jsx(zt,{tabs:v,current:t,onChange:A,scrollButtons:"auto"}),d.jsx("div",{className:"page-content",children:d.jsx(b.Suspense,{fallback:d.jsx(De,{relative:"parent",children:d.jsx(Oe,{})}),children:b.isValidElement(le)?le:d.jsx(le,{blocklet:r,onUpdate:w,createPassportSvg:E})})})]})}else L=d.jsx(De,{relative:"parent",children:d.jsx(Oe,{})});const m=()=>{},k=({action:x,error:ae})=>{if(ae){J.error(ae.message);return}x==="remove"?(l(),e("/blocklets")):c()},_=v.find(x=>x.value===t),B=r?Jt:Qo,T=$t(_,r?.meta?.title||a("common.blocklets"));return d.jsxs(B,{teamDid:n,children:[T,d.jsxs(Ko,{children:[d.jsxs(Yt,{separator:"›","aria-label":"breadcrumb",className:"page-breadcrumb",children:[d.jsx(Rt,{color:"textSecondary",to:"/blocklets",children:a("common.blocklets")}),d.jsx(Nt,{to:`/blocklets/${n}/overview`,style:x=>x?{color:"inherit"}:{},children:a("common.detail")}),d.jsx(ue,{color:"textSecondary",children:_?_.breadcrumbsLabel||_.label:""})]}),d.jsxs(ue,{component:"div",className:"page-header",children:[d.jsxs(ue,{component:"h2",variant:"h4",className:"page-title",color:"textPrimary",children:[r?d.jsx(Ft,{blocklet:r,style:{marginRight:16}}):null,r?d.jsxs(Z,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1},children:[d.jsx(Z,{children:j.getDisplayName(r)}),r?.status!=="unknown"&&d.jsx(Ut,{size:"12px",status:r.status,source:r.source,progress:r.progress})]}):`${a("common.blocklet")} ${a("common.detail")}`]}),d.jsx(Xt,{permission:"mutate_blocklets",children:!!r&&!j.isExternalBlocklet(r)&&d.jsx(qt,{className:"page-actions",blocklet:r,onStart:m,onComplete:k,variant:"group",source:"blocklet-detail"})})]}),d.jsx(Po,{}),L]})]})}function fr(){const{did:e}=We();return e?d.jsx(Kt,{did:e,children:d.jsx(Go,{})}):null}const Ko=Vt.main`
3
3
  .page-header {
4
4
  display: flex;
5
5
  justify-content: space-between;
@@ -1,4 +1,4 @@
1
- import{aZ as W,aY as V,r as y,$ as G,j as e,gF as Ut,a3 as K,a4 as Z,a5 as Q,a9 as Xe,gG as Se,c as Ye,fy as Je,y as ae,gH as Bt,ao as Nt,aH as et,T as Ft,V as S,i as zt,k as ne,gI as $t,cq as Ht,B as x,C as F,b7 as Ot,K as T,at as de,cp as ue,ab as X,al as me,ad as E,eT as tt,gJ as _t,gK as nt,by as Wt,aS as L,c3 as Vt,am as Ue,as as pe,H as q,o,bD as fe,eN as Gt,M as ot,az as Kt,aA as Zt,U as Qt,x as Xt,eS as Be,gL as Yt,bI as Jt,eg as st,gM as it,dP as ve,aD as O,bb as rt,gN as en,ba as tn,c$ as at,t as nn,gO as lt,gP as on,gQ as sn,ai as ct,bo as rn,gR as an,R as ln,gS as H,bF as z,aU as le,gD as cn,w as dn,af as oe,b2 as Ne,au as un,bv as mn,cZ as pn,gT as fn}from"./index-BIgX2N1A.js";import{t as Te,a as xn}from"./trim-D7km596D.js";import{y as hn}from"./index-BfQLSa8k.js";import{u as gn}from"./useAsync-DtsKmLYR.js";import{u as Y}from"./blocklet-lDvdqhrX.js";import{w as dt}from"./permission-C_g43OOf.js";import{D as ut}from"./Delete-DkHujAB7.js";import{A as yn}from"./actions-5RspfWE_.js";import{D as Dn}from"./delete-confirm-DyLbGAy5.js";import{D as Fe}from"./status-B4gHBixJ.js";import{S as bn,V as jn}from"./VerifiedUser-D0ltmMtV.js";import{C as vn}from"./CardContent-CPUlyd-R.js";import{A as Cn}from"./Add-IxR__ozX.js";import{A as wn}from"./CallMerge-Di3dNXj5.js";import{a as Rn}from"./toLower-oQZ3J7Wi.js";import{u as Sn}from"./use-mobile-BmaqHxmL.js";import{v as Tn}from"./index-CaLjm3Sr.js";import{g as kn,p as ze}from"./util-w8OtW6iJ.js";import{O as An}from"./OpenInNew-CEBJXmxa.js";import{C as In}from"./click-to-copy-C6h97nXy.js";import{L as mt}from"./LoadingButton-CUdpFc0p.js";import{u as Pn}from"./index-CPZ5M8hw.js";import"./is-path-prefix-equal-Cc6vYZ8N.js";import"./engine-DGEfu7n8.js";function Mn(t){return W("MuiTable",t)}V("MuiTable",["root","stickyHeader"]);const qn=t=>{const{classes:n,stickyHeader:s}=t;return Q({root:["root",s&&"stickyHeader"]},Mn,n)},En=K("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,n)=>{const{ownerState:s}=t;return[n.root,s.stickyHeader&&n.stickyHeader]}})(Xe(({theme:t})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...t.typography.body2,padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:n})=>n.stickyHeader,style:{borderCollapse:"separate"}}]}))),$e="table",Ln=y.forwardRef(function(n,s){const a=G({props:n,name:"MuiTable"}),{className:i,component:r=$e,padding:c="normal",size:l="medium",stickyHeader:d=!1,...p}=a,f={...a,component:r,padding:c,size:l,stickyHeader:d},u=qn(f),g=y.useMemo(()=>({padding:c,size:l,stickyHeader:d}),[c,l,d]);return e.jsx(Ut.Provider,{value:g,children:e.jsx(En,{as:r,role:r===$e?null:"table",ref:s,className:Z(u.root,i),ownerState:f,...p})})});function Un(t){return W("MuiTableBody",t)}V("MuiTableBody",["root"]);const Bn=t=>{const{classes:n}=t;return Q({root:["root"]},Un,n)},Nn=K("tbody",{name:"MuiTableBody",slot:"Root"})({display:"table-row-group"}),Fn={variant:"body"},He="tbody",zn=y.forwardRef(function(n,s){const a=G({props:n,name:"MuiTableBody"}),{className:i,component:r=He,...c}=a,l={...a,component:r},d=Bn(l);return e.jsx(Se.Provider,{value:Fn,children:e.jsx(Nn,{className:Z(d.root,i),as:r,ref:s,role:r===He?null:"rowgroup",ownerState:l,...c})})});function $n(t){return W("MuiTableContainer",t)}V("MuiTableContainer",["root"]);const Hn=t=>{const{classes:n}=t;return Q({root:["root"]},$n,n)},On=K("div",{name:"MuiTableContainer",slot:"Root"})({width:"100%",overflowX:"auto"}),_n=y.forwardRef(function(n,s){const a=G({props:n,name:"MuiTableContainer"}),{className:i,component:r="div",...c}=a,l={...a,component:r},d=Hn(l);return e.jsx(On,{ref:s,as:r,className:Z(d.root,i),ownerState:l,...c})});function Wn(t){return W("MuiTableHead",t)}V("MuiTableHead",["root"]);const Vn=t=>{const{classes:n}=t;return Q({root:["root"]},Wn,n)},Gn=K("thead",{name:"MuiTableHead",slot:"Root"})({display:"table-header-group"}),Kn={variant:"head"},Oe="thead",Zn=y.forwardRef(function(n,s){const a=G({props:n,name:"MuiTableHead"}),{className:i,component:r=Oe,...c}=a,l={...a,component:r},d=Vn(l);return e.jsx(Se.Provider,{value:Kn,children:e.jsx(Gn,{as:r,className:Z(d.root,i),ref:s,role:r===Oe?null:"rowgroup",ownerState:l,...c})})});function Qn(t){return W("MuiTableRow",t)}const _e=V("MuiTableRow",["root","selected","hover","head","footer"]),Xn=t=>{const{classes:n,selected:s,hover:a,head:i,footer:r}=t;return Q({root:["root",s&&"selected",a&&"hover",i&&"head",r&&"footer"]},Qn,n)},Yn=K("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(t,n)=>{const{ownerState:s}=t;return[n.root,s.head&&n.head,s.footer&&n.footer]}})(Xe(({theme:t})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${_e.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${_e.selected}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity),"&:hover":{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`)}}}))),We="tr",Ve=y.forwardRef(function(n,s){const a=G({props:n,name:"MuiTableRow"}),{className:i,component:r=We,hover:c=!1,selected:l=!1,...d}=a,p=y.useContext(Se),f={...a,component:r,hover:c,selected:l,head:p&&p.variant==="head",footer:p&&p.variant==="footer"},u=Xn(f);return e.jsx(Yn,{as:r,ref:s,className:Z(u.root,i),role:r===We?null:"row",ownerState:f,...d})}),Jn=Ye(e.jsx("path",{d:"M19 15v4H5v-4zm1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1M7 18.5c-.82 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5M19 5v4H5V5zm1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1M7 8.5c-.82 0-1.5-.67-1.5-1.5S6.18 5.5 7 5.5s1.5.68 1.5 1.5S7.83 8.5 7 8.5"})),eo=Ye(e.jsx("path",{d:"M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5zm-1 6h2v2h-2zm0 4h2v6h-2z"})),to=Je({});to.interceptors.request.use(t=>{const n=window.blocklet?window.blocklet.prefix:"/";return t.baseURL=n||"",t.url=ae("/api",String(t.url)),t.timeout=2e5,t.params=t.params||{},new URLSearchParams(t.url.split("?")[1]).has("locale")||(t.params.locale=Bt()),t},t=>Promise.reject(t));const pt=(...t)=>Je(...t),no=(t,n)=>n?t?[t,...Array.isArray(n)?n:[n]]:n:t,oo=(t,{width:n=600,height:s=700,name:a="did-domain:popup"}={})=>{const i=window.screenX+(window.innerWidth-n)/2,r=window.screenY+(window.innerHeight-s)/2,c=[`left=${i}`,`top=${r}`,`width=${n}`,`height=${s}`,"resizable=no","scrollbars=yes","status=yes","popup=yes"],l=window.open("",a,c.join(","));if(l===null)throw new Error("Failed to open popup");return l.location.href=Nt(t,{opener:window.location.origin}),l},so="z2qaGosS3rZ7m5ttP3Nd4V4qczR9TryTcRV4p",ft=async t=>{if(!t||!t?.trim())return null;const n=pt(),s=new URL(t);s.pathname="__blocklet__.js",s.searchParams.set("type","json");const{data:a}=await n.get(s.toString()),i=a?.componentMountPoints?.find(d=>d.did===so),r=new URL(t);r.pathname=i?.mountPoint;const c=r.toString(),l=ae(c,"/api");return{base:c,api:l}},io=et({embed:{iconTip:"Click to view subscription details"},buy:{button:{title:"Buy DID Domain"},status:{inProgress:"Please wait while we are processing your request, the domain will be automatically resolved to the current app after the purchase...",success:"Purchase completed!"},error:{failedToCreateSession:"Failed to create session"}}}),ro=et({embed:{iconTip:"点击查看订阅详情"},buy:{button:{title:"购买 DID 域名"},status:{inProgress:"请稍等,我们正在处理您的请求,购买域名后会自动解析到当前的应用...",success:"购买完成!"},error:{failedToCreateSession:"创建会话失败"}}}),ao={zh:ro,en:io},lo=async({didDomainURL:t,delegatee:n,delegateePk:s})=>{const a=await ft(t);if(!a)return null;const i=pt({baseURL:a.api}),{data:r}=await i.post("/payment/session",{delegatee:n,delegateePk:s});return{sessionId:r.sessionId,baseURL:a.base}};function co({delegatee:t,delegateePk:n,didDomainURL:s,locale:a,title:i="",onSuccess:r=()=>{},...c}){const{t:l}=S(),[d,p]=Pn({currentState:1}),f=y.useRef(null),u=zt(async()=>{const m=await lo({didDomainURL:s,delegatee:t,delegateePk:n});return m},{debounceWait:500,debounceLeading:!0,debounceTrailing:!1,debounceMaxWait:3e3,refreshDeps:[],onError(m){console.error(m)}}),g=ne(m=>{m.data.type==="didDomain.success"&&(r?.({nftDid:m.data?.nftDid,domain:m.data?.domain,chainHost:m.data?.chainHost}),f.current?.close(),f.current=null,p({currentState:4}),setTimeout(()=>{p({currentState:8})},2e3))});$t(()=>{try{window.removeEventListener("message",g),f.current?.close(),f.current=null}catch(m){console.warn("Failed to close popup",m)}});const b=ne(()=>{p({currentState:1})}),h=ne(()=>{if(p({currentState:2}),!u.data){console.error("Failed to create session");return}j({sessionId:u.data.sessionId,baseURL:u.data.baseURL})}),j=ne(({sessionId:m,baseURL:w})=>{window.addEventListener("message",g);const C=new URL(w);C.searchParams.set("sessionId",m),C.searchParams.set("locale",a),C.searchParams.set("embed","1"),f.current=oo(C.toString());const M=setInterval(()=>{f.current?.closed&&(clearInterval(M),b())},1e3);return()=>clearInterval(M)});return e.jsxs(e.Fragment,{children:[e.jsx(mt,{loading:u.loading,onClick:h,variant:"contained",startIcon:e.jsx(bn,{}),...c,children:i||l("buy.button.title")}),e.jsxs(Ht,{fullWidth:!0,maxWidth:"xs",open:d.currentState>1&&d.currentState<8,onClose:b,children:[!u.error&&e.jsxs(x,{sx:{display:"flex",alignItems:"center",flexDirection:"column",gap:2},children:[d.currentState===2&&e.jsx(F,{size:50}),d.currentState===4&&e.jsx(Ot,{sx:{color:"primary.main",fontSize:"5rem"}}),d.currentState===2&&e.jsx(T,{children:l("buy.status.inProgress")}),d.currentState===4&&e.jsx(T,{children:l("buy.status.success")})]}),u.error&&e.jsx(de,{severity:"error",children:l("buy.error.failedToCreateSession")})]})]})}function uo(t){return e.jsx(Ft,{locale:t.locale,translations:ao,children:e.jsx(co,{...t})})}function mo({nftDid:t,didDomainURL:n,locale:s,sx:a={}}){const{t:i}=S(),[r,c]=ue({safeIframeRef:null,popoverAnchorEl:null}),l=y.useRef(null),d=X(),p=me(d.breakpoints.down("md")),f=h=>{c({popoverAnchorEl:h.currentTarget})},u=()=>{c({popoverAnchorEl:null})},g=gn(async()=>{const h=await ft(n);return h?h.base:null});if(!g.value)return null;if(g.loading)return e.jsx(F,{});const b=ae(g.value,`/embed/domain?nft-did=${t}&locale=${s}`);return e.jsxs(e.Fragment,{children:[e.jsx(E,{title:i("embed.iconTip"),children:e.jsx(x,{component:"img",src:ae(n,"/.well-known/service/blocklet/logo"),alt:"logo",onClick:f,sx:[{width:16,height:16},no({cursor:"pointer"},a)]})}),e.jsx(tt,{id:"popover-info",open:!!r.popoverAnchorEl,anchorEl:r.popoverAnchorEl,onClose:u,anchorOrigin:{vertical:"bottom",horizontal:"right"},children:e.jsx("iframe",{ref:l,title:i("common.subscription"),width:p?"320px":"400px",height:"350px",style:{border:0,display:"block"},src:b})})]})}const po=t=>["waiting","creating","renewaling"].includes(t);function xt({siteId:t,domain:n,onAdd:s=()=>{},children:a=null,did:i,issuing:r=!1,setIssuing:c=()=>{}}){const{t:l}=S(),[d,p]=y.useState(!1),{inService:f}=L(),[u,g]=y.useState(null),{api:b,ws:{useSubscription:h}}=L(),{mode:j,actions:{refreshDomainStatus:m}}=Y(),w=Vt(async()=>{const{cert:A}=await b.findCertificateByDomain({input:{domain:n,did:i}});return A}),C=(A,R)=>{A.domain===n&&(c(!1),p(!1),f&&j!=="setup"&&(R==="success"?q.success(l("setup.domain.genCertSuccess",{domain:A.domain})):R==="error"&&q.error(l("setup.domain.genCertFailed",{domain:A.domain,message:A.message}))))};if(y.useEffect(()=>{w.loading||c(po(w.value?.status))},[w.loading,w.value?.status,c]),h(Ue.BlockletEvents.certError,A=>C(A,"error")),h(Ue.BlockletEvents.certIssued,A=>{w.retry(),m(A.domain),C(A,"success")}),w.loading||w.value?.status==="normal")return"";const M=()=>{p(!1),g(null)},B=async()=>{p(!0);try{await b.issueLetsEncryptCert({input:{siteId:t,domain:n,did:i,inBlockletSetup:j==="setup"}}),s(),c(!0)}catch(A){console.error(A),c(!1)}finally{p(!1),g(null)}},U={title:l("router.cert.genLetsEncryptCert.title"),description:e.jsxs("div",{children:[e.jsx(de,{severity:"success",children:l("router.cert.genLetsEncryptCert.dnsTip")}),l("router.cert.genLetsEncryptCert.description")]}),confirm:l("common.confirm"),onConfirm:B,onCancel:M},N=A=>{A.stopPropagation(),g(U)};return e.jsxs(e.Fragment,{children:[r?e.jsx(E,{title:l("router.cert.issuing"),children:e.jsx(F,{size:13,style:{fontSize:"13px"}})}):a({loading:d,open:N}),u&&e.jsx(pe,{color:"primary",title:u.title,description:u.description,confirm:u.confirm,params:u.params,onConfirm:u.onConfirm,onCancel:u.onCancel})]})}xt.propTypes={domain:o.string.isRequired,did:o.string.isRequired,siteId:o.string.isRequired,onAdd:o.func,children:o.any,issuing:o.bool,setIssuing:o.func};function ht({domain:t,domainStatus:n,did:s,onAdd:a=()=>{},children:i=null,issuing:r=!1,setIssuing:c=()=>{},...l}){return _t(t)||!nt(t)||Wt(n)||n?.isHttps?"":e.jsx(xt,{...l,domain:t,did:s,onAdd:a,issuing:r,setIssuing:c,children:i})}ht.propTypes={domain:o.string.isRequired,domainStatus:o.shape({isHttps:o.bool}).isRequired,did:o.string.isRequired,onAdd:o.func,children:o.any,issuing:o.bool,setIssuing:o.func};function gt({id:t,domain:n,children:s=null,teamDid:a="",onDelete:i=null}){const{t:r}=S(),[c,l]=y.useState(!1),[d,p]=y.useState(null),{api:f}=L(),u=()=>{l(!1),p(null)},g=async()=>{l(!0);try{await f.deleteDomainAlias({input:{id:t,domainAlias:n,teamDid:a}}),i?.(),await Gt(2e3)}catch(j){q.error(j.message)}finally{p(null),l(!1)}},b={keyName:n,title:r("router.domainAlias.delete.title"),description:r("router.domainAlias.delete.description",{domain:n}),confirmPlaceholder:r("router.domainAlias.delete.confirmPlaceholder",{domain:n}),confirm:r("common.delete"),onConfirm:g,onCancel:u},h=j=>{j.stopPropagation(),p(b)};return e.jsxs(e.Fragment,{children:[typeof s=="function"?s({loading:c,open:h}):e.jsxs(fe,{edge:"end",onClick:h,size:"small",className:"rule-action",color:"error","data-cy":"action-delete-domain-alias",children:[c?e.jsx(F,{size:16}):e.jsx(ut,{style:{fontSize:16}}),r("common.delete")]}),d&&e.jsx(Dn,{keyName:d.keyName,title:d.title,description:d.description,confirmPlaceholder:d.confirmPlaceholder,confirm:d.confirm,params:d.params,onConfirm:d.onConfirm,onCancel:d.onCancel})]})}gt.propTypes={id:o.string.isRequired,domain:o.string.isRequired,children:o.any,teamDid:o.string,onDelete:o.func};function yt({site:t,domain:n,blocklet:s,onDelete:a=()=>{}}){const{t:i}=S(),r=n.value===window.location.hostname;return e.jsx(yn,{"data-cy":"domain-actions",size:"large",actions:[({close:c})=>e.jsx(gt,{id:t.id,domain:n.value,teamDid:s?.meta?.did,onDelete:a,children:({open:l})=>e.jsx(E,{title:r?i("blocklet.router.currentDomainTip"):"",children:e.jsx("span",{children:e.jsxs(ot,{disabled:n.isProtected||r,dense:!0,onClick:d=>{c(),l(d)},"data-cy":"action-toggle-block",children:[e.jsx(Kt,{style:{minWidth:24,marginRight:8},children:e.jsx(ut,{})}),e.jsx(Zt,{primary:i("common.delete")})]},"remove")})})})]})}yt.propTypes={site:o.object.isRequired,domain:o.object.isRequired,blocklet:o.object.isRequired,onDelete:o.func};const xe=o.shape({href:o.string,accessibility:o.shape({loading:o.bool,accessible:o.bool}),domainStatus:o.shape({isHttps:o.bool,matchedCert:o.object}),dns:o.shape({resolved:o.bool,ip:o.string})});function Dt({certificate:t={}}){const[n,s]=y.useState(null),a=L(),{t:i,locale:r}=S(),c=p=>{s(p.currentTarget)},l=()=>{s(null)},d=!!n;return e.jsxs(e.Fragment,{children:[e.jsx(jn,{"aria-owns":d?"mouse-over-popover":void 0,onMouseEnter:c,onMouseLeave:l,style:{color:"#44cdc6",fontSize:"1em",cursor:"pointer"}}),e.jsx(tt,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:d,anchorEl:n,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:l,disableRestoreFocus:!0,children:e.jsx(Qt,{children:e.jsxs(vn,{style:{display:"flex"},children:[e.jsx("div",{children:e.jsx("img",{src:`${a.imgPrefix}/https-certificate-icon.png`,alt:"certificate icon",style:{maxHeight:"100%",maxWidth:"100%"}})}),e.jsxs(T,{component:"div",style:{marginLeft:"16px"},children:[e.jsx(T,{component:"div",style:{fontWeight:"bold"},children:t.domain}),e.jsx(T,{component:"div",children:`${i("common.issuer")}: ${Xt(t,"issuer.commonName","")}`}),e.jsx(T,{component:"div",children:`${i("router.cert.issuedOn")}: ${Be(t.validFrom,r)}`}),e.jsx(T,{component:"div",children:`${i("router.cert.expiryOn")}: ${Be(t.validTo,r)}`})]})]})})})]})}Dt.propTypes={certificate:o.object};function ce({domain:t,filters:n=["domain","http"]}){const{t:s}=S(),{value:a,domainStatus:i}=t;if(!nt(a))return null;let r=null,c=null;const{isHttps:l,matchedCert:d}=i,{dns:{ip:p,isDnsResolved:f,isCnameMatch:u}={}}=i,g=f&&u;Yt(a)||(g||p==="127.0.0.1"?r=e.jsx(E,{title:s("router.domain.verify.ok"),children:e.jsx(Fe,{color:"success"})}):r=e.jsx(E,{title:s("router.domain.verify.notResolved"),children:e.jsx(Fe,{color:"error"})})),g?l?c=e.jsx(Dt,{certificate:d}):c=e.jsx(E,{title:s("router.domain.https.bad"),children:e.jsx(eo,{style:{color:"#D0021B",fontSize:"1em",cursor:"pointer"}})}):c=e.jsx(E,{title:s("router.domain.verify.notResolved"),children:e.jsx(Jn,{style:{color:"#D0021B",fontSize:"1em",cursor:"pointer"}})});const b=n.map(h=>h==="domain"?r:h==="http"?c:null);return y.createElement(y.Fragment,null,...b)}ce.propTypes={domain:xe.isRequired,filters:o.array};const fo=dt(ke,"mutate_blocklets"),xo=dt(ke,"",Jt);function ho(t){const{inService:n}=L(),{blocklet:s,loadingRuntimeInfo:a}=Y();let i=fo;return n&&(i=xo),e.jsx(i,{...t,blocklet:s,inService:n,loadingRuntimeInfo:a})}const Ge="nft-domain";function ke({hasPermission:t=!1,blocklet:n,loadingRuntimeInfo:s=!1,inService:a=!1,showAllDomains:i=!1,updateBlockletDomainAliases:r=()=>{},systemTips:c=null}){const{t:l}=S(),d=me(m=>m.breakpoints.down("md")),p=y.useMemo(()=>{let m=t;return st(n)&&(m=m&&a),m},[t,a,n]),{site:f}=n,u=y.useMemo(()=>it(n.site?.domainAliases),[n.site?.domainAliases]),g=y.useMemo(()=>u.filter(m=>!ve.isCustomDomain(m.value)),[u]),b=y.useMemo(()=>u.filter(m=>ve.isCustomDomain(m.value)),[u]),h=y.useMemo(()=>b.filter(m=>m.type!==Ge),[b]),j=y.useMemo(()=>b.filter(m=>m.type===Ge),[b]);return e.jsxs(e.Fragment,{children:[e.jsxs(O,{sx:{gap:3},children:[!!j.length&&e.jsx(re,{title:l("common.didDomains"),description:l("common.didDomainsDescription"),domains:j,hasMutatePermission:p,blocklet:n,site:f,mobile:d,showAllDomains:i,updateBlockletDomainAliases:r}),!!h.length&&e.jsx(re,{title:l("common.manualDomains"),description:l("common.manualDomainsDescription"),domains:h,hasMutatePermission:p,blocklet:n,site:f,mobile:d,showAllDomains:i,updateBlockletDomainAliases:r}),!!g.length&&e.jsxs(x,{children:[c,e.jsx(re,{title:l("common.systemDomains"),description:l("common.systemDomainsDescription"),domains:g,hasMutatePermission:p,blocklet:n,site:f,mobile:d,updateBlockletDomainAliases:r})]})]}),!u.length&&(s?e.jsx(F,{size:16}):e.jsx(hn,{children:l("common.empty")}))]})}ke.propTypes={hasPermission:o.bool,blocklet:o.object.isRequired,loadingRuntimeInfo:o.bool,inService:o.bool.isRequired,showAllDomains:o.bool,updateBlockletDomainAliases:o.func,systemTips:o.node};function se({children:t=null}){return e.jsx(x,{component:"span",sx:{verticalAlign:"bottom"},children:t})}se.propTypes={children:o.node};function Ce({domain:t,children:n,suffix:s=null,...a}){const{t:i,locale:r}=S(),c=X(),{href:l,accessibility:d,value:p}=t,f=y.useCallback(()=>e.jsx(at,{content:Te(p),locale:r,style:{marginLeft:"4px",color:c.palette.text.secondary,fontSize:"0.8em"}}),[p,r,c]);return!d||d.loading?e.jsxs(De,{component:"span",...a,children:[e.jsx(E,{title:void 0,placement:"top-end",children:e.jsx(x,{component:"span",children:n})}),f(),e.jsx(se,{children:s}),e.jsx(E,{title:i("blocklet.router.checkUrlAccessible"),placement:"top-end",children:e.jsx(x,{component:"span",className:"status",children:e.jsx(F,{size:13,style:{fontSize:"13px"}})})})]}):d.accessible?e.jsxs(De,{component:"span",...a,children:[e.jsx(x,{component:"a",href:l,target:"_blank",rel:"noopener noreferrer",sx:{color:t.loading?"text.disabled":void 0},children:e.jsx(E,{title:void 0,placement:"top-end",children:e.jsx(x,{component:"span",children:n})})}),f(),e.jsx(se,{children:s})]}):e.jsxs(De,{component:"span",...a,children:[e.jsx(E,{title:i("blocklet.router.urlInaccessible"),placement:"top-end",children:e.jsx(x,{component:"span",children:n})}),!t.loading&&f(),e.jsx(se,{children:s})]})}Ce.propTypes={domain:xe.isRequired,children:o.any.isRequired,suffix:o.node};const De=nn(x)`
1
+ import{aZ as W,aY as V,r as y,$ as G,j as e,gG as Ut,a3 as K,a4 as Z,a5 as Q,a9 as Xe,gH as Se,c as Ye,go as Je,y as ae,gI as Bt,ao as Nt,aH as et,T as zt,V as S,i as Ft,k as ne,gJ as $t,cq as Ht,B as x,C as z,b7 as Ot,K as T,at as de,cp as ue,ab as X,al as me,ad as E,eT as tt,gK as _t,gL as nt,bs as Wt,aS as L,c3 as Vt,am as Ue,as as pe,H as q,o,bx as fe,eN as Gt,M as ot,az as Kt,aA as Zt,U as Qt,x as Xt,eS as Be,gM as Yt,bC as Jt,eg as st,gN as it,dP as ve,aD as O,bb as rt,gO as en,ba as tn,c$ as at,t as nn,gP as lt,gQ as on,gR as sn,ai as ct,bi as rn,gS as an,R as ln,gT as H,bz as F,aU as le,gE as cn,w as dn,af as oe,b2 as Ne,au as un,bp as mn,cZ as pn,gU as fn}from"./index-DrI_kbUr.js";import{t as Te,a as xn}from"./trim-Dm26Hw3f.js";import{y as hn}from"./index-DUEj1V-j.js";import{u as gn}from"./useAsync-sbHIoH6-.js";import{u as Y}from"./blocklet-CzBGFesP.js";import{w as dt}from"./permission-DET008IY.js";import{D as ut}from"./Delete-RCnwfW1g.js";import{A as yn}from"./actions-CoszoXjw.js";import{D as Dn}from"./delete-confirm-Dh3X0iXU.js";import{D as ze}from"./status-UZAIOWNB.js";import{S as bn,V as jn}from"./VerifiedUser-CS3FW2sd.js";import{C as vn}from"./CardContent-rjL6kB_r.js";import{A as Cn}from"./Add-vvp5juzF.js";import{A as wn}from"./CallMerge-C5DyJ6fm.js";import{a as Rn}from"./toLower-DBVF4v1M.js";import{u as Sn}from"./use-mobile-Czu8FCYf.js";import{v as Tn}from"./index-BXpvvqAs.js";import{g as kn,p as Fe}from"./util-odWrmhcv.js";import{O as An}from"./OpenInNew-BUUx7OSU.js";import{C as In}from"./click-to-copy-DXIfZNln.js";import{L as mt}from"./LoadingButton-DZ6V6Qhe.js";import{u as Pn}from"./index-DBtWMsht.js";import"./is-path-prefix-equal-dPdZJpAg.js";import"./engine-Bbh7Mw-7.js";function Mn(t){return W("MuiTable",t)}V("MuiTable",["root","stickyHeader"]);const qn=t=>{const{classes:n,stickyHeader:s}=t;return Q({root:["root",s&&"stickyHeader"]},Mn,n)},En=K("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,n)=>{const{ownerState:s}=t;return[n.root,s.stickyHeader&&n.stickyHeader]}})(Xe(({theme:t})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...t.typography.body2,padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:n})=>n.stickyHeader,style:{borderCollapse:"separate"}}]}))),$e="table",Ln=y.forwardRef(function(n,s){const a=G({props:n,name:"MuiTable"}),{className:i,component:r=$e,padding:c="normal",size:l="medium",stickyHeader:d=!1,...p}=a,f={...a,component:r,padding:c,size:l,stickyHeader:d},u=qn(f),g=y.useMemo(()=>({padding:c,size:l,stickyHeader:d}),[c,l,d]);return e.jsx(Ut.Provider,{value:g,children:e.jsx(En,{as:r,role:r===$e?null:"table",ref:s,className:Z(u.root,i),ownerState:f,...p})})});function Un(t){return W("MuiTableBody",t)}V("MuiTableBody",["root"]);const Bn=t=>{const{classes:n}=t;return Q({root:["root"]},Un,n)},Nn=K("tbody",{name:"MuiTableBody",slot:"Root"})({display:"table-row-group"}),zn={variant:"body"},He="tbody",Fn=y.forwardRef(function(n,s){const a=G({props:n,name:"MuiTableBody"}),{className:i,component:r=He,...c}=a,l={...a,component:r},d=Bn(l);return e.jsx(Se.Provider,{value:zn,children:e.jsx(Nn,{className:Z(d.root,i),as:r,ref:s,role:r===He?null:"rowgroup",ownerState:l,...c})})});function $n(t){return W("MuiTableContainer",t)}V("MuiTableContainer",["root"]);const Hn=t=>{const{classes:n}=t;return Q({root:["root"]},$n,n)},On=K("div",{name:"MuiTableContainer",slot:"Root"})({width:"100%",overflowX:"auto"}),_n=y.forwardRef(function(n,s){const a=G({props:n,name:"MuiTableContainer"}),{className:i,component:r="div",...c}=a,l={...a,component:r},d=Hn(l);return e.jsx(On,{ref:s,as:r,className:Z(d.root,i),ownerState:l,...c})});function Wn(t){return W("MuiTableHead",t)}V("MuiTableHead",["root"]);const Vn=t=>{const{classes:n}=t;return Q({root:["root"]},Wn,n)},Gn=K("thead",{name:"MuiTableHead",slot:"Root"})({display:"table-header-group"}),Kn={variant:"head"},Oe="thead",Zn=y.forwardRef(function(n,s){const a=G({props:n,name:"MuiTableHead"}),{className:i,component:r=Oe,...c}=a,l={...a,component:r},d=Vn(l);return e.jsx(Se.Provider,{value:Kn,children:e.jsx(Gn,{as:r,className:Z(d.root,i),ref:s,role:r===Oe?null:"rowgroup",ownerState:l,...c})})});function Qn(t){return W("MuiTableRow",t)}const _e=V("MuiTableRow",["root","selected","hover","head","footer"]),Xn=t=>{const{classes:n,selected:s,hover:a,head:i,footer:r}=t;return Q({root:["root",s&&"selected",a&&"hover",i&&"head",r&&"footer"]},Qn,n)},Yn=K("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(t,n)=>{const{ownerState:s}=t;return[n.root,s.head&&n.head,s.footer&&n.footer]}})(Xe(({theme:t})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${_e.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${_e.selected}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity),"&:hover":{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`)}}}))),We="tr",Ve=y.forwardRef(function(n,s){const a=G({props:n,name:"MuiTableRow"}),{className:i,component:r=We,hover:c=!1,selected:l=!1,...d}=a,p=y.useContext(Se),f={...a,component:r,hover:c,selected:l,head:p&&p.variant==="head",footer:p&&p.variant==="footer"},u=Xn(f);return e.jsx(Yn,{as:r,ref:s,className:Z(u.root,i),role:r===We?null:"row",ownerState:f,...d})}),Jn=Ye(e.jsx("path",{d:"M19 15v4H5v-4zm1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1M7 18.5c-.82 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5M19 5v4H5V5zm1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1M7 8.5c-.82 0-1.5-.67-1.5-1.5S6.18 5.5 7 5.5s1.5.68 1.5 1.5S7.83 8.5 7 8.5"})),eo=Ye(e.jsx("path",{d:"M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5zm-1 6h2v2h-2zm0 4h2v6h-2z"})),to=Je({});to.interceptors.request.use(t=>{const n=window.blocklet?window.blocklet.prefix:"/";return t.baseURL=n||"",t.url=ae("/api",String(t.url)),t.timeout=2e5,t.params=t.params||{},new URLSearchParams(t.url.split("?")[1]).has("locale")||(t.params.locale=Bt()),t},t=>Promise.reject(t));const pt=(...t)=>Je(...t),no=(t,n)=>n?t?[t,...Array.isArray(n)?n:[n]]:n:t,oo=(t,{width:n=600,height:s=700,name:a="did-domain:popup"}={})=>{const i=window.screenX+(window.innerWidth-n)/2,r=window.screenY+(window.innerHeight-s)/2,c=[`left=${i}`,`top=${r}`,`width=${n}`,`height=${s}`,"resizable=no","scrollbars=yes","status=yes","popup=yes"],l=window.open("",a,c.join(","));if(l===null)throw new Error("Failed to open popup");return l.location.href=Nt(t,{opener:window.location.origin}),l},so="z2qaGosS3rZ7m5ttP3Nd4V4qczR9TryTcRV4p",ft=async t=>{if(!t||!t?.trim())return null;const n=pt(),s=new URL(t);s.pathname="__blocklet__.js",s.searchParams.set("type","json");const{data:a}=await n.get(s.toString()),i=a?.componentMountPoints?.find(d=>d.did===so),r=new URL(t);r.pathname=i?.mountPoint;const c=r.toString(),l=ae(c,"/api");return{base:c,api:l}},io=et({embed:{iconTip:"Click to view subscription details"},buy:{button:{title:"Buy DID Domain"},status:{inProgress:"Please wait while we are processing your request, the domain will be automatically resolved to the current app after the purchase...",success:"Purchase completed!"},error:{failedToCreateSession:"Failed to create session"}}}),ro=et({embed:{iconTip:"点击查看订阅详情"},buy:{button:{title:"购买 DID 域名"},status:{inProgress:"请稍等,我们正在处理您的请求,购买域名后会自动解析到当前的应用...",success:"购买完成!"},error:{failedToCreateSession:"创建会话失败"}}}),ao={zh:ro,en:io},lo=async({didDomainURL:t,delegatee:n,delegateePk:s})=>{const a=await ft(t);if(!a)return null;const i=pt({baseURL:a.api}),{data:r}=await i.post("/payment/session",{delegatee:n,delegateePk:s});return{sessionId:r.sessionId,baseURL:a.base}};function co({delegatee:t,delegateePk:n,didDomainURL:s,locale:a,title:i="",onSuccess:r=()=>{},...c}){const{t:l}=S(),[d,p]=Pn({currentState:1}),f=y.useRef(null),u=Ft(async()=>{const m=await lo({didDomainURL:s,delegatee:t,delegateePk:n});return m},{debounceWait:500,debounceLeading:!0,debounceTrailing:!1,debounceMaxWait:3e3,refreshDeps:[],onError(m){console.error(m)}}),g=ne(m=>{m.data.type==="didDomain.success"&&(r?.({nftDid:m.data?.nftDid,domain:m.data?.domain,chainHost:m.data?.chainHost}),f.current?.close(),f.current=null,p({currentState:4}),setTimeout(()=>{p({currentState:8})},2e3))});$t(()=>{try{window.removeEventListener("message",g),f.current?.close(),f.current=null}catch(m){console.warn("Failed to close popup",m)}});const b=ne(()=>{p({currentState:1})}),h=ne(()=>{if(p({currentState:2}),!u.data){console.error("Failed to create session");return}j({sessionId:u.data.sessionId,baseURL:u.data.baseURL})}),j=ne(({sessionId:m,baseURL:w})=>{window.addEventListener("message",g);const C=new URL(w);C.searchParams.set("sessionId",m),C.searchParams.set("locale",a),C.searchParams.set("embed","1"),f.current=oo(C.toString());const M=setInterval(()=>{f.current?.closed&&(clearInterval(M),b())},1e3);return()=>clearInterval(M)});return e.jsxs(e.Fragment,{children:[e.jsx(mt,{loading:u.loading,onClick:h,variant:"contained",startIcon:e.jsx(bn,{}),...c,children:i||l("buy.button.title")}),e.jsxs(Ht,{fullWidth:!0,maxWidth:"xs",open:d.currentState>1&&d.currentState<8,onClose:b,children:[!u.error&&e.jsxs(x,{sx:{display:"flex",alignItems:"center",flexDirection:"column",gap:2},children:[d.currentState===2&&e.jsx(z,{size:50}),d.currentState===4&&e.jsx(Ot,{sx:{color:"primary.main",fontSize:"5rem"}}),d.currentState===2&&e.jsx(T,{children:l("buy.status.inProgress")}),d.currentState===4&&e.jsx(T,{children:l("buy.status.success")})]}),u.error&&e.jsx(de,{severity:"error",children:l("buy.error.failedToCreateSession")})]})]})}function uo(t){return e.jsx(zt,{locale:t.locale,translations:ao,children:e.jsx(co,{...t})})}function mo({nftDid:t,didDomainURL:n,locale:s,sx:a={}}){const{t:i}=S(),[r,c]=ue({safeIframeRef:null,popoverAnchorEl:null}),l=y.useRef(null),d=X(),p=me(d.breakpoints.down("md")),f=h=>{c({popoverAnchorEl:h.currentTarget})},u=()=>{c({popoverAnchorEl:null})},g=gn(async()=>{const h=await ft(n);return h?h.base:null});if(!g.value)return null;if(g.loading)return e.jsx(z,{});const b=ae(g.value,`/embed/domain?nft-did=${t}&locale=${s}`);return e.jsxs(e.Fragment,{children:[e.jsx(E,{title:i("embed.iconTip"),children:e.jsx(x,{component:"img",src:ae(n,"/.well-known/service/blocklet/logo"),alt:"logo",onClick:f,sx:[{width:16,height:16},no({cursor:"pointer"},a)]})}),e.jsx(tt,{id:"popover-info",open:!!r.popoverAnchorEl,anchorEl:r.popoverAnchorEl,onClose:u,anchorOrigin:{vertical:"bottom",horizontal:"right"},children:e.jsx("iframe",{ref:l,title:i("common.subscription"),width:p?"320px":"400px",height:"350px",style:{border:0,display:"block"},src:b})})]})}const po=t=>["waiting","creating","renewaling"].includes(t);function xt({siteId:t,domain:n,onAdd:s=()=>{},children:a=null,did:i,issuing:r=!1,setIssuing:c=()=>{}}){const{t:l}=S(),[d,p]=y.useState(!1),{inService:f}=L(),[u,g]=y.useState(null),{api:b,ws:{useSubscription:h}}=L(),{mode:j,actions:{refreshDomainStatus:m}}=Y(),w=Vt(async()=>{const{cert:A}=await b.findCertificateByDomain({input:{domain:n,did:i}});return A}),C=(A,R)=>{A.domain===n&&(c(!1),p(!1),f&&j!=="setup"&&(R==="success"?q.success(l("setup.domain.genCertSuccess",{domain:A.domain})):R==="error"&&q.error(l("setup.domain.genCertFailed",{domain:A.domain,message:A.message}))))};if(y.useEffect(()=>{w.loading||c(po(w.value?.status))},[w.loading,w.value?.status,c]),h(Ue.BlockletEvents.certError,A=>C(A,"error")),h(Ue.BlockletEvents.certIssued,A=>{w.retry(),m(A.domain),C(A,"success")}),w.loading||w.value?.status==="normal")return"";const M=()=>{p(!1),g(null)},B=async()=>{p(!0);try{await b.issueLetsEncryptCert({input:{siteId:t,domain:n,did:i,inBlockletSetup:j==="setup"}}),s(),c(!0)}catch(A){console.error(A),c(!1)}finally{p(!1),g(null)}},U={title:l("router.cert.genLetsEncryptCert.title"),description:e.jsxs("div",{children:[e.jsx(de,{severity:"success",children:l("router.cert.genLetsEncryptCert.dnsTip")}),l("router.cert.genLetsEncryptCert.description")]}),confirm:l("common.confirm"),onConfirm:B,onCancel:M},N=A=>{A.stopPropagation(),g(U)};return e.jsxs(e.Fragment,{children:[r?e.jsx(E,{title:l("router.cert.issuing"),children:e.jsx(z,{size:13,style:{fontSize:"13px"}})}):a({loading:d,open:N}),u&&e.jsx(pe,{color:"primary",title:u.title,description:u.description,confirm:u.confirm,params:u.params,onConfirm:u.onConfirm,onCancel:u.onCancel})]})}xt.propTypes={domain:o.string.isRequired,did:o.string.isRequired,siteId:o.string.isRequired,onAdd:o.func,children:o.any,issuing:o.bool,setIssuing:o.func};function ht({domain:t,domainStatus:n,did:s,onAdd:a=()=>{},children:i=null,issuing:r=!1,setIssuing:c=()=>{},...l}){return _t(t)||!nt(t)||Wt(n)||n?.isHttps?"":e.jsx(xt,{...l,domain:t,did:s,onAdd:a,issuing:r,setIssuing:c,children:i})}ht.propTypes={domain:o.string.isRequired,domainStatus:o.shape({isHttps:o.bool}).isRequired,did:o.string.isRequired,onAdd:o.func,children:o.any,issuing:o.bool,setIssuing:o.func};function gt({id:t,domain:n,children:s=null,teamDid:a="",onDelete:i=null}){const{t:r}=S(),[c,l]=y.useState(!1),[d,p]=y.useState(null),{api:f}=L(),u=()=>{l(!1),p(null)},g=async()=>{l(!0);try{await f.deleteDomainAlias({input:{id:t,domainAlias:n,teamDid:a}}),i?.(),await Gt(2e3)}catch(j){q.error(j.message)}finally{p(null),l(!1)}},b={keyName:n,title:r("router.domainAlias.delete.title"),description:r("router.domainAlias.delete.description",{domain:n}),confirmPlaceholder:r("router.domainAlias.delete.confirmPlaceholder",{domain:n}),confirm:r("common.delete"),onConfirm:g,onCancel:u},h=j=>{j.stopPropagation(),p(b)};return e.jsxs(e.Fragment,{children:[typeof s=="function"?s({loading:c,open:h}):e.jsxs(fe,{edge:"end",onClick:h,size:"small",className:"rule-action",color:"error","data-cy":"action-delete-domain-alias",children:[c?e.jsx(z,{size:16}):e.jsx(ut,{style:{fontSize:16}}),r("common.delete")]}),d&&e.jsx(Dn,{keyName:d.keyName,title:d.title,description:d.description,confirmPlaceholder:d.confirmPlaceholder,confirm:d.confirm,params:d.params,onConfirm:d.onConfirm,onCancel:d.onCancel})]})}gt.propTypes={id:o.string.isRequired,domain:o.string.isRequired,children:o.any,teamDid:o.string,onDelete:o.func};function yt({site:t,domain:n,blocklet:s,onDelete:a=()=>{}}){const{t:i}=S(),r=n.value===window.location.hostname;return e.jsx(yn,{"data-cy":"domain-actions",size:"large",actions:[({close:c})=>e.jsx(gt,{id:t.id,domain:n.value,teamDid:s?.meta?.did,onDelete:a,children:({open:l})=>e.jsx(E,{title:r?i("blocklet.router.currentDomainTip"):"",children:e.jsx("span",{children:e.jsxs(ot,{disabled:n.isProtected||r,dense:!0,onClick:d=>{c(),l(d)},"data-cy":"action-toggle-block",children:[e.jsx(Kt,{style:{minWidth:24,marginRight:8},children:e.jsx(ut,{})}),e.jsx(Zt,{primary:i("common.delete")})]},"remove")})})})]})}yt.propTypes={site:o.object.isRequired,domain:o.object.isRequired,blocklet:o.object.isRequired,onDelete:o.func};const xe=o.shape({href:o.string,accessibility:o.shape({loading:o.bool,accessible:o.bool}),domainStatus:o.shape({isHttps:o.bool,matchedCert:o.object}),dns:o.shape({resolved:o.bool,ip:o.string})});function Dt({certificate:t={}}){const[n,s]=y.useState(null),a=L(),{t:i,locale:r}=S(),c=p=>{s(p.currentTarget)},l=()=>{s(null)},d=!!n;return e.jsxs(e.Fragment,{children:[e.jsx(jn,{"aria-owns":d?"mouse-over-popover":void 0,onMouseEnter:c,onMouseLeave:l,style:{color:"#44cdc6",fontSize:"1em",cursor:"pointer"}}),e.jsx(tt,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:d,anchorEl:n,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:l,disableRestoreFocus:!0,children:e.jsx(Qt,{children:e.jsxs(vn,{style:{display:"flex"},children:[e.jsx("div",{children:e.jsx("img",{src:`${a.imgPrefix}/https-certificate-icon.png`,alt:"certificate icon",style:{maxHeight:"100%",maxWidth:"100%"}})}),e.jsxs(T,{component:"div",style:{marginLeft:"16px"},children:[e.jsx(T,{component:"div",style:{fontWeight:"bold"},children:t.domain}),e.jsx(T,{component:"div",children:`${i("common.issuer")}: ${Xt(t,"issuer.commonName","")}`}),e.jsx(T,{component:"div",children:`${i("router.cert.issuedOn")}: ${Be(t.validFrom,r)}`}),e.jsx(T,{component:"div",children:`${i("router.cert.expiryOn")}: ${Be(t.validTo,r)}`})]})]})})})]})}Dt.propTypes={certificate:o.object};function ce({domain:t,filters:n=["domain","http"]}){const{t:s}=S(),{value:a,domainStatus:i}=t;if(!nt(a))return null;let r=null,c=null;const{isHttps:l,matchedCert:d}=i,{dns:{ip:p,isDnsResolved:f,isCnameMatch:u}={}}=i,g=f&&u;Yt(a)||(g||p==="127.0.0.1"?r=e.jsx(E,{title:s("router.domain.verify.ok"),children:e.jsx(ze,{color:"success"})}):r=e.jsx(E,{title:s("router.domain.verify.notResolved"),children:e.jsx(ze,{color:"error"})})),g?l?c=e.jsx(Dt,{certificate:d}):c=e.jsx(E,{title:s("router.domain.https.bad"),children:e.jsx(eo,{style:{color:"#D0021B",fontSize:"1em",cursor:"pointer"}})}):c=e.jsx(E,{title:s("router.domain.verify.notResolved"),children:e.jsx(Jn,{style:{color:"#D0021B",fontSize:"1em",cursor:"pointer"}})});const b=n.map(h=>h==="domain"?r:h==="http"?c:null);return y.createElement(y.Fragment,null,...b)}ce.propTypes={domain:xe.isRequired,filters:o.array};const fo=dt(ke,"mutate_blocklets"),xo=dt(ke,"",Jt);function ho(t){const{inService:n}=L(),{blocklet:s,loadingRuntimeInfo:a}=Y();let i=fo;return n&&(i=xo),e.jsx(i,{...t,blocklet:s,inService:n,loadingRuntimeInfo:a})}const Ge="nft-domain";function ke({hasPermission:t=!1,blocklet:n,loadingRuntimeInfo:s=!1,inService:a=!1,showAllDomains:i=!1,updateBlockletDomainAliases:r=()=>{},systemTips:c=null}){const{t:l}=S(),d=me(m=>m.breakpoints.down("md")),p=y.useMemo(()=>{let m=t;return st(n)&&(m=m&&a),m},[t,a,n]),{site:f}=n,u=y.useMemo(()=>it(n.site?.domainAliases),[n.site?.domainAliases]),g=y.useMemo(()=>u.filter(m=>!ve.isCustomDomain(m.value)),[u]),b=y.useMemo(()=>u.filter(m=>ve.isCustomDomain(m.value)),[u]),h=y.useMemo(()=>b.filter(m=>m.type!==Ge),[b]),j=y.useMemo(()=>b.filter(m=>m.type===Ge),[b]);return e.jsxs(e.Fragment,{children:[e.jsxs(O,{sx:{gap:3},children:[!!j.length&&e.jsx(re,{title:l("common.didDomains"),description:l("common.didDomainsDescription"),domains:j,hasMutatePermission:p,blocklet:n,site:f,mobile:d,showAllDomains:i,updateBlockletDomainAliases:r}),!!h.length&&e.jsx(re,{title:l("common.manualDomains"),description:l("common.manualDomainsDescription"),domains:h,hasMutatePermission:p,blocklet:n,site:f,mobile:d,showAllDomains:i,updateBlockletDomainAliases:r}),!!g.length&&e.jsxs(x,{children:[c,e.jsx(re,{title:l("common.systemDomains"),description:l("common.systemDomainsDescription"),domains:g,hasMutatePermission:p,blocklet:n,site:f,mobile:d,updateBlockletDomainAliases:r})]})]}),!u.length&&(s?e.jsx(z,{size:16}):e.jsx(hn,{children:l("common.empty")}))]})}ke.propTypes={hasPermission:o.bool,blocklet:o.object.isRequired,loadingRuntimeInfo:o.bool,inService:o.bool.isRequired,showAllDomains:o.bool,updateBlockletDomainAliases:o.func,systemTips:o.node};function se({children:t=null}){return e.jsx(x,{component:"span",sx:{verticalAlign:"bottom"},children:t})}se.propTypes={children:o.node};function Ce({domain:t,children:n,suffix:s=null,...a}){const{t:i,locale:r}=S(),c=X(),{href:l,accessibility:d,value:p}=t,f=y.useCallback(()=>e.jsx(at,{content:Te(p),locale:r,style:{marginLeft:"4px",color:c.palette.text.secondary,fontSize:"0.8em"}}),[p,r,c]);return!d||d.loading?e.jsxs(De,{component:"span",...a,children:[e.jsx(E,{title:void 0,placement:"top-end",children:e.jsx(x,{component:"span",children:n})}),f(),e.jsx(se,{children:s}),e.jsx(E,{title:i("blocklet.router.checkUrlAccessible"),placement:"top-end",children:e.jsx(x,{component:"span",className:"status",children:e.jsx(z,{size:13,style:{fontSize:"13px"}})})})]}):d.accessible?e.jsxs(De,{component:"span",...a,children:[e.jsx(x,{component:"a",href:l,target:"_blank",rel:"noopener noreferrer",sx:{color:t.loading?"text.disabled":void 0},children:e.jsx(E,{title:void 0,placement:"top-end",children:e.jsx(x,{component:"span",children:n})})}),f(),e.jsx(se,{children:s})]}):e.jsxs(De,{component:"span",...a,children:[e.jsx(E,{title:i("blocklet.router.urlInaccessible"),placement:"top-end",children:e.jsx(x,{component:"span",children:n})}),!t.loading&&f(),e.jsx(se,{children:s})]})}Ce.propTypes={domain:xe.isRequired,children:o.any.isRequired,suffix:o.node};const De=nn(x)`
2
2
  display: inline-block;
3
3
  vertical-align: middle;
4
4
 
@@ -25,4 +25,4 @@ import{aZ as W,aY as V,r as y,$ as G,j as e,gF as Ut,a3 as K,a4 as Z,a5 as Q,a9
25
25
  margin-left: 8px;
26
26
  font-size: 13px;
27
27
  }
28
- `;function we({hasMutatePermission:t,site:n,domain:s,blocklet:a,onDelete:i}){return t&&!s.isProtected?e.jsx(yt,{site:n,domain:s,blocklet:a,onDelete:i}):null}we.propTypes={hasMutatePermission:o.bool.isRequired,site:o.object.isRequired,domain:xe.isRequired,blocklet:o.object.isRequired,onDelete:o.func.isRequired};function ie({siteId:t,domain:n,blocklet:s,hasMutatePermission:a}){const{info:i}=L(),{t:r,locale:c}=S(),[l,d]=y.useState(!1);return e.jsxs(x,{sx:{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:.5,button:{lineHeight:1}},children:[n.type==="nft-domain"&&e.jsx(mo,{locale:c,nftDid:n.nftDid,didDomainURL:i.nftDomainUrl}),e.jsx(x,{sx:{display:"flex",mt:"-1px"},children:e.jsx(ce,{domain:n,filters:["http"]},`${n.value}-http`)}),a&&n.canGenerateCertificate&&e.jsx(ht,{siteId:t,domain:n.value,domainStatus:n.domainStatus,did:s.meta.did,issuing:l,setIssuing:d,children:({open:p})=>e.jsx(fe,{sx:{padding:0},size:"small",onClick:f=>p(f),children:r("router.cert.genLetsEncryptCert.title")})})]})}ie.propTypes={siteId:o.string.isRequired,domain:xe.isRequired,blocklet:o.object.isRequired,hasMutatePermission:o.bool.isRequired};function re({title:t,description:n,domains:s=[],hasMutatePermission:a,blocklet:i,site:r,mobile:c,showAllDomains:l=!1,updateBlockletDomainAliases:d=()=>{}}){const[p,f]=y.useState(!1),u=y.useMemo(()=>l||p?s:s.slice(0,1),[s,p,l]),g=s.length>1,b=h=>a&&!h.isProtected;return e.jsx(rt,{elevation:0,sx:{p:3,pb:l?3:1.5,display:"flex",alignItems:"flex-start",gap:3,borderRadius:2,border:"1px solid",borderColor:"divider",transition:"box-shadow 0.2s ease-in-out"},children:e.jsxs(O,{sx:{width:1},children:[e.jsxs(x,{sx:{mb:1.5},children:[e.jsx(T,{variant:"h6",children:t}),e.jsx(T,{sx:{fontSize:12,color:"text.secondary",mt:.5},children:n})]}),u.map((h,j)=>e.jsxs(O,{children:[j!==0&&e.jsx(x,{sx:{my:.75,width:1,height:"1px"}}),!c&&e.jsxs(x,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsxs(x,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(x,{sx:{height:28,display:"flex",alignItems:"center"},children:e.jsx(ce,{domain:h,filters:["domain"]},`${h.value}-domain`)}),e.jsxs(x,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,svg:{width:"1em",height:"1em"},img:{width:"0.9em",height:"0.9em"}},children:[e.jsx(Ce,{domain:h,target:"_blank",children:h.value}),e.jsx(x,{sx:{mt:"2px"},children:e.jsx(ie,{siteId:i.site?.id,domain:h,blocklet:i,hasMutatePermission:a})})]})]}),e.jsx(x,{sx:{button:{padding:0}},children:e.jsx(we,{hasMutatePermission:a,site:r,domain:h,blocklet:i,onDelete:()=>d(h,"delete")})})]}),c&&e.jsxs(x,{sx:{display:"flex",flexDirection:"column"},children:[e.jsxs(x,{sx:{display:"flex",justifyContent:"flex-start",gap:1},children:[e.jsx(x,{sx:{height:28,display:"flex",alignItems:"center"},children:e.jsx(ce,{domain:h,filters:["domain"]},`${h.value}-domain`)}),e.jsx(Ce,{domain:h,target:"_blank",suffix:b(h)?null:e.jsx(x,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"space-between",svg:{width:"1em",height:"1rem"},img:{width:"0.9rem",height:"0.9rem"}},children:e.jsx(ie,{siteId:i.site?.id,domain:h,blocklet:i,hasMutatePermission:a})}),children:h.value})]}),b(h)&&e.jsxs(x,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",ml:"18px"},children:[e.jsx(x,{sx:{display:"flex",alignItems:"center"},children:e.jsx(ie,{siteId:i.site?.id,domain:h,blocklet:i,hasMutatePermission:a})}),e.jsx(x,{sx:{button:{padding:0}},children:e.jsx(we,{hasMutatePermission:a,site:r,domain:h,blocklet:i,onDelete:()=>d(h,"delete")})})]})]})]},h.value)),g&&!l&&e.jsx(fe,{onClick:()=>f(!p),sx:{p:0,mt:.5,alignSelf:"center"},children:p?e.jsx(en,{}):e.jsx(tn,{})})]})})}re.propTypes={title:o.string.isRequired,description:o.string.isRequired,domains:o.array.isRequired,hasMutatePermission:o.bool.isRequired,blocklet:o.object.isRequired,site:o.object.isRequired,mobile:o.bool.isRequired,showAllDomains:o.bool,updateBlockletDomainAliases:o.func};const bt=y.createContext({}),{Provider:go,Consumer:Jo}=bt;function yo({children:t}){const[n,s]=ue({domain:"",error:null}),{locale:a}=S(),i={error:n.error,domain:n.domain,setError:r=>{s({error:r})},setDomain:r=>{const c=Te(r),l=lt(c,a);s({domain:c,error:l})}};return e.jsx(go,{value:{value:i},children:t})}function Do(){const{value:t}=y.useContext(bt);return t}var be,Ke;function bo(){if(Ke)return be;Ke=1;const{joinURL:t}=on(),n=sn(),s="z2qaGosS3rZ7m5ttP3Nd4V4qczR9TryTcRV4p";return be={DID_DOMAIN_SERVICE_DID:s,getDidDomainServiceURL:async i=>{if(!i||!i?.trim())return null;const r=new URL(i);r.pathname="__blocklet__.js",r.searchParams.set("type","json");const{data:c}=await n.get(r.toString()),l=c?.componentMountPoints?.find(u=>u.did===s),d=new URL(i);d.pathname=l?.mountPoint;const p=d.toString(),f=t(p,"/api");return{base:p,api:f,domain:t(f,"/domains")}}},be}var jo=bo();const vo=ct(Rn),Co=ct(xn);var je,Ze;function wo(){if(Ze)return je;Ze=1;const t=vo,n=Co;function s(i){return!i||typeof i!="string"?!1:i.split(".").length===2}return je={isTopLevelDomain:s,formatTopLevelDidDomain:i=>{const r=t(n(i));return r&&(s(r)?`www.${r}`:r)}},je}var Qe=wo(),Ro=an();const So=rn(Ro);function jt({domain:t="",resolvedTarget:n,...s}){const{t:a,locale:i}=S();return e.jsxs(x,{sx:{backgroundColor:"rgb(236, 251, 253)",borderColor:"rgb(236, 251, 253)",borderRadius:"8px",padding:"12px"},...s,children:[e.jsxs(x,{sx:{display:"flex",flexWrap:"wrap"},children:[a("router.domain.setup.tipStart"),t&&e.jsx(x,{sx:{mx:.5,color:"primary.main",fontWeight:"fontWeightBold"},children:t}),a("router.domain.setup.tipEnd"),":"]}),e.jsxs(O,{sx:{gap:.5,"&>div":{mb:0},marginTop:"12px"},children:[e.jsx(Re,{label:a("router.domain.setup.recordType"),value:"CNAME",locale:i}),e.jsx(Re,{label:a("router.domain.setup.recordValue"),value:n,locale:i})]})]})}jt.propTypes={domain:o.string,resolvedTarget:o.string.isRequired};function Re({locale:t,label:n,value:s}){const a=me(r=>r.breakpoints.down("md")),i=X();return e.jsx(Tn,{name:n,nameWidth:120,children:e.jsxs(x,{sx:{display:"flex",alignItems:"center",lineHeight:1},children:[e.jsx(T,{component:"span",sx:[{color:"primary.main",overflow:"auto"},a?{maxWidth:"95%",wordWrap:"break-word"}:{wordWrap:"break-word"}],children:s}),e.jsx(at,{content:s,locale:t,style:{marginLeft:"4px",color:i.palette.text.secondary}})]})})}Re.propTypes={locale:o.string.isRequired,label:o.string.isRequired,value:o.string.isRequired};function vt({children:t=null,href:n="",sx:s=null,showIcon:a=!1,...i}){const r=X();return e.jsxs(ln,{href:n,target:"_blank",...i,sx:{display:"inline-flex",alignItems:"center",color:"text.primary",":hover":{color:r.palette.primary.main},...s},children:[t,a&&e.jsx(An,{fontSize:"small",sx:{ml:"4px",fontSize:"1rem"}})]})}vt.propTypes={children:o.node,sx:o.object,href:o.string,showIcon:o.bool};function Ct({records:t}){return e.jsx(_n,{component:x,sx:{".MuiTableCell-root":{color:"text.primary"}},children:e.jsxs(Ln,{children:[e.jsx(Zn,{children:e.jsxs(Ve,{children:[e.jsx(H,{children:"Type"}),e.jsx(H,{children:"Name"}),e.jsx(H,{children:"Data"})]})}),e.jsx(zn,{children:t.map(n=>e.jsxs(Ve,{children:[e.jsx(H,{children:n.type}),e.jsx(H,{children:n.name}),e.jsx(H,{sx:{wordBreak:"break-word"},children:e.jsx(In,{children:n.data})})]},n.name))})]})})}Ct.propTypes={records:o.array.isRequired};function wt({url:t,domain:n=""}){const{t:s}=S();return e.jsxs(x,{sx:{display:"flex",flexDirection:"column",gap:2},children:[e.jsxs(x,{sx:{display:"flex",flexDirection:"column",gap:1},children:[e.jsx(T,{component:"h3",variant:"h6",children:s("setting.dns.step1Title")}),e.jsxs(T,{component:"section",children:[s("setting.dns.step1Desc1"),e.jsx(vt,{href:"https://lookup.icann.org/",target:"_blank",children:"ICANN"})]})]}),e.jsxs(x,{sx:{display:"flex",flexDirection:"column",gap:1},children:[e.jsx(T,{component:"h3",variant:"h6",children:s("setting.dns.step2Title",{url:t})}),e.jsx(T,{component:"section",children:s("setting.dns.step2Desc")})]}),e.jsxs(x,{sx:{display:"flex",flexDirection:"column",gap:1},children:[e.jsx(T,{component:"h3",variant:"h6",children:s("setting.dns.step3Title")}),e.jsx(T,{component:"section",children:s("setting.dns.step3Desc")}),e.jsx(Ct,{records:[{type:"CNAME",name:kn(t),data:n}]})]})]})}wt.propTypes={url:o.string.isRequired,domain:o.string};const Rt=y.createContext();function To({children:t}){const{t:n}=S(),{api:s}=L(),{blocklet:a}=Y(),[i,r]=y.useState(null),c=y.useCallback(async(p,f)=>{try{const u=await s.getBlocklet({input:{domain:p,did:a?.meta?.did}});return u?.blocklet?new Promise(g=>{r({title:n("setting.domain.conflictTitle",{domain:p}),description:n("setting.domain.conflictDescription",{domain:p,title:u.blocklet.meta?.title,from:u.blocklet.meta?.title,to:a.meta?.title}),confirm:n("common.confirm"),cancel:n("common.cancel"),onConfirm:async()=>{r(null),await f?.(),g(!0)},onCancel:()=>{r(null),g(!1)}})}):!1}catch(u){return console.error(u),q.error(z(u)),!1}},[s,n,a]),l=y.useCallback(()=>i?e.jsx(pe,{title:i.title,description:i.description,confirm:i.confirm,cancel:i.cancel,onConfirm:i.onConfirm,onCancel:i.onCancel}):null,[i]),d=y.useMemo(()=>({checkConflict:c}),[c]);return e.jsxs(Rt.Provider,{value:d,children:[t,l()]})}function St(){return y.useContext(Rt)}function Tt({siteId:t,teamDid:n,cnameDomain:s,defaultCustomDomain:a="",onInputDomain:i=oe,appId:r="",appPk:c="",onSuccess:l=oe,onError:d=oe,disabled:p=!1,autoFocus:f=!0,inBlockletSetup:u=!1,shouldCheckDomain:g=!1,onStateChange:b=oe,currentIp:h="",...j}){const{t:m,locale:w}=S(),{api:C,info:M}=L(),{blocklet:B}=Y(),U=Do(),N=X(),A=Sn({key:"sm"}),[R,P]=ue({submittingDomain:!1,domain:a,error:null,type:M?.nftDomainUrl?"nftDomain":"inputDomain",showDnsTip:!1}),he=le.getDisplayName(B),{checkConflict:Ae}=St(),{connectApi:Mt}=cn(),J=dn(()=>jo.getDidDomainServiceURL(M?.nftDomainUrl));if(M?.nftDomainUrl&&J.loading)return e.jsx(x,{...j,onError:d,currentIp:h,children:e.jsx(Ne,{relative:"parent",children:e.jsx(F,{})})});if(J.error)return e.jsx(x,{...j,onError:d,currentIp:h,children:e.jsx(Ne,{relative:"parent",children:J.error.message})});const Ie=J.value,ge=()=>{P({invalidDNSDomain:null})},Pe=async(D,v,k=!1)=>{await C.addDomainAlias({input:{id:t,domainAlias:D,teamDid:n,inBlockletSetup:!0,force:k}}),P({submittingDomain:!1}),l({domain:D,type:"inputDomain",canGenerateCertificate:!v})},ye=async(D,v)=>{b(m("setting.domain.addingDomain"));try{await Pe(D,v,!1)}catch(k){if(console.error(k),ge(),z(k).includes("already exists")){await Ae(D,()=>Pe(D,v,!0));return}q.error(z(k))}},Me=async({domain:D,type:v,nftDid:k,chainHost:_})=>{try{if(!g){if(v==="inputDomain"){await ye(D);return}l({domain:D,type:v,nftDid:k,chainHost:_});return}b({text:m("setting.domain.checkingResolvable")});let I=30;const $=3e3,Lt=I*1e3/$,Le=setInterval(()=>{if(I<=0){clearInterval(Le);return}b({text:`${m("setting.domain.checkingResolvable")} (${I--}s)`})},1e3),ee=await So(()=>C.getDomainDNS({input:{teamDid:n,domain:D}}),{retries:Lt,minTimeout:$,maxTimeout:$,onFailedAttempt:console.error});if(clearInterval(Le),!ee?.isDnsResolved||!ee?.isCnameMatch){let te="";if(ee.isDnsResolved?ee.isCnameMatch||(te=m("setting.domain.resolvedAddressError",{domain:D,curDomain:s})):te=m("setting.domain.cannotResolve",{domain:D}),v==="nftDomain"){q.error(te),l({domain:D,type:"nftDomain"});return}b({text:""}),P({invalidDNSDomain:{domain:D,error:te},domain:D,type:v,submittingDomain:!1});return}if(v==="nftDomain"){l({domain:D,type:"nftDomain"});return}await ye(D)}catch(I){q.error(I.message),b({text:""}),P({submittingDomain:!1})}},qe=async({domain:D,nftDid:v,chainHost:k,force:_})=>{let I=ze(D);I=Qe.formatTopLevelDidDomain(I),P({submittingDomain:!0}),await C.addDomainAlias({input:{id:t,type:"nft-domain",domainAlias:I,nftDid:v,chainHost:k,teamDid:n,inBlockletSetup:u,force:_}});const $="nftDomain";P({type:$}),await Me({domain:I,type:$,nftDid:v,chainHost:k})},qt=async({domain:D,nftDid:v,chainHost:k,isDomainOwner:_})=>{if(!_){const I=m("router.domainAlias.addDomainNFT.authorizeFailed");q.error(I),P({submittingDomain:!1,error:I});return}try{await qe({domain:D,nftDid:v,chainHost:k,force:!1})}catch(I){if(console.error(I),ge(),z(I).includes("already exists")){await Ae(D,()=>qe({domain:D,nftDid:v,chainHost:k,force:!0}));return}q.error(z(I))}finally{P({submittingDomain:!1})}},Et=async()=>{try{P({submittingDomain:!0});const D=ze(R.domain);if(M.nftDomainUrl&&Ie&&(await C.isDidDomain({input:{domain:D}})).value===!0){Mt.openPopup({prefix:"/connect-to-did-domain",custom:!0,locale:w,extraParams:{provider:"wallet",delegatee:r,delegateePk:c,domain:Qe.formatTopLevelDidDomain(R.domain),appName:he,appUrl:le.getAppUrl(B)},message:{title:m("router.domainAlias.addDomainNFT.connect.title",{appName:he}),scan:m("router.domainAlias.addDomainNFT.connect.scan",{domain:R.domain,appName:he}),confirm:m("router.domainAlias.addDomainNFT.connect.confirm"),success:m("router.domainAlias.addDomainNFT.connect.success")},onSuccess:qt,onError:k=>{q.error(k.message),P({submittingDomain:!1})},onClose:()=>P({submittingDomain:!1}),checkTimeout:60*5e3},{baseUrl:Ie.base,locale:w});return}await Me({domain:D,type:R.type})}catch(D){P({submittingDomain:!1}),U.setError(D.message)}},Ee=U.error||R.error;return e.jsx(x,{...j,onError:d,currentIp:h,children:e.jsxs(x,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",gap:"1em"},children:[e.jsxs(x,{component:"form",onSubmit:D=>{D.preventDefault(),Et()},sx:{display:"flex",flexDirection:"column",gap:"8px"},children:[e.jsx(T,{sx:{color:N.palette.text.primary},children:m("router.domainAlias.add.tips")}),e.jsx(un,{sx:{display:"block",marginTop:"8px"},label:m("router.domainAlias.add.domainDescription"),helperText:R.type==="inputDomain"&&Ee||m("router.domainAlias.add.helperText"),fullWidth:!0,disabled:p,value:R.domain,size:"small",variant:"outlined",error:!!Ee&&R.type==="inputDomain",onChange:D=>{const v=Te(D.target?.value);U.setDomain(v);const k=lt(v,w);P({domain:v,error:k,type:"inputDomain"}),i({domain:v,error:k,type:"inputDomain"})},autoFocus:f,onBlur:()=>{U.domain||(P({error:null}),U.setError(null))},slotProps:{htmlInput:{"data-cy":"domain-name-input"}}}),e.jsx(x,{sx:{width:"100%",display:"flex",justifyContent:"flex-end"},children:e.jsx(mt,{"data-cy":"confirm-add-domain",fullWidth:A,variant:"contained",loading:R.submittingDomain,type:"submit",children:m("common.add")})}),e.jsx(x,{sx:{backgroundColor:()=>mn(N.palette.primary.light,.1),borderRadius:"8px",padding:"12px"},children:m("router.domainAlias.addDomainNFT.topLevelDidDomainHint")}),e.jsxs(x,{sx:{cursor:"pointer",fontSize:"14px",display:"flex",alignItems:"center",gap:"4px",lineHeight:1,color:N.palette.primary.main},onClick:()=>P({showDnsTip:!R.showDnsTip}),children:[e.jsx(pn,{fontSize:"1em"}),m("router.domainAlias.showTipHint")]}),R.showDnsTip&&e.jsx(jt,{domain:R.domain,resolvedTarget:s,style:{marginTop:"4px"}})]}),R.invalidDNSDomain&&e.jsx(pe,{maxWidth:"md",title:m("common.reminder"),description:e.jsxs(O,{sx:{gap:2},children:[e.jsx(de,{severity:"warning",children:m("setting.domain.invalidDNSReminder",{error:R.invalidDNSDomain.error})}),e.jsx(wt,{url:R.domain,domain:s})]}),color:"primary",confirm:m("setting.domain.continueAdd"),onConfirm:()=>ye(R.invalidDNSDomain.domain,R.type),onCancel:ge})]})})}Tt.propTypes={siteId:o.string.isRequired,currentIp:o.string,teamDid:o.string.isRequired,cnameDomain:o.string.isRequired,defaultCustomDomain:o.string,onInputDomain:o.func,onSuccess:o.func,appId:o.string,appPk:o.string,disabled:o.bool,autoFocus:o.bool,inBlockletSetup:o.bool,shouldCheckDomain:o.bool,onStateChange:o.func,onError:o.func};function kt({id:t,children:n=null,title:s="",teamDid:a="",systemDomains:i,appId:r=null,appPk:c,onAddDomainAlias:l=()=>{},...d}){const{t:p}=S(),[f,u]=ue({loading:!1,confirmSetting:null}),g=i.find(m=>ve.isDidDomain(m)),b=()=>{u({loading:!1,confirmSetting:null})},h={title:s||p("router.domainAlias.add.title"),description:function(w,C,M){return e.jsx(Tt,{siteId:t,teamDid:a,cnameDomain:g,onSuccess:B=>{l(B),u({confirmSetting:null})},onInputDomain:({domain:B,type:U,error:N})=>{C({...w,domain:B,type:U,__disableConfirm:!!N}),M(N)},appId:r,appPk:c,...d})},confirm:p("common.confirm"),cancel:p("common.cancel"),params:{domain:"",__disableConfirm:!0},onCancel:b},j=m=>{m.stopPropagation(),u({confirmSetting:h})};return e.jsxs(e.Fragment,{children:[typeof n=="function"?n({loading:f.loading,open:j}):e.jsxs(ot,{onClick:j,className:"rule-action","data-cy":"action-add-domain-alias",children:[f.loading?e.jsx(F,{size:16}):e.jsx(wn,{style:{fontSize:18,marginRight:5}}),p("router.domainAlias.add.title")]}),f.confirmSetting&&e.jsx(pe,{title:f.confirmSetting.title,description:f.confirmSetting.description,confirm:f.confirmSetting.confirm,cancel:f.confirmSetting.cancel,params:f.confirmSetting.params,onCancel:f.confirmSetting.onCancel,showConfirm:!1,showCancel:!0,displayError:!1,color:"primary",loading:f.loading,maxWidth:"sm"})]})}kt.propTypes={id:o.string.isRequired,children:o.any,title:o.string,teamDid:o.string,systemDomains:o.arrayOf(o.string).isRequired,appId:o.string,appPk:o.string.isRequired,onAddDomainAlias:o.func};function ko(t){return e.jsx(yo,{children:e.jsx(kt,{...t})})}function At({appId:t,appPk:n,siteId:s,inBlockletSetup:a,teamDid:i,sx:r={},onAddDomainAlias:c=()=>{},...l}){const{api:d,info:p}=L(),{locale:f,t:u}=S(),{checkConflict:g}=St(),b=async({domain:j,nftDid:m,chainHost:w,force:C})=>{const M={id:s,type:"nft-domain",domainAlias:j,nftDid:m,chainHost:w,teamDid:i,inBlockletSetup:a,force:C};return await d.addDomainAlias({input:M}),M},h=async({domain:j,nftDid:m,chainHost:w})=>{try{const C=await b({domain:j,nftDid:m,chainHost:w,force:!1});c(C)}catch(C){if(z(C).includes("already exists")){await g(j,()=>b({domain:j,nftDid:m,chainHost:w,force:!0}));return}q.error(z(C))}};return e.jsx(uo,{delegatee:t,delegateePk:n,didDomainURL:p.nftDomainUrl,onSuccess:h,locale:f,variant:"outlined",sx:r,title:u("router.domainAlias.addDomainNFT.buy"),...l})}At.propTypes={appId:o.string.isRequired,appPk:o.string.isRequired,siteId:o.string.isRequired,inBlockletSetup:o.bool.isRequired,teamDid:o.string.isRequired,sx:o.object,onAddDomainAlias:o.func};function It({blocklet:t,bugDidDomainProps:n={},connectDomainProps:s={},updateBlockletDomainAliases:a=()=>{}}){const{t:i}=S(),{info:r}=L(),c=me(u=>u.breakpoints.down("md")),{site:l}=t,d=y.useMemo(()=>it(t.site?.domainAliases),[t.site?.domainAliases]),p=t.environments?.find(u=>u.key==="BLOCKLET_APP_PK")?.value,f=fn(d);return e.jsx(To,{children:e.jsx(Pt,{action:e.jsxs(x,{sx:{display:"flex",alignItems:c?"stretch":"center",flexDirection:c?"column":"row",gap:1},children:[r.nftDomainUrl&&e.jsx(At,{variant:"contained",appId:t.appPid,appPk:p,siteId:l.id,inBlockletSetup:!1,teamDid:t.meta.did,onAddDomainAlias:u=>{const g={value:u.domainAlias,isProtected:!1,type:u.type,nftDid:u.nftDid,chainHost:u.chainHost,accessibility:{loading:!0}};a(g)},...n}),e.jsx(ko,{id:l.id,title:i("common.connectExistingDomain"),teamDid:t.meta?.did,appId:t.appPid,appPk:p,systemDomains:f?.map(u=>u.value),onAddDomainAlias:u=>{const g={value:u.domain,isProtected:!1,type:u.type==="nftDomain"?"nft-domain":"",nftDid:u.nftDid,chainHost:u.chainHost,accessibility:{loading:!0},canGenerateCertificate:u.canGenerateCertificate===void 0?!0:u.canGenerateCertificate};a(g)},...s,children:({open:u})=>e.jsxs(fe,{variant:"outlined",sx:{borderColor:"#ddd",color:"text.primary","&:hover":{bgcolor:g=>g.palette.primary.main,color:g=>g.palette.primary.contrastText}},"data-cy":"add-domain-alias",onClick:u,disabled:le.isInProgress(t.status),children:[e.jsx(Cn,{style:{fontSize:"1.3em",marginRight:4}}),i("common.connectExistingDomain")]})})]})})})}It.propTypes={blocklet:o.object.isRequired,bugDidDomainProps:o.object,connectDomainProps:o.object,updateBlockletDomainAliases:o.func};function Pt({action:t}){const{t:n}=S();return e.jsxs(rt,{elevation:0,sx:{p:3,borderRadius:2,border:"1px solid",borderColor:"divider"},children:[e.jsx(x,{sx:{display:"flex",alignItems:"center",gap:2},children:e.jsxs(x,{sx:{flex:1,width:0,mb:1.5},children:[e.jsx(T,{variant:"h6",children:n("common.bugOrConnectDomain")}),e.jsx(T,{sx:{fontSize:12,color:"text.secondary",mt:.5},children:n("common.bugOrConnectDomainTip")})]})}),t]})}Pt.propTypes={action:o.element.isRequired};function es(){const{blocklet:t,actions:{updateBlockletDomainAliases:n}}=Y(),{inService:s}=L(),{t:a}=S(),i=y.useMemo(()=>{let r=!0;return st(t)&&(r=r&&s),r},[s,t]);return e.jsxs(x,{component:O,sx:{gap:3,maxWidth:820},children:[e.jsxs(e.Fragment,{children:[le.isAccessible(t.status)===!1&&e.jsx(de,{severity:"warning",children:a("blocklet.router.noRunning")}),i&&e.jsx(It,{blocklet:t,updateBlockletDomainAliases:n,connectDomainProps:{shouldCheckDomain:!0}})]}),e.jsx(ho,{showAllDomains:!0,updateBlockletDomainAliases:n})]})}export{es as default};
28
+ `;function we({hasMutatePermission:t,site:n,domain:s,blocklet:a,onDelete:i}){return t&&!s.isProtected?e.jsx(yt,{site:n,domain:s,blocklet:a,onDelete:i}):null}we.propTypes={hasMutatePermission:o.bool.isRequired,site:o.object.isRequired,domain:xe.isRequired,blocklet:o.object.isRequired,onDelete:o.func.isRequired};function ie({siteId:t,domain:n,blocklet:s,hasMutatePermission:a}){const{info:i}=L(),{t:r,locale:c}=S(),[l,d]=y.useState(!1);return e.jsxs(x,{sx:{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:.5,button:{lineHeight:1}},children:[n.type==="nft-domain"&&e.jsx(mo,{locale:c,nftDid:n.nftDid,didDomainURL:i.nftDomainUrl}),e.jsx(x,{sx:{display:"flex",mt:"-1px"},children:e.jsx(ce,{domain:n,filters:["http"]},`${n.value}-http`)}),a&&n.canGenerateCertificate&&e.jsx(ht,{siteId:t,domain:n.value,domainStatus:n.domainStatus,did:s.meta.did,issuing:l,setIssuing:d,children:({open:p})=>e.jsx(fe,{sx:{padding:0},size:"small",onClick:f=>p(f),children:r("router.cert.genLetsEncryptCert.title")})})]})}ie.propTypes={siteId:o.string.isRequired,domain:xe.isRequired,blocklet:o.object.isRequired,hasMutatePermission:o.bool.isRequired};function re({title:t,description:n,domains:s=[],hasMutatePermission:a,blocklet:i,site:r,mobile:c,showAllDomains:l=!1,updateBlockletDomainAliases:d=()=>{}}){const[p,f]=y.useState(!1),u=y.useMemo(()=>l||p?s:s.slice(0,1),[s,p,l]),g=s.length>1,b=h=>a&&!h.isProtected;return e.jsx(rt,{elevation:0,sx:{p:3,pb:l?3:1.5,display:"flex",alignItems:"flex-start",gap:3,borderRadius:2,border:"1px solid",borderColor:"divider",transition:"box-shadow 0.2s ease-in-out"},children:e.jsxs(O,{sx:{width:1},children:[e.jsxs(x,{sx:{mb:1.5},children:[e.jsx(T,{variant:"h6",children:t}),e.jsx(T,{sx:{fontSize:12,color:"text.secondary",mt:.5},children:n})]}),u.map((h,j)=>e.jsxs(O,{children:[j!==0&&e.jsx(x,{sx:{my:.75,width:1,height:"1px"}}),!c&&e.jsxs(x,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsxs(x,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(x,{sx:{height:28,display:"flex",alignItems:"center"},children:e.jsx(ce,{domain:h,filters:["domain"]},`${h.value}-domain`)}),e.jsxs(x,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,svg:{width:"1em",height:"1em"},img:{width:"0.9em",height:"0.9em"}},children:[e.jsx(Ce,{domain:h,target:"_blank",children:h.value}),e.jsx(x,{sx:{mt:"2px"},children:e.jsx(ie,{siteId:i.site?.id,domain:h,blocklet:i,hasMutatePermission:a})})]})]}),e.jsx(x,{sx:{button:{padding:0}},children:e.jsx(we,{hasMutatePermission:a,site:r,domain:h,blocklet:i,onDelete:()=>d(h,"delete")})})]}),c&&e.jsxs(x,{sx:{display:"flex",flexDirection:"column"},children:[e.jsxs(x,{sx:{display:"flex",justifyContent:"flex-start",gap:1},children:[e.jsx(x,{sx:{height:28,display:"flex",alignItems:"center"},children:e.jsx(ce,{domain:h,filters:["domain"]},`${h.value}-domain`)}),e.jsx(Ce,{domain:h,target:"_blank",suffix:b(h)?null:e.jsx(x,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"space-between",svg:{width:"1em",height:"1rem"},img:{width:"0.9rem",height:"0.9rem"}},children:e.jsx(ie,{siteId:i.site?.id,domain:h,blocklet:i,hasMutatePermission:a})}),children:h.value})]}),b(h)&&e.jsxs(x,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",ml:"18px"},children:[e.jsx(x,{sx:{display:"flex",alignItems:"center"},children:e.jsx(ie,{siteId:i.site?.id,domain:h,blocklet:i,hasMutatePermission:a})}),e.jsx(x,{sx:{button:{padding:0}},children:e.jsx(we,{hasMutatePermission:a,site:r,domain:h,blocklet:i,onDelete:()=>d(h,"delete")})})]})]})]},h.value)),g&&!l&&e.jsx(fe,{onClick:()=>f(!p),sx:{p:0,mt:.5,alignSelf:"center"},children:p?e.jsx(en,{}):e.jsx(tn,{})})]})})}re.propTypes={title:o.string.isRequired,description:o.string.isRequired,domains:o.array.isRequired,hasMutatePermission:o.bool.isRequired,blocklet:o.object.isRequired,site:o.object.isRequired,mobile:o.bool.isRequired,showAllDomains:o.bool,updateBlockletDomainAliases:o.func};const bt=y.createContext({}),{Provider:go,Consumer:Jo}=bt;function yo({children:t}){const[n,s]=ue({domain:"",error:null}),{locale:a}=S(),i={error:n.error,domain:n.domain,setError:r=>{s({error:r})},setDomain:r=>{const c=Te(r),l=lt(c,a);s({domain:c,error:l})}};return e.jsx(go,{value:{value:i},children:t})}function Do(){const{value:t}=y.useContext(bt);return t}var be,Ke;function bo(){if(Ke)return be;Ke=1;const{joinURL:t}=on(),n=sn(),s="z2qaGosS3rZ7m5ttP3Nd4V4qczR9TryTcRV4p";return be={DID_DOMAIN_SERVICE_DID:s,getDidDomainServiceURL:async i=>{if(!i||!i?.trim())return null;const r=new URL(i);r.pathname="__blocklet__.js",r.searchParams.set("type","json");const{data:c}=await n.get(r.toString()),l=c?.componentMountPoints?.find(u=>u.did===s),d=new URL(i);d.pathname=l?.mountPoint;const p=d.toString(),f=t(p,"/api");return{base:p,api:f,domain:t(f,"/domains")}}},be}var jo=bo();const vo=ct(Rn),Co=ct(xn);var je,Ze;function wo(){if(Ze)return je;Ze=1;const t=vo,n=Co;function s(i){return!i||typeof i!="string"?!1:i.split(".").length===2}return je={isTopLevelDomain:s,formatTopLevelDidDomain:i=>{const r=t(n(i));return r&&(s(r)?`www.${r}`:r)}},je}var Qe=wo(),Ro=an();const So=rn(Ro);function jt({domain:t="",resolvedTarget:n,...s}){const{t:a,locale:i}=S();return e.jsxs(x,{sx:{backgroundColor:"rgb(236, 251, 253)",borderColor:"rgb(236, 251, 253)",borderRadius:"8px",padding:"12px"},...s,children:[e.jsxs(x,{sx:{display:"flex",flexWrap:"wrap"},children:[a("router.domain.setup.tipStart"),t&&e.jsx(x,{sx:{mx:.5,color:"primary.main",fontWeight:"fontWeightBold"},children:t}),a("router.domain.setup.tipEnd"),":"]}),e.jsxs(O,{sx:{gap:.5,"&>div":{mb:0},marginTop:"12px"},children:[e.jsx(Re,{label:a("router.domain.setup.recordType"),value:"CNAME",locale:i}),e.jsx(Re,{label:a("router.domain.setup.recordValue"),value:n,locale:i})]})]})}jt.propTypes={domain:o.string,resolvedTarget:o.string.isRequired};function Re({locale:t,label:n,value:s}){const a=me(r=>r.breakpoints.down("md")),i=X();return e.jsx(Tn,{name:n,nameWidth:120,children:e.jsxs(x,{sx:{display:"flex",alignItems:"center",lineHeight:1},children:[e.jsx(T,{component:"span",sx:[{color:"primary.main",overflow:"auto"},a?{maxWidth:"95%",wordWrap:"break-word"}:{wordWrap:"break-word"}],children:s}),e.jsx(at,{content:s,locale:t,style:{marginLeft:"4px",color:i.palette.text.secondary}})]})})}Re.propTypes={locale:o.string.isRequired,label:o.string.isRequired,value:o.string.isRequired};function vt({children:t=null,href:n="",sx:s=null,showIcon:a=!1,...i}){const r=X();return e.jsxs(ln,{href:n,target:"_blank",...i,sx:{display:"inline-flex",alignItems:"center",color:"text.primary",":hover":{color:r.palette.primary.main},...s},children:[t,a&&e.jsx(An,{fontSize:"small",sx:{ml:"4px",fontSize:"1rem"}})]})}vt.propTypes={children:o.node,sx:o.object,href:o.string,showIcon:o.bool};function Ct({records:t}){return e.jsx(_n,{component:x,sx:{".MuiTableCell-root":{color:"text.primary"}},children:e.jsxs(Ln,{children:[e.jsx(Zn,{children:e.jsxs(Ve,{children:[e.jsx(H,{children:"Type"}),e.jsx(H,{children:"Name"}),e.jsx(H,{children:"Data"})]})}),e.jsx(Fn,{children:t.map(n=>e.jsxs(Ve,{children:[e.jsx(H,{children:n.type}),e.jsx(H,{children:n.name}),e.jsx(H,{sx:{wordBreak:"break-word"},children:e.jsx(In,{children:n.data})})]},n.name))})]})})}Ct.propTypes={records:o.array.isRequired};function wt({url:t,domain:n=""}){const{t:s}=S();return e.jsxs(x,{sx:{display:"flex",flexDirection:"column",gap:2},children:[e.jsxs(x,{sx:{display:"flex",flexDirection:"column",gap:1},children:[e.jsx(T,{component:"h3",variant:"h6",children:s("setting.dns.step1Title")}),e.jsxs(T,{component:"section",children:[s("setting.dns.step1Desc1"),e.jsx(vt,{href:"https://lookup.icann.org/",target:"_blank",children:"ICANN"})]})]}),e.jsxs(x,{sx:{display:"flex",flexDirection:"column",gap:1},children:[e.jsx(T,{component:"h3",variant:"h6",children:s("setting.dns.step2Title",{url:t})}),e.jsx(T,{component:"section",children:s("setting.dns.step2Desc")})]}),e.jsxs(x,{sx:{display:"flex",flexDirection:"column",gap:1},children:[e.jsx(T,{component:"h3",variant:"h6",children:s("setting.dns.step3Title")}),e.jsx(T,{component:"section",children:s("setting.dns.step3Desc")}),e.jsx(Ct,{records:[{type:"CNAME",name:kn(t),data:n}]})]})]})}wt.propTypes={url:o.string.isRequired,domain:o.string};const Rt=y.createContext();function To({children:t}){const{t:n}=S(),{api:s}=L(),{blocklet:a}=Y(),[i,r]=y.useState(null),c=y.useCallback(async(p,f)=>{try{const u=await s.getBlocklet({input:{domain:p,did:a?.meta?.did}});return u?.blocklet?new Promise(g=>{r({title:n("setting.domain.conflictTitle",{domain:p}),description:n("setting.domain.conflictDescription",{domain:p,title:u.blocklet.meta?.title,from:u.blocklet.meta?.title,to:a.meta?.title}),confirm:n("common.confirm"),cancel:n("common.cancel"),onConfirm:async()=>{r(null),await f?.(),g(!0)},onCancel:()=>{r(null),g(!1)}})}):!1}catch(u){return console.error(u),q.error(F(u)),!1}},[s,n,a]),l=y.useCallback(()=>i?e.jsx(pe,{title:i.title,description:i.description,confirm:i.confirm,cancel:i.cancel,onConfirm:i.onConfirm,onCancel:i.onCancel}):null,[i]),d=y.useMemo(()=>({checkConflict:c}),[c]);return e.jsxs(Rt.Provider,{value:d,children:[t,l()]})}function St(){return y.useContext(Rt)}function Tt({siteId:t,teamDid:n,cnameDomain:s,defaultCustomDomain:a="",onInputDomain:i=oe,appId:r="",appPk:c="",onSuccess:l=oe,onError:d=oe,disabled:p=!1,autoFocus:f=!0,inBlockletSetup:u=!1,shouldCheckDomain:g=!1,onStateChange:b=oe,currentIp:h="",...j}){const{t:m,locale:w}=S(),{api:C,info:M}=L(),{blocklet:B}=Y(),U=Do(),N=X(),A=Sn({key:"sm"}),[R,P]=ue({submittingDomain:!1,domain:a,error:null,type:M?.nftDomainUrl?"nftDomain":"inputDomain",showDnsTip:!1}),he=le.getDisplayName(B),{checkConflict:Ae}=St(),{connectApi:Mt}=cn(),J=dn(()=>jo.getDidDomainServiceURL(M?.nftDomainUrl));if(M?.nftDomainUrl&&J.loading)return e.jsx(x,{...j,onError:d,currentIp:h,children:e.jsx(Ne,{relative:"parent",children:e.jsx(z,{})})});if(J.error)return e.jsx(x,{...j,onError:d,currentIp:h,children:e.jsx(Ne,{relative:"parent",children:J.error.message})});const Ie=J.value,ge=()=>{P({invalidDNSDomain:null})},Pe=async(D,v,k=!1)=>{await C.addDomainAlias({input:{id:t,domainAlias:D,teamDid:n,inBlockletSetup:!0,force:k}}),P({submittingDomain:!1}),l({domain:D,type:"inputDomain",canGenerateCertificate:!v})},ye=async(D,v)=>{b(m("setting.domain.addingDomain"));try{await Pe(D,v,!1)}catch(k){if(console.error(k),ge(),F(k).includes("already exists")){await Ae(D,()=>Pe(D,v,!0));return}q.error(F(k))}},Me=async({domain:D,type:v,nftDid:k,chainHost:_})=>{try{if(!g){if(v==="inputDomain"){await ye(D);return}l({domain:D,type:v,nftDid:k,chainHost:_});return}b({text:m("setting.domain.checkingResolvable")});let I=30;const $=3e3,Lt=I*1e3/$,Le=setInterval(()=>{if(I<=0){clearInterval(Le);return}b({text:`${m("setting.domain.checkingResolvable")} (${I--}s)`})},1e3),ee=await So(()=>C.getDomainDNS({input:{teamDid:n,domain:D}}),{retries:Lt,minTimeout:$,maxTimeout:$,onFailedAttempt:console.error});if(clearInterval(Le),!ee?.isDnsResolved||!ee?.isCnameMatch){let te="";if(ee.isDnsResolved?ee.isCnameMatch||(te=m("setting.domain.resolvedAddressError",{domain:D,curDomain:s})):te=m("setting.domain.cannotResolve",{domain:D}),v==="nftDomain"){q.error(te),l({domain:D,type:"nftDomain"});return}b({text:""}),P({invalidDNSDomain:{domain:D,error:te},domain:D,type:v,submittingDomain:!1});return}if(v==="nftDomain"){l({domain:D,type:"nftDomain"});return}await ye(D)}catch(I){q.error(I.message),b({text:""}),P({submittingDomain:!1})}},qe=async({domain:D,nftDid:v,chainHost:k,force:_})=>{let I=Fe(D);I=Qe.formatTopLevelDidDomain(I),P({submittingDomain:!0}),await C.addDomainAlias({input:{id:t,type:"nft-domain",domainAlias:I,nftDid:v,chainHost:k,teamDid:n,inBlockletSetup:u,force:_}});const $="nftDomain";P({type:$}),await Me({domain:I,type:$,nftDid:v,chainHost:k})},qt=async({domain:D,nftDid:v,chainHost:k,isDomainOwner:_})=>{if(!_){const I=m("router.domainAlias.addDomainNFT.authorizeFailed");q.error(I),P({submittingDomain:!1,error:I});return}try{await qe({domain:D,nftDid:v,chainHost:k,force:!1})}catch(I){if(console.error(I),ge(),F(I).includes("already exists")){await Ae(D,()=>qe({domain:D,nftDid:v,chainHost:k,force:!0}));return}q.error(F(I))}finally{P({submittingDomain:!1})}},Et=async()=>{try{P({submittingDomain:!0});const D=Fe(R.domain);if(M.nftDomainUrl&&Ie&&(await C.isDidDomain({input:{domain:D}})).value===!0){Mt.openPopup({prefix:"/connect-to-did-domain",custom:!0,locale:w,extraParams:{provider:"wallet",delegatee:r,delegateePk:c,domain:Qe.formatTopLevelDidDomain(R.domain),appName:he,appUrl:le.getAppUrl(B)},message:{title:m("router.domainAlias.addDomainNFT.connect.title",{appName:he}),scan:m("router.domainAlias.addDomainNFT.connect.scan",{domain:R.domain,appName:he}),confirm:m("router.domainAlias.addDomainNFT.connect.confirm"),success:m("router.domainAlias.addDomainNFT.connect.success")},onSuccess:qt,onError:k=>{q.error(k.message),P({submittingDomain:!1})},onClose:()=>P({submittingDomain:!1}),checkTimeout:60*5e3},{baseUrl:Ie.base,locale:w});return}await Me({domain:D,type:R.type})}catch(D){P({submittingDomain:!1}),U.setError(D.message)}},Ee=U.error||R.error;return e.jsx(x,{...j,onError:d,currentIp:h,children:e.jsxs(x,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",gap:"1em"},children:[e.jsxs(x,{component:"form",onSubmit:D=>{D.preventDefault(),Et()},sx:{display:"flex",flexDirection:"column",gap:"8px"},children:[e.jsx(T,{sx:{color:N.palette.text.primary},children:m("router.domainAlias.add.tips")}),e.jsx(un,{sx:{display:"block",marginTop:"8px"},label:m("router.domainAlias.add.domainDescription"),helperText:R.type==="inputDomain"&&Ee||m("router.domainAlias.add.helperText"),fullWidth:!0,disabled:p,value:R.domain,size:"small",variant:"outlined",error:!!Ee&&R.type==="inputDomain",onChange:D=>{const v=Te(D.target?.value);U.setDomain(v);const k=lt(v,w);P({domain:v,error:k,type:"inputDomain"}),i({domain:v,error:k,type:"inputDomain"})},autoFocus:f,onBlur:()=>{U.domain||(P({error:null}),U.setError(null))},slotProps:{htmlInput:{"data-cy":"domain-name-input"}}}),e.jsx(x,{sx:{width:"100%",display:"flex",justifyContent:"flex-end"},children:e.jsx(mt,{"data-cy":"confirm-add-domain",fullWidth:A,variant:"contained",loading:R.submittingDomain,type:"submit",children:m("common.add")})}),e.jsx(x,{sx:{backgroundColor:()=>mn(N.palette.primary.light,.1),borderRadius:"8px",padding:"12px"},children:m("router.domainAlias.addDomainNFT.topLevelDidDomainHint")}),e.jsxs(x,{sx:{cursor:"pointer",fontSize:"14px",display:"flex",alignItems:"center",gap:"4px",lineHeight:1,color:N.palette.primary.main},onClick:()=>P({showDnsTip:!R.showDnsTip}),children:[e.jsx(pn,{fontSize:"1em"}),m("router.domainAlias.showTipHint")]}),R.showDnsTip&&e.jsx(jt,{domain:R.domain,resolvedTarget:s,style:{marginTop:"4px"}})]}),R.invalidDNSDomain&&e.jsx(pe,{maxWidth:"md",title:m("common.reminder"),description:e.jsxs(O,{sx:{gap:2},children:[e.jsx(de,{severity:"warning",children:m("setting.domain.invalidDNSReminder",{error:R.invalidDNSDomain.error})}),e.jsx(wt,{url:R.domain,domain:s})]}),color:"primary",confirm:m("setting.domain.continueAdd"),onConfirm:()=>ye(R.invalidDNSDomain.domain,R.type),onCancel:ge})]})})}Tt.propTypes={siteId:o.string.isRequired,currentIp:o.string,teamDid:o.string.isRequired,cnameDomain:o.string.isRequired,defaultCustomDomain:o.string,onInputDomain:o.func,onSuccess:o.func,appId:o.string,appPk:o.string,disabled:o.bool,autoFocus:o.bool,inBlockletSetup:o.bool,shouldCheckDomain:o.bool,onStateChange:o.func,onError:o.func};function kt({id:t,children:n=null,title:s="",teamDid:a="",systemDomains:i,appId:r=null,appPk:c,onAddDomainAlias:l=()=>{},...d}){const{t:p}=S(),[f,u]=ue({loading:!1,confirmSetting:null}),g=i.find(m=>ve.isDidDomain(m)),b=()=>{u({loading:!1,confirmSetting:null})},h={title:s||p("router.domainAlias.add.title"),description:function(w,C,M){return e.jsx(Tt,{siteId:t,teamDid:a,cnameDomain:g,onSuccess:B=>{l(B),u({confirmSetting:null})},onInputDomain:({domain:B,type:U,error:N})=>{C({...w,domain:B,type:U,__disableConfirm:!!N}),M(N)},appId:r,appPk:c,...d})},confirm:p("common.confirm"),cancel:p("common.cancel"),params:{domain:"",__disableConfirm:!0},onCancel:b},j=m=>{m.stopPropagation(),u({confirmSetting:h})};return e.jsxs(e.Fragment,{children:[typeof n=="function"?n({loading:f.loading,open:j}):e.jsxs(ot,{onClick:j,className:"rule-action","data-cy":"action-add-domain-alias",children:[f.loading?e.jsx(z,{size:16}):e.jsx(wn,{style:{fontSize:18,marginRight:5}}),p("router.domainAlias.add.title")]}),f.confirmSetting&&e.jsx(pe,{title:f.confirmSetting.title,description:f.confirmSetting.description,confirm:f.confirmSetting.confirm,cancel:f.confirmSetting.cancel,params:f.confirmSetting.params,onCancel:f.confirmSetting.onCancel,showConfirm:!1,showCancel:!0,displayError:!1,color:"primary",loading:f.loading,maxWidth:"sm"})]})}kt.propTypes={id:o.string.isRequired,children:o.any,title:o.string,teamDid:o.string,systemDomains:o.arrayOf(o.string).isRequired,appId:o.string,appPk:o.string.isRequired,onAddDomainAlias:o.func};function ko(t){return e.jsx(yo,{children:e.jsx(kt,{...t})})}function At({appId:t,appPk:n,siteId:s,inBlockletSetup:a,teamDid:i,sx:r={},onAddDomainAlias:c=()=>{},...l}){const{api:d,info:p}=L(),{locale:f,t:u}=S(),{checkConflict:g}=St(),b=async({domain:j,nftDid:m,chainHost:w,force:C})=>{const M={id:s,type:"nft-domain",domainAlias:j,nftDid:m,chainHost:w,teamDid:i,inBlockletSetup:a,force:C};return await d.addDomainAlias({input:M}),M},h=async({domain:j,nftDid:m,chainHost:w})=>{try{const C=await b({domain:j,nftDid:m,chainHost:w,force:!1});c(C)}catch(C){if(F(C).includes("already exists")){await g(j,()=>b({domain:j,nftDid:m,chainHost:w,force:!0}));return}q.error(F(C))}};return e.jsx(uo,{delegatee:t,delegateePk:n,didDomainURL:p.nftDomainUrl,onSuccess:h,locale:f,variant:"outlined",sx:r,title:u("router.domainAlias.addDomainNFT.buy"),...l})}At.propTypes={appId:o.string.isRequired,appPk:o.string.isRequired,siteId:o.string.isRequired,inBlockletSetup:o.bool.isRequired,teamDid:o.string.isRequired,sx:o.object,onAddDomainAlias:o.func};function It({blocklet:t,bugDidDomainProps:n={},connectDomainProps:s={},updateBlockletDomainAliases:a=()=>{}}){const{t:i}=S(),{info:r}=L(),c=me(u=>u.breakpoints.down("md")),{site:l}=t,d=y.useMemo(()=>it(t.site?.domainAliases),[t.site?.domainAliases]),p=t.environments?.find(u=>u.key==="BLOCKLET_APP_PK")?.value,f=fn(d);return e.jsx(To,{children:e.jsx(Pt,{action:e.jsxs(x,{sx:{display:"flex",alignItems:c?"stretch":"center",flexDirection:c?"column":"row",gap:1},children:[r.nftDomainUrl&&e.jsx(At,{variant:"contained",appId:t.appPid,appPk:p,siteId:l.id,inBlockletSetup:!1,teamDid:t.meta.did,onAddDomainAlias:u=>{const g={value:u.domainAlias,isProtected:!1,type:u.type,nftDid:u.nftDid,chainHost:u.chainHost,accessibility:{loading:!0}};a(g)},...n}),e.jsx(ko,{id:l.id,title:i("common.connectExistingDomain"),teamDid:t.meta?.did,appId:t.appPid,appPk:p,systemDomains:f?.map(u=>u.value),onAddDomainAlias:u=>{const g={value:u.domain,isProtected:!1,type:u.type==="nftDomain"?"nft-domain":"",nftDid:u.nftDid,chainHost:u.chainHost,accessibility:{loading:!0},canGenerateCertificate:u.canGenerateCertificate===void 0?!0:u.canGenerateCertificate};a(g)},...s,children:({open:u})=>e.jsxs(fe,{variant:"outlined",sx:{borderColor:"#ddd",color:"text.primary","&:hover":{bgcolor:g=>g.palette.primary.main,color:g=>g.palette.primary.contrastText}},"data-cy":"add-domain-alias",onClick:u,disabled:le.isInProgress(t.status),children:[e.jsx(Cn,{style:{fontSize:"1.3em",marginRight:4}}),i("common.connectExistingDomain")]})})]})})})}It.propTypes={blocklet:o.object.isRequired,bugDidDomainProps:o.object,connectDomainProps:o.object,updateBlockletDomainAliases:o.func};function Pt({action:t}){const{t:n}=S();return e.jsxs(rt,{elevation:0,sx:{p:3,borderRadius:2,border:"1px solid",borderColor:"divider"},children:[e.jsx(x,{sx:{display:"flex",alignItems:"center",gap:2},children:e.jsxs(x,{sx:{flex:1,width:0,mb:1.5},children:[e.jsx(T,{variant:"h6",children:n("common.bugOrConnectDomain")}),e.jsx(T,{sx:{fontSize:12,color:"text.secondary",mt:.5},children:n("common.bugOrConnectDomainTip")})]})}),t]})}Pt.propTypes={action:o.element.isRequired};function es(){const{blocklet:t,actions:{updateBlockletDomainAliases:n}}=Y(),{inService:s}=L(),{t:a}=S(),i=y.useMemo(()=>{let r=!0;return st(t)&&(r=r&&s),r},[s,t]);return e.jsxs(x,{component:O,sx:{gap:3,maxWidth:820},children:[e.jsxs(e.Fragment,{children:[le.isAccessible(t.status)===!1&&e.jsx(de,{severity:"warning",children:a("blocklet.router.noRunning")}),i&&e.jsx(It,{blocklet:t,updateBlockletDomainAliases:n,connectDomainProps:{shouldCheckDomain:!0}})]}),e.jsx(ho,{showAllDomains:!0,updateBlockletDomainAliases:n})]})}export{es as default};
@@ -1,4 +1,4 @@
1
- import{c as Ne,j as Y,ah as ke,t as ge,W as $e,cY as je,af as Le,o as te,r as he,eX as ze,bw as Ke,aS as Ie,al as qe,aB as Ve,bo as Ge,V as Ye,B as pe,bD as De,C as Re,cq as Xe,F as Je,S as Ze,M as Qe,da as et,H as tt}from"./index-BIgX2N1A.js";import{B as it}from"./ButtonGroup--8rwLvQ8.js";const rt=Ne(Y.jsx("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}));var we={exports:{}},Ae;function st(){return Ae||(Ae=1,(function(X,q){(function(j,V){X.exports=V()})(globalThis,(()=>(()=>{var j={4567:function(A,s,o){var d=this&&this.__decorate||function(e,r,a,f){var p,g=arguments.length,l=g<3?r:f===null?f=Object.getOwnPropertyDescriptor(r,a):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(e,r,a,f);else for(var m=e.length-1;m>=0;m--)(p=e[m])&&(l=(g<3?p(l):g>3?p(r,a,l):p(r,a))||l);return g>3&&l&&Object.defineProperty(r,a,l),l},_=this&&this.__param||function(e,r){return function(a,f){r(a,f,e)}};Object.defineProperty(s,"__esModule",{value:!0}),s.AccessibilityManager=void 0;const n=o(9042),c=o(9924),u=o(844),v=o(4725),h=o(2585),t=o(3656);let i=s.AccessibilityManager=class extends u.Disposable{constructor(e,r,a,f){super(),this._terminal=e,this._coreBrowserService=a,this._renderService=f,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let p=0;p<this._terminal.rows;p++)this._rowElements[p]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[p]);if(this._topBoundaryFocusListener=p=>this._handleBoundaryFocus(p,0),this._bottomBoundaryFocusListener=p=>this._handleBoundaryFocus(p,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new c.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((p=>this._handleResize(p.rows)))),this.register(this._terminal.onRender((p=>this._refreshRows(p.start,p.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((p=>this._handleChar(p)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
1
+ import{c as Ne,j as Y,ah as ke,t as ge,W as $e,cY as je,af as Le,o as te,r as he,eX as ze,bq as Ke,aS as Ie,al as qe,aB as Ve,bi as Ge,V as Ye,B as pe,bx as De,C as Re,cq as Xe,F as Je,S as Ze,M as Qe,da as et,H as tt}from"./index-DrI_kbUr.js";import{B as it}from"./ButtonGroup-BDg4XqiR.js";const rt=Ne(Y.jsx("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}));var we={exports:{}},Ae;function st(){return Ae||(Ae=1,(function(X,q){(function(j,V){X.exports=V()})(globalThis,(()=>(()=>{var j={4567:function(A,s,o){var d=this&&this.__decorate||function(e,r,a,f){var p,g=arguments.length,l=g<3?r:f===null?f=Object.getOwnPropertyDescriptor(r,a):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(e,r,a,f);else for(var m=e.length-1;m>=0;m--)(p=e[m])&&(l=(g<3?p(l):g>3?p(r,a,l):p(r,a))||l);return g>3&&l&&Object.defineProperty(r,a,l),l},_=this&&this.__param||function(e,r){return function(a,f){r(a,f,e)}};Object.defineProperty(s,"__esModule",{value:!0}),s.AccessibilityManager=void 0;const n=o(9042),c=o(9924),u=o(844),v=o(4725),h=o(2585),t=o(3656);let i=s.AccessibilityManager=class extends u.Disposable{constructor(e,r,a,f){super(),this._terminal=e,this._coreBrowserService=a,this._renderService=f,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let p=0;p<this._terminal.rows;p++)this._rowElements[p]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[p]);if(this._topBoundaryFocusListener=p=>this._handleBoundaryFocus(p,0),this._bottomBoundaryFocusListener=p=>this._handleBoundaryFocus(p,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new c.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((p=>this._handleResize(p.rows)))),this.register(this._terminal.onRender((p=>this._refreshRows(p.start,p.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((p=>this._handleChar(p)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
2
2
  `)))),this.register(this._terminal.onA11yTab((p=>this._handleTab(p)))),this.register(this._terminal.onKey((p=>this._handleKey(p.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,t.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,u.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(e){for(let r=0;r<e;r++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
3
3
  `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,r){this._liveRegionDebouncer.refresh(e,r,this._terminal.rows)}_renderRows(e,r){const a=this._terminal.buffer,f=a.lines.length.toString();for(let p=e;p<=r;p++){const g=a.lines.get(a.ydisp+p),l=[],m=g?.translateToString(!0,void 0,void 0,l)||"",E=(a.ydisp+p+1).toString(),x=this._rowElements[p];x&&(m.length===0?(x.innerText=" ",this._rowColumns.set(x,[0,1])):(x.textContent=m,this._rowColumns.set(x,l)),x.setAttribute("aria-posinset",E),x.setAttribute("aria-setsize",f))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,r){const a=e.target,f=this._rowElements[r===0?1:this._rowElements.length-2];if(a.getAttribute("aria-posinset")===(r===0?"1":`${this._terminal.buffer.lines.length}`)||e.relatedTarget!==f)return;let p,g;if(r===0?(p=a,g=this._rowElements.pop(),this._rowContainer.removeChild(g)):(p=this._rowElements.shift(),g=a,this._rowContainer.removeChild(p)),p.removeEventListener("focus",this._topBoundaryFocusListener),g.removeEventListener("focus",this._bottomBoundaryFocusListener),r===0){const l=this._createAccessibilityTreeNode();this._rowElements.unshift(l),this._rowContainer.insertAdjacentElement("afterbegin",l)}else{const l=this._createAccessibilityTreeNode();this._rowElements.push(l),this._rowContainer.appendChild(l)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(r===0?-1:1),this._rowElements[r===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;const e=document.getSelection();if(!e)return;if(e.isCollapsed)return void(this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection());if(!e.anchorNode||!e.focusNode)return void console.error("anchorNode and/or focusNode are null");let r={node:e.anchorNode,offset:e.anchorOffset},a={node:e.focusNode,offset:e.focusOffset};if((r.node.compareDocumentPosition(a.node)&Node.DOCUMENT_POSITION_PRECEDING||r.node===a.node&&r.offset>a.offset)&&([r,a]=[a,r]),r.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(r={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(r.node))return;const f=this._rowElements.slice(-1)[0];if(a.node.compareDocumentPosition(f)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(a={node:f,offset:f.textContent?.length??0}),!this._rowContainer.contains(a.node))return;const p=({node:m,offset:E})=>{const x=m instanceof Text?m.parentNode:m;let L=parseInt(x?.getAttribute("aria-posinset"),10)-1;if(isNaN(L))return console.warn("row is invalid. Race condition?"),null;const b=this._rowColumns.get(x);if(!b)return console.warn("columns is null. Race condition?"),null;let R=E<b.length?b[E]:b.slice(-1)[0]+1;return R>=this._terminal.cols&&(++L,R=0),{row:L,column:R}},g=p(r),l=p(a);if(g&&l){if(g.row>l.row||g.row===l.row&&g.column>=l.column)throw new Error("invalid range");this._terminal.select(g.column,g.row,(l.row-g.row)*this._terminal.cols-g.column+l.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let r=this._rowContainer.children.length;r<this._terminal.rows;r++)this._rowElements[r]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[r]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}};s.AccessibilityManager=i=d([_(1,h.IInstantiationService),_(2,v.ICoreBrowserService),_(3,v.IRenderService)],i)},3614:(A,s)=>{function o(c){return c.replace(/\r?\n/g,"\r")}function d(c,u){return u?"\x1B[200~"+c+"\x1B[201~":c}function _(c,u,v,h){c=d(c=o(c),v.decPrivateModes.bracketedPasteMode&&h.rawOptions.ignoreBracketedPasteMode!==!0),v.triggerDataEvent(c,!0),u.value=""}function n(c,u,v){const h=v.getBoundingClientRect(),t=c.clientX-h.left-10,i=c.clientY-h.top-10;u.style.width="20px",u.style.height="20px",u.style.left=`${t}px`,u.style.top=`${i}px`,u.style.zIndex="1000",u.focus()}Object.defineProperty(s,"__esModule",{value:!0}),s.rightClickHandler=s.moveTextAreaUnderMouseCursor=s.paste=s.handlePasteEvent=s.copyHandler=s.bracketTextForPaste=s.prepareTextForTerminal=void 0,s.prepareTextForTerminal=o,s.bracketTextForPaste=d,s.copyHandler=function(c,u){c.clipboardData&&c.clipboardData.setData("text/plain",u.selectionText),c.preventDefault()},s.handlePasteEvent=function(c,u,v,h){c.stopPropagation(),c.clipboardData&&_(c.clipboardData.getData("text/plain"),u,v,h)},s.paste=_,s.moveTextAreaUnderMouseCursor=n,s.rightClickHandler=function(c,u,v,h,t){n(c,u,v),t&&h.rightClickSelect(c),u.value=h.selectionText,u.select()}},7239:(A,s,o)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ColorContrastCache=void 0;const d=o(1505);s.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(_,n,c){this._css.set(_,n,c)}getCss(_,n){return this._css.get(_,n)}setColor(_,n,c){this._color.set(_,n,c)}getColor(_,n){return this._color.get(_,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(A,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.addDisposableDomListener=void 0,s.addDisposableDomListener=function(o,d,_,n){o.addEventListener(d,_,n);let c=!1;return{dispose:()=>{c||(c=!0,o.removeEventListener(d,_,n))}}}},3551:function(A,s,o){var d=this&&this.__decorate||function(i,e,r,a){var f,p=arguments.length,g=p<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,r):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(i,e,r,a);else for(var l=i.length-1;l>=0;l--)(f=i[l])&&(g=(p<3?f(g):p>3?f(e,r,g):f(e,r))||g);return p>3&&g&&Object.defineProperty(e,r,g),g},_=this&&this.__param||function(i,e){return function(r,a){e(r,a,i)}};Object.defineProperty(s,"__esModule",{value:!0}),s.Linkifier=void 0;const n=o(3656),c=o(8460),u=o(844),v=o(2585),h=o(4725);let t=s.Linkifier=class extends u.Disposable{get currentLink(){return this._currentLink}constructor(i,e,r,a,f){super(),this._element=i,this._mouseService=e,this._renderService=r,this._bufferService=a,this._linkProviderService=f,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new c.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new c.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,u.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,u.toDisposable)((()=>{this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,n.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,n.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(i){this._lastMouseEvent=i;const e=this._positionFromMouseEvent(i,this._element,this._mouseService);if(!e)return;this._isMouseOut=!1;const r=i.composedPath();for(let a=0;a<r.length;a++){const f=r[a];if(f.classList.contains("xterm"))break;if(f.classList.contains("xterm-hover"))return}this._lastBufferCell&&e.x===this._lastBufferCell.x&&e.y===this._lastBufferCell.y||(this._handleHover(e),this._lastBufferCell=e)}_handleHover(i){if(this._activeLine!==i.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(i,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,i)||(this._clearCurrentLink(),this._askForLink(i,!0))}_askForLink(i,e){this._activeProviderReplies&&e||(this._activeProviderReplies?.forEach((a=>{a?.forEach((f=>{f.link.dispose&&f.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=i.y);let r=!1;for(const[a,f]of this._linkProviderService.linkProviders.entries())e?this._activeProviderReplies?.get(a)&&(r=this._checkLinkProviderResult(a,i,r)):f.provideLinks(i.y,(p=>{if(this._isMouseOut)return;const g=p?.map((l=>({link:l})));this._activeProviderReplies?.set(a,g),r=this._checkLinkProviderResult(a,i,r),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(i.y,this._activeProviderReplies)}))}_removeIntersectingLinks(i,e){const r=new Set;for(let a=0;a<e.size;a++){const f=e.get(a);if(f)for(let p=0;p<f.length;p++){const g=f[p],l=g.link.range.start.y<i?0:g.link.range.start.x,m=g.link.range.end.y>i?this._bufferService.cols:g.link.range.end.x;for(let E=l;E<=m;E++){if(r.has(E)){f.splice(p--,1);break}r.add(E)}}}}_checkLinkProviderResult(i,e,r){if(!this._activeProviderReplies)return r;const a=this._activeProviderReplies.get(i);let f=!1;for(let p=0;p<i;p++)this._activeProviderReplies.has(p)&&!this._activeProviderReplies.get(p)||(f=!0);if(!f&&a){const p=a.find((g=>this._linkAtPosition(g.link,e)));p&&(r=!0,this._handleNewLink(p))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!r)for(let p=0;p<this._activeProviderReplies.size;p++){const g=this._activeProviderReplies.get(p)?.find((l=>this._linkAtPosition(l.link,e)));if(g){r=!0,this._handleNewLink(g);break}}return r}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(i){if(!this._currentLink)return;const e=this._positionFromMouseEvent(i,this._element,this._mouseService);e&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,e)&&this._currentLink.link.activate(i,this._currentLink.link.text)}_clearCurrentLink(i,e){this._currentLink&&this._lastMouseEvent&&(!i||!e||this._currentLink.link.range.start.y>=i&&this._currentLink.link.range.end.y<=e)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,u.disposeArray)(this._linkCacheDisposables))}_handleNewLink(i){if(!this._lastMouseEvent)return;const e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);e&&this._linkAtPosition(i.link,e)&&(this._currentLink=i,this._currentLink.state={decorations:{underline:i.link.decorations===void 0||i.link.decorations.underline,pointerCursor:i.link.decorations===void 0||i.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,i.link,this._lastMouseEvent),i.link.decorations={},Object.defineProperties(i.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:r=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==r&&(this._currentLink.state.decorations.pointerCursor=r,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",r))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:r=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==r&&(this._currentLink.state.decorations.underline=r,this._currentLink.state.isHovered&&this._fireUnderlineEvent(i.link,r))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((r=>{if(!this._currentLink)return;const a=r.start===0?0:r.start+1+this._bufferService.buffer.ydisp,f=this._bufferService.buffer.ydisp+1+r.end;if(this._currentLink.link.range.start.y>=a&&this._currentLink.link.range.end.y<=f&&(this._clearCurrentLink(a,f),this._lastMouseEvent)){const p=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);p&&this._askForLink(p,!1)}}))))}_linkHover(i,e,r){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!0),this._currentLink.state.decorations.pointerCursor&&i.classList.add("xterm-cursor-pointer")),e.hover&&e.hover(r,e.text)}_fireUnderlineEvent(i,e){const r=i.range,a=this._bufferService.buffer.ydisp,f=this._createLinkUnderlineEvent(r.start.x-1,r.start.y-a-1,r.end.x,r.end.y-a-1,void 0);(e?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(f)}_linkLeave(i,e,r){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!1),this._currentLink.state.decorations.pointerCursor&&i.classList.remove("xterm-cursor-pointer")),e.leave&&e.leave(r,e.text)}_linkAtPosition(i,e){const r=i.range.start.y*this._bufferService.cols+i.range.start.x,a=i.range.end.y*this._bufferService.cols+i.range.end.x,f=e.y*this._bufferService.cols+e.x;return r<=f&&f<=a}_positionFromMouseEvent(i,e,r){const a=r.getCoords(i,e,this._bufferService.cols,this._bufferService.rows);if(a)return{x:a[0],y:a[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(i,e,r,a,f){return{x1:i,y1:e,x2:r,y2:a,cols:this._bufferService.cols,fg:f}}};s.Linkifier=t=d([_(1,h.IMouseService),_(2,h.IRenderService),_(3,v.IBufferService),_(4,h.ILinkProviderService)],t)},9042:(A,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.tooMuchOutput=s.promptLabel=void 0,s.promptLabel="Terminal input",s.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(A,s,o){var d=this&&this.__decorate||function(h,t,i,e){var r,a=arguments.length,f=a<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(h,t,i,e);else for(var p=h.length-1;p>=0;p--)(r=h[p])&&(f=(a<3?r(f):a>3?r(t,i,f):r(t,i))||f);return a>3&&f&&Object.defineProperty(t,i,f),f},_=this&&this.__param||function(h,t){return function(i,e){t(i,e,h)}};Object.defineProperty(s,"__esModule",{value:!0}),s.OscLinkProvider=void 0;const n=o(511),c=o(2585);let u=s.OscLinkProvider=class{constructor(h,t,i){this._bufferService=h,this._optionsService=t,this._oscLinkService=i}provideLinks(h,t){const i=this._bufferService.buffer.lines.get(h-1);if(!i)return void t(void 0);const e=[],r=this._optionsService.rawOptions.linkHandler,a=new n.CellData,f=i.getTrimmedLength();let p=-1,g=-1,l=!1;for(let m=0;m<f;m++)if(g!==-1||i.hasContent(m)){if(i.loadCell(m,a),a.hasExtendedAttrs()&&a.extended.urlId){if(g===-1){g=m,p=a.extended.urlId;continue}l=a.extended.urlId!==p}else g!==-1&&(l=!0);if(l||g!==-1&&m===f-1){const E=this._oscLinkService.getLinkData(p)?.uri;if(E){const x={start:{x:g+1,y:h},end:{x:m+(l||m!==f-1?0:1),y:h}};let L=!1;if(!r?.allowNonHttpProtocols)try{const b=new URL(E);["http:","https:"].includes(b.protocol)||(L=!0)}catch{L=!0}L||e.push({text:E,range:x,activate:(b,R)=>r?r.activate(b,R,x):v(0,R),hover:(b,R)=>r?.hover?.(b,R,x),leave:(b,R)=>r?.leave?.(b,R,x)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(g=m,p=a.extended.urlId):(g=-1,p=-1)}}t(e)}};function v(h,t){if(confirm(`Do you want to navigate to ${t}?
4
4
 
@@ -1 +1 @@
1
- import{r as a}from"./index-BIgX2N1A.js";const r=t=>a.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t},a.createElement("path",{d:"M6.04 17.625a.953.953 0 0 0 .14-.012l3.943-.691a.23.23 0 0 0 .124-.066l9.935-9.935a.233.233 0 0 0 0-.33l-3.895-3.898a.232.232 0 0 0-.167-.068.232.232 0 0 0-.166.068l-9.935 9.935a.238.238 0 0 0-.066.124l-.691 3.943a.785.785 0 0 0 .22.698c.155.15.35.232.558.232zm1.58-4.088 8.5-8.498 1.718 1.718-8.5 8.498-2.084.368.366-2.085zm13.005 6.057H3.375a.75.75 0 0 0-.75.75v.843c0 .104.084.188.188.188h18.375a.188.188 0 0 0 .187-.188v-.843a.75.75 0 0 0-.75-.75z"}));export{r as e};
1
+ import{r as a}from"./index-DrI_kbUr.js";const r=t=>a.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t},a.createElement("path",{d:"M6.04 17.625a.953.953 0 0 0 .14-.012l3.943-.691a.23.23 0 0 0 .124-.066l9.935-9.935a.233.233 0 0 0 0-.33l-3.895-3.898a.232.232 0 0 0-.167-.068.232.232 0 0 0-.166.068l-9.935 9.935a.238.238 0 0 0-.066.124l-.691 3.943a.785.785 0 0 0 .22.698c.155.15.35.232.558.232zm1.58-4.088 8.5-8.498 1.718 1.718-8.5 8.498-2.084.368.366-2.085zm13.005 6.057H3.375a.75.75 0 0 0-.75.75v.843c0 .104.084.188.188.188h18.375a.188.188 0 0 0 .187-.188v-.843a.75.75 0 0 0-.75-.75z"}));export{r as e};
@@ -0,0 +1 @@
1
+ import{ai as e,bf as r,bg as s}from"./index-DrI_kbUr.js";const o=e(r),t=e(s);export{t as a,o as r};
@@ -0,0 +1 @@
1
+ import{ar as r}from"./index-DrI_kbUr.js";var a=r();export{a as e};