@abtnode/blocklet-services 1.16.34-beta-20241212-152152-0b8d4bb3 → 1.16.34-beta-20241213-135509-c2832f80

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 (265) hide show
  1. package/api/services/studio/index.js +10 -0
  2. package/dist/assets/{Add-C-MUV7pC.js → Add-DcTdY6TL.js} +1 -1
  3. package/dist/assets/{Alert-DbN0O0aN.js → Alert-D-e8-MAP.js} +1 -1
  4. package/dist/assets/{ArrowDropDown-BD-n5g-y.js → ArrowDropDown-BvKbPg9O.js} +1 -1
  5. package/dist/assets/Autocomplete-BX46bk2_.js +1 -0
  6. package/dist/assets/{Avatar-BbstlMJY.js → Avatar-BoZ94vwc.js} +1 -1
  7. package/dist/assets/{ButtonGroup-YqMGRNaj.js → ButtonGroup-CtoWRVeN.js} +1 -1
  8. package/dist/assets/{CSSTransition-CXxbf41Q.js → CSSTransition-DhDaGYf6.js} +1 -1
  9. package/dist/assets/{CheckCircle-C-J8R9KR.js → CheckCircle-DuplVjH9.js} +1 -1
  10. package/dist/assets/{ChevronLeft-dqkQph81.js → ChevronLeft-CRxnDPnp.js} +1 -1
  11. package/dist/assets/{ChevronRight-B2k9Gvlw.js → ChevronRight-6ehYjoIB.js} +1 -1
  12. package/dist/assets/Clear-BkApEw3Y.js +1 -0
  13. package/dist/assets/{Delete-DOl4nPF3.js → Delete-LBSof570.js} +1 -1
  14. package/dist/assets/{DeleteOutline-DYH6KsRs.js → DeleteOutline-DoKDfJgl.js} +1 -1
  15. package/dist/assets/DialogContentText-B73EoFbn.js +1 -0
  16. package/dist/assets/DialogTitle-B7_qt6er.js +1 -0
  17. package/dist/assets/{Done-DEI256sV.js → Done-BdhX20sl.js} +1 -1
  18. package/dist/assets/{Download-B7Y03H7t.js → Download-cZILKd7o.js} +1 -1
  19. package/dist/assets/{EditIcon-WRiAz_Ii.js → EditIcon-D9kgkBKD.js} +1 -1
  20. package/dist/assets/{Error-BqDO0zZY.js → Error-ClsC7NrR.js} +1 -1
  21. package/dist/assets/{ExpandMore-BO8jF1bn.js → ExpandMore-DrecSXMe.js} +1 -1
  22. package/dist/assets/FormControl-Ve2KegjN.js +1 -0
  23. package/dist/assets/FormControlLabel-C10RDNgA.js +1 -0
  24. package/dist/assets/FormGroup-C2DrHvar.js +1 -0
  25. package/dist/assets/{Google-D_mc2y32.js → Google-qzzGwT5f.js} +1 -1
  26. package/dist/assets/{Grid-tsC4khHx.js → Grid-DZk6Z8OE.js} +1 -1
  27. package/dist/assets/{HelpOutline-BoXfs1w7.js → HelpOutline-epGv8mXi.js} +1 -1
  28. package/dist/assets/{Hidden-ipoc6BxF.js → Hidden-DPr9AEQp.js} +1 -1
  29. package/dist/assets/{InfoOutlined-BxU1CEPg.js → InfoOutlined-B8LkdcP3.js} +1 -1
  30. package/dist/assets/InputAdornment-gT40mObj.js +1 -0
  31. package/dist/assets/{LastPage--sm4pHpX.js → LastPage-DrjUl7Ym.js} +1 -1
  32. package/dist/assets/{Launch-6LXlwp2H.js → Launch-CyTNEiOE.js} +1 -1
  33. package/dist/assets/{LaunchOutlined-B6l7-o_Y.js → LaunchOutlined-ByFC01OF.js} +1 -1
  34. package/dist/assets/Link-51uCMh9H.js +1 -0
  35. package/dist/assets/{ListItemButton-YchFGwTe.js → ListItemButton-DtweULpb.js} +1 -1
  36. package/dist/assets/{ListSubheader-CKfDOFlq.js → ListSubheader-DfLnu3fa.js} +1 -1
  37. package/dist/assets/{LoadingButton-C4TIaNaq.js → LoadingButton-jLzgx1P7.js} +1 -1
  38. package/dist/assets/{LockIcon-DtPBoSNv.js → LockIcon-De6Ad6SH.js} +1 -1
  39. package/dist/assets/{Loop-BmB9k803.js → Loop-tTR2yrlz.js} +1 -1
  40. package/dist/assets/{MarkEmailRead-D59Dom04.js → MarkEmailRead-B6ZiEWoQ.js} +1 -1
  41. package/dist/assets/{Menu-CasLu-ky.js → Menu-BeKA5iSq.js} +1 -1
  42. package/dist/assets/{MoreHoriz-B5aoiijW.js → MoreHoriz-B1JvEOcC.js} +1 -1
  43. package/dist/assets/{MoreVert-C9UJnjfF.js → MoreVert-GvhXcnsL.js} +1 -1
  44. package/dist/assets/{OpenInNew-YMhtYwHE.js → OpenInNew-C7tW6zIz.js} +1 -1
  45. package/dist/assets/OutlinedInput-Do_G2JiI.js +2 -0
  46. package/dist/assets/{Pagination-Df9SRmt8.js → Pagination-CkastftC.js} +1 -1
  47. package/dist/assets/{PlayArrow-BEtJ369o.js → PlayArrow-DDe0KUdi.js} +1 -1
  48. package/dist/assets/{QuestionMarkCircle-CuvZsXbn.js → QuestionMarkCircle-BbZ4QGV2.js} +1 -1
  49. package/dist/assets/{RadioGroup-CGMGVlf2.js → RadioGroup-CTXZALsL.js} +1 -1
  50. package/dist/assets/{Search-CKwfa740.js → Search-BctSuhZ0.js} +1 -1
  51. package/dist/assets/Select-DYnsfpKN.js +1 -0
  52. package/dist/assets/{ServerLogo-BAQKQJ7V.js → ServerLogo-BLAQXKZ3.js} +1 -1
  53. package/dist/assets/{Skeleton-D0-q_hvU.js → Skeleton-CVZKKwKZ.js} +5 -5
  54. package/dist/assets/{Stack-BO9M0PIW.js → Stack-Cc1e8uS3.js} +1 -1
  55. package/dist/assets/{Stepper-RItm9i-D.js → Stepper-DsIq58ia.js} +1 -1
  56. package/dist/assets/TextField-CO9VOqaC.js +1 -0
  57. package/dist/assets/{Toolbar-DYiylaGG.js → Toolbar-D_Z1ZGgn.js} +1 -1
  58. package/dist/assets/ViewColumn-DQ20ttLn.js +1 -0
  59. package/dist/assets/{ViewList-BaL8evRq.js → ViewList-Bnq-Bz9v.js} +1 -1
  60. package/dist/assets/_createAggregator-dQcfls_H.js +1 -0
  61. package/dist/assets/access-control-BXwHzkCA.js +13 -0
  62. package/dist/assets/{actions-CchlEsiO.js → actions-D67DGwR5.js} +1 -1
  63. package/dist/assets/{add-component-core-oabwwAHL.js → add-component-core-Bfu_zvLX.js} +2 -2
  64. package/dist/assets/add-resource-Bopi2F5-.js +1 -0
  65. package/dist/assets/{addon-k5gcfsfJ.js → addon-yHbJNe3B.js} +1 -1
  66. package/dist/assets/{analytics-9EII-v2b.js → analytics-DecQzqwH.js} +8 -8
  67. package/dist/assets/api-DH8IdxXg.js +1 -0
  68. package/dist/assets/ar-BAnh0kq-.js +1 -0
  69. package/dist/assets/audit-logs-Blyvfwui.js +58 -0
  70. package/dist/assets/{base32-Cog_VZ0k.js → base32-DTb-J1h_.js} +1 -1
  71. package/dist/assets/branding-Cr7lzDNp.js +40 -0
  72. package/dist/assets/{bundle-avatar-C-1ahBAR.js → bundle-avatar-TCiQIGsc.js} +1 -1
  73. package/dist/assets/{button-CSzyfzmK.js → button-B2WmAAQP.js} +1 -1
  74. package/dist/assets/{click-to-copy-BBLmW78J.js → click-to-copy-C-hq6Slv.js} +1 -1
  75. package/dist/assets/{complete-BRGGVyCs.js → complete-CFh6Nef4.js} +2 -2
  76. package/dist/assets/{component-BOFPPqD8.js → component-G-UDGzGu.js} +6 -6
  77. package/dist/assets/{config-BuQgZfpX.js → config-CdE9iwiR.js} +2 -2
  78. package/dist/assets/{config-iLqs6SqP.js → config-R9luUUXo.js} +1 -1
  79. package/dist/assets/{config-navigation-C5_bJU0f.js → config-navigation-DAx0e99X.js} +6 -6
  80. package/dist/assets/{config-space-C56d0lRU.js → config-space-DGTpbWBc.js} +1 -1
  81. package/dist/assets/confirm-BC8TTdT0.js +7 -0
  82. package/dist/assets/{connect-o-hOItU0.js → connect-Ca4Z5ZCG.js} +1 -1
  83. package/dist/assets/{connect-DOaWC9ft.js → connect-DYbGPYA1.js} +2 -2
  84. package/dist/assets/{connect-to-CUmo43dQ.js → connect-to-CK3sPRsk.js} +1 -1
  85. package/dist/assets/{content-layout-Coi8AV4p.js → content-layout-DPhqwbjU.js} +1 -1
  86. package/dist/assets/{dashboard-CazjqRmG.js → dashboard-DqNsUCmU.js} +9 -9
  87. package/dist/assets/de-CYAy3iib.js +1 -0
  88. package/dist/assets/{deprecate-B2OaYvW_.js → deprecate-BzwAgeY6.js} +1 -1
  89. package/dist/assets/{did-address-CqYEOOvT.js → did-address-_iA2JBVL.js} +1 -1
  90. package/dist/assets/domain-CdS6WH7r.js +9 -0
  91. package/dist/assets/domain-list-DgnHKWqf.js +15 -0
  92. package/dist/assets/{email-DD_llVWt.js → email-pILbo7GY.js} +3 -3
  93. package/dist/assets/emotion-cache.browser.esm-FU3nBxaV.js +1 -0
  94. package/dist/assets/es-Bn01DRSJ.js +1 -0
  95. package/dist/assets/exchange-passport-Bz0OFLm3.js +1 -0
  96. package/dist/assets/{fallback-CVomANXA.js → fallback-DNotPO94.js} +1 -1
  97. package/dist/assets/{form-text-input-dBeTAT7j.js → form-text-input-BMDOwfx4.js} +2 -2
  98. package/dist/assets/{format-error-CXOPpcrE.js → format-error-DwZSxaHw.js} +1 -1
  99. package/dist/assets/fr-D3J0B-tk.js +1 -0
  100. package/dist/assets/{fuel-CDp9ZffP.js → fuel-BLdY2pe6.js} +1 -1
  101. package/dist/assets/{fullpage-CWXnpLtu.js → fullpage-DizVq3Q0.js} +1 -1
  102. package/dist/assets/{get-safe-url-B3_JzMvg.js → get-safe-url-BFPkD_-w.js} +1 -1
  103. package/dist/assets/{get-safe-url-DLq03enx.js → get-safe-url-DZ-z9Y11.js} +1 -1
  104. package/dist/assets/hi-DdEYPkL3.js +1 -0
  105. package/dist/assets/{home-CSMD2Z1d.js → home-Tu1r9UUP.js} +1 -1
  106. package/dist/assets/id-C6kfQsmT.js +1 -0
  107. package/dist/assets/{iframe-DCD_qn_b.js → iframe-CaVEoPzZ.js} +1 -1
  108. package/dist/assets/{index-DsAOaF68.js → index-4W47mya0.js} +1 -1
  109. package/dist/assets/{index-DvbaB47F.js → index-B3taNgzi.js} +1 -1
  110. package/dist/assets/{index-BJPpUK5T.js → index-BEJPw-Yp.js} +19 -16
  111. package/dist/assets/{index-BbwkcNKT.js → index-BH89MPC8.js} +1 -1
  112. package/dist/assets/{index-unKKAfCB.js → index-BM80ek7x.js} +1 -1
  113. package/dist/assets/{index-BkwS3xmJ.js → index-BOpUgQ8H.js} +8 -8
  114. package/dist/assets/{index-MlLLj7ox.js → index-BWn04_iI.js} +1 -1
  115. package/dist/assets/index-BXvoL3Iu.js +4 -0
  116. package/dist/assets/{index-DnlBG2uS.js → index-BcBVFEsU.js} +1 -1
  117. package/dist/assets/{index-UA6q4JVO.js → index-Bj8u1Jq1.js} +25 -25
  118. package/dist/assets/{index-B2QN3yxT.js → index-BjsbrYRH.js} +7 -7
  119. package/dist/assets/{index-BAC0visH.js → index-Bn2ctnS8.js} +1 -1
  120. package/dist/assets/{index-CGNW_HS5.js → index-BuFsUoby.js} +4 -4
  121. package/dist/assets/{index-C03QRPVb.js → index-CNW7JpLY.js} +10 -10
  122. package/dist/assets/{index-DQSbUwd9.js → index-CWzdBGm2.js} +1 -1
  123. package/dist/assets/index-CjBMqGWM.js +1 -0
  124. package/dist/assets/{index-Ci5RfQ59.js → index-Cyq88B7c.js} +1 -1
  125. package/dist/assets/{index-CxwdZ5FQ.js → index-CzXHRu12.js} +1 -1
  126. package/dist/assets/{index-CgETkxdp.js → index-D3U2QoHe.js} +1 -1
  127. package/dist/assets/index-D7t6icMl.js +1 -0
  128. package/dist/assets/{index-CS43LeKQ.js → index-DDG6nzV-.js} +1 -1
  129. package/dist/assets/index-DEG_Pe1F.js +1 -0
  130. package/dist/assets/{index-ClKfKXJz.js → index-DLfBZi9C.js} +1 -1
  131. package/dist/assets/{index-2Q0z0xFE.js → index-DPiBRCz4.js} +1 -1
  132. package/dist/assets/{index-BLKPMstc.js → index-DUDLGVrz.js} +7 -7
  133. package/dist/assets/{index-DbAVBGvq.js → index-DWDFxHgN.js} +2 -2
  134. package/dist/assets/{index-CMGrAADS.js → index-DblJTJQz.js} +1 -1
  135. package/dist/assets/{index-DEcPGLHC.js → index-DheUDLUu.js} +1 -1
  136. package/dist/assets/{index-B-5mC5YF.js → index-YElVd5eM.js} +1 -1
  137. package/dist/assets/{index-BWCk5LbW.js → index-d-mPwPwc.js} +2 -2
  138. package/dist/assets/{index-C7otKf8F.js → index-dEKXkm4C.js} +5 -5
  139. package/dist/assets/{index-DIA9qwvc.js → index-lJoTfApr.js} +3 -3
  140. package/dist/assets/{index-C2ynZPOY.js → index-pMGk7BEW.js} +8 -8
  141. package/dist/assets/{invitation-8Vja2ez-.js → invitation-BFbVuQFx.js} +3 -3
  142. package/dist/assets/invite-Bron7GEw.js +5 -0
  143. package/dist/assets/{isEmail-B6BHZ8TX.js → isEmail-5f9jXFqI.js} +1 -1
  144. package/dist/assets/{issue-passport-D8pAGg2V.js → issue-passport-BMTa-EpO.js} +1 -1
  145. package/dist/assets/{item-rGVvbhmE.js → item-BYnIVyyp.js} +1 -1
  146. package/dist/assets/ja-DN837plG.js +1 -0
  147. package/dist/assets/{jss-plugin-props-sort.esm-BqC3mtsa.js → jss-plugin-props-sort.esm-CxRI79tr.js} +6 -6
  148. package/dist/assets/ko-LU148n3o.js +1 -0
  149. package/dist/assets/{launch-result-message-fLJdiQ4t.js → launch-result-message-DXzliFie.js} +1 -1
  150. package/dist/assets/{layout-Df9B9CD5.js → layout-CAsilLGB.js} +1 -1
  151. package/dist/assets/{list-header-8wYyLFjq.js → list-header-YJQAbm9g.js} +1 -1
  152. package/dist/assets/localization-CoaLMiV4.js +1 -0
  153. package/dist/assets/{log-CXrE-Pqc.js → log-Bdo9FkyE.js} +6 -6
  154. package/dist/assets/login-D8bQWYck.js +1 -0
  155. package/dist/assets/{login-oauth-callback-CgPqb7Lq.js → login-oauth-callback-DQ0fJI0M.js} +1 -1
  156. package/dist/assets/logo-uploader-cFGQ2Gvc.js +133 -0
  157. package/dist/assets/{lost-passport-Bh8A1qX6.js → lost-passport-Cut0hEBf.js} +4 -4
  158. package/dist/assets/{lottie-react.esm-BSqfmkGG.js → lottie-react.esm-BMrLVwC-.js} +1 -1
  159. package/dist/assets/notifications-OcsJQIbe.js +65 -0
  160. package/dist/assets/{open-window-ByvPY_IP.js → open-window-D7sglcpE.js} +1 -1
  161. package/dist/assets/overview-DYkC_WUD.js +12 -0
  162. package/dist/assets/{page-header-9hNVxRoa.js → page-header-Bs0D4BNJ.js} +1 -1
  163. package/dist/assets/{permission-CaRXgle6.js → permission-BXmIoXZx.js} +1 -1
  164. package/dist/assets/{preferences-CUsklTmz.js → preferences-C4gMbsXE.js} +1 -1
  165. package/dist/assets/pt-CSZkEO8C.js +1 -0
  166. package/dist/assets/publish-resource-D-e2YEIQ.js +1 -0
  167. package/dist/assets/{raf-schd.esm-Bnef47nT.js → raf-schd.esm-4I_ky4wN.js} +1 -1
  168. package/dist/assets/{react-beautiful-dnd.esm-CpS0-Aqe.js → react-beautiful-dnd.esm-0qjksHeu.js} +4 -4
  169. package/dist/assets/refType-B6FV0kei.js +1 -0
  170. package/dist/assets/{resource-dialog-CWTUaf-O.js → resource-dialog-D7wZSQZM.js} +11 -11
  171. package/dist/assets/ru-CPz1NiGU.js +1 -0
  172. package/dist/assets/sdk-DbJuRsBZ.js +1 -0
  173. package/dist/assets/{selector-Bgtpcya_.js → selector-CbAq7CNk.js} +2 -2
  174. package/dist/assets/session-uB27dTXO.js +1 -0
  175. package/dist/assets/setup-CfBWQVLM.js +19 -0
  176. package/dist/assets/{shorten-label-DtvVN3_a.js → shorten-label-DwdHohLo.js} +1 -1
  177. package/dist/assets/simple-select-DABb5zZb.js +1 -0
  178. package/dist/assets/{slicedToArray-gtBWtJl8.js → slicedToArray-oTB17pto.js} +1 -1
  179. package/dist/assets/{start-C4tmiEBt.js → start-6oXQjfyP.js} +1 -1
  180. package/dist/assets/{step-actions-Bbj9n3cG.js → step-actions-6E9sNomZ.js} +1 -1
  181. package/dist/assets/{studio-GA30qFJk.js → studio-rQhXFpEr.js} +1 -1
  182. package/dist/assets/{switch-control-86ykn9ge.js → switch-control-BEdKOp6L.js} +1 -1
  183. package/dist/assets/th-DN9Th20c.js +1 -0
  184. package/dist/assets/{toUpper--yB2KjPh.js → toUpper-DUJEYm58.js} +1 -1
  185. package/dist/assets/transfer-I7cX7406.js +16 -0
  186. package/dist/assets/{trim-08Op5xjY.js → trim-Dlp2Wnor.js} +1 -1
  187. package/dist/assets/{uniqBy-DFF7Lt_J.js → uniqBy-BSt4eeqO.js} +1 -1
  188. package/dist/assets/{unsubscribe-Dy2MxVJy.js → unsubscribe-HqTE-lAn.js} +1 -1
  189. package/dist/assets/{url-join-fD9yT9x3.js → url-join-D5NytcuV.js} +1 -1
  190. package/dist/assets/use-mobile-CPfu5RWb.js +1 -0
  191. package/dist/assets/use-mobile-kPLzB4n2.js +1 -0
  192. package/dist/assets/{useAsync-Co-ihL9T.js → useAsync-BYLVsyCe.js} +1 -1
  193. package/dist/assets/{useFormControl-Ef5WMbDC.js → useFormControl-Cb-boaYc.js} +1 -1
  194. package/dist/assets/{useLocalStorage-DElqf361.js → useLocalStorage-DwpjAyRq.js} +1 -1
  195. package/dist/assets/{useSetState-CuEGVXqh.js → useSetState-BZm8P2F-.js} +1 -1
  196. package/dist/assets/useSlot-2GhS7jdI.js +1 -0
  197. package/dist/assets/{useSlotProps-CP7QQ02c.js → useSlotProps-Dxo3NBwX.js} +1 -1
  198. package/dist/assets/{useThemeProps-55Y0sL0H.js → useThemeProps-CK1ghsXu.js} +1 -1
  199. package/dist/assets/{user-center-PWXrG48O.js → user-center-De5_2TQv.js} +1 -1
  200. package/dist/assets/{user-sessions-CbhSRGeB.js → user-sessions-BIa10Xhc.js} +1 -1
  201. package/dist/assets/{util-D3UE9Z7D.js → util-CJcl9xCr.js} +1 -1
  202. package/dist/assets/utils-iop7lDec.js +1 -0
  203. package/dist/assets/vi-ChReTICx.js +1 -0
  204. package/dist/assets/{wrap-locale-CuTZ5aof.js → wrap-locale-CZRJioV-.js} +1 -1
  205. package/dist/assets/zh-BTeqEH4T.js +1 -0
  206. package/dist/assets/zh-tw-CJBhIBvB.js +1 -0
  207. package/dist/index.html +1 -1
  208. package/dist/service-worker.js +1 -1
  209. package/package.json +27 -27
  210. package/dist/assets/Autocomplete-xp0cyiCL.js +0 -1
  211. package/dist/assets/DialogContentText-COq3rw-i.js +0 -1
  212. package/dist/assets/FormControl-BsxgOlTX.js +0 -1
  213. package/dist/assets/FormControlLabel-Dgpj-XRb.js +0 -1
  214. package/dist/assets/FormGroup-b58twP-q.js +0 -1
  215. package/dist/assets/InputAdornment-BiYr4cW6.js +0 -1
  216. package/dist/assets/Link-fX4KUiej.js +0 -1
  217. package/dist/assets/Select-B3cdfIzb.js +0 -2
  218. package/dist/assets/TextField-BWghiml0.js +0 -1
  219. package/dist/assets/ViewColumn-Bz1lupxM.js +0 -1
  220. package/dist/assets/_createAggregator-aO50YhXH.js +0 -1
  221. package/dist/assets/access-control-DplRO33H.js +0 -13
  222. package/dist/assets/add-resource-Pr1QILYG.js +0 -1
  223. package/dist/assets/api-BKvFaP38.js +0 -1
  224. package/dist/assets/ar-C077vlSK.js +0 -1
  225. package/dist/assets/audit-logs-BRW30t3L.js +0 -58
  226. package/dist/assets/branding-CJWvfGxB.js +0 -37
  227. package/dist/assets/confirm-DGKnhqaC.js +0 -7
  228. package/dist/assets/de-3qFVPzmX.js +0 -1
  229. package/dist/assets/domain-BjG22k3m.js +0 -9
  230. package/dist/assets/domain-list-IwhSKnxn.js +0 -15
  231. package/dist/assets/emotion-cache.browser.esm-CuIm0Hab.js +0 -1
  232. package/dist/assets/es-DmfpsaZ4.js +0 -1
  233. package/dist/assets/exchange-passport-Bj5rusMj.js +0 -1
  234. package/dist/assets/fr-BdiBXaSB.js +0 -1
  235. package/dist/assets/hi-BkZt_7Gb.js +0 -1
  236. package/dist/assets/id-Cg1I2efN.js +0 -1
  237. package/dist/assets/index-Bw4jUIg2.js +0 -4
  238. package/dist/assets/index-C2TlC4O6.js +0 -1
  239. package/dist/assets/index-D7VlJHOF.js +0 -1
  240. package/dist/assets/index-DOuTbUzq.js +0 -1
  241. package/dist/assets/invite-CagtO6bL.js +0 -5
  242. package/dist/assets/ja-DgVJN0fA.js +0 -1
  243. package/dist/assets/ko-CXw5-Tyj.js +0 -1
  244. package/dist/assets/localization-BSqs41PK.js +0 -1
  245. package/dist/assets/login-wunPRpnb.js +0 -1
  246. package/dist/assets/logo-uploader-DESUa9bt.js +0 -133
  247. package/dist/assets/notifications-0BDelSaD.js +0 -65
  248. package/dist/assets/overview-NyLZyTzQ.js +0 -12
  249. package/dist/assets/pt-C5FGXBS-.js +0 -1
  250. package/dist/assets/publish-resource-7Yi_94S6.js +0 -1
  251. package/dist/assets/redux-CluOqhW1.js +0 -1
  252. package/dist/assets/refType-BNRJ1Xey.js +0 -1
  253. package/dist/assets/ru-Dk6dsYPJ.js +0 -1
  254. package/dist/assets/sdk-DNBFu3Vd.js +0 -1
  255. package/dist/assets/session-SThzCGTr.js +0 -1
  256. package/dist/assets/setup-CWvIujH2.js +0 -19
  257. package/dist/assets/simple-select-DE145g5Z.js +0 -1
  258. package/dist/assets/th-K6XbH1UY.js +0 -1
  259. package/dist/assets/transfer-BqyfwC5R.js +0 -16
  260. package/dist/assets/use-mobile-Bdr2kObC.js +0 -1
  261. package/dist/assets/use-mobile-BjsDuAgv.js +0 -1
  262. package/dist/assets/useSlot-C9LBI1FF.js +0 -1
  263. package/dist/assets/vi-CgCRvPul.js +0 -1
  264. package/dist/assets/zh-EJ-gpgMc.js +0 -1
  265. package/dist/assets/zh-tw-OB9rgk8B.js +0 -1
