@abtnode/blocklet-services 1.16.52-beta-20250912-112002-e3499e9c → 1.16.52-beta-20250917-070942-7ee57044

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 (125) hide show
  1. package/api/routes/mcp.js +235 -1
  2. package/api/routes/oauth/server.js +4 -4
  3. package/api/services/dashboard/index.js +24 -6
  4. package/api/services/mcp/server.js +1 -1
  5. package/api/services/notification/blocklet-events-notifier.js +2 -2
  6. package/api/services/notification/queue.js +9 -9
  7. package/dist/assets/{access-control-Cv9mJe55.js → access-control-CXa4XdTR.js} +1 -1
  8. package/dist/assets/{add-component-core-ETZM-c0n.js → add-component-core-C8Wvhlwd.js} +1 -1
  9. package/dist/assets/{add-resource-CefrvxMv.js → add-resource-CKVcDfq1.js} +1 -1
  10. package/dist/assets/{addon-CdW1jH1F.js → addon-CGYbwnAQ.js} +1 -1
  11. package/dist/assets/{advanced-BalF9O34.js → advanced-BHQ085Rc.js} +1 -1
  12. package/dist/assets/{aigne-BqpFNqN9.js → aigne-CSzB6EAi.js} +1 -1
  13. package/dist/assets/{appearance-CiCcnDqj.js → appearance-wlMh61hK.js} +1 -1
  14. package/dist/assets/{arrow-down.svg-C3DZxwUV.js → arrow-down.svg-2NUXhc9M.js} +1 -1
  15. package/dist/assets/{audit-logs-BiFwhSvl.js → audit-logs-OiH-ZCCu.js} +1 -1
  16. package/dist/assets/{authorize-FiuAZHUA.js → authorize-C1p1aX84.js} +1 -1
  17. package/dist/assets/{base32-Ccz4U5Ob.js → base32-Bs5DmmgZ.js} +1 -1
  18. package/dist/assets/{bind-account-BR2YWYwk.js → bind-account-CnWbtI8I.js} +1 -1
  19. package/dist/assets/{branding-DiGxInL8.js → branding-Bk8D93gd.js} +2 -2
  20. package/dist/assets/{branding-Cq_kEjOF.js → branding-BnhQzGq_.js} +1 -1
  21. package/dist/assets/{branding-B7YBinhB.js → branding-C1lgysY6.js} +1 -1
  22. package/dist/assets/{bundle-avatar-D8QkKBVi.js → bundle-avatar-CF-8YjIk.js} +1 -1
  23. package/dist/assets/{complete-uOY3lczm.js → complete-C_JNPzD5.js} +1 -1
  24. package/dist/assets/{component-CMw-pVd2.js → component-IFve4dXC.js} +3 -3
  25. package/dist/assets/{config-DIuLHS8J.js → config-BPieGs6J.js} +1 -1
  26. package/dist/assets/{config-T8EypEzR.js → config-CKpqEH5r.js} +1 -1
  27. package/dist/assets/{config-C7Wu3S5C.js → config-DBzwJyqc.js} +1 -1
  28. package/dist/assets/{config-navigation-CQlAn_Fg.js → config-navigation-pmywYpni.js} +3 -3
  29. package/dist/assets/{config-space-BVmSIh3O.js → config-space-Da0MmMPn.js} +1 -1
  30. package/dist/assets/{confirm-BAs5EAFg.js → confirm-BSaR4_fO.js} +1 -1
  31. package/dist/assets/{connect-BPVdZurv.js → connect-9m4Nmfes.js} +1 -1
  32. package/dist/assets/{connect-NnsibVv5.js → connect-BuRk8HoH.js} +1 -1
  33. package/dist/assets/{connect-to-D2kVCXUW.js → connect-to-DhIpK6hj.js} +1 -1
  34. package/dist/assets/{dashboard-CpCxXsDT.js → dashboard-DgmOVZgS.js} +3 -3
  35. package/dist/assets/{delete-confirm-ARBINDJj.js → delete-confirm-BR2z4Ljn.js} +1 -1
  36. package/dist/assets/{domain-B6x4146t.js → domain-CkwVqsGZ.js} +1 -1
  37. package/dist/assets/{domain-action-card-CVS3TpUQ.js → domain-action-card-DmX4ipuD.js} +1 -1
  38. package/dist/assets/{domains-BfVUABUm.js → domains-IK6JBOMk.js} +1 -1
  39. package/dist/assets/{email-o5PQki4m.js → email-C7dt-OoA.js} +1 -1
  40. package/dist/assets/engine-B4t4bO94.js +1 -0
  41. package/dist/assets/{exchange-passport-BIcDPCdx.js → exchange-passport-BlpeYXD-.js} +1 -1
  42. package/dist/assets/{form-DeTq6JLt.js → form-BoRGzdQH.js} +1 -1
  43. package/dist/assets/{fuel-CYXB7lNo.js → fuel-DPqYXNcT.js} +1 -1
  44. package/dist/assets/{gen-access-key-CK6ABJ7d.js → gen-access-key-DTf8XM_B.js} +1 -1
  45. package/dist/assets/{gen-simple-access-key-DSfDrkH_.js → gen-simple-access-key-BHpsJW1z.js} +1 -1
  46. package/dist/assets/{get-safe-url-C_gWJx9x.js → get-safe-url-C5Vpma4S.js} +1 -1
  47. package/dist/assets/{hdkey-CRIeweuD.js → hdkey-iF7Zd5Mt.js} +1 -1
  48. package/dist/assets/{home-keIz_0pz.js → home-Bq8Kaby6.js} +1 -1
  49. package/dist/assets/{iframe-7-UjiotN.js → iframe-BZdurKlN.js} +1 -1
  50. package/dist/assets/{index-DwFmgPTz.js → index-0r-rUxmD.js} +1 -1
  51. package/dist/assets/{index-CndEvJBJ.js → index-6k6hDX7K.js} +4 -4
  52. package/dist/assets/{index-DX_0Aq5L.js → index-BE6_aQqm.js} +1 -1
  53. package/dist/assets/{index-x_ddpRFT.js → index-BJftyOWK.js} +1 -1
  54. package/dist/assets/{index-74AbVj6G.js → index-BTbAsTsB.js} +1 -1
  55. package/dist/assets/{index-DWKcHcSX.js → index-BcOGe7jx.js} +1 -1
  56. package/dist/assets/{index-IfDPTJfj.js → index-BioPPNyR.js} +1 -1
  57. package/dist/assets/{index-2WK89lpX.js → index-BxgIheOv.js} +1 -1
  58. package/dist/assets/{index-C9c1djN6.js → index-C7WNgxRc.js} +1 -1
  59. package/dist/assets/{index-IbUh2bsl.js → index-C91ORskB.js} +1 -1
  60. package/dist/assets/{index-EyN3xjNK.js → index-CvK2LB0C.js} +3 -3
  61. package/dist/assets/{index-8j3VjBVi.js → index-Cw5ltvNg.js} +1 -1
  62. package/dist/assets/{index-BOhhZADu.js → index-D0zr5fnU.js} +4 -4
  63. package/dist/assets/{index-ClW80nSf.js → index-DGBu1iXZ.js} +1 -1
  64. package/dist/assets/{index-6ZWzS1uw.js → index-DIzco3bK.js} +1 -1
  65. package/dist/assets/{index-B0NAcL5r.js → index-DVNnjX93.js} +1 -1
  66. package/dist/assets/{index-DxR3NtV9.js → index-DlbJhxX4.js} +1 -1
  67. package/dist/assets/{index-DCk5kGsh.js → index-DtDqVnOd.js} +1 -1
  68. package/dist/assets/{index-BNPLpp0r.js → index-DzHxtRuX.js} +1 -1
  69. package/dist/assets/{index-B65XBOLV.js → index-VRhIKoNb.js} +1 -1
  70. package/dist/assets/{index-CsmgTpTJ.js → index-ZScchkNG.js} +1 -1
  71. package/dist/assets/{index-BMBJylNT.js → index-klWBrV7H.js} +1 -1
  72. package/dist/assets/{index-CjxZFYCF.js → index-ptPisY0K.js} +1 -1
  73. package/dist/assets/{invitation-BY2PtFvw.js → invitation-BbSlWYAY.js} +1 -1
  74. package/dist/assets/{invite-Cr9pbzvJ.js → invite-DKkAcNxp.js} +1 -1
  75. package/dist/assets/{isURL-CfmrW_0C.js → isURL-BOLVWN6q.js} +1 -1
  76. package/dist/assets/{issue-passport-D97rQRNT.js → issue-passport-kvrsHOXO.js} +1 -1
  77. package/dist/assets/{item-C1_2OTms.js → item-CRpPGQS5.js} +1 -1
  78. package/dist/assets/{landing-page-BoP0vrKb.js → landing-page-Bb2t2ubc.js} +1 -1
  79. package/dist/assets/{layout-BakYeqaY.js → layout-O4FRf5d2.js} +1 -1
  80. package/dist/assets/{list-DTe8sKwq.js → list-BeJAd6oJ.js} +3 -3
  81. package/dist/assets/{list-Bfj_fOi0.js → list-BmwWshfg.js} +1 -1
  82. package/dist/assets/{localization-DcpcwZBX.js → localization-EdFO66I_.js} +1 -1
  83. package/dist/assets/{log-BLHTF_kk.js → log-DwbFr2nR.js} +1 -1
  84. package/dist/assets/{login-PJHIZpiF.js → login-D2_PE9lX.js} +1 -1
  85. package/dist/assets/{login-oauth-callback-BjziPtPn.js → login-oauth-callback-BQNBl6bZ.js} +1 -1
  86. package/dist/assets/{logo-uploader-DNn2MCLm.js → logo-uploader-vRfbxowv.js} +2 -2
  87. package/dist/assets/{lost-passport-ChRfu4fx.js → lost-passport-pY1dhWDO.js} +1 -1
  88. package/dist/assets/{open-window-BRoSM1sQ.js → open-window-C0eYx4_v.js} +1 -1
  89. package/dist/assets/{over-due-invoice-payment-nX6ANuRm.js → over-due-invoice-payment-OBj9thMb.js} +1 -1
  90. package/dist/assets/{overview-CLlEtBem.js → overview-Rpt1OYCM.js} +1 -1
  91. package/dist/assets/{passport-item-BbcSxETN.js → passport-item-Bq1c8VJl.js} +1 -1
  92. package/dist/assets/{permission-D4s1M96M.js → permission-Doi0-9cF.js} +1 -1
  93. package/dist/assets/{preferences-B-KNknmh.js → preferences-zYe_BxLJ.js} +1 -1
  94. package/dist/assets/{profile-embed-0Ro9kKTX.js → profile-embed-BqOWDoBR.js} +1 -1
  95. package/dist/assets/{publish-resource-1jZoHwxW.js → publish-resource-CnXtK3LB.js} +1 -1
  96. package/dist/assets/{runtime-DiVv_EHB.js → runtime-DjdnpZoh.js} +1 -1
  97. package/dist/assets/sdk-ChXfsb2q.js +1 -0
  98. package/dist/assets/{security-Cmd-bjYK.js → security-Bdj-FYH4.js} +1 -1
  99. package/dist/assets/{session-BrZcMmG5.js → session-D-9YOhAy.js} +1 -1
  100. package/dist/assets/{setup-BVolXtjE.js → setup-CYAJarl4.js} +1 -1
  101. package/dist/assets/{spaces-CHljP8tP.js → spaces-Cq_dfNLt.js} +1 -1
  102. package/dist/assets/{start-CYrTYI-f.js → start-EO_1F43S.js} +1 -1
  103. package/dist/assets/{status--5cDGjcC.js → status-DJWbsb5u.js} +1 -1
  104. package/dist/assets/{step-actions-CqrWvcHB.js → step-actions-C91dncKW.js} +1 -1
  105. package/dist/assets/{studio-BsPkV54q.js → studio-B3QjabKr.js} +1 -1
  106. package/dist/assets/{team-DSjEanO-.js → team-RDmDo4cZ.js} +1 -1
  107. package/dist/assets/{traffic-mRcZHvLN.js → traffic-BUIhb2HS.js} +1 -1
  108. package/dist/assets/{transfer-CuD5trOJ.js → transfer-Dfbnhl7y.js} +1 -1
  109. package/dist/assets/{unsubscribe-yhkp0l4C.js → unsubscribe-Xjc5jAJO.js} +1 -1
  110. package/dist/assets/{use-app-logo-BZU1I0dB.js → use-app-logo-DesKuFha.js} +1 -1
  111. package/dist/assets/{user-center-5ESBGQA5.js → user-center-DdBnHKdX.js} +3 -3
  112. package/dist/assets/{user-follower-B6mKehgT.js → user-follower-DuL1BMYz.js} +1 -1
  113. package/dist/assets/{user-sessions-DN6scq-_.js → user-sessions-SImh8rHV.js} +1 -1
  114. package/dist/assets/{util-HCACAM-i.js → util-BlUZ4Q2D.js} +1 -1
  115. package/dist/assets/{util-BXcTwFDD.js → util-CHZLxs1T.js} +1 -1
  116. package/dist/assets/{wait-connect-CbVia-91.js → wait-connect-zz_yxj4x.js} +1 -1
  117. package/dist/assets/{wizard-B_NDaiA9.js → wizard-CRrvtL2U.js} +1 -1
  118. package/dist/assets/{wizard-components-DsmO8JXs.js → wizard-components-CR8h5HCI.js} +2 -2
  119. package/dist/assets/{wrap-locale-CScOhszz.js → wrap-locale-BraEpa0W.js} +1 -1
  120. package/dist/assets/{zh-C2gGkXmP.js → zh-DQDxmpdl.js} +1 -1
  121. package/dist/index.html +1 -1
  122. package/dist/service-worker.js +1 -1
  123. package/package.json +25 -25
  124. package/dist/assets/engine-Coh-wnMb.js +0 -1
  125. package/dist/assets/sdk-DqccdvPq.js +0 -1
