@abtnode/blocklet-services 1.16.29-beta-87e06e1c → 1.16.29-beta-2eaf40bc

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 (193) hide show
  1. package/api/libs/push-kit/index.js +1 -1
  2. package/api/routes/user.js +21 -21
  3. package/dist/assets/{Add-CMQKXeoe.js → Add-C5zWPWbi.js} +1 -1
  4. package/dist/assets/{AddBox-Da8HRe0l.js → AddBox-C4A7DDm4.js} +1 -1
  5. package/dist/assets/{Alert-mdjZq_dN.js → Alert-D91U5h--.js} +1 -1
  6. package/dist/assets/{ArrowDropDown-DBLaWGdE.js → ArrowDropDown-Cq32DOpt.js} +1 -1
  7. package/dist/assets/{Avatar-Dwnhztcq.js → Avatar-XXXVLUFk.js} +1 -1
  8. package/dist/assets/{ButtonGroup-C_zY2Afa.js → ButtonGroup-k3SZjeUa.js} +1 -1
  9. package/dist/assets/{CheckCircle-kn1SqNkc.js → CheckCircle-CbXxG2JL.js} +1 -1
  10. package/dist/assets/ChevronRight-BKcNccG9.js +1 -0
  11. package/dist/assets/{Close-jIp5Q79T.js → Close-CdBP5F4J.js} +1 -1
  12. package/dist/assets/{CloseOutlined-GI4sup4V.js → CloseOutlined-Crg0BDr4.js} +1 -1
  13. package/dist/assets/{Delete-BbOhDiuP.js → Delete-DlfFien6.js} +1 -1
  14. package/dist/assets/{DeleteOutline-ahZetlDx.js → DeleteOutline-De4xAGvs.js} +1 -1
  15. package/dist/assets/{Done-N9lCfpyR.js → Done-DO1tfb2_.js} +1 -1
  16. package/dist/assets/{Download-mFht7dDB.js → Download-CVseEK0o.js} +1 -1
  17. package/dist/assets/{Edit-CghashFt.js → Edit-DOJCHJ5p.js} +1 -1
  18. package/dist/assets/{EditIcon-75-uOhAD.js → EditIcon-Bg4AkV00.js} +1 -1
  19. package/dist/assets/{Error-8UAOEONn.js → Error-CQmWghPs.js} +1 -1
  20. package/dist/assets/{ExpandMore-BWaTr8NM.js → ExpandMore-DD2GykPj.js} +1 -1
  21. package/dist/assets/{FilterList-D4DSpHyR.js → FilterList-QafrkXbd.js} +1 -1
  22. package/dist/assets/{FormControl-BInNJyV_.js → FormControl-Kt4xANtI.js} +1 -1
  23. package/dist/assets/{FormControlLabel-JXim2rPI.js → FormControlLabel-B6ISinfm.js} +1 -1
  24. package/dist/assets/{FormGroup-QRzg5zQM.js → FormGroup-BEMyIGSj.js} +1 -1
  25. package/dist/assets/{Google-DKuUv0bp.js → Google-DGP2JaKw.js} +3 -3
  26. package/dist/assets/{Hidden-BJkMpsd0.js → Hidden-kl5Tbw1B.js} +1 -1
  27. package/dist/assets/{InfoOutlined-D_-vCQwD.js → InfoOutlined-BRuBRFbl.js} +1 -1
  28. package/dist/assets/{InputAdornment-BW-7-lAZ.js → InputAdornment-C5IWgB4u.js} +1 -1
  29. package/dist/assets/{InputLabel-vZ-qCGp_.js → InputLabel-DbdmcDbJ.js} +1 -1
  30. package/dist/assets/{LastPage-BHrerTUj.js → LastPage-DXISIPs8.js} +1 -1
  31. package/dist/assets/{Launch-CI_q_8qp.js → Launch-CDcio2Tm.js} +1 -1
  32. package/dist/assets/{LaunchOutlined-CpDBdiys.js → LaunchOutlined-D8a8pCOt.js} +1 -1
  33. package/dist/assets/{Link-DVxMZoCJ.js → Link-DFzOJFD-.js} +1 -1
  34. package/dist/assets/{ListItemText-DP70CZWH.js → ListItemText-Bnnk7Gbj.js} +1 -1
  35. package/dist/assets/{LoadingButton-CJlpo1-G.js → LoadingButton-DGVicOWa.js} +1 -1
  36. package/dist/assets/{LockIcon-Fkour9Hk.js → LockIcon-CTWJWfSc.js} +1 -1
  37. package/dist/assets/{Loop-BuHhX_Av.js → Loop-CbV2fFUd.js} +1 -1
  38. package/dist/assets/{MoreVert-BU85cNL-.js → MoreVert-er-bltGF.js} +1 -1
  39. package/dist/assets/{OpenInNew-BVKTmUSh.js → OpenInNew-Bu6iI6eA.js} +1 -1
  40. package/dist/assets/{Pagination-Bl1UntaI.js → Pagination-Dz7kgZlB.js} +1 -1
  41. package/dist/assets/{PlayArrow-CFdZsZNc.js → PlayArrow-2r36AAmk.js} +1 -1
  42. package/dist/assets/{QuestionMarkCircle-C3Y6kBtX.js → QuestionMarkCircle-CoIXItlb.js} +1 -1
  43. package/dist/assets/{RadioGroup-DcXqVDaX.js → RadioGroup-C7j1KJ7y.js} +1 -1
  44. package/dist/assets/{Search-DBZkGJEC.js → Search-CMyGk9R2.js} +1 -1
  45. package/dist/assets/{Select-BmEz5CKJ.js → Select-BeNQ99oP.js} +2 -2
  46. package/dist/assets/{ServerLogo-BOyMhWeP.js → ServerLogo-D12k9g2u.js} +1 -1
  47. package/dist/assets/{Skeleton-OTpVMSFz.js → Skeleton-FXGSJdkA.js} +1 -1
  48. package/dist/assets/{Slider-DNluieNL.js → Slider-GjDHfyBj.js} +1 -1
  49. package/dist/assets/{Stepper-B0G3C-3I.js → Stepper-BF6lz4ut.js} +1 -1
  50. package/dist/assets/{TextField-BVdG-t68.js → TextField-D3XEyFR4.js} +1 -1
  51. package/dist/assets/{Toolbar-77uyJM9h.js → Toolbar-_9it32pJ.js} +1 -1
  52. package/dist/assets/{ViewList-BZl9X2KJ.js → ViewList-BhIE_M4V.js} +1 -1
  53. package/dist/assets/{access-control-CGzkrH1Y.js → access-control-BWh_6uO-.js} +1 -1
  54. package/dist/assets/actions-DLO5dlyV.js +1 -0
  55. package/dist/assets/{add-component-core-BbxLLEgD.js → add-component-core-C3OBXrft.js} +1 -1
  56. package/dist/assets/{add-resource-CYsR9j8U.js → add-resource-DdlMvNYe.js} +1 -1
  57. package/dist/assets/{addon-nTU7nweO.js → addon-1j40gf6h.js} +1 -1
  58. package/dist/assets/{analytics-BkdPAZsX.js → analytics-DVd3xO2s.js} +8 -8
  59. package/dist/assets/api-C37A8mCN.js +1 -0
  60. package/dist/assets/audit-logs-CJh_A9OZ.js +58 -0
  61. package/dist/assets/{button-Cf39mK25.js → button-2f4tapJk.js} +1 -1
  62. package/dist/assets/{click-to-copy-c5lWDYPF.js → click-to-copy-CNizZfqS.js} +1 -1
  63. package/dist/assets/{complete-DysD3QJT.js → complete-CTg4NtH_.js} +2 -2
  64. package/dist/assets/{component-DZyjf8se.js → component-DyLPRRkR.js} +4 -1
  65. package/dist/assets/{config-DRw_AxQk.js → config-BBl1Og8k.js} +2 -2
  66. package/dist/assets/{config-CF7Y9rRi.js → config-Cl9yfIWh.js} +1 -1
  67. package/dist/assets/{config-navigation-D9f4bzEX.js → config-navigation-RZ9QpkFv.js} +2 -2
  68. package/dist/assets/{config-space-DTZjot0i.js → config-space-DTE8U19b.js} +1 -1
  69. package/dist/assets/{confirm-DHGyGyAN.js → confirm-CD6_CMUq.js} +1 -1
  70. package/dist/assets/{connect-Dl-Zpwl9.js → connect-B-qpRVvn.js} +1 -1
  71. package/dist/assets/{connect-Bx5ZoLro.js → connect-DDELE721.js} +1 -1
  72. package/dist/assets/{connect-to-BMNpvRpv.js → connect-to-DMAPIkc9.js} +1 -1
  73. package/dist/assets/{content-layout-BDEMWVYY.js → content-layout-CK5XQfmW.js} +1 -1
  74. package/dist/assets/{dashboard-DPAzcWCD.js → dashboard-BOQEjKT8.js} +3 -3
  75. package/dist/assets/{did-address-GeuxdIBC.js → did-address-GzRMEyk7.js} +1 -1
  76. package/dist/assets/domain-C3D9kcXD.js +9 -0
  77. package/dist/assets/domain-list-BRcBrFVB.js +15 -0
  78. package/dist/assets/{exchange-passport-BJyRZAj_.js → exchange-passport-B9ZrHETZ.js} +1 -1
  79. package/dist/assets/{fallback-CCEDDyDi.js → fallback-rg9fefdL.js} +1 -1
  80. package/dist/assets/{format-error-DYsYcQEx.js → format-error-B3RYdl6q.js} +1 -1
  81. package/dist/assets/{fuel-Dtg2IWIr.js → fuel-BDMvUxVC.js} +1 -1
  82. package/dist/assets/{fullpage-enLeoQf3.js → fullpage-DFMbQYE_.js} +1 -1
  83. package/dist/assets/home-YZ2dUhxo.js +1 -0
  84. package/dist/assets/iframe-s25HWReH.js +1 -0
  85. package/dist/assets/{index-BE-PybUy.js → index-5qacoeSv.js} +1 -1
  86. package/dist/assets/{index-CYhVfKiI.js → index-BCpZXkUS.js} +1 -1
  87. package/dist/assets/index-BEbMx7tF.js +54 -0
  88. package/dist/assets/{index-D0mhOhN_.js → index-BPSr4f2j.js} +1 -1
  89. package/dist/assets/{index-cJ_r5O2G.js → index-BU9mgEVG.js} +1 -1
  90. package/dist/assets/index-BfhVorqV.js +1290 -0
  91. package/dist/assets/{index-kgiMnW1E.js → index-Bva9FLKW.js} +1 -1
  92. package/dist/assets/{index-BWNwbxV3.js → index-CGXAjTXD.js} +5 -5
  93. package/dist/assets/index-CHJwugzh.js +268 -0
  94. package/dist/assets/{index-CMOiPukL.js → index-CHbscbku.js} +1 -1
  95. package/dist/assets/{index-DHhCppBk.js → index-CcddEj1V.js} +1 -1
  96. package/dist/assets/index-Ce3CP3Jp.js +721 -0
  97. package/dist/assets/{index-BbBH0P5m.js → index-CscyFLCJ.js} +1 -1
  98. package/dist/assets/{index-Deep7NDy.js → index-CvOK9BmX.js} +1 -1
  99. package/dist/assets/{index-znPaERnk.js → index-Cx1j9azw.js} +1 -1
  100. package/dist/assets/{index-CCxjgLfl.js → index-D12KUiCG.js} +1 -1
  101. package/dist/assets/{index-DMdwa7oY.js → index-DJLK29SJ.js} +1 -1
  102. package/dist/assets/{index-DftsTqu2.js → index-DMq0_62n.js} +7 -7
  103. package/dist/assets/{index-CEKJKcmu.js → index-DOU4d3bN.js} +23 -23
  104. package/dist/assets/{index-CXfltY7R.js → index-DU7-35nh.js} +1 -1
  105. package/dist/assets/{index-fXjNAh_E.js → index-Db5U7Aba.js} +1 -1
  106. package/dist/assets/{index-DHdo-KHc.js → index-Dcp0-2H6.js} +1 -1
  107. package/dist/assets/{index-zXWDbMUc.js → index-Dn7MhkOZ.js} +2 -2
  108. package/dist/assets/{index-C_h-cjkD.js → index-UmXxvIz7.js} +1 -1
  109. package/dist/assets/{index-CcKKC_-Z.js → index-VRudjsk_.js} +4 -4
  110. package/dist/assets/{index-BygZlN1t.js → index-WDF_phnR.js} +1 -1
  111. package/dist/assets/{index-DFK8wuUf.js → index-Xh4BYwzS.js} +1 -1
  112. package/dist/assets/{index-CiaIJC7d.js → index-_y2ZXCMC.js} +1 -1
  113. package/dist/assets/{index-DgA5Zy0N.js → index-nyOsFIwy.js} +1 -1
  114. package/dist/assets/{index-BFKp2CQd.js → index-u_IDQFrq.js} +1 -1
  115. package/dist/assets/{index.es-D8BlGmV3.js → index.es-BySfVRax.js} +1 -1
  116. package/dist/assets/{index.esm-DYpiXkK4.js → index.esm-Cpbu1bqz.js} +1 -1
  117. package/dist/assets/{invitation-BVSF_u6q.js → invitation-ZiYOpo0m.js} +1 -1
  118. package/dist/assets/{invite-mbGuCtwn.js → invite-CP_9mlTp.js} +1 -1
  119. package/dist/assets/{issue-passport-BBH1beTG.js → issue-passport-OdsEQRgF.js} +1 -1
  120. package/dist/assets/{item-kfKoTTV2.js → item-B9vXmxNy.js} +1 -1
  121. package/dist/assets/{jss-plugin-props-sort.esm-MzFujmAA.js → jss-plugin-props-sort.esm-InWevx1Y.js} +1 -1
  122. package/dist/assets/{launch-result-message-RM9Ng5hn.js → launch-result-message-Z1C1sG3K.js} +1 -1
  123. package/dist/assets/{layout-Cfl7BHp5.js → layout-BJYUy5aS.js} +1 -1
  124. package/dist/assets/{list-header-DI0IB0Bd.js → list-header-7mHFR-6j.js} +1 -1
  125. package/dist/assets/localization-DH4Rcoxd.js +1 -0
  126. package/dist/assets/{log-CSVkwN2N.js → log-D0ihnCPe.js} +1 -1
  127. package/dist/assets/{login-4KOsqfW-.js → login-BJ99c8Da.js} +1 -1
  128. package/dist/assets/{login-oauth-callback-BUiWmoRv.js → login-oauth-callback-DXPZbXE8.js} +1 -1
  129. package/dist/assets/logo-uploader-Cb8u4LYv.js +122 -0
  130. package/dist/assets/{lost-passport-DlFRPZ12.js → lost-passport-PezCqF0f.js} +3 -3
  131. package/dist/assets/{lottie-D02lbC_S.js → lottie-BCG4dny2.js} +1 -1
  132. package/dist/assets/notifications-CKxrvr1-.js +62 -0
  133. package/dist/assets/{open-window-DcFp6fJ9.js → open-window-CuGAzF2Z.js} +1 -1
  134. package/dist/assets/overview-BSBWgzbj.js +12 -0
  135. package/dist/assets/{page-header-a_ZREP5V.js → page-header-C5ecJ6Qd.js} +1 -1
  136. package/dist/assets/{permission-BvdmoX95.js → permission-BEPRmEw3.js} +1 -1
  137. package/dist/assets/preferences-knw56gSD.js +1 -0
  138. package/dist/assets/publish-resource-D_KlfXTF.js +1 -0
  139. package/dist/assets/{react-BQtVEjoa.js → react-Di5TTO9l.js} +3 -3
  140. package/dist/assets/{redux-1_xbRAgi.js → redux-tOVF_oDT.js} +1 -1
  141. package/dist/assets/resource-dialog-5vdlaAuh.js +57 -0
  142. package/dist/assets/{selector-CrDfmkY0.js → selector-CNsCKDRb.js} +1 -1
  143. package/dist/assets/session-Cf-ZqG4P.js +1 -0
  144. package/dist/assets/setup-CbG6rF4U.js +14 -0
  145. package/dist/assets/{shorten-label-DhSwM75T.js → shorten-label-CunJMulX.js} +1 -1
  146. package/dist/assets/{slicedToArray-evOaAewz.js → slicedToArray-C9-uQLEN.js} +1 -1
  147. package/dist/assets/{spaces-BDj5SJmw.js → spaces-Dm4toCmL.js} +1 -1
  148. package/dist/assets/{start-Cs0ciU6X.js → start-CrrzSOx-.js} +1 -1
  149. package/dist/assets/{step-actions-vN76MPrD.js → step-actions-BkxasUm3.js} +1 -1
  150. package/dist/assets/{studio-DVaqkTSO.js → studio-Cz2NXhoj.js} +1 -1
  151. package/dist/assets/{switch-control-Cgy1OzVj.js → switch-control-BOre_YDJ.js} +1 -1
  152. package/dist/assets/{toUpper-9p40lktB.js → toUpper-6wIhNvu3.js} +1 -1
  153. package/dist/assets/{transfer-B_RoLPKR.js → transfer-DQPf7r9j.js} +1 -1
  154. package/dist/assets/{uniqBy-_IHSQjYH.js → uniqBy-C3O4Rmks.js} +1 -1
  155. package/dist/assets/{unsubscribe-CiCF7NTM.js → unsubscribe-DhdgpWxi.js} +1 -1
  156. package/dist/assets/{url-join-C49pPV-I.js → url-join-DH_b1eAH.js} +1 -1
  157. package/dist/assets/{use-blocklet-info-for-connect-did-spaces-RrCXQkVw.js → use-blocklet-info-for-connect-did-spaces-gtr1x-_o.js} +1 -1
  158. package/dist/assets/{use-mobile-CuqJnhli.js → use-mobile-CnnusHmf.js} +1 -1
  159. package/dist/assets/{useAsync-DURAXNAc.js → useAsync-6Zzjy7PW.js} +1 -1
  160. package/dist/assets/{useFormControl-CCJce851.js → useFormControl-DUzGwbSY.js} +1 -1
  161. package/dist/assets/{useLocalStorage-BRLJIfQX.js → useLocalStorage-B-I-NsSz.js} +1 -1
  162. package/dist/assets/{useSetState-D2ca5Vtd.js → useSetState-Be-I2Gl-.js} +1 -1
  163. package/dist/assets/{useSlot-6o2H45BB.js → useSlot-LBVvloQJ.js} +1 -1
  164. package/dist/assets/user-center-BXOQaeTd.js +1 -0
  165. package/dist/assets/{user-sessions-DyjCPKPt.js → user-sessions-CdgU8G0J.js} +1 -1
  166. package/dist/assets/{util-DqbGVKvF.js → util-CoWq6oMk.js} +1 -1
  167. package/dist/assets/{wrap-locale-XzyxDGuo.js → wrap-locale-Cn1jipF7.js} +1 -1
  168. package/dist/index.html +1 -1
  169. package/dist/service-worker.js +1 -1
  170. package/package.json +25 -25
  171. package/dist/assets/ChevronRight-DaUZ-Ayb.js +0 -1
  172. package/dist/assets/MoreHoriz-mamFyKRZ.js +0 -1
  173. package/dist/assets/actions-wjSnsmWI.js +0 -1
  174. package/dist/assets/api-BuNUOrmN.js +0 -1
  175. package/dist/assets/audit-logs-CBG0aFcH.js +0 -58
  176. package/dist/assets/domain-C34-U3oM.js +0 -9
  177. package/dist/assets/domain-list-cwESocuZ.js +0 -12
  178. package/dist/assets/home-QtEGSO2n.js +0 -1
  179. package/dist/assets/iframe-BSpQti5t.js +0 -1
  180. package/dist/assets/index-BsIlTmDV.js +0 -719
  181. package/dist/assets/index-CmdZDeHe.js +0 -54
  182. package/dist/assets/index-DewOPxO6.js +0 -1291
  183. package/dist/assets/index-DovgzM-F.js +0 -268
  184. package/dist/assets/localization-DjurSqBQ.js +0 -1
  185. package/dist/assets/logo-uploader-CX1RLtEG.js +0 -122
  186. package/dist/assets/notifications-LuoEmZTe.js +0 -62
  187. package/dist/assets/overview-ClrO9MeG.js +0 -12
  188. package/dist/assets/preferences-DILm8MZs.js +0 -1
  189. package/dist/assets/publish-resource-hbfS3vvw.js +0 -1
  190. package/dist/assets/resource-dialog-BsszfZXO.js +0 -57
  191. package/dist/assets/session-DJ7ldfRV.js +0 -1
  192. package/dist/assets/setup-BvTX8nb8.js +0 -14
  193. package/dist/assets/user-center-uGVr1ML8.js +0 -1