@@ -1,4 +1,4 @@
1
- import{P as l,r as c,j as n,B as h,bn as $,a5 as A,dH as G,fr as Q,ad as U,aH as L,n as Y,di as J,cQ as Z,a3 as v}from"./index-C7otKf8F.js";import{d as ee}from"./Done-DEI256sV.js";import{C as te}from"./Google-D_mc2y32.js";import{T as ne}from"./TextField-BWghiml0.js";import{R as re,F as oe,L as se}from"./logo-uploader-DESUa9bt.js";const N={description:l.string,editing:l.bool,onChange:l.func,required:l.bool,value:l.any,componentProps:l.object,render:l.func,renderFormItem:l.func};function S({editing:o,value:r,onChange:a}){const[d,u]=c.useState(!1),m=c.useRef(),p=c.useRef(r);c.useEffect(()=>{let s=null;return o&&(s=setTimeout(()=>{u(!0)},50)),()=>{clearTimeout(s)}},[o]);const C=s=>{p.current=s,a(s)},b=()=>{u(!1),a(p.current)},I=n.jsx(h,{className:"form-item-input slot",px:1,children:n.jsxs(h,{display:"flex",alignItems:"center",children:[r,r!=="auto"&&n.jsx("div",{style:{marginLeft:4,backgroundColor:r,width:"1em",height:"1em",borderRadius:"0.2em"}})]})}),f=n.jsxs(h,{display:"flex",flexGrow:1,alignItems:"center",height:"40px",onKeyDown:b,children:[n.jsx(h,{display:"flex",alignItems:"center",onClick:()=>u(!0),children:n.jsx("div",{ref:m,style:{flexShrink:0,marginLeft:"8px",backgroundColor:r,width:"32px",height:"32px",boxSizing:"border-box",borderRadius:"8px",border:"1px solid #eee",cursor:r==="auto"?"default":"pointer"}})}),n.jsx($,{open:d,anchorEl:m.current,onClose:()=>u(!1),anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:n.jsx(te,{color:r,onChange:s=>C(s.hex)})})]});return o?f:I}S.propTypes=N;function T({editing:o,description:r,value:a,onChange:d,componentProps:u,...m}){const{placeholder:p}=u,C=c.useRef(a),{t:b}=c.useContext(A),I=s=>{s.key==="Enter"&&d(C.current,"confirm")},f=s=>{C.current=s,d(s)};return o?n.jsx(ne,{style:{flex:1},fullWidth:!0,value:a,onChange:s=>{s.persist(),f(s.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:r||p,onKeyDown:I,...m}):n.jsx(h,{px:1,className:"form-item-input slot",children:a||n.jsx("span",{className:"placeholder",children:b("common.requiredInputPlaceholder",{name:r||p})})})}T.propTypes=N;T.defaultProps={componentProps:{}};function V({editing:o,value:r,onChange:a,componentProps:d,...u}){const{blocklet:m}=d,p=r==="auto"?G.getPassportColorFromDid(m.appDid):r;return n.jsxs(h,{display:"flex",alignItems:"center",children:[n.jsx("div",{style:{width:96,marginRight:12},dangerouslySetInnerHTML:{__html:Q({title:"Owner",issuer:U.getDisplayName(m),issuerDid:m.appDid,ownerName:"Your Name",ownerDid:m.appDid,preferredColor:r||"auto"})}}),n.jsx(S,{...u,editing:o,value:o?p:r,onChange:a,componentProps:d})]})}V.propTypes={...N,componentProps:l.shape({blocklet:l.object.isRequired}).isRequired};V.defaultProps={};const ie=Z`
1
+ import{P as l,r as c,j as n,B as h,bn as A,a6 as G,dI as H,fr as U,ae as Y,aI as L,n as J,dh as Q,cT as Z,a4 as v}from"./index-dEKXkm4C.js";import{d as ee}from"./Done-BdhX20sl.js";import{C as te}from"./Google-qzzGwT5f.js";import{T as ne}from"./TextField-CO9VOqaC.js";import{R as re,F as oe,L as se}from"./logo-uploader-cFGQ2Gvc.js";const E={description:l.string,editing:l.bool,onChange:l.func,required:l.bool,value:l.any,componentProps:l.object,render:l.func,renderFormItem:l.func};function N({editing:o,value:r,onChange:a}){const[d,u]=c.useState(!1),m=c.useRef(),p=c.useRef(r);c.useEffect(()=>{let s=null;return o&&(s=setTimeout(()=>{u(!0)},50)),()=>{clearTimeout(s)}},[o]);const C=s=>{p.current=s,a(s)},b=()=>{u(!1),a(p.current)},I=n.jsx(h,{className:"form-item-input slot",px:1,children:n.jsxs(h,{display:"flex",alignItems:"center",children:[r,r!=="auto"&&n.jsx("div",{style:{marginLeft:4,backgroundColor:r,width:"1em",height:"1em",borderRadius:"0.2em"}})]})}),f=n.jsxs(h,{display:"flex",flexGrow:1,alignItems:"center",height:"40px",onKeyDown:b,children:[n.jsx(h,{display:"flex",alignItems:"center",onClick:()=>u(!0),children:n.jsx("div",{ref:m,style:{flexShrink:0,marginLeft:"8px",backgroundColor:r,width:"32px",height:"32px",boxSizing:"border-box",borderRadius:"8px",border:"1px solid #eee",cursor:r==="auto"?"default":"pointer"}})}),n.jsx(A,{open:d,anchorEl:m.current,onClose:()=>u(!1),anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:n.jsx(te,{color:r,onChange:s=>C(s.hex)})})]});return o?f:I}N.propTypes=E;function S({editing:o,description:r,value:a,onChange:d,componentProps:u,...m}){const{placeholder:p}=u,C=c.useRef(a),{t:b}=c.useContext(G),I=s=>{s.key==="Enter"&&d(C.current,"confirm")},f=s=>{C.current=s,d(s)};return o?n.jsx(ne,{style:{flex:1},fullWidth:!0,value:a,onChange:s=>{s.persist(),f(s.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:r||p,onKeyDown:I,...m}):n.jsx(h,{px:1,className:"form-item-input slot",children:a||n.jsx("span",{className:"placeholder",children:b("common.requiredInputPlaceholder",{name:r||p})})})}S.propTypes=E;S.defaultProps={componentProps:{}};function V({editing:o,value:r,onChange:a,componentProps:d,...u}){const{blocklet:m}=d,p=r==="auto"?H.getPassportColorFromDid(m.appDid):r;return n.jsxs(h,{display:"flex",alignItems:"center",children:[n.jsx("div",{style:{width:96,marginRight:12},dangerouslySetInnerHTML:{__html:U({title:"Owner",issuer:Y.getDisplayName(m),issuerDid:m.appDid,ownerName:"Your Name",ownerDid:m.appDid,preferredColor:r||"auto"})}}),n.jsx(N,{...u,editing:o,value:o?p:r,onChange:a,componentProps:d})]})}V.propTypes={...E,componentProps:l.shape({blocklet:l.object.isRequired}).isRequired};V.defaultProps={};const ie=Z`
2
2
  0%, 100% {
3
3
  transform: scale(1) translateX(0);
4
4
  }
@@ -8,4 +8,4 @@ import{P as l,r as c,j as n,B as h,bn as $,a5 as A,dH as G,fr as Q,ad as U,aH as
8
8
  25%, 75% {
9
9
  transform: scale(1.1) translateX(3px);
10
10
  }
11
- `,ae={input:T,color:S,passport:V,uploader:o=>n.jsx(se,{...o.componentProps})};function le(o,{editing:r=!1}){const{componentType:a="input",render:d,renderFormItem:u}=o;return r&&u?u:!r&&d?d:ae[a==null?void 0:a.toLowerCase()]}function O({schema:o,loading:r,value:a,defaultValue:d,onChange:u,style:m,disabled:p}){const C=Object.prototype.toString.call(a)==="[object Object]",[b,I]=c.useState([]),[f,s]=c.useState(C?a:d),_=c.useMemo(()=>o.length===1,[o]),g=c.useCallback(e=>b.find(t=>t.key===e),[b]);c.useEffect(()=>{var e;_&&((e=o[0])!=null&&e.required)&&I([{key:o[0].key,editing:!0}])},[o,_]);const P=c.useCallback(e=>{I(t=>t.find(i=>i.key===e.key)?t.map(i=>i.key===e.key?e:{...i}):[e].concat(t))},[]),w=c.useCallback((e,t,x)=>{const{key:i,secure:R}=e,y=g(i)??{...e};y.editing=!0;const j=f[i]!==t;y.edited=t&&y.initialValue!==t,y.initialValue=d[i];const k={...f,[i]:t};j&&s(k),u({[i]:t},{allValues:k,action:x,currentItem:e}),x==="confirm"&&R&&s({...f,[i]:"__encrypted__"}),x==="confirm"&&(y.initialValue=f[i]),["confirm","cancel"].includes(x)&&(y.editing=!1,y.edited=!1),P(y)},[d,f,u,P,g]);function z(e,{editing:t=!1}){const{key:x}=e,i=C?a[x]:f[x];return i==="__encrypted__"?t?"":"******":i}const F=c.useCallback(e=>{const t=g(e.key);t&&w(e,t.initialValue,"cancel")},[g,w]),D=c.useCallback(e=>{const t=g(e.key);!t||!t.edited||(t.shaking=!0,P(t),setTimeout(()=>{t.shaking=!1,P(t)},500))},[g,P]),K=c.useCallback(e=>{const t=g(e.key);!t||!t.edited?F(e):D(e)},[g,D,F]);return n.jsx(ce,{className:"form",style:m,children:o==null?void 0:o.map(e=>{const{key:t,description:x,required:i,solo:R=!1,hidden:y=!1,componentProps:q={}}=e;if(y)return null;const j=g(t),{editing:k,shaking:B}=j??{},E=z(e,{editing:k}),H=le(e,{editing:k}),M={inputProps:{"data-cy":"schema-form-item-component"},key:t,description:x,editing:k,value:E,onChange:(W,X="change")=>w(e,W,X),componentProps:q,onBlur:()=>K(e)};return n.jsxs(h,{className:"form-item",children:[!R&&n.jsxs(h,{className:"form-item-label",style:{color:i&&!E?"#ff0000":"#333"},children:[x,i&&n.jsx(re,{})]}),n.jsxs(h,{className:"form-item-body",children:[n.jsx(h,{className:"form-item-input","data-cy":"schema-form-item-edit",sx:{textAlign:R?"center":"left"},style:{cursor:"text"},onClick:()=>{p||j!=null&&j.edited||w(e,f[t],"edit")},children:n.jsx(H,{...M})}),!R&&n.jsx(h,{className:"form-item-action",style:{marginLeft:0},children:k?n.jsxs(n.Fragment,{children:[j.edited?n.jsx(L,{"data-cy":"schema-form-item-confirm",onClick:()=>{w(e,E,"confirm")},disabled:p||r,sx:{animation:B?`${ie} 0.5s linear`:"none"},style:{paddingRight:4},size:"large",children:r?n.jsx(Y,{size:24}):n.jsx(ee,{})}):null,n.jsx(L,{"data-cy":"schema-form-item-cancel",onClick:()=>F(e),style:{paddingLeft:j.edited?4:8},disabled:p||r,size:"large",children:n.jsx(J,{})})]}):null})]})]},t)})})}O.propTypes={schema:l.array.isRequired,loading:l.bool,onChange:l.func.isRequired,value:l.object,defaultValue:l.object,style:l.object,disabled:l.bool};O.defaultProps={loading:!1,value:void 0,defaultValue:{},style:{},disabled:!1};const ce=v(oe)``;export{O as S};
11
+ `,ae={input:S,color:N,passport:V,uploader:o=>n.jsx(se,{...o.componentProps})};function le(o,{editing:r=!1}){const{componentType:a="input",render:d,renderFormItem:u}=o;return r&&u?u:!r&&d?d:ae[a==null?void 0:a.toLowerCase()]}function O({schema:o,loading:r,value:a,defaultValue:d,onChange:u,style:m,disabled:p}){const C=Object.prototype.toString.call(a)==="[object Object]",[b,I]=c.useState([]),[f,s]=c.useState(C?a:d),_=c.useMemo(()=>o.length===1,[o]),g=c.useCallback(e=>b.find(t=>t.key===e),[b]);c.useEffect(()=>{var e;_&&((e=o[0])!=null&&e.required)&&I([{key:o[0].key,editing:!0}])},[o,_]);const P=c.useCallback(e=>{I(t=>t.find(i=>i.key===e.key)?t.map(i=>i.key===e.key?e:{...i}):[e].concat(t))},[]),w=c.useCallback((e,t,x)=>{const{key:i,secure:R}=e,y=g(i)??{...e};y.editing=!0;const j=f[i]!==t;y.edited=t&&y.initialValue!==t,y.initialValue=d[i];const k={...f,[i]:t};j&&s(k),u({[i]:t},{allValues:k,action:x,currentItem:e}),x==="confirm"&&R&&s({...f,[i]:"__encrypted__"}),x==="confirm"&&(y.initialValue=f[i]),["confirm","cancel"].includes(x)&&(y.editing=!1,y.edited=!1),P(y)},[d,f,u,P,g]);function z(e,{editing:t=!1}){const{key:x}=e,i=C?a[x]:f[x];return i==="__encrypted__"?t?"":"******":i}const F=c.useCallback(e=>{const t=g(e.key);t&&w(e,t.initialValue,"cancel")},[g,w]),D=c.useCallback(e=>{const t=g(e.key);!t||!t.edited||(t.shaking=!0,P(t),setTimeout(()=>{t.shaking=!1,P(t)},500))},[g,P]),K=c.useCallback(e=>{const t=g(e.key);!t||!t.edited?F(e):D(e)},[g,D,F]);return n.jsx(ce,{className:"form",style:m,children:o==null?void 0:o.map(e=>{const{key:t,description:x,required:i,solo:R=!1,hidden:y=!1,componentProps:q={}}=e;if(y)return null;const j=g(t),{editing:k,shaking:B}=j??{},T=z(e,{editing:k}),M=le(e,{editing:k}),W={inputProps:{"data-cy":"schema-form-item-component"},key:t,description:x,editing:k,value:T,onChange:(X,$="change")=>w(e,X,$),componentProps:q,onBlur:()=>K(e)};return n.jsxs(h,{className:"form-item",children:[!R&&n.jsxs(h,{className:"form-item-label",style:{color:i&&!T?"#ff0000":"#333"},children:[x,i&&n.jsx(re,{})]}),n.jsxs(h,{className:"form-item-body",children:[n.jsx(h,{className:"form-item-input","data-cy":"schema-form-item-edit",sx:{textAlign:R?"center":"left"},style:{cursor:"text"},onClick:()=>{p||j!=null&&j.edited||w(e,f[t],"edit")},children:n.jsx(M,{...W})}),!R&&n.jsx(h,{className:"form-item-action",style:{marginLeft:0},children:k?n.jsxs(n.Fragment,{children:[j.edited?n.jsx(L,{"data-cy":"schema-form-item-confirm",onClick:()=>{w(e,T,"confirm")},disabled:p||r,sx:{animation:B?`${ie} 0.5s linear`:"none"},style:{paddingRight:4},size:"large",children:r?n.jsx(J,{size:24}):n.jsx(ee,{})}):null,n.jsx(L,{"data-cy":"schema-form-item-cancel",onClick:()=>F(e),style:{paddingLeft:j.edited?4:8},disabled:p||r,size:"large",children:n.jsx(Q,{})})]}):null})]})]},t)})})}O.propTypes={schema:l.array.isRequired,loading:l.bool,onChange:l.func.isRequired,value:l.object,defaultValue:l.object,style:l.object,disabled:l.bool};O.defaultProps={loading:!1,value:void 0,defaultValue:{},style:{},disabled:!1};const ce=v(oe)``;export{O as S};
@@ -1,4 +1,4 @@
1
- var Ie=n=>{throw TypeError(n)};var te=(n,t,e)=>t.has(n)||Ie("Cannot "+e);var u=(n,t,e)=>(te(n,t,"read from private field"),e?e.call(n):t.get(n)),U=(n,t,e)=>t.has(n)?Ie("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),I=(n,t,e,r)=>(te(n,t,"write to private field"),r?r.call(n,e):t.set(n,e),e),T=(n,t,e)=>(te(n,t,"access private method"),e);var ne=(n,t,e,r)=>({set _(o){I(n,t,o,e)},get _(){return u(n,t,r)}});import{c5 as Ot,c as L,w as j,ao as _t,a4 as Rt,X as It,eL as Ye,u as Lt,l as Dt,bJ as Qe,bI as Nt,r as c,a1 as wt,a2 as yt,j as i,c4 as vt,d4 as xt,aH as kt,bx as bt,B as P,i as Bt,eM as qe,D as Ft,k as Le,a as $e,cH as Ut,eN as Mt,cG as Pt,T as $,az as Ht,a6 as De,n as Vt,eO as Ne,U as jt,b as Kt}from"./index-C7otKf8F.js";import{d as Gt}from"./OpenInNew-YMhtYwHE.js";import{i as et}from"./index-CxwdZ5FQ.js";import{S as zt}from"./Stack-BO9M0PIW.js";import{L as se}from"./Link-fX4KUiej.js";import{S as Wt}from"./Skeleton-D0-q_hvU.js";import{d as Xt}from"./HelpOutline-BoXfs1w7.js";import{S as we}from"./index-DEcPGLHC.js";import{D as Jt}from"./DialogContentText-COq3rw-i.js";import{T as Zt}from"./TextField-BWghiml0.js";const Yt=Object.freeze({AUTH:"auth"}),me=Object.freeze({OWNER:"owner",ADMIN:"admin",MEMBER:"member",GUEST:"guest"}),f=Object.freeze({...me,CI:"ci",CERTIFICATE:"certificate",BLOCKLET_OWNER:"blocklet-owner",BLOCKLET_ADMIN:"blocklet-admin",BLOCKLET_MEMBER:"blocklet-member",BLOCKLET_SDK:"blocklet-sdk",EXTERNAL_BLOCKLET_CONTROLLER:"external-blocklet-controller",EXTERNAL_BLOCKLETS_MANAGER:"external-blocklets-manager"}),Qt=Object.freeze({BLOCKLET_GUEST:"blocklet-guest"}),tt=[f.BLOCKLET_OWNER,f.BLOCKLET_ADMIN,f.BLOCKLET_MEMBER,f.BLOCKLET_SDK],qt=n=>n&&tt.includes(n),$t=[f.BLOCKLET_OWNER,f.BLOCKLET_ADMIN,f.BLOCKLET_MEMBER,f.BLOCKLET_SDK,Qt.BLOCKLET_GUEST],en=n=>n&&$t.includes(n),tn={USER:"user",OWNERSHIP_NFT:"ownership_nft",BLOCKLET_USER:"blocklet_user",BLOCKLET_CONTROLLER:"blocklet_controller"},nn={roles:Object.freeze([{name:f.OWNER,title:"Owner",description:"Has full administrative access to the Blocklet Server",passport:!0},{name:f.ADMIN,title:"Admin",description:"Has full permissions to manage blocklet and Blocklet Server such as install/remove/start/stop blocklet, manage blocklet URL mapping and certificates, manage blocklet team, manage node integrations and access keys, upgrade node to a new version",passport:!0},{name:f.MEMBER,title:"Member",description:"Has permissions to manage blocklets, such as install/remove/start/stop blocklet, manage blocklet URL mapping and certificates",passport:!0},{name:f.GUEST,title:"Guest",description:"Has all read permissions on Blocklet Server",passport:!0},{name:f.CI,title:"CI",description:"Deploy blocklet to Blocklet Server",passport:!0,noHuman:!0},{name:f.CERTIFICATE,title:"Certificate",description:"Manage https certificates for blocklets on the Blocklet Server",passport:!0,noHuman:!0},{name:f.BLOCKLET_OWNER,title:"Blocklet Owner"},{name:f.BLOCKLET_ADMIN,title:"Blocklet Admin"},{name:f.BLOCKLET_MEMBER,title:"Blocklet Member"},{name:f.BLOCKLET_SDK,title:"Blocklet SDK"},{name:f.EXTERNAL_BLOCKLET_CONTROLLER,title:"External Blocklet Controller"},{name:f.EXTERNAL_BLOCKLETS_MANAGER,title:"External Blocklets Manager",description:"Manage external blocklets in the Blocklet Server",passport:!0,noHuman:!0}]),permissions:Object.freeze([{name:"query_node",description:"View node data, include dashboard and node settings, log stream for both Blocklet Server and blocklets"},{name:"mutate_node",description:"Change node settings, upgrade node to a new version"},{name:"query_session",description:"Get data from a long running session"},{name:"mutate_session",description:"Start/update/end a long running session"},{name:"query_accessKey",description:"View access keys for Blocklet Server"},{name:"mutate_accessKey",description:"Manage access keys for Blocklet Server, such as create/update/delete"},{name:"query_team",description:"View team data(members/roles/permissions) for Blocklet Server and blocklets"},{name:"mutate_team",description:"Manage team data(members/roles/permissions) for Blocklet Server and blocklets"},{name:"query_blocklets",description:"View store and installed blocklets, including blocklet runtime configuration, domains and urls"},{name:"mutate_blocklets",description:"Perform state changing actions on blocklets, such as install/upgrade/config/start/stop/remove"},{name:"query_router",description:"View sites, URL mapping and certificates in service gateway"},{name:"mutate_router",description:"Manage sites, URL mapping and certificates in service gateway"},{name:"query_certificate",description:"View certificates in service gateway"},{name:"mutate_certificate",description:"Manage certificates in service gateway"},{name:"query_notification",description:"View notifications"},{name:"mutate_notification",description:"Manage notifications, such as mark notifications as read"},{name:"query_webhook",description:"View integrations"},{name:"mutate_webhook",description:"Manage integrations"},{name:"query_blocklet",description:"View a blocklet, including blocklet runtime configuration, domains and urls"},{name:"mutate_blocklet",description:"Perform state changing actions on a blocklet, such as upgrade/config/start/stop"}]),grants:Object.freeze({[f.GUEST]:["query_blocklets","query_router","query_webhook","query_notification","query_team","query_accessKey","query_node","query_session"],[f.MEMBER]:[f.GUEST,"mutate_blocklets","mutate_router","mutate_notification","mutate_session"],[f.ADMIN]:[f.MEMBER,"mutate_team","mutate_webhook","mutate_accessKey","mutate_node","mutate_certificate"],[f.OWNER]:[me.ADMIN],[f.CI]:["query_blocklets","mutate_blocklets"],[f.CERTIFICATE]:["query_certificate","mutate_certificate"],[f.BLOCKLET_SDK]:["query_team","mutate_team","query_blocklet"],[f.BLOCKLET_OWNER]:[f.BLOCKLET_ADMIN],[f.BLOCKLET_ADMIN]:[f.BLOCKLET_MEMBER,"mutate_team","mutate_blocklet","mutate_notification"],[f.BLOCKLET_MEMBER]:["query_team","query_blocklet","query_notification"],[f.EXTERNAL_BLOCKLET_CONTROLLER]:["query_blocklets","mutate_blocklets"],[f.EXTERNAL_BLOCKLETS_MANAGER]:["query_blocklets","mutate_blocklets"]})},ye=24*60*60*1e3,rn={NOTIFICATION_CREATE:"notification.create",NOTIFICATION_BLOCKLET_CREATE:"notification.blockletCreate",ROUTING_UPDATED:"routing.updated",NODE_UPDATED:"node.updated",NODE_MAINTAIN_PROGRESS:"node.upgrade.progress",NODE_STARTED:"node.started",NODE_STOPPED:"node.stopped",NODE_ADDED_OWNER:"node.addedOwner",NODE_RUNTIME_INFO:"node.runtimeInfo",BLOCKLETS_RUNTIME_INFO:"node.blockletsRuntimeInfo",DOMAIN_STATUS:"domain.status",CERT_ADDED:"cert.added",CERT_ISSUED:"cert.issued",CERT_UPDATED:"cert.updated",CERT_REMOVED:"cert.removed",CERT_ERROR:"cert.error",RELOAD_GATEWAY:"gateway.reload"},on=Object.freeze({OWNER:"owner",ADMIN:"admin",INVITED:"invited",ALL:"all"}),ve="https://store.blocklet.dev",xe="https://dev.store.blocklet.dev",sn="https://main.abtnetwork.io/api/",an=Object.freeze({DERIVED:"derived",WALLET:"wallet"}),cn={STATUS:{PROGRESS:null,SUCCEEDED:0,FAILED:1},TIMEOUT_HOURS:6,STRATEGY:{AUTO:0,MANUAL:1},JOB:{INTERVAL:2*60*60}},ln={STATUS:{PROGRESS:null,SUCCEEDED:0,FAILED:1},TIMEOUT_HOURS:6,STRATEGY:{AUTO:0,MANUAL:1},JOB:{INTERVAL:2*60*60}},nt=10,un=86400/nt,pn={SYNC_LIMIT:3},dn=[{text:"Plain Text",value:"text/plain"},{text:"JSON",value:"application/json"},{text:"XML",value:"application/xml"},{text:"HTML Document",value:"text/html"},{text:"YAML",value:"application/x-yaml"},{text:"TOML",value:"application/toml"},{text:"CSS",value:"text/css"},{text:"JavaScript",value:"application/javascript"},{text:"CSV",value:"text/csv"},{text:"Markdown",value:"text/markdown"},{text:"SVG",value:"image/svg+xml"}],En=30,Cn=Object.freeze({created:0,selected:10,connected:20,timeout:25,paid:30,nftMinted:35,allocated:40,consuming:46,installed:50,overdue:60,canceled:65,terminated:70,transferred:90}),fn="default",hn="public",mn="invited-only",An="owner-only",Sn="admin-only",gn="simple-cors",Tn="security-header",On="simple-cors-and-security-header";var k=Object.freeze({NODE_MODES:Object.freeze({PRODUCTION:"production",DEBUG:"debug",MAINTENANCE:"maintenance",SERVERLESS:"serverless"}),DEFAULT_DESCRIPTION:"Web Interface to manage your Blocklet Server",NODE_MAINTAIN_PROGRESS:Object.freeze({SETUP:"setup",INSTALLING:"installing",VERIFYING:"verifying",RESTARTING:"restarting",CLEANUP:"cleanup",COMPLETE:"complete",ROLLBACK:"rollback"}),VC_TYPE_BLOCKLET_PURCHASE:"BlockletPurchaseCredential",VC_TYPE_NODE_PASSPORT:"ABTNodePassport",VC_TYPE_GENERAL_PASSPORT:"NFTPassport",NFT_TYPE_SERVER_OWNERSHIP:"BlockletServerOwnershipNFT",NFT_TYPE_SERVERLESS:"BlockletServerServerlessNFT",NODE_PACKAGE_NAME:"@abtnode/cli",NODE_COMMAND_NAME:"abtnode",NODE_DATA_DIR_NAME:"_abtnode",USER_AVATAR_DIR:"/.assets/avatar",USER_AVATAR_URL_PREFIX:"bn://avatar",USER_AVATAR_PATH_PREFIX:"/user/avatar",USER_MAX_INVITE_DEPTH:8,PROCESS_NAME_DAEMON:"abt-node-daemon",PROCESS_NAME_PROXY:"abt-node-db-hub",PROCESS_NAME_UPDATER:"abt-node-updater",PROCESS_NAME_SERVICE:"abt-node-service",PROCESS_NAME_ROUTER:"abt-node-router",PROCESS_NAME_LOG_ROTATE:"abt-node-log-rotate",PROCESS_NAME_EVENT_HUB:"abt-node-event-hub",NODE_REGISTER_URL:"https://install.arcblock.io/",WEB_WALLET_URL:"https://web.abtwallet.io",BLOCKLET_STORE_URL:ve,BLOCKLET_STORE_URL_DEV:xe,BLOCKLET_STORE_DID:"z8ia29UsENBg6tLZUKi2HABj38Cw1LmHZocbQ",BLOCKLET_STORE_API_PREFIX:"/api",BLOCKLET_STORE_API_BLOCKLET_PREFIX:"/api/blocklets",BLOCKLET_STORE_META_PATH:"/api/store.json",BLOCKLET_STORE:{id:"zNKqX7D8ZAYa77HgzpoFfnV3BFbcmSRrE9aT",name:"Official Store",description:"ArcBlock official blocklet registry",url:ve,logoUrl:"/logo.png",maintainer:"arcblock"},BLOCKLET_STORE_DEV:{id:"zNKmfUatDhzfMVACfr3u97eqndj8f1yXXw3m",name:"Dev Store",description:"ArcBlock dev registry that contains demo and example blocklets",url:xe,maintainer:"arcblock",logoUrl:"/logo.png"},APP_STRUCT_VERSION:"2",DEFAULT_DID_REGISTRY:"https://registry.abtnet.io",DEFAULT_SLP_DOMAIN:"slp.abtnet.io",DEFAULT_DID_DOMAIN:"did.abtnet.io",DEFAULT_IP_DOMAIN:"*.ip.abtnet.io",DEFAULT_IP_DOMAIN_SUFFIX:"ip.abtnet.io",DEFAULT_WILDCARD_CERT_HOST:"https://releases.arcblock.io/",DEFAULT_NFT_DOMAIN_URL:"https://domain.didlabs.org/",DEFAULT_CERTIFICATE_EMAIL:"certs@arcblock.io",CONFIG_FILENAME:"config.yml",CONFIG_FILENAME_OLD:"abtnode.yml",CONFIG_FOLDER_NAME:".blocklet-server",CONFIG_FOLDER_NAME_OLD:".abtnode",EXPORTED_FOLDER_NAME:"exported_blocklet_server",StatusCode:Object.freeze({ok:0,blocklet_not_found:1,blocklet_not_purchased:2,forbidden:403,internal:500,timeout:504}),IP:new RegExp("-(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\-(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}"),DOMAIN_FOR_IP_SITE:"",DOMAIN_FOR_IP_SITE_REGEXP:"~^\\d+.\\d+.\\d+.\\d+$",DOMAIN_FOR_DEFAULT_SITE:"*",DOMAIN_FOR_INTERNAL_SITE:"127.0.0.1",NAME_FOR_WELLKNOWN_SITE:"wellknown",WELLKNOWN_PATH_PREFIX:"/.well-known",WELLKNOWN_ACME_CHALLENGE_PREFIX:"/.well-known/acme-challenge",WELLKNOWN_DID_RESOLVER_PREFIX:"/.well-known/did.json",WELLKNOWN_PING_PREFIX:"/.well-known/ping",WELLKNOWN_ANALYTICS_PREFIX:"/.well-known/analytics",WELLKNOWN_SERVICE_PATH_PREFIX:"/.well-known/service",WELLKNOWN_BLOCKLET_ADMIN_PATH:"/.well-known/service/admin",WELLKNOWN_BLOCKLET_HEALTH_PATH:"/.well-known/service/health",WELLKNOWN_BLOCKLET_LOGO_PATH:"/.well-known/service/blocklet/logo",SLOT_FOR_IP_DNS_SITE:"888-888-888-888",DEFAULT_ADMIN_PATH:"/admin",WELLKNOWN_SERVER_ADMIN_PATH:"/.well-known/server/admin",DEFAULT_SERVICE_PATH:"/.abtnode/service",DEFAULT_HTTP_PORT:80,DEFAULT_HTTPS_PORT:443,MAX_UPLOAD_FILE_SIZE:500,DEFAULT_DAEMON_PORT:8089,MAX_NGINX_WORKER_CONNECTIONS:10240,BLOCKLET_PROXY_PATH_PREFIX:"/.blocklet/proxy",BLOCKLET_SITE_GROUP_SUFFIX:".blocklet-domain-group",DAY_IN_MS:ye,DAEMON_MAX_MEM_LIMIT_IN_MB:800,PROXY_MAX_MEM_LIMIT_IN_MB:800,BLOCKLET_MAX_MEM_LIMIT_IN_MB:800,CERTIFICATE_EXPIRES_OFFSET:10*ye,ROUTING_RESPONSE_TYPES:dn,ROUTING_RULE_TYPES:Object.freeze({NONE:"none",DAEMON:"daemon",SERVICE:"service",BLOCKLET:"blocklet",REDIRECT:"redirect",GENERAL_REWRITE:"rewrite",GENERAL_PROXY:"general_proxy",DIRECT_RESPONSE:"direct_response",COMPONENT:"component"}),ROLES:me,SERVER_ROLES:f,BLOCKLET_ROLES:tt,isBlockletRole:qt,isBlockletMultipleTenantRole:en,AUTH_CERT_TYPE:tn,RBAC_CONFIG:nn,genPermissionName:(n,t="access")=>`${t}_${n.replace("_","-")}`,PASSPORT_STATUS:{VALID:"valid",REVOKED:"revoked"},NODE_SERVICES:Yt,DISK_ALERT_THRESHOLD_PERCENT:80,EVENTS:rn,WHO_CAN_ACCESS:on,WHO_CAN_ACCESS_PREFIX_ROLES:"roles:",GATEWAY_REQ_LIMIT:Object.freeze({min:10,max:100}),STORE_DETAIL_PAGE_PATH_PREFIX:"/blocklets",MAX_USER_PAGE_SIZE:100,SERVER_STATUS:{RUNNING:1,STOPPED:2,START_FROM_CRASH:3},LOG_RETAIN_IN_DAYS:60,BLOCKLET_INSTALL_TYPE:{STORE:"store",URL:"url",DEV:"dev",CREATE:"create",RESTORE:"restore"},ROUTER_CACHE_GROUPS:{blockletProxy:{minSize:"1m",maxSize:"2g",period:"30d"}},MAIN_CHAIN_ENDPOINT:sn,USER_TYPE:an,SERVER_CACHE_TTL:300*1e3,BLOCKLET_CACHE_TTL:3600*1e3,SESSION_CACHE_TTL:3600,SESSION_TTL:7*86400,BACKUPS:cn,CHECK_UPDATE:ln,MONITOR_HISTORY_LENGTH:un,MONITOR_RECORD_INTERVAL_SEC:nt,INSTALL_ACTIONS:{INSTALL:"install",INSTALL_COMPONENT:"installComponent",UPGRADE_COMPONENT:"upgradeComponent"},COPYRIGHT_OWNER:"ArcBlock",FEDERATED:pn,SESSION_TOKEN_STORAGE_KEY:"login_token",REFRESH_TOKEN_STORAGE_KEY:"refresh_token",SERVERLESS_BLOCKLET_DATA_RETENTION_DAYS:En,LAUNCH_SESSION_STATUS:Cn,UNOWNED_DID:"z".repeat(35),STUDIO_CONNECTED_STORE:"studio_connected_store",STUDIO_CONNECTED_AND_DEVELOPED:"studio_connected_and_developed",VERIFY_CODE_LENGTH:6,VERIFY_CODE_TTL:30*60*1e3,VERIFY_SEND_TTL:1*60*1e3,SECURITY_RULE_DEFAULT_ID:fn,ACCESS_POLICY_PUBLIC:hn,ACCESS_POLICY_INVITED_ONLY:mn,ACCESS_POLICY_OWNER_ONLY:An,ACCESS_POLICY_ADMIN_ONLY:Sn,RESPONSE_HEADER_POLICY_SIMPLE_CORS:gn,RESPONSE_HEADER_POLICY_SECURITY_HEADER:Tn,RESPONSE_HEADER_POLICY_SIMPLE_CORS_AND_SECURITY_HEADER:On});/*! js-cookie v3.0.5 | MIT */function Q(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)n[r]=e[r]}return n}var _n={read:function(n){return n[0]==='"'&&(n=n.slice(1,-1)),n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(n){return encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function ie(n,t){function e(o,a,s){if(!(typeof document>"u")){s=Q({},t,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var d="";for(var l in s)s[l]&&(d+="; "+l,s[l]!==!0&&(d+="="+s[l].split(";")[0]));return document.cookie=o+"="+n.write(a,o)+d}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var a=document.cookie?document.cookie.split("; "):[],s={},d=0;d<a.length;d++){var l=a[d].split("="),C=l.slice(1).join("=");try{var E=decodeURIComponent(l[0]);if(s[E]=n.read(C,E),o===E)break}catch{}}return o?s[o]:s}}return Object.create({set:e,get:r,remove:function(o,a){e(o,"",Q({},a,{expires:-1}))},withAttributes:function(o){return ie(this.converter,Q({},this.attributes,o))},withConverter:function(o){return ie(Q({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(n)}})}var J=ie(_n,{path:"/"}),y,g,O,H,Z,V,h,ae,x,rt,ce,le,ue,ot,pe;class Rn extends Map{constructor(e={}){super();U(this,h);U(this,y,0);U(this,g,new Map);U(this,O,new Map);U(this,H);U(this,Z);U(this,V);if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if(typeof e.maxAge=="number"&&e.maxAge===0)throw new TypeError("`maxAge` must be a number greater than 0");I(this,H,e.maxSize),I(this,Z,e.maxAge||Number.POSITIVE_INFINITY),I(this,V,e.onEviction)}get __oldCache(){return u(this,O)}get(e){if(u(this,g).has(e)){const r=u(this,g).get(e);return T(this,h,ce).call(this,e,r)}if(u(this,O).has(e)){const r=u(this,O).get(e);if(T(this,h,x).call(this,e,r)===!1)return T(this,h,ot).call(this,e,r),r.value}}set(e,r,{maxAge:o=u(this,Z)}={}){const a=typeof o=="number"&&o!==Number.POSITIVE_INFINITY?Date.now()+o:void 0;return u(this,g).has(e)?u(this,g).set(e,{value:r,expiry:a}):T(this,h,ue).call(this,e,{value:r,expiry:a}),this}has(e){return u(this,g).has(e)?!T(this,h,x).call(this,e,u(this,g).get(e)):u(this,O).has(e)?!T(this,h,x).call(this,e,u(this,O).get(e)):!1}peek(e){if(u(this,g).has(e))return T(this,h,le).call(this,e,u(this,g));if(u(this,O).has(e))return T(this,h,le).call(this,e,u(this,O))}delete(e){const r=u(this,g).delete(e);return r&&ne(this,y)._--,u(this,O).delete(e)||r}clear(){u(this,g).clear(),u(this,O).clear(),I(this,y,0)}resize(e){if(!(e&&e>0))throw new TypeError("`maxSize` must be a number greater than 0");const r=[...T(this,h,pe).call(this)],o=r.length-e;o<0?(I(this,g,new Map(r)),I(this,O,new Map),I(this,y,r.length)):(o>0&&T(this,h,ae).call(this,r.slice(0,o)),I(this,O,new Map(r.slice(o))),I(this,g,new Map),I(this,y,0)),I(this,H,e)}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of u(this,g)){const[r,o]=e;T(this,h,x).call(this,r,o)===!1&&(yield[r,o.value])}for(const e of u(this,O)){const[r,o]=e;u(this,g).has(r)||T(this,h,x).call(this,r,o)===!1&&(yield[r,o.value])}}*entriesDescending(){let e=[...u(this,g)];for(let r=e.length-1;r>=0;--r){const o=e[r],[a,s]=o;T(this,h,x).call(this,a,s)===!1&&(yield[a,s.value])}e=[...u(this,O)];for(let r=e.length-1;r>=0;--r){const o=e[r],[a,s]=o;u(this,g).has(a)||T(this,h,x).call(this,a,s)===!1&&(yield[a,s.value])}}*entriesAscending(){for(const[e,r]of T(this,h,pe).call(this))yield[e,r.value]}get size(){if(!u(this,y))return u(this,O).size;let e=0;for(const r of u(this,O).keys())u(this,g).has(r)||e++;return Math.min(u(this,y)+e,u(this,H))}get maxSize(){return u(this,H)}entries(){return this.entriesAscending()}forEach(e,r=this){for(const[o,a]of this.entriesAscending())e.call(r,a,o,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}}y=new WeakMap,g=new WeakMap,O=new WeakMap,H=new WeakMap,Z=new WeakMap,V=new WeakMap,h=new WeakSet,ae=function(e){if(typeof u(this,V)=="function")for(const[r,o]of e)u(this,V).call(this,r,o.value)},x=function(e,r){return typeof r.expiry=="number"&&r.expiry<=Date.now()?(typeof u(this,V)=="function"&&u(this,V).call(this,e,r.value),this.delete(e)):!1},rt=function(e,r){if(T(this,h,x).call(this,e,r)===!1)return r.value},ce=function(e,r){return r.expiry?T(this,h,rt).call(this,e,r):r.value},le=function(e,r){const o=r.get(e);return T(this,h,ce).call(this,e,o)},ue=function(e,r){u(this,g).set(e,r),ne(this,y)._++,u(this,y)>=u(this,H)&&(I(this,y,0),T(this,h,ae).call(this,u(this,O)),I(this,O,u(this,g)),I(this,g,new Map))},ot=function(e,r){u(this,O).delete(e),T(this,h,ue).call(this,e,r)},pe=function*(){for(const e of u(this,O)){const[r,o]=e;u(this,g).has(r)||T(this,h,x).call(this,r,o)===!1&&(yield e)}for(const e of u(this,g)){const[r,o]=e;T(this,h,x).call(this,r,o)===!1&&(yield e)}};var In=Object.defineProperty,Ln=(n,t,e)=>t in n?In(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Dn=(n,t,e)=>(Ln(n,t+"",e),e);class Nn{constructor({api:t}){Dn(this,"api"),this.api=t}async getUserPublicInfo({did:t}){const{data:e}=await this.api.get("/api/user",{params:{did:t}});return e}async getUserPrivacyConfig({did:t}){const{data:e}=await this.api.get("/api/user/privacy/config",{params:{did:t}});return e}async saveUserPrivacyConfig(t){const{data:e}=await this.api.post("/api/user/privacy/config",t);return e}async getUserNotificationConfig(){const{data:t}=await this.api.get("/api/user/notification/config");return t}async saveUserNotificationConfig(t){const{data:e}=await this.api.post("/api/user/notification/config",t);return e}async testNotificationWebhook(t){const{data:e}=await this.api.put("/api/user/notification/webhook",t);return e}async getProfileUrl({did:t,locale:e}){const r=`${k.WELLKNOWN_SERVICE_PATH_PREFIX}/user`;return j(r,{did:t,locale:e})}async getProfile(){const{data:t}=await this.api.get("/api/user/profile");return t}async refreshProfile(){await this.api.put("/api/user/refreshProfile")}async saveProfile({locale:t,inviter:e}){const{data:r}=await this.api.put("/api/user/profile",{locale:t,inviter:e});return r}async updateDidSpace({spaceGateway:t}){await this.api.put("/api/user/updateDidSpace",{spaceGateway:t})}async logout({visitorId:t}){const{data:e}=await this.api.post("/api/user/logout",{visitorId:t});return e}}class st{getSessionToken(){return J.get(k.SESSION_TOKEN_STORAGE_KEY)}setSessionToken(t){J.set(k.SESSION_TOKEN_STORAGE_KEY,t)}removeSessionToken(){J.remove(k.SESSION_TOKEN_STORAGE_KEY)}getRefreshToken(){return localStorage.getItem(k.REFRESH_TOKEN_STORAGE_KEY)}setRefreshToken(t){localStorage.setItem(k.REFRESH_TOKEN_STORAGE_KEY,t)}removeRefreshToken(){localStorage.removeItem(k.REFRESH_TOKEN_STORAGE_KEY)}}const re=new Rn({maxSize:30,maxAge:60*1e3});class it{async getBlocklet(t,e=!1){if(!t){if(typeof window>"u"||typeof document>"u")throw new Error("Cannot get blocklet in server side without baseUrl");return window.blocklet}if(!e&&re.has(t))return re.get(t);const r=j(L(t,"__blocklet__.js"),{type:"json",t:Date.now()}),a=await(await fetch(r)).json();return re.set(t,a),a}async loadBlocklet(){return new Promise((t,e)=>{if(typeof window>"u"||typeof document>"u"){e();return}const r=document.createElement("script");let o="/";window.blocklet&&window.blocklet.prefix&&(o=window.blocklet.prefix),r.src=j(L(o,"__blocklet__.js"),{t:Date.now()}),r.onload=()=>{t()},r.onerror=()=>{e()},document.head.append(r)})}getPrefix(t){var e;return t?(t==null?void 0:t.prefix)||"/":typeof window>"u"||typeof document>"u"?null:((e=window.blocklet)==null?void 0:e.prefix)||"/"}}var wn=Object.defineProperty,yn=(n,t,e)=>t in n?wn(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,ke=(n,t,e)=>(yn(n,typeof t!="symbol"?t+"":t,e),e);class vn{constructor({api:t,blocklet:e}){ke(this,"api"),ke(this,"blocklet"),this.api=t,this.blocklet=e||new it}getBaseUrl(t){return t?L(t,k.WELLKNOWN_SERVICE_PATH_PREFIX):void 0}async getUserSessions({did:t,appUrl:e}){const r=this.getBaseUrl(e),o=await this.blocklet.getBlocklet(),{data:a}=await this.api.get("/api/user-session",{baseURL:r,params:{userDid:t,appPid:o.appPid}});return a}async loginByUserSession({appPid:t,userDid:e,visitorId:r,passportId:o,appUrl:a}){const s=this.getBaseUrl(a),{data:d}=await this.api.post("/api/user-session/login",{appPid:t,userDid:e,visitorId:r,passportId:o},{baseURL:s});return d}}var xn=Object.defineProperty,kn=(n,t,e)=>t in n?xn(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,bn=(n,t,e)=>(kn(n,t+"",e),e);class Bn{constructor({blocklet:t=window.blocklet}={}){bn(this,"blocklet"),this.blocklet=t}getComponent(t){var o;return(((o=this.blocklet)==null?void 0:o.componentMountPoints)||[]).find(a=>[a.title,a.name,a.did].includes(t))}getComponentMountPoint(t){const e=this.getComponent(t);return(e==null?void 0:e.mountPoint)||""}getUrl(t,...e){var a;const r=this.getComponentMountPoint(t),o=((a=this.blocklet)==null?void 0:a.appUrl)||"";return L(o,r,...e)}}const Fn="1.16.33",Un=(n=0)=>new Promise(t=>{setTimeout(()=>{t()},n)}),at=n=>`Bearer ${encodeURIComponent(n)}`,Mn="__visitor_id",Pn=()=>localStorage.getItem(Mn);function Hn(){return J.get("x-csrf-token")}async function be(n,t=300){n.metaData.endTime=+new Date;const{startTime:e,endTime:r}=n.metaData,o=r-e;o<t&&await Un(t-o),delete n.metaData}const ct=(n,t)=>{const e={...n==null?void 0:n.headers,"x-blocklet-js-sdk-version":Fn},r=new Bn,o=Pn();[void 0,null].includes(o)||(e["x-blocklet-visitor-id"]=o);const a=Ot.create({...n,headers:e});return t!=null&&t.lazy&&(a.interceptors.request.use(s=>(s.metaData={startTime:+new Date},s),s=>Promise.reject(s)),a.interceptors.response.use(async s=>(s.config&&await be(s.config,t==null?void 0:t.lazyTime),s),async s=>(s.response&&await be(s.response.config,t==null?void 0:t.lazyTime),Promise.reject(s)))),a.interceptors.request.use(s=>{var l,C;const d=(t==null?void 0:t.componentDid)??((C=(l=window.blocklet)==null?void 0:l.componentId)==null?void 0:C.split("/").pop());return s.baseURL=s.baseURL||r.getComponentMountPoint(d),s.timeout=s.timeout||20*1e3,s.headers["x-csrf-token"]=Hn(),s},s=>Promise.reject(s)),a};async function Vn(n){if(!n)throw new Error("Refresh token not found");const t=ct({baseURL:k.WELLKNOWN_SERVICE_PATH_PREFIX,timeout:10*1e3,headers:{authorization:at(n)}}),{data:e}=await t.post("/api/did/refreshSession");return e}function lt({getSessionToken:n,setSessionToken:t,removeSessionToken:e,getRefreshToken:r,setRefreshToken:o,removeRefreshToken:a,onRefreshTokenError:s,onRefreshTokenSuccess:d},l,C){let E=null;const m=ct({timeout:30*1e3,...l},C);return m.interceptors.request.use(async p=>{if(!J.get(k.SESSION_TOKEN_STORAGE_KEY)){const A=n();A&&(p.headers.authorization=at(A))}return E&&await E,p},p=>Promise.reject(p)),m.interceptors.response.use(p=>p,async p=>{var D;const A=p.config;if(A&&(A.headers=A!=null&&A.headers?{...A.headers}:{},((D=p==null?void 0:p.response)==null?void 0:D.status)===401&&!A._retry)){A._retry=!0;try{E||(E=Vn(r()));const R=await E;return t(R.nextToken),o(R.nextRefreshToken),typeof d=="function"&&d(R),m(A)}catch(R){return e(),a(),typeof s=="function"&&s(R),Promise.reject(p)}finally{E=null}}return Promise.reject(p)}),m}var jn=Object.defineProperty,Kn=(n,t,e)=>t in n?jn(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,X=(n,t,e)=>(Kn(n,typeof t!="symbol"?t+"":t,e),e);class ut{constructor(){X(this,"api"),X(this,"user"),X(this,"userSession"),X(this,"token"),X(this,"blocklet");const t=new st,e=lt({getSessionToken:t.getSessionToken,setSessionToken:t.setSessionToken,removeSessionToken:t.removeSessionToken,getRefreshToken:t.getRefreshToken,setRefreshToken:t.setRefreshToken,removeRefreshToken:t.removeRefreshToken,onRefreshTokenError:()=>{console.error("Failed to refresh token")},onRefreshTokenSuccess:()=>{}},{baseURL:k.WELLKNOWN_SERVICE_PATH_PREFIX});this.user=new Nn({api:e});const r=new it;this.userSession=new vn({api:e,blocklet:r}),this.token=t,this.api=e,this.blocklet=r}}function Ae(n={},t={}){const e=new st;return lt({getSessionToken:e.getSessionToken,setSessionToken:e.setSessionToken,removeSessionToken:e.removeSessionToken,getRefreshToken:e.getRefreshToken,setRefreshToken:e.setRefreshToken,removeRefreshToken:e.removeRefreshToken,onRefreshTokenError:()=>{console.error("Failed to refresh token")},onRefreshTokenSuccess:()=>{}},n,t)}const Se=Ae({});function Gn({key:n}={key:"md"}){const t=_t();return Rt(t.breakpoints.down(n))}const v={NETWORK_ERROR:1001,UNAUTHORIZED:1002,EXPIRED:1003,PAST_DUE:1004,INVALID:1005,UNIT_LIMIT:1006,CORS_BLOCKED:1007,INCOMPATIBLE:1008},zn={DEFAULT_SCOPE:"list:object read:object write:object"},Wn="https://www.arcblock.io/content/docs/did-spaces/how-to-obtain-space-gateway-url",pt="https://www.arcblock.io/docs/did-spaces/fixing-cors-errors-when-connecting-to-space";function Xn({endpoint:n,deps:t=[]}){return It(async()=>{if(!et(n))return;const{headers:e}=await Se.head(n,{timeout:1e3*30,params:{withExtras:!0}}),[r,o,a,s,d,l,C,E,m]=[e["x-space-name"],e["x-subscription-id"],e["x-listable"]==="true",e["x-readable"]==="true",e["x-writeable"]==="true",e["x-space-version"],e["x-space-owner-did"],e["x-space-is-available"],e["x-error-code"]],p=r?decodeURIComponent(r):"";if(E===void 0||m===void 0){const A=a&&s&&d;return{version:l||"",name:p,subscriptionId:o,ownerDid:C||"",isAvailable:A,errorCode:A?0:v.UNAUTHORIZED}}return{version:l||"",name:p,subscriptionId:o,ownerDid:C,isAvailable:E==="true",errorCode:parseInt(m,10)}},{refreshDeps:[n].concat(t),onError(e){console.error(e)}})}const Jn=Ye.flatten({common:{cancel:"Cancel",confirm:"Confirm",delete:"Delete",error:"Error",open:"Open",unknown:"Unknown",invalidUrl:"Invalid url: {url}",upgrade:"Upgrade"},storage:{spaces:{authorize:{title:"Connect {appName} to DID Spaces",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} to connect to DID Spaces",success:"Connected successfully"},connect:{reconnect:"Reconnect Now",useSpaceGateway:"Connect using the DID Spaces gateway",useWallet:"Connect with DID Wallet",howToGetGatewayUrl:"How to get the url of did spaces",providerForStorage:"Please connect your DID Spaces"},connected:{title:"Connected DID Spaces",tag:"Connected"},disconnected:{tag:"Disconnected"},error:{tag:"Need Attention",expired:"DID Spaces has expired, click this link to re-subscribe",pastDue:"DID Spaces has unpaid bills, click this link to complete payment",invalid:"DID Spaces subscription anomaly, click this link to check",unitLimit:"DID Spaces free quota has been used up, click this link to pay for the upgrade",corsBlocked:`The connection request may fail due to CORS restrictions:
1
+ var Ie=n=>{throw TypeError(n)};var te=(n,t,e)=>t.has(n)||Ie("Cannot "+e);var u=(n,t,e)=>(te(n,t,"read from private field"),e?e.call(n):t.get(n)),U=(n,t,e)=>t.has(n)?Ie("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),I=(n,t,e,r)=>(te(n,t,"write to private field"),r?r.call(n,e):t.set(n,e),e),T=(n,t,e)=>(te(n,t,"access private method"),e);var ne=(n,t,e,r)=>({set _(o){I(n,t,o,e)},get _(){return u(n,t,r)}});import{c8 as Ot,c as L,w as j,ap as _t,a5 as Rt,Y as It,eL as Ye,u as Lt,l as Dt,bJ as Qe,bI as Nt,r as c,a2 as wt,a3 as yt,j as i,c4 as vt,c6 as xt,aI as kt,bx as bt,B as P,i as Bt,eM as qe,D as Ft,k as Le,a as $e,cK as Ut,eN as Mt,cJ as Pt,T as $,aA as Ht,a7 as De,n as Vt,eO as Ne,V as jt,b as Kt}from"./index-dEKXkm4C.js";import{d as Gt}from"./OpenInNew-C7tW6zIz.js";import{i as et}from"./index-CzXHRu12.js";import{S as zt}from"./Stack-Cc1e8uS3.js";import{L as se}from"./Link-51uCMh9H.js";import{S as Wt}from"./Skeleton-CVZKKwKZ.js";import{d as Xt}from"./HelpOutline-epGv8mXi.js";import{S as we}from"./index-DheUDLUu.js";import{D as Jt}from"./DialogContentText-B73EoFbn.js";import{T as Zt}from"./TextField-CO9VOqaC.js";const Yt=Object.freeze({AUTH:"auth"}),me=Object.freeze({OWNER:"owner",ADMIN:"admin",MEMBER:"member",GUEST:"guest"}),f=Object.freeze({...me,CI:"ci",CERTIFICATE:"certificate",BLOCKLET_OWNER:"blocklet-owner",BLOCKLET_ADMIN:"blocklet-admin",BLOCKLET_MEMBER:"blocklet-member",BLOCKLET_SDK:"blocklet-sdk",EXTERNAL_BLOCKLET_CONTROLLER:"external-blocklet-controller",EXTERNAL_BLOCKLETS_MANAGER:"external-blocklets-manager"}),Qt=Object.freeze({BLOCKLET_GUEST:"blocklet-guest"}),tt=[f.BLOCKLET_OWNER,f.BLOCKLET_ADMIN,f.BLOCKLET_MEMBER,f.BLOCKLET_SDK],qt=n=>n&&tt.includes(n),$t=[f.BLOCKLET_OWNER,f.BLOCKLET_ADMIN,f.BLOCKLET_MEMBER,f.BLOCKLET_SDK,Qt.BLOCKLET_GUEST],en=n=>n&&$t.includes(n),tn={USER:"user",OWNERSHIP_NFT:"ownership_nft",BLOCKLET_USER:"blocklet_user",BLOCKLET_CONTROLLER:"blocklet_controller"},nn={roles:Object.freeze([{name:f.OWNER,title:"Owner",description:"Has full administrative access to the Blocklet Server",passport:!0},{name:f.ADMIN,title:"Admin",description:"Has full permissions to manage blocklet and Blocklet Server such as install/remove/start/stop blocklet, manage blocklet URL mapping and certificates, manage blocklet team, manage node integrations and access keys, upgrade node to a new version",passport:!0},{name:f.MEMBER,title:"Member",description:"Has permissions to manage blocklets, such as install/remove/start/stop blocklet, manage blocklet URL mapping and certificates",passport:!0},{name:f.GUEST,title:"Guest",description:"Has all read permissions on Blocklet Server",passport:!0},{name:f.CI,title:"CI",description:"Deploy blocklet to Blocklet Server",passport:!0,noHuman:!0},{name:f.CERTIFICATE,title:"Certificate",description:"Manage https certificates for blocklets on the Blocklet Server",passport:!0,noHuman:!0},{name:f.BLOCKLET_OWNER,title:"Blocklet Owner"},{name:f.BLOCKLET_ADMIN,title:"Blocklet Admin"},{name:f.BLOCKLET_MEMBER,title:"Blocklet Member"},{name:f.BLOCKLET_SDK,title:"Blocklet SDK"},{name:f.EXTERNAL_BLOCKLET_CONTROLLER,title:"External Blocklet Controller"},{name:f.EXTERNAL_BLOCKLETS_MANAGER,title:"External Blocklets Manager",description:"Manage external blocklets in the Blocklet Server",passport:!0,noHuman:!0}]),permissions:Object.freeze([{name:"query_node",description:"View node data, include dashboard and node settings, log stream for both Blocklet Server and blocklets"},{name:"mutate_node",description:"Change node settings, upgrade node to a new version"},{name:"query_session",description:"Get data from a long running session"},{name:"mutate_session",description:"Start/update/end a long running session"},{name:"query_accessKey",description:"View access keys for Blocklet Server"},{name:"mutate_accessKey",description:"Manage access keys for Blocklet Server, such as create/update/delete"},{name:"query_team",description:"View team data(members/roles/permissions) for Blocklet Server and blocklets"},{name:"mutate_team",description:"Manage team data(members/roles/permissions) for Blocklet Server and blocklets"},{name:"query_blocklets",description:"View store and installed blocklets, including blocklet runtime configuration, domains and urls"},{name:"mutate_blocklets",description:"Perform state changing actions on blocklets, such as install/upgrade/config/start/stop/remove"},{name:"query_router",description:"View sites, URL mapping and certificates in service gateway"},{name:"mutate_router",description:"Manage sites, URL mapping and certificates in service gateway"},{name:"query_certificate",description:"View certificates in service gateway"},{name:"mutate_certificate",description:"Manage certificates in service gateway"},{name:"query_notification",description:"View notifications"},{name:"mutate_notification",description:"Manage notifications, such as mark notifications as read"},{name:"query_webhook",description:"View integrations"},{name:"mutate_webhook",description:"Manage integrations"},{name:"query_blocklet",description:"View a blocklet, including blocklet runtime configuration, domains and urls"},{name:"mutate_blocklet",description:"Perform state changing actions on a blocklet, such as upgrade/config/start/stop"}]),grants:Object.freeze({[f.GUEST]:["query_blocklets","query_router","query_webhook","query_notification","query_team","query_accessKey","query_node","query_session"],[f.MEMBER]:[f.GUEST,"mutate_blocklets","mutate_router","mutate_notification","mutate_session"],[f.ADMIN]:[f.MEMBER,"mutate_team","mutate_webhook","mutate_accessKey","mutate_node","mutate_certificate"],[f.OWNER]:[me.ADMIN],[f.CI]:["query_blocklets","mutate_blocklets"],[f.CERTIFICATE]:["query_certificate","mutate_certificate"],[f.BLOCKLET_SDK]:["query_team","mutate_team","query_blocklet"],[f.BLOCKLET_OWNER]:[f.BLOCKLET_ADMIN],[f.BLOCKLET_ADMIN]:[f.BLOCKLET_MEMBER,"mutate_team","mutate_blocklet","mutate_notification"],[f.BLOCKLET_MEMBER]:["query_team","query_blocklet","query_notification"],[f.EXTERNAL_BLOCKLET_CONTROLLER]:["query_blocklets","mutate_blocklets"],[f.EXTERNAL_BLOCKLETS_MANAGER]:["query_blocklets","mutate_blocklets"]})},ye=24*60*60*1e3,rn={NOTIFICATION_CREATE:"notification.create",NOTIFICATION_BLOCKLET_CREATE:"notification.blockletCreate",ROUTING_UPDATED:"routing.updated",NODE_UPDATED:"node.updated",NODE_MAINTAIN_PROGRESS:"node.upgrade.progress",NODE_STARTED:"node.started",NODE_STOPPED:"node.stopped",NODE_ADDED_OWNER:"node.addedOwner",NODE_RUNTIME_INFO:"node.runtimeInfo",BLOCKLETS_RUNTIME_INFO:"node.blockletsRuntimeInfo",DOMAIN_STATUS:"domain.status",CERT_ADDED:"cert.added",CERT_ISSUED:"cert.issued",CERT_UPDATED:"cert.updated",CERT_REMOVED:"cert.removed",CERT_ERROR:"cert.error",RELOAD_GATEWAY:"gateway.reload"},on=Object.freeze({OWNER:"owner",ADMIN:"admin",INVITED:"invited",ALL:"all"}),ve="https://store.blocklet.dev",xe="https://dev.store.blocklet.dev",sn="https://main.abtnetwork.io/api/",an=Object.freeze({DERIVED:"derived",WALLET:"wallet"}),cn={STATUS:{PROGRESS:null,SUCCEEDED:0,FAILED:1},TIMEOUT_HOURS:6,STRATEGY:{AUTO:0,MANUAL:1},JOB:{INTERVAL:2*60*60}},ln={STATUS:{PROGRESS:null,SUCCEEDED:0,FAILED:1},TIMEOUT_HOURS:6,STRATEGY:{AUTO:0,MANUAL:1},JOB:{INTERVAL:2*60*60}},nt=10,un=86400/nt,pn={SYNC_LIMIT:3},dn=[{text:"Plain Text",value:"text/plain"},{text:"JSON",value:"application/json"},{text:"XML",value:"application/xml"},{text:"HTML Document",value:"text/html"},{text:"YAML",value:"application/x-yaml"},{text:"TOML",value:"application/toml"},{text:"CSS",value:"text/css"},{text:"JavaScript",value:"application/javascript"},{text:"CSV",value:"text/csv"},{text:"Markdown",value:"text/markdown"},{text:"SVG",value:"image/svg+xml"}],En=30,Cn=Object.freeze({created:0,selected:10,connected:20,timeout:25,paid:30,nftMinted:35,allocated:40,consuming:46,installed:50,overdue:60,canceled:65,terminated:70,transferred:90}),fn="default",hn="public",mn="invited-only",An="owner-only",Sn="admin-only",gn="simple-cors",Tn="security-header",On="simple-cors-and-security-header";var k=Object.freeze({NODE_MODES:Object.freeze({PRODUCTION:"production",DEBUG:"debug",MAINTENANCE:"maintenance",SERVERLESS:"serverless"}),DEFAULT_DESCRIPTION:"Web Interface to manage your Blocklet Server",NODE_MAINTAIN_PROGRESS:Object.freeze({SETUP:"setup",INSTALLING:"installing",VERIFYING:"verifying",RESTARTING:"restarting",CLEANUP:"cleanup",COMPLETE:"complete",ROLLBACK:"rollback"}),VC_TYPE_BLOCKLET_PURCHASE:"BlockletPurchaseCredential",VC_TYPE_NODE_PASSPORT:"ABTNodePassport",VC_TYPE_GENERAL_PASSPORT:"NFTPassport",NFT_TYPE_SERVER_OWNERSHIP:"BlockletServerOwnershipNFT",NFT_TYPE_SERVERLESS:"BlockletServerServerlessNFT",NODE_PACKAGE_NAME:"@abtnode/cli",NODE_COMMAND_NAME:"abtnode",NODE_DATA_DIR_NAME:"_abtnode",USER_AVATAR_DIR:"/.assets/avatar",USER_AVATAR_URL_PREFIX:"bn://avatar",USER_AVATAR_PATH_PREFIX:"/user/avatar",USER_MAX_INVITE_DEPTH:8,PROCESS_NAME_DAEMON:"abt-node-daemon",PROCESS_NAME_PROXY:"abt-node-db-hub",PROCESS_NAME_UPDATER:"abt-node-updater",PROCESS_NAME_SERVICE:"abt-node-service",PROCESS_NAME_ROUTER:"abt-node-router",PROCESS_NAME_LOG_ROTATE:"abt-node-log-rotate",PROCESS_NAME_EVENT_HUB:"abt-node-event-hub",NODE_REGISTER_URL:"https://install.arcblock.io/",WEB_WALLET_URL:"https://web.abtwallet.io",BLOCKLET_STORE_URL:ve,BLOCKLET_STORE_URL_DEV:xe,BLOCKLET_STORE_DID:"z8ia29UsENBg6tLZUKi2HABj38Cw1LmHZocbQ",BLOCKLET_STORE_API_PREFIX:"/api",BLOCKLET_STORE_API_BLOCKLET_PREFIX:"/api/blocklets",BLOCKLET_STORE_META_PATH:"/api/store.json",BLOCKLET_STORE:{id:"zNKqX7D8ZAYa77HgzpoFfnV3BFbcmSRrE9aT",name:"Official Store",description:"ArcBlock official blocklet registry",url:ve,logoUrl:"/logo.png",maintainer:"arcblock"},BLOCKLET_STORE_DEV:{id:"zNKmfUatDhzfMVACfr3u97eqndj8f1yXXw3m",name:"Dev Store",description:"ArcBlock dev registry that contains demo and example blocklets",url:xe,maintainer:"arcblock",logoUrl:"/logo.png"},APP_STRUCT_VERSION:"2",DEFAULT_DID_REGISTRY:"https://registry.abtnet.io",DEFAULT_SLP_DOMAIN:"slp.abtnet.io",DEFAULT_DID_DOMAIN:"did.abtnet.io",DEFAULT_IP_DOMAIN:"*.ip.abtnet.io",DEFAULT_IP_DOMAIN_SUFFIX:"ip.abtnet.io",DEFAULT_WILDCARD_CERT_HOST:"https://releases.arcblock.io/",DEFAULT_NFT_DOMAIN_URL:"https://domain.didlabs.org/",DEFAULT_CERTIFICATE_EMAIL:"certs@arcblock.io",CONFIG_FILENAME:"config.yml",CONFIG_FILENAME_OLD:"abtnode.yml",CONFIG_FOLDER_NAME:".blocklet-server",CONFIG_FOLDER_NAME_OLD:".abtnode",EXPORTED_FOLDER_NAME:"exported_blocklet_server",StatusCode:Object.freeze({ok:0,blocklet_not_found:1,blocklet_not_purchased:2,forbidden:403,internal:500,timeout:504}),IP:new RegExp("-(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\-(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}"),DOMAIN_FOR_IP_SITE:"",DOMAIN_FOR_IP_SITE_REGEXP:"~^\\d+.\\d+.\\d+.\\d+$",DOMAIN_FOR_DEFAULT_SITE:"*",DOMAIN_FOR_INTERNAL_SITE:"127.0.0.1",NAME_FOR_WELLKNOWN_SITE:"wellknown",WELLKNOWN_PATH_PREFIX:"/.well-known",WELLKNOWN_ACME_CHALLENGE_PREFIX:"/.well-known/acme-challenge",WELLKNOWN_DID_RESOLVER_PREFIX:"/.well-known/did.json",WELLKNOWN_PING_PREFIX:"/.well-known/ping",WELLKNOWN_ANALYTICS_PREFIX:"/.well-known/analytics",WELLKNOWN_SERVICE_PATH_PREFIX:"/.well-known/service",WELLKNOWN_BLOCKLET_ADMIN_PATH:"/.well-known/service/admin",WELLKNOWN_BLOCKLET_HEALTH_PATH:"/.well-known/service/health",WELLKNOWN_BLOCKLET_LOGO_PATH:"/.well-known/service/blocklet/logo",SLOT_FOR_IP_DNS_SITE:"888-888-888-888",DEFAULT_ADMIN_PATH:"/admin",WELLKNOWN_SERVER_ADMIN_PATH:"/.well-known/server/admin",DEFAULT_SERVICE_PATH:"/.abtnode/service",DEFAULT_HTTP_PORT:80,DEFAULT_HTTPS_PORT:443,MAX_UPLOAD_FILE_SIZE:500,DEFAULT_DAEMON_PORT:8089,MAX_NGINX_WORKER_CONNECTIONS:10240,BLOCKLET_PROXY_PATH_PREFIX:"/.blocklet/proxy",BLOCKLET_SITE_GROUP_SUFFIX:".blocklet-domain-group",DAY_IN_MS:ye,DAEMON_MAX_MEM_LIMIT_IN_MB:800,PROXY_MAX_MEM_LIMIT_IN_MB:800,BLOCKLET_MAX_MEM_LIMIT_IN_MB:800,CERTIFICATE_EXPIRES_OFFSET:10*ye,ROUTING_RESPONSE_TYPES:dn,ROUTING_RULE_TYPES:Object.freeze({NONE:"none",DAEMON:"daemon",SERVICE:"service",BLOCKLET:"blocklet",REDIRECT:"redirect",GENERAL_REWRITE:"rewrite",GENERAL_PROXY:"general_proxy",DIRECT_RESPONSE:"direct_response",COMPONENT:"component"}),ROLES:me,SERVER_ROLES:f,BLOCKLET_ROLES:tt,isBlockletRole:qt,isBlockletMultipleTenantRole:en,AUTH_CERT_TYPE:tn,RBAC_CONFIG:nn,genPermissionName:(n,t="access")=>`${t}_${n.replace("_","-")}`,PASSPORT_STATUS:{VALID:"valid",REVOKED:"revoked"},NODE_SERVICES:Yt,DISK_ALERT_THRESHOLD_PERCENT:80,EVENTS:rn,WHO_CAN_ACCESS:on,WHO_CAN_ACCESS_PREFIX_ROLES:"roles:",GATEWAY_REQ_LIMIT:Object.freeze({min:10,max:100}),STORE_DETAIL_PAGE_PATH_PREFIX:"/blocklets",MAX_USER_PAGE_SIZE:100,SERVER_STATUS:{RUNNING:1,STOPPED:2,START_FROM_CRASH:3},LOG_RETAIN_IN_DAYS:60,BLOCKLET_INSTALL_TYPE:{STORE:"store",URL:"url",DEV:"dev",CREATE:"create",RESTORE:"restore"},ROUTER_CACHE_GROUPS:{blockletProxy:{minSize:"1m",maxSize:"2g",period:"30d"}},MAIN_CHAIN_ENDPOINT:sn,USER_TYPE:an,SERVER_CACHE_TTL:300*1e3,BLOCKLET_CACHE_TTL:3600*1e3,SESSION_CACHE_TTL:3600,SESSION_TTL:7*86400,BACKUPS:cn,CHECK_UPDATE:ln,MONITOR_HISTORY_LENGTH:un,MONITOR_RECORD_INTERVAL_SEC:nt,INSTALL_ACTIONS:{INSTALL:"install",INSTALL_COMPONENT:"installComponent",UPGRADE_COMPONENT:"upgradeComponent"},COPYRIGHT_OWNER:"ArcBlock",FEDERATED:pn,SESSION_TOKEN_STORAGE_KEY:"login_token",REFRESH_TOKEN_STORAGE_KEY:"refresh_token",SERVERLESS_BLOCKLET_DATA_RETENTION_DAYS:En,LAUNCH_SESSION_STATUS:Cn,UNOWNED_DID:"z".repeat(35),STUDIO_CONNECTED_STORE:"studio_connected_store",STUDIO_CONNECTED_AND_DEVELOPED:"studio_connected_and_developed",VERIFY_CODE_LENGTH:6,VERIFY_CODE_TTL:30*60*1e3,VERIFY_SEND_TTL:1*60*1e3,SECURITY_RULE_DEFAULT_ID:fn,ACCESS_POLICY_PUBLIC:hn,ACCESS_POLICY_INVITED_ONLY:mn,ACCESS_POLICY_OWNER_ONLY:An,ACCESS_POLICY_ADMIN_ONLY:Sn,RESPONSE_HEADER_POLICY_SIMPLE_CORS:gn,RESPONSE_HEADER_POLICY_SECURITY_HEADER:Tn,RESPONSE_HEADER_POLICY_SIMPLE_CORS_AND_SECURITY_HEADER:On});/*! js-cookie v3.0.5 | MIT */function Q(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)n[r]=e[r]}return n}var _n={read:function(n){return n[0]==='"'&&(n=n.slice(1,-1)),n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(n){return encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function ie(n,t){function e(o,a,s){if(!(typeof document>"u")){s=Q({},t,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var d="";for(var l in s)s[l]&&(d+="; "+l,s[l]!==!0&&(d+="="+s[l].split(";")[0]));return document.cookie=o+"="+n.write(a,o)+d}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var a=document.cookie?document.cookie.split("; "):[],s={},d=0;d<a.length;d++){var l=a[d].split("="),C=l.slice(1).join("=");try{var E=decodeURIComponent(l[0]);if(s[E]=n.read(C,E),o===E)break}catch{}}return o?s[o]:s}}return Object.create({set:e,get:r,remove:function(o,a){e(o,"",Q({},a,{expires:-1}))},withAttributes:function(o){return ie(this.converter,Q({},this.attributes,o))},withConverter:function(o){return ie(Q({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(n)}})}var J=ie(_n,{path:"/"}),y,g,O,H,Z,V,h,ae,x,rt,ce,le,ue,ot,pe;class Rn extends Map{constructor(e={}){super();U(this,h);U(this,y,0);U(this,g,new Map);U(this,O,new Map);U(this,H);U(this,Z);U(this,V);if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if(typeof e.maxAge=="number"&&e.maxAge===0)throw new TypeError("`maxAge` must be a number greater than 0");I(this,H,e.maxSize),I(this,Z,e.maxAge||Number.POSITIVE_INFINITY),I(this,V,e.onEviction)}get __oldCache(){return u(this,O)}get(e){if(u(this,g).has(e)){const r=u(this,g).get(e);return T(this,h,ce).call(this,e,r)}if(u(this,O).has(e)){const r=u(this,O).get(e);if(T(this,h,x).call(this,e,r)===!1)return T(this,h,ot).call(this,e,r),r.value}}set(e,r,{maxAge:o=u(this,Z)}={}){const a=typeof o=="number"&&o!==Number.POSITIVE_INFINITY?Date.now()+o:void 0;return u(this,g).has(e)?u(this,g).set(e,{value:r,expiry:a}):T(this,h,ue).call(this,e,{value:r,expiry:a}),this}has(e){return u(this,g).has(e)?!T(this,h,x).call(this,e,u(this,g).get(e)):u(this,O).has(e)?!T(this,h,x).call(this,e,u(this,O).get(e)):!1}peek(e){if(u(this,g).has(e))return T(this,h,le).call(this,e,u(this,g));if(u(this,O).has(e))return T(this,h,le).call(this,e,u(this,O))}delete(e){const r=u(this,g).delete(e);return r&&ne(this,y)._--,u(this,O).delete(e)||r}clear(){u(this,g).clear(),u(this,O).clear(),I(this,y,0)}resize(e){if(!(e&&e>0))throw new TypeError("`maxSize` must be a number greater than 0");const r=[...T(this,h,pe).call(this)],o=r.length-e;o<0?(I(this,g,new Map(r)),I(this,O,new Map),I(this,y,r.length)):(o>0&&T(this,h,ae).call(this,r.slice(0,o)),I(this,O,new Map(r.slice(o))),I(this,g,new Map),I(this,y,0)),I(this,H,e)}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of u(this,g)){const[r,o]=e;T(this,h,x).call(this,r,o)===!1&&(yield[r,o.value])}for(const e of u(this,O)){const[r,o]=e;u(this,g).has(r)||T(this,h,x).call(this,r,o)===!1&&(yield[r,o.value])}}*entriesDescending(){let e=[...u(this,g)];for(let r=e.length-1;r>=0;--r){const o=e[r],[a,s]=o;T(this,h,x).call(this,a,s)===!1&&(yield[a,s.value])}e=[...u(this,O)];for(let r=e.length-1;r>=0;--r){const o=e[r],[a,s]=o;u(this,g).has(a)||T(this,h,x).call(this,a,s)===!1&&(yield[a,s.value])}}*entriesAscending(){for(const[e,r]of T(this,h,pe).call(this))yield[e,r.value]}get size(){if(!u(this,y))return u(this,O).size;let e=0;for(const r of u(this,O).keys())u(this,g).has(r)||e++;return Math.min(u(this,y)+e,u(this,H))}get maxSize(){return u(this,H)}entries(){return this.entriesAscending()}forEach(e,r=this){for(const[o,a]of this.entriesAscending())e.call(r,a,o,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}}y=new WeakMap,g=new WeakMap,O=new WeakMap,H=new WeakMap,Z=new WeakMap,V=new WeakMap,h=new WeakSet,ae=function(e){if(typeof u(this,V)=="function")for(const[r,o]of e)u(this,V).call(this,r,o.value)},x=function(e,r){return typeof r.expiry=="number"&&r.expiry<=Date.now()?(typeof u(this,V)=="function"&&u(this,V).call(this,e,r.value),this.delete(e)):!1},rt=function(e,r){if(T(this,h,x).call(this,e,r)===!1)return r.value},ce=function(e,r){return r.expiry?T(this,h,rt).call(this,e,r):r.value},le=function(e,r){const o=r.get(e);return T(this,h,ce).call(this,e,o)},ue=function(e,r){u(this,g).set(e,r),ne(this,y)._++,u(this,y)>=u(this,H)&&(I(this,y,0),T(this,h,ae).call(this,u(this,O)),I(this,O,u(this,g)),I(this,g,new Map))},ot=function(e,r){u(this,O).delete(e),T(this,h,ue).call(this,e,r)},pe=function*(){for(const e of u(this,O)){const[r,o]=e;u(this,g).has(r)||T(this,h,x).call(this,r,o)===!1&&(yield e)}for(const e of u(this,g)){const[r,o]=e;T(this,h,x).call(this,r,o)===!1&&(yield e)}};var In=Object.defineProperty,Ln=(n,t,e)=>t in n?In(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Dn=(n,t,e)=>(Ln(n,t+"",e),e);class Nn{constructor({api:t}){Dn(this,"api"),this.api=t}async getUserPublicInfo({did:t}){const{data:e}=await this.api.get("/api/user",{params:{did:t}});return e}async getUserPrivacyConfig({did:t}){const{data:e}=await this.api.get("/api/user/privacy/config",{params:{did:t}});return e}async saveUserPrivacyConfig(t){const{data:e}=await this.api.post("/api/user/privacy/config",t);return e}async getUserNotificationConfig(){const{data:t}=await this.api.get("/api/user/notification/config");return t}async saveUserNotificationConfig(t){const{data:e}=await this.api.post("/api/user/notification/config",t);return e}async testNotificationWebhook(t){const{data:e}=await this.api.put("/api/user/notification/webhook",t);return e}async getProfileUrl({did:t,locale:e}){const r=`${k.WELLKNOWN_SERVICE_PATH_PREFIX}/user`;return j(r,{did:t,locale:e})}async getProfile(){const{data:t}=await this.api.get("/api/user/profile");return t}async refreshProfile(){await this.api.put("/api/user/refreshProfile")}async saveProfile({locale:t,inviter:e}){const{data:r}=await this.api.put("/api/user/profile",{locale:t,inviter:e});return r}async updateDidSpace({spaceGateway:t}){await this.api.put("/api/user/updateDidSpace",{spaceGateway:t})}async logout({visitorId:t}){const{data:e}=await this.api.post("/api/user/logout",{visitorId:t});return e}}class st{getSessionToken(){return J.get(k.SESSION_TOKEN_STORAGE_KEY)}setSessionToken(t){J.set(k.SESSION_TOKEN_STORAGE_KEY,t)}removeSessionToken(){J.remove(k.SESSION_TOKEN_STORAGE_KEY)}getRefreshToken(){return localStorage.getItem(k.REFRESH_TOKEN_STORAGE_KEY)}setRefreshToken(t){localStorage.setItem(k.REFRESH_TOKEN_STORAGE_KEY,t)}removeRefreshToken(){localStorage.removeItem(k.REFRESH_TOKEN_STORAGE_KEY)}}const re=new Rn({maxSize:30,maxAge:60*1e3});class it{async getBlocklet(t,e=!1){if(!t){if(typeof window>"u"||typeof document>"u")throw new Error("Cannot get blocklet in server side without baseUrl");return window.blocklet}if(!e&&re.has(t))return re.get(t);const r=j(L(t,"__blocklet__.js"),{type:"json",t:Date.now()}),a=await(await fetch(r)).json();return re.set(t,a),a}async loadBlocklet(){return new Promise((t,e)=>{if(typeof window>"u"||typeof document>"u"){e();return}const r=document.createElement("script");let o="/";window.blocklet&&window.blocklet.prefix&&(o=window.blocklet.prefix),r.src=j(L(o,"__blocklet__.js"),{t:Date.now()}),r.onload=()=>{t()},r.onerror=()=>{e()},document.head.append(r)})}getPrefix(t){var e;return t?(t==null?void 0:t.prefix)||"/":typeof window>"u"||typeof document>"u"?null:((e=window.blocklet)==null?void 0:e.prefix)||"/"}}var wn=Object.defineProperty,yn=(n,t,e)=>t in n?wn(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,ke=(n,t,e)=>(yn(n,typeof t!="symbol"?t+"":t,e),e);class vn{constructor({api:t,blocklet:e}){ke(this,"api"),ke(this,"blocklet"),this.api=t,this.blocklet=e||new it}getBaseUrl(t){return t?L(t,k.WELLKNOWN_SERVICE_PATH_PREFIX):void 0}async getUserSessions({did:t,appUrl:e}){const r=this.getBaseUrl(e),o=await this.blocklet.getBlocklet(),{data:a}=await this.api.get("/api/user-session",{baseURL:r,params:{userDid:t,appPid:o.appPid}});return a}async loginByUserSession({appPid:t,userDid:e,visitorId:r,passportId:o,appUrl:a}){const s=this.getBaseUrl(a),{data:d}=await this.api.post("/api/user-session/login",{appPid:t,userDid:e,visitorId:r,passportId:o},{baseURL:s});return d}}var xn=Object.defineProperty,kn=(n,t,e)=>t in n?xn(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,bn=(n,t,e)=>(kn(n,t+"",e),e);class Bn{constructor({blocklet:t=window.blocklet}={}){bn(this,"blocklet"),this.blocklet=t}getComponent(t){var o;return(((o=this.blocklet)==null?void 0:o.componentMountPoints)||[]).find(a=>[a.title,a.name,a.did].includes(t))}getComponentMountPoint(t){const e=this.getComponent(t);return(e==null?void 0:e.mountPoint)||""}getUrl(t,...e){var a;const r=this.getComponentMountPoint(t),o=((a=this.blocklet)==null?void 0:a.appUrl)||"";return L(o,r,...e)}}const Fn="1.16.33",Un=(n=0)=>new Promise(t=>{setTimeout(()=>{t()},n)}),at=n=>`Bearer ${encodeURIComponent(n)}`,Mn="__visitor_id",Pn=()=>localStorage.getItem(Mn);function Hn(){return J.get("x-csrf-token")}async function be(n,t=300){n.metaData.endTime=+new Date;const{startTime:e,endTime:r}=n.metaData,o=r-e;o<t&&await Un(t-o),delete n.metaData}const ct=(n,t)=>{const e={...n==null?void 0:n.headers,"x-blocklet-js-sdk-version":Fn},r=new Bn,o=Pn();[void 0,null].includes(o)||(e["x-blocklet-visitor-id"]=o);const a=Ot.create({...n,headers:e});return t!=null&&t.lazy&&(a.interceptors.request.use(s=>(s.metaData={startTime:+new Date},s),s=>Promise.reject(s)),a.interceptors.response.use(async s=>(s.config&&await be(s.config,t==null?void 0:t.lazyTime),s),async s=>(s.response&&await be(s.response.config,t==null?void 0:t.lazyTime),Promise.reject(s)))),a.interceptors.request.use(s=>{var l,C;const d=(t==null?void 0:t.componentDid)??((C=(l=window.blocklet)==null?void 0:l.componentId)==null?void 0:C.split("/").pop());return s.baseURL=s.baseURL||r.getComponentMountPoint(d),s.timeout=s.timeout||20*1e3,s.headers["x-csrf-token"]=Hn(),s},s=>Promise.reject(s)),a};async function Vn(n){if(!n)throw new Error("Refresh token not found");const t=ct({baseURL:k.WELLKNOWN_SERVICE_PATH_PREFIX,timeout:10*1e3,headers:{authorization:at(n)}}),{data:e}=await t.post("/api/did/refreshSession");return e}function lt({getSessionToken:n,setSessionToken:t,removeSessionToken:e,getRefreshToken:r,setRefreshToken:o,removeRefreshToken:a,onRefreshTokenError:s,onRefreshTokenSuccess:d},l,C){let E=null;const m=ct({timeout:30*1e3,...l},C);return m.interceptors.request.use(async p=>{if(!J.get(k.SESSION_TOKEN_STORAGE_KEY)){const A=n();A&&(p.headers.authorization=at(A))}return E&&await E,p},p=>Promise.reject(p)),m.interceptors.response.use(p=>p,async p=>{var D;const A=p.config;if(A&&(A.headers=A!=null&&A.headers?{...A.headers}:{},((D=p==null?void 0:p.response)==null?void 0:D.status)===401&&!A._retry)){A._retry=!0;try{E||(E=Vn(r()));const R=await E;return t(R.nextToken),o(R.nextRefreshToken),typeof d=="function"&&d(R),m(A)}catch(R){return e(),a(),typeof s=="function"&&s(R),Promise.reject(p)}finally{E=null}}return Promise.reject(p)}),m}var jn=Object.defineProperty,Kn=(n,t,e)=>t in n?jn(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,X=(n,t,e)=>(Kn(n,typeof t!="symbol"?t+"":t,e),e);class ut{constructor(){X(this,"api"),X(this,"user"),X(this,"userSession"),X(this,"token"),X(this,"blocklet");const t=new st,e=lt({getSessionToken:t.getSessionToken,setSessionToken:t.setSessionToken,removeSessionToken:t.removeSessionToken,getRefreshToken:t.getRefreshToken,setRefreshToken:t.setRefreshToken,removeRefreshToken:t.removeRefreshToken,onRefreshTokenError:()=>{console.error("Failed to refresh token")},onRefreshTokenSuccess:()=>{}},{baseURL:k.WELLKNOWN_SERVICE_PATH_PREFIX});this.user=new Nn({api:e});const r=new it;this.userSession=new vn({api:e,blocklet:r}),this.token=t,this.api=e,this.blocklet=r}}function Ae(n={},t={}){const e=new st;return lt({getSessionToken:e.getSessionToken,setSessionToken:e.setSessionToken,removeSessionToken:e.removeSessionToken,getRefreshToken:e.getRefreshToken,setRefreshToken:e.setRefreshToken,removeRefreshToken:e.removeRefreshToken,onRefreshTokenError:()=>{console.error("Failed to refresh token")},onRefreshTokenSuccess:()=>{}},n,t)}const Se=Ae({});function Gn({key:n}={key:"md"}){const t=_t();return Rt(t.breakpoints.down(n))}const v={NETWORK_ERROR:1001,UNAUTHORIZED:1002,EXPIRED:1003,PAST_DUE:1004,INVALID:1005,UNIT_LIMIT:1006,CORS_BLOCKED:1007,INCOMPATIBLE:1008},zn={DEFAULT_SCOPE:"list:object read:object write:object"},Wn="https://www.arcblock.io/content/docs/did-spaces/how-to-obtain-space-gateway-url",pt="https://www.arcblock.io/docs/did-spaces/fixing-cors-errors-when-connecting-to-space";function Xn({endpoint:n,deps:t=[]}){return It(async()=>{if(!et(n))return;const{headers:e}=await Se.head(n,{timeout:1e3*30,params:{withExtras:!0}}),[r,o,a,s,d,l,C,E,m]=[e["x-space-name"],e["x-subscription-id"],e["x-listable"]==="true",e["x-readable"]==="true",e["x-writeable"]==="true",e["x-space-version"],e["x-space-owner-did"],e["x-space-is-available"],e["x-error-code"]],p=r?decodeURIComponent(r):"";if(E===void 0||m===void 0){const A=a&&s&&d;return{version:l||"",name:p,subscriptionId:o,ownerDid:C||"",isAvailable:A,errorCode:A?0:v.UNAUTHORIZED}}return{version:l||"",name:p,subscriptionId:o,ownerDid:C,isAvailable:E==="true",errorCode:parseInt(m,10)}},{refreshDeps:[n].concat(t),onError(e){console.error(e)}})}const Jn=Ye.flatten({common:{cancel:"Cancel",confirm:"Confirm",delete:"Delete",error:"Error",open:"Open",unknown:"Unknown",invalidUrl:"Invalid url: {url}",upgrade:"Upgrade"},storage:{spaces:{authorize:{title:"Connect {appName} to DID Spaces",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} to connect to DID Spaces",success:"Connected successfully"},connect:{reconnect:"Reconnect Now",useSpaceGateway:"Connect using the DID Spaces gateway",useWallet:"Connect with DID Wallet",howToGetGatewayUrl:"How to get the url of did spaces",providerForStorage:"Please connect your DID Spaces"},connected:{title:"Connected DID Spaces",tag:"Connected"},disconnected:{tag:"Disconnected"},error:{tag:"Need Attention",expired:"DID Spaces has expired, click this link to re-subscribe",pastDue:"DID Spaces has unpaid bills, click this link to complete payment",invalid:"DID Spaces subscription anomaly, click this link to check",unitLimit:"DID Spaces free quota has been used up, click this link to pay for the upgrade",corsBlocked:`The connection request may fail due to CORS restrictions:
2
2
  1. Please contact the DID Space administrator to verify the relevant configuration.
3
3
  2. If you are the administrator, click the link below to view the detailed setup guide and resolve the issue.`,networkError:"Network error",incompatible:`The current DID Spaces version is incompatible. Please contact your administrator to make adjustments.
4
4
  If you are the administrator, click the link below to proceed.`},gateway:{add:{invalidUrl:"Invalid DID Spaces gateway url",label:"Enter the url of the DID Spaces",title:"Add DID Spaces"}},provideNFT:{title:"Please show the DID Spaces NFT for {appName}",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} show DID space NFT",success:"Connected successfully"},helperText:{fixCorsError:"Fixing CORS Errors When Connecting to Space"}}}}),Zn=Ye.flatten({common:{cancel:"取消",confirm:"确认",delete:"删除",error:"错误",open:"打开",unknown:"未知",invalidUrl:"无效的 url: {url}",upgrade:"升级"},storage:{spaces:{authorize:{title:"连接 {appName} 至 DID Spaces",scan:"使用你的 DID Wallet 扫描下面的二维码以允许应用 {appName} 连接至 DID Spaces",success:"连接成功"},connect:{reconnect:"立即重连",useSpaceGateway:"使用 DID Spaces 网关连接",useWallet:"使用 DID Wallet 连接",howToGetGatewayUrl:"如何获取 DID Spaces 的网关地址",providerForStorage:"请连接您的 DID Spaces"},connected:{title:"已连接的 DID Spaces",tag:"已连接"},disconnected:{tag:"连接已断开"},error:{tag:"需要关注",expired:"DID Spaces 已过期,点击此链接重新订阅",pastDue:"DID Spaces 有未支付账单,点击此链接完成支付",invalid:"DID Spaces 订阅异常,点击此链接检查",unitLimit:"DID Spaces 免费额度已用完,点击此链接付费升级",corsBlocked:`连接请求可能因 CORS 限制而失败:
@@ -1,4 +1,4 @@
1
- import{r as o,aY as d,j as t,b as c,an as C,bs as I,cD as M,bE as E,bx as p,br as P}from"./index-C7otKf8F.js";import{d as S}from"./ExpandMore-BO8jF1bn.js";import{B as z}from"./ButtonGroup-YqMGRNaj.js";function A(r){const{size:u="medium",color:s="primary",menu:a=[],children:i=null,variant:m="contained",onClick:f=E,menuButtonProps:x={},...h}=r,[g,l]=o.useState(!1),n=o.useRef(null),j=Array.isArray(a)?a.map((e,B)=>o.isValidElement(e)?e:o.createElement(d,{...e,key:B})):a,y=()=>{l(e=>!e)},b=e=>{n.current&&n.current.contains(e.target)||l(!1)},k=e=>{e.target.closest(".MuiMenuItem-root")&&l(!1)};return t.jsxs(t.Fragment,{children:[t.jsxs(L,{variant:m,size:u,color:s,ref:n,...h,children:[typeof i=="function"?i():t.jsx(c,{onClick:f,color:s,children:i}),t.jsx(c,{onClick:y,color:s,...x,"aria-label":"more functions",children:t.jsx(S,{})})]}),t.jsx(w,{open:g,anchorEl:n.current,placement:"bottom-end",disablePortal:!1,children:t.jsx(C,{children:t.jsx(I,{onClickAway:b,children:t.jsx(M,{onClick:k,children:j})})})})]})}A.Item=d;const L=p(z)`
1
+ import{r as o,aZ as d,j as t,b as c,ao as C,bs as I,cG as M,bE as E,bx as p,br as P}from"./index-dEKXkm4C.js";import{d as S}from"./ExpandMore-DrecSXMe.js";import{B as z}from"./ButtonGroup-CtoWRVeN.js";function A(r){const{size:u="medium",color:s="primary",menu:a=[],children:i=null,variant:m="contained",onClick:f=E,menuButtonProps:x={},...h}=r,[g,l]=o.useState(!1),n=o.useRef(null),j=Array.isArray(a)?a.map((e,B)=>o.isValidElement(e)?e:o.createElement(d,{...e,key:B})):a,y=()=>{l(e=>!e)},b=e=>{n.current&&n.current.contains(e.target)||l(!1)},k=e=>{e.target.closest(".MuiMenuItem-root")&&l(!1)};return t.jsxs(t.Fragment,{children:[t.jsxs(L,{variant:m,size:u,color:s,ref:n,...h,children:[typeof i=="function"?i():t.jsx(c,{onClick:f,color:s,children:i}),t.jsx(c,{onClick:y,color:s,...x,"aria-label":"more functions",children:t.jsx(S,{})})]}),t.jsx(w,{open:g,anchorEl:n.current,placement:"bottom-end",disablePortal:!1,children:t.jsx(C,{children:t.jsx(I,{onClickAway:b,children:t.jsx(M,{onClick:k,children:j})})})})]})}A.Item=d;const L=p(z)`
2
2
  > .MuiButtonBase-root:last-of-type {
3
3
  min-width: 2em;
4
4
  padding-left: 0;
@@ -1 +1 @@
1
- import{aJ as ht,aK as vt,aL as O,cU as jt,aM as $t,aP as f,r as d,aN as mt,aO as st,aR as k,j as u,aS as St,ay as Ht,cP as re,cV as At,cW as Ot,cX as Xt,aQ as nt,ao as ne,cY as ft,cZ as se,bx as ae,bF as L}from"./index-C7otKf8F.js";let Y;function Dt(){if(Y)return Y;const t=document.createElement("div"),e=document.createElement("div");return e.style.width="10px",e.style.height="1px",t.appendChild(e),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),Y="reverse",t.scrollLeft>0?Y="default":(t.scrollLeft=1,t.scrollLeft===0&&(Y="negative")),document.body.removeChild(t),Y}function ie(t,e){const l=t.scrollLeft;if(e!=="rtl")return l;switch(Dt()){case"negative":return t.scrollWidth-t.clientWidth+l;case"reverse":return t.scrollWidth-t.clientWidth-l;default:return l}}function ce(t){return vt("MuiTab",t)}const N=ht("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),de=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],ue=t=>{const{classes:e,textColor:l,fullWidth:s,wrapped:n,icon:a,label:h,selected:v,disabled:b}=t,x={root:["root",a&&h&&"labelIcon",`textColor${$t(l)}`,s&&"fullWidth",n&&"wrapped",v&&"selected",b&&"disabled"],iconWrapper:["iconWrapper"]};return St(x,ce,e)},be=O(jt,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.root,l.label&&l.icon&&e.labelIcon,e[`textColor${$t(l.textColor)}`],l.fullWidth&&e.fullWidth,l.wrapped&&e.wrapped,{[`& .${N.iconWrapper}`]:e.iconWrapper}]}})(({theme:t,ownerState:e})=>f({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${N.iconWrapper}`]:f({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${N.selected}`]:{opacity:1},[`&.${N.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${N.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${N.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${N.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${N.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),xt=d.forwardRef(function(e,l){const s=mt({props:e,name:"MuiTab"}),{className:n,disabled:a=!1,disableFocusRipple:h=!1,fullWidth:v,icon:b,iconPosition:x="top",indicator:B,label:y,onChange:m,onClick:w,onFocus:F,selected:T,selectionFollowsFocus:g,textColor:X="inherit",value:E,wrapped:at=!1}=s,D=st(s,de),V=f({},s,{disabled:a,disableFocusRipple:h,selected:T,icon:!!b,iconPosition:x,label:!!y,fullWidth:v,textColor:X,wrapped:at}),_=ue(V),j=b&&y&&d.isValidElement(b)?d.cloneElement(b,{className:k(_.iconWrapper,b.props.className)}):b,Z=R=>{!T&&m&&m(R,E),w&&w(R)},U=R=>{g&&!T&&m&&m(R,E),F&&F(R)};return u.jsxs(be,f({focusRipple:!h,className:k(_.root,n),ref:l,role:"tab","aria-selected":T,disabled:a,onClick:Z,onFocus:U,ownerState:V,tabIndex:T?0:-1},D,{children:[x==="top"||x==="start"?u.jsxs(d.Fragment,{children:[j,y]}):u.jsxs(d.Fragment,{children:[y,j]}),B]}))}),fe=Ht(u.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),pe=Ht(u.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function he(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function ve(t,e,l,s={},n=()=>{}){const{ease:a=he,duration:h=300}=s;let v=null;const b=e[t];let x=!1;const B=()=>{x=!0},y=m=>{if(x){n(new Error("Animation cancelled"));return}v===null&&(v=m);const w=Math.min(1,(m-v)/h);if(e[t]=a(w)*(l-b)+b,w>=1){requestAnimationFrame(()=>{n(null)});return}requestAnimationFrame(y)};return b===l?(n(new Error("Element already at target position")),B):(requestAnimationFrame(y),B)}const me=["onChange"],Se={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function xe(t){const{onChange:e}=t,l=st(t,me),s=d.useRef(),n=d.useRef(null),a=()=>{s.current=n.current.offsetHeight-n.current.clientHeight};return re(()=>{const h=At(()=>{const b=s.current;a(),b!==s.current&&e(s.current)}),v=Ot(n.current);return v.addEventListener("resize",h),()=>{h.clear(),v.removeEventListener("resize",h)}},[e]),d.useEffect(()=>{a(),e(s.current)},[e]),u.jsx("div",f({style:Se},l,{ref:n}))}function ge(t){return vt("MuiTabScrollButton",t)}const ye=ht("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Ce=["className","slots","slotProps","direction","orientation","disabled"],Be=t=>{const{classes:e,orientation:l,disabled:s}=t;return St({root:["root",l,s&&"disabled"]},ge,e)},we=O(jt,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.root,l.orientation&&e[l.orientation]]}})(({ownerState:t})=>f({width:40,flexShrink:0,opacity:.8,[`&.${ye.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),Te=d.forwardRef(function(e,l){var s,n;const a=mt({props:e,name:"MuiTabScrollButton"}),{className:h,slots:v={},slotProps:b={},direction:x}=a,B=st(a,Ce),y=Xt(),m=f({isRtl:y},a),w=Be(m),F=(s=v.StartScrollButtonIcon)!=null?s:fe,T=(n=v.EndScrollButtonIcon)!=null?n:pe,g=nt({elementType:F,externalSlotProps:b.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m}),X=nt({elementType:T,externalSlotProps:b.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m});return u.jsx(we,f({component:"div",className:k(w.root,h),ref:l,role:null,ownerState:m,tabIndex:null},B,{children:x==="left"?u.jsx(F,f({},g)):u.jsx(T,f({},X))}))});function Me(t){return vt("MuiTabs",t)}const pt=ht("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Ie=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],Nt=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,kt=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,rt=(t,e,l)=>{let s=!1,n=l(t,e);for(;n;){if(n===t.firstChild){if(s)return;s=!0}const a=n.disabled||n.getAttribute("aria-disabled")==="true";if(!n.hasAttribute("tabindex")||a)n=l(t,n);else{n.focus();return}}},Ee=t=>{const{vertical:e,fixed:l,hideScrollbar:s,scrollableX:n,scrollableY:a,centered:h,scrollButtonsHideMobile:v,classes:b}=t;return St({root:["root",e&&"vertical"],scroller:["scroller",l&&"fixed",s&&"hideScrollbar",n&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",h&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",v&&"scrollButtonsHideMobile"],scrollableX:[n&&"scrollableX"],hideScrollbar:[s&&"hideScrollbar"]},Me,b)},Re=O("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[{[`& .${pt.scrollButtons}`]:e.scrollButtons},{[`& .${pt.scrollButtons}`]:l.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,l.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>f({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${pt.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),ze=O("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.scroller,l.fixed&&e.fixed,l.hideScrollbar&&e.hideScrollbar,l.scrollableX&&e.scrollableX,l.scrollableY&&e.scrollableY]}})(({ownerState:t})=>f({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),We=O("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.flexContainer,l.vertical&&e.flexContainerVertical,l.centered&&e.centered]}})(({ownerState:t})=>f({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),Pe=O("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>f({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),Ne=O(xe)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Lt={},gt=d.forwardRef(function(e,l){const s=mt({props:e,name:"MuiTabs"}),n=ne(),a=Xt(),{"aria-label":h,"aria-labelledby":v,action:b,centered:x=!1,children:B,className:y,component:m="div",allowScrollButtonsMobile:w=!1,indicatorColor:F="primary",onChange:T,orientation:g="horizontal",ScrollButtonComponent:X=Te,scrollButtons:E="auto",selectionFollowsFocus:at,slots:D={},slotProps:V={},TabIndicatorProps:_={},TabScrollButtonProps:j={},textColor:Z="primary",value:U,variant:R="standard",visibleScrollbar:it=!1}=s,_t=st(s,Ie),M=R==="scrollable",C=g==="vertical",q=C?"scrollTop":"scrollLeft",tt=C?"top":"left",et=C?"bottom":"right",ct=C?"clientHeight":"clientWidth",G=C?"height":"width",$=f({},s,{component:m,allowScrollButtonsMobile:w,indicatorColor:F,orientation:g,vertical:C,scrollButtons:E,textColor:Z,variant:R,visibleScrollbar:it,fixed:!M,hideScrollbar:M&&!it,scrollableX:M&&!C,scrollableY:M&&C,centered:x&&!M,scrollButtonsHideMobile:!w}),W=Ee($),Ut=nt({elementType:D.StartScrollButtonIcon,externalSlotProps:V.startScrollButtonIcon,ownerState:$}),Yt=nt({elementType:D.EndScrollButtonIcon,externalSlotProps:V.endScrollButtonIcon,ownerState:$}),[yt,Kt]=d.useState(!1),[H,Ct]=d.useState(Lt),[Bt,Vt]=d.useState(!1),[wt,qt]=d.useState(!1),[Tt,Gt]=d.useState(!1),[Mt,Jt]=d.useState({overflow:"hidden",scrollbarWidth:0}),It=new Map,z=d.useRef(null),A=d.useRef(null),Et=()=>{const o=z.current;let r;if(o){const i=o.getBoundingClientRect();r={clientWidth:o.clientWidth,scrollLeft:o.scrollLeft,scrollTop:o.scrollTop,scrollLeftNormalized:ie(o,a?"rtl":"ltr"),scrollWidth:o.scrollWidth,top:i.top,bottom:i.bottom,left:i.left,right:i.right}}let c;if(o&&U!==!1){const i=A.current.children;if(i.length>0){const p=i[It.get(U)];c=p?p.getBoundingClientRect():null}}return{tabsMeta:r,tabMeta:c}},J=ft(()=>{const{tabsMeta:o,tabMeta:r}=Et();let c=0,i;if(C)i="top",r&&o&&(c=r.top-o.top+o.scrollTop);else if(i=a?"right":"left",r&&o){const S=a?o.scrollLeftNormalized+o.clientWidth-o.scrollWidth:o.scrollLeft;c=(a?-1:1)*(r[i]-o[i]+S)}const p={[i]:c,[G]:r?r[G]:0};if(isNaN(H[i])||isNaN(H[G]))Ct(p);else{const S=Math.abs(H[i]-p[i]),I=Math.abs(H[G]-p[G]);(S>=1||I>=1)&&Ct(p)}}),dt=(o,{animation:r=!0}={})=>{r?ve(q,z.current,o,{duration:n.transitions.duration.standard}):z.current[q]=o},Rt=o=>{let r=z.current[q];C?r+=o:(r+=o*(a?-1:1),r*=a&&Dt()==="reverse"?-1:1),dt(r)},zt=()=>{const o=z.current[ct];let r=0;const c=Array.from(A.current.children);for(let i=0;i<c.length;i+=1){const p=c[i];if(r+p[ct]>o){i===0&&(r=o);break}r+=p[ct]}return r},Qt=()=>{Rt(-1*zt())},Zt=()=>{Rt(zt())},te=d.useCallback(o=>{Jt({overflow:null,scrollbarWidth:o})},[]),ee=()=>{const o={};o.scrollbarSizeListener=M?u.jsx(Ne,{onChange:te,className:k(W.scrollableX,W.hideScrollbar)}):null;const c=M&&(E==="auto"&&(Bt||wt)||E===!0);return o.scrollButtonStart=c?u.jsx(X,f({slots:{StartScrollButtonIcon:D.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:Ut},orientation:g,direction:a?"right":"left",onClick:Qt,disabled:!Bt},j,{className:k(W.scrollButtons,j.className)})):null,o.scrollButtonEnd=c?u.jsx(X,f({slots:{EndScrollButtonIcon:D.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Yt},orientation:g,direction:a?"left":"right",onClick:Zt,disabled:!wt},j,{className:k(W.scrollButtons,j.className)})):null,o},Wt=ft(o=>{const{tabsMeta:r,tabMeta:c}=Et();if(!(!c||!r)){if(c[tt]<r[tt]){const i=r[q]+(c[tt]-r[tt]);dt(i,{animation:o})}else if(c[et]>r[et]){const i=r[q]+(c[et]-r[et]);dt(i,{animation:o})}}}),ot=ft(()=>{M&&E!==!1&&Gt(!Tt)});d.useEffect(()=>{const o=At(()=>{z.current&&J()});let r;const c=S=>{S.forEach(I=>{I.removedNodes.forEach(Q=>{var P;(P=r)==null||P.unobserve(Q)}),I.addedNodes.forEach(Q=>{var P;(P=r)==null||P.observe(Q)})}),o(),ot()},i=Ot(z.current);i.addEventListener("resize",o);let p;return typeof ResizeObserver<"u"&&(r=new ResizeObserver(o),Array.from(A.current.children).forEach(S=>{r.observe(S)})),typeof MutationObserver<"u"&&(p=new MutationObserver(c),p.observe(A.current,{childList:!0})),()=>{var S,I;o.clear(),i.removeEventListener("resize",o),(S=p)==null||S.disconnect(),(I=r)==null||I.disconnect()}},[J,ot]),d.useEffect(()=>{const o=Array.from(A.current.children),r=o.length;if(typeof IntersectionObserver<"u"&&r>0&&M&&E!==!1){const c=o[0],i=o[r-1],p={root:z.current,threshold:.99},S=bt=>{Vt(!bt[0].isIntersecting)},I=new IntersectionObserver(S,p);I.observe(c);const Q=bt=>{qt(!bt[0].isIntersecting)},P=new IntersectionObserver(Q,p);return P.observe(i),()=>{I.disconnect(),P.disconnect()}}},[M,E,Tt,B==null?void 0:B.length]),d.useEffect(()=>{Kt(!0)},[]),d.useEffect(()=>{J()}),d.useEffect(()=>{Wt(Lt!==H)},[Wt,H]),d.useImperativeHandle(b,()=>({updateIndicator:J,updateScrollButtons:ot}),[J,ot]);const Pt=u.jsx(Pe,f({},_,{className:k(W.indicator,_.className),ownerState:$,style:f({},H,_.style)}));let lt=0;const oe=d.Children.map(B,o=>{if(!d.isValidElement(o))return null;const r=o.props.value===void 0?lt:o.props.value;It.set(r,lt);const c=r===U;return lt+=1,d.cloneElement(o,f({fullWidth:R==="fullWidth",indicator:c&&!yt&&Pt,selected:c,selectionFollowsFocus:at,onChange:T,textColor:Z,value:r},lt===1&&U===!1&&!o.props.tabIndex?{tabIndex:0}:{}))}),le=o=>{const r=A.current,c=se(r).activeElement;if(c.getAttribute("role")!=="tab")return;let p=g==="horizontal"?"ArrowLeft":"ArrowUp",S=g==="horizontal"?"ArrowRight":"ArrowDown";switch(g==="horizontal"&&a&&(p="ArrowRight",S="ArrowLeft"),o.key){case p:o.preventDefault(),rt(r,c,kt);break;case S:o.preventDefault(),rt(r,c,Nt);break;case"Home":o.preventDefault(),rt(r,null,Nt);break;case"End":o.preventDefault(),rt(r,null,kt);break}},ut=ee();return u.jsxs(Re,f({className:k(W.root,y),ownerState:$,ref:l,as:m},_t,{children:[ut.scrollButtonStart,ut.scrollbarSizeListener,u.jsxs(ze,{className:W.scroller,ownerState:$,style:{overflow:Mt.overflow,[C?`margin${a?"Left":"Right"}`:"marginBottom"]:it?void 0:-Mt.scrollbarWidth},ref:z,children:[u.jsx(We,{"aria-label":h,"aria-labelledby":v,"aria-orientation":g==="vertical"?"vertical":null,className:W.flexContainer,ownerState:$,onKeyDown:le,ref:A,role:"tablist",children:oe}),yt&&Pt]}),ut.scrollButtonEnd]}))}),Ft="index",K={tabs:`${Ft}-tabs`,tab:`${Ft}-tab`},ke=ae(gt)(({theme:t})=>({[`& .${K.tabs}`]:{},[`& .${K.tab}`]:{fontSize:"0.875rem",[t.breakpoints.up("md")]:{fontSize:"1rem"}}}));function Le({tabs:t,current:e,onChange:l,...s}){return u.jsx(gt,{scrollButtons:"auto",value:e,onChange:(n,a)=>l(a),...s,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{borderRadius:"100vw"},".MuiTabs-flexContainer":{borderRadius:"100vw",backgroundColor:L.backgroundsBgComponent,padding:.5,display:"inline-flex",columnGap:.25,maxWidth:"100%",overflowX:"auto"},".MuiTab-root":{borderRadius:"100vw",border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,color:L.foregroundsFgSubtile,fontSize:"13px",fontWeight:"normal",textTransform:"capitalize",transition:"background-color 0.2s ease","&.Mui-selected, &:hover":{backgroundColor:"white",borderColor:L.lineBorderBase,color:L.foregroundsFgBase}},".MuiTabs-indicator":{display:"none"},...s.sx},children:t.map(n=>u.jsx(xt,{className:K.tab,value:n.value,label:n.label,icon:n.icon},n.value))})}function Fe({tabs:t,current:e,onChange:l,...s}){return u.jsx(gt,{scrollButtons:"auto",value:e,onChange:(n,a)=>l(a),...s,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{"&::after":{content:'""',display:"block",width:"100%",height:"1px",backgroundColor:L.strokeBorderStrong,bottom:0}},".MuiTabs-flexContainer":{display:"inline-flex",columnGap:2.5,px:0,pb:.5},".MuiTab-root":{border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,px:0,color:L.foregroundsFgSubtile,fontSize:"14px",fontWeight:500,textTransform:"capitalize",minWidth:"auto","&.Mui-selected, &:hover":{color:L.foregroundsFgBase}},".MuiTabs-indicator":{height:"1px",backgroundColor:L.foregroundsFgBase},...s.sx},children:t.map(n=>u.jsx(xt,{className:K.tab,value:n.value,label:n.label,icon:n.icon},n.value))})}function $e({tabs:t,current:e,onChange:l,variant:s,...n}){return s==="card"?u.jsx(Le,{...n,tabs:t,current:e,onChange:l}):s==="line"?u.jsx(Fe,{...n,tabs:t,current:e,onChange:l}):u.jsx(ke,{scrollButtons:"auto",variant:"scrollable",value:e,onChange:(a,h)=>l(h),indicatorColor:"primary",...n,className:[K.tabs,n.className||""].join(" "),children:t.map(a=>u.jsx(xt,{className:K.tab,value:a.value,label:a.label,icon:a.icon},a.value))})}export{pe as K,$e as T,fe as a,gt as b,xt as c,Dt as d,ie as g};
1
+ import{aK as ht,aL as vt,aM as O,cX as $t,aN as jt,aQ as p,r as d,aO as mt,aP as st,aS as k,j as u,aT as St,az as Ht,cS as re,cY as At,cZ as Ot,c_ as Xt,aR as nt,ap as ne,c$ as pt,d0 as se,bx as ae,bF as L}from"./index-dEKXkm4C.js";let K;function _t(){if(K)return K;const t=document.createElement("div"),e=document.createElement("div");return e.style.width="10px",e.style.height="1px",t.appendChild(e),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),K="reverse",t.scrollLeft>0?K="default":(t.scrollLeft=1,t.scrollLeft===0&&(K="negative")),document.body.removeChild(t),K}function ie(t,e){const l=t.scrollLeft;if(e!=="rtl")return l;switch(_t()){case"negative":return t.scrollWidth-t.clientWidth+l;case"reverse":return t.scrollWidth-t.clientWidth-l;default:return l}}function ce(t){return vt("MuiTab",t)}const N=ht("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),de=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],ue=t=>{const{classes:e,textColor:l,fullWidth:s,wrapped:n,icon:a,label:h,selected:v,disabled:b}=t,x={root:["root",a&&h&&"labelIcon",`textColor${jt(l)}`,s&&"fullWidth",n&&"wrapped",v&&"selected",b&&"disabled"],iconWrapper:["iconWrapper"]};return St(x,ce,e)},be=O($t,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.root,l.label&&l.icon&&e.labelIcon,e[`textColor${jt(l.textColor)}`],l.fullWidth&&e.fullWidth,l.wrapped&&e.wrapped,{[`& .${N.iconWrapper}`]:e.iconWrapper}]}})(({theme:t,ownerState:e})=>p({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${N.iconWrapper}`]:p({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${N.selected}`]:{opacity:1},[`&.${N.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${N.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${N.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${N.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${N.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),xt=d.forwardRef(function(e,l){const s=mt({props:e,name:"MuiTab"}),{className:n,disabled:a=!1,disableFocusRipple:h=!1,fullWidth:v,icon:b,iconPosition:x="top",indicator:B,label:y,onChange:m,onClick:w,onFocus:F,selected:T,selectionFollowsFocus:g,textColor:X="inherit",value:E,wrapped:at=!1}=s,_=st(s,de),V=p({},s,{disabled:a,disableFocusRipple:h,selected:T,icon:!!b,iconPosition:x,label:!!y,fullWidth:v,textColor:X,wrapped:at}),D=ue(V),$=b&&y&&d.isValidElement(b)?d.cloneElement(b,{className:k(D.iconWrapper,b.props.className)}):b,J=R=>{!T&&m&&m(R,E),w&&w(R)},Y=R=>{g&&!T&&m&&m(R,E),F&&F(R)};return u.jsxs(be,p({focusRipple:!h,className:k(D.root,n),ref:l,role:"tab","aria-selected":T,disabled:a,onClick:J,onFocus:Y,ownerState:V,tabIndex:T?0:-1},_,{children:[x==="top"||x==="start"?u.jsxs(d.Fragment,{children:[$,y]}):u.jsxs(d.Fragment,{children:[y,$]}),B]}))}),pe=Ht(u.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),fe=Ht(u.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function he(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function ve(t,e,l,s={},n=()=>{}){const{ease:a=he,duration:h=300}=s;let v=null;const b=e[t];let x=!1;const B=()=>{x=!0},y=m=>{if(x){n(new Error("Animation cancelled"));return}v===null&&(v=m);const w=Math.min(1,(m-v)/h);if(e[t]=a(w)*(l-b)+b,w>=1){requestAnimationFrame(()=>{n(null)});return}requestAnimationFrame(y)};return b===l?(n(new Error("Element already at target position")),B):(requestAnimationFrame(y),B)}const me=["onChange"],Se={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function xe(t){const{onChange:e}=t,l=st(t,me),s=d.useRef(),n=d.useRef(null),a=()=>{s.current=n.current.offsetHeight-n.current.clientHeight};return re(()=>{const h=At(()=>{const b=s.current;a(),b!==s.current&&e(s.current)}),v=Ot(n.current);return v.addEventListener("resize",h),()=>{h.clear(),v.removeEventListener("resize",h)}},[e]),d.useEffect(()=>{a(),e(s.current)},[e]),u.jsx("div",p({style:Se},l,{ref:n}))}function ge(t){return vt("MuiTabScrollButton",t)}const ye=ht("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Ce=["className","slots","slotProps","direction","orientation","disabled"],Be=t=>{const{classes:e,orientation:l,disabled:s}=t;return St({root:["root",l,s&&"disabled"]},ge,e)},we=O($t,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.root,l.orientation&&e[l.orientation]]}})(({ownerState:t})=>p({width:40,flexShrink:0,opacity:.8,[`&.${ye.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),Te=d.forwardRef(function(e,l){var s,n;const a=mt({props:e,name:"MuiTabScrollButton"}),{className:h,slots:v={},slotProps:b={},direction:x}=a,B=st(a,Ce),y=Xt(),m=p({isRtl:y},a),w=Be(m),F=(s=v.StartScrollButtonIcon)!=null?s:pe,T=(n=v.EndScrollButtonIcon)!=null?n:fe,g=nt({elementType:F,externalSlotProps:b.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m}),X=nt({elementType:T,externalSlotProps:b.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m});return u.jsx(we,p({component:"div",className:k(w.root,h),ref:l,role:null,ownerState:m,tabIndex:null},B,{children:x==="left"?u.jsx(F,p({},g)):u.jsx(T,p({},X))}))});function Me(t){return vt("MuiTabs",t)}const ft=ht("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Ie=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],Nt=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,kt=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,rt=(t,e,l)=>{let s=!1,n=l(t,e);for(;n;){if(n===t.firstChild){if(s)return;s=!0}const a=n.disabled||n.getAttribute("aria-disabled")==="true";if(!n.hasAttribute("tabindex")||a)n=l(t,n);else{n.focus();return}}},Ee=t=>{const{vertical:e,fixed:l,hideScrollbar:s,scrollableX:n,scrollableY:a,centered:h,scrollButtonsHideMobile:v,classes:b}=t;return St({root:["root",e&&"vertical"],scroller:["scroller",l&&"fixed",s&&"hideScrollbar",n&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",h&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",v&&"scrollButtonsHideMobile"],scrollableX:[n&&"scrollableX"],hideScrollbar:[s&&"hideScrollbar"]},Me,b)},Re=O("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[{[`& .${ft.scrollButtons}`]:e.scrollButtons},{[`& .${ft.scrollButtons}`]:l.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,l.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>p({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${ft.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),ze=O("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.scroller,l.fixed&&e.fixed,l.hideScrollbar&&e.hideScrollbar,l.scrollableX&&e.scrollableX,l.scrollableY&&e.scrollableY]}})(({ownerState:t})=>p({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),We=O("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.flexContainer,l.vertical&&e.flexContainerVertical,l.centered&&e.centered]}})(({ownerState:t})=>p({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),Pe=O("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>p({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),Ne=O(xe)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Lt={},gt=d.forwardRef(function(e,l){const s=mt({props:e,name:"MuiTabs"}),n=ne(),a=Xt(),{"aria-label":h,"aria-labelledby":v,action:b,centered:x=!1,children:B,className:y,component:m="div",allowScrollButtonsMobile:w=!1,indicatorColor:F="primary",onChange:T,orientation:g="horizontal",ScrollButtonComponent:X=Te,scrollButtons:E="auto",selectionFollowsFocus:at,slots:_={},slotProps:V={},TabIndicatorProps:D={},TabScrollButtonProps:$={},textColor:J="primary",value:Y,variant:R="standard",visibleScrollbar:it=!1}=s,Dt=st(s,Ie),M=R==="scrollable",C=g==="vertical",q=C?"scrollTop":"scrollLeft",tt=C?"top":"left",et=C?"bottom":"right",ct=C?"clientHeight":"clientWidth",G=C?"height":"width",j=p({},s,{component:m,allowScrollButtonsMobile:w,indicatorColor:F,orientation:g,vertical:C,scrollButtons:E,textColor:J,variant:R,visibleScrollbar:it,fixed:!M,hideScrollbar:M&&!it,scrollableX:M&&!C,scrollableY:M&&C,centered:x&&!M,scrollButtonsHideMobile:!w}),W=Ee(j),Yt=nt({elementType:_.StartScrollButtonIcon,externalSlotProps:V.startScrollButtonIcon,ownerState:j}),Kt=nt({elementType:_.EndScrollButtonIcon,externalSlotProps:V.endScrollButtonIcon,ownerState:j}),[yt,Ut]=d.useState(!1),[H,Ct]=d.useState(Lt),[Bt,Vt]=d.useState(!1),[wt,qt]=d.useState(!1),[Tt,Gt]=d.useState(!1),[Mt,Qt]=d.useState({overflow:"hidden",scrollbarWidth:0}),It=new Map,z=d.useRef(null),A=d.useRef(null),Et=()=>{const o=z.current;let r;if(o){const i=o.getBoundingClientRect();r={clientWidth:o.clientWidth,scrollLeft:o.scrollLeft,scrollTop:o.scrollTop,scrollLeftNormalized:ie(o,a?"rtl":"ltr"),scrollWidth:o.scrollWidth,top:i.top,bottom:i.bottom,left:i.left,right:i.right}}let c;if(o&&Y!==!1){const i=A.current.children;if(i.length>0){const f=i[It.get(Y)];c=f?f.getBoundingClientRect():null}}return{tabsMeta:r,tabMeta:c}},Q=pt(()=>{const{tabsMeta:o,tabMeta:r}=Et();let c=0,i;if(C)i="top",r&&o&&(c=r.top-o.top+o.scrollTop);else if(i=a?"right":"left",r&&o){const S=a?o.scrollLeftNormalized+o.clientWidth-o.scrollWidth:o.scrollLeft;c=(a?-1:1)*(r[i]-o[i]+S)}const f={[i]:c,[G]:r?r[G]:0};if(isNaN(H[i])||isNaN(H[G]))Ct(f);else{const S=Math.abs(H[i]-f[i]),I=Math.abs(H[G]-f[G]);(S>=1||I>=1)&&Ct(f)}}),dt=(o,{animation:r=!0}={})=>{r?ve(q,z.current,o,{duration:n.transitions.duration.standard}):z.current[q]=o},Rt=o=>{let r=z.current[q];C?r+=o:(r+=o*(a?-1:1),r*=a&&_t()==="reverse"?-1:1),dt(r)},zt=()=>{const o=z.current[ct];let r=0;const c=Array.from(A.current.children);for(let i=0;i<c.length;i+=1){const f=c[i];if(r+f[ct]>o){i===0&&(r=o);break}r+=f[ct]}return r},Zt=()=>{Rt(-1*zt())},Jt=()=>{Rt(zt())},te=d.useCallback(o=>{Qt({overflow:null,scrollbarWidth:o})},[]),ee=()=>{const o={};o.scrollbarSizeListener=M?u.jsx(Ne,{onChange:te,className:k(W.scrollableX,W.hideScrollbar)}):null;const c=M&&(E==="auto"&&(Bt||wt)||E===!0);return o.scrollButtonStart=c?u.jsx(X,p({slots:{StartScrollButtonIcon:_.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:Yt},orientation:g,direction:a?"right":"left",onClick:Zt,disabled:!Bt},$,{className:k(W.scrollButtons,$.className)})):null,o.scrollButtonEnd=c?u.jsx(X,p({slots:{EndScrollButtonIcon:_.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Kt},orientation:g,direction:a?"left":"right",onClick:Jt,disabled:!wt},$,{className:k(W.scrollButtons,$.className)})):null,o},Wt=pt(o=>{const{tabsMeta:r,tabMeta:c}=Et();if(!(!c||!r)){if(c[tt]<r[tt]){const i=r[q]+(c[tt]-r[tt]);dt(i,{animation:o})}else if(c[et]>r[et]){const i=r[q]+(c[et]-r[et]);dt(i,{animation:o})}}}),ot=pt(()=>{M&&E!==!1&&Gt(!Tt)});d.useEffect(()=>{const o=At(()=>{z.current&&Q()});let r;const c=S=>{S.forEach(I=>{I.removedNodes.forEach(Z=>{var P;(P=r)==null||P.unobserve(Z)}),I.addedNodes.forEach(Z=>{var P;(P=r)==null||P.observe(Z)})}),o(),ot()},i=Ot(z.current);i.addEventListener("resize",o);let f;return typeof ResizeObserver<"u"&&(r=new ResizeObserver(o),Array.from(A.current.children).forEach(S=>{r.observe(S)})),typeof MutationObserver<"u"&&(f=new MutationObserver(c),f.observe(A.current,{childList:!0})),()=>{var S,I;o.clear(),i.removeEventListener("resize",o),(S=f)==null||S.disconnect(),(I=r)==null||I.disconnect()}},[Q,ot]),d.useEffect(()=>{const o=Array.from(A.current.children),r=o.length;if(typeof IntersectionObserver<"u"&&r>0&&M&&E!==!1){const c=o[0],i=o[r-1],f={root:z.current,threshold:.99},S=bt=>{Vt(!bt[0].isIntersecting)},I=new IntersectionObserver(S,f);I.observe(c);const Z=bt=>{qt(!bt[0].isIntersecting)},P=new IntersectionObserver(Z,f);return P.observe(i),()=>{I.disconnect(),P.disconnect()}}},[M,E,Tt,B==null?void 0:B.length]),d.useEffect(()=>{Ut(!0)},[]),d.useEffect(()=>{Q()}),d.useEffect(()=>{Wt(Lt!==H)},[Wt,H]),d.useImperativeHandle(b,()=>({updateIndicator:Q,updateScrollButtons:ot}),[Q,ot]);const Pt=u.jsx(Pe,p({},D,{className:k(W.indicator,D.className),ownerState:j,style:p({},H,D.style)}));let lt=0;const oe=d.Children.map(B,o=>{if(!d.isValidElement(o))return null;const r=o.props.value===void 0?lt:o.props.value;It.set(r,lt);const c=r===Y;return lt+=1,d.cloneElement(o,p({fullWidth:R==="fullWidth",indicator:c&&!yt&&Pt,selected:c,selectionFollowsFocus:at,onChange:T,textColor:J,value:r},lt===1&&Y===!1&&!o.props.tabIndex?{tabIndex:0}:{}))}),le=o=>{const r=A.current,c=se(r).activeElement;if(c.getAttribute("role")!=="tab")return;let f=g==="horizontal"?"ArrowLeft":"ArrowUp",S=g==="horizontal"?"ArrowRight":"ArrowDown";switch(g==="horizontal"&&a&&(f="ArrowRight",S="ArrowLeft"),o.key){case f:o.preventDefault(),rt(r,c,kt);break;case S:o.preventDefault(),rt(r,c,Nt);break;case"Home":o.preventDefault(),rt(r,null,Nt);break;case"End":o.preventDefault(),rt(r,null,kt);break}},ut=ee();return u.jsxs(Re,p({className:k(W.root,y),ownerState:j,ref:l,as:m},Dt,{children:[ut.scrollButtonStart,ut.scrollbarSizeListener,u.jsxs(ze,{className:W.scroller,ownerState:j,style:{overflow:Mt.overflow,[C?`margin${a?"Left":"Right"}`:"marginBottom"]:it?void 0:-Mt.scrollbarWidth},ref:z,children:[u.jsx(We,{"aria-label":h,"aria-labelledby":v,"aria-orientation":g==="vertical"?"vertical":null,className:W.flexContainer,ownerState:j,onKeyDown:le,ref:A,role:"tablist",children:oe}),yt&&Pt]}),ut.scrollButtonEnd]}))}),Ft="index",U={tabs:`${Ft}-tabs`,tab:`${Ft}-tab`},ke=ae(gt)(({theme:t})=>({[`& .${U.tabs}`]:{},[`& .${U.tab}`]:{fontSize:"0.875rem",[t.breakpoints.up("md")]:{fontSize:"1rem"}}}));function Le({tabs:t,current:e,onChange:l,...s}){return u.jsx(gt,{scrollButtons:"auto",value:e,onChange:(n,a)=>l(a),...s,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{borderRadius:"100vw"},".MuiTabs-flexContainer":{borderRadius:"100vw",backgroundColor:L.backgroundsBgComponent,padding:.5,display:"inline-flex",columnGap:.25,maxWidth:"100%",overflowX:"auto"},".MuiTab-root":{borderRadius:"100vw",border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,color:L.foregroundsFgSubtile,fontSize:"13px",fontWeight:"normal",textTransform:"capitalize",transition:"background-color 0.2s ease","&.Mui-selected, &:hover":{backgroundColor:"white",borderColor:L.lineBorderBase,color:L.foregroundsFgBase}},".MuiTabs-indicator":{display:"none"},...s.sx},children:t.map(n=>u.jsx(xt,{className:U.tab,value:n.value,label:n.label,icon:n.icon},n.value))})}function Fe({tabs:t,current:e,onChange:l,...s}){return u.jsx(gt,{scrollButtons:"auto",value:e,onChange:(n,a)=>l(a),...s,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{"&::after":{content:'""',display:"block",width:"100%",height:"1px",backgroundColor:L.strokeBorderStrong,bottom:0}},".MuiTabs-flexContainer":{display:"inline-flex",columnGap:2.5,px:0,pb:.5},".MuiTab-root":{border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,px:0,color:L.foregroundsFgSubtile,fontSize:"14px",fontWeight:500,textTransform:"capitalize",minWidth:"auto","&.Mui-selected, &:hover":{color:L.foregroundsFgBase}},".MuiTabs-indicator":{height:"1px",backgroundColor:L.foregroundsFgBase},...s.sx},children:t.map(n=>u.jsx(xt,{className:U.tab,value:n.value,label:n.label,icon:n.icon},n.value))})}function je({tabs:t,current:e,onChange:l,variant:s,...n}){return s==="card"?u.jsx(Le,{...n,tabs:t,current:e,onChange:l}):s==="line"?u.jsx(Fe,{...n,tabs:t,current:e,onChange:l}):u.jsx(ke,{scrollButtons:"auto",variant:"scrollable",value:e,onChange:(a,h)=>l(h),indicatorColor:"primary",...n,className:[U.tabs,n.className||""].join(" "),children:t.map(a=>u.jsx(xt,{className:U.tab,value:a.value,label:a.label,icon:a.icon},a.value))})}export{fe as K,je as T,pe as a,gt as b,xt as c,_t as d,ie as g};
@@ -1,4 +1,4 @@
1
- var ft=Object.defineProperty;var dt=(e,n,t)=>n in e?ft(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var D=(e,n,t)=>dt(e,typeof n!="symbol"?n+"":n,t);import{P as f,r as P,I as ht,l as pt,j as g,aH as gt,bG as ye,br as mt,bs as yt,dl as bt,an as xt,bF as A,bp as wt,B as It,dm as St,T as vt,dn as Tt,dp as Ct,a6 as At,dq as jt,bD as Ne,u as Fe,aI as Pt,f as kt,F as Lt,ah as Mt}from"./index-C7otKf8F.js";import{D as Et}from"./index-BkwS3xmJ.js";import{L as Ot}from"./MoreVert-C9UJnjfF.js";import{L as Rt}from"./ListItemButton-YchFGwTe.js";import{L as qt}from"./selector-Bgtpcya_.js";/**
1
+ var ft=Object.defineProperty;var dt=(e,n,t)=>n in e?ft(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var D=(e,n,t)=>dt(e,typeof n!="symbol"?n+"":n,t);import{P as f,r as P,J as ht,l as pt,j as g,aI as gt,bG as ye,br as mt,bs as yt,dk as bt,ao as xt,bF as A,bp as wt,B as It,dl as St,T as vt,dm as Tt,dn as Ct,a7 as At,dp as jt,bD as Ne,u as Fe,aJ as Pt,f as kt,F as Lt,ai as Mt}from"./index-dEKXkm4C.js";import{D as Et}from"./index-BOpUgQ8H.js";import{L as Ot}from"./MoreVert-GvhXcnsL.js";import{L as Rt}from"./ListItemButton-DtweULpb.js";import{L as _t}from"./selector-CbAq7CNk.js";/**
2
2
  * (c) Iconify
3
3
  *
4
4
  * For the full copyright and license information, please view the license.txt
@@ -8,4 +8,4 @@ var ft=Object.defineProperty;var dt=(e,n,t)=>n in e?ft(e,n,{enumerable:!0,config
8
8
  *
9
9
  * @license MIT
10
10
  * @version 1.0.8
11
- */const He=Object.freeze({left:0,top:0,width:16,height:16}),V=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),F=Object.freeze({...He,...V}),te=Object.freeze({...F,body:"",hidden:!1}),_t=Object.freeze({width:null,height:null}),ze=Object.freeze({..._t,...V});function Nt(e,n=0){const t=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(t===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(t!==e){let o=0;switch(t){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-t.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return n}const Ft=/[\s,]+/;function Ht(e,n){n.split(Ft).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Be={...ze,preserveAspectRatio:""};function be(e){const n={...Be},t=(r,o)=>e.getAttribute(r)||o;return n.width=t("width",null),n.height=t("height",null),n.rotate=Nt(t("rotate","")),Ht(n,t("flip","")),n.preserveAspectRatio=t("preserveAspectRatio",t("preserveaspectratio","")),n}function zt(e,n){for(const t in Be)if(e[t]!==n[t])return!0;return!1}const O=/^[a-z0-9]+(-[a-z0-9]+)*$/,H=(e,n,t,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 a=o.pop(),c=o.pop(),l={provider:o.length>0?o[0]:r,prefix:c,name:a};return n&&!U(l)?null:l}const s=o[0],i=s.split("-");if(i.length>1){const a={provider:r,prefix:i.shift(),name:i.join("-")};return n&&!U(a)?null:a}if(t&&r===""){const a={provider:r,prefix:"",name:s};return n&&!U(a,t)?null:a}return null},U=(e,n)=>e?!!((e.provider===""||e.provider.match(O))&&(n&&e.prefix===""||e.prefix.match(O))&&e.name.match(O)):!1;function Bt(e,n){const t={};!e.hFlip!=!n.hFlip&&(t.hFlip=!0),!e.vFlip!=!n.vFlip&&(t.vFlip=!0);const r=((e.rotate||0)+(n.rotate||0))%4;return r&&(t.rotate=r),t}function xe(e,n){const t=Bt(e,n);for(const r in te)r in V?r in e&&!(r in t)&&(t[r]=V[r]):r in n?t[r]=n[r]:r in e&&(t[r]=e[r]);return t}function Dt(e,n){const t=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function s(i){if(t[i])return o[i]=[];if(!(i in o)){o[i]=null;const a=r[i]&&r[i].parent,c=a&&s(a);c&&(o[i]=[a].concat(c))}return o[i]}return Object.keys(t).concat(Object.keys(r)).forEach(s),o}function $t(e,n,t){const r=e.icons,o=e.aliases||Object.create(null);let s={};function i(a){s=xe(r[a]||o[a],s)}return i(n),t.forEach(i),xe(e,s)}function De(e,n){const t=[];if(typeof e!="object"||typeof e.icons!="object")return t;e.not_found instanceof Array&&e.not_found.forEach(o=>{n(o,null),t.push(o)});const r=Dt(e);for(const o in r){const s=r[o];s&&(n(o,$t(e,o,s)),t.push(o))}return t}const Ut={provider:"",aliases:{},not_found:{},...He};function X(e,n){for(const t in n)if(t in e&&typeof e[t]!=typeof n[t])return!1;return!0}function $e(e){if(typeof e!="object"||e===null)return null;const n=e;if(typeof n.prefix!="string"||!e.icons||typeof e.icons!="object"||!X(e,Ut))return null;const t=n.icons;for(const o in t){const s=t[o];if(!o.match(O)||typeof s.body!="string"||!X(s,te))return null}const r=n.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(O)||typeof i!="string"||!t[i]&&!r[i]||!X(s,te))return null}return n}const W=Object.create(null);function Qt(e,n){return{provider:e,prefix:n,icons:Object.create(null),missing:new Set}}function L(e,n){const t=W[e]||(W[e]=Object.create(null));return t[n]||(t[n]=Qt(e,n))}function ue(e,n){return $e(n)?De(n,(t,r)=>{r?e.icons[t]=r:e.missing.add(t)}):[]}function Vt(e,n,t){try{if(typeof t.body=="string")return e.icons[n]={...t},!0}catch{}return!1}function Wt(e,n){let t=[];return(typeof e=="string"?[e]:Object.keys(W)).forEach(o=>{(typeof o=="string"&&typeof n=="string"?[n]:Object.keys(W[o]||{})).forEach(i=>{const a=L(o,i);t=t.concat(Object.keys(a.icons).map(c=>(o!==""?"@"+o+":":"")+i+":"+c))})}),t}let q=!1;function Ue(e){return typeof e=="boolean"&&(q=e),q}function _(e){const n=typeof e=="string"?H(e,!0,q):e;if(n){const t=L(n.provider,n.prefix),r=n.name;return t.icons[r]||(t.missing.has(r)?null:void 0)}}function Qe(e,n){const t=H(e,!0,q);if(!t)return!1;const r=L(t.provider,t.prefix);return Vt(r,t.name,n)}function we(e,n){if(typeof e!="object")return!1;if(typeof n!="string"&&(n=e.provider||""),q&&!n&&!e.prefix){let o=!1;return $e(e)&&(e.prefix="",De(e,(s,i)=>{i&&Qe(s,i)&&(o=!0)})),o}const t=e.prefix;if(!U({provider:n,prefix:t,name:"a"}))return!1;const r=L(n,t);return!!ue(r,e)}function Zt(e){return!!_(e)}function Gt(e){const n=_(e);return n?{...F,...n}:null}function Jt(e){const n={loaded:[],missing:[],pending:[]},t=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,a=o.name,c=t[s]||(t[s]=Object.create(null)),l=c[i]||(c[i]=L(s,i));let u;a in l.icons?u=n.loaded:i===""||l.missing.has(a)?u=n.missing:u=n.pending;const d={provider:s,prefix:i,name:a};u.push(d)}),n}function Ve(e,n){e.forEach(t=>{const r=t.loaderCallbacks;r&&(t.loaderCallbacks=r.filter(o=>o.id!==n))})}function Xt(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const n=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!n.length)return;let t=!1;const r=e.provider,o=e.prefix;n.forEach(s=>{const i=s.icons,a=i.pending.length;i.pending=i.pending.filter(c=>{if(c.prefix!==o)return!0;const l=c.name;if(e.icons[l])i.loaded.push({provider:r,prefix:o,name:l});else if(e.missing.has(l))i.missing.push({provider:r,prefix:o,name:l});else return t=!0,!0;return!1}),i.pending.length!==a&&(t||Ve([e],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let Yt=0;function Kt(e,n,t){const r=Yt++,o=Ve.bind(null,t,r);if(!n.pending.length)return o;const s={id:r,icons:n,callback:e,abort:o};return t.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}const ne=Object.create(null);function Ie(e,n){ne[e]=n}function oe(e){return ne[e]||ne[""]}function en(e,n=!0,t=!1){const r=[];return e.forEach(o=>{const s=typeof o=="string"?H(o,n,t):o;s&&r.push(s)}),r}var tn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function nn(e,n,t,r){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let i;if(e.random){let h=e.resources.slice(0);for(i=[];h.length>1;){const S=Math.floor(Math.random()*h.length);i.push(h[S]),h=h.slice(0,S).concat(h.slice(S+1))}i=i.concat(h)}else i=e.resources.slice(s).concat(e.resources.slice(0,s));const a=Date.now();let c="pending",l=0,u,d=null,p=[],m=[];typeof r=="function"&&m.push(r);function b(){d&&(clearTimeout(d),d=null)}function x(){c==="pending"&&(c="aborted"),b(),p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function T(h,S){S&&(m=[]),typeof h=="function"&&m.push(h)}function j(){return{startTime:a,payload:n,status:c,queriesSent:l,queriesPending:p.length,subscribe:T,abort:x}}function I(){c="failed",m.forEach(h=>{h(void 0,u)})}function y(){p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function B(h,S,k){const w=S!=="success";switch(p=p.filter(C=>C!==h),c){case"pending":break;case"failed":if(w||!e.dataAfterTimeout)return;break;default:return}if(S==="abort"){u=k,I();return}if(w){u=k,p.length||(i.length?v():I());return}if(b(),y(),!e.random){const C=e.resources.indexOf(h.resource);C!==-1&&C!==e.index&&(e.index=C)}c="completed",m.forEach(C=>{C(k)})}function v(){if(c!=="pending")return;b();const h=i.shift();if(h===void 0){if(p.length){d=setTimeout(()=>{b(),c==="pending"&&(y(),I())},e.timeout);return}I();return}const S={status:"pending",resource:h,callback:(k,w)=>{B(S,k,w)}};p.push(S),l++,d=setTimeout(v,e.rotate),t(h,n,S.callback)}return setTimeout(v),j}function We(e){const n={...tn,...e};let t=[];function r(){t=t.filter(a=>a().status==="pending")}function o(a,c,l){const u=nn(n,a,c,(d,p)=>{r(),l&&l(d,p)});return t.push(u),u}function s(a){return t.find(c=>a(c))||null}return{query:o,find:s,setIndex:a=>{n.index=a},getIndex:()=>n.index,cleanup:r}}function fe(e){let n;if(typeof e.resources=="string")n=[e.resources];else if(n=e.resources,!(n instanceof Array)||!n.length)return null;return{resources:n,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 G=Object.create(null),E=["https://api.simplesvg.com","https://api.unisvg.com"],Q=[];for(;E.length>0;)E.length===1||Math.random()>.5?Q.push(E.shift()):Q.push(E.pop());G[""]=fe({resources:["https://api.iconify.design"].concat(Q)});function Se(e,n){const t=fe(n);return t===null?!1:(G[e]=t,!0)}function J(e){return G[e]}function on(){return Object.keys(G)}function ve(){}const Y=Object.create(null);function rn(e){if(!Y[e]){const n=J(e);if(!n)return;const t=We(n),r={config:n,redundancy:t};Y[e]=r}return Y[e]}function Ze(e,n,t){let r,o;if(typeof e=="string"){const s=oe(e);if(!s)return t(void 0,424),ve;o=s.send;const i=rn(e);i&&(r=i.redundancy)}else{const s=fe(e);if(s){r=We(s);const i=e.resources?e.resources[0]:"",a=oe(i);a&&(o=a.send)}}return!r||!o?(t(void 0,424),ve):r.query(n,o,t)().abort}const Te="iconify2",N="iconify",Ge=N+"-count",Ce=N+"-version",Je=36e5,sn=168;function re(e,n){try{return e.getItem(n)}catch{}}function de(e,n,t){try{return e.setItem(n,t),!0}catch{}}function Ae(e,n){try{e.removeItem(n)}catch{}}function se(e,n){return de(e,Ge,n.toString())}function ie(e){return parseInt(re(e,Ge))||0}const M={local:!0,session:!0},Xe={local:new Set,session:new Set};let he=!1;function cn(e){he=e}let $=typeof window>"u"?{}:window;function Ye(e){const n=e+"Storage";try{if($&&$[n]&&typeof $[n].length=="number")return $[n]}catch{}M[e]=!1}function Ke(e,n){const t=Ye(e);if(!t)return;const r=re(t,Ce);if(r!==Te){if(r){const a=ie(t);for(let c=0;c<a;c++)Ae(t,N+c.toString())}de(t,Ce,Te),se(t,0);return}const o=Math.floor(Date.now()/Je)-sn,s=a=>{const c=N+a.toString(),l=re(t,c);if(typeof l=="string"){try{const u=JSON.parse(l);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&n(u,a))return!0}catch{}Ae(t,c)}};let i=ie(t);for(let a=i-1;a>=0;a--)s(a)||(a===i-1?(i--,se(t,i)):Xe[e].add(a))}function et(){if(!he){cn(!0);for(const e in M)Ke(e,n=>{const t=n.data,r=n.provider,o=t.prefix,s=L(r,o);if(!ue(s,t).length)return!1;const i=t.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function an(e,n){const t=e.lastModifiedCached;if(t&&t>=n)return t===n;if(e.lastModifiedCached=n,t)for(const r in M)Ke(r,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===n});return!0}function ln(e,n){he||et();function t(r){let o;if(!M[r]||!(o=Ye(r)))return;const s=Xe[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=ie(o),!se(o,i+1))return;const a={cached:Math.floor(Date.now()/Je),provider:e.provider,data:n};return de(o,N+i.toString(),JSON.stringify(a))}n.lastModified&&!an(e,n.lastModified)||Object.keys(n.icons).length&&(n.not_found&&(n=Object.assign({},n),delete n.not_found),t("local")||t("session"))}function je(){}function un(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Xt(e)}))}function fn(e,n){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(n).sort():e.iconsToLoad=n,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:t,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let s;if(!o||!(s=oe(t)))return;s.prepare(t,r,o).forEach(a=>{Ze(t,a,c=>{if(typeof c!="object")a.icons.forEach(l=>{e.missing.add(l)});else try{const l=ue(e,c);if(!l.length)return;const u=e.pendingIcons;u&&l.forEach(d=>{u.delete(d)}),ln(e,c)}catch(l){console.error(l)}un(e)})})}))}const pe=(e,n)=>{const t=en(e,!0,Ue()),r=Jt(t);if(!r.pending.length){let c=!0;return n&&setTimeout(()=>{c&&n(r.loaded,r.missing,r.pending,je)}),()=>{c=!1}}const o=Object.create(null),s=[];let i,a;return r.pending.forEach(c=>{const{provider:l,prefix:u}=c;if(u===a&&l===i)return;i=l,a=u,s.push(L(l,u));const d=o[l]||(o[l]=Object.create(null));d[u]||(d[u]=[])}),r.pending.forEach(c=>{const{provider:l,prefix:u,name:d}=c,p=L(l,u),m=p.pendingIcons||(p.pendingIcons=new Set);m.has(d)||(m.add(d),o[l][u].push(d))}),s.forEach(c=>{const{provider:l,prefix:u}=c;o[l][u].length&&fn(c,o[l][u])}),n?Kt(n,r,s):je},dn=e=>new Promise((n,t)=>{const r=typeof e=="string"?H(e,!0):e;if(!r){t(e);return}pe([r||e],o=>{if(o.length&&r){const s=_(r);if(s){n({...F,...s});return}}t(e)})});function hn(e){try{const n=typeof e=="string"?JSON.parse(e):e;if(typeof n.body=="string")return{...n}}catch{}}function pn(e,n){const t=typeof e=="string"?H(e,!0,!0):null;if(!t){const s=hn(e);return{value:e,data:s}}const r=_(t);if(r!==void 0||!t.prefix)return{value:e,name:t,data:r};const o=pe([t],()=>n(e,t,_(t)));return{value:e,name:t,loading:o}}function K(e){return e.hasAttribute("inline")}let tt=!1;try{tt=navigator.vendor.indexOf("Apple")===0}catch{}function gn(e,n){switch(n){case"svg":case"bg":case"mask":return n}return n!=="style"&&(tt||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const mn=/(-?[0-9.]*[0-9]+[0-9.]*)/g,yn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ce(e,n,t){if(n===1)return e;if(t=t||100,typeof e=="number")return Math.ceil(e*n*t)/t;if(typeof e!="string")return e;const r=e.split(mn);if(r===null||!r.length)return e;const o=[];let s=r.shift(),i=yn.test(s);for(;;){if(i){const a=parseFloat(s);isNaN(a)?o.push(s):o.push(Math.ceil(a*n*t)/t)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const bn=e=>e==="unset"||e==="undefined"||e==="none";function nt(e,n){const t={...F,...e},r={...ze,...n},o={left:t.left,top:t.top,width:t.width,height:t.height};let s=t.body;[t,r].forEach(b=>{const x=[],T=b.hFlip,j=b.vFlip;let I=b.rotate;T?j?I+=2:(x.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),x.push("scale(-1 1)"),o.top=o.left=0):j&&(x.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),x.push("scale(1 -1)"),o.top=o.left=0);let y;switch(I<0&&(I-=Math.floor(I/4)*4),I=I%4,I){case 1:y=o.height/2+o.top,x.unshift("rotate(90 "+y.toString()+" "+y.toString()+")");break;case 2:x.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:y=o.width/2+o.left,x.unshift("rotate(-90 "+y.toString()+" "+y.toString()+")");break}I%2===1&&(o.left!==o.top&&(y=o.left,o.left=o.top,o.top=y),o.width!==o.height&&(y=o.width,o.width=o.height,o.height=y)),x.length&&(s='<g transform="'+x.join(" ")+'">'+s+"</g>")});const i=r.width,a=r.height,c=o.width,l=o.height;let u,d;i===null?(d=a===null?"1em":a==="auto"?l:a,u=ce(d,c/l)):(u=i==="auto"?c:i,d=a===null?ce(u,l/c):a==="auto"?l:a);const p={},m=(b,x)=>{bn(x)||(p[b]=x.toString())};return m("width",u),m("height",d),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+c.toString()+" "+l.toString(),{attributes:p,body:s}}const xn=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Z=xn();function wn(e){Z=e}function In(){return Z}function Sn(e,n){const t=J(e);if(!t)return 0;let r;if(!t.maxURL)r=0;else{let o=0;t.resources.forEach(i=>{o=Math.max(o,i.length)});const s=n+".json?icons=";r=t.maxURL-o-t.path.length-s.length}return r}function vn(e){return e===404}const Tn=(e,n,t)=>{const r=[],o=Sn(e,n),s="icons";let i={type:s,provider:e,prefix:n,icons:[]},a=0;return t.forEach((c,l)=>{a+=c.length+1,a>=o&&l>0&&(r.push(i),i={type:s,provider:e,prefix:n,icons:[]},a=c.length),i.icons.push(c)}),r.push(i),r};function Cn(e){if(typeof e=="string"){const n=J(e);if(n)return n.path}return"/"}const An=(e,n,t)=>{if(!Z){t("abort",424);return}let r=Cn(n.provider);switch(n.type){case"icons":{const s=n.prefix,a=n.icons.join(","),c=new URLSearchParams({icons:a});r+=s+".json?"+c.toString();break}case"custom":{const s=n.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:t("abort",400);return}let o=503;Z(e+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{t(vn(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?t("abort",s):t("next",o)});return}setTimeout(()=>{t("success",s)})}).catch(()=>{t("next",o)})},jn={prepare:Tn,send:An};function Pe(e,n){switch(e){case"local":case"session":M[e]=n;break;case"all":for(const t in M)M[t]=n;break}}const ee="data-style";let ot="";function Pn(e){ot=e}function ke(e,n){let t=Array.from(e.childNodes).find(r=>r.hasAttribute&&r.hasAttribute(ee));t||(t=document.createElement("style"),t.setAttribute(ee,ee),e.appendChild(t)),t.textContent=":host{display:inline-block;vertical-align:"+(n?"-0.125em":"0")+"}span,svg{display:block}"+ot}function rt(){Ie("",jn),Ue(!0);let e;try{e=window}catch{}if(e){if(et(),e.IconifyPreload!==void 0){const t=e.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!we(o))&&console.error(r)}catch{console.error(r)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const r in t){const o="IconifyProviders["+r+"] is invalid.";try{const s=t[r];if(typeof s!="object"||!s||s.resources===void 0)continue;Se(r,s)||console.error(o)}catch{console.error(o)}}}}return{enableCache:t=>Pe(t,!0),disableCache:t=>Pe(t,!1),iconExists:Zt,getIcon:Gt,listIcons:Wt,addIcon:Qe,addCollection:we,calculateSize:ce,buildIcon:nt,loadIcons:pe,loadIcon:dn,addAPIProvider:Se,appendCustomStyle:Pn,_api:{getAPIConfig:J,setAPIModule:Ie,sendAPIQuery:Ze,setFetch:wn,getFetch:In,listAPIProviders:on}}}function st(e,n){let t=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in n)t+=" "+r+'="'+n[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+t+">"+e+"</svg>"}function kn(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Ln(e){return"data:image/svg+xml,"+kn(e)}function Mn(e){return'url("'+Ln(e)+'")'}const ae={"background-color":"currentColor"},it={"background-color":"transparent"},Le={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Me={"-webkit-mask":ae,mask:ae,background:it};for(const e in Me){const n=Me[e];for(const t in Le)n[e+"-"+t]=Le[t]}function Ee(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function En(e,n,t){const r=document.createElement("span");let o=e.body;o.indexOf("<a")!==-1&&(o+="<!-- "+Date.now()+" -->");const s=e.attributes,i=st(o,{...s,width:n.width+"",height:n.height+""}),a=Mn(i),c=r.style,l={"--svg":a,width:Ee(s.width),height:Ee(s.height),...t?ae:it};for(const u in l)c.setProperty(u,l[u]);return r}let R;function On(){try{R=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{R=null}}function Rn(e){return R===void 0&&On(),R?R.createHTML(e):e}function qn(e){const n=document.createElement("span"),t=e.attributes;let r="";t.width||(r="width: inherit;"),t.height||(r+="height: inherit;"),r&&(t.style=r);const o=st(e.body,t);return n.innerHTML=Rn(o),n.firstChild}function Oe(e,n){const t=n.icon.data,r=n.customisations,o=nt(t,r);r.preserveAspectRatio&&(o.attributes.preserveAspectRatio=r.preserveAspectRatio);const s=n.renderedMode;let i;switch(s){case"svg":i=qn(o);break;default:i=En(o,{...F,...t},s==="mask")}const a=Array.from(e.childNodes).find(c=>{const l=c.tagName&&c.tagName.toUpperCase();return l==="SPAN"||l==="SVG"});a?i.tagName==="SPAN"&&a.tagName===i.tagName?a.setAttribute("style",i.getAttribute("style")):e.replaceChild(i,a):e.appendChild(i)}function Re(e,n,t){const r=t&&(t.rendered?t:t.lastRender);return{rendered:!1,inline:n,icon:e,lastRender:r}}function _n(e="iconify-icon"){let n,t;try{n=window.customElements,t=window.HTMLElement}catch{return}if(!n||!t)return;const r=n.get(e);if(r)return r;const o=["icon","mode","inline","width","height","rotate","flip"],s=class extends t{constructor(){super();D(this,"_shadowRoot");D(this,"_state");D(this,"_checkQueued",!1);const c=this._shadowRoot=this.attachShadow({mode:"open"}),l=K(this);ke(c,l),this._state=Re({value:""},l),this._queueCheck()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(c){if(c==="inline"){const l=K(this),u=this._state;l!==u.inline&&(u.inline=l,ke(this._shadowRoot,l))}else this._queueCheck()}get icon(){const c=this.getAttribute("icon");if(c&&c.slice(0,1)==="{")try{return JSON.parse(c)}catch{}return c}set icon(c){typeof c=="object"&&(c=JSON.stringify(c)),this.setAttribute("icon",c)}get inline(){return K(this)}set inline(c){c?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const c=this._state;if(c.rendered){const l=this._shadowRoot;if(c.renderedMode==="svg")try{l.lastChild.setCurrentTime(0);return}catch{}Oe(l,c)}}get status(){const c=this._state;return c.rendered?"rendered":c.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const c=this._state,l=this.getAttribute("icon");if(l!==c.icon.value){this._iconChanged(l);return}if(!c.rendered)return;const u=this.getAttribute("mode"),d=be(this);(c.attrMode!==u||zt(c.customisations,d))&&this._renderIcon(c.icon,d,u)}_iconChanged(c){const l=pn(c,(u,d,p)=>{const m=this._state;if(m.rendered||this.getAttribute("icon")!==u)return;const b={value:u,name:d,data:p};b.data?this._gotIconData(b):m.icon=b});l.data?this._gotIconData(l):this._state=Re(l,this._state.inline,this._state)}_gotIconData(c){this._checkQueued=!1,this._renderIcon(c,be(this),this.getAttribute("mode"))}_renderIcon(c,l,u){const d=gn(c.data.body,u),p=this._state.inline;Oe(this._shadowRoot,this._state={rendered:!0,icon:c,inline:p,customisations:l,attrMode:u,renderedMode:d})}};o.forEach(a=>{a in s.prototype||Object.defineProperty(s.prototype,a,{get:function(){return this.getAttribute(a)},set:function(c){c!==null?this.setAttribute(a,c):this.removeAttribute(a)}})});const i=rt();for(const a in i)s[a]=s.prototype[a]=i[a];return n.define(e,s),s}_n()||rt();const Nn=f.shape({appLogo:f.node,appName:f.string,theme:f.shape({background:f.string}),enableConnect:f.bool,enableLocale:f.bool,navigation:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object]),icon:f.string,items:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object])}))}))}),ct=f.shape({showText:f.bool,showRole:f.bool,switchDid:f.bool,switchProfile:f.bool,switchPassport:f.bool,disableLogout:f.bool,onLogin:f.func,onLogout:f.func,onSwitchDid:f.func,onSwitchProfile:f.func,onSwitchPassport:f.func,menu:f.array,menuRender:f.func,dark:f.bool,size:f.number}),z=(e,n,t="children")=>e.map(r=>Array.isArray(r[t])?n({...r,[t]:z(r[t],n,t)}):n(r)),Fn=(e,n="children")=>{const t=[];return z(e,r=>t.push(r),n),t},ge=(e,n,t="children")=>e.map(r=>({...r})).filter(r=>{const o=r[t];if(Array.isArray(o)){const i=ge(o,n,t);r[t]=i!=null&&i.length?i:void 0}const s={filteredChildren:r[t],isLeaf:!(o!=null&&o.length)};return n(r,s)}),Hn=e=>/^https?:\/\//.test(e),zn=e=>{if(!e||!(e!=null&&e.startsWith("/")))return!1;const n=o=>o.endsWith("/")?o:`${o}/`,t=n(window.location.pathname),r=n(new URL(e,window.location.origin).pathname);return t.startsWith(r)},Bn=(e=[])=>{const n=e.map((r,o)=>({path:r,index:o})).filter(r=>zn(r.path));return n!=null&&n.length?n.slice(1).reduce((r,o)=>r.path.length>=o.path.length?r:o,n[0]).index:-1};var qe,_e;const le=((qe=window==null?void 0:window.blocklet)==null?void 0:qe.groupPrefix)||((_e=window==null?void 0:window.blocklet)==null?void 0:_e.prefix)||"/",Dn=e=>{const n={...e},t=e==null?void 0:e.background;return typeof t=="string"?n.background={header:t,footer:t,default:t}:t&&typeof t=="object"&&(n.background={header:t.header||t.default,footer:t.footer||t.default,default:t.default}),n},at=(e,n="en")=>{if(!(e!=null&&e.length))return e;const t=(o,s)=>typeof o=="string"?o:typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o,r=(o,s)=>{if(typeof o=="string"){if(Hn(o)){const a=new URL(o);return a.searchParams.set("locale",s),a.href}const i=new URL(o,window.location.origin);return i.searchParams.set("locale",s),i.pathname+i.search}return typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o};return z(e,o=>{var s;return{...o,title:t(o.title,n),link:(s=o.items)!=null&&s.length?o.link:r(o.link,n),_rawLink:o.link}},"items")},$n=e=>z(e,n=>n.role?{...n,role:Array.isArray(n.role)?n.role:[n.role]}:n,"items"),Un=e=>{if(!(e!=null&&e.length))return null;const n=$n(e),t={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return n.forEach(r=>{var o;r.section?Array.isArray(r.section)?r.section.forEach(s=>{var i;(i=t[s])==null||i.push(r)}):typeof r.section=="string"&&((o=t[r.section])==null||o.push(r)):t.header.push(r)}),t},Qn=e=>{if(!e)return null;const n={...e};return n.theme=Dn(n.theme),n.navigation=Un(Vn(n.navigation)),n},Vn=(e=[])=>ge(e,(n,t)=>{var r;return!!n.link||((r=t.filteredChildren)==null?void 0:r.length)},"items"),lt=(e,n)=>ge(e,(t,r)=>{var s;const o=!t.role||n&&(t.role.includes(n)||t.role.includes("guest"));return r.isLeaf?o:o&&((s=r.filteredChildren)==null?void 0:s.length)},"items"),Wn={top:-960,width:960,height:960,body:'<path fill="currentColor" d="M510-600v-210q0-12.75 8.625-21.375T540-840h270q12.75 0 21.375 8.625T840-810v210q0 12.75-8.625 21.375T810-570H540q-12.75 0-21.375-8.625T510-600M120-480v-330q0-12.75 8.625-21.375T150-840h270q12.75 0 21.375 8.625T450-810v330q0 12.75-8.625 21.375T420-450H150q-12.75 0-21.375-8.625T120-480m390 330v-330q0-12.75 8.625-21.375T540-510h270q12.75 0 21.375 8.625T840-480v330q0 12.75-8.625 21.375T810-120H540q-12.75 0-21.375-8.625T510-150m-390 0v-210q0-12.75 8.625-21.375T150-390h270q12.75 0 21.375 8.625T450-360v210q0 12.75-8.625 21.375T420-120H150q-12.75 0-21.375-8.625T120-150m60-360h210v-270H180zm390 330h210v-270H570zm0-450h210v-150H570zM180-180h210v-150H180zm210-150"/>'},Zn={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function Gn({session:e,locale:n="zh",size:t=24}){const r=(window==null?void 0:window.blocklet)||{},o=(r.navigation||[]).filter(c=>c.section==="sessionManager"&&!["/sessionManager"].includes(c.id)).filter(c=>{var l;return!!((c==null?void 0:c.role)||[]).includes(((l=e==null?void 0:e.user)==null?void 0:l.role)||"guest")}).map(c=>{const l=((r==null?void 0:r.componentMountPoints)||[]).find(u=>c.component===u.name);return{...c,component:l}}),s=P.useRef(null),i=ht({open:!1}),a=pt((c=!i.open)=>{i.open=c});return o.length===0||!(e!=null&&e.user)?null:g.jsxs(g.Fragment,{children:[g.jsx(gt,{size:"medium",ref:s,onClick:()=>a(),children:g.jsx(ye,{icon:Wn,fontSize:t,style:{transform:"scale(1.08)"}})}),g.jsx(mt,{open:i.open,anchorEl:s.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:c})=>g.jsx(yt,{onClickAway:l=>{l.preventDefault(),l.stopPropagation(),a(!1)},children:g.jsx(bt,{...c,timeout:350,children:g.jsxs(xt,{variant:"outlined",sx:{borderRadius:3,width:350,maxWidth:"90vw",borderColor:A.lineStep,p:2,border:"0 !important",boxShadow:`0px 8px 16px 0px ${A.gray6}, 0px 0px 0px 1px ${A.gray6}`},children:[g.jsx(wt,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:o.map(l=>{var u;return g.jsx(Ot,{disablePadding:!0,children:g.jsxs(Rt,{href:l.link,sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:2,"&:hover":{backgroundColor:A.surfacePrimarySubtitle}},children:[(u=l==null?void 0:l.component)!=null&&u.did?g.jsx(It,{component:"img",src:`${St}/blocklet/logo-bundle/${l.component.did}`,sx:{borderRadius:2,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):g.jsx(ye,{fontSize:50,icon:l.icon||Zn,color:A.textSubtitle}),g.jsx(vt,{sx:{fontSize:"12px",color:A.textBase,textAlign:"center",lineHeight:"normal"},children:Tt(l.title,n)})]})},l.id)})}),g.jsx(Ct,{session:e,children:g.jsx(At,{variant:"outlined",fullWidth:!0,href:jt,sx:{mt:1,borderRadius:2,color:A.textBase,borderColor:A.lineBorderStrong,"&:hover":{color:A.primaryBase,borderColor:A.primaryBase}},children:n==="zh"?"管理":"Manage"})})]})})})})]})}function me({formattedBlocklet:e,addons:n,sessionManagerProps:t}){var p,m,b,x;const r=P.useContext(Ne),{locale:o}=Fe()||{},{enableConnect:s=!0,enableLocale:i=!0}=e,a=!!((p=r==null?void 0:r.session)!=null&&p.user);let c=at((m=e==null?void 0:e.navigation)==null?void 0:m.sessionManager,o)||[];c=lt(c,(x=(b=r==null?void 0:r.session)==null?void 0:b.user)==null?void 0:x.role);const u=(()=>{if(n&&typeof n!="function")return Array.isArray(n)?n:[n];let T=[];if(i&&o&&T.push(g.jsx(qt,{showText:!1},"locale-selector")),s&&r){const j=[];a&&(c?c.slice(0,5):[]).forEach(y=>{j.push({label:y.title,icon:y.icon?g.jsx("iconify-icon",{icon:y.icon,height:24,style:{marginRight:8}}):null,component:"a",href:y.link,key:y.link})}),T.push(g.jsx(Gn,{session:r.session,locale:o},"session-blocklet")),T.push(g.jsx(Pt,{session:r.session,locale:o,menu:j,showRole:!0,...t},"session-user"))}return typeof n=="function"&&(T=n(T)||[]),T})();return P.createElement(g.Fragment,null,...Array.isArray(u)?u:[u])}me.propTypes={formattedBlocklet:f.object.isRequired,addons:f.oneOfType([f.func,f.node]),sessionManagerProps:ct};me.defaultProps={addons:null,sessionManagerProps:{showRole:!0}};const Jn=()=>{const e=kt();P.useEffect(()=>{e.wallet&&Lt.call("arcHideTopBar","{}")},[e])};function ut({meta:e,fallbackUrl:n,invalidPathFallback:t,headerAddons:r,sessionManagerProps:o,links:s,...i}){var B;Jn();const a=P.useContext(Ne),c=(B=a==null?void 0:a.session)==null?void 0:B.user,l=c==null?void 0:c.role,{locale:u}=Fe()||{},d=P.useMemo(()=>{const v=Object.assign({},window.blocklet,e);try{return Qn(v)}catch(h){return console.error("Failed to format blocklet info",h,v),v}},[e]),{localizedNav:p,flattened:m,matchedIndex:b}=P.useMemo(()=>{var k;let v=at((k=d==null?void 0:d.navigation)==null?void 0:k.dashboard,u)||[];v=lt(v,l),v=z(v,w=>{let C=null;return w.icon&&(w.icon.startsWith("http")||w.icon.startsWith("data:")?C=g.jsx(Mt,{src:w.icon}):C=g.jsx("iconify-icon",{height:"100%",width:"100%",icon:w.icon})),{title:w.title,url:w.link,icon:C,external:!0,children:w.items}},"items");const h=Fn(v).filter(w=>!!w.url),S=Bn(h.map(w=>w.url));return S!==-1&&(h[S].active=!0),{localizedNav:v,flattened:h,matchedIndex:S}},[d,u,l]),x=typeof s=="function"?s(p):[...p,...s];if(P.useLayoutEffect(()=>{c&&!(m!=null&&m.length)&&n&&(window.location.href=n)},[n]),P.useLayoutEffect(()=>{c&&(m!=null&&m.length)&&b===-1&&t&&t()},[t,m,b]),!d.appName)return null;const{appLogo:T,appLogoRect:j,appName:I}=d,y=g.jsx(me,{formattedBlocklet:d,addons:r,sessionManagerProps:o});return g.jsx(Et,{title:I,fullWidth:!0,sidebarWidth:128,legacy:!1,links:x,...i,headerProps:{homeLink:le,logo:g.jsx("img",{src:j||T,alt:"logo"}),addons:y,...i.headerProps}})}ut.propTypes={meta:Nn,fallbackUrl:f.string,invalidPathFallback:f.func,headerAddons:f.oneOfType([f.func,f.node]),sessionManagerProps:ct,links:f.oneOfType([f.array,f.func])};ut.defaultProps={meta:{},fallbackUrl:le,invalidPathFallback:null,headerAddons:void 0,sessionManagerProps:{showRole:!0,onLogout:()=>{window.location.href=le}},links:[]};export{Nn as B,ut as D,me as H,Fn as a,Bn as b,Qn as f,at as g,Hn as i,z as m,le as p,Jn as u};
11
+ */const ze=Object.freeze({left:0,top:0,width:16,height:16}),V=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),F=Object.freeze({...ze,...V}),te=Object.freeze({...F,body:"",hidden:!1}),qt=Object.freeze({width:null,height:null}),He=Object.freeze({...qt,...V});function Nt(e,n=0){const t=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(t===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(t!==e){let o=0;switch(t){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-t.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return n}const Ft=/[\s,]+/;function zt(e,n){n.split(Ft).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Be={...He,preserveAspectRatio:""};function be(e){const n={...Be},t=(r,o)=>e.getAttribute(r)||o;return n.width=t("width",null),n.height=t("height",null),n.rotate=Nt(t("rotate","")),zt(n,t("flip","")),n.preserveAspectRatio=t("preserveAspectRatio",t("preserveaspectratio","")),n}function Ht(e,n){for(const t in Be)if(e[t]!==n[t])return!0;return!1}const O=/^[a-z0-9]+(-[a-z0-9]+)*$/,z=(e,n,t,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 a=o.pop(),c=o.pop(),l={provider:o.length>0?o[0]:r,prefix:c,name:a};return n&&!U(l)?null:l}const s=o[0],i=s.split("-");if(i.length>1){const a={provider:r,prefix:i.shift(),name:i.join("-")};return n&&!U(a)?null:a}if(t&&r===""){const a={provider:r,prefix:"",name:s};return n&&!U(a,t)?null:a}return null},U=(e,n)=>e?!!((e.provider===""||e.provider.match(O))&&(n&&e.prefix===""||e.prefix.match(O))&&e.name.match(O)):!1;function Bt(e,n){const t={};!e.hFlip!=!n.hFlip&&(t.hFlip=!0),!e.vFlip!=!n.vFlip&&(t.vFlip=!0);const r=((e.rotate||0)+(n.rotate||0))%4;return r&&(t.rotate=r),t}function xe(e,n){const t=Bt(e,n);for(const r in te)r in V?r in e&&!(r in t)&&(t[r]=V[r]):r in n?t[r]=n[r]:r in e&&(t[r]=e[r]);return t}function Dt(e,n){const t=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function s(i){if(t[i])return o[i]=[];if(!(i in o)){o[i]=null;const a=r[i]&&r[i].parent,c=a&&s(a);c&&(o[i]=[a].concat(c))}return o[i]}return Object.keys(t).concat(Object.keys(r)).forEach(s),o}function $t(e,n,t){const r=e.icons,o=e.aliases||Object.create(null);let s={};function i(a){s=xe(r[a]||o[a],s)}return i(n),t.forEach(i),xe(e,s)}function De(e,n){const t=[];if(typeof e!="object"||typeof e.icons!="object")return t;e.not_found instanceof Array&&e.not_found.forEach(o=>{n(o,null),t.push(o)});const r=Dt(e);for(const o in r){const s=r[o];s&&(n(o,$t(e,o,s)),t.push(o))}return t}const Ut={provider:"",aliases:{},not_found:{},...ze};function X(e,n){for(const t in n)if(t in e&&typeof e[t]!=typeof n[t])return!1;return!0}function $e(e){if(typeof e!="object"||e===null)return null;const n=e;if(typeof n.prefix!="string"||!e.icons||typeof e.icons!="object"||!X(e,Ut))return null;const t=n.icons;for(const o in t){const s=t[o];if(!o.match(O)||typeof s.body!="string"||!X(s,te))return null}const r=n.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(O)||typeof i!="string"||!t[i]&&!r[i]||!X(s,te))return null}return n}const W=Object.create(null);function Qt(e,n){return{provider:e,prefix:n,icons:Object.create(null),missing:new Set}}function L(e,n){const t=W[e]||(W[e]=Object.create(null));return t[n]||(t[n]=Qt(e,n))}function ue(e,n){return $e(n)?De(n,(t,r)=>{r?e.icons[t]=r:e.missing.add(t)}):[]}function Vt(e,n,t){try{if(typeof t.body=="string")return e.icons[n]={...t},!0}catch{}return!1}function Wt(e,n){let t=[];return(typeof e=="string"?[e]:Object.keys(W)).forEach(o=>{(typeof o=="string"&&typeof n=="string"?[n]:Object.keys(W[o]||{})).forEach(i=>{const a=L(o,i);t=t.concat(Object.keys(a.icons).map(c=>(o!==""?"@"+o+":":"")+i+":"+c))})}),t}let _=!1;function Ue(e){return typeof e=="boolean"&&(_=e),_}function q(e){const n=typeof e=="string"?z(e,!0,_):e;if(n){const t=L(n.provider,n.prefix),r=n.name;return t.icons[r]||(t.missing.has(r)?null:void 0)}}function Qe(e,n){const t=z(e,!0,_);if(!t)return!1;const r=L(t.provider,t.prefix);return Vt(r,t.name,n)}function we(e,n){if(typeof e!="object")return!1;if(typeof n!="string"&&(n=e.provider||""),_&&!n&&!e.prefix){let o=!1;return $e(e)&&(e.prefix="",De(e,(s,i)=>{i&&Qe(s,i)&&(o=!0)})),o}const t=e.prefix;if(!U({provider:n,prefix:t,name:"a"}))return!1;const r=L(n,t);return!!ue(r,e)}function Zt(e){return!!q(e)}function Gt(e){const n=q(e);return n?{...F,...n}:null}function Jt(e){const n={loaded:[],missing:[],pending:[]},t=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,a=o.name,c=t[s]||(t[s]=Object.create(null)),l=c[i]||(c[i]=L(s,i));let u;a in l.icons?u=n.loaded:i===""||l.missing.has(a)?u=n.missing:u=n.pending;const d={provider:s,prefix:i,name:a};u.push(d)}),n}function Ve(e,n){e.forEach(t=>{const r=t.loaderCallbacks;r&&(t.loaderCallbacks=r.filter(o=>o.id!==n))})}function Xt(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const n=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!n.length)return;let t=!1;const r=e.provider,o=e.prefix;n.forEach(s=>{const i=s.icons,a=i.pending.length;i.pending=i.pending.filter(c=>{if(c.prefix!==o)return!0;const l=c.name;if(e.icons[l])i.loaded.push({provider:r,prefix:o,name:l});else if(e.missing.has(l))i.missing.push({provider:r,prefix:o,name:l});else return t=!0,!0;return!1}),i.pending.length!==a&&(t||Ve([e],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let Yt=0;function Kt(e,n,t){const r=Yt++,o=Ve.bind(null,t,r);if(!n.pending.length)return o;const s={id:r,icons:n,callback:e,abort:o};return t.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}const ne=Object.create(null);function Ie(e,n){ne[e]=n}function oe(e){return ne[e]||ne[""]}function en(e,n=!0,t=!1){const r=[];return e.forEach(o=>{const s=typeof o=="string"?z(o,n,t):o;s&&r.push(s)}),r}var tn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function nn(e,n,t,r){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let i;if(e.random){let h=e.resources.slice(0);for(i=[];h.length>1;){const S=Math.floor(Math.random()*h.length);i.push(h[S]),h=h.slice(0,S).concat(h.slice(S+1))}i=i.concat(h)}else i=e.resources.slice(s).concat(e.resources.slice(0,s));const a=Date.now();let c="pending",l=0,u,d=null,p=[],m=[];typeof r=="function"&&m.push(r);function b(){d&&(clearTimeout(d),d=null)}function x(){c==="pending"&&(c="aborted"),b(),p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function T(h,S){S&&(m=[]),typeof h=="function"&&m.push(h)}function j(){return{startTime:a,payload:n,status:c,queriesSent:l,queriesPending:p.length,subscribe:T,abort:x}}function I(){c="failed",m.forEach(h=>{h(void 0,u)})}function y(){p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function B(h,S,k){const w=S!=="success";switch(p=p.filter(C=>C!==h),c){case"pending":break;case"failed":if(w||!e.dataAfterTimeout)return;break;default:return}if(S==="abort"){u=k,I();return}if(w){u=k,p.length||(i.length?v():I());return}if(b(),y(),!e.random){const C=e.resources.indexOf(h.resource);C!==-1&&C!==e.index&&(e.index=C)}c="completed",m.forEach(C=>{C(k)})}function v(){if(c!=="pending")return;b();const h=i.shift();if(h===void 0){if(p.length){d=setTimeout(()=>{b(),c==="pending"&&(y(),I())},e.timeout);return}I();return}const S={status:"pending",resource:h,callback:(k,w)=>{B(S,k,w)}};p.push(S),l++,d=setTimeout(v,e.rotate),t(h,n,S.callback)}return setTimeout(v),j}function We(e){const n={...tn,...e};let t=[];function r(){t=t.filter(a=>a().status==="pending")}function o(a,c,l){const u=nn(n,a,c,(d,p)=>{r(),l&&l(d,p)});return t.push(u),u}function s(a){return t.find(c=>a(c))||null}return{query:o,find:s,setIndex:a=>{n.index=a},getIndex:()=>n.index,cleanup:r}}function fe(e){let n;if(typeof e.resources=="string")n=[e.resources];else if(n=e.resources,!(n instanceof Array)||!n.length)return null;return{resources:n,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 G=Object.create(null),E=["https://api.simplesvg.com","https://api.unisvg.com"],Q=[];for(;E.length>0;)E.length===1||Math.random()>.5?Q.push(E.shift()):Q.push(E.pop());G[""]=fe({resources:["https://api.iconify.design"].concat(Q)});function Se(e,n){const t=fe(n);return t===null?!1:(G[e]=t,!0)}function J(e){return G[e]}function on(){return Object.keys(G)}function ve(){}const Y=Object.create(null);function rn(e){if(!Y[e]){const n=J(e);if(!n)return;const t=We(n),r={config:n,redundancy:t};Y[e]=r}return Y[e]}function Ze(e,n,t){let r,o;if(typeof e=="string"){const s=oe(e);if(!s)return t(void 0,424),ve;o=s.send;const i=rn(e);i&&(r=i.redundancy)}else{const s=fe(e);if(s){r=We(s);const i=e.resources?e.resources[0]:"",a=oe(i);a&&(o=a.send)}}return!r||!o?(t(void 0,424),ve):r.query(n,o,t)().abort}const Te="iconify2",N="iconify",Ge=N+"-count",Ce=N+"-version",Je=36e5,sn=168;function re(e,n){try{return e.getItem(n)}catch{}}function de(e,n,t){try{return e.setItem(n,t),!0}catch{}}function Ae(e,n){try{e.removeItem(n)}catch{}}function se(e,n){return de(e,Ge,n.toString())}function ie(e){return parseInt(re(e,Ge))||0}const M={local:!0,session:!0},Xe={local:new Set,session:new Set};let he=!1;function cn(e){he=e}let $=typeof window>"u"?{}:window;function Ye(e){const n=e+"Storage";try{if($&&$[n]&&typeof $[n].length=="number")return $[n]}catch{}M[e]=!1}function Ke(e,n){const t=Ye(e);if(!t)return;const r=re(t,Ce);if(r!==Te){if(r){const a=ie(t);for(let c=0;c<a;c++)Ae(t,N+c.toString())}de(t,Ce,Te),se(t,0);return}const o=Math.floor(Date.now()/Je)-sn,s=a=>{const c=N+a.toString(),l=re(t,c);if(typeof l=="string"){try{const u=JSON.parse(l);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&n(u,a))return!0}catch{}Ae(t,c)}};let i=ie(t);for(let a=i-1;a>=0;a--)s(a)||(a===i-1?(i--,se(t,i)):Xe[e].add(a))}function et(){if(!he){cn(!0);for(const e in M)Ke(e,n=>{const t=n.data,r=n.provider,o=t.prefix,s=L(r,o);if(!ue(s,t).length)return!1;const i=t.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function an(e,n){const t=e.lastModifiedCached;if(t&&t>=n)return t===n;if(e.lastModifiedCached=n,t)for(const r in M)Ke(r,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===n});return!0}function ln(e,n){he||et();function t(r){let o;if(!M[r]||!(o=Ye(r)))return;const s=Xe[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=ie(o),!se(o,i+1))return;const a={cached:Math.floor(Date.now()/Je),provider:e.provider,data:n};return de(o,N+i.toString(),JSON.stringify(a))}n.lastModified&&!an(e,n.lastModified)||Object.keys(n.icons).length&&(n.not_found&&(n=Object.assign({},n),delete n.not_found),t("local")||t("session"))}function je(){}function un(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Xt(e)}))}function fn(e,n){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(n).sort():e.iconsToLoad=n,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:t,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let s;if(!o||!(s=oe(t)))return;s.prepare(t,r,o).forEach(a=>{Ze(t,a,c=>{if(typeof c!="object")a.icons.forEach(l=>{e.missing.add(l)});else try{const l=ue(e,c);if(!l.length)return;const u=e.pendingIcons;u&&l.forEach(d=>{u.delete(d)}),ln(e,c)}catch(l){console.error(l)}un(e)})})}))}const pe=(e,n)=>{const t=en(e,!0,Ue()),r=Jt(t);if(!r.pending.length){let c=!0;return n&&setTimeout(()=>{c&&n(r.loaded,r.missing,r.pending,je)}),()=>{c=!1}}const o=Object.create(null),s=[];let i,a;return r.pending.forEach(c=>{const{provider:l,prefix:u}=c;if(u===a&&l===i)return;i=l,a=u,s.push(L(l,u));const d=o[l]||(o[l]=Object.create(null));d[u]||(d[u]=[])}),r.pending.forEach(c=>{const{provider:l,prefix:u,name:d}=c,p=L(l,u),m=p.pendingIcons||(p.pendingIcons=new Set);m.has(d)||(m.add(d),o[l][u].push(d))}),s.forEach(c=>{const{provider:l,prefix:u}=c;o[l][u].length&&fn(c,o[l][u])}),n?Kt(n,r,s):je},dn=e=>new Promise((n,t)=>{const r=typeof e=="string"?z(e,!0):e;if(!r){t(e);return}pe([r||e],o=>{if(o.length&&r){const s=q(r);if(s){n({...F,...s});return}}t(e)})});function hn(e){try{const n=typeof e=="string"?JSON.parse(e):e;if(typeof n.body=="string")return{...n}}catch{}}function pn(e,n){const t=typeof e=="string"?z(e,!0,!0):null;if(!t){const s=hn(e);return{value:e,data:s}}const r=q(t);if(r!==void 0||!t.prefix)return{value:e,name:t,data:r};const o=pe([t],()=>n(e,t,q(t)));return{value:e,name:t,loading:o}}function K(e){return e.hasAttribute("inline")}let tt=!1;try{tt=navigator.vendor.indexOf("Apple")===0}catch{}function gn(e,n){switch(n){case"svg":case"bg":case"mask":return n}return n!=="style"&&(tt||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const mn=/(-?[0-9.]*[0-9]+[0-9.]*)/g,yn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ce(e,n,t){if(n===1)return e;if(t=t||100,typeof e=="number")return Math.ceil(e*n*t)/t;if(typeof e!="string")return e;const r=e.split(mn);if(r===null||!r.length)return e;const o=[];let s=r.shift(),i=yn.test(s);for(;;){if(i){const a=parseFloat(s);isNaN(a)?o.push(s):o.push(Math.ceil(a*n*t)/t)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const bn=e=>e==="unset"||e==="undefined"||e==="none";function nt(e,n){const t={...F,...e},r={...He,...n},o={left:t.left,top:t.top,width:t.width,height:t.height};let s=t.body;[t,r].forEach(b=>{const x=[],T=b.hFlip,j=b.vFlip;let I=b.rotate;T?j?I+=2:(x.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),x.push("scale(-1 1)"),o.top=o.left=0):j&&(x.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),x.push("scale(1 -1)"),o.top=o.left=0);let y;switch(I<0&&(I-=Math.floor(I/4)*4),I=I%4,I){case 1:y=o.height/2+o.top,x.unshift("rotate(90 "+y.toString()+" "+y.toString()+")");break;case 2:x.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:y=o.width/2+o.left,x.unshift("rotate(-90 "+y.toString()+" "+y.toString()+")");break}I%2===1&&(o.left!==o.top&&(y=o.left,o.left=o.top,o.top=y),o.width!==o.height&&(y=o.width,o.width=o.height,o.height=y)),x.length&&(s='<g transform="'+x.join(" ")+'">'+s+"</g>")});const i=r.width,a=r.height,c=o.width,l=o.height;let u,d;i===null?(d=a===null?"1em":a==="auto"?l:a,u=ce(d,c/l)):(u=i==="auto"?c:i,d=a===null?ce(u,l/c):a==="auto"?l:a);const p={},m=(b,x)=>{bn(x)||(p[b]=x.toString())};return m("width",u),m("height",d),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+c.toString()+" "+l.toString(),{attributes:p,body:s}}const xn=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Z=xn();function wn(e){Z=e}function In(){return Z}function Sn(e,n){const t=J(e);if(!t)return 0;let r;if(!t.maxURL)r=0;else{let o=0;t.resources.forEach(i=>{o=Math.max(o,i.length)});const s=n+".json?icons=";r=t.maxURL-o-t.path.length-s.length}return r}function vn(e){return e===404}const Tn=(e,n,t)=>{const r=[],o=Sn(e,n),s="icons";let i={type:s,provider:e,prefix:n,icons:[]},a=0;return t.forEach((c,l)=>{a+=c.length+1,a>=o&&l>0&&(r.push(i),i={type:s,provider:e,prefix:n,icons:[]},a=c.length),i.icons.push(c)}),r.push(i),r};function Cn(e){if(typeof e=="string"){const n=J(e);if(n)return n.path}return"/"}const An=(e,n,t)=>{if(!Z){t("abort",424);return}let r=Cn(n.provider);switch(n.type){case"icons":{const s=n.prefix,a=n.icons.join(","),c=new URLSearchParams({icons:a});r+=s+".json?"+c.toString();break}case"custom":{const s=n.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:t("abort",400);return}let o=503;Z(e+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{t(vn(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?t("abort",s):t("next",o)});return}setTimeout(()=>{t("success",s)})}).catch(()=>{t("next",o)})},jn={prepare:Tn,send:An};function Pe(e,n){switch(e){case"local":case"session":M[e]=n;break;case"all":for(const t in M)M[t]=n;break}}const ee="data-style";let ot="";function Pn(e){ot=e}function ke(e,n){let t=Array.from(e.childNodes).find(r=>r.hasAttribute&&r.hasAttribute(ee));t||(t=document.createElement("style"),t.setAttribute(ee,ee),e.appendChild(t)),t.textContent=":host{display:inline-block;vertical-align:"+(n?"-0.125em":"0")+"}span,svg{display:block}"+ot}function rt(){Ie("",jn),Ue(!0);let e;try{e=window}catch{}if(e){if(et(),e.IconifyPreload!==void 0){const t=e.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!we(o))&&console.error(r)}catch{console.error(r)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const r in t){const o="IconifyProviders["+r+"] is invalid.";try{const s=t[r];if(typeof s!="object"||!s||s.resources===void 0)continue;Se(r,s)||console.error(o)}catch{console.error(o)}}}}return{enableCache:t=>Pe(t,!0),disableCache:t=>Pe(t,!1),iconExists:Zt,getIcon:Gt,listIcons:Wt,addIcon:Qe,addCollection:we,calculateSize:ce,buildIcon:nt,loadIcons:pe,loadIcon:dn,addAPIProvider:Se,appendCustomStyle:Pn,_api:{getAPIConfig:J,setAPIModule:Ie,sendAPIQuery:Ze,setFetch:wn,getFetch:In,listAPIProviders:on}}}function st(e,n){let t=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in n)t+=" "+r+'="'+n[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+t+">"+e+"</svg>"}function kn(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Ln(e){return"data:image/svg+xml,"+kn(e)}function Mn(e){return'url("'+Ln(e)+'")'}const ae={"background-color":"currentColor"},it={"background-color":"transparent"},Le={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Me={"-webkit-mask":ae,mask:ae,background:it};for(const e in Me){const n=Me[e];for(const t in Le)n[e+"-"+t]=Le[t]}function Ee(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function En(e,n,t){const r=document.createElement("span");let o=e.body;o.indexOf("<a")!==-1&&(o+="<!-- "+Date.now()+" -->");const s=e.attributes,i=st(o,{...s,width:n.width+"",height:n.height+""}),a=Mn(i),c=r.style,l={"--svg":a,width:Ee(s.width),height:Ee(s.height),...t?ae:it};for(const u in l)c.setProperty(u,l[u]);return r}let R;function On(){try{R=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{R=null}}function Rn(e){return R===void 0&&On(),R?R.createHTML(e):e}function _n(e){const n=document.createElement("span"),t=e.attributes;let r="";t.width||(r="width: inherit;"),t.height||(r+="height: inherit;"),r&&(t.style=r);const o=st(e.body,t);return n.innerHTML=Rn(o),n.firstChild}function Oe(e,n){const t=n.icon.data,r=n.customisations,o=nt(t,r);r.preserveAspectRatio&&(o.attributes.preserveAspectRatio=r.preserveAspectRatio);const s=n.renderedMode;let i;switch(s){case"svg":i=_n(o);break;default:i=En(o,{...F,...t},s==="mask")}const a=Array.from(e.childNodes).find(c=>{const l=c.tagName&&c.tagName.toUpperCase();return l==="SPAN"||l==="SVG"});a?i.tagName==="SPAN"&&a.tagName===i.tagName?a.setAttribute("style",i.getAttribute("style")):e.replaceChild(i,a):e.appendChild(i)}function Re(e,n,t){const r=t&&(t.rendered?t:t.lastRender);return{rendered:!1,inline:n,icon:e,lastRender:r}}function qn(e="iconify-icon"){let n,t;try{n=window.customElements,t=window.HTMLElement}catch{return}if(!n||!t)return;const r=n.get(e);if(r)return r;const o=["icon","mode","inline","width","height","rotate","flip"],s=class extends t{constructor(){super();D(this,"_shadowRoot");D(this,"_state");D(this,"_checkQueued",!1);const c=this._shadowRoot=this.attachShadow({mode:"open"}),l=K(this);ke(c,l),this._state=Re({value:""},l),this._queueCheck()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(c){if(c==="inline"){const l=K(this),u=this._state;l!==u.inline&&(u.inline=l,ke(this._shadowRoot,l))}else this._queueCheck()}get icon(){const c=this.getAttribute("icon");if(c&&c.slice(0,1)==="{")try{return JSON.parse(c)}catch{}return c}set icon(c){typeof c=="object"&&(c=JSON.stringify(c)),this.setAttribute("icon",c)}get inline(){return K(this)}set inline(c){c?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const c=this._state;if(c.rendered){const l=this._shadowRoot;if(c.renderedMode==="svg")try{l.lastChild.setCurrentTime(0);return}catch{}Oe(l,c)}}get status(){const c=this._state;return c.rendered?"rendered":c.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const c=this._state,l=this.getAttribute("icon");if(l!==c.icon.value){this._iconChanged(l);return}if(!c.rendered)return;const u=this.getAttribute("mode"),d=be(this);(c.attrMode!==u||Ht(c.customisations,d))&&this._renderIcon(c.icon,d,u)}_iconChanged(c){const l=pn(c,(u,d,p)=>{const m=this._state;if(m.rendered||this.getAttribute("icon")!==u)return;const b={value:u,name:d,data:p};b.data?this._gotIconData(b):m.icon=b});l.data?this._gotIconData(l):this._state=Re(l,this._state.inline,this._state)}_gotIconData(c){this._checkQueued=!1,this._renderIcon(c,be(this),this.getAttribute("mode"))}_renderIcon(c,l,u){const d=gn(c.data.body,u),p=this._state.inline;Oe(this._shadowRoot,this._state={rendered:!0,icon:c,inline:p,customisations:l,attrMode:u,renderedMode:d})}};o.forEach(a=>{a in s.prototype||Object.defineProperty(s.prototype,a,{get:function(){return this.getAttribute(a)},set:function(c){c!==null?this.setAttribute(a,c):this.removeAttribute(a)}})});const i=rt();for(const a in i)s[a]=s.prototype[a]=i[a];return n.define(e,s),s}qn()||rt();const Nn=f.shape({appLogo:f.node,appName:f.string,theme:f.shape({background:f.string}),enableConnect:f.bool,enableLocale:f.bool,navigation:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object]),icon:f.string,items:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object])}))}))}),ct=f.shape({showText:f.bool,showRole:f.bool,switchDid:f.bool,switchProfile:f.bool,switchPassport:f.bool,disableLogout:f.bool,onLogin:f.func,onLogout:f.func,onSwitchDid:f.func,onSwitchProfile:f.func,onSwitchPassport:f.func,menu:f.array,menuRender:f.func,dark:f.bool,size:f.number}),H=(e,n,t="children")=>e.map(r=>Array.isArray(r[t])?n({...r,[t]:H(r[t],n,t)}):n(r)),Fn=(e,n="children")=>{const t=[];return H(e,r=>t.push(r),n),t},ge=(e,n,t="children")=>e.map(r=>({...r})).filter(r=>{const o=r[t];if(Array.isArray(o)){const i=ge(o,n,t);r[t]=i!=null&&i.length?i:void 0}const s={filteredChildren:r[t],isLeaf:!(o!=null&&o.length)};return n(r,s)}),zn=e=>/^https?:\/\//.test(e),Hn=e=>{if(!e||!(e!=null&&e.startsWith("/")))return!1;const n=o=>o.endsWith("/")?o:`${o}/`,t=n(window.location.pathname),r=n(new URL(e,window.location.origin).pathname);return t.startsWith(r)},Bn=(e=[])=>{const n=e.map((r,o)=>({path:r,index:o})).filter(r=>Hn(r.path));return n!=null&&n.length?n.slice(1).reduce((r,o)=>r.path.length>=o.path.length?r:o,n[0]).index:-1};var _e,qe;const le=((_e=window==null?void 0:window.blocklet)==null?void 0:_e.groupPrefix)||((qe=window==null?void 0:window.blocklet)==null?void 0:qe.prefix)||"/",Dn=e=>{const n={...e},t=e==null?void 0:e.background;return typeof t=="string"?n.background={header:t,footer:t,default:t}:t&&typeof t=="object"&&(n.background={header:t.header||t.default,footer:t.footer||t.default,default:t.default}),n},at=(e,n="en")=>{if(!(e!=null&&e.length))return e;const t=(o,s)=>typeof o=="string"?o:typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o,r=(o,s)=>{if(typeof o=="string"){if(zn(o)){const a=new URL(o);return a.searchParams.set("locale",s),a.href}const i=new URL(o,window.location.origin);return i.searchParams.set("locale",s),i.pathname+i.search}return typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o};return H(e,o=>{var s;return{...o,title:t(o.title,n),link:(s=o.items)!=null&&s.length?o.link:r(o.link,n),_rawLink:o.link}},"items")},$n=e=>H(e,n=>n.role?{...n,role:Array.isArray(n.role)?n.role:[n.role]}:n,"items"),Un=e=>{if(!(e!=null&&e.length))return null;const n=$n(e),t={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return n.forEach(r=>{var o;r.section?Array.isArray(r.section)?r.section.forEach(s=>{var i;(i=t[s])==null||i.push(r)}):typeof r.section=="string"&&((o=t[r.section])==null||o.push(r)):t.header.push(r)}),t},Qn=e=>{if(!e)return null;const n={...e};return n.theme=Dn(n.theme),n.navigation=Un(Vn(n.navigation)),n},Vn=(e=[])=>ge(e,(n,t)=>{var r;return!!n.link||((r=t.filteredChildren)==null?void 0:r.length)},"items"),lt=(e,n)=>ge(e,(t,r)=>{var s;const o=!t.role||n&&(t.role.includes(n)||t.role.includes("guest"));return r.isLeaf?o:o&&((s=r.filteredChildren)==null?void 0:s.length)},"items"),Wn={top:-960,width:960,height:960,body:'<path fill="currentColor" d="M510-600v-210q0-12.75 8.625-21.375T540-840h270q12.75 0 21.375 8.625T840-810v210q0 12.75-8.625 21.375T810-570H540q-12.75 0-21.375-8.625T510-600M120-480v-330q0-12.75 8.625-21.375T150-840h270q12.75 0 21.375 8.625T450-810v330q0 12.75-8.625 21.375T420-450H150q-12.75 0-21.375-8.625T120-480m390 330v-330q0-12.75 8.625-21.375T540-510h270q12.75 0 21.375 8.625T840-480v330q0 12.75-8.625 21.375T810-120H540q-12.75 0-21.375-8.625T510-150m-390 0v-210q0-12.75 8.625-21.375T150-390h270q12.75 0 21.375 8.625T450-360v210q0 12.75-8.625 21.375T420-120H150q-12.75 0-21.375-8.625T120-150m60-360h210v-270H180zm390 330h210v-270H570zm0-450h210v-150H570zM180-180h210v-150H180zm210-150"/>'},Zn={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function Gn({session:e,locale:n="zh",size:t=24}){const r=(window==null?void 0:window.blocklet)||{},o=(r.navigation||[]).filter(c=>c.section==="sessionManager"&&!["/sessionManager"].includes(c.id)).filter(c=>{var l;return!!((c==null?void 0:c.role)||[]).includes(((l=e==null?void 0:e.user)==null?void 0:l.role)||"guest")}).map(c=>{const l=((r==null?void 0:r.componentMountPoints)||[]).find(u=>c.component===u.name);return{...c,component:l}}),s=P.useRef(null),i=ht({open:!1}),a=pt((c=!i.open)=>{i.open=c});return o.length===0||!(e!=null&&e.user)?null:g.jsxs(g.Fragment,{children:[g.jsx(gt,{size:"medium",ref:s,onClick:()=>a(),children:g.jsx(ye,{icon:Wn,fontSize:t,style:{transform:"scale(1.08)"}})}),g.jsx(mt,{open:i.open,anchorEl:s.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:c})=>g.jsx(yt,{onClickAway:l=>{l.preventDefault(),l.stopPropagation(),a(!1)},children:g.jsx(bt,{...c,timeout:350,children:g.jsxs(xt,{variant:"outlined",sx:{borderRadius:3,width:350,maxWidth:"90vw",borderColor:A.lineStep,p:2,border:"0 !important",boxShadow:`0px 8px 16px 0px ${A.gray6}, 0px 0px 0px 1px ${A.gray6}`},children:[g.jsx(wt,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:o.map(l=>{var u;return g.jsx(Ot,{disablePadding:!0,children:g.jsxs(Rt,{href:l.link,sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:2,"&:hover":{backgroundColor:A.surfacePrimarySubtitle}},children:[(u=l==null?void 0:l.component)!=null&&u.did?g.jsx(It,{component:"img",src:`${St}/blocklet/logo-bundle/${l.component.did}`,sx:{borderRadius:2,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):g.jsx(ye,{fontSize:50,icon:l.icon||Zn,color:A.textSubtitle}),g.jsx(vt,{sx:{fontSize:"12px",color:A.textBase,textAlign:"center",lineHeight:"normal"},children:Tt(l.title,n)})]})},l.id)})}),g.jsx(Ct,{session:e,children:g.jsx(At,{variant:"outlined",fullWidth:!0,href:jt,sx:{mt:1,borderRadius:2,color:A.textBase,borderColor:A.lineBorderStrong,"&:hover":{color:A.primaryBase,borderColor:A.primaryBase}},children:n==="zh"?"管理":"Manage"})})]})})})})]})}function me({formattedBlocklet:e,addons:n,sessionManagerProps:t}){var p,m,b,x;const r=P.useContext(Ne),{locale:o}=Fe()||{},{enableConnect:s=!0,enableLocale:i=!0}=e,a=!!((p=r==null?void 0:r.session)!=null&&p.user);let c=at((m=e==null?void 0:e.navigation)==null?void 0:m.sessionManager,o)||[];c=lt(c,(x=(b=r==null?void 0:r.session)==null?void 0:b.user)==null?void 0:x.role);const u=(()=>{if(n&&typeof n!="function")return Array.isArray(n)?n:[n];let T=[];if(i&&o&&T.push(g.jsx(_t,{showText:!1},"locale-selector")),s&&r){const j=[];a&&(c?c.slice(0,5):[]).forEach(y=>{j.push({label:y.title,icon:y.icon?g.jsx("iconify-icon",{icon:y.icon,height:24,style:{marginRight:8}}):null,component:"a",href:y.link,key:y.link})}),T.push(g.jsx(Gn,{session:r.session,locale:o},"session-blocklet")),T.push(g.jsx(Pt,{session:r.session,locale:o,menu:j,showRole:!0,...t},"session-user"))}return typeof n=="function"&&(T=n(T)||[]),T})();return P.createElement(g.Fragment,null,...Array.isArray(u)?u:[u])}me.propTypes={formattedBlocklet:f.object.isRequired,addons:f.oneOfType([f.func,f.node]),sessionManagerProps:ct};me.defaultProps={addons:null,sessionManagerProps:{showRole:!0}};const Jn=()=>{const e=kt();P.useEffect(()=>{e.wallet&&Lt.call("arcHideTopBar","{}")},[e])};function ut({meta:e,fallbackUrl:n,invalidPathFallback:t,headerAddons:r,sessionManagerProps:o,links:s,...i}){var B;Jn();const a=P.useContext(Ne),c=(B=a==null?void 0:a.session)==null?void 0:B.user,l=c==null?void 0:c.role,{locale:u}=Fe()||{},d=P.useMemo(()=>{const v=Object.assign({},window.blocklet,e);try{return Qn(v)}catch(h){return console.error("Failed to format blocklet info",h,v),v}},[e]),{localizedNav:p,flattened:m,matchedIndex:b}=P.useMemo(()=>{var k;let v=at((k=d==null?void 0:d.navigation)==null?void 0:k.dashboard,u)||[];v=lt(v,l),v=H(v,w=>{let C=null;return w.icon&&(w.icon.startsWith("http")||w.icon.startsWith("data:")?C=g.jsx(Mt,{src:w.icon}):C=g.jsx("iconify-icon",{height:"100%",width:"100%",icon:w.icon})),{title:w.title,url:w.link,icon:C,external:!0,children:w.items}},"items");const h=Fn(v).filter(w=>!!w.url),S=Bn(h.map(w=>w.url));return S!==-1&&(h[S].active=!0),{localizedNav:v,flattened:h,matchedIndex:S}},[d,u,l]),x=typeof s=="function"?s(p):[...p,...s];if(P.useLayoutEffect(()=>{c&&!(m!=null&&m.length)&&n&&(window.location.href=n)},[n]),P.useLayoutEffect(()=>{c&&(m!=null&&m.length)&&b===-1&&t&&t()},[t,m,b]),!d.appName)return null;const{appLogo:T,appLogoRect:j,appName:I}=d,y=g.jsx(me,{formattedBlocklet:d,addons:r,sessionManagerProps:o});return g.jsx(Et,{title:I,fullWidth:!0,sidebarWidth:128,legacy:!1,links:x,...i,headerProps:{homeLink:le,logo:g.jsx("img",{src:j||T,alt:"logo"}),addons:y,...i.headerProps}})}ut.propTypes={meta:Nn,fallbackUrl:f.string,invalidPathFallback:f.func,headerAddons:f.oneOfType([f.func,f.node]),sessionManagerProps:ct,links:f.oneOfType([f.array,f.func])};ut.defaultProps={meta:{},fallbackUrl:le,invalidPathFallback:null,headerAddons:void 0,sessionManagerProps:{showRole:!0,onLogout:()=>{window.location.href=le}},links:[]};export{Nn as B,ut as D,me as H,Fn as a,Bn as b,Qn as f,at as g,zn as i,H as m,le as p,Jn as u};