@abtnode/blocklet-services 1.16.44-beta-20250512-155818-937e465d → 1.16.44-beta-20250513-030435-c2d99062

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 (83) hide show
  1. package/dist/assets/{access-control-CCSlKYYz.js → access-control-Din7doVd.js} +1 -1
  2. package/dist/assets/{add-component-core-C7-Epxoj.js → add-component-core-5x4gTem5.js} +1 -1
  3. package/dist/assets/{add-resource-CJHw7ea0.js → add-resource-BrZnm53f.js} +1 -1
  4. package/dist/assets/{advanced-tG5IRVhQ.js → advanced-CN6mCSES.js} +1 -1
  5. package/dist/assets/{appearance-bRLsRDs2.js → appearance-Bowm1Shj.js} +1 -1
  6. package/dist/assets/{audit-logs-B3-Fo3nR.js → audit-logs-DczjqamJ.js} +1 -1
  7. package/dist/assets/{authorize-DNTNbUhI.js → authorize-D2LCmekq.js} +1 -1
  8. package/dist/assets/{branding-By8KDk5Q.js → branding-B6AmOMI6.js} +1 -1
  9. package/dist/assets/{branding-hDeNkLC2.js → branding-CwhhJRKu.js} +2 -2
  10. package/dist/assets/{bundle-avatar-DYTLzqlT.js → bundle-avatar-CDJRatFg.js} +1 -1
  11. package/dist/assets/{complete-6R-n_Ra9.js → complete-CKhw9u_z.js} +1 -1
  12. package/dist/assets/{component-Blsql2u0.js → component-Cb3m5qUw.js} +1 -1
  13. package/dist/assets/{config-D6r2ZAFY.js → config-kGXJEkFJ.js} +1 -1
  14. package/dist/assets/{config-navigation-B0nu0al4.js → config-navigation-CKVyFhfH.js} +3 -3
  15. package/dist/assets/{config-space-d34Deg7R.js → config-space-CogRdhoQ.js} +1 -1
  16. package/dist/assets/{confirm-DjTZImyg.js → confirm-SdqBW-ti.js} +1 -1
  17. package/dist/assets/{connect-Cu2Ssv5A.js → connect-BMn4CxDk.js} +1 -1
  18. package/dist/assets/connect-HAC-YfHh.js +5 -0
  19. package/dist/assets/{connect-to-BG15Vnyg.js → connect-to-eNQDY2rc.js} +1 -1
  20. package/dist/assets/{dashboard-BIOpvfj3.js → dashboard-BYxl5V9e.js} +3 -3
  21. package/dist/assets/{delete-confirm-BzuBR6TW.js → delete-confirm-CKF_eljP.js} +1 -1
  22. package/dist/assets/domain-DotN6lCb.js +9 -0
  23. package/dist/assets/{domain-action-card-Bcs_GWxq.js → domain-action-card-DHH9PLRG.js} +1 -1
  24. package/dist/assets/domains-BV2pykxi.js +1 -0
  25. package/dist/assets/dot-BA3EvSrh.js +7 -0
  26. package/dist/assets/{email-BZVu6WP-.js → email-CHR0EOis.js} +1 -1
  27. package/dist/assets/{exchange-passport-8jdiPDph.js → exchange-passport-D0iIXJxD.js} +1 -1
  28. package/dist/assets/{fuel-Dx_cnsCl.js → fuel-nMTHNcy-.js} +1 -1
  29. package/dist/assets/{gen-access-key-CqKmmKML.js → gen-access-key-DH4wNzRm.js} +1 -1
  30. package/dist/assets/{index-Dyl-XQ73.js → index-B54lTbup.js} +1 -1
  31. package/dist/assets/{index-SzdSxpkq.js → index-BA8C83iz.js} +1 -1
  32. package/dist/assets/{index-C-A13dEh.js → index-BCNchyGN.js} +1 -1
  33. package/dist/assets/{index-C5SsKJ2n.js → index-BCtmnJeV.js} +1 -1
  34. package/dist/assets/{index-B9nvthxv.js → index-BJxv6GA4.js} +1 -1
  35. package/dist/assets/{index-Jnk92KZC.js → index-BLGGjT7N.js} +5 -5
  36. package/dist/assets/{index-Btl_rz0J.js → index-B_-kynzD.js} +3 -3
  37. package/dist/assets/{index-Bju4sfVL.js → index-BuXc3Oag.js} +1 -1
  38. package/dist/assets/{index-DefO2n6z.js → index-CIkPfxzG.js} +2 -2
  39. package/dist/assets/{index-ioZVVJtg.js → index-CYeNo51G.js} +1 -1
  40. package/dist/assets/{index-Cc-e6lxg.js → index-CfxcUIhC.js} +1 -1
  41. package/dist/assets/{index-USO5zFMh.js → index-Ctzl9JDw.js} +1 -1
  42. package/dist/assets/{index-HU4yqI-9.js → index-CxwBhS0_.js} +1 -1
  43. package/dist/assets/{index-DjEDWgGs.js → index-D7eC9ptO.js} +1 -1
  44. package/dist/assets/{index-Du38Vjy4.js → index-D9KfgDPN.js} +4 -4
  45. package/dist/assets/{invitation-1bsb30Yz.js → invitation-DzT9Qa0A.js} +1 -1
  46. package/dist/assets/{invite-CALl83Zc.js → invite-CQPeUOT4.js} +1 -1
  47. package/dist/assets/{issue-passport-BcStTsbv.js → issue-passport-BYhvmLsl.js} +1 -1
  48. package/dist/assets/{item-Bk_1JLeG.js → item-D942q-4T.js} +1 -1
  49. package/dist/assets/{layout-D93HKT6w.js → layout-BcLfVSqs.js} +1 -1
  50. package/dist/assets/{list-rt6nku1-.js → list-BiJWMg_P.js} +1 -1
  51. package/dist/assets/{list-D96_O-GY.js → list-DKUSPdB6.js} +2 -2
  52. package/dist/assets/{log--AX8zo75.js → log-Iko0jLNA.js} +1 -1
  53. package/dist/assets/{login-WRcteY7r.js → login-4Yq_pPSw.js} +1 -1
  54. package/dist/assets/{logo-uploader-CQCy6MG3.js → logo-uploader-Cnkdgyfv.js} +2 -2
  55. package/dist/assets/{lost-passport-kJX7pEJj.js → lost-passport-D5jMtgH_.js} +1 -1
  56. package/dist/assets/open-window--2G6Qjbq.js +1 -1
  57. package/dist/assets/{overview-CpKMiGEK.js → overview-CaQ-tV1t.js} +1 -1
  58. package/dist/assets/{passport-item-CIvCqz_R.js → passport-item-DH3_49G1.js} +1 -1
  59. package/dist/assets/{publish-resource-CCa5xfwz.js → publish-resource-BtFRgv4P.js} +1 -1
  60. package/dist/assets/{runtime-eXYlg9Cz.js → runtime-B0207zk1.js} +1 -1
  61. package/dist/assets/{security-DM8MeY05.js → security-CX01lhxW.js} +1 -1
  62. package/dist/assets/setup-DIAgbS7c.js +30 -0
  63. package/dist/assets/{start-CIjuDAiX.js → start-CMRQU8Px.js} +1 -1
  64. package/dist/assets/{status-CUMJd-nJ.js → status-DSQPLYSp.js} +1 -1
  65. package/dist/assets/{step-actions-CeJCmiCS.js → step-actions-BfGTFkaB.js} +1 -1
  66. package/dist/assets/{traffic-B5x_6GvF.js → traffic-ClE631in.js} +1 -1
  67. package/dist/assets/{transfer-CTEHVklh.js → transfer-BnR8fjLW.js} +1 -1
  68. package/dist/assets/{unsubscribe-Bi2IV-2n.js → unsubscribe-rUE2LcLN.js} +1 -1
  69. package/dist/assets/{use-blocklet-logo-BEy8Tnso.js → use-blocklet-logo-Phq7jasP.js} +1 -1
  70. package/dist/assets/useAsync-DV3NyLhI.js +1 -0
  71. package/dist/assets/{user-center-DcXdjtRX.js → user-center-D25Vw-wP.js} +1 -1
  72. package/dist/assets/{util-MKllNgBs.js → util-Btd7aQEC.js} +1 -1
  73. package/dist/assets/{wrap-locale-B9TkXFQe.js → wrap-locale-CPW6a0PM.js} +1 -1
  74. package/dist/index.html +1 -1
  75. package/dist/service-worker.js +1 -1
  76. package/package.json +21 -21
  77. package/dist/assets/connect-K4ZmMu4L.js +0 -5
  78. package/dist/assets/domain-wh85yL2O.js +0 -9
  79. package/dist/assets/domains-bzKFbARj.js +0 -1
  80. package/dist/assets/dot-C4hULxc0.js +0 -7
  81. package/dist/assets/setup-BEsU41BB.js +0 -30
  82. package/dist/assets/useAsync-C8ydfEEr.js +0 -1
  83. package/dist/assets/useAsync-CMWsznMW.js +0 -1
