@abtnode/blocklet-services 1.16.24-beta-a02d4e5e → 1.16.24-beta-6975c2c0

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/index.js +1 -1
  2. package/api/libs/image.js +0 -5
  3. package/api/middlewares/check-user.js +16 -0
  4. package/api/routes/user-session.js +16 -11
  5. package/api/routes/user.js +28 -13
  6. package/api/services/auth/index.js +2 -0
  7. package/api/services/auth/session.js +11 -13
  8. package/api/util/attach-shared-utils.js +13 -1
  9. package/dist/assets/{Add-vTyteaJS.js → Add-LZzKWXXy.js} +1 -1
  10. package/dist/assets/{Avatar--wC9mrh2.js → Avatar-Baciq3Gb.js} +1 -1
  11. package/dist/assets/Box-pk1M-Oil.js +1 -0
  12. package/dist/assets/Box-u-ODEgip.js +1 -0
  13. package/dist/assets/{Button-ykwLiZ2J.js → Button-ksk2xAo5.js} +1 -1
  14. package/dist/assets/{ButtonBase-2j16Oank.js → ButtonBase-3WX-0uPh.js} +2 -2
  15. package/dist/assets/{ButtonBase-gKUGc3Zq.js → ButtonBase-eCeq6que.js} +2 -2
  16. package/dist/assets/{CardContent-S7jGYoZi.js → CardContent-zbNE3idr.js} +1 -1
  17. package/dist/assets/{CheckCircle-MSun7-U0.js → CheckCircle-9GjxYqfj.js} +1 -1
  18. package/dist/assets/{ChevronLeft-OJEtYKJw.js → ChevronLeft-gU1yt1Nn.js} +1 -1
  19. package/dist/assets/{ChevronRight-Az5bXFdS.js → ChevronRight-Yg0zM5nt.js} +1 -1
  20. package/dist/assets/{Chip-2zwjZf99.js → Chip-6PPjABEd.js} +1 -1
  21. package/dist/assets/{CircularProgress-oRghdnB7.js → CircularProgress-pXmKMTH_.js} +5 -5
  22. package/dist/assets/{Close-UpPcWosj.js → Close-wymOh8kk.js} +1 -1
  23. package/dist/assets/{Collapse-9G0XJCS4.js → Collapse-W3NIbLgW.js} +1 -1
  24. package/dist/assets/{DeleteOutline-oDxVTiXQ.js → DeleteOutline-zFvS1LGy.js} +1 -1
  25. package/dist/assets/{Done-lDz0AHuP.js → Done-K8_gQlru.js} +1 -1
  26. package/dist/assets/{Download-DZZUg84i.js → Download-py3GqphB.js} +1 -1
  27. package/dist/assets/{Edit-xGXK3CYT.js → Edit-kxRFennS.js} +1 -1
  28. package/dist/assets/{EditIcon-vSawnu2L.js → EditIcon-Gr2bDkBf.js} +1 -1
  29. package/dist/assets/{ExpandMore-sVVVrdQE.js → ExpandMore-VMoMsmx1.js} +1 -1
  30. package/dist/assets/{ExpandMore-HZFmUR-a.js → ExpandMore-pFpXkiFR.js} +1 -1
  31. package/dist/assets/{FilterList-cxHEtz0G.js → FilterList-e69RUJ5n.js} +4 -4
  32. package/dist/assets/{FormControlLabel-rf6UEluy.js → FormControlLabel-pf-ht9cT.js} +1 -1
  33. package/dist/assets/{Google-VMrSS3LU.js → Google-9ciNW83T.js} +1 -1
  34. package/dist/assets/{Grid-hq_HvwNl.js → Grid-JBhKrAyG.js} +1 -1
  35. package/dist/assets/{Grid-wusqObpv.js → Grid-UReKTwF7.js} +1 -1
  36. package/dist/assets/{Hidden-GZpNG8Fn.js → Hidden--Wmecvjh.js} +1 -1
  37. package/dist/assets/{IconButton-SWdwxRXE.js → IconButton--4ebnuOv.js} +1 -1
  38. package/dist/assets/{IconButton-pbUOyNxq.js → IconButton-Hymrjowh.js} +3 -3
  39. package/dist/assets/{InfoOutlined-fmfPbKBr.js → InfoOutlined-J39GTyuO.js} +1 -1
  40. package/dist/assets/{InputAdornment-cytNeut4.js → InputAdornment-0_yl6sI6.js} +1 -1
  41. package/dist/assets/{InputAdornment-J9SNlDlG.js → InputAdornment-9NWrCzP7.js} +1 -1
  42. package/dist/assets/{InputLabel-5ZGbi6bW.js → InputLabel-UuNChdMG.js} +1 -1
  43. package/dist/assets/{Launch-wH2P5XtF.js → Launch-qQoThtkn.js} +1 -1
  44. package/dist/assets/{Link-hD326Lst.js → Link-7oZWP_va.js} +1 -1
  45. package/dist/assets/{Link-dqV63oGM.js → Link-nn9uQu2x.js} +1 -1
  46. package/dist/assets/{ListItem-zpF9vl3-.js → ListItem-b-zhB4qt.js} +1 -1
  47. package/dist/assets/{ListItemText-AE7V4fm6.js → ListItemText-6EpzrGrb.js} +1 -1
  48. package/dist/assets/{LockIcon-RX4ACPLP.js → LockIcon-SHr10qIF.js} +1 -1
  49. package/dist/assets/{Loop-J3Oc551N.js → Loop-m9AuMRVm.js} +1 -1
  50. package/dist/assets/{Menu-R2sJfNVQ.js → Menu--qKA-oiM.js} +1 -1
  51. package/dist/assets/{OpenInNew-ey9Zce1G.js → OpenInNew-qIHDFu6m.js} +1 -1
  52. package/dist/assets/{Pagination-_AyYmu3K.js → Pagination-GGaAT7Jg.js} +1 -1
  53. package/dist/assets/{Paper-xnFdFhSU.js → Paper-9-yE_Fq6.js} +1 -1
  54. package/dist/assets/{RevokeIcon-hUSUDMyp.js → RevokeIcon-7XrjjVSK.js} +1 -1
  55. package/dist/assets/{Search-iJmoubNh.js → Search-GOPXDEZu.js} +1 -1
  56. package/dist/assets/{Search-I_yS6r69.js → Search-I57MA0Fi.js} +1 -1
  57. package/dist/assets/{Select-M73NW8co.js → Select-Ln30z3qd.js} +2 -2
  58. package/dist/assets/{ServerLogo-DO0zCcXJ.js → ServerLogo-POzsrdUg.js} +1 -1
  59. package/dist/assets/{Skeleton-si3pCQpt.js → Skeleton-2DXho7pp.js} +2 -2
  60. package/dist/assets/{Stepper-JspwoyL9.js → Stepper-j6t0JGTF.js} +1 -1
  61. package/dist/assets/{TextField-LQ_MEBEr.js → TextField-N3NhCmTv.js} +1 -1
  62. package/dist/assets/{TextField-t2Fc5ZKP.js → TextField-_f9Ib2t7.js} +2 -2
  63. package/dist/assets/{Toolbar-yNKPFPYf.js → Toolbar-xnBXinKK.js} +1 -1
  64. package/dist/assets/{Tooltip-POCM6iwG.js → Tooltip-TWKOxaq7.js} +1 -1
  65. package/dist/assets/{Typography-KrY_5iS6.js → Typography-TOd_XEr_.js} +1 -1
  66. package/dist/assets/{access-control-QBAuY9yE.js → access-control-VMmmRIQn.js} +1 -1
  67. package/dist/assets/{actions-O61MEW97.js → actions-zyudYoXY.js} +1 -1
  68. package/dist/assets/{add-component-core-NQjGVKRe.js → add-component-core-GG7onb-_.js} +33 -33
  69. package/dist/assets/add-resource-IzJ7fbHT.js +1 -0
  70. package/dist/assets/{addon-TQ0rCH75.js → addon-2m04sAeO.js} +1 -1
  71. package/dist/assets/{analytics-8oJDRxnh.js → analytics-6sk6ntLy.js} +1 -1
  72. package/dist/assets/api-OlKdBFAs.js +1 -0
  73. package/dist/assets/{audit-logs-DUiSrbgt.js → audit-logs-XnK8gOWW.js} +1 -1
  74. package/dist/assets/{button-uIqGychf.js → button-87w_Ukx4.js} +1 -1
  75. package/dist/assets/{click-to-copy-Stqj3s2e.js → click-to-copy-gbegHTVT.js} +1 -1
  76. package/dist/assets/{complete-FTJGD-1N.js → complete-hKHPi0ol.js} +1 -1
  77. package/dist/assets/{component-EZRyGvJZ.js → component-CKYpWN4a.js} +1 -1
  78. package/dist/assets/{config-1heXK7PJ.js → config-OeQZdSSi.js} +1 -1
  79. package/dist/assets/{config-navigation-fn_fGXvZ.js → config-navigation-i-EE6_kv.js} +1 -1
  80. package/dist/assets/{config-space-un0A86az.js → config-space-289vg8HP.js} +3 -3
  81. package/dist/assets/{config-VPh3sxvn.js → config-wYXMJIoJ.js} +1 -1
  82. package/dist/assets/{confirm-NdF0-vLf.js → confirm-eEb_5W3C.js} +1 -1
  83. package/dist/assets/{connect-eXeZUYKc.js → connect-FedFWzi2.js} +1 -1
  84. package/dist/assets/{connect-bUr2fIui.js → connect-IHJhS1ef.js} +1 -1
  85. package/dist/assets/{connect-to-jN6NfPLE.js → connect-to-rEv_VtJG.js} +2 -2
  86. package/dist/assets/{content-layout-xv7efLhO.js → content-layout-hErMCLwN.js} +1 -1
  87. package/dist/assets/{createStack-X06a2NYY.js → createStack-CHluQGvB.js} +1 -1
  88. package/dist/assets/{createSvgIcon-WGsmTjmI.js → createSvgIcon-OvER3e1n.js} +1 -1
  89. package/dist/assets/{createSvgIcon-V91OChAf.js → createSvgIcon-SJR__BRH.js} +1 -1
  90. package/dist/assets/{dashboard--flHRbxA.js → dashboard-mz_3k3VV.js} +3 -3
  91. package/dist/assets/{did-address-MOXaSOmL.js → did-address-ZCUuM3p7.js} +1 -1
  92. package/dist/assets/{domain-GsJNX7Pl.js → domain-Q3LSUI-8.js} +1 -1
  93. package/dist/assets/{domain-list-U7SAJAPI.js → domain-list-yV996gjl.js} +2 -2
  94. package/dist/assets/{exchange-passport-__egRbif.js → exchange-passport-wc7qEw91.js} +1 -1
  95. package/dist/assets/{fallback-JR1UKYrN.js → fallback-Xv-L7Mks.js} +1 -1
  96. package/dist/assets/{fuel-B07m2J73.js → fuel-RGXWDQtq.js} +1 -1
  97. package/dist/assets/{fullpage-WwvQZMup.js → fullpage-71A-yQFH.js} +1 -1
  98. package/dist/assets/home-eLiYj1ha.js +1 -0
  99. package/dist/assets/{iframe-QRp9-qFU.js → iframe-4nyWXcTE.js} +1 -1
  100. package/dist/assets/{index-iPbuZCut.js → index--v_SJzgf.js} +1 -1
  101. package/dist/assets/{index-LpR2xL_I.js → index-067nd4Au.js} +1 -1
  102. package/dist/assets/{index-R9oRnky0.js → index-1CtoAYuN.js} +1 -1
  103. package/dist/assets/{index-AaoUHVVG.js → index-7TBJ1kJc.js} +2 -2
  104. package/dist/assets/{index-LTzQUJ4f.js → index-APK4pG1u.js} +1 -1
  105. package/dist/assets/{index-JA9h4YXr.js → index-AfOBr6AB.js} +1 -1
  106. package/dist/assets/index-AtawSjHz.js +57 -0
  107. package/dist/assets/{index-fJ0BL_e2.js → index-CAJT68WX.js} +1 -1
  108. package/dist/assets/index-CzCGz7a7.js +1 -0
  109. package/dist/assets/{index-rKkwz9HV.js → index-DVdEsdn8.js} +1 -1
  110. package/dist/assets/{index-dEUBD3Ek.js → index-DxfEAFvP.js} +1 -1
  111. package/dist/assets/{index-nec3CBP4.js → index-Kxa_ePD2.js} +1 -1
  112. package/dist/assets/{index-xF6Zrp48.js → index-L_N419JN.js} +1 -1
  113. package/dist/assets/{index-uucW8lyA.js → index-Lb1ehBCY.js} +137 -137
  114. package/dist/assets/{index-wM_dFbiP.js → index-M6Qe-jI_.js} +1 -1
  115. package/dist/assets/{index-qJop2tcw.js → index-N2Ezp28q.js} +1 -1
  116. package/dist/assets/{index-mxv-cWe1.js → index-Qj5J1wHh.js} +5 -5
  117. package/dist/assets/{index-0Pkf3xUv.js → index-Qm2-r4K_.js} +1 -1
  118. package/dist/assets/{index-7Vx2WCKR.js → index-SJgBi99q.js} +1 -1
  119. package/dist/assets/{index-OP9njHuS.js → index-Yk_Xni0x.js} +1 -1
  120. package/dist/assets/{index-nugxBGaB.js → index-_FFFPAUw.js} +1 -1
  121. package/dist/assets/{index-5q2qBS2A.js → index-aYnPjJkB.js} +1 -1
  122. package/dist/assets/index-fjKBcmH5.js +1 -0
  123. package/dist/assets/{index-xvy96ScB.js → index-h0sgaNFg.js} +3 -3
  124. package/dist/assets/{index-jXu4Dpk_.js → index-hVryq7Sp.js} +1 -1
  125. package/dist/assets/{index-MQ5sCiv0.js → index-kDsXFd69.js} +1 -1
  126. package/dist/assets/{index-S9D-ycna.js → index-kwL0I4Wk.js} +6 -6
  127. package/dist/assets/{index-rLUXQvhq.js → index-l0N5TN7m.js} +9 -9
  128. package/dist/assets/{index-SAJDoXAy.js → index-sq_uK9Ea.js} +3 -3
  129. package/dist/assets/{index-1Jk_G-9Y.js → index-utNtlSrF.js} +1 -1
  130. package/dist/assets/{index-IwH7C-Ko.js → index-xEfydoyO.js} +1 -1
  131. package/dist/assets/{index.es-z1twp67m.js → index.es-Gd_7EjLV.js} +2 -2
  132. package/dist/assets/{index.esm-aWTu2T01.js → index.esm-13cF7kZn.js} +1 -1
  133. package/dist/assets/{invitation-XLGa-pmm.js → invitation-ATSj-mdg.js} +1 -1
  134. package/dist/assets/{invite-cKqEzS2M.js → invite-8fJRRJDU.js} +1 -1
  135. package/dist/assets/{issue-passport-ILQvH9s3.js → issue-passport-ALJ4LERP.js} +1 -1
  136. package/dist/assets/{jss-plugin-props-sort.esm-UoBHPEWO.js → jss-plugin-props-sort.esm-4Jo3IMMB.js} +1 -1
  137. package/dist/assets/{launch-result-message-9HKjtLws.js → launch-result-message-2Tk7smd-.js} +1 -1
  138. package/dist/assets/{layout-L6_gNEgb.js → layout-t8AuT3eZ.js} +1 -1
  139. package/dist/assets/{list-header-0W-lcNEo.js → list-header-wXDG5LBO.js} +1 -1
  140. package/dist/assets/{listItemButtonClasses-NYOJixt3.js → listItemButtonClasses-Ae_e1-No.js} +1 -1
  141. package/dist/assets/localization-8RqW246V.js +1 -0
  142. package/dist/assets/{log-pZr6zM4h.js → log-Cb2YJGrF.js} +1 -1
  143. package/dist/assets/{login-P2wJbw6C.js → login-q2pL4dsp.js} +1 -1
  144. package/dist/assets/{logo-uploader-uogalgrW.js → logo-uploader-6K4_X7Po.js} +3 -3
  145. package/dist/assets/{lost-passport-mo-weWhq.js → lost-passport-gSdi28un.js} +3 -3
  146. package/dist/assets/{lottie-skotHrQT.js → lottie-kQ2xv--6.js} +1 -1
  147. package/dist/assets/{notifications-PPAwwS3Q.js → notifications-ZISqOX0a.js} +1 -1
  148. package/dist/assets/{overview-OOHYj1Q3.js → overview-sZ5BzRTI.js} +1 -1
  149. package/dist/assets/{page-header-zijGZ0Cx.js → page-header-6P2EpXF4.js} +1 -1
  150. package/dist/assets/{permission-6mOSjcdS.js → permission-OS0PzIT6.js} +1 -1
  151. package/dist/assets/{preferences-N_0iYWAP.js → preferences-Z_IC4nhp.js} +1 -1
  152. package/dist/assets/publish-resource-wxmmgOuK.js +1 -0
  153. package/dist/assets/{react-1-wuzDEA.js → react-c0JPgnZb.js} +3 -3
  154. package/dist/assets/{selector-ckYcvYGI.js → selector--YzbGRVD.js} +3 -3
  155. package/dist/assets/session-b-ow1RpF.js +1 -0
  156. package/dist/assets/{setup-ZPQqv7iq.js → setup-SgrcP2x-.js} +3 -3
  157. package/dist/assets/{slicedToArray-3_3ts97I.js → slicedToArray-oSUzPFdO.js} +1 -1
  158. package/dist/assets/{spaces-2TPvVFS1.js → spaces-QaY2264X.js} +1 -1
  159. package/dist/assets/{start-0rD0U6t7.js → start-bZtRlTDD.js} +1 -1
  160. package/dist/assets/{step-actions-iRZymf2P.js → step-actions-HFGR5bXP.js} +1 -1
  161. package/dist/assets/{studio-W4Vc_AGz.js → studio-ieBsoOA2.js} +1 -1
  162. package/dist/assets/{styled-xYo1pInp.js → styled-T50_bxwD.js} +1 -1
  163. package/dist/assets/{switch-control--QORsX6_.js → switch-control-Jc2zn8vk.js} +1 -1
  164. package/dist/assets/{toUpper-q-l4gWRl.js → toUpper-JRDZSLI-.js} +1 -1
  165. package/dist/assets/{transfer-PhNYj9ZK.js → transfer-aKSH1Uy1.js} +1 -1
  166. package/dist/assets/{uniqBy-l9QHyf00.js → uniqBy-pTynGO58.js} +1 -1
  167. package/dist/assets/{unsubscribe-FUenmxnt.js → unsubscribe-C8dEs1Ba.js} +1 -1
  168. package/dist/assets/{use-blocklet-info-for-connect-did-spaces-V6x21iaX.js → use-blocklet-info-for-connect-did-spaces-VkRWACiT.js} +1 -1
  169. package/dist/assets/{useAsync-sivFle8p.js → useAsync-WK9qvtNg.js} +1 -1
  170. package/dist/assets/{useLocalStorage-BhVXzkpi.js → useLocalStorage-bpwznFaJ.js} +1 -1
  171. package/dist/assets/{useMediaQuery-vIbaAqXb.js → useMediaQuery-wdcDHB2A.js} +1 -1
  172. package/dist/assets/{useSetState-8jGDsuv3.js → useSetState-DuNs4WQl.js} +1 -1
  173. package/dist/assets/{useSlotProps-1tP3JLmt.js → useSlotProps-bCjso8dX.js} +1 -1
  174. package/dist/assets/useTheme-3PhpBKHL.js +1 -0
  175. package/dist/assets/user-center-KRbkkANH.js +1 -0
  176. package/dist/assets/{util-HUv70eWD.js → util-peZ-5-3t.js} +1 -1
  177. package/dist/assets/{wrap-locale-wqIa2Ntp.js → wrap-locale-twPH_GVN.js} +1 -1
  178. package/dist/index.html +1 -1
  179. package/dist/service-worker.js +1 -1
  180. package/package.json +23 -23
  181. package/dist/assets/Box-w0hFB2y0.js +0 -1
  182. package/dist/assets/Box-wX7WNHof.js +0 -1
  183. package/dist/assets/add-resource-MJ63NHNw.js +0 -1
  184. package/dist/assets/api-OOifZ58k.js +0 -1
  185. package/dist/assets/home-0llsKSBK.js +0 -1
  186. package/dist/assets/index-aw1T-I5M.js +0 -57
  187. package/dist/assets/index-eB9Ifmty.js +0 -1
  188. package/dist/assets/index-jWqA6yOs.js +0 -1
  189. package/dist/assets/localization-kcWeWxhs.js +0 -1
  190. package/dist/assets/publish-resource-GJWeIB7T.js +0 -1
  191. package/dist/assets/session-dO7Ct3kg.js +0 -1
  192. package/dist/assets/useTheme-E3mdEt0J.js +0 -1
  193. package/dist/assets/user-center-W3YE5xaW.js +0 -1
