@abtnode/blocklet-services 1.16.36 → 1.16.37-beta-20241224-013714-a79db7d3

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 (288) hide show
  1. package/api/index.js +1 -1
  2. package/api/services/auth/session.js +14 -0
  3. package/api/services/notification/blocklet-events-notifier.js +12 -3
  4. package/api/socket/channel/did.js +180 -73
  5. package/api/socket/util.js +3 -2
  6. package/dist/assets/{Add-CX1vjsKw.js → Add-bmdSrWOA.js} +1 -1
  7. package/dist/assets/{Alert-D87dZ3UW.js → Alert-dY-OL-cr.js} +1 -1
  8. package/dist/assets/{ArrowDropDown-DHIEui26.js → ArrowDropDown-y45Fdx-X.js} +1 -1
  9. package/dist/assets/{Autocomplete-MtOZ_ddo.js → Autocomplete-dIT4Amet.js} +1 -1
  10. package/dist/assets/{Avatar-BBmwGXNJ.js → Avatar-C7A9zyFp.js} +1 -1
  11. package/dist/assets/{ButtonGroup-B4-Fg7jI.js → ButtonGroup-XHi-9psG.js} +1 -1
  12. package/dist/assets/CSSTransition-uwGMy0rY.js +1 -0
  13. package/dist/assets/{CheckCircle-Rp6PMEen.js → CheckCircle-CdClV-_h.js} +1 -1
  14. package/dist/assets/Checkbox-Tv0FEBTk.js +1 -0
  15. package/dist/assets/{ChevronLeft-c5m-YpM0.js → ChevronLeft-C-j1vGKc.js} +1 -1
  16. package/dist/assets/{ChevronRight-Bu3ZuWG0.js → ChevronRight-CbtZ3hD-.js} +1 -1
  17. package/dist/assets/{Clear-b8hVwHGB.js → Clear-BHERDEfK.js} +1 -1
  18. package/dist/assets/CloseOutlined-LxFWlJhG.js +1 -0
  19. package/dist/assets/Delete-BP5vfq8X.js +1 -0
  20. package/dist/assets/{DeleteOutline-D9nJXz7t.js → DeleteOutline-BJNpCFE3.js} +1 -1
  21. package/dist/assets/DialogContentText-DOJMTAut.js +1 -0
  22. package/dist/assets/{Done-BXX9mmcA.js → Done-D1ZlVz28.js} +1 -1
  23. package/dist/assets/{Download-CW9qYXvX.js → Download-Cn9c9ohK.js} +1 -1
  24. package/dist/assets/{EditIcon-ntr6a7to.js → EditIcon-CznGQSjE.js} +1 -1
  25. package/dist/assets/{Error-C3Gec5vv.js → Error-CnHtr7Rs.js} +1 -1
  26. package/dist/assets/{ExpandMore-z223TCGt.js → ExpandMore-Bn9GWuEQ.js} +1 -1
  27. package/dist/assets/FormControl-Di5qjF9R.js +1 -0
  28. package/dist/assets/FormControlLabel-B2DvbQHM.js +1 -0
  29. package/dist/assets/FormGroup-DlbGSJN0.js +1 -0
  30. package/dist/assets/{Google-C-eSdThA.js → Google-D1iNY1x9.js} +1 -1
  31. package/dist/assets/{Grid-DvGS1eT-.js → Grid-zFG3HBuV.js} +1 -1
  32. package/dist/assets/{HelpOutline-CA0yuFPz.js → HelpOutline-BoSK3px7.js} +1 -1
  33. package/dist/assets/Hidden-CieUlF-N.js +1 -0
  34. package/dist/assets/{InfoOutlined-De7efdSI.js → InfoOutlined-Bwocpz5e.js} +1 -1
  35. package/dist/assets/InputAdornment-C8pbj17T.js +1 -0
  36. package/dist/assets/{LastPage-Cr9Ak46f.js → LastPage-BWy9Ot-z.js} +1 -1
  37. package/dist/assets/{Launch-CjTqTNC0.js → Launch-D_sSAnDg.js} +1 -1
  38. package/dist/assets/{LaunchOutlined-ClaHGU-X.js → LaunchOutlined-X2HpZgvj.js} +1 -1
  39. package/dist/assets/Link-C3LvemFf.js +1 -0
  40. package/dist/assets/{ListItemButton-s5WMuSEH.js → ListItemButton-C5esEELO.js} +1 -1
  41. package/dist/assets/ListSubheader-Cef_PnTv.js +1 -0
  42. package/dist/assets/{LoadingButton-C8kGVq5n.js → LoadingButton-DqZkQVkR.js} +1 -1
  43. package/dist/assets/{LockIcon-BRURbClv.js → LockIcon-Dy4i6Aqn.js} +1 -1
  44. package/dist/assets/{Loop-DhCMxpbJ.js → Loop-BUj9Vy6n.js} +1 -1
  45. package/dist/assets/{MarkEmailRead-DsCr6k83.js → MarkEmailRead-CA2pMXCE.js} +1 -1
  46. package/dist/assets/{Menu-C83cJ_lX.js → Menu-CvZfT5GL.js} +1 -1
  47. package/dist/assets/{MoreHoriz-CYspaAXh.js → MoreHoriz-PRHiJZol.js} +1 -1
  48. package/dist/assets/MoreVert-D6ZGYNyY.js +1 -0
  49. package/dist/assets/{OpenInNew-Bmg-7bFA.js → OpenInNew-BDTDwP3d.js} +1 -1
  50. package/dist/assets/{OutlinedInput-BZLbG5DR.js → OutlinedInput-gn7nbVpS.js} +2 -2
  51. package/dist/assets/{Pagination-oz0udlom.js → Pagination-D38Mochi.js} +1 -1
  52. package/dist/assets/{PlayArrow-BhhCt6rD.js → PlayArrow-vPTnOeug.js} +1 -1
  53. package/dist/assets/{QuestionMarkCircle-BSLU-5QJ.js → QuestionMarkCircle-B4mLjcEm.js} +1 -1
  54. package/dist/assets/RadioGroup-Cnl-n4sv.js +1 -0
  55. package/dist/assets/{Search-CVIzSYhH.js → Search-Di1FfTVW.js} +1 -1
  56. package/dist/assets/{Select-oWe_u-D6.js → Select-DWN6VE5t.js} +1 -1
  57. package/dist/assets/{ServerLogo-DU1L-HB-.js → ServerLogo-CthaxJzV.js} +1 -1
  58. package/dist/assets/{Skeleton-CX8Tt8Bo.js → Skeleton-WadU0OJu.js} +5 -5
  59. package/dist/assets/{Stepper-oUEFYvV_.js → Stepper-B7bkS7Td.js} +1 -1
  60. package/dist/assets/TextField-8hH4A29d.js +1 -0
  61. package/dist/assets/Toolbar-CkZJzWdi.js +1 -0
  62. package/dist/assets/Verified-BomL4Vcg.js +1 -0
  63. package/dist/assets/{ViewColumn-l6xqEHMP.js → ViewColumn-DDNlwTLF.js} +1 -1
  64. package/dist/assets/{ViewList-DI9CqBFa.js → ViewList-Cf2E-w4V.js} +1 -1
  65. package/dist/assets/{_createAggregator-DHQaEdHP.js → _createAggregator-DerVCNXt.js} +1 -1
  66. package/dist/assets/access-control-DbzcvB2p.js +13 -0
  67. package/dist/assets/{actions-CONPytvg.js → actions-BIHzrJRL.js} +1 -1
  68. package/dist/assets/{add-component-core-Ptms3VM0.js → add-component-core-BNdw0aLE.js} +3 -3
  69. package/dist/assets/add-resource-zovOALza.js +1 -0
  70. package/dist/assets/{addon-C9BRq2rr.js → addon-38qg_4hX.js} +1 -1
  71. package/dist/assets/{analytics-BV-2dIsZ.js → analytics-P2-ARhzA.js} +8 -8
  72. package/dist/assets/api-Bgc-sAeO.js +1 -0
  73. package/dist/assets/ar-DJ10cGfc.js +3 -0
  74. package/dist/assets/audit-logs-B1jUwB8K.js +58 -0
  75. package/dist/assets/{base32-Bha8goHw.js → base32-DhP6Sd22.js} +1 -1
  76. package/dist/assets/branding-Cw8sKF3a.js +40 -0
  77. package/dist/assets/bundle-avatar-wTvr1j7O.js +1 -0
  78. package/dist/assets/{button-DnXjylQA.js → button-sagPkc4B.js} +1 -1
  79. package/dist/assets/{click-to-copy-DziDdr0B.js → click-to-copy-bNuefZAb.js} +1 -1
  80. package/dist/assets/{complete-93121Q5T.js → complete-BmQ4mgd0.js} +1 -1
  81. package/dist/assets/{component-CUWDsqls.js → component-YDzDe2Hy.js} +68 -68
  82. package/dist/assets/{config-BOzIhp1x.js → config-BcZ0hhSN.js} +1 -1
  83. package/dist/assets/{config-navigation-sGa37CFt.js → config-navigation-_B9Y2h3O.js} +6 -6
  84. package/dist/assets/{config-fZzyLL4i.js → config-oIKKsXqC.js} +2 -2
  85. package/dist/assets/{config-space-BudRzV_5.js → config-space-CZbBDsyW.js} +1 -1
  86. package/dist/assets/confirm-DLHqvhfc.js +7 -0
  87. package/dist/assets/{connect-RlFAKnw-.js → connect-5rRgHzPJ.js} +1 -1
  88. package/dist/assets/{connect-DmL9t9Pb.js → connect-DsWbhDFg.js} +1 -1
  89. package/dist/assets/connect-to-C-YyBuWN.js +29 -0
  90. package/dist/assets/{content-layout-j_ijfe5V.js → content-layout-CJjMzX72.js} +1 -1
  91. package/dist/assets/createSuper-B6NRScIe.js +1 -0
  92. package/dist/assets/dashboard-CP8PgBmS.js +122 -0
  93. package/dist/assets/de-5ORoKwiw.js +3 -0
  94. package/dist/assets/{deprecate-Czw83fWw.js → deprecate-VX12Wil8.js} +1 -1
  95. package/dist/assets/{did-address-plg0jYw3.js → did-address-BnRJDh4K.js} +1 -1
  96. package/dist/assets/did-spaces-guide-cover-DeSoOPSP.png +0 -0
  97. package/dist/assets/domain-jbyj4r81.js +9 -0
  98. package/dist/assets/domain-list-Cng1dqBX.js +15 -0
  99. package/dist/assets/{email-D7G1smCL.js → email-CoMU6QoA.js} +3 -3
  100. package/dist/assets/emotion-cache.browser.esm-D9ZvkPSc.js +1 -0
  101. package/dist/assets/es-CWClvbjs.js +3 -0
  102. package/dist/assets/{exchange-passport-CK56AJBa.js → exchange-passport-CKrLmbNT.js} +1 -1
  103. package/dist/assets/{fallback-7BFwIxSy.js → fallback-CxJVlnM-.js} +1 -1
  104. package/dist/assets/{form-text-input-1DixbtmZ.js → form-text-input-DuE0t2xh.js} +2 -2
  105. package/dist/assets/{format-error-D7O1LvF5.js → format-error-BqUQNRdR.js} +1 -1
  106. package/dist/assets/fr-CE8mlhdK.js +3 -0
  107. package/dist/assets/{fuel-PkYrmKwo.js → fuel-BxFKkvrY.js} +1 -1
  108. package/dist/assets/{fullpage-Dzbv_Bjr.js → fullpage-DMghH4Jh.js} +1 -1
  109. package/dist/assets/{get-safe-url-B7F64ILl.js → get-safe-url-BXN5S5Ow.js} +1 -1
  110. package/dist/assets/{get-safe-url-B_9CHKiR.js → get-safe-url-C6pQ0b4W.js} +1 -1
  111. package/dist/assets/hi-DVuJdQme.js +1 -0
  112. package/dist/assets/home-DMl4NbyY.js +1 -0
  113. package/dist/assets/id-L6JUyxUh.js +3 -0
  114. package/dist/assets/{iframe-B-WoBAzH.js → iframe-CYpHBgb4.js} +1 -1
  115. package/dist/assets/index-4lyITCv_.js +4 -0
  116. package/dist/assets/{index-DVHJpsNX.js → index-6hDu2vaf.js} +27 -27
  117. package/dist/assets/{index-CfOAEOXT.js → index-8SeRztEJ.js} +1 -1
  118. package/dist/assets/{index-CURuTEb2.js → index-B-RFpqiC.js} +181 -181
  119. package/dist/assets/{index-DcgOvNoU.js → index-B-s0lesn.js} +1 -1
  120. package/dist/assets/{index-L1YQQop8.js → index-B55M7j1N.js} +1 -1
  121. package/dist/assets/{index-B5rvRUtU.js → index-B6qJT9W4.js} +1 -1
  122. package/dist/assets/{index-BTC9PSrm.js → index-BH652Yyk.js} +9 -9
  123. package/dist/assets/{index-BTolZrGR.js → index-BKpiH5Dq.js} +31 -31
  124. package/dist/assets/index-BRjM_G4Y.js +1 -0
  125. package/dist/assets/index-BUjYSE2F.js +1 -0
  126. package/dist/assets/index-BYFrBIBa.js +5 -0
  127. package/dist/assets/{index-De03g9F6.js → index-Buj7PXf3.js} +11 -11
  128. package/dist/assets/{index-BP4DTdBA.js → index-CH3eSleH.js} +1 -1
  129. package/dist/assets/{index-CM4iFAJQ.js → index-CJD8MpdN.js} +4 -4
  130. package/dist/assets/{index-ClbUoDwd.js → index-CQXPe6Dg.js} +1 -1
  131. package/dist/assets/{index-C2bGI7WK.js → index-CeS3z9GZ.js} +2 -2
  132. package/dist/assets/{index-aL8XFphi.js → index-Cg_mxnpC.js} +2 -2
  133. package/dist/assets/{index-BKasVuE9.js → index-CntasVxY.js} +11 -11
  134. package/dist/assets/index-Cp2B6uNC.js +16 -0
  135. package/dist/assets/{index-c_geTDzQ.js → index-D1nK8ZHc.js} +1 -1
  136. package/dist/assets/{index-ib_nAWaQ.js → index-D8vZ-fPV.js} +8 -8
  137. package/dist/assets/{index-CA1fJOyr.js → index-DLhcpc3-.js} +1 -1
  138. package/dist/assets/{index-wIzEIL5u.js → index-DNWbdg1R.js} +1 -1
  139. package/dist/assets/{index-jWRQUWQQ.js → index-D_bDY9Qe.js} +1 -1
  140. package/dist/assets/index-DcfIKM1A.js +9 -0
  141. package/dist/assets/{index-BkHfBdHS.js → index-DnXN6H0t.js} +1 -1
  142. package/dist/assets/index-DvWxRDmE.js +1 -0
  143. package/dist/assets/{index-Bhigy6bC.js → index-DzPmWuJk.js} +22 -22
  144. package/dist/assets/{index-DBd8RuKA.js → index-WbA8mYzS.js} +1 -1
  145. package/dist/assets/{index-BU-yWCAN.js → index-dqr9Jaml.js} +1 -1
  146. package/dist/assets/{index-BZlD6OXo.js → index-kG1Lr_vO.js} +2 -2
  147. package/dist/assets/{index-B8pYs6qw.js → index-lU7kM9Ky.js} +1 -1
  148. package/dist/assets/{index-B8JIUDX2.js → index-t5EXQWHo.js} +1 -1
  149. package/dist/assets/{invitation-etE_VFdX.js → invitation-4vH9lNw-.js} +1 -1
  150. package/dist/assets/{invite-DhviMHhg.js → invite-DQiYh3jP.js} +1 -1
  151. package/dist/assets/{isEmail-DoX_u6Zd.js → isEmail-4oqXIJJ_.js} +1 -1
  152. package/dist/assets/{issue-passport-C8DsPT0-.js → issue-passport-BS7LBCub.js} +1 -1
  153. package/dist/assets/{item-B9A7WgaT.js → item-DJHWpTQA.js} +1 -1
  154. package/dist/assets/ja-C5orBePq.js +3 -0
  155. package/dist/assets/jss-plugin-props-sort.esm-qyHLnnAY.js +13 -0
  156. package/dist/assets/ko-BeIurXFC.js +3 -0
  157. package/dist/assets/{launch-result-message-BF-pkAdo.js → launch-result-message-CPwNcICB.js} +1 -1
  158. package/dist/assets/{layout-BLKVO1aA.js → layout-CzBrvFp3.js} +2 -2
  159. package/dist/assets/{list-header-CkJhELTK.js → list-header-nz8xgiCH.js} +1 -1
  160. package/dist/assets/localization-BNwqUIzj.js +1 -0
  161. package/dist/assets/{log-BQVpfJU-.js → log-BeJh3PPm.js} +1 -1
  162. package/dist/assets/{login-oauth-callback-Df2Wy7r-.js → login-oauth-callback-0-dvml4o.js} +1 -1
  163. package/dist/assets/{login-Bv1YL4-f.js → login-tBvKJsS6.js} +1 -1
  164. package/dist/assets/{logo-uploader-vzgZfcsx.js → logo-uploader-BWtqh-79.js} +4 -4
  165. package/dist/assets/{lost-passport-BL6kwgdn.js → lost-passport-jHVQuDqE.js} +3 -3
  166. package/dist/assets/{lottie-react.esm-CQpztMV_.js → lottie-react.esm-B-E5FxBf.js} +1 -1
  167. package/dist/assets/notifications-DQZrvasa.js +65 -0
  168. package/dist/assets/objectWithoutProperties-9wzxqNXD.js +1 -0
  169. package/dist/assets/{open-window-Bw74ZDo1.js → open-window-CjAsx5PP.js} +1 -1
  170. package/dist/assets/overview-CZUNI2c4.js +12 -0
  171. package/dist/assets/{page-header-XtrSmZfg.js → page-header-UmR_SJxL.js} +1 -1
  172. package/dist/assets/permission-C1qrFfei.js +1 -0
  173. package/dist/assets/{preferences-wTD0jKLE.js → preferences-CB4_S-0N.js} +1 -1
  174. package/dist/assets/pt-BED0VqHV.js +1 -0
  175. package/dist/assets/publish-resource-D5ytOxi0.js +1 -0
  176. package/dist/assets/{raf-schd.esm--VHqQAwf.js → raf-schd.esm-ClpohTxq.js} +1 -1
  177. package/dist/assets/{react-beautiful-dnd.esm-JkjWkb1g.js → react-beautiful-dnd.esm-DweOnO-z.js} +4 -4
  178. package/dist/assets/refType-CDZhz-3k.js +1 -0
  179. package/dist/assets/relative-time-BEhURFWp.js +1 -0
  180. package/dist/assets/resource-dialog-BjXfEmTi.js +299 -0
  181. package/dist/assets/ru-B5wj2v7e.js +1 -0
  182. package/dist/assets/sdk-D_6oU6pZ.js +1 -0
  183. package/dist/assets/{selector-bHfmQq2F.js → selector-DsbOSZva.js} +3 -3
  184. package/dist/assets/session-Cm5uP3l0.js +1 -0
  185. package/dist/assets/setup-BPHLiKGE.js +19 -0
  186. package/dist/assets/{shorten-label-AXaOgv3N.js → shorten-label-Df2VmqEs.js} +1 -1
  187. package/dist/assets/{simple-select-BvdSFcAP.js → simple-select-DnOgr-la.js} +1 -1
  188. package/dist/assets/slicedToArray-D4TxSsqm.js +2 -0
  189. package/dist/assets/{start-CLF-sxGf.js → start-DKutxZsB.js} +1 -1
  190. package/dist/assets/{step-actions-BOih4mzv.js → step-actions-Cv4gOO_c.js} +1 -1
  191. package/dist/assets/{studio-BX29D64q.js → studio-C_g9PDNu.js} +1 -1
  192. package/dist/assets/{switch-control-50NvsOor.js → switch-control-B4HEHqto.js} +1 -1
  193. package/dist/assets/tag-DgtY4FDs.js +13 -0
  194. package/dist/assets/th-CKxPcxWD.js +1 -0
  195. package/dist/assets/toConsumableArray-Dwhm2s8G.js +2 -0
  196. package/dist/assets/{toUpper-C7snz8mS.js → toUpper-CgVRCh5Q.js} +1 -1
  197. package/dist/assets/{transfer-DcUjnU0J.js → transfer-Cpwy6Tit.js} +1 -1
  198. package/dist/assets/trim-q0T1m2A9.js +1 -0
  199. package/dist/assets/uniqBy-0RbpFg98.js +1 -0
  200. package/dist/assets/{unsubscribe-Dinsbdr7.js → unsubscribe-COhcdAVq.js} +1 -1
  201. package/dist/assets/{url-join-CnY0czxB.js → url-join-Cv0idqJk.js} +1 -1
  202. package/dist/assets/{use-mobile-CaIg2l3g.js → use-mobile-Bf5pd6l6.js} +1 -1
  203. package/dist/assets/{use-mobile-CFfSxdXP.js → use-mobile-FgoAU6fs.js} +1 -1
  204. package/dist/assets/{useAsync-CUPYfNit.js → useAsync-h-WToGGG.js} +1 -1
  205. package/dist/assets/useAsyncRetry-CK--mOCs.js +7 -0
  206. package/dist/assets/{useFormControl-BSba3oCv.js → useFormControl-CpXS3ldC.js} +1 -1
  207. package/dist/assets/{useLocalStorage-D1AGu-lb.js → useLocalStorage-DVECFQbD.js} +1 -1
  208. package/dist/assets/{useSetState-DSX8AlnY.js → useSetState-CaafR-tn.js} +1 -1
  209. package/dist/assets/useSlot-Bl2NJ-iV.js +1 -0
  210. package/dist/assets/{useThemeProps-BXP-249z.js → useThemeProps-MTCDjzXT.js} +1 -1
  211. package/dist/assets/user-center-BU7eGmUd.js +449 -0
  212. package/dist/assets/{util-UrDod__A.js → util-BYCzRSr_.js} +1 -1
  213. package/dist/assets/{utils-iop7lDec.js → utils-DoM3o7-Q.js} +1 -1
  214. package/dist/assets/vi-DsheN6LQ.js +1 -0
  215. package/dist/assets/wrap-locale-ChSgu67N.js +1 -0
  216. package/dist/assets/zh-BJMvTFip.js +4 -0
  217. package/dist/assets/zh-tw-B_su4eMW.js +3 -0
  218. package/dist/index.html +1 -1
  219. package/dist/service-worker.js +1 -1
  220. package/package.json +32 -32
  221. package/dist/assets/CSSTransition-Mh3ysxT1.js +0 -1
  222. package/dist/assets/Delete-DJJRj5Hb.js +0 -1
  223. package/dist/assets/DialogContentText-DKQ0aeHG.js +0 -1
  224. package/dist/assets/DialogTitle-LVWjEooN.js +0 -1
  225. package/dist/assets/FormControl-C7Nj6lk8.js +0 -1
  226. package/dist/assets/FormControlLabel-CsOaFzYE.js +0 -1
  227. package/dist/assets/FormGroup-9S4EZF14.js +0 -1
  228. package/dist/assets/Hidden-D8s2OkVT.js +0 -1
  229. package/dist/assets/InputAdornment-DLaj8suy.js +0 -1
  230. package/dist/assets/Link-Cfv3qknB.js +0 -1
  231. package/dist/assets/ListSubheader-Db7_5hOm.js +0 -1
  232. package/dist/assets/MoreVert-cgL2UwiF.js +0 -1
  233. package/dist/assets/RadioGroup-BxfFSGKO.js +0 -1
  234. package/dist/assets/Stack-ouMqQ5wb.js +0 -1
  235. package/dist/assets/TextField-BA4i5NsI.js +0 -1
  236. package/dist/assets/Toolbar-Dsg-eB8s.js +0 -1
  237. package/dist/assets/access-control-Co4RM0Bo.js +0 -13
  238. package/dist/assets/add-resource-62Kg3wZP.js +0 -1
  239. package/dist/assets/api-Bc9Mc47C.js +0 -1
  240. package/dist/assets/ar-BDRVvPrM.js +0 -3
  241. package/dist/assets/audit-logs-P5V7cojf.js +0 -58
  242. package/dist/assets/branding-B-Xki6ZL.js +0 -40
  243. package/dist/assets/bundle-avatar-DnRgcM-q.js +0 -1
  244. package/dist/assets/confirm-C5GHlmsL.js +0 -7
  245. package/dist/assets/connect-to-C9RrMw8y.js +0 -1
  246. package/dist/assets/dashboard-DWfGuG2f.js +0 -165
  247. package/dist/assets/de-B227a1no.js +0 -3
  248. package/dist/assets/domain-DGmKsEPb.js +0 -9
  249. package/dist/assets/domain-list-b8qyOv0K.js +0 -15
  250. package/dist/assets/emotion-cache.browser.esm-jEAge-b7.js +0 -1
  251. package/dist/assets/es-DAn9P2pX.js +0 -3
  252. package/dist/assets/fr-hW_Tvq9a.js +0 -3
  253. package/dist/assets/hi-6yAhJdFx.js +0 -1
  254. package/dist/assets/home-Ba5jkT5T.js +0 -1
  255. package/dist/assets/id-BMkTW_Ii.js +0 -3
  256. package/dist/assets/index-BiEwRwlx.js +0 -1
  257. package/dist/assets/index-CixjtzIf.js +0 -1
  258. package/dist/assets/index-CncNyG59.js +0 -29
  259. package/dist/assets/index-D7S1biYx.js +0 -4
  260. package/dist/assets/index-_mYSbTn_.js +0 -16
  261. package/dist/assets/index-yknVcz6a.js +0 -5
  262. package/dist/assets/ja-DMoxkdsA.js +0 -3
  263. package/dist/assets/jss-plugin-props-sort.esm-DxbPrUtX.js +0 -14
  264. package/dist/assets/ko-C926kBBj.js +0 -3
  265. package/dist/assets/localization-CBfrOcuo.js +0 -1
  266. package/dist/assets/notifications-Dq9FGpST.js +0 -65
  267. package/dist/assets/overview-DRggHObA.js +0 -12
  268. package/dist/assets/permission-a4KWdWdi.js +0 -7
  269. package/dist/assets/pt-S0JrQ9Y4.js +0 -1
  270. package/dist/assets/publish-resource-DDUATmJ8.js +0 -1
  271. package/dist/assets/refType-Bzs0bPAl.js +0 -1
  272. package/dist/assets/resource-dialog-D_g0Ux18.js +0 -271
  273. package/dist/assets/ru-Qa5qbmx5.js +0 -1
  274. package/dist/assets/sdk-BLFRAhju.js +0 -1
  275. package/dist/assets/session-CROK8kXg.js +0 -1
  276. package/dist/assets/setup-DeIVwtAN.js +0 -19
  277. package/dist/assets/slicedToArray-BWTfB_HY.js +0 -2
  278. package/dist/assets/th-BoRhU51f.js +0 -1
  279. package/dist/assets/trim-DXlOBONx.js +0 -1
  280. package/dist/assets/uniqBy-VaPfeDts.js +0 -1
  281. package/dist/assets/useSlot-BYwgFHQI.js +0 -1
  282. package/dist/assets/useSlotProps-BniFm7V2.js +0 -1
  283. package/dist/assets/user-center-DeRfl05a.js +0 -1
  284. package/dist/assets/user-sessions-DXOv0sUo.js +0 -1
  285. package/dist/assets/vi-klSG5jCL.js +0 -1
  286. package/dist/assets/wrap-locale-B5FvTTmq.js +0 -1
  287. package/dist/assets/zh-Bbb3gm_K.js +0 -4
  288. package/dist/assets/zh-tw-D9dNfXQ_.js +0 -3