@@ -0,0 +1,30 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/connect-HAC-YfHh.js","assets/vendor-mui-core-D_bnq77o.js","assets/vendor-react-DEoibe3W.js","assets/vendor-utils-rHXShPKm.js","assets/useAsync-DV3NyLhI.js","assets/vendor-hooks-rDgu5KV9.js","assets/vendor-ux-did-connect-DHrruicZ.js","assets/lottie-web-jYmAQWuC.js","assets/vendor-ux-did-connect-DpSGLE7B.css","assets/index-CIkPfxzG.js","assets/vendor-arcblock-uz9DVywv.js","assets/index-DOq-_YXu.css","assets/config-kGXJEkFJ.js","assets/index-BuXc3Oag.js","assets/Done-DqSE6KPe.js","assets/collapse-QV_2gdtM.js","assets/Google-DHEolkW-.js","assets/cloneDeep-UpFQ2VNg.js","assets/logo-uploader-Cnkdgyfv.js","assets/index-DVQCgvFb.js","assets/page-header-xyZktwBS.js","assets/layout-BcLfVSqs.js","assets/content-layout-BzF-fNQz.js","assets/step-actions-BfGTFkaB.js","assets/use-mobile-DyX6Fl8Z.js","assets/button-D8hoY4xw.js","assets/index-BJxv6GA4.js","assets/config-space-CogRdhoQ.js","assets/spaces-BVG-t3ND.js","assets/api-BjteVZFg.js","assets/connect-to-eNQDY2rc.js","assets/DeleteOutline-CFN4r-OG.js","assets/format-error-BrmqJs5a.js","assets/domain-DotN6lCb.js","assets/domain-action-card-DHH9PLRG.js","assets/ExpandLess-CkoEHpgk.js","assets/permission-BH1TY_tz.js","assets/session-CHdTc1We.js","assets/dot-BA3EvSrh.js","assets/confirm-SdqBW-ti.js","assets/actions-BjTeIzgS.js","assets/MoreHoriz-B6KdR0Y8.js","assets/delete-confirm-CKF_eljP.js","assets/click-to-copy-CFiGx48J.js","assets/util-Btd7aQEC.js","assets/useSetState-CWq0AVWn.js","assets/InfoOutlined-DkG0jjos.js","assets/index-enM9Y412.js","assets/CheckCircle-Ds4QI0ey.js","assets/access-control-Din7doVd.js","assets/config-LE_EJolF.js","assets/fuel-nMTHNcy-.js","assets/Launch-B-2Jomi6.js","assets/did-address-DjwPl1uy.js","assets/complete-CKhw9u_z.js","assets/launch-result-message-DIYoykBK.js","assets/get-safe-url-Bk6PlU7n.js","assets/starting-progress-CiLZpNpg.js"])))=>i.map(i=>d[i]);
2
+ import{S as Q,L as W,_ as d,c as _}from"./vendor-arcblock-uz9DVywv.js";import{j as e,ah as T,v as q,e as K,bE as G,aa as X,ab as J,b7 as Y}from"./vendor-mui-core-D_bnq77o.js";import{h as ee,f as te,r as i,i as se,j as c,k as oe}from"./vendor-react-DEoibe3W.js";import{A as o}from"./vendor-utils-rHXShPKm.js";import{u as ae,aT as ne,j as A}from"./vendor-ux-did-connect-DHrruicZ.js";import{C as re}from"./config-space-CogRdhoQ.js";import{H as ie}from"./addon--u4EErgw.js";import{S as le}from"./ServerLogo-s6cfhx92.js";import{n as pe,u as ce,o as V,q as de,r as ue,P as k,N as Le,f as he,S as me}from"./index-CIkPfxzG.js";import{g as fe}from"./get-safe-url-Bk6PlU7n.js";import"./vendor-hooks-rDgu5KV9.js";import"./lottie-web-jYmAQWuC.js";import"./spaces-BVG-t3ND.js";import"./api-BjteVZFg.js";import"./QuestionMarkCircle-BPVDAm8U.js";var E=function(h){return e.jsxs("svg",{...h,children:[e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 10.6417L31.72 0L13.288 10.6417V24.7942L1 31.8887V53.1722L19.432 63.8139L31.6902 56.7366L31.72 56.7538L31.7498 56.7366L44.008 63.8139L62.44 53.1722V31.8887L50.152 24.7942V10.6417ZM60.52 32.9972L48.232 25.9027V11.7502L31.72 2.21703L15.208 11.7502V25.9028L2.92 32.9972V52.0636L19.432 61.5968L31.6902 54.5196L31.72 54.5368L31.7498 54.5196L44.008 61.5968L60.52 52.0636V32.9972Z",fill:"url(#paint0_linear_615_426)"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.1521 24.8307L31.7201 14.189L13.2881 24.8307V46.1141L31.7201 56.7558L50.1521 46.1141V24.8307ZM15.2081 25.9392L31.7201 16.406L48.2321 25.9392V45.0056L31.7201 54.5388L15.2081 45.0056V25.9392ZM28.5464 23.0464C28.6641 22.6342 29.0408 22.3501 29.4695 22.3501H33.9707C34.3993 22.3501 34.776 22.6342 34.8938 23.0464L35.7504 26.0447L37.8696 27.2681L40.8945 26.5109C41.3103 26.4068 41.7447 26.591 41.959 26.9622L44.2096 30.8604C44.424 31.2316 44.3662 31.6998 44.0682 32.0079L41.8999 34.2489V36.6959L44.0682 38.9369C44.3662 39.245 44.424 39.7133 44.2096 40.0845L41.959 43.9827C41.7447 44.3539 41.3103 44.538 40.8945 44.4339L37.8696 43.6767L35.7504 44.9002L34.8938 47.8984C34.776 48.3106 34.3993 48.5947 33.9707 48.5947H29.4695C29.0408 48.5947 28.6641 48.3106 28.5464 47.8984L27.6897 44.9002L25.5706 43.6767L22.5457 44.4339C22.1299 44.538 21.6955 44.3539 21.4812 43.9827L19.2305 40.0845C19.0162 39.7133 19.0739 39.245 19.372 38.9369L21.5402 36.6959V34.2489L19.372 32.0079C19.0739 31.6998 19.0162 31.2316 19.2305 30.8604L21.4812 26.9622C21.6955 26.591 22.1299 26.4068 22.5457 26.5109L25.5706 27.2681L27.6897 26.0447L28.5464 23.0464ZM28.9861 27.5132C29.2018 27.3887 29.3607 27.1851 29.4292 26.9456L30.1936 24.2701H33.2466L34.011 26.9456C34.0794 27.1851 34.2383 27.3887 34.4541 27.5132L37.2459 29.1251C37.4617 29.2497 37.7174 29.2855 37.9591 29.225L40.6583 28.5493L42.1848 31.1932L40.25 33.193C40.0768 33.372 39.9799 33.6114 39.9799 33.8605V37.0843C39.9799 37.3334 40.0768 37.5728 40.25 37.7518L42.1848 39.7516L40.6583 42.3955L37.9591 41.7198C37.7174 41.6593 37.4617 41.6951 37.2459 41.8197L34.4541 43.4316C34.2383 43.5561 34.0794 43.7597 34.011 43.9992L33.2466 46.6747H30.1936L29.4292 43.9992C29.3607 43.7597 29.2018 43.5561 28.9861 43.4316L26.1942 41.8197C25.9785 41.6951 25.7228 41.6593 25.4811 41.7198L22.7819 42.3955L21.2554 39.7516L23.1902 37.7518C23.3634 37.5728 23.4602 37.3334 23.4602 37.0843V33.8605C23.4602 33.6114 23.3634 33.372 23.1902 33.193L21.2554 31.1932L22.7819 28.5493L25.4811 29.225C25.7228 29.2855 25.9785 29.2497 26.1942 29.1251L28.9861 27.5132ZM31.7201 41.6407C28.3134 41.6407 25.5517 38.8791 25.5517 35.4724C25.5517 32.0657 28.3134 29.3041 31.7201 29.3041C35.1268 29.3041 37.8884 32.0657 37.8884 35.4724C37.8884 38.8791 35.1268 41.6407 31.7201 41.6407ZM35.9684 35.4724C35.9684 37.8187 34.0664 39.7207 31.7201 39.7207C29.3738 39.7207 27.4717 37.8187 27.4717 35.4724C27.4717 33.1261 29.3738 31.2241 31.7201 31.2241C34.0664 31.2241 35.9684 33.1261 35.9684 35.4724Z",fill:"url(#paint1_linear_615_426)"}),e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"paint0_linear_615_426",x1:"31.72",y1:"95.7208",x2:"95.488",y2:"34.3249",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#0FA4B7"}),e.jsx("stop",{offset:"0.494757",stopColor:"#1DC1C7"}),e.jsx("stop",{offset:"1",stopColor:"#2BE0D7"})]}),e.jsxs("linearGradient",{id:"paint1_linear_615_426",x1:"28.4374",y1:"99.2464",x2:"98.7613",y2:"44.9372",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#0FA4B7"}),e.jsx("stop",{offset:"0.494757",stopColor:"#1DC1C7"}),e.jsx("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]})};E.defaultProps={width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};E.displayName="server-logo-notext";const xe=E,_e=T.span`
3
+ color: ${h=>h.theme.palette.error.main};
4
+ &::before {
5
+ content: '*';
6
+ }
7
+ `,C=_e,Ce=i.lazy(()=>d(()=>import("./connect-HAC-YfHh.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]))),Ee=i.lazy(()=>d(()=>import("./config-kGXJEkFJ.js"),__vite__mapDeps([12,1,2,3,6,5,7,8,13,14,15,16,17,9,10,11,18,19,20,21,22,23,24,25]))),ge=i.lazy(()=>d(()=>import("./index-BJxv6GA4.js"),__vite__mapDeps([26,1,2,6,3,5,7,8,20,9,10,11,27,28,29,30,31,32,23,24,21,22]))),je=i.lazy(()=>d(()=>import("./domain-DotN6lCb.js"),__vite__mapDeps([33,1,2,9,10,6,3,5,7,8,11,34,35,36,37,38,4,39,32,40,41,42,43,44,45,46,47,48,20,25,21,22,23,24]))),ye=i.lazy(()=>d(()=>import("./access-control-Din7doVd.js"),__vite__mapDeps([49,1,2,6,3,5,7,8,50,20,9,10,11,21,22,23,24,25]))),ve=i.lazy(()=>d(()=>import("./fuel-nMTHNcy-.js"),__vite__mapDeps([51,1,2,3,52,6,5,7,8,53,20,9,10,11,21,22,23,24,25]))),Pe=i.lazy(()=>d(()=>import("./complete-CKhw9u_z.js"),__vite__mapDeps([54,1,2,6,3,5,7,8,9,10,11,55,56,25,21,22,57])));function He(){var R,w,I;const h=q(a=>a.breakpoints.down("md")),$=K(),{t,locale:B}=ae(),[g,D]=ee(),m=te(),{meta:u,blocklet:r,actions:l,loading:N}=pe(),O=localStorage.getItem("blocklet-server-url"),{session:j}=ce(),M=V("fromLauncher"),y=V("visitorId");y&&(ne(y),g.delete("visitorId"),D(g)),i.useEffect(()=>{de(),j.user&&(l==null||l.refreshMeta(),l==null||l.refreshBlocklet({showError:!1}))},[j.user]),i.useEffect(()=>{l.refreshFuel({showError:!1})},[(R=r==null?void 0:r.meta)==null?void 0:R.did]);const s=`${A.WELLKNOWN_SERVICE_PATH_PREFIX}/setup`,U=a=>{var f;const n=(f=a==null?void 0:a.capabilities)==null?void 0:f.didSpace;return n?n===_.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||n===_.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP?{key:"did-space",name:e.jsxs(e.Fragment,{children:[t("setup.steps.didSpace")," ",e.jsx(C,{})]}),path:o(s,"did-space")}:n===_.BLOCKLET_APP_SPACE_REQUIREMENT.OPTIONAL?{key:"did-space",name:e.jsx(e.Fragment,{children:t("setup.steps.didSpace")}),path:o(s,"did-space")}:(console.warn(`capabilities.didSpace cannot take the value ${n}`),null):null},p=[{key:"access",name:t("setup.steps.access"),path:o(s,"access")},{key:"domain",name:t("setup.domain.title"),path:o(s,"domain")},U(r),{key:"config",name:e.jsxs(e.Fragment,{children:[t("setup.steps.config")," ",ue(u)&&e.jsx(C,{})]}),path:o(s,"config")},(I=(w=u==null?void 0:u.requirements)==null?void 0:w.fuels)!=null&&I.length?{key:"fuel",name:e.jsxs(e.Fragment,{children:[t("setup.steps.fuel")," ",e.jsx(C,{})]}),path:o(s,"fuel")}:null].filter(Boolean),x=p.findIndex(a=>`${k.replace(/\/$/,"")}${s}/${a.key}`===window.location.pathname),F=o(k,A.WELLKNOWN_SERVICE_PATH_PREFIX,`/blocklet/logo?v=${r==null?void 0:r.updatedAt}`),b=async a=>{const{search:n}=new URL(window.location.href);if(!a)p[x+1]?m(`${o(s,p[x+1].key)}${n}`):m(`${o(s,"complete")}${n}`);else{const f=p.findIndex(z=>z.key===a);f>-1?m(`${o(s,p[f].key)}${n}`):m(`${o(s,"complete")}${n}`)}await l.refreshBlocklet()},H=()=>{m(-1)};function L(a,n){return e.jsxs(Ce,{children:[!r&&e.jsx(X,{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",children:e.jsx(J,{})}),r&&e.jsx(a,{blocklet:r,...n,onNext:b,onPrevious:H,buttonText:x===p.length-1?t("setup.startNow"):""})]})}const v=()=>{window.open(fe(O,{allowDomains:null}))},Z=h?e.jsx(xe,{onClick:v,width:"32",height:"32",style:{cursor:"pointer"}}):e.jsx(le,{onClick:v,width:"128",height:"48",style:{marginTop:-1,cursor:"pointer"}}),P=[{key:"install",name:t("launchBlocklet.steps.installApp"),path:o(s,"install")},{key:"setup",name:t("setup.steps.launchApp"),children:p}];let S=[{key:"agreement",name:t("launchBlocklet.introduction"),path:o(s,"agreement")},...P];return M&&(S=[{key:"purchase-space",name:t("launchBlocklet.steps.purchaseSpace")},{key:"prepare-space",name:t("launchBlocklet.steps.prepareSpace")},...P]),e.jsx(Q,{steps:S,children:e.jsx(Le,{children:e.jsxs(re,{children:[e.jsx(G,{styles:Se}),e.jsx(Re,{children:e.jsx(W,{locale:B,loading:N,blockletMeta:{...u,title:he.getDisplayName({...r,meta:u})},navLogo:Z,pcWidth:"80%",style:{height:"100%"},logoUrl:F,useOfSkeleton:!1,headerEndAddons:e.jsx(ie,{SessionContext:me,sessionManagerProps:{disableLogout:!0}}),theme:$,launchingText:t("setup.title"),children:e.jsxs(se,{children:[e.jsx(c,{path:"access",element:L(ye)}),e.jsx(c,{path:"domain",element:L(je)}),e.jsx(c,{path:"did-space",element:L(ge)}),e.jsx(c,{path:"config",element:L(Ee)}),e.jsx(c,{path:"fuel",element:L(ve)}),e.jsx(c,{path:"complete",element:L(Pe)}),e.jsx(c,{path:"*",element:e.jsx(oe,{to:`access${window.location.search}`,replace:!0})})]})})})]})})})}const Se=Y`
8
+ html,
9
+ body,
10
+ #app,
11
+ #app > .wrapper {
12
+ height: 100%;
13
+ }
14
+ `,Re=T("div")`
15
+ /* display: flex;
16
+ min-width: 0;
17
+ flex: 1 1 0; */
18
+ height: 100%;
19
+
20
+ & .layout-content {
21
+ min-width: 0;
22
+ flex: 1 1 0;
23
+ }
24
+
25
+ & .ll-header {
26
+ @media (max-width: 960px) {
27
+ padding: 0 12px;
28
+ }
29
+ }
30
+ `;export{He as default};
@@ -1,4 +1,4 @@
1
- import{v as W,j as t,ab as V,bE as X,aa as c,H as u,ap as G,b7 as Q,ah as _,w as Z}from"./vendor-mui-core-D_bnq77o.js";import{r as x,L as D}from"./vendor-react-DEoibe3W.js";import{w as J,f as j}from"./vendor-hooks-rDgu5KV9.js";import{A as Y}from"./vendor-utils-rHXShPKm.js";import{d as ee}from"./PlayArrow-BToG9L6q.js";import{d as te}from"./Error-jEHdDLNk.js";import{u as M,_ as y,C as oe,j as v,M as ie,B as S,Z as ne,y as re}from"./vendor-ux-did-connect-DHrruicZ.js";import{W as se}from"./did-address-DjwPl1uy.js";import{b as ae,c as le}from"./vendor-arcblock-uz9DVywv.js";import{S as ce}from"./ServerLogo-s6cfhx92.js";import{d as T,e as U,g as de,f as b,S as pe,h as me,j as he,k as ge,l as A,m as fe}from"./index-DefO2n6z.js";import{H as ue}from"./addon--u4EErgw.js";import{g as z}from"./get-safe-url-B5RJTMjC.js";import{p as xe,S as be,P as ke}from"./starting-progress-CiLZpNpg.js";import"./lottie-web-jYmAQWuC.js";import"./QuestionMarkCircle-BPVDAm8U.js";function H({appInfo:e,...s}){const[o,r]=x.useState(!1),l=W(d=>d.breakpoints.down("md"))?32:48;return o?t.jsx(ne,{did:e.publisher,size:l}):t.jsx(re,{src:e.icon,alt:e.title,width:l,height:l,...s,onError:()=>r(!0)})}H.propTypes={appInfo:u.object.isRequired};const B=(e,s)=>b.findComponentByIdV2(e,s)||e;function De(){var C,L,N,I,R,P;const{t:e,locale:s}=M(),[o,r]=J({blocklet:null,component:null,launcherSession:null,loading:!1,starting:!1,manageSubscriptionURL:""}),p=W(i=>i.breakpoints.down("md")),l=new URL(window.location.href),d=l.searchParams.get("componentId"),$=()=>{const i=l.searchParams.get("redirect")||"/";window.location.href=z(decodeURIComponent(i))},E=()=>{const i=setInterval(()=>{T.get("/blocklet/detail?nocache=1").then(({data:n})=>{r(m=>({...m,blocklet:n}));const a=B(n,d);if(a.status==="running"){$();return}a.status!=="starting"&&(r({blocklet:n,starting:!1}),n!==a&&r({component:a}),clearInterval(i))}).catch(n=>{r({loading:!1}),y.error(n.message)})},3e3)};x.useEffect(()=>{r({loading:!0}),T.get("/blocklet/detail?nocache=1").then(({data:i})=>{const n=B(i,d);if(r({blocklet:i,loading:!1}),n.status==="running"){$();return}r({blocklet:i}),i!==n&&r({component:n}),n.status==="starting"&&(r({starting:!0}),E())}).catch(i=>{r({loading:!1}),y.error(i.message)})},[]);const F=x.useCallback(()=>{r({loading:!0,starting:!0});const i=o.blocklet;if(!i)return;const n={did:i==null?void 0:i.meta.did};i.children.length>0&&(n.componentDids=i.children.map(a=>a.meta.did)),U.startBlocklet({input:n}).then(({blocklet:a})=>{r(m=>({...m,blocklet:a})),E()}).catch(a=>{y.error(a.message),r({loading:!1,starting:!1})})},[o.component,o.blocklet]);x.useEffect(()=>{var i;(i=o.blocklet)!=null&&i.controller&&(de({launcherUrl:o.blocklet.controller.launcherUrl,launcherSessionId:o.blocklet.controller.launcherSessionId,locale:s}).then(n=>{r({manageSubscriptionURL:n})}).catch(n=>{console.error("get manage subscription url error",n)}),U.getLauncherSession({input:{launcherSessionId:o.blocklet.controller.launcherSessionId,launcherUrl:o.blocklet.controller.launcherUrl}}).then(n=>{r({launcherSession:n.launcherSession}).catch(a=>{console.error("get launcher session error",a)})}))},[(C=o.blocklet)==null?void 0:C.controller]);const h=j(()=>{var i,n;return(n=(i=o.blocklet)==null?void 0:i.children)==null?void 0:n.length},[o.blocklet]),g=j(()=>{var i,n,a;return((a=(n=(i=o.blocklet)==null?void 0:i.children)==null?void 0:n.filter(m=>m.status==="running"))==null?void 0:a.length)||0},[o.blocklet]),f=j(()=>!h||!g?0:Math.round(g/h*100),[g,h]);if(!o.blocklet)return t.jsx(oe,{children:t.jsx(V,{})});const k={icon:`${v.WELLKNOWN_SERVICE_PATH_PREFIX}/blocklet/logo`,title:b.getDisplayName(o.blocklet),publisher:o.blocklet.appDid},w=localStorage.getItem("blocklet-server-url"),q=()=>{w&&window.open(z(w,{allowDomains:null}))},K=ie(xe,o.starting?{width:`${f}%`,"&::after":{width:`${f}%`},"&::before":{width:`${f}%`,animation:"shimmer 1.5s infinite cubic-bezier(0.4, 0.0, 0.2, 1)","@keyframes shimmer":{"0%":{width:0},"100%":{width:`${f}%`}}}}:{});return t.jsxs(je,{children:[t.jsx(X,{styles:we}),t.jsxs("header",{className:"root-header",children:[!p&&t.jsx("div",{className:"left",children:t.jsx(ce,{width:"128",height:"48",onClick:q,style:{cursor:w?"pointer":""}})}),t.jsx(ae,{children:t.jsx(ue,{SessionContext:pe})})]}),t.jsxs(ye,{elevation:0,children:[t.jsxs(ve,{children:[t.jsx(H,{appInfo:k}),t.jsxs("div",{className:"app-info_content",children:[t.jsx(c,{className:"app-info_name",children:k.title}),t.jsx(se,{size:14,className:"app-info_did",did:k.publisher})]})]}),((I=(N=(L=o.blocklet)==null?void 0:L.controller)==null?void 0:N.status)==null?void 0:I.value)!==le.BLOCKLET_CONTROLLER_STATUS.suspended&&t.jsxs(t.Fragment,{children:[t.jsxs(c,{className:"title-box",children:[t.jsx(c,{className:"icon",children:t.jsx(ee,{})}),t.jsx(c,{className:"title",children:e("blocklet.startApplication")})]}),t.jsx(c,{className:"sub-title",children:o.starting?t.jsx(be,{blocklets:((R=o.blocklet)==null?void 0:R.children)??[]}):e("blocklet.startDescription",{name:o.component?b.getDisplayName(o.component,!0):b.getDisplayName(o.blocklet)})}),t.jsx(c,{mt:8,display:"flex",flexDirection:"column",alignItems:"center",gap:1,children:t.jsx(ke,{blocklets:((P=o.blocklet)==null?void 0:P.children)??[],status:o.starting?"starting":"",children:t.jsx(S,{sx:K,disabled:o.loading||o.starting,variant:"contained",color:"primary",size:"large",loading:o.starting,onClick:()=>F(),children:t.jsx("span",{style:{position:"relative",zIndex:2},children:o.starting?`(${g}/${h}) ${e("blocklet.starting")}`:e("blocklet.start")})})})})]}),me(o.blocklet)&&t.jsx(O,{blocklet:o.blocklet,launcherSession:o.launcherSession,manageSubscriptionURL:o.manageSubscriptionURL}),t.jsx(c,{mt:5,children:t.jsx(D,{className:"footer-link",to:`${v.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/overview`,children:e("blocklet.dashboard")})})]})]})}function O({blocklet:e,launcherSession:s,manageSubscriptionURL:o}){const{t:r,locale:p}=M();if(!e||!s)return"";const l=he(e,s),d=ge(e,s);return!l&&!d?"":t.jsxs(t.Fragment,{children:[t.jsxs(c,{className:"title-box",children:[t.jsx(te,{className:"icon-error"}),t.jsxs(c,{className:"title error",children:[l&&r("blocklet.suspended"),d&&r("blocklet.terminated")]})]}),t.jsxs(c,{className:"sub-title",children:[l&&r("blocklet.suspendedCausedByExpired",{deadline:A(s==null?void 0:s.reservedUntil,p)}),d&&r("blocklet.suspendedCausedByTerminated",{canceledAt:A(s==null?void 0:s.terminatedAt,p),deadline:fe(s==null?void 0:s.terminatedAt,p)})]}),t.jsxs(c,{mt:8,children:[l&&t.jsx(S,{component:G,style:{minWidth:200},variant:"contained",color:"primary",size:"large",target:"_blank",href:o||"#",children:r("blocklet.manageSubscription")}),d&&t.jsx(S,{component:D,to:Y(v.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin/did-spaces"),style:{minWidth:200},variant:"contained",color:"primary",size:"large",children:r("common.backup")})]})]})}O.propTypes={blocklet:u.object.isRequired,launcherSession:u.object.isRequired,manageSubscriptionURL:u.string.isRequired};const we=Q`
1
+ import{v as W,j as t,ab as V,bE as X,aa as c,H as u,ap as G,b7 as Q,ah as _,w as Z}from"./vendor-mui-core-D_bnq77o.js";import{r as x,L as D}from"./vendor-react-DEoibe3W.js";import{w as J,f as j}from"./vendor-hooks-rDgu5KV9.js";import{A as Y}from"./vendor-utils-rHXShPKm.js";import{d as ee}from"./PlayArrow-BToG9L6q.js";import{d as te}from"./Error-jEHdDLNk.js";import{u as M,_ as y,C as oe,j as v,M as ie,B as S,Z as ne,y as re}from"./vendor-ux-did-connect-DHrruicZ.js";import{W as se}from"./did-address-DjwPl1uy.js";import{b as ae,c as le}from"./vendor-arcblock-uz9DVywv.js";import{S as ce}from"./ServerLogo-s6cfhx92.js";import{d as T,e as U,g as de,f as b,S as pe,h as me,j as he,k as ge,l as A,m as fe}from"./index-CIkPfxzG.js";import{H as ue}from"./addon--u4EErgw.js";import{g as z}from"./get-safe-url-Bk6PlU7n.js";import{p as xe,S as be,P as ke}from"./starting-progress-CiLZpNpg.js";import"./lottie-web-jYmAQWuC.js";import"./QuestionMarkCircle-BPVDAm8U.js";function H({appInfo:e,...s}){const[o,r]=x.useState(!1),l=W(d=>d.breakpoints.down("md"))?32:48;return o?t.jsx(ne,{did:e.publisher,size:l}):t.jsx(re,{src:e.icon,alt:e.title,width:l,height:l,...s,onError:()=>r(!0)})}H.propTypes={appInfo:u.object.isRequired};const B=(e,s)=>b.findComponentByIdV2(e,s)||e;function De(){var C,L,N,I,R,P;const{t:e,locale:s}=M(),[o,r]=J({blocklet:null,component:null,launcherSession:null,loading:!1,starting:!1,manageSubscriptionURL:""}),p=W(i=>i.breakpoints.down("md")),l=new URL(window.location.href),d=l.searchParams.get("componentId"),$=()=>{const i=l.searchParams.get("redirect")||"/";window.location.href=z(decodeURIComponent(i))},E=()=>{const i=setInterval(()=>{T.get("/blocklet/detail?nocache=1").then(({data:n})=>{r(m=>({...m,blocklet:n}));const a=B(n,d);if(a.status==="running"){$();return}a.status!=="starting"&&(r({blocklet:n,starting:!1}),n!==a&&r({component:a}),clearInterval(i))}).catch(n=>{r({loading:!1}),y.error(n.message)})},3e3)};x.useEffect(()=>{r({loading:!0}),T.get("/blocklet/detail?nocache=1").then(({data:i})=>{const n=B(i,d);if(r({blocklet:i,loading:!1}),n.status==="running"){$();return}r({blocklet:i}),i!==n&&r({component:n}),n.status==="starting"&&(r({starting:!0}),E())}).catch(i=>{r({loading:!1}),y.error(i.message)})},[]);const F=x.useCallback(()=>{r({loading:!0,starting:!0});const i=o.blocklet;if(!i)return;const n={did:i==null?void 0:i.meta.did};i.children.length>0&&(n.componentDids=i.children.map(a=>a.meta.did)),U.startBlocklet({input:n}).then(({blocklet:a})=>{r(m=>({...m,blocklet:a})),E()}).catch(a=>{y.error(a.message),r({loading:!1,starting:!1})})},[o.component,o.blocklet]);x.useEffect(()=>{var i;(i=o.blocklet)!=null&&i.controller&&(de({launcherUrl:o.blocklet.controller.launcherUrl,launcherSessionId:o.blocklet.controller.launcherSessionId,locale:s}).then(n=>{r({manageSubscriptionURL:n})}).catch(n=>{console.error("get manage subscription url error",n)}),U.getLauncherSession({input:{launcherSessionId:o.blocklet.controller.launcherSessionId,launcherUrl:o.blocklet.controller.launcherUrl}}).then(n=>{r({launcherSession:n.launcherSession}).catch(a=>{console.error("get launcher session error",a)})}))},[(C=o.blocklet)==null?void 0:C.controller]);const h=j(()=>{var i,n;return(n=(i=o.blocklet)==null?void 0:i.children)==null?void 0:n.length},[o.blocklet]),g=j(()=>{var i,n,a;return((a=(n=(i=o.blocklet)==null?void 0:i.children)==null?void 0:n.filter(m=>m.status==="running"))==null?void 0:a.length)||0},[o.blocklet]),f=j(()=>!h||!g?0:Math.round(g/h*100),[g,h]);if(!o.blocklet)return t.jsx(oe,{children:t.jsx(V,{})});const k={icon:`${v.WELLKNOWN_SERVICE_PATH_PREFIX}/blocklet/logo`,title:b.getDisplayName(o.blocklet),publisher:o.blocklet.appDid},w=localStorage.getItem("blocklet-server-url"),q=()=>{w&&window.open(z(w,{allowDomains:null}))},K=ie(xe,o.starting?{width:`${f}%`,"&::after":{width:`${f}%`},"&::before":{width:`${f}%`,animation:"shimmer 1.5s infinite cubic-bezier(0.4, 0.0, 0.2, 1)","@keyframes shimmer":{"0%":{width:0},"100%":{width:`${f}%`}}}}:{});return t.jsxs(je,{children:[t.jsx(X,{styles:we}),t.jsxs("header",{className:"root-header",children:[!p&&t.jsx("div",{className:"left",children:t.jsx(ce,{width:"128",height:"48",onClick:q,style:{cursor:w?"pointer":""}})}),t.jsx(ae,{children:t.jsx(ue,{SessionContext:pe})})]}),t.jsxs(ye,{elevation:0,children:[t.jsxs(ve,{children:[t.jsx(H,{appInfo:k}),t.jsxs("div",{className:"app-info_content",children:[t.jsx(c,{className:"app-info_name",children:k.title}),t.jsx(se,{size:14,className:"app-info_did",did:k.publisher})]})]}),((I=(N=(L=o.blocklet)==null?void 0:L.controller)==null?void 0:N.status)==null?void 0:I.value)!==le.BLOCKLET_CONTROLLER_STATUS.suspended&&t.jsxs(t.Fragment,{children:[t.jsxs(c,{className:"title-box",children:[t.jsx(c,{className:"icon",children:t.jsx(ee,{})}),t.jsx(c,{className:"title",children:e("blocklet.startApplication")})]}),t.jsx(c,{className:"sub-title",children:o.starting?t.jsx(be,{blocklets:((R=o.blocklet)==null?void 0:R.children)??[]}):e("blocklet.startDescription",{name:o.component?b.getDisplayName(o.component,!0):b.getDisplayName(o.blocklet)})}),t.jsx(c,{mt:8,display:"flex",flexDirection:"column",alignItems:"center",gap:1,children:t.jsx(ke,{blocklets:((P=o.blocklet)==null?void 0:P.children)??[],status:o.starting?"starting":"",children:t.jsx(S,{sx:K,disabled:o.loading||o.starting,variant:"contained",color:"primary",size:"large",loading:o.starting,onClick:()=>F(),children:t.jsx("span",{style:{position:"relative",zIndex:2},children:o.starting?`(${g}/${h}) ${e("blocklet.starting")}`:e("blocklet.start")})})})})]}),me(o.blocklet)&&t.jsx(O,{blocklet:o.blocklet,launcherSession:o.launcherSession,manageSubscriptionURL:o.manageSubscriptionURL}),t.jsx(c,{mt:5,children:t.jsx(D,{className:"footer-link",to:`${v.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/overview`,children:e("blocklet.dashboard")})})]})]})}function O({blocklet:e,launcherSession:s,manageSubscriptionURL:o}){const{t:r,locale:p}=M();if(!e||!s)return"";const l=he(e,s),d=ge(e,s);return!l&&!d?"":t.jsxs(t.Fragment,{children:[t.jsxs(c,{className:"title-box",children:[t.jsx(te,{className:"icon-error"}),t.jsxs(c,{className:"title error",children:[l&&r("blocklet.suspended"),d&&r("blocklet.terminated")]})]}),t.jsxs(c,{className:"sub-title",children:[l&&r("blocklet.suspendedCausedByExpired",{deadline:A(s==null?void 0:s.reservedUntil,p)}),d&&r("blocklet.suspendedCausedByTerminated",{canceledAt:A(s==null?void 0:s.terminatedAt,p),deadline:fe(s==null?void 0:s.terminatedAt,p)})]}),t.jsxs(c,{mt:8,children:[l&&t.jsx(S,{component:G,style:{minWidth:200},variant:"contained",color:"primary",size:"large",target:"_blank",href:o||"#",children:r("blocklet.manageSubscription")}),d&&t.jsx(S,{component:D,to:Y(v.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin/did-spaces"),style:{minWidth:200},variant:"contained",color:"primary",size:"large",children:r("common.backup")})]})]})}O.propTypes={blocklet:u.object.isRequired,launcherSession:u.object.isRequired,manageSubscriptionURL:u.string.isRequired};const we=Q`
2
2
  html,
3
3
  body,
4
4
  #app,
@@ -1 +1 @@
1
- import{e as m,r as h}from"./vendor-react-DEoibe3W.js";import{a9 as b,j as n,ab as j,ad as g,H as y}from"./vendor-mui-core-D_bnq77o.js";import{w as P}from"./vendor-hooks-rDgu5KV9.js";import{r as S,aH as x,by as R,h as k,u as V}from"./vendor-ux-did-connect-DHrruicZ.js";import{d as q}from"./dashboard-BIOpvfj3.js";import{B as u}from"./vendor-utils-rHXShPKm.js";import{r as D}from"./omit-D2k92RIF.js";var c={},T=b;Object.defineProperty(c,"__esModule",{value:!0});var _=c.default=void 0,E=T(S()),G=n;_=c.default=(0,E.default)((0,G.jsx)("path",{d:"M12 2 4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5zm-1.06 13.54L7.4 12l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41z"}),"GppGood");var p={},$=m&&m.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(p,"__esModule",{value:!0});p.signResponse=z;p.verifyResponse=M;var I=p.verifyVault=C;const K=$(D),w=$(x),d=R,l=k;function z(e,a){const t=(0,w.default)(e),s=a.sign(t);return{...e,$signature:s}}function M(e,a){return e.$signature?Promise.resolve(a.verify((0,w.default)((0,K.default)(e,"$signature")),e.$signature)):Promise.resolve(!1)}async function C(e,a,t=!1){if(!Array.isArray(e)||e.length===0){if(t)throw new Error("vaults list is empty");return""}for(let i=1;i<e.length;i++)if(e[i].at<=e[i-1].at){if(t)throw new Error("vaults are not in ascending order");return""}if(new Set(e.map(i=>i.did)).size!==e.length){if(t)throw new Error("vaults list has duplicate vaults");return""}for(let i=0;i<e.length;i++){const r=e[i];if(!(0,l.isFromPublicKey)(r.did,r.pk)){if(t)throw new Error(`vault did and pk mismatch: ${r.did}(${r.pk})`);return""}let f=u.from(`vault:${a}`);for(let o=0;o<=i;o++)f=u.concat([f,u.from(`:${e[o].did}`)]);if(!r.approverSig){if(t)throw new Error(`vault approve signature missing for ${r.did}`);return""}try{let o;if(i>0){const v=e[i-1];o=(0,d.fromPublicKey)(v.pk,(0,l.toTypeInfo)(v.did))}else{if(!r.approverPk||!r.approverDid||!(0,l.isFromPublicKey)(r.approverDid,r.approverPk)){if(t)throw new Error(`approver config missing for ${r.did}`);return""}o=(0,d.fromPublicKey)(r.approverPk,(0,l.toTypeInfo)(r.approverDid))}if(await o.verify(f,r.approverSig)===!1){if(t)throw new Error(`signature verify failed for ${r.did}`);return""}}catch(o){if(console.error(o),t)throw new Error(`vault approve verify failed: ${o.message}`);return""}if(!r.sig){if(t)throw new Error(`vault commit signature missing for ${r.did}`);return""}try{const o=(0,d.fromPublicKey)(r.pk,(0,l.toTypeInfo)(r.did));if(r.approverSig&&(f=u.concat([f,u.from(`:${r.approverSig}`)])),await o.verify(f,r.sig)===!1){if(t)throw new Error(`commit signature verify failed for ${r.did}`);return""}}catch(o){if(console.error(o),t)throw new Error(`vault commit verify failed: ${o.message}`);return""}}return e[e.length-1].did}function A({vaults:e,appPid:a}){const{t}=V(),[s,i]=P({verified:!1,verifying:!0,error:""});return h.useEffect(()=>{I(e,a,!0).then(r=>{i({verified:!!r,verifying:!1})}).catch(r=>{i({verified:!1,verifying:!1,error:r.message})})},[e,a,i]),s.verifying?n.jsx(j,{}):s.verified?n.jsx(g,{title:t("blocklet.config.vault.verified"),children:n.jsx(_,{fontSize:"small",color:"success"})}):n.jsx(g,{title:s.error,children:n.jsx(q,{color:"error"})})}A.propTypes={vaults:y.array.isRequired,appPid:y.string.isRequired};export{A as V};
1
+ import{e as m,r as h}from"./vendor-react-DEoibe3W.js";import{a9 as b,j as n,ab as j,ad as g,H as y}from"./vendor-mui-core-D_bnq77o.js";import{w as P}from"./vendor-hooks-rDgu5KV9.js";import{r as S,aH as x,by as R,h as k,u as V}from"./vendor-ux-did-connect-DHrruicZ.js";import{d as q}from"./dashboard-BYxl5V9e.js";import{B as u}from"./vendor-utils-rHXShPKm.js";import{r as D}from"./omit-D2k92RIF.js";var c={},T=b;Object.defineProperty(c,"__esModule",{value:!0});var _=c.default=void 0,E=T(S()),G=n;_=c.default=(0,E.default)((0,G.jsx)("path",{d:"M12 2 4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5zm-1.06 13.54L7.4 12l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41z"}),"GppGood");var p={},$=m&&m.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(p,"__esModule",{value:!0});p.signResponse=z;p.verifyResponse=M;var I=p.verifyVault=C;const K=$(D),w=$(x),d=R,l=k;function z(e,a){const t=(0,w.default)(e),s=a.sign(t);return{...e,$signature:s}}function M(e,a){return e.$signature?Promise.resolve(a.verify((0,w.default)((0,K.default)(e,"$signature")),e.$signature)):Promise.resolve(!1)}async function C(e,a,t=!1){if(!Array.isArray(e)||e.length===0){if(t)throw new Error("vaults list is empty");return""}for(let i=1;i<e.length;i++)if(e[i].at<=e[i-1].at){if(t)throw new Error("vaults are not in ascending order");return""}if(new Set(e.map(i=>i.did)).size!==e.length){if(t)throw new Error("vaults list has duplicate vaults");return""}for(let i=0;i<e.length;i++){const r=e[i];if(!(0,l.isFromPublicKey)(r.did,r.pk)){if(t)throw new Error(`vault did and pk mismatch: ${r.did}(${r.pk})`);return""}let f=u.from(`vault:${a}`);for(let o=0;o<=i;o++)f=u.concat([f,u.from(`:${e[o].did}`)]);if(!r.approverSig){if(t)throw new Error(`vault approve signature missing for ${r.did}`);return""}try{let o;if(i>0){const v=e[i-1];o=(0,d.fromPublicKey)(v.pk,(0,l.toTypeInfo)(v.did))}else{if(!r.approverPk||!r.approverDid||!(0,l.isFromPublicKey)(r.approverDid,r.approverPk)){if(t)throw new Error(`approver config missing for ${r.did}`);return""}o=(0,d.fromPublicKey)(r.approverPk,(0,l.toTypeInfo)(r.approverDid))}if(await o.verify(f,r.approverSig)===!1){if(t)throw new Error(`signature verify failed for ${r.did}`);return""}}catch(o){if(console.error(o),t)throw new Error(`vault approve verify failed: ${o.message}`);return""}if(!r.sig){if(t)throw new Error(`vault commit signature missing for ${r.did}`);return""}try{const o=(0,d.fromPublicKey)(r.pk,(0,l.toTypeInfo)(r.did));if(r.approverSig&&(f=u.concat([f,u.from(`:${r.approverSig}`)])),await o.verify(f,r.sig)===!1){if(t)throw new Error(`commit signature verify failed for ${r.did}`);return""}}catch(o){if(console.error(o),t)throw new Error(`vault commit verify failed: ${o.message}`);return""}}return e[e.length-1].did}function A({vaults:e,appPid:a}){const{t}=V(),[s,i]=P({verified:!1,verifying:!0,error:""});return h.useEffect(()=>{I(e,a,!0).then(r=>{i({verified:!!r,verifying:!1})}).catch(r=>{i({verified:!1,verifying:!1,error:r.message})})},[e,a,i]),s.verifying?n.jsx(j,{}):s.verified?n.jsx(g,{title:t("blocklet.config.vault.verified"),children:n.jsx(_,{fontSize:"small",color:"success"})}):n.jsx(g,{title:s.error,children:n.jsx(q,{color:"error"})})}A.propTypes={vaults:y.array.isRequired,appPid:y.string.isRequired};export{A as V};
@@ -1,4 +1,4 @@
1
- import{j as e,aa as a,H as o,ah as p}from"./vendor-mui-core-D_bnq77o.js";import{u as l}from"./use-mobile-DyX6Fl8Z.js";import{af as m}from"./index-DefO2n6z.js";function r({blocklet:t,children:n}){const i=l();return!t||m(t.meta)?e.jsx(s,{isMobile:i,children:n}):e.jsx(s,{isMobile:i,children:e.jsx(a,{display:"flex",variant:"contained",color:"primary",alignItems:"center",marginLeft:"32px",children:n})})}r.propTypes={blocklet:o.object,children:o.any};r.defaultProps={blocklet:null,children:null};const s=p(a)`
1
+ import{j as e,aa as a,H as o,ah as p}from"./vendor-mui-core-D_bnq77o.js";import{u as l}from"./use-mobile-DyX6Fl8Z.js";import{af as m}from"./index-CIkPfxzG.js";function r({blocklet:t,children:n}){const i=l();return!t||m(t.meta)?e.jsx(s,{isMobile:i,children:n}):e.jsx(s,{isMobile:i,children:e.jsx(a,{display:"flex",variant:"contained",color:"primary",alignItems:"center",marginLeft:"32px",children:n})})}r.propTypes={blocklet:o.object,children:o.any};r.defaultProps={blocklet:null,children:null};const s=p(a)`
2
2
  padding-top: 24px;
3
3
  margin-top: auto;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{b as r,r as w}from"./vendor-react-DEoibe3W.js";import{t as H,z as Ie,ax as he,G as ge}from"./index-DefO2n6z.js";import{A as Fe,aC as _e}from"./vendor-utils-rHXShPKm.js";import{_ as Le}from"./dot-C4hULxc0.js";import{I as Ae}from"./iframe-DW7zzzTG.js";import{d as Ye}from"./LaunchOutlined-CXNijfqX.js";import{cq as Se,a9 as We,j as d,aa as z,w as Re,bc as y,X as se,T as Y,L as $e,A as qe,b6 as He,I as te,bp as xe,bo as ve,q as De,bX as ze,H as C,ah as Ve,bL as Be,ab as Ke,ak as Xe,y as Je,b4 as Ge}from"./vendor-mui-core-D_bnq77o.js";import{r as Ue,u as Ze,j as Qe}from"./vendor-ux-did-connect-DHrruicZ.js";import{d as et}from"./ChevronLeft-CnQaQ-rc.js";import{d as tt}from"./ChevronRight-a_2_x6Ew.js";import{r as ce,t as Ce,i as L,a as B,b as I,p as nt,c as at,d as de,e as oe,s as U,f as Z,g as V,h as Q,j as ee,k as ne,l as ae,m as rt,n as ie,o as G,q as ye,u as ue,v as st,w as ot,x as it,y as lt,z as ct}from"./index-DcUhenm6.js";import{a as dt,b as ut}from"./vendor-hooks-rDgu5KV9.js";import{f as pt}from"./format-error-BrmqJs5a.js";import{L as mt,c as ft}from"./vendor-mui-x-R-0SFz4c.js";import{A as ht}from"./AdapterDayjs-BD9H1lZ-.js";function we(e){ce(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Se(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(a){var s=Ce(a);(n===void 0||n<s||isNaN(Number(s)))&&(n=s)}),n||new Date(NaN)}function je(e){ce(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Se(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(a){var s=Ce(a);(n===void 0||n>s||isNaN(s.getDate()))&&(n=s)}),n||new Date(NaN)}function gt(e){return ce(1,arguments),L(e,Date.now())}var pe={},xt=We;Object.defineProperty(pe,"__esModule",{value:!0});var Oe=pe.default=void 0,vt=xt(Ue()),Dt=d;Oe=pe.default=(0,vt.default)((0,Dt.jsx)("path",{d:"M16.01 11H4v2h12.01v3L20 12l-3.99-4z"}),"ArrowRightAlt");const yt=(e,t)=>Array.from({length:Math.ceil(e.length/t)},(n,a)=>e.slice(a*t,a*t+t)),bt=(e,t)=>{const n=U(Q(e),{locale:t}),a=Z(ee(e),{locale:t}),s=[];for(let o=n;G(o,a);)s.push(o),o=oe(o,1);return s},Et=({startDate:e},t)=>e&&L(t,e),kt=({endDate:e},t)=>e&&L(t,e),Mt=({startDate:e,endDate:t},n)=>e&&t&&(ue(n,{start:e,end:t})||L(n,e)||L(n,t)),St=({startDate:e,endDate:t})=>e&&t?L(e,t):!1,be=(e,t)=>{if(e){const n=e instanceof Date?e:nt(e);if(at(n))return n}return t},Rt=(e,t,n)=>{const{startDate:a,endDate:s}=e;if(a&&s){const o=we([a,t]),h=je([s,n]);return[o,de(o,h)?I(o,1):h]}return[a,s]},Ct=(e,t)=>[{label:"Today",startDate:e,endDate:e},{label:"Yesterday",startDate:oe(e,-1),endDate:oe(e,-1)},{label:"This Week",startDate:U(e,{locale:t}),endDate:Z(e,{locale:t})},{label:"Last Week",startDate:U(V(e,-1),{locale:t}),endDate:Z(V(e,-1),{locale:t})},{label:"Last 7 Days",startDate:V(e,-1),endDate:e},{label:"This Month",startDate:Q(e),endDate:ee(e)},{label:"Last Month",startDate:Q(I(e,-1)),endDate:ee(I(e,-1))},{label:"This Year",startDate:ne(e),endDate:ae(e)},{label:"Last Year",startDate:ne(B(e,-1)),endDate:ae(B(e,-1))}],wt=(e,t)=>{const n=Math.floor(t/2);return Array(t).fill(0).map((a,s)=>e.getFullYear()-n+s)},jt=({date:e,setDate:t,nextDisabled:n,prevDisabled:a,onClickNext:s,onClickPrevious:o,locale:h})=>{const m=typeof h<"u"?[...Array(12).keys()].map(i=>{var D;return(D=h.localize)===null||D===void 0?void 0:D.month(i,{width:"abbreviated",context:"standalone"})}):["Jan","Feb","Mar","Apr","May","June","July","Aug","Sept","Oct","Nov","Dec"],f=i=>{t(lt(e,parseInt(i.target.value,10)))},p=i=>{t(ct(e,parseInt(i.target.value,10)))};return r.createElement(y,{container:!0,justifyContent:"space-between",alignItems:"center"},r.createElement(y,{item:!0,sx:{padding:"5px"}},r.createElement(te,{sx:{padding:"10px","&:hover":{background:"none"}},disabled:a,onClick:o},r.createElement(et,{color:a?"disabled":"action"}))),r.createElement(y,{item:!0},r.createElement(xe,{variant:"standard"},r.createElement(ve,{value:ot(e),onChange:f,MenuProps:{disablePortal:!0}},m.map((i,D)=>r.createElement(De,{key:i,value:D},i))))),r.createElement(y,{item:!0},r.createElement(xe,{variant:"standard"},r.createElement(ve,{value:it(e),onChange:p,MenuProps:{disablePortal:!0}},wt(e,30).map(i=>r.createElement(De,{key:i,value:i},i))))),r.createElement(y,{item:!0,sx:{padding:"5px"}},r.createElement(te,{sx:{padding:"10px","&:hover":{background:"none"}},disabled:n,onClick:s},r.createElement(tt,{color:n?"disabled":"action"}))))},Ot=({startOfRange:e,endOfRange:t,disabled:n,highlighted:a,outlined:s,filled:o,onClick:h,onHover:m,value:f})=>r.createElement(z,{sx:{display:"flex",borderRadius:e?"50% 0 0 50%":t?"0 50% 50% 0":void 0,backgroundColor:p=>!n&&a?p.palette.primary.light:void 0}},r.createElement(te,{sx:Object.assign({height:"36px",width:"36px",padding:0,border:p=>!n&&s?`1px solid ${p.palette.primary.dark}`:void 0},!n&&o?{"&:hover":{backgroundColor:p=>p.palette.primary.dark},backgroundColor:p=>p.palette.primary.dark}:{}),disabled:n,onClick:h,onMouseOver:m},r.createElement(Y,{sx:{lineHeight:1.6,color:p=>n?p.palette.text.secondary:o?p.palette.primary.contrastText:p.palette.text.primary},variant:"body2"},f)));var re;(function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"})(re||(re={}));const Ee=e=>{var t;const{helpers:n,handlers:a,value:s,dateRange:o,marker:h,setValue:m,minDate:f,maxDate:p,locale:i}=e,D=((t=i==null?void 0:i.options)===null||t===void 0?void 0:t.weekStartsOn)||0,b=typeof i<"u"?[...Array(7).keys()].map(g=>{var v;return(v=i.localize)===null||v===void 0?void 0:v.day((g+D)%7,{width:"short",context:"standalone"})}):["Su","Mo","Tu","We","Th","Fr","Sa"],[x,E]=e.navState;return r.createElement(Re,{square:!0,elevation:0,sx:{width:290}},r.createElement(y,{container:!0},r.createElement(jt,{date:s,setDate:m,nextDisabled:!E,prevDisabled:!x,onClickPrevious:()=>a.onMonthNavigate(h,re.Previous),onClickNext:()=>a.onMonthNavigate(h,re.Next),locale:i}),r.createElement(y,{item:!0,container:!0,direction:"row",justifyContent:"space-between",sx:{marginTop:"10px",paddingLeft:"30px",paddingRight:"30px"}},b.map((g,v)=>r.createElement(Y,{color:"textSecondary",key:v,variant:"caption"},g))),r.createElement(y,{item:!0,container:!0,direction:"column",justifyContent:"space-between",sx:{paddingLeft:"15px",paddingRight:"15px",marginTop:"15px",marginBottom:"20px"}},yt(bt(s,i),7).map((g,v)=>r.createElement(y,{key:v,container:!0,direction:"row",justifyContent:"center"},g.map(l=>{const S=Et(o,l),O=kt(o,l),k=St(o),j=Mt(o,l)||n.inHoverRange(l);return r.createElement(Ot,{key:ie(l,"dd-MM-yyyy"),filled:S||O,outlined:gt(l),highlighted:j&&!k,disabled:!de(s,l)||!ue(l,{start:f,end:p}),startOfRange:S&&!k,endOfRange:O&&!k,onClick:()=>a.onDayClick(l),onHover:()=>a.onDayHover(l),value:st(l)})}))))))},ke=(e,t)=>{const{startDate:n,endDate:a}=e,{startDate:s,endDate:o}=t;return n&&s&&a&&o?L(n,s)&&L(a,o):!1},Nt=({ranges:e,setRange:t,selectedRange:n})=>r.createElement($e,null,e.map((a,s)=>r.createElement(qe,{button:!0,key:s,onClick:()=>t(a),sx:[ke(a,n)&&{backgroundColor:o=>o.palette.primary.dark,color:"primary.contrastText","&:hover":{color:"inherit"}}]},r.createElement(He,{primaryTypographyProps:{variant:"body2",sx:{fontWeight:ke(a,n)?"bold":"normal"}}},a.label)))),le={FIRST_MONTH:Symbol("firstMonth"),SECOND_MONTH:Symbol("secondMonth")},Tt=e=>{const{ranges:t,dateRange:n,minDate:a,maxDate:s,firstMonth:o,setFirstMonth:h,secondMonth:m,setSecondMonth:f,setDateRange:p,helpers:i,handlers:D,locale:b}=e,{startDate:x,endDate:E}=n,g=rt(m,o)>=2,v={dateRange:n,minDate:a,maxDate:s,helpers:i,handlers:D};return r.createElement(Re,{elevation:5,square:!0},r.createElement(y,{container:!0,direction:"row",wrap:"nowrap"},r.createElement(y,null,r.createElement(Nt,{selectedRange:n,ranges:t,setRange:p})),r.createElement(se,{orientation:"vertical",flexItem:!0}),r.createElement(y,null,r.createElement(y,{container:!0,sx:{padding:"20px 70px"},alignItems:"center"},r.createElement(y,{item:!0,sx:{flex:1,textAlign:"center"}},r.createElement(Y,{variant:"subtitle1"},x?ie(x,"dd MMMM yyyy",{locale:b}):"Start Date")),r.createElement(y,{item:!0,sx:{flex:1,textAlign:"center"}},r.createElement(Oe,{color:"action"})),r.createElement(y,{item:!0,sx:{flex:1,textAlign:"center"}},r.createElement(Y,{variant:"subtitle1"},E?ie(E,"dd MMMM yyyy",{locale:b}):"End Date"))),r.createElement(se,null),r.createElement(y,{container:!0,direction:"row",justifyContent:"center",wrap:"nowrap"},r.createElement(Ee,Object.assign({},v,{value:o,setValue:h,navState:[!0,g],marker:le.FIRST_MONTH,locale:b})),r.createElement(se,{orientation:"vertical",flexItem:!0}),r.createElement(Ee,Object.assign({},v,{value:m,setValue:f,navState:[g,!0],marker:le.SECOND_MONTH,locale:b}))))))},Pt=e=>{const t=new Date,{open:n,onChange:a,initialDateRange:s,minDate:o,maxDate:h,definedRanges:m=Ct(new Date,e.locale),locale:f}=e,p=be(o,B(t,-10)),i=be(h,B(t,10)),[D,b]=Rt(s||{},p,i),[x,E]=w.useState(Object.assign({},s)),[g,v]=w.useState(),[l,S]=w.useState(D||t),[O,k]=w.useState(b||I(l,1)),{startDate:j,endDate:P}=x,K=c=>{G(c,O)&&S(c)},X=c=>{ye(c,l)&&k(c)},$=c=>{let{startDate:M,endDate:R}=c;if(M&&R)c.startDate=M=we([M,p]),c.endDate=R=je([R,i]),E(c),a(c),S(M),k(de(M,R)?I(M,1):R);else{const q={};E(q),a(q),S(t),k(I(l,1))}},F=c=>{if(j&&!P&&!G(c,j)){const M={startDate:j,endDate:c};a(M),E(M)}else E({startDate:c,endDate:void 0});v(c)},A=(c,M)=>{if(c===le.FIRST_MONTH){const R=I(l,M);G(R,O)&&S(R)}else{const R=I(O,M);G(l,R)&&k(R)}},W=c=>{j&&!P&&(!g||!L(c,g))&&v(c)},N={inHoverRange:c=>j&&!P&&g&&ye(g,j)&&ue(c,{start:j,end:g})},T={onDayClick:F,onDayHover:W,onMonthNavigate:A};return n?w.createElement(Tt,{dateRange:x,minDate:p,maxDate:i,ranges:m,firstMonth:l,secondMonth:O,setFirstMonth:K,setSecondMonth:X,setDateRange:$,helpers:N,handlers:T,locale:f}):null},It=e=>{const{closeOnClickOutside:t,wrapperClassName:n,toggle:a,open:s}=e,o=()=>{t!==!1&&a()},h=m=>(m==null?void 0:m.key)==="Escape"&&o();return r.createElement(z,{sx:{position:"relative"}},s&&r.createElement(z,{sx:{position:"fixed",height:"100vh",width:"100vw",bottom:0,zIndex:0,right:0,left:0,top:0},onKeyPress:h,onClick:o}),r.createElement(z,{sx:{position:"relative",zIndex:1},className:n},r.createElement(Pt,Object.assign({},e))))},Ft=e=>r.createElement(It,Object.assign({},e));function Me(e,t,n,a){return parseFloat((t-a*t/e+n).toFixed(2))}function _t(e){[...e.querySelectorAll("*")].forEach(t=>e.removeChild(t))}function Lt(e){return e.value}function J(e,t){const n=document.createElementNS("http://www.w3.org/2000/svg",e);for(const a in t)n.setAttribute(a,t[a]);return n}function At(e,t=[],n={}){if(_t(e),t.length<=1)return;let a=[];typeof t[0]=="number"?a=t.map(u=>({value:u})):a=t;const{onmousemove:s}=n,{onmouseout:o}=n,h="interactive"in n?n.interactive:!!s,m=n.spotRadius||2,f=m*2,p=n.cursorWidth||2,i=parseFloat(e.attributes["stroke-width"].value),D=n.fetch||Lt,b=a.map(u=>D(u)),x=parseFloat(e.attributes.width.value)-f*2,E=parseFloat(e.attributes.height.value),g=E-i*2-f,v=Math.max(...b)===0?1:Math.max(...b),l=-1e3,S=b.length-1,O=x/S,k=[],j=Me(v,g,i+m,b[0]);let P=`M${f} ${j}`;b.forEach((u,N)=>{const T=N*O+f,c=Me(v,g,i+m,u);k.push(Object.assign({},a[N],{index:N,x:T,y:c})),P+=` L ${T} ${c}`});const K=J("path",{class:"sparkline--line",d:P,fill:"none"}),X=`${P} V ${E} L ${f} ${E} Z`,$=J("path",{class:"sparkline--fill",d:X,stroke:"none"});if(e.appendChild($),e.appendChild(K),!h)return;const F=J("line",{class:"sparkline--cursor",x1:l,x2:l,y1:0,y2:E,"stroke-width":p}),A=J("circle",{class:"sparkline--spot",cx:l,cy:l,r:m});e.appendChild(F),e.appendChild(A);const W=J("rect",{width:e.attributes.width.value,height:e.attributes.height.value,style:"fill: transparent; stroke: transparent",class:"sparkline--interaction-layer"});e.appendChild(W),W.addEventListener("mouseout",u=>{F.setAttribute("x1",l.toString()),F.setAttribute("x2",l.toString()),A.setAttribute("cx",l.toString()),o&&o(u)}),W.addEventListener("mousemove",u=>{const N=u.offsetX;let T=k.find(Pe=>Pe.x>=N);T||(T=k[S]);const c=k[k.indexOf(T)-1];let M,R;c?(R=c.x+(T.x-c.x)/2,M=N>=R?T:c):M=T;const{x:q}=M,{y:Te}=M;A.setAttribute("cx",q.toString()),A.setAttribute("cy",Te.toString()),F.setAttribute("x1",q.toString()),F.setAttribute("x2",q.toString()),s&&s(u,M)})}function me({style:e,title:t,value:n,graph:a,description:s,empty:o}){return d.jsx(Yt,{children:d.jsxs(ze,{style:{...e},children:[d.jsx(Y,{sx:{fontSize:14},color:"text.secondary",children:t}),o&&r.isValidElement(o)?d.jsx(z,{color:"text.secondary",display:"flex",justifyContent:"center",alignItems:"center",style:{height:150},children:o}):d.jsxs(d.Fragment,{children:[d.jsx(Y,{variant:"h5",component:"div",mt:1,children:n}),a,!!s&&d.jsx(z,{display:"flex",sx:{fontSize:12,marginTop:3},color:"text.secondary",children:s})]})]})})}me.propTypes={style:C.object,title:C.node,value:C.node,graph:C.node,description:C.any,empty:C.node};me.defaultProps={style:{},title:null,value:null,graph:null,empty:null,description:null};const Yt=Ve(Be)`
1
+ import{b as r,r as w}from"./vendor-react-DEoibe3W.js";import{t as H,z as Ie,ax as he,G as ge}from"./index-CIkPfxzG.js";import{A as Fe,aC as _e}from"./vendor-utils-rHXShPKm.js";import{_ as Le}from"./dot-BA3EvSrh.js";import{I as Ae}from"./iframe-DW7zzzTG.js";import{d as Ye}from"./LaunchOutlined-CXNijfqX.js";import{cq as Se,a9 as We,j as d,aa as z,w as Re,bc as y,X as se,T as Y,L as $e,A as qe,b6 as He,I as te,bp as xe,bo as ve,q as De,bX as ze,H as C,ah as Ve,bL as Be,ab as Ke,ak as Xe,y as Je,b4 as Ge}from"./vendor-mui-core-D_bnq77o.js";import{r as Ue,u as Ze,j as Qe}from"./vendor-ux-did-connect-DHrruicZ.js";import{d as et}from"./ChevronLeft-CnQaQ-rc.js";import{d as tt}from"./ChevronRight-a_2_x6Ew.js";import{r as ce,t as Ce,i as L,a as B,b as I,p as nt,c as at,d as de,e as oe,s as U,f as Z,g as V,h as Q,j as ee,k as ne,l as ae,m as rt,n as ie,o as G,q as ye,u as ue,v as st,w as ot,x as it,y as lt,z as ct}from"./index-DcUhenm6.js";import{a as dt,b as ut}from"./vendor-hooks-rDgu5KV9.js";import{f as pt}from"./format-error-BrmqJs5a.js";import{L as mt,c as ft}from"./vendor-mui-x-R-0SFz4c.js";import{A as ht}from"./AdapterDayjs-BD9H1lZ-.js";function we(e){ce(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Se(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(a){var s=Ce(a);(n===void 0||n<s||isNaN(Number(s)))&&(n=s)}),n||new Date(NaN)}function je(e){ce(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Se(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(a){var s=Ce(a);(n===void 0||n>s||isNaN(s.getDate()))&&(n=s)}),n||new Date(NaN)}function gt(e){return ce(1,arguments),L(e,Date.now())}var pe={},xt=We;Object.defineProperty(pe,"__esModule",{value:!0});var Oe=pe.default=void 0,vt=xt(Ue()),Dt=d;Oe=pe.default=(0,vt.default)((0,Dt.jsx)("path",{d:"M16.01 11H4v2h12.01v3L20 12l-3.99-4z"}),"ArrowRightAlt");const yt=(e,t)=>Array.from({length:Math.ceil(e.length/t)},(n,a)=>e.slice(a*t,a*t+t)),bt=(e,t)=>{const n=U(Q(e),{locale:t}),a=Z(ee(e),{locale:t}),s=[];for(let o=n;G(o,a);)s.push(o),o=oe(o,1);return s},Et=({startDate:e},t)=>e&&L(t,e),kt=({endDate:e},t)=>e&&L(t,e),Mt=({startDate:e,endDate:t},n)=>e&&t&&(ue(n,{start:e,end:t})||L(n,e)||L(n,t)),St=({startDate:e,endDate:t})=>e&&t?L(e,t):!1,be=(e,t)=>{if(e){const n=e instanceof Date?e:nt(e);if(at(n))return n}return t},Rt=(e,t,n)=>{const{startDate:a,endDate:s}=e;if(a&&s){const o=we([a,t]),h=je([s,n]);return[o,de(o,h)?I(o,1):h]}return[a,s]},Ct=(e,t)=>[{label:"Today",startDate:e,endDate:e},{label:"Yesterday",startDate:oe(e,-1),endDate:oe(e,-1)},{label:"This Week",startDate:U(e,{locale:t}),endDate:Z(e,{locale:t})},{label:"Last Week",startDate:U(V(e,-1),{locale:t}),endDate:Z(V(e,-1),{locale:t})},{label:"Last 7 Days",startDate:V(e,-1),endDate:e},{label:"This Month",startDate:Q(e),endDate:ee(e)},{label:"Last Month",startDate:Q(I(e,-1)),endDate:ee(I(e,-1))},{label:"This Year",startDate:ne(e),endDate:ae(e)},{label:"Last Year",startDate:ne(B(e,-1)),endDate:ae(B(e,-1))}],wt=(e,t)=>{const n=Math.floor(t/2);return Array(t).fill(0).map((a,s)=>e.getFullYear()-n+s)},jt=({date:e,setDate:t,nextDisabled:n,prevDisabled:a,onClickNext:s,onClickPrevious:o,locale:h})=>{const m=typeof h<"u"?[...Array(12).keys()].map(i=>{var D;return(D=h.localize)===null||D===void 0?void 0:D.month(i,{width:"abbreviated",context:"standalone"})}):["Jan","Feb","Mar","Apr","May","June","July","Aug","Sept","Oct","Nov","Dec"],f=i=>{t(lt(e,parseInt(i.target.value,10)))},p=i=>{t(ct(e,parseInt(i.target.value,10)))};return r.createElement(y,{container:!0,justifyContent:"space-between",alignItems:"center"},r.createElement(y,{item:!0,sx:{padding:"5px"}},r.createElement(te,{sx:{padding:"10px","&:hover":{background:"none"}},disabled:a,onClick:o},r.createElement(et,{color:a?"disabled":"action"}))),r.createElement(y,{item:!0},r.createElement(xe,{variant:"standard"},r.createElement(ve,{value:ot(e),onChange:f,MenuProps:{disablePortal:!0}},m.map((i,D)=>r.createElement(De,{key:i,value:D},i))))),r.createElement(y,{item:!0},r.createElement(xe,{variant:"standard"},r.createElement(ve,{value:it(e),onChange:p,MenuProps:{disablePortal:!0}},wt(e,30).map(i=>r.createElement(De,{key:i,value:i},i))))),r.createElement(y,{item:!0,sx:{padding:"5px"}},r.createElement(te,{sx:{padding:"10px","&:hover":{background:"none"}},disabled:n,onClick:s},r.createElement(tt,{color:n?"disabled":"action"}))))},Ot=({startOfRange:e,endOfRange:t,disabled:n,highlighted:a,outlined:s,filled:o,onClick:h,onHover:m,value:f})=>r.createElement(z,{sx:{display:"flex",borderRadius:e?"50% 0 0 50%":t?"0 50% 50% 0":void 0,backgroundColor:p=>!n&&a?p.palette.primary.light:void 0}},r.createElement(te,{sx:Object.assign({height:"36px",width:"36px",padding:0,border:p=>!n&&s?`1px solid ${p.palette.primary.dark}`:void 0},!n&&o?{"&:hover":{backgroundColor:p=>p.palette.primary.dark},backgroundColor:p=>p.palette.primary.dark}:{}),disabled:n,onClick:h,onMouseOver:m},r.createElement(Y,{sx:{lineHeight:1.6,color:p=>n?p.palette.text.secondary:o?p.palette.primary.contrastText:p.palette.text.primary},variant:"body2"},f)));var re;(function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"})(re||(re={}));const Ee=e=>{var t;const{helpers:n,handlers:a,value:s,dateRange:o,marker:h,setValue:m,minDate:f,maxDate:p,locale:i}=e,D=((t=i==null?void 0:i.options)===null||t===void 0?void 0:t.weekStartsOn)||0,b=typeof i<"u"?[...Array(7).keys()].map(g=>{var v;return(v=i.localize)===null||v===void 0?void 0:v.day((g+D)%7,{width:"short",context:"standalone"})}):["Su","Mo","Tu","We","Th","Fr","Sa"],[x,E]=e.navState;return r.createElement(Re,{square:!0,elevation:0,sx:{width:290}},r.createElement(y,{container:!0},r.createElement(jt,{date:s,setDate:m,nextDisabled:!E,prevDisabled:!x,onClickPrevious:()=>a.onMonthNavigate(h,re.Previous),onClickNext:()=>a.onMonthNavigate(h,re.Next),locale:i}),r.createElement(y,{item:!0,container:!0,direction:"row",justifyContent:"space-between",sx:{marginTop:"10px",paddingLeft:"30px",paddingRight:"30px"}},b.map((g,v)=>r.createElement(Y,{color:"textSecondary",key:v,variant:"caption"},g))),r.createElement(y,{item:!0,container:!0,direction:"column",justifyContent:"space-between",sx:{paddingLeft:"15px",paddingRight:"15px",marginTop:"15px",marginBottom:"20px"}},yt(bt(s,i),7).map((g,v)=>r.createElement(y,{key:v,container:!0,direction:"row",justifyContent:"center"},g.map(l=>{const S=Et(o,l),O=kt(o,l),k=St(o),j=Mt(o,l)||n.inHoverRange(l);return r.createElement(Ot,{key:ie(l,"dd-MM-yyyy"),filled:S||O,outlined:gt(l),highlighted:j&&!k,disabled:!de(s,l)||!ue(l,{start:f,end:p}),startOfRange:S&&!k,endOfRange:O&&!k,onClick:()=>a.onDayClick(l),onHover:()=>a.onDayHover(l),value:st(l)})}))))))},ke=(e,t)=>{const{startDate:n,endDate:a}=e,{startDate:s,endDate:o}=t;return n&&s&&a&&o?L(n,s)&&L(a,o):!1},Nt=({ranges:e,setRange:t,selectedRange:n})=>r.createElement($e,null,e.map((a,s)=>r.createElement(qe,{button:!0,key:s,onClick:()=>t(a),sx:[ke(a,n)&&{backgroundColor:o=>o.palette.primary.dark,color:"primary.contrastText","&:hover":{color:"inherit"}}]},r.createElement(He,{primaryTypographyProps:{variant:"body2",sx:{fontWeight:ke(a,n)?"bold":"normal"}}},a.label)))),le={FIRST_MONTH:Symbol("firstMonth"),SECOND_MONTH:Symbol("secondMonth")},Tt=e=>{const{ranges:t,dateRange:n,minDate:a,maxDate:s,firstMonth:o,setFirstMonth:h,secondMonth:m,setSecondMonth:f,setDateRange:p,helpers:i,handlers:D,locale:b}=e,{startDate:x,endDate:E}=n,g=rt(m,o)>=2,v={dateRange:n,minDate:a,maxDate:s,helpers:i,handlers:D};return r.createElement(Re,{elevation:5,square:!0},r.createElement(y,{container:!0,direction:"row",wrap:"nowrap"},r.createElement(y,null,r.createElement(Nt,{selectedRange:n,ranges:t,setRange:p})),r.createElement(se,{orientation:"vertical",flexItem:!0}),r.createElement(y,null,r.createElement(y,{container:!0,sx:{padding:"20px 70px"},alignItems:"center"},r.createElement(y,{item:!0,sx:{flex:1,textAlign:"center"}},r.createElement(Y,{variant:"subtitle1"},x?ie(x,"dd MMMM yyyy",{locale:b}):"Start Date")),r.createElement(y,{item:!0,sx:{flex:1,textAlign:"center"}},r.createElement(Oe,{color:"action"})),r.createElement(y,{item:!0,sx:{flex:1,textAlign:"center"}},r.createElement(Y,{variant:"subtitle1"},E?ie(E,"dd MMMM yyyy",{locale:b}):"End Date"))),r.createElement(se,null),r.createElement(y,{container:!0,direction:"row",justifyContent:"center",wrap:"nowrap"},r.createElement(Ee,Object.assign({},v,{value:o,setValue:h,navState:[!0,g],marker:le.FIRST_MONTH,locale:b})),r.createElement(se,{orientation:"vertical",flexItem:!0}),r.createElement(Ee,Object.assign({},v,{value:m,setValue:f,navState:[g,!0],marker:le.SECOND_MONTH,locale:b}))))))},Pt=e=>{const t=new Date,{open:n,onChange:a,initialDateRange:s,minDate:o,maxDate:h,definedRanges:m=Ct(new Date,e.locale),locale:f}=e,p=be(o,B(t,-10)),i=be(h,B(t,10)),[D,b]=Rt(s||{},p,i),[x,E]=w.useState(Object.assign({},s)),[g,v]=w.useState(),[l,S]=w.useState(D||t),[O,k]=w.useState(b||I(l,1)),{startDate:j,endDate:P}=x,K=c=>{G(c,O)&&S(c)},X=c=>{ye(c,l)&&k(c)},$=c=>{let{startDate:M,endDate:R}=c;if(M&&R)c.startDate=M=we([M,p]),c.endDate=R=je([R,i]),E(c),a(c),S(M),k(de(M,R)?I(M,1):R);else{const q={};E(q),a(q),S(t),k(I(l,1))}},F=c=>{if(j&&!P&&!G(c,j)){const M={startDate:j,endDate:c};a(M),E(M)}else E({startDate:c,endDate:void 0});v(c)},A=(c,M)=>{if(c===le.FIRST_MONTH){const R=I(l,M);G(R,O)&&S(R)}else{const R=I(O,M);G(l,R)&&k(R)}},W=c=>{j&&!P&&(!g||!L(c,g))&&v(c)},N={inHoverRange:c=>j&&!P&&g&&ye(g,j)&&ue(c,{start:j,end:g})},T={onDayClick:F,onDayHover:W,onMonthNavigate:A};return n?w.createElement(Tt,{dateRange:x,minDate:p,maxDate:i,ranges:m,firstMonth:l,secondMonth:O,setFirstMonth:K,setSecondMonth:X,setDateRange:$,helpers:N,handlers:T,locale:f}):null},It=e=>{const{closeOnClickOutside:t,wrapperClassName:n,toggle:a,open:s}=e,o=()=>{t!==!1&&a()},h=m=>(m==null?void 0:m.key)==="Escape"&&o();return r.createElement(z,{sx:{position:"relative"}},s&&r.createElement(z,{sx:{position:"fixed",height:"100vh",width:"100vw",bottom:0,zIndex:0,right:0,left:0,top:0},onKeyPress:h,onClick:o}),r.createElement(z,{sx:{position:"relative",zIndex:1},className:n},r.createElement(Pt,Object.assign({},e))))},Ft=e=>r.createElement(It,Object.assign({},e));function Me(e,t,n,a){return parseFloat((t-a*t/e+n).toFixed(2))}function _t(e){[...e.querySelectorAll("*")].forEach(t=>e.removeChild(t))}function Lt(e){return e.value}function J(e,t){const n=document.createElementNS("http://www.w3.org/2000/svg",e);for(const a in t)n.setAttribute(a,t[a]);return n}function At(e,t=[],n={}){if(_t(e),t.length<=1)return;let a=[];typeof t[0]=="number"?a=t.map(u=>({value:u})):a=t;const{onmousemove:s}=n,{onmouseout:o}=n,h="interactive"in n?n.interactive:!!s,m=n.spotRadius||2,f=m*2,p=n.cursorWidth||2,i=parseFloat(e.attributes["stroke-width"].value),D=n.fetch||Lt,b=a.map(u=>D(u)),x=parseFloat(e.attributes.width.value)-f*2,E=parseFloat(e.attributes.height.value),g=E-i*2-f,v=Math.max(...b)===0?1:Math.max(...b),l=-1e3,S=b.length-1,O=x/S,k=[],j=Me(v,g,i+m,b[0]);let P=`M${f} ${j}`;b.forEach((u,N)=>{const T=N*O+f,c=Me(v,g,i+m,u);k.push(Object.assign({},a[N],{index:N,x:T,y:c})),P+=` L ${T} ${c}`});const K=J("path",{class:"sparkline--line",d:P,fill:"none"}),X=`${P} V ${E} L ${f} ${E} Z`,$=J("path",{class:"sparkline--fill",d:X,stroke:"none"});if(e.appendChild($),e.appendChild(K),!h)return;const F=J("line",{class:"sparkline--cursor",x1:l,x2:l,y1:0,y2:E,"stroke-width":p}),A=J("circle",{class:"sparkline--spot",cx:l,cy:l,r:m});e.appendChild(F),e.appendChild(A);const W=J("rect",{width:e.attributes.width.value,height:e.attributes.height.value,style:"fill: transparent; stroke: transparent",class:"sparkline--interaction-layer"});e.appendChild(W),W.addEventListener("mouseout",u=>{F.setAttribute("x1",l.toString()),F.setAttribute("x2",l.toString()),A.setAttribute("cx",l.toString()),o&&o(u)}),W.addEventListener("mousemove",u=>{const N=u.offsetX;let T=k.find(Pe=>Pe.x>=N);T||(T=k[S]);const c=k[k.indexOf(T)-1];let M,R;c?(R=c.x+(T.x-c.x)/2,M=N>=R?T:c):M=T;const{x:q}=M,{y:Te}=M;A.setAttribute("cx",q.toString()),A.setAttribute("cy",Te.toString()),F.setAttribute("x1",q.toString()),F.setAttribute("x2",q.toString()),s&&s(u,M)})}function me({style:e,title:t,value:n,graph:a,description:s,empty:o}){return d.jsx(Yt,{children:d.jsxs(ze,{style:{...e},children:[d.jsx(Y,{sx:{fontSize:14},color:"text.secondary",children:t}),o&&r.isValidElement(o)?d.jsx(z,{color:"text.secondary",display:"flex",justifyContent:"center",alignItems:"center",style:{height:150},children:o}):d.jsxs(d.Fragment,{children:[d.jsx(Y,{variant:"h5",component:"div",mt:1,children:n}),a,!!s&&d.jsx(z,{display:"flex",sx:{fontSize:12,marginTop:3},color:"text.secondary",children:s})]})]})})}me.propTypes={style:C.object,title:C.node,value:C.node,graph:C.node,description:C.any,empty:C.node};me.defaultProps={style:{},title:null,value:null,graph:null,empty:null,description:null};const Yt=Ve(Be)`
2
2
  .card-content {
3
3
  height: 150px;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{j as e,ab as k,aa as f,T,ah as m}from"./vendor-mui-core-D_bnq77o.js";import{u as A,j as b,B as R,ao as D}from"./vendor-ux-did-connect-DHrruicZ.js";import{H as P}from"./addon--u4EErgw.js";import{L as E}from"./landing-page-Due4o1uF.js";import{R as I,b as L}from"./vendor-arcblock-uz9DVywv.js";import{d as B}from"./CheckCircle-Ds4QI0ey.js";import{m as F}from"./vendor-hooks-rDgu5KV9.js";import{r as o}from"./vendor-react-DEoibe3W.js";import{u as H,d as W,s as _,a as z,S as N}from"./index-DefO2n6z.js";import"./vendor-utils-rHXShPKm.js";import"./lottie-web-jYmAQWuC.js";import"./QuestionMarkCircle-BPVDAm8U.js";function se(){var i,c,p,l;const{t:s,locale:u}=A(),{api:h,session:x}=H(),{searchParams:g}=new URL(window.location.href),[j,S]=o.useState(!1),r=g.get("transferId"),v=(i=window==null?void 0:window.env)==null?void 0:i.appId,w=o.useCallback(async()=>{const{data:t}=await W.get("/blocklet/transfer",{params:{transferId:r}});return t},[r]),a=F(w),C=o.useCallback(async(t,d)=>{t&&(_(d(t.sessionToken)),z(d(t.refreshToken))),await x.refresh(),S(!0)},[]);if(a.loading)return e.jsx(k,{});if(a.error)return e.jsx(K,{children:e.jsx(I,{status:"404",title:(p=(c=a.error)==null?void 0:c.response)==null?void 0:p.data,description:""})});const y=a.data.status==="success";let n;return y||j?n=e.jsxs(e.Fragment,{children:[e.jsx(q,{children:e.jsx(P,{SessionContext:N})}),e.jsx(f,{pt:1,color:"success.main",children:e.jsx(B,{style:{fontSize:80}})}),e.jsx(T,{my:4,variant:"h5",children:s("team.transferApp.successTitle")}),e.jsx("a",{href:`${b.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,children:e.jsx(R,{variant:"contained",children:s("team.transferApp.visitDashboard")})})]}):n=e.jsx(D,{popup:!0,open:!0,action:"receive-transfer-app-owner",checkFn:h.get,forceConnected:!1,autoConnect:!1,checkTimeout:10*60*1e3,onSuccess:C,onClose:()=>{},locale:u,messages:{title:s("team.transferApp.receiveDialog.title"),scan:s("team.transferApp.receiveDialog.scan"),confirm:s("team.transferApp.receiveDialog.confirm"),success:s("team.transferApp.receiveDialog.success")},extraParams:{transferId:r,appDid:v},hideCloseButton:!0}),e.jsx(E,{did:(l=window.blocklet)==null?void 0:l.appPid,children:e.jsx(f,{sx:{maxWidth:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:n})})}const q=m(L)`
1
+ import{j as e,ab as k,aa as f,T,ah as m}from"./vendor-mui-core-D_bnq77o.js";import{u as A,j as b,B as R,ao as D}from"./vendor-ux-did-connect-DHrruicZ.js";import{H as P}from"./addon--u4EErgw.js";import{L as E}from"./landing-page-Due4o1uF.js";import{R as I,b as L}from"./vendor-arcblock-uz9DVywv.js";import{d as B}from"./CheckCircle-Ds4QI0ey.js";import{m as F}from"./vendor-hooks-rDgu5KV9.js";import{r as o}from"./vendor-react-DEoibe3W.js";import{u as H,d as W,s as _,a as z,S as N}from"./index-CIkPfxzG.js";import"./vendor-utils-rHXShPKm.js";import"./lottie-web-jYmAQWuC.js";import"./QuestionMarkCircle-BPVDAm8U.js";function se(){var i,c,p,l;const{t:s,locale:u}=A(),{api:h,session:x}=H(),{searchParams:g}=new URL(window.location.href),[j,S]=o.useState(!1),r=g.get("transferId"),v=(i=window==null?void 0:window.env)==null?void 0:i.appId,w=o.useCallback(async()=>{const{data:t}=await W.get("/blocklet/transfer",{params:{transferId:r}});return t},[r]),a=F(w),C=o.useCallback(async(t,d)=>{t&&(_(d(t.sessionToken)),z(d(t.refreshToken))),await x.refresh(),S(!0)},[]);if(a.loading)return e.jsx(k,{});if(a.error)return e.jsx(K,{children:e.jsx(I,{status:"404",title:(p=(c=a.error)==null?void 0:c.response)==null?void 0:p.data,description:""})});const y=a.data.status==="success";let n;return y||j?n=e.jsxs(e.Fragment,{children:[e.jsx(q,{children:e.jsx(P,{SessionContext:N})}),e.jsx(f,{pt:1,color:"success.main",children:e.jsx(B,{style:{fontSize:80}})}),e.jsx(T,{my:4,variant:"h5",children:s("team.transferApp.successTitle")}),e.jsx("a",{href:`${b.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,children:e.jsx(R,{variant:"contained",children:s("team.transferApp.visitDashboard")})})]}):n=e.jsx(D,{popup:!0,open:!0,action:"receive-transfer-app-owner",checkFn:h.get,forceConnected:!1,autoConnect:!1,checkTimeout:10*60*1e3,onSuccess:C,onClose:()=>{},locale:u,messages:{title:s("team.transferApp.receiveDialog.title"),scan:s("team.transferApp.receiveDialog.scan"),confirm:s("team.transferApp.receiveDialog.confirm"),success:s("team.transferApp.receiveDialog.success")},extraParams:{transferId:r,appDid:v},hideCloseButton:!0}),e.jsx(E,{did:(l=window.blocklet)==null?void 0:l.appPid,children:e.jsx(f,{sx:{maxWidth:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:n})})}const q=m(L)`
2
2
  position: fixed;
3
3
  top: 16px;
4
4
  right: 16px;
@@ -1 +1 @@
1
- import{j as i,aa as t,bL as C,bW as w,bX as k,bY as L,T as E}from"./vendor-mui-core-D_bnq77o.js";import{u as R,L as v}from"./vendor-react-DEoibe3W.js";import{u as F,B as u,_ as a,aM as P,j as d}from"./vendor-ux-did-connect-DHrruicZ.js";import{a as T,u as f,l as S}from"./vendor-hooks-rDgu5KV9.js";import{A as m}from"./vendor-utils-rHXShPKm.js";import{u as _}from"./index-DefO2n6z.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-uz9DVywv.js";function M(){var c,l;const{api:b}=_(),h=R(),{t:n}=F(),r=new URLSearchParams(h.search).get("token"),e=T({error:"",finished:!1,loading:!1}),p=f(()=>{window.close(),window.location.replace("/")}),x=f(async()=>{try{e.loading=!0;const{data:o}=await b.post("/api/user/notification/unsubscribe",{token:r});o.success===!0?(e.finished=!0,a.success(n("notification.unsubscribeSucceed"))):(e.finished=!1,a.error(n("notification.unsubscribeFailed")))}catch(o){e.finished=!1,a.error(o.message||n("notification.unsubscribeFailed"))}finally{e.loading=!1}});S(()=>{if(!r)e.error=n("notification.unsubscribeTokenRequired");else{const o=P(r);if(!o)e.error=n("notification.unsubscribeTokenInvalid");else{const{exp:y}=o;y*1e3<=Date.now()&&(e.error=n("notification.unsubscribeTokenExpired"))}}});const s=(c=window==null?void 0:window.blocklet)==null?void 0:c.copyright,g=(s==null?void 0:s.owner)||((l=window==null?void 0:window.blocklet)==null?void 0:l.appName),j=(s==null?void 0:s.year)||new Date().getFullYear();return i.jsx(t,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",minHeight:"100vh",backgroundColor:"#fafafa"},children:i.jsxs(t,{sx:{width:"450px",maxWidth:"90%"},children:[i.jsx(t,{sx:{width:"100%"},children:i.jsx("img",{style:{height:"40px"},src:m(d.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-rect?imageFilter=convert&f=png"),alt:"blocklet logo"})}),i.jsxs(C,{variant:"outlined",sx:{my:1},children:[i.jsx(w,{title:e.finished?n("notification.unsubscribeSucceed"):n("notification.email.unsubscribe")}),i.jsxs(k,{sx:{minHeight:"10em"},children:[e.error?e.error:null,!e.error&&!e.finished?n("notification.email.unsubscribeDescription"):null,!e.error&&e.finished?i.jsxs(i.Fragment,{children:[n("notification.email.subscribeDescription")," ",i.jsx(v,{to:m(d.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/settings"),color:"primary",children:n("notification.email.subscribe")})]}):null]}),i.jsxs(L,{sx:{justifyContent:"end!important"},children:[i.jsx(u,{size:"small",color:e.error?"error":"primary",variant:"outlined",onClick:p,children:n("common.close")}),e.error||e.finished?null:i.jsx(u,{size:"small",color:"primary",variant:"contained",onClick:x,loading:e.loading,children:n("notification.unsubscribe")})]})]}),i.jsxs(E,{variant:"body2",color:"gray",children:["Copyright © ",j," ",g]})]})})}export{M as default};
1
+ import{j as i,aa as t,bL as C,bW as w,bX as k,bY as L,T as E}from"./vendor-mui-core-D_bnq77o.js";import{u as R,L as v}from"./vendor-react-DEoibe3W.js";import{u as F,B as u,_ as a,aM as P,j as d}from"./vendor-ux-did-connect-DHrruicZ.js";import{a as T,u as f,l as S}from"./vendor-hooks-rDgu5KV9.js";import{A as m}from"./vendor-utils-rHXShPKm.js";import{u as _}from"./index-CIkPfxzG.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-uz9DVywv.js";function M(){var c,l;const{api:b}=_(),h=R(),{t:n}=F(),r=new URLSearchParams(h.search).get("token"),e=T({error:"",finished:!1,loading:!1}),p=f(()=>{window.close(),window.location.replace("/")}),x=f(async()=>{try{e.loading=!0;const{data:o}=await b.post("/api/user/notification/unsubscribe",{token:r});o.success===!0?(e.finished=!0,a.success(n("notification.unsubscribeSucceed"))):(e.finished=!1,a.error(n("notification.unsubscribeFailed")))}catch(o){e.finished=!1,a.error(o.message||n("notification.unsubscribeFailed"))}finally{e.loading=!1}});S(()=>{if(!r)e.error=n("notification.unsubscribeTokenRequired");else{const o=P(r);if(!o)e.error=n("notification.unsubscribeTokenInvalid");else{const{exp:y}=o;y*1e3<=Date.now()&&(e.error=n("notification.unsubscribeTokenExpired"))}}});const s=(c=window==null?void 0:window.blocklet)==null?void 0:c.copyright,g=(s==null?void 0:s.owner)||((l=window==null?void 0:window.blocklet)==null?void 0:l.appName),j=(s==null?void 0:s.year)||new Date().getFullYear();return i.jsx(t,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",minHeight:"100vh",backgroundColor:"#fafafa"},children:i.jsxs(t,{sx:{width:"450px",maxWidth:"90%"},children:[i.jsx(t,{sx:{width:"100%"},children:i.jsx("img",{style:{height:"40px"},src:m(d.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-rect?imageFilter=convert&f=png"),alt:"blocklet logo"})}),i.jsxs(C,{variant:"outlined",sx:{my:1},children:[i.jsx(w,{title:e.finished?n("notification.unsubscribeSucceed"):n("notification.email.unsubscribe")}),i.jsxs(k,{sx:{minHeight:"10em"},children:[e.error?e.error:null,!e.error&&!e.finished?n("notification.email.unsubscribeDescription"):null,!e.error&&e.finished?i.jsxs(i.Fragment,{children:[n("notification.email.subscribeDescription")," ",i.jsx(v,{to:m(d.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/settings"),color:"primary",children:n("notification.email.subscribe")})]}):null]}),i.jsxs(L,{sx:{justifyContent:"end!important"},children:[i.jsx(u,{size:"small",color:e.error?"error":"primary",variant:"outlined",onClick:p,children:n("common.close")}),e.error||e.finished?null:i.jsx(u,{size:"small",color:"primary",variant:"contained",onClick:x,loading:e.loading,children:n("notification.unsubscribe")})]})]}),i.jsxs(E,{variant:"body2",color:"gray",children:["Copyright © ",j," ",g]})]})})}export{M as default};
@@ -1,2 +1,2 @@
1
- import{g as G,r as z,b as he}from"./vendor-react-DEoibe3W.js";import{H as U,j as l,ap as te,s as V,w as me,aa as Y,T as b,y as ge}from"./vendor-mui-core-D_bnq77o.js";import{f as D,u as Z}from"./vendor-hooks-rDgu5KV9.js";import{j as ne,I as ye}from"./vendor-ux-did-connect-DHrruicZ.js";import{b as Q,z as re,A as O}from"./vendor-utils-rHXShPKm.js";import{l as ve,m as _e,n as Le,o as xe,q as Ee,c as j,s as Se}from"./vendor-arcblock-uz9DVywv.js";import{u as Te}from"./session-CHdTc1We.js";import{z as Ce,V as we,T as Ne}from"./index-DefO2n6z.js";var K={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=A;var r=u(ve),s=u(_e),n=u(Le),a=u(xe),c=u(Ee);function u(o){return o&&o.__esModule?o:{default:o}}function f(o,i){return g(o)||L(o,i)||p(o,i)||m()}function m(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{g as G,r as z,b as he}from"./vendor-react-DEoibe3W.js";import{H as U,j as l,ap as te,s as V,w as me,aa as Y,T as b,y as ge}from"./vendor-mui-core-D_bnq77o.js";import{f as D,u as Z}from"./vendor-hooks-rDgu5KV9.js";import{j as ne,I as ye}from"./vendor-ux-did-connect-DHrruicZ.js";import{b as Q,z as re,A as O}from"./vendor-utils-rHXShPKm.js";import{l as ve,m as _e,n as Le,o as xe,q as Ee,c as j,s as Se}from"./vendor-arcblock-uz9DVywv.js";import{u as Te}from"./session-CHdTc1We.js";import{z as Ce,V as we,T as Ne}from"./index-CIkPfxzG.js";var K={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=A;var r=u(ve),s=u(_e),n=u(Le),a=u(xe),c=u(Ee);function u(o){return o&&o.__esModule?o:{default:o}}function f(o,i){return g(o)||L(o,i)||p(o,i)||m()}function m(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p(o,i){if(o){if(typeof o=="string")return E(o,i);var d={}.toString.call(o).slice(8,-1);return d==="Object"&&o.constructor&&(d=o.constructor.name),d==="Map"||d==="Set"?Array.from(o):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?E(o,i):void 0}}function E(o,i){(i==null||i>o.length)&&(i=o.length);for(var d=0,x=Array(i);d<i;d++)x[d]=o[d];return x}function L(o,i){var d=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(d!=null){var x,v,C,w,S=[],h=!0,N=!1;try{if(C=(d=d.call(o)).next,i!==0)for(;!(h=(x=C.call(d)).done)&&(S.push(x.value),S.length!==i);h=!0);}catch(R){N=!0,v=R}finally{try{if(!h&&d.return!=null&&(w=d.return(),Object(w)!==w))return}finally{if(N)throw v}}return S}}function g(o){if(Array.isArray(o))return o}var y={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},T=/^\[([^\]]+)\](?::([0-9]+))?$/;function A(o,i){if((0,r.default)(o),!o||/[\s<>]/.test(o)||o.indexOf("mailto:")===0||(i=(0,c.default)(i,y),i.validate_length&&o.length>i.max_allowed_length)||!i.allow_fragments&&o.includes("#")||!i.allow_query_components&&(o.includes("?")||o.includes("&")))return!1;var d,x,v,C,w,S,h,N;if(h=o.split("#"),o=h.shift(),h=o.split("?"),o=h.shift(),h=o.split("://"),h.length>1){if(d=h.shift().toLowerCase(),i.require_valid_protocol&&i.protocols.indexOf(d)===-1)return!1}else{if(i.require_protocol)return!1;if(o.slice(0,2)==="//"){if(!i.allow_protocol_relative_urls)return!1;h[0]=o.slice(2)}}if(o=h.join("://"),o==="")return!1;if(h=o.split("/"),o=h.shift(),o===""&&!i.require_host)return!0;if(h=o.split("@"),h.length>1){if(i.disallow_auth||h[0]===""||(x=h.shift(),x.indexOf(":")>=0&&x.split(":").length>2))return!1;var R=x.split(":"),_=f(R,2),fe=_[0],pe=_[1];if(fe===""&&pe==="")return!1}C=h.join("@"),S=null,N=null;var $=C.match(T);if($?(v="",N=$[1],S=$[2]||null):(h=C.split(":"),v=h.shift(),h.length&&(S=h.join(":"))),S!==null&&S.length>0){if(w=parseInt(S,10),!/^[0-9]+$/.test(S)||w<=0||w>65535)return!1}else if(i.require_port)return!1;return i.host_whitelist?(0,s.default)(v,i.host_whitelist):v===""&&!i.require_host?!0:!(!(0,a.default)(v)&&!(0,n.default)(v,i)&&(!N||!(0,a.default)(N,6))||(v=v||N,i.host_blacklist&&(0,s.default)(v,i.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(K,K.exports);var Oe=K.exports;const Ae=G(Oe),vt=e=>{if(!e||!e.length)return[];const t=[];let r=null,s=[];if(e.forEach(n=>{var g,y,T,A;if(!n.activity||!n.activity.type||!r){r&&(s.length===1?t.push(s[0]):(r.items=s,t.push(r))),n.activity&&n.activity.type?(r=n,s=[n]):(t.push(n),r=null,s=[]);return}const a=s[0].activity,c=a.type,u=(g=a.target)==null?void 0:g.type,f=(y=a.target)==null?void 0:y.id,m=n.activity.type,p=(T=n.activity.target)==null?void 0:T.type,E=(A=n.activity.target)==null?void 0:A.id;if(c&&m&&c===m&&(!a.target&&!n.activity.target||a.target&&n.activity.target&&u===p&&f===E))s.push(n);else{if(s.length===1)t.push(s[0]);else{const o=Object.assign({},r,{items:s});t.push(o)}r=n,s=[n]}}),r)if(s.length===1)t.push(s[0]);else{const n=Object.assign({},r,{items:s});t.push(n)}return t},Ue=e=>!Q(e.activity)&&!!e.activity.type&&!!e.activity.actor,_t=e=>Ue(e)&&!!e.actorInfo&&!!e.actorInfo.did,je=e=>{if(!e)return null;const{meta:t,target:r,actor:s}=e||{};let n=r==null?void 0:r.id;return(r==null?void 0:r.type)==="user"&&(n=re(O(ne.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:s})),{metaLink:t==null?void 0:t.id,targetLink:n}},Me=e=>Ae(e),I={COMMENT:"comment",LIKE:"like",FOLLOW:"follow",TIPS:"tips",MENTION:"mention",ASSIGN:"assign",UN_ASSIGN:"un_assign"},Ie={[I.COMMENT]:(e,t,r)=>t>1?l.jsxs(l.Fragment,{children:["have left ",t," comments on ",r?"your":"the"," ",e,":"]}):l.jsxs(l.Fragment,{children:["has commented on ",r?"your":"the"," ",e,":"]}),[I.LIKE]:(e,t,r)=>t>1?l.jsxs(l.Fragment,{children:["have liked ",r?"your":"the"," ",e,":"]}):l.jsxs(l.Fragment,{children:["have liked ",r?"your":"the"," ",e,":"]}),[I.FOLLOW]:(e,t)=>t>1?l.jsx(l.Fragment,{children:"have followed you"}):l.jsx(l.Fragment,{children:"has followed you"}),[I.TIPS]:(e,t,r)=>t>1?l.jsxs(l.Fragment,{children:["left tips for ",r?"your":"the"," ",e,":"]}):l.jsxs(l.Fragment,{children:["left a tip for ",r?"your":"the"," ",e,":"]}),[I.MENTION]:(e,t,r)=>t>1?l.jsxs(l.Fragment,{children:["have mentioned you in ",r?"your":"the"," ",e,":"]}):l.jsxs(l.Fragment,{children:["mentioned you in ",r?"your":"the"," ",e,":"]}),[I.ASSIGN]:()=>l.jsx(l.Fragment,{children:"has assigned you a task: "}),[I.UN_ASSIGN]:()=>l.jsx(l.Fragment,{children:"has revoked your task assignment: "})},F=z.memo(function({user:t,color:r="text.secondary"}){const s=re(O(ne.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:t.did});return l.jsx(te,{href:s,color:r,fontWeight:600,target:"_blank",sx:{textDecoration:"none"},onClick:n=>{n.customPreventRedirect=!0},children:t.fullName||"System"})});F.propTypes={user:U.shape({did:U.string.isRequired,fullName:U.string.isRequired}).isRequired,color:U.string};F.displayName="UserLink";function Lt({activity:e,users:t,actors:r,extra:s={},mountPoint:n=""}){const{session:a}=Te()||{},{type:c,target:u}=e||{},{type:f,author:m}=u||{},{linkColor:p="text.secondary"}=s||{},E=D(()=>{var d;return m?(((d=a==null?void 0:a.user)==null?void 0:d.did)||(s==null?void 0:s.userDid))===m:!0},[a,m]),L=D(()=>{if(!Array.isArray(t))return new Map;const i=new Map;return t.forEach(d=>{d!=null&&d.did&&!i.has(d.did)&&i.set(d.did,d)}),i},[t]),g=D(()=>Array.isArray(r)?[...new Set(r)].map(d=>d?L.get(d)||{did:d,fullName:"System"}:null):[],[r,L]),y=Z(()=>{if(!Array.isArray(g)||g.length===0)return null;if(g.length===1)return l.jsx(F,{user:g[0],color:p});const i=g.slice(0,-1),d=g[g.length-1];if(g.length===2)return l.jsxs(l.Fragment,{children:[l.jsx(F,{user:i[0],color:p})," and ",l.jsx(F,{user:d,color:p})]});const x=g.length>3,v=x?g.slice(0,2):i;return l.jsxs(l.Fragment,{children:[v.map((C,w)=>l.jsxs(he.Fragment,{children:[l.jsx(F,{user:C,color:p}),w<v.length-1?", ":""]},C.did)),x?`, and ${g.length-2} others`:l.jsxs(l.Fragment,{children:[", and ",l.jsx(F,{user:d,color:p})]})]})}),T=Z(()=>{const i=Ie[c];return i?i(f==="doc"?"document":f,t.length,E):null}),A=D(()=>{const i=y(),d=T();return!i||!d?null:l.jsxs(l.Fragment,{children:[i," ",d]})},[c,f,g,y,T]),o=D(()=>{if(!e)return null;const i=je(e);return i!=null&&i.targetLink?Me(i==null?void 0:i.targetLink)?i==null?void 0:i.targetLink:O(n,i.targetLink):null},[e,n]);return!c||Q(u)?null:l.jsxs(l.Fragment,{children:[A," ",l.jsx(te,{href:o,color:"primary",target:"_blank",sx:{textDecoration:"none"},onClick:i=>{i.customPreventRedirect=!0},children:u.name||u.desc})]})}const Fe={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 7L7 17M8 7h9v9"/>'};se.propTypes={meta:U.object.isRequired};const Re=V(me)(({theme:e})=>({maxWidth:320,display:"flex",flexDirection:"column",gap:e.spacing(1.5),padding:e.spacing(2),marginTop:e.spacing(1),borderRadius:e.spacing(1),border:`1px solid ${e.palette.divider}`,boxShadow:"none"})),De=V(Y)(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:e.spacing(1),marginBottom:e.spacing(1)})),Pe=V(Y)({display:"flex",justifyContent:"space-between",alignItems:"center"});function se({meta:e}){const{amount:t,symbol:r,chainId:s}=e,n=()=>{window.open(`https://explorer.arcblock.io/chain/${s}`,"_blank")};return l.jsxs(Re,{children:[l.jsxs(De,{children:[l.jsx("img",{alt:"ArcBlock Beta",src:"https://bbqat7g5cg33cyr4pdrd6foycgzfb5xxeh2se7gcqkq.did.abtnet.io/payment-kit/methods/arcblock.png",width:32,height:32,style:{borderRadius:16}}),l.jsx(b,{variant:"h5",color:"text.primary",children:"ArcBlock"})]}),l.jsxs(Pe,{children:[l.jsxs(Y,{display:"flex",alignItems:"baseline",gap:1,children:[l.jsxs(b,{component:"span",variant:"h5",color:"text.primary",fontWeight:"bold",children:["+ ",t]}),l.jsx(b,{component:"span",variant:"subtitle2",color:"text.secondary",children:r})]}),l.jsx(ge,{variant:"outlined",size:"small",color:"secondary",endIcon:l.jsx(ye,{icon:Fe}),onClick:n,sx:{borderRadius:4},children:"View on Chain"})]})]})}ae.propTypes={meta:U.object.isRequired,type:U.string.isRequired,hideTips:U.bool,sx:U.object};ae.defaultProps={hideTips:!1,sx:{}};function ae({meta:e,type:t,hideTips:r=!1,sx:s}){return Q(e)?null:t==="tips"&&!r?l.jsx(se,{meta:e}):l.jsx(b,{variant:"subtitle2",fontSize:16,component:"p",sx:s,color:"text.secondary",children:e.content})}var be=z;function $e(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var B=$e(be);function q(){return q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},q.apply(this,arguments)}function Be(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,W(e,t)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,n){return s.__proto__=n,s},W(e,t)}function He(e,t){if(e==null)return{};var r={},s=Object.keys(e),n,a;for(a=0;a<s.length;a++)n=s[a],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}var J={position:"absolute",bottom:0,left:0,height:0,overflow:"hidden","padding-top":0,"padding-bottom":0,border:"none"},Ke=["box-sizing","width","font-size","font-weight","font-family","font-style","letter-spacing","text-indent","white-space","word-break","overflow-wrap","padding-left","padding-right"];function qe(e,t){if(!e||typeof e!="object")return e;var r={};return Object.keys(e).forEach(function(s){t.indexOf(s)>-1||(r[s]=e[s])}),r}var We=["component","className","unsafeHTML"];function ie(e,t){if(t!=="letters"&&t!=="words")throw new Error("Unsupported options basedOn: "+t);if(e.nodeType===Node.TEXT_NODE){var r=document.createDocumentFragment(),s;switch(t){case"words":s=e.textContent.split(/\b|(?=\W)/);break;case"letters":s=Array.from(e.textContent);break}s.forEach(function(u){r.appendChild(ke(u))}),e.parentNode.replaceChild(r,e)}else if(e.nodeType===Node.ELEMENT_NODE)for(var n=[].slice.call(e.childNodes),a=n.length,c=0;c<a;c++)ie(n[c],t)}function ke(e){var t=document.createElement("span");return t.className="LinesEllipsis-unit",t.textContent=e,t}function ee(e){e.parentNode.replaceChild(document.createTextNode(e.textContent),e)}function oe(e,t){if(!(!t.contains(e)||e===t)){for(;e.nextElementSibling;)e.parentNode.removeChild(e.nextElementSibling);oe(e.parentNode,t)}}function Ge(e){for(var t=e;t=t.parentNode;)if(/p|div|main|section|h\d|ul|ol|li/.test(t.tagName.toLowerCase()))return t}function H(e){return!!(e.offsetHeight&&(e.offsetWidth||/\S/.test(e.textContent)))}var le={component:"div",unsafeHTML:"",maxLine:1,ellipsis:"…",ellipsisHTML:void 0,className:"",basedOn:void 0,onReflow:function(){},winWidth:void 0},ze=Object.keys(le),ce=function(e){Be(t,e);function t(s){var n;return n=e.call(this,s)||this,n.state={html:s.unsafeHTML,clamped:!1},n.canvas=null,n.maxLine=0,n.nlUnits=[],n}var r=t.prototype;return r.componentDidMount=function(){this.initCanvas(),this.reflow(this.props)},r.componentDidUpdate=function(n){n.winWidth!==this.props.winWidth&&this.copyStyleToCanvas(),this.props!==n&&this.reflow(this.props)},r.componentWillUnmount=function(){this.canvas.parentNode.removeChild(this.canvas),this.canvas=null},r.setState=function(n,a){return typeof n.clamped<"u"&&(this.clamped=n.clamped),e.prototype.setState.call(this,n,a)},r.initCanvas=function(){if(!this.canvas){var n=this.canvas=document.createElement("div");n.className="LinesEllipsis-canvas "+this.props.className,n.setAttribute("aria-hidden","true"),this.copyStyleToCanvas(),Object.keys(J).forEach(function(a){n.style[a]=J[a]}),document.body.appendChild(n)}},r.copyStyleToCanvas=function(){var n=this,a=window.getComputedStyle(this.target);Ke.forEach(function(c){n.canvas.style[c]=a[c]})},r.reflow=function(n){this.maxLine=+n.maxLine||1,this.canvas.innerHTML=n.unsafeHTML;var a=n.basedOn||(/^[\x00-\x7F]+$/.test(n.unsafeHTML)?"words":"letters");ie(this.canvas,a);var c=this.putEllipsis(this.calcIndexes()),u={clamped:c,html:this.canvas.innerHTML};this.setState(u,n.onReflow.bind(this,u))},r.calcIndexes=function(){var n=[0],a=this.nlUnits=Array.from(this.canvas.querySelectorAll(".LinesEllipsis-unit")),c=a.length;if(!a.length)return n;var u=a.find(H);if(!u)return n;for(var f=1,m=u.offsetTop,p=1;p<c&&!(H(a[p])&&a[p].offsetTop-m>1&&(f++,n.push(p),m=a[p].offsetTop,f>this.maxLine));p++);return n},r.putEllipsis=function(n){if(n.length<=this.maxLine)return!1;this.nlUnits=this.nlUnits.slice(0,n[this.maxLine]);var a=this.nlUnits.pop(),c=this.makeEllipsisSpan();do oe(a,this.canvas),Ge(a).appendChild(c),a=this.nlUnits.pop();while(a&&(!H(a)||c.offsetHeight>a.offsetHeight||c.offsetTop>a.offsetTop));return a&&ee(a),this.nlUnits.forEach(ee),!0},r.makeEllipsisSpan=function(){var n=this.props,a=n.ellipsisHTML,c=n.ellipsis,u=document.createElement("span");u.appendChild(document.createElement("wbr"));var f=document.createElement("span");return f.className="LinesEllipsis-ellipsis",a?f.innerHTML=a:f.textContent=c,u.appendChild(f),u},r.isClamped=function(){return this.clamped},r.render=function(){var n=this,a=this.state,c=a.html,u=a.clamped,f=this.props,m=f.component,p=f.className,E=f.unsafeHTML,L=He(f,We);return B.default.createElement(m,q({className:"LinesEllipsis "+(u?"LinesEllipsis--clamped":"")+" "+p,ref:function(y){return n.target=y}},qe(L,ze)),B.default.createElement("div",{dangerouslySetInnerHTML:{__html:u?c:E}}))},t}(B.default.Component);ce.defaultProps=le;var Ve=ce;const xt=G(Ve),Ye=e=>{const t="explorer.arcblockio.cn";return e&&{beta:"beta.abtnetwork.io",main:"main.abtnetwork.io"}[e]||t},Qe=e=>{try{return new URL(e).host}catch{return e}};var Et={getChainHost:Ye,getUrlHost:Qe},St={linkStyle:{color:"#2754C5",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",fontSize:"14px",textDecoration:"underline"},actionsStyle:{margin:"20px -8px 0px"},actionStyle:{color:"#4598fa",fontSize:14,border:"1px solid #4598fa",display:"inline-block",borderRadius:"4px",margin:"8px",marginTop:"8px",marginBottom:"8px",marginLeft:"8px",marginRight:"8px"},assetStyle:{backgroundColor:"#f6f6f6",borderRadius:"8px",padding:"8px"},remarkStyle:{color:"#9397a1",fontSize:"12px",margin:0,whiteSpace:"pre-line!important"},summaryStyle:{color:"#49c3ad",fontWeight:700},titleStyle:{marginBottom:"6px"},severityColorMap:{normal:"#C4C5CA",success:"#25C99B",error:"#F16E6E",warning:"#DE9E37"},attachmentsStyle:{borderLeft:"2px solid transparent",paddingLeft:"20px"},h1Style:{color:"#333",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",fontSize:"24px",fontWeight:"bold",margin:"40px 0",padding:"0"},footerStyle:{color:"#898989",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",fontSize:"12px",lineHeight:"22px",margin:0}},Xe={year:{long:"year",short:"y"},day:{long:"day",short:"d"},hour:{long:"hour",short:"h"},minute:{long:"minute",short:"m"},second:{long:"second",short:"s"},millisecond:{long:"millisecond",short:"ms"},microsecond:{long:"microsecond",short:"µs"},nanosecond:{long:"nanosecond",short:"ns"}},Ze={year:{long:"年",short:"年"},day:{long:"天",short:"天"},hour:{long:"小时",short:"小时"},minute:{long:"分钟",short:"分"},second:{long:"秒钟",short:"秒"},millisecond:{long:"毫秒",short:"毫秒"},microsecond:{long:"微秒",short:"微秒"},nanosecond:{long:"纳秒",short:"纳秒"}};const k=new Map,Je=(e,t)=>{k.set(e,t)},et=(e="en_US")=>k.get(e)||k.get("en_US");var ue={registerLang:Je,getLang:et},tt=e=>{if(typeof e!="number")throw new TypeError("Expected a number");const t=e>0?Math.floor:Math.ceil;return{days:t(e/864e5),hours:t(e/36e5)%24,minutes:t(e/6e4)%60,seconds:t(e/1e3)%60,milliseconds:t(e)%1e3,microseconds:t(e*1e3)%1e3,nanoseconds:t(e*1e6)%1e3}};const nt=tt,{getLang:P}=ue,rt=(e,t)=>t===1?e:`${e}s`,st=1e-7;var at=(e,t={})=>{if(!Number.isFinite(e))throw new TypeError("Expected a finite number");t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);const r=P(t.locale),s=[],n=(u,f)=>{const m=Math.floor(u*10**f+st);return(Math.round(m)/10**f).toFixed(f)},a=(u,f,m)=>{if((s.length===0||!t.colonNotation)&&u===0&&!(t.colonNotation&&f==="minute"))return;const{long:p}=r[f]||P("en_US")[f],{short:E}=r[f]||P("en_US")[f];let L=(m||u||"0").toString(),g,y;if(t.colonNotation){g=s.length>0?":":"",y="";const T=L.includes(".")?L.split(".")[0].length:L.length,A=s.length>0?2:1;L="0".repeat(Math.max(0,A-T))+L}else g="",t.locale==="zh_CN"?Object.values(c).filter(T=>T>0).length>1?!c.days&&!c.hours&&c.minutes&&t.compact?y=p:y=E:c.minutes?y=p:y=E:y=t.verbose?` ${rt(p,u)}`:E;s.push(g+L+y)},c=nt(e);if(a(Math.trunc(c.days/365),"year"),a(c.days%365,"day"),a(c.hours,"hour"),a(c.minutes,"minute"),t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3)if(a(c.seconds,"second"),t.formatSubMilliseconds)a(c.milliseconds,"millisecond"),a(c.microseconds,"microsecond"),a(c.nanoseconds,"nanosecond");else{const u=c.milliseconds+c.microseconds/1e3+c.nanoseconds/1e6,f=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,m=u>=1?Math.round(u):Math.ceil(u),p=f?u.toFixed(f):m;a(Number.parseFloat(p,10),"millisecond",p)}else{const u=e/1e3%60,f=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,m=n(u,f),p=t.keepDecimalsOnWholeSeconds?m:m.replace(/\.0+$/,"");a(Number.parseFloat(p,10),"second",p)}if(s.length===0){const u=(r.millisecond||P("en_US").millisecond).long,f=(r.millisecond||P("en_US").millisecond).short;return t.locale==="zh_CN"?`0${t.verbose?`${u}`:f}`:`0${t.verbose?` ${u}s`:f}`}if(t.compact)return s[0];if(typeof t.unitCount=="number"){const u=t.colonNotation?"":" ";return s.slice(0,Math.max(t.unitCount,1)).join(u)}return t.colonNotation?s.join(""):s.join(" ")};const it=Xe,ot=Ze,{registerLang:X}=ue,de=at;X("en_US",it);X("zh_CN",ot);de.registerLang=X;var lt=de;const Tt=G(lt),M=(e,t)=>{var s;let r="?v=";return t?r+=we(t):r+=`${(s=e==null?void 0:e.meta)==null?void 0:s.version}${Ne(e==null?void 0:e.status)?"~":""}`,r};function ct({blocklet:e}){var d,x,v,C,w,S,h,N,R;const{inService:t}=Ce(),r=(d=((e==null?void 0:e.environments)||[]).find(_=>_.key===j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE))==null?void 0:d.value,s=(x=((e==null?void 0:e.environments)||[]).find(_=>_.key===j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE_DARK))==null?void 0:x.value,n=(v=((e==null?void 0:e.environments)||[]).find(_=>_.key===j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))==null?void 0:v.value,a=(C=((e==null?void 0:e.environments)||[]).find(_=>_.key===j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT_DARK))==null?void 0:C.value,c=(w=((e==null?void 0:e.environments)||[]).find(_=>_.key===j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON))==null?void 0:w.value,u=(S=((e==null?void 0:e.environments)||[]).find(_=>_.key===j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPLASH_PORTRAIT))==null?void 0:S.value,f=(h=((e==null?void 0:e.environments)||[]).find(_=>_.key===j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPLASH_LANDSCAPE))==null?void 0:h.value,m=(N=((e==null?void 0:e.environments)||[]).find(_=>_.key===j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_OG_IMAGE))==null?void 0:N.value,p=((R=window.env)==null?void 0:R.apiPrefix)||"/",E=`${O(p,`/blocklet/logo/${t?"":e.meta.did}`)}${M(e,r)}`,L=`${O(p,`/blocklet/logo-dark/${t?"":e.meta.did}`)}${M(e,s)}`,g=`${O(p,`/blocklet/logo-rect/${t?"":e.meta.did}`)}${M(e,n??r)}`,y=`${O(p,`/blocklet/logo-rect-dark/${t?"":e.meta.did}`)}${M(e,a??s)}`,T=`${O(p,`/blocklet/logo-favicon/${t?"":e.meta.did}`)}${M(e,c??r)}`,A=`${O(p,`/blocklet/splash/portrait/${t?"":e.meta.did}`)}${M(e,u)}`,o=`${O(p,`/blocklet/splash/landscape/${t?"":e.meta.did}`)}${M(e,f)}`,i=`${O(p,`/blocklet/og-image/${t?"":e.meta.did}`)}${M(e,m)}`;return{logoUrl:E,logoDarkUrl:L,rectLogoUrl:g,rectLogoDarkUrl:y,faviconUrl:T,splashPortraitUrl:A,splashLandscapeUrl:o,ogImageUrl:i}}function Ct({blocklet:e,square:t}={}){const{logoUrl:r,logoDarkUrl:s,rectLogoUrl:n,rectLogoDarkUrl:a}=ct({blocklet:e}),c=z.useMemo(()=>({appLogo:r,appLogoDark:s,appLogoRect:n,appLogoRectDark:a}),[r,s,n,a]);return Se({meta:c,square:t})}export{xt as H,ae as M,Ct as a,Me as b,Et as c,_t as d,Fe as e,Ae as f,je as g,ct as h,Ue as i,vt as m,Tt as p,St as s,Lt as u};
@@ -0,0 +1 @@
1
+ import{x as A}from"./vendor-hooks-rDgu5KV9.js";import{r as d}from"./vendor-react-DEoibe3W.js";var q={},f={},o={},M;function R(){if(M)return o;M=1,Object.defineProperty(o,"__esModule",{value:!0});var e=d;function r(){var t=e.useRef(!1),a=e.useCallback(function(){return t.current},[]);return e.useEffect(function(){return t.current=!0,function(){t.current=!1}},[]),a}return o.default=r,o}var p;function $(){if(p)return f;p=1,Object.defineProperty(f,"__esModule",{value:!0});var e=A,r=d,t=e.__importDefault(R());function a(n,c,l){c===void 0&&(c=[]),l===void 0&&(l={loading:!1});var i=r.useRef(0),_=t.default(),g=r.useState(l),y=g[0],v=g[1],F=r.useCallback(function(){for(var b=[],s=0;s<arguments.length;s++)b[s]=arguments[s];var m=++i.current;return y.loading||v(function(u){return e.__assign(e.__assign({},u),{loading:!0})}),n.apply(void 0,b).then(function(u){return _()&&m===i.current&&v({value:u,loading:!1}),u},function(u){return _()&&m===i.current&&v({error:u,loading:!1}),u})},c);return[y,F]}return f.default=a,f}Object.defineProperty(q,"__esModule",{value:!0});var h=A,k=d,S=h.__importDefault($());function U(e,r){r===void 0&&(r=[]);var t=S.default(e,r,{loading:!0}),a=t[0],n=t[1];return k.useEffect(function(){n()},[n]),a}var C=q.default=U;export{C as _,q as u};
@@ -1,4 +1,4 @@
1
- import{H as g,j as t,bp as Ce,bo as we,q as je,aa as v,y as W,v as he,bQ as ke,I as Me,b4 as Se,T as J,bR as ne,w as oe,bt as re,bS as ae,O as Pe,N as Ie,E as ie,ah as xe,bT as Te,bU as Re,m as se,ab as le}from"./vendor-mui-core-D_bnq77o.js";import{A as Ee,j as Be,k as Fe,H as Oe,U as ze}from"./vendor-arcblock-uz9DVywv.js";import{r as s,b as Ne,h as $e,l as Ae}from"./vendor-react-DEoibe3W.js";import{f as O,l as We}from"./vendor-hooks-rDgu5KV9.js";import{b2 as Z,I as ce,d as Le,u as De,j as He}from"./vendor-ux-did-connect-DHrruicZ.js";import{t as me,D as Ue,A as _e}from"./vendor-utils-rHXShPKm.js";import{N as qe,c as de}from"./list-rt6nku1-.js";import{d as Ye}from"./ExpandLess-CkoEHpgk.js";import{B as ue}from"./bundle-avatar-DYTLzqlT.js";import{U as Ke}from"./index-DefO2n6z.js";import"./lottie-web-jYmAQWuC.js";import"./index-BYCeMwoO.js";import"./use-blocklet-logo-BEy8Tnso.js";import"./session-CHdTc1We.js";import"./InfoOutlined-DkG0jjos.js";import"./CheckCircle-Ds4QI0ey.js";import"./index-BIPRCLBG.js";import"./Phone-DcHUzCa-.js";import"./Location-DUEOr9J2.js";import"./Email-DWueGk7t.js";import"./Timezone-B-Ho_Uno.js";import"./util-CEAObyfj.js";import"./base32-_zEVBJUg.js";function Ve(){let o=new Map;function c({root:p,rootMargin:u,threshold:f}){let x=o.get(p);x||(x=new Map,o.set(p,x));let b=JSON.stringify({rootMargin:u,threshold:f}),l=x.get(b);if(!l){let r=new Map;l={observer:new IntersectionObserver(d=>{d.forEach(h=>{var a;(a=r.get(h.target))==null||a(h)})},{root:p,rootMargin:u,threshold:f}),entryCallbacks:r},x.set(b,l)}return{observe:(r,d)=>{l.entryCallbacks.set(r,d),l.observer.observe(r)},unobserve:r=>{l.entryCallbacks.delete(r),l.observer.unobserve(r)}}}return{getObserver:c}}var Ge="0px",Qe=[0],Je=Ve();function Xe(o){let c=(o==null?void 0:o.rootMargin)??Ge,p=(o==null?void 0:o.threshold)??Qe,u=s.useRef(null),f=s.useRef(null),x=s.useRef(null),[b,l]=s.useState(),r=s.useCallback(()=>{let w=u.current;if(!w){l(void 0);return}let j=Je.getObserver({root:f.current,rootMargin:c,threshold:p});j.observe(w,I=>{l(I)}),x.current=j},[c,p]),d=s.useCallback(()=>{let w=x.current,j=u.current;j&&(w==null||w.unobserve(j)),x.current=null},[]),h=s.useCallback(w=>{d(),u.current=w,r()},[r,d]),a=s.useCallback(w=>{d(),f.current=w,r()},[r,d]);return[h,{entry:b,rootRef:a}]}var Ze=Xe;function et(o){var b;let[c,p]=Ze(o),u=!!((b=p.entry)!=null&&b.isIntersecting),[f,x]=s.useState(u);return u&&!f&&x(!0),[c,{...p,isVisible:u,wasEverVisible:f}]}var tt=et,nt=100;function ot({loading:o,hasNextPage:c,onLoadMore:p,rootMargin:u,disabled:f,delayInMs:x=nt}){let b=s.useRef(p),[l,{rootRef:r,isVisible:d}]=tt({rootMargin:u});s.useEffect(()=>{b.current=p},[p]);let h=!f&&!o&&d&&c;return s.useEffect(()=>{if(h){let a=setTimeout(()=>{b.current()},x);return()=>{clearTimeout(a)}}},[h,x]),[l,{rootRef:r}]}var rt=ot;const X={info:"#3B82F6",success:"#10B981",warning:"#F59E0B",error:"#EF4444"};L.propTypes={severity:g.oneOf(["info","success","warning","error",""]).isRequired,size:g.number};L.defaultProps={size:8};function L({severity:o,size:c}){return X[o]?t.jsx(v,{component:"span",sx:{display:"inline-block",width:c,height:c,borderRadius:"50%",backgroundColor:X[o]||X.info}}):null}be.propTypes={theme:g.string,type:g.oneOf(["button","line","select"]),onSelectType:g.func,extra:g.node,loading:g.bool,currentTab:g.oneOf(["info","success","warning","error",""])};function be({theme:o="dark",type:c="button",onSelectType:p,extra:u=void 0,currentTab:f="",loading:x=!1,...b}){const{t:l}=s.useContext(Z),r=[{label:l("notification.allSeverity"),value:""},{label:l("notification.severityType.info"),value:"info"},{label:l("notification.severityType.success"),value:"success"},{label:l("notification.severityType.warning"),value:"warning"},{label:l("notification.severityType.error"),value:"error"}],d=i=>{(i!==f||!x)&&p(i)},h=s.useMemo(()=>{const i={width:"100%",bgcolor:o==="dark"?"#F9FAFB":"",overflowY:"auto",paddingTop:c==="select"?"0":"5px",whiteSpace:"nowrap",borderRadius:0,display:"flex",justifyContent:"space-between",alignItems:"flex-end",flexWrap:"wrap",gap:"8px"};return c==="line"?Object.assign(i,{}):i},[c,o]),a=(i,y,C)=>t.jsx(W,{disabled:x,onClick:()=>d(i.value),className:`profile-button ${y?"active":""}`,...b,children:i.label},i.value||C),w=(i,y,C)=>t.jsx(W,{variant:"text",disabled:x,onClick:()=>d(i.value),className:`profile-line-button ${y?"active":""}`,...b,children:i.label},i.value||C),j=()=>r==null?void 0:r.map((i,y)=>{const C=f===(i==null?void 0:i.value);return c==="line"?t.jsx(s.Fragment,{children:w(i,C,y)},i.value||y):t.jsx(s.Fragment,{children:a(i,C,y)},i.value||y)}),I=i=>{const{value:y}=i.target;d(y==="all"?"":y)};return c==="select"?t.jsx(Ce,{sx:{maxWidth:300},children:t.jsx(we,{value:f||"all",onChange:I,size:"small",label:"Severity",IconComponent:i=>t.jsx(Ee,{...i,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((i,y)=>t.jsx(je,{value:i.value||"all",children:t.jsxs(v,{display:"flex",alignItems:"center",gap:1,children:[t.jsx(L,{severity:i.value}),i.label]})},i.value||y))})}):t.jsxs(v,{className:"severity-tabs",sx:h,children:[t.jsx(v,{sx:{...c==="line"?{flex:1,borderBottom:"1px solid rgba(209, 213, 219, 1)"}:{display:"flex",gap:"24px"}},children:j()}),u]})}ve.propTypes={paging:g.objectOf(g.any).isRequired,loading:g.bool.isRequired,onChange:g.func.isRequired};function ve({loading:o,paging:c,onChange:p}){const{t:u}=s.useContext(Z),f=he(r=>r.breakpoints.down("md"));if(c.pageCount<=0||f)return null;const x=(r,d)=>{p({page:d+1})},b=r=>{const d=Number(r.target.value);p({page:1,pageSize:d})},l=c.page-1<=0?0:c.page-1;return t.jsx(v,{mt:2,display:"flex",justifyContent:"flex-end",children:t.jsx(ke,{disabled:o,count:c.total,page:l,rowsPerPageOptions:[10,20,50,100],labelRowsPerPage:u("pagination.rowsPerPage"),labelDisplayedRows:({from:r,to:d,count:h})=>`${r}–${d} / ${h!==-1?h:`${u()}more than ${d}`}`,rowsPerPage:c.pageSize,onPageChange:x,onRowsPerPageChange:b})})}const at=s.memo(ve),it={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"/>'},st={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m18 11l-6-6"/>'},pe=6,fe={"& .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}},lt={border:"1px solid",borderColor:"divider",borderRadius:1,overflow:"hidden",backgroundColor:"background.paper",backgroundImage:"none",transition:"all 0.2s ease-in-out"},ge=()=>({...lt,width:"calc(50% - 8px)"});ee.propTypes={loading:g.bool,type:g.oneOf(["server","service"]),onFilterChange:g.func,blockletMap:g.object,filterType:g.oneOf(["component","entity"]),selectedId:g.array,severity:g.array,enableMarkAllAsRead:g.bool,unReadCount:g.number,onReadFilterChange:g.func,currentReadFilter:g.string};ee.defaultProps={loading:!1,onFilterChange:()=>{},type:"service",blockletMap:{},filterType:"component",selectedId:[],severity:[],enableMarkAllAsRead:!0,unReadCount:0,onReadFilterChange:()=>{},currentReadFilter:"all"};function ee({onFilterChange:o,loading:c,type:p,blockletMap:u,filterType:f="component",selectedId:x=[],severity:b=[],enableMarkAllAsRead:l=!0,unReadCount:r=0,onReadFilterChange:d,currentReadFilter:h="all"}){const{t:a}=s.useContext(Z),[w,j]=s.useState(null),I=!!w,[i,y]=s.useState(x),[C,T]=s.useState(b),[S,z]=s.useState(!1),[P,D]=s.useState(""),[E,B]=s.useState([]);s.useEffect(()=>{y(x),T(b)},[x,b]);const N=[{label:a("notification.filterType.all"),value:"all"},{label:a("notification.filterType.unread"),value:"unread"}],H=e=>{(e!==h||!c)&&d(e)},$=[{label:a("notification.severityType.info"),value:"info"},{label:a("notification.severityType.success"),value:"success"},{label:a("notification.severityType.warning"),value:"warning"},{label:a("notification.severityType.error"),value:"error"}],U=e=>{j(e.currentTarget),D(""),z(!1)},K=()=>{j(null)},_=e=>{const n=i.includes(e)?i.filter(m=>m!==e):[...i,e];y(n),o({id:n,severity:C})},q=e=>{const n=C.includes(e)?C.filter(m=>m!==e):[...C,e];T(n),o({severity:n,id:i})},V=e=>{D(e.target.value)},G=()=>{z(!S)},F=Ne.useMemo(()=>{if(!u.size)return[];const e=[];return f==="component"&&e.push({label:a("notification.system"),id:"system"}),Array.from(u).forEach(([,n])=>{var A,k;const m=n.did||((A=n.meta)==null?void 0:A.did),M=n.title||((k=n.meta)==null?void 0:k.title)||"",R=n.appPid||n.appDid;(f==="component"&&R!==m||f==="entity"&&R===m)&&e.push({label:M,id:m,blocklet:n,ancestors:n.ancestors})}),e},[u,f,a]);s.useEffect(()=>{if(P.trim()==="")B(F);else{const e=P.toLowerCase(),n=F.filter(m=>m.label.toLowerCase().includes(e));B(n)}},[P,F]);const Q=P.trim()!==""||S?E:E.slice(0,pe);return t.jsxs(v,{children:[t.jsxs(v,{sx:{display:"flex",justifyContent:l?"space-between":"flex-end",alignItems:"flex-start",flexWrap:"wrap",gap:1},children:[l&&t.jsx(v,{display:"flex",gap:1.5,children:N.map(e=>t.jsxs(W,{disabled:c,onClick:()=>H(e.value),className:`profile-button ${h===e.value?"active":""}`,sx:{...p==="service"&&h===e.value?{color:"secondary.main"}:{},color:"red",fontWeight:h===e.value?"bold":"normal"},children:[e.label,e.value==="unread"&&r>0&&` (${r})`]},e.value))}),t.jsxs(v,{display:"flex",justifyContent:"flex-end",gap:2,children:[t.jsx(Me,{size:"small",onClick:U,disabled:c,sx:{minWidth:"auto",borderRadius:1,border:"1px solid",borderColor:"divider","&:hover":{backgroundColor:"action.hover"}},children:t.jsx(ce,{icon:it,hFlip:!0})}),t.jsx(Se,{open:I,anchorEl:w,onClose:K,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{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:t.jsxs(v,{children:[t.jsxs(v,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,height:"28px",children:[t.jsx(J,{variant:"subtitle1",fontWeight:"bold",children:a("notification.severity")}),t.jsx(v,{minWidth:"60px",display:"flex",justifyContent:"flex-end",children:(i.length>0||C.length>0)&&t.jsx(W,{size:"small",onClick:()=>{y([]),T([]),o({severity:[],id:[]})},startIcon:t.jsx(Le,{fontSize:"small"}),sx:{color:"text.secondary",textTransform:"none",minWidth:"auto","&:hover":{backgroundColor:"transparent"},"& .MuiButton-startIcon":{marginRight:"2px"}},children:a("notification.clear")})})]}),t.jsx(v,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:t.jsx(ne,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2,flex:1},children:$.map(e=>t.jsx(oe,{elevation:0,sx:ge(C.includes(e.value)),children:t.jsx(re,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{display:"flex",alignItems:"center",gap:1,fontSize:"0.875rem"},...fe},control:t.jsx(ae,{checked:C.includes(e.value),onChange:()=>q(e.value),disabled:c,size:"small"}),label:t.jsxs(v,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,children:[t.jsx(L,{severity:e.value}),e.label]})})},e.value))})}),t.jsxs(v,{mb:2,children:[t.jsxs(v,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,mb:1.5,children:[t.jsx(J,{variant:"subtitle1",fontWeight:"bold",width:"calc(100% - 36px)",children:a("notification.from")}),t.jsx(v,{display:"flex",alignItems:"center",width:"calc(100% - 36px)",children:t.jsx(Pe,{size:"small",placeholder:"search",value:P,onChange:V,sx:{width:"100%","& .MuiOutlinedInput-input":{padding:"6px 4px 6px 0"},".MuiOutlinedInput-root":{"&:hover":{fieldset:{borderColor:"divider"}},"&.Mui-focused":{fieldset:{borderColor:"divider"}}},fieldset:{borderColor:"divider"}},InputProps:{size:"small",startAdornment:t.jsx(Ie,{position:"start",sx:{marginRight:"2px"},children:t.jsx(ce,{icon:st})})}})})]}),t.jsx(ne,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2},children:Q.map(e=>t.jsx(oe,{elevation:0,sx:ge(i.includes(e.id)),children:t.jsx(re,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{fontSize:"0.875rem",width:"calc(100% - 36px)"},...fe},control:t.jsx(ae,{checked:i.includes(e.id),onChange:()=>_(e.id),disabled:c,size:"small"}),label:t.jsxs(v,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,sx:{minWidth:0,width:"100%"},children:[e.blocklet&&t.jsx(ue,{size:20,blocklet:e.blocklet,ancestors:e.ancestors,style:{borderRadius:4,flexShrink:0}}),t.jsx(J,{noWrap:!0,variant:"body2",component:"span",title:e.label,flex:1,sx:{overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},children:e.label})]})})},e.id))}),E.length>pe&&P.trim()===""&&t.jsx(W,{fullWidth:!0,size:"small",onClick:G,sx:{mt:1},endIcon:S?t.jsx(Ye,{}):t.jsx(Be,{})})]})]})})]})]}),i.length>0||C.length>0?t.jsxs(v,{className:"notification-filter-content",sx:{display:"flex",flexWrap:"wrap",gap:1,mt:2},children:[C.map(e=>{const n=$.find(m=>m.value===e);return t.jsx(ie,{label:t.jsxs(v,{display:"flex",alignItems:"center",gap:.5,children:[t.jsx(L,{severity:e}),n?n.label:e]}),onDelete:()=>q(e),size:"small",variant:"outlined",sx:{borderRadius:2,color:"text.secondary",borderColor:"divider","& .MuiChip-label":{display:"flex",alignItems:"center"}}},`severity-${e}`)}),i.map(e=>{const n=F.find(m=>m.id===e);return t.jsx(ie,{label:t.jsxs(v,{display:"flex",alignItems:"center",gap:.5,children:[(n==null?void 0:n.blocklet)&&t.jsx(ue,{size:16,blocklet:n.blocklet,ancestors:n.ancestors,style:{borderRadius:4,flexShrink:0}}),n?n.label:e]}),variant:"outlined",onDelete:()=>_(e),size:"small",sx:{borderRadius:2,color:"text.secondary",borderColor:"divider","& .MuiChip-label":{display:"flex",alignItems:"center"}}},`component-${e}`)})]}):null]})}const ct=xe(Te)`
1
+ import{H as g,j as t,bp as Ce,bo as we,q as je,aa as v,y as W,v as he,bQ as ke,I as Me,b4 as Se,T as J,bR as ne,w as oe,bt as re,bS as ae,O as Pe,N as Ie,E as ie,ah as xe,bT as Te,bU as Re,m as se,ab as le}from"./vendor-mui-core-D_bnq77o.js";import{A as Ee,j as Be,k as Fe,H as Oe,U as ze}from"./vendor-arcblock-uz9DVywv.js";import{r as s,b as Ne,h as $e,l as Ae}from"./vendor-react-DEoibe3W.js";import{f as O,l as We}from"./vendor-hooks-rDgu5KV9.js";import{b2 as Z,I as ce,d as Le,u as De,j as He}from"./vendor-ux-did-connect-DHrruicZ.js";import{t as me,D as Ue,A as _e}from"./vendor-utils-rHXShPKm.js";import{N as qe,c as de}from"./list-BiJWMg_P.js";import{d as Ye}from"./ExpandLess-CkoEHpgk.js";import{B as ue}from"./bundle-avatar-CDJRatFg.js";import{U as Ke}from"./index-CIkPfxzG.js";import"./lottie-web-jYmAQWuC.js";import"./index-BYCeMwoO.js";import"./use-blocklet-logo-Phq7jasP.js";import"./session-CHdTc1We.js";import"./InfoOutlined-DkG0jjos.js";import"./CheckCircle-Ds4QI0ey.js";import"./index-BIPRCLBG.js";import"./Phone-DcHUzCa-.js";import"./Location-DUEOr9J2.js";import"./Email-DWueGk7t.js";import"./Timezone-B-Ho_Uno.js";import"./util-CEAObyfj.js";import"./base32-_zEVBJUg.js";function Ve(){let o=new Map;function c({root:p,rootMargin:u,threshold:f}){let x=o.get(p);x||(x=new Map,o.set(p,x));let b=JSON.stringify({rootMargin:u,threshold:f}),l=x.get(b);if(!l){let r=new Map;l={observer:new IntersectionObserver(d=>{d.forEach(h=>{var a;(a=r.get(h.target))==null||a(h)})},{root:p,rootMargin:u,threshold:f}),entryCallbacks:r},x.set(b,l)}return{observe:(r,d)=>{l.entryCallbacks.set(r,d),l.observer.observe(r)},unobserve:r=>{l.entryCallbacks.delete(r),l.observer.unobserve(r)}}}return{getObserver:c}}var Ge="0px",Qe=[0],Je=Ve();function Xe(o){let c=(o==null?void 0:o.rootMargin)??Ge,p=(o==null?void 0:o.threshold)??Qe,u=s.useRef(null),f=s.useRef(null),x=s.useRef(null),[b,l]=s.useState(),r=s.useCallback(()=>{let w=u.current;if(!w){l(void 0);return}let j=Je.getObserver({root:f.current,rootMargin:c,threshold:p});j.observe(w,I=>{l(I)}),x.current=j},[c,p]),d=s.useCallback(()=>{let w=x.current,j=u.current;j&&(w==null||w.unobserve(j)),x.current=null},[]),h=s.useCallback(w=>{d(),u.current=w,r()},[r,d]),a=s.useCallback(w=>{d(),f.current=w,r()},[r,d]);return[h,{entry:b,rootRef:a}]}var Ze=Xe;function et(o){var b;let[c,p]=Ze(o),u=!!((b=p.entry)!=null&&b.isIntersecting),[f,x]=s.useState(u);return u&&!f&&x(!0),[c,{...p,isVisible:u,wasEverVisible:f}]}var tt=et,nt=100;function ot({loading:o,hasNextPage:c,onLoadMore:p,rootMargin:u,disabled:f,delayInMs:x=nt}){let b=s.useRef(p),[l,{rootRef:r,isVisible:d}]=tt({rootMargin:u});s.useEffect(()=>{b.current=p},[p]);let h=!f&&!o&&d&&c;return s.useEffect(()=>{if(h){let a=setTimeout(()=>{b.current()},x);return()=>{clearTimeout(a)}}},[h,x]),[l,{rootRef:r}]}var rt=ot;const X={info:"#3B82F6",success:"#10B981",warning:"#F59E0B",error:"#EF4444"};L.propTypes={severity:g.oneOf(["info","success","warning","error",""]).isRequired,size:g.number};L.defaultProps={size:8};function L({severity:o,size:c}){return X[o]?t.jsx(v,{component:"span",sx:{display:"inline-block",width:c,height:c,borderRadius:"50%",backgroundColor:X[o]||X.info}}):null}be.propTypes={theme:g.string,type:g.oneOf(["button","line","select"]),onSelectType:g.func,extra:g.node,loading:g.bool,currentTab:g.oneOf(["info","success","warning","error",""])};function be({theme:o="dark",type:c="button",onSelectType:p,extra:u=void 0,currentTab:f="",loading:x=!1,...b}){const{t:l}=s.useContext(Z),r=[{label:l("notification.allSeverity"),value:""},{label:l("notification.severityType.info"),value:"info"},{label:l("notification.severityType.success"),value:"success"},{label:l("notification.severityType.warning"),value:"warning"},{label:l("notification.severityType.error"),value:"error"}],d=i=>{(i!==f||!x)&&p(i)},h=s.useMemo(()=>{const i={width:"100%",bgcolor:o==="dark"?"#F9FAFB":"",overflowY:"auto",paddingTop:c==="select"?"0":"5px",whiteSpace:"nowrap",borderRadius:0,display:"flex",justifyContent:"space-between",alignItems:"flex-end",flexWrap:"wrap",gap:"8px"};return c==="line"?Object.assign(i,{}):i},[c,o]),a=(i,y,C)=>t.jsx(W,{disabled:x,onClick:()=>d(i.value),className:`profile-button ${y?"active":""}`,...b,children:i.label},i.value||C),w=(i,y,C)=>t.jsx(W,{variant:"text",disabled:x,onClick:()=>d(i.value),className:`profile-line-button ${y?"active":""}`,...b,children:i.label},i.value||C),j=()=>r==null?void 0:r.map((i,y)=>{const C=f===(i==null?void 0:i.value);return c==="line"?t.jsx(s.Fragment,{children:w(i,C,y)},i.value||y):t.jsx(s.Fragment,{children:a(i,C,y)},i.value||y)}),I=i=>{const{value:y}=i.target;d(y==="all"?"":y)};return c==="select"?t.jsx(Ce,{sx:{maxWidth:300},children:t.jsx(we,{value:f||"all",onChange:I,size:"small",label:"Severity",IconComponent:i=>t.jsx(Ee,{...i,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((i,y)=>t.jsx(je,{value:i.value||"all",children:t.jsxs(v,{display:"flex",alignItems:"center",gap:1,children:[t.jsx(L,{severity:i.value}),i.label]})},i.value||y))})}):t.jsxs(v,{className:"severity-tabs",sx:h,children:[t.jsx(v,{sx:{...c==="line"?{flex:1,borderBottom:"1px solid rgba(209, 213, 219, 1)"}:{display:"flex",gap:"24px"}},children:j()}),u]})}ve.propTypes={paging:g.objectOf(g.any).isRequired,loading:g.bool.isRequired,onChange:g.func.isRequired};function ve({loading:o,paging:c,onChange:p}){const{t:u}=s.useContext(Z),f=he(r=>r.breakpoints.down("md"));if(c.pageCount<=0||f)return null;const x=(r,d)=>{p({page:d+1})},b=r=>{const d=Number(r.target.value);p({page:1,pageSize:d})},l=c.page-1<=0?0:c.page-1;return t.jsx(v,{mt:2,display:"flex",justifyContent:"flex-end",children:t.jsx(ke,{disabled:o,count:c.total,page:l,rowsPerPageOptions:[10,20,50,100],labelRowsPerPage:u("pagination.rowsPerPage"),labelDisplayedRows:({from:r,to:d,count:h})=>`${r}–${d} / ${h!==-1?h:`${u()}more than ${d}`}`,rowsPerPage:c.pageSize,onPageChange:x,onRowsPerPageChange:b})})}const at=s.memo(ve),it={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"/>'},st={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m18 11l-6-6"/>'},pe=6,fe={"& .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}},lt={border:"1px solid",borderColor:"divider",borderRadius:1,overflow:"hidden",backgroundColor:"background.paper",backgroundImage:"none",transition:"all 0.2s ease-in-out"},ge=()=>({...lt,width:"calc(50% - 8px)"});ee.propTypes={loading:g.bool,type:g.oneOf(["server","service"]),onFilterChange:g.func,blockletMap:g.object,filterType:g.oneOf(["component","entity"]),selectedId:g.array,severity:g.array,enableMarkAllAsRead:g.bool,unReadCount:g.number,onReadFilterChange:g.func,currentReadFilter:g.string};ee.defaultProps={loading:!1,onFilterChange:()=>{},type:"service",blockletMap:{},filterType:"component",selectedId:[],severity:[],enableMarkAllAsRead:!0,unReadCount:0,onReadFilterChange:()=>{},currentReadFilter:"all"};function ee({onFilterChange:o,loading:c,type:p,blockletMap:u,filterType:f="component",selectedId:x=[],severity:b=[],enableMarkAllAsRead:l=!0,unReadCount:r=0,onReadFilterChange:d,currentReadFilter:h="all"}){const{t:a}=s.useContext(Z),[w,j]=s.useState(null),I=!!w,[i,y]=s.useState(x),[C,T]=s.useState(b),[S,z]=s.useState(!1),[P,D]=s.useState(""),[E,B]=s.useState([]);s.useEffect(()=>{y(x),T(b)},[x,b]);const N=[{label:a("notification.filterType.all"),value:"all"},{label:a("notification.filterType.unread"),value:"unread"}],H=e=>{(e!==h||!c)&&d(e)},$=[{label:a("notification.severityType.info"),value:"info"},{label:a("notification.severityType.success"),value:"success"},{label:a("notification.severityType.warning"),value:"warning"},{label:a("notification.severityType.error"),value:"error"}],U=e=>{j(e.currentTarget),D(""),z(!1)},K=()=>{j(null)},_=e=>{const n=i.includes(e)?i.filter(m=>m!==e):[...i,e];y(n),o({id:n,severity:C})},q=e=>{const n=C.includes(e)?C.filter(m=>m!==e):[...C,e];T(n),o({severity:n,id:i})},V=e=>{D(e.target.value)},G=()=>{z(!S)},F=Ne.useMemo(()=>{if(!u.size)return[];const e=[];return f==="component"&&e.push({label:a("notification.system"),id:"system"}),Array.from(u).forEach(([,n])=>{var A,k;const m=n.did||((A=n.meta)==null?void 0:A.did),M=n.title||((k=n.meta)==null?void 0:k.title)||"",R=n.appPid||n.appDid;(f==="component"&&R!==m||f==="entity"&&R===m)&&e.push({label:M,id:m,blocklet:n,ancestors:n.ancestors})}),e},[u,f,a]);s.useEffect(()=>{if(P.trim()==="")B(F);else{const e=P.toLowerCase(),n=F.filter(m=>m.label.toLowerCase().includes(e));B(n)}},[P,F]);const Q=P.trim()!==""||S?E:E.slice(0,pe);return t.jsxs(v,{children:[t.jsxs(v,{sx:{display:"flex",justifyContent:l?"space-between":"flex-end",alignItems:"flex-start",flexWrap:"wrap",gap:1},children:[l&&t.jsx(v,{display:"flex",gap:1.5,children:N.map(e=>t.jsxs(W,{disabled:c,onClick:()=>H(e.value),className:`profile-button ${h===e.value?"active":""}`,sx:{...p==="service"&&h===e.value?{color:"secondary.main"}:{},color:"red",fontWeight:h===e.value?"bold":"normal"},children:[e.label,e.value==="unread"&&r>0&&` (${r})`]},e.value))}),t.jsxs(v,{display:"flex",justifyContent:"flex-end",gap:2,children:[t.jsx(Me,{size:"small",onClick:U,disabled:c,sx:{minWidth:"auto",borderRadius:1,border:"1px solid",borderColor:"divider","&:hover":{backgroundColor:"action.hover"}},children:t.jsx(ce,{icon:it,hFlip:!0})}),t.jsx(Se,{open:I,anchorEl:w,onClose:K,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{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:t.jsxs(v,{children:[t.jsxs(v,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,height:"28px",children:[t.jsx(J,{variant:"subtitle1",fontWeight:"bold",children:a("notification.severity")}),t.jsx(v,{minWidth:"60px",display:"flex",justifyContent:"flex-end",children:(i.length>0||C.length>0)&&t.jsx(W,{size:"small",onClick:()=>{y([]),T([]),o({severity:[],id:[]})},startIcon:t.jsx(Le,{fontSize:"small"}),sx:{color:"text.secondary",textTransform:"none",minWidth:"auto","&:hover":{backgroundColor:"transparent"},"& .MuiButton-startIcon":{marginRight:"2px"}},children:a("notification.clear")})})]}),t.jsx(v,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:t.jsx(ne,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2,flex:1},children:$.map(e=>t.jsx(oe,{elevation:0,sx:ge(C.includes(e.value)),children:t.jsx(re,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{display:"flex",alignItems:"center",gap:1,fontSize:"0.875rem"},...fe},control:t.jsx(ae,{checked:C.includes(e.value),onChange:()=>q(e.value),disabled:c,size:"small"}),label:t.jsxs(v,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,children:[t.jsx(L,{severity:e.value}),e.label]})})},e.value))})}),t.jsxs(v,{mb:2,children:[t.jsxs(v,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,mb:1.5,children:[t.jsx(J,{variant:"subtitle1",fontWeight:"bold",width:"calc(100% - 36px)",children:a("notification.from")}),t.jsx(v,{display:"flex",alignItems:"center",width:"calc(100% - 36px)",children:t.jsx(Pe,{size:"small",placeholder:"search",value:P,onChange:V,sx:{width:"100%","& .MuiOutlinedInput-input":{padding:"6px 4px 6px 0"},".MuiOutlinedInput-root":{"&:hover":{fieldset:{borderColor:"divider"}},"&.Mui-focused":{fieldset:{borderColor:"divider"}}},fieldset:{borderColor:"divider"}},InputProps:{size:"small",startAdornment:t.jsx(Ie,{position:"start",sx:{marginRight:"2px"},children:t.jsx(ce,{icon:st})})}})})]}),t.jsx(ne,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2},children:Q.map(e=>t.jsx(oe,{elevation:0,sx:ge(i.includes(e.id)),children:t.jsx(re,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{fontSize:"0.875rem",width:"calc(100% - 36px)"},...fe},control:t.jsx(ae,{checked:i.includes(e.id),onChange:()=>_(e.id),disabled:c,size:"small"}),label:t.jsxs(v,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,sx:{minWidth:0,width:"100%"},children:[e.blocklet&&t.jsx(ue,{size:20,blocklet:e.blocklet,ancestors:e.ancestors,style:{borderRadius:4,flexShrink:0}}),t.jsx(J,{noWrap:!0,variant:"body2",component:"span",title:e.label,flex:1,sx:{overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},children:e.label})]})})},e.id))}),E.length>pe&&P.trim()===""&&t.jsx(W,{fullWidth:!0,size:"small",onClick:G,sx:{mt:1},endIcon:S?t.jsx(Ye,{}):t.jsx(Be,{})})]})]})})]})]}),i.length>0||C.length>0?t.jsxs(v,{className:"notification-filter-content",sx:{display:"flex",flexWrap:"wrap",gap:1,mt:2},children:[C.map(e=>{const n=$.find(m=>m.value===e);return t.jsx(ie,{label:t.jsxs(v,{display:"flex",alignItems:"center",gap:.5,children:[t.jsx(L,{severity:e}),n?n.label:e]}),onDelete:()=>q(e),size:"small",variant:"outlined",sx:{borderRadius:2,color:"text.secondary",borderColor:"divider","& .MuiChip-label":{display:"flex",alignItems:"center"}}},`severity-${e}`)}),i.map(e=>{const n=F.find(m=>m.id===e);return t.jsx(ie,{label:t.jsxs(v,{display:"flex",alignItems:"center",gap:.5,children:[(n==null?void 0:n.blocklet)&&t.jsx(ue,{size:16,blocklet:n.blocklet,ancestors:n.ancestors,style:{borderRadius:4,flexShrink:0}}),n?n.label:e]}),variant:"outlined",onDelete:()=>_(e),size:"small",sx:{borderRadius:2,color:"text.secondary",borderColor:"divider","& .MuiChip-label":{display:"flex",alignItems:"center"}}},`component-${e}`)})]}):null]})}const ct=xe(Te)`
2
2
  position: fixed;
3
3
  bottom: 20px;
4
4
  right: 20px;