package/api/index.js CHANGED
@@ -282,8 +282,8 @@ module.exports = function createServer(node, serverOptions = {}) {
282
282
  // API: auth
283
283
  createOAuthRoutes.init(server, node, options);
284
284
  createFederatedRoutes.init(server, node, options);
285
- createUserSessionRoutes.init(server, node, options);
286
285
  createUserRoutes.init(server, node, options);
286
+ createUserSessionRoutes.init(server, node, options);
287
287
  createEnvRoutes.init(server, node, options);
288
288
  createBlockletRoutes.init(server, node);
289
289
  createConnectSessionRoutes.init(server, node, options);
package/api/libs/image.js CHANGED
@@ -142,11 +142,6 @@ const processImage = (src, extension, dest, params) => {
142
142
  reject(err);
143
143
  });
144
144
 
145
- if (extension === 'svg') {
146
- src.pipe(out);
147
- return;
148
- }
149
-
150
145
  const {
151
146
  imageFilter,
152
147
  w: width,
@@ -0,0 +1,16 @@
1
+ const checkUser = async (req, res, next) => {
2
+ if (req.user) {
3
+ next();
4
+ return;
5
+ }
6
+
7
+ const { token } = req;
8
+ await req.ensureUser({ token });
9
+ if (!req.user) {
10
+ res.status(401).json({ error: 'not login' });
11
+ } else {
12
+ next();
13
+ }
14
+ };
15
+
16
+ module.exports = checkUser;
@@ -17,12 +17,12 @@ const { createTokenFn, getDidConnectVersion } = require('../util');
17
17
  const prefix = `${WELLKNOWN_SERVICE_PATH_PREFIX}/api/user-session`;
18
18
  const limit = pLimit(5);
19
19
 
20
- async function getPassportRole(passportId, { node, teamDid }) {
20
+ async function getPassport(passportId, { node, teamDid }) {
21
21
  const passport = await node.getPassportById({ teamDid, passportId });
22
- return passport?.role;
22
+ return passport;
23
23
  }
24
24
 
25
- async function getPassportRoleFromFederatedSite(passportId, { appPid, node, teamDid, federated }) {
25
+ async function getPassportFromFederatedSite(passportId, { appPid, node, teamDid, federated }) {
26
26
  const currentSite = federated.sites.find((x) => x.appPid === appPid);
27
27
  if (currentSite) {
28
28
  const passport = await node.getPassportFromFederated({
@@ -30,7 +30,7 @@ async function getPassportRoleFromFederatedSite(passportId, { appPid, node, team
30
30
  passportId,
31
31
  teamDid,
32
32
  });
33
- return passport?.role;
33
+ return passport;
34
34
  }
35
35
  return undefined;
36
36
  }
@@ -55,12 +55,12 @@ async function patchUserSessionData(userSession, { blocklet, appPid, teamDid, no
55
55
  }
56
56
 
57
57
  // 通过 userSession 信息判断 passport 对应的 role(针对 appPid 做转换)
58
- let role;
58
+ let passport;
59
59
  if (userSession.passportId) {
60
60
  if (appPid === teamDid) {
61
- role = await getPassportRole(userSession?.passportId, { node, teamDid });
61
+ passport = await getPassport(userSession?.passportId, { node, teamDid });
62
62
  } else {
63
- role = await getPassportRoleFromFederatedSite(userSession.passportId, {
63
+ passport = await getPassportFromFederatedSite(userSession.passportId, {
64
64
  appPid,
65
65
  node,
66
66
  teamDid,
@@ -68,9 +68,14 @@ async function patchUserSessionData(userSession, { blocklet, appPid, teamDid, no
68
68
  });
69
69
  }
70
70
  } else {
71
- role = userSession.user.role;
71
+ passport = {
72
+ role: userSession.user.role,
73
+ name: userSession.user.role,
74
+ title: userSession.user.role,
75
+ };
72
76
  }
73
- userSession.user.role = role || 'guest';
77
+ userSession.user.role = passport?.role || 'guest';
78
+ userSession.user.roleTitle = passport?.title || 'guest';
74
79
  }
75
80
 
76
81
  module.exports = {
@@ -232,9 +237,9 @@ module.exports = {
232
237
  app.get(`${prefix}`, ensureBlocklet(), async (req, res) => {
233
238
  const { blocklet } = req;
234
239
  const teamDid = blocklet.appPid;
235
- const { visitorId, userDid, appPid = teamDid } = req.query;
240
+ const { userDid, visitorId, appPid = teamDid } = req.query;
236
241
 
237
- if (!visitorId) {
242
+ if (!visitorId && !userDid) {
238
243
  res.json([]);
239
244
  return;
240
245
  }
@@ -23,6 +23,7 @@ const verifySig = require('../middlewares/verify-sig');
23
23
  const { getAvatarByEmail } = require('../libs/auth/utils');
24
24
  const logger = require('../libs/logger')('user');
25
25
  const ensureBlocklet = require('../middlewares/ensure-blocklet');
26
+ const checkUser = require('../middlewares/check-user');
26
27
  const { getUserWithinFederated, getUserAvatarUrl } = require('../util/federated');
27
28
 
28
29
  const validateUser = (user) => {
@@ -54,16 +55,6 @@ const translations = {
54
55
  },
55
56
  };
56
57
 
57
- const checkUser = async (req, res, next) => {
58
- const { token } = req;
59
- await req.ensureUser({ token });
60
- if (!req.user) {
61
- res.status(403).json(null);
62
- } else {
63
- next();
64
- }
65
- };
66
-
67
58
  const t = createTranslator({ translations });
68
59
 
69
60
  async function checkNeedInvite({ req, node, teamDid, componentId, locale }) {
@@ -556,11 +547,35 @@ module.exports = {
556
547
  }
557
548
  res.json({});
558
549
  });
550
+ // FIXME: @zhanghan 为了方便用户执行退出,临时开放 get 方法的调用方式
551
+ server.get(`${prefixApi}/logout`, ensureBlocklet(), async (req, res) => {
552
+ if (req.user) {
553
+ const { blocklet } = req;
554
+ const teamDid = blocklet.appPid;
555
+ const { visitorId } = req.query;
556
+ if (!visitorId) {
557
+ res.status(400).json({ error: 'visitorId is required' });
558
+ return;
559
+ }
560
+
561
+ await node.logoutUser({
562
+ userDid: req.user.did,
563
+ visitorId,
564
+ appPid: teamDid,
565
+ teamDid,
566
+ });
567
+ }
568
+ res.json({});
569
+ });
559
570
 
560
571
  // public api
561
572
  server.get(`${prefixApi}/privacy/config`, ensureBlocklet(), async (req, res) => {
562
- const inputSchema = Joi.DID().required();
563
- const { error, value } = inputSchema.validate(req.query.did);
573
+ const inputSchema = Joi.object({
574
+ userDid: Joi.DID().required(),
575
+ });
576
+ const { error, value } = inputSchema.validate({
577
+ userDid: req.query?.did,
578
+ });
564
579
  if (error) {
565
580
  res.status(400).send({ error: error.details[0].message });
566
581
  return;
@@ -568,7 +583,7 @@ module.exports = {
568
583
 
569
584
  const { blocklet } = req;
570
585
  const teamDid = blocklet.appPid;
571
- const user = await node.getUser({ teamDid, user: { did: value } });
586
+ const user = await node.getUser({ teamDid, user: { did: value.userDid } });
572
587
  res.json(user?.extra?.privacy || {});
573
588
  });
574
589
  server.post(`${prefixApi}/privacy/config`, checkUser, ensureBlocklet(), async (req, res) => {
@@ -281,6 +281,7 @@ const init = ({ node, options }) => {
281
281
  return;
282
282
  }
283
283
 
284
+ // FIXME: @zhanghan ws 如何处理 cookie 已过期的情况
284
285
  await req.ensureUser({ token });
285
286
  };
286
287
 
@@ -294,6 +295,7 @@ const init = ({ node, options }) => {
294
295
  return;
295
296
  }
296
297
 
298
+ // FIXME: @zhanghan ws 如何处理 cookie 已过期的情况
297
299
  await req.ensureUser({ token });
298
300
 
299
301
  setUserInfoHeaders(req);
@@ -15,6 +15,7 @@ const { LOGIN_PROVIDER } = require('@blocklet/constant');
15
15
  const isUrl = require('is-url');
16
16
  const { PREFIXES } = require('../../util/constants');
17
17
  const { createTokenFn, getDidConnectVersion } = require('../../util');
18
+ const checkUser = require('../../middlewares/check-user');
18
19
 
19
20
  module.exports = {
20
21
  init(router, node, createSessionToken, options) {
@@ -26,15 +27,15 @@ module.exports = {
26
27
 
27
28
  PREFIXES.forEach((prefix) => {
28
29
  const handleSession = async (req, res) => {
30
+ const teamDid = req.getBlockletDid();
29
31
  const { token } = req;
30
- await req.ensureUser({ token });
31
-
32
+ const { visitorId, appPid = teamDid } = req.query;
33
+ await req.ensureUser({ token, visitorId, appPid });
32
34
  if (!req.user) {
33
35
  res.json({ user: null });
34
36
  return;
35
37
  }
36
38
 
37
- const teamDid = req.getBlockletDid();
38
39
  const blocklet = await req.getBlocklet();
39
40
  // FIXME: this code have performance issue
40
41
  const user = await node.getUser({ teamDid, user: { did: req.user.did } });
@@ -72,15 +73,6 @@ module.exports = {
72
73
 
73
74
  // update user extra: settings, webhooks
74
75
  const extraApi = `${prefix}/api/user/extra`;
75
- const checkUser = async (req, res, next) => {
76
- const { token } = req;
77
- await req.ensureUser({ token });
78
- if (!req.user) {
79
- res.status(403).json(null);
80
- } else {
81
- next();
82
- }
83
- };
84
76
  router.get(extraApi, nocache(), sessionBearerToken, checkUser, async (req, res) => {
85
77
  const teamDid = req.getBlockletDid();
86
78
  const user = await node.getUser({ teamDid, user: { did: req.user.did } });
@@ -151,8 +143,14 @@ module.exports = {
151
143
  router.post(`${prefix}/api/did/refreshSession`, refreshBearerToken, async (req, res) => {
152
144
  const token = req.refreshToken;
153
145
  if (token) {
146
+ const teamDid = req.getBlockletDid();
147
+ const { visitorId, appPid = teamDid } = req.query;
148
+ await req.ensureUser({ token, visitorId, appPid });
149
+ if (!req.user) {
150
+ res.status(400).send('user session is logout');
151
+ return;
152
+ }
154
153
  try {
155
- const teamDid = req.getBlockletDid();
156
154
  const { secret } = await req.getBlockletInfo();
157
155
  const blocklet = await req.getBlocklet();
158
156
 
@@ -111,7 +111,7 @@ module.exports = ({ node, req, options }) => {
111
111
  /**
112
112
  * set user info to req.user
113
113
  */
114
- req.ensureUser = async ({ token } = {}) => {
114
+ req.ensureUser = async ({ token, visitorId, appPid } = {}) => {
115
115
  try {
116
116
  if (token) {
117
117
  const teamDid = req.getBlockletDid();
@@ -122,6 +122,17 @@ module.exports = ({ node, req, options }) => {
122
122
  };
123
123
 
124
124
  const user = await verifySessionToken(token, secret, opt);
125
+ if (user && visitorId) {
126
+ const userSessions = await node.getUserSession({
127
+ teamDid,
128
+ appPid,
129
+ userDid: user.did,
130
+ visitorId,
131
+ });
132
+ if (userSessions.length === 0) {
133
+ return;
134
+ }
135
+ }
125
136
  req.user = user;
126
137
  }
127
138
  } catch {
@@ -130,6 +141,7 @@ module.exports = ({ node, req, options }) => {
130
141
  };
131
142
 
132
143
  req.attachSetupToken = async ({ res, token }) => {
144
+ // NOTICE: 这里不需要考虑 visitorId,只需要保证 token 是有效的即可
133
145
  await req.ensureUser({ token });
134
146
 
135
147
  if (req.user) {
@@ -1 +1 @@
1
- import{k as r,j as t}from"./index-uucW8lyA.js";import{r as a}from"./createSvgIcon-V91OChAf.js";var e={},o=r;Object.defineProperty(e,"__esModule",{value:!0});var u=e.default=void 0,d=o(a()),v=t;u=e.default=(0,d.default)((0,v.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");export{u as d};
1
+ import{k as r,j as t}from"./index-Lb1ehBCY.js";import{r as a}from"./createSvgIcon-SJR__BRH.js";var e={},o=r;Object.defineProperty(e,"__esModule",{value:!0});var u=e.default=void 0,d=o(a()),v=t;u=e.default=(0,d.default)((0,v.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");export{u as d};
@@ -1 +1 @@
1
- import{j as d,a as j,g as C,_ as n,r as g,f as I,h as D,i as M}from"./index-uucW8lyA.js";import{s as m,u as P}from"./styled-xYo1pInp.js";import{c as w}from"./createSvgIcon-V91OChAf.js";const F=w(d.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function N(a){return j("MuiAvatar",a)}C("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const z=["alt","children","className","component","imgProps","sizes","src","srcSet","variant"],S=a=>{const{classes:e,variant:r,colorDefault:t}=a;return M({root:["root",r,t&&"colorDefault"],img:["img"],fallback:["fallback"]},N,e)},U=m("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(a,e)=>{const{ownerState:r}=a;return[e.root,e[r.variant],r.colorDefault&&e.colorDefault]}})(({theme:a,ownerState:e})=>n({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:a.typography.fontFamily,fontSize:a.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},e.variant==="rounded"&&{borderRadius:(a.vars||a).shape.borderRadius},e.variant==="square"&&{borderRadius:0},e.colorDefault&&n({color:(a.vars||a).palette.background.default},a.vars?{backgroundColor:a.vars.palette.Avatar.defaultBg}:{backgroundColor:a.palette.mode==="light"?a.palette.grey[400]:a.palette.grey[600]}))),_=m("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(a,e)=>e.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),E=m(F,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(a,e)=>e.fallback})({width:"75%",height:"75%"});function L({crossOrigin:a,referrerPolicy:e,src:r,srcSet:t}){const[s,l]=g.useState(!1);return g.useEffect(()=>{if(!r&&!t)return;l(!1);let i=!0;const o=new Image;return o.onload=()=>{i&&l("loaded")},o.onerror=()=>{i&&l("error")},o.crossOrigin=a,o.referrerPolicy=e,o.src=r,t&&(o.srcset=t),()=>{i=!1}},[a,e,r,t]),s}const q=g.forwardRef(function(e,r){const t=P({props:e,name:"MuiAvatar"}),{alt:s,children:l,className:i,component:o="div",imgProps:h,sizes:A,src:f,srcSet:v,variant:y="circular"}=t,R=I(t,z);let c=null;const k=L(n({},h,{src:f,srcSet:v})),b=f||v,x=b&&k!=="error",u=n({},t,{colorDefault:!x,component:o,variant:y}),p=S(u);return x?c=d.jsx(_,n({alt:s,srcSet:v,src:f,sizes:A,ownerState:u,className:p.img},h)):l!=null?c=l:b&&s?c=s[0]:c=d.jsx(E,{ownerState:u,className:p.fallback}),d.jsx(U,n({as:o,ownerState:u,className:D(p.root,i),ref:r},R,{children:c}))}),W=q;export{W as A};
1
+ import{j as d,a as j,g as C,_ as n,r as g,f as I,h as D,i as M}from"./index-Lb1ehBCY.js";import{s as m,u as P}from"./styled-T50_bxwD.js";import{c as w}from"./createSvgIcon-SJR__BRH.js";const F=w(d.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function N(a){return j("MuiAvatar",a)}C("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const z=["alt","children","className","component","imgProps","sizes","src","srcSet","variant"],S=a=>{const{classes:e,variant:r,colorDefault:t}=a;return M({root:["root",r,t&&"colorDefault"],img:["img"],fallback:["fallback"]},N,e)},U=m("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(a,e)=>{const{ownerState:r}=a;return[e.root,e[r.variant],r.colorDefault&&e.colorDefault]}})(({theme:a,ownerState:e})=>n({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:a.typography.fontFamily,fontSize:a.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},e.variant==="rounded"&&{borderRadius:(a.vars||a).shape.borderRadius},e.variant==="square"&&{borderRadius:0},e.colorDefault&&n({color:(a.vars||a).palette.background.default},a.vars?{backgroundColor:a.vars.palette.Avatar.defaultBg}:{backgroundColor:a.palette.mode==="light"?a.palette.grey[400]:a.palette.grey[600]}))),_=m("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(a,e)=>e.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),E=m(F,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(a,e)=>e.fallback})({width:"75%",height:"75%"});function L({crossOrigin:a,referrerPolicy:e,src:r,srcSet:t}){const[s,l]=g.useState(!1);return g.useEffect(()=>{if(!r&&!t)return;l(!1);let i=!0;const o=new Image;return o.onload=()=>{i&&l("loaded")},o.onerror=()=>{i&&l("error")},o.crossOrigin=a,o.referrerPolicy=e,o.src=r,t&&(o.srcset=t),()=>{i=!1}},[a,e,r,t]),s}const q=g.forwardRef(function(e,r){const t=P({props:e,name:"MuiAvatar"}),{alt:s,children:l,className:i,component:o="div",imgProps:h,sizes:A,src:f,srcSet:v,variant:y="circular"}=t,R=I(t,z);let c=null;const k=L(n({},h,{src:f,srcSet:v})),b=f||v,x=b&&k!=="error",u=n({},t,{colorDefault:!x,component:o,variant:y}),p=S(u);return x?c=d.jsx(_,n({alt:s,srcSet:v,src:f,sizes:A,ownerState:u,className:p.img},h)):l!=null?c=l:b&&s?c=s[0]:c=d.jsx(E,{ownerState:u,className:p.fallback}),d.jsx(U,n({as:o,ownerState:u,className:D(p.root,i),ref:r},R,{children:c}))}),W=q;export{W as A};
@@ -0,0 +1 @@
1
+ import{g as e,c5 as s,c6 as a,c7 as t,c8 as o}from"./index-Lb1ehBCY.js";const r=e("MuiBox",["root"]),c=r,l=s(),n=a({themeId:t,defaultTheme:l,defaultClassName:c.root,generateClassName:o.generate}),x=n;export{x as B};
@@ -0,0 +1 @@
1
+ import{c as e,T as s}from"./styled-T50_bxwD.js";import{g as a,c6 as o,c8 as t}from"./index-Lb1ehBCY.js";const r=a("MuiBox",["root"]),c=r,m=e(),l=o({themeId:s,defaultTheme:m,defaultClassName:c.root,generateClassName:t.generate}),C=l;export{C as B};
@@ -1 +1 @@
1
- import{g as V,a as j,c as r,_ as n,d as p,r as g,e as O,f as _,j as b,h as R,i as F}from"./index-uucW8lyA.js";import{s as z,r as U,u as G}from"./styled-xYo1pInp.js";import{f as H,g as A}from"./dashboard--flHRbxA.js";import{B as D}from"./IconButton-pbUOyNxq.js";function q(o){return j("MuiButton",o)}const J=V("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),u=J,K=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],Q=o=>{const{color:a,disableElevation:i,fullWidth:s,size:t,variant:l,classes:e}=o,v={root:["root",l,`${l}${r(a)}`,`size${r(t)}`,`${l}Size${r(t)}`,a==="inherit"&&"colorInherit",i&&"disableElevation",s&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${r(t)}`],endIcon:["endIcon",`iconSize${r(t)}`]},x=F(v,q,e);return n({},e,x)},h=o=>n({},o.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},o.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},o.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),X=z(D,{shouldForwardProp:o=>U(o)||o==="classes",name:"MuiButton",slot:"Root",overridesResolver:(o,a)=>{const{ownerState:i}=o;return[a.root,a[i.variant],a[`${i.variant}${r(i.color)}`],a[`size${r(i.size)}`],a[`${i.variant}Size${r(i.size)}`],i.color==="inherit"&&a.colorInherit,i.disableElevation&&a.disableElevation,i.fullWidth&&a.fullWidth]}})(({theme:o,ownerState:a})=>{var i,s;const t=o.palette.mode==="light"?o.palette.grey[300]:o.palette.grey[800],l=o.palette.mode==="light"?o.palette.grey.A100:o.palette.grey[700];return n({},o.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(o.vars||o).shape.borderRadius,transition:o.transitions.create(["background-color","box-shadow","border-color","color"],{duration:o.transitions.duration.short}),"&:hover":n({textDecoration:"none",backgroundColor:o.vars?`rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})`:p(o.palette.text.primary,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},a.variant==="text"&&a.color!=="inherit"&&{backgroundColor:o.vars?`rgba(${o.vars.palette[a.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})`:p(o.palette[a.color].main,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},a.variant==="outlined"&&a.color!=="inherit"&&{border:`1px solid ${(o.vars||o).palette[a.color].main}`,backgroundColor:o.vars?`rgba(${o.vars.palette[a.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})`:p(o.palette[a.color].main,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},a.variant==="contained"&&{backgroundColor:o.vars?o.vars.palette.Button.inheritContainedHoverBg:l,boxShadow:(o.vars||o).shadows[4],"@media (hover: none)":{boxShadow:(o.vars||o).shadows[2],backgroundColor:(o.vars||o).palette.grey[300]}},a.variant==="contained"&&a.color!=="inherit"&&{backgroundColor:(o.vars||o).palette[a.color].dark,"@media (hover: none)":{backgroundColor:(o.vars||o).palette[a.color].main}}),"&:active":n({},a.variant==="contained"&&{boxShadow:(o.vars||o).shadows[8]}),[`&.${u.focusVisible}`]:n({},a.variant==="contained"&&{boxShadow:(o.vars||o).shadows[6]}),[`&.${u.disabled}`]:n({color:(o.vars||o).palette.action.disabled},a.variant==="outlined"&&{border:`1px solid ${(o.vars||o).palette.action.disabledBackground}`},a.variant==="contained"&&{color:(o.vars||o).palette.action.disabled,boxShadow:(o.vars||o).shadows[0],backgroundColor:(o.vars||o).palette.action.disabledBackground})},a.variant==="text"&&{padding:"6px 8px"},a.variant==="text"&&a.color!=="inherit"&&{color:(o.vars||o).palette[a.color].main},a.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},a.variant==="outlined"&&a.color!=="inherit"&&{color:(o.vars||o).palette[a.color].main,border:o.vars?`1px solid rgba(${o.vars.palette[a.color].mainChannel} / 0.5)`:`1px solid ${p(o.palette[a.color].main,.5)}`},a.variant==="contained"&&{color:o.vars?o.vars.palette.text.primary:(i=(s=o.palette).getContrastText)==null?void 0:i.call(s,o.palette.grey[300]),backgroundColor:o.vars?o.vars.palette.Button.inheritContainedBg:t,boxShadow:(o.vars||o).shadows[2]},a.variant==="contained"&&a.color!=="inherit"&&{color:(o.vars||o).palette[a.color].contrastText,backgroundColor:(o.vars||o).palette[a.color].main},a.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},a.size==="small"&&a.variant==="text"&&{padding:"4px 5px",fontSize:o.typography.pxToRem(13)},a.size==="large"&&a.variant==="text"&&{padding:"8px 11px",fontSize:o.typography.pxToRem(15)},a.size==="small"&&a.variant==="outlined"&&{padding:"3px 9px",fontSize:o.typography.pxToRem(13)},a.size==="large"&&a.variant==="outlined"&&{padding:"7px 21px",fontSize:o.typography.pxToRem(15)},a.size==="small"&&a.variant==="contained"&&{padding:"4px 10px",fontSize:o.typography.pxToRem(13)},a.size==="large"&&a.variant==="contained"&&{padding:"8px 22px",fontSize:o.typography.pxToRem(15)},a.fullWidth&&{width:"100%"})},({ownerState:o})=>o.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${u.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${u.disabled}`]:{boxShadow:"none"}}),Y=z("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(o,a)=>{const{ownerState:i}=o;return[a.startIcon,a[`iconSize${r(i.size)}`]]}})(({ownerState:o})=>n({display:"inherit",marginRight:8,marginLeft:-4},o.size==="small"&&{marginLeft:-2},h(o))),Z=z("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(o,a)=>{const{ownerState:i}=o;return[a.endIcon,a[`iconSize${r(i.size)}`]]}})(({ownerState:o})=>n({display:"inherit",marginRight:-4,marginLeft:8},o.size==="small"&&{marginRight:-2},h(o))),w=g.forwardRef(function(a,i){const s=g.useContext(H),t=g.useContext(A),l=O(s,a),e=G({props:l,name:"MuiButton"}),{children:v,color:x="primary",component:f="button",className:k,disabled:C=!1,disableElevation:E=!1,disableFocusRipple:y=!1,endIcon:$,focusVisibleClassName:m,fullWidth:P=!1,size:W="medium",startIcon:I,type:B,variant:M="text"}=e,N=_(e,K),d=n({},e,{color:x,component:f,disabled:C,disableElevation:E,disableFocusRipple:y,fullWidth:P,size:W,type:B,variant:M}),c=Q(d),L=I&&b.jsx(Y,{className:c.startIcon,ownerState:d,children:I}),T=$&&b.jsx(Z,{className:c.endIcon,ownerState:d,children:$}),S=t||"";return b.jsxs(X,n({ownerState:d,className:R(s.className,c.root,k,S),component:f,disabled:C,focusRipple:!y,focusVisibleClassName:R(c.focusVisible,m),ref:i,type:B},N,{classes:c,children:[L,v,T]}))}),ro=w;export{ro as B};
1
+ import{g as V,a as j,c as r,_ as n,d as p,r as g,e as O,f as _,j as b,h as R,i as F}from"./index-Lb1ehBCY.js";import{s as z,r as U,u as G}from"./styled-T50_bxwD.js";import{f as H,g as A}from"./dashboard-mz_3k3VV.js";import{B as D}from"./IconButton-Hymrjowh.js";function q(o){return j("MuiButton",o)}const J=V("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),u=J,K=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],Q=o=>{const{color:a,disableElevation:i,fullWidth:s,size:t,variant:l,classes:e}=o,v={root:["root",l,`${l}${r(a)}`,`size${r(t)}`,`${l}Size${r(t)}`,a==="inherit"&&"colorInherit",i&&"disableElevation",s&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${r(t)}`],endIcon:["endIcon",`iconSize${r(t)}`]},x=F(v,q,e);return n({},e,x)},h=o=>n({},o.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},o.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},o.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),X=z(D,{shouldForwardProp:o=>U(o)||o==="classes",name:"MuiButton",slot:"Root",overridesResolver:(o,a)=>{const{ownerState:i}=o;return[a.root,a[i.variant],a[`${i.variant}${r(i.color)}`],a[`size${r(i.size)}`],a[`${i.variant}Size${r(i.size)}`],i.color==="inherit"&&a.colorInherit,i.disableElevation&&a.disableElevation,i.fullWidth&&a.fullWidth]}})(({theme:o,ownerState:a})=>{var i,s;const t=o.palette.mode==="light"?o.palette.grey[300]:o.palette.grey[800],l=o.palette.mode==="light"?o.palette.grey.A100:o.palette.grey[700];return n({},o.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(o.vars||o).shape.borderRadius,transition:o.transitions.create(["background-color","box-shadow","border-color","color"],{duration:o.transitions.duration.short}),"&:hover":n({textDecoration:"none",backgroundColor:o.vars?`rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})`:p(o.palette.text.primary,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},a.variant==="text"&&a.color!=="inherit"&&{backgroundColor:o.vars?`rgba(${o.vars.palette[a.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})`:p(o.palette[a.color].main,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},a.variant==="outlined"&&a.color!=="inherit"&&{border:`1px solid ${(o.vars||o).palette[a.color].main}`,backgroundColor:o.vars?`rgba(${o.vars.palette[a.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})`:p(o.palette[a.color].main,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},a.variant==="contained"&&{backgroundColor:o.vars?o.vars.palette.Button.inheritContainedHoverBg:l,boxShadow:(o.vars||o).shadows[4],"@media (hover: none)":{boxShadow:(o.vars||o).shadows[2],backgroundColor:(o.vars||o).palette.grey[300]}},a.variant==="contained"&&a.color!=="inherit"&&{backgroundColor:(o.vars||o).palette[a.color].dark,"@media (hover: none)":{backgroundColor:(o.vars||o).palette[a.color].main}}),"&:active":n({},a.variant==="contained"&&{boxShadow:(o.vars||o).shadows[8]}),[`&.${u.focusVisible}`]:n({},a.variant==="contained"&&{boxShadow:(o.vars||o).shadows[6]}),[`&.${u.disabled}`]:n({color:(o.vars||o).palette.action.disabled},a.variant==="outlined"&&{border:`1px solid ${(o.vars||o).palette.action.disabledBackground}`},a.variant==="contained"&&{color:(o.vars||o).palette.action.disabled,boxShadow:(o.vars||o).shadows[0],backgroundColor:(o.vars||o).palette.action.disabledBackground})},a.variant==="text"&&{padding:"6px 8px"},a.variant==="text"&&a.color!=="inherit"&&{color:(o.vars||o).palette[a.color].main},a.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},a.variant==="outlined"&&a.color!=="inherit"&&{color:(o.vars||o).palette[a.color].main,border:o.vars?`1px solid rgba(${o.vars.palette[a.color].mainChannel} / 0.5)`:`1px solid ${p(o.palette[a.color].main,.5)}`},a.variant==="contained"&&{color:o.vars?o.vars.palette.text.primary:(i=(s=o.palette).getContrastText)==null?void 0:i.call(s,o.palette.grey[300]),backgroundColor:o.vars?o.vars.palette.Button.inheritContainedBg:t,boxShadow:(o.vars||o).shadows[2]},a.variant==="contained"&&a.color!=="inherit"&&{color:(o.vars||o).palette[a.color].contrastText,backgroundColor:(o.vars||o).palette[a.color].main},a.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},a.size==="small"&&a.variant==="text"&&{padding:"4px 5px",fontSize:o.typography.pxToRem(13)},a.size==="large"&&a.variant==="text"&&{padding:"8px 11px",fontSize:o.typography.pxToRem(15)},a.size==="small"&&a.variant==="outlined"&&{padding:"3px 9px",fontSize:o.typography.pxToRem(13)},a.size==="large"&&a.variant==="outlined"&&{padding:"7px 21px",fontSize:o.typography.pxToRem(15)},a.size==="small"&&a.variant==="contained"&&{padding:"4px 10px",fontSize:o.typography.pxToRem(13)},a.size==="large"&&a.variant==="contained"&&{padding:"8px 22px",fontSize:o.typography.pxToRem(15)},a.fullWidth&&{width:"100%"})},({ownerState:o})=>o.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${u.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${u.disabled}`]:{boxShadow:"none"}}),Y=z("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(o,a)=>{const{ownerState:i}=o;return[a.startIcon,a[`iconSize${r(i.size)}`]]}})(({ownerState:o})=>n({display:"inherit",marginRight:8,marginLeft:-4},o.size==="small"&&{marginLeft:-2},h(o))),Z=z("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(o,a)=>{const{ownerState:i}=o;return[a.endIcon,a[`iconSize${r(i.size)}`]]}})(({ownerState:o})=>n({display:"inherit",marginRight:-4,marginLeft:8},o.size==="small"&&{marginRight:-2},h(o))),w=g.forwardRef(function(a,i){const s=g.useContext(H),t=g.useContext(A),l=O(s,a),e=G({props:l,name:"MuiButton"}),{children:v,color:x="primary",component:f="button",className:k,disabled:C=!1,disableElevation:E=!1,disableFocusRipple:y=!1,endIcon:$,focusVisibleClassName:m,fullWidth:P=!1,size:W="medium",startIcon:I,type:B,variant:M="text"}=e,N=_(e,K),d=n({},e,{color:x,component:f,disabled:C,disableElevation:E,disableFocusRipple:y,fullWidth:P,size:W,type:B,variant:M}),c=Q(d),L=I&&b.jsx(Y,{className:c.startIcon,ownerState:d,children:I}),T=$&&b.jsx(Z,{className:c.endIcon,ownerState:d,children:$}),S=t||"";return b.jsxs(X,n({ownerState:d,className:R(s.className,c.root,k,S),component:f,disabled:C,focusRipple:!y,focusVisibleClassName:R(c.focusVisible,m),ref:i,type:B},N,{classes:c,children:[L,v,T]}))}),ro=w;export{ro as B};
@@ -1,4 +1,4 @@
1
- import{r as t,h as T,j as N,g as ue,bU as Z,s as v,u as ce,f as pe,_ as W,bV as Se,a as Ne,W as ne,V as Ie,aE as H,i as Ue}from"./index-uucW8lyA.js";function je(s){const{className:M,classes:a,pulsate:l=!1,rippleX:k,rippleY:n,rippleSize:c,in:L,onExited:p,timeout:i}=s,[d,h]=t.useState(!1),f=T(M,a.ripple,a.rippleVisible,l&&a.ripplePulsate),x={width:c,height:c,top:-(c/2)+n,left:-(c/2)+k},r=T(a.child,d&&a.childLeaving,l&&a.childPulsate);return!L&&!d&&h(!0),t.useEffect(()=>{if(!L&&p!=null){const m=setTimeout(p,i);return()=>{clearTimeout(m)}}},[p,L,i]),N.jsx("span",{className:f,style:x,children:N.jsx("span",{className:r})})}const u=ue("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Fe=["center","classes","className"];let O=s=>s,ie,re,ae,le;const Q=550,Ke=80,_e=Z(ie||(ie=O`
1
+ import{r as t,h as T,j as N,g as ue,bV as Z,s as v,u as ce,f as pe,_ as H,bW as Se,a as Ne,W as ne,V as Ie,aE as W,i as Ue}from"./index-Lb1ehBCY.js";function je(s){const{className:M,classes:a,pulsate:l=!1,rippleX:k,rippleY:n,rippleSize:c,in:L,onExited:p,timeout:i}=s,[d,h]=t.useState(!1),f=T(M,a.ripple,a.rippleVisible,l&&a.ripplePulsate),x={width:c,height:c,top:-(c/2)+n,left:-(c/2)+k},r=T(a.child,d&&a.childLeaving,l&&a.childPulsate);return!L&&!d&&h(!0),t.useEffect(()=>{if(!L&&p!=null){const m=setTimeout(p,i);return()=>{clearTimeout(m)}}},[p,L,i]),N.jsx("span",{className:f,style:x,children:N.jsx("span",{className:r})})}const u=ue("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Fe=["center","classes","className"];let O=s=>s,ie,re,ae,le;const Q=550,Ke=80,_e=Z(ie||(ie=O`
2
2
  0% {
3
3
  transform: scale(0);
4
4
  opacity: 0.1;
@@ -71,4 +71,4 @@ import{r as t,h as T,j as N,g as ue,bU as Z,s as v,u as ce,f as pe,_ as W,bV as
71
71
  animation-iteration-count: infinite;
72
72
  animation-delay: 200ms;
73
73
  }
74
- `),u.rippleVisible,_e,Q,({theme:s})=>s.transitions.easing.easeInOut,u.ripplePulsate,({theme:s})=>s.transitions.duration.shorter,u.child,u.childLeaving,ze,Q,({theme:s})=>s.transitions.easing.easeInOut,u.childPulsate,Ae,({theme:s})=>s.transitions.easing.easeInOut),He=t.forwardRef(function(M,a){const l=ce({props:M,name:"MuiTouchRipple"}),{center:k=!1,classes:n={},className:c}=l,L=pe(l,Fe),[p,i]=t.useState([]),d=t.useRef(0),h=t.useRef(null);t.useEffect(()=>{h.current&&(h.current(),h.current=null)},[p]);const f=t.useRef(!1),x=t.useRef(0),r=t.useRef(null),m=t.useRef(null);t.useEffect(()=>()=>{x.current&&clearTimeout(x.current)},[]);const F=t.useCallback(o=>{const{pulsate:b,rippleX:R,rippleY:D,rippleSize:j,cb:_}=o;i(g=>[...g,N.jsx(Ye,{classes:{ripple:T(n.ripple,u.ripple),rippleVisible:T(n.rippleVisible,u.rippleVisible),ripplePulsate:T(n.ripplePulsate,u.ripplePulsate),child:T(n.child,u.child),childLeaving:T(n.childLeaving,u.childLeaving),childPulsate:T(n.childPulsate,u.childPulsate)},timeout:Q,pulsate:b,rippleX:R,rippleY:D,rippleSize:j},d.current)]),d.current+=1,h.current=_},[n]),I=t.useCallback((o={},b={},R=()=>{})=>{const{pulsate:D=!1,center:j=k||b.pulsate,fakeElement:_=!1}=b;if((o==null?void 0:o.type)==="mousedown"&&f.current){f.current=!1;return}(o==null?void 0:o.type)==="touchstart"&&(f.current=!0);const g=_?null:m.current,V=g?g.getBoundingClientRect():{width:0,height:0,left:0,top:0};let C,w,E;if(j||o===void 0||o.clientX===0&&o.clientY===0||!o.clientX&&!o.touches)C=Math.round(V.width/2),w=Math.round(V.height/2);else{const{clientX:$,clientY:B}=o.touches&&o.touches.length>0?o.touches[0]:o;C=Math.round($-V.left),w=Math.round(B-V.top)}if(j)E=Math.sqrt((2*V.width**2+V.height**2)/3),E%2===0&&(E+=1);else{const $=Math.max(Math.abs((g?g.clientWidth:0)-C),C)*2+2,B=Math.max(Math.abs((g?g.clientHeight:0)-w),w)*2+2;E=Math.sqrt($**2+B**2)}o!=null&&o.touches?r.current===null&&(r.current=()=>{F({pulsate:D,rippleX:C,rippleY:w,rippleSize:E,cb:R})},x.current=setTimeout(()=>{r.current&&(r.current(),r.current=null)},Ke)):F({pulsate:D,rippleX:C,rippleY:w,rippleSize:E,cb:R})},[k,F]),K=t.useCallback(()=>{I({},{pulsate:!0})},[I]),U=t.useCallback((o,b)=>{if(clearTimeout(x.current),(o==null?void 0:o.type)==="touchend"&&r.current){r.current(),r.current=null,x.current=setTimeout(()=>{U(o,b)});return}r.current=null,i(R=>R.length>0?R.slice(1):R),h.current=b},[]);return t.useImperativeHandle(a,()=>({pulsate:K,start:I,stop:U}),[K,I,U]),N.jsx(Xe,W({className:T(u.root,n.root,c),ref:m},L,{children:N.jsx(Se,{component:null,exit:!0,children:p})}))}),We=He;function Oe(s){return Ne("MuiButtonBase",s)}const qe=ue("MuiButtonBase",["root","disabled","focusVisible"]),Ge=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Je=s=>{const{disabled:M,focusVisible:a,focusVisibleClassName:l,classes:k}=s,c=Ue({root:["root",M&&"disabled",a&&"focusVisible"]},Oe,k);return a&&l&&(c.root+=` ${l}`),c},Qe=v("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(s,M)=>M.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${qe.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Ze=t.forwardRef(function(M,a){const l=ce({props:M,name:"MuiButtonBase"}),{action:k,centerRipple:n=!1,children:c,className:L,component:p="button",disabled:i=!1,disableRipple:d=!1,disableTouchRipple:h=!1,focusRipple:f=!1,LinkComponent:x="a",onBlur:r,onClick:m,onContextMenu:F,onDragLeave:I,onFocus:K,onFocusVisible:U,onKeyDown:o,onKeyUp:b,onMouseDown:R,onMouseLeave:D,onMouseUp:j,onTouchEnd:_,onTouchMove:g,onTouchStart:V,tabIndex:C=0,TouchRippleProps:w,touchRippleRef:E,type:$}=l,B=pe(l,Ge),z=t.useRef(null),y=t.useRef(null),fe=ne(y,E),{isFocusVisibleRef:ee,onFocus:de,onBlur:he,ref:me}=Ie(),[S,X]=t.useState(!1);i&&S&&X(!1),t.useImperativeHandle(k,()=>({focusVisible:()=>{X(!0),z.current.focus()}}),[]);const[q,be]=t.useState(!1);t.useEffect(()=>{be(!0)},[]);const Re=q&&!d&&!i;t.useEffect(()=>{S&&f&&!d&&q&&y.current.pulsate()},[d,f,S,q]);function P(e,oe,$e=h){return H(se=>(oe&&oe(se),!$e&&y.current&&y.current[e](se),!0))}const ge=P("start",R),ye=P("stop",F),Te=P("stop",I),Me=P("stop",j),xe=P("stop",e=>{S&&e.preventDefault(),D&&D(e)}),Ce=P("start",V),Be=P("stop",_),Pe=P("stop",g),ke=P("stop",e=>{he(e),ee.current===!1&&X(!1),r&&r(e)},!1),Ve=H(e=>{z.current||(z.current=e.currentTarget),de(e),ee.current===!0&&(X(!0),U&&U(e)),K&&K(e)}),G=()=>{const e=z.current;return p&&p!=="button"&&!(e.tagName==="A"&&e.href)},J=t.useRef(!1),we=H(e=>{f&&!J.current&&S&&y.current&&e.key===" "&&(J.current=!0,y.current.stop(e,()=>{y.current.start(e)})),e.target===e.currentTarget&&G()&&e.key===" "&&e.preventDefault(),o&&o(e),e.target===e.currentTarget&&G()&&e.key==="Enter"&&!i&&(e.preventDefault(),m&&m(e))}),Ee=H(e=>{f&&e.key===" "&&y.current&&S&&!e.defaultPrevented&&(J.current=!1,y.current.stop(e,()=>{y.current.pulsate(e)})),b&&b(e),m&&e.target===e.currentTarget&&G()&&e.key===" "&&!e.defaultPrevented&&m(e)});let Y=p;Y==="button"&&(B.href||B.to)&&(Y=x);const A={};Y==="button"?(A.type=$===void 0?"button":$,A.disabled=i):(!B.href&&!B.to&&(A.role="button"),i&&(A["aria-disabled"]=i));const Le=ne(a,me,z),te=W({},l,{centerRipple:n,component:p,disabled:i,disableRipple:d,disableTouchRipple:h,focusRipple:f,tabIndex:C,focusVisible:S}),De=Je(te);return N.jsxs(Qe,W({as:Y,className:T(De.root,L),ownerState:te,onBlur:ke,onClick:m,onContextMenu:ye,onFocus:Ve,onKeyDown:we,onKeyUp:Ee,onMouseDown:ge,onMouseLeave:xe,onMouseUp:Me,onDragLeave:Te,onTouchEnd:Be,onTouchMove:Pe,onTouchStart:Ce,ref:Le,tabIndex:i?-1:C,type:$},A,B,{children:[c,Re?N.jsx(We,W({ref:fe,center:n},w)):null]}))}),tt=Ze;export{tt as B};
74
+ `),u.rippleVisible,_e,Q,({theme:s})=>s.transitions.easing.easeInOut,u.ripplePulsate,({theme:s})=>s.transitions.duration.shorter,u.child,u.childLeaving,ze,Q,({theme:s})=>s.transitions.easing.easeInOut,u.childPulsate,Ae,({theme:s})=>s.transitions.easing.easeInOut),We=t.forwardRef(function(M,a){const l=ce({props:M,name:"MuiTouchRipple"}),{center:k=!1,classes:n={},className:c}=l,L=pe(l,Fe),[p,i]=t.useState([]),d=t.useRef(0),h=t.useRef(null);t.useEffect(()=>{h.current&&(h.current(),h.current=null)},[p]);const f=t.useRef(!1),x=t.useRef(0),r=t.useRef(null),m=t.useRef(null);t.useEffect(()=>()=>{x.current&&clearTimeout(x.current)},[]);const F=t.useCallback(o=>{const{pulsate:b,rippleX:R,rippleY:D,rippleSize:j,cb:_}=o;i(g=>[...g,N.jsx(Ye,{classes:{ripple:T(n.ripple,u.ripple),rippleVisible:T(n.rippleVisible,u.rippleVisible),ripplePulsate:T(n.ripplePulsate,u.ripplePulsate),child:T(n.child,u.child),childLeaving:T(n.childLeaving,u.childLeaving),childPulsate:T(n.childPulsate,u.childPulsate)},timeout:Q,pulsate:b,rippleX:R,rippleY:D,rippleSize:j},d.current)]),d.current+=1,h.current=_},[n]),I=t.useCallback((o={},b={},R=()=>{})=>{const{pulsate:D=!1,center:j=k||b.pulsate,fakeElement:_=!1}=b;if((o==null?void 0:o.type)==="mousedown"&&f.current){f.current=!1;return}(o==null?void 0:o.type)==="touchstart"&&(f.current=!0);const g=_?null:m.current,V=g?g.getBoundingClientRect():{width:0,height:0,left:0,top:0};let C,w,E;if(j||o===void 0||o.clientX===0&&o.clientY===0||!o.clientX&&!o.touches)C=Math.round(V.width/2),w=Math.round(V.height/2);else{const{clientX:$,clientY:B}=o.touches&&o.touches.length>0?o.touches[0]:o;C=Math.round($-V.left),w=Math.round(B-V.top)}if(j)E=Math.sqrt((2*V.width**2+V.height**2)/3),E%2===0&&(E+=1);else{const $=Math.max(Math.abs((g?g.clientWidth:0)-C),C)*2+2,B=Math.max(Math.abs((g?g.clientHeight:0)-w),w)*2+2;E=Math.sqrt($**2+B**2)}o!=null&&o.touches?r.current===null&&(r.current=()=>{F({pulsate:D,rippleX:C,rippleY:w,rippleSize:E,cb:R})},x.current=setTimeout(()=>{r.current&&(r.current(),r.current=null)},Ke)):F({pulsate:D,rippleX:C,rippleY:w,rippleSize:E,cb:R})},[k,F]),K=t.useCallback(()=>{I({},{pulsate:!0})},[I]),U=t.useCallback((o,b)=>{if(clearTimeout(x.current),(o==null?void 0:o.type)==="touchend"&&r.current){r.current(),r.current=null,x.current=setTimeout(()=>{U(o,b)});return}r.current=null,i(R=>R.length>0?R.slice(1):R),h.current=b},[]);return t.useImperativeHandle(a,()=>({pulsate:K,start:I,stop:U}),[K,I,U]),N.jsx(Xe,H({className:T(u.root,n.root,c),ref:m},L,{children:N.jsx(Se,{component:null,exit:!0,children:p})}))}),He=We;function Oe(s){return Ne("MuiButtonBase",s)}const qe=ue("MuiButtonBase",["root","disabled","focusVisible"]),Ge=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Je=s=>{const{disabled:M,focusVisible:a,focusVisibleClassName:l,classes:k}=s,c=Ue({root:["root",M&&"disabled",a&&"focusVisible"]},Oe,k);return a&&l&&(c.root+=` ${l}`),c},Qe=v("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(s,M)=>M.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${qe.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Ze=t.forwardRef(function(M,a){const l=ce({props:M,name:"MuiButtonBase"}),{action:k,centerRipple:n=!1,children:c,className:L,component:p="button",disabled:i=!1,disableRipple:d=!1,disableTouchRipple:h=!1,focusRipple:f=!1,LinkComponent:x="a",onBlur:r,onClick:m,onContextMenu:F,onDragLeave:I,onFocus:K,onFocusVisible:U,onKeyDown:o,onKeyUp:b,onMouseDown:R,onMouseLeave:D,onMouseUp:j,onTouchEnd:_,onTouchMove:g,onTouchStart:V,tabIndex:C=0,TouchRippleProps:w,touchRippleRef:E,type:$}=l,B=pe(l,Ge),z=t.useRef(null),y=t.useRef(null),fe=ne(y,E),{isFocusVisibleRef:ee,onFocus:de,onBlur:he,ref:me}=Ie(),[S,X]=t.useState(!1);i&&S&&X(!1),t.useImperativeHandle(k,()=>({focusVisible:()=>{X(!0),z.current.focus()}}),[]);const[q,be]=t.useState(!1);t.useEffect(()=>{be(!0)},[]);const Re=q&&!d&&!i;t.useEffect(()=>{S&&f&&!d&&q&&y.current.pulsate()},[d,f,S,q]);function P(e,oe,$e=h){return W(se=>(oe&&oe(se),!$e&&y.current&&y.current[e](se),!0))}const ge=P("start",R),ye=P("stop",F),Te=P("stop",I),Me=P("stop",j),xe=P("stop",e=>{S&&e.preventDefault(),D&&D(e)}),Ce=P("start",V),Be=P("stop",_),Pe=P("stop",g),ke=P("stop",e=>{he(e),ee.current===!1&&X(!1),r&&r(e)},!1),Ve=W(e=>{z.current||(z.current=e.currentTarget),de(e),ee.current===!0&&(X(!0),U&&U(e)),K&&K(e)}),G=()=>{const e=z.current;return p&&p!=="button"&&!(e.tagName==="A"&&e.href)},J=t.useRef(!1),we=W(e=>{f&&!J.current&&S&&y.current&&e.key===" "&&(J.current=!0,y.current.stop(e,()=>{y.current.start(e)})),e.target===e.currentTarget&&G()&&e.key===" "&&e.preventDefault(),o&&o(e),e.target===e.currentTarget&&G()&&e.key==="Enter"&&!i&&(e.preventDefault(),m&&m(e))}),Ee=W(e=>{f&&e.key===" "&&y.current&&S&&!e.defaultPrevented&&(J.current=!1,y.current.stop(e,()=>{y.current.pulsate(e)})),b&&b(e),m&&e.target===e.currentTarget&&G()&&e.key===" "&&!e.defaultPrevented&&m(e)});let Y=p;Y==="button"&&(B.href||B.to)&&(Y=x);const A={};Y==="button"?(A.type=$===void 0?"button":$,A.disabled=i):(!B.href&&!B.to&&(A.role="button"),i&&(A["aria-disabled"]=i));const Le=ne(a,me,z),te=H({},l,{centerRipple:n,component:p,disabled:i,disableRipple:d,disableTouchRipple:h,focusRipple:f,tabIndex:C,focusVisible:S}),De=Je(te);return N.jsxs(Qe,H({as:Y,className:T(De.root,L),ownerState:te,onBlur:ke,onClick:m,onContextMenu:ye,onFocus:Ve,onKeyDown:we,onKeyUp:Ee,onMouseDown:ge,onMouseLeave:xe,onMouseUp:Me,onDragLeave:Te,onTouchEnd:Be,onTouchMove:Pe,onTouchStart:Ce,ref:Le,tabIndex:i?-1:C,type:$},A,B,{children:[c,Re?N.jsx(He,H({ref:fe,center:n},w)):null]}))}),tt=Ze;export{tt as B};
@@ -1,4 +1,4 @@
1
- import{_ as x,f as X,bW as Z,bX as Je,bY as ce,bt as Ze,bs as Qe,bZ as et,b_ as tt,b$ as nt,c0 as ot,c2 as at,c1 as st,r as u,h as P,j as N,g as Ae,bU as ue,bV as rt,a as it,W as be,V as ct,aE as ne,i as lt}from"./index-uucW8lyA.js";function ut(e,o){return x({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},o)}const ft={black:"#000",white:"#fff"},Q=ft,dt={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},pt=dt,ht={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},U=ht,mt={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},j=mt,bt={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},J=bt,gt={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},v=gt,yt={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},K=yt,xt={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},H=xt,Rt=["mode","contrastThreshold","tonalOffset"],ge={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Q.white,default:Q.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},ie={text:{primary:Q.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Q.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function ye(e,o,i,r){const p=r.light||r,c=r.dark||r*1.5;e[o]||(e.hasOwnProperty(i)?e[o]=e[i]:o==="light"?e.light=Ze(e.main,p):o==="dark"&&(e.dark=Qe(e.main,c)))}function Tt(e="light"){return e==="dark"?{main:v[200],light:v[50],dark:v[400]}:{main:v[700],light:v[400],dark:v[800]}}function $t(e="light"){return e==="dark"?{main:U[200],light:U[50],dark:U[400]}:{main:U[500],light:U[300],dark:U[700]}}function kt(e="light"){return e==="dark"?{main:j[500],light:j[300],dark:j[700]}:{main:j[700],light:j[400],dark:j[800]}}function Mt(e="light"){return e==="dark"?{main:K[400],light:K[300],dark:K[700]}:{main:K[700],light:K[500],dark:K[900]}}function wt(e="light"){return e==="dark"?{main:H[400],light:H[300],dark:H[700]}:{main:H[800],light:H[500],dark:H[900]}}function At(e="light"){return e==="dark"?{main:J[400],light:J[300],dark:J[700]}:{main:"#ed6c02",light:J[500],dark:J[900]}}function Ct(e){const{mode:o="light",contrastThreshold:i=3,tonalOffset:r=.2}=e,p=X(e,Rt),c=e.primary||Tt(o),a=e.secondary||$t(o),m=e.error||kt(o),d=e.info||Mt(o),s=e.success||wt(o),y=e.warning||At(o);function b(t){return Je(t,ie.text.primary)>=i?ie.text.primary:ge.text.primary}const h=({color:t,name:$,mainShade:R=500,lightShade:w=300,darkShade:A=700})=>{if(t=x({},t),!t.main&&t[R]&&(t.main=t[R]),!t.hasOwnProperty("main"))throw new Error(ce(11,$?` (${$})`:"",R));if(typeof t.main!="string")throw new Error(ce(12,$?` (${$})`:"",JSON.stringify(t.main)));return ye(t,"light",w,r),ye(t,"dark",A,r),t.contrastText||(t.contrastText=b(t.main)),t},T={dark:ie,light:ge};return Z(x({common:x({},Q),mode:o,primary:h({color:c,name:"primary"}),secondary:h({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:m,name:"error"}),warning:h({color:y,name:"warning"}),info:h({color:d,name:"info"}),success:h({color:s,name:"success"}),grey:pt,contrastThreshold:i,getContrastText:b,augmentColor:h,tonalOffset:r},T[o]),p)}const St=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Bt(e){return Math.round(e*1e5)/1e5}const xe={textTransform:"uppercase"},Re='"Roboto", "Helvetica", "Arial", sans-serif';function Pt(e,o){const i=typeof o=="function"?o(e):o,{fontFamily:r=Re,fontSize:p=14,fontWeightLight:c=300,fontWeightRegular:a=400,fontWeightMedium:m=500,fontWeightBold:d=700,htmlFontSize:s=16,allVariants:y,pxToRem:b}=i,h=X(i,St),T=p/14,g=b||(R=>`${R/s*T}rem`),t=(R,w,A,l,k)=>x({fontFamily:r,fontWeight:R,fontSize:g(w),lineHeight:A},r===Re?{letterSpacing:`${Bt(l/w)}em`}:{},k,y),$={h1:t(c,96,1.167,-1.5),h2:t(c,60,1.2,-.5),h3:t(a,48,1.167,0),h4:t(a,34,1.235,.25),h5:t(a,24,1.334,0),h6:t(m,20,1.6,.15),subtitle1:t(a,16,1.75,.15),subtitle2:t(m,14,1.57,.1),body1:t(a,16,1.5,.15),body2:t(a,14,1.43,.15),button:t(m,14,1.75,.4,xe),caption:t(a,12,1.66,.4),overline:t(a,12,2.66,1,xe),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Z(x({htmlFontSize:s,pxToRem:g,fontFamily:r,fontSize:p,fontWeightLight:c,fontWeightRegular:a,fontWeightMedium:m,fontWeightBold:d},$),h,{clone:!1})}const Dt=.2,Ot=.14,Et=.12;function f(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Dt})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Ot})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Et})`].join(",")}const It=["none",f(0,2,1,-1,0,1,1,0,0,1,3,0),f(0,3,1,-2,0,2,2,0,0,1,5,0),f(0,3,3,-2,0,3,4,0,0,1,8,0),f(0,2,4,-1,0,4,5,0,0,1,10,0),f(0,3,5,-1,0,5,8,0,0,1,14,0),f(0,3,5,-1,0,6,10,0,0,1,18,0),f(0,4,5,-2,0,7,10,1,0,2,16,1),f(0,5,5,-3,0,8,10,1,0,3,14,2),f(0,5,6,-3,0,9,12,1,0,3,16,2),f(0,6,6,-3,0,10,14,1,0,4,18,3),f(0,6,7,-4,0,11,15,1,0,4,20,3),f(0,7,8,-4,0,12,17,2,0,5,22,4),f(0,7,8,-4,0,13,19,2,0,5,24,4),f(0,7,9,-4,0,14,21,2,0,5,26,4),f(0,8,9,-5,0,15,22,2,0,6,28,5),f(0,8,10,-5,0,16,24,2,0,6,30,5),f(0,8,11,-5,0,17,26,2,0,6,32,5),f(0,9,11,-5,0,18,28,2,0,7,34,6),f(0,9,12,-6,0,19,29,2,0,7,36,6),f(0,10,13,-6,0,20,31,3,0,8,38,7),f(0,10,13,-6,0,21,33,3,0,8,40,7),f(0,10,14,-6,0,22,35,3,0,8,42,7),f(0,11,14,-7,0,23,36,3,0,9,44,8),f(0,11,15,-7,0,24,38,3,0,9,46,8)],Vt=["duration","easing","delay"],Lt={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Ft={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Te(e){return`${Math.round(e)}ms`}function zt(e){if(!e)return 0;const o=e/36;return Math.round((4+15*o**.25+o/5)*10)}function _t(e){const o=x({},Lt,e.easing),i=x({},Ft,e.duration);return x({getAutoHeightDuration:zt,create:(p=["all"],c={})=>{const{duration:a=i.standard,easing:m=o.easeInOut,delay:d=0}=c;return X(c,Vt),(Array.isArray(p)?p:[p]).map(s=>`${s} ${typeof a=="string"?a:Te(a)} ${m} ${typeof d=="string"?d:Te(d)}`).join(",")}},e,{easing:o,duration:i})}const Nt={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Wt=Nt,Ut=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function jt(e={},...o){const{mixins:i={},palette:r={},transitions:p={},typography:c={}}=e,a=X(e,Ut);if(e.vars)throw new Error(ce(18));const m=Ct(r),d=et(e);let s=Z(d,{mixins:ut(d.breakpoints,i),palette:m,shadows:It.slice(),typography:Pt(m,c),transitions:_t(p),zIndex:x({},Wt)});return s=Z(s,a),s=o.reduce((y,b)=>Z(y,b),s),s.unstable_sxConfig=x({},tt,a==null?void 0:a.unstable_sxConfig),s.unstable_sx=function(b){return nt({sx:b,theme:this})},s}const vt=jt(),Ce=vt,Se="$$material";function Be({props:e,name:o}){return ot({props:e,name:o,defaultTheme:Ce,themeId:Se})}const Kt=e=>st(e)&&e!=="classes",fe=at({themeId:Se,defaultTheme:Ce,rootShouldForwardProp:Kt});function Ht(e){const{className:o,classes:i,pulsate:r=!1,rippleX:p,rippleY:c,rippleSize:a,in:m,onExited:d,timeout:s}=e,[y,b]=u.useState(!1),h=P(o,i.ripple,i.rippleVisible,r&&i.ripplePulsate),T={width:a,height:a,top:-(a/2)+c,left:-(a/2)+p},g=P(i.child,y&&i.childLeaving,r&&i.childPulsate);return!m&&!y&&b(!0),u.useEffect(()=>{if(!m&&d!=null){const t=setTimeout(d,s);return()=>{clearTimeout(t)}}},[d,m,s]),N.jsx("span",{className:h,style:T,children:N.jsx("span",{className:g})})}const M=Ae("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Xt=["center","classes","className"];let oe=e=>e,$e,ke,Me,we;const le=550,Yt=80,qt=ue($e||($e=oe`
1
+ import{_ as x,f as X,bX as Z,bY as Je,bZ as ce,bt as Ze,bs as Qe,b_ as et,b$ as tt,c0 as nt,c1 as ot,c3 as at,c2 as st,r as u,h as P,j as N,g as Ae,bV as ue,bW as rt,a as it,W as be,V as ct,aE as ne,i as lt}from"./index-Lb1ehBCY.js";function ut(e,o){return x({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},o)}const ft={black:"#000",white:"#fff"},Q=ft,dt={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},pt=dt,ht={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},j=ht,mt={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},v=mt,bt={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},J=bt,gt={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},K=gt,yt={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},U=yt,xt={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},H=xt,Rt=["mode","contrastThreshold","tonalOffset"],ge={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Q.white,default:Q.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},ie={text:{primary:Q.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Q.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function ye(e,o,i,r){const p=r.light||r,c=r.dark||r*1.5;e[o]||(e.hasOwnProperty(i)?e[o]=e[i]:o==="light"?e.light=Ze(e.main,p):o==="dark"&&(e.dark=Qe(e.main,c)))}function Tt(e="light"){return e==="dark"?{main:K[200],light:K[50],dark:K[400]}:{main:K[700],light:K[400],dark:K[800]}}function $t(e="light"){return e==="dark"?{main:j[200],light:j[50],dark:j[400]}:{main:j[500],light:j[300],dark:j[700]}}function kt(e="light"){return e==="dark"?{main:v[500],light:v[300],dark:v[700]}:{main:v[700],light:v[400],dark:v[800]}}function Mt(e="light"){return e==="dark"?{main:U[400],light:U[300],dark:U[700]}:{main:U[700],light:U[500],dark:U[900]}}function wt(e="light"){return e==="dark"?{main:H[400],light:H[300],dark:H[700]}:{main:H[800],light:H[500],dark:H[900]}}function At(e="light"){return e==="dark"?{main:J[400],light:J[300],dark:J[700]}:{main:"#ed6c02",light:J[500],dark:J[900]}}function Ct(e){const{mode:o="light",contrastThreshold:i=3,tonalOffset:r=.2}=e,p=X(e,Rt),c=e.primary||Tt(o),a=e.secondary||$t(o),m=e.error||kt(o),d=e.info||Mt(o),s=e.success||wt(o),y=e.warning||At(o);function b(t){return Je(t,ie.text.primary)>=i?ie.text.primary:ge.text.primary}const h=({color:t,name:$,mainShade:R=500,lightShade:w=300,darkShade:A=700})=>{if(t=x({},t),!t.main&&t[R]&&(t.main=t[R]),!t.hasOwnProperty("main"))throw new Error(ce(11,$?` (${$})`:"",R));if(typeof t.main!="string")throw new Error(ce(12,$?` (${$})`:"",JSON.stringify(t.main)));return ye(t,"light",w,r),ye(t,"dark",A,r),t.contrastText||(t.contrastText=b(t.main)),t},T={dark:ie,light:ge};return Z(x({common:x({},Q),mode:o,primary:h({color:c,name:"primary"}),secondary:h({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:m,name:"error"}),warning:h({color:y,name:"warning"}),info:h({color:d,name:"info"}),success:h({color:s,name:"success"}),grey:pt,contrastThreshold:i,getContrastText:b,augmentColor:h,tonalOffset:r},T[o]),p)}const St=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Bt(e){return Math.round(e*1e5)/1e5}const xe={textTransform:"uppercase"},Re='"Roboto", "Helvetica", "Arial", sans-serif';function Pt(e,o){const i=typeof o=="function"?o(e):o,{fontFamily:r=Re,fontSize:p=14,fontWeightLight:c=300,fontWeightRegular:a=400,fontWeightMedium:m=500,fontWeightBold:d=700,htmlFontSize:s=16,allVariants:y,pxToRem:b}=i,h=X(i,St),T=p/14,g=b||(R=>`${R/s*T}rem`),t=(R,w,A,l,k)=>x({fontFamily:r,fontWeight:R,fontSize:g(w),lineHeight:A},r===Re?{letterSpacing:`${Bt(l/w)}em`}:{},k,y),$={h1:t(c,96,1.167,-1.5),h2:t(c,60,1.2,-.5),h3:t(a,48,1.167,0),h4:t(a,34,1.235,.25),h5:t(a,24,1.334,0),h6:t(m,20,1.6,.15),subtitle1:t(a,16,1.75,.15),subtitle2:t(m,14,1.57,.1),body1:t(a,16,1.5,.15),body2:t(a,14,1.43,.15),button:t(m,14,1.75,.4,xe),caption:t(a,12,1.66,.4),overline:t(a,12,2.66,1,xe),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Z(x({htmlFontSize:s,pxToRem:g,fontFamily:r,fontSize:p,fontWeightLight:c,fontWeightRegular:a,fontWeightMedium:m,fontWeightBold:d},$),h,{clone:!1})}const Dt=.2,Ot=.14,Et=.12;function f(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Dt})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Ot})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Et})`].join(",")}const It=["none",f(0,2,1,-1,0,1,1,0,0,1,3,0),f(0,3,1,-2,0,2,2,0,0,1,5,0),f(0,3,3,-2,0,3,4,0,0,1,8,0),f(0,2,4,-1,0,4,5,0,0,1,10,0),f(0,3,5,-1,0,5,8,0,0,1,14,0),f(0,3,5,-1,0,6,10,0,0,1,18,0),f(0,4,5,-2,0,7,10,1,0,2,16,1),f(0,5,5,-3,0,8,10,1,0,3,14,2),f(0,5,6,-3,0,9,12,1,0,3,16,2),f(0,6,6,-3,0,10,14,1,0,4,18,3),f(0,6,7,-4,0,11,15,1,0,4,20,3),f(0,7,8,-4,0,12,17,2,0,5,22,4),f(0,7,8,-4,0,13,19,2,0,5,24,4),f(0,7,9,-4,0,14,21,2,0,5,26,4),f(0,8,9,-5,0,15,22,2,0,6,28,5),f(0,8,10,-5,0,16,24,2,0,6,30,5),f(0,8,11,-5,0,17,26,2,0,6,32,5),f(0,9,11,-5,0,18,28,2,0,7,34,6),f(0,9,12,-6,0,19,29,2,0,7,36,6),f(0,10,13,-6,0,20,31,3,0,8,38,7),f(0,10,13,-6,0,21,33,3,0,8,40,7),f(0,10,14,-6,0,22,35,3,0,8,42,7),f(0,11,14,-7,0,23,36,3,0,9,44,8),f(0,11,15,-7,0,24,38,3,0,9,46,8)],Vt=["duration","easing","delay"],Lt={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Ft={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Te(e){return`${Math.round(e)}ms`}function zt(e){if(!e)return 0;const o=e/36;return Math.round((4+15*o**.25+o/5)*10)}function _t(e){const o=x({},Lt,e.easing),i=x({},Ft,e.duration);return x({getAutoHeightDuration:zt,create:(p=["all"],c={})=>{const{duration:a=i.standard,easing:m=o.easeInOut,delay:d=0}=c;return X(c,Vt),(Array.isArray(p)?p:[p]).map(s=>`${s} ${typeof a=="string"?a:Te(a)} ${m} ${typeof d=="string"?d:Te(d)}`).join(",")}},e,{easing:o,duration:i})}const Nt={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Wt=Nt,jt=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function vt(e={},...o){const{mixins:i={},palette:r={},transitions:p={},typography:c={}}=e,a=X(e,jt);if(e.vars)throw new Error(ce(18));const m=Ct(r),d=et(e);let s=Z(d,{mixins:ut(d.breakpoints,i),palette:m,shadows:It.slice(),typography:Pt(m,c),transitions:_t(p),zIndex:x({},Wt)});return s=Z(s,a),s=o.reduce((y,b)=>Z(y,b),s),s.unstable_sxConfig=x({},tt,a==null?void 0:a.unstable_sxConfig),s.unstable_sx=function(b){return nt({sx:b,theme:this})},s}const Kt=vt(),Ce=Kt,Se="$$material";function Be({props:e,name:o}){return ot({props:e,name:o,defaultTheme:Ce,themeId:Se})}const Ut=e=>st(e)&&e!=="classes",fe=at({themeId:Se,defaultTheme:Ce,rootShouldForwardProp:Ut});function Ht(e){const{className:o,classes:i,pulsate:r=!1,rippleX:p,rippleY:c,rippleSize:a,in:m,onExited:d,timeout:s}=e,[y,b]=u.useState(!1),h=P(o,i.ripple,i.rippleVisible,r&&i.ripplePulsate),T={width:a,height:a,top:-(a/2)+c,left:-(a/2)+p},g=P(i.child,y&&i.childLeaving,r&&i.childPulsate);return!m&&!y&&b(!0),u.useEffect(()=>{if(!m&&d!=null){const t=setTimeout(d,s);return()=>{clearTimeout(t)}}},[d,m,s]),N.jsx("span",{className:h,style:T,children:N.jsx("span",{className:g})})}const M=Ae("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Xt=["center","classes","className"];let oe=e=>e,$e,ke,Me,we;const le=550,Yt=80,qt=ue($e||($e=oe`
2
2
  0% {
3
3
  transform: scale(0);
4
4
  opacity: 0.1;
@@ -71,4 +71,4 @@ import{_ as x,f as X,bW as Z,bX as Je,bY as ce,bt as Ze,bs as Qe,bZ as et,b_ as
71
71
  animation-iteration-count: infinite;
72
72
  animation-delay: 200ms;
73
73
  }
74
- `),M.rippleVisible,qt,le,({theme:e})=>e.transitions.easing.easeInOut,M.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,M.child,M.childLeaving,Gt,le,({theme:e})=>e.transitions.easing.easeInOut,M.childPulsate,Jt,({theme:e})=>e.transitions.easing.easeInOut),en=u.forwardRef(function(o,i){const r=Be({props:o,name:"MuiTouchRipple"}),{center:p=!1,classes:c={},className:a}=r,m=X(r,Xt),[d,s]=u.useState([]),y=u.useRef(0),b=u.useRef(null);u.useEffect(()=>{b.current&&(b.current(),b.current=null)},[d]);const h=u.useRef(!1),T=u.useRef(0),g=u.useRef(null),t=u.useRef(null);u.useEffect(()=>()=>{T.current&&clearTimeout(T.current)},[]);const $=u.useCallback(l=>{const{pulsate:k,rippleX:C,rippleY:F,rippleSize:W,cb:Y}=l;s(S=>[...S,N.jsx(Qt,{classes:{ripple:P(c.ripple,M.ripple),rippleVisible:P(c.rippleVisible,M.rippleVisible),ripplePulsate:P(c.ripplePulsate,M.ripplePulsate),child:P(c.child,M.child),childLeaving:P(c.childLeaving,M.childLeaving),childPulsate:P(c.childPulsate,M.childPulsate)},timeout:le,pulsate:k,rippleX:C,rippleY:F,rippleSize:W},y.current)]),y.current+=1,b.current=Y},[c]),R=u.useCallback((l={},k={},C=()=>{})=>{const{pulsate:F=!1,center:W=p||k.pulsate,fakeElement:Y=!1}=k;if((l==null?void 0:l.type)==="mousedown"&&h.current){h.current=!1;return}(l==null?void 0:l.type)==="touchstart"&&(h.current=!0);const S=Y?null:t.current,I=S?S.getBoundingClientRect():{width:0,height:0,left:0,top:0};let D,V,L;if(W||l===void 0||l.clientX===0&&l.clientY===0||!l.clientX&&!l.touches)D=Math.round(I.width/2),V=Math.round(I.height/2);else{const{clientX:z,clientY:O}=l.touches&&l.touches.length>0?l.touches[0]:l;D=Math.round(z-I.left),V=Math.round(O-I.top)}if(W)L=Math.sqrt((2*I.width**2+I.height**2)/3),L%2===0&&(L+=1);else{const z=Math.max(Math.abs((S?S.clientWidth:0)-D),D)*2+2,O=Math.max(Math.abs((S?S.clientHeight:0)-V),V)*2+2;L=Math.sqrt(z**2+O**2)}l!=null&&l.touches?g.current===null&&(g.current=()=>{$({pulsate:F,rippleX:D,rippleY:V,rippleSize:L,cb:C})},T.current=setTimeout(()=>{g.current&&(g.current(),g.current=null)},Yt)):$({pulsate:F,rippleX:D,rippleY:V,rippleSize:L,cb:C})},[p,$]),w=u.useCallback(()=>{R({},{pulsate:!0})},[R]),A=u.useCallback((l,k)=>{if(clearTimeout(T.current),(l==null?void 0:l.type)==="touchend"&&g.current){g.current(),g.current=null,T.current=setTimeout(()=>{A(l,k)});return}g.current=null,s(C=>C.length>0?C.slice(1):C),b.current=k},[]);return u.useImperativeHandle(i,()=>({pulsate:w,start:R,stop:A}),[w,R,A]),N.jsx(Zt,x({className:P(M.root,c.root,a),ref:t},m,{children:N.jsx(rt,{component:null,exit:!0,children:d})}))}),tn=en;function nn(e){return it("MuiButtonBase",e)}const on=Ae("MuiButtonBase",["root","disabled","focusVisible"]),an=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],sn=e=>{const{disabled:o,focusVisible:i,focusVisibleClassName:r,classes:p}=e,a=lt({root:["root",o&&"disabled",i&&"focusVisible"]},nn,p);return i&&r&&(a.root+=` ${r}`),a},rn=fe("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,o)=>o.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${on.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),cn=u.forwardRef(function(o,i){const r=Be({props:o,name:"MuiButtonBase"}),{action:p,centerRipple:c=!1,children:a,className:m,component:d="button",disabled:s=!1,disableRipple:y=!1,disableTouchRipple:b=!1,focusRipple:h=!1,LinkComponent:T="a",onBlur:g,onClick:t,onContextMenu:$,onDragLeave:R,onFocus:w,onFocusVisible:A,onKeyDown:l,onKeyUp:k,onMouseDown:C,onMouseLeave:F,onMouseUp:W,onTouchEnd:Y,onTouchMove:S,onTouchStart:I,tabIndex:D=0,TouchRippleProps:V,touchRippleRef:L,type:z}=r,O=X(r,an),q=u.useRef(null),B=u.useRef(null),Pe=be(B,L),{isFocusVisibleRef:de,onFocus:De,onBlur:Oe,ref:Ee}=ct(),[_,ee]=u.useState(!1);s&&_&&ee(!1),u.useImperativeHandle(p,()=>({focusVisible:()=>{ee(!0),q.current.focus()}}),[]);const[ae,Ie]=u.useState(!1);u.useEffect(()=>{Ie(!0)},[]);const Ve=ae&&!y&&!s;u.useEffect(()=>{_&&h&&!y&&ae&&B.current.pulsate()},[y,h,_,ae]);function E(n,he,Ge=b){return ne(me=>(he&&he(me),!Ge&&B.current&&B.current[n](me),!0))}const Le=E("start",C),Fe=E("stop",$),ze=E("stop",R),_e=E("stop",W),Ne=E("stop",n=>{_&&n.preventDefault(),F&&F(n)}),We=E("start",I),Ue=E("stop",Y),je=E("stop",S),ve=E("stop",n=>{Oe(n),de.current===!1&&ee(!1),g&&g(n)},!1),Ke=ne(n=>{q.current||(q.current=n.currentTarget),De(n),de.current===!0&&(ee(!0),A&&A(n)),w&&w(n)}),se=()=>{const n=q.current;return d&&d!=="button"&&!(n.tagName==="A"&&n.href)},re=u.useRef(!1),He=ne(n=>{h&&!re.current&&_&&B.current&&n.key===" "&&(re.current=!0,B.current.stop(n,()=>{B.current.start(n)})),n.target===n.currentTarget&&se()&&n.key===" "&&n.preventDefault(),l&&l(n),n.target===n.currentTarget&&se()&&n.key==="Enter"&&!s&&(n.preventDefault(),t&&t(n))}),Xe=ne(n=>{h&&n.key===" "&&B.current&&_&&!n.defaultPrevented&&(re.current=!1,B.current.stop(n,()=>{B.current.pulsate(n)})),k&&k(n),t&&n.target===n.currentTarget&&se()&&n.key===" "&&!n.defaultPrevented&&t(n)});let te=d;te==="button"&&(O.href||O.to)&&(te=T);const G={};te==="button"?(G.type=z===void 0?"button":z,G.disabled=s):(!O.href&&!O.to&&(G.role="button"),s&&(G["aria-disabled"]=s));const Ye=be(i,Ee,q),pe=x({},r,{centerRipple:c,component:d,disabled:s,disableRipple:y,disableTouchRipple:b,focusRipple:h,tabIndex:D,focusVisible:_}),qe=sn(pe);return N.jsxs(rn,x({as:te,className:P(qe.root,m),ownerState:pe,onBlur:ve,onClick:t,onContextMenu:Fe,onFocus:Ke,onKeyDown:He,onKeyUp:Xe,onMouseDown:Le,onMouseLeave:Ne,onMouseUp:_e,onDragLeave:ze,onTouchEnd:Ue,onTouchMove:je,onTouchStart:We,ref:Ye,tabIndex:s?-1:D,type:z},G,O,{children:[a,Ve?N.jsx(tn,x({ref:Pe,center:c},V)):null]}))}),fn=cn;export{fn as B,Se as T,Ce as d,Kt as r,fe as s,Be as u};
74
+ `),M.rippleVisible,qt,le,({theme:e})=>e.transitions.easing.easeInOut,M.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,M.child,M.childLeaving,Gt,le,({theme:e})=>e.transitions.easing.easeInOut,M.childPulsate,Jt,({theme:e})=>e.transitions.easing.easeInOut),en=u.forwardRef(function(o,i){const r=Be({props:o,name:"MuiTouchRipple"}),{center:p=!1,classes:c={},className:a}=r,m=X(r,Xt),[d,s]=u.useState([]),y=u.useRef(0),b=u.useRef(null);u.useEffect(()=>{b.current&&(b.current(),b.current=null)},[d]);const h=u.useRef(!1),T=u.useRef(0),g=u.useRef(null),t=u.useRef(null);u.useEffect(()=>()=>{T.current&&clearTimeout(T.current)},[]);const $=u.useCallback(l=>{const{pulsate:k,rippleX:C,rippleY:F,rippleSize:W,cb:Y}=l;s(S=>[...S,N.jsx(Qt,{classes:{ripple:P(c.ripple,M.ripple),rippleVisible:P(c.rippleVisible,M.rippleVisible),ripplePulsate:P(c.ripplePulsate,M.ripplePulsate),child:P(c.child,M.child),childLeaving:P(c.childLeaving,M.childLeaving),childPulsate:P(c.childPulsate,M.childPulsate)},timeout:le,pulsate:k,rippleX:C,rippleY:F,rippleSize:W},y.current)]),y.current+=1,b.current=Y},[c]),R=u.useCallback((l={},k={},C=()=>{})=>{const{pulsate:F=!1,center:W=p||k.pulsate,fakeElement:Y=!1}=k;if((l==null?void 0:l.type)==="mousedown"&&h.current){h.current=!1;return}(l==null?void 0:l.type)==="touchstart"&&(h.current=!0);const S=Y?null:t.current,I=S?S.getBoundingClientRect():{width:0,height:0,left:0,top:0};let D,V,L;if(W||l===void 0||l.clientX===0&&l.clientY===0||!l.clientX&&!l.touches)D=Math.round(I.width/2),V=Math.round(I.height/2);else{const{clientX:z,clientY:O}=l.touches&&l.touches.length>0?l.touches[0]:l;D=Math.round(z-I.left),V=Math.round(O-I.top)}if(W)L=Math.sqrt((2*I.width**2+I.height**2)/3),L%2===0&&(L+=1);else{const z=Math.max(Math.abs((S?S.clientWidth:0)-D),D)*2+2,O=Math.max(Math.abs((S?S.clientHeight:0)-V),V)*2+2;L=Math.sqrt(z**2+O**2)}l!=null&&l.touches?g.current===null&&(g.current=()=>{$({pulsate:F,rippleX:D,rippleY:V,rippleSize:L,cb:C})},T.current=setTimeout(()=>{g.current&&(g.current(),g.current=null)},Yt)):$({pulsate:F,rippleX:D,rippleY:V,rippleSize:L,cb:C})},[p,$]),w=u.useCallback(()=>{R({},{pulsate:!0})},[R]),A=u.useCallback((l,k)=>{if(clearTimeout(T.current),(l==null?void 0:l.type)==="touchend"&&g.current){g.current(),g.current=null,T.current=setTimeout(()=>{A(l,k)});return}g.current=null,s(C=>C.length>0?C.slice(1):C),b.current=k},[]);return u.useImperativeHandle(i,()=>({pulsate:w,start:R,stop:A}),[w,R,A]),N.jsx(Zt,x({className:P(M.root,c.root,a),ref:t},m,{children:N.jsx(rt,{component:null,exit:!0,children:d})}))}),tn=en;function nn(e){return it("MuiButtonBase",e)}const on=Ae("MuiButtonBase",["root","disabled","focusVisible"]),an=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],sn=e=>{const{disabled:o,focusVisible:i,focusVisibleClassName:r,classes:p}=e,a=lt({root:["root",o&&"disabled",i&&"focusVisible"]},nn,p);return i&&r&&(a.root+=` ${r}`),a},rn=fe("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,o)=>o.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${on.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),cn=u.forwardRef(function(o,i){const r=Be({props:o,name:"MuiButtonBase"}),{action:p,centerRipple:c=!1,children:a,className:m,component:d="button",disabled:s=!1,disableRipple:y=!1,disableTouchRipple:b=!1,focusRipple:h=!1,LinkComponent:T="a",onBlur:g,onClick:t,onContextMenu:$,onDragLeave:R,onFocus:w,onFocusVisible:A,onKeyDown:l,onKeyUp:k,onMouseDown:C,onMouseLeave:F,onMouseUp:W,onTouchEnd:Y,onTouchMove:S,onTouchStart:I,tabIndex:D=0,TouchRippleProps:V,touchRippleRef:L,type:z}=r,O=X(r,an),q=u.useRef(null),B=u.useRef(null),Pe=be(B,L),{isFocusVisibleRef:de,onFocus:De,onBlur:Oe,ref:Ee}=ct(),[_,ee]=u.useState(!1);s&&_&&ee(!1),u.useImperativeHandle(p,()=>({focusVisible:()=>{ee(!0),q.current.focus()}}),[]);const[ae,Ie]=u.useState(!1);u.useEffect(()=>{Ie(!0)},[]);const Ve=ae&&!y&&!s;u.useEffect(()=>{_&&h&&!y&&ae&&B.current.pulsate()},[y,h,_,ae]);function E(n,he,Ge=b){return ne(me=>(he&&he(me),!Ge&&B.current&&B.current[n](me),!0))}const Le=E("start",C),Fe=E("stop",$),ze=E("stop",R),_e=E("stop",W),Ne=E("stop",n=>{_&&n.preventDefault(),F&&F(n)}),We=E("start",I),je=E("stop",Y),ve=E("stop",S),Ke=E("stop",n=>{Oe(n),de.current===!1&&ee(!1),g&&g(n)},!1),Ue=ne(n=>{q.current||(q.current=n.currentTarget),De(n),de.current===!0&&(ee(!0),A&&A(n)),w&&w(n)}),se=()=>{const n=q.current;return d&&d!=="button"&&!(n.tagName==="A"&&n.href)},re=u.useRef(!1),He=ne(n=>{h&&!re.current&&_&&B.current&&n.key===" "&&(re.current=!0,B.current.stop(n,()=>{B.current.start(n)})),n.target===n.currentTarget&&se()&&n.key===" "&&n.preventDefault(),l&&l(n),n.target===n.currentTarget&&se()&&n.key==="Enter"&&!s&&(n.preventDefault(),t&&t(n))}),Xe=ne(n=>{h&&n.key===" "&&B.current&&_&&!n.defaultPrevented&&(re.current=!1,B.current.stop(n,()=>{B.current.pulsate(n)})),k&&k(n),t&&n.target===n.currentTarget&&se()&&n.key===" "&&!n.defaultPrevented&&t(n)});let te=d;te==="button"&&(O.href||O.to)&&(te=T);const G={};te==="button"?(G.type=z===void 0?"button":z,G.disabled=s):(!O.href&&!O.to&&(G.role="button"),s&&(G["aria-disabled"]=s));const Ye=be(i,Ee,q),pe=x({},r,{centerRipple:c,component:d,disabled:s,disableRipple:y,disableTouchRipple:b,focusRipple:h,tabIndex:D,focusVisible:_}),qe=sn(pe);return N.jsxs(rn,x({as:te,className:P(qe.root,m),ownerState:pe,onBlur:Ke,onClick:t,onContextMenu:Fe,onFocus:Ue,onKeyDown:He,onKeyUp:Xe,onMouseDown:Le,onMouseLeave:Ne,onMouseUp:_e,onDragLeave:ze,onTouchEnd:je,onTouchMove:ve,onTouchStart:We,ref:Ye,tabIndex:s?-1:D,type:z},G,O,{children:[a,Ve?N.jsx(tn,x({ref:Pe,center:c},V)):null]}))}),fn=cn;export{fn as B,Se as T,Ce as d,Ut as r,fe as s,Be as u};
@@ -1 +1 @@
1
- import{a as l,g as C,r as u,f as p,_ as n,j as m,h as f,i as x}from"./index-uucW8lyA.js";import{s as v,u as M}from"./styled-xYo1pInp.js";import{d as R}from"./Menu-R2sJfNVQ.js";function g(s){return l("MuiCard",s)}C("MuiCard",["root"]);const h=["className","raised"],y=s=>{const{classes:t}=s;return x({root:["root"]},g,t)},N=v(R,{name:"MuiCard",slot:"Root",overridesResolver:(s,t)=>t.root})(()=>({overflow:"hidden"})),U=u.forwardRef(function(t,e){const o=M({props:t,name:"MuiCard"}),{className:c,raised:r=!1}=o,i=p(o,h),a=n({},o,{raised:r}),d=y(a);return m.jsx(N,n({className:f(d.root,c),elevation:r?8:void 0,ref:e,ownerState:a},i))}),B=U;function j(s){return l("MuiCardContent",s)}C("MuiCardContent",["root"]);const w=["className","component"],_=s=>{const{classes:t}=s;return x({root:["root"]},j,t)},$=v("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(s,t)=>t.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),P=u.forwardRef(function(t,e){const o=M({props:t,name:"MuiCardContent"}),{className:c,component:r="div"}=o,i=p(o,w),a=n({},o,{component:r}),d=_(a);return m.jsx($,n({as:r,className:f(d.root,c),ownerState:a,ref:e},i))}),L=P;export{B as C,L as a};
1
+ import{a as l,g as C,r as u,f as p,_ as n,j as m,h as f,i as x}from"./index-Lb1ehBCY.js";import{s as v,u as M}from"./styled-T50_bxwD.js";import{d as R}from"./Menu--qKA-oiM.js";function g(s){return l("MuiCard",s)}C("MuiCard",["root"]);const h=["className","raised"],y=s=>{const{classes:t}=s;return x({root:["root"]},g,t)},N=v(R,{name:"MuiCard",slot:"Root",overridesResolver:(s,t)=>t.root})(()=>({overflow:"hidden"})),U=u.forwardRef(function(t,e){const o=M({props:t,name:"MuiCard"}),{className:c,raised:r=!1}=o,i=p(o,h),a=n({},o,{raised:r}),d=y(a);return m.jsx(N,n({className:f(d.root,c),elevation:r?8:void 0,ref:e,ownerState:a},i))}),B=U;function j(s){return l("MuiCardContent",s)}C("MuiCardContent",["root"]);const w=["className","component"],_=s=>{const{classes:t}=s;return x({root:["root"]},j,t)},$=v("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(s,t)=>t.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),P=u.forwardRef(function(t,e){const o=M({props:t,name:"MuiCardContent"}),{className:c,component:r="div"}=o,i=p(o,w),a=n({},o,{component:r}),d=_(a);return m.jsx($,n({as:r,className:f(d.root,c),ownerState:a,ref:e},i))}),L=P;export{B as C,L as a};
@@ -1 +1 @@
1
- import{k as r,j as t}from"./index-uucW8lyA.js";import{r as a}from"./createSvgIcon-V91OChAf.js";var e={},o=r;Object.defineProperty(e,"__esModule",{value:!0});var u=e.default=void 0,i=o(a()),l=t;u=e.default=(0,i.default)((0,l.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle");export{u as d};
1
+ import{k as r,j as t}from"./index-Lb1ehBCY.js";import{r as a}from"./createSvgIcon-SJR__BRH.js";var e={},o=r;Object.defineProperty(e,"__esModule",{value:!0});var u=e.default=void 0,i=o(a()),l=t;u=e.default=(0,i.default)((0,l.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle");export{u as d};