@@ -1 +1 @@
1
- import{ba as y}from"./index-CURuTEb2.js";var c={};function u(e,i){typeof i=="boolean"&&(i={forever:i}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=i||{},this._maxRetryTime=i&&i.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}var T=u;u.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};u.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};u.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var i=new Date().getTime();if(e&&i-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var t=this._timeouts.shift();if(t===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),t=this._cachedTimeouts.slice(-1);else return!1;var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},t),this._options.unref&&this._timer.unref(),!0};u.prototype.attempt=function(e,i){this._fn=e,i&&(i.timeout&&(this._operationTimeout=i.timeout),i.cb&&(this._operationTimeoutCb=i.cb));var t=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){t._operationTimeoutCb()},t._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};u.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};u.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};u.prototype.start=u.prototype.try;u.prototype.errors=function(){return this._errors};u.prototype.attempts=function(){return this._attempts};u.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},i=null,t=0,r=0;r<this._errors.length;r++){var a=this._errors[r],o=a.message,n=(e[o]||0)+1;e[o]=n,n>=t&&(i=a,t=n)}return i};(function(e){var i=T;e.operation=function(t){var r=e.timeouts(t);return new i(r,{forever:t&&(t.forever||t.retries===1/0),unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})},e.timeouts=function(t){if(t instanceof Array)return[].concat(t);var r={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var a in t)r[a]=t[a];if(r.minTimeout>r.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var o=[],n=0;n<r.retries;n++)o.push(this.createTimeout(n,r));return t&&t.forever&&!o.length&&o.push(this.createTimeout(n,r)),o.sort(function(s,m){return s-m}),o},e.createTimeout=function(t,r){var a=r.randomize?Math.random()+1:1,o=Math.round(a*Math.max(r.minTimeout,1)*Math.pow(r.factor,t));return o=Math.min(o,r.maxTimeout),o},e.wrap=function(t,r,a){if(r instanceof Array&&(a=r,r=null),!a){a=[];for(var o in t)typeof t[o]=="function"&&a.push(o)}for(var n=0;n<a.length;n++){var s=a[n],m=t[s];t[s]=(function(p){var f=e.operation(r),h=Array.prototype.slice.call(arguments,1),l=h.pop();h.push(function(_){f.retry(_)||(_&&(arguments[0]=f.mainError()),l.apply(this,arguments))}),f.attempt(function(){p.apply(t,h)})}).bind(t,m),t[s].options=r}}})(c);var v=c;const R=y(v);export{R as a,v as r};
1
+ import{a$ as y}from"./index-B-RFpqiC.js";var c={};function u(e,i){typeof i=="boolean"&&(i={forever:i}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=i||{},this._maxRetryTime=i&&i.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}var T=u;u.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};u.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};u.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var i=new Date().getTime();if(e&&i-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var t=this._timeouts.shift();if(t===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),t=this._cachedTimeouts.slice(-1);else return!1;var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},t),this._options.unref&&this._timer.unref(),!0};u.prototype.attempt=function(e,i){this._fn=e,i&&(i.timeout&&(this._operationTimeout=i.timeout),i.cb&&(this._operationTimeoutCb=i.cb));var t=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){t._operationTimeoutCb()},t._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};u.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};u.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};u.prototype.start=u.prototype.try;u.prototype.errors=function(){return this._errors};u.prototype.attempts=function(){return this._attempts};u.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},i=null,t=0,r=0;r<this._errors.length;r++){var a=this._errors[r],o=a.message,n=(e[o]||0)+1;e[o]=n,n>=t&&(i=a,t=n)}return i};(function(e){var i=T;e.operation=function(t){var r=e.timeouts(t);return new i(r,{forever:t&&(t.forever||t.retries===1/0),unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})},e.timeouts=function(t){if(t instanceof Array)return[].concat(t);var r={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var a in t)r[a]=t[a];if(r.minTimeout>r.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var o=[],n=0;n<r.retries;n++)o.push(this.createTimeout(n,r));return t&&t.forever&&!o.length&&o.push(this.createTimeout(n,r)),o.sort(function(s,m){return s-m}),o},e.createTimeout=function(t,r){var a=r.randomize?Math.random()+1:1,o=Math.round(a*Math.max(r.minTimeout,1)*Math.pow(r.factor,t));return o=Math.min(o,r.maxTimeout),o},e.wrap=function(t,r,a){if(r instanceof Array&&(a=r,r=null),!a){a=[];for(var o in t)typeof t[o]=="function"&&a.push(o)}for(var n=0;n<a.length;n++){var s=a[n],m=t[s];t[s]=(function(p){var f=e.operation(r),h=Array.prototype.slice.call(arguments,1),l=h.pop();h.push(function(_){f.retry(_)||(_&&(arguments[0]=f.mainError()),l.apply(this,arguments))}),f.attempt(function(){p.apply(t,h)})}).bind(t,m),t[s].options=r}}})(c);var v=c;const R=y(v);export{R as a,v as r};
@@ -1 +1 @@
1
- import{ba as j,cq as O}from"./index-CURuTEb2.js";function J(i,t){for(var r=0;r<t.length;r++){const a=t[r];if(typeof a!="string"&&!Array.isArray(a)){for(const e in a)if(e!=="default"&&!(e in i)){const s=Object.getOwnPropertyDescriptor(a,e);s&&Object.defineProperty(i,e,s.get?s:{enumerable:!0,get:()=>a[e]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}var d={default:O,call:function(i,t,r){var a="";typeof t=="function"&&(r=t,t={});var e={data:t===void 0?null:t};if(typeof r=="function"){var s="dscb"+window.dscb++;window[s]=r,e._dscbstub=s}return e=JSON.stringify(e),window._dsbridge?a=_dsbridge.call(i,e):(window._dswk||navigator.userAgent.indexOf("_dsbridge")!=-1)&&(a=prompt("_dsbridge="+i,e)),JSON.parse(a||"{}").data},register:function(i,t,r){var a=r?window._dsaf:window._dsf;window._dsInit||(window._dsInit=!0,setTimeout(function(){d.call("_dsb.dsinit")},0)),typeof t=="object"?a._obs[i]=t:a[i]=t},registerAsyn:function(i,t){this.register(i,t,!0)},hasNativeMethod:function(i,t){return this.call("_dsb.hasNativeMethod",{name:i,type:t||"all"})},disableJavascriptDialogBlock:function(i){this.call("_dsb.disableJavascriptDialogBlock",{disable:i!==!1})}};(function(){if(!window._dsf){var i={_dsf:{_obs:{}},_dsaf:{_obs:{}},dscb:0,dsBridge:d,close:function(){d.call("_dsb.closePage")},_handleMessageFromNative:function(r){var a=JSON.parse(r.data),e={id:r.callbackId,complete:!0},s=this._dsf[r.method],o=this._dsaf[r.method],p=function(u,_){e.data=u.apply(_,a),d.call("_dsb.returnValue",e)},v=function(u,_){a.push(function(w,y){e.data=w,e.complete=y!==!1,d.call("_dsb.returnValue",e)}),u.apply(_,a)};if(s)p(s,this._dsf);else if(o)v(o,this._dsaf);else{var l=r.method.split(".");if(l.length<2)return;var b=l.pop(),g=l.join("."),c=this._dsf._obs,f=c[g]||{},n=f[b];if(n&&typeof n=="function"){p(n,f);return}if(c=this._dsaf._obs,f=c[g]||{},n=f[b],n&&typeof n=="function"){v(n,f);return}}}};for(var t in i)window[t]=i[t];d.register("_hasJavascriptMethod",function(r,a){var e=r.split(".");if(e.length<2)return!!(_dsf[e]||_dsaf[e]);var r=e.pop(),s=e.join("."),o=_dsf._obs[s]||_dsaf._obs[s];return o&&!!o[r]})}})();var h=d;const N=j(h),k=J({__proto__:null,default:N},[h]);export{k as i};
1
+ import{a$ as j,cx as O}from"./index-B-RFpqiC.js";function x(i,t){for(var r=0;r<t.length;r++){const a=t[r];if(typeof a!="string"&&!Array.isArray(a)){for(const e in a)if(e!=="default"&&!(e in i)){const s=Object.getOwnPropertyDescriptor(a,e);s&&Object.defineProperty(i,e,s.get?s:{enumerable:!0,get:()=>a[e]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}var d={default:O,call:function(i,t,r){var a="";typeof t=="function"&&(r=t,t={});var e={data:t===void 0?null:t};if(typeof r=="function"){var s="dscb"+window.dscb++;window[s]=r,e._dscbstub=s}return e=JSON.stringify(e),window._dsbridge?a=_dsbridge.call(i,e):(window._dswk||navigator.userAgent.indexOf("_dsbridge")!=-1)&&(a=prompt("_dsbridge="+i,e)),JSON.parse(a||"{}").data},register:function(i,t,r){var a=r?window._dsaf:window._dsf;window._dsInit||(window._dsInit=!0,setTimeout(function(){d.call("_dsb.dsinit")},0)),typeof t=="object"?a._obs[i]=t:a[i]=t},registerAsyn:function(i,t){this.register(i,t,!0)},hasNativeMethod:function(i,t){return this.call("_dsb.hasNativeMethod",{name:i,type:t||"all"})},disableJavascriptDialogBlock:function(i){this.call("_dsb.disableJavascriptDialogBlock",{disable:i!==!1})}};(function(){if(!window._dsf){var i={_dsf:{_obs:{}},_dsaf:{_obs:{}},dscb:0,dsBridge:d,close:function(){d.call("_dsb.closePage")},_handleMessageFromNative:function(r){var a=JSON.parse(r.data),e={id:r.callbackId,complete:!0},s=this._dsf[r.method],o=this._dsaf[r.method],p=function(u,_){e.data=u.apply(_,a),d.call("_dsb.returnValue",e)},v=function(u,_){a.push(function(w,y){e.data=w,e.complete=y!==!1,d.call("_dsb.returnValue",e)}),u.apply(_,a)};if(s)p(s,this._dsf);else if(o)v(o,this._dsaf);else{var l=r.method.split(".");if(l.length<2)return;var g=l.pop(),b=l.join("."),c=this._dsf._obs,f=c[b]||{},n=f[g];if(n&&typeof n=="function"){p(n,f);return}if(c=this._dsaf._obs,f=c[b]||{},n=f[g],n&&typeof n=="function"){v(n,f);return}}}};for(var t in i)window[t]=i[t];d.register("_hasJavascriptMethod",function(r,a){var e=r.split(".");if(e.length<2)return!!(_dsf[e]||_dsaf[e]);var r=e.pop(),s=e.join("."),o=_dsf._obs[s]||_dsaf._obs[s];return o&&!!o[r]})}})();var h=d;const J=j(h),S=x({__proto__:null,default:J},[h]);export{S as i};
@@ -1,4 +1,4 @@
1
- var We=Object.defineProperty;var Ze=(t,n,e)=>n in t?We(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e;var U=(t,n,e)=>Ze(t,typeof n!="symbol"?n+"":n,e);import{aL as Qe,aK as Je,aM as se,cg as A,r as R,aO as Ge,aP as Ke,aN as nt,cZ as Nt,aR as Et,j as h,aS as Xe,P as f,J as Ye,l as tn,aI as ie,bH as qt,bp as en,bq as nn,d0 as on,ao as rn,bF as j,bn as sn,B as an,d1 as cn,T as ln,d2 as un,d3 as fn,a7 as dn,d4 as pn,k as hn,bB as ae,u as ce,aJ as gn,f as mn,F as bn,ai as yn}from"./index-CURuTEb2.js";import{D as vn}from"./index-BP4DTdBA.js";import{L as xn}from"./MoreVert-cgL2UwiF.js";import{u as le,L as wn}from"./ListItemButton-s5WMuSEH.js";import{L as Cn}from"./selector-bHfmQq2F.js";function Pn(t){const{badgeContent:n,invisible:e=!1,max:r=99,showZero:o=!1}=t,s=le({badgeContent:n,max:r});let i=e;e===!1&&n===0&&!o&&(i=!0);const{badgeContent:c,max:a=r}=i?s:t,l=c&&Number(c)>a?`${a}+`:c;return{badgeContent:c,invisible:i,max:a,displayValue:l}}function On(t){return Je("MuiBadge",t)}const k=Qe("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),In=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],ot=10,rt=4,Sn=t=>{const{color:n,anchorOrigin:e,invisible:r,overlap:o,variant:s,classes:i={}}=t,c={root:["root"],badge:["badge",s,r&&"invisible",`anchorOrigin${A(e.vertical)}${A(e.horizontal)}`,`anchorOrigin${A(e.vertical)}${A(e.horizontal)}${A(o)}`,`overlap${A(o)}`,n!=="default"&&`color${A(n)}`]};return Xe(c,On,i)},Tn=se("span",{name:"MuiBadge",slot:"Root",overridesResolver:(t,n)=>n.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),jn=se("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(t,n)=>{const{ownerState:e}=t;return[n.badge,n[e.variant],n[`anchorOrigin${A(e.anchorOrigin.vertical)}${A(e.anchorOrigin.horizontal)}${A(e.overlap)}`],e.color!=="default"&&n[`color${A(e.color)}`],e.invisible&&n.invisible]}})(({theme:t})=>{var n;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(12),minWidth:ot*2,lineHeight:1,padding:"0 6px",height:ot*2,borderRadius:ot,zIndex:1,transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.enteringScreen}),variants:[...Object.keys(((n=t.vars)!=null?n:t).palette).filter(e=>{var r,o;return((r=t.vars)!=null?r:t).palette[e].main&&((o=t.vars)!=null?o:t).palette[e].contrastText}).map(e=>({props:{color:e},style:{backgroundColor:(t.vars||t).palette[e].main,color:(t.vars||t).palette[e].contrastText}})),{props:{variant:"dot"},style:{borderRadius:rt,height:rt*2,minWidth:rt*2,padding:0}},{props:({ownerState:e})=>e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${k.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${k.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${k.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${k.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:e})=>e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${k.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${k.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${k.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${k.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.leavingScreen})}}]}}),An=R.forwardRef(function(n,e){var r,o,s,i,c,a;const l=Ge({props:n,name:"MuiBadge"}),{anchorOrigin:u={vertical:"top",horizontal:"right"},className:d,component:g,components:m={},componentsProps:b={},children:v,overlap:O="rectangular",color:S="default",invisible:P=!1,max:y=99,badgeContent:M,slots:x,slotProps:p,showZero:w=!1,variant:T="standard"}=l,C=Ke(l,In),{badgeContent:I,invisible:qe,max:Be,displayValue:ze}=Pn({max:y,invisible:P,badgeContent:M,showZero:w}),$e=le({anchorOrigin:u,color:S,overlap:O,variant:T,badgeContent:M}),At=qe||I==null&&T!=="dot",{color:Fe=S,overlap:He=O,anchorOrigin:De=u,variant:Rt=T}=At?$e:l,kt=Rt!=="dot"?ze:void 0,Y=nt({},l,{badgeContent:I,invisible:At,max:Be,displayValue:kt,showZero:w,anchorOrigin:De,color:Fe,overlap:He,variant:Rt}),Lt=Sn(Y),Mt=(r=(o=x==null?void 0:x.root)!=null?o:m.Root)!=null?r:Tn,_t=(s=(i=x==null?void 0:x.badge)!=null?i:m.Badge)!=null?s:jn,tt=(c=p==null?void 0:p.root)!=null?c:b.root,et=(a=p==null?void 0:p.badge)!=null?a:b.badge,Ue=Nt({elementType:Mt,externalSlotProps:tt,externalForwardedProps:C,additionalProps:{ref:e,as:g},ownerState:Y,className:Et(tt==null?void 0:tt.className,Lt.root,d)}),Ve=Nt({elementType:_t,externalSlotProps:et,ownerState:Y,className:Et(Lt.badge,et==null?void 0:et.className)});return h.jsxs(Mt,nt({},Ue,{children:[v,h.jsx(_t,nt({},Ve,{children:kt}))]}))});/**
1
+ var We=Object.defineProperty;var Ze=(t,n,e)=>n in t?We(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e;var U=(t,n,e)=>Ze(t,typeof n!="symbol"?n+"":n,e);import{cg as Qe,ch as Je,ci as se,cj as A,r as R,cm as Ge,cn as Ke,bT as nt,d5 as Nt,co as Et,j as h,cp as Xe,P as f,J as Ye,l as tn,aI as ie,bs as qt,cO as en,cK as nn,d8 as on,ao as rn,bq as j,d9 as sn,B as cn,da as an,T as ln,db as un,dc as fn,a7 as dn,dd as pn,k as hn,bm as ce,u as ae,aJ as gn,f as mn,F as bn,ai as yn}from"./index-B-RFpqiC.js";import{D as vn}from"./index-CH3eSleH.js";import{L as xn}from"./MoreVert-D6ZGYNyY.js";import{u as le,L as wn}from"./ListItemButton-C5esEELO.js";import{L as Cn}from"./selector-DsbOSZva.js";function Pn(t){const{badgeContent:n,invisible:e=!1,max:r=99,showZero:o=!1}=t,s=le({badgeContent:n,max:r});let i=e;e===!1&&n===0&&!o&&(i=!0);const{badgeContent:a,max:c=r}=i?s:t,l=a&&Number(a)>c?`${c}+`:a;return{badgeContent:a,invisible:i,max:c,displayValue:l}}function On(t){return Je("MuiBadge",t)}const k=Qe("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),In=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],ot=10,rt=4,Tn=t=>{const{color:n,anchorOrigin:e,invisible:r,overlap:o,variant:s,classes:i={}}=t,a={root:["root"],badge:["badge",s,r&&"invisible",`anchorOrigin${A(e.vertical)}${A(e.horizontal)}`,`anchorOrigin${A(e.vertical)}${A(e.horizontal)}${A(o)}`,`overlap${A(o)}`,n!=="default"&&`color${A(n)}`]};return Xe(a,On,i)},Sn=se("span",{name:"MuiBadge",slot:"Root",overridesResolver:(t,n)=>n.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),jn=se("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(t,n)=>{const{ownerState:e}=t;return[n.badge,n[e.variant],n[`anchorOrigin${A(e.anchorOrigin.vertical)}${A(e.anchorOrigin.horizontal)}${A(e.overlap)}`],e.color!=="default"&&n[`color${A(e.color)}`],e.invisible&&n.invisible]}})(({theme:t})=>{var n;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(12),minWidth:ot*2,lineHeight:1,padding:"0 6px",height:ot*2,borderRadius:ot,zIndex:1,transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.enteringScreen}),variants:[...Object.keys(((n=t.vars)!=null?n:t).palette).filter(e=>{var r,o;return((r=t.vars)!=null?r:t).palette[e].main&&((o=t.vars)!=null?o:t).palette[e].contrastText}).map(e=>({props:{color:e},style:{backgroundColor:(t.vars||t).palette[e].main,color:(t.vars||t).palette[e].contrastText}})),{props:{variant:"dot"},style:{borderRadius:rt,height:rt*2,minWidth:rt*2,padding:0}},{props:({ownerState:e})=>e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${k.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${k.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${k.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${k.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:e})=>e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${k.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="right"&&e.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${k.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>e.anchorOrigin.vertical==="top"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${k.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>e.anchorOrigin.vertical==="bottom"&&e.anchorOrigin.horizontal==="left"&&e.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${k.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.leavingScreen})}}]}}),An=R.forwardRef(function(n,e){var r,o,s,i,a,c;const l=Ge({props:n,name:"MuiBadge"}),{anchorOrigin:u={vertical:"top",horizontal:"right"},className:d,component:g,components:m={},componentsProps:b={},children:v,overlap:O="rectangular",color:T="default",invisible:P=!1,max:y=99,badgeContent:M,slots:x,slotProps:p,showZero:w=!1,variant:S="standard"}=l,C=Ke(l,In),{badgeContent:I,invisible:qe,max:Be,displayValue:ze}=Pn({max:y,invisible:P,badgeContent:M,showZero:w}),$e=le({anchorOrigin:u,color:T,overlap:O,variant:S,badgeContent:M}),At=qe||I==null&&S!=="dot",{color:Fe=T,overlap:He=O,anchorOrigin:De=u,variant:Rt=S}=At?$e:l,kt=Rt!=="dot"?ze:void 0,Y=nt({},l,{badgeContent:I,invisible:At,max:Be,displayValue:kt,showZero:w,anchorOrigin:De,color:Fe,overlap:He,variant:Rt}),Lt=Tn(Y),Mt=(r=(o=x==null?void 0:x.root)!=null?o:m.Root)!=null?r:Sn,_t=(s=(i=x==null?void 0:x.badge)!=null?i:m.Badge)!=null?s:jn,tt=(a=p==null?void 0:p.root)!=null?a:b.root,et=(c=p==null?void 0:p.badge)!=null?c:b.badge,Ue=Nt({elementType:Mt,externalSlotProps:tt,externalForwardedProps:C,additionalProps:{ref:e,as:g},ownerState:Y,className:Et(tt==null?void 0:tt.className,Lt.root,d)}),Ve=Nt({elementType:_t,externalSlotProps:et,ownerState:Y,className:Et(Lt.badge,et==null?void 0:et.className)});return h.jsxs(Mt,nt({},Ue,{children:[v,h.jsx(_t,nt({},Ve,{children:kt}))]}))});/**
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 We=Object.defineProperty;var Ze=(t,n,e)=>n in t?We(t,n,{enumerable:!0,config
8
8
  *
9
9
  * @license MIT
10
10
  * @version 1.0.8
11
- */const ue=Object.freeze({left:0,top:0,width:16,height:16}),Q=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),F=Object.freeze({...ue,...Q}),ut=Object.freeze({...F,body:"",hidden:!1}),Rn=Object.freeze({width:null,height:null}),fe=Object.freeze({...Rn,...Q});function kn(t,n=0){const e=t.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(e===""){const o=parseInt(t);return isNaN(o)?0:r(o)}else if(e!==t){let o=0;switch(e){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(t.slice(0,t.length-e.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return n}const Ln=/[\s,]+/;function Mn(t,n){n.split(Ln).forEach(e=>{switch(e.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}const de={...fe,preserveAspectRatio:""};function Bt(t){const n={...de},e=(r,o)=>t.getAttribute(r)||o;return n.width=e("width",null),n.height=e("height",null),n.rotate=kn(e("rotate","")),Mn(n,e("flip","")),n.preserveAspectRatio=e("preserveAspectRatio",e("preserveaspectratio","")),n}function _n(t,n){for(const e in de)if(t[e]!==n[e])return!0;return!1}const E=/^[a-z0-9]+(-[a-z0-9]+)*$/,H=(t,n,e,r="")=>{const o=t.split(":");if(t.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const c=o.pop(),a=o.pop(),l={provider:o.length>0?o[0]:r,prefix:a,name:c};return n&&!W(l)?null:l}const s=o[0],i=s.split("-");if(i.length>1){const c={provider:r,prefix:i.shift(),name:i.join("-")};return n&&!W(c)?null:c}if(e&&r===""){const c={provider:r,prefix:"",name:s};return n&&!W(c,e)?null:c}return null},W=(t,n)=>t?!!((t.provider===""||t.provider.match(E))&&(n&&t.prefix===""||t.prefix.match(E))&&t.name.match(E)):!1;function Nn(t,n){const e={};!t.hFlip!=!n.hFlip&&(e.hFlip=!0),!t.vFlip!=!n.vFlip&&(e.vFlip=!0);const r=((t.rotate||0)+(n.rotate||0))%4;return r&&(e.rotate=r),e}function zt(t,n){const e=Nn(t,n);for(const r in ut)r in Q?r in t&&!(r in e)&&(e[r]=Q[r]):r in n?e[r]=n[r]:r in t&&(e[r]=t[r]);return e}function En(t,n){const e=t.icons,r=t.aliases||Object.create(null),o=Object.create(null);function s(i){if(e[i])return o[i]=[];if(!(i in o)){o[i]=null;const c=r[i]&&r[i].parent,a=c&&s(c);a&&(o[i]=[c].concat(a))}return o[i]}return Object.keys(e).concat(Object.keys(r)).forEach(s),o}function qn(t,n,e){const r=t.icons,o=t.aliases||Object.create(null);let s={};function i(c){s=zt(r[c]||o[c],s)}return i(n),e.forEach(i),zt(t,s)}function pe(t,n){const e=[];if(typeof t!="object"||typeof t.icons!="object")return e;t.not_found instanceof Array&&t.not_found.forEach(o=>{n(o,null),e.push(o)});const r=En(t);for(const o in r){const s=r[o];s&&(n(o,qn(t,o,s)),e.push(o))}return e}const Bn={provider:"",aliases:{},not_found:{},...ue};function st(t,n){for(const e in n)if(e in t&&typeof t[e]!=typeof n[e])return!1;return!0}function he(t){if(typeof t!="object"||t===null)return null;const n=t;if(typeof n.prefix!="string"||!t.icons||typeof t.icons!="object"||!st(t,Bn))return null;const e=n.icons;for(const o in e){const s=e[o];if(!o.match(E)||typeof s.body!="string"||!st(s,ut))return null}const r=n.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(E)||typeof i!="string"||!e[i]&&!r[i]||!st(s,ut))return null}return n}const J=Object.create(null);function zn(t,n){return{provider:t,prefix:n,icons:Object.create(null),missing:new Set}}function L(t,n){const e=J[t]||(J[t]=Object.create(null));return e[n]||(e[n]=zn(t,n))}function vt(t,n){return he(n)?pe(n,(e,r)=>{r?t.icons[e]=r:t.missing.add(e)}):[]}function $n(t,n,e){try{if(typeof e.body=="string")return t.icons[n]={...e},!0}catch{}return!1}function Fn(t,n){let e=[];return(typeof t=="string"?[t]:Object.keys(J)).forEach(o=>{(typeof o=="string"&&typeof n=="string"?[n]:Object.keys(J[o]||{})).forEach(i=>{const c=L(o,i);e=e.concat(Object.keys(c.icons).map(a=>(o!==""?"@"+o+":":"")+i+":"+a))})}),e}let B=!1;function ge(t){return typeof t=="boolean"&&(B=t),B}function z(t){const n=typeof t=="string"?H(t,!0,B):t;if(n){const e=L(n.provider,n.prefix),r=n.name;return e.icons[r]||(e.missing.has(r)?null:void 0)}}function me(t,n){const e=H(t,!0,B);if(!e)return!1;const r=L(e.provider,e.prefix);return $n(r,e.name,n)}function $t(t,n){if(typeof t!="object")return!1;if(typeof n!="string"&&(n=t.provider||""),B&&!n&&!t.prefix){let o=!1;return he(t)&&(t.prefix="",pe(t,(s,i)=>{i&&me(s,i)&&(o=!0)})),o}const e=t.prefix;if(!W({provider:n,prefix:e,name:"a"}))return!1;const r=L(n,e);return!!vt(r,t)}function Hn(t){return!!z(t)}function Dn(t){const n=z(t);return n?{...F,...n}:null}function Un(t){const n={loaded:[],missing:[],pending:[]},e=Object.create(null);t.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 t.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,i=o.prefix,c=o.name,a=e[s]||(e[s]=Object.create(null)),l=a[i]||(a[i]=L(s,i));let u;c in l.icons?u=n.loaded:i===""||l.missing.has(c)?u=n.missing:u=n.pending;const d={provider:s,prefix:i,name:c};u.push(d)}),n}function be(t,n){t.forEach(e=>{const r=e.loaderCallbacks;r&&(e.loaderCallbacks=r.filter(o=>o.id!==n))})}function Vn(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const n=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!n.length)return;let e=!1;const r=t.provider,o=t.prefix;n.forEach(s=>{const i=s.icons,c=i.pending.length;i.pending=i.pending.filter(a=>{if(a.prefix!==o)return!0;const l=a.name;if(t.icons[l])i.loaded.push({provider:r,prefix:o,name:l});else if(t.missing.has(l))i.missing.push({provider:r,prefix:o,name:l});else return e=!0,!0;return!1}),i.pending.length!==c&&(e||be([t],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let Wn=0;function Zn(t,n,e){const r=Wn++,o=be.bind(null,e,r);if(!n.pending.length)return o;const s={id:r,icons:n,callback:t,abort:o};return e.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}const ft=Object.create(null);function Ft(t,n){ft[t]=n}function dt(t){return ft[t]||ft[""]}function Qn(t,n=!0,e=!1){const r=[];return t.forEach(o=>{const s=typeof o=="string"?H(o,n,e):o;s&&r.push(s)}),r}var Jn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Gn(t,n,e,r){const o=t.resources.length,s=t.random?Math.floor(Math.random()*o):t.index;let i;if(t.random){let p=t.resources.slice(0);for(i=[];p.length>1;){const w=Math.floor(Math.random()*p.length);i.push(p[w]),p=p.slice(0,w).concat(p.slice(w+1))}i=i.concat(p)}else i=t.resources.slice(s).concat(t.resources.slice(0,s));const c=Date.now();let a="pending",l=0,u,d=null,g=[],m=[];typeof r=="function"&&m.push(r);function b(){d&&(clearTimeout(d),d=null)}function v(){a==="pending"&&(a="aborted"),b(),g.forEach(p=>{p.status==="pending"&&(p.status="aborted")}),g=[]}function O(p,w){w&&(m=[]),typeof p=="function"&&m.push(p)}function S(){return{startTime:c,payload:n,status:a,queriesSent:l,queriesPending:g.length,subscribe:O,abort:v}}function P(){a="failed",m.forEach(p=>{p(void 0,u)})}function y(){g.forEach(p=>{p.status==="pending"&&(p.status="aborted")}),g=[]}function M(p,w,T){const C=w!=="success";switch(g=g.filter(I=>I!==p),a){case"pending":break;case"failed":if(C||!t.dataAfterTimeout)return;break;default:return}if(w==="abort"){u=T,P();return}if(C){u=T,g.length||(i.length?x():P());return}if(b(),y(),!t.random){const I=t.resources.indexOf(p.resource);I!==-1&&I!==t.index&&(t.index=I)}a="completed",m.forEach(I=>{I(T)})}function x(){if(a!=="pending")return;b();const p=i.shift();if(p===void 0){if(g.length){d=setTimeout(()=>{b(),a==="pending"&&(y(),P())},t.timeout);return}P();return}const w={status:"pending",resource:p,callback:(T,C)=>{M(w,T,C)}};g.push(w),l++,d=setTimeout(x,t.rotate),e(p,n,w.callback)}return setTimeout(x),S}function ye(t){const n={...Jn,...t};let e=[];function r(){e=e.filter(c=>c().status==="pending")}function o(c,a,l){const u=Gn(n,c,a,(d,g)=>{r(),l&&l(d,g)});return e.push(u),u}function s(c){return e.find(a=>c(a))||null}return{query:o,find:s,setIndex:c=>{n.index=c},getIndex:()=>n.index,cleanup:r}}function xt(t){let n;if(typeof t.resources=="string")n=[t.resources];else if(n=t.resources,!(n instanceof Array)||!n.length)return null;return{resources:n,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const K=Object.create(null),N=["https://api.simplesvg.com","https://api.unisvg.com"],Z=[];for(;N.length>0;)N.length===1||Math.random()>.5?Z.push(N.shift()):Z.push(N.pop());K[""]=xt({resources:["https://api.iconify.design"].concat(Z)});function Ht(t,n){const e=xt(n);return e===null?!1:(K[t]=e,!0)}function X(t){return K[t]}function Kn(){return Object.keys(K)}function Dt(){}const it=Object.create(null);function Xn(t){if(!it[t]){const n=X(t);if(!n)return;const e=ye(n),r={config:n,redundancy:e};it[t]=r}return it[t]}function ve(t,n,e){let r,o;if(typeof t=="string"){const s=dt(t);if(!s)return e(void 0,424),Dt;o=s.send;const i=Xn(t);i&&(r=i.redundancy)}else{const s=xt(t);if(s){r=ye(s);const i=t.resources?t.resources[0]:"",c=dt(i);c&&(o=c.send)}}return!r||!o?(e(void 0,424),Dt):r.query(n,o,e)().abort}const Ut="iconify2",$="iconify",xe=$+"-count",Vt=$+"-version",we=36e5,Yn=168;function pt(t,n){try{return t.getItem(n)}catch{}}function wt(t,n,e){try{return t.setItem(n,e),!0}catch{}}function Wt(t,n){try{t.removeItem(n)}catch{}}function ht(t,n){return wt(t,xe,n.toString())}function gt(t){return parseInt(pt(t,xe))||0}const _={local:!0,session:!0},Ce={local:new Set,session:new Set};let Ct=!1;function to(t){Ct=t}let V=typeof window>"u"?{}:window;function Pe(t){const n=t+"Storage";try{if(V&&V[n]&&typeof V[n].length=="number")return V[n]}catch{}_[t]=!1}function Oe(t,n){const e=Pe(t);if(!e)return;const r=pt(e,Vt);if(r!==Ut){if(r){const c=gt(e);for(let a=0;a<c;a++)Wt(e,$+a.toString())}wt(e,Vt,Ut),ht(e,0);return}const o=Math.floor(Date.now()/we)-Yn,s=c=>{const a=$+c.toString(),l=pt(e,a);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,c))return!0}catch{}Wt(e,a)}};let i=gt(e);for(let c=i-1;c>=0;c--)s(c)||(c===i-1?(i--,ht(e,i)):Ce[t].add(c))}function Ie(){if(!Ct){to(!0);for(const t in _)Oe(t,n=>{const e=n.data,r=n.provider,o=e.prefix,s=L(r,o);if(!vt(s,e).length)return!1;const i=e.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function eo(t,n){const e=t.lastModifiedCached;if(e&&e>=n)return e===n;if(t.lastModifiedCached=n,e)for(const r in _)Oe(r,o=>{const s=o.data;return o.provider!==t.provider||s.prefix!==t.prefix||s.lastModified===n});return!0}function no(t,n){Ct||Ie();function e(r){let o;if(!_[r]||!(o=Pe(r)))return;const s=Ce[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=gt(o),!ht(o,i+1))return;const c={cached:Math.floor(Date.now()/we),provider:t.provider,data:n};return wt(o,$+i.toString(),JSON.stringify(c))}n.lastModified&&!eo(t,n.lastModified)||Object.keys(n.icons).length&&(n.not_found&&(n=Object.assign({},n),delete n.not_found),e("local")||e("session"))}function Zt(){}function oo(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,Vn(t)}))}function ro(t,n){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(n).sort():t.iconsToLoad=n,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:e,prefix:r}=t,o=t.iconsToLoad;delete t.iconsToLoad;let s;if(!o||!(s=dt(e)))return;s.prepare(e,r,o).forEach(c=>{ve(e,c,a=>{if(typeof a!="object")c.icons.forEach(l=>{t.missing.add(l)});else try{const l=vt(t,a);if(!l.length)return;const u=t.pendingIcons;u&&l.forEach(d=>{u.delete(d)}),no(t,a)}catch(l){console.error(l)}oo(t)})})}))}const Pt=(t,n)=>{const e=Qn(t,!0,ge()),r=Un(e);if(!r.pending.length){let a=!0;return n&&setTimeout(()=>{a&&n(r.loaded,r.missing,r.pending,Zt)}),()=>{a=!1}}const o=Object.create(null),s=[];let i,c;return r.pending.forEach(a=>{const{provider:l,prefix:u}=a;if(u===c&&l===i)return;i=l,c=u,s.push(L(l,u));const d=o[l]||(o[l]=Object.create(null));d[u]||(d[u]=[])}),r.pending.forEach(a=>{const{provider:l,prefix:u,name:d}=a,g=L(l,u),m=g.pendingIcons||(g.pendingIcons=new Set);m.has(d)||(m.add(d),o[l][u].push(d))}),s.forEach(a=>{const{provider:l,prefix:u}=a;o[l][u].length&&ro(a,o[l][u])}),n?Zn(n,r,s):Zt},so=t=>new Promise((n,e)=>{const r=typeof t=="string"?H(t,!0):t;if(!r){e(t);return}Pt([r||t],o=>{if(o.length&&r){const s=z(r);if(s){n({...F,...s});return}}e(t)})});function io(t){try{const n=typeof t=="string"?JSON.parse(t):t;if(typeof n.body=="string")return{...n}}catch{}}function ao(t,n){const e=typeof t=="string"?H(t,!0,!0):null;if(!e){const s=io(t);return{value:t,data:s}}const r=z(e);if(r!==void 0||!e.prefix)return{value:t,name:e,data:r};const o=Pt([e],()=>n(t,e,z(e)));return{value:t,name:e,loading:o}}function at(t){return t.hasAttribute("inline")}let Se=!1;try{Se=navigator.vendor.indexOf("Apple")===0}catch{}function co(t,n){switch(n){case"svg":case"bg":case"mask":return n}return n!=="style"&&(Se||t.indexOf("<a")===-1)?"svg":t.indexOf("currentColor")===-1?"bg":"mask"}const lo=/(-?[0-9.]*[0-9]+[0-9.]*)/g,uo=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function mt(t,n,e){if(n===1)return t;if(e=e||100,typeof t=="number")return Math.ceil(t*n*e)/e;if(typeof t!="string")return t;const r=t.split(lo);if(r===null||!r.length)return t;const o=[];let s=r.shift(),i=uo.test(s);for(;;){if(i){const c=parseFloat(s);isNaN(c)?o.push(s):o.push(Math.ceil(c*n*e)/e)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const fo=t=>t==="unset"||t==="undefined"||t==="none";function Te(t,n){const e={...F,...t},r={...fe,...n},o={left:e.left,top:e.top,width:e.width,height:e.height};let s=e.body;[e,r].forEach(b=>{const v=[],O=b.hFlip,S=b.vFlip;let P=b.rotate;O?S?P+=2:(v.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),v.push("scale(-1 1)"),o.top=o.left=0):S&&(v.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),v.push("scale(1 -1)"),o.top=o.left=0);let y;switch(P<0&&(P-=Math.floor(P/4)*4),P=P%4,P){case 1:y=o.height/2+o.top,v.unshift("rotate(90 "+y.toString()+" "+y.toString()+")");break;case 2:v.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:y=o.width/2+o.left,v.unshift("rotate(-90 "+y.toString()+" "+y.toString()+")");break}P%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)),v.length&&(s='<g transform="'+v.join(" ")+'">'+s+"</g>")});const i=r.width,c=r.height,a=o.width,l=o.height;let u,d;i===null?(d=c===null?"1em":c==="auto"?l:c,u=mt(d,a/l)):(u=i==="auto"?a:i,d=c===null?mt(u,l/a):c==="auto"?l:c);const g={},m=(b,v)=>{fo(v)||(g[b]=v.toString())};return m("width",u),m("height",d),g.viewBox=o.left.toString()+" "+o.top.toString()+" "+a.toString()+" "+l.toString(),{attributes:g,body:s}}const po=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let G=po();function ho(t){G=t}function go(){return G}function mo(t,n){const e=X(t);if(!e)return 0;let r;if(!e.maxURL)r=0;else{let o=0;e.resources.forEach(i=>{o=Math.max(o,i.length)});const s=n+".json?icons=";r=e.maxURL-o-e.path.length-s.length}return r}function bo(t){return t===404}const yo=(t,n,e)=>{const r=[],o=mo(t,n),s="icons";let i={type:s,provider:t,prefix:n,icons:[]},c=0;return e.forEach((a,l)=>{c+=a.length+1,c>=o&&l>0&&(r.push(i),i={type:s,provider:t,prefix:n,icons:[]},c=a.length),i.icons.push(a)}),r.push(i),r};function vo(t){if(typeof t=="string"){const n=X(t);if(n)return n.path}return"/"}const xo=(t,n,e)=>{if(!G){e("abort",424);return}let r=vo(n.provider);switch(n.type){case"icons":{const s=n.prefix,c=n.icons.join(","),a=new URLSearchParams({icons:c});r+=s+".json?"+a.toString();break}case"custom":{const s=n.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:e("abort",400);return}let o=503;G(t+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{e(bo(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?e("abort",s):e("next",o)});return}setTimeout(()=>{e("success",s)})}).catch(()=>{e("next",o)})},wo={prepare:yo,send:xo};function Qt(t,n){switch(t){case"local":case"session":_[t]=n;break;case"all":for(const e in _)_[e]=n;break}}const ct="data-style";let je="";function Co(t){je=t}function Jt(t,n){let e=Array.from(t.childNodes).find(r=>r.hasAttribute&&r.hasAttribute(ct));e||(e=document.createElement("style"),e.setAttribute(ct,ct),t.appendChild(e)),e.textContent=":host{display:inline-block;vertical-align:"+(n?"-0.125em":"0")+"}span,svg{display:block}"+je}function Ae(){Ft("",wo),ge(!0);let t;try{t=window}catch{}if(t){if(Ie(),t.IconifyPreload!==void 0){const e=t.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof e=="object"&&e!==null&&(e instanceof Array?e:[e]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!$t(o))&&console.error(r)}catch{console.error(r)}})}if(t.IconifyProviders!==void 0){const e=t.IconifyProviders;if(typeof e=="object"&&e!==null)for(const r in e){const o="IconifyProviders["+r+"] is invalid.";try{const s=e[r];if(typeof s!="object"||!s||s.resources===void 0)continue;Ht(r,s)||console.error(o)}catch{console.error(o)}}}}return{enableCache:e=>Qt(e,!0),disableCache:e=>Qt(e,!1),iconExists:Hn,getIcon:Dn,listIcons:Fn,addIcon:me,addCollection:$t,calculateSize:mt,buildIcon:Te,loadIcons:Pt,loadIcon:so,addAPIProvider:Ht,appendCustomStyle:Co,_api:{getAPIConfig:X,setAPIModule:Ft,sendAPIQuery:ve,setFetch:ho,getFetch:go,listAPIProviders:Kn}}}function Re(t,n){let e=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in n)e+=" "+r+'="'+n[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+e+">"+t+"</svg>"}function Po(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Oo(t){return"data:image/svg+xml,"+Po(t)}function Io(t){return'url("'+Oo(t)+'")'}const bt={"background-color":"currentColor"},ke={"background-color":"transparent"},Gt={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Kt={"-webkit-mask":bt,mask:bt,background:ke};for(const t in Kt){const n=Kt[t];for(const e in Gt)n[t+"-"+e]=Gt[e]}function Xt(t){return t?t+(t.match(/^[-0-9.]+$/)?"px":""):"inherit"}function So(t,n,e){const r=document.createElement("span");let o=t.body;o.indexOf("<a")!==-1&&(o+="<!-- "+Date.now()+" -->");const s=t.attributes,i=Re(o,{...s,width:n.width+"",height:n.height+""}),c=Io(i),a=r.style,l={"--svg":c,width:Xt(s.width),height:Xt(s.height),...e?bt:ke};for(const u in l)a.setProperty(u,l[u]);return r}let q;function To(){try{q=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{q=null}}function jo(t){return q===void 0&&To(),q?q.createHTML(t):t}function Ao(t){const n=document.createElement("span"),e=t.attributes;let r="";e.width||(r="width: inherit;"),e.height||(r+="height: inherit;"),r&&(e.style=r);const o=Re(t.body,e);return n.innerHTML=jo(o),n.firstChild}function Yt(t,n){const e=n.icon.data,r=n.customisations,o=Te(e,r);r.preserveAspectRatio&&(o.attributes.preserveAspectRatio=r.preserveAspectRatio);const s=n.renderedMode;let i;switch(s){case"svg":i=Ao(o);break;default:i=So(o,{...F,...e},s==="mask")}const c=Array.from(t.childNodes).find(a=>{const l=a.tagName&&a.tagName.toUpperCase();return l==="SPAN"||l==="SVG"});c?i.tagName==="SPAN"&&c.tagName===i.tagName?c.setAttribute("style",i.getAttribute("style")):t.replaceChild(i,c):t.appendChild(i)}function te(t,n,e){const r=e&&(e.rendered?e:e.lastRender);return{rendered:!1,inline:n,icon:t,lastRender:r}}function Ro(t="iconify-icon"){let n,e;try{n=window.customElements,e=window.HTMLElement}catch{return}if(!n||!e)return;const r=n.get(t);if(r)return r;const o=["icon","mode","inline","width","height","rotate","flip"],s=class extends e{constructor(){super();U(this,"_shadowRoot");U(this,"_state");U(this,"_checkQueued",!1);const a=this._shadowRoot=this.attachShadow({mode:"open"}),l=at(this);Jt(a,l),this._state=te({value:""},l),this._queueCheck()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(a){if(a==="inline"){const l=at(this),u=this._state;l!==u.inline&&(u.inline=l,Jt(this._shadowRoot,l))}else this._queueCheck()}get icon(){const a=this.getAttribute("icon");if(a&&a.slice(0,1)==="{")try{return JSON.parse(a)}catch{}return a}set icon(a){typeof a=="object"&&(a=JSON.stringify(a)),this.setAttribute("icon",a)}get inline(){return at(this)}set inline(a){a?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const a=this._state;if(a.rendered){const l=this._shadowRoot;if(a.renderedMode==="svg")try{l.lastChild.setCurrentTime(0);return}catch{}Yt(l,a)}}get status(){const a=this._state;return a.rendered?"rendered":a.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const a=this._state,l=this.getAttribute("icon");if(l!==a.icon.value){this._iconChanged(l);return}if(!a.rendered)return;const u=this.getAttribute("mode"),d=Bt(this);(a.attrMode!==u||_n(a.customisations,d))&&this._renderIcon(a.icon,d,u)}_iconChanged(a){const l=ao(a,(u,d,g)=>{const m=this._state;if(m.rendered||this.getAttribute("icon")!==u)return;const b={value:u,name:d,data:g};b.data?this._gotIconData(b):m.icon=b});l.data?this._gotIconData(l):this._state=te(l,this._state.inline,this._state)}_gotIconData(a){this._checkQueued=!1,this._renderIcon(a,Bt(this),this.getAttribute("mode"))}_renderIcon(a,l,u){const d=co(a.data.body,u),g=this._state.inline;Yt(this._shadowRoot,this._state={rendered:!0,icon:a,inline:g,customisations:l,attrMode:u,renderedMode:d})}};o.forEach(c=>{c in s.prototype||Object.defineProperty(s.prototype,c,{get:function(){return this.getAttribute(c)},set:function(a){a!==null?this.setAttribute(c,a):this.removeAttribute(c)}})});const i=Ae();for(const c in i)s[c]=s.prototype[c]=i[c];return n.define(t,s),s}Ro()||Ae();const ko=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])}))}))}),Le=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}),D=(t,n,e="children")=>t.map(r=>Array.isArray(r[e])?n({...r,[e]:D(r[e],n,e)}):n(r)),Lo=(t,n="children")=>{const e=[];return D(t,r=>e.push(r),n),e},Ot=(t,n,e="children")=>t.map(r=>({...r})).filter(r=>{const o=r[e];if(Array.isArray(o)){const i=Ot(o,n,e);r[e]=i!=null&&i.length?i:void 0}const s={filteredChildren:r[e],isLeaf:!(o!=null&&o.length)};return n(r,s)}),Mo=t=>/^https?:\/\//.test(t),_o=t=>{if(!t||!(t!=null&&t.startsWith("/")))return!1;const n=o=>o.endsWith("/")?o:`${o}/`,e=n(window.location.pathname),r=n(new URL(t,window.location.origin).pathname);return e.startsWith(r)},No=(t=[])=>{const n=t.map((r,o)=>({path:r,index:o})).filter(r=>_o(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 oe,re;const yt=((oe=window==null?void 0:window.blocklet)==null?void 0:oe.groupPrefix)||((re=window==null?void 0:window.blocklet)==null?void 0:re.prefix)||"/",Eo=t=>{const n={...t},e=t==null?void 0:t.background;return typeof e=="string"?n.background={header:e,footer:e,default:e}:e&&typeof e=="object"&&(n.background={header:e.header||e.default,footer:e.footer||e.default,default:e.default}),n},Me=(t,n="en")=>{if(!(t!=null&&t.length))return t;const e=(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(Mo(o)){const c=new URL(o);return c.searchParams.set("locale",s),c.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 D(t,o=>{var s;return{...o,title:e(o.title,n),link:(s=o.items)!=null&&s.length?o.link:r(o.link,n),_rawLink:o.link}},"items")},qo=t=>D(t,n=>n.role?{...n,role:Array.isArray(n.role)?n.role:[n.role]}:n,"items"),Bo=t=>{if(!(t!=null&&t.length))return null;const n=qo(t),e={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=e[s])==null||i.push(r)}):typeof r.section=="string"&&((o=e[r.section])==null||o.push(r)):e.header.push(r)}),e},zo=t=>{if(!t)return null;const n={...t};return n.theme=Eo(n.theme),n.navigation=Bo($o(n.navigation)),n},$o=(t=[])=>Ot(t,(n,e)=>{var r;return!!n.link||((r=e.filteredChildren)==null?void 0:r.length)},"items"),_e=(t,n)=>Ot(t,(e,r)=>{var s;const o=!e.role||n&&(e.role.includes(n)||e.role.includes("guest"));return r.isLeaf?o:o&&((s=r.filteredChildren)==null?void 0:s.length)},"items"),Fo={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"/>'},Ho={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 Do({session:t,locale:n="zh",size:e=24}){const r=(window==null?void 0:window.blocklet)||{},o=(r.navigation||[]).filter(a=>a.section==="sessionManager"&&!["/sessionManager"].includes(a.id)).filter(a=>{var l;return!!((a==null?void 0:a.role)||[]).includes(((l=t==null?void 0:t.user)==null?void 0:l.role)||"guest")}).map(a=>{const l=((r==null?void 0:r.componentMountPoints)||[]).find(u=>a.component===u.name);return{...a,component:l}}),s=R.useRef(null),i=Ye({open:!1}),c=tn((a=!i.open)=>{i.open=a});return o.length===0||!(t!=null&&t.user)?null:h.jsxs(h.Fragment,{children:[h.jsx(ie,{size:"medium",ref:s,onClick:()=>c(),children:h.jsx(qt,{icon:Fo,fontSize:e,style:{transform:"scale(1.08)"}})}),h.jsx(en,{open:i.open,anchorEl:s.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:a})=>h.jsx(nn,{onClickAway:l=>{l.preventDefault(),l.stopPropagation(),c(!1)},children:h.jsx(on,{...a,timeout:350,children:h.jsxs(rn,{variant:"outlined",sx:{borderRadius:3,width:350,maxWidth:"90vw",borderColor:j.lineStep,p:2,border:"0 !important",boxShadow:`0px 8px 16px 0px ${j.gray6}, 0px 0px 0px 1px ${j.gray6}`},children:[h.jsx(sn,{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 h.jsx(xn,{disablePadding:!0,children:h.jsxs(wn,{href:l.link,sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:2,"&:hover":{backgroundColor:j.surfacePrimarySubtitle}},children:[(u=l==null?void 0:l.component)!=null&&u.did?h.jsx(an,{component:"img",src:`${cn}/blocklet/logo-bundle/${l.component.did}`,sx:{borderRadius:2,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):h.jsx(qt,{fontSize:50,icon:l.icon||Ho,color:j.textSubtitle}),h.jsx(ln,{sx:{fontSize:"12px",color:j.textBase,textAlign:"center",lineHeight:"normal"},children:un(l.title,n)})]})},l.id)})}),h.jsx(fn,{session:t,children:h.jsx(dn,{variant:"outlined",fullWidth:!0,href:pn,sx:{mt:1,borderRadius:2,color:j.textBase,borderColor:j.lineBorderStrong,"&:hover":{color:j.primaryBase,borderColor:j.primaryBase}},children:n==="zh"?"管理":"Manage"})})]})})})})]})}var It={};Object.defineProperty(It,"__esModule",{value:!0});var Ne=It.default=void 0;Uo(R);var lt=h;function Uo(t){return t&&t.__esModule?t:{default:t}}function ee(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),e.push.apply(e,r)}return e}function ne(t){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?ee(Object(e),!0).forEach(function(r){Vo(t,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):ee(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}return t}function Vo(t,n,e){return(n=Wo(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function Wo(t){var n=Zo(t,"string");return typeof n=="symbol"?n:n+""}function Zo(t,n){if(typeof t!="object"||!t)return t;var e=t[Symbol.toPrimitive];if(e!==void 0){var r=e.call(t,n||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(t)}var St=function(n){return(0,lt.jsxs)("svg",ne(ne({},n),{},{children:[(0,lt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.25107 2.50001C6.67528 2.49385 4.50443 4.60042 4.48473 7.00559V12.7899C4.48473 13.5826 4.40145 14.5678 3.90413 15.4998H16.0954C15.599 14.5684 15.5146 13.5831 15.5146 12.7889V7.01078C15.4804 4.60752 13.3051 2.50948 10.7176 2.50301C10.7174 2.50301 10.7177 2.50301 10.7176 2.50301L9.25107 2.50001ZM17.0146 7.00094V12.7889C17.0146 13.5789 17.1156 14.3509 17.5456 15.0078L17.8325 15.4458C18.2685 16.1098 17.7995 16.9998 17.0146 16.9998H2.98473C2.19974 16.9998 1.72975 16.1098 2.16674 15.4458L2.45374 15.0078C2.88473 14.3509 2.98473 13.5799 2.98473 12.7899V6.99994C3.00773 3.70898 5.9107 0.992018 9.25465 1.00002L10.7206 1.00302C14.0646 1.01102 16.9746 3.70898 17.0146 7.00094Z",fill:"currentColor"}),(0,lt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.0602 18.0606C11.3415 17.7793 11.4996 17.3978 11.4996 17H12.9996C12.9996 17.7956 12.6835 18.5587 12.1209 19.1213C11.5583 19.6839 10.7952 19.9999 9.9996 19.9999C9.20396 19.9999 8.4409 19.6839 7.8783 19.1213C7.3157 18.5587 6.99963 17.7956 6.99963 17H8.49963C8.49963 17.3978 8.65767 17.7793 8.93896 18.0606C9.22026 18.3419 9.60178 18.4999 9.9996 18.4999C10.3974 18.4999 10.7789 18.3419 11.0602 18.0606Z",fill:"currentColor"})]}))};St.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};St.displayName="notification";Ne=It.default=St;function Tt({session:t={}}){const{unReadCount:n}=t,e=hn(()=>{const{navigation:r}=window.blocklet??{},o=r==null?void 0:r.find(s=>s.id==="/userCenter/notification");return o==null?void 0:o.link});return!t.user||!e?null:h.jsx(ie,{size:"medium",variant:"outlined",href:e,sx:{borderRadius:2,color:"rgba(0, 0, 0, 0.6)",borderColor:j.lineBorderStrong,"&:hover":{borderRadius:"50%"}},children:h.jsx(An,{variant:"dot",color:"error",invisible:n===0,children:h.jsx(Ne,{style:{width:"auto",height:24}})})})}Tt.propTypes={session:f.object};Tt.defaultProps={session:{}};const Qo=()=>{var n;return!!(((n=window==null?void 0:window.blocklet)==null?void 0:n.navigation)??[]).find(e=>e.id==="/userCenter/notification")};function jt({formattedBlocklet:t,addons:n,sessionManagerProps:e}){var g,m,b,v;const r=R.useContext(ae),{locale:o}=ce()||{},{enableConnect:s=!0,enableLocale:i=!0}=t,c=!!((g=r==null?void 0:r.session)!=null&&g.user);let a=Me((m=t==null?void 0:t.navigation)==null?void 0:m.sessionManager,o)||[];a=_e(a,(v=(b=r==null?void 0:r.session)==null?void 0:b.user)==null?void 0:v.role);const u=(()=>{if(n&&typeof n!="function")return Array.isArray(n)?n:[n];let O=[];if(Qo()&&O.push(h.jsx(Tt,{session:r.session},"notification-addon")),i&&o&&O.push(h.jsx(Cn,{showText:!1},"locale-selector")),s&&r){const S=[];c&&(a?a.slice(0,5):[]).forEach(y=>{S.push({label:y.title,icon:y.icon?h.jsx("iconify-icon",{icon:y.icon,height:24,style:{marginRight:8}}):null,component:"a",href:y.link,key:y.link})}),O.push(h.jsx(Do,{session:r.session,locale:o},"session-blocklet")),O.push(h.jsx(gn,{session:r.session,locale:o,menu:S,showRole:!0,...e},"session-user"))}return typeof n=="function"&&(O=n(O)||[]),O})();return R.createElement(h.Fragment,null,...Array.isArray(u)?u:[u])}jt.propTypes={formattedBlocklet:f.object.isRequired,addons:f.oneOfType([f.func,f.node]),sessionManagerProps:Le};jt.defaultProps={addons:null,sessionManagerProps:{showRole:!0}};const Jo=()=>{const t=mn();R.useEffect(()=>{t.wallet&&bn.call("arcHideTopBar","{}")},[t])};function Ee({meta:t,fallbackUrl:n,invalidPathFallback:e,headerAddons:r,sessionManagerProps:o,links:s,...i}){var M;Jo();const c=R.useContext(ae),a=(M=c==null?void 0:c.session)==null?void 0:M.user,l=a==null?void 0:a.role,{locale:u}=ce()||{},d=R.useMemo(()=>{const x=Object.assign({},window.blocklet,t);try{return zo(x)}catch(p){return console.error("Failed to format blocklet info",p,x),x}},[t]),{localizedNav:g,flattened:m,matchedIndex:b}=R.useMemo(()=>{var T;let x=Me((T=d==null?void 0:d.navigation)==null?void 0:T.dashboard,u)||[];x=_e(x,l),x=D(x,C=>{let I=null;return C.icon&&(C.icon.startsWith("http")||C.icon.startsWith("data:")?I=h.jsx(yn,{src:C.icon}):I=h.jsx("iconify-icon",{height:"100%",width:"100%",icon:C.icon})),{title:C.title,url:C.link,icon:I,external:!0,children:C.items}},"items");const p=Lo(x).filter(C=>!!C.url),w=No(p.map(C=>C.url));return w!==-1&&(p[w].active=!0),{localizedNav:x,flattened:p,matchedIndex:w}},[d,u,l]),v=typeof s=="function"?s(g):[...g,...s];if(R.useLayoutEffect(()=>{a&&!(m!=null&&m.length)&&n&&(window.location.href=n)},[n]),R.useLayoutEffect(()=>{a&&(m!=null&&m.length)&&b===-1&&e&&e()},[e,m,b]),!d.appName)return null;const{appLogo:O,appLogoRect:S,appName:P}=d,y=h.jsx(jt,{formattedBlocklet:d,addons:r,sessionManagerProps:o});return h.jsx(vn,{title:P,fullWidth:!0,sidebarWidth:128,legacy:!1,links:v,...i,headerProps:{homeLink:yt,logo:h.jsx("img",{src:S||O,alt:"logo"}),addons:y,...i.headerProps}})}Ee.propTypes={meta:ko,fallbackUrl:f.string,invalidPathFallback:f.func,headerAddons:f.oneOfType([f.func,f.node]),sessionManagerProps:Le,links:f.oneOfType([f.array,f.func])};Ee.defaultProps={meta:{},fallbackUrl:yt,invalidPathFallback:null,headerAddons:void 0,sessionManagerProps:{showRole:!0,onLogout:()=>{window.location.href=yt}},links:[]};export{An as B,Ee as D,jt as H,Lo as a,No as b,ko as c,Ne as d,zo as f,Me as g,Mo as i,D as m,yt as p,Jo as u};
11
+ */const ue=Object.freeze({left:0,top:0,width:16,height:16}),Q=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),F=Object.freeze({...ue,...Q}),ut=Object.freeze({...F,body:"",hidden:!1}),Rn=Object.freeze({width:null,height:null}),fe=Object.freeze({...Rn,...Q});function kn(t,n=0){const e=t.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(e===""){const o=parseInt(t);return isNaN(o)?0:r(o)}else if(e!==t){let o=0;switch(e){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(t.slice(0,t.length-e.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return n}const Ln=/[\s,]+/;function Mn(t,n){n.split(Ln).forEach(e=>{switch(e.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}const de={...fe,preserveAspectRatio:""};function Bt(t){const n={...de},e=(r,o)=>t.getAttribute(r)||o;return n.width=e("width",null),n.height=e("height",null),n.rotate=kn(e("rotate","")),Mn(n,e("flip","")),n.preserveAspectRatio=e("preserveAspectRatio",e("preserveaspectratio","")),n}function _n(t,n){for(const e in de)if(t[e]!==n[e])return!0;return!1}const E=/^[a-z0-9]+(-[a-z0-9]+)*$/,H=(t,n,e,r="")=>{const o=t.split(":");if(t.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&&!W(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&&!W(a)?null:a}if(e&&r===""){const a={provider:r,prefix:"",name:s};return n&&!W(a,e)?null:a}return null},W=(t,n)=>t?!!((t.provider===""||t.provider.match(E))&&(n&&t.prefix===""||t.prefix.match(E))&&t.name.match(E)):!1;function Nn(t,n){const e={};!t.hFlip!=!n.hFlip&&(e.hFlip=!0),!t.vFlip!=!n.vFlip&&(e.vFlip=!0);const r=((t.rotate||0)+(n.rotate||0))%4;return r&&(e.rotate=r),e}function zt(t,n){const e=Nn(t,n);for(const r in ut)r in Q?r in t&&!(r in e)&&(e[r]=Q[r]):r in n?e[r]=n[r]:r in t&&(e[r]=t[r]);return e}function En(t,n){const e=t.icons,r=t.aliases||Object.create(null),o=Object.create(null);function s(i){if(e[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(e).concat(Object.keys(r)).forEach(s),o}function qn(t,n,e){const r=t.icons,o=t.aliases||Object.create(null);let s={};function i(a){s=zt(r[a]||o[a],s)}return i(n),e.forEach(i),zt(t,s)}function pe(t,n){const e=[];if(typeof t!="object"||typeof t.icons!="object")return e;t.not_found instanceof Array&&t.not_found.forEach(o=>{n(o,null),e.push(o)});const r=En(t);for(const o in r){const s=r[o];s&&(n(o,qn(t,o,s)),e.push(o))}return e}const Bn={provider:"",aliases:{},not_found:{},...ue};function st(t,n){for(const e in n)if(e in t&&typeof t[e]!=typeof n[e])return!1;return!0}function he(t){if(typeof t!="object"||t===null)return null;const n=t;if(typeof n.prefix!="string"||!t.icons||typeof t.icons!="object"||!st(t,Bn))return null;const e=n.icons;for(const o in e){const s=e[o];if(!o.match(E)||typeof s.body!="string"||!st(s,ut))return null}const r=n.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(E)||typeof i!="string"||!e[i]&&!r[i]||!st(s,ut))return null}return n}const J=Object.create(null);function zn(t,n){return{provider:t,prefix:n,icons:Object.create(null),missing:new Set}}function L(t,n){const e=J[t]||(J[t]=Object.create(null));return e[n]||(e[n]=zn(t,n))}function vt(t,n){return he(n)?pe(n,(e,r)=>{r?t.icons[e]=r:t.missing.add(e)}):[]}function $n(t,n,e){try{if(typeof e.body=="string")return t.icons[n]={...e},!0}catch{}return!1}function Fn(t,n){let e=[];return(typeof t=="string"?[t]:Object.keys(J)).forEach(o=>{(typeof o=="string"&&typeof n=="string"?[n]:Object.keys(J[o]||{})).forEach(i=>{const a=L(o,i);e=e.concat(Object.keys(a.icons).map(c=>(o!==""?"@"+o+":":"")+i+":"+c))})}),e}let B=!1;function ge(t){return typeof t=="boolean"&&(B=t),B}function z(t){const n=typeof t=="string"?H(t,!0,B):t;if(n){const e=L(n.provider,n.prefix),r=n.name;return e.icons[r]||(e.missing.has(r)?null:void 0)}}function me(t,n){const e=H(t,!0,B);if(!e)return!1;const r=L(e.provider,e.prefix);return $n(r,e.name,n)}function $t(t,n){if(typeof t!="object")return!1;if(typeof n!="string"&&(n=t.provider||""),B&&!n&&!t.prefix){let o=!1;return he(t)&&(t.prefix="",pe(t,(s,i)=>{i&&me(s,i)&&(o=!0)})),o}const e=t.prefix;if(!W({provider:n,prefix:e,name:"a"}))return!1;const r=L(n,e);return!!vt(r,t)}function Hn(t){return!!z(t)}function Dn(t){const n=z(t);return n?{...F,...n}:null}function Un(t){const n={loaded:[],missing:[],pending:[]},e=Object.create(null);t.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 t.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=e[s]||(e[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 be(t,n){t.forEach(e=>{const r=e.loaderCallbacks;r&&(e.loaderCallbacks=r.filter(o=>o.id!==n))})}function Vn(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const n=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!n.length)return;let e=!1;const r=t.provider,o=t.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(t.icons[l])i.loaded.push({provider:r,prefix:o,name:l});else if(t.missing.has(l))i.missing.push({provider:r,prefix:o,name:l});else return e=!0,!0;return!1}),i.pending.length!==a&&(e||be([t],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let Wn=0;function Zn(t,n,e){const r=Wn++,o=be.bind(null,e,r);if(!n.pending.length)return o;const s={id:r,icons:n,callback:t,abort:o};return e.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}const ft=Object.create(null);function Ft(t,n){ft[t]=n}function dt(t){return ft[t]||ft[""]}function Qn(t,n=!0,e=!1){const r=[];return t.forEach(o=>{const s=typeof o=="string"?H(o,n,e):o;s&&r.push(s)}),r}var Jn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Gn(t,n,e,r){const o=t.resources.length,s=t.random?Math.floor(Math.random()*o):t.index;let i;if(t.random){let p=t.resources.slice(0);for(i=[];p.length>1;){const w=Math.floor(Math.random()*p.length);i.push(p[w]),p=p.slice(0,w).concat(p.slice(w+1))}i=i.concat(p)}else i=t.resources.slice(s).concat(t.resources.slice(0,s));const a=Date.now();let c="pending",l=0,u,d=null,g=[],m=[];typeof r=="function"&&m.push(r);function b(){d&&(clearTimeout(d),d=null)}function v(){c==="pending"&&(c="aborted"),b(),g.forEach(p=>{p.status==="pending"&&(p.status="aborted")}),g=[]}function O(p,w){w&&(m=[]),typeof p=="function"&&m.push(p)}function T(){return{startTime:a,payload:n,status:c,queriesSent:l,queriesPending:g.length,subscribe:O,abort:v}}function P(){c="failed",m.forEach(p=>{p(void 0,u)})}function y(){g.forEach(p=>{p.status==="pending"&&(p.status="aborted")}),g=[]}function M(p,w,S){const C=w!=="success";switch(g=g.filter(I=>I!==p),c){case"pending":break;case"failed":if(C||!t.dataAfterTimeout)return;break;default:return}if(w==="abort"){u=S,P();return}if(C){u=S,g.length||(i.length?x():P());return}if(b(),y(),!t.random){const I=t.resources.indexOf(p.resource);I!==-1&&I!==t.index&&(t.index=I)}c="completed",m.forEach(I=>{I(S)})}function x(){if(c!=="pending")return;b();const p=i.shift();if(p===void 0){if(g.length){d=setTimeout(()=>{b(),c==="pending"&&(y(),P())},t.timeout);return}P();return}const w={status:"pending",resource:p,callback:(S,C)=>{M(w,S,C)}};g.push(w),l++,d=setTimeout(x,t.rotate),e(p,n,w.callback)}return setTimeout(x),T}function ye(t){const n={...Jn,...t};let e=[];function r(){e=e.filter(a=>a().status==="pending")}function o(a,c,l){const u=Gn(n,a,c,(d,g)=>{r(),l&&l(d,g)});return e.push(u),u}function s(a){return e.find(c=>a(c))||null}return{query:o,find:s,setIndex:a=>{n.index=a},getIndex:()=>n.index,cleanup:r}}function xt(t){let n;if(typeof t.resources=="string")n=[t.resources];else if(n=t.resources,!(n instanceof Array)||!n.length)return null;return{resources:n,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const K=Object.create(null),N=["https://api.simplesvg.com","https://api.unisvg.com"],Z=[];for(;N.length>0;)N.length===1||Math.random()>.5?Z.push(N.shift()):Z.push(N.pop());K[""]=xt({resources:["https://api.iconify.design"].concat(Z)});function Ht(t,n){const e=xt(n);return e===null?!1:(K[t]=e,!0)}function X(t){return K[t]}function Kn(){return Object.keys(K)}function Dt(){}const it=Object.create(null);function Xn(t){if(!it[t]){const n=X(t);if(!n)return;const e=ye(n),r={config:n,redundancy:e};it[t]=r}return it[t]}function ve(t,n,e){let r,o;if(typeof t=="string"){const s=dt(t);if(!s)return e(void 0,424),Dt;o=s.send;const i=Xn(t);i&&(r=i.redundancy)}else{const s=xt(t);if(s){r=ye(s);const i=t.resources?t.resources[0]:"",a=dt(i);a&&(o=a.send)}}return!r||!o?(e(void 0,424),Dt):r.query(n,o,e)().abort}const Ut="iconify2",$="iconify",xe=$+"-count",Vt=$+"-version",we=36e5,Yn=168;function pt(t,n){try{return t.getItem(n)}catch{}}function wt(t,n,e){try{return t.setItem(n,e),!0}catch{}}function Wt(t,n){try{t.removeItem(n)}catch{}}function ht(t,n){return wt(t,xe,n.toString())}function gt(t){return parseInt(pt(t,xe))||0}const _={local:!0,session:!0},Ce={local:new Set,session:new Set};let Ct=!1;function to(t){Ct=t}let V=typeof window>"u"?{}:window;function Pe(t){const n=t+"Storage";try{if(V&&V[n]&&typeof V[n].length=="number")return V[n]}catch{}_[t]=!1}function Oe(t,n){const e=Pe(t);if(!e)return;const r=pt(e,Vt);if(r!==Ut){if(r){const a=gt(e);for(let c=0;c<a;c++)Wt(e,$+c.toString())}wt(e,Vt,Ut),ht(e,0);return}const o=Math.floor(Date.now()/we)-Yn,s=a=>{const c=$+a.toString(),l=pt(e,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{}Wt(e,c)}};let i=gt(e);for(let a=i-1;a>=0;a--)s(a)||(a===i-1?(i--,ht(e,i)):Ce[t].add(a))}function Ie(){if(!Ct){to(!0);for(const t in _)Oe(t,n=>{const e=n.data,r=n.provider,o=e.prefix,s=L(r,o);if(!vt(s,e).length)return!1;const i=e.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function eo(t,n){const e=t.lastModifiedCached;if(e&&e>=n)return e===n;if(t.lastModifiedCached=n,e)for(const r in _)Oe(r,o=>{const s=o.data;return o.provider!==t.provider||s.prefix!==t.prefix||s.lastModified===n});return!0}function no(t,n){Ct||Ie();function e(r){let o;if(!_[r]||!(o=Pe(r)))return;const s=Ce[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=gt(o),!ht(o,i+1))return;const a={cached:Math.floor(Date.now()/we),provider:t.provider,data:n};return wt(o,$+i.toString(),JSON.stringify(a))}n.lastModified&&!eo(t,n.lastModified)||Object.keys(n.icons).length&&(n.not_found&&(n=Object.assign({},n),delete n.not_found),e("local")||e("session"))}function Zt(){}function oo(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,Vn(t)}))}function ro(t,n){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(n).sort():t.iconsToLoad=n,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:e,prefix:r}=t,o=t.iconsToLoad;delete t.iconsToLoad;let s;if(!o||!(s=dt(e)))return;s.prepare(e,r,o).forEach(a=>{ve(e,a,c=>{if(typeof c!="object")a.icons.forEach(l=>{t.missing.add(l)});else try{const l=vt(t,c);if(!l.length)return;const u=t.pendingIcons;u&&l.forEach(d=>{u.delete(d)}),no(t,c)}catch(l){console.error(l)}oo(t)})})}))}const Pt=(t,n)=>{const e=Qn(t,!0,ge()),r=Un(e);if(!r.pending.length){let c=!0;return n&&setTimeout(()=>{c&&n(r.loaded,r.missing,r.pending,Zt)}),()=>{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,g=L(l,u),m=g.pendingIcons||(g.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&&ro(c,o[l][u])}),n?Zn(n,r,s):Zt},so=t=>new Promise((n,e)=>{const r=typeof t=="string"?H(t,!0):t;if(!r){e(t);return}Pt([r||t],o=>{if(o.length&&r){const s=z(r);if(s){n({...F,...s});return}}e(t)})});function io(t){try{const n=typeof t=="string"?JSON.parse(t):t;if(typeof n.body=="string")return{...n}}catch{}}function co(t,n){const e=typeof t=="string"?H(t,!0,!0):null;if(!e){const s=io(t);return{value:t,data:s}}const r=z(e);if(r!==void 0||!e.prefix)return{value:t,name:e,data:r};const o=Pt([e],()=>n(t,e,z(e)));return{value:t,name:e,loading:o}}function ct(t){return t.hasAttribute("inline")}let Te=!1;try{Te=navigator.vendor.indexOf("Apple")===0}catch{}function ao(t,n){switch(n){case"svg":case"bg":case"mask":return n}return n!=="style"&&(Te||t.indexOf("<a")===-1)?"svg":t.indexOf("currentColor")===-1?"bg":"mask"}const lo=/(-?[0-9.]*[0-9]+[0-9.]*)/g,uo=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function mt(t,n,e){if(n===1)return t;if(e=e||100,typeof t=="number")return Math.ceil(t*n*e)/e;if(typeof t!="string")return t;const r=t.split(lo);if(r===null||!r.length)return t;const o=[];let s=r.shift(),i=uo.test(s);for(;;){if(i){const a=parseFloat(s);isNaN(a)?o.push(s):o.push(Math.ceil(a*n*e)/e)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const fo=t=>t==="unset"||t==="undefined"||t==="none";function Se(t,n){const e={...F,...t},r={...fe,...n},o={left:e.left,top:e.top,width:e.width,height:e.height};let s=e.body;[e,r].forEach(b=>{const v=[],O=b.hFlip,T=b.vFlip;let P=b.rotate;O?T?P+=2:(v.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),v.push("scale(-1 1)"),o.top=o.left=0):T&&(v.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),v.push("scale(1 -1)"),o.top=o.left=0);let y;switch(P<0&&(P-=Math.floor(P/4)*4),P=P%4,P){case 1:y=o.height/2+o.top,v.unshift("rotate(90 "+y.toString()+" "+y.toString()+")");break;case 2:v.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:y=o.width/2+o.left,v.unshift("rotate(-90 "+y.toString()+" "+y.toString()+")");break}P%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)),v.length&&(s='<g transform="'+v.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=mt(d,c/l)):(u=i==="auto"?c:i,d=a===null?mt(u,l/c):a==="auto"?l:a);const g={},m=(b,v)=>{fo(v)||(g[b]=v.toString())};return m("width",u),m("height",d),g.viewBox=o.left.toString()+" "+o.top.toString()+" "+c.toString()+" "+l.toString(),{attributes:g,body:s}}const po=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let G=po();function ho(t){G=t}function go(){return G}function mo(t,n){const e=X(t);if(!e)return 0;let r;if(!e.maxURL)r=0;else{let o=0;e.resources.forEach(i=>{o=Math.max(o,i.length)});const s=n+".json?icons=";r=e.maxURL-o-e.path.length-s.length}return r}function bo(t){return t===404}const yo=(t,n,e)=>{const r=[],o=mo(t,n),s="icons";let i={type:s,provider:t,prefix:n,icons:[]},a=0;return e.forEach((c,l)=>{a+=c.length+1,a>=o&&l>0&&(r.push(i),i={type:s,provider:t,prefix:n,icons:[]},a=c.length),i.icons.push(c)}),r.push(i),r};function vo(t){if(typeof t=="string"){const n=X(t);if(n)return n.path}return"/"}const xo=(t,n,e)=>{if(!G){e("abort",424);return}let r=vo(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:e("abort",400);return}let o=503;G(t+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{e(bo(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?e("abort",s):e("next",o)});return}setTimeout(()=>{e("success",s)})}).catch(()=>{e("next",o)})},wo={prepare:yo,send:xo};function Qt(t,n){switch(t){case"local":case"session":_[t]=n;break;case"all":for(const e in _)_[e]=n;break}}const at="data-style";let je="";function Co(t){je=t}function Jt(t,n){let e=Array.from(t.childNodes).find(r=>r.hasAttribute&&r.hasAttribute(at));e||(e=document.createElement("style"),e.setAttribute(at,at),t.appendChild(e)),e.textContent=":host{display:inline-block;vertical-align:"+(n?"-0.125em":"0")+"}span,svg{display:block}"+je}function Ae(){Ft("",wo),ge(!0);let t;try{t=window}catch{}if(t){if(Ie(),t.IconifyPreload!==void 0){const e=t.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof e=="object"&&e!==null&&(e instanceof Array?e:[e]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!$t(o))&&console.error(r)}catch{console.error(r)}})}if(t.IconifyProviders!==void 0){const e=t.IconifyProviders;if(typeof e=="object"&&e!==null)for(const r in e){const o="IconifyProviders["+r+"] is invalid.";try{const s=e[r];if(typeof s!="object"||!s||s.resources===void 0)continue;Ht(r,s)||console.error(o)}catch{console.error(o)}}}}return{enableCache:e=>Qt(e,!0),disableCache:e=>Qt(e,!1),iconExists:Hn,getIcon:Dn,listIcons:Fn,addIcon:me,addCollection:$t,calculateSize:mt,buildIcon:Se,loadIcons:Pt,loadIcon:so,addAPIProvider:Ht,appendCustomStyle:Co,_api:{getAPIConfig:X,setAPIModule:Ft,sendAPIQuery:ve,setFetch:ho,getFetch:go,listAPIProviders:Kn}}}function Re(t,n){let e=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in n)e+=" "+r+'="'+n[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+e+">"+t+"</svg>"}function Po(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Oo(t){return"data:image/svg+xml,"+Po(t)}function Io(t){return'url("'+Oo(t)+'")'}const bt={"background-color":"currentColor"},ke={"background-color":"transparent"},Gt={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Kt={"-webkit-mask":bt,mask:bt,background:ke};for(const t in Kt){const n=Kt[t];for(const e in Gt)n[t+"-"+e]=Gt[e]}function Xt(t){return t?t+(t.match(/^[-0-9.]+$/)?"px":""):"inherit"}function To(t,n,e){const r=document.createElement("span");let o=t.body;o.indexOf("<a")!==-1&&(o+="<!-- "+Date.now()+" -->");const s=t.attributes,i=Re(o,{...s,width:n.width+"",height:n.height+""}),a=Io(i),c=r.style,l={"--svg":a,width:Xt(s.width),height:Xt(s.height),...e?bt:ke};for(const u in l)c.setProperty(u,l[u]);return r}let q;function So(){try{q=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{q=null}}function jo(t){return q===void 0&&So(),q?q.createHTML(t):t}function Ao(t){const n=document.createElement("span"),e=t.attributes;let r="";e.width||(r="width: inherit;"),e.height||(r+="height: inherit;"),r&&(e.style=r);const o=Re(t.body,e);return n.innerHTML=jo(o),n.firstChild}function Yt(t,n){const e=n.icon.data,r=n.customisations,o=Se(e,r);r.preserveAspectRatio&&(o.attributes.preserveAspectRatio=r.preserveAspectRatio);const s=n.renderedMode;let i;switch(s){case"svg":i=Ao(o);break;default:i=To(o,{...F,...e},s==="mask")}const a=Array.from(t.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")):t.replaceChild(i,a):t.appendChild(i)}function te(t,n,e){const r=e&&(e.rendered?e:e.lastRender);return{rendered:!1,inline:n,icon:t,lastRender:r}}function Ro(t="iconify-icon"){let n,e;try{n=window.customElements,e=window.HTMLElement}catch{return}if(!n||!e)return;const r=n.get(t);if(r)return r;const o=["icon","mode","inline","width","height","rotate","flip"],s=class extends e{constructor(){super();U(this,"_shadowRoot");U(this,"_state");U(this,"_checkQueued",!1);const c=this._shadowRoot=this.attachShadow({mode:"open"}),l=ct(this);Jt(c,l),this._state=te({value:""},l),this._queueCheck()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(c){if(c==="inline"){const l=ct(this),u=this._state;l!==u.inline&&(u.inline=l,Jt(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 ct(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{}Yt(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=Bt(this);(c.attrMode!==u||_n(c.customisations,d))&&this._renderIcon(c.icon,d,u)}_iconChanged(c){const l=co(c,(u,d,g)=>{const m=this._state;if(m.rendered||this.getAttribute("icon")!==u)return;const b={value:u,name:d,data:g};b.data?this._gotIconData(b):m.icon=b});l.data?this._gotIconData(l):this._state=te(l,this._state.inline,this._state)}_gotIconData(c){this._checkQueued=!1,this._renderIcon(c,Bt(this),this.getAttribute("mode"))}_renderIcon(c,l,u){const d=ao(c.data.body,u),g=this._state.inline;Yt(this._shadowRoot,this._state={rendered:!0,icon:c,inline:g,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=Ae();for(const a in i)s[a]=s.prototype[a]=i[a];return n.define(t,s),s}Ro()||Ae();const ko=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])}))}))}),Le=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}),D=(t,n,e="children")=>t.map(r=>Array.isArray(r[e])?n({...r,[e]:D(r[e],n,e)}):n(r)),Lo=(t,n="children")=>{const e=[];return D(t,r=>e.push(r),n),e},Ot=(t,n,e="children")=>t.map(r=>({...r})).filter(r=>{const o=r[e];if(Array.isArray(o)){const i=Ot(o,n,e);r[e]=i!=null&&i.length?i:void 0}const s={filteredChildren:r[e],isLeaf:!(o!=null&&o.length)};return n(r,s)}),Mo=t=>/^https?:\/\//.test(t),_o=t=>{if(!t||!(t!=null&&t.startsWith("/")))return!1;const n=o=>o.endsWith("/")?o:`${o}/`,e=n(window.location.pathname),r=n(new URL(t,window.location.origin).pathname);return e.startsWith(r)},No=(t=[])=>{const n=t.map((r,o)=>({path:r,index:o})).filter(r=>_o(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 oe,re;const yt=((oe=window==null?void 0:window.blocklet)==null?void 0:oe.groupPrefix)||((re=window==null?void 0:window.blocklet)==null?void 0:re.prefix)||"/",Eo=t=>{const n={...t},e=t==null?void 0:t.background;return typeof e=="string"?n.background={header:e,footer:e,default:e}:e&&typeof e=="object"&&(n.background={header:e.header||e.default,footer:e.footer||e.default,default:e.default}),n},Me=(t,n="en")=>{if(!(t!=null&&t.length))return t;const e=(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(Mo(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 D(t,o=>{var s;return{...o,title:e(o.title,n),link:(s=o.items)!=null&&s.length?o.link:r(o.link,n),_rawLink:o.link}},"items")},qo=t=>D(t,n=>n.role?{...n,role:Array.isArray(n.role)?n.role:[n.role]}:n,"items"),Bo=t=>{if(!(t!=null&&t.length))return null;const n=qo(t),e={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=e[s])==null||i.push(r)}):typeof r.section=="string"&&((o=e[r.section])==null||o.push(r)):e.header.push(r)}),e},zo=t=>{if(!t)return null;const n={...t};return n.theme=Eo(n.theme),n.navigation=Bo($o(n.navigation)),n},$o=(t=[])=>Ot(t,(n,e)=>{var r;return!!n.link||((r=e.filteredChildren)==null?void 0:r.length)},"items"),_e=(t,n)=>Ot(t,(e,r)=>{var s;const o=!e.role||n&&(e.role.includes(n)||e.role.includes("guest"));return r.isLeaf?o:o&&((s=r.filteredChildren)==null?void 0:s.length)},"items"),Fo={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"/>'},Ho={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 Do({session:t,locale:n="zh",size:e=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=t==null?void 0:t.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=R.useRef(null),i=Ye({open:!1}),a=tn((c=!i.open)=>{i.open=c});return o.length===0||!(t!=null&&t.user)?null:h.jsxs(h.Fragment,{children:[h.jsx(ie,{size:"medium",ref:s,onClick:()=>a(),children:h.jsx(qt,{icon:Fo,fontSize:e,style:{transform:"scale(1.08)"}})}),h.jsx(en,{open:i.open,anchorEl:s.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:c})=>h.jsx(nn,{onClickAway:l=>{l.preventDefault(),l.stopPropagation(),a(!1)},children:h.jsx(on,{...c,timeout:350,children:h.jsxs(rn,{variant:"outlined",sx:{borderRadius:3,width:350,maxWidth:"90vw",borderColor:j.lineStep,p:2,border:"0 !important",boxShadow:`0px 8px 16px 0px ${j.gray6}, 0px 0px 0px 1px ${j.gray6}`},children:[h.jsx(sn,{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 h.jsx(xn,{disablePadding:!0,children:h.jsxs(wn,{href:l.link,sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:2,"&:hover":{backgroundColor:j.surfacePrimarySubtitle}},children:[(u=l==null?void 0:l.component)!=null&&u.did?h.jsx(cn,{component:"img",src:`${an}/blocklet/logo-bundle/${l.component.did}`,sx:{borderRadius:2,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):h.jsx(qt,{fontSize:50,icon:l.icon||Ho,color:j.textSubtitle}),h.jsx(ln,{sx:{fontSize:"12px",color:j.textBase,textAlign:"center",lineHeight:"normal"},children:un(l.title,n)})]})},l.id)})}),h.jsx(fn,{session:t,children:h.jsx(dn,{variant:"outlined",fullWidth:!0,href:pn,sx:{mt:1,borderRadius:2,color:j.textBase,borderColor:j.lineBorderStrong,"&:hover":{color:j.primaryBase,borderColor:j.primaryBase}},children:n==="zh"?"管理":"Manage"})})]})})})})]})}var It={};Object.defineProperty(It,"__esModule",{value:!0});var Ne=It.default=void 0;Uo(R);var lt=h;function Uo(t){return t&&t.__esModule?t:{default:t}}function ee(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),e.push.apply(e,r)}return e}function ne(t){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?ee(Object(e),!0).forEach(function(r){Vo(t,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):ee(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}return t}function Vo(t,n,e){return(n=Wo(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function Wo(t){var n=Zo(t,"string");return typeof n=="symbol"?n:n+""}function Zo(t,n){if(typeof t!="object"||!t)return t;var e=t[Symbol.toPrimitive];if(e!==void 0){var r=e.call(t,n||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(t)}var Tt=function(n){return(0,lt.jsxs)("svg",ne(ne({},n),{},{children:[(0,lt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.25107 2.50001C6.67528 2.49385 4.50443 4.60042 4.48473 7.00559V12.7899C4.48473 13.5826 4.40145 14.5678 3.90413 15.4998H16.0954C15.599 14.5684 15.5146 13.5831 15.5146 12.7889V7.01078C15.4804 4.60752 13.3051 2.50948 10.7176 2.50301C10.7174 2.50301 10.7177 2.50301 10.7176 2.50301L9.25107 2.50001ZM17.0146 7.00094V12.7889C17.0146 13.5789 17.1156 14.3509 17.5456 15.0078L17.8325 15.4458C18.2685 16.1098 17.7995 16.9998 17.0146 16.9998H2.98473C2.19974 16.9998 1.72975 16.1098 2.16674 15.4458L2.45374 15.0078C2.88473 14.3509 2.98473 13.5799 2.98473 12.7899V6.99994C3.00773 3.70898 5.9107 0.992018 9.25465 1.00002L10.7206 1.00302C14.0646 1.01102 16.9746 3.70898 17.0146 7.00094Z",fill:"currentColor"}),(0,lt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.0602 18.0606C11.3415 17.7793 11.4996 17.3978 11.4996 17H12.9996C12.9996 17.7956 12.6835 18.5587 12.1209 19.1213C11.5583 19.6839 10.7952 19.9999 9.9996 19.9999C9.20396 19.9999 8.4409 19.6839 7.8783 19.1213C7.3157 18.5587 6.99963 17.7956 6.99963 17H8.49963C8.49963 17.3978 8.65767 17.7793 8.93896 18.0606C9.22026 18.3419 9.60178 18.4999 9.9996 18.4999C10.3974 18.4999 10.7789 18.3419 11.0602 18.0606Z",fill:"currentColor"})]}))};Tt.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};Tt.displayName="notification";Ne=It.default=Tt;function St({session:t={}}){const{unReadCount:n}=t,e=hn(()=>{const{navigation:r}=window.blocklet??{},o=r==null?void 0:r.find(s=>s.id==="/userCenter/notification");return o==null?void 0:o.link});return!t.user||!e?null:h.jsx(ie,{size:"medium",variant:"outlined",href:e,sx:{borderRadius:2,color:"rgba(0, 0, 0, 0.6)",borderColor:j.lineBorderStrong,"&:hover":{borderRadius:"50%"}},children:h.jsx(An,{variant:"dot",color:"error",invisible:n===0,children:h.jsx(Ne,{style:{width:"auto",height:24}})})})}St.propTypes={session:f.object};St.defaultProps={session:{}};const Qo=()=>{var n;return!!(((n=window==null?void 0:window.blocklet)==null?void 0:n.navigation)??[]).find(e=>e.id==="/userCenter/notification")};function jt({formattedBlocklet:t,addons:n,sessionManagerProps:e}){var g,m,b,v;const r=R.useContext(ce),{locale:o}=ae()||{},{enableConnect:s=!0,enableLocale:i=!0}=t,a=!!((g=r==null?void 0:r.session)!=null&&g.user);let c=Me((m=t==null?void 0:t.navigation)==null?void 0:m.sessionManager,o)||[];c=_e(c,(v=(b=r==null?void 0:r.session)==null?void 0:b.user)==null?void 0:v.role);const u=(()=>{if(n&&typeof n!="function")return Array.isArray(n)?n:[n];let O=[];if(Qo()&&O.push(h.jsx(St,{session:r.session},"notification-addon")),i&&o&&O.push(h.jsx(Cn,{showText:!1},"locale-selector")),s&&r){const T=[];a&&(c?c.slice(0,5):[]).forEach(y=>{T.push({label:y.title,icon:y.icon?h.jsx("iconify-icon",{icon:y.icon,height:24,style:{marginRight:8}}):null,component:"a",href:y.link,key:y.link})}),O.push(h.jsx(Do,{session:r.session,locale:o},"session-blocklet")),O.push(h.jsx(gn,{session:r.session,locale:o,menu:T,showRole:!0,...e},"session-user"))}return typeof n=="function"&&(O=n(O)||[]),O})();return R.createElement(h.Fragment,null,...Array.isArray(u)?u:[u])}jt.propTypes={formattedBlocklet:f.object.isRequired,addons:f.oneOfType([f.func,f.node]),sessionManagerProps:Le};jt.defaultProps={addons:null,sessionManagerProps:{showRole:!0}};const Jo=()=>{const t=mn();R.useEffect(()=>{t.wallet&&bn.call("arcHideTopBar","{}")},[t])};function Ee({meta:t,fallbackUrl:n,invalidPathFallback:e,headerAddons:r,sessionManagerProps:o,links:s,...i}){var M;Jo();const a=R.useContext(ce),c=(M=a==null?void 0:a.session)==null?void 0:M.user,l=c==null?void 0:c.role,{locale:u}=ae()||{},d=R.useMemo(()=>{const x=Object.assign({},window.blocklet,t);try{return zo(x)}catch(p){return console.error("Failed to format blocklet info",p,x),x}},[t]),{localizedNav:g,flattened:m,matchedIndex:b}=R.useMemo(()=>{var S;let x=Me((S=d==null?void 0:d.navigation)==null?void 0:S.dashboard,u)||[];x=_e(x,l),x=D(x,C=>{let I=null;return C.icon&&(C.icon.startsWith("http")||C.icon.startsWith("data:")?I=h.jsx(yn,{src:C.icon}):I=h.jsx("iconify-icon",{height:"100%",width:"100%",icon:C.icon})),{title:C.title,url:C.link,icon:I,external:!0,children:C.items}},"items");const p=Lo(x).filter(C=>!!C.url),w=No(p.map(C=>C.url));return w!==-1&&(p[w].active=!0),{localizedNav:x,flattened:p,matchedIndex:w}},[d,u,l]),v=typeof s=="function"?s(g):[...g,...s];if(R.useLayoutEffect(()=>{c&&!(m!=null&&m.length)&&n&&(window.location.href=n)},[n]),R.useLayoutEffect(()=>{c&&(m!=null&&m.length)&&b===-1&&e&&e()},[e,m,b]),!d.appName)return null;const{appLogo:O,appLogoRect:T,appName:P}=d,y=h.jsx(jt,{formattedBlocklet:d,addons:r,sessionManagerProps:o});return h.jsx(vn,{title:P,fullWidth:!0,sidebarWidth:128,legacy:!1,links:v,...i,headerProps:{homeLink:yt,logo:h.jsx("img",{src:T||O,alt:"logo"}),addons:y,...i.headerProps}})}Ee.propTypes={meta:ko,fallbackUrl:f.string,invalidPathFallback:f.func,headerAddons:f.oneOfType([f.func,f.node]),sessionManagerProps:Le,links:f.oneOfType([f.array,f.func])};Ee.defaultProps={meta:{},fallbackUrl:yt,invalidPathFallback:null,headerAddons:void 0,sessionManagerProps:{showRole:!0,onLogout:()=>{window.location.href=yt}},links:[]};export{An as B,Ee as D,jt as H,Lo as a,No as b,ko as c,zo as f,Me as g,Mo as i,D as m,yt as p,Jo as u};
@@ -1,4 +1,4 @@
1
- import{bw as e,P as o,r as b,j as p,bv as u,bx as h,ap as x,T as w}from"./index-CURuTEb2.js";const C={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64"},c={error:{color:e.common.white,backgroundColor:e.error.main},warning:{color:e.common.white,backgroundColor:e.warning.main},success:{color:e.common.white,backgroundColor:e.success.main},primary:{color:e.common.white,backgroundColor:e.primary.main},reverse:{color:"#fff",backgroundColor:"#222"}};function s(n){const t=h(n,s,["style"]),{type:r,content:l,children:m,style:d,className:f,forwardedRef:y,...g}=t,{palette:a}=x(),i=Object.assign({},c[r]||c.primary,d);return a[r]&&Object.assign(i,{color:a[r].contrastText||e.common.white,backgroundColor:a[r].main}),p.jsx(j,{ref:y,component:"span",className:f,style:i,...g,children:l||m})}s.propTypes={children:o.any.isRequired,type:o.oneOf(Object.keys(c)),content:o.string,className:o.string,style:o.oneOfType([o.object,o.string])};s.defaultProps={type:"primary",content:"",className:"",style:{}};const T=b.forwardRef((n,t)=>p.jsx(s,{...n,forwardedRef:t})),O=T,j=u(w)`
1
+ import{bg as e,P as o,r as b,j as p,bf as u,bh as h,ap as x,T as w}from"./index-B-RFpqiC.js";const C={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64"},c={error:{color:e.common.white,backgroundColor:e.error.main},warning:{color:e.common.white,backgroundColor:e.warning.main},success:{color:e.common.white,backgroundColor:e.success.main},primary:{color:e.common.white,backgroundColor:e.primary.main},reverse:{color:"#fff",backgroundColor:"#222"}};function s(n){const t=h(n,s,["style"]),{type:r,content:l,children:m,style:d,className:f,forwardedRef:y,...g}=t,{palette:a}=x(),i=Object.assign({},c[r]||c.primary,d);return a[r]&&Object.assign(i,{color:a[r].contrastText||e.common.white,backgroundColor:a[r].main}),p.jsx(j,{ref:y,component:"span",className:f,style:i,...g,children:l||m})}s.propTypes={children:o.any.isRequired,type:o.oneOf(Object.keys(c)),content:o.string,className:o.string,style:o.oneOfType([o.object,o.string])};s.defaultProps={type:"primary",content:"",className:"",style:{}};const T=b.forwardRef((n,t)=>p.jsx(s,{...n,forwardedRef:t})),O=T,j=u(w)`
2
2
  && {
3
3
  display: inline-flex;
4
4
  justify-content: center;
@@ -1 +1 @@
1
- import{ba as a}from"./index-CURuTEb2.js";var e=i,s=/^(?:\w+:)?\/\/(\S+)$/,l=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,n=/^[^\s\.]+\.\S{2,}$/;function i(t){if(typeof t!="string")return!1;var o=t.match(s);if(!o)return!1;var r=o[1];return r?!!(l.test(r)||n.test(r)):!1}const c=a(e);export{c as i};
1
+ import{a$ as a}from"./index-B-RFpqiC.js";var e=i,s=/^(?:\w+:)?\/\/(\S+)$/,l=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,n=/^[^\s\.]+\.\S{2,}$/;function i(t){if(typeof t!="string")return!1;var o=t.match(s);if(!o)return!1;var r=o[1];return r?!!(l.test(r)||n.test(r)):!1}const c=a(e);export{c as i};
@@ -1,4 +1,4 @@
1
- import{az as D,j as s,P as r,a4 as f,r as m,a6 as T,aA as $,u as j,J as H,m as U,l as P,c as q,o as F,p as M,aB as E,aC as S,aD as N,A as B,B as z,Y as O,n as V,R as J}from"./index-CURuTEb2.js";import{N as W}from"./index-L1YQQop8.js";import{C as L}from"./index-DcgOvNoU.js";import{u as X}from"./use-passport-id-B-b-_oYF.js";import{u as Y}from"./session-CROK8kXg.js";import{b as G}from"./sdk-BLFRAhju.js";import{d as K}from"./CheckCircle-Rp6PMEen.js";import{w as Q}from"./wrap-locale-B5FvTTmq.js";const Z=D(s.jsx("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2m0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19z"}),"Inbox");function b({invitation:e,createPassportSvg:a,passportColor:c}){const[p,o]=m.useState(!1),{t}=m.useContext(T),l=m.useMemo(()=>(e.role.title||e.role.name).toUpperCase(),[e.role.title,e.role.name]),u=m.useMemo(()=>a({title:l,issuer:e.info.name,issuerDid:e.info.appDid,ownerName:"Your Name",ownerDid:e.info.appDid,preferredColor:e.info.passportColor||c}),[e,l]),x=m.useCallback(()=>{o(!0)},[]),i=m.useCallback(()=>{o(!1)},[]);return s.jsxs(s.Fragment,{children:[s.jsx(ee,{children:s.jsxs("div",{className:"invite-passport__card",onClick:x,children:[!!e.display&&s.jsx(W,{data:e.display,style:{width:"100%",height:"100%"}}),!e.display&&s.jsx("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:u}})]})}),s.jsx($,{open:p,title:t("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:i,children:e.role.permissions&&e.role.permissions.length>0?s.jsx("ul",{style:{listStyle:"circle",padding:"0 20px"},children:e.role.permissions.map(n=>s.jsx("li",{style:{listStyle:"circle"},children:n.description},n.name))}):s.jsxs("div",{style:{color:"#999",textAlign:"center"},children:[s.jsx(Z,{style:{width:"30px",height:"30px"}}),s.jsx("div",{children:t("invite.emptyPermission")})]})})]})}b.propTypes={invitation:r.object.isRequired,createPassportSvg:r.func.isRequired,passportColor:r.string};b.defaultProps={passportColor:"auto"};const ee=f.div`
1
+ import{az as D,j as s,P as r,a4 as f,r as m,a6 as T,aA as $,u as j,J as H,m as U,l as P,c as q,o as F,p as M,aB as E,aC as S,aD as N,A as B,B as z,Y as O,n as V,R as J}from"./index-B-RFpqiC.js";import{N as W}from"./index-B55M7j1N.js";import{C as L}from"./index-B-s0lesn.js";import{u as X}from"./use-passport-id-B-b-_oYF.js";import{u as Y}from"./session-Cm5uP3l0.js";import{b as G}from"./sdk-D_6oU6pZ.js";import{d as K}from"./CheckCircle-CdClV-_h.js";import{w as Q}from"./wrap-locale-ChSgu67N.js";const Z=D(s.jsx("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2m0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19z"}),"Inbox");function b({invitation:e,createPassportSvg:a,passportColor:c}){const[p,o]=m.useState(!1),{t}=m.useContext(T),l=m.useMemo(()=>(e.role.title||e.role.name).toUpperCase(),[e.role.title,e.role.name]),u=m.useMemo(()=>a({title:l,issuer:e.info.name,issuerDid:e.info.appDid,ownerName:"Your Name",ownerDid:e.info.appDid,preferredColor:e.info.passportColor||c}),[e,l]),x=m.useCallback(()=>{o(!0)},[]),i=m.useCallback(()=>{o(!1)},[]);return s.jsxs(s.Fragment,{children:[s.jsx(ee,{children:s.jsxs("div",{className:"invite-passport__card",onClick:x,children:[!!e.display&&s.jsx(W,{data:e.display,style:{width:"100%",height:"100%"}}),!e.display&&s.jsx("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:u}})]})}),s.jsx($,{open:p,title:t("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:i,children:e.role.permissions&&e.role.permissions.length>0?s.jsx("ul",{style:{listStyle:"circle",padding:"0 20px"},children:e.role.permissions.map(n=>s.jsx("li",{style:{listStyle:"circle"},children:n.description},n.name))}):s.jsxs("div",{style:{color:"#999",textAlign:"center"},children:[s.jsx(Z,{style:{width:"30px",height:"30px"}}),s.jsx("div",{children:t("invite.emptyPermission")})]})})]})}b.propTypes={invitation:r.object.isRequired,createPassportSvg:r.func.isRequired,passportColor:r.string};b.defaultProps={passportColor:"auto"};const ee=f.div`
2
2
  display: flex;
3
3
  max-width: 350px;
4
4
  margin: 30px auto;
@@ -1,4 +1,4 @@
1
- import{e as w,d as x,u as g,r as v,ab as u,l as I,j as i,H as S,Z as T,a4 as j,x as k,y as E,z as P,L as R}from"./index-CURuTEb2.js";import{I as F}from"./invitation-etE_VFdX.js";import{F as L}from"./fullpage-Dzbv_Bjr.js";import{g as C}from"./get-safe-url-B7F64ILl.js";import"./index-L1YQQop8.js";import"./emotion-cache.browser.esm-jEAge-b7.js";import"./purify.es-DutPtr9A.js";import"./index-DcgOvNoU.js";import"./use-passport-id-B-b-_oYF.js";import"./session-CROK8kXg.js";import"./sdk-BLFRAhju.js";import"./CheckCircle-Rp6PMEen.js";import"./wrap-locale-B5FvTTmq.js";import"./Link-Cfv3qknB.js";function Z(c){var r;const p=w(),{searchParams:o}=new URL(window.location.href),{api:d,session:m}=x(),{t:l}=g(),a=o.get("inviteId"),n=o.get("redirect"),h=v.useCallback(async()=>{const{data:t}=await u.get("invitation",{params:{inviteId:a}});return t},[a]),f=I(async(t,s=e=>e)=>{t&&(k(s(t.sessionToken)),E(s(t.refreshToken)),t.visitorId&&P(s(t.visitorId))),await m.refresh(),setTimeout(()=>{if(n){const e=decodeURIComponent(n);e.startsWith(R.WELLKNOWN_SERVICE_PATH_PREFIX)?p(e,{replace:!0}):window.location.href=C(e)}else window.location.href=window.env.pathPrefix||"/"},50)});return i.jsxs(L,{did:(r=window.blocklet)==null?void 0:r.appPid,children:[i.jsx(S,{children:i.jsx("title",{children:l("pageTitle.invite")})}),i.jsx(W,{className:"page-invite",children:i.jsx(F,{...c,getDataFn:h,checkFn:d.get,createPassportSvg:T,onLoginSuccess:f,inService:!0})})]})}const W=j.div`
1
+ import{e as w,d as x,u as g,r as v,ab as u,l as I,j as i,H as S,Z as T,a4 as j,x as k,y as E,z as P,L as R}from"./index-B-RFpqiC.js";import{I as F}from"./invitation-4vH9lNw-.js";import{F as L}from"./fullpage-DMghH4Jh.js";import{g as C}from"./get-safe-url-C6pQ0b4W.js";import"./index-B55M7j1N.js";import"./emotion-cache.browser.esm-D9ZvkPSc.js";import"./purify.es-DutPtr9A.js";import"./index-B-s0lesn.js";import"./use-passport-id-B-b-_oYF.js";import"./session-Cm5uP3l0.js";import"./sdk-D_6oU6pZ.js";import"./CheckCircle-CdClV-_h.js";import"./wrap-locale-ChSgu67N.js";import"./Link-C3LvemFf.js";function Z(c){var r;const p=w(),{searchParams:o}=new URL(window.location.href),{api:d,session:m}=x(),{t:l}=g(),a=o.get("inviteId"),n=o.get("redirect"),h=v.useCallback(async()=>{const{data:t}=await u.get("invitation",{params:{inviteId:a}});return t},[a]),f=I(async(t,s=e=>e)=>{t&&(k(s(t.sessionToken)),E(s(t.refreshToken)),t.visitorId&&P(s(t.visitorId))),await m.refresh(),setTimeout(()=>{if(n){const e=decodeURIComponent(n);e.startsWith(R.WELLKNOWN_SERVICE_PATH_PREFIX)?p(e,{replace:!0}):window.location.href=C(e)}else window.location.href=window.env.pathPrefix||"/"},50)});return i.jsxs(L,{did:(r=window.blocklet)==null?void 0:r.appPid,children:[i.jsx(S,{children:i.jsx("title",{children:l("pageTitle.invite")})}),i.jsx(W,{className:"page-invite",children:i.jsx(F,{...c,getDataFn:h,checkFn:d.get,createPassportSvg:T,onLoginSuccess:f,inService:!0})})]})}const W=j.div`
2
2
  width: 560px;
3
3
  max-width: 100%;
4
4
  height: 100%;
@@ -1 +1 @@
1
- import{ba as B}from"./index-CURuTEb2.js";var w={exports:{}},b={exports:{}};(function(f,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;function d(l){"@babel/helpers - typeof";return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},d(l)}function s(l){var r=typeof l=="string"||l instanceof String;if(!r){var n=d(l);throw l===null?n="null":n==="object"&&(n=l.constructor.name),new TypeError("Expected a string but received a ".concat(n))}}f.exports=t.default,f.exports.default=t.default})(b,b.exports);var h=b.exports,E={exports:{}};(function(f,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var d=s(h);function s(n){return n&&n.__esModule?n:{default:n}}function l(n){"@babel/helpers - typeof";return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(n)}function r(n,e){(0,d.default)(n);var i,c;l(e)==="object"?(i=e.min||0,c=e.max):(i=arguments[1],c=arguments[2]);var u=encodeURI(n).split(/%..|./).length-1;return u>=i&&(typeof c>"u"||u<=c)}f.exports=t.default,f.exports.default=t.default})(E,E.exports);var W=E.exports,D={exports:{}},S={exports:{}};(function(f,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;function d(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=arguments.length>1?arguments[1]:void 0;for(var r in l)typeof s[r]>"u"&&(s[r]=l[r]);return s}f.exports=t.default,f.exports.default=t.default})(S,S.exports);var R=S.exports;(function(f,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var d=l(h),s=l(R);function l(e){return e&&e.__esModule?e:{default:e}}var r={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function n(e,i){(0,d.default)(e),i=(0,s.default)(i,r),i.allow_trailing_dot&&e[e.length-1]==="."&&(e=e.substring(0,e.length-1)),i.allow_wildcard===!0&&e.indexOf("*.")===0&&(e=e.substring(2));var c=e.split("."),u=c[c.length-1];return i.require_tld&&(c.length<2||!i.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(u)||/\s/.test(u))||!i.allow_numeric_tld&&/^\d+$/.test(u)?!1:c.every(function(_){return!(_.length>63&&!i.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(_)||/[\uff01-\uff5e]/.test(_)||/^-|-$/.test(_)||!i.allow_underscores&&/_/.test(_))})}f.exports=t.default,f.exports.default=t.default})(D,D.exports);var k=D.exports,P={exports:{}};(function(f,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var d=s(h);function s(u){return u&&u.__esModule?u:{default:u}}var l="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",r="(".concat(l,"[.]){3}").concat(l),n=new RegExp("^".concat(r,"$")),e="(?:[0-9a-fA-F]{1,4})",i=new RegExp("^("+"(?:".concat(e,":){7}(?:").concat(e,"|:)|")+"(?:".concat(e,":){6}(?:").concat(r,"|:").concat(e,"|:)|")+"(?:".concat(e,":){5}(?::").concat(r,"|(:").concat(e,"){1,2}|:)|")+"(?:".concat(e,":){4}(?:(:").concat(e,"){0,1}:").concat(r,"|(:").concat(e,"){1,3}|:)|")+"(?:".concat(e,":){3}(?:(:").concat(e,"){0,2}:").concat(r,"|(:").concat(e,"){1,4}|:)|")+"(?:".concat(e,":){2}(?:(:").concat(e,"){0,3}:").concat(r,"|(:").concat(e,"){1,5}|:)|")+"(?:".concat(e,":){1}(?:(:").concat(e,"){0,4}:").concat(r,"|(:").concat(e,"){1,6}|:)|")+"(?::((?::".concat(e,"){0,5}:").concat(r,"|(?::").concat(e,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");function c(u){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,d.default)(u),_=String(_),_?_==="4"?n.test(u):_==="6"?i.test(u):!1:c(u,4)||c(u,6)}f.exports=t.default,f.exports.default=t.default})(P,P.exports);var X=P.exports;(function(f,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=N;var d=e(h),s=e(W),l=e(k),r=e(X),n=e(R);function e(o){return o&&o.__esModule?o:{default:o}}var i={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},c=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,u=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,_=/^[a-z\d]+$/,U=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,z=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,C=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,L=254;function O(o){var a=o.replace(/^"(.+)"$/,"$1");if(!a.trim())return!1;var m=/[\.";<>]/.test(a);if(m){if(a===o)return!1;var x=a.split('"').length===a.split('\\"').length;if(!x)return!1}return!0}function N(o,a){if((0,d.default)(o),a=(0,n.default)(a,i),a.require_display_name||a.allow_display_name){var m=o.match(c);if(m){var x=m[1];if(o=o.replace(x,"").replace(/(^<|>$)/g,""),x.endsWith(" ")&&(x=x.slice(0,-1)),!O(x))return!1}else if(a.require_display_name)return!1}if(!a.ignore_max_length&&o.length>L)return!1;var $=o.split("@"),v=$.pop(),F=v.toLowerCase();if(a.host_blacklist.includes(F)||a.host_whitelist.length>0&&!a.host_whitelist.includes(F))return!1;var g=$.join("@");if(a.domain_specific_validation&&(F==="gmail.com"||F==="googlemail.com")){g=g.toLowerCase();var q=g.split("+")[0];if(!(0,s.default)(q.replace(/\./g,""),{min:6,max:30}))return!1;for(var A=q.split("."),p=0;p<A.length;p++)if(!_.test(A[p]))return!1}if(a.ignore_max_length===!1&&(!(0,s.default)(g,{max:64})||!(0,s.default)(v,{max:254})))return!1;if(!(0,l.default)(v,{require_tld:a.require_tld,ignore_max_length:a.ignore_max_length,allow_underscores:a.allow_underscores})){if(!a.allow_ip_domain)return!1;if(!(0,r.default)(v)){if(!v.startsWith("[")||!v.endsWith("]"))return!1;var M=v.slice(1,-1);if(M.length===0||!(0,r.default)(M))return!1}}if(g[0]==='"')return g=g.slice(1,g.length-1),a.allow_utf8_local_part?C.test(g):U.test(g);for(var Q=a.allow_utf8_local_part?z:u,I=g.split("."),y=0;y<I.length;y++)if(!Q.test(I[y]))return!1;return!(a.blacklisted_chars&&g.search(new RegExp("[".concat(a.blacklisted_chars,"]+"),"g"))!==-1)}f.exports=t.default,f.exports.default=t.default})(w,w.exports);var Z=w.exports;const H=B(Z);export{h as a,k as b,X as c,H as i,R as m};
1
+ import{a$ as B}from"./index-B-RFpqiC.js";var w={exports:{}},b={exports:{}};(function(f,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;function d(l){"@babel/helpers - typeof";return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},d(l)}function s(l){var r=typeof l=="string"||l instanceof String;if(!r){var n=d(l);throw l===null?n="null":n==="object"&&(n=l.constructor.name),new TypeError("Expected a string but received a ".concat(n))}}f.exports=t.default,f.exports.default=t.default})(b,b.exports);var h=b.exports,E={exports:{}};(function(f,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var d=s(h);function s(n){return n&&n.__esModule?n:{default:n}}function l(n){"@babel/helpers - typeof";return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(n)}function r(n,e){(0,d.default)(n);var i,c;l(e)==="object"?(i=e.min||0,c=e.max):(i=arguments[1],c=arguments[2]);var u=encodeURI(n).split(/%..|./).length-1;return u>=i&&(typeof c>"u"||u<=c)}f.exports=t.default,f.exports.default=t.default})(E,E.exports);var W=E.exports,D={exports:{}},S={exports:{}};(function(f,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;function d(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=arguments.length>1?arguments[1]:void 0;for(var r in l)typeof s[r]>"u"&&(s[r]=l[r]);return s}f.exports=t.default,f.exports.default=t.default})(S,S.exports);var R=S.exports;(function(f,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var d=l(h),s=l(R);function l(e){return e&&e.__esModule?e:{default:e}}var r={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function n(e,i){(0,d.default)(e),i=(0,s.default)(i,r),i.allow_trailing_dot&&e[e.length-1]==="."&&(e=e.substring(0,e.length-1)),i.allow_wildcard===!0&&e.indexOf("*.")===0&&(e=e.substring(2));var c=e.split("."),u=c[c.length-1];return i.require_tld&&(c.length<2||!i.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(u)||/\s/.test(u))||!i.allow_numeric_tld&&/^\d+$/.test(u)?!1:c.every(function(_){return!(_.length>63&&!i.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(_)||/[\uff01-\uff5e]/.test(_)||/^-|-$/.test(_)||!i.allow_underscores&&/_/.test(_))})}f.exports=t.default,f.exports.default=t.default})(D,D.exports);var k=D.exports,P={exports:{}};(function(f,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var d=s(h);function s(u){return u&&u.__esModule?u:{default:u}}var l="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",r="(".concat(l,"[.]){3}").concat(l),n=new RegExp("^".concat(r,"$")),e="(?:[0-9a-fA-F]{1,4})",i=new RegExp("^("+"(?:".concat(e,":){7}(?:").concat(e,"|:)|")+"(?:".concat(e,":){6}(?:").concat(r,"|:").concat(e,"|:)|")+"(?:".concat(e,":){5}(?::").concat(r,"|(:").concat(e,"){1,2}|:)|")+"(?:".concat(e,":){4}(?:(:").concat(e,"){0,1}:").concat(r,"|(:").concat(e,"){1,3}|:)|")+"(?:".concat(e,":){3}(?:(:").concat(e,"){0,2}:").concat(r,"|(:").concat(e,"){1,4}|:)|")+"(?:".concat(e,":){2}(?:(:").concat(e,"){0,3}:").concat(r,"|(:").concat(e,"){1,5}|:)|")+"(?:".concat(e,":){1}(?:(:").concat(e,"){0,4}:").concat(r,"|(:").concat(e,"){1,6}|:)|")+"(?::((?::".concat(e,"){0,5}:").concat(r,"|(?::").concat(e,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");function c(u){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,d.default)(u),_=String(_),_?_==="4"?n.test(u):_==="6"?i.test(u):!1:c(u,4)||c(u,6)}f.exports=t.default,f.exports.default=t.default})(P,P.exports);var X=P.exports;(function(f,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=N;var d=e(h),s=e(W),l=e(k),r=e(X),n=e(R);function e(o){return o&&o.__esModule?o:{default:o}}var i={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},c=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,u=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,_=/^[a-z\d]+$/,U=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,z=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,C=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,L=254;function O(o){var a=o.replace(/^"(.+)"$/,"$1");if(!a.trim())return!1;var m=/[\.";<>]/.test(a);if(m){if(a===o)return!1;var x=a.split('"').length===a.split('\\"').length;if(!x)return!1}return!0}function N(o,a){if((0,d.default)(o),a=(0,n.default)(a,i),a.require_display_name||a.allow_display_name){var m=o.match(c);if(m){var x=m[1];if(o=o.replace(x,"").replace(/(^<|>$)/g,""),x.endsWith(" ")&&(x=x.slice(0,-1)),!O(x))return!1}else if(a.require_display_name)return!1}if(!a.ignore_max_length&&o.length>L)return!1;var $=o.split("@"),v=$.pop(),F=v.toLowerCase();if(a.host_blacklist.includes(F)||a.host_whitelist.length>0&&!a.host_whitelist.includes(F))return!1;var g=$.join("@");if(a.domain_specific_validation&&(F==="gmail.com"||F==="googlemail.com")){g=g.toLowerCase();var q=g.split("+")[0];if(!(0,s.default)(q.replace(/\./g,""),{min:6,max:30}))return!1;for(var A=q.split("."),p=0;p<A.length;p++)if(!_.test(A[p]))return!1}if(a.ignore_max_length===!1&&(!(0,s.default)(g,{max:64})||!(0,s.default)(v,{max:254})))return!1;if(!(0,l.default)(v,{require_tld:a.require_tld,ignore_max_length:a.ignore_max_length,allow_underscores:a.allow_underscores})){if(!a.allow_ip_domain)return!1;if(!(0,r.default)(v)){if(!v.startsWith("[")||!v.endsWith("]"))return!1;var M=v.slice(1,-1);if(M.length===0||!(0,r.default)(M))return!1}}if(g[0]==='"')return g=g.slice(1,g.length-1),a.allow_utf8_local_part?C.test(g):U.test(g);for(var Q=a.allow_utf8_local_part?z:u,I=g.split("."),y=0;y<I.length;y++)if(!Q.test(I[y]))return!1;return!(a.blacklisted_chars&&g.search(new RegExp("[".concat(a.blacklisted_chars,"]+"),"g"))!==-1)}f.exports=t.default,f.exports.default=t.default})(w,w.exports);var Z=w.exports;const H=B(Z);export{h as a,k as b,X as c,H as i,R as m};
@@ -1 +1 @@
1
- import{d as w,e as v,u as I,J as P,Y as T,l as d,j as t,n as j,H as k,B as R,Z as S,x as E,y as F,z as L,L as C}from"./index-CURuTEb2.js";import{I as W}from"./invitation-etE_VFdX.js";import{F as N}from"./fullpage-Dzbv_Bjr.js";import{g as H}from"./get-safe-url-B7F64ILl.js";import"./index-L1YQQop8.js";import"./emotion-cache.browser.esm-jEAge-b7.js";import"./purify.es-DutPtr9A.js";import"./index-DcgOvNoU.js";import"./use-passport-id-B-b-_oYF.js";import"./session-CROK8kXg.js";import"./sdk-BLFRAhju.js";import"./CheckCircle-Rp6PMEen.js";import"./wrap-locale-B5FvTTmq.js";import"./Link-Cfv3qknB.js";function X(m){var p;const{searchParams:a}=new URL(window.location.href),{api:r,session:f}=w(),u=v(),{t:h}=I(),n=a.get("id"),c=a.get("redirect"),l=P({state:""}),s=T(async()=>{if(!n)return null;const{data:e}=await r.get("/api/invitation",{params:{inviteId:n,mode:"issue-passport"}});return e}),x=d(()=>{if(s.error)throw s.error;return s==null?void 0:s.data}),g=d(async(e,o=i=>i)=>{e&&(e.sessionToken&&E(o(e.sessionToken)),e.refreshToken&&F(o(e.refreshToken)),e.visitorId&&L(o(e.visitorId)),await f.refresh()),setTimeout(()=>{if(c){const i=decodeURIComponent(c);i.startsWith(C.WELLKNOWN_SERVICE_PATH_PREFIX)?u(i,{replace:!0}):window.location.href=H(i)}else window.location.href=window.env.pathPrefix||"/"},50)});return s.loading?t.jsx(j,{}):t.jsxs(N,{did:(p=window.blocklet)==null?void 0:p.appPid,children:[t.jsx(k,{children:t.jsx("title",{children:h("pageTitle.issuePassport")})}),t.jsx(R,{className:"page-invite",sx:{width:"560px",maxWidth:"100%",height:"100%"},children:t.jsx(W,{...m,action:"issue-passport",getDataFn:x,checkFn:r.get,createPassportSvg:S,onLoginSuccess:g,inService:!0,status:l.state})})]})}export{X as default};
1
+ import{d as w,e as v,u as I,J as P,Y as T,l as d,j as t,n as j,H as k,B as R,Z as S,x as E,y as F,z as L,L as C}from"./index-B-RFpqiC.js";import{I as W}from"./invitation-4vH9lNw-.js";import{F as N}from"./fullpage-DMghH4Jh.js";import{g as H}from"./get-safe-url-C6pQ0b4W.js";import"./index-B55M7j1N.js";import"./emotion-cache.browser.esm-D9ZvkPSc.js";import"./purify.es-DutPtr9A.js";import"./index-B-s0lesn.js";import"./use-passport-id-B-b-_oYF.js";import"./session-Cm5uP3l0.js";import"./sdk-D_6oU6pZ.js";import"./CheckCircle-CdClV-_h.js";import"./wrap-locale-ChSgu67N.js";import"./Link-C3LvemFf.js";function X(m){var p;const{searchParams:a}=new URL(window.location.href),{api:r,session:f}=w(),u=v(),{t:h}=I(),n=a.get("id"),c=a.get("redirect"),l=P({state:""}),s=T(async()=>{if(!n)return null;const{data:e}=await r.get("/api/invitation",{params:{inviteId:n,mode:"issue-passport"}});return e}),x=d(()=>{if(s.error)throw s.error;return s==null?void 0:s.data}),g=d(async(e,o=i=>i)=>{e&&(e.sessionToken&&E(o(e.sessionToken)),e.refreshToken&&F(o(e.refreshToken)),e.visitorId&&L(o(e.visitorId)),await f.refresh()),setTimeout(()=>{if(c){const i=decodeURIComponent(c);i.startsWith(C.WELLKNOWN_SERVICE_PATH_PREFIX)?u(i,{replace:!0}):window.location.href=H(i)}else window.location.href=window.env.pathPrefix||"/"},50)});return s.loading?t.jsx(j,{}):t.jsxs(N,{did:(p=window.blocklet)==null?void 0:p.appPid,children:[t.jsx(k,{children:t.jsx("title",{children:h("pageTitle.issuePassport")})}),t.jsx(R,{className:"page-invite",sx:{width:"560px",maxWidth:"100%",height:"100%"},children:t.jsx(W,{...m,action:"issue-passport",getDataFn:x,checkFn:r.get,createPassportSvg:S,onLoginSuccess:g,inService:!0,status:l.state})})]})}export{X as default};
@@ -1 +1 @@
1
- import{fr as _e,aN as R,r as g,aP as U,cg as F,dw as ee,eB as $e,aR as te,j as s,L as le,aT as H,u as q,T as _,aA as Ee,a7 as ne,n as O,fq as Ne,P as i,a2 as V,a3 as G,a$ as Pe,ap as Ie,b as E,v as $,ag as Me,aV as Le,aX as se,B as N,f0 as ce,c as z,l as ze,ex as qe,a as Oe}from"./index-CURuTEb2.js";import{d as Be}from"./Add-CX1vjsKw.js";import{L as Ue,d as Ae}from"./MoreVert-cgL2UwiF.js";import{D as We}from"./DialogContentText-DKQ0aeHG.js";import{T as de}from"./TextField-BA4i5NsI.js";import{A as ue}from"./Alert-D87dZ3UW.js";import{f as B}from"./format-error-D7O1LvF5.js";import{d as fe}from"./Launch-CjTqTNC0.js";import{d as Fe}from"./Done-BXX9mmcA.js";import{d as pe}from"./DeleteOutline-D9nJXz7t.js";import{C as He}from"./click-to-copy-DziDdr0B.js";import{S as Ve}from"./shorten-label-AXaOgv3N.js";import{u as Ge,C as me}from"./confirm-C5GHlmsL.js";import{u as Je}from"./session-CROK8kXg.js";import{g as P}from"./get-safe-url-B_9CHKiR.js";import{W as Ke}from"./did-address-plg0jYw3.js";import{A as Xe}from"./Avatar-BBmwGXNJ.js";import{B as re}from"./ButtonGroup-B4-Fg7jI.js";import{f as Ye,j as Qe,a as Ze,c as et,d as tt,b as nt,e as st,g as rt,h as ot}from"./jss-plugin-props-sort.esm-DxbPrUtX.js";const it=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function at(e={}){const{disableGlobal:r=!1,productionPrefix:n="jss",seed:t=""}=e,o=t===""?"":`${t}-`;let u=0;const d=()=>(u+=1,u);return(l,c)=>{const a=c.options.name;if(a&&a.indexOf("Mui")===0&&!c.options.link&&!r){if(it.indexOf(l.key)!==-1)return`Mui-${l.key}`;const f=`${o}${a}-${l.key}`;return!c.options.theme[_e]||t!==""?f:`${f}-${d()}`}return`${o}${n}${d()}`}}function lt(){return{plugins:[Ye(),Qe(),Ze(),et(),tt(),typeof window>"u"?null:nt(),st()]}}function he(e={}){const{baseClasses:r,newClasses:n,Component:t}=e;if(!n)return r;const o=R({},r);return Object.keys(n).forEach(u=>{n[u]&&(o[u]=`${r[u]} ${n[u]}`)}),o}const L={set:(e,r,n,t)=>{let o=e.get(r);o||(o=new Map,e.set(r,o)),o.set(n,t)},get:(e,r,n)=>{const t=e.get(r);return t?t.get(n):void 0},delete:(e,r,n)=>{e.get(r).delete(n)}},ct=rt(lt()),dt=at(),ut=new Map,ft={disableGeneration:!1,generateClassName:dt,jss:ct,sheetsCache:null,sheetsManager:ut,sheetsRegistry:null},pt=g.createContext(ft);let oe=-1e9;function mt(){return oe+=1,oe}const ht=["variant"];function ie(e){return e.length===0}function gt(e){const{variant:r}=e,n=U(e,ht);let t=r||"";return Object.keys(n).sort().forEach(o=>{o==="color"?t+=ie(t)?e[o]:F(e[o]):t+=`${ie(t)?o:F(o)}${F(e[o].toString())}`}),t}const xt={};function vt(e){const r=typeof e=="function";return{create:(n,t)=>{let o;try{o=r?e(n):e}catch(c){throw c}if(!t||!n.components||!n.components[t]||!n.components[t].styleOverrides&&!n.components[t].variants)return o;const u=n.components[t].styleOverrides||{},d=n.components[t].variants||[],l=R({},o);return Object.keys(u).forEach(c=>{l[c]=ee(l[c]||{},u[c])}),d.forEach(c=>{const a=gt(c.props);l[a]=ee(l[a]||{},c.style)}),l},options:{}}}const yt=["name","classNamePrefix","Component","defaultTheme"];function St({state:e,stylesOptions:r},n,t){if(r.disableGeneration)return n||{};e.cacheClasses||(e.cacheClasses={value:null,lastProp:null,lastJSS:{}});let o=!1;return e.classes!==e.cacheClasses.lastJSS&&(e.cacheClasses.lastJSS=e.classes,o=!0),n!==e.cacheClasses.lastProp&&(e.cacheClasses.lastProp=n,o=!0),o&&(e.cacheClasses.value=he({baseClasses:e.cacheClasses.lastJSS,newClasses:n,Component:t})),e.cacheClasses.value}function jt({state:e,theme:r,stylesOptions:n,stylesCreator:t,name:o},u){if(n.disableGeneration)return;let d=L.get(n.sheetsManager,t,r);d||(d={refs:0,staticSheet:null,dynamicStyles:null},L.set(n.sheetsManager,t,r,d));const l=R({},t.options,n,{theme:r,flip:typeof n.flip=="boolean"?n.flip:r.direction==="rtl"});l.generateId=l.serverGenerateClassName||l.generateClassName;const c=n.sheetsRegistry;if(d.refs===0){let a;n.sheetsCache&&(a=L.get(n.sheetsCache,t,r));const f=t.create(r,o);a||(a=n.jss.createStyleSheet(f,R({link:!1},l)),a.attach(),n.sheetsCache&&L.set(n.sheetsCache,t,r,a)),c&&c.add(a),d.staticSheet=a,d.dynamicStyles=ot(f)}if(d.dynamicStyles){const a=n.jss.createStyleSheet(d.dynamicStyles,R({link:!0},l));a.update(u),a.attach(),e.dynamicSheet=a,e.classes=he({baseClasses:d.staticSheet.classes,newClasses:a.classes}),c&&c.add(a)}else e.classes=d.staticSheet.classes;d.refs+=1}function Ct({state:e},r){e.dynamicSheet&&e.dynamicSheet.update(r)}function bt({state:e,theme:r,stylesOptions:n,stylesCreator:t}){if(n.disableGeneration)return;const o=L.get(n.sheetsManager,t,r);o.refs-=1;const u=n.sheetsRegistry;o.refs===0&&(L.delete(n.sheetsManager,t,r),n.jss.removeStyleSheet(o.staticSheet),u&&u.remove(o.staticSheet)),e.dynamicSheet&&(n.jss.removeStyleSheet(e.dynamicSheet),u&&u.remove(e.dynamicSheet))}function wt(e,r){const n=g.useRef([]);let t;const o=g.useMemo(()=>({}),r);n.current!==o&&(n.current=o,t=e()),g.useEffect(()=>()=>{t&&t()},[o])}function J(e,r={}){const{name:n,classNamePrefix:t,Component:o,defaultTheme:u=xt}=r,d=U(r,yt),l=vt(e),c=n||t||"makeStyles";return l.options={index:mt(),name:n,meta:c,classNamePrefix:c},(f={})=>{const h=Ge()||u,v=R({},g.useContext(pt),d),j=g.useRef(),m=g.useRef();return wt(()=>{const C={name:n,state:{},stylesCreator:l,stylesOptions:v,theme:h};return jt(C,f),m.current=!1,j.current=C,()=>{bt(C)}},[h,l]),g.useEffect(()=>{m.current&&Ct(j.current,f),m.current=!0}),St(j.current,f.classes,o)}}const Rt=["name"],kt=["children","className","clone","component"];function Tt(e,r){const n={};return Object.keys(e).forEach(t=>{r.indexOf(t)===-1&&(n[t]=e[t])}),n}function Dt(e){return(n,t={})=>{const{name:o}=t,u=U(t,Rt);let d=o;const c=J(typeof n=="function"?h=>({root:v=>n(R({theme:h},v))}):{root:n},R({Component:e,name:o||e.displayName,classNamePrefix:d},u));let a;n.filterProps&&(a=n.filterProps,delete n.filterProps),n.propTypes&&(n.propTypes,delete n.propTypes);const f=g.forwardRef(function(v,j){const{children:m,className:S,clone:C,component:w}=v,y=U(v,kt),p=c(v),b=te(p.root,S);let k=y;if(a&&(k=Tt(k,a)),C)return g.cloneElement(m,R({className:te(m.props.className,b)},k));if(typeof m=="function")return m(R({className:b},k));const T=w||e;return s.jsx(T,R({ref:j,className:b},k,{children:m}))});return $e(f,e),f}}const{NODE_MODES:ae}=le,_t=({mode:e,previousMode:r}={})=>e===ae.SERVERLESS||r===ae.SERVERLESS;var $t={isInServerlessMode:_t};const Et=J(e=>({addMenuItemRoot:{marginTop:"8px",justifyContent:"center",color:e.palette.primary.main,lineHeight:"3.2"}}));function ge({disabled:e,storeList:r,teamDid:n,onAdd:t,scope:o,hiddenChildren:u,open:d,onClose:l}){const{api:c}=H(),[a,f]=g.useState(!1),[h,v]=g.useState(!0),[j,m]=g.useState(!1),[S,C]=g.useState(""),[w,y]=g.useState(""),{t:p}=q(),b=Et(),k=async()=>{f(!0);try{const{decoded:x}=Ne(S,r);await c.addBlockletStore({input:{teamDid:n,url:x,scope:o}}),t(x),m(!1),l()}catch(x){const I=`${p("store.blockletRegistry.addFailed")} ${B(x)}`;y(I)}finally{f(!1)}},T=()=>{m(!1),l()};return s.jsxs(s.Fragment,{children:[!u&&s.jsxs(Ue,{button:!0,disabled:e,className:b.addMenuItemRoot,onClick:()=>{m(!0)},children:[s.jsx(Be,{font:!0}),s.jsx(_,{variant:"inherit",children:p("store.blockletRegistry.addRegistry")})]}),s.jsxs(Ee,{title:p("store.blockletRegistry.addRegistry"),fullWidth:!0,maxWidth:"md",open:d||j,onClose:T,PaperProps:{style:{minHeight:"auto"}},actions:s.jsxs(s.Fragment,{children:[s.jsx(ne,{onClick:x=>{x.stopPropagation(),T()},color:"inherit",children:p("common.cancel")}),s.jsxs(ne,{onClick:x=>{x.stopPropagation(),k()},color:"primary","data-cy":"install-blocklet-next-step",disabled:a||!S||h,variant:"contained",autoFocus:!0,children:[a&&s.jsx(O,{size:16}),p("common.confirm")]})]}),children:[s.jsx("div",{style:{paddingTop:12,overflowY:"hidden"},children:s.jsx(We,{component:"div",children:s.jsx(_,{component:"div",children:s.jsx(de,{label:p("store.blockletRegistry.registryUrl"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"add-blocklet-store-url",fullWidth:!0,value:S,onChange:x=>{y(null);let I=!1;x.target.value.trim()||(I=!0),x.target.value.trim()||y(p("store.blockletRegistry.registryUrlEmpty")),C(x.target.value),v(I)},disabled:a,onKeyPress:x=>{x.key==="Enter"&&(x.preventDefault(),x.target.value.trim()?k():y(p("store.blockletRegistry.registryUrlEmpty")))}})})})}),!!w&&s.jsx(ue,{severity:"error",style:{width:"100%"},children:w})]})]})}ge.propTypes={teamDid:i.string.isRequired,disabled:i.bool,storeList:i.array,onAdd:i.func,scope:i.string,hiddenChildren:i.bool,open:i.bool,onClose:i.func};ge.defaultProps={disabled:!1,storeList:[],onAdd:()=>{},scope:"",hiddenChildren:!1,open:!1,onClose:()=>{}};var K={},Nt=G;Object.defineProperty(K,"__esModule",{value:!0});var xe=K.default=void 0,Pt=Nt(V()),It=s;xe=K.default=(0,Pt.default)((0,It.jsx)("path",{d:"M17 7h-4v2h4c1.65 0 3 1.35 3 3s-1.35 3-3 3h-4v2h4c2.76 0 5-2.24 5-5s-2.24-5-5-5m-6 8H7c-1.65 0-3-1.35-3-3s1.35-3 3-3h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4zm-3-4h8v2H8z"}),"LinkOutlined");var X={},Mt=G;Object.defineProperty(X,"__esModule",{value:!0});var ve=X.default=void 0,Lt=Mt(V()),zt=s;ve=X.default=(0,Lt.default)((0,zt.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3M8 13h2.55v3h2.9v-3H16l-4-4z"}),"BackupOutlined");function Y({title:e,description:r,confirmPlaceholder:n,cancel:t,confirm:o,params:u,onCancel:d,onConfirm:l,keyName:c}){const{t:a}=q(),f={title:()=>s.jsxs("div",{children:[e,s.jsx(Ve,{sx:{fontSize:"14px"},maxLength:64,children:` (${c})`})]}),description:(h,v)=>{const j=m=>{v({...m,__disableConfirm:m.__disableConfirm})};return s.jsxs("div",{children:[s.jsx(ue,{severity:"warning",style:{width:"100%"},children:a("common.notice")}),s.jsx("div",{style:{marginTop:24,marginBottom:24},dangerouslySetInnerHTML:{__html:r}}),s.jsxs("div",{style:{marginBottom:24},children:[a("common.click"),":",s.jsx(He,{"data-cy":"click-copy",children:c})]}),s.jsx(_,{component:"div",children:s.jsx(de,{label:n,autoComplete:"off","data-cy":"delete-confirm-input",variant:"outlined",fullWidth:!0,autoFocus:!0,value:h.inputVal,onChange:m=>{j({...h,inputVal:m.target.value,__disableConfirm:c!==m.target.value})}})})]})},confirm:o,cancel:t,onConfirm:l,onCancel:d,params:{inputVal:"",__disableConfirm:!0,...u}};return s.jsx(me,{title:f.title,description:f.description,confirm:f.confirm,cancel:f.cancel,params:f.params,onConfirm:f.onConfirm,onCancel:f.onCancel})}Y.propTypes={title:i.any.isRequired,keyName:i.any.isRequired,description:i.any.isRequired,confirmPlaceholder:i.any.isRequired,cancel:i.string,confirm:i.string,params:i.object,onCancel:i.func,onConfirm:i.func.isRequired};Y.defaultProps={onCancel:()=>{},cancel:"",confirm:"Confirm",params:{}};function W({store:e,teamDid:r,onDelete:n,children:t,projectId:o="",scope:u=""}){const{api:d}=H(),{t:l}=q(),c=Pe(),[a,f]=g.useState(!1),[h,v]=g.useState(null),j=Ie(),m=()=>{f(!1),v(null)},S=async()=>{var y;try{f(!0),await d.deleteBlockletStore({input:{teamDid:r,url:e.url,projectId:o,scope:u}}),await((y=c==null?void 0:c.actions)==null?void 0:y.refreshBlocklet()),n&&typeof n=="function"&&n()}catch(p){$.error(`Remove Blocklet Store Error: ${B(p)}`)}finally{f(!1),v(null)}},C={keyName:e.url,title:l("store.blockletRegistry.deleteRegistry"),description:l("store.blockletRegistry.deleteDesc",{name:`<b>${e.url}</b>`,color:j.palette.error.main}),confirmPlaceholder:l("store.blockletRegistry.confirmDesc",{name:e.url}),confirm:l("common.delConfirm"),cancel:l("common.cancel"),onConfirm:S,onCancel:m},w=y=>{e.protected||(y.stopPropagation(),v(C))};return s.jsxs(s.Fragment,{children:[t?s.jsx("span",{onClick:w,children:t}):s.jsx(E,{"data-cy":"store-action-delete",color:"primary",disabled:a,onClick:w,size:"small",children:s.jsx(pe,{sx:{zoom:.95}})}),h&&s.jsx(Y,{keyName:h.keyName,title:h.title,description:h.description,confirmPlaceholder:h.confirmPlaceholder,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]})}W.propTypes={children:i.node,teamDid:i.string.isRequired,store:i.object.isRequired,onDelete:i.func,projectId:i.string,scope:i.string};W.defaultProps={children:null,projectId:"",scope:"",onDelete:()=>{}};var Q={},qt=G;Object.defineProperty(Q,"__esModule",{value:!0});var ye=Q.default=void 0,Ot=qt(V()),Bt=s;ye=Q.default=(0,Ot.default)((0,Bt.jsx)("path",{d:"M17 7h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1 0 1.43-.98 2.63-2.31 2.98l1.46 1.46C20.88 15.61 22 13.95 22 12c0-2.76-2.24-5-5-5m-1 4h-2.19l2 2H16zM2 4.27l3.11 3.11C3.29 8.12 2 9.91 2 12c0 2.76 2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1 0-1.59 1.21-2.9 2.76-3.07L8.73 11H8v2h2.73L13 15.27V17h1.73l4.01 4L20 19.74 3.27 3z"}),"LinkOff");const Ut=({store:e,userDid:r})=>{var t;const n=((t=window.blocklet)==null?void 0:t.tenantMode)!==Me.BLOCKLET_TENANT_MODES.MULTIPLE;return e.protected?!1:e.scope&&e.scope===r?!0:n?e.scope==="studio":!1};function Z({connectedStore:e,onDisconnect:r,onDelete:n,store:t,teamDid:o,projectId:u}){var y;const[d,l]=g.useState(null),c=!!d,{t:a}=q(),{session:f}=Je(),[h,v]=g.useState(!1),j=p=>{if(p.stopPropagation(),e!=null&&e.developerDid){const b=ce.from(JSON.stringify({forceConnected:e==null?void 0:e.developerDid}),"utf8").toString("base64");window.open(P(`${z(t.url,"developer/blocklets")}?__did-connect__=${b}`,{allowDomains:null}))}else window.open(P(`${z(t.url,"developer/blocklets")}`,{allowDomains:null}))},m=p=>{l(p.currentTarget)},S=()=>{l(null)},C=()=>{v(!1),r()},w=[{label:a("common.visitStore"),action:j,icon:fe},{label:a("common.disconnect"),action:()=>{S(),v(!0)},icon:ye,hidden:!e}];return s.jsxs(s.Fragment,{children:[s.jsx(E,{ref:d,color:"primary",onClick:m,size:"small",children:s.jsx(Ae,{sx:{zoom:.95}})}),s.jsxs(Le,{anchorEl:d,open:c,onClose:S,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:[w.map(p=>p.hidden?null:s.jsxs(se,{dense:!0,onClick:p.action,disabled:p.disabled,children:[p.icon&&s.jsx(p.icon,{color:"action",sx:{marginRight:1}}),s.jsx(N,{color:"action",children:p.label})]},p.label)),Ut({store:t,userDid:(y=f==null?void 0:f.user)==null?void 0:y.did})&&s.jsx(W,{store:t,onDelete:n,teamDid:o,projectId:u,scope:t.scope||"studio",children:s.jsxs(se,{dense:!0,disabled:t.protected,children:[s.jsx(pe,{sx:{color:t.protected?"action":"error.main",marginRight:1}}),s.jsx(N,{color:t.protected?"action":"error.main",children:a("common.delete")})]})})]}),h&&s.jsx(me,{displayError:!0,title:`${a("common.disconnect")} ${t.name}`,description:a("blocklet.publish.disconnectStoreTip"),confirm:a("common.confirm"),onConfirm:C,onCancel:()=>v(!1)})]})}Z.propTypes={connectedStore:i.object.isRequired,onDisconnect:i.func,onDelete:i.func,store:i.object.isRequired,teamDid:i.string.isRequired,projectId:i.string};Z.defaultProps={projectId:"",onDelete:()=>{},onDisconnect:()=>{}};function At({messageType:e,onOpen:r,onClose:n}){const t=g.useRef(null),o=g.useRef(null),u=async l=>{setTimeout(()=>{try{n==null||n()}catch{}},10*1e3),t.current&&(clearInterval(o.current),t.current.close());const c=Math.random().toString(36).slice(2);t.current=window.open(`${le.WELLKNOWN_SERVICE_PATH_PREFIX}/open-window?key=${c}`,"_blank"),r==null||r(t.current),o.current=setInterval(()=>{(!t.current||t.current.closed)&&(t.current=null,clearInterval(o.current),setTimeout(()=>{n==null||n()},1100))},200),await Promise.resolve(l(t.current,a=>{if(!t.current){localStorage.setItem(`open-window-url-${c}`,JSON.stringify({url:a,time:Date.now()}));return}t.current.location.href=P(a,{allowDomains:null})}))},d=ze(l=>{const{type:c,error:a}=l.data;t.current&&c===e&&a&&($.error(a),n==null||n())});return g.useEffect(()=>(window.addEventListener("message",d),()=>{window.removeEventListener("message",d)}),[d]),u}function A({connectedStore:e,sx:r,...n}){return s.jsx(Xe,{sx:{width:24,height:24,...r},src:z(e.storeUrl,`/.well-known/service/user/avatar/${e.developerDid}?imageFilter=resize&w=120&h=120`),...n})}A.propTypes={connectedStore:i.object.isRequired,sx:i.object};A.defaultProps={sx:{}};function Se({storeUrl:e,storeName:r,developerDid:n,published:t}){const{t:o}=q(),u=()=>{if(n){const d=ce.from(JSON.stringify({forceConnected:n}),"utf8").toString("base64");window.open(P(`${z(e,"developer/blocklets")}?__did-connect__=${d}`,{allowDomains:null}))}else window.open(P(`${z(e,"developer/blocklets")}`,{allowDomains:null}))};return s.jsxs(N,{children:[s.jsx(_,{variant:"subtitle2",children:o(t?"blocklet.publish.publishToStoreSuccess":"blocklet.publish.uploadToStoreSuccess",{name:r})}),s.jsx(E,{size:"small",sx:{mt:1},onClick:u,variant:"contained",color:"success",children:o("common.visitTarget",{name:r})})]})}Se.propTypes={storeName:i.string.isRequired,storeUrl:i.string.isRequired,developerDid:i.string.isRequired,published:i.bool.isRequired};const je={CONNECT:"connect",SELECT:"select"},Wt=J(()=>({buttonText:{textTransform:"none !important"},iconRoot:{minWidth:24},box:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",overflow:"hidden",width:"100%"},menuName:{flexShrink:1,display:"flex",flexDirection:"column",overflow:"hidden",flex:1},actions:{flex:1,display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center"},title:{fontSize:16,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},url:{fontSize:14,opacity:.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},buttonLine:{height:"100%",width:"1px",backgroundColor:"#e0e0e0"}})),Ft=Dt(({className:e,...r})=>s.jsx(Oe,{...r,classes:{popper:e}}))(({theme:e})=>({[`& .${qe.tooltip}`]:{backgroundColor:"#fff",color:"rgba(0, 0, 0, 0.87)",borderRadius:8,padding:e.spacing(2),fontSize:e.typography.pxToRem(12),border:"1px solid rgba(0,0,0,0.08)",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.05)"}}));function Ce({teamDid:e,projectId:r,releaseId:n,store:t,onDelete:o,kind:u,published:d,connectedStore:l,releaseType:c,onPublish:a,onOpenConnectStore:f,onSelectConnectStore:h,behavior:v,scope:j=""}){const m=Wt(),{t:S}=q(),{api:C,info:w,inService:y}=H(),[p,b]=g.useState(!1),k=At({messageType:"connect-store-message",onOpen:()=>b(!0),onClose:()=>b(!1)}),T=u==="publish",x=!!l,I=D=>{if(D.stopPropagation(),T){window.open(P(z(t.url,"developer/blocklets"),{allowDomains:null}));return}window.open(P(t.url,{allowDomains:null}))},be=()=>{if(v===je.SELECT){h(t);return}k(async(D,Te)=>{try{const M=await C.connectToStore({input:{did:e,storeUrl:t.url,storeId:t.id,storeName:t.name,projectId:r}});if(!(M!=null&&M.url)){$.error("failed to connect to store");return}Te(M.url),await f({did:e,projectId:r,storeId:t.id}),b(!1)}catch(M){const De=B(M);$.error(De),b(!1)}})},we=async()=>{try{await C.disconnectFromStore({input:{did:e,storeId:t.id,projectId:r,storeScope:j}}),o()}catch(D){$.error(B(D))}},Re=()=>{b(!0),C.publishToStore({input:{did:e,storeId:t.id,storeName:t.name,projectId:r,releaseId:n,type:c}}).then(D=>{$.success(s.jsx(Se,{storeName:l.storeName,storeUrl:l.storeUrl,developerDid:l.developerDid,published:D.url==="published"}),{duration:1e4}),a==null||a(null)}).catch(D=>{$.error(B(D)),a==null||a(D)}).finally(()=>{b(!1)})};g.useEffect(()=>{x&&b(!1)},[x]);const ke=g.useMemo(()=>!(y&&$t.isInServerlessMode(w)),[y,w]);return s.jsxs("div",{className:m.box,children:[!T&&p&&s.jsx(O,{sx:{marginRight:2},size:16}),s.jsxs("div",{className:m.menuName,children:[s.jsx(N,{sx:{display:"flex",flexDirection:"row"},children:s.jsx(_,{component:"span",className:m.title,variant:"subtitle1",children:t.name})}),s.jsx(_,{className:m.url,component:"span",variant:"inherit",children:`${t.url}`})]}),s.jsxs("div",{className:m.actions,children:[l&&s.jsx(Ft,{placement:"top",title:s.jsxs(N,{children:[s.jsx(_,{component:"span",variant:"caption",sx:{opacity:.7},children:S("blocklet.publish.developerInfo")}),s.jsxs(N,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:1,mt:1},children:[s.jsx(A,{connectedStore:l,sx:{width:42,height:42}}),s.jsxs(N,{sx:{flex:1},children:[s.jsx(_,{component:"span",variant:"subtitle1",children:l.developerName}),s.jsx(Ke,{size:14,copyable:!0,compact:!0,responsive:!1,did:l.developerDid})]})]})]}),children:s.jsx("div",{children:s.jsx(A,{connectedStore:l,sx:{marginRight:1,cursor:"help"}})})}),T&&s.jsxs(re,{disabled:p,variant:"outlined",sx:{height:38},size:"small",children:[!x&&s.jsxs(E,{sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},onClick:be,children:[p?s.jsx(O,{sx:{marginRight:1},size:16}):s.jsx(xe,{sx:{marginRight:1}}),S("common.connect")]}),x&&d&&s.jsxs(E,{disabled:!0,sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},children:[p?s.jsx(O,{sx:{marginRight:1},size:16}):s.jsx(Fe,{sx:{marginRight:1}}),S("common.uploaded")]}),x&&!d&&s.jsxs(E,{sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},onClick:Re,children:[p?s.jsx(O,{sx:{marginRight:1},size:16}):s.jsx(ve,{sx:{marginRight:1,fontSize:20}}),S("common.upload")]}),s.jsx(Z,{projectId:r,connectedStore:l,store:t,onDelete:o,teamDid:e,onDisconnect:we})]}),!T&&s.jsxs(re,{disabled:p,variant:"outlined",sx:{height:36},size:"small",children:[s.jsx(E,{"data-cy":"store-open-url",onClick:I,children:s.jsx(fe,{sx:{zoom:.9}})}),!t.protected&&ke&&s.jsx(W,{store:t,onDelete:o,teamDid:e,scope:""})]})]})]})}Ce.propTypes={kind:i.string,teamDid:i.string.isRequired,published:i.bool,connectedStore:i.shape({storeName:i.string,storeId:i.string,storeUrl:i.string,developerDid:i.string,developerName:i.string}),projectId:i.string,releaseId:i.string,releaseType:i.string,store:i.shape({id:i.string.isRequired,name:i.string.isRequired,url:i.string.isRequired,protected:i.bool,connected:i.bool}).isRequired,scope:i.string,onDelete:i.func,onPublish:i.func,onOpenConnectStore:i.func,behavior:i.string,onSelectConnectStore:i.func};Ce.defaultProps={kind:"store",published:!1,connectedStore:null,releaseId:"",projectId:"",releaseType:"",scope:"",behavior:je.CONNECT,onPublish:()=>{},onDelete:()=>{},onOpenConnectStore:()=>{},onSelectConnectStore:()=>{}};export{ge as A,Y as C,Ce as S,Se as U,Ut as c,J as m,$t as s,At as u};
1
+ import{fu as _e,bT as R,r as g,cn as B,cj as F,dR as ee,eJ as Ee,co as te,j as s,L as le,aK as H,u as O,T as _,aA as $e,a7 as ne,n as q,ft as Ne,P as i,a2 as V,a3 as G,aQ as Pe,ap as Ie,b as $,v as E,ag as Me,aM as Le,aO as se,B as N,f6 as ce,c as z,l as ze,eF as Oe,a as qe}from"./index-B-RFpqiC.js";import{d as Ue}from"./Add-bmdSrWOA.js";import{L as Be,d as Ae}from"./MoreVert-D6ZGYNyY.js";import{D as We}from"./DialogContentText-DOJMTAut.js";import{T as de}from"./TextField-8hH4A29d.js";import{A as ue}from"./Alert-dY-OL-cr.js";import{f as U}from"./format-error-BqUQNRdR.js";import{d as fe}from"./Launch-D_sSAnDg.js";import{d as Fe}from"./Done-D1ZlVz28.js";import{d as pe}from"./DeleteOutline-BJNpCFE3.js";import{C as He}from"./click-to-copy-bNuefZAb.js";import{S as Ve}from"./shorten-label-Df2VmqEs.js";import{u as Ge,C as me}from"./confirm-DLHqvhfc.js";import{u as Je}from"./session-Cm5uP3l0.js";import{g as P}from"./get-safe-url-BXN5S5Ow.js";import{W as Ke}from"./did-address-BnRJDh4K.js";import{A as Qe}from"./Avatar-C7A9zyFp.js";import{B as re}from"./ButtonGroup-XHi-9psG.js";import{f as Xe,j as Ye,a as Ze,c as et,d as tt,b as nt,e as st,g as rt,h as ot}from"./jss-plugin-props-sort.esm-qyHLnnAY.js";const it=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function at(e={}){const{disableGlobal:r=!1,productionPrefix:n="jss",seed:t=""}=e,o=t===""?"":`${t}-`;let u=0;const d=()=>(u+=1,u);return(l,c)=>{const a=c.options.name;if(a&&a.indexOf("Mui")===0&&!c.options.link&&!r){if(it.indexOf(l.key)!==-1)return`Mui-${l.key}`;const f=`${o}${a}-${l.key}`;return!c.options.theme[_e]||t!==""?f:`${f}-${d()}`}return`${o}${n}${d()}`}}function lt(){return{plugins:[Xe(),Ye(),Ze(),et(),tt(),typeof window>"u"?null:nt(),st()]}}function he(e={}){const{baseClasses:r,newClasses:n,Component:t}=e;if(!n)return r;const o=R({},r);return Object.keys(n).forEach(u=>{n[u]&&(o[u]=`${r[u]} ${n[u]}`)}),o}const L={set:(e,r,n,t)=>{let o=e.get(r);o||(o=new Map,e.set(r,o)),o.set(n,t)},get:(e,r,n)=>{const t=e.get(r);return t?t.get(n):void 0},delete:(e,r,n)=>{e.get(r).delete(n)}},ct=rt(lt()),dt=at(),ut=new Map,ft={disableGeneration:!1,generateClassName:dt,jss:ct,sheetsCache:null,sheetsManager:ut,sheetsRegistry:null},pt=g.createContext(ft);let oe=-1e9;function mt(){return oe+=1,oe}const ht=["variant"];function ie(e){return e.length===0}function gt(e){const{variant:r}=e,n=B(e,ht);let t=r||"";return Object.keys(n).sort().forEach(o=>{o==="color"?t+=ie(t)?e[o]:F(e[o]):t+=`${ie(t)?o:F(o)}${F(e[o].toString())}`}),t}const xt={};function vt(e){const r=typeof e=="function";return{create:(n,t)=>{let o;try{o=r?e(n):e}catch(c){throw c}if(!t||!n.components||!n.components[t]||!n.components[t].styleOverrides&&!n.components[t].variants)return o;const u=n.components[t].styleOverrides||{},d=n.components[t].variants||[],l=R({},o);return Object.keys(u).forEach(c=>{l[c]=ee(l[c]||{},u[c])}),d.forEach(c=>{const a=gt(c.props);l[a]=ee(l[a]||{},c.style)}),l},options:{}}}const yt=["name","classNamePrefix","Component","defaultTheme"];function jt({state:e,stylesOptions:r},n,t){if(r.disableGeneration)return n||{};e.cacheClasses||(e.cacheClasses={value:null,lastProp:null,lastJSS:{}});let o=!1;return e.classes!==e.cacheClasses.lastJSS&&(e.cacheClasses.lastJSS=e.classes,o=!0),n!==e.cacheClasses.lastProp&&(e.cacheClasses.lastProp=n,o=!0),o&&(e.cacheClasses.value=he({baseClasses:e.cacheClasses.lastJSS,newClasses:n,Component:t})),e.cacheClasses.value}function St({state:e,theme:r,stylesOptions:n,stylesCreator:t,name:o},u){if(n.disableGeneration)return;let d=L.get(n.sheetsManager,t,r);d||(d={refs:0,staticSheet:null,dynamicStyles:null},L.set(n.sheetsManager,t,r,d));const l=R({},t.options,n,{theme:r,flip:typeof n.flip=="boolean"?n.flip:r.direction==="rtl"});l.generateId=l.serverGenerateClassName||l.generateClassName;const c=n.sheetsRegistry;if(d.refs===0){let a;n.sheetsCache&&(a=L.get(n.sheetsCache,t,r));const f=t.create(r,o);a||(a=n.jss.createStyleSheet(f,R({link:!1},l)),a.attach(),n.sheetsCache&&L.set(n.sheetsCache,t,r,a)),c&&c.add(a),d.staticSheet=a,d.dynamicStyles=ot(f)}if(d.dynamicStyles){const a=n.jss.createStyleSheet(d.dynamicStyles,R({link:!0},l));a.update(u),a.attach(),e.dynamicSheet=a,e.classes=he({baseClasses:d.staticSheet.classes,newClasses:a.classes}),c&&c.add(a)}else e.classes=d.staticSheet.classes;d.refs+=1}function Ct({state:e},r){e.dynamicSheet&&e.dynamicSheet.update(r)}function bt({state:e,theme:r,stylesOptions:n,stylesCreator:t}){if(n.disableGeneration)return;const o=L.get(n.sheetsManager,t,r);o.refs-=1;const u=n.sheetsRegistry;o.refs===0&&(L.delete(n.sheetsManager,t,r),n.jss.removeStyleSheet(o.staticSheet),u&&u.remove(o.staticSheet)),e.dynamicSheet&&(n.jss.removeStyleSheet(e.dynamicSheet),u&&u.remove(e.dynamicSheet))}function wt(e,r){const n=g.useRef([]);let t;const o=g.useMemo(()=>({}),r);n.current!==o&&(n.current=o,t=e()),g.useEffect(()=>()=>{t&&t()},[o])}function J(e,r={}){const{name:n,classNamePrefix:t,Component:o,defaultTheme:u=xt}=r,d=B(r,yt),l=vt(e),c=n||t||"makeStyles";return l.options={index:mt(),name:n,meta:c,classNamePrefix:c},(f={})=>{const h=Ge()||u,v=R({},g.useContext(pt),d),S=g.useRef(),m=g.useRef();return wt(()=>{const C={name:n,state:{},stylesCreator:l,stylesOptions:v,theme:h};return St(C,f),m.current=!1,S.current=C,()=>{bt(C)}},[h,l]),g.useEffect(()=>{m.current&&Ct(S.current,f),m.current=!0}),jt(S.current,f.classes,o)}}const Rt=["name"],kt=["children","className","clone","component"];function Tt(e,r){const n={};return Object.keys(e).forEach(t=>{r.indexOf(t)===-1&&(n[t]=e[t])}),n}function Dt(e){return(n,t={})=>{const{name:o}=t,u=B(t,Rt);let d=o;const c=J(typeof n=="function"?h=>({root:v=>n(R({theme:h},v))}):{root:n},R({Component:e,name:o||e.displayName,classNamePrefix:d},u));let a;n.filterProps&&(a=n.filterProps,delete n.filterProps),n.propTypes&&(n.propTypes,delete n.propTypes);const f=g.forwardRef(function(v,S){const{children:m,className:j,clone:C,component:w}=v,y=B(v,kt),p=c(v),b=te(p.root,j);let k=y;if(a&&(k=Tt(k,a)),C)return g.cloneElement(m,R({className:te(m.props.className,b)},k));if(typeof m=="function")return m(R({className:b},k));const T=w||e;return s.jsx(T,R({ref:S,className:b},k,{children:m}))});return Ee(f,e),f}}const{NODE_MODES:ae}=le,_t=({mode:e,previousMode:r}={})=>e===ae.SERVERLESS||r===ae.SERVERLESS;var Et={isInServerlessMode:_t};const $t=J(e=>({addMenuItemRoot:{marginTop:"8px",justifyContent:"center",color:e.palette.primary.main,lineHeight:"3.2"}}));function ge({disabled:e,storeList:r,teamDid:n,onAdd:t,scope:o,hiddenChildren:u,open:d,onClose:l}){const{api:c}=H(),[a,f]=g.useState(!1),[h,v]=g.useState(!0),[S,m]=g.useState(!1),[j,C]=g.useState(""),[w,y]=g.useState(""),{t:p}=O(),b=$t(),k=async()=>{f(!0);try{const{decoded:x}=Ne(j,r);await c.addBlockletStore({input:{teamDid:n,url:x,scope:o}}),t(x),m(!1),l()}catch(x){const I=`${p("store.blockletRegistry.addFailed")} ${U(x)}`;y(I)}finally{f(!1)}},T=()=>{m(!1),l()};return s.jsxs(s.Fragment,{children:[!u&&s.jsxs(Be,{button:!0,disabled:e,className:b.addMenuItemRoot,onClick:()=>{m(!0)},children:[s.jsx(Ue,{font:!0}),s.jsx(_,{variant:"inherit",children:p("store.blockletRegistry.addRegistry")})]}),s.jsxs($e,{title:p("store.blockletRegistry.addRegistry"),fullWidth:!0,maxWidth:"md",open:d||S,onClose:T,PaperProps:{style:{minHeight:"auto"}},actions:s.jsxs(s.Fragment,{children:[s.jsx(ne,{onClick:x=>{x.stopPropagation(),T()},color:"inherit",children:p("common.cancel")}),s.jsxs(ne,{onClick:x=>{x.stopPropagation(),k()},color:"primary","data-cy":"install-blocklet-next-step",disabled:a||!j||h,variant:"contained",autoFocus:!0,children:[a&&s.jsx(q,{size:16}),p("common.confirm")]})]}),children:[s.jsx("div",{style:{paddingTop:12,overflowY:"hidden"},children:s.jsx(We,{component:"div",children:s.jsx(_,{component:"div",children:s.jsx(de,{label:p("store.blockletRegistry.registryUrl"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"add-blocklet-store-url",fullWidth:!0,value:j,onChange:x=>{y(null);let I=!1;x.target.value.trim()||(I=!0),x.target.value.trim()||y(p("store.blockletRegistry.registryUrlEmpty")),C(x.target.value),v(I)},disabled:a,onKeyPress:x=>{x.key==="Enter"&&(x.preventDefault(),x.target.value.trim()?k():y(p("store.blockletRegistry.registryUrlEmpty")))}})})})}),!!w&&s.jsx(ue,{severity:"error",style:{width:"100%"},children:w})]})]})}ge.propTypes={teamDid:i.string.isRequired,disabled:i.bool,storeList:i.array,onAdd:i.func,scope:i.string,hiddenChildren:i.bool,open:i.bool,onClose:i.func};ge.defaultProps={disabled:!1,storeList:[],onAdd:()=>{},scope:"",hiddenChildren:!1,open:!1,onClose:()=>{}};var K={},Nt=G;Object.defineProperty(K,"__esModule",{value:!0});var xe=K.default=void 0,Pt=Nt(V()),It=s;xe=K.default=(0,Pt.default)((0,It.jsx)("path",{d:"M17 7h-4v2h4c1.65 0 3 1.35 3 3s-1.35 3-3 3h-4v2h4c2.76 0 5-2.24 5-5s-2.24-5-5-5m-6 8H7c-1.65 0-3-1.35-3-3s1.35-3 3-3h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4zm-3-4h8v2H8z"}),"LinkOutlined");var Q={},Mt=G;Object.defineProperty(Q,"__esModule",{value:!0});var ve=Q.default=void 0,Lt=Mt(V()),zt=s;ve=Q.default=(0,Lt.default)((0,zt.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3M8 13h2.55v3h2.9v-3H16l-4-4z"}),"BackupOutlined");function X({title:e,description:r,confirmPlaceholder:n,cancel:t,confirm:o,params:u,onCancel:d,onConfirm:l,keyName:c}){const{t:a}=O(),f={title:()=>s.jsxs("div",{children:[e,s.jsx(Ve,{sx:{fontSize:"14px"},maxLength:64,children:` (${c})`})]}),description:(h,v)=>{const S=m=>{v({...m,__disableConfirm:m.__disableConfirm})};return s.jsxs("div",{children:[s.jsx(ue,{severity:"warning",style:{width:"100%"},children:a("common.notice")}),s.jsx("div",{style:{marginTop:24,marginBottom:24},dangerouslySetInnerHTML:{__html:r}}),s.jsxs("div",{style:{marginBottom:24},children:[a("common.click"),":",s.jsx(He,{"data-cy":"click-copy",children:c})]}),s.jsx(_,{component:"div",children:s.jsx(de,{label:n,autoComplete:"off","data-cy":"delete-confirm-input",variant:"outlined",fullWidth:!0,autoFocus:!0,value:h.inputVal,onChange:m=>{S({...h,inputVal:m.target.value,__disableConfirm:c!==m.target.value})}})})]})},confirm:o,cancel:t,onConfirm:l,onCancel:d,params:{inputVal:"",__disableConfirm:!0,...u}};return s.jsx(me,{title:f.title,description:f.description,confirm:f.confirm,cancel:f.cancel,params:f.params,onConfirm:f.onConfirm,onCancel:f.onCancel})}X.propTypes={title:i.any.isRequired,keyName:i.any.isRequired,description:i.any.isRequired,confirmPlaceholder:i.any.isRequired,cancel:i.string,confirm:i.string,params:i.object,onCancel:i.func,onConfirm:i.func.isRequired};X.defaultProps={onCancel:()=>{},cancel:"",confirm:"Confirm",params:{}};function W({store:e,teamDid:r,onDelete:n,children:t,projectId:o="",scope:u=""}){const{api:d}=H(),{t:l}=O(),c=Pe(),[a,f]=g.useState(!1),[h,v]=g.useState(null),S=Ie(),m=()=>{f(!1),v(null)},j=async()=>{var y;try{f(!0),await d.deleteBlockletStore({input:{teamDid:r,url:e.url,projectId:o,scope:u}}),await((y=c==null?void 0:c.actions)==null?void 0:y.refreshBlocklet()),n&&typeof n=="function"&&n()}catch(p){E.error(`Remove Blocklet Store Error: ${U(p)}`)}finally{f(!1),v(null)}},C={keyName:e.url,title:l("store.blockletRegistry.deleteRegistry"),description:l("store.blockletRegistry.deleteDesc",{name:`<b>${e.url}</b>`,color:S.palette.error.main}),confirmPlaceholder:l("store.blockletRegistry.confirmDesc",{name:e.url}),confirm:l("common.delConfirm"),cancel:l("common.cancel"),onConfirm:j,onCancel:m},w=y=>{e.protected||(y.stopPropagation(),v(C))};return s.jsxs(s.Fragment,{children:[t?s.jsx("span",{onClick:w,children:t}):s.jsx($,{"data-cy":"store-action-delete",color:"primary",disabled:a,onClick:w,size:"small",children:s.jsx(pe,{sx:{zoom:.95}})}),h&&s.jsx(X,{keyName:h.keyName,title:h.title,description:h.description,confirmPlaceholder:h.confirmPlaceholder,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]})}W.propTypes={children:i.node,teamDid:i.string.isRequired,store:i.object.isRequired,onDelete:i.func,projectId:i.string,scope:i.string};W.defaultProps={children:null,projectId:"",scope:"",onDelete:()=>{}};var Y={},Ot=G;Object.defineProperty(Y,"__esModule",{value:!0});var ye=Y.default=void 0,qt=Ot(V()),Ut=s;ye=Y.default=(0,qt.default)((0,Ut.jsx)("path",{d:"M17 7h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1 0 1.43-.98 2.63-2.31 2.98l1.46 1.46C20.88 15.61 22 13.95 22 12c0-2.76-2.24-5-5-5m-1 4h-2.19l2 2H16zM2 4.27l3.11 3.11C3.29 8.12 2 9.91 2 12c0 2.76 2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1 0-1.59 1.21-2.9 2.76-3.07L8.73 11H8v2h2.73L13 15.27V17h1.73l4.01 4L20 19.74 3.27 3z"}),"LinkOff");const Bt=({store:e,userDid:r})=>{var t;const n=((t=window.blocklet)==null?void 0:t.tenantMode)!==Me.BLOCKLET_TENANT_MODES.MULTIPLE;return e.protected?!1:e.scope&&e.scope===r?!0:n?e.scope==="studio":!1};function Z({connectedStore:e,onDisconnect:r,onDelete:n,store:t,teamDid:o,projectId:u}){var y;const[d,l]=g.useState(null),c=!!d,{t:a}=O(),{session:f}=Je(),[h,v]=g.useState(!1),S=p=>{if(p.stopPropagation(),e!=null&&e.developerDid){const b=ce.from(JSON.stringify({forceConnected:e==null?void 0:e.developerDid}),"utf8").toString("base64");window.open(P(`${z(t.url,"developer/blocklets")}?__did-connect__=${b}`,{allowDomains:null}))}else window.open(P(`${z(t.url,"developer/blocklets")}`,{allowDomains:null}))},m=p=>{l(p.currentTarget)},j=()=>{l(null)},C=()=>{v(!1),r()},w=[{label:a("common.visitStore"),action:S,icon:fe},{label:a("common.disconnect"),action:()=>{j(),v(!0)},icon:ye,hidden:!e}];return s.jsxs(s.Fragment,{children:[s.jsx($,{ref:d,color:"primary",onClick:m,size:"small",children:s.jsx(Ae,{sx:{zoom:.95}})}),s.jsxs(Le,{anchorEl:d,open:c,onClose:j,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:[w.map(p=>p.hidden?null:s.jsxs(se,{dense:!0,onClick:p.action,disabled:p.disabled,children:[p.icon&&s.jsx(p.icon,{color:"action",sx:{marginRight:1}}),s.jsx(N,{color:"action",children:p.label})]},p.label)),Bt({store:t,userDid:(y=f==null?void 0:f.user)==null?void 0:y.did})&&s.jsx(W,{store:t,onDelete:n,teamDid:o,projectId:u,scope:t.scope||"studio",children:s.jsxs(se,{dense:!0,disabled:t.protected,children:[s.jsx(pe,{sx:{color:t.protected?"action":"error.main",marginRight:1}}),s.jsx(N,{color:t.protected?"action":"error.main",children:a("common.delete")})]})})]}),h&&s.jsx(me,{displayError:!0,title:`${a("common.disconnect")} ${t.name}`,description:a("blocklet.publish.disconnectStoreTip"),confirm:a("common.confirm"),onConfirm:C,onCancel:()=>v(!1)})]})}Z.propTypes={connectedStore:i.object.isRequired,onDisconnect:i.func,onDelete:i.func,store:i.object.isRequired,teamDid:i.string.isRequired,projectId:i.string};Z.defaultProps={projectId:"",onDelete:()=>{},onDisconnect:()=>{}};function At({messageType:e,onOpen:r,onClose:n}){const t=g.useRef(null),o=g.useRef(null),u=async l=>{setTimeout(()=>{try{n==null||n()}catch{}},10*1e3),t.current&&(clearInterval(o.current),t.current.close());const c=Math.random().toString(36).slice(2);t.current=window.open(`${le.WELLKNOWN_SERVICE_PATH_PREFIX}/open-window?key=${c}`,"_blank"),r==null||r(t.current),o.current=setInterval(()=>{(!t.current||t.current.closed)&&(t.current=null,clearInterval(o.current),setTimeout(()=>{n==null||n()},1100))},200),await Promise.resolve(l(t.current,a=>{if(!t.current){localStorage.setItem(`open-window-url-${c}`,JSON.stringify({url:a,time:Date.now()}));return}t.current.location.href=P(a,{allowDomains:null})}))},d=ze(l=>{const{type:c,error:a}=l.data;t.current&&c===e&&a&&(E.error(a),n==null||n())});return g.useEffect(()=>(window.addEventListener("message",d),()=>{window.removeEventListener("message",d)}),[d]),u}function A({connectedStore:e,sx:r,...n}){return s.jsx(Qe,{sx:{width:24,height:24,...r},src:z(e.storeUrl,`/.well-known/service/user/avatar/${e.developerDid}?imageFilter=resize&w=120&h=120`),...n})}A.propTypes={connectedStore:i.object.isRequired,sx:i.object};A.defaultProps={sx:{}};function je({storeUrl:e,storeName:r,developerDid:n,published:t}){const{t:o}=O(),u=()=>{if(n){const d=ce.from(JSON.stringify({forceConnected:n}),"utf8").toString("base64");window.open(P(`${z(e,"developer/blocklets")}?__did-connect__=${d}`,{allowDomains:null}))}else window.open(P(`${z(e,"developer/blocklets")}`,{allowDomains:null}))};return s.jsxs(N,{children:[s.jsx(_,{variant:"subtitle2",children:o(t?"blocklet.publish.publishToStoreSuccess":"blocklet.publish.uploadToStoreSuccess",{name:r})}),s.jsx($,{size:"small",sx:{mt:1},onClick:u,variant:"contained",color:"success",children:o("common.visitTarget",{name:r})})]})}je.propTypes={storeName:i.string.isRequired,storeUrl:i.string.isRequired,developerDid:i.string.isRequired,published:i.bool.isRequired};const Se={CONNECT:"connect",SELECT:"select"},Wt=J(()=>({buttonText:{textTransform:"none !important"},iconRoot:{minWidth:24},box:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",overflow:"hidden",width:"100%"},menuName:{flexShrink:1,display:"flex",flexDirection:"column",overflow:"hidden",flex:1},actions:{flex:1,display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center"},title:{fontSize:16,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},url:{fontSize:14,opacity:.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},buttonLine:{height:"100%",width:"1px",backgroundColor:"#e0e0e0"}})),Ft=Dt(({className:e,...r})=>s.jsx(qe,{...r,classes:{popper:e}}))(({theme:e})=>({[`& .${Oe.tooltip}`]:{backgroundColor:"#fff",color:"rgba(0, 0, 0, 0.87)",borderRadius:8,padding:e.spacing(2),fontSize:e.typography.pxToRem(12),border:"1px solid rgba(0,0,0,0.08)",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.05)"}}));function Ce({teamDid:e,projectId:r,releaseId:n,store:t,onDelete:o,kind:u,published:d,connectedStore:l,releaseType:c,onPublish:a,onOpenConnectStore:f,onSelectConnectStore:h,behavior:v,scope:S=""}){const m=Wt(),{t:j}=O(),{api:C,info:w,inService:y}=H(),[p,b]=g.useState(!1),k=At({messageType:"connect-store-message",onOpen:()=>b(!0),onClose:()=>b(!1)}),T=u==="publish",x=!!l,I=D=>{if(D.stopPropagation(),T){window.open(P(z(t.url,"developer/blocklets"),{allowDomains:null}));return}window.open(P(t.url,{allowDomains:null}))},be=()=>{if(v===Se.SELECT){h(t);return}k(async(D,Te)=>{try{const M=await C.connectToStore({input:{did:e,storeUrl:t.url,storeId:t.id,storeName:t.name,projectId:r}});if(!(M!=null&&M.url)){E.error("failed to connect to store");return}Te(M.url),await f({did:e,projectId:r,storeId:t.id}),b(!1)}catch(M){const De=U(M);E.error(De),b(!1)}})},we=async()=>{try{await C.disconnectFromStore({input:{did:e,storeId:t.id,projectId:r,storeScope:S}}),o()}catch(D){E.error(U(D))}},Re=()=>{b(!0),C.publishToStore({input:{did:e,storeId:t.id,storeName:t.name,projectId:r,releaseId:n,type:c}}).then(D=>{E.success(s.jsx(je,{storeName:l.storeName,storeUrl:l.storeUrl,developerDid:l.developerDid,published:D.url==="published"}),{duration:1e4}),a==null||a(null)}).catch(D=>{E.error(U(D)),a==null||a(D)}).finally(()=>{b(!1)})};g.useEffect(()=>{x&&b(!1)},[x]);const ke=g.useMemo(()=>!(y&&Et.isInServerlessMode(w)),[y,w]);return s.jsxs("div",{className:m.box,children:[!T&&p&&s.jsx(q,{sx:{marginRight:2},size:16}),s.jsxs("div",{className:m.menuName,children:[s.jsx(N,{sx:{display:"flex",flexDirection:"row"},children:s.jsx(_,{component:"span",className:m.title,variant:"subtitle1",children:t.name})}),s.jsx(_,{className:m.url,component:"span",variant:"inherit",children:`${t.url}`})]}),s.jsxs("div",{className:m.actions,children:[l&&s.jsx(Ft,{placement:"top",title:s.jsxs(N,{children:[s.jsx(_,{component:"span",variant:"caption",sx:{opacity:.7},children:j("blocklet.publish.developerInfo")}),s.jsxs(N,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:1,mt:1},children:[s.jsx(A,{connectedStore:l,sx:{width:42,height:42}}),s.jsxs(N,{sx:{flex:1},children:[s.jsx(_,{component:"span",variant:"subtitle1",children:l.developerName}),s.jsx(Ke,{size:14,copyable:!0,compact:!0,responsive:!1,did:l.developerDid})]})]})]}),children:s.jsx("div",{children:s.jsx(A,{connectedStore:l,sx:{marginRight:1,cursor:"help"}})})}),T&&s.jsxs(re,{disabled:p,variant:"outlined",sx:{height:38},size:"small",children:[!x&&s.jsxs($,{sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},onClick:be,children:[p?s.jsx(q,{sx:{marginRight:1},size:16}):s.jsx(xe,{sx:{marginRight:1}}),j("common.connect")]}),x&&d&&s.jsxs($,{disabled:!0,sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},children:[p?s.jsx(q,{sx:{marginRight:1},size:16}):s.jsx(Fe,{sx:{marginRight:1}}),j("common.uploaded")]}),x&&!d&&s.jsxs($,{sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},onClick:Re,children:[p?s.jsx(q,{sx:{marginRight:1},size:16}):s.jsx(ve,{sx:{marginRight:1,fontSize:20}}),j("common.upload")]}),s.jsx(Z,{projectId:r,connectedStore:l,store:t,onDelete:o,teamDid:e,onDisconnect:we})]}),!T&&s.jsxs(re,{disabled:p,variant:"outlined",sx:{height:36},size:"small",children:[s.jsx($,{"data-cy":"store-open-url",onClick:I,children:s.jsx(fe,{sx:{zoom:.9}})}),!t.protected&&ke&&s.jsx(W,{store:t,onDelete:o,teamDid:e,scope:""})]})]})]})}Ce.propTypes={kind:i.string,teamDid:i.string.isRequired,published:i.bool,connectedStore:i.shape({storeName:i.string,storeId:i.string,storeUrl:i.string,developerDid:i.string,developerName:i.string}),projectId:i.string,releaseId:i.string,releaseType:i.string,store:i.shape({id:i.string.isRequired,name:i.string.isRequired,url:i.string.isRequired,protected:i.bool,connected:i.bool}).isRequired,scope:i.string,onDelete:i.func,onPublish:i.func,onOpenConnectStore:i.func,behavior:i.string,onSelectConnectStore:i.func};Ce.defaultProps={kind:"store",published:!1,connectedStore:null,releaseId:"",projectId:"",releaseType:"",scope:"",behavior:Se.CONNECT,onPublish:()=>{},onDelete:()=>{},onOpenConnectStore:()=>{},onSelectConnectStore:()=>{}};export{ge as A,X as C,Ce as S,je as U,Bt as c,J as m,Et as s,At as u};