@@ -1,4 +1,4 @@
1
- import{T as ee,H as O,ab as X,ao as Ee,ap as Ue,aq as We,ar as Ve,G as K,aj as je,F as ke,N as Me,D as z,as as _e,ac as Ne,O as $e,L as Ie}from"./vendor-ux-ESjuHpb6.js";import{b as u,a as H,g as ae,c as He}from"./vendor-hooks-DLNZ8kxG.js";import{r as D}from"./vendor-react-Dvs43sk9.js";import{j as e,ak as i,b6 as A,am as ce,y as B,z as F,Q as V,T as Y,I as le,a3 as oe,W as E,b1 as W,ch as qe,cf as Le,cz as Je,at as Fe,D as ye,ah as Be,cA as Oe,a6 as be,cB as Ze,a$ as Ke}from"./vendor-mui-core-CmD-NPnl.js";import{Z as N,a8 as M,X as G,bh as se,c as ve,b9 as Ge,aZ as Ye,Y as Qe}from"./index-CndEvJBJ.js";import{A as Z,Q as Xe,b as de,Y as et,n as Q,_ as tt,C as nt,a as st}from"./vendor-utils-DQK0pEML.js";import{u as te,C as k,a as De}from"./index.esm-JPZAjt0x.js";import{S as ie}from"./switch-control-o8fDOnJX.js";import{S as y}from"./section-CndbjVtx.js";import{d as ot}from"./keyboard-arrow-down-rounded-8U0_i9QO.js";import{u as at}from"./index-DEdn8u__.js";import{v as it}from"./index-1BANSka2.js";import{r as rt}from"./base32-Ccz4U5Ob.js";import{u as lt}from"./use-mobile-D93Bk2Ru.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-C-xQV6LY.js";import"./required-B2SKELXR.js";const we={width:24,height:24,body:'<path fill="currentColor" d="M5 4v16V4v5v-5Zm3 10h2.675q.275-.575.638-1.075t.812-.925H8q-.425 0-.713.288T7 13q0 .425.288.713T8 14Zm0 4h2.075Q10 17.5 10 17t.075-1H8q-.425 0-.713.288T7 17q0 .425.288.713T8 18Zm-3 4q-.825 0-1.413-.588T3 20V4q0-.825.588-1.413T5 2h7.175q.4 0 .763.15t.637.425l4.85 4.85q.275.275.425.638t.15.762V10.3q-.475-.15-.975-.225T17 10V9h-4q-.425 0-.713-.288T12 8V4H5v16h5.675q.275.575.638 1.075t.812.925H5Zm12-10q2.075 0 3.538 1.463T22 17q0 2.075-1.463 3.538T17 22q-2.075 0-3.538-1.463T12 17q0-2.075 1.463-3.538T17 12Zm0 8q.275 0 .463-.188t.187-.462q0-.275-.187-.463T17 18.7q-.275 0-.463.188t-.187.462q0 .275.188.463T17 20Zm0-6q-.475 0-.875.238t-.65.637q-.1.15-.025.313t.25.237q.15.075.3 0t.275-.2q.125-.175.313-.275t.412-.1q.325 0 .563.213t.237.537q0 .275-.15.463t-.35.387q-.15.15-.313.3t-.287.35q-.075.15-.113.313t-.037.337q0 .225.125.413t.325.187q.2 0 .325-.15t.125-.35q0-.275.15-.488t.35-.412q.3-.275.525-.613t.225-.737q0-.675-.5-1.138T17 14Z"/>'},ue={enabled:!1,domain:"",clientId:"",clientSecret:""};function ct(){const{api:b}=N(),{blocklet:c}=M(),{t,locale:n}=ee(),o=c?.meta?.did,r=Object.assign({...ue},c?.settings?.oauth?.auth0||{}),{handleSubmit:x,control:a,formState:p,watch:d,reset:f}=te({defaultValues:Z(r,Object.keys(ue))}),l=d("enabled"),j=u(async s=>{try{const{blocklet:I}=await b.configOAuth({input:{did:o,oauth:JSON.stringify({auth0:s})}}),L=Object.assign({...ue},I?.settings?.oauth?.auth0||{});f(L),O.success(t("oauth.saveSuccess"))}catch(I){O.error(I.message||t("oauth.saveFailed"))}}),v=u(s=>s?.trim()?!0:t("oauth.auth0.domainDescription")),S=u(s=>s?.trim()?!0:t("oauth.auth0.clientIdDescription")),g=u(s=>s?.trim()?!0:t("oauth.auth0.clientSecretDescription")),w=u(()=>!0),h=H(()=>n==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-auth0":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-auth0",[n]);return e.jsx(i,{children:e.jsxs("form",{onSubmit:x(j),disabled:!0,children:[e.jsx(y,{title:e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx("span",{children:t("oauth.auth0.enable")}),e.jsx(ce,{title:t("oauth.viewDocument"),children:e.jsx(i,{component:"a",sx:{display:"inline-block",color:"inherit",fontSize:0,lineHeight:1},href:h,target:"_blank",rel:"noreferrer",children:e.jsx(X,{icon:we,fontSize:20})})})]}),mb:2.5,children:e.jsx(k,{name:"enabled",control:a,render:({field:s})=>e.jsx(A,{control:e.jsx(ie,{sx:{ml:1},checked:s.value,...s})})})}),e.jsx(y,{title:t("oauth.auth0.domain"),children:e.jsx(k,{name:"domain",control:a,rules:{validate:l?v:w},render:({field:s})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...s,size:"small",label:t("oauth.auth0.domain"),error:!!p.errors[s.name],helperText:p.errors[s.name]?.message||" ",disabled:!l})})})}),e.jsx(y,{title:t("oauth.auth0.clientId"),children:e.jsx(k,{name:"clientId",control:a,rules:{validate:l?S:w},render:({field:s})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...s,size:"small",label:t("oauth.auth0.clientId"),error:!!p.errors[s.name],helperText:p.errors[s.name]?.message||" ",disabled:!l})})})}),e.jsx(y,{title:t("oauth.auth0.clientSecret"),children:e.jsx(k,{name:"clientSecret",control:a,rules:{validate:l?g:w},render:({field:s})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...s,size:"small",type:"password",label:t("oauth.auth0.clientSecret"),error:!!p.errors[s.name],helperText:p.errors[s.name]?.message||" ",disabled:!l})})})}),e.jsx(V,{type:"submit",variant:"contained",onSubmit:x(j),disabled:!p.isDirty,children:t("oauth.save")})]})})}const he={enabled:!1,clientId:"",clientSecret:""};function dt(){const{api:b}=N(),{blocklet:c}=M(),{t,locale:n}=ee(),o=c?.meta?.did,r=Object.assign({...he},c?.settings?.oauth?.github||{}),{handleSubmit:x,control:a,formState:p,watch:d,reset:f}=te({defaultValues:Z(r,Object.keys(he))}),l=d("enabled"),j=u(async h=>{try{const{blocklet:s}=await b.configOAuth({input:{did:o,oauth:JSON.stringify({github:h})}}),I=Object.assign({...he},s?.settings?.oauth?.github||{});f(I),O.success(t("oauth.saveSuccess"))}catch(s){O.error(s.message||t("oauth.saveFailed"))}}),v=u(h=>h?.trim()?!0:t("oauth.github.clientIdDescription")),S=u(h=>h?.trim()?!0:t("oauth.github.clientSecretDescription")),g=u(()=>!0),w=H(()=>n==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-github":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-github",[n]);return e.jsx(i,{children:e.jsxs("form",{onSubmit:x(j),disabled:!0,children:[e.jsx(y,{title:e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx("span",{children:t("oauth.github.enable")}),e.jsx(ce,{title:t("oauth.viewDocument"),children:e.jsx(i,{component:"a",sx:{display:"inline-block",color:"inherit",fontSize:0,lineHeight:1},href:w,target:"_blank",rel:"noreferrer",children:e.jsx(X,{icon:we,fontSize:20})})})]}),mb:2.5,sx:{"& .section-content":{alignItems:"center"}},children:e.jsx(k,{name:"enabled",control:a,sx:{alignItems:"center"},render:({field:h})=>e.jsx(A,{control:e.jsx(ie,{sx:{ml:1},size:"small",checked:h.value,...h})})})}),e.jsx(y,{title:t("oauth.github.clientId"),children:e.jsx(k,{name:"clientId",control:a,rules:{validate:l?v:g},render:({field:h})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...h,size:"small",label:t("oauth.github.clientId"),error:!!p.errors[h.name],helperText:p.errors[h.name]?.message||" ",disabled:!l})})})}),e.jsx(y,{title:t("oauth.github.clientSecret"),children:e.jsx(k,{name:"clientSecret",control:a,rules:{validate:l?S:g},render:({field:h})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...h,size:"small",type:"password",label:t("oauth.github.clientSecret"),error:!!p.errors[h.name],helperText:p.errors[h.name]?.message||" ",disabled:!l})})})}),e.jsx(V,{type:"submit",variant:"contained",onSubmit:x(j),disabled:!p.isDirty,children:t("oauth.save")})]})})}const me={enabled:!1,clientId:"",clientSecret:""};function ut(){const{api:b}=N(),{blocklet:c}=M(),{t,locale:n}=ee(),o=c?.meta?.did,r=Object.assign({...me},c?.settings?.oauth?.google||{}),{handleSubmit:x,control:a,formState:p,watch:d,reset:f}=te({defaultValues:Z(r,Object.keys(me))}),l=d("enabled"),j=u(async h=>{try{const{blocklet:s}=await b.configOAuth({input:{did:o,oauth:JSON.stringify({google:h})}}),I=Object.assign({...me},s?.settings?.oauth?.google||{});f(I),O.success(t("oauth.saveSuccess"))}catch(s){O.error(s.message||t("oauth.saveFailed"))}}),v=u(h=>h?.trim()?!0:t("oauth.google.clientIdDescription")),S=u(h=>h?.trim()?!0:t("oauth.google.clientSecretDescription")),g=u(()=>!0),w=H(()=>n==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-google":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-google",[n]);return e.jsx(i,{children:e.jsxs("form",{onSubmit:x(j),disabled:!0,children:[e.jsx(y,{title:e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx("span",{children:t("oauth.google.enable")}),e.jsx(ce,{title:t("oauth.viewDocument"),children:e.jsx(i,{component:"a",sx:{display:"inline-block",color:"inherit",fontSize:0,lineHeight:1},href:w,target:"_blank",rel:"noreferrer",children:e.jsx(X,{icon:we,fontSize:20})})})]}),mb:2.5,children:e.jsx(k,{name:"enabled",control:a,render:({field:h})=>e.jsx(A,{control:e.jsx(ie,{sx:{ml:1},checked:h.value,...h})})})}),e.jsx(y,{title:t("oauth.google.clientId"),children:e.jsx(k,{name:"clientId",control:a,rules:{validate:l?v:g},render:({field:h})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...h,size:"small",label:t("oauth.google.clientId"),error:!!p.errors[h.name],helperText:p.errors[h.name]?.message||" ",disabled:!l})})})}),e.jsx(y,{title:t("oauth.google.clientSecret"),children:e.jsx(k,{name:"clientSecret",control:a,rules:{validate:l?S:g},render:({field:h})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...h,size:"small",type:"password",label:t("oauth.google.clientSecret"),error:!!p.errors[h.name],helperText:p.errors[h.name]?.message||" ",disabled:!l})})})}),e.jsx(V,{type:"submit",variant:"contained",onSubmit:x(j),disabled:!p.isDirty,children:t("oauth.save")})]})})}const pe={enabled:!1,teamId:"",serviceId:"",keyId:"",authKey:"",bundleId:""};function ht(){const{api:b}=N(),{blocklet:c}=M(),{t}=ee(),n=c?.meta?.did,o=Object.assign({...pe},c?.settings?.oauth?.apple||{}),{handleSubmit:r,control:x,formState:a,watch:p,reset:d}=te({defaultValues:Z(o,Object.keys(pe))}),f=p("enabled"),l=u(async s=>{try{const{blocklet:I}=await b.configOAuth({input:{did:n,oauth:JSON.stringify({apple:s})}}),L=Object.assign({...pe},I?.settings?.oauth?.apple||{});d(L),O.success(t("oauth.saveSuccess"))}catch(I){O.error(I.message||t("oauth.saveFailed"))}}),j=u(s=>s?.trim()?!0:t("oauth.apple.teamIdDescription")),v=u(s=>s?.trim()?!0:t("oauth.apple.serviceIdDescription")),S=u(s=>s?.trim()?!0:t("oauth.apple.keyIdDescription")),g=u(s=>s?.trim()?!0:t("oauth.apple.authKeyDescription")),w=u(s=>s?.trim()?!0:t("oauth.apple.bundleIdDescription")),h=u(()=>!0);return e.jsx(i,{children:e.jsxs("form",{onSubmit:r(l),disabled:!0,children:[e.jsx(y,{title:t("oauth.apple.enable"),mb:2.5,children:e.jsx(k,{name:"enabled",control:x,render:({field:s})=>e.jsx(A,{control:e.jsx(ie,{sx:{ml:1},checked:s.value,...s})})})}),e.jsx(y,{title:t("oauth.apple.teamId"),children:e.jsx(k,{name:"teamId",control:x,rules:{validate:f?j:h},render:({field:s})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...s,size:"small",label:t("oauth.apple.teamId"),error:!!a.errors[s.name],helperText:a.errors[s.name]?.message||" ",disabled:!f})})})}),e.jsx(y,{title:t("oauth.apple.bundleId"),children:e.jsx(k,{name:"bundleId",control:x,rules:{validate:f?w:h},render:({field:s})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...s,size:"small",label:t("oauth.apple.bundleId"),error:!!a.errors[s.name],helperText:a.errors[s.name]?.message||" ",disabled:!f})})})}),e.jsx(y,{title:t("oauth.apple.serviceId"),children:e.jsx(k,{name:"serviceId",control:x,rules:{validate:f?v:h},render:({field:s})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...s,size:"small",label:t("oauth.apple.serviceId"),error:!!a.errors[s.name],helperText:a.errors[s.name]?.message||" ",disabled:!f})})})}),e.jsx(y,{title:t("oauth.apple.keyId"),children:e.jsx(k,{name:"keyId",control:x,rules:{validate:f?S:h},render:({field:s})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...s,size:"small",label:t("oauth.apple.keyId"),error:!!a.errors[s.name],helperText:a.errors[s.name]?.message||" ",disabled:!f})})})}),e.jsx(y,{title:t("oauth.apple.authKey"),children:e.jsx(k,{name:"authKey",control:x,rules:{validate:f?g:h},render:({field:s})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...s,size:"small",type:"password",label:t("oauth.apple.authKey"),multiline:!0,rows:4,error:!!a.errors[s.name],helperText:a.errors[s.name]?.message||" ",disabled:!f})})})}),e.jsx(V,{type:"submit",variant:"contained",onSubmit:r(l),disabled:!a.isDirty,children:t("oauth.save")})]})})}const xe={enabled:!1,clientId:"",clientSecret:""};function mt(){const{api:b}=N(),{blocklet:c}=M(),{t}=ee(),n=c?.meta?.did,o=Object.assign({...xe},c?.settings?.oauth?.twitter||{}),{handleSubmit:r,control:x,formState:a,watch:p,reset:d}=te({defaultValues:Z(o,Object.keys(xe))}),f=p("enabled"),l=u(async g=>{try{const{blocklet:w}=await b.configOAuth({input:{did:n,oauth:JSON.stringify({twitter:g})}}),h=Object.assign({...xe},w?.settings?.oauth?.twitter||{});d(h),O.success(t("oauth.saveSuccess"))}catch(w){O.error(w.message||t("oauth.saveFailed"))}}),j=u(g=>g?.trim()?!0:t("oauth.twitter.clientIdDescription")),v=u(g=>g?.trim()?!0:t("oauth.twitter.clientSecretDescription")),S=u(()=>!0);return e.jsx(i,{children:e.jsxs("form",{onSubmit:r(l),disabled:!0,children:[e.jsx(y,{title:e.jsx(i,{sx:{display:"flex",alignItems:"center",gap:1},children:e.jsx("span",{children:t("oauth.twitter.enable")})}),mb:2.5,sx:{"& .section-content":{alignItems:"center"}},children:e.jsx(k,{name:"enabled",control:x,sx:{alignItems:"center"},render:({field:g})=>e.jsx(A,{control:e.jsx(ie,{sx:{ml:1},size:"small",checked:g.value,...g})})})}),e.jsx(y,{title:t("oauth.twitter.clientId"),children:e.jsx(k,{name:"clientId",control:x,rules:{validate:f?j:S},render:({field:g})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...g,size:"small",label:t("oauth.twitter.clientId"),error:!!a.errors[g.name],helperText:a.errors[g.name]?.message||" ",disabled:!f})})})}),e.jsx(y,{title:t("oauth.twitter.clientSecret"),children:e.jsx(k,{name:"clientSecret",control:x,rules:{validate:f?v:S},render:({field:g})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...g,size:"small",type:"password",label:t("oauth.twitter.clientSecret"),error:!!a.errors[g.name],helperText:a.errors[g.name]?.message||" ",disabled:!f})})})}),e.jsx(V,{type:"submit",variant:"contained",onSubmit:r(l),disabled:!a.isDirty,children:t("oauth.save")})]})})}const pt={width:24,height:24,body:'<path fill="currentColor" d="M9 20q-.825 0-1.413-.588T7 18q0-.825.588-1.413T9 16q.825 0 1.413.588T11 18q0 .825-.588 1.413T9 20Zm6 0q-.825 0-1.413-.588T13 18q0-.825.588-1.413T15 16q.825 0 1.413.588T17 18q0 .825-.588 1.413T15 20Zm-6-6q-.825 0-1.413-.588T7 12q0-.825.588-1.413T9 10q.825 0 1.413.588T11 12q0 .825-.588 1.413T9 14Zm6 0q-.825 0-1.413-.588T13 12q0-.825.588-1.413T15 10q.825 0 1.413.588T17 12q0 .825-.588 1.413T15 14ZM9 8q-.825 0-1.413-.588T7 6q0-.825.588-1.413T9 4q.825 0 1.413.588T11 6q0 .825-.588 1.413T9 8Zm6 0q-.825 0-1.413-.588T13 6q0-.825.588-1.413T15 4q.825 0 1.413.588T17 6q0 .825-.588 1.413T15 8Z"/>'};function Ae({id:b,title:c,children:t,index:n,onMove:o,defaultExpand:r=!1,onEnd:x,icon:a=null}){const[p,d]=D.useState(r),f=D.useRef(null),l=D.useRef(null),[{handlerId:j},v]=Ee({accept:"dragItem",collect(s){return{handlerId:s.getHandlerId()}},hover(s,I){if(!f.current)return;const L=s.index,m=n;if(L===m)return;const R=f.current?.getBoundingClientRect(),_=l.current?.getBoundingClientRect(),re=(_.bottom-_.top)/2,$=I.getClientOffset().y-R.top;L<m&&$<re||L>m&&$>re||(o(L,m),s.index=m)}}),[{isDragging:S},g]=Ue({item:{index:n,type:"dragItem"},collect:s=>({isDragging:s.isDragging()}),end:x});g(l),v(f);const w=S?.5:1,h=u(s=>{s.preventDefault(),s.stopPropagation(),d(!p)});return e.jsxs(i,{ref:f,children:[e.jsxs(i,{sx:{cursor:"pointer","&:hover":{backgroundColor:"grey.100"}},ref:l,"data-handler-id":j,children:[e.jsxs(i,{sx:{py:2,px:1,opacity:w,display:"flex",alignItems:"center",gap:.5},draggable:!1,onClick:h,children:[e.jsx(i,{sx:{pointerEvents:"auto",cursor:"grab","&:active":{cursor:"grabbing"},fontSize:0,color:"text.hint","&:hover":{color:"text.secondary"}},children:e.jsx(X,{fontSize:20,icon:pt})}),e.jsx(i,{sx:{display:"flex",alignItems:"center",flexShrink:0,mr:.5,transform:"translateY(-1px)"},children:a}),e.jsx(Y,{sx:{flex:1},children:c}),e.jsx(le,{size:"small",sx:{pointerEvents:"auto",transform:p?"":"rotate(180deg)",transition:"transform 0.3s ease"},children:e.jsx(X,{icon:ot,style:{transform:"scale(1.5)"}})})]}),e.jsx(oe,{})]}),e.jsx(i,{sx:{pl:4,py:2.5,display:p?"block":"none"},children:t})]})}Ae.propTypes={title:E.string.isRequired,id:E.string.isRequired,children:E.node.isRequired,index:E.number.isRequired,onMove:E.func.isRequired,onEnd:E.func.isRequired,defaultExpand:E.bool,icon:E.any};const xt=[{name:"github",title:G.PROVIDER_NAME.github,icon:e.jsx(se,{provider:"github",sx:{width:20,height:20}}),component:e.jsx(dt,{})},{name:"google",title:G.PROVIDER_NAME.google,icon:e.jsx(se,{provider:"google",sx:{width:20,height:20}}),component:e.jsx(ut,{})},{name:"apple",title:G.PROVIDER_NAME.apple,icon:e.jsx(se,{provider:"apple",sx:{width:20,height:20}}),component:e.jsx(ht,{})},{name:"twitter",title:G.PROVIDER_NAME.twitter,icon:e.jsx(se,{provider:"twitter",sx:{width:20,height:20}}),component:e.jsx(mt,{})},{name:"auth0",title:G.PROVIDER_NAME.auth0,icon:e.jsx(se,{provider:"auth0",sx:{width:20,height:20}}),component:e.jsx(ct,{})}],ft=["github","google","apple","twitter","auth0"];function gt(){const{api:b}=N(),{blocklet:c}=M(),t=c?.meta?.did,n=c?.settings?.oauth||{},o=Object.keys(n).sort((l,j)=>n[l]?.order!==void 0&&n[j]?.order!==void 0?n[l].order-n[j].order:n[l]?.order!==void 0?-1:1);for(const l of ft)o.includes(l)||o.push(l);const r=ae(o.reduce((l,j,v)=>Object.assign(l,{[j]:v}),{})),x=H(()=>{const l=[...xt];return l.sort((j,v)=>r[j.name]-r[v.name]),l.map(j=>({...j,enabled:n[j.name]?.enabled??!1}))},[r.auth0,r.github,r.google]),a={};typeof window<"u"&&(a.context=window);const p=u(async l=>{const j={};Object.keys(l).forEach(v=>{j[v]={order:l[v]}}),await b.configOAuth({input:{did:t,oauth:JSON.stringify(j)}})}),d=u((l,j)=>{const v=x[l],S=x[j];r[v.name]=j,r[S.name]=l}),f=u(async()=>{await p(r)});return e.jsx(i,{sx:{".section-left":{width:"180px"}},children:e.jsx(We,{backend:Ve,...a,children:x.map((l,j)=>e.jsx(Ae,{index:j,id:l.name,title:l.title,icon:l.icon,onMove:d,onEnd:f,defaultExpand:l.enabled,children:l.component},l.name))})})}const J={ttl:ve.SESSION_TTL,cacheTtl:ve.SESSION_CACHE_TTL,email:{enabled:!1,requireVerified:!1,requireUnique:!1,trustOauthProviders:!1,trustedIssuers:[],enableDomainBlackList:!1,domainBlackList:[],enableDomainWhiteList:!1,domainWhiteList:[]},phone:{enabled:!1,requireVerified:!1,requireUnique:!1,regionBlackList:[],trustedIssuers:[]},enableBlacklist:!1};function U(b){return e.jsx(at,{...b,sx:{transform:"scale(0.75)"}})}function fe(b,c=!1){const t=c?b.ttl*86400:b.ttl/86400;return{...b,ttl:t}}function jt(){const{api:b}=N(),{blocklet:c}=M(),t=c?.meta?.did,n=Xe({},J,c?.settings?.session||{});de(n.ttl)&&(n.ttl=J.ttl),de(n.cacheTtl)&&(n.cacheTtl=J.cacheTtl),n.phone||(n.phone=J.phone),n.email||(n.email=J.email),de(n.enableBlacklist)&&(n.enableBlacklist=J.enableBlacklist);const{handleSubmit:o,control:r,formState:x,reset:a,watch:p}=te({defaultValues:Z(fe(n),["ttl","cacheTtl","email","phone","enableBlacklist"])}),{t:d}=ee(),f=p("email.enabled"),l=p("phone.enabled"),j=p("email.enableDomainBlackList"),v=p("email.enableDomainWhiteList"),{fields:S,append:g,remove:w}=De({control:r,name:"email.domainBlackList"}),{fields:h,append:s,remove:I}=De({control:r,name:"email.domainWhiteList"}),L=u(async m=>{try{const{blocklet:R}=await b.updateAppSessionConfig({input:{did:t,config:et(fe(m,!0),["phone"])}}),_=Object.assign({},J,Z(R?.settings?.session||{},["ttl","cacheTtl","email","phone","enableBlacklist"]));a(fe(_)),O.success(d("common.configSuccess"))}catch(R){O.error(R.message)}});return e.jsx(bt,{onSubmit:o(L),children:e.jsxs(W,{direction:"column",sx:{gap:6},children:[e.jsxs(i,{children:[e.jsxs(i,{children:[e.jsx(Y,{variant:"h6",sx:{fontWeight:600},children:d("blocklet.config.session.profile")}),e.jsx(i,{component:oe,sx:{my:3}})]}),e.jsxs(W,{sx:{gap:2},children:[e.jsx(y,{title:d("blocklet.config.session.fullNameEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{alignSelf:"flex-start"},children:e.jsx(U,{disabled:!0,checked:!0})})}),e.jsx(y,{title:d("blocklet.config.session.avatarEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{alignSelf:"flex-start"},children:e.jsx(U,{disabled:!0,checked:!0})})}),e.jsx(y,{title:d("blocklet.config.session.emailEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"email.enabled",control:r,render:({field:m})=>e.jsx(U,{...m,checked:m.value})})})}),f&&e.jsxs(W,{direction:"column",sx:{ml:2,gap:.5},children:[e.jsx(y,{title:d("blocklet.config.session.emailRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"email.requireVerified",control:r,render:({field:m})=>e.jsx(A,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})}),e.jsx(y,{title:d("blocklet.config.session.emailRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"email.requireUnique",control:r,render:({field:m})=>e.jsx(A,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})}),e.jsx(y,{title:d("blocklet.config.session.emailTrustOauthProviders"),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"email.trustOauthProviders",control:r,render:({field:m})=>e.jsx(A,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})}),e.jsx(y,{title:d("blocklet.config.session.enableDomainBlackList"),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"email.enableDomainBlackList",control:r,render:({field:m})=>e.jsx(A,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})}),j&&e.jsxs(i,{children:[S.map((m,R)=>e.jsxs(W,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(k,{name:`email.domainBlackList.${R}`,control:r,render:_=>e.jsx(F,{..._.field,size:"small",fullWidth:!0})}),e.jsx(le,{onClick:()=>w(R),children:e.jsx(qe,{})})]},m.id)),e.jsx(V,{startIcon:e.jsx(Le,{}),onClick:()=>g(""),children:d("blocklet.config.session.addDomain")})]}),e.jsx(y,{title:d("blocklet.config.session.enableDomainWhiteList"),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"email.enableDomainWhiteList",control:r,render:({field:m})=>e.jsx(A,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})}),v&&e.jsxs(i,{children:[h.map((m,R)=>e.jsxs(W,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(k,{name:`email.domainWhiteList.${R}`,control:r,render:_=>e.jsx(F,{..._.field,size:"small",fullWidth:!0})}),e.jsx(le,{onClick:()=>I(R),children:e.jsx(qe,{})})]},m.id)),e.jsx(V,{startIcon:e.jsx(Le,{}),onClick:()=>s(""),children:d("blocklet.config.session.addDomain")})]})]}),e.jsxs(i,{sx:{display:"none"},children:[e.jsx(y,{title:d("blocklet.config.session.phoneEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"phone.enabled",control:r,disabled:!0,render:({field:m})=>e.jsx(A,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})}),l&&e.jsxs(W,{direction:"column",sx:{ml:2,mt:1},children:[e.jsx(y,{title:d("blocklet.config.session.phoneRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"phone.requireVerified",control:r,render:({field:m})=>e.jsx(A,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})}),e.jsx(y,{title:d("blocklet.config.session.phoneRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"phone.requireUnique",control:r,render:({field:m})=>e.jsx(A,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})})]})]})]})]}),e.jsxs(i,{children:[e.jsx(Y,{variant:"h6",sx:{fontWeight:600},children:d("blocklet.config.session.period")}),e.jsx(i,{component:oe,sx:{my:3}}),e.jsx(W,{direction:"column",spacing:2,children:e.jsx(k,{name:"ttl",control:r,rules:{min:1,max:30},render:({field:m})=>e.jsx(B,{fullWidth:!0,sx:{mb:2},children:e.jsx(y,{title:d("blocklet.config.session.ttl",{day:m.value}),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{width:"100%",maxWidth:500,px:2},children:e.jsx(Je,{...m,defaultValue:7,step:1,marks:[{value:1,label:d("blocklet.config.session.day",{day:1})},{value:7,label:d("blocklet.config.session.days",{day:7})},{value:14,label:d("blocklet.config.session.days",{day:14})},{value:21,label:d("blocklet.config.session.days",{day:21})},{value:30,label:d("blocklet.config.session.days",{day:30})}],min:1,max:30,valueLabelDisplay:"auto"})})})})})})]}),e.jsxs(i,{children:[e.jsx(Y,{variant:"h6",sx:{fontWeight:600},children:d("blocklet.config.session.experimentalSettings")}),e.jsx(i,{component:oe,sx:{my:3}}),e.jsx(W,{direction:"column",spacing:2,children:e.jsx(y,{title:d("blocklet.config.session.enableBlacklist"),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"enableBlacklist",control:r,render:({field:m})=>e.jsx(A,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})})})]}),e.jsx(i,{children:e.jsx(V,{type:"submit",variant:"contained",disabled:!x.isDirty,children:d("oauth.save")})})]})})}const bt=Fe.form`
1
+ import{T as ee,H as O,ab as X,ao as Ee,ap as Ue,aq as We,ar as Ve,G as K,aj as je,F as ke,N as Me,D as z,as as _e,ac as Ne,O as $e,L as Ie}from"./vendor-ux-ESjuHpb6.js";import{b as u,a as H,g as ae,c as He}from"./vendor-hooks-DLNZ8kxG.js";import{r as D}from"./vendor-react-Dvs43sk9.js";import{j as e,ak as i,b6 as A,am as ce,y as B,z as F,Q as V,T as Y,I as le,a3 as oe,W as E,b1 as W,ch as qe,cf as Le,cz as Je,at as Fe,D as ye,ah as Be,cA as Oe,a6 as be,cB as Ze,a$ as Ke}from"./vendor-mui-core-CmD-NPnl.js";import{Z as N,a8 as M,X as G,bh as se,c as ve,b9 as Ge,aZ as Ye,Y as Qe}from"./index-6k6hDX7K.js";import{A as Z,Q as Xe,b as de,Y as et,n as Q,_ as tt,C as nt,a as st}from"./vendor-utils-DQK0pEML.js";import{u as te,C as k,a as De}from"./index.esm-JPZAjt0x.js";import{S as ie}from"./switch-control-o8fDOnJX.js";import{S as y}from"./section-CndbjVtx.js";import{d as ot}from"./keyboard-arrow-down-rounded-8U0_i9QO.js";import{u as at}from"./index-DEdn8u__.js";import{v as it}from"./index-1BANSka2.js";import{r as rt}from"./base32-Bs5DmmgZ.js";import{u as lt}from"./use-mobile-D93Bk2Ru.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-C-xQV6LY.js";import"./required-B2SKELXR.js";const we={width:24,height:24,body:'<path fill="currentColor" d="M5 4v16V4v5v-5Zm3 10h2.675q.275-.575.638-1.075t.812-.925H8q-.425 0-.713.288T7 13q0 .425.288.713T8 14Zm0 4h2.075Q10 17.5 10 17t.075-1H8q-.425 0-.713.288T7 17q0 .425.288.713T8 18Zm-3 4q-.825 0-1.413-.588T3 20V4q0-.825.588-1.413T5 2h7.175q.4 0 .763.15t.637.425l4.85 4.85q.275.275.425.638t.15.762V10.3q-.475-.15-.975-.225T17 10V9h-4q-.425 0-.713-.288T12 8V4H5v16h5.675q.275.575.638 1.075t.812.925H5Zm12-10q2.075 0 3.538 1.463T22 17q0 2.075-1.463 3.538T17 22q-2.075 0-3.538-1.463T12 17q0-2.075 1.463-3.538T17 12Zm0 8q.275 0 .463-.188t.187-.462q0-.275-.187-.463T17 18.7q-.275 0-.463.188t-.187.462q0 .275.188.463T17 20Zm0-6q-.475 0-.875.238t-.65.637q-.1.15-.025.313t.25.237q.15.075.3 0t.275-.2q.125-.175.313-.275t.412-.1q.325 0 .563.213t.237.537q0 .275-.15.463t-.35.387q-.15.15-.313.3t-.287.35q-.075.15-.113.313t-.037.337q0 .225.125.413t.325.187q.2 0 .325-.15t.125-.35q0-.275.15-.488t.35-.412q.3-.275.525-.613t.225-.737q0-.675-.5-1.138T17 14Z"/>'},ue={enabled:!1,domain:"",clientId:"",clientSecret:""};function ct(){const{api:b}=N(),{blocklet:c}=M(),{t,locale:n}=ee(),o=c?.meta?.did,r=Object.assign({...ue},c?.settings?.oauth?.auth0||{}),{handleSubmit:x,control:a,formState:p,watch:d,reset:f}=te({defaultValues:Z(r,Object.keys(ue))}),l=d("enabled"),j=u(async s=>{try{const{blocklet:I}=await b.configOAuth({input:{did:o,oauth:JSON.stringify({auth0:s})}}),L=Object.assign({...ue},I?.settings?.oauth?.auth0||{});f(L),O.success(t("oauth.saveSuccess"))}catch(I){O.error(I.message||t("oauth.saveFailed"))}}),v=u(s=>s?.trim()?!0:t("oauth.auth0.domainDescription")),S=u(s=>s?.trim()?!0:t("oauth.auth0.clientIdDescription")),g=u(s=>s?.trim()?!0:t("oauth.auth0.clientSecretDescription")),w=u(()=>!0),h=H(()=>n==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-auth0":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-auth0",[n]);return e.jsx(i,{children:e.jsxs("form",{onSubmit:x(j),disabled:!0,children:[e.jsx(y,{title:e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx("span",{children:t("oauth.auth0.enable")}),e.jsx(ce,{title:t("oauth.viewDocument"),children:e.jsx(i,{component:"a",sx:{display:"inline-block",color:"inherit",fontSize:0,lineHeight:1},href:h,target:"_blank",rel:"noreferrer",children:e.jsx(X,{icon:we,fontSize:20})})})]}),mb:2.5,children:e.jsx(k,{name:"enabled",control:a,render:({field:s})=>e.jsx(A,{control:e.jsx(ie,{sx:{ml:1},checked:s.value,...s})})})}),e.jsx(y,{title:t("oauth.auth0.domain"),children:e.jsx(k,{name:"domain",control:a,rules:{validate:l?v:w},render:({field:s})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...s,size:"small",label:t("oauth.auth0.domain"),error:!!p.errors[s.name],helperText:p.errors[s.name]?.message||" ",disabled:!l})})})}),e.jsx(y,{title:t("oauth.auth0.clientId"),children:e.jsx(k,{name:"clientId",control:a,rules:{validate:l?S:w},render:({field:s})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...s,size:"small",label:t("oauth.auth0.clientId"),error:!!p.errors[s.name],helperText:p.errors[s.name]?.message||" ",disabled:!l})})})}),e.jsx(y,{title:t("oauth.auth0.clientSecret"),children:e.jsx(k,{name:"clientSecret",control:a,rules:{validate:l?g:w},render:({field:s})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...s,size:"small",type:"password",label:t("oauth.auth0.clientSecret"),error:!!p.errors[s.name],helperText:p.errors[s.name]?.message||" ",disabled:!l})})})}),e.jsx(V,{type:"submit",variant:"contained",onSubmit:x(j),disabled:!p.isDirty,children:t("oauth.save")})]})})}const he={enabled:!1,clientId:"",clientSecret:""};function dt(){const{api:b}=N(),{blocklet:c}=M(),{t,locale:n}=ee(),o=c?.meta?.did,r=Object.assign({...he},c?.settings?.oauth?.github||{}),{handleSubmit:x,control:a,formState:p,watch:d,reset:f}=te({defaultValues:Z(r,Object.keys(he))}),l=d("enabled"),j=u(async h=>{try{const{blocklet:s}=await b.configOAuth({input:{did:o,oauth:JSON.stringify({github:h})}}),I=Object.assign({...he},s?.settings?.oauth?.github||{});f(I),O.success(t("oauth.saveSuccess"))}catch(s){O.error(s.message||t("oauth.saveFailed"))}}),v=u(h=>h?.trim()?!0:t("oauth.github.clientIdDescription")),S=u(h=>h?.trim()?!0:t("oauth.github.clientSecretDescription")),g=u(()=>!0),w=H(()=>n==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-github":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-github",[n]);return e.jsx(i,{children:e.jsxs("form",{onSubmit:x(j),disabled:!0,children:[e.jsx(y,{title:e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx("span",{children:t("oauth.github.enable")}),e.jsx(ce,{title:t("oauth.viewDocument"),children:e.jsx(i,{component:"a",sx:{display:"inline-block",color:"inherit",fontSize:0,lineHeight:1},href:w,target:"_blank",rel:"noreferrer",children:e.jsx(X,{icon:we,fontSize:20})})})]}),mb:2.5,sx:{"& .section-content":{alignItems:"center"}},children:e.jsx(k,{name:"enabled",control:a,sx:{alignItems:"center"},render:({field:h})=>e.jsx(A,{control:e.jsx(ie,{sx:{ml:1},size:"small",checked:h.value,...h})})})}),e.jsx(y,{title:t("oauth.github.clientId"),children:e.jsx(k,{name:"clientId",control:a,rules:{validate:l?v:g},render:({field:h})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...h,size:"small",label:t("oauth.github.clientId"),error:!!p.errors[h.name],helperText:p.errors[h.name]?.message||" ",disabled:!l})})})}),e.jsx(y,{title:t("oauth.github.clientSecret"),children:e.jsx(k,{name:"clientSecret",control:a,rules:{validate:l?S:g},render:({field:h})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...h,size:"small",type:"password",label:t("oauth.github.clientSecret"),error:!!p.errors[h.name],helperText:p.errors[h.name]?.message||" ",disabled:!l})})})}),e.jsx(V,{type:"submit",variant:"contained",onSubmit:x(j),disabled:!p.isDirty,children:t("oauth.save")})]})})}const me={enabled:!1,clientId:"",clientSecret:""};function ut(){const{api:b}=N(),{blocklet:c}=M(),{t,locale:n}=ee(),o=c?.meta?.did,r=Object.assign({...me},c?.settings?.oauth?.google||{}),{handleSubmit:x,control:a,formState:p,watch:d,reset:f}=te({defaultValues:Z(r,Object.keys(me))}),l=d("enabled"),j=u(async h=>{try{const{blocklet:s}=await b.configOAuth({input:{did:o,oauth:JSON.stringify({google:h})}}),I=Object.assign({...me},s?.settings?.oauth?.google||{});f(I),O.success(t("oauth.saveSuccess"))}catch(s){O.error(s.message||t("oauth.saveFailed"))}}),v=u(h=>h?.trim()?!0:t("oauth.google.clientIdDescription")),S=u(h=>h?.trim()?!0:t("oauth.google.clientSecretDescription")),g=u(()=>!0),w=H(()=>n==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-google":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-google",[n]);return e.jsx(i,{children:e.jsxs("form",{onSubmit:x(j),disabled:!0,children:[e.jsx(y,{title:e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx("span",{children:t("oauth.google.enable")}),e.jsx(ce,{title:t("oauth.viewDocument"),children:e.jsx(i,{component:"a",sx:{display:"inline-block",color:"inherit",fontSize:0,lineHeight:1},href:w,target:"_blank",rel:"noreferrer",children:e.jsx(X,{icon:we,fontSize:20})})})]}),mb:2.5,children:e.jsx(k,{name:"enabled",control:a,render:({field:h})=>e.jsx(A,{control:e.jsx(ie,{sx:{ml:1},checked:h.value,...h})})})}),e.jsx(y,{title:t("oauth.google.clientId"),children:e.jsx(k,{name:"clientId",control:a,rules:{validate:l?v:g},render:({field:h})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...h,size:"small",label:t("oauth.google.clientId"),error:!!p.errors[h.name],helperText:p.errors[h.name]?.message||" ",disabled:!l})})})}),e.jsx(y,{title:t("oauth.google.clientSecret"),children:e.jsx(k,{name:"clientSecret",control:a,rules:{validate:l?S:g},render:({field:h})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...h,size:"small",type:"password",label:t("oauth.google.clientSecret"),error:!!p.errors[h.name],helperText:p.errors[h.name]?.message||" ",disabled:!l})})})}),e.jsx(V,{type:"submit",variant:"contained",onSubmit:x(j),disabled:!p.isDirty,children:t("oauth.save")})]})})}const pe={enabled:!1,teamId:"",serviceId:"",keyId:"",authKey:"",bundleId:""};function ht(){const{api:b}=N(),{blocklet:c}=M(),{t}=ee(),n=c?.meta?.did,o=Object.assign({...pe},c?.settings?.oauth?.apple||{}),{handleSubmit:r,control:x,formState:a,watch:p,reset:d}=te({defaultValues:Z(o,Object.keys(pe))}),f=p("enabled"),l=u(async s=>{try{const{blocklet:I}=await b.configOAuth({input:{did:n,oauth:JSON.stringify({apple:s})}}),L=Object.assign({...pe},I?.settings?.oauth?.apple||{});d(L),O.success(t("oauth.saveSuccess"))}catch(I){O.error(I.message||t("oauth.saveFailed"))}}),j=u(s=>s?.trim()?!0:t("oauth.apple.teamIdDescription")),v=u(s=>s?.trim()?!0:t("oauth.apple.serviceIdDescription")),S=u(s=>s?.trim()?!0:t("oauth.apple.keyIdDescription")),g=u(s=>s?.trim()?!0:t("oauth.apple.authKeyDescription")),w=u(s=>s?.trim()?!0:t("oauth.apple.bundleIdDescription")),h=u(()=>!0);return e.jsx(i,{children:e.jsxs("form",{onSubmit:r(l),disabled:!0,children:[e.jsx(y,{title:t("oauth.apple.enable"),mb:2.5,children:e.jsx(k,{name:"enabled",control:x,render:({field:s})=>e.jsx(A,{control:e.jsx(ie,{sx:{ml:1},checked:s.value,...s})})})}),e.jsx(y,{title:t("oauth.apple.teamId"),children:e.jsx(k,{name:"teamId",control:x,rules:{validate:f?j:h},render:({field:s})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...s,size:"small",label:t("oauth.apple.teamId"),error:!!a.errors[s.name],helperText:a.errors[s.name]?.message||" ",disabled:!f})})})}),e.jsx(y,{title:t("oauth.apple.bundleId"),children:e.jsx(k,{name:"bundleId",control:x,rules:{validate:f?w:h},render:({field:s})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...s,size:"small",label:t("oauth.apple.bundleId"),error:!!a.errors[s.name],helperText:a.errors[s.name]?.message||" ",disabled:!f})})})}),e.jsx(y,{title:t("oauth.apple.serviceId"),children:e.jsx(k,{name:"serviceId",control:x,rules:{validate:f?v:h},render:({field:s})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...s,size:"small",label:t("oauth.apple.serviceId"),error:!!a.errors[s.name],helperText:a.errors[s.name]?.message||" ",disabled:!f})})})}),e.jsx(y,{title:t("oauth.apple.keyId"),children:e.jsx(k,{name:"keyId",control:x,rules:{validate:f?S:h},render:({field:s})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...s,size:"small",label:t("oauth.apple.keyId"),error:!!a.errors[s.name],helperText:a.errors[s.name]?.message||" ",disabled:!f})})})}),e.jsx(y,{title:t("oauth.apple.authKey"),children:e.jsx(k,{name:"authKey",control:x,rules:{validate:f?g:h},render:({field:s})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...s,size:"small",type:"password",label:t("oauth.apple.authKey"),multiline:!0,rows:4,error:!!a.errors[s.name],helperText:a.errors[s.name]?.message||" ",disabled:!f})})})}),e.jsx(V,{type:"submit",variant:"contained",onSubmit:r(l),disabled:!a.isDirty,children:t("oauth.save")})]})})}const xe={enabled:!1,clientId:"",clientSecret:""};function mt(){const{api:b}=N(),{blocklet:c}=M(),{t}=ee(),n=c?.meta?.did,o=Object.assign({...xe},c?.settings?.oauth?.twitter||{}),{handleSubmit:r,control:x,formState:a,watch:p,reset:d}=te({defaultValues:Z(o,Object.keys(xe))}),f=p("enabled"),l=u(async g=>{try{const{blocklet:w}=await b.configOAuth({input:{did:n,oauth:JSON.stringify({twitter:g})}}),h=Object.assign({...xe},w?.settings?.oauth?.twitter||{});d(h),O.success(t("oauth.saveSuccess"))}catch(w){O.error(w.message||t("oauth.saveFailed"))}}),j=u(g=>g?.trim()?!0:t("oauth.twitter.clientIdDescription")),v=u(g=>g?.trim()?!0:t("oauth.twitter.clientSecretDescription")),S=u(()=>!0);return e.jsx(i,{children:e.jsxs("form",{onSubmit:r(l),disabled:!0,children:[e.jsx(y,{title:e.jsx(i,{sx:{display:"flex",alignItems:"center",gap:1},children:e.jsx("span",{children:t("oauth.twitter.enable")})}),mb:2.5,sx:{"& .section-content":{alignItems:"center"}},children:e.jsx(k,{name:"enabled",control:x,sx:{alignItems:"center"},render:({field:g})=>e.jsx(A,{control:e.jsx(ie,{sx:{ml:1},size:"small",checked:g.value,...g})})})}),e.jsx(y,{title:t("oauth.twitter.clientId"),children:e.jsx(k,{name:"clientId",control:x,rules:{validate:f?j:S},render:({field:g})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...g,size:"small",label:t("oauth.twitter.clientId"),error:!!a.errors[g.name],helperText:a.errors[g.name]?.message||" ",disabled:!f})})})}),e.jsx(y,{title:t("oauth.twitter.clientSecret"),children:e.jsx(k,{name:"clientSecret",control:x,rules:{validate:f?v:S},render:({field:g})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...g,size:"small",type:"password",label:t("oauth.twitter.clientSecret"),error:!!a.errors[g.name],helperText:a.errors[g.name]?.message||" ",disabled:!f})})})}),e.jsx(V,{type:"submit",variant:"contained",onSubmit:r(l),disabled:!a.isDirty,children:t("oauth.save")})]})})}const pt={width:24,height:24,body:'<path fill="currentColor" d="M9 20q-.825 0-1.413-.588T7 18q0-.825.588-1.413T9 16q.825 0 1.413.588T11 18q0 .825-.588 1.413T9 20Zm6 0q-.825 0-1.413-.588T13 18q0-.825.588-1.413T15 16q.825 0 1.413.588T17 18q0 .825-.588 1.413T15 20Zm-6-6q-.825 0-1.413-.588T7 12q0-.825.588-1.413T9 10q.825 0 1.413.588T11 12q0 .825-.588 1.413T9 14Zm6 0q-.825 0-1.413-.588T13 12q0-.825.588-1.413T15 10q.825 0 1.413.588T17 12q0 .825-.588 1.413T15 14ZM9 8q-.825 0-1.413-.588T7 6q0-.825.588-1.413T9 4q.825 0 1.413.588T11 6q0 .825-.588 1.413T9 8Zm6 0q-.825 0-1.413-.588T13 6q0-.825.588-1.413T15 4q.825 0 1.413.588T17 6q0 .825-.588 1.413T15 8Z"/>'};function Ae({id:b,title:c,children:t,index:n,onMove:o,defaultExpand:r=!1,onEnd:x,icon:a=null}){const[p,d]=D.useState(r),f=D.useRef(null),l=D.useRef(null),[{handlerId:j},v]=Ee({accept:"dragItem",collect(s){return{handlerId:s.getHandlerId()}},hover(s,I){if(!f.current)return;const L=s.index,m=n;if(L===m)return;const R=f.current?.getBoundingClientRect(),_=l.current?.getBoundingClientRect(),re=(_.bottom-_.top)/2,$=I.getClientOffset().y-R.top;L<m&&$<re||L>m&&$>re||(o(L,m),s.index=m)}}),[{isDragging:S},g]=Ue({item:{index:n,type:"dragItem"},collect:s=>({isDragging:s.isDragging()}),end:x});g(l),v(f);const w=S?.5:1,h=u(s=>{s.preventDefault(),s.stopPropagation(),d(!p)});return e.jsxs(i,{ref:f,children:[e.jsxs(i,{sx:{cursor:"pointer","&:hover":{backgroundColor:"grey.100"}},ref:l,"data-handler-id":j,children:[e.jsxs(i,{sx:{py:2,px:1,opacity:w,display:"flex",alignItems:"center",gap:.5},draggable:!1,onClick:h,children:[e.jsx(i,{sx:{pointerEvents:"auto",cursor:"grab","&:active":{cursor:"grabbing"},fontSize:0,color:"text.hint","&:hover":{color:"text.secondary"}},children:e.jsx(X,{fontSize:20,icon:pt})}),e.jsx(i,{sx:{display:"flex",alignItems:"center",flexShrink:0,mr:.5,transform:"translateY(-1px)"},children:a}),e.jsx(Y,{sx:{flex:1},children:c}),e.jsx(le,{size:"small",sx:{pointerEvents:"auto",transform:p?"":"rotate(180deg)",transition:"transform 0.3s ease"},children:e.jsx(X,{icon:ot,style:{transform:"scale(1.5)"}})})]}),e.jsx(oe,{})]}),e.jsx(i,{sx:{pl:4,py:2.5,display:p?"block":"none"},children:t})]})}Ae.propTypes={title:E.string.isRequired,id:E.string.isRequired,children:E.node.isRequired,index:E.number.isRequired,onMove:E.func.isRequired,onEnd:E.func.isRequired,defaultExpand:E.bool,icon:E.any};const xt=[{name:"github",title:G.PROVIDER_NAME.github,icon:e.jsx(se,{provider:"github",sx:{width:20,height:20}}),component:e.jsx(dt,{})},{name:"google",title:G.PROVIDER_NAME.google,icon:e.jsx(se,{provider:"google",sx:{width:20,height:20}}),component:e.jsx(ut,{})},{name:"apple",title:G.PROVIDER_NAME.apple,icon:e.jsx(se,{provider:"apple",sx:{width:20,height:20}}),component:e.jsx(ht,{})},{name:"twitter",title:G.PROVIDER_NAME.twitter,icon:e.jsx(se,{provider:"twitter",sx:{width:20,height:20}}),component:e.jsx(mt,{})},{name:"auth0",title:G.PROVIDER_NAME.auth0,icon:e.jsx(se,{provider:"auth0",sx:{width:20,height:20}}),component:e.jsx(ct,{})}],ft=["github","google","apple","twitter","auth0"];function gt(){const{api:b}=N(),{blocklet:c}=M(),t=c?.meta?.did,n=c?.settings?.oauth||{},o=Object.keys(n).sort((l,j)=>n[l]?.order!==void 0&&n[j]?.order!==void 0?n[l].order-n[j].order:n[l]?.order!==void 0?-1:1);for(const l of ft)o.includes(l)||o.push(l);const r=ae(o.reduce((l,j,v)=>Object.assign(l,{[j]:v}),{})),x=H(()=>{const l=[...xt];return l.sort((j,v)=>r[j.name]-r[v.name]),l.map(j=>({...j,enabled:n[j.name]?.enabled??!1}))},[r.auth0,r.github,r.google]),a={};typeof window<"u"&&(a.context=window);const p=u(async l=>{const j={};Object.keys(l).forEach(v=>{j[v]={order:l[v]}}),await b.configOAuth({input:{did:t,oauth:JSON.stringify(j)}})}),d=u((l,j)=>{const v=x[l],S=x[j];r[v.name]=j,r[S.name]=l}),f=u(async()=>{await p(r)});return e.jsx(i,{sx:{".section-left":{width:"180px"}},children:e.jsx(We,{backend:Ve,...a,children:x.map((l,j)=>e.jsx(Ae,{index:j,id:l.name,title:l.title,icon:l.icon,onMove:d,onEnd:f,defaultExpand:l.enabled,children:l.component},l.name))})})}const J={ttl:ve.SESSION_TTL,cacheTtl:ve.SESSION_CACHE_TTL,email:{enabled:!1,requireVerified:!1,requireUnique:!1,trustOauthProviders:!1,trustedIssuers:[],enableDomainBlackList:!1,domainBlackList:[],enableDomainWhiteList:!1,domainWhiteList:[]},phone:{enabled:!1,requireVerified:!1,requireUnique:!1,regionBlackList:[],trustedIssuers:[]},enableBlacklist:!1};function U(b){return e.jsx(at,{...b,sx:{transform:"scale(0.75)"}})}function fe(b,c=!1){const t=c?b.ttl*86400:b.ttl/86400;return{...b,ttl:t}}function jt(){const{api:b}=N(),{blocklet:c}=M(),t=c?.meta?.did,n=Xe({},J,c?.settings?.session||{});de(n.ttl)&&(n.ttl=J.ttl),de(n.cacheTtl)&&(n.cacheTtl=J.cacheTtl),n.phone||(n.phone=J.phone),n.email||(n.email=J.email),de(n.enableBlacklist)&&(n.enableBlacklist=J.enableBlacklist);const{handleSubmit:o,control:r,formState:x,reset:a,watch:p}=te({defaultValues:Z(fe(n),["ttl","cacheTtl","email","phone","enableBlacklist"])}),{t:d}=ee(),f=p("email.enabled"),l=p("phone.enabled"),j=p("email.enableDomainBlackList"),v=p("email.enableDomainWhiteList"),{fields:S,append:g,remove:w}=De({control:r,name:"email.domainBlackList"}),{fields:h,append:s,remove:I}=De({control:r,name:"email.domainWhiteList"}),L=u(async m=>{try{const{blocklet:R}=await b.updateAppSessionConfig({input:{did:t,config:et(fe(m,!0),["phone"])}}),_=Object.assign({},J,Z(R?.settings?.session||{},["ttl","cacheTtl","email","phone","enableBlacklist"]));a(fe(_)),O.success(d("common.configSuccess"))}catch(R){O.error(R.message)}});return e.jsx(bt,{onSubmit:o(L),children:e.jsxs(W,{direction:"column",sx:{gap:6},children:[e.jsxs(i,{children:[e.jsxs(i,{children:[e.jsx(Y,{variant:"h6",sx:{fontWeight:600},children:d("blocklet.config.session.profile")}),e.jsx(i,{component:oe,sx:{my:3}})]}),e.jsxs(W,{sx:{gap:2},children:[e.jsx(y,{title:d("blocklet.config.session.fullNameEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{alignSelf:"flex-start"},children:e.jsx(U,{disabled:!0,checked:!0})})}),e.jsx(y,{title:d("blocklet.config.session.avatarEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{alignSelf:"flex-start"},children:e.jsx(U,{disabled:!0,checked:!0})})}),e.jsx(y,{title:d("blocklet.config.session.emailEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"email.enabled",control:r,render:({field:m})=>e.jsx(U,{...m,checked:m.value})})})}),f&&e.jsxs(W,{direction:"column",sx:{ml:2,gap:.5},children:[e.jsx(y,{title:d("blocklet.config.session.emailRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"email.requireVerified",control:r,render:({field:m})=>e.jsx(A,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})}),e.jsx(y,{title:d("blocklet.config.session.emailRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"email.requireUnique",control:r,render:({field:m})=>e.jsx(A,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})}),e.jsx(y,{title:d("blocklet.config.session.emailTrustOauthProviders"),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"email.trustOauthProviders",control:r,render:({field:m})=>e.jsx(A,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})}),e.jsx(y,{title:d("blocklet.config.session.enableDomainBlackList"),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"email.enableDomainBlackList",control:r,render:({field:m})=>e.jsx(A,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})}),j&&e.jsxs(i,{children:[S.map((m,R)=>e.jsxs(W,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(k,{name:`email.domainBlackList.${R}`,control:r,render:_=>e.jsx(F,{..._.field,size:"small",fullWidth:!0})}),e.jsx(le,{onClick:()=>w(R),children:e.jsx(qe,{})})]},m.id)),e.jsx(V,{startIcon:e.jsx(Le,{}),onClick:()=>g(""),children:d("blocklet.config.session.addDomain")})]}),e.jsx(y,{title:d("blocklet.config.session.enableDomainWhiteList"),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"email.enableDomainWhiteList",control:r,render:({field:m})=>e.jsx(A,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})}),v&&e.jsxs(i,{children:[h.map((m,R)=>e.jsxs(W,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(k,{name:`email.domainWhiteList.${R}`,control:r,render:_=>e.jsx(F,{..._.field,size:"small",fullWidth:!0})}),e.jsx(le,{onClick:()=>I(R),children:e.jsx(qe,{})})]},m.id)),e.jsx(V,{startIcon:e.jsx(Le,{}),onClick:()=>s(""),children:d("blocklet.config.session.addDomain")})]})]}),e.jsxs(i,{sx:{display:"none"},children:[e.jsx(y,{title:d("blocklet.config.session.phoneEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"phone.enabled",control:r,disabled:!0,render:({field:m})=>e.jsx(A,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})}),l&&e.jsxs(W,{direction:"column",sx:{ml:2,mt:1},children:[e.jsx(y,{title:d("blocklet.config.session.phoneRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"phone.requireVerified",control:r,render:({field:m})=>e.jsx(A,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})}),e.jsx(y,{title:d("blocklet.config.session.phoneRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"phone.requireUnique",control:r,render:({field:m})=>e.jsx(A,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})})]})]})]})]}),e.jsxs(i,{children:[e.jsx(Y,{variant:"h6",sx:{fontWeight:600},children:d("blocklet.config.session.period")}),e.jsx(i,{component:oe,sx:{my:3}}),e.jsx(W,{direction:"column",spacing:2,children:e.jsx(k,{name:"ttl",control:r,rules:{min:1,max:30},render:({field:m})=>e.jsx(B,{fullWidth:!0,sx:{mb:2},children:e.jsx(y,{title:d("blocklet.config.session.ttl",{day:m.value}),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{width:"100%",maxWidth:500,px:2},children:e.jsx(Je,{...m,defaultValue:7,step:1,marks:[{value:1,label:d("blocklet.config.session.day",{day:1})},{value:7,label:d("blocklet.config.session.days",{day:7})},{value:14,label:d("blocklet.config.session.days",{day:14})},{value:21,label:d("blocklet.config.session.days",{day:21})},{value:30,label:d("blocklet.config.session.days",{day:30})}],min:1,max:30,valueLabelDisplay:"auto"})})})})})})]}),e.jsxs(i,{children:[e.jsx(Y,{variant:"h6",sx:{fontWeight:600},children:d("blocklet.config.session.experimentalSettings")}),e.jsx(i,{component:oe,sx:{my:3}}),e.jsx(W,{direction:"column",spacing:2,children:e.jsx(y,{title:d("blocklet.config.session.enableBlacklist"),sectionLeftSx:{width:"600px"},children:e.jsx(i,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"enableBlacklist",control:r,render:({field:m})=>e.jsx(A,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})})})]}),e.jsx(i,{children:e.jsx(V,{type:"submit",variant:"contained",disabled:!x.isDirty,children:d("oauth.save")})})]})})}const bt=Fe.form`
2
2
  max-width: 1536px;