@@ -1,4 +1,4 @@
1
- import{b4 as l}from"./index-DewOPxO6.js";var c={exports:{}};/*!
1
+ import{b4 as l}from"./index-BfhVorqV.js";var c={exports:{}};/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
@@ -1 +1 @@
1
- import{r as v,j as c,P as f,a1 as d}from"./index-DewOPxO6.js";var o={};Object.defineProperty(o,"__esModule",{value:!0});var s=o.default=void 0;m(v);var n=c;function m(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(h){return Object.getOwnPropertyDescriptor(e,h).enumerable})),r.push.apply(r,a)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?l(Object(r),!0).forEach(function(a){y(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function y(e,t,r){return t=g(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e){var t=j(e,"string");return typeof t=="symbol"?t:String(t)}function j(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var i=function(t){return(0,n.jsxs)("svg",u(u({},t),{},{children:[(0,n.jsx)("path",{d:"M24.604 2.263L28.524 0H42.79v41.862H28.79a1 1 0 0 1-.5-.134l-15.103-8.72V8.854l1.817-1.05 3.2 1.848-1.817 1.05V31.16l12.993 7.502H39.59V3.2H29.38l-1.576.91-3.2-1.847z"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26.402 31.16V10.701L13.409 3.2H3.2v35.462h10.21l1.58-.913 3.2 1.847-3.923 2.266H0V0h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047z"}),(0,n.jsx)("path",{d:"M138.44 27.684c.192 0 .357.075.496.224l1.344 1.472a9.584 9.584 0 0 1-3.44 2.576c-1.344.608-2.965.912-4.864.912-1.664 0-3.173-.288-4.528-.864a10.056 10.056 0 0 1-3.456-2.416c-.949-1.035-1.685-2.272-2.208-3.712-.523-1.44-.784-3.024-.784-4.752 0-1.728.272-3.312.816-4.752.555-1.44 1.328-2.677 2.32-3.712a10.444 10.444 0 0 1 3.552-2.416c1.387-.576 2.917-.864 4.592-.864 1.632 0 3.083.267 4.352.8a10.973 10.973 0 0 1 3.312 2.128l-1.12 1.584a.936.936 0 0 1-.288.288.742.742 0 0 1-.432.112c-.203 0-.443-.101-.72-.304a8.802 8.802 0 0 0-1.072-.672c-.437-.256-.981-.485-1.632-.688-.651-.203-1.461-.304-2.432-.304-1.141 0-2.187.203-3.136.608a6.885 6.885 0 0 0-2.464 1.728c-.683.747-1.216 1.67-1.6 2.768-.373 1.088-.56 2.32-.56 3.696 0 1.397.197 2.64.592 3.728.395 1.088.939 2.01 1.632 2.768a6.914 6.914 0 0 0 2.448 1.728 7.764 7.764 0 0 0 3.04.592c.661 0 1.253-.037 1.776-.112a7.843 7.843 0 0 0 1.456-.368c.448-.16.869-.363 1.264-.608a8.89 8.89 0 0 0 1.168-.912c.085-.075.176-.133.272-.176a.616.616 0 0 1 .304-.08zM149.68 16.1c1.195 0 2.272.197 3.232.592a6.54 6.54 0 0 1 2.464 1.68c.683.725 1.205 1.605 1.568 2.64.363 1.024.544 2.176.544 3.456 0 1.28-.181 2.437-.544 3.472-.363 1.035-.885 1.915-1.568 2.64a6.795 6.795 0 0 1-2.464 1.68c-.96.384-2.037.576-3.232.576-1.205 0-2.293-.192-3.264-.576a6.987 6.987 0 0 1-2.464-1.68c-.683-.725-1.211-1.605-1.584-2.64-.363-1.035-.544-2.192-.544-3.472 0-1.28.181-2.432.544-3.456.373-1.035.901-1.915 1.584-2.64a6.717 6.717 0 0 1 2.464-1.68c.971-.395 2.059-.592 3.264-.592zm0 14.304c1.536 0 2.683-.517 3.44-1.552.757-1.035 1.136-2.49 1.136-4.368 0-1.877-.379-3.333-1.136-4.368-.757-1.045-1.904-1.568-3.44-1.568-1.557 0-2.72.523-3.488 1.568-.757 1.035-1.136 2.49-1.136 4.368 0 1.877.379 3.333 1.136 4.368.768 1.035 1.931 1.552 3.488 1.552zM163.899 18.612c.352-.373.72-.715 1.104-1.024a6.73 6.73 0 0 1 1.216-.784 6.195 6.195 0 0 1 1.392-.512 6.442 6.442 0 0 1 1.6-.192c.896 0 1.68.15 2.352.448.682.299 1.253.72 1.712 1.264.458.533.805 1.179 1.04 1.936.234.757.352 1.595.352 2.512v10.352h-3.136V22.26c0-1.163-.267-2.064-.8-2.704-.534-.65-1.35-.976-2.448-.976-.8 0-1.552.192-2.256.576a7.38 7.38 0 0 0-1.936 1.536v11.92h-3.12V16.356h1.872c.437 0 .709.208.816.624l.24 1.632zM181.805 18.612c.352-.373.72-.715 1.104-1.024a6.73 6.73 0 0 1 1.216-.784 6.195 6.195 0 0 1 1.392-.512 6.448 6.448 0 0 1 1.6-.192c.896 0 1.68.15 2.352.448a4.63 4.63 0 0 1 1.712 1.264c.459.533.805 1.179 1.04 1.936.235.757.352 1.595.352 2.512v10.352h-3.136V22.26c0-1.163-.267-2.064-.8-2.704-.533-.65-1.349-.976-2.448-.976-.8 0-1.552.192-2.256.576a7.396 7.396 0 0 0-1.936 1.536v11.92h-3.12V16.356h1.872c.437 0 .709.208.816.624l.24 1.632zM207.551 22.676c0-.619-.09-1.19-.272-1.712a3.77 3.77 0 0 0-.768-1.36 3.521 3.521 0 0 0-1.248-.896c-.49-.213-1.056-.32-1.696-.32-1.312 0-2.346.379-3.104 1.136-.746.757-1.221 1.808-1.424 3.152h8.512zm2.576 7.616a6.311 6.311 0 0 1-1.328 1.168 7.926 7.926 0 0 1-1.6.784 9.664 9.664 0 0 1-1.76.448c-.597.096-1.189.144-1.776.144-1.12 0-2.16-.187-3.12-.56a7.159 7.159 0 0 1-2.48-1.664c-.693-.736-1.237-1.643-1.632-2.72-.384-1.088-.576-2.336-.576-3.744 0-1.13.176-2.181.528-3.152a7.67 7.67 0 0 1 1.504-2.56 7.064 7.064 0 0 1 2.416-1.712c.95-.416 2.016-.624 3.2-.624.992 0 1.904.165 2.736.496.843.32 1.568.79 2.176 1.408.608.619 1.083 1.381 1.424 2.288.352.907.528 1.941.528 3.104 0 .48-.053.805-.16.976-.106.16-.304.24-.592.24h-10.656c.032.97.171 1.819.416 2.544.246.715.582 1.312 1.008 1.792.438.48.955.837 1.552 1.072.598.235 1.264.352 2 .352.694 0 1.291-.08 1.792-.24.512-.16.95-.33 1.312-.512.374-.192.683-.368.928-.528.256-.16.48-.24.672-.24.256 0 .454.096.592.288l.896 1.152zM225.113 19.396a1.836 1.836 0 0 1-.288.288c-.086.064-.214.096-.384.096-.171 0-.352-.064-.544-.192a4.872 4.872 0 0 0-.704-.432 5.21 5.21 0 0 0-1.024-.432c-.395-.139-.886-.208-1.472-.208-.768 0-1.446.139-2.032.416a3.972 3.972 0 0 0-1.472 1.184c-.384.512-.678 1.136-.88 1.872-.203.736-.304 1.563-.304 2.48 0 .95.106 1.797.32 2.544.213.736.517 1.36.912 1.872.394.501.874.885 1.44 1.152a4.522 4.522 0 0 0 1.888.384c.672 0 1.226-.08 1.664-.24.437-.17.8-.352 1.088-.544.288-.192.528-.368.72-.528.192-.17.389-.256.592-.256.256 0 .453.096.592.288l.896 1.152a5.966 5.966 0 0 1-1.264 1.168c-.459.32-.95.581-1.472.784a8.34 8.34 0 0 1-1.648.448c-.566.096-1.142.144-1.728.144a7.25 7.25 0 0 1-2.848-.56 6.52 6.52 0 0 1-2.288-1.632c-.64-.715-1.147-1.59-1.52-2.624-.374-1.045-.56-2.23-.56-3.552 0-1.205.165-2.32.496-3.344.341-1.024.837-1.904 1.488-2.64a6.821 6.821 0 0 1 2.432-1.744c.96-.427 2.058-.64 3.296-.64 1.162 0 2.186.187 3.072.56a7.514 7.514 0 0 1 2.368 1.584l-.832 1.152zM234.121 32.868c-1.312 0-2.325-.368-3.04-1.104-.704-.736-1.056-1.787-1.056-3.152v-9.728h-1.888a.701.701 0 0 1-.464-.16c-.117-.117-.176-.288-.176-.512v-1.264l2.64-.368.704-4.848a.738.738 0 0 1 .24-.416.724.724 0 0 1 .48-.16h1.584v5.456h4.608v2.272h-4.608v9.52c0 .64.155 1.12.464 1.44.32.31.726.464 1.216.464.288 0 .534-.037.736-.112a3.27 3.27 0 0 0 .544-.24c.15-.096.278-.181.384-.256a.521.521 0 0 1 .288-.112c.107 0 .187.027.24.08a.694.694 0 0 1 .192.224l.928 1.504c-.512.47-1.12.832-1.824 1.088a6.362 6.362 0 0 1-2.192.384z"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.815 33.284V9H70.66a6.259 6.259 0 0 1 5.823 6.243v11.783a6.258 6.258 0 0 1-6.258 6.258h-12.41zM84.56 9h-3.335v24.321h3.335V9zM61.15 29.95V12.32h9.075a2.923 2.923 0 0 1 2.923 2.923v11.783a2.923 2.923 0 0 1-2.923 2.923H61.15zM89.243 9v24.284h12.409a6.258 6.258 0 0 0 6.259-6.258V15.243A6.259 6.259 0 0 0 102.087 9H89.243zm22.912 5.636h3.728v3.728h-3.728v-3.729zm3.728 9.321h-3.728v3.729h3.728v-3.729zM92.578 12.32v17.63h9.074a2.924 2.924 0 0 0 2.924-2.924V15.243a2.924 2.924 0 0 0-2.924-2.923h-9.074z"})]}))};i.defaultProps={width:"239",height:"42",viewBox:"0 0 239 42",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};i.displayName="connect-logo";s=o.default=i;function p({children:e,...t}){return c.jsxs(d,{color:"did",variant:"contained",...t,children:[c.jsx("span",{style:{fontWeight:400},children:e||"Continue With"}),c.jsx(s,{style:{width:"auto",height:"1.2em",margin:"0 4px 0 8px"}})]})}p.propTypes={children:f.any};p.defaultProps={children:""};export{p as C};
1
+ import{r as v,j as c,P as f,a1 as d}from"./index-BfhVorqV.js";var o={};Object.defineProperty(o,"__esModule",{value:!0});var s=o.default=void 0;m(v);var n=c;function m(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(h){return Object.getOwnPropertyDescriptor(e,h).enumerable})),r.push.apply(r,a)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?l(Object(r),!0).forEach(function(a){y(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function y(e,t,r){return t=g(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e){var t=j(e,"string");return typeof t=="symbol"?t:String(t)}function j(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var i=function(t){return(0,n.jsxs)("svg",u(u({},t),{},{children:[(0,n.jsx)("path",{d:"M24.604 2.263L28.524 0H42.79v41.862H28.79a1 1 0 0 1-.5-.134l-15.103-8.72V8.854l1.817-1.05 3.2 1.848-1.817 1.05V31.16l12.993 7.502H39.59V3.2H29.38l-1.576.91-3.2-1.847z"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26.402 31.16V10.701L13.409 3.2H3.2v35.462h10.21l1.58-.913 3.2 1.847-3.923 2.266H0V0h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047z"}),(0,n.jsx)("path",{d:"M138.44 27.684c.192 0 .357.075.496.224l1.344 1.472a9.584 9.584 0 0 1-3.44 2.576c-1.344.608-2.965.912-4.864.912-1.664 0-3.173-.288-4.528-.864a10.056 10.056 0 0 1-3.456-2.416c-.949-1.035-1.685-2.272-2.208-3.712-.523-1.44-.784-3.024-.784-4.752 0-1.728.272-3.312.816-4.752.555-1.44 1.328-2.677 2.32-3.712a10.444 10.444 0 0 1 3.552-2.416c1.387-.576 2.917-.864 4.592-.864 1.632 0 3.083.267 4.352.8a10.973 10.973 0 0 1 3.312 2.128l-1.12 1.584a.936.936 0 0 1-.288.288.742.742 0 0 1-.432.112c-.203 0-.443-.101-.72-.304a8.802 8.802 0 0 0-1.072-.672c-.437-.256-.981-.485-1.632-.688-.651-.203-1.461-.304-2.432-.304-1.141 0-2.187.203-3.136.608a6.885 6.885 0 0 0-2.464 1.728c-.683.747-1.216 1.67-1.6 2.768-.373 1.088-.56 2.32-.56 3.696 0 1.397.197 2.64.592 3.728.395 1.088.939 2.01 1.632 2.768a6.914 6.914 0 0 0 2.448 1.728 7.764 7.764 0 0 0 3.04.592c.661 0 1.253-.037 1.776-.112a7.843 7.843 0 0 0 1.456-.368c.448-.16.869-.363 1.264-.608a8.89 8.89 0 0 0 1.168-.912c.085-.075.176-.133.272-.176a.616.616 0 0 1 .304-.08zM149.68 16.1c1.195 0 2.272.197 3.232.592a6.54 6.54 0 0 1 2.464 1.68c.683.725 1.205 1.605 1.568 2.64.363 1.024.544 2.176.544 3.456 0 1.28-.181 2.437-.544 3.472-.363 1.035-.885 1.915-1.568 2.64a6.795 6.795 0 0 1-2.464 1.68c-.96.384-2.037.576-3.232.576-1.205 0-2.293-.192-3.264-.576a6.987 6.987 0 0 1-2.464-1.68c-.683-.725-1.211-1.605-1.584-2.64-.363-1.035-.544-2.192-.544-3.472 0-1.28.181-2.432.544-3.456.373-1.035.901-1.915 1.584-2.64a6.717 6.717 0 0 1 2.464-1.68c.971-.395 2.059-.592 3.264-.592zm0 14.304c1.536 0 2.683-.517 3.44-1.552.757-1.035 1.136-2.49 1.136-4.368 0-1.877-.379-3.333-1.136-4.368-.757-1.045-1.904-1.568-3.44-1.568-1.557 0-2.72.523-3.488 1.568-.757 1.035-1.136 2.49-1.136 4.368 0 1.877.379 3.333 1.136 4.368.768 1.035 1.931 1.552 3.488 1.552zM163.899 18.612c.352-.373.72-.715 1.104-1.024a6.73 6.73 0 0 1 1.216-.784 6.195 6.195 0 0 1 1.392-.512 6.442 6.442 0 0 1 1.6-.192c.896 0 1.68.15 2.352.448.682.299 1.253.72 1.712 1.264.458.533.805 1.179 1.04 1.936.234.757.352 1.595.352 2.512v10.352h-3.136V22.26c0-1.163-.267-2.064-.8-2.704-.534-.65-1.35-.976-2.448-.976-.8 0-1.552.192-2.256.576a7.38 7.38 0 0 0-1.936 1.536v11.92h-3.12V16.356h1.872c.437 0 .709.208.816.624l.24 1.632zM181.805 18.612c.352-.373.72-.715 1.104-1.024a6.73 6.73 0 0 1 1.216-.784 6.195 6.195 0 0 1 1.392-.512 6.448 6.448 0 0 1 1.6-.192c.896 0 1.68.15 2.352.448a4.63 4.63 0 0 1 1.712 1.264c.459.533.805 1.179 1.04 1.936.235.757.352 1.595.352 2.512v10.352h-3.136V22.26c0-1.163-.267-2.064-.8-2.704-.533-.65-1.349-.976-2.448-.976-.8 0-1.552.192-2.256.576a7.396 7.396 0 0 0-1.936 1.536v11.92h-3.12V16.356h1.872c.437 0 .709.208.816.624l.24 1.632zM207.551 22.676c0-.619-.09-1.19-.272-1.712a3.77 3.77 0 0 0-.768-1.36 3.521 3.521 0 0 0-1.248-.896c-.49-.213-1.056-.32-1.696-.32-1.312 0-2.346.379-3.104 1.136-.746.757-1.221 1.808-1.424 3.152h8.512zm2.576 7.616a6.311 6.311 0 0 1-1.328 1.168 7.926 7.926 0 0 1-1.6.784 9.664 9.664 0 0 1-1.76.448c-.597.096-1.189.144-1.776.144-1.12 0-2.16-.187-3.12-.56a7.159 7.159 0 0 1-2.48-1.664c-.693-.736-1.237-1.643-1.632-2.72-.384-1.088-.576-2.336-.576-3.744 0-1.13.176-2.181.528-3.152a7.67 7.67 0 0 1 1.504-2.56 7.064 7.064 0 0 1 2.416-1.712c.95-.416 2.016-.624 3.2-.624.992 0 1.904.165 2.736.496.843.32 1.568.79 2.176 1.408.608.619 1.083 1.381 1.424 2.288.352.907.528 1.941.528 3.104 0 .48-.053.805-.16.976-.106.16-.304.24-.592.24h-10.656c.032.97.171 1.819.416 2.544.246.715.582 1.312 1.008 1.792.438.48.955.837 1.552 1.072.598.235 1.264.352 2 .352.694 0 1.291-.08 1.792-.24.512-.16.95-.33 1.312-.512.374-.192.683-.368.928-.528.256-.16.48-.24.672-.24.256 0 .454.096.592.288l.896 1.152zM225.113 19.396a1.836 1.836 0 0 1-.288.288c-.086.064-.214.096-.384.096-.171 0-.352-.064-.544-.192a4.872 4.872 0 0 0-.704-.432 5.21 5.21 0 0 0-1.024-.432c-.395-.139-.886-.208-1.472-.208-.768 0-1.446.139-2.032.416a3.972 3.972 0 0 0-1.472 1.184c-.384.512-.678 1.136-.88 1.872-.203.736-.304 1.563-.304 2.48 0 .95.106 1.797.32 2.544.213.736.517 1.36.912 1.872.394.501.874.885 1.44 1.152a4.522 4.522 0 0 0 1.888.384c.672 0 1.226-.08 1.664-.24.437-.17.8-.352 1.088-.544.288-.192.528-.368.72-.528.192-.17.389-.256.592-.256.256 0 .453.096.592.288l.896 1.152a5.966 5.966 0 0 1-1.264 1.168c-.459.32-.95.581-1.472.784a8.34 8.34 0 0 1-1.648.448c-.566.096-1.142.144-1.728.144a7.25 7.25 0 0 1-2.848-.56 6.52 6.52 0 0 1-2.288-1.632c-.64-.715-1.147-1.59-1.52-2.624-.374-1.045-.56-2.23-.56-3.552 0-1.205.165-2.32.496-3.344.341-1.024.837-1.904 1.488-2.64a6.821 6.821 0 0 1 2.432-1.744c.96-.427 2.058-.64 3.296-.64 1.162 0 2.186.187 3.072.56a7.514 7.514 0 0 1 2.368 1.584l-.832 1.152zM234.121 32.868c-1.312 0-2.325-.368-3.04-1.104-.704-.736-1.056-1.787-1.056-3.152v-9.728h-1.888a.701.701 0 0 1-.464-.16c-.117-.117-.176-.288-.176-.512v-1.264l2.64-.368.704-4.848a.738.738 0 0 1 .24-.416.724.724 0 0 1 .48-.16h1.584v5.456h4.608v2.272h-4.608v9.52c0 .64.155 1.12.464 1.44.32.31.726.464 1.216.464.288 0 .534-.037.736-.112a3.27 3.27 0 0 0 .544-.24c.15-.096.278-.181.384-.256a.521.521 0 0 1 .288-.112c.107 0 .187.027.24.08a.694.694 0 0 1 .192.224l.928 1.504c-.512.47-1.12.832-1.824 1.088a6.362 6.362 0 0 1-2.192.384z"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.815 33.284V9H70.66a6.259 6.259 0 0 1 5.823 6.243v11.783a6.258 6.258 0 0 1-6.258 6.258h-12.41zM84.56 9h-3.335v24.321h3.335V9zM61.15 29.95V12.32h9.075a2.923 2.923 0 0 1 2.923 2.923v11.783a2.923 2.923 0 0 1-2.923 2.923H61.15zM89.243 9v24.284h12.409a6.258 6.258 0 0 0 6.259-6.258V15.243A6.259 6.259 0 0 0 102.087 9H89.243zm22.912 5.636h3.728v3.728h-3.728v-3.729zm3.728 9.321h-3.728v3.729h3.728v-3.729zM92.578 12.32v17.63h9.074a2.924 2.924 0 0 0 2.924-2.924V15.243a2.924 2.924 0 0 0-2.924-2.923h-9.074z"})]}))};i.defaultProps={width:"239",height:"42",viewBox:"0 0 239 42",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};i.displayName="connect-logo";s=o.default=i;function p({children:e,...t}){return c.jsxs(d,{color:"did",variant:"contained",...t,children:[c.jsx("span",{style:{fontWeight:400},children:e||"Continue With"}),c.jsx(s,{style:{width:"auto",height:"1.2em",margin:"0 4px 0 8px"}})]})}p.propTypes={children:f.any};p.defaultProps={children:""};export{p as C};
@@ -1,4 +1,4 @@
1
- import{X as We,Y as qe,j as t,P as K,Z as Ee,bm as dr,r as $,ey as fr,B as h,db as jn,be as ts,az as we,l as ht,u as me,aM as fe,a1 as ae,q as Z,aV as ge,E as ve,g0 as gr,a7 as Le,I as ns,bO as pr,T as Ut,g1 as mr,ab as hr,ap as Qe,a9 as se,bl as br,a0 as _e,cq as Ue,aU as Kt,aP as Ze,g2 as Er,g3 as _r,b4 as et,h as j,N as je,bA as he,f3 as xr,bU as Te,w as yr,c as ft,f as He,aQ as ss,bj as tt,g4 as Sr,g5 as vr,a as Mn,fh as Nr,b as Ae,M as at,bB as Ke,bS as Ar,bT as Tr,bR as Cr,aY as Rr,aZ as Or,g6 as wr,fq as Ir,b3 as Lr,g7 as zt,dq as jr,cj as rs,bt as Mr,bs as Oe,cr as Dr,g8 as as,z as kr}from"./index-DewOPxO6.js";import{I as Pr}from"./iframe-BSpQti5t.js";import{I as Br,F as Ht,d as Fr,L as $r,a as Ur}from"./Edit-CghashFt.js";import{B as is,d as os}from"./ChevronRight-DaUZ-Ayb.js";import{d as cs}from"./ExpandMore-BWaTr8NM.js";import{T as tn}from"./index-DMdwa7oY.js";import{u as nn,b as Kr,c as zr,e as Hr}from"./dashboard-DPAzcWCD.js";import{d as Gr}from"./Loop-BuHhX_Av.js";import{d as Wr}from"./Done-N9lCfpyR.js";import{F as qr,R as Yr,L as At}from"./logo-uploader-CX1RLtEG.js";import{a as Dn,A as Zr,u as Me,C as X}from"./index.esm-DYpiXkK4.js";import{T as te,F as Vr}from"./TextField-BVdG-t68.js";import{e as Jr}from"./mode-B2dWMeTO.js";import{w as ls,P as Xr}from"./permission-BvdmoX95.js";import{C as us}from"./confirm-DHGyGyAN.js";import{f as sn,D as Qr}from"./format-error-DYsYcQEx.js";import{_ as ea}from"./useSetState-D2ca5Vtd.js";import{u as ta}from"./session-DJ7ldfRV.js";import{C as na}from"./click-to-copy-c5lWDYPF.js";import{F as Ce,C as ds,S as sa}from"./FormControlLabel-JXim2rPI.js";import{A as ra}from"./Alert-mdjZq_dN.js";import{a as ze}from"./index-DgA5Zy0N.js";import{E as rn}from"./index-CCxjgLfl.js";import{F as ie}from"./FormControl-BInNJyV_.js";import{d as aa}from"./Launch-CI_q_8qp.js";import{d as ia}from"./EditIcon-75-uOhAD.js";import{A as Gt}from"./config-CF7Y9rRi.js";import{a as oa}from"./ListItemText-DP70CZWH.js";import{u as ca,a as la,D as ua,H as da}from"./index-D0mhOhN_.js";import{S as bt}from"./switch-control-Cgy1OzVj.js";import{K as fa}from"./keyboard-arrow-down-rounded-DadBVmpO.js";import{S as ga}from"./Slider-DNluieNL.js";import{D as pa}from"./index-BE-PybUy.js";import{I as ma}from"./index-BFKp2CQd.js";import"./index-fXjNAh_E.js";import{i as fs}from"./index-C_h-cjkD.js";import{G as Tt}from"./redux-1_xbRAgi.js";import"./ArrowDropDown-DBLaWGdE.js";import"./ButtonGroup-C_zY2Afa.js";import"./Avatar-Dwnhztcq.js";import"./useSlot-6o2H45BB.js";import"./useLocalStorage-BRLJIfQX.js";import"./MoreVert-BU85cNL-.js";import"./Delete-BbOhDiuP.js";import"./PlayArrow-CFdZsZNc.js";import"./RadioGroup-DcXqVDaX.js";import"./FormGroup-QRzg5zQM.js";import"./useFormControl-CCJce851.js";import"./index-DFK8wuUf.js";import"./spaces-BDj5SJmw.js";import"./api-BuNUOrmN.js";import"./Link-DVxMZoCJ.js";import"./fallback-CCEDDyDi.js";import"./index-BsIlTmDV.js";import"./Toolbar-77uyJM9h.js";import"./Hidden-BJkMpsd0.js";import"./MoreHoriz-mamFyKRZ.js";import"./index-zXWDbMUc.js";import"./selector-CrDfmkY0.js";import"./index-CXfltY7R.js";import"./Select-BmEz5CKJ.js";import"./InputLabel-vZ-qCGp_.js";import"./useAsync-DURAXNAc.js";import"./FilterList-D4DSpHyR.js";import"./toPropertyKey-hKuLU48H.js";import"./LastPage-BHrerTUj.js";import"./Search-DBZkGJEC.js";var an={},ha=qe;Object.defineProperty(an,"__esModule",{value:!0});var gs=an.default=void 0,ba=ha(We()),Ea=t;gs=an.default=(0,ba.default)((0,Ea.jsx)("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"}),"TuneRounded");var on={},_a=qe;Object.defineProperty(on,"__esModule",{value:!0});var ps=on.default=void 0,xa=_a(We()),ya=t;ps=on.default=(0,xa.default)((0,ya.jsx)("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"}),"Key");var cn={},Sa=qe;Object.defineProperty(cn,"__esModule",{value:!0});var ms=cn.default=void 0,va=Sa(We()),Na=t;ms=cn.default=(0,va.default)((0,Na.jsx)("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8z"}),"Login");var ln={},Aa=qe;Object.defineProperty(ln,"__esModule",{value:!0});var hs=ln.default=void 0,Ta=Aa(We()),Ca=t;hs=ln.default=(0,Ta.default)((0,Ca.jsx)("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"}),"NotificationsNone");function un({label:e,disabled:n,required:s,initialValue:a,onChange:u,style:c,onSubmit:i,triggers:r,options:o,formatterBeforeSubmit:l,helperText:d,placeholder:y,renderImage:b,renderLabel:m,filterKeys:v,noEmpty:A,...C}){const[I,f]=$.useState(!1),[g,S]=$.useState(!1),[p,x]=fr.useState(""),[R,D]=$.useState(a),[O,_]=$.useState(R),w=$.useMemo(()=>{if(!o)return{};const F={};return o.forEach(E=>{F[E.code]=E}),F},[o]),T=()=>{if(!o)return[];if(!p)return o.map(E=>E.code);const F=new RegExp(p.toLowerCase());return o.filter(E=>{var N;for(let k=0;k<v.length;k++){const z=v[k];if(F.test((N=E[z])==null?void 0:N.toLowerCase()))return!0}return!1}).map(E=>E.code)},M=async()=>{S(!0);try{await i(typeof l=="function"?l(O):O)===!1?_(R):A&&!O.length?(_(a),D(a)):(_(O),D(O))}catch{_(R)}finally{S(!1),f(!1)}},U=(F,E)=>{if(!Array.isArray(E)){_([]),u([]);return}const N=E.filter(k=>w[k]);if(!N.length){_([]),u([]);return}_(N),u(N)},q=I?t.jsx(Zr,{options:o,value:O,onChange:U,inputValue:p,onInputChange:(F,E)=>{x(E)},PopperComponent:Oa,fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:T,getOptionLabel:F=>{var E;return(E=w[F])==null?void 0:E.name},renderInput:F=>t.jsx(te,{...F,label:"",placeholder:y}),renderOption:(F,E)=>{var k;const N=O.indexOf(E)!==-1;return $.createElement(Ra,{component:"li",...F,key:E},b(w[E]||{}),t.jsx(h,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:N?"700":"normal"},children:m(E,w[E])||((k=w[E])==null?void 0:k.name)}),t.jsx(h,{component:jn,sx:{opacity:.5,width:18,height:18},style:{visibility:N?"visible":"hidden"}}))},...C}):t.jsx(h,{px:1,className:"form-item-input slot",style:{whiteSpace:"pre-wrap"},children:O.filter(F=>o.some(E=>E.code===F)).map(F=>t.jsx(ts,{label:o.find(E=>E.code===F).name,style:{marginRight:8},size:"small"},F))});return t.jsx(qr,{className:"form",style:c,children:t.jsxs(h,{className:"form-item",children:[t.jsxs(h,{className:"form-item-label",children:[e,s&&t.jsx(Yr,{})]}),t.jsxs(h,{className:"form-item-body",children:[t.jsx(h,{className:"form-item-input",children:q}),t.jsx(h,{className:"form-item-action",children:I?t.jsxs(t.Fragment,{children:[t.jsx(we,{"data-cy":"schema-form-item-confirm",onClick:M,disabled:n||g,size:"large",children:g?t.jsx(ht,{size:24}):t.jsx(Wr,{})}),t.jsx(we,{"data-cy":"schema-form-item-cancel",onClick:()=>{_(R),f(!1)},disabled:n||g,size:"large",children:t.jsx(jn,{})})]}):t.jsx(Br,{triggers:r,onEnterEdit:()=>f(!0),disabled:n})})]}),I&&d&&t.jsx(Vr,{children:d})]})})}un.propTypes={style:K.object,onSubmit:K.func,onChange:K.func,label:K.string,initialValue:K.string,required:K.bool,disabled:K.bool,triggers:K.array,options:K.array,helperText:K.string,formatterBeforeSubmit:K.func,placeholder:K.string,renderImage:K.func,filterKeys:K.arrayOf(K.string),noEmpty:K.bool,renderLabel:K.func};un.defaultProps={style:{},onSubmit:()=>{},onChange:()=>{},label:"",initialValue:"",required:!1,disabled:!1,triggers:[],options:[],helperText:"",formatterBeforeSubmit:e=>e.join(","),placeholder:"",filterKeys:["name"],renderImage:()=>null,renderLabel:(e,n)=>"",noEmpty:!1};const Ra=Ee.div`
1
+ import{X as We,Y as qe,j as t,P as K,Z as Ee,bm as dr,r as $,eA as fr,B as h,dd as jn,be as ts,az as we,l as ht,u as me,aM as fe,a1 as ae,q as Z,aV as ge,E as ve,g1 as gr,a7 as Le,I as ns,bO as pr,T as Ut,g2 as mr,ab as hr,ap as Qe,a9 as se,bl as br,a0 as _e,cq as Ue,aU as Kt,aP as Ze,g3 as Er,g4 as _r,b4 as et,h as j,N as je,bA as he,f4 as xr,bU as Te,w as yr,c as ft,f as He,aQ as ss,bj as tt,g5 as Sr,g6 as vr,a as Mn,fi as Nr,b as Ae,M as at,bB as Ke,bS as Ar,bT as Tr,bR as Cr,aY as Rr,aZ as Or,g7 as wr,fp as Ir,b3 as Lr,g8 as zt,ds as jr,cj as rs,bt as Mr,bs as Oe,cr as Dr,g9 as as,z as kr}from"./index-BfhVorqV.js";import{I as Pr}from"./iframe-s25HWReH.js";import{I as Br,F as Ht,d as Fr,L as $r,a as Ur}from"./Edit-DOJCHJ5p.js";import{B as is,d as os}from"./ChevronRight-BKcNccG9.js";import{d as cs}from"./ExpandMore-DD2GykPj.js";import{T as tn}from"./index-DJLK29SJ.js";import{u as nn,b as Kr,c as zr,e as Hr}from"./dashboard-BOQEjKT8.js";import{d as Gr}from"./Loop-CbV2fFUd.js";import{d as Wr}from"./Done-DO1tfb2_.js";import{F as qr,R as Yr,L as At}from"./logo-uploader-Cb8u4LYv.js";import{a as Dn,A as Zr,u as Me,C as X}from"./index.esm-Cpbu1bqz.js";import{T as te,F as Vr}from"./TextField-D3XEyFR4.js";import{e as Jr}from"./mode-B2dWMeTO.js";import{w as ls,P as Xr}from"./permission-BEPRmEw3.js";import{C as us}from"./confirm-CD6_CMUq.js";import{f as sn,D as Qr}from"./format-error-B3RYdl6q.js";import{_ as ea}from"./useSetState-Be-I2Gl-.js";import{u as ta}from"./session-Cf-ZqG4P.js";import{C as na}from"./click-to-copy-CNizZfqS.js";import{F as Ce,C as ds,S as sa}from"./FormControlLabel-B6ISinfm.js";import{A as ra}from"./Alert-D91U5h--.js";import{a as ze}from"./index-nyOsFIwy.js";import{E as rn}from"./index-D12KUiCG.js";import{F as ie}from"./FormControl-Kt4xANtI.js";import{d as aa}from"./Launch-CDcio2Tm.js";import{d as ia}from"./EditIcon-Bg4AkV00.js";import{A as Gt}from"./config-Cl9yfIWh.js";import{a as oa}from"./ListItemText-Bnnk7Gbj.js";import{u as ca,a as la,D as ua,H as da}from"./index-BPSr4f2j.js";import{S as bt}from"./switch-control-BOre_YDJ.js";import{K as fa}from"./keyboard-arrow-down-rounded-DadBVmpO.js";import{S as ga}from"./Slider-GjDHfyBj.js";import{D as pa}from"./index-5qacoeSv.js";import{I as ma}from"./index-u_IDQFrq.js";import"./index-Db5U7Aba.js";import{i as fs}from"./index-UmXxvIz7.js";import{G as Tt}from"./redux-tOVF_oDT.js";import"./ArrowDropDown-Cq32DOpt.js";import"./ButtonGroup-k3SZjeUa.js";import"./Avatar-XXXVLUFk.js";import"./useSlot-LBVvloQJ.js";import"./useLocalStorage-B-I-NsSz.js";import"./MoreVert-er-bltGF.js";import"./Delete-DlfFien6.js";import"./PlayArrow-2r36AAmk.js";import"./RadioGroup-C7j1KJ7y.js";import"./FormGroup-BEMyIGSj.js";import"./useFormControl-DUzGwbSY.js";import"./index-Xh4BYwzS.js";import"./spaces-Dm4toCmL.js";import"./api-C37A8mCN.js";import"./Link-DFzOJFD-.js";import"./fallback-rg9fefdL.js";import"./index-Ce3CP3Jp.js";import"./Toolbar-_9it32pJ.js";import"./Hidden-kl5Tbw1B.js";import"./index-Dn7MhkOZ.js";import"./selector-CNsCKDRb.js";import"./index-DU7-35nh.js";import"./Select-BeNQ99oP.js";import"./InputLabel-DbdmcDbJ.js";import"./useAsync-6Zzjy7PW.js";import"./FilterList-QafrkXbd.js";import"./toPropertyKey-hKuLU48H.js";import"./LastPage-DXISIPs8.js";import"./Search-CMyGk9R2.js";var an={},ha=qe;Object.defineProperty(an,"__esModule",{value:!0});var gs=an.default=void 0,ba=ha(We()),Ea=t;gs=an.default=(0,ba.default)((0,Ea.jsx)("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"}),"TuneRounded");var on={},_a=qe;Object.defineProperty(on,"__esModule",{value:!0});var ps=on.default=void 0,xa=_a(We()),ya=t;ps=on.default=(0,xa.default)((0,ya.jsx)("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"}),"Key");var cn={},Sa=qe;Object.defineProperty(cn,"__esModule",{value:!0});var ms=cn.default=void 0,va=Sa(We()),Na=t;ms=cn.default=(0,va.default)((0,Na.jsx)("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8z"}),"Login");var ln={},Aa=qe;Object.defineProperty(ln,"__esModule",{value:!0});var hs=ln.default=void 0,Ta=Aa(We()),Ca=t;hs=ln.default=(0,Ta.default)((0,Ca.jsx)("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"}),"NotificationsNone");function un({label:e,disabled:n,required:s,initialValue:a,onChange:u,style:c,onSubmit:i,triggers:r,options:o,formatterBeforeSubmit:l,helperText:d,placeholder:y,renderImage:b,renderLabel:m,filterKeys:v,noEmpty:A,...C}){const[I,f]=$.useState(!1),[g,S]=$.useState(!1),[p,x]=fr.useState(""),[R,D]=$.useState(a),[O,_]=$.useState(R),w=$.useMemo(()=>{if(!o)return{};const F={};return o.forEach(E=>{F[E.code]=E}),F},[o]),T=()=>{if(!o)return[];if(!p)return o.map(E=>E.code);const F=new RegExp(p.toLowerCase());return o.filter(E=>{var N;for(let k=0;k<v.length;k++){const z=v[k];if(F.test((N=E[z])==null?void 0:N.toLowerCase()))return!0}return!1}).map(E=>E.code)},M=async()=>{S(!0);try{await i(typeof l=="function"?l(O):O)===!1?_(R):A&&!O.length?(_(a),D(a)):(_(O),D(O))}catch{_(R)}finally{S(!1),f(!1)}},U=(F,E)=>{if(!Array.isArray(E)){_([]),u([]);return}const N=E.filter(k=>w[k]);if(!N.length){_([]),u([]);return}_(N),u(N)},q=I?t.jsx(Zr,{options:o,value:O,onChange:U,inputValue:p,onInputChange:(F,E)=>{x(E)},PopperComponent:Oa,fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:T,getOptionLabel:F=>{var E;return(E=w[F])==null?void 0:E.name},renderInput:F=>t.jsx(te,{...F,label:"",placeholder:y}),renderOption:(F,E)=>{var k;const N=O.indexOf(E)!==-1;return $.createElement(Ra,{component:"li",...F,key:E},b(w[E]||{}),t.jsx(h,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:N?"700":"normal"},children:m(E,w[E])||((k=w[E])==null?void 0:k.name)}),t.jsx(h,{component:jn,sx:{opacity:.5,width:18,height:18},style:{visibility:N?"visible":"hidden"}}))},...C}):t.jsx(h,{px:1,className:"form-item-input slot",style:{whiteSpace:"pre-wrap"},children:O.filter(F=>o.some(E=>E.code===F)).map(F=>t.jsx(ts,{label:o.find(E=>E.code===F).name,style:{marginRight:8},size:"small"},F))});return t.jsx(qr,{className:"form",style:c,children:t.jsxs(h,{className:"form-item",children:[t.jsxs(h,{className:"form-item-label",children:[e,s&&t.jsx(Yr,{})]}),t.jsxs(h,{className:"form-item-body",children:[t.jsx(h,{className:"form-item-input",children:q}),t.jsx(h,{className:"form-item-action",children:I?t.jsxs(t.Fragment,{children:[t.jsx(we,{"data-cy":"schema-form-item-confirm",onClick:M,disabled:n||g,size:"large",children:g?t.jsx(ht,{size:24}):t.jsx(Wr,{})}),t.jsx(we,{"data-cy":"schema-form-item-cancel",onClick:()=>{_(R),f(!1)},disabled:n||g,size:"large",children:t.jsx(jn,{})})]}):t.jsx(Br,{triggers:r,onEnterEdit:()=>f(!0),disabled:n})})]}),I&&d&&t.jsx(Vr,{children:d})]})})}un.propTypes={style:K.object,onSubmit:K.func,onChange:K.func,label:K.string,initialValue:K.string,required:K.bool,disabled:K.bool,triggers:K.array,options:K.array,helperText:K.string,formatterBeforeSubmit:K.func,placeholder:K.string,renderImage:K.func,filterKeys:K.arrayOf(K.string),noEmpty:K.bool,renderLabel:K.func};un.defaultProps={style:{},onSubmit:()=>{},onChange:()=>{},label:"",initialValue:"",required:!1,disabled:!1,triggers:[],options:[],helperText:"",formatterBeforeSubmit:e=>e.join(","),placeholder:"",filterKeys:["name"],renderImage:()=>null,renderLabel:(e,n)=>"",noEmpty:!1};const Ra=Ee.div`
2
2
  display: flex;
3
3
  justify-content: space-between;
4
4
  align-items: center;
@@ -1,4 +1,4 @@
1
- var bt=Object.defineProperty;var yt=(e,t,n)=>t in e?bt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var D=(e,t,n)=>(yt(e,typeof t!="symbol"?t+"":t,n),n);import{aD as xt,cE as wt,cW as vt,aG as G,ch as V,r as A,aK as It,aF as Ct,aL as ve,cz as St,ce as Tt,j as m,aI as Ie,aJ as At,P as f,N as jt,h as kt,az as Pt,bB as Ce,bm as Lt,bn as Mt,de as Ot,ae as Rt,M as j,bk as Et,B as _t,bI as Nt,T as qt,df as Ft,dg as $t,a1 as Bt,dh as zt,bO as De,u as Ve,aA as Ht,_ as Dt,y as Vt}from"./index-DewOPxO6.js";import{D as Ut}from"./index-BsIlTmDV.js";import{l as R,g as Qt,L as Wt}from"./MoreVert-BU85cNL-.js";import{L as Gt}from"./selector-CrDfmkY0.js";const Zt=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Jt=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Xt=e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:s,divider:i,selected:a}=e,l=At({root:["root",r&&"dense",!s&&"gutters",i&&"divider",o&&"disabled",t==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},Qt,n);return G({},n,l)},Yt=xt(wt,{shouldForwardProp:e=>vt(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:Jt})(({theme:e,ownerState:t})=>G({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${R.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:V(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${R.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:V(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${R.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:V(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:V(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${R.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${R.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.alignItems==="flex-start"&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4})),Kt=A.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItemButton"}),{alignItems:o="center",autoFocus:s=!1,component:i="div",children:a,dense:c=!1,disableGutters:l=!1,divider:u=!1,focusVisibleClassName:d,selected:p=!1,className:g}=r,b=Ct(r,Zt),x=A.useContext(ve),I=A.useMemo(()=>({dense:c||x.dense||!1,alignItems:o,disableGutters:l}),[o,x.dense,c,l]),T=A.useRef(null);St(()=>{s&&T.current&&T.current.focus()},[s]);const w=G({},r,{alignItems:o,dense:I.dense,disableGutters:l,divider:u,selected:p}),y=Xt(w),O=Tt(T,n);return m.jsx(ve.Provider,{value:I,children:m.jsx(Yt,G({ref:O,href:b.href||b.to,component:(b.href||b.to)&&i==="div"?"button":i,focusVisibleClassName:Ie(y.focusVisible,d),ownerState:w,className:Ie(y.root,g)},b,{classes:y,children:a}))})}),en=Kt;/**
1
+ var bt=Object.defineProperty;var yt=(e,t,n)=>t in e?bt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var D=(e,t,n)=>(yt(e,typeof t!="symbol"?t+"":t,n),n);import{aD as xt,cE as wt,cW as vt,aG as G,ch as V,r as A,aK as It,aF as Ct,aL as ve,cz as St,ce as Tt,j as m,aI as Ie,aJ as At,P as f,N as jt,h as kt,az as Pt,bB as Ce,bm as Lt,bn as Mt,dg as Ot,ae as Rt,M as j,bk as Et,B as _t,bI as Nt,T as qt,dh as Ft,di as $t,a1 as Bt,dj as zt,bO as De,u as Ve,aA as Ht,_ as Dt,y as Vt}from"./index-BfhVorqV.js";import{D as Ut}from"./index-Ce3CP3Jp.js";import{l as R,g as Qt,L as Wt}from"./MoreVert-er-bltGF.js";import{L as Gt}from"./selector-CNsCKDRb.js";const Zt=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Jt=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Xt=e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:s,divider:i,selected:a}=e,l=At({root:["root",r&&"dense",!s&&"gutters",i&&"divider",o&&"disabled",t==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},Qt,n);return G({},n,l)},Yt=xt(wt,{shouldForwardProp:e=>vt(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:Jt})(({theme:e,ownerState:t})=>G({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${R.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:V(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${R.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:V(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${R.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:V(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:V(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${R.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${R.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.alignItems==="flex-start"&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4})),Kt=A.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItemButton"}),{alignItems:o="center",autoFocus:s=!1,component:i="div",children:a,dense:c=!1,disableGutters:l=!1,divider:u=!1,focusVisibleClassName:d,selected:p=!1,className:g}=r,b=Ct(r,Zt),x=A.useContext(ve),I=A.useMemo(()=>({dense:c||x.dense||!1,alignItems:o,disableGutters:l}),[o,x.dense,c,l]),T=A.useRef(null);St(()=>{s&&T.current&&T.current.focus()},[s]);const w=G({},r,{alignItems:o,dense:I.dense,disableGutters:l,divider:u,selected:p}),y=Xt(w),O=Tt(T,n);return m.jsx(ve.Provider,{value:I,children:m.jsx(Yt,G({ref:O,href:b.href||b.to,component:(b.href||b.to)&&i==="div"?"button":i,focusVisibleClassName:Ie(y.focusVisible,d),ownerState:w,className:Ie(y.root,g)},b,{classes:y,children:a}))})}),en=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 bt=Object.defineProperty;var yt=(e,t,n)=>t in e?bt(e,t,{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}),Z=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),B=Object.freeze({...Ue,...Z}),re=Object.freeze({...B,body:"",hidden:!1}),tn=Object.freeze({width:null,height:null}),Qe=Object.freeze({...tn,...Z});function nn(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return t}const on=/[\s,]+/;function rn(e,t){t.split(on).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const We={...Qe,preserveAspectRatio:""};function Se(e){const t={...We},n=(r,o)=>e.getAttribute(r)||o;return t.width=n("width",null),t.height=n("height",null),t.rotate=nn(n("rotate","")),rn(t,n("flip","")),t.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),t}function sn(e,t){for(const n in We)if(e[n]!==t[n])return!0;return!1}const _=/^[a-z0-9]+(-[a-z0-9]+)*$/,z=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),c=o.pop(),l={provider:o.length>0?o[0]:r,prefix:c,name:a};return t&&!Q(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 t&&!Q(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:s};return t&&!Q(a,n)?null:a}return null},Q=(e,t)=>e?!!((e.provider===""||e.provider.match(_))&&(t&&e.prefix===""||e.prefix.match(_))&&e.name.match(_)):!1;function cn(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Te(e,t){const n=cn(e,t);for(const r in re)r in Z?r in e&&!(r in n)&&(n[r]=Z[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function an(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function s(i){if(n[i])return o[i]=[];if(!(i in o)){o[i]=null;const a=r[i]&&r[i].parent,c=a&&s(a);c&&(o[i]=[a].concat(c))}return o[i]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(s),o}function ln(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let s={};function i(a){s=Te(r[a]||o[a],s)}return i(t),n.forEach(i),Te(e,s)}function Ge(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=an(e);for(const o in r){const s=r[o];s&&(t(o,ln(e,o,s)),n.push(o))}return n}const un={provider:"",aliases:{},not_found:{},...Ue};function ee(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Ze(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!ee(e,un))return null;const n=t.icons;for(const o in n){const s=n[o];if(!o.match(_)||typeof s.body!="string"||!ee(s,re))return null}const r=t.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(_)||typeof i!="string"||!n[i]&&!r[i]||!ee(s,re))return null}return t}const J=Object.create(null);function fn(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function P(e,t){const n=J[e]||(J[e]=Object.create(null));return n[t]||(n[t]=fn(e,t))}function pe(e,t){return Ze(t)?Ge(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function dn(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function pn(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(J)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(J[o]||{})).forEach(i=>{const a=P(o,i);n=n.concat(Object.keys(a.icons).map(c=>(o!==""?"@"+o+":":"")+i+":"+c))})}),n}let q=!1;function Je(e){return typeof e=="boolean"&&(q=e),q}function F(e){const t=typeof e=="string"?z(e,!0,q):e;if(t){const n=P(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Xe(e,t){const n=z(e,!0,q);if(!n)return!1;const r=P(n.provider,n.prefix);return dn(r,n.name,t)}function Ae(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),q&&!t&&!e.prefix){let o=!1;return Ze(e)&&(e.prefix="",Ge(e,(s,i)=>{i&&Xe(s,i)&&(o=!0)})),o}const n=e.prefix;if(!Q({provider:t,prefix:n,name:"a"}))return!1;const r=P(t,n);return!!pe(r,e)}function hn(e){return!!F(e)}function gn(e){const t=F(e);return t?{...B,...t}:null}function mn(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,i=o.prefix,a=o.name,c=n[s]||(n[s]=Object.create(null)),l=c[i]||(c[i]=P(s,i));let u;a in l.icons?u=t.loaded:i===""||l.missing.has(a)?u=t.missing:u=t.pending;const d={provider:s,prefix:i,name:a};u.push(d)}),t}function Ye(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function bn(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,o=e.prefix;t.forEach(s=>{const i=s.icons,a=i.pending.length;i.pending=i.pending.filter(c=>{if(c.prefix!==o)return!0;const l=c.name;if(e.icons[l])i.loaded.push({provider:r,prefix:o,name:l});else if(e.missing.has(l))i.missing.push({provider:r,prefix:o,name:l});else return n=!0,!0;return!1}),i.pending.length!==a&&(n||Ye([e],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let yn=0;function xn(e,t,n){const r=yn++,o=Ye.bind(null,n,r);if(!t.pending.length)return o;const s={id:r,icons:t,callback:e,abort:o};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}const se=Object.create(null);function je(e,t){se[e]=t}function ie(e){return se[e]||se[""]}function wn(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const s=typeof o=="string"?z(o,t,n):o;s&&r.push(s)}),r}var vn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function In(e,t,n,r){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let i;if(e.random){let h=e.resources.slice(0);for(i=[];h.length>1;){const v=Math.floor(Math.random()*h.length);i.push(h[v]),h=h.slice(0,v).concat(h.slice(v+1))}i=i.concat(h)}else i=e.resources.slice(s).concat(e.resources.slice(0,s));const a=Date.now();let c="pending",l=0,u,d=null,p=[],g=[];typeof r=="function"&&g.push(r);function b(){d&&(clearTimeout(d),d=null)}function x(){c==="pending"&&(c="aborted"),b(),p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function I(h,v){v&&(g=[]),typeof h=="function"&&g.push(h)}function T(){return{startTime:a,payload:t,status:c,queriesSent:l,queriesPending:p.length,subscribe:I,abort:x}}function w(){c="failed",g.forEach(h=>{h(void 0,u)})}function y(){p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function O(h,v,k){const S=v!=="success";switch(p=p.filter(L=>L!==h),c){case"pending":break;case"failed":if(S||!e.dataAfterTimeout)return;break;default:return}if(v==="abort"){u=k,w();return}if(S){u=k,p.length||(i.length?C():w());return}if(b(),y(),!e.random){const L=e.resources.indexOf(h.resource);L!==-1&&L!==e.index&&(e.index=L)}c="completed",g.forEach(L=>{L(k)})}function C(){if(c!=="pending")return;b();const h=i.shift();if(h===void 0){if(p.length){d=setTimeout(()=>{b(),c==="pending"&&(y(),w())},e.timeout);return}w();return}const v={status:"pending",resource:h,callback:(k,S)=>{O(v,k,S)}};p.push(v),l++,d=setTimeout(C,e.rotate),n(h,t,v.callback)}return setTimeout(C),T}function Ke(e){const t={...vn,...e};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function o(a,c,l){const u=In(t,a,c,(d,p)=>{r(),l&&l(d,p)});return n.push(u),u}function s(a){return n.find(c=>a(c))||null}return{query:o,find:s,setIndex:a=>{t.index=a},getIndex:()=>t.index,cleanup:r}}function he(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Y=Object.create(null),E=["https://api.simplesvg.com","https://api.unisvg.com"],W=[];for(;E.length>0;)E.length===1||Math.random()>.5?W.push(E.shift()):W.push(E.pop());Y[""]=he({resources:["https://api.iconify.design"].concat(W)});function ke(e,t){const n=he(t);return n===null?!1:(Y[e]=n,!0)}function K(e){return Y[e]}function Cn(){return Object.keys(Y)}function Pe(){}const te=Object.create(null);function Sn(e){if(!te[e]){const t=K(e);if(!t)return;const n=Ke(t),r={config:t,redundancy:n};te[e]=r}return te[e]}function et(e,t,n){let r,o;if(typeof e=="string"){const s=ie(e);if(!s)return n(void 0,424),Pe;o=s.send;const i=Sn(e);i&&(r=i.redundancy)}else{const s=he(e);if(s){r=Ke(s);const i=e.resources?e.resources[0]:"",a=ie(i);a&&(o=a.send)}}return!r||!o?(n(void 0,424),Pe):r.query(t,o,n)().abort}const Le="iconify2",$="iconify",tt=$+"-count",Me=$+"-version",nt=36e5,Tn=168;function ce(e,t){try{return e.getItem(t)}catch{}}function ge(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Oe(e,t){try{e.removeItem(t)}catch{}}function ae(e,t){return ge(e,tt,t.toString())}function le(e){return parseInt(ce(e,tt))||0}const M={local:!0,session:!0},ot={local:new Set,session:new Set};let me=!1;function An(e){me=e}let U=typeof window>"u"?{}:window;function rt(e){const t=e+"Storage";try{if(U&&U[t]&&typeof U[t].length=="number")return U[t]}catch{}M[e]=!1}function st(e,t){const n=rt(e);if(!n)return;const r=ce(n,Me);if(r!==Le){if(r){const a=le(n);for(let c=0;c<a;c++)Oe(n,$+c.toString())}ge(n,Me,Le),ae(n,0);return}const o=Math.floor(Date.now()/nt)-Tn,s=a=>{const c=$+a.toString(),l=ce(n,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"&&t(u,a))return!0}catch{}Oe(n,c)}};let i=le(n);for(let a=i-1;a>=0;a--)s(a)||(a===i-1?(i--,ae(n,i)):ot[e].add(a))}function it(){if(!me){An(!0);for(const e in M)st(e,t=>{const n=t.data,r=t.provider,o=n.prefix,s=P(r,o);if(!pe(s,n).length)return!1;const i=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function jn(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in M)st(r,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function kn(e,t){me||it();function n(r){let o;if(!M[r]||!(o=rt(r)))return;const s=ot[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=le(o),!ae(o,i+1))return;const a={cached:Math.floor(Date.now()/nt),provider:e.provider,data:t};return ge(o,$+i.toString(),JSON.stringify(a))}t.lastModified&&!jn(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Re(){}function Pn(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,bn(e)}))}function Ln(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let s;if(!o||!(s=ie(n)))return;s.prepare(n,r,o).forEach(a=>{et(n,a,c=>{if(typeof c!="object")a.icons.forEach(l=>{e.missing.add(l)});else try{const l=pe(e,c);if(!l.length)return;const u=e.pendingIcons;u&&l.forEach(d=>{u.delete(d)}),kn(e,c)}catch(l){console.error(l)}Pn(e)})})}))}const be=(e,t)=>{const n=wn(e,!0,Je()),r=mn(n);if(!r.pending.length){let c=!0;return t&&setTimeout(()=>{c&&t(r.loaded,r.missing,r.pending,Re)}),()=>{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(P(l,u));const d=o[l]||(o[l]=Object.create(null));d[u]||(d[u]=[])}),r.pending.forEach(c=>{const{provider:l,prefix:u,name:d}=c,p=P(l,u),g=p.pendingIcons||(p.pendingIcons=new Set);g.has(d)||(g.add(d),o[l][u].push(d))}),s.forEach(c=>{const{provider:l,prefix:u}=c;o[l][u].length&&Ln(c,o[l][u])}),t?xn(t,r,s):Re},Mn=e=>new Promise((t,n)=>{const r=typeof e=="string"?z(e,!0):e;if(!r){n(e);return}be([r||e],o=>{if(o.length&&r){const s=F(r);if(s){t({...B,...s});return}}n(e)})});function On(e){try{const t=typeof e=="string"?JSON.parse(e):e;if(typeof t.body=="string")return{...t}}catch{}}function Rn(e,t){const n=typeof e=="string"?z(e,!0,!0):null;if(!n){const s=On(e);return{value:e,data:s}}const r=F(n);if(r!==void 0||!n.prefix)return{value:e,name:n,data:r};const o=be([n],()=>t(e,n,F(n)));return{value:e,name:n,loading:o}}function ne(e){return e.hasAttribute("inline")}let ct=!1;try{ct=navigator.vendor.indexOf("Apple")===0}catch{}function En(e,t){switch(t){case"svg":case"bg":case"mask":return t}return t!=="style"&&(ct||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const _n=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Nn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ue(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(_n);if(r===null||!r.length)return e;const o=[];let s=r.shift(),i=Nn.test(s);for(;;){if(i){const a=parseFloat(s);isNaN(a)?o.push(s):o.push(Math.ceil(a*t*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const qn=e=>e==="unset"||e==="undefined"||e==="none";function at(e,t){const n={...B,...e},r={...Qe,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(b=>{const x=[],I=b.hFlip,T=b.vFlip;let w=b.rotate;I?T?w+=2:(x.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),x.push("scale(-1 1)"),o.top=o.left=0):T&&(x.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),x.push("scale(1 -1)"),o.top=o.left=0);let y;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:y=o.height/2+o.top,x.unshift("rotate(90 "+y.toString()+" "+y.toString()+")");break;case 2:x.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:y=o.width/2+o.left,x.unshift("rotate(-90 "+y.toString()+" "+y.toString()+")");break}w%2===1&&(o.left!==o.top&&(y=o.left,o.left=o.top,o.top=y),o.width!==o.height&&(y=o.width,o.width=o.height,o.height=y)),x.length&&(s='<g transform="'+x.join(" ")+'">'+s+"</g>")});const i=r.width,a=r.height,c=o.width,l=o.height;let u,d;i===null?(d=a===null?"1em":a==="auto"?l:a,u=ue(d,c/l)):(u=i==="auto"?c:i,d=a===null?ue(u,l/c):a==="auto"?l:a);const p={},g=(b,x)=>{qn(x)||(p[b]=x.toString())};return g("width",u),g("height",d),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+c.toString()+" "+l.toString(),{attributes:p,body:s}}const Fn=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let X=Fn();function $n(e){X=e}function Bn(){return X}function zn(e,t){const n=K(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(i=>{o=Math.max(o,i.length)});const s=t+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function Hn(e){return e===404}const Dn=(e,t,n)=>{const r=[],o=zn(e,t),s="icons";let i={type:s,provider:e,prefix:t,icons:[]},a=0;return n.forEach((c,l)=>{a+=c.length+1,a>=o&&l>0&&(r.push(i),i={type:s,provider:e,prefix:t,icons:[]},a=c.length),i.icons.push(c)}),r.push(i),r};function Vn(e){if(typeof e=="string"){const t=K(e);if(t)return t.path}return"/"}const Un=(e,t,n)=>{if(!X){n("abort",424);return}let r=Vn(t.provider);switch(t.type){case"icons":{const s=t.prefix,a=t.icons.join(","),c=new URLSearchParams({icons:a});r+=s+".json?"+c.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;X(e+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(Hn(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},Qn={prepare:Dn,send:Un};function Ee(e,t){switch(e){case"local":case"session":M[e]=t;break;case"all":for(const n in M)M[n]=t;break}}const oe="data-style";let lt="";function Wn(e){lt=e}function _e(e,t){let n=Array.from(e.childNodes).find(r=>r.hasAttribute&&r.hasAttribute(oe));n||(n=document.createElement("style"),n.setAttribute(oe,oe),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(t?"-0.125em":"0")+"}span,svg{display:block}"+lt}function ut(){je("",Qn),Je(!0);let e;try{e=window}catch{}if(e){if(it(),e.IconifyPreload!==void 0){const n=e.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!Ae(o))&&console.error(r)}catch{console.error(r)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(const r in n){const o="IconifyProviders["+r+"] is invalid.";try{const s=n[r];if(typeof s!="object"||!s||s.resources===void 0)continue;ke(r,s)||console.error(o)}catch{console.error(o)}}}}return{enableCache:n=>Ee(n,!0),disableCache:n=>Ee(n,!1),iconExists:hn,getIcon:gn,listIcons:pn,addIcon:Xe,addCollection:Ae,calculateSize:ue,buildIcon:at,loadIcons:be,loadIcon:Mn,addAPIProvider:ke,appendCustomStyle:Wn,_api:{getAPIConfig:K,setAPIModule:je,sendAPIQuery:et,setFetch:$n,getFetch:Bn,listAPIProviders:Cn}}}function ft(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Gn(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Zn(e){return"data:image/svg+xml,"+Gn(e)}function Jn(e){return'url("'+Zn(e)+'")'}const fe={"background-color":"currentColor"},dt={"background-color":"transparent"},Ne={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},qe={"-webkit-mask":fe,mask:fe,background:dt};for(const e in qe){const t=qe[e];for(const n in Ne)t[e+"-"+n]=Ne[n]}function Fe(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Xn(e,t,n){const r=document.createElement("span");let o=e.body;o.indexOf("<a")!==-1&&(o+="<!-- "+Date.now()+" -->");const s=e.attributes,i=ft(o,{...s,width:t.width+"",height:t.height+""}),a=Jn(i),c=r.style,l={"--svg":a,width:Fe(s.width),height:Fe(s.height),...n?fe:dt};for(const u in l)c.setProperty(u,l[u]);return r}let N;function Yn(){try{N=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{N=null}}function Kn(e){return N===void 0&&Yn(),N?N.createHTML(e):e}function eo(e){const t=document.createElement("span"),n=e.attributes;let r="";n.width||(r="width: inherit;"),n.height||(r+="height: inherit;"),r&&(n.style=r);const o=ft(e.body,n);return t.innerHTML=Kn(o),t.firstChild}function $e(e,t){const n=t.icon.data,r=t.customisations,o=at(n,r);r.preserveAspectRatio&&(o.attributes.preserveAspectRatio=r.preserveAspectRatio);const s=t.renderedMode;let i;switch(s){case"svg":i=eo(o);break;default:i=Xn(o,{...B,...n},s==="mask")}const a=Array.from(e.childNodes).find(c=>{const l=c.tagName&&c.tagName.toUpperCase();return l==="SPAN"||l==="SVG"});a?i.tagName==="SPAN"&&a.tagName===i.tagName?a.setAttribute("style",i.getAttribute("style")):e.replaceChild(i,a):e.appendChild(i)}function Be(e,t,n){const r=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:t,icon:e,lastRender:r}}function to(e="iconify-icon"){let t,n;try{t=window.customElements,n=window.HTMLElement}catch{return}if(!t||!n)return;const r=t.get(e);if(r)return r;const o=["icon","mode","inline","width","height","rotate","flip"],s=class extends n{constructor(){super();D(this,"_shadowRoot");D(this,"_state");D(this,"_checkQueued",!1);const c=this._shadowRoot=this.attachShadow({mode:"open"}),l=ne(this);_e(c,l),this._state=Be({value:""},l),this._queueCheck()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(c){if(c==="inline"){const l=ne(this),u=this._state;l!==u.inline&&(u.inline=l,_e(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 ne(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{}$e(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=Se(this);(c.attrMode!==u||sn(c.customisations,d))&&this._renderIcon(c.icon,d,u)}_iconChanged(c){const l=Rn(c,(u,d,p)=>{const g=this._state;if(g.rendered||this.getAttribute("icon")!==u)return;const b={value:u,name:d,data:p};b.data?this._gotIconData(b):g.icon=b});l.data?this._gotIconData(l):this._state=Be(l,this._state.inline,this._state)}_gotIconData(c){this._checkQueued=!1,this._renderIcon(c,Se(this),this.getAttribute("mode"))}_renderIcon(c,l,u){const d=En(c.data.body,u),p=this._state.inline;$e(this._shadowRoot,this._state={rendered:!0,icon:c,inline:p,customisations:l,attrMode:u,renderedMode:d})}};o.forEach(a=>{a in s.prototype||Object.defineProperty(s.prototype,a,{get:function(){return this.getAttribute(a)},set:function(c){c!==null?this.setAttribute(a,c):this.removeAttribute(a)}})});const i=ut();for(const a in i)s[a]=s.prototype[a]=i[a];return t.define(e,s),s}to()||ut();const no=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])}))}))}),pt=f.shape({showText:f.bool,showRole:f.bool,switchDid:f.bool,switchProfile:f.bool,switchPassport:f.bool,disableLogout:f.bool,onLogin:f.func,onLogout:f.func,onSwitchDid:f.func,onSwitchProfile:f.func,onSwitchPassport:f.func,menu:f.array,menuRender:f.func,dark:f.bool,size:f.number}),H=(e,t,n="children")=>e.map(r=>Array.isArray(r[n])?t({...r,[n]:H(r[n],t,n)}):t(r)),oo=(e,t="children")=>{const n=[];return H(e,r=>n.push(r),t),n},ye=(e,t,n="children")=>e.map(r=>({...r})).filter(r=>{const o=r[n];if(Array.isArray(o)){const i=ye(o,t,n);r[n]=i!=null&&i.length?i:void 0}const s={filteredChildren:r[n],isLeaf:!(o!=null&&o.length)};return t(r,s)}),ro=e=>/^https?:\/\//.test(e),vo=e=>/^[\w-]+:[\w-]+$/.test(e),so=e=>{if(!e||!(e!=null&&e.startsWith("/")))return!1;const t=o=>o.endsWith("/")?o:`${o}/`,n=t(window.location.pathname),r=t(new URL(e,window.location.origin).pathname);return n.startsWith(r)},io=(e=[])=>{const t=e.map((r,o)=>({path:r,index:o})).filter(r=>so(r.path));return t!=null&&t.length?t.slice(1).reduce((r,o)=>r.path.length>=o.path.length?r:o,t[0]).index:-1};var ze,He;const de=((ze=window==null?void 0:window.blocklet)==null?void 0:ze.groupPrefix)||((He=window==null?void 0:window.blocklet)==null?void 0:He.prefix)||"/",co=e=>{const t={...e},n=e==null?void 0:e.background;return typeof n=="string"?t.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(t.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),t},ht=(e,t="en")=>{if(!(e!=null&&e.length))return e;const n=(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(ro(o)){const a=new URL(o);return a.searchParams.set("locale",s),a.href}const i=new URL(o,window.location.origin);return i.searchParams.set("locale",s),i.pathname+i.search}return typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o};return H(e,o=>{var s;return{...o,title:n(o.title,t),link:(s=o.items)!=null&&s.length?o.link:r(o.link,t),_rawLink:o.link}},"items")},ao=e=>H(e,t=>t.role?{...t,role:Array.isArray(t.role)?t.role:[t.role]}:t,"items"),lo=e=>{if(!(e!=null&&e.length))return null;const t=ao(e),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return t.forEach(r=>{var o;r.section?Array.isArray(r.section)?r.section.forEach(s=>{var i;(i=n[s])==null||i.push(r)}):typeof r.section=="string"&&((o=n[r.section])==null||o.push(r)):n.header.push(r)}),n},uo=e=>{if(!e)return null;const t={...e};return t.theme=co(t.theme),t.navigation=lo(fo(t.navigation)),t},fo=(e=[])=>ye(e,(t,n)=>{var r;return!!t.link||((r=n.filteredChildren)==null?void 0:r.length)},"items"),gt=(e,t)=>ye(e,(n,r)=>{var s;const o=!n.role||t&&n.role.includes(t);return r.isLeaf?o:o&&((s=r.filteredChildren)==null?void 0:s.length)},"items"),po={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 xe({session:e,locale:t,size:n}){const r=(window==null?void 0:window.blocklet)||{},o=(r.navigation||[]).filter(c=>c.section==="sessionManager"&&!["/sessionManager"].includes(c.id)).filter(c=>{var l;return!!((c==null?void 0:c.role)||[]).includes(((l=e==null?void 0:e.user)==null?void 0:l.role)||"guest")}).map(c=>{const l=((r==null?void 0:r.componentMountPoints)||[]).find(u=>c.component===u.name);return{...c,component:l}}),s=A.useRef(null),i=jt({open:!1}),a=kt((c=!i.open)=>{i.open=c});return o.length===0||!(e!=null&&e.user)?null:m.jsxs(m.Fragment,{children:[m.jsx(Pt,{size:"medium",ref:s,onClick:()=>a(),children:m.jsx(Ce,{icon:po,fontSize:n,style:{transform:"scale(1.08)"}})}),m.jsx(Lt,{open:i.open,onClose:()=>a(!1),anchorEl:s.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:c})=>m.jsx(Mt,{onClickAway:l=>{l.preventDefault(),l.stopPropagation(),a(!1)},children:m.jsx(Ot,{...c,timeout:350,children:m.jsxs(Rt,{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:[m.jsx(Et,{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 m.jsx(Wt,{disablePadding:!0,children:m.jsxs(en,{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?m.jsx(_t,{component:"img",src:`${Nt}/blocklet/logo-bundle/${l.component.did}`,sx:{borderRadius:2,width:50,height:50,objectFit:"contain"}}):m.jsx(Ce,{fontSize:50,icon:l.icon||ho,color:j.textSubtitle}),m.jsx(qt,{sx:{fontSize:"12px",color:j.textBase,textAlign:"center",lineHeight:"normal"},children:Ft(l.title,t)})]})},l.id)})}),m.jsx($t,{session:e,children:m.jsx(Bt,{variant:"outlined",fullWidth:!0,href:zt,sx:{mt:1,borderRadius:2,color:j.textBase,borderColor:j.lineBorderStrong,"&:hover":{color:j.primaryBase,borderColor:j.primaryBase}},children:t==="zh"?"管理":"Manage"})})]})})})})]})}xe.propTypes={session:f.object.isRequired,locale:f.string,size:f.number};xe.defaultProps={locale:"en",size:24};function we({formattedBlocklet:e,addons:t,sessionManagerProps:n}){var p,g,b,x;const r=A.useContext(De),{locale:o}=Ve()||{},{enableConnect:s=!0,enableLocale:i=!0}=e,a=!!((p=r==null?void 0:r.session)!=null&&p.user);let c=ht((g=e==null?void 0:e.navigation)==null?void 0:g.sessionManager,o)||[];c=gt(c,(x=(b=r==null?void 0:r.session)==null?void 0:b.user)==null?void 0:x.role);const u=(()=>{if(t&&typeof t!="function")return Array.isArray(t)?t:[t];let I=[];if(i&&o&&I.push(m.jsx(Gt,{showText:!1},"locale-selector")),s&&r){const T=[];a&&(c?c.slice(0,5):[]).forEach(y=>{T.push({label:y.title,icon:y.icon?m.jsx("iconify-icon",{icon:y.icon,height:24,style:{marginRight:8}}):null,component:"a",href:y.link,key:y.link})}),I.push(m.jsx(xe,{session:r.session,locale:o},"session-blocklet")),I.push(m.jsx(Ht,{session:r.session,locale:o,menu:T,showRole:!0,...n},"session-user"))}return typeof t=="function"&&(I=t(I)||[]),I})();return A.createElement(m.Fragment,null,...Array.isArray(u)?u:[u])}we.propTypes={formattedBlocklet:f.object.isRequired,addons:f.oneOfType([f.func,f.node]),sessionManagerProps:pt};we.defaultProps={addons:null,sessionManagerProps:{showRole:!0}};const go=()=>{const e=Dt();A.useEffect(()=>{e.wallet&&Vt.call("arcHideTopBar","{}")},[e])};function mt({meta:e,fallbackUrl:t,invalidPathFallback:n,headerAddons:r,sessionManagerProps:o,links:s,...i}){var O;go();const a=A.useContext(De),c=(O=a==null?void 0:a.session)==null?void 0:O.user,l=c==null?void 0:c.role,{locale:u}=Ve()||{},d=A.useMemo(()=>{const C=Object.assign({},window.blocklet,e);try{return uo(C)}catch(h){return console.error("Failed to format blocklet info",h,C),C}},[e]),{localizedNav:p,flattened:g,matchedIndex:b}=A.useMemo(()=>{var k;let C=ht((k=d==null?void 0:d.navigation)==null?void 0:k.dashboard,u)||[];C=gt(C,l),C=H(C,S=>({title:S.title,url:S.link,icon:S.icon?m.jsx("iconify-icon",{height:"100%",width:"100%",icon:S.icon}):null,external:!0,children:S.items}),"items");const h=oo(C).filter(S=>!!S.url),v=io(h.map(S=>S.url));return v!==-1&&(h[v].active=!0),{localizedNav:C,flattened:h,matchedIndex:v}},[d,u,l]),x=typeof s=="function"?s(p):[...p,...s];if(A.useLayoutEffect(()=>{c&&!(g!=null&&g.length)&&t&&(window.location.href=t)},[t]),A.useLayoutEffect(()=>{c&&(g!=null&&g.length)&&b===-1&&n&&n()},[n,g,b]),!d.appName)return null;const{appLogo:I,appLogoRect:T,appName:w}=d,y=m.jsx(we,{formattedBlocklet:d,addons:r,sessionManagerProps:o});return m.jsx(Ut,{title:w,fullWidth:!0,sidebarWidth:128,legacy:!1,links:x,...i,headerProps:{homeLink:de,logo:m.jsx("img",{src:T||I,alt:"logo"}),addons:y,...i.headerProps}})}mt.propTypes={meta:no,fallbackUrl:f.string,invalidPathFallback:f.func,headerAddons:f.oneOfType([f.func,f.node]),sessionManagerProps:pt,links:f.oneOfType([f.array,f.func])};mt.defaultProps={meta:{},fallbackUrl:de,invalidPathFallback:null,headerAddons:void 0,sessionManagerProps:{showRole:!0,onLogout:()=>{window.location.href=de}},links:[]};export{no as B,mt as D,we as H,en as L,pt as S,vo as a,oo as b,io as c,uo as f,ht as g,ro as i,H as m,de as p,go as u};
11
+ */const Ue=Object.freeze({left:0,top:0,width:16,height:16}),Z=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),B=Object.freeze({...Ue,...Z}),re=Object.freeze({...B,body:"",hidden:!1}),tn=Object.freeze({width:null,height:null}),Qe=Object.freeze({...tn,...Z});function nn(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return t}const on=/[\s,]+/;function rn(e,t){t.split(on).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const We={...Qe,preserveAspectRatio:""};function Se(e){const t={...We},n=(r,o)=>e.getAttribute(r)||o;return t.width=n("width",null),t.height=n("height",null),t.rotate=nn(n("rotate","")),rn(t,n("flip","")),t.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),t}function sn(e,t){for(const n in We)if(e[n]!==t[n])return!0;return!1}const _=/^[a-z0-9]+(-[a-z0-9]+)*$/,z=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),c=o.pop(),l={provider:o.length>0?o[0]:r,prefix:c,name:a};return t&&!Q(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 t&&!Q(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:s};return t&&!Q(a,n)?null:a}return null},Q=(e,t)=>e?!!((e.provider===""||e.provider.match(_))&&(t&&e.prefix===""||e.prefix.match(_))&&e.name.match(_)):!1;function cn(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Te(e,t){const n=cn(e,t);for(const r in re)r in Z?r in e&&!(r in n)&&(n[r]=Z[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function an(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function s(i){if(n[i])return o[i]=[];if(!(i in o)){o[i]=null;const a=r[i]&&r[i].parent,c=a&&s(a);c&&(o[i]=[a].concat(c))}return o[i]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(s),o}function ln(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let s={};function i(a){s=Te(r[a]||o[a],s)}return i(t),n.forEach(i),Te(e,s)}function Ge(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=an(e);for(const o in r){const s=r[o];s&&(t(o,ln(e,o,s)),n.push(o))}return n}const un={provider:"",aliases:{},not_found:{},...Ue};function ee(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Ze(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!ee(e,un))return null;const n=t.icons;for(const o in n){const s=n[o];if(!o.match(_)||typeof s.body!="string"||!ee(s,re))return null}const r=t.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(_)||typeof i!="string"||!n[i]&&!r[i]||!ee(s,re))return null}return t}const J=Object.create(null);function fn(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function P(e,t){const n=J[e]||(J[e]=Object.create(null));return n[t]||(n[t]=fn(e,t))}function pe(e,t){return Ze(t)?Ge(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function dn(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function pn(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(J)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(J[o]||{})).forEach(i=>{const a=P(o,i);n=n.concat(Object.keys(a.icons).map(c=>(o!==""?"@"+o+":":"")+i+":"+c))})}),n}let q=!1;function Je(e){return typeof e=="boolean"&&(q=e),q}function F(e){const t=typeof e=="string"?z(e,!0,q):e;if(t){const n=P(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Xe(e,t){const n=z(e,!0,q);if(!n)return!1;const r=P(n.provider,n.prefix);return dn(r,n.name,t)}function Ae(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),q&&!t&&!e.prefix){let o=!1;return Ze(e)&&(e.prefix="",Ge(e,(s,i)=>{i&&Xe(s,i)&&(o=!0)})),o}const n=e.prefix;if(!Q({provider:t,prefix:n,name:"a"}))return!1;const r=P(t,n);return!!pe(r,e)}function hn(e){return!!F(e)}function gn(e){const t=F(e);return t?{...B,...t}:null}function mn(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,i=o.prefix,a=o.name,c=n[s]||(n[s]=Object.create(null)),l=c[i]||(c[i]=P(s,i));let u;a in l.icons?u=t.loaded:i===""||l.missing.has(a)?u=t.missing:u=t.pending;const d={provider:s,prefix:i,name:a};u.push(d)}),t}function Ye(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function bn(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,o=e.prefix;t.forEach(s=>{const i=s.icons,a=i.pending.length;i.pending=i.pending.filter(c=>{if(c.prefix!==o)return!0;const l=c.name;if(e.icons[l])i.loaded.push({provider:r,prefix:o,name:l});else if(e.missing.has(l))i.missing.push({provider:r,prefix:o,name:l});else return n=!0,!0;return!1}),i.pending.length!==a&&(n||Ye([e],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let yn=0;function xn(e,t,n){const r=yn++,o=Ye.bind(null,n,r);if(!t.pending.length)return o;const s={id:r,icons:t,callback:e,abort:o};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}const se=Object.create(null);function je(e,t){se[e]=t}function ie(e){return se[e]||se[""]}function wn(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const s=typeof o=="string"?z(o,t,n):o;s&&r.push(s)}),r}var vn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function In(e,t,n,r){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let i;if(e.random){let h=e.resources.slice(0);for(i=[];h.length>1;){const v=Math.floor(Math.random()*h.length);i.push(h[v]),h=h.slice(0,v).concat(h.slice(v+1))}i=i.concat(h)}else i=e.resources.slice(s).concat(e.resources.slice(0,s));const a=Date.now();let c="pending",l=0,u,d=null,p=[],g=[];typeof r=="function"&&g.push(r);function b(){d&&(clearTimeout(d),d=null)}function x(){c==="pending"&&(c="aborted"),b(),p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function I(h,v){v&&(g=[]),typeof h=="function"&&g.push(h)}function T(){return{startTime:a,payload:t,status:c,queriesSent:l,queriesPending:p.length,subscribe:I,abort:x}}function w(){c="failed",g.forEach(h=>{h(void 0,u)})}function y(){p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function O(h,v,k){const S=v!=="success";switch(p=p.filter(L=>L!==h),c){case"pending":break;case"failed":if(S||!e.dataAfterTimeout)return;break;default:return}if(v==="abort"){u=k,w();return}if(S){u=k,p.length||(i.length?C():w());return}if(b(),y(),!e.random){const L=e.resources.indexOf(h.resource);L!==-1&&L!==e.index&&(e.index=L)}c="completed",g.forEach(L=>{L(k)})}function C(){if(c!=="pending")return;b();const h=i.shift();if(h===void 0){if(p.length){d=setTimeout(()=>{b(),c==="pending"&&(y(),w())},e.timeout);return}w();return}const v={status:"pending",resource:h,callback:(k,S)=>{O(v,k,S)}};p.push(v),l++,d=setTimeout(C,e.rotate),n(h,t,v.callback)}return setTimeout(C),T}function Ke(e){const t={...vn,...e};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function o(a,c,l){const u=In(t,a,c,(d,p)=>{r(),l&&l(d,p)});return n.push(u),u}function s(a){return n.find(c=>a(c))||null}return{query:o,find:s,setIndex:a=>{t.index=a},getIndex:()=>t.index,cleanup:r}}function he(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Y=Object.create(null),E=["https://api.simplesvg.com","https://api.unisvg.com"],W=[];for(;E.length>0;)E.length===1||Math.random()>.5?W.push(E.shift()):W.push(E.pop());Y[""]=he({resources:["https://api.iconify.design"].concat(W)});function ke(e,t){const n=he(t);return n===null?!1:(Y[e]=n,!0)}function K(e){return Y[e]}function Cn(){return Object.keys(Y)}function Pe(){}const te=Object.create(null);function Sn(e){if(!te[e]){const t=K(e);if(!t)return;const n=Ke(t),r={config:t,redundancy:n};te[e]=r}return te[e]}function et(e,t,n){let r,o;if(typeof e=="string"){const s=ie(e);if(!s)return n(void 0,424),Pe;o=s.send;const i=Sn(e);i&&(r=i.redundancy)}else{const s=he(e);if(s){r=Ke(s);const i=e.resources?e.resources[0]:"",a=ie(i);a&&(o=a.send)}}return!r||!o?(n(void 0,424),Pe):r.query(t,o,n)().abort}const Le="iconify2",$="iconify",tt=$+"-count",Me=$+"-version",nt=36e5,Tn=168;function ce(e,t){try{return e.getItem(t)}catch{}}function ge(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Oe(e,t){try{e.removeItem(t)}catch{}}function ae(e,t){return ge(e,tt,t.toString())}function le(e){return parseInt(ce(e,tt))||0}const M={local:!0,session:!0},ot={local:new Set,session:new Set};let me=!1;function An(e){me=e}let U=typeof window>"u"?{}:window;function rt(e){const t=e+"Storage";try{if(U&&U[t]&&typeof U[t].length=="number")return U[t]}catch{}M[e]=!1}function st(e,t){const n=rt(e);if(!n)return;const r=ce(n,Me);if(r!==Le){if(r){const a=le(n);for(let c=0;c<a;c++)Oe(n,$+c.toString())}ge(n,Me,Le),ae(n,0);return}const o=Math.floor(Date.now()/nt)-Tn,s=a=>{const c=$+a.toString(),l=ce(n,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"&&t(u,a))return!0}catch{}Oe(n,c)}};let i=le(n);for(let a=i-1;a>=0;a--)s(a)||(a===i-1?(i--,ae(n,i)):ot[e].add(a))}function it(){if(!me){An(!0);for(const e in M)st(e,t=>{const n=t.data,r=t.provider,o=n.prefix,s=P(r,o);if(!pe(s,n).length)return!1;const i=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function jn(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in M)st(r,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function kn(e,t){me||it();function n(r){let o;if(!M[r]||!(o=rt(r)))return;const s=ot[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=le(o),!ae(o,i+1))return;const a={cached:Math.floor(Date.now()/nt),provider:e.provider,data:t};return ge(o,$+i.toString(),JSON.stringify(a))}t.lastModified&&!jn(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Re(){}function Pn(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,bn(e)}))}function Ln(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let s;if(!o||!(s=ie(n)))return;s.prepare(n,r,o).forEach(a=>{et(n,a,c=>{if(typeof c!="object")a.icons.forEach(l=>{e.missing.add(l)});else try{const l=pe(e,c);if(!l.length)return;const u=e.pendingIcons;u&&l.forEach(d=>{u.delete(d)}),kn(e,c)}catch(l){console.error(l)}Pn(e)})})}))}const be=(e,t)=>{const n=wn(e,!0,Je()),r=mn(n);if(!r.pending.length){let c=!0;return t&&setTimeout(()=>{c&&t(r.loaded,r.missing,r.pending,Re)}),()=>{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(P(l,u));const d=o[l]||(o[l]=Object.create(null));d[u]||(d[u]=[])}),r.pending.forEach(c=>{const{provider:l,prefix:u,name:d}=c,p=P(l,u),g=p.pendingIcons||(p.pendingIcons=new Set);g.has(d)||(g.add(d),o[l][u].push(d))}),s.forEach(c=>{const{provider:l,prefix:u}=c;o[l][u].length&&Ln(c,o[l][u])}),t?xn(t,r,s):Re},Mn=e=>new Promise((t,n)=>{const r=typeof e=="string"?z(e,!0):e;if(!r){n(e);return}be([r||e],o=>{if(o.length&&r){const s=F(r);if(s){t({...B,...s});return}}n(e)})});function On(e){try{const t=typeof e=="string"?JSON.parse(e):e;if(typeof t.body=="string")return{...t}}catch{}}function Rn(e,t){const n=typeof e=="string"?z(e,!0,!0):null;if(!n){const s=On(e);return{value:e,data:s}}const r=F(n);if(r!==void 0||!n.prefix)return{value:e,name:n,data:r};const o=be([n],()=>t(e,n,F(n)));return{value:e,name:n,loading:o}}function ne(e){return e.hasAttribute("inline")}let ct=!1;try{ct=navigator.vendor.indexOf("Apple")===0}catch{}function En(e,t){switch(t){case"svg":case"bg":case"mask":return t}return t!=="style"&&(ct||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const _n=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Nn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ue(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(_n);if(r===null||!r.length)return e;const o=[];let s=r.shift(),i=Nn.test(s);for(;;){if(i){const a=parseFloat(s);isNaN(a)?o.push(s):o.push(Math.ceil(a*t*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const qn=e=>e==="unset"||e==="undefined"||e==="none";function at(e,t){const n={...B,...e},r={...Qe,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(b=>{const x=[],I=b.hFlip,T=b.vFlip;let w=b.rotate;I?T?w+=2:(x.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),x.push("scale(-1 1)"),o.top=o.left=0):T&&(x.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),x.push("scale(1 -1)"),o.top=o.left=0);let y;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:y=o.height/2+o.top,x.unshift("rotate(90 "+y.toString()+" "+y.toString()+")");break;case 2:x.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:y=o.width/2+o.left,x.unshift("rotate(-90 "+y.toString()+" "+y.toString()+")");break}w%2===1&&(o.left!==o.top&&(y=o.left,o.left=o.top,o.top=y),o.width!==o.height&&(y=o.width,o.width=o.height,o.height=y)),x.length&&(s='<g transform="'+x.join(" ")+'">'+s+"</g>")});const i=r.width,a=r.height,c=o.width,l=o.height;let u,d;i===null?(d=a===null?"1em":a==="auto"?l:a,u=ue(d,c/l)):(u=i==="auto"?c:i,d=a===null?ue(u,l/c):a==="auto"?l:a);const p={},g=(b,x)=>{qn(x)||(p[b]=x.toString())};return g("width",u),g("height",d),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+c.toString()+" "+l.toString(),{attributes:p,body:s}}const Fn=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let X=Fn();function $n(e){X=e}function Bn(){return X}function zn(e,t){const n=K(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(i=>{o=Math.max(o,i.length)});const s=t+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function Hn(e){return e===404}const Dn=(e,t,n)=>{const r=[],o=zn(e,t),s="icons";let i={type:s,provider:e,prefix:t,icons:[]},a=0;return n.forEach((c,l)=>{a+=c.length+1,a>=o&&l>0&&(r.push(i),i={type:s,provider:e,prefix:t,icons:[]},a=c.length),i.icons.push(c)}),r.push(i),r};function Vn(e){if(typeof e=="string"){const t=K(e);if(t)return t.path}return"/"}const Un=(e,t,n)=>{if(!X){n("abort",424);return}let r=Vn(t.provider);switch(t.type){case"icons":{const s=t.prefix,a=t.icons.join(","),c=new URLSearchParams({icons:a});r+=s+".json?"+c.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;X(e+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(Hn(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},Qn={prepare:Dn,send:Un};function Ee(e,t){switch(e){case"local":case"session":M[e]=t;break;case"all":for(const n in M)M[n]=t;break}}const oe="data-style";let lt="";function Wn(e){lt=e}function _e(e,t){let n=Array.from(e.childNodes).find(r=>r.hasAttribute&&r.hasAttribute(oe));n||(n=document.createElement("style"),n.setAttribute(oe,oe),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(t?"-0.125em":"0")+"}span,svg{display:block}"+lt}function ut(){je("",Qn),Je(!0);let e;try{e=window}catch{}if(e){if(it(),e.IconifyPreload!==void 0){const n=e.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!Ae(o))&&console.error(r)}catch{console.error(r)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(const r in n){const o="IconifyProviders["+r+"] is invalid.";try{const s=n[r];if(typeof s!="object"||!s||s.resources===void 0)continue;ke(r,s)||console.error(o)}catch{console.error(o)}}}}return{enableCache:n=>Ee(n,!0),disableCache:n=>Ee(n,!1),iconExists:hn,getIcon:gn,listIcons:pn,addIcon:Xe,addCollection:Ae,calculateSize:ue,buildIcon:at,loadIcons:be,loadIcon:Mn,addAPIProvider:ke,appendCustomStyle:Wn,_api:{getAPIConfig:K,setAPIModule:je,sendAPIQuery:et,setFetch:$n,getFetch:Bn,listAPIProviders:Cn}}}function ft(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Gn(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Zn(e){return"data:image/svg+xml,"+Gn(e)}function Jn(e){return'url("'+Zn(e)+'")'}const fe={"background-color":"currentColor"},dt={"background-color":"transparent"},Ne={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},qe={"-webkit-mask":fe,mask:fe,background:dt};for(const e in qe){const t=qe[e];for(const n in Ne)t[e+"-"+n]=Ne[n]}function Fe(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Xn(e,t,n){const r=document.createElement("span");let o=e.body;o.indexOf("<a")!==-1&&(o+="<!-- "+Date.now()+" -->");const s=e.attributes,i=ft(o,{...s,width:t.width+"",height:t.height+""}),a=Jn(i),c=r.style,l={"--svg":a,width:Fe(s.width),height:Fe(s.height),...n?fe:dt};for(const u in l)c.setProperty(u,l[u]);return r}let N;function Yn(){try{N=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{N=null}}function Kn(e){return N===void 0&&Yn(),N?N.createHTML(e):e}function eo(e){const t=document.createElement("span"),n=e.attributes;let r="";n.width||(r="width: inherit;"),n.height||(r+="height: inherit;"),r&&(n.style=r);const o=ft(e.body,n);return t.innerHTML=Kn(o),t.firstChild}function $e(e,t){const n=t.icon.data,r=t.customisations,o=at(n,r);r.preserveAspectRatio&&(o.attributes.preserveAspectRatio=r.preserveAspectRatio);const s=t.renderedMode;let i;switch(s){case"svg":i=eo(o);break;default:i=Xn(o,{...B,...n},s==="mask")}const a=Array.from(e.childNodes).find(c=>{const l=c.tagName&&c.tagName.toUpperCase();return l==="SPAN"||l==="SVG"});a?i.tagName==="SPAN"&&a.tagName===i.tagName?a.setAttribute("style",i.getAttribute("style")):e.replaceChild(i,a):e.appendChild(i)}function Be(e,t,n){const r=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:t,icon:e,lastRender:r}}function to(e="iconify-icon"){let t,n;try{t=window.customElements,n=window.HTMLElement}catch{return}if(!t||!n)return;const r=t.get(e);if(r)return r;const o=["icon","mode","inline","width","height","rotate","flip"],s=class extends n{constructor(){super();D(this,"_shadowRoot");D(this,"_state");D(this,"_checkQueued",!1);const c=this._shadowRoot=this.attachShadow({mode:"open"}),l=ne(this);_e(c,l),this._state=Be({value:""},l),this._queueCheck()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(c){if(c==="inline"){const l=ne(this),u=this._state;l!==u.inline&&(u.inline=l,_e(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 ne(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{}$e(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=Se(this);(c.attrMode!==u||sn(c.customisations,d))&&this._renderIcon(c.icon,d,u)}_iconChanged(c){const l=Rn(c,(u,d,p)=>{const g=this._state;if(g.rendered||this.getAttribute("icon")!==u)return;const b={value:u,name:d,data:p};b.data?this._gotIconData(b):g.icon=b});l.data?this._gotIconData(l):this._state=Be(l,this._state.inline,this._state)}_gotIconData(c){this._checkQueued=!1,this._renderIcon(c,Se(this),this.getAttribute("mode"))}_renderIcon(c,l,u){const d=En(c.data.body,u),p=this._state.inline;$e(this._shadowRoot,this._state={rendered:!0,icon:c,inline:p,customisations:l,attrMode:u,renderedMode:d})}};o.forEach(a=>{a in s.prototype||Object.defineProperty(s.prototype,a,{get:function(){return this.getAttribute(a)},set:function(c){c!==null?this.setAttribute(a,c):this.removeAttribute(a)}})});const i=ut();for(const a in i)s[a]=s.prototype[a]=i[a];return t.define(e,s),s}to()||ut();const no=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])}))}))}),pt=f.shape({showText:f.bool,showRole:f.bool,switchDid:f.bool,switchProfile:f.bool,switchPassport:f.bool,disableLogout:f.bool,onLogin:f.func,onLogout:f.func,onSwitchDid:f.func,onSwitchProfile:f.func,onSwitchPassport:f.func,menu:f.array,menuRender:f.func,dark:f.bool,size:f.number}),H=(e,t,n="children")=>e.map(r=>Array.isArray(r[n])?t({...r,[n]:H(r[n],t,n)}):t(r)),oo=(e,t="children")=>{const n=[];return H(e,r=>n.push(r),t),n},ye=(e,t,n="children")=>e.map(r=>({...r})).filter(r=>{const o=r[n];if(Array.isArray(o)){const i=ye(o,t,n);r[n]=i!=null&&i.length?i:void 0}const s={filteredChildren:r[n],isLeaf:!(o!=null&&o.length)};return t(r,s)}),ro=e=>/^https?:\/\//.test(e),vo=e=>/^[\w-]+:[\w-]+$/.test(e),so=e=>{if(!e||!(e!=null&&e.startsWith("/")))return!1;const t=o=>o.endsWith("/")?o:`${o}/`,n=t(window.location.pathname),r=t(new URL(e,window.location.origin).pathname);return n.startsWith(r)},io=(e=[])=>{const t=e.map((r,o)=>({path:r,index:o})).filter(r=>so(r.path));return t!=null&&t.length?t.slice(1).reduce((r,o)=>r.path.length>=o.path.length?r:o,t[0]).index:-1};var ze,He;const de=((ze=window==null?void 0:window.blocklet)==null?void 0:ze.groupPrefix)||((He=window==null?void 0:window.blocklet)==null?void 0:He.prefix)||"/",co=e=>{const t={...e},n=e==null?void 0:e.background;return typeof n=="string"?t.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(t.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),t},ht=(e,t="en")=>{if(!(e!=null&&e.length))return e;const n=(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(ro(o)){const a=new URL(o);return a.searchParams.set("locale",s),a.href}const i=new URL(o,window.location.origin);return i.searchParams.set("locale",s),i.pathname+i.search}return typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o};return H(e,o=>{var s;return{...o,title:n(o.title,t),link:(s=o.items)!=null&&s.length?o.link:r(o.link,t),_rawLink:o.link}},"items")},ao=e=>H(e,t=>t.role?{...t,role:Array.isArray(t.role)?t.role:[t.role]}:t,"items"),lo=e=>{if(!(e!=null&&e.length))return null;const t=ao(e),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return t.forEach(r=>{var o;r.section?Array.isArray(r.section)?r.section.forEach(s=>{var i;(i=n[s])==null||i.push(r)}):typeof r.section=="string"&&((o=n[r.section])==null||o.push(r)):n.header.push(r)}),n},uo=e=>{if(!e)return null;const t={...e};return t.theme=co(t.theme),t.navigation=lo(fo(t.navigation)),t},fo=(e=[])=>ye(e,(t,n)=>{var r;return!!t.link||((r=n.filteredChildren)==null?void 0:r.length)},"items"),gt=(e,t)=>ye(e,(n,r)=>{var s;const o=!n.role||t&&n.role.includes(t);return r.isLeaf?o:o&&((s=r.filteredChildren)==null?void 0:s.length)},"items"),po={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 xe({session:e,locale:t,size:n}){const r=(window==null?void 0:window.blocklet)||{},o=(r.navigation||[]).filter(c=>c.section==="sessionManager"&&!["/sessionManager"].includes(c.id)).filter(c=>{var l;return!!((c==null?void 0:c.role)||[]).includes(((l=e==null?void 0:e.user)==null?void 0:l.role)||"guest")}).map(c=>{const l=((r==null?void 0:r.componentMountPoints)||[]).find(u=>c.component===u.name);return{...c,component:l}}),s=A.useRef(null),i=jt({open:!1}),a=kt((c=!i.open)=>{i.open=c});return o.length===0||!(e!=null&&e.user)?null:m.jsxs(m.Fragment,{children:[m.jsx(Pt,{size:"medium",ref:s,onClick:()=>a(),children:m.jsx(Ce,{icon:po,fontSize:n,style:{transform:"scale(1.08)"}})}),m.jsx(Lt,{open:i.open,onClose:()=>a(!1),anchorEl:s.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:c})=>m.jsx(Mt,{onClickAway:l=>{l.preventDefault(),l.stopPropagation(),a(!1)},children:m.jsx(Ot,{...c,timeout:350,children:m.jsxs(Rt,{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:[m.jsx(Et,{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 m.jsx(Wt,{disablePadding:!0,children:m.jsxs(en,{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?m.jsx(_t,{component:"img",src:`${Nt}/blocklet/logo-bundle/${l.component.did}`,sx:{borderRadius:2,width:50,height:50,objectFit:"contain"}}):m.jsx(Ce,{fontSize:50,icon:l.icon||ho,color:j.textSubtitle}),m.jsx(qt,{sx:{fontSize:"12px",color:j.textBase,textAlign:"center",lineHeight:"normal"},children:Ft(l.title,t)})]})},l.id)})}),m.jsx($t,{session:e,children:m.jsx(Bt,{variant:"outlined",fullWidth:!0,href:zt,sx:{mt:1,borderRadius:2,color:j.textBase,borderColor:j.lineBorderStrong,"&:hover":{color:j.primaryBase,borderColor:j.primaryBase}},children:t==="zh"?"管理":"Manage"})})]})})})})]})}xe.propTypes={session:f.object.isRequired,locale:f.string,size:f.number};xe.defaultProps={locale:"en",size:24};function we({formattedBlocklet:e,addons:t,sessionManagerProps:n}){var p,g,b,x;const r=A.useContext(De),{locale:o}=Ve()||{},{enableConnect:s=!0,enableLocale:i=!0}=e,a=!!((p=r==null?void 0:r.session)!=null&&p.user);let c=ht((g=e==null?void 0:e.navigation)==null?void 0:g.sessionManager,o)||[];c=gt(c,(x=(b=r==null?void 0:r.session)==null?void 0:b.user)==null?void 0:x.role);const u=(()=>{if(t&&typeof t!="function")return Array.isArray(t)?t:[t];let I=[];if(i&&o&&I.push(m.jsx(Gt,{showText:!1},"locale-selector")),s&&r){const T=[];a&&(c?c.slice(0,5):[]).forEach(y=>{T.push({label:y.title,icon:y.icon?m.jsx("iconify-icon",{icon:y.icon,height:24,style:{marginRight:8}}):null,component:"a",href:y.link,key:y.link})}),I.push(m.jsx(xe,{session:r.session,locale:o},"session-blocklet")),I.push(m.jsx(Ht,{session:r.session,locale:o,menu:T,showRole:!0,...n},"session-user"))}return typeof t=="function"&&(I=t(I)||[]),I})();return A.createElement(m.Fragment,null,...Array.isArray(u)?u:[u])}we.propTypes={formattedBlocklet:f.object.isRequired,addons:f.oneOfType([f.func,f.node]),sessionManagerProps:pt};we.defaultProps={addons:null,sessionManagerProps:{showRole:!0}};const go=()=>{const e=Dt();A.useEffect(()=>{e.wallet&&Vt.call("arcHideTopBar","{}")},[e])};function mt({meta:e,fallbackUrl:t,invalidPathFallback:n,headerAddons:r,sessionManagerProps:o,links:s,...i}){var O;go();const a=A.useContext(De),c=(O=a==null?void 0:a.session)==null?void 0:O.user,l=c==null?void 0:c.role,{locale:u}=Ve()||{},d=A.useMemo(()=>{const C=Object.assign({},window.blocklet,e);try{return uo(C)}catch(h){return console.error("Failed to format blocklet info",h,C),C}},[e]),{localizedNav:p,flattened:g,matchedIndex:b}=A.useMemo(()=>{var k;let C=ht((k=d==null?void 0:d.navigation)==null?void 0:k.dashboard,u)||[];C=gt(C,l),C=H(C,S=>({title:S.title,url:S.link,icon:S.icon?m.jsx("iconify-icon",{height:"100%",width:"100%",icon:S.icon}):null,external:!0,children:S.items}),"items");const h=oo(C).filter(S=>!!S.url),v=io(h.map(S=>S.url));return v!==-1&&(h[v].active=!0),{localizedNav:C,flattened:h,matchedIndex:v}},[d,u,l]),x=typeof s=="function"?s(p):[...p,...s];if(A.useLayoutEffect(()=>{c&&!(g!=null&&g.length)&&t&&(window.location.href=t)},[t]),A.useLayoutEffect(()=>{c&&(g!=null&&g.length)&&b===-1&&n&&n()},[n,g,b]),!d.appName)return null;const{appLogo:I,appLogoRect:T,appName:w}=d,y=m.jsx(we,{formattedBlocklet:d,addons:r,sessionManagerProps:o});return m.jsx(Ut,{title:w,fullWidth:!0,sidebarWidth:128,legacy:!1,links:x,...i,headerProps:{homeLink:de,logo:m.jsx("img",{src:T||I,alt:"logo"}),addons:y,...i.headerProps}})}mt.propTypes={meta:no,fallbackUrl:f.string,invalidPathFallback:f.func,headerAddons:f.oneOfType([f.func,f.node]),sessionManagerProps:pt,links:f.oneOfType([f.array,f.func])};mt.defaultProps={meta:{},fallbackUrl:de,invalidPathFallback:null,headerAddons:void 0,sessionManagerProps:{showRole:!0,onLogout:()=>{window.location.href=de}},links:[]};export{no as B,mt as D,we as H,en as L,vo as a,oo as b,io as c,uo as f,ht as g,ro as i,H as m,de as p,go as u};
@@ -1 +1 @@
1
- import{b4 as a}from"./index-DewOPxO6.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{b4 as a}from"./index-BfhVorqV.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,5 +1,5 @@
1
- const __vite__fileDeps=["assets/react-BQtVEjoa.js","assets/index-DewOPxO6.js","assets/index-CCovGSMB.css","assets/index-BygZlN1t.js","assets/preact.module-B1z5cdvs.js","assets/index-Deep7NDy.js","assets/index-CXfltY7R.js","assets/toUpper-9p40lktB.js","assets/index-DovgzM-F.js","assets/fallback-CCEDDyDi.js","assets/index-BsIlTmDV.js","assets/Toolbar-77uyJM9h.js","assets/Hidden-BJkMpsd0.js","assets/MoreHoriz-mamFyKRZ.js","assets/ExpandMore-BWaTr8NM.js","assets/index-zXWDbMUc.js","assets/MoreVert-BU85cNL-.js","assets/selector-CrDfmkY0.js","assets/Avatar-Dwnhztcq.js","assets/useSlot-6o2H45BB.js","assets/resource-dialog-BsszfZXO.js","assets/use-mobile-CuqJnhli.js","assets/OpenInNew-BVKTmUSh.js","assets/CloseOutlined-GI4sup4V.js","assets/index-DMdwa7oY.js","assets/index-CCxjgLfl.js","assets/index-DgA5Zy0N.js","assets/FormControlLabel-JXim2rPI.js","assets/useFormControl-CCJce851.js","assets/index-BE-PybUy.js","assets/FilterList-D4DSpHyR.js","assets/toPropertyKey-hKuLU48H.js","assets/FormControl-BInNJyV_.js","assets/FormGroup-QRzg5zQM.js","assets/InputLabel-vZ-qCGp_.js","assets/ListItemText-DP70CZWH.js","assets/Select-BmEz5CKJ.js","assets/TextField-BVdG-t68.js","assets/LastPage-BHrerTUj.js","assets/index-D0mhOhN_.js","assets/redux-1_xbRAgi.js","assets/Search-DBZkGJEC.js","assets/Delete-BbOhDiuP.js","assets/url-join-C49pPV-I.js","assets/uniqBy-_IHSQjYH.js","assets/react-BW7E7-P9.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
- import{ao as J0,j as o,aD as oe,cE as u0,aG as A,fg as U1,aF as be,aB as Be,aC as Ee,T as Q,r as R,aK as Ae,aH as p0,aI as Oe,aJ as He,cK as Q0,fh as Je,X as Pe,Y as Te,B as z,l as We,P as f,$ as $e,E as q,e as p1,u as te,aM as ye,aV as Ne,bx as Qe,a1 as Ge,L as he,bG as h0,a as ve,az as ce,I as Y0,q as $,Z as de,dn as Z0,a9 as Re,c as fe,F as e2,bU as h1,ce as f0,cz as t2,cI as _e,cJ as x0,bj as o2,cZ as l2,cD as qe,bB as Ke,c1 as r1,f1 as r2,b as ae,bm as s2,dr as n2,ae as m0,bn as i2,ck as a2,aQ as q1,aP as c2,a2 as v0,bk as d2,eS as Me,fi as W1,cQ as u2,ap as p2,h as h2,ay as f2,al as x2,am as Ze}from"./index-DewOPxO6.js";import{d as f1}from"./Add-CMQKXeoe.js";import{d as m2}from"./AddBox-Da8HRe0l.js";import{d as g0}from"./Delete-BbOhDiuP.js";import{d as v2}from"./Error-8UAOEONn.js";import{D as x1}from"./index-BE-PybUy.js";import{T as b0,b as g2}from"./index-DFK8wuUf.js";import{C as m1}from"./confirm-DHGyGyAN.js";import{u as Ye}from"./session-DJ7ldfRV.js";import{W as G1}from"./did-address-GeuxdIBC.js";import{B as v1,d as b2}from"./ChevronRight-DaUZ-Ayb.js";import{S as ge}from"./shorten-label-DhSwM75T.js";import{A as j0}from"./Avatar-Dwnhztcq.js";import{d as j2}from"./Download-mFht7dDB.js";import{d as w2}from"./QuestionMarkCircle-C3Y6kBtX.js";import{b as R2,c as K1,T as C2}from"./index-DMdwa7oY.js";import{_ as ke}from"./useSetState-D2ca5Vtd.js";import{c as g1}from"./index-CXfltY7R.js";import{C as s1,F as n1,S as y2}from"./FormControlLabel-JXim2rPI.js";import{A as w0}from"./Alert-mdjZq_dN.js";import{p as i1}from"./index-HqFqdQ4r.js";import"./api-BuNUOrmN.js";import{i as z2}from"./index-C_h-cjkD.js";import{d as S2}from"./ExpandMore-BWaTr8NM.js";import{d as k2}from"./OpenInNew-BVKTmUSh.js";import{d as M2}from"./DeleteOutline-ahZetlDx.js";import{d as I2}from"./ArrowDropDown-DBLaWGdE.js";import{f as Le}from"./format-error-DYsYcQEx.js";import{c as L2,A as R0,u as P2,S as T2,U as N2}from"./item-kfKoTTV2.js";import{B as V2}from"./ButtonGroup-C_zY2Afa.js";import{T as Ie}from"./TextField-BVdG-t68.js";import{M as b1}from"./InputAdornment-BW-7-lAZ.js";import{d as D2}from"./Launch-CI_q_8qp.js";import{L as _2}from"./MoreVert-BU85cNL-.js";import{a as B2}from"./ListItemText-DP70CZWH.js";import{C as E2}from"./click-to-copy-c5lWDYPF.js";import{M as A2}from"./index-CYhVfKiI.js";import{r as O2}from"./index-DHhCppBk.js";import{d as H2}from"./Done-N9lCfpyR.js";import{c as C0,d as y0,b as $2,S as F2,a as U2}from"./Stepper-B0G3C-3I.js";import{R as q2,a as X1}from"./RadioGroup-DcXqVDaX.js";import"./FilterList-D4DSpHyR.js";import"./toPropertyKey-hKuLU48H.js";import"./FormControl-BInNJyV_.js";import"./useFormControl-CCJce851.js";import"./FormGroup-QRzg5zQM.js";import"./InputLabel-vZ-qCGp_.js";import"./Select-BmEz5CKJ.js";import"./LastPage-BHrerTUj.js";import"./Toolbar-77uyJM9h.js";import"./index-D0mhOhN_.js";import"./redux-1_xbRAgi.js";import"./Search-DBZkGJEC.js";import"./index-CCxjgLfl.js";import"./Link-DVxMZoCJ.js";import"./useSlot-6o2H45BB.js";import"./jss-plugin-props-sort.esm-MzFujmAA.js";const W2=J0(o.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),G2=["slots","slotProps"],K2=oe(u0)(({theme:e})=>A({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":A({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":A({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:U1(e.palette.grey[200],.12)}:{backgroundColor:U1(e.palette.grey[600],.12)})})),X2=oe(W2)({width:24,height:16});function J2(e){const{slots:t={},slotProps:l={}}=e,s=be(e,G2),n=e;return o.jsx("li",{children:o.jsx(K2,A({focusRipple:!0},s,{ownerState:n,children:o.jsx(X2,A({as:t.CollapsedIcon,ownerState:n},l.collapsedIcon))}))})}function Q2(e){return Ee("MuiBreadcrumbs",e)}const Y2=Be("MuiBreadcrumbs",["root","ol","li","separator"]),Z2=Y2,et=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],tt=e=>{const{classes:t}=e;return He({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},Q2,t)},ot=oe(Q,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${Z2.li}`]:t.li},t.root]})({}),lt=oe("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),rt=oe("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function st(e,t,l,s){return e.reduce((n,c,d)=>(d<e.length-1?n=n.concat(c,o.jsx(rt,{"aria-hidden":!0,className:t,ownerState:s,children:l},`separator-${d}`)):n.push(c),n),[])}const nt=R.forwardRef(function(t,l){const s=Ae({props:t,name:"MuiBreadcrumbs"}),{children:n,className:c,component:d="nav",slots:a={},slotProps:u={},expandText:h="Show path",itemsAfterCollapse:x=1,itemsBeforeCollapse:g=1,maxItems:y=8,separator:p="/"}=s,i=be(s,et),[m,w]=R.useState(!1),v=A({},s,{component:d,expanded:m,expandText:h,itemsAfterCollapse:x,itemsBeforeCollapse:g,maxItems:y,separator:p}),C=tt(v),S=p0({elementType:a.CollapsedIcon,externalSlotProps:u.collapsedIcon,ownerState:v}),N=R.useRef(null),T=k=>{const F=()=>{w(!0);const V=N.current.querySelector("a[href],button,[tabindex]");V&&V.focus()};return g+x>=k.length?k:[...k.slice(0,g),o.jsx(J2,{"aria-label":h,slots:{CollapsedIcon:a.CollapsedIcon},slotProps:{collapsedIcon:S},onClick:F},"ellipsis"),...k.slice(k.length-x,k.length)]},I=R.Children.toArray(n).filter(k=>R.isValidElement(k)).map((k,F)=>o.jsx("li",{className:C.li,children:k},`child-${F}`));return o.jsx(ot,A({ref:l,component:d,color:"text.secondary",className:Oe(C.root,c),ownerState:v},i,{children:o.jsx(lt,{className:C.ol,ref:N,ownerState:v,children:st(m||y&&I.length<=y?I:T(I),C.separator,p,v)})}))}),z0=nt;function it(e){return Ee("MuiStepButton",e)}const at=Be("MuiStepButton",["root","horizontal","vertical","touchRipple"]),J1=at,ct=["children","className","icon","optional"],dt=e=>{const{classes:t,orientation:l}=e;return He({root:["root",l],touchRipple:["touchRipple"]},it,t)},ut=oe(u0,{name:"MuiStepButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[{[`& .${J1.touchRipple}`]:t.touchRipple},t.root,t[l.orientation]]}})(({ownerState:e})=>A({width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},e.orientation==="vertical"&&{justifyContent:"flex-start",padding:"8px",margin:"-8px"},{[`& .${J1.touchRipple}`]:{color:"rgba(0, 0, 0, 0.3)"}})),pt=R.forwardRef(function(t,l){const s=Ae({props:t,name:"MuiStepButton"}),{children:n,className:c,icon:d,optional:a}=s,u=be(s,ct),{disabled:h,active:x}=R.useContext(C0),{orientation:g}=R.useContext(y0),y=A({},s,{orientation:g}),p=dt(y),i={icon:d,optional:a},m=Q0(n,["StepLabel"])?R.cloneElement(n,i):o.jsx($2,A({},i,{children:n}));return o.jsx(ut,A({focusRipple:!0,disabled:h,TouchRippleProps:{className:p.touchRipple},className:Oe(p.root,c),ref:l,ownerState:y,"aria-current":x?"step":void 0},u,{children:m}))}),ht=pt;function ft(e){return Ee("MuiStepContent",e)}Be("MuiStepContent",["root","last","transition"]);const xt=["children","className","TransitionComponent","transitionDuration","TransitionProps"],mt=e=>{const{classes:t,last:l}=e;return He({root:["root",l&&"last"],transition:["transition"]},ft,t)},vt=oe("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.last&&t.last]}})(({ownerState:e,theme:t})=>A({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:t.vars?`1px solid ${t.vars.palette.StepContent.border}`:`1px solid ${t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[600]}`},e.last&&{borderLeft:"none"})),gt=oe(Je,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),bt=R.forwardRef(function(t,l){const s=Ae({props:t,name:"MuiStepContent"}),{children:n,className:c,TransitionComponent:d=Je,transitionDuration:a="auto",TransitionProps:u}=s,h=be(s,xt);R.useContext(y0);const{active:x,last:g,expanded:y}=R.useContext(C0),p=A({},s,{last:g}),i=mt(p);let m=a;return a==="auto"&&!d.muiSupportAuto&&(m=void 0),o.jsx(vt,A({className:Oe(i.root,c),ref:l,ownerState:p},h,{children:o.jsx(gt,A({as:d,in:x||y,className:i.transition,ownerState:p,timeout:m,unmountOnExit:!0},u,{children:n}))}))}),jt=bt;var j1={},wt=Te;Object.defineProperty(j1,"__esModule",{value:!0});var S0=j1.default=void 0,Rt=wt(Pe()),Ct=o;S0=j1.default=(0,Rt.default)((0,Ct.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H15v-8h5V8zm-1 7V3.5L18.5 9zm4 12.66V16h5.66v2h-2.24l2.95 2.95-1.41 1.41L19 19.41v2.24h-2z"}),"FileOpen");var w1={},yt=Te;Object.defineProperty(w1,"__esModule",{value:!0});var k0=w1.default=void 0,zt=yt(Pe()),St=o;k0=w1.default=(0,zt.default)((0,St.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function ze({size:e,...t}){return o.jsx(z,{display:"flex",mt:4,...t,children:o.jsx(We,{size:e})})}ze.propTypes={size:f.number};ze.defaultProps={size:24};function R1({did:e,projectId:t,title:l,logo:s,describe:n}){const d=`${`${q.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${t}/logo/upload`}/${s}`,[a,u]=R.useState(!1),h=$e(x=>x.breakpoints.down("md"));return o.jsxs(z,{sx:{display:"flex",flexDirection:"row",color:a?"primary.main":"grey.900",gap:1},onPointerEnter:()=>u(!0),onPointerLeave:()=>u(!1),children:[o.jsx(j0,{sx:{borderRadius:1},src:d}),o.jsxs(z,{children:[o.jsx(ge,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:h?"primary.main":""},children:l||"/"}),o.jsx(ge,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:h||a?"primary.main":"grey.700"},children:n||"/"})]})]})}R1.propTypes={projectId:f.string.isRequired,did:f.string.isRequired,title:f.string.isRequired,logo:f.string.isRequired,describe:f.string.isRequired};function C1({initUrl:e}){const t=p1(),l=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:s,locale:n}=te(),{api:c}=ye(),{api:d}=Ye(),[a,u]=R.useState(!0),{blocklet:h}=Ne(),[x,g]=R.useState(null),[y,p]=R.useState(!1),i=$e(M=>M.breakpoints.down("xl")),{componentDid:m=""}=Qe(),[w,v]=R.useState(null),C=()=>{c.getProjects({input:{did:h.meta.did,componentDid:m,tenantScope:l}}).then(M=>{const L=(M==null?void 0:M.projects)||[];u(!1),v(L)}).catch(M=>{u(!1),$.error(M.message)})},S=()=>{t(`${q.UNOWNED_DID}/create/none`,{replace:!0})},N=M=>{g(M)},T=()=>{u(!1),p(!0)},I=()=>{p(!1),g(null)},k=M=>{$.error(M.message),p(!1),g(null)},F=M=>{if(!(M!=null&&M.deleted)){$.error("Delete project failed");return}C(),p(!1),g(null)};if(R.useEffect(()=>{C()},[]),!w&&a)return o.jsx(z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:o.jsx(ze,{})});if(!w)return null;if(!w.length)return o.jsxs(z,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[o.jsx(z,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:s("blocklet.publish.blockletEmptyTip")}),o.jsx(z,{sx:{fontSize:14,color:"text.secondary",mb:3},children:s("blocklet.publish.createBlockletTip")}),o.jsx(Ge,{onClick:S,variant:"contained",children:s("blocklet.publish.createBlocklet")})]});const V=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:M=>{const L=w[M];return o.jsx(he,{to:`${L.id}`,children:o.jsx(R1,{did:h.meta.did,projectId:L.id,logo:L.blockletLogo,title:L.blockletTitle,describe:L.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{customBodyRender:M=>M?o.jsx(b0,{type:"success",children:M}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:M=>M?o.jsx(G1,{size:14,compact:!0,responsive:!1,did:M}):null}},i||m?null:{label:s("common.createdBy"),name:"createdBy",options:{customBodyRender:M=>M?o.jsx(G1,{onClick:()=>{t(`/.well-known/service/admin/members?did=${M}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:M}):null}},i||m?null:{label:s("common.scope"),name:"componentDid",options:{customBodyRender:M=>{const L=(h.children||[]).find(H=>H.meta.did===M);return L?o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(v1,{size:14,blocklet:L,ancestors:[h]}),o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:L.meta.title})]},M):""}}},i||l?null:{label:s("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:M=>o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:o.jsx(ge,{children:M})})}},{label:s("common.updatedAt"),name:"updatedAt",options:{customBodyRender:M=>o.jsx(h0,{value:Number(M),locale:n})}},{label:s("common.actions"),name:"actions",options:{customBodyRenderLite:M=>{const L=w[M];return o.jsxs(z,{display:"flex",children:[o.jsx(he,{to:`${L.id}/new-release/${L.lastReleaseId}`,children:o.jsx(ve,{title:s("blocklet.publish.createRelease"),placement:"top",children:o.jsx(ce,{color:"primary","aria-label":"create",children:o.jsx(m2,{style:{fontSize:18}})})})}),!!L.lastReleaseId&&o.jsx(ve,{title:s("blocklet.publish.viewLastRelease",{name:L.blockletTitle}),placement:"top",children:o.jsx(ce,{color:"secondary","aria-label":"create",children:o.jsx(he,{style:{display:"flex"},to:`${L.id}/view/${L.lastReleaseId}`,children:o.jsx(S0,{sx:{fontSize:18}})})})}),o.jsx(ve,{title:s("blocklet.publish.delete",{name:L.blockletTitle}),placement:"top",children:o.jsx(ce,{color:"primary","aria-label":"delete",onClick:()=>N(L),children:o.jsx(g0,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),P=y?o.jsx(Y0,{open:!0,popup:!0,onClose:I,action:"check-has-project-id",locale:n,checkFn:d.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:F,onError:k,extraParams:{projectId:x.id,did:h.meta.did,name:x.blockletTitle},messages:{title:s("blocklet.publish.deleteProject.title",{name:x.blockletTitle}),scan:s("blocklet.publish.deleteProject.scan",{name:x.blockletTitle}),confirm:s("blocklet.publish.deleteProject.confirm"),success:s("blocklet.publish.deleteProject.success")}}):null;return o.jsxs(kt,{children:[o.jsxs(z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[o.jsxs(z,{display:"flex",flexDirection:"row",alignItems:"center",children:[o.jsx(z,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:s("common.blockletStudio")}),o.jsx(ve,{title:s("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:o.jsx(k0,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),o.jsxs(Ge,{onClick:S,variant:"contained",children:[o.jsx(f1,{style:{fontSize:"1.3em",marginRight:4}}),s("blocklet.publish.createBlocklet")]})]}),o.jsx(z,{mt:3}),o.jsx(x1,{className:"main-table",locale:n,data:w,columns:V,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),x&&o.jsx(m1,{title:`${s("common.delete")} ${x.blockletTitle}`,description:s("blocklet.publish.deleteProject.description"),confirm:s("common.confirm"),onConfirm:T,onCancel:()=>g(null),children:o.jsx(z,{sx:{marginTop:2},children:[s("blocklet.publish.deleteProject.tip1"),s("blocklet.publish.deleteProject.tip2"),s("blocklet.publish.deleteProject.tip3")].map(M=>o.jsxs(z,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[o.jsx(v2,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),o.jsx(Q,{component:"span",variant:"inherit",color:"text.secondary",children:M})]}))})}),P]})}C1.propTypes={initUrl:f.object};C1.defaultProps={initUrl:null};const kt=de(z)`
1
+ const __vite__fileDeps=["assets/react-Di5TTO9l.js","assets/index-BfhVorqV.js","assets/index-CCovGSMB.css","assets/index-WDF_phnR.js","assets/preact.module-B1z5cdvs.js","assets/index-CvOK9BmX.js","assets/index-DU7-35nh.js","assets/toUpper-6wIhNvu3.js","assets/index-CHJwugzh.js","assets/fallback-rg9fefdL.js","assets/index-Ce3CP3Jp.js","assets/Toolbar-_9it32pJ.js","assets/Hidden-kl5Tbw1B.js","assets/index-Dn7MhkOZ.js","assets/MoreVert-er-bltGF.js","assets/selector-CNsCKDRb.js","assets/ExpandMore-DD2GykPj.js","assets/Avatar-XXXVLUFk.js","assets/useSlot-LBVvloQJ.js","assets/resource-dialog-5vdlaAuh.js","assets/use-mobile-CnnusHmf.js","assets/OpenInNew-Bu6iI6eA.js","assets/CloseOutlined-Crg0BDr4.js","assets/index-DJLK29SJ.js","assets/index-D12KUiCG.js","assets/index-nyOsFIwy.js","assets/FormControlLabel-B6ISinfm.js","assets/useFormControl-DUzGwbSY.js","assets/index-5qacoeSv.js","assets/FilterList-QafrkXbd.js","assets/toPropertyKey-hKuLU48H.js","assets/FormControl-Kt4xANtI.js","assets/FormGroup-BEMyIGSj.js","assets/InputLabel-DbdmcDbJ.js","assets/ListItemText-Bnnk7Gbj.js","assets/Select-BeNQ99oP.js","assets/TextField-D3XEyFR4.js","assets/LastPage-DXISIPs8.js","assets/index-BPSr4f2j.js","assets/redux-tOVF_oDT.js","assets/Search-CMyGk9R2.js","assets/Delete-DlfFien6.js","assets/url-join-DH_b1eAH.js","assets/uniqBy-C3O4Rmks.js","assets/react-BW7E7-P9.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
+ import{ao as J0,j as o,aD as oe,cE as u0,aG as A,fh as U1,aF as be,aB as Be,aC as Ee,T as Q,r as R,aK as Ae,aH as p0,aI as Oe,aJ as He,cK as Q0,fi as Je,X as Pe,Y as Te,B as z,l as We,P as f,$ as $e,E as q,e as p1,u as te,aM as ye,aV as Ne,bx as Qe,a1 as Ge,L as he,bG as h0,a as ve,az as ce,I as Y0,q as $,Z as de,dq as Z0,a9 as Re,c as fe,F as e2,bU as h1,ce as f0,cz as t2,cI as _e,cJ as x0,bj as o2,cZ as l2,cD as qe,bB as Ke,c1 as r1,f2 as r2,b as ae,bm as s2,dt as n2,ae as m0,bn as i2,ck as a2,aQ as q1,aP as c2,a2 as v0,bk as d2,eT as Me,fj as W1,cQ as u2,ap as p2,h as h2,ay as f2,al as x2,am as Ze}from"./index-BfhVorqV.js";import{d as f1}from"./Add-C5zWPWbi.js";import{d as m2}from"./AddBox-C4A7DDm4.js";import{d as g0}from"./Delete-DlfFien6.js";import{d as v2}from"./Error-CQmWghPs.js";import{D as x1}from"./index-5qacoeSv.js";import{T as b0,b as g2}from"./index-Xh4BYwzS.js";import{C as m1}from"./confirm-CD6_CMUq.js";import{u as Ye}from"./session-Cf-ZqG4P.js";import{W as G1}from"./did-address-GzRMEyk7.js";import{B as v1,d as b2}from"./ChevronRight-BKcNccG9.js";import{S as ge}from"./shorten-label-CunJMulX.js";import{A as j0}from"./Avatar-XXXVLUFk.js";import{d as j2}from"./Download-CVseEK0o.js";import{d as w2}from"./QuestionMarkCircle-CoIXItlb.js";import{b as R2,c as K1,T as C2}from"./index-DJLK29SJ.js";import{_ as ke}from"./useSetState-Be-I2Gl-.js";import{c as g1}from"./index-DU7-35nh.js";import{C as s1,F as n1,S as y2}from"./FormControlLabel-B6ISinfm.js";import{A as w0}from"./Alert-D91U5h--.js";import{p as i1}from"./index-HqFqdQ4r.js";import"./api-C37A8mCN.js";import{i as z2}from"./index-UmXxvIz7.js";import{d as S2}from"./ExpandMore-DD2GykPj.js";import{d as k2}from"./OpenInNew-Bu6iI6eA.js";import{d as M2}from"./DeleteOutline-De4xAGvs.js";import{d as I2}from"./ArrowDropDown-Cq32DOpt.js";import{f as Le}from"./format-error-B3RYdl6q.js";import{c as L2,A as R0,u as P2,S as T2,U as N2}from"./item-B9vXmxNy.js";import{B as V2}from"./ButtonGroup-k3SZjeUa.js";import{T as Ie}from"./TextField-D3XEyFR4.js";import{M as b1}from"./InputAdornment-C5IWgB4u.js";import{d as D2}from"./Launch-CDcio2Tm.js";import{L as _2}from"./MoreVert-er-bltGF.js";import{a as B2}from"./ListItemText-Bnnk7Gbj.js";import{C as E2}from"./click-to-copy-CNizZfqS.js";import{M as A2}from"./index-BCpZXkUS.js";import{r as O2}from"./index-CcddEj1V.js";import{d as H2}from"./Done-DO1tfb2_.js";import{c as C0,d as y0,b as $2,S as F2,a as U2}from"./Stepper-BF6lz4ut.js";import{R as q2,a as X1}from"./RadioGroup-C7j1KJ7y.js";import"./FilterList-QafrkXbd.js";import"./toPropertyKey-hKuLU48H.js";import"./FormControl-Kt4xANtI.js";import"./useFormControl-DUzGwbSY.js";import"./FormGroup-BEMyIGSj.js";import"./InputLabel-DbdmcDbJ.js";import"./Select-BeNQ99oP.js";import"./LastPage-DXISIPs8.js";import"./Toolbar-_9it32pJ.js";import"./index-BPSr4f2j.js";import"./redux-tOVF_oDT.js";import"./Search-CMyGk9R2.js";import"./index-D12KUiCG.js";import"./Link-DFzOJFD-.js";import"./useSlot-LBVvloQJ.js";import"./jss-plugin-props-sort.esm-InWevx1Y.js";const W2=J0(o.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),G2=["slots","slotProps"],K2=oe(u0)(({theme:e})=>A({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":A({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":A({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:U1(e.palette.grey[200],.12)}:{backgroundColor:U1(e.palette.grey[600],.12)})})),X2=oe(W2)({width:24,height:16});function J2(e){const{slots:t={},slotProps:l={}}=e,s=be(e,G2),n=e;return o.jsx("li",{children:o.jsx(K2,A({focusRipple:!0},s,{ownerState:n,children:o.jsx(X2,A({as:t.CollapsedIcon,ownerState:n},l.collapsedIcon))}))})}function Q2(e){return Ee("MuiBreadcrumbs",e)}const Y2=Be("MuiBreadcrumbs",["root","ol","li","separator"]),Z2=Y2,et=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],tt=e=>{const{classes:t}=e;return He({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},Q2,t)},ot=oe(Q,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${Z2.li}`]:t.li},t.root]})({}),lt=oe("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),rt=oe("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function st(e,t,l,s){return e.reduce((n,c,d)=>(d<e.length-1?n=n.concat(c,o.jsx(rt,{"aria-hidden":!0,className:t,ownerState:s,children:l},`separator-${d}`)):n.push(c),n),[])}const nt=R.forwardRef(function(t,l){const s=Ae({props:t,name:"MuiBreadcrumbs"}),{children:n,className:c,component:d="nav",slots:a={},slotProps:u={},expandText:h="Show path",itemsAfterCollapse:x=1,itemsBeforeCollapse:g=1,maxItems:y=8,separator:p="/"}=s,i=be(s,et),[m,w]=R.useState(!1),v=A({},s,{component:d,expanded:m,expandText:h,itemsAfterCollapse:x,itemsBeforeCollapse:g,maxItems:y,separator:p}),C=tt(v),S=p0({elementType:a.CollapsedIcon,externalSlotProps:u.collapsedIcon,ownerState:v}),N=R.useRef(null),T=k=>{const F=()=>{w(!0);const V=N.current.querySelector("a[href],button,[tabindex]");V&&V.focus()};return g+x>=k.length?k:[...k.slice(0,g),o.jsx(J2,{"aria-label":h,slots:{CollapsedIcon:a.CollapsedIcon},slotProps:{collapsedIcon:S},onClick:F},"ellipsis"),...k.slice(k.length-x,k.length)]},I=R.Children.toArray(n).filter(k=>R.isValidElement(k)).map((k,F)=>o.jsx("li",{className:C.li,children:k},`child-${F}`));return o.jsx(ot,A({ref:l,component:d,color:"text.secondary",className:Oe(C.root,c),ownerState:v},i,{children:o.jsx(lt,{className:C.ol,ref:N,ownerState:v,children:st(m||y&&I.length<=y?I:T(I),C.separator,p,v)})}))}),z0=nt;function it(e){return Ee("MuiStepButton",e)}const at=Be("MuiStepButton",["root","horizontal","vertical","touchRipple"]),J1=at,ct=["children","className","icon","optional"],dt=e=>{const{classes:t,orientation:l}=e;return He({root:["root",l],touchRipple:["touchRipple"]},it,t)},ut=oe(u0,{name:"MuiStepButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[{[`& .${J1.touchRipple}`]:t.touchRipple},t.root,t[l.orientation]]}})(({ownerState:e})=>A({width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},e.orientation==="vertical"&&{justifyContent:"flex-start",padding:"8px",margin:"-8px"},{[`& .${J1.touchRipple}`]:{color:"rgba(0, 0, 0, 0.3)"}})),pt=R.forwardRef(function(t,l){const s=Ae({props:t,name:"MuiStepButton"}),{children:n,className:c,icon:d,optional:a}=s,u=be(s,ct),{disabled:h,active:x}=R.useContext(C0),{orientation:g}=R.useContext(y0),y=A({},s,{orientation:g}),p=dt(y),i={icon:d,optional:a},m=Q0(n,["StepLabel"])?R.cloneElement(n,i):o.jsx($2,A({},i,{children:n}));return o.jsx(ut,A({focusRipple:!0,disabled:h,TouchRippleProps:{className:p.touchRipple},className:Oe(p.root,c),ref:l,ownerState:y,"aria-current":x?"step":void 0},u,{children:m}))}),ht=pt;function ft(e){return Ee("MuiStepContent",e)}Be("MuiStepContent",["root","last","transition"]);const xt=["children","className","TransitionComponent","transitionDuration","TransitionProps"],mt=e=>{const{classes:t,last:l}=e;return He({root:["root",l&&"last"],transition:["transition"]},ft,t)},vt=oe("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.last&&t.last]}})(({ownerState:e,theme:t})=>A({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:t.vars?`1px solid ${t.vars.palette.StepContent.border}`:`1px solid ${t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[600]}`},e.last&&{borderLeft:"none"})),gt=oe(Je,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),bt=R.forwardRef(function(t,l){const s=Ae({props:t,name:"MuiStepContent"}),{children:n,className:c,TransitionComponent:d=Je,transitionDuration:a="auto",TransitionProps:u}=s,h=be(s,xt);R.useContext(y0);const{active:x,last:g,expanded:y}=R.useContext(C0),p=A({},s,{last:g}),i=mt(p);let m=a;return a==="auto"&&!d.muiSupportAuto&&(m=void 0),o.jsx(vt,A({className:Oe(i.root,c),ref:l,ownerState:p},h,{children:o.jsx(gt,A({as:d,in:x||y,className:i.transition,ownerState:p,timeout:m,unmountOnExit:!0},u,{children:n}))}))}),jt=bt;var j1={},wt=Te;Object.defineProperty(j1,"__esModule",{value:!0});var S0=j1.default=void 0,Rt=wt(Pe()),Ct=o;S0=j1.default=(0,Rt.default)((0,Ct.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H15v-8h5V8zm-1 7V3.5L18.5 9zm4 12.66V16h5.66v2h-2.24l2.95 2.95-1.41 1.41L19 19.41v2.24h-2z"}),"FileOpen");var w1={},yt=Te;Object.defineProperty(w1,"__esModule",{value:!0});var k0=w1.default=void 0,zt=yt(Pe()),St=o;k0=w1.default=(0,zt.default)((0,St.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function ze({size:e,...t}){return o.jsx(z,{display:"flex",mt:4,...t,children:o.jsx(We,{size:e})})}ze.propTypes={size:f.number};ze.defaultProps={size:24};function R1({did:e,projectId:t,title:l,logo:s,describe:n}){const d=`${`${q.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${t}/logo/upload`}/${s}`,[a,u]=R.useState(!1),h=$e(x=>x.breakpoints.down("md"));return o.jsxs(z,{sx:{display:"flex",flexDirection:"row",color:a?"primary.main":"grey.900",gap:1},onPointerEnter:()=>u(!0),onPointerLeave:()=>u(!1),children:[o.jsx(j0,{sx:{borderRadius:1},src:d}),o.jsxs(z,{children:[o.jsx(ge,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:h?"primary.main":""},children:l||"/"}),o.jsx(ge,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:h||a?"primary.main":"grey.700"},children:n||"/"})]})]})}R1.propTypes={projectId:f.string.isRequired,did:f.string.isRequired,title:f.string.isRequired,logo:f.string.isRequired,describe:f.string.isRequired};function C1({initUrl:e}){const t=p1(),l=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:s,locale:n}=te(),{api:c}=ye(),{api:d}=Ye(),[a,u]=R.useState(!0),{blocklet:h}=Ne(),[x,g]=R.useState(null),[y,p]=R.useState(!1),i=$e(M=>M.breakpoints.down("xl")),{componentDid:m=""}=Qe(),[w,v]=R.useState(null),C=()=>{c.getProjects({input:{did:h.meta.did,componentDid:m,tenantScope:l}}).then(M=>{const L=(M==null?void 0:M.projects)||[];u(!1),v(L)}).catch(M=>{u(!1),$.error(M.message)})},S=()=>{t(`${q.UNOWNED_DID}/create/none`,{replace:!0})},N=M=>{g(M)},T=()=>{u(!1),p(!0)},I=()=>{p(!1),g(null)},k=M=>{$.error(M.message),p(!1),g(null)},F=M=>{if(!(M!=null&&M.deleted)){$.error("Delete project failed");return}C(),p(!1),g(null)};if(R.useEffect(()=>{C()},[]),!w&&a)return o.jsx(z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:o.jsx(ze,{})});if(!w)return null;if(!w.length)return o.jsxs(z,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[o.jsx(z,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:s("blocklet.publish.blockletEmptyTip")}),o.jsx(z,{sx:{fontSize:14,color:"text.secondary",mb:3},children:s("blocklet.publish.createBlockletTip")}),o.jsx(Ge,{onClick:S,variant:"contained",children:s("blocklet.publish.createBlocklet")})]});const V=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:M=>{const L=w[M];return o.jsx(he,{to:`${L.id}`,children:o.jsx(R1,{did:h.meta.did,projectId:L.id,logo:L.blockletLogo,title:L.blockletTitle,describe:L.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{customBodyRender:M=>M?o.jsx(b0,{type:"success",children:M}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:M=>M?o.jsx(G1,{size:14,compact:!0,responsive:!1,did:M}):null}},i||m?null:{label:s("common.createdBy"),name:"createdBy",options:{customBodyRender:M=>M?o.jsx(G1,{onClick:()=>{t(`/.well-known/service/admin/members?did=${M}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:M}):null}},i||m?null:{label:s("common.scope"),name:"componentDid",options:{customBodyRender:M=>{const L=(h.children||[]).find(H=>H.meta.did===M);return L?o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(v1,{size:14,blocklet:L,ancestors:[h]}),o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:L.meta.title})]},M):""}}},i||l?null:{label:s("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:M=>o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:o.jsx(ge,{children:M})})}},{label:s("common.updatedAt"),name:"updatedAt",options:{customBodyRender:M=>o.jsx(h0,{value:Number(M),locale:n})}},{label:s("common.actions"),name:"actions",options:{customBodyRenderLite:M=>{const L=w[M];return o.jsxs(z,{display:"flex",children:[o.jsx(he,{to:`${L.id}/new-release/${L.lastReleaseId}`,children:o.jsx(ve,{title:s("blocklet.publish.createRelease"),placement:"top",children:o.jsx(ce,{color:"primary","aria-label":"create",children:o.jsx(m2,{style:{fontSize:18}})})})}),!!L.lastReleaseId&&o.jsx(ve,{title:s("blocklet.publish.viewLastRelease",{name:L.blockletTitle}),placement:"top",children:o.jsx(ce,{color:"secondary","aria-label":"create",children:o.jsx(he,{style:{display:"flex"},to:`${L.id}/view/${L.lastReleaseId}`,children:o.jsx(S0,{sx:{fontSize:18}})})})}),o.jsx(ve,{title:s("blocklet.publish.delete",{name:L.blockletTitle}),placement:"top",children:o.jsx(ce,{color:"primary","aria-label":"delete",onClick:()=>N(L),children:o.jsx(g0,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),P=y?o.jsx(Y0,{open:!0,popup:!0,onClose:I,action:"check-has-project-id",locale:n,checkFn:d.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:F,onError:k,extraParams:{projectId:x.id,did:h.meta.did,name:x.blockletTitle},messages:{title:s("blocklet.publish.deleteProject.title",{name:x.blockletTitle}),scan:s("blocklet.publish.deleteProject.scan",{name:x.blockletTitle}),confirm:s("blocklet.publish.deleteProject.confirm"),success:s("blocklet.publish.deleteProject.success")}}):null;return o.jsxs(kt,{children:[o.jsxs(z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[o.jsxs(z,{display:"flex",flexDirection:"row",alignItems:"center",children:[o.jsx(z,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:s("common.blockletStudio")}),o.jsx(ve,{title:s("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:o.jsx(k0,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),o.jsxs(Ge,{onClick:S,variant:"contained",children:[o.jsx(f1,{style:{fontSize:"1.3em",marginRight:4}}),s("blocklet.publish.createBlocklet")]})]}),o.jsx(z,{mt:3}),o.jsx(x1,{className:"main-table",locale:n,data:w,columns:V,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),x&&o.jsx(m1,{title:`${s("common.delete")} ${x.blockletTitle}`,description:s("blocklet.publish.deleteProject.description"),confirm:s("common.confirm"),onConfirm:T,onCancel:()=>g(null),children:o.jsx(z,{sx:{marginTop:2},children:[s("blocklet.publish.deleteProject.tip1"),s("blocklet.publish.deleteProject.tip2"),s("blocklet.publish.deleteProject.tip3")].map(M=>o.jsxs(z,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[o.jsx(v2,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),o.jsx(Q,{component:"span",variant:"inherit",color:"text.secondary",children:M})]}))})}),P]})}C1.propTypes={initUrl:f.object};C1.defaultProps={initUrl:null};const kt=de(z)`
3
3
  .main-table > div:first-child {
4
4
  display: none;
5
5
  }
@@ -133,7 +133,7 @@ import{ao as J0,j as o,aD as oe,cE as u0,aG as A,fg as U1,aF as be,aB as Be,aC a
133
133
  background: #fff;
134
134
  z-index: 10;
135
135
  }
136
- `,_0=({fromBlocklet:e,nodeInfo:t,blocklet:l,userDid:s})=>{var d,a;const n=e?(d=l==null?void 0:l.meta)==null?void 0:d.did:t==null?void 0:t.did;let c=e?((a=l==null?void 0:l.settings)==null?void 0:a.storeList)||[]:(t==null?void 0:t.blockletRegistryList)||[];return c=c.filter(u=>u.protected||!u.scope||u.scope==="studio"||u.scope===s),{teamDid:n,storeList:c}};function V1({blocklet:e,store:t,onChangeStore:l,onClick:s,disabled:n,loading:c,componentDid:d}){var L,H,O;const{t:a}=te(),{session:u}=Ye(),{api:h,info:x,inService:g}=ye(),y=Ne(),[p,i]=R.useState(!1),m=R.useRef(null),[w,v]=R.useState(!1),[C,S]=R.useState(null),N=E=>{l(E),i(!1)},T=()=>{i(!0)},I=E=>{m.current&&m.current.contains(E.target)||i(!1)},k=()=>{v(!0)},F=()=>{v(!1)},V=async()=>{var E;if(C)try{await h.deleteBlockletStore({input:{teamDid:e.meta.did,url:C.url,projectId:"",scope:C.scope||"studio"}}),await((E=y==null?void 0:y.actions)==null?void 0:E.refreshBlocklet())}catch(G){$.error(`Remove Blocklet Store Error: ${Le(G)}`)}finally{S(null)}},{storeList:P}=_0({fromBlocklet:g,blocklet:e,nodeInfo:x,componentDid:d,userDid:(L=u==null?void 0:u.user)==null?void 0:L.did}),M=(H=e==null?void 0:e.meta)==null?void 0:H.did;return o.jsxs(o.Fragment,{children:[o.jsxs(V2,{disabled:n,ref:m,variant:"contained",color:"primary","aria-label":"Button group with connect store",children:[o.jsxs(ae,{onClick:s,children:[c&&o.jsx(We,{size:14,sx:{mr:.5}}),`${a("common.connect")} ${(t==null?void 0:t.name)||""}`]}),o.jsx(ae,{size:"small","aria-controls":p?"split-button-menu":void 0,"aria-expanded":p?"true":void 0,"aria-label":"select merge strategy","aria-haspopup":"menu",onClick:T,children:o.jsx(I2,{})})]}),o.jsx(s2,{sx:{zIndex:10},open:p,anchorEl:m.current,placement:"bottom-end",role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:E})=>o.jsx(n2,{...E,style:{transformOrigin:"center top"},children:o.jsx(m0,{children:o.jsx(i2,{onClickAway:I,children:o.jsxs(a2,{id:"split-button-menu",autoFocusItem:!0,sx:{maxHeight:300,overflowY:"auto"},children:[P.map(G=>{var K;return o.jsxs(q1,{selected:G.id===t.id,sx:{height:56},onClick:()=>N(G),children:[o.jsxs(z,{children:[o.jsx(ge,{sx:{fontSize:"16px"},maxLength:24,children:G.name}),o.jsx(ge,{sx:{fontSize:"13px",opacity:.6},maxLength:30,children:G.url})]}),L2({store:G,userDid:(K=u==null?void 0:u.user)==null?void 0:K.did})&&o.jsx(ce,{sx:{ml:1},onClick:X=>{X.preventDefault(),X.stopPropagation(),S(G)},children:o.jsx(Ke,{icon:"ic:outline-delete"})})]},G.url)}),o.jsx(c2,{}),o.jsxs(q1,{onClick:k,children:[o.jsx(f1,{font:!0}),o.jsx(Q,{variant:"inherit",children:a("store.blockletRegistry.addRegistry")})]})]})})})})}),w&&o.jsx(R0,{hiddenChildren:!0,open:!0,onClose:F,teamDid:M,storeList:P,scope:"studio",onAdd:(O=y==null?void 0:y.actions)==null?void 0:O.refreshBlocklet}),C&&o.jsx(m1,{displayError:!0,title:`${a("common.delete")} ${C.name}`,description:a("blocklet.publish.deleteStoreTip",{name:C.name}),confirm:a("common.confirm"),onConfirm:V,onCancel:()=>S(null)})]})}V1.propTypes={store:f.object,blocklet:f.object,onChangeStore:f.func.isRequired,onClick:f.func.isRequired,loading:f.bool.isRequired,disabled:f.bool.isRequired,componentDid:f.string.isRequired,projectType:f.string.isRequired,getData:f.func.isRequired};V1.defaultProps={store:null,blocklet:null};const o1={};async function B0(e,{interval:t=1e3,maxDuration:l=120*1e3,intervalFirst:s=4e3,timerKey:n=""}){o1[n]&&clearTimeout(o1[n]),await new Promise(a=>setTimeout(a,s));const c=Date.now(),d=async(a,u)=>{try{const h=await e();a(h)}catch(h){Date.now()-c>l?u(h):n?o1[n]=setTimeout(()=>d(a,u),t):setTimeout(()=>d(a,u),t)}};return new Promise(d)}function Al(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)+`${Date.now()}`.slice(-6)}function Ol(e,{did:t,projectId:l,messageId:s}){return B0(async()=>{var c;const n=await e.getProject({input:{did:t,projectId:l,messageId:s}});if(!((c=n==null?void 0:n.project)!=null&&c.blockletDid))throw new Error("Connected store not found");return n.project.blockletDid},{timerKey:"connect-studio"})}function Hl(e,{did:t,projectId:l,storeId:s}){return B0(async()=>{var d,a;const n=await e.getProject({input:{did:t,projectId:l,messageId:""}});if(!((a=(d=n==null?void 0:n.project)==null?void 0:d.connectedStores)!=null&&a.length))throw new Error("Connected store not found");if(!n.project.connectedStores.find(u=>u.storeId===s))throw new Error("Connected store not found")},{timerKey:`connect-store-${s}`})}const l0="lastWantToConnectStoreId";function $l(e){var a,u;const[t,l]=R.useState(null),{session:s}=Ye(),n=R.useCallback(h=>{l(h),localStorage.setItem(l0,h==null?void 0:h.id)},[l]),c=R.useMemo(()=>{var g,y;const h=localStorage.getItem(l0),x=h?(((g=e==null?void 0:e.settings)==null?void 0:g.storeList)||[]).find(p=>p.id===h):null;return x||(((y=e==null?void 0:e.settings)==null?void 0:y.storeList)||[]).find(p=>{var i;return!(p.id!==q.BLOCKLET_STORE.id||p.scope&&p.scope!=="studio"&&p.scope!==((i=s==null?void 0:s.user)==null?void 0:i.did))})},[(a=e==null?void 0:e.settings)==null?void 0:a.storeList,(u=s==null?void 0:s.user)==null?void 0:u.did]);return[t||c,n]}const r0=[".webp",".jpg",".jpeg",".png",".gif",".svg"],s0=1024*1024*10,n0=R.lazy(()=>v0(()=>import("./react-BQtVEjoa.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45])).then(e=>({default:e.Uploader})));function E0({projectId:e,readOnly:t,loading:l,blocklet:s,params:n,setParams:c,paramsErrTip:d,setParamsErrTip:a,setLoading:u,initUrl:h,initLogoUrl:x,setInitLogoUrl:g,componentDid:y}){const{t:p}=te(),{api:i}=ye(),m=p1(),w=R.useRef(null),v=R.useRef(null),[C,S]=$l(s),N=P2({messageType:"connect-store-message",onOpen:()=>u(!0),onClose:()=>u(!1)}),T=async L=>{const H=setTimeout(()=>{u(!1)},2e4),O=await Ol(i,L);u(!1),clearTimeout(H),window.parent.postMessage({event:"studioDialog.connected",componentDid:y},"*"),m(window.location.pathname.replace(`${q.UNOWNED_DID}/create`,`${O}/create`),{replace:!0})},I=()=>{if(!n.blockletTitle){$.error(p("blocklet.publish.errorTip.noTitle"));return}if(!C){$.error("No store found");return}const L=Al();N(async(H,O)=>{var E,G,K;try{const X=await i.connectByStudio({input:{did:(E=s==null?void 0:s.meta)==null?void 0:E.did,blockletTitle:n==null?void 0:n.blockletTitle,storeUrl:C.url,storeId:C.id,storeName:C.name,type:((G=n==null?void 0:n.blockletComponents)==null?void 0:G.length)>0?"pack":"resource",componentDid:y,messageId:L,tenantScope:(h==null?void 0:h.searchParams.get("tenantScope"))||""}});if(!(X!=null&&X.url)){$.error("failed to connect to store");return}O(X.url),T({did:(K=s==null?void 0:s.meta)==null?void 0:K.did,projectId:"",messageId:L})}catch(X){const se=Le(X);$.error(se),u(!1)}})},k=`${q.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/logo/upload`,F=`${q.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/screenshot/upload`,V=n!=null&&n.blockletLogo?`${k}/${n.blockletLogo}`:`${q.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,P=((n==null?void 0:n.blockletScreenshots)||[]).filter(Boolean).map(L=>`${F}/${L}`),M=()=>t?!1:!e||e===q.UNOWNED_DID?($.error(p("blocklet.publish.errorTip.noFirstDid")),!1):!0;return o.jsxs(Fl,{children:[o.jsx(z,{display:"flex",className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(Ie,{disabled:l||t,label:`Blocklet ${p("common.title")}`,placeholder:`Blocklet ${p("common.title")}`,InputProps:{"data-cy":"blocklet-title",readOnly:t},autoComplete:"off",variant:"outlined",fullWidth:!0,required:!0,value:n.blockletTitle||"",onChange:L=>{a({blockletTitle:""}),c({blockletTitle:L.target.value})},error:!!d.blockletTitle,helperText:d.blockletTitle||""}),o.jsx(Ie,{required:!0,label:"Blocklet DID",fullWidth:!0,readonly:!0,disabled:!0,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-did",endAdornment:e===q.UNOWNED_DID&&o.jsx(b1,{position:"end",children:o.jsx(V1,{blocklet:s,store:C,componentDid:y,onChangeStore:S,disabled:!n.blockletTitle||t||l,loading:l,onClick:I})})},error:!!d.projectId,helperText:d.projectId||"",value:e===q.UNOWNED_DID?"":`did:abt:${e}`,sx:{mt:3}}),o.jsx(Ie,{disabled:l||t,label:`Blocklet ${p("common.description")}`,placeholder:`Blocklet ${p("common.description")}`,InputProps:{"data-cy":"blocklet-description",readOnly:t},required:!0,autoComplete:"off",variant:"outlined",fullWidth:!0,value:n.blockletDescription||"",onChange:L=>{a({blockletDescription:""}),c({blockletDescription:L.target.value})},error:!!d.blockletDescription,helperText:d.blockletDescription||"",sx:{mt:3}})]})}),o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(z,{display:"flex",children:[o.jsx(Q,{variant:"subtitle1",sx:{mr:2},children:p("common.logo")}),o.jsx(z,{sx:{flex:1,cursor:t?"default":"pointer"},children:o.jsx(j0,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:x||V,onClick:()=>{M()&&w.current.open()}})})]}),o.jsxs(z,{display:"flex",mt:3,children:[o.jsx(Q,{variant:"subtitle1",sx:{mr:2},children:p("common.screenshot")}),o.jsxs(z,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap"},children:[P.map((L,H)=>o.jsxs(z,{className:"screenshot",children:[o.jsx("img",{alt:"screenshot",src:L}),!t&&o.jsx(ce,{className:"action",onClick:()=>{c(O=>{const E=[...O.blockletScreenshots];return E.splice(H,1),{...O,blockletScreenshots:E}})},children:o.jsx(M2,{})})]},L)),P.length<5&&o.jsx(z,{sx:{width:200,height:140,background:"#eee",cursor:t?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{M()&&v.current.open()},children:"+"})]})]})]})}),o.jsxs(R.Suspense,{fallback:o.jsx(ze,{}),children:[o.jsx(n0,{ref:w,popup:!0,onUploadFinish:L=>{c({blockletLogo:L.data.filename}),g(""),w.current.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:k,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:r0,maxFileSize:s0,maxNumberOfFiles:1}}},"uploader-logo"),o.jsx(n0,{ref:v,popup:!0,onUploadFinish:L=>{c(H=>{var E;const O=H.blockletScreenshots||[];return O.push((E=L.data)==null?void 0:E.filename),{...H,blockletScreenshots:O}}),v.current.close()},plugins:["ImageEditor"],apiPathProps:{uploader:F,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:r0,maxFileSize:s0,maxNumberOfFiles:5-P.length}}},"uploader-screenshot")]})]})}E0.propTypes={projectId:f.string.isRequired,readOnly:f.bool.isRequired,params:f.object.isRequired,setParams:f.func.isRequired,paramsErrTip:f.object.isRequired,setParamsErrTip:f.func.isRequired,loading:f.bool.isRequired,blocklet:f.object.isRequired,setLoading:f.func.isRequired,initUrl:f.object.isRequired,componentDid:f.isRequired,initLogoUrl:f.string.isRequired,setInitLogoUrl:f.func.isRequired};const Fl=de.div`
136
+ `,_0=({fromBlocklet:e,nodeInfo:t,blocklet:l,userDid:s})=>{var d,a;const n=e?(d=l==null?void 0:l.meta)==null?void 0:d.did:t==null?void 0:t.did;let c=e?((a=l==null?void 0:l.settings)==null?void 0:a.storeList)||[]:(t==null?void 0:t.blockletRegistryList)||[];return c=c.filter(u=>u.protected||!u.scope||u.scope==="studio"||u.scope===s),{teamDid:n,storeList:c}};function V1({blocklet:e,store:t,onChangeStore:l,onClick:s,disabled:n,loading:c,componentDid:d}){var L,H,O;const{t:a}=te(),{session:u}=Ye(),{api:h,info:x,inService:g}=ye(),y=Ne(),[p,i]=R.useState(!1),m=R.useRef(null),[w,v]=R.useState(!1),[C,S]=R.useState(null),N=E=>{l(E),i(!1)},T=()=>{i(!0)},I=E=>{m.current&&m.current.contains(E.target)||i(!1)},k=()=>{v(!0)},F=()=>{v(!1)},V=async()=>{var E;if(C)try{await h.deleteBlockletStore({input:{teamDid:e.meta.did,url:C.url,projectId:"",scope:C.scope||"studio"}}),await((E=y==null?void 0:y.actions)==null?void 0:E.refreshBlocklet())}catch(G){$.error(`Remove Blocklet Store Error: ${Le(G)}`)}finally{S(null)}},{storeList:P}=_0({fromBlocklet:g,blocklet:e,nodeInfo:x,componentDid:d,userDid:(L=u==null?void 0:u.user)==null?void 0:L.did}),M=(H=e==null?void 0:e.meta)==null?void 0:H.did;return o.jsxs(o.Fragment,{children:[o.jsxs(V2,{disabled:n,ref:m,variant:"contained",color:"primary","aria-label":"Button group with connect store",children:[o.jsxs(ae,{onClick:s,children:[c&&o.jsx(We,{size:14,sx:{mr:.5}}),`${a("common.connect")} ${(t==null?void 0:t.name)||""}`]}),o.jsx(ae,{size:"small","aria-controls":p?"split-button-menu":void 0,"aria-expanded":p?"true":void 0,"aria-label":"select merge strategy","aria-haspopup":"menu",onClick:T,children:o.jsx(I2,{})})]}),o.jsx(s2,{sx:{zIndex:10},open:p,anchorEl:m.current,placement:"bottom-end",role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:E})=>o.jsx(n2,{...E,style:{transformOrigin:"center top"},children:o.jsx(m0,{children:o.jsx(i2,{onClickAway:I,children:o.jsxs(a2,{id:"split-button-menu",autoFocusItem:!0,sx:{maxHeight:300,overflowY:"auto"},children:[P.map(G=>{var K;return o.jsxs(q1,{selected:G.id===t.id,sx:{height:56},onClick:()=>N(G),children:[o.jsxs(z,{children:[o.jsx(ge,{sx:{fontSize:"16px"},maxLength:24,children:G.name}),o.jsx(ge,{sx:{fontSize:"13px",opacity:.6},maxLength:30,children:G.url})]}),L2({store:G,userDid:(K=u==null?void 0:u.user)==null?void 0:K.did})&&o.jsx(ce,{sx:{ml:1},onClick:X=>{X.preventDefault(),X.stopPropagation(),S(G)},children:o.jsx(Ke,{icon:"ic:outline-delete"})})]},G.url)}),o.jsx(c2,{}),o.jsxs(q1,{onClick:k,children:[o.jsx(f1,{font:!0}),o.jsx(Q,{variant:"inherit",children:a("store.blockletRegistry.addRegistry")})]})]})})})})}),w&&o.jsx(R0,{hiddenChildren:!0,open:!0,onClose:F,teamDid:M,storeList:P,scope:"studio",onAdd:(O=y==null?void 0:y.actions)==null?void 0:O.refreshBlocklet}),C&&o.jsx(m1,{displayError:!0,title:`${a("common.delete")} ${C.name}`,description:a("blocklet.publish.deleteStoreTip",{name:C.name}),confirm:a("common.confirm"),onConfirm:V,onCancel:()=>S(null)})]})}V1.propTypes={store:f.object,blocklet:f.object,onChangeStore:f.func.isRequired,onClick:f.func.isRequired,loading:f.bool.isRequired,disabled:f.bool.isRequired,componentDid:f.string.isRequired,projectType:f.string.isRequired,getData:f.func.isRequired};V1.defaultProps={store:null,blocklet:null};const o1={};async function B0(e,{interval:t=1e3,maxDuration:l=120*1e3,intervalFirst:s=4e3,timerKey:n=""}){o1[n]&&clearTimeout(o1[n]),await new Promise(a=>setTimeout(a,s));const c=Date.now(),d=async(a,u)=>{try{const h=await e();a(h)}catch(h){Date.now()-c>l?u(h):n?o1[n]=setTimeout(()=>d(a,u),t):setTimeout(()=>d(a,u),t)}};return new Promise(d)}function Al(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)+`${Date.now()}`.slice(-6)}function Ol(e,{did:t,projectId:l,messageId:s}){return B0(async()=>{var c;const n=await e.getProject({input:{did:t,projectId:l,messageId:s}});if(!((c=n==null?void 0:n.project)!=null&&c.blockletDid))throw new Error("Connected store not found");return n.project.blockletDid},{timerKey:"connect-studio"})}function Hl(e,{did:t,projectId:l,storeId:s}){return B0(async()=>{var d,a;const n=await e.getProject({input:{did:t,projectId:l,messageId:""}});if(!((a=(d=n==null?void 0:n.project)==null?void 0:d.connectedStores)!=null&&a.length))throw new Error("Connected store not found");if(!n.project.connectedStores.find(u=>u.storeId===s))throw new Error("Connected store not found")},{timerKey:`connect-store-${s}`})}const l0="lastWantToConnectStoreId";function $l(e){var a,u;const[t,l]=R.useState(null),{session:s}=Ye(),n=R.useCallback(h=>{l(h),localStorage.setItem(l0,h==null?void 0:h.id)},[l]),c=R.useMemo(()=>{var g,y;const h=localStorage.getItem(l0),x=h?(((g=e==null?void 0:e.settings)==null?void 0:g.storeList)||[]).find(p=>p.id===h):null;return x||(((y=e==null?void 0:e.settings)==null?void 0:y.storeList)||[]).find(p=>{var i;return!(p.id!==q.BLOCKLET_STORE.id||p.scope&&p.scope!=="studio"&&p.scope!==((i=s==null?void 0:s.user)==null?void 0:i.did))})},[(a=e==null?void 0:e.settings)==null?void 0:a.storeList,(u=s==null?void 0:s.user)==null?void 0:u.did]);return[t||c,n]}const r0=[".webp",".jpg",".jpeg",".png",".gif",".svg"],s0=1024*1024*10,n0=R.lazy(()=>v0(()=>import("./react-Di5TTO9l.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])).then(e=>({default:e.Uploader})));function E0({projectId:e,readOnly:t,loading:l,blocklet:s,params:n,setParams:c,paramsErrTip:d,setParamsErrTip:a,setLoading:u,initUrl:h,initLogoUrl:x,setInitLogoUrl:g,componentDid:y}){const{t:p}=te(),{api:i}=ye(),m=p1(),w=R.useRef(null),v=R.useRef(null),[C,S]=$l(s),N=P2({messageType:"connect-store-message",onOpen:()=>u(!0),onClose:()=>u(!1)}),T=async L=>{const H=setTimeout(()=>{u(!1)},2e4),O=await Ol(i,L);u(!1),clearTimeout(H),window.parent.postMessage({event:"studioDialog.connected",componentDid:y},"*"),m(window.location.pathname.replace(`${q.UNOWNED_DID}/create`,`${O}/create`),{replace:!0})},I=()=>{if(!n.blockletTitle){$.error(p("blocklet.publish.errorTip.noTitle"));return}if(!C){$.error("No store found");return}const L=Al();N(async(H,O)=>{var E,G,K;try{const X=await i.connectByStudio({input:{did:(E=s==null?void 0:s.meta)==null?void 0:E.did,blockletTitle:n==null?void 0:n.blockletTitle,storeUrl:C.url,storeId:C.id,storeName:C.name,type:((G=n==null?void 0:n.blockletComponents)==null?void 0:G.length)>0?"pack":"resource",componentDid:y,messageId:L,tenantScope:(h==null?void 0:h.searchParams.get("tenantScope"))||""}});if(!(X!=null&&X.url)){$.error("failed to connect to store");return}O(X.url),T({did:(K=s==null?void 0:s.meta)==null?void 0:K.did,projectId:"",messageId:L})}catch(X){const se=Le(X);$.error(se),u(!1)}})},k=`${q.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/logo/upload`,F=`${q.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/screenshot/upload`,V=n!=null&&n.blockletLogo?`${k}/${n.blockletLogo}`:`${q.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,P=((n==null?void 0:n.blockletScreenshots)||[]).filter(Boolean).map(L=>`${F}/${L}`),M=()=>t?!1:!e||e===q.UNOWNED_DID?($.error(p("blocklet.publish.errorTip.noFirstDid")),!1):!0;return o.jsxs(Fl,{children:[o.jsx(z,{display:"flex",className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(Ie,{disabled:l||t,label:`Blocklet ${p("common.title")}`,placeholder:`Blocklet ${p("common.title")}`,InputProps:{"data-cy":"blocklet-title",readOnly:t},autoComplete:"off",variant:"outlined",fullWidth:!0,required:!0,value:n.blockletTitle||"",onChange:L=>{a({blockletTitle:""}),c({blockletTitle:L.target.value})},error:!!d.blockletTitle,helperText:d.blockletTitle||""}),o.jsx(Ie,{required:!0,label:"Blocklet DID",fullWidth:!0,readonly:!0,disabled:!0,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-did",endAdornment:e===q.UNOWNED_DID&&o.jsx(b1,{position:"end",children:o.jsx(V1,{blocklet:s,store:C,componentDid:y,onChangeStore:S,disabled:!n.blockletTitle||t||l,loading:l,onClick:I})})},error:!!d.projectId,helperText:d.projectId||"",value:e===q.UNOWNED_DID?"":`did:abt:${e}`,sx:{mt:3}}),o.jsx(Ie,{disabled:l||t,label:`Blocklet ${p("common.description")}`,placeholder:`Blocklet ${p("common.description")}`,InputProps:{"data-cy":"blocklet-description",readOnly:t},required:!0,autoComplete:"off",variant:"outlined",fullWidth:!0,value:n.blockletDescription||"",onChange:L=>{a({blockletDescription:""}),c({blockletDescription:L.target.value})},error:!!d.blockletDescription,helperText:d.blockletDescription||"",sx:{mt:3}})]})}),o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(z,{display:"flex",children:[o.jsx(Q,{variant:"subtitle1",sx:{mr:2},children:p("common.logo")}),o.jsx(z,{sx:{flex:1,cursor:t?"default":"pointer"},children:o.jsx(j0,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:x||V,onClick:()=>{M()&&w.current.open()}})})]}),o.jsxs(z,{display:"flex",mt:3,children:[o.jsx(Q,{variant:"subtitle1",sx:{mr:2},children:p("common.screenshot")}),o.jsxs(z,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap"},children:[P.map((L,H)=>o.jsxs(z,{className:"screenshot",children:[o.jsx("img",{alt:"screenshot",src:L}),!t&&o.jsx(ce,{className:"action",onClick:()=>{c(O=>{const E=[...O.blockletScreenshots];return E.splice(H,1),{...O,blockletScreenshots:E}})},children:o.jsx(M2,{})})]},L)),P.length<5&&o.jsx(z,{sx:{width:200,height:140,background:"#eee",cursor:t?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{M()&&v.current.open()},children:"+"})]})]})]})}),o.jsxs(R.Suspense,{fallback:o.jsx(ze,{}),children:[o.jsx(n0,{ref:w,popup:!0,onUploadFinish:L=>{c({blockletLogo:L.data.filename}),g(""),w.current.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:k,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:r0,maxFileSize:s0,maxNumberOfFiles:1}}},"uploader-logo"),o.jsx(n0,{ref:v,popup:!0,onUploadFinish:L=>{c(H=>{var E;const O=H.blockletScreenshots||[];return O.push((E=L.data)==null?void 0:E.filename),{...H,blockletScreenshots:O}}),v.current.close()},plugins:["ImageEditor"],apiPathProps:{uploader:F,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:r0,maxFileSize:s0,maxNumberOfFiles:5-P.length}}},"uploader-screenshot")]})]})}E0.propTypes={projectId:f.string.isRequired,readOnly:f.bool.isRequired,params:f.object.isRequired,setParams:f.func.isRequired,paramsErrTip:f.object.isRequired,setParamsErrTip:f.func.isRequired,loading:f.bool.isRequired,blocklet:f.object.isRequired,setLoading:f.func.isRequired,initUrl:f.object.isRequired,componentDid:f.isRequired,initLogoUrl:f.string.isRequired,setInitLogoUrl:f.func.isRequired};const Fl=de.div`
137
137
  margin-top: 24px;
138
138
  .screenshot {
139
139
  margin-bottom: 16px;
@@ -178,7 +178,7 @@ import{ao as J0,j as o,aD as oe,cE as u0,aG as A,fg as U1,aF as be,aB as Be,aC a
178
178
  padding-bottom: 12px;
179
179
  border-bottom: ${({theme:e})=>`1px solid ${e.palette.divider}`};
180
180
  }
181
- `;function $0({text:e}){return e?o.jsx(A2,{wrapperElement:{"data-color-mode":"light"},source:e,rehypePlugins:[[O2,{target:"_blank"}]]}):o.jsx(Ce,{Icon:Fe})}$0.propTypes={text:f.string.isRequired};function F0({params:e,setParams:t,paramsErrTip:l,loading:s,setParamsErrTip:n,readOnly:c}){var x;const{t:d}=te(),[a,u]=R.useState(c?"preview":"write"),h=(g,y)=>{u(y)};return o.jsxs(z,{sx:{border:"1px solid #fff",width:"100%",borderRadius:2},children:[o.jsxs(z,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o.jsx(Q,{variant:"h6",fontWeight:"bold",sx:{},children:d("common.introduction")}),o.jsxs(R2,{value:a,onChange:h,"aria-label":"wrapped label tabs example",children:[o.jsx(K1,{value:"write",label:"Write"}),o.jsx(K1,{value:"preview",label:"Preview"})]})]}),o.jsx(z,{display:a==="write"?"block":"none",sx:{width:"100%",marginTop:3},children:o.jsx(Ie,{disabled:s||c,sx:{border:"none"},placeholder:`Blocklet ${d("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:c,endAdornment:o.jsxs(b1,{position:"end",children:[((x=e==null?void 0:e.blockletIntroduction)==null?void 0:x.length)||0," / ",Re.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:e.blockletIntroduction||"",onChange:g=>{n({blockletIntroduction:""}),t({blockletIntroduction:g.target.value.slice(0,Re.PROJECT.MAX_INTRO_LENGTH)})},error:!!l.blockletIntroduction,helperText:l.blockletIntroduction||""})}),o.jsx(z,{display:a==="preview"?"block":"none",mt:3,children:o.jsx($0,{text:e.blockletIntroduction||""})})]})}F0.propTypes={params:f.object.isRequired,setParams:f.func.isRequired,paramsErrTip:f.object.isRequired,setParamsErrTip:f.func.isRequired,readOnly:f.bool.isRequired,loading:f.bool.isRequired};var B1={},Yl=Te;Object.defineProperty(B1,"__esModule",{value:!0});var U0=B1.default=void 0,Zl=Yl(Pe()),i0=o;U0=B1.default=(0,Zl.default)([(0,i0.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,i0.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function E1({step:e,ok:t,active:l,error:s}){let n="grey.500",c=e+1;return t&&(c=o.jsx(H2,{sx:{fontSize:18,margin:0},color:"white"})),s||!t&&l>e?(n="error.main",c=o.jsx(U0,{sx:{fontSize:18,margin:0},color:"white"})):l>=e&&(n="primary.main"),o.jsx(z,{width:24,height:24,bgcolor:n,borderRadius:"100%",color:"white",display:"flex",justifyContent:"center",fontWeight:"bold",fontSize:14,alignItems:"center",children:c})}E1.propTypes={step:f.number,ok:f.bool,active:f.number,error:f.string};E1.defaultProps={step:0,ok:!1,active:0,error:""};function q0({steps:e,activeStep:t,setActiveStep:l,hasSelectedResources:s,params:n,loading:c,paramsErrTip:d,viewMode:a,projectId:u}){const{t:h}=te(),x=()=>{l(i=>i+1)},g=()=>{l(i=>i-1)},y=i=>i===0?(d==null?void 0:d.blockletTitle)||(d==null?void 0:d.projectId)||(d==null?void 0:d.blockletDescription):i===2?d==null?void 0:d.blockletResource:i>=4?(d==null?void 0:d.blockletVersion)||(d==null?void 0:d.note):"",p=a||O0({hasSelectedResources:s,params:n,projectId:u,t:h})===null;return o.jsxs(z,{sx:{width:300,maxWidth:300,minWidth:300,padding:2,border:"1px solid #ccc",borderRadius:2},children:[o.jsx(F2,{activeStep:t,orientation:"vertical",children:e.map((i,m)=>{const w={},v=c||!Gl({hasSelectedResources:s,params:n,projectId:u,step:m,t:h}),C=c?"":y(m);return C&&(w.optional=o.jsx(Q,{variant:"caption",color:"error",children:C}),w.error=!0),o.jsxs(U2,{children:[o.jsx(ht,{icon:o.jsx(E1,{error:C,active:p?99:t,step:m,ok:v}),sx:{cursor:"pointer",color:C?"error.main":"inherit"},disabled:!1,onClick:()=>l(m),...w,children:o.jsx(Q,{fontSize:"14px",fontWeight:"500",color:C||!v&&t>m?"error.main":"inherit",children:i.label})}),o.jsxs(jt,{children:[o.jsx(Q,{fontSize:12,children:i.description}),!p&&o.jsx(z,{sx:{mb:2},children:o.jsxs("div",{children:[m<e.length-1&&o.jsx(ae,{variant:"contained",onClick:x,sx:{mt:1,mr:1},disabled:C||!v,children:h("common.continue")}),m>0&&o.jsx(ae,{disabled:m===0,onClick:g,sx:{mt:1,mr:1},children:h("common.back")})]})})]})]},i.label)})}),t>=e.length-1&&o.jsx(m0,{square:!0,elevation:0,sx:{p:3},children:o.jsx(Q,{fontSize:12,sx:{opacity:.5},children:"Click right top button to release"})})]})}q0.propTypes={steps:f.array.isRequired,activeStep:f.number.isRequired,setActiveStep:f.func.isRequired,params:f.object.isRequired,viewMode:f.string.isRequired,loading:f.bool.isRequired,projectId:f.string.isRequired,hasSelectedResources:f.bool.isRequired,paramsErrTip:f.shape({projectId:f.string,blockletVersion:f.string,blockletTitle:f.string,blockletDescription:f.string,note:f.string,blockletResource:f.string}).isRequired};const e3=[".zip",".gz"],t3=1024*1024*100,o3=R.lazy(()=>v0(()=>import("./react-BQtVEjoa.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45])).then(e=>({default:e.Uploader})));function A1({app:e,projectId:t,readOnly:l,params:s,setParams:n,setParamsErrTip:c,error:d}){const{t:a}=te(),u=R.useRef(null),h=()=>l?!1:!t||t===q.UNOWNED_DID?($.error(a("blocklet.publish.errorTip.noFirstDid")),!1):!0,x=`${q.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e.meta.did}/${t}/resource/upload`;return o.jsxs(z,{sx:{mt:3},children:[o.jsx(Q,{gutterBottom:!0,children:a("blocklet.publish.resourceUpload")}),o.jsxs(y2,{direction:"row",alignItems:"center",spacing:1,sx:{flex:1,cursor:l?"default":"pointer"},children:[!!s.uploadedResource&&o.jsx(Q,{component:"a",href:`${x}/params.uploadedResource`,children:s.uploadedResource}),!l&&o.jsx(ae,{variant:"outlined",size:"small",onClick:()=>{var g;h()&&((g=u.current)==null||g.open())},children:s.uploadedResource?a("common.change"):a("common.upload")})]}),o.jsx(R.Suspense,{fallback:o.jsx(ze,{}),children:o.jsx(o3,{ref:u,popup:!0,onUploadFinish:g=>{var y;n({uploadedResource:g.data.filename}),c({blockletResource:""}),(y=u.current)==null||y.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:x,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:e3,maxFileSize:t3,maxNumberOfFiles:1}}},"uploader-resource")}),!!d&&o.jsx(z,{color:"error.main",mt:1,fontSize:14,children:d})]})}A1.propTypes={app:f.object.isRequired,projectId:f.string.isRequired,readOnly:f.bool.isRequired,params:f.object.isRequired,setParams:f.func.isRequired,error:f.string.isRequired,setParamsErrTip:f.func.isRequired};A1.defaultProps={};function Xe({readOnly:e,params:t,setParams:l,paramsErrTip:s,setParamsErrTip:n,loading:c}){var a;const{t:d}=te();return o.jsx(z,{display:"flex",mt:3,className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(Ie,{required:!0,disabled:c||e,label:`Blocklet ${d("common.version")}`,placeholder:`Blocklet ${d("common.version")}`,InputProps:{"data-cy":"blocklet-version",readOnly:e},autoComplete:"off",variant:"outlined",fullWidth:!0,value:t.blockletVersion||"",onChange:u=>{n({blockletVersion:""}),l({blockletVersion:u.target.value})},error:!!s.blockletVersion,helperText:s.blockletVersion||""}),o.jsx(Ie,{label:d("blocklet.publish.releaseNote"),autoComplete:"off",disabled:c||e,variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:e,endAdornment:o.jsxs(b1,{position:"end",children:[((a=t==null?void 0:t.note)==null?void 0:a.length)||0," / ",Re.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:t.note||"",onChange:u=>{n({note:""}),l({note:u.target.value.slice(0,Re.PROJECT.MAX_NOTE_LENGTH)})},error:!!s.note,helperText:s.note||"",sx:{mt:3}})]})})}Xe.propTypes={readOnly:f.bool.isRequired,params:f.object.isRequired,setParams:f.func.isRequired,paramsErrTip:f.object.isRequired,setParamsErrTip:f.func.isRequired,loading:f.bool.isRequired};Xe.defaultProps={};const l3=({tabs:e,blocklet:t,ancestors:l=[]})=>{const s=t.meta.did;e.push({label:o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(v1,{size:24,blocklet:t,ancestors:l}),o.jsx(z,{ml:"4px",className:"text",children:o.jsx(z,{children:t.meta.title})})]},s),value:s})},a0=(e,t)=>{const l=h1(e,["blockletVersion","blockletTitle","blockletDescription","blockletLogo","blockletIntroduction","blockletScreenshots","connectedStores","blockletComponents","lastReleaseId","uploadedResource","note"]);return l.blockletComponents?l.blockletComponents=l.blockletComponents.map(s=>({...s,included:!0})):l.blockletComponents=(t.children||[]).map(s=>({did:s.meta.did,included:!1,required:!1})),l.resourceFromSelect=!l.uploadedResource,l},r3={0:"branding",1:"introduction",2:"resources",3:"blocklets",4:"version"},c0={branding:0,introduction:1,resources:2,blocklets:3,version:4};function O1({initUrl:e,...t}){var F1;const{projectId:l,mode:s,releaseId:n,componentDid:c=""}=Qe(),{t:d}=te(),{blocklet:a}=Ne(),[u,h]=ke({blockletScreenshots:[],publishedStoreIds:[],connectedStores:[],uploadedResource:"",resourceFromSelect:!0}),[x,g]=ke({}),[y,p]=R.useState(!1),[i,m]=ke(null),{api:w}=ye(),v=$e(D=>D.breakpoints.down("md")),[C,S]=R.useState({}),[N,T]=R.useState(!1),I=R.useRef({}),[k,F]=ke({}),[V,P]=R.useState(""),[M,L]=ke({}),H=e==null?void 0:e.searchParams.get("dependentComponentsMode"),O=H==="readonly",E=R.useCallback(D=>{O&&h({blockletComponents:[]}),L(D)},[O,L,h]),G=R.useCallback((...D)=>{F(...D),g({blockletResource:""})},[]),K=n==="none"?(u==null?void 0:u.lastReleaseId)||"":n,[X,se]=R.useState(s==="new-release"?4:0);R.useEffect(()=>{l&&g({projectId:""})},[l,g]);const je=R.useMemo(()=>{var D;return(D=u==null?void 0:u.blockletComponents)!=null&&D.some(B=>B.included)||u!=null&&u.uploadedResource?"pack":"resource"},[u==null?void 0:u.blockletComponents,u==null?void 0:u.uploadedResource]),le=[],re=((a==null?void 0:a.children)||[]).filter(D=>{var B;return(B=D.meta.resource)==null?void 0:B.exportApi}).filter(D=>!c||D.meta.did===c);re.forEach(D=>{l3({tabs:le,blocklet:D,t:d,ancestors:[a]})});const[W,Y]=R.useState((F1=le[0])==null?void 0:F1.value),U=!N&&(i==null?void 0:i.status)==="published",ee=U,ue=R.useMemo(()=>{const D={};return Object.keys(M).forEach(B=>{const Ue=M[B];Ue&&Ue.forEach(X0=>{D[X0]=!0})}),D},[M]),xe=h2(()=>{if(!e)return;P(e.searchParams.get("logo")),h(B=>({...B,blockletTitle:(B==null?void 0:B.blockletTitle)||e.searchParams.get("title"),blockletDescription:(B==null?void 0:B.blockletDescription)||e.searchParams.get("description"),blockletIntroduction:(B==null?void 0:B.blockletIntroduction)||e.searchParams.get("introduction")||e.searchParams.get("description"),blockletComponents:(B==null?void 0:B.blockletComponents)||JSON.parse(e.searchParams.get("components")||"[]"),note:(B==null?void 0:B.note)||e.searchParams.get("note")||"No note"}));const D=e.searchParams.get("resources");try{const B=JSON.parse(D);S(B)}catch{}}),Z=async()=>{if(K)try{const D=await w.getRelease({input:{did:a.meta.did,projectId:l,releaseId:K}});if(p(!1),!D.release){$.error("Release not found");return}s!=="view"&&(D.release.note=""),h(B=>a0({...B,...D.release,blockletVersion:s==="create"||s==="new-release"?Me.inc(D.release.blockletVersion,"patch"):D.release.blockletVersion},a)),m(D.release)}catch(D){p(!1),$.error(Le(D))}},ne=async()=>{if(l===q.UNOWNED_DID){h({blockletVersion:"1.0.0",blockletTitle:""});return}if(!l){$.error(d("blocklet.publish.errorTip.noDid"));return}try{const D=await w.getProject({input:{did:a.meta.did,projectId:l}});p(!1);const B=D.project||{};B.blockletVersion?(s==="create"||s==="new-release")&&Me.valid(B.blockletVersion)&&(B.blockletVersion=Me.inc(B.blockletVersion,"patch")):B.blockletVersion="1.0.0";const Ue=a0(B,a);h(Ue),B.lastReleaseId||xe()}catch(D){p(!1),$.error(Le(D))}},ie=R.useCallback(async()=>{if(s==="view"){if(!K){$.error("Empty release id");return}await ne(),await Z();return}await ne(),K&&(T(!0),await Z())},[s,K]),_=D=>{h({blockletComponents:D})};R.useEffect(()=>{ie()},[ie]),R.useEffect(()=>{l===q.UNOWNED_DID&&(s==="create"||s==="new-release")&&e&&xe()},[l,e,s,xe]);const J=R.useMemo(()=>!!Object.keys(k).find(D=>!!k[D].length),[k]);if(!u&&y)return o.jsx(ze,{});if(!u)return null;const pe=re.find(D=>D.meta.did===W);if(re.every(D=>D.status!=="running"))return o.jsx(Ce,{children:d("blocklet.publish.allComponentsNotRunning")});const G0=D=>{Y(D)},H1=e==null?void 0:e.searchParams.get("resourcesTitle"),$1=e==null?void 0:e.searchParams.get("componentsTitle"),Se=[{label:d("blocklet.publish.branding"),description:d("blocklet.publish.steps.branding")},{label:d("common.introduction"),description:d("blocklet.publish.steps.introduction")},{label:H1||d("blocklet.publish.resourceTitle"),description:d("blocklet.publish.steps.resources")},{label:$1||d("common.components"),description:d("blocklet.publish.steps.blocklets")},{label:d("blocklet.publish.versionTitle"),description:d("blocklet.publish.steps.version")}],K0=Se[X]||Se[Se.length-1],we=r3[X];return o.jsxs(s3,{...t,children:[o.jsx(H0,{blocklet:a,release:i,getData:ie,getRelease:Z,mode:s,params:u,setParams:h,setParamsErrTip:g,readOnly:ee,isPublished:U,loading:y,setLoading:p,initLogoUrl:V,releaseId:K,projectId:l,projectType:je,resourceComponents:re,resourceComponentsMap:M,resourceRelateComponents:ue,resourceItem:pe,saveSelectedEventsRef:I,hasSelectedResources:J,releaseUsedLast:N,setReleaseUsedLast:T,setRelease:m}),o.jsxs(z,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[o.jsx(z,{pt:3}),o.jsxs(z,{sx:{gap:3},display:"flex",flexDirection:v?"column":"row",children:[!v&&o.jsx(q0,{steps:Se,viewMode:s==="view",params:u,hasSelectedResources:J||u.uploadedResource,paramsErrTip:x,activeStep:X,setActiveStep:se,projectId:l,resourcesUrlTitle:H1,componentsUrlTitle:$1}),o.jsxs(z,{flex:"1",maxWidth:"720px",children:[!v&&we!=="introduction"&&o.jsxs(Q,{variant:"h6",fontWeight:"bold",display:"flex",flexDirection:"row",alignItems:"center",children:[K0.label,we==="branding"&&o.jsx(ve,{title:d("blocklet.publish.brandingHelp"),placement:"right",children:o.jsx(z,{component:"a",target:"_blank",href:"https://www.arcblock.io/docs/blocklet-store/en/blocklet-detail-page",sx:{paddingTop:1,marginLeft:1},style:{color:"gray"},children:o.jsx(w2,{})})})]}),(v||we==="branding")&&o.jsx(z,{flexDirection:"column",children:o.jsx(E0,{projectId:l,setParams:h,setParamsErrTip:g,params:u,componentDid:c,blocklet:a,initUrl:e,loading:y,setLoading:p,paramsErrTip:x,readOnly:ee,initLogoUrl:V,setInitLogoUrl:P})}),v&&o.jsx(z,{flexDirection:"column",children:o.jsx(Xe,{loading:y,params:u,paramsErrTip:x,setParams:h,setParamsErrTip:g,readOnly:ee})}),(v||we==="introduction")&&o.jsx(z,{display:"flex",flexDirection:"column",sx:{mt:v?5:0,width:"100%"},children:o.jsx(F0,{loading:y,readOnly:ee,params:u,setParams:h,paramsErrTip:x,setParamsErrTip:g})}),v&&o.jsx(Q,{variant:"h6",fontWeight:"bold",mt:5,children:Se[c0.resources].label}),o.jsx(z,{display:v||we==="resources"?"flex":"none",sx:{maxWidth:720},flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(q2,{onChange:()=>h({resourceFromSelect:!u.resourceFromSelect}),children:[o.jsx(n1,{value:"select",disabled:ee,control:o.jsx(X1,{size:"small",checked:u.resourceFromSelect}),label:d("blocklet.publish.resourceSelect")}),o.jsx(n1,{value:"select",disabled:ee,control:o.jsx(X1,{size:"small",checked:!u.resourceFromSelect}),label:d("blocklet.publish.resourceUpload")})]}),u.resourceFromSelect&&o.jsxs(o.Fragment,{children:[!c&&o.jsx(C2,{tabs:le,current:W,onChange:G0,sx:{ml:-2,mt:2,maxWidth:v?window.innerWidth-24:"100%"}}),o.jsx(N1,{loading:y,initialResources:C,saveSelectedEventsRef:I,selectedResourceIds:k,setSelectedResourceIds:G,setResourceComponentsMap:E,error:x.blockletResource,app:a,readOnly:ee,component:pe,componentDid:c,initUrl:e,params:u,setParams:h,projectId:l===q.UNOWNED_DID?"":l,releaseUsedLast:N,release:{...i,id:K}})]}),!u.resourceFromSelect&&o.jsx(A1,{app:a,readOnly:ee,projectId:l===q.UNOWNED_DID?"":l,params:u,error:x.blockletResource,setParams:h,setParamsErrTip:g})]})})}),v&&o.jsx(Q,{variant:"h6",fontWeight:"bold",mt:5,children:Se[c0.blocklets].label}),(v||we==="blocklets")&&o.jsx(z,{flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsx(z,{sx:{flex:1},children:o.jsx(S1,{projectType:je,disabled:y||ee,app:a,value:(u==null?void 0:u.blockletComponents)||[],onChange:_,resourceRelateComponents:ue,dependentComponentsMode:H})})})}),!v&&we==="version"&&o.jsx(z,{flexDirection:"column",children:o.jsx(Xe,{loading:y,params:u,paramsErrTip:x,setParams:h,setParamsErrTip:g,readOnly:ee})})]})]})]})]})}O1.propTypes={initUrl:f.object};O1.defaultProps={initUrl:null};const s3=de.div`
181
+ `;function $0({text:e}){return e?o.jsx(A2,{wrapperElement:{"data-color-mode":"light"},source:e,rehypePlugins:[[O2,{target:"_blank"}]]}):o.jsx(Ce,{Icon:Fe})}$0.propTypes={text:f.string.isRequired};function F0({params:e,setParams:t,paramsErrTip:l,loading:s,setParamsErrTip:n,readOnly:c}){var x;const{t:d}=te(),[a,u]=R.useState(c?"preview":"write"),h=(g,y)=>{u(y)};return o.jsxs(z,{sx:{border:"1px solid #fff",width:"100%",borderRadius:2},children:[o.jsxs(z,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o.jsx(Q,{variant:"h6",fontWeight:"bold",sx:{},children:d("common.introduction")}),o.jsxs(R2,{value:a,onChange:h,"aria-label":"wrapped label tabs example",children:[o.jsx(K1,{value:"write",label:"Write"}),o.jsx(K1,{value:"preview",label:"Preview"})]})]}),o.jsx(z,{display:a==="write"?"block":"none",sx:{width:"100%",marginTop:3},children:o.jsx(Ie,{disabled:s||c,sx:{border:"none"},placeholder:`Blocklet ${d("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:c,endAdornment:o.jsxs(b1,{position:"end",children:[((x=e==null?void 0:e.blockletIntroduction)==null?void 0:x.length)||0," / ",Re.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:e.blockletIntroduction||"",onChange:g=>{n({blockletIntroduction:""}),t({blockletIntroduction:g.target.value.slice(0,Re.PROJECT.MAX_INTRO_LENGTH)})},error:!!l.blockletIntroduction,helperText:l.blockletIntroduction||""})}),o.jsx(z,{display:a==="preview"?"block":"none",mt:3,children:o.jsx($0,{text:e.blockletIntroduction||""})})]})}F0.propTypes={params:f.object.isRequired,setParams:f.func.isRequired,paramsErrTip:f.object.isRequired,setParamsErrTip:f.func.isRequired,readOnly:f.bool.isRequired,loading:f.bool.isRequired};var B1={},Yl=Te;Object.defineProperty(B1,"__esModule",{value:!0});var U0=B1.default=void 0,Zl=Yl(Pe()),i0=o;U0=B1.default=(0,Zl.default)([(0,i0.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,i0.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function E1({step:e,ok:t,active:l,error:s}){let n="grey.500",c=e+1;return t&&(c=o.jsx(H2,{sx:{fontSize:18,margin:0},color:"white"})),s||!t&&l>e?(n="error.main",c=o.jsx(U0,{sx:{fontSize:18,margin:0},color:"white"})):l>=e&&(n="primary.main"),o.jsx(z,{width:24,height:24,bgcolor:n,borderRadius:"100%",color:"white",display:"flex",justifyContent:"center",fontWeight:"bold",fontSize:14,alignItems:"center",children:c})}E1.propTypes={step:f.number,ok:f.bool,active:f.number,error:f.string};E1.defaultProps={step:0,ok:!1,active:0,error:""};function q0({steps:e,activeStep:t,setActiveStep:l,hasSelectedResources:s,params:n,loading:c,paramsErrTip:d,viewMode:a,projectId:u}){const{t:h}=te(),x=()=>{l(i=>i+1)},g=()=>{l(i=>i-1)},y=i=>i===0?(d==null?void 0:d.blockletTitle)||(d==null?void 0:d.projectId)||(d==null?void 0:d.blockletDescription):i===2?d==null?void 0:d.blockletResource:i>=4?(d==null?void 0:d.blockletVersion)||(d==null?void 0:d.note):"",p=a||O0({hasSelectedResources:s,params:n,projectId:u,t:h})===null;return o.jsxs(z,{sx:{width:300,maxWidth:300,minWidth:300,padding:2,border:"1px solid #ccc",borderRadius:2},children:[o.jsx(F2,{activeStep:t,orientation:"vertical",children:e.map((i,m)=>{const w={},v=c||!Gl({hasSelectedResources:s,params:n,projectId:u,step:m,t:h}),C=c?"":y(m);return C&&(w.optional=o.jsx(Q,{variant:"caption",color:"error",children:C}),w.error=!0),o.jsxs(U2,{children:[o.jsx(ht,{icon:o.jsx(E1,{error:C,active:p?99:t,step:m,ok:v}),sx:{cursor:"pointer",color:C?"error.main":"inherit"},disabled:!1,onClick:()=>l(m),...w,children:o.jsx(Q,{fontSize:"14px",fontWeight:"500",color:C||!v&&t>m?"error.main":"inherit",children:i.label})}),o.jsxs(jt,{children:[o.jsx(Q,{fontSize:12,children:i.description}),!p&&o.jsx(z,{sx:{mb:2},children:o.jsxs("div",{children:[m<e.length-1&&o.jsx(ae,{variant:"contained",onClick:x,sx:{mt:1,mr:1},disabled:C||!v,children:h("common.continue")}),m>0&&o.jsx(ae,{disabled:m===0,onClick:g,sx:{mt:1,mr:1},children:h("common.back")})]})})]})]},i.label)})}),t>=e.length-1&&o.jsx(m0,{square:!0,elevation:0,sx:{p:3},children:o.jsx(Q,{fontSize:12,sx:{opacity:.5},children:"Click right top button to release"})})]})}q0.propTypes={steps:f.array.isRequired,activeStep:f.number.isRequired,setActiveStep:f.func.isRequired,params:f.object.isRequired,viewMode:f.string.isRequired,loading:f.bool.isRequired,projectId:f.string.isRequired,hasSelectedResources:f.bool.isRequired,paramsErrTip:f.shape({projectId:f.string,blockletVersion:f.string,blockletTitle:f.string,blockletDescription:f.string,note:f.string,blockletResource:f.string}).isRequired};const e3=[".zip",".gz"],t3=1024*1024*100,o3=R.lazy(()=>v0(()=>import("./react-Di5TTO9l.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])).then(e=>({default:e.Uploader})));function A1({app:e,projectId:t,readOnly:l,params:s,setParams:n,setParamsErrTip:c,error:d}){const{t:a}=te(),u=R.useRef(null),h=()=>l?!1:!t||t===q.UNOWNED_DID?($.error(a("blocklet.publish.errorTip.noFirstDid")),!1):!0,x=`${q.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e.meta.did}/${t}/resource/upload`;return o.jsxs(z,{sx:{mt:3},children:[o.jsx(Q,{gutterBottom:!0,children:a("blocklet.publish.resourceUpload")}),o.jsxs(y2,{direction:"row",alignItems:"center",spacing:1,sx:{flex:1,cursor:l?"default":"pointer"},children:[!!s.uploadedResource&&o.jsx(Q,{component:"a",href:`${x}/params.uploadedResource`,children:s.uploadedResource}),!l&&o.jsx(ae,{variant:"outlined",size:"small",onClick:()=>{var g;h()&&((g=u.current)==null||g.open())},children:s.uploadedResource?a("common.change"):a("common.upload")})]}),o.jsx(R.Suspense,{fallback:o.jsx(ze,{}),children:o.jsx(o3,{ref:u,popup:!0,onUploadFinish:g=>{var y;n({uploadedResource:g.data.filename}),c({blockletResource:""}),(y=u.current)==null||y.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:x,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:e3,maxFileSize:t3,maxNumberOfFiles:1}}},"uploader-resource")}),!!d&&o.jsx(z,{color:"error.main",mt:1,fontSize:14,children:d})]})}A1.propTypes={app:f.object.isRequired,projectId:f.string.isRequired,readOnly:f.bool.isRequired,params:f.object.isRequired,setParams:f.func.isRequired,error:f.string.isRequired,setParamsErrTip:f.func.isRequired};A1.defaultProps={};function Xe({readOnly:e,params:t,setParams:l,paramsErrTip:s,setParamsErrTip:n,loading:c}){var a;const{t:d}=te();return o.jsx(z,{display:"flex",mt:3,className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(Ie,{required:!0,disabled:c||e,label:`Blocklet ${d("common.version")}`,placeholder:`Blocklet ${d("common.version")}`,InputProps:{"data-cy":"blocklet-version",readOnly:e},autoComplete:"off",variant:"outlined",fullWidth:!0,value:t.blockletVersion||"",onChange:u=>{n({blockletVersion:""}),l({blockletVersion:u.target.value})},error:!!s.blockletVersion,helperText:s.blockletVersion||""}),o.jsx(Ie,{label:d("blocklet.publish.releaseNote"),autoComplete:"off",disabled:c||e,variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:e,endAdornment:o.jsxs(b1,{position:"end",children:[((a=t==null?void 0:t.note)==null?void 0:a.length)||0," / ",Re.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:t.note||"",onChange:u=>{n({note:""}),l({note:u.target.value.slice(0,Re.PROJECT.MAX_NOTE_LENGTH)})},error:!!s.note,helperText:s.note||"",sx:{mt:3}})]})})}Xe.propTypes={readOnly:f.bool.isRequired,params:f.object.isRequired,setParams:f.func.isRequired,paramsErrTip:f.object.isRequired,setParamsErrTip:f.func.isRequired,loading:f.bool.isRequired};Xe.defaultProps={};const l3=({tabs:e,blocklet:t,ancestors:l=[]})=>{const s=t.meta.did;e.push({label:o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(v1,{size:24,blocklet:t,ancestors:l}),o.jsx(z,{ml:"4px",className:"text",children:o.jsx(z,{children:t.meta.title})})]},s),value:s})},a0=(e,t)=>{const l=h1(e,["blockletVersion","blockletTitle","blockletDescription","blockletLogo","blockletIntroduction","blockletScreenshots","connectedStores","blockletComponents","lastReleaseId","uploadedResource","note"]);return l.blockletComponents?l.blockletComponents=l.blockletComponents.map(s=>({...s,included:!0})):l.blockletComponents=(t.children||[]).map(s=>({did:s.meta.did,included:!1,required:!1})),l.resourceFromSelect=!l.uploadedResource,l},r3={0:"branding",1:"introduction",2:"resources",3:"blocklets",4:"version"},c0={branding:0,introduction:1,resources:2,blocklets:3,version:4};function O1({initUrl:e,...t}){var F1;const{projectId:l,mode:s,releaseId:n,componentDid:c=""}=Qe(),{t:d}=te(),{blocklet:a}=Ne(),[u,h]=ke({blockletScreenshots:[],publishedStoreIds:[],connectedStores:[],uploadedResource:"",resourceFromSelect:!0}),[x,g]=ke({}),[y,p]=R.useState(!1),[i,m]=ke(null),{api:w}=ye(),v=$e(D=>D.breakpoints.down("md")),[C,S]=R.useState({}),[N,T]=R.useState(!1),I=R.useRef({}),[k,F]=ke({}),[V,P]=R.useState(""),[M,L]=ke({}),H=e==null?void 0:e.searchParams.get("dependentComponentsMode"),O=H==="readonly",E=R.useCallback(D=>{O&&h({blockletComponents:[]}),L(D)},[O,L,h]),G=R.useCallback((...D)=>{F(...D),g({blockletResource:""})},[]),K=n==="none"?(u==null?void 0:u.lastReleaseId)||"":n,[X,se]=R.useState(s==="new-release"?4:0);R.useEffect(()=>{l&&g({projectId:""})},[l,g]);const je=R.useMemo(()=>{var D;return(D=u==null?void 0:u.blockletComponents)!=null&&D.some(B=>B.included)||u!=null&&u.uploadedResource?"pack":"resource"},[u==null?void 0:u.blockletComponents,u==null?void 0:u.uploadedResource]),le=[],re=((a==null?void 0:a.children)||[]).filter(D=>{var B;return(B=D.meta.resource)==null?void 0:B.exportApi}).filter(D=>!c||D.meta.did===c);re.forEach(D=>{l3({tabs:le,blocklet:D,t:d,ancestors:[a]})});const[W,Y]=R.useState((F1=le[0])==null?void 0:F1.value),U=!N&&(i==null?void 0:i.status)==="published",ee=U,ue=R.useMemo(()=>{const D={};return Object.keys(M).forEach(B=>{const Ue=M[B];Ue&&Ue.forEach(X0=>{D[X0]=!0})}),D},[M]),xe=h2(()=>{if(!e)return;P(e.searchParams.get("logo")),h(B=>({...B,blockletTitle:(B==null?void 0:B.blockletTitle)||e.searchParams.get("title"),blockletDescription:(B==null?void 0:B.blockletDescription)||e.searchParams.get("description"),blockletIntroduction:(B==null?void 0:B.blockletIntroduction)||e.searchParams.get("introduction")||e.searchParams.get("description"),blockletComponents:(B==null?void 0:B.blockletComponents)||JSON.parse(e.searchParams.get("components")||"[]"),note:(B==null?void 0:B.note)||e.searchParams.get("note")||"No note"}));const D=e.searchParams.get("resources");try{const B=JSON.parse(D);S(B)}catch{}}),Z=async()=>{if(K)try{const D=await w.getRelease({input:{did:a.meta.did,projectId:l,releaseId:K}});if(p(!1),!D.release){$.error("Release not found");return}s!=="view"&&(D.release.note=""),h(B=>a0({...B,...D.release,blockletVersion:s==="create"||s==="new-release"?Me.inc(D.release.blockletVersion,"patch"):D.release.blockletVersion},a)),m(D.release)}catch(D){p(!1),$.error(Le(D))}},ne=async()=>{if(l===q.UNOWNED_DID){h({blockletVersion:"1.0.0",blockletTitle:""});return}if(!l){$.error(d("blocklet.publish.errorTip.noDid"));return}try{const D=await w.getProject({input:{did:a.meta.did,projectId:l}});p(!1);const B=D.project||{};B.blockletVersion?(s==="create"||s==="new-release")&&Me.valid(B.blockletVersion)&&(B.blockletVersion=Me.inc(B.blockletVersion,"patch")):B.blockletVersion="1.0.0";const Ue=a0(B,a);h(Ue),B.lastReleaseId||xe()}catch(D){p(!1),$.error(Le(D))}},ie=R.useCallback(async()=>{if(s==="view"){if(!K){$.error("Empty release id");return}await ne(),await Z();return}await ne(),K&&(T(!0),await Z())},[s,K]),_=D=>{h({blockletComponents:D})};R.useEffect(()=>{ie()},[ie]),R.useEffect(()=>{l===q.UNOWNED_DID&&(s==="create"||s==="new-release")&&e&&xe()},[l,e,s,xe]);const J=R.useMemo(()=>!!Object.keys(k).find(D=>!!k[D].length),[k]);if(!u&&y)return o.jsx(ze,{});if(!u)return null;const pe=re.find(D=>D.meta.did===W);if(re.every(D=>D.status!=="running"))return o.jsx(Ce,{children:d("blocklet.publish.allComponentsNotRunning")});const G0=D=>{Y(D)},H1=e==null?void 0:e.searchParams.get("resourcesTitle"),$1=e==null?void 0:e.searchParams.get("componentsTitle"),Se=[{label:d("blocklet.publish.branding"),description:d("blocklet.publish.steps.branding")},{label:d("common.introduction"),description:d("blocklet.publish.steps.introduction")},{label:H1||d("blocklet.publish.resourceTitle"),description:d("blocklet.publish.steps.resources")},{label:$1||d("common.components"),description:d("blocklet.publish.steps.blocklets")},{label:d("blocklet.publish.versionTitle"),description:d("blocklet.publish.steps.version")}],K0=Se[X]||Se[Se.length-1],we=r3[X];return o.jsxs(s3,{...t,children:[o.jsx(H0,{blocklet:a,release:i,getData:ie,getRelease:Z,mode:s,params:u,setParams:h,setParamsErrTip:g,readOnly:ee,isPublished:U,loading:y,setLoading:p,initLogoUrl:V,releaseId:K,projectId:l,projectType:je,resourceComponents:re,resourceComponentsMap:M,resourceRelateComponents:ue,resourceItem:pe,saveSelectedEventsRef:I,hasSelectedResources:J,releaseUsedLast:N,setReleaseUsedLast:T,setRelease:m}),o.jsxs(z,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[o.jsx(z,{pt:3}),o.jsxs(z,{sx:{gap:3},display:"flex",flexDirection:v?"column":"row",children:[!v&&o.jsx(q0,{steps:Se,viewMode:s==="view",params:u,hasSelectedResources:J||u.uploadedResource,paramsErrTip:x,activeStep:X,setActiveStep:se,projectId:l,resourcesUrlTitle:H1,componentsUrlTitle:$1}),o.jsxs(z,{flex:"1",maxWidth:"720px",children:[!v&&we!=="introduction"&&o.jsxs(Q,{variant:"h6",fontWeight:"bold",display:"flex",flexDirection:"row",alignItems:"center",children:[K0.label,we==="branding"&&o.jsx(ve,{title:d("blocklet.publish.brandingHelp"),placement:"right",children:o.jsx(z,{component:"a",target:"_blank",href:"https://www.arcblock.io/docs/blocklet-store/en/blocklet-detail-page",sx:{paddingTop:1,marginLeft:1},style:{color:"gray"},children:o.jsx(w2,{})})})]}),(v||we==="branding")&&o.jsx(z,{flexDirection:"column",children:o.jsx(E0,{projectId:l,setParams:h,setParamsErrTip:g,params:u,componentDid:c,blocklet:a,initUrl:e,loading:y,setLoading:p,paramsErrTip:x,readOnly:ee,initLogoUrl:V,setInitLogoUrl:P})}),v&&o.jsx(z,{flexDirection:"column",children:o.jsx(Xe,{loading:y,params:u,paramsErrTip:x,setParams:h,setParamsErrTip:g,readOnly:ee})}),(v||we==="introduction")&&o.jsx(z,{display:"flex",flexDirection:"column",sx:{mt:v?5:0,width:"100%"},children:o.jsx(F0,{loading:y,readOnly:ee,params:u,setParams:h,paramsErrTip:x,setParamsErrTip:g})}),v&&o.jsx(Q,{variant:"h6",fontWeight:"bold",mt:5,children:Se[c0.resources].label}),o.jsx(z,{display:v||we==="resources"?"flex":"none",sx:{maxWidth:720},flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(q2,{onChange:()=>h({resourceFromSelect:!u.resourceFromSelect}),children:[o.jsx(n1,{value:"select",disabled:ee,control:o.jsx(X1,{size:"small",checked:u.resourceFromSelect}),label:d("blocklet.publish.resourceSelect")}),o.jsx(n1,{value:"select",disabled:ee,control:o.jsx(X1,{size:"small",checked:!u.resourceFromSelect}),label:d("blocklet.publish.resourceUpload")})]}),u.resourceFromSelect&&o.jsxs(o.Fragment,{children:[!c&&o.jsx(C2,{tabs:le,current:W,onChange:G0,sx:{ml:-2,mt:2,maxWidth:v?window.innerWidth-24:"100%"}}),o.jsx(N1,{loading:y,initialResources:C,saveSelectedEventsRef:I,selectedResourceIds:k,setSelectedResourceIds:G,setResourceComponentsMap:E,error:x.blockletResource,app:a,readOnly:ee,component:pe,componentDid:c,initUrl:e,params:u,setParams:h,projectId:l===q.UNOWNED_DID?"":l,releaseUsedLast:N,release:{...i,id:K}})]}),!u.resourceFromSelect&&o.jsx(A1,{app:a,readOnly:ee,projectId:l===q.UNOWNED_DID?"":l,params:u,error:x.blockletResource,setParams:h,setParamsErrTip:g})]})})}),v&&o.jsx(Q,{variant:"h6",fontWeight:"bold",mt:5,children:Se[c0.blocklets].label}),(v||we==="blocklets")&&o.jsx(z,{flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsx(z,{sx:{flex:1},children:o.jsx(S1,{projectType:je,disabled:y||ee,app:a,value:(u==null?void 0:u.blockletComponents)||[],onChange:_,resourceRelateComponents:ue,dependentComponentsMode:H})})})}),!v&&we==="version"&&o.jsx(z,{flexDirection:"column",children:o.jsx(Xe,{loading:y,params:u,paramsErrTip:x,setParams:h,setParamsErrTip:g,readOnly:ee})})]})]})]})]})}O1.propTypes={initUrl:f.object};O1.defaultProps={initUrl:null};const s3=de.div`
182
182
  .section {
183
183
  &.full-width {
184
184
  max-width: 100%;