3
3
 
4
4
  .advanced-config {
@@ -1,4 +1,4 @@
1
- import{j as e,y as Pt,bb as Re,M as ae,ak as f,Q as q,W as u,J as xe,c0 as Rt,I as D,aN as It,T,aj as Tt,b5 as Be,P as We,b6 as J,a5 as Oe,z as Ze,A as Je,ci as At,bf as Mt,U as Ce,d5 as zt,d6 as Et,at as te,d7 as Lt,a6 as V,n as le,D as Bt,d8 as Wt,ar as Ne,b1 as Ie,d9 as Ot,aX as Nt,ai as Dt,am as X,bp as $t,bq as ve,a$ as Ut,cS as Ft}from"./vendor-mui-core-CmD-NPnl.js";import{r as b,a as _t,u as qt,j as Ht}from"./vendor-react-Dvs43sk9.js";import{t as Xe,Y as Gt,a6 as Kt,R as De,D as Yt,C as ce,n as Y,A as Vt}from"./vendor-utils-DQK0pEML.js";import{a as Qt,G as Zt,bw as Jt,c as Te,d as Xt,Y as er,bx as tr,aZ as Ae,W as fe,bh as rr,by as nr,a5 as or,a$ as sr,a6 as ir,bz as ar}from"./index-CndEvJBJ.js";import{a as I,h as et,k as re,g as H,b as E,j as lr}from"./vendor-hooks-DLNZ8kxG.js";import{l as tt}from"./arrow-down.svg-C3DZxwUV.js";import{G as Me,ab as N,T as O,aM as cr,O as rt,aN as dr,H as _,aO as ur,aP as pr,aQ as $e,J as xr,D as nt,I as ze,aR as fr,aS as M,a2 as hr,a1 as gr,$ as ot,aT as mr,aU as br,a0 as yr,C as de,a6 as Ue,ac as vr,aj as Fe}from"./vendor-ux-ESjuHpb6.js";import{N as wr}from"./list-Bfj_fOi0.js";import{d as jr}from"./search-4YYphs0l.js";import{B as _e}from"./bundle-avatar-D8QkKBVi.js";import{h as qe,T as Cr}from"./team-DSjEanO-.js";import{b as Sr,d as kr,a as Pr,c as Rr,e as Ir,f as Tr,h as Ar,_ as Mr}from"./user-center-5ESBGQA5.js";import{N as st,U as it}from"./index-B65XBOLV.js";import{u as Q}from"./use-mobile-CQ7Tw4aD.js";import zr from"./index-6ZWzS1uw.js";import{f as ee}from"./index-DBs9Ljax.js";import{u as Se}from"./index-DEdn8u__.js";import{U as we}from"./user-sessions-DN6scq-_.js";import Er from"./index-DCk5kGsh.js";import{o as Lr}from"./vendor-arcblock-C-xQV6LY.js";import{c as Br,b as ue,a as Wr,S as Or}from"./index-CjxZFYCF.js";import"./index-BUKvf-Yt.js";import"./index-BojVbZw0.js";import{U as Nr}from"./user-follower-B6mKehgT.js";import"./lottie-web-4koyQiv_.js";import"./server-logo-notext.svg-CKQB0tIp.js";import"./index-DX_0Aq5L.js";import"./util-BXcTwFDD.js";import"./base32-Ccz4U5Ob.js";import"./session-BrZcMmG5.js";import"./isURL-CfmrW_0C.js";import"./use-app-logo-BZU1I0dB.js";import"./index-8j3VjBVi.js";import"./api-sewNv0AE.js";import"./table-tips-B7dQ0Rgb.js";import"./use-mobile-D93Bk2Ru.js";import"./passport-item-BbcSxETN.js";import"./did-address-D6qV21Cc.js";import"./index-DxR3NtV9.js";import"./vendor-mui-x--K2rEM1j.js";import"./AdapterDayjs-CRMDLq6K.js";import"./confirm-BAs5EAFg.js";import"./click-to-copy-BWrdBff2.js";import"./delete-confirm-ARBINDJj.js";import"./permission-D4s1M96M.js";import"./actions-CL4xTGOh.js";import"./index-DRYJ0xIl.js";function Dr(){let t=new Map;function o({root:s,rootMargin:n,threshold:a}){let i=t.get(s);i||(i=new Map,t.set(s,i));let l=JSON.stringify({rootMargin:n,threshold:a}),p=i.get(l);if(!p){let r=new Map;p={observer:new IntersectionObserver(x=>{x.forEach(m=>{r.get(m.target)?.(m)})},{root:s,rootMargin:n,threshold:a}),entryCallbacks:r},i.set(l,p)}return{observe:(r,x)=>{p.entryCallbacks.set(r,x),p.observer.observe(r)},unobserve:r=>{p.entryCallbacks.delete(r),p.observer.unobserve(r)}}}return{getObserver:o}}var $r="0px",Ur=[0],Fr=Dr();function _r(t){let o=t?.rootMargin??$r,s=t?.threshold??Ur,n=b.useRef(null),a=b.useRef(null),i=b.useRef(null),[l,p]=b.useState(),r=b.useCallback(()=>{let C=n.current;if(!C){p(void 0);return}let v=Fr.getObserver({root:a.current,rootMargin:o,threshold:s});v.observe(C,c=>{p(c)}),i.current=v},[o,s]),x=b.useCallback(()=>{let C=i.current,v=n.current;v&&C?.unobserve(v),i.current=null},[]),m=b.useCallback(C=>{x(),n.current=C,r()},[r,x]),h=b.useCallback(C=>{x(),a.current=C,r()},[r,x]);return[m,{entry:l,rootRef:h}]}var qr=_r;function Hr(t){let[o,s]=qr(t),n=!!s.entry?.isIntersecting,[a,i]=b.useState(n);return n&&!a&&i(!0),[o,{...s,isVisible:n,wasEverVisible:a}]}var Gr=Hr,Kr=100;function Yr({loading:t,hasNextPage:o,onLoadMore:s,rootMargin:n,disabled:a,delayInMs:i=Kr}){let l=b.useRef(s),[p,{rootRef:r,isVisible:x}]=Gr({rootMargin:n});b.useEffect(()=>{l.current=s},[s]);let m=!a&&!t&&x&&o;return b.useEffect(()=>{if(m){let h=setTimeout(()=>{l.current()},i);return()=>{clearTimeout(h)}}},[m,i]),[p,{rootRef:r}]}var Vr=Yr;const je={info:"#3B82F6",success:"#10B981",warning:"#F59E0B",error:"#EF4444"};pe.propTypes={severity:u.oneOf(["info","success","warning","error",""]).isRequired,size:u.number};function pe({severity:t,size:o=8}){return je[t]?e.jsx(f,{component:"span",sx:{display:"inline-block",width:o,height:o,borderRadius:"50%",backgroundColor:je[t]||je.info}}):null}at.propTypes={theme:u.string,type:u.oneOf(["button","line","select"]),onSelectType:u.func,extra:u.node,loading:u.bool,currentTab:u.oneOf(["info","success","warning","error",""])};function at({theme:t="dark",type:o="button",onSelectType:s,extra:n=void 0,currentTab:a="",loading:i=!1,...l}){const{t:p}=b.useContext(Me),r=[{label:p("notification.allSeverity"),value:""},{label:p("notification.severityType.info"),value:"info"},{label:p("notification.severityType.success"),value:"success"},{label:p("notification.severityType.warning"),value:"warning"},{label:p("notification.severityType.error"),value:"error"}],x=g=>{(g!==a||!i)&&s(g)},m=b.useMemo(()=>{const g={width:"100%",bgcolor:t==="dark"?"#F9FAFB":"",overflowY:"auto",paddingTop:o==="select"?"0":"5px",whiteSpace:"nowrap",borderRadius:0,display:"flex",justifyContent:"space-between",alignItems:"flex-end",flexWrap:"wrap",gap:"8px"};return o==="line"?Object.assign(g,{}):g},[o,t]),h=(g,k,R)=>e.jsx(q,{disabled:i,onClick:()=>x(g.value),className:`profile-button ${k?"active":""}`,...l,children:g.label},g.value||R),C=(g,k,R)=>e.jsx(q,{variant:"text",disabled:i,onClick:()=>x(g.value),className:`profile-line-button ${k?"active":""}`,...l,children:g.label},g.value||R),v=()=>r?.map((g,k)=>{const R=a===g?.value;return o==="line"?e.jsx(b.Fragment,{children:C(g,R,k)},g.value||k):e.jsx(b.Fragment,{children:h(g,R,k)},g.value||k)}),c=g=>{const{value:k}=g.target;x(k==="all"?"":k)};return o==="select"?e.jsx(Pt,{sx:{maxWidth:300},children:e.jsx(Re,{value:a||"all",onChange:c,size:"small",label:"Severity",IconComponent:g=>e.jsx(tt,{...g,width:20,height:20}),MenuProps:{autoFocus:!1,PaperProps:{style:{maxHeight:400,overflowY:"auto",borderRadius:"8px",boxShadow:"0px 6px 24px rgba(0, 0, 0, 0.15)"}}},variant:"outlined",sx:{fieldset:{border:"none"}},children:r.map((g,k)=>e.jsx(ae,{value:g.value||"all",children:e.jsxs(f,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(pe,{severity:g.value}),g.label]})},g.value||k))})}):e.jsxs(f,{className:"severity-tabs",sx:m,children:[e.jsx(f,{sx:{...o==="line"?{flex:1,borderBottom:"1px solid",borderColor:"grey.200"}:{display:"flex",gap:"24px"}},children:v()}),n]})}lt.propTypes={paging:u.objectOf(u.any).isRequired,loading:u.bool.isRequired,onChange:u.func.isRequired};function lt({loading:t,paging:o,onChange:s}){const{t:n}=b.useContext(Me),a=xe(r=>r.breakpoints.down("md"));if(o.pageCount<=0||a)return null;const i=(r,x)=>{s({page:x+1})},l=r=>{const x=Number(r.target.value);s({page:1,pageSize:x})},p=o.page-1<=0?0:o.page-1;return e.jsx(f,{className:"notification-pagination",sx:{mt:2,display:"flex",justifyContent:"flex-end"},children:e.jsx(Rt,{component:"div",disabled:t,count:o.total,page:p,rowsPerPageOptions:[10,20,50,100],labelRowsPerPage:n("pagination.rowsPerPage"),labelDisplayedRows:({from:r,to:x,count:m})=>`${r}–${x} / ${m!==-1?m:`${n()}more than ${x}`}`,rowsPerPage:o.pageSize,onPageChange:i,onRowsPerPageChange:l})})}const Qr=b.memo(lt),Zr={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4h16v2.172a2 2 0 0 1-.586 1.414L15 12v7l-6 2v-8.5L4.52 7.572A2 2 0 0 1 4 6.227V4z"/>'},He=6,Ge={"& .MuiCheckbox-root":{padding:"4px"},"& .MuiCheckbox-root .MuiSvgIcon-root":{fontSize:"1.35rem"},"& .MuiCheckbox-root:not(.Mui-checked)":{color:"divider"},"& .MuiCheckbox-root.Mui-checked":{color:"primary.main"},"& .MuiCheckbox-root .css-i4bv87-MuiSvgIcon-root":{width:"1.1em",height:"1.1em"},"& .MuiCheckbox-root svg":{stroke:"divider",strokeWidth:.7}},Jr={border:"1px solid",borderColor:"divider",borderRadius:1,overflow:"hidden",backgroundColor:"background.paper",backgroundImage:"none",transition:"all 0.2s ease-in-out"},Ke=()=>({...Jr,width:"calc(50% - 8px)"});ct.propTypes={loading:u.bool,type:u.oneOf(["server","service"]),onFilterChange:u.func,blockletMap:u.object,filterType:u.oneOf(["component","entity"]),selectedId:u.array,severity:u.array,enableMarkAllAsRead:u.bool,unReadCount:u.number,onReadFilterChange:u.func,currentReadFilter:u.string};function ct({onFilterChange:t=()=>{},loading:o=!1,type:s="service",blockletMap:n={},filterType:a="component",selectedId:i=[],severity:l=[],enableMarkAllAsRead:p=!0,unReadCount:r=0,onReadFilterChange:x=()=>{},currentReadFilter:m="all"}){const{t:h}=b.useContext(Me),[C,v]=b.useState(null),c=!!C,[g,k]=b.useState(i),[R,P]=b.useState(l),[y,z]=b.useState(!1),[L,U]=b.useState(""),[j,S]=b.useState([]);b.useEffect(()=>{k(i),P(l)},[i,l]);const B=[{label:h("notification.filterType.all"),value:"all"},{label:h("notification.filterType.unread"),value:"unread"}],G=d=>{(d!==m||!o)&&x(d)},Z=[{label:h("notification.severityType.info"),value:"info"},{label:h("notification.severityType.success"),value:"success"},{label:h("notification.severityType.warning"),value:"warning"},{label:h("notification.severityType.error"),value:"error"}],ne=d=>{v(d.currentTarget),U(""),z(!1)},ge=()=>{v(null)},oe=d=>{const w=g.includes(d)?g.filter(A=>A!==d):[...g,d];k(w),t({id:w,severity:R})},se=d=>{const w=R.includes(d)?R.filter(A=>A!==d):[...R,d];P(w),t({severity:w,id:g})},me=d=>{U(d.target.value)},be=()=>{z(!y)},K=_t.useMemo(()=>{if(!n.size)return[];const d=[];return a==="component"&&d.push({label:h("notification.system"),id:"system"}),Array.from(n).forEach(([,w])=>{const A=w.did||w.meta?.did,W=w.title||w.meta?.title||"",F=w.appPid||w.appDid;(a==="component"&&F!==A||a==="entity"&&F===A)&&d.push({label:W,id:A,blocklet:w,ancestors:w.ancestors})}),d},[n,a,h]);b.useEffect(()=>{if(L.trim()==="")S(K);else{const d=L.toLowerCase(),w=K.filter(A=>A.label.toLowerCase().includes(d));S(w)}},[L,K]);const ye=L.trim()!==""||y?j:j.slice(0,He);return e.jsxs(f,{children:[e.jsxs(f,{sx:{display:"flex",justifyContent:p?"space-between":"flex-end",alignItems:"flex-start",flexWrap:"wrap",gap:1},children:[p&&e.jsx(f,{sx:{display:"flex",gap:1.5},children:B.map(d=>e.jsxs(q,{disabled:o,onClick:()=>G(d.value),className:`profile-button ${m===d.value?"active":""}`,sx:{...s==="service"&&m===d.value?{color:"secondary.main"}:{},color:"red",fontWeight:m===d.value?"bold":"normal"},children:[d.label,d.value==="unread"&&r>0&&` (${r})`]},d.value))}),e.jsxs(f,{sx:{display:"flex",justifyContent:"flex-end",gap:2},children:[e.jsx(D,{size:"small",onClick:ne,disabled:o,sx:{minWidth:"auto",borderRadius:1,border:"1px solid",borderColor:"divider","&:hover":{backgroundColor:"action.hover"}},children:e.jsx(N,{icon:Zr,hFlip:!0})}),e.jsx(It,{open:c,anchorEl:C,onClose:ge,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},slotProps:{paper:{sx:{p:3,width:450,maxHeight:500,overflowY:"auto",backgroundColor:"background.paper",backgroundImage:"none",borderRadius:1,boxShadow:"0px 6px 24px rgba(0, 0, 0, 0.15)"}}},children:e.jsxs(f,{children:[e.jsxs(f,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,height:"28px"},children:[e.jsx(T,{variant:"subtitle1",sx:{fontWeight:"bold"},children:h("notification.severity")}),e.jsx(f,{sx:{minWidth:"60px",display:"flex",justifyContent:"flex-end"},children:(g.length>0||R.length>0)&&e.jsx(q,{size:"small",onClick:()=>{k([]),P([]),t({severity:[],id:[]})},startIcon:e.jsx(Tt,{fontSize:"small"}),sx:{color:"text.secondary",textTransform:"none",minWidth:"auto","&:hover":{backgroundColor:"transparent"},"& .MuiButton-startIcon":{marginRight:"2px"}},children:h("notification.clear")})})]}),e.jsx(f,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:e.jsx(Be,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2,flex:1},children:Z.map(d=>e.jsx(We,{elevation:0,sx:Ke(R.includes(d.value)),children:e.jsx(J,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{display:"flex",alignItems:"center",gap:1,fontSize:"0.875rem"},...Ge},control:e.jsx(Oe,{checked:R.includes(d.value),onChange:()=>se(d.value),disabled:o,size:"small"}),label:e.jsxs(f,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5},children:[e.jsx(pe,{severity:d.value}),d.label]})})},d.value))})}),e.jsxs(f,{sx:{mb:2},children:[e.jsxs(f,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,mb:1.5},children:[e.jsx(T,{variant:"subtitle1",sx:{fontWeight:"bold",width:"calc(100% - 36px)"},children:h("notification.from")}),e.jsx(f,{sx:{display:"flex",alignItems:"center",width:"calc(100% - 36px)"},children:e.jsx(Ze,{size:"small",placeholder:"search",value:L,onChange:me,sx:{width:"100%","& .MuiOutlinedInput-input":{padding:"6px 4px 6px 0"},".MuiOutlinedInput-root":{"&:hover":{fieldset:{borderColor:"divider"}},"&.Mui-focused":{fieldset:{borderColor:"divider"}}},fieldset:{borderColor:"divider"}},slotProps:{input:{size:"small",startAdornment:e.jsx(Je,{position:"start",sx:{marginRight:"2px"},children:e.jsx(N,{icon:jr})})}}})})]}),e.jsx(Be,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2},children:ye.map(d=>e.jsx(We,{elevation:0,sx:Ke(g.includes(d.id)),children:e.jsx(J,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{fontSize:"0.875rem",width:"calc(100% - 36px)"},...Ge},control:e.jsx(Oe,{checked:g.includes(d.id),onChange:()=>oe(d.id),disabled:o,size:"small"}),label:e.jsxs(f,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,minWidth:0,width:"100%"},children:[d.blocklet&&e.jsx(_e,{size:20,blocklet:d.blocklet,ancestors:d.ancestors,style:{borderRadius:4,flexShrink:0}}),e.jsx(T,{noWrap:!0,variant:"body2",component:"span",title:d.label,sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},children:d.label})]})})},d.id))}),j.length>He&&L.trim()===""&&e.jsx(q,{fullWidth:!0,size:"small",onClick:be,sx:{mt:1},endIcon:y?e.jsx(At,{}):e.jsx(Mt,{})})]})]})})]})]}),g.length>0||R.length>0?e.jsxs(f,{className:"notification-filter-content",sx:{display:"flex",flexWrap:"wrap",gap:1,mt:2},children:[R.map(d=>{const w=Z.find(A=>A.value===d);return e.jsx(Ce,{label:e.jsxs(f,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx(pe,{severity:d}),w?w.label:d]}),onDelete:()=>se(d),size:"small",variant:"outlined",sx:{borderRadius:2,color:"text.secondary",borderColor:"divider","& .MuiChip-label":{display:"flex",alignItems:"center"}}},`severity-${d}`)}),g.map(d=>{const w=K.find(A=>A.id===d);return e.jsx(Ce,{label:e.jsxs(f,{sx:{display:"flex",alignItems:"center",gap:.5},children:[w?.blocklet&&e.jsx(_e,{size:16,blocklet:w.blocklet,ancestors:w.ancestors,style:{borderRadius:4,flexShrink:0}}),w?w.label:d]}),variant:"outlined",onDelete:()=>oe(d),size:"small",sx:{borderRadius:2,color:"text.secondary",borderColor:"divider","& .MuiChip-label":{display:"flex",alignItems:"center"}}},`component-${d}`)})]}):null]})}const Xr=te(Lt)`
1
+ import{j as e,y as Pt,bb as Re,M as ae,ak as f,Q as q,W as u,J as xe,c0 as Rt,I as D,aN as It,T,aj as Tt,b5 as Be,P as We,b6 as J,a5 as Oe,z as Ze,A as Je,ci as At,bf as Mt,U as Ce,d5 as zt,d6 as Et,at as te,d7 as Lt,a6 as V,n as le,D as Bt,d8 as Wt,ar as Ne,b1 as Ie,d9 as Ot,aX as Nt,ai as Dt,am as X,bp as $t,bq as ve,a$ as Ut,cS as Ft}from"./vendor-mui-core-CmD-NPnl.js";import{r as b,a as _t,u as qt,j as Ht}from"./vendor-react-Dvs43sk9.js";import{t as Xe,Y as Gt,a6 as Kt,R as De,D as Yt,C as ce,n as Y,A as Vt}from"./vendor-utils-DQK0pEML.js";import{a as Qt,G as Zt,bw as Jt,c as Te,d as Xt,Y as er,bx as tr,aZ as Ae,W as fe,bh as rr,by as nr,a5 as or,a$ as sr,a6 as ir,bz as ar}from"./index-6k6hDX7K.js";import{a as I,h as et,k as re,g as H,b as E,j as lr}from"./vendor-hooks-DLNZ8kxG.js";import{l as tt}from"./arrow-down.svg-2NUXhc9M.js";import{G as Me,ab as N,T as O,aM as cr,O as rt,aN as dr,H as _,aO as ur,aP as pr,aQ as $e,J as xr,D as nt,I as ze,aR as fr,aS as M,a2 as hr,a1 as gr,$ as ot,aT as mr,aU as br,a0 as yr,C as de,a6 as Ue,ac as vr,aj as Fe}from"./vendor-ux-ESjuHpb6.js";import{N as wr}from"./list-BmwWshfg.js";import{d as jr}from"./search-4YYphs0l.js";import{B as _e}from"./bundle-avatar-CF-8YjIk.js";import{h as qe,T as Cr}from"./team-RDmDo4cZ.js";import{b as Sr,d as kr,a as Pr,c as Rr,e as Ir,f as Tr,h as Ar,_ as Mr}from"./user-center-DdBnHKdX.js";import{N as st,U as it}from"./index-VRhIKoNb.js";import{u as Q}from"./use-mobile-CQ7Tw4aD.js";import zr from"./index-DIzco3bK.js";import{f as ee}from"./index-DBs9Ljax.js";import{u as Se}from"./index-DEdn8u__.js";import{U as we}from"./user-sessions-SImh8rHV.js";import Er from"./index-DtDqVnOd.js";import{o as Lr}from"./vendor-arcblock-C-xQV6LY.js";import{c as Br,b as ue,a as Wr,S as Or}from"./index-ptPisY0K.js";import"./index-BUKvf-Yt.js";import"./index-BojVbZw0.js";import{U as Nr}from"./user-follower-DuL1BMYz.js";import"./lottie-web-4koyQiv_.js";import"./server-logo-notext.svg-CKQB0tIp.js";import"./index-BE6_aQqm.js";import"./util-CHZLxs1T.js";import"./base32-Bs5DmmgZ.js";import"./session-D-9YOhAy.js";import"./isURL-BOLVWN6q.js";import"./use-app-logo-DesKuFha.js";import"./index-Cw5ltvNg.js";import"./api-sewNv0AE.js";import"./table-tips-B7dQ0Rgb.js";import"./use-mobile-D93Bk2Ru.js";import"./passport-item-Bq1c8VJl.js";import"./did-address-D6qV21Cc.js";import"./index-DlbJhxX4.js";import"./vendor-mui-x--K2rEM1j.js";import"./AdapterDayjs-CRMDLq6K.js";import"./confirm-BSaR4_fO.js";import"./click-to-copy-BWrdBff2.js";import"./delete-confirm-BR2z4Ljn.js";import"./permission-Doi0-9cF.js";import"./actions-CL4xTGOh.js";import"./index-DRYJ0xIl.js";function Dr(){let t=new Map;function o({root:s,rootMargin:n,threshold:a}){let i=t.get(s);i||(i=new Map,t.set(s,i));let l=JSON.stringify({rootMargin:n,threshold:a}),p=i.get(l);if(!p){let r=new Map;p={observer:new IntersectionObserver(x=>{x.forEach(m=>{r.get(m.target)?.(m)})},{root:s,rootMargin:n,threshold:a}),entryCallbacks:r},i.set(l,p)}return{observe:(r,x)=>{p.entryCallbacks.set(r,x),p.observer.observe(r)},unobserve:r=>{p.entryCallbacks.delete(r),p.observer.unobserve(r)}}}return{getObserver:o}}var $r="0px",Ur=[0],Fr=Dr();function _r(t){let o=t?.rootMargin??$r,s=t?.threshold??Ur,n=b.useRef(null),a=b.useRef(null),i=b.useRef(null),[l,p]=b.useState(),r=b.useCallback(()=>{let C=n.current;if(!C){p(void 0);return}let v=Fr.getObserver({root:a.current,rootMargin:o,threshold:s});v.observe(C,c=>{p(c)}),i.current=v},[o,s]),x=b.useCallback(()=>{let C=i.current,v=n.current;v&&C?.unobserve(v),i.current=null},[]),m=b.useCallback(C=>{x(),n.current=C,r()},[r,x]),h=b.useCallback(C=>{x(),a.current=C,r()},[r,x]);return[m,{entry:l,rootRef:h}]}var qr=_r;function Hr(t){let[o,s]=qr(t),n=!!s.entry?.isIntersecting,[a,i]=b.useState(n);return n&&!a&&i(!0),[o,{...s,isVisible:n,wasEverVisible:a}]}var Gr=Hr,Kr=100;function Yr({loading:t,hasNextPage:o,onLoadMore:s,rootMargin:n,disabled:a,delayInMs:i=Kr}){let l=b.useRef(s),[p,{rootRef:r,isVisible:x}]=Gr({rootMargin:n});b.useEffect(()=>{l.current=s},[s]);let m=!a&&!t&&x&&o;return b.useEffect(()=>{if(m){let h=setTimeout(()=>{l.current()},i);return()=>{clearTimeout(h)}}},[m,i]),[p,{rootRef:r}]}var Vr=Yr;const je={info:"#3B82F6",success:"#10B981",warning:"#F59E0B",error:"#EF4444"};pe.propTypes={severity:u.oneOf(["info","success","warning","error",""]).isRequired,size:u.number};function pe({severity:t,size:o=8}){return je[t]?e.jsx(f,{component:"span",sx:{display:"inline-block",width:o,height:o,borderRadius:"50%",backgroundColor:je[t]||je.info}}):null}at.propTypes={theme:u.string,type:u.oneOf(["button","line","select"]),onSelectType:u.func,extra:u.node,loading:u.bool,currentTab:u.oneOf(["info","success","warning","error",""])};function at({theme:t="dark",type:o="button",onSelectType:s,extra:n=void 0,currentTab:a="",loading:i=!1,...l}){const{t:p}=b.useContext(Me),r=[{label:p("notification.allSeverity"),value:""},{label:p("notification.severityType.info"),value:"info"},{label:p("notification.severityType.success"),value:"success"},{label:p("notification.severityType.warning"),value:"warning"},{label:p("notification.severityType.error"),value:"error"}],x=g=>{(g!==a||!i)&&s(g)},m=b.useMemo(()=>{const g={width:"100%",bgcolor:t==="dark"?"#F9FAFB":"",overflowY:"auto",paddingTop:o==="select"?"0":"5px",whiteSpace:"nowrap",borderRadius:0,display:"flex",justifyContent:"space-between",alignItems:"flex-end",flexWrap:"wrap",gap:"8px"};return o==="line"?Object.assign(g,{}):g},[o,t]),h=(g,k,R)=>e.jsx(q,{disabled:i,onClick:()=>x(g.value),className:`profile-button ${k?"active":""}`,...l,children:g.label},g.value||R),C=(g,k,R)=>e.jsx(q,{variant:"text",disabled:i,onClick:()=>x(g.value),className:`profile-line-button ${k?"active":""}`,...l,children:g.label},g.value||R),v=()=>r?.map((g,k)=>{const R=a===g?.value;return o==="line"?e.jsx(b.Fragment,{children:C(g,R,k)},g.value||k):e.jsx(b.Fragment,{children:h(g,R,k)},g.value||k)}),c=g=>{const{value:k}=g.target;x(k==="all"?"":k)};return o==="select"?e.jsx(Pt,{sx:{maxWidth:300},children:e.jsx(Re,{value:a||"all",onChange:c,size:"small",label:"Severity",IconComponent:g=>e.jsx(tt,{...g,width:20,height:20}),MenuProps:{autoFocus:!1,PaperProps:{style:{maxHeight:400,overflowY:"auto",borderRadius:"8px",boxShadow:"0px 6px 24px rgba(0, 0, 0, 0.15)"}}},variant:"outlined",sx:{fieldset:{border:"none"}},children:r.map((g,k)=>e.jsx(ae,{value:g.value||"all",children:e.jsxs(f,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(pe,{severity:g.value}),g.label]})},g.value||k))})}):e.jsxs(f,{className:"severity-tabs",sx:m,children:[e.jsx(f,{sx:{...o==="line"?{flex:1,borderBottom:"1px solid",borderColor:"grey.200"}:{display:"flex",gap:"24px"}},children:v()}),n]})}lt.propTypes={paging:u.objectOf(u.any).isRequired,loading:u.bool.isRequired,onChange:u.func.isRequired};function lt({loading:t,paging:o,onChange:s}){const{t:n}=b.useContext(Me),a=xe(r=>r.breakpoints.down("md"));if(o.pageCount<=0||a)return null;const i=(r,x)=>{s({page:x+1})},l=r=>{const x=Number(r.target.value);s({page:1,pageSize:x})},p=o.page-1<=0?0:o.page-1;return e.jsx(f,{className:"notification-pagination",sx:{mt:2,display:"flex",justifyContent:"flex-end"},children:e.jsx(Rt,{component:"div",disabled:t,count:o.total,page:p,rowsPerPageOptions:[10,20,50,100],labelRowsPerPage:n("pagination.rowsPerPage"),labelDisplayedRows:({from:r,to:x,count:m})=>`${r}–${x} / ${m!==-1?m:`${n()}more than ${x}`}`,rowsPerPage:o.pageSize,onPageChange:i,onRowsPerPageChange:l})})}const Qr=b.memo(lt),Zr={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4h16v2.172a2 2 0 0 1-.586 1.414L15 12v7l-6 2v-8.5L4.52 7.572A2 2 0 0 1 4 6.227V4z"/>'},He=6,Ge={"& .MuiCheckbox-root":{padding:"4px"},"& .MuiCheckbox-root .MuiSvgIcon-root":{fontSize:"1.35rem"},"& .MuiCheckbox-root:not(.Mui-checked)":{color:"divider"},"& .MuiCheckbox-root.Mui-checked":{color:"primary.main"},"& .MuiCheckbox-root .css-i4bv87-MuiSvgIcon-root":{width:"1.1em",height:"1.1em"},"& .MuiCheckbox-root svg":{stroke:"divider",strokeWidth:.7}},Jr={border:"1px solid",borderColor:"divider",borderRadius:1,overflow:"hidden",backgroundColor:"background.paper",backgroundImage:"none",transition:"all 0.2s ease-in-out"},Ke=()=>({...Jr,width:"calc(50% - 8px)"});ct.propTypes={loading:u.bool,type:u.oneOf(["server","service"]),onFilterChange:u.func,blockletMap:u.object,filterType:u.oneOf(["component","entity"]),selectedId:u.array,severity:u.array,enableMarkAllAsRead:u.bool,unReadCount:u.number,onReadFilterChange:u.func,currentReadFilter:u.string};function ct({onFilterChange:t=()=>{},loading:o=!1,type:s="service",blockletMap:n={},filterType:a="component",selectedId:i=[],severity:l=[],enableMarkAllAsRead:p=!0,unReadCount:r=0,onReadFilterChange:x=()=>{},currentReadFilter:m="all"}){const{t:h}=b.useContext(Me),[C,v]=b.useState(null),c=!!C,[g,k]=b.useState(i),[R,P]=b.useState(l),[y,z]=b.useState(!1),[L,U]=b.useState(""),[j,S]=b.useState([]);b.useEffect(()=>{k(i),P(l)},[i,l]);const B=[{label:h("notification.filterType.all"),value:"all"},{label:h("notification.filterType.unread"),value:"unread"}],G=d=>{(d!==m||!o)&&x(d)},Z=[{label:h("notification.severityType.info"),value:"info"},{label:h("notification.severityType.success"),value:"success"},{label:h("notification.severityType.warning"),value:"warning"},{label:h("notification.severityType.error"),value:"error"}],ne=d=>{v(d.currentTarget),U(""),z(!1)},ge=()=>{v(null)},oe=d=>{const w=g.includes(d)?g.filter(A=>A!==d):[...g,d];k(w),t({id:w,severity:R})},se=d=>{const w=R.includes(d)?R.filter(A=>A!==d):[...R,d];P(w),t({severity:w,id:g})},me=d=>{U(d.target.value)},be=()=>{z(!y)},K=_t.useMemo(()=>{if(!n.size)return[];const d=[];return a==="component"&&d.push({label:h("notification.system"),id:"system"}),Array.from(n).forEach(([,w])=>{const A=w.did||w.meta?.did,W=w.title||w.meta?.title||"",F=w.appPid||w.appDid;(a==="component"&&F!==A||a==="entity"&&F===A)&&d.push({label:W,id:A,blocklet:w,ancestors:w.ancestors})}),d},[n,a,h]);b.useEffect(()=>{if(L.trim()==="")S(K);else{const d=L.toLowerCase(),w=K.filter(A=>A.label.toLowerCase().includes(d));S(w)}},[L,K]);const ye=L.trim()!==""||y?j:j.slice(0,He);return e.jsxs(f,{children:[e.jsxs(f,{sx:{display:"flex",justifyContent:p?"space-between":"flex-end",alignItems:"flex-start",flexWrap:"wrap",gap:1},children:[p&&e.jsx(f,{sx:{display:"flex",gap:1.5},children:B.map(d=>e.jsxs(q,{disabled:o,onClick:()=>G(d.value),className:`profile-button ${m===d.value?"active":""}`,sx:{...s==="service"&&m===d.value?{color:"secondary.main"}:{},color:"red",fontWeight:m===d.value?"bold":"normal"},children:[d.label,d.value==="unread"&&r>0&&` (${r})`]},d.value))}),e.jsxs(f,{sx:{display:"flex",justifyContent:"flex-end",gap:2},children:[e.jsx(D,{size:"small",onClick:ne,disabled:o,sx:{minWidth:"auto",borderRadius:1,border:"1px solid",borderColor:"divider","&:hover":{backgroundColor:"action.hover"}},children:e.jsx(N,{icon:Zr,hFlip:!0})}),e.jsx(It,{open:c,anchorEl:C,onClose:ge,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},slotProps:{paper:{sx:{p:3,width:450,maxHeight:500,overflowY:"auto",backgroundColor:"background.paper",backgroundImage:"none",borderRadius:1,boxShadow:"0px 6px 24px rgba(0, 0, 0, 0.15)"}}},children:e.jsxs(f,{children:[e.jsxs(f,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,height:"28px"},children:[e.jsx(T,{variant:"subtitle1",sx:{fontWeight:"bold"},children:h("notification.severity")}),e.jsx(f,{sx:{minWidth:"60px",display:"flex",justifyContent:"flex-end"},children:(g.length>0||R.length>0)&&e.jsx(q,{size:"small",onClick:()=>{k([]),P([]),t({severity:[],id:[]})},startIcon:e.jsx(Tt,{fontSize:"small"}),sx:{color:"text.secondary",textTransform:"none",minWidth:"auto","&:hover":{backgroundColor:"transparent"},"& .MuiButton-startIcon":{marginRight:"2px"}},children:h("notification.clear")})})]}),e.jsx(f,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:e.jsx(Be,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2,flex:1},children:Z.map(d=>e.jsx(We,{elevation:0,sx:Ke(R.includes(d.value)),children:e.jsx(J,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{display:"flex",alignItems:"center",gap:1,fontSize:"0.875rem"},...Ge},control:e.jsx(Oe,{checked:R.includes(d.value),onChange:()=>se(d.value),disabled:o,size:"small"}),label:e.jsxs(f,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5},children:[e.jsx(pe,{severity:d.value}),d.label]})})},d.value))})}),e.jsxs(f,{sx:{mb:2},children:[e.jsxs(f,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,mb:1.5},children:[e.jsx(T,{variant:"subtitle1",sx:{fontWeight:"bold",width:"calc(100% - 36px)"},children:h("notification.from")}),e.jsx(f,{sx:{display:"flex",alignItems:"center",width:"calc(100% - 36px)"},children:e.jsx(Ze,{size:"small",placeholder:"search",value:L,onChange:me,sx:{width:"100%","& .MuiOutlinedInput-input":{padding:"6px 4px 6px 0"},".MuiOutlinedInput-root":{"&:hover":{fieldset:{borderColor:"divider"}},"&.Mui-focused":{fieldset:{borderColor:"divider"}}},fieldset:{borderColor:"divider"}},slotProps:{input:{size:"small",startAdornment:e.jsx(Je,{position:"start",sx:{marginRight:"2px"},children:e.jsx(N,{icon:jr})})}}})})]}),e.jsx(Be,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2},children:ye.map(d=>e.jsx(We,{elevation:0,sx:Ke(g.includes(d.id)),children:e.jsx(J,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{fontSize:"0.875rem",width:"calc(100% - 36px)"},...Ge},control:e.jsx(Oe,{checked:g.includes(d.id),onChange:()=>oe(d.id),disabled:o,size:"small"}),label:e.jsxs(f,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,minWidth:0,width:"100%"},children:[d.blocklet&&e.jsx(_e,{size:20,blocklet:d.blocklet,ancestors:d.ancestors,style:{borderRadius:4,flexShrink:0}}),e.jsx(T,{noWrap:!0,variant:"body2",component:"span",title:d.label,sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},children:d.label})]})})},d.id))}),j.length>He&&L.trim()===""&&e.jsx(q,{fullWidth:!0,size:"small",onClick:be,sx:{mt:1},endIcon:y?e.jsx(At,{}):e.jsx(Mt,{})})]})]})})]})]}),g.length>0||R.length>0?e.jsxs(f,{className:"notification-filter-content",sx:{display:"flex",flexWrap:"wrap",gap:1,mt:2},children:[R.map(d=>{const w=Z.find(A=>A.value===d);return e.jsx(Ce,{label:e.jsxs(f,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx(pe,{severity:d}),w?w.label:d]}),onDelete:()=>se(d),size:"small",variant:"outlined",sx:{borderRadius:2,color:"text.secondary",borderColor:"divider","& .MuiChip-label":{display:"flex",alignItems:"center"}}},`severity-${d}`)}),g.map(d=>{const w=K.find(A=>A.id===d);return e.jsx(Ce,{label:e.jsxs(f,{sx:{display:"flex",alignItems:"center",gap:.5},children:[w?.blocklet&&e.jsx(_e,{size:16,blocklet:w.blocklet,ancestors:w.ancestors,style:{borderRadius:4,flexShrink:0}}),w?w.label:d]}),variant:"outlined",onDelete:()=>oe(d),size:"small",sx:{borderRadius:2,color:"text.secondary",borderColor:"divider","& .MuiChip-label":{display:"flex",alignItems:"center"}}},`component-${d}`)})]}):null]})}const Xr=te(Lt)`
2
2
  position: fixed;
3
3
  bottom: 20px;
4
4
  right: 20px;