@abtnode/webapp 1.16.53-beta-20251009-113612-7a16b6a0 → 1.16.53-beta-20251011-054719-4ed2f6b7

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 (191) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-DovOOpck.js → AdapterDayjs-DQepVz3x.js} +1 -1
  4. package/dist/assets/{Add-DyTieGiH.js → Add-CQt7mq1G.js} +1 -1
  5. package/dist/assets/ArrowDropDown-aNeHE2A2.js +1 -0
  6. package/dist/assets/{Autocomplete-DeRVpEU5.js → Autocomplete-Bf1Ho3Hd.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-BnYzoMmu.js → Breadcrumbs-CPilcW9u.js} +1 -1
  8. package/dist/assets/{ButtonGroup-CzZQ8Npu.js → ButtonGroup-9zvLC_k0.js} +1 -1
  9. package/dist/assets/{CSSTransition-CjXLkGon.js → CSSTransition-dwX1-RMJ.js} +1 -1
  10. package/dist/assets/{CallMerge-DmrftrOd.js → CallMerge-BYCLcH5E.js} +1 -1
  11. package/dist/assets/{CardContent-CpM-_HeI.js → CardContent-C22npYBc.js} +1 -1
  12. package/dist/assets/{ChevronLeft-CcsCSRKu.js → ChevronLeft-Bmmo6bzu.js} +1 -1
  13. package/dist/assets/{ChevronRight-o-pKt_xW.js → ChevronRight-X_FMXVA4.js} +1 -1
  14. package/dist/assets/{Clear-DbuaJOFI.js → Clear-B-e33dNn.js} +1 -1
  15. package/dist/assets/{DeleteOutline-D-kT-jdx.js → DeleteOutline-CIuy8JMu.js} +1 -1
  16. package/dist/assets/{Done-C2ulOvk7.js → Done-yHCWLz6K.js} +1 -1
  17. package/dist/assets/{Edit-DWhNMMIZ.js → Edit-CLiO2h_l.js} +1 -1
  18. package/dist/assets/{ErrorOutline-B0ozV6sd.js → ErrorOutline-B_qBOUnI.js} +1 -1
  19. package/dist/assets/{FilterList-CQA7G7Vn.js → FilterList-BOMn8eqm.js} +1 -1
  20. package/dist/assets/{Google-CdFzL70-.js → Google-KOeLJ7n-.js} +1 -1
  21. package/dist/assets/{HelpOutline-aMigqk6S.js → HelpOutline-BXdmHwaP.js} +1 -1
  22. package/dist/assets/{KeyboardArrowDown-Ccl83jb_.js → KeyboardArrowDown-CdK82Qsb.js} +1 -1
  23. package/dist/assets/{Launch-DR4ser43.js → Launch-cxvym2iP.js} +1 -1
  24. package/dist/assets/{Link-8FWBk0pv.js → Link-DKb1MvxW.js} +1 -1
  25. package/dist/assets/{ListItemButton-xoowqbX5.js → ListItemButton-E5H4lrRx.js} +1 -1
  26. package/dist/assets/{ListSubheader-Tf0tPSi7.js → ListSubheader-FJVGwx1O.js} +1 -1
  27. package/dist/assets/{LoadingButton-DdsR40-y.js → LoadingButton-C7IcO9Nb.js} +1 -1
  28. package/dist/assets/{MoreVert-CDZKGaWW.js → MoreVert-bx--E19j.js} +1 -1
  29. package/dist/assets/{OpenInNew-5dmOmuOP.js → OpenInNew-BdVhgoOc.js} +1 -1
  30. package/dist/assets/{Refresh-6wYRerOp.js → Refresh-mYLoMEkT.js} +1 -1
  31. package/dist/assets/{Search-CYv1OPLx.js → Search-Dm2dt-Sr.js} +1 -1
  32. package/dist/assets/{Stepper-BdbxyKvR.js → Stepper-B1wBWjZo.js} +1 -1
  33. package/dist/assets/{Switch-CJCk9M4e.js → Switch-CE03jZ_8.js} +1 -1
  34. package/dist/assets/{TableSearch-DEuaLdIb.js → TableSearch-Bj41g7St.js} +1 -1
  35. package/dist/assets/{ToggleButtonGroup-CJvpk2kD.js → ToggleButtonGroup-BEjde42R.js} +1 -1
  36. package/dist/assets/{UnfoldMore-I9efh077.js → UnfoldMore-zrMTJNOp.js} +1 -1
  37. package/dist/assets/{Verified-B6ag8nG6.js → Verified-B-cFyGP0.js} +1 -1
  38. package/dist/assets/{VerifiedUser-ueCIxEYY.js → VerifiedUser-aSWRZr_Y.js} +1 -1
  39. package/dist/assets/{ViewList-STBCUXtD.js → ViewList-BbDrtZvr.js} +1 -1
  40. package/dist/assets/{_createAggregator-Cnz_HrZy.js → _createAggregator-OKIbDBKF.js} +1 -1
  41. package/dist/assets/{actions-0xA8jgJe.js → actions-BBls_wa0.js} +1 -1
  42. package/dist/assets/{actions-i2UahyAp.js → actions-DaOidt88.js} +1 -1
  43. package/dist/assets/{agreement-DoAGWhqk.js → agreement-B9tSzjmL.js} +1 -1
  44. package/dist/assets/api-r-_fEWsI.js +1 -0
  45. package/dist/assets/{appearance-BLnd4o8Y.js → appearance-BOeNpo6Y.js} +1 -1
  46. package/dist/assets/{audit-logs-D__bx07h.js → audit-logs-Bdg8Eitt.js} +1 -1
  47. package/dist/assets/{base-chart-Dr8SHE0h.js → base-chart-D7y6qq9u.js} +1 -1
  48. package/dist/assets/{blocklet-Ddfm_VL2.js → blocklet-C67aFvl7.js} +1 -1
  49. package/dist/assets/{chain-CdexttSs.js → chain-se1xvUDC.js} +1 -1
  50. package/dist/assets/{click-to-copy-D6M1fnDc.js → click-to-copy-D50kkiW4.js} +1 -1
  51. package/dist/assets/client-Dj0WAiOq.js +1 -0
  52. package/dist/assets/cloneDeep-Dqj81-8-.js +1 -0
  53. package/dist/assets/{collapse-D2q_m0jc.js → collapse-UPIFGGD9.js} +1 -1
  54. package/dist/assets/{config-navigation-B6vV0qs8.js → config-navigation-CutTRHe-.js} +3 -3
  55. package/dist/assets/{connect-to-Co7U9qsv.js → connect-to-Dz9eH_td.js} +1 -1
  56. package/dist/assets/{cssMode-C5uxwgRY.js → cssMode-73_XXe8t.js} +1 -1
  57. package/dist/assets/{delete-confirm-C1ZQ29Q4.js → delete-confirm-cbt-tN11.js} +1 -1
  58. package/dist/assets/{depsEqual-DQDFZSyD.js → depsEqual-BaUhqVSn.js} +1 -1
  59. package/dist/assets/{detail-a5SJkzSR.js → detail-BR9P1Yx6.js} +3 -3
  60. package/dist/assets/{domains-BRe4M7bx.js → domains-BDMd9S2d.js} +1 -1
  61. package/dist/assets/{download-Cwb05ySd.js → download-Oh1d5P58.js} +1 -1
  62. package/dist/assets/{edit.svg-DCbVw9zw.js → edit.svg-BHG50OdM.js} +1 -1
  63. package/dist/assets/emotion-cache.browser.esm-B4ZmPeHk.js +1 -0
  64. package/dist/assets/engine-BWGbIQAy.js +1 -0
  65. package/dist/assets/{freemarker2-DVpsezSy.js → freemarker2-BQ02ePgw.js} +1 -1
  66. package/dist/assets/{get-safe-url-BjFdr4OL.js → get-safe-url-CteWIr5a.js} +1 -1
  67. package/dist/assets/getValidReactChildren-DDB1J2y7.js +1 -0
  68. package/dist/assets/{graphqlMode-ChKOq_KJ.js → graphqlMode-BTvp4HDh.js} +2 -2
  69. package/dist/assets/{handlebars-BU9OFTYI.js → handlebars-DPMLBiwS.js} +1 -1
  70. package/dist/assets/{html-UexVD9vB.js → html-iuKRS8o1.js} +1 -1
  71. package/dist/assets/{html-title-C4Q1l9hV.js → html-title-vsl-TT26.js} +1 -1
  72. package/dist/assets/{htmlMode-TJopYsor.js → htmlMode-CvGrTtxZ.js} +1 -1
  73. package/dist/assets/{iframe-DMkrJLov.js → iframe-Dl-yNrp9.js} +1 -1
  74. package/dist/assets/{index-CB7PBjDX.js → index-2UXtfcoT.js} +3 -3
  75. package/dist/assets/{index-bK6g80kL.js → index-8DgiLFWe.js} +1 -1
  76. package/dist/assets/{index-Bi1dCbDw.js → index-AKf23glP.js} +1 -1
  77. package/dist/assets/{index-SQHqCeph.js → index-B28OSLEk.js} +1 -1
  78. package/dist/assets/{index-B7EJvfHM.js → index-B2jTgxcq.js} +1 -1
  79. package/dist/assets/{index-DkJyV264.js → index-B5Z2178w.js} +3 -3
  80. package/dist/assets/{index-CwdwMEyK.js → index-BDFC1sP1.js} +1 -1
  81. package/dist/assets/{index-BS0sLGRz.js → index-BGSPRFxN.js} +1 -1
  82. package/dist/assets/{index-CaUe3dMj.js → index-BIIfr0Cp.js} +1 -1
  83. package/dist/assets/{index-DfwECgSx.js → index-BOBzLa1k.js} +1 -1
  84. package/dist/assets/{index-1ecJNhOT.js → index-BP0DWBRY.js} +1 -1
  85. package/dist/assets/{index-Cie1Z-Am.js → index-BYQEC6o1.js} +1 -1
  86. package/dist/assets/index-BkGL3dW2.js +375 -0
  87. package/dist/assets/{index-D_kWYNJi.js → index-BtY4M62T.js} +3 -3
  88. package/dist/assets/{index-CjedGlyf.js → index-BvVI7Mxo.js} +1 -1
  89. package/dist/assets/{index-CFWi7Q8M.js → index-BxxgnmFX.js} +1 -1
  90. package/dist/assets/{index-b3XeYmTe.js → index-BzM5LY8-.js} +1 -1
  91. package/dist/assets/{index-wNvsBj9G.js → index-C-1MOEs6.js} +1 -1
  92. package/dist/assets/{index-CsmIWfmp.js → index-C31TKs2j.js} +1 -1
  93. package/dist/assets/{index-DGSsefUZ.js → index-C7egXf_h.js} +3 -3
  94. package/dist/assets/{index-DtIh1vFa.js → index-CC45e4UO.js} +1 -1
  95. package/dist/assets/{index-Do106lNr.js → index-CFw_f03A.js} +1 -1
  96. package/dist/assets/{index-C7AJ9wZq.js → index-CHmcCDqZ.js} +1 -1
  97. package/dist/assets/{index--oO30Jkn.js → index-CRZ7_NI2.js} +1 -1
  98. package/dist/assets/{index-CnTj486q.js → index-CgJV4oal.js} +1 -1
  99. package/dist/assets/{index-D0uKz0V_.js → index-Cisz7h7X.js} +1 -1
  100. package/dist/assets/{index-BlH5R4ip.js → index-ClSpNPOh.js} +1 -1
  101. package/dist/assets/{index-T209NFxy.js → index-ClxIMfsM.js} +1 -1
  102. package/dist/assets/{index-CIUZoemD.js → index-CpuUG8Z1.js} +1 -1
  103. package/dist/assets/{index-DdqV6Ziy.js → index-Cwp0FKW3.js} +2 -2
  104. package/dist/assets/{index-H-jmtxXo.js → index-D9p6b5Uq.js} +1 -1
  105. package/dist/assets/index-DVAwbdhJ.js +1 -0
  106. package/dist/assets/{index-DAqbo3x1.js → index-DWy1kjL1.js} +1 -1
  107. package/dist/assets/{index-CbZ9HAj8.js → index-D_jr-SDL.js} +1 -1
  108. package/dist/assets/{index-BTulqglm.js → index-DbXGWrH9.js} +9 -9
  109. package/dist/assets/{index-Xej91YkM.js → index-DfEAejxd.js} +1 -1
  110. package/dist/assets/{index-C3SQ4eIT.js → index-DfPrMmoZ.js} +1 -1
  111. package/dist/assets/{index-BYbMJbBQ.js → index-DnNVPfHo.js} +1 -1
  112. package/dist/assets/{index-BRdnv7Wp.js → index-DnZwjPBr.js} +1 -1
  113. package/dist/assets/{index-DWPS9ieq.js → index-DsOZQCxX.js} +2 -2
  114. package/dist/assets/{index-hCRLdd4Q.js → index-Dxww66F8.js} +1 -1
  115. package/dist/assets/{index-SpGv84ec.js → index-GerkFFyW.js} +3 -3
  116. package/dist/assets/{index-Di3fMIen.js → index-W1Jg0zqO.js} +1 -1
  117. package/dist/assets/{index-uisuBluj.js → index-eYZIsLRo.js} +1 -1
  118. package/dist/assets/{index-B4kOKoNV.js → index-oHwXuk_n.js} +1 -1
  119. package/dist/assets/{index-CNPrEh7K.js → index-rrAKD-3O.js} +1 -1
  120. package/dist/assets/{index.esm-Lk0YHlgv.js → index.esm-DkqB0mnE.js} +1 -1
  121. package/dist/assets/{install-from-url-BRio3aeH.js → install-from-url-DOR8ZaEG.js} +1 -1
  122. package/dist/assets/{invitation-CqYyE8ME.js → invitation-BOK3Xmtg.js} +1 -1
  123. package/dist/assets/{is-path-prefix-equal-CC7-GVaa.js → is-path-prefix-equal-Cl2onSKX.js} +1 -1
  124. package/dist/assets/{item-BxAxNpJk.js → item-BQYMoVUI.js} +1 -1
  125. package/dist/assets/{javascript-ChDh5iSe.js → javascript-BaLTUeT9.js} +1 -1
  126. package/dist/assets/{jsonMode-_2nbeNvy.js → jsonMode-P_9C43Nc.js} +1 -1
  127. package/dist/assets/{liquid-B4GHkAyg.js → liquid-amkaEf3E.js} +1 -1
  128. package/dist/assets/{list-header-Cb1uRm5G.js → list-header-DAiEDwhs.js} +1 -1
  129. package/dist/assets/{lock.svg-BH7_YT0q.js → lock.svg-CNAb9wZc.js} +1 -1
  130. package/dist/assets/{log-6_0GK9Sf.js → log-1_m4xF_N.js} +1 -1
  131. package/dist/assets/{lottie-react.esm-DmwbnPOn.js → lottie-react.esm-BmVAhuIy.js} +1 -1
  132. package/dist/assets/{mdx-B_wFriqY.js → mdx-Bd0pfo5p.js} +1 -1
  133. package/dist/assets/{memory-sDoTeyx0.js → memory-UJLIVuot.js} +1 -1
  134. package/dist/assets/{metric-BKabdyQk.js → metric-DNUD7jbr.js} +1 -1
  135. package/dist/assets/omit-DVVVCRDp.js +1 -0
  136. package/dist/assets/{overview-aAlDPd4Q.js → overview-DqrKT2dL.js} +1 -1
  137. package/dist/assets/{permission-crhdqXhd.js → permission-ycsOOBwp.js} +1 -1
  138. package/dist/assets/{preference-BNQQaSX0.js → preference-BhfekBAB.js} +3 -3
  139. package/dist/assets/{python-BtYeLxMR.js → python-B5XVaf0B.js} +1 -1
  140. package/dist/assets/{raf-schd.esm-K0lox3Rf.js → raf-schd.esm-yET3NUrL.js} +1 -1
  141. package/dist/assets/{razor-B4KFVo2j.js → razor-TLp_5QYQ.js} +1 -1
  142. package/dist/assets/{rotate-session-key-DTg7AVbr.js → rotate-session-key-B90qT4kq.js} +1 -1
  143. package/dist/assets/{runtime-De89eo0q.js → runtime-D_DvOf5h.js} +1 -1
  144. package/dist/assets/schema-Db5OWlWL.js +1 -0
  145. package/dist/assets/sdk-BZ4-wJ5p.js +1 -0
  146. package/dist/assets/{service-DLCTpVab.js → service-DjmXGMON.js} +1 -1
  147. package/dist/assets/{shorten-label-B1hTVv56.js → shorten-label-BOfK6p4p.js} +1 -1
  148. package/dist/assets/{simple-select-Cdud---B.js → simple-select-BZu6cCw3.js} +1 -1
  149. package/dist/assets/{spaces-Du4ytYyE.js → spaces-CNd41sir.js} +1 -1
  150. package/dist/assets/{status-BM8-Rpzz.js → status-C32bwmXC.js} +1 -1
  151. package/dist/assets/{status-DYjJgZF9.js → status-DnBUY_P3.js} +1 -1
  152. package/dist/assets/{switch-control-HQMK5p78.js → switch-control-Ce2o9ffJ.js} +1 -1
  153. package/dist/assets/{table-icons-DPEJ6Pbc.js → table-icons-BYT0kQuz.js} +1 -1
  154. package/dist/assets/{team-ouIwaQum.js → team-CxcPF7A7.js} +1 -1
  155. package/dist/assets/{toLower-3JDTZiHY.js → toLower-DJOalyNw.js} +1 -1
  156. package/dist/assets/toUpper-B5TzdczN.js +1 -0
  157. package/dist/assets/{traffic-DQX3XpFH.js → traffic-C17ygInL.js} +1 -1
  158. package/dist/assets/{tsMode-DdJdi-Cl.js → tsMode-YA-whx9N.js} +1 -1
  159. package/dist/assets/{typescript-BRTY57X5.js → typescript-Balm-M-7.js} +1 -1
  160. package/dist/assets/{url-evaluation-4RA6nhhV.js → url-evaluation-w8X_lgzG.js} +1 -1
  161. package/dist/assets/{url-join-s-abjyAU.js → url-join-3aXvW59g.js} +1 -1
  162. package/dist/assets/{use-mobile-9H63c6Kz.js → use-mobile-BxUSznYk.js} +1 -1
  163. package/dist/assets/{use-mobile-CNA5itNx.js → use-mobile-IHqsUzt1.js} +1 -1
  164. package/dist/assets/{useAsync-B0Ca_r2m.js → useAsync-Bkh8Rg6Z.js} +1 -1
  165. package/dist/assets/{useAsyncRetry-CtsBX_BZ.js → useAsyncRetry-CwoOKXPC.js} +1 -1
  166. package/dist/assets/{useLocalStorage-T0_FQRxp.js → useLocalStorage-DZYDHTFQ.js} +1 -1
  167. package/dist/assets/{useThemeProps-EahRu2x5.js → useThemeProps-Bs1lG48z.js} +1 -1
  168. package/dist/assets/{util-CUni4mda.js → util-CC0K7Xya.js} +1 -1
  169. package/dist/assets/{wait-container-xOI954wH.js → wait-container-DeaT7Cuc.js} +1 -1
  170. package/dist/assets/{without-wallet-DOZiTpC3.js → without-wallet-B5UEEmrQ.js} +1 -1
  171. package/dist/assets/{wrap-locale-Des5gfRA.js → wrap-locale-gBhiwBoM.js} +1 -1
  172. package/dist/assets/{xml-B19Uai7I.js → xml-CZ5H3llM.js} +1 -1
  173. package/dist/assets/{yaml-D5iuUIms.js → yaml-CL1tqltg.js} +1 -1
  174. package/dist/assets/{zh-CJ0qBy8e.js → zh-CZLHYA5h.js} +1 -1
  175. package/dist/assets/{zh-tw-Cs-zRk58.js → zh-tw-B-qWW0q8.js} +1 -1
  176. package/dist/index.html +1 -1
  177. package/dist/service-worker.js +1 -1
  178. package/package.json +1 -1
  179. package/dist/assets/ArrowDropDown-BFKf-Ws9.js +0 -1
  180. package/dist/assets/api-BLz72Lsh.js +0 -1
  181. package/dist/assets/client-wk4MeJIg.js +0 -1
  182. package/dist/assets/cloneDeep-C1r6zWUN.js +0 -1
  183. package/dist/assets/emotion-cache.browser.esm-CgS-LeII.js +0 -1
  184. package/dist/assets/engine-DHL9Z21k.js +0 -1
  185. package/dist/assets/getValidReactChildren-BImmvw4C.js +0 -1
  186. package/dist/assets/index-CgWUU7yZ.js +0 -1
  187. package/dist/assets/index-TglI0woB.js +0 -375
  188. package/dist/assets/omit-Cd7qywqq.js +0 -1
  189. package/dist/assets/schema-CjV-LIXx.js +0 -1
  190. package/dist/assets/sdk-DZ3OhIyg.js +0 -1
  191. package/dist/assets/toUpper-Cmpm1h81.js +0 -1
@@ -1,4 +1,4 @@
1
- import{aF as je,j as e,u as Q,r as h,e as Fe,aG as Ur,aH as k,aI as zr,aJ as an,aK as Gn,aL as sn,aM as et,n as z,ac as le,s as ne,aN as ln,o as p,aO as Br,aP as cn,aQ as Mr,H as re,N as dn,T as A,v as q,ay as fe,aR as Pe,C as K,V as be,w as Y,aS as Kn,X as pe,M as W,g as Mt,O as tt,aT as Wr,d as Wt,aU as Ie,aV as me,a9 as qr,aW as Hr,aX as Gr,z as Kr,B as Vn,W as un,p as mn,h as te,aY as qt,a as Et,R as X,b as ct,aZ as Yn,a_ as Xn,U as Qn,a3 as _t,a$ as Vr,b0 as Yr,b1 as Xr,b2 as Qr,b3 as nt,i as fn,b4 as Zr,aE as Ge,b5 as Jr,a8 as jt,a5 as wt,b6 as ei,a6 as Pt,L as Ht,J as ti,b7 as ni,b8 as Zn,a7 as ri,b9 as Jn,ba as De,bb as ke,bc as ii,bd as Gt,be as oi,$ as er,D as At,f as tr,bf as ai,bg as pn,aj as si,bh as li,bi as ee,bj as ci,S as gn,l as hn,m as xn,bk as di,bl as ui,bm as mi}from"./index-DGSsefUZ.js";import{u as fi,T as pi}from"./html-title-C4Q1l9hV.js";import{A as gi}from"./ArrowDropDown-BFKf-Ws9.js";import{u as Kt,C as B,a as yn}from"./index.esm-Lk0YHlgv.js";import{S as ae}from"./switch-control-HQMK5p78.js";import{P as ie}from"./permission-crhdqXhd.js";import{H as nr,g as hi}from"./index-bK6g80kL.js";import{A as rr}from"./Link-8FWBk0pv.js";import{D as ve,R as ir,a as It,b as xi}from"./url-evaluation-4RA6nhhV.js";import{D as dt}from"./delete-confirm-C1ZQ29Q4.js";import{v as rt}from"./index-DAqbo3x1.js";import{s as yi}from"./logo-BKA11TRi.js";import{u as bi}from"./useLocalStorage-T0_FQRxp.js";import{R as vi}from"./Refresh-6wYRerOp.js";import{L as ji}from"./LoadingButton-DdsR40-y.js";import{C as wi,R as Ci,P as or,S as Si}from"./rotate-session-key-DTg7AVbr.js";import{A as Le}from"./Add-DyTieGiH.js";import{B as ar,D as bn,W as Ke}from"./status-BM8-Rpzz.js";import{i as Di}from"./is-path-prefix-equal-CC7-GVaa.js";import{N as ki}from"./ChevronRight-o-pKt_xW.js";import{I as Ri}from"./MoreVert-CDZKGaWW.js";import{E as sr}from"./Edit-DWhNMMIZ.js";import{A as Ti}from"./CallMerge-DmrftrOd.js";import{C as Ei}from"./CardContent-CpM-_HeI.js";import"./Switch-CJCk9M4e.js";import"./FilterList-CQA7G7Vn.js";import"./CSSTransition-CjXLkGon.js";import"./emotion-cache.browser.esm-CgS-LeII.js";import"./index-CNPrEh7K.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-DQDFZSyD.js";import"./index-CFWi7Q8M.js";import"./TableSearch-DEuaLdIb.js";import"./Search-CYv1OPLx.js";import"./Clear-DbuaJOFI.js";import"./click-to-copy-D6M1fnDc.js";import"./visuallyHidden-Dan1xhjv.js";const _i=je(e.jsx("path",{d:"m7 14 5-5 5 5z"})),Pi=je(e.jsx("path",{d:"M12 3 2 21h20zm1 5.92L18.6 19H13zm-2 0V19H5.4z"})),Ai=je(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"})),lr=je(e.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z"})),Ii=je(e.jsx("path",{d:"M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"})),Li=je(e.jsx("path",{d:"M2 20h20v-4H2zm2-3h2v2H4zM2 4v4h20V4zm4 3H4V5h2zm-4 7h20v-4H2zm2-3h2v2H4z"})),Oi=je(e.jsx("path",{d:"m19 15-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9z"})),ye="Dashboard",cr=h.createContext({}),{Provider:Fi,Consumer:as}=cr,vn=[ye,k.DOMAIN_FOR_IP_SITE,k.DOMAIN_FOR_IP_SITE_REGEXP],Ni=(t,r)=>{if(t.name===k.DOMAIN_FOR_DEFAULT_SITE)return-1;if(r.name===k.DOMAIN_FOR_DEFAULT_SITE)return 1;const n=vn.includes(t.name),i=vn.includes(r.name);return n&&i?sn(t.name,r.name):n?-1:i?1:sn(t.name,r.name)},$i=({sites:t,nodePort:r})=>{const n=window.location.hostname,a=(t||[]).map(o=>{const{id:s,rules:u=[],corsAllowedOrigins:m=[]}=o;let{domain:d,domainAliases:c}=o;c=c||[],[k.DOMAIN_FOR_IP_SITE,k.DOMAIN_FOR_IP_SITE_REGEXP].includes(d)&&(d=ye,c.find(y=>y.value===n)||c.unshift({protected:!1,value:n}));const w={id:s,name:d,type:"domain",items:[],domainAliases:c,isProtected:o.isProtected,corsAllowedOrigins:m};return(u||[]).forEach(y=>{const{id:C,isProtected:E,from:{pathPrefix:j},to:D}=y;if(D.type===k.ROUTING_RULE_TYPES.BLOCKLET){let S="";Number.parseInt(D.port,10)===Number.parseInt(r,10)?(S="Blocklet Server Dashboard",D.type=k.ROUTING_RULE_TYPES.DAEMON):S=D.did,w.items.push({id:C,name:an(j||"/"),title:S,type:"rule",isProtected:E,pathPrefix:j,to:D})}else w.items.push({id:C,pathPrefix:j,name:an(j||"/"),title:"Blocklet Server Dashboard",type:"rule",isProtected:E,to:D})}),w.items=Gn(w.items,y=>y.name),w}).sort(Ni),l=a.reduce((o,s)=>{let{name:u}=s;return u.endsWith(k.BLOCKLET_SITE_GROUP_SUFFIX)&&([u]=u.split(".")),o[u]={...s,rules:s.items},o},{});return{sites:a,siteMap:l}},Ui=({did:t,domain:r,mountPoint:n,siteMap:i,params:a}={})=>{if(!i)return null;const l=i[t];if(!l)return null;const o=r||(l.domainAliases||[])[0];if(!o)return null;let s=n;if(!s){const u=l.rules.filter(m=>!m.name.startsWith(k.WELLKNOWN_PATH_PREFIX))[0];s=u?u.name:"/"}return et(o.value,s,a)},zi=({did:t,mountPoint:r,siteMap:n,params:i}={})=>{if(!n)return[];const a=n[t];if(!a)return[];const l=a.domainAliases||[];if(!l.length)return[];let o=r;if(!o){const s=a.rules.filter(u=>!u.name.startsWith(k.WELLKNOWN_PATH_PREFIX))[0];o=s?s.name:"/"}return l.map(s=>et(s.value,o,i))},Bi=t=>{const r=t.map(i=>i.domain).filter(i=>![k.DOMAIN_FOR_IP_SITE_REGEXP,k.DOMAIN_FOR_DEFAULT_SITE].includes(i));let n=[];return t.forEach(i=>n.push(...i.domainAliases||[])),n=n.map(i=>typeof i=="string"?{value:i,isProtected:!1}:i),{domains:r,domainsAliases:n}};function jn({children:t}){const{api:r,info:n}=Q(),[i,a]=h.useState([]),[l,o]=h.useState([]),[s,u]=h.useState([]),m=Fe(async()=>{const{sites:_}=await r.getRoutingSites({input:{snapshotHash:""}}),v=_||[];await Promise.all(v.map(async g=>(g.domainAliases=await Ur(g.domainAliases,{getIP:zr}),g)));const f=Bi(v);a(v),o(f.domains),u([window.location.hostname,...f.domains,...f.domainsAliases.map(g=>g.value)])},[n]),d=(_,v)=>{a(f=>f.map(g=>g.id===_?v.domain?v:{...v,domain:g.domain}:g))},c=_=>r.takeRoutingSnapshot({input:{dryRun:!1,message:encodeURIComponent(_)}}),w=async _=>{const v=await r.addRoutingSite({input:_});a(i.concat(v.site))},y=async(_,v)=>{const f=await r.updateRoutingSite({input:{id:_,...v}});if(f.site&&f.site.id){const g=i.findIndex(R=>R.id===f.site.id);g!==-1&&(i.splice(g,1,f.site),a([].concat(i)))}},C=async _=>{await r.deleteRoutingSite({input:{id:_}}),a(i.filter(v=>v.id!==_))},E=async(_,v,f)=>{const g=await r.addDomainAlias({input:{id:_,domainAlias:v,force:f}});d(_,g.site)},j=async(_,v)=>{const f=await r.deleteDomainAlias({input:{id:_,domainAlias:v}});d(_,f.site)},D=async(_,v)=>{const{site:f}=await r.addRoutingRule({input:{id:_,rule:v}});d(_,f)},S=async(_,v)=>{const{site:f}=await r.updateRoutingRule({input:{id:_,rule:v}});d(_,f)},b=async(_,v)=>{const{site:f}=await r.deleteRoutingRule({input:{id:_,ruleId:v}});d(_,f)},x={loading:m.loading,error:m.error,refresh:m.retry,api:r,actions:{addSite:w,updateSite:y,deleteSite:C,addDomainAlias:E,deleteDomainAlias:j,takeSnapshot:c,addRule:D,updateRule:S,deleteRule:b}},{sites:L,siteMap:O}=$i({sites:i,nodePort:n.port});return x.sites=L,x.siteMap=O,x.domains=l,x.allDomains=s,x.getBlockletUrl=({did:_,domain:v,mountPoint:f,params:g})=>Ui({did:_,domain:v,mountPoint:f,siteMap:x.siteMap,params:g}),x.getBlockletUrls=({did:_,mountPoint:v,params:f})=>zi({did:_,mountPoint:v,siteMap:x.siteMap,params:f}),e.jsx(Fi,{value:{routing:x},children:t})}function de(){const{routing:t}=h.useContext(cr);return t}function Vt(t){const r=[k.DOMAIN_FOR_IP_SITE_REGEXP,k.DOMAIN_FOR_DEFAULT_SITE,k.DOMAIN_FOR_IP_SITE];return typeof window<"u"&&typeof window.location<"u"&&r.push(window.location.hostname),r.includes(t)}function Mi(){return null}function dr({confirm:t=null}){const[r,n]=h.useState(null),{t:i}=z(),a=()=>{n(null)},l=async s=>{if(s){let u=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";u==="/"?ln.push(`${s.pathname}`):(u.endsWith("/")&&(u=u.substring(0,u.length-1)),ln.push(`${u}${s.pathname}`)),window.location.reload()}},o=(s,...u)=>{let m=typeof t=="function"?t(s,...u):t;return m?(typeof m=="string"&&(m={description:m}),n({title:i("common.noticeTitle"),description:i("common.leavePageTip"),confirm:i("common.confirm"),cancel:i("common.cancel"),onConfirm:()=>l(s),onCancel:()=>a(),...m}),!1):!0};return e.jsxs(Wi,{children:[e.jsx(Mi,{message:o}),r&&e.jsx(le,{title:r.title,description:r.description,confirm:r.confirm,cancel:r.cancel,params:r.params,onConfirm:r.onConfirm,onCancel:r.onCancel})]})}dr.propTypes={confirm:p.oneOfType([p.object,p.string,p.func])};const Wi=ne.div`
1
+ import{aF as je,j as e,u as Q,r as h,e as Fe,aG as Ur,aH as k,aI as zr,aJ as an,aK as Gn,aL as sn,aM as et,n as z,ac as le,s as ne,aN as ln,o as p,aO as Br,aP as cn,aQ as Mr,H as re,N as dn,T as A,v as q,ay as fe,aR as Pe,C as K,V as be,w as Y,aS as Kn,X as pe,M as W,g as Mt,O as tt,aT as Wr,d as Wt,aU as Ie,aV as me,a9 as qr,aW as Hr,aX as Gr,z as Kr,B as Vn,W as un,p as mn,h as te,aY as qt,a as Et,R as X,b as ct,aZ as Yn,a_ as Xn,U as Qn,a3 as _t,a$ as Vr,b0 as Yr,b1 as Xr,b2 as Qr,b3 as nt,i as fn,b4 as Zr,aE as Ge,b5 as Jr,a8 as jt,a5 as wt,b6 as ei,a6 as Pt,L as Ht,J as ti,b7 as ni,b8 as Zn,a7 as ri,b9 as Jn,ba as De,bb as ke,bc as ii,bd as Gt,be as oi,$ as er,D as At,f as tr,bf as ai,bg as pn,aj as si,bh as li,bi as ee,bj as ci,S as gn,l as hn,m as xn,bk as di,bl as ui,bm as mi}from"./index-C7egXf_h.js";import{u as fi,T as pi}from"./html-title-vsl-TT26.js";import{A as gi}from"./ArrowDropDown-aNeHE2A2.js";import{u as Kt,C as B,a as yn}from"./index.esm-DkqB0mnE.js";import{S as ae}from"./switch-control-Ce2o9ffJ.js";import{P as ie}from"./permission-ycsOOBwp.js";import{H as nr,g as hi}from"./index-8DgiLFWe.js";import{A as rr}from"./Link-DKb1MvxW.js";import{D as ve,R as ir,a as It,b as xi}from"./url-evaluation-w8X_lgzG.js";import{D as dt}from"./delete-confirm-cbt-tN11.js";import{v as rt}from"./index-DWy1kjL1.js";import{s as yi}from"./logo-BKA11TRi.js";import{u as bi}from"./useLocalStorage-DZYDHTFQ.js";import{R as vi}from"./Refresh-mYLoMEkT.js";import{L as ji}from"./LoadingButton-C7IcO9Nb.js";import{C as wi,R as Ci,P as or,S as Si}from"./rotate-session-key-B90qT4kq.js";import{A as Le}from"./Add-CQt7mq1G.js";import{B as ar,D as bn,W as Ke}from"./status-C32bwmXC.js";import{i as Di}from"./is-path-prefix-equal-Cl2onSKX.js";import{N as ki}from"./ChevronRight-X_FMXVA4.js";import{I as Ri}from"./MoreVert-bx--E19j.js";import{E as sr}from"./Edit-CLiO2h_l.js";import{A as Ti}from"./CallMerge-BYCLcH5E.js";import{C as Ei}from"./CardContent-C22npYBc.js";import"./Switch-CE03jZ_8.js";import"./FilterList-BOMn8eqm.js";import"./CSSTransition-dwX1-RMJ.js";import"./emotion-cache.browser.esm-B4ZmPeHk.js";import"./index-rrAKD-3O.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-BaUhqVSn.js";import"./index-BxxgnmFX.js";import"./TableSearch-Bj41g7St.js";import"./Search-Dm2dt-Sr.js";import"./Clear-B-e33dNn.js";import"./click-to-copy-D50kkiW4.js";import"./visuallyHidden-Dan1xhjv.js";const _i=je(e.jsx("path",{d:"m7 14 5-5 5 5z"})),Pi=je(e.jsx("path",{d:"M12 3 2 21h20zm1 5.92L18.6 19H13zm-2 0V19H5.4z"})),Ai=je(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"})),lr=je(e.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z"})),Ii=je(e.jsx("path",{d:"M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"})),Li=je(e.jsx("path",{d:"M2 20h20v-4H2zm2-3h2v2H4zM2 4v4h20V4zm4 3H4V5h2zm-4 7h20v-4H2zm2-3h2v2H4z"})),Oi=je(e.jsx("path",{d:"m19 15-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9z"})),ye="Dashboard",cr=h.createContext({}),{Provider:Fi,Consumer:as}=cr,vn=[ye,k.DOMAIN_FOR_IP_SITE,k.DOMAIN_FOR_IP_SITE_REGEXP],Ni=(t,r)=>{if(t.name===k.DOMAIN_FOR_DEFAULT_SITE)return-1;if(r.name===k.DOMAIN_FOR_DEFAULT_SITE)return 1;const n=vn.includes(t.name),i=vn.includes(r.name);return n&&i?sn(t.name,r.name):n?-1:i?1:sn(t.name,r.name)},$i=({sites:t,nodePort:r})=>{const n=window.location.hostname,a=(t||[]).map(o=>{const{id:s,rules:u=[],corsAllowedOrigins:m=[]}=o;let{domain:d,domainAliases:c}=o;c=c||[],[k.DOMAIN_FOR_IP_SITE,k.DOMAIN_FOR_IP_SITE_REGEXP].includes(d)&&(d=ye,c.find(y=>y.value===n)||c.unshift({protected:!1,value:n}));const w={id:s,name:d,type:"domain",items:[],domainAliases:c,isProtected:o.isProtected,corsAllowedOrigins:m};return(u||[]).forEach(y=>{const{id:C,isProtected:E,from:{pathPrefix:j},to:D}=y;if(D.type===k.ROUTING_RULE_TYPES.BLOCKLET){let S="";Number.parseInt(D.port,10)===Number.parseInt(r,10)?(S="Blocklet Server Dashboard",D.type=k.ROUTING_RULE_TYPES.DAEMON):S=D.did,w.items.push({id:C,name:an(j||"/"),title:S,type:"rule",isProtected:E,pathPrefix:j,to:D})}else w.items.push({id:C,pathPrefix:j,name:an(j||"/"),title:"Blocklet Server Dashboard",type:"rule",isProtected:E,to:D})}),w.items=Gn(w.items,y=>y.name),w}).sort(Ni),l=a.reduce((o,s)=>{let{name:u}=s;return u.endsWith(k.BLOCKLET_SITE_GROUP_SUFFIX)&&([u]=u.split(".")),o[u]={...s,rules:s.items},o},{});return{sites:a,siteMap:l}},Ui=({did:t,domain:r,mountPoint:n,siteMap:i,params:a}={})=>{if(!i)return null;const l=i[t];if(!l)return null;const o=r||(l.domainAliases||[])[0];if(!o)return null;let s=n;if(!s){const u=l.rules.filter(m=>!m.name.startsWith(k.WELLKNOWN_PATH_PREFIX))[0];s=u?u.name:"/"}return et(o.value,s,a)},zi=({did:t,mountPoint:r,siteMap:n,params:i}={})=>{if(!n)return[];const a=n[t];if(!a)return[];const l=a.domainAliases||[];if(!l.length)return[];let o=r;if(!o){const s=a.rules.filter(u=>!u.name.startsWith(k.WELLKNOWN_PATH_PREFIX))[0];o=s?s.name:"/"}return l.map(s=>et(s.value,o,i))},Bi=t=>{const r=t.map(i=>i.domain).filter(i=>![k.DOMAIN_FOR_IP_SITE_REGEXP,k.DOMAIN_FOR_DEFAULT_SITE].includes(i));let n=[];return t.forEach(i=>n.push(...i.domainAliases||[])),n=n.map(i=>typeof i=="string"?{value:i,isProtected:!1}:i),{domains:r,domainsAliases:n}};function jn({children:t}){const{api:r,info:n}=Q(),[i,a]=h.useState([]),[l,o]=h.useState([]),[s,u]=h.useState([]),m=Fe(async()=>{const{sites:_}=await r.getRoutingSites({input:{snapshotHash:""}}),v=_||[];await Promise.all(v.map(async g=>(g.domainAliases=await Ur(g.domainAliases,{getIP:zr}),g)));const f=Bi(v);a(v),o(f.domains),u([window.location.hostname,...f.domains,...f.domainsAliases.map(g=>g.value)])},[n]),d=(_,v)=>{a(f=>f.map(g=>g.id===_?v.domain?v:{...v,domain:g.domain}:g))},c=_=>r.takeRoutingSnapshot({input:{dryRun:!1,message:encodeURIComponent(_)}}),w=async _=>{const v=await r.addRoutingSite({input:_});a(i.concat(v.site))},y=async(_,v)=>{const f=await r.updateRoutingSite({input:{id:_,...v}});if(f.site&&f.site.id){const g=i.findIndex(R=>R.id===f.site.id);g!==-1&&(i.splice(g,1,f.site),a([].concat(i)))}},C=async _=>{await r.deleteRoutingSite({input:{id:_}}),a(i.filter(v=>v.id!==_))},E=async(_,v,f)=>{const g=await r.addDomainAlias({input:{id:_,domainAlias:v,force:f}});d(_,g.site)},j=async(_,v)=>{const f=await r.deleteDomainAlias({input:{id:_,domainAlias:v}});d(_,f.site)},D=async(_,v)=>{const{site:f}=await r.addRoutingRule({input:{id:_,rule:v}});d(_,f)},S=async(_,v)=>{const{site:f}=await r.updateRoutingRule({input:{id:_,rule:v}});d(_,f)},b=async(_,v)=>{const{site:f}=await r.deleteRoutingRule({input:{id:_,ruleId:v}});d(_,f)},x={loading:m.loading,error:m.error,refresh:m.retry,api:r,actions:{addSite:w,updateSite:y,deleteSite:C,addDomainAlias:E,deleteDomainAlias:j,takeSnapshot:c,addRule:D,updateRule:S,deleteRule:b}},{sites:L,siteMap:O}=$i({sites:i,nodePort:n.port});return x.sites=L,x.siteMap=O,x.domains=l,x.allDomains=s,x.getBlockletUrl=({did:_,domain:v,mountPoint:f,params:g})=>Ui({did:_,domain:v,mountPoint:f,siteMap:x.siteMap,params:g}),x.getBlockletUrls=({did:_,mountPoint:v,params:f})=>zi({did:_,mountPoint:v,siteMap:x.siteMap,params:f}),e.jsx(Fi,{value:{routing:x},children:t})}function de(){const{routing:t}=h.useContext(cr);return t}function Vt(t){const r=[k.DOMAIN_FOR_IP_SITE_REGEXP,k.DOMAIN_FOR_DEFAULT_SITE,k.DOMAIN_FOR_IP_SITE];return typeof window<"u"&&typeof window.location<"u"&&r.push(window.location.hostname),r.includes(t)}function Mi(){return null}function dr({confirm:t=null}){const[r,n]=h.useState(null),{t:i}=z(),a=()=>{n(null)},l=async s=>{if(s){let u=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";u==="/"?ln.push(`${s.pathname}`):(u.endsWith("/")&&(u=u.substring(0,u.length-1)),ln.push(`${u}${s.pathname}`)),window.location.reload()}},o=(s,...u)=>{let m=typeof t=="function"?t(s,...u):t;return m?(typeof m=="string"&&(m={description:m}),n({title:i("common.noticeTitle"),description:i("common.leavePageTip"),confirm:i("common.confirm"),cancel:i("common.cancel"),onConfirm:()=>l(s),onCancel:()=>a(),...m}),!1):!0};return e.jsxs(Wi,{children:[e.jsx(Mi,{message:o}),r&&e.jsx(le,{title:r.title,description:r.description,confirm:r.confirm,cancel:r.cancel,params:r.params,onConfirm:r.onConfirm,onCancel:r.onCancel})]})}dr.propTypes={confirm:p.oneOfType([p.object,p.string,p.func])};const Wi=ne.div`
2
2
  margin-bottom: 24px;
3
3
  .top-btns-alert {
4
4
  @media (max-width: ${t=>t.theme.breakpoints.values.sm}px) {
@@ -1,4 +1,4 @@
1
- import{aF as createSvgIcon,j as jsxRuntimeExports,r as reactExports$1,o,bd as getDefaultExportFromCjs,F as useMediaQuery,s as styled,dp as Skeleton,cQ as M$1,Z as CheckIcon,ay as Tooltip,dI as Button,T as Typography,M as Box,C as CircularProgress,f as useTheme,dC as isObject,f0 as mergeThemeOptions,f1 as StyledEngineProvider,f2 as ThemeProvider,f3 as ThemeProvider$1,f4 as s,Y as o$1,b8 as styled$1,f5 as CloseIcon,cF as Buffer,be as U,bF as __vitePreload,dH as noop,de as l$2}from"./index-DGSsefUZ.js";import{j as joinUrl}from"./url-join-s-abjyAU.js";const l$1=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"})),d$2=createSvgIcon([jsxRuntimeExports.jsx("circle",{cx:"12",cy:"19",r:"2"},"0"),jsxRuntimeExports.jsx("path",{d:"M10 3h4v12h-4z"},"1")]),k$2=reactExports$1.createContext(),{Provider:w$3}=k$2,d$1=(C,F,V=window.location.pathname.replace(/\/$/,"/"))=>C?F?C===V:new RegExp(C).test(V):!1;function P({children:C,steps:F,mode:V="history"}){const[D,B]=reactExports$1.useState("");!D&&F.length&&B(F[0].key);const O=F.map(X=>X.children?[{key:X.key,hasChild:!0},X.children.map(at=>({parentKey:X.key,key:at.key}))]:{key:X.key}).flat(1/0),j=O.filter(X=>!X.hasChild),H=X=>{let at;const rt=O.findIndex(ft=>ft.key===D?(at=ft.parentKey,!0):!1);if(at===X)return"current";const tt=O.findIndex(ft=>ft.key===X);if(tt!==-1){if(tt===rt)return"current";if(tt<rt)return"before"}return"after"};function G(X){B(X)}function K(X){if(typeof X=="function"){const at=X(j.findIndex(rt=>rt.key===D));B(j[at].key)}else B(j[X].key)}const it=j.findIndex(X=>X.key===D);reactExports$1.useEffect(()=>{if(V==="history"){let X="";F.some(at=>at.children&&at.children.length?at.children.some(rt=>d$1(rt.path,rt.exact)?(X=rt.key,!0):!1):d$1(at.path,at.exact)?(X=at.key,!0):!1),X&&B(X)}return()=>{}},[F,V]);const ot={steps:F,totalStepsCount:j.length,getStepStatus:H,setActiveStepByKey:G,setActiveStepByIndex:K,activeStep:it,canBackToStep:X=>V==="memory"&&it!==0&&X<it};return jsxRuntimeExports.jsx(w$3,{value:ot,children:C})}function T$1(){return reactExports$1.use(k$2)}P.propTypes={children:o.any.isRequired,steps:o.array.isRequired,mode:o.string};var lib,hasRequiredLib;function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1;var C=Object.prototype.hasOwnProperty,F=Object.prototype.toString;function V(D){if(D==null)return!0;if(typeof D=="boolean")return!1;if(typeof D=="number")return D===0;if(typeof D=="string"||typeof D=="function"||Array.isArray(D))return D.length===0;if(D instanceof Error)return D.message==="";if(D.toString==F)switch(D.toString()){case"[object File]":case"[object Map]":case"[object Set]":return D.size===0;case"[object Object]":{for(var B in D)if(C.call(D,B))return!1;return!0}}return!1}return lib=V,lib}var libExports=requireLib();const k$1=getDefaultExportFromCjs(libExports),S=""+new URL("blocklet-default-logo-Bspnu_ws.png",import.meta.url).href,t$1={en:{optional:"Optional",defaultNavSubTitle:"Launching"},zh:{optional:"可选",defaultNavSubTitle:"启动"}},a$1=C=>t$1[C]?t$1[C]:t$1.en,i=C=>C==="zh"?"启动":"Launching",g$2=C=>C?.title||C?.name||"";function T({blockletMeta:C={},subTitle:F="",logoUrl:V="",locale:D="",navLogo:B="",loading:O=!1}){const j=useMediaQuery(ot=>ot.breakpoints.down("md")),H=j?18:48,G=reactExports$1.useRef(null),[K,it]=reactExports$1.useState("");return reactExports$1.useEffect(()=>{G.current&&G.current.offsetHeight>34&&(K===""?it("middle"):K==="middle"&&it("small"))},[K]),jsxRuntimeExports.jsxs(R,{className:K==="small"?"center-mode":"",children:[j?jsxRuntimeExports.jsx("div",{className:"app-icon",children:B}):jsxRuntimeExports.jsxs("div",{className:"app-icon",children:[O&&jsxRuntimeExports.jsx(I,{blockletSize:H,isMobile:j}),!O&&jsxRuntimeExports.jsx(u$1,{blockletSize:H,logoUrl:V})]}),jsxRuntimeExports.jsxs("div",{className:"header-title",children:[j&&F&&jsxRuntimeExports.jsx("div",{className:"header-title-sub",children:F}),jsxRuntimeExports.jsxs("div",{className:"app-name-content",children:[!j&&jsxRuntimeExports.jsx("div",{className:"launching-context",children:F||i(D)}),jsxRuntimeExports.jsx("div",{className:`header-title-name ${K==="middle"||K==="small"?"middle-size":""}`,ref:G,children:jsxRuntimeExports.jsx(w$2,{logoUrl:V,isMobile:j,blockletMeta:C,blockletSize:H,loading:O})})]})]})]})}T.propTypes={blockletMeta:o.object,subTitle:o.any,logoUrl:o.string,locale:o.string,navLogo:o.any,loading:o.bool};function I({blockletSize:C,isMobile:F}){return F?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:100,height:16,alt:"icon",style:{marginTop:4}}):jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:C,height:C})}function u$1({logoUrl:C,blockletSize:F}){return jsxRuntimeExports.jsx(M$1,{width:F,height:F,src:C,alt:"blocklet icon",fallback:S,style:{verticalAlign:"text-bottom"}},`layout-app-icon-${C}`)}function w$2({isMobile:C,logoUrl:F,blockletMeta:V={},blockletSize:D,loading:B}){const O=g$2(V);return B?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:100,height:16,alt:"icon",style:{marginTop:4}}):k$1(V)?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:!1,width:100,height:16,alt:"icon",style:{marginTop:4}}):C?jsxRuntimeExports.jsxs(L$1,{children:[jsxRuntimeExports.jsx(u$1,{blockletSize:D,logoUrl:F}),jsxRuntimeExports.jsx("span",{className:"ellipsis-title",children:g$2(V)})]}):jsxRuntimeExports.jsx(E,{className:"app-link",target:"_blank",href:joinUrl(V?.registryUrl||"",`/blocklets/${V?.did}`),title:O,children:O})}const L$1=styled.div`
1
+ import{aF as createSvgIcon,j as jsxRuntimeExports,r as reactExports$1,o,bd as getDefaultExportFromCjs,F as useMediaQuery,s as styled,dp as Skeleton,cQ as M$1,Z as CheckIcon,ay as Tooltip,dI as Button,T as Typography,M as Box,C as CircularProgress,f as useTheme,dC as isObject,f0 as mergeThemeOptions,f1 as StyledEngineProvider,f2 as ThemeProvider,f3 as ThemeProvider$1,f4 as s,Y as o$1,b8 as styled$1,f5 as CloseIcon,cF as Buffer,be as U,bF as __vitePreload,dH as noop,de as l$2}from"./index-C7egXf_h.js";import{j as joinUrl}from"./url-join-3aXvW59g.js";const l$1=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"})),d$2=createSvgIcon([jsxRuntimeExports.jsx("circle",{cx:"12",cy:"19",r:"2"},"0"),jsxRuntimeExports.jsx("path",{d:"M10 3h4v12h-4z"},"1")]),k$2=reactExports$1.createContext(),{Provider:w$3}=k$2,d$1=(C,F,V=window.location.pathname.replace(/\/$/,"/"))=>C?F?C===V:new RegExp(C).test(V):!1;function P({children:C,steps:F,mode:V="history"}){const[D,B]=reactExports$1.useState("");!D&&F.length&&B(F[0].key);const O=F.map(X=>X.children?[{key:X.key,hasChild:!0},X.children.map(at=>({parentKey:X.key,key:at.key}))]:{key:X.key}).flat(1/0),j=O.filter(X=>!X.hasChild),H=X=>{let at;const rt=O.findIndex(ft=>ft.key===D?(at=ft.parentKey,!0):!1);if(at===X)return"current";const tt=O.findIndex(ft=>ft.key===X);if(tt!==-1){if(tt===rt)return"current";if(tt<rt)return"before"}return"after"};function G(X){B(X)}function K(X){if(typeof X=="function"){const at=X(j.findIndex(rt=>rt.key===D));B(j[at].key)}else B(j[X].key)}const it=j.findIndex(X=>X.key===D);reactExports$1.useEffect(()=>{if(V==="history"){let X="";F.some(at=>at.children&&at.children.length?at.children.some(rt=>d$1(rt.path,rt.exact)?(X=rt.key,!0):!1):d$1(at.path,at.exact)?(X=at.key,!0):!1),X&&B(X)}return()=>{}},[F,V]);const ot={steps:F,totalStepsCount:j.length,getStepStatus:H,setActiveStepByKey:G,setActiveStepByIndex:K,activeStep:it,canBackToStep:X=>V==="memory"&&it!==0&&X<it};return jsxRuntimeExports.jsx(w$3,{value:ot,children:C})}function T$1(){return reactExports$1.use(k$2)}P.propTypes={children:o.any.isRequired,steps:o.array.isRequired,mode:o.string};var lib,hasRequiredLib;function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1;var C=Object.prototype.hasOwnProperty,F=Object.prototype.toString;function V(D){if(D==null)return!0;if(typeof D=="boolean")return!1;if(typeof D=="number")return D===0;if(typeof D=="string"||typeof D=="function"||Array.isArray(D))return D.length===0;if(D instanceof Error)return D.message==="";if(D.toString==F)switch(D.toString()){case"[object File]":case"[object Map]":case"[object Set]":return D.size===0;case"[object Object]":{for(var B in D)if(C.call(D,B))return!1;return!0}}return!1}return lib=V,lib}var libExports=requireLib();const k$1=getDefaultExportFromCjs(libExports),S=""+new URL("blocklet-default-logo-Bspnu_ws.png",import.meta.url).href,t$1={en:{optional:"Optional",defaultNavSubTitle:"Launching"},zh:{optional:"可选",defaultNavSubTitle:"启动"}},a$1=C=>t$1[C]?t$1[C]:t$1.en,i=C=>C==="zh"?"启动":"Launching",g$2=C=>C?.title||C?.name||"";function T({blockletMeta:C={},subTitle:F="",logoUrl:V="",locale:D="",navLogo:B="",loading:O=!1}){const j=useMediaQuery(ot=>ot.breakpoints.down("md")),H=j?18:48,G=reactExports$1.useRef(null),[K,it]=reactExports$1.useState("");return reactExports$1.useEffect(()=>{G.current&&G.current.offsetHeight>34&&(K===""?it("middle"):K==="middle"&&it("small"))},[K]),jsxRuntimeExports.jsxs(R,{className:K==="small"?"center-mode":"",children:[j?jsxRuntimeExports.jsx("div",{className:"app-icon",children:B}):jsxRuntimeExports.jsxs("div",{className:"app-icon",children:[O&&jsxRuntimeExports.jsx(I,{blockletSize:H,isMobile:j}),!O&&jsxRuntimeExports.jsx(u$1,{blockletSize:H,logoUrl:V})]}),jsxRuntimeExports.jsxs("div",{className:"header-title",children:[j&&F&&jsxRuntimeExports.jsx("div",{className:"header-title-sub",children:F}),jsxRuntimeExports.jsxs("div",{className:"app-name-content",children:[!j&&jsxRuntimeExports.jsx("div",{className:"launching-context",children:F||i(D)}),jsxRuntimeExports.jsx("div",{className:`header-title-name ${K==="middle"||K==="small"?"middle-size":""}`,ref:G,children:jsxRuntimeExports.jsx(w$2,{logoUrl:V,isMobile:j,blockletMeta:C,blockletSize:H,loading:O})})]})]})]})}T.propTypes={blockletMeta:o.object,subTitle:o.any,logoUrl:o.string,locale:o.string,navLogo:o.any,loading:o.bool};function I({blockletSize:C,isMobile:F}){return F?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:100,height:16,alt:"icon",style:{marginTop:4}}):jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:C,height:C})}function u$1({logoUrl:C,blockletSize:F}){return jsxRuntimeExports.jsx(M$1,{width:F,height:F,src:C,alt:"blocklet icon",fallback:S,style:{verticalAlign:"text-bottom"}},`layout-app-icon-${C}`)}function w$2({isMobile:C,logoUrl:F,blockletMeta:V={},blockletSize:D,loading:B}){const O=g$2(V);return B?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:100,height:16,alt:"icon",style:{marginTop:4}}):k$1(V)?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:!1,width:100,height:16,alt:"icon",style:{marginTop:4}}):C?jsxRuntimeExports.jsxs(L$1,{children:[jsxRuntimeExports.jsx(u$1,{blockletSize:D,logoUrl:F}),jsxRuntimeExports.jsx("span",{className:"ellipsis-title",children:g$2(V)})]}):jsxRuntimeExports.jsx(E,{className:"app-link",target:"_blank",href:joinUrl(V?.registryUrl||"",`/blocklets/${V?.did}`),title:O,children:O})}const L$1=styled.div`
2
2
  .ellipsis-title {
3
3
  flex: 1;
4
4
  position: absolute;
@@ -1,4 +1,4 @@
1
- import{r as a,u as D,j as e,T as k,be as J,M as i,s as U,b2 as Q,o as l,g as $,k as M,d3 as X,bk as ee,d as te,Y as re,C as ne,n as se,i as v,a as h,aH as L,b,d4 as oe,K as ie,bu as ae,aD as le,d5 as me,G as C,H as R,l as ce,m as ue,B as de,bm as pe}from"./index-DGSsefUZ.js";import{u as fe,T as xe}from"./html-title-C4Q1l9hV.js";import{T as ge}from"./traffic-DQX3XpFH.js";import{H as he}from"./index-bK6g80kL.js";import{x as V}from"./index-DRYJ0xIl.js";import{C as ye,M as T}from"./memory-sDoTeyx0.js";import{C as ve}from"./CardContent-CpM-_HeI.js";import{u as Ce}from"./useLocalStorage-T0_FQRxp.js";import{T as je,a as Ie}from"./ToggleButtonGroup-CJvpk2kD.js";import"./iframe-DMkrJLov.js";import"./ChevronLeft-CcsCSRKu.js";import"./ChevronRight-o-pKt_xW.js";import"./index-DBii9-f-.js";import"./typeof-QjJsDpFa.js";import"./base-chart-Dr8SHE0h.js";import"./index-CIUZoemD.js";import"./AdapterDayjs-DovOOpck.js";import"./useThemeProps-EahRu2x5.js";import"./CSSTransition-CjXLkGon.js";import"./visuallyHidden-Dan1xhjv.js";import"./FilterList-CQA7G7Vn.js";import"./emotion-cache.browser.esm-CgS-LeII.js";import"./index-CNPrEh7K.js";import"./redux-DfszZyTl.js";import"./depsEqual-DQDFZSyD.js";import"./index-CFWi7Q8M.js";import"./TableSearch-DEuaLdIb.js";import"./Search-CYv1OPLx.js";import"./Clear-DbuaJOFI.js";import"./MoreVert-CDZKGaWW.js";import"./getValidReactChildren-BImmvw4C.js";const be=o=>a.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...o},a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.08295 3.2C2.08295 2.58144 2.58439 2.08 3.20295 2.08H28.8029C29.4215 2.08 29.9229 2.58144 29.9229 3.2V13.44C29.9229 14.0586 29.4215 14.56 28.8029 14.56H3.20295C2.58439 14.56 2.08295 14.0586 2.08295 13.44V3.2ZM4.32295 4.32V12.32H27.6829V4.32H4.32295ZM2.08295 18.56C2.08295 17.9414 2.58439 17.44 3.20295 17.44H28.8029C29.4215 17.44 29.9229 17.9414 29.9229 18.56V28.8C29.9229 29.4186 29.4215 29.92 28.8029 29.92H3.20295C2.58439 29.92 2.08295 29.4186 2.08295 28.8V18.56ZM4.32295 19.68V27.68H27.6829V19.68H4.32295Z",fill:"currentColor"}),a.createElement("path",{d:"M8.96297 7.04001H7.68297C7.51323 7.04001 7.35044 7.10744 7.23042 7.22746C7.1104 7.34748 7.04297 7.51027 7.04297 7.68001V8.96001C7.04297 9.12975 7.1104 9.29253 7.23042 9.41256C7.35044 9.53258 7.51323 9.60001 7.68297 9.60001H8.96297C9.13271 9.60001 9.29549 9.53258 9.41552 9.41256C9.53554 9.29253 9.60297 9.12975 9.60297 8.96001V7.68001C9.60297 7.51027 9.53554 7.34748 9.41552 7.22746C9.29549 7.10744 9.13271 7.04001 8.96297 7.04001ZM8.96297 22.4H7.68297C7.51323 22.4 7.35044 22.4674 7.23042 22.5875C7.1104 22.7075 7.04297 22.8703 7.04297 23.04V24.32C7.04297 24.4897 7.1104 24.6525 7.23042 24.7726C7.35044 24.8926 7.51323 24.96 7.68297 24.96H8.96297C9.13271 24.96 9.29549 24.8926 9.41552 24.7726C9.53554 24.6525 9.60297 24.4897 9.60297 24.32V23.04C9.60297 22.8703 9.53554 22.7075 9.41552 22.5875C9.29549 22.4674 9.13271 22.4 8.96297 22.4ZM14.083 7.04001H12.803C12.6332 7.04001 12.4704 7.10744 12.3504 7.22746C12.2304 7.34748 12.163 7.51027 12.163 7.68001V8.96001C12.163 9.12975 12.2304 9.29253 12.3504 9.41256C12.4704 9.53258 12.6332 9.60001 12.803 9.60001H14.083C14.2527 9.60001 14.4155 9.53258 14.5355 9.41256C14.6555 9.29253 14.723 9.12975 14.723 8.96001V7.68001C14.723 7.51027 14.6555 7.34748 14.5355 7.22746C14.4155 7.10744 14.2527 7.04001 14.083 7.04001ZM14.083 22.4H12.803C12.6332 22.4 12.4704 22.4674 12.3504 22.5875C12.2304 22.7075 12.163 22.8703 12.163 23.04V24.32C12.163 24.4897 12.2304 24.6525 12.3504 24.7726C12.4704 24.8926 12.6332 24.96 12.803 24.96H14.083C14.2527 24.96 14.4155 24.8926 14.5355 24.7726C14.6555 24.6525 14.723 24.4897 14.723 24.32V23.04C14.723 22.8703 14.6555 22.7075 14.5355 22.5875C14.4155 22.4674 14.2527 22.4 14.083 22.4Z",fill:"currentColor"}));function Me(){const{api:o,info:s}=D();return e.jsx(ge,{client:o,did:s.did})}function P({style:o={},title:s=null,value:m=null,graph:c=null,description:p=null,empty:f=null}){return e.jsx(ke,{children:e.jsxs(ve,{style:{...o},children:[e.jsx(k,{sx:{color:"text.secondary",fontSize:14},children:s}),f&&J.isValidElement(f)?e.jsx(i,{style:{height:150},sx:{color:"text.secondary",display:"flex",justifyContent:"center",alignItems:"center"},children:f}):e.jsxs(e.Fragment,{children:[e.jsx(k,{variant:"h5",component:"div",sx:{mt:1},children:m}),c,!!p&&e.jsx(i,{sx:{display:"flex",color:"text.secondary",fontSize:12,marginTop:3},children:p})]})]})})}P.propTypes={style:l.object,title:l.node,value:l.node,graph:l.node,description:l.any,empty:l.node};const ke=U(Q)`
1
+ import{r as a,u as D,j as e,T as k,be as J,M as i,s as U,b2 as Q,o as l,g as $,k as M,d3 as X,bk as ee,d as te,Y as re,C as ne,n as se,i as v,a as h,aH as L,b,d4 as oe,K as ie,bu as ae,aD as le,d5 as me,G as C,H as R,l as ce,m as ue,B as de,bm as pe}from"./index-C7egXf_h.js";import{u as fe,T as xe}from"./html-title-vsl-TT26.js";import{T as ge}from"./traffic-C17ygInL.js";import{H as he}from"./index-8DgiLFWe.js";import{x as V}from"./index-DRYJ0xIl.js";import{C as ye,M as T}from"./memory-UJLIVuot.js";import{C as ve}from"./CardContent-C22npYBc.js";import{u as Ce}from"./useLocalStorage-DZYDHTFQ.js";import{T as je,a as Ie}from"./ToggleButtonGroup-BEjde42R.js";import"./iframe-Dl-yNrp9.js";import"./ChevronLeft-Bmmo6bzu.js";import"./ChevronRight-X_FMXVA4.js";import"./index-DBii9-f-.js";import"./typeof-QjJsDpFa.js";import"./base-chart-D7y6qq9u.js";import"./index-CpuUG8Z1.js";import"./AdapterDayjs-DQepVz3x.js";import"./useThemeProps-Bs1lG48z.js";import"./CSSTransition-dwX1-RMJ.js";import"./visuallyHidden-Dan1xhjv.js";import"./FilterList-BOMn8eqm.js";import"./emotion-cache.browser.esm-B4ZmPeHk.js";import"./index-rrAKD-3O.js";import"./redux-DfszZyTl.js";import"./depsEqual-BaUhqVSn.js";import"./index-BxxgnmFX.js";import"./TableSearch-Bj41g7St.js";import"./Search-Dm2dt-Sr.js";import"./Clear-B-e33dNn.js";import"./MoreVert-bx--E19j.js";import"./getValidReactChildren-DDB1J2y7.js";const be=o=>a.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...o},a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.08295 3.2C2.08295 2.58144 2.58439 2.08 3.20295 2.08H28.8029C29.4215 2.08 29.9229 2.58144 29.9229 3.2V13.44C29.9229 14.0586 29.4215 14.56 28.8029 14.56H3.20295C2.58439 14.56 2.08295 14.0586 2.08295 13.44V3.2ZM4.32295 4.32V12.32H27.6829V4.32H4.32295ZM2.08295 18.56C2.08295 17.9414 2.58439 17.44 3.20295 17.44H28.8029C29.4215 17.44 29.9229 17.9414 29.9229 18.56V28.8C29.9229 29.4186 29.4215 29.92 28.8029 29.92H3.20295C2.58439 29.92 2.08295 29.4186 2.08295 28.8V18.56ZM4.32295 19.68V27.68H27.6829V19.68H4.32295Z",fill:"currentColor"}),a.createElement("path",{d:"M8.96297 7.04001H7.68297C7.51323 7.04001 7.35044 7.10744 7.23042 7.22746C7.1104 7.34748 7.04297 7.51027 7.04297 7.68001V8.96001C7.04297 9.12975 7.1104 9.29253 7.23042 9.41256C7.35044 9.53258 7.51323 9.60001 7.68297 9.60001H8.96297C9.13271 9.60001 9.29549 9.53258 9.41552 9.41256C9.53554 9.29253 9.60297 9.12975 9.60297 8.96001V7.68001C9.60297 7.51027 9.53554 7.34748 9.41552 7.22746C9.29549 7.10744 9.13271 7.04001 8.96297 7.04001ZM8.96297 22.4H7.68297C7.51323 22.4 7.35044 22.4674 7.23042 22.5875C7.1104 22.7075 7.04297 22.8703 7.04297 23.04V24.32C7.04297 24.4897 7.1104 24.6525 7.23042 24.7726C7.35044 24.8926 7.51323 24.96 7.68297 24.96H8.96297C9.13271 24.96 9.29549 24.8926 9.41552 24.7726C9.53554 24.6525 9.60297 24.4897 9.60297 24.32V23.04C9.60297 22.8703 9.53554 22.7075 9.41552 22.5875C9.29549 22.4674 9.13271 22.4 8.96297 22.4ZM14.083 7.04001H12.803C12.6332 7.04001 12.4704 7.10744 12.3504 7.22746C12.2304 7.34748 12.163 7.51027 12.163 7.68001V8.96001C12.163 9.12975 12.2304 9.29253 12.3504 9.41256C12.4704 9.53258 12.6332 9.60001 12.803 9.60001H14.083C14.2527 9.60001 14.4155 9.53258 14.5355 9.41256C14.6555 9.29253 14.723 9.12975 14.723 8.96001V7.68001C14.723 7.51027 14.6555 7.34748 14.5355 7.22746C14.4155 7.10744 14.2527 7.04001 14.083 7.04001ZM14.083 22.4H12.803C12.6332 22.4 12.4704 22.4674 12.3504 22.5875C12.2304 22.7075 12.163 22.8703 12.163 23.04V24.32C12.163 24.4897 12.2304 24.6525 12.3504 24.7726C12.4704 24.8926 12.6332 24.96 12.803 24.96H14.083C14.2527 24.96 14.4155 24.8926 14.5355 24.7726C14.6555 24.6525 14.723 24.4897 14.723 24.32V23.04C14.723 22.8703 14.6555 22.7075 14.5355 22.5875C14.4155 22.4674 14.2527 22.4 14.083 22.4Z",fill:"currentColor"}));function Me(){const{api:o,info:s}=D();return e.jsx(ge,{client:o,did:s.did})}function P({style:o={},title:s=null,value:m=null,graph:c=null,description:p=null,empty:f=null}){return e.jsx(ke,{children:e.jsxs(ve,{style:{...o},children:[e.jsx(k,{sx:{color:"text.secondary",fontSize:14},children:s}),f&&J.isValidElement(f)?e.jsx(i,{style:{height:150},sx:{color:"text.secondary",display:"flex",justifyContent:"center",alignItems:"center"},children:f}):e.jsxs(e.Fragment,{children:[e.jsx(k,{variant:"h5",component:"div",sx:{mt:1},children:m}),c,!!p&&e.jsx(i,{sx:{display:"flex",color:"text.secondary",fontSize:12,marginTop:3},children:p})]})]})})}P.propTypes={style:l.object,title:l.node,value:l.node,graph:l.node,description:l.any,empty:l.node};const ke=U(Q)`
2
2
  .card-content {
3
3
  height: 150px;
4
4
  }
@@ -1 +1 @@
1
- import{aF as le,j as e,hA as ce,bd as ue,bn as Z,n as G,fP as ee,f9 as te,aP as re,cs as u,H as S,hB as M,M as R,v as x,hC as H,aU as V,P as p,ay as de,w as A,s as ie,aV as ne,A as me,z as fe,aH as he,r as B,g as xe,bz as pe}from"./index-DGSsefUZ.js";import{T as ve}from"./html-title-C4Q1l9hV.js";import{u as se,C as m}from"./index.esm-Lk0YHlgv.js";import{S as h,A as je,a as be,b as ge,c as ye}from"./collapse-D2q_m0jc.js";import{u as ae}from"./blocklet-Ddfm_VL2.js";import{S as $}from"./Switch-CJCk9M4e.js";const Re=le(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25"}));var K={exports:{}},O={exports:{}},z={exports:{}},J;function Te(){return J||(J=1,function(c,s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=t;function t(d){return d==null}c.exports=s.default,c.exports.default=s.default}(z,z.exports)),z.exports}var Q;function ke(){return Q||(Q=1,function(c,s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=E;var t=b(ce()),d=b(Te());function b(n){return n&&n.__esModule?n:{default:n}}var f=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,P=/^[-+]?[0-9]+$/;function E(n,i){(0,t.default)(n),i=i||{};var _=i.allow_leading_zeroes===!1?f:P,q=!i.hasOwnProperty("min")||(0,d.default)(i.min)||n>=i.min,l=!i.hasOwnProperty("max")||(0,d.default)(i.max)||n<=i.max,a=!i.hasOwnProperty("lt")||(0,d.default)(i.lt)||n<i.lt,C=!i.hasOwnProperty("gt")||(0,d.default)(i.gt)||n>i.gt;return _.test(n)&&q&&l&&a&&C}c.exports=s.default,c.exports.default=s.default}(O,O.exports)),O.exports}var X;function we(){return X||(X=1,function(c,s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=b;var t=d(ke());function d(f){return f&&f.__esModule?f:{default:f}}function b(f){return(0,t.default)(f,{allow_leading_zeroes:!1,min:0,max:65535})}c.exports=s.default,c.exports.default=s.default}(K,K.exports)),K.exports}var Se=we();const Ee=ue(Se),U={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:"",companyName:"",companyLink:"",companyAddress:"",supportEmail:""};function Ce(){const{api:c}=Z(),{blocklet:s}=ae(),{t}=G(),{confirmApi:d,confirmHolder:b}=ee(),f=s?.meta?.did,P=Object.assign({...U},s?.settings?.notification?.email||{}),{handleSubmit:E,control:n,formState:i,watch:_,reset:q}=se({defaultValues:te(P,Object.keys(U))}),l=re({testReceiver:"",testReceiverError:""}),a=_("enabled"),C=u(async(r,g,w=!0)=>{try{const{blocklet:y}=await c.configNotification({input:{did:f,notification:JSON.stringify({email:r})}}),oe=Object.assign({...U},y?.settings?.notification?.email||{});q(oe),w&&S.success(t("oauth.saveSuccess"))}catch(y){if(w)S.error(y.message||t("oauth.saveFailed"));else throw y}}),N=u(async(r,g,w)=>{try{i.isDirty&&await C(r,g,!1),await c.sendEmail({input:{did:f,receiver:w,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification",attachments:[{type:"link",data:{url:"https://community.arcblock.io",title:"Community",image:"https://community.arcblock.io/.well-known/service/blocklet/logo-rect-dark",utm:{campaign:"test-campaign"}}}],utm:{content:"test-email-button"}})}}),S.success(t("notification.email.testSuccess"))}catch(y){S.error(y.message||t("notification.email.testfailed"))}}),W=u((r,g)=>{l.testReceiver=localStorage.getItem("test-receiver")||"",l.testReceiverError="",d.open({title:t("notification.email.testSendEmail"),content:()=>e.jsx(R,{sx:{width:"300px"},children:e.jsx(x,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:t("notification.email.inputTestReceiver"),value:l.testReceiver,onChange:w=>{l.testReceiver=w.target.value},error:!!l.testReceiverError,helperText:l.testReceiverError||" "})}),confirmButtonText:t("common.confirm"),cancelButtonText:t("common.cancel"),async onConfirm(w){const y=l.testReceiver?.trim();if(!y){l.testReceiverError=t("notification.email.receiverRequired");return}if(!M(y)){l.testReceiverError=t("notification.email.receiverInvalid");return}l.testReceiverError="",await N(r,g,y),w()}})}),F=u(r=>{const g=r?.trim();return g?M(g)?!0:t("notification.email.fromInvalid"):t("notification.email.fromRequired")}),L=u(r=>{const g=r?.trim();return g?H(g,{require_host:!1,protocols:[]})?!0:t("notification.email.hostInvalid"):t("notification.email.hostRequired")}),o=u(r=>r?Ee(r)?!0:t("notification.email.portInvalid"):t("notification.email.portRequired")),T=u(r=>r?.trim()?!0:t("notification.email.userRequired")),v=u(r=>r?.trim()?!0:t("notification.email.passwordRequired")),k=u(r=>r?.trim()&&!H(r,{protocols:["http","https"],require_protocol:!0})?t("notification.email.linkInvalid"):!0),I=u(r=>r?.trim()&&!M(r)?t("notification.email.emailInvalid"):!0),j=u(()=>!0);return e.jsxs(R,{children:[e.jsxs(Pe,{component:"form",onSubmit:E(C),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(h,{title:t("notification.email.enable"),my:2.5,children:e.jsx(m,{name:"enabled",control:n,render:({field:r})=>e.jsx(V,{control:e.jsx($,{checked:r.value,...r})})})}),e.jsx(h,{title:t("notification.email.from"),children:e.jsx(m,{name:"from",control:n,rules:{validate:a?F:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,label:t("notification.email.from"),error:!!i.errors[r.name],helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.host"),children:e.jsx(m,{name:"host",control:n,rules:{validate:a?L:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,error:!!i.errors[r.name],label:t("notification.email.host"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.port"),children:e.jsx(m,{name:"port",control:n,rules:{validate:a?o:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,type:"number",error:!!i.errors[r.name],label:t("notification.email.port"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.user"),children:e.jsx(m,{name:"user",control:n,rules:{validate:a?T:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,error:!!i.errors[r.name],label:t("notification.email.user"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.password"),children:e.jsx(m,{name:"password",control:n,rules:{validate:a?v:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,type:"password",error:!!i.errors[r.name],label:t("notification.email.password"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.secure"),children:e.jsx(m,{name:"secure",control:n,rules:{validate:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(V,{control:e.jsx($,{checked:r.value,...r,disabled:!a})})})})}),e.jsxs(je,{children:[e.jsxs(be,{expandIcon:e.jsx(ge,{fontSize:"small"}),"aria-controls":"panel1-content",id:"panel1-header",children:[t("notification.email.signature"),e.jsx(de,{title:t("notification.email.signatureTooltip"),children:e.jsx(Re,{fontSize:"small",sx:{ml:1,cursor:"help"}})})]}),e.jsxs(ye,{children:[e.jsx(h,{title:t("notification.email.companyName"),children:e.jsx(m,{name:"companyName",control:n,rules:{validate:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",error:!!i.errors[r.name],label:t("notification.email.companyName"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.companyLink"),children:e.jsx(m,{name:"companyLink",control:n,rules:{validate:a?k:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",error:!!i.errors[r.name],label:t("notification.email.companyLink"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.companyAddress"),children:e.jsx(m,{name:"companyAddress",control:n,rules:{validate:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",error:!!i.errors[r.name],label:t("notification.email.companyAddress"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.supportEmail"),children:e.jsx(m,{name:"supportEmail",control:n,rules:{validate:a?I:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",type:"email",error:!!i.errors[r.name],label:t("notification.email.supportEmail"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})})]})]}),e.jsxs(R,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(A,{variant:"outlined",color:"warning",onClick:E(W),disabled:!a,children:t("oauth.runTest")}),e.jsx(A,{type:"submit",variant:"contained",disabled:!i.isDirty,children:t("oauth.save")})]})]}),b]})}const Pe=ie(ne)``,D={enabled:!1,endpoint:"",did:void 0,pushPath:void 0};function _e(){const{api:c}=Z(),{blocklet:s}=ae(),{t}=G(),{confirmApi:d,confirmHolder:b}=ee(),f=s?.meta?.did,P=Object.assign({...D},s?.settings?.notification?.pushKit||{}),{handleSubmit:E,control:n,formState:i,watch:_,reset:q}=se({defaultValues:te(P,Object.keys(D))}),l=re({testReceiver:"",testReceiverError:""}),a=_("enabled"),C=u(async(o,T,v=!0)=>{try{const{blocklet:k}=await c.configNotification({input:{did:f,notification:JSON.stringify({pushKit:o})}}),I=Object.assign({...D},k?.settings?.notification?.pushKit||{});q(I),v&&S.success(t("oauth.saveSuccess"))}catch(k){if(v)S.error(k.message||t("oauth.saveFailed"));else throw k}}),N=u(async(o,T)=>{try{i.isDirty&&await C(o,T,!1);const v=(s?.configs||[]).find(j=>j.key==="BLOCKLET_APP_URL")?.value,k=me(fe(v,he.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo"),{v:s?.meta?.version,t:new Date(s?.updatedAt||0).getTime()}),I={type:"passthrough",passthroughType:"messageStatus",data:{message:{title:"Test push-kit notification",body:"This is message from push-kit config test",sender:{did:s?.appDid,fullName:s?.meta?.title,avatar:k}}}};await c.sendPush({input:{did:f,receiver:l.testReceiver,notification:JSON.stringify(I)}}),S.success(t("notification.pushKit.testSuccess"))}catch(v){S.error(v.message||t("notification.pushKit.testfailed"))}}),W=u((o,T)=>{l.testReceiverError="",d.open({title:t("notification.pushKit.testSend"),content:()=>e.jsx(R,{sx:{width:"450px",maxWidth:"100%"},children:e.jsx(x,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:t("notification.pushKit.inputTestReceiver"),value:l.testReceiver,onChange:v=>{l.testReceiver=v.target.value},error:!!l.testReceiverError,helperText:l.testReceiverError||" "})}),confirmButtonText:t("common.confirm"),cancelButtonText:t("common.cancel"),async onConfirm(v){if(!l.testReceiver?.trim()){l.testReceiverError=t("notification.pushKit.receiverRequired");return}l.testReceiverError="",await N(o,T),v()}})}),F=u(o=>{const T=o?.trim();return T?H(T)?!0:t("notification.pushKit.endpointInvalid"):t("notification.pushKit.endpointRequired")}),L=u(()=>!0);return e.jsxs(R,{children:[e.jsxs(qe,{component:"form",onSubmit:E(C),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(h,{title:t("notification.pushKit.enable"),my:2.5,children:e.jsx(m,{name:"enabled",control:n,render:({field:o})=>e.jsx(V,{control:e.jsx($,{checked:o.value,...o})})})}),e.jsx(h,{title:t("notification.pushKit.endpoint"),children:e.jsx(m,{name:"endpoint",control:n,rules:{validate:a?F:L},render:({field:o})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...o,size:"small",required:!0,label:t("notification.pushKit.endpoint"),error:!!i.errors[o.name],helperText:i.errors[o.name]?.message||" ",disabled:!a})})})}),e.jsxs(h,{title:t("notification.pushKit.customOptions"),children:[e.jsx(m,{name:"did",control:n,render:({field:o})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...o,size:"small",label:t("notification.pushKit.did"),error:!!i.errors[o.name],helperText:i.errors[o.name]?.message||" ",disabled:!a})})}),e.jsx(m,{name:"pushPath",control:n,render:({field:o})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...o,size:"small",label:t("notification.pushKit.pushPath"),error:!!i.errors[o.name],helperText:i.errors[o.name]?.message||" ",disabled:!a})})})]}),e.jsxs(R,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(A,{variant:"outlined",color:"warning",onClick:E(W),disabled:!a,children:t("oauth.runTest")}),e.jsx(A,{type:"submit",variant:"contained",disabled:!i.isDirty,children:t("oauth.save")})]})]}),b]})}const qe=ie(ne)``,Y=[{label:e.jsx(R,{sx:{textAlign:"center",width:"100%"},children:"Email"}),value:"email"},{label:e.jsx(R,{sx:{textAlign:"center",width:"100%"},children:"Push Kit"}),value:"pushKit"}];function We(){const[c,s]=B.useState(Y[0].value),{locale:t}=B.useContext(xe),d=pe(()=>({email:e.jsx(Ce,{}),pushKit:e.jsx(_e,{})}),[t]),b=B.useMemo(()=>({padding:"10px 0"}),[]);return e.jsxs(R,{children:[e.jsx(ve,{tabs:Y,current:c,onChange:s}),e.jsx(R,{style:b,children:d[c]})]})}export{We as B};
1
+ import{aF as le,j as e,hA as ce,bd as ue,bn as Z,n as G,fP as ee,f9 as te,aP as re,cs as u,H as S,hB as M,M as R,v as x,hC as H,aU as V,P as p,ay as de,w as A,s as ie,aV as ne,A as me,z as fe,aH as he,r as B,g as xe,bz as pe}from"./index-C7egXf_h.js";import{T as ve}from"./html-title-vsl-TT26.js";import{u as se,C as m}from"./index.esm-DkqB0mnE.js";import{S as h,A as je,a as be,b as ge,c as ye}from"./collapse-UPIFGGD9.js";import{u as ae}from"./blocklet-C67aFvl7.js";import{S as $}from"./Switch-CE03jZ_8.js";const Re=le(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25"}));var K={exports:{}},O={exports:{}},z={exports:{}},J;function Te(){return J||(J=1,function(c,s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=t;function t(d){return d==null}c.exports=s.default,c.exports.default=s.default}(z,z.exports)),z.exports}var Q;function ke(){return Q||(Q=1,function(c,s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=E;var t=b(ce()),d=b(Te());function b(n){return n&&n.__esModule?n:{default:n}}var f=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,P=/^[-+]?[0-9]+$/;function E(n,i){(0,t.default)(n),i=i||{};var _=i.allow_leading_zeroes===!1?f:P,q=!i.hasOwnProperty("min")||(0,d.default)(i.min)||n>=i.min,l=!i.hasOwnProperty("max")||(0,d.default)(i.max)||n<=i.max,a=!i.hasOwnProperty("lt")||(0,d.default)(i.lt)||n<i.lt,C=!i.hasOwnProperty("gt")||(0,d.default)(i.gt)||n>i.gt;return _.test(n)&&q&&l&&a&&C}c.exports=s.default,c.exports.default=s.default}(O,O.exports)),O.exports}var X;function we(){return X||(X=1,function(c,s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=b;var t=d(ke());function d(f){return f&&f.__esModule?f:{default:f}}function b(f){return(0,t.default)(f,{allow_leading_zeroes:!1,min:0,max:65535})}c.exports=s.default,c.exports.default=s.default}(K,K.exports)),K.exports}var Se=we();const Ee=ue(Se),U={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:"",companyName:"",companyLink:"",companyAddress:"",supportEmail:""};function Ce(){const{api:c}=Z(),{blocklet:s}=ae(),{t}=G(),{confirmApi:d,confirmHolder:b}=ee(),f=s?.meta?.did,P=Object.assign({...U},s?.settings?.notification?.email||{}),{handleSubmit:E,control:n,formState:i,watch:_,reset:q}=se({defaultValues:te(P,Object.keys(U))}),l=re({testReceiver:"",testReceiverError:""}),a=_("enabled"),C=u(async(r,g,w=!0)=>{try{const{blocklet:y}=await c.configNotification({input:{did:f,notification:JSON.stringify({email:r})}}),oe=Object.assign({...U},y?.settings?.notification?.email||{});q(oe),w&&S.success(t("oauth.saveSuccess"))}catch(y){if(w)S.error(y.message||t("oauth.saveFailed"));else throw y}}),N=u(async(r,g,w)=>{try{i.isDirty&&await C(r,g,!1),await c.sendEmail({input:{did:f,receiver:w,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification",attachments:[{type:"link",data:{url:"https://community.arcblock.io",title:"Community",image:"https://community.arcblock.io/.well-known/service/blocklet/logo-rect-dark",utm:{campaign:"test-campaign"}}}],utm:{content:"test-email-button"}})}}),S.success(t("notification.email.testSuccess"))}catch(y){S.error(y.message||t("notification.email.testfailed"))}}),W=u((r,g)=>{l.testReceiver=localStorage.getItem("test-receiver")||"",l.testReceiverError="",d.open({title:t("notification.email.testSendEmail"),content:()=>e.jsx(R,{sx:{width:"300px"},children:e.jsx(x,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:t("notification.email.inputTestReceiver"),value:l.testReceiver,onChange:w=>{l.testReceiver=w.target.value},error:!!l.testReceiverError,helperText:l.testReceiverError||" "})}),confirmButtonText:t("common.confirm"),cancelButtonText:t("common.cancel"),async onConfirm(w){const y=l.testReceiver?.trim();if(!y){l.testReceiverError=t("notification.email.receiverRequired");return}if(!M(y)){l.testReceiverError=t("notification.email.receiverInvalid");return}l.testReceiverError="",await N(r,g,y),w()}})}),F=u(r=>{const g=r?.trim();return g?M(g)?!0:t("notification.email.fromInvalid"):t("notification.email.fromRequired")}),L=u(r=>{const g=r?.trim();return g?H(g,{require_host:!1,protocols:[]})?!0:t("notification.email.hostInvalid"):t("notification.email.hostRequired")}),o=u(r=>r?Ee(r)?!0:t("notification.email.portInvalid"):t("notification.email.portRequired")),T=u(r=>r?.trim()?!0:t("notification.email.userRequired")),v=u(r=>r?.trim()?!0:t("notification.email.passwordRequired")),k=u(r=>r?.trim()&&!H(r,{protocols:["http","https"],require_protocol:!0})?t("notification.email.linkInvalid"):!0),I=u(r=>r?.trim()&&!M(r)?t("notification.email.emailInvalid"):!0),j=u(()=>!0);return e.jsxs(R,{children:[e.jsxs(Pe,{component:"form",onSubmit:E(C),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(h,{title:t("notification.email.enable"),my:2.5,children:e.jsx(m,{name:"enabled",control:n,render:({field:r})=>e.jsx(V,{control:e.jsx($,{checked:r.value,...r})})})}),e.jsx(h,{title:t("notification.email.from"),children:e.jsx(m,{name:"from",control:n,rules:{validate:a?F:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,label:t("notification.email.from"),error:!!i.errors[r.name],helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.host"),children:e.jsx(m,{name:"host",control:n,rules:{validate:a?L:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,error:!!i.errors[r.name],label:t("notification.email.host"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.port"),children:e.jsx(m,{name:"port",control:n,rules:{validate:a?o:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,type:"number",error:!!i.errors[r.name],label:t("notification.email.port"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.user"),children:e.jsx(m,{name:"user",control:n,rules:{validate:a?T:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,error:!!i.errors[r.name],label:t("notification.email.user"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.password"),children:e.jsx(m,{name:"password",control:n,rules:{validate:a?v:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,type:"password",error:!!i.errors[r.name],label:t("notification.email.password"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.secure"),children:e.jsx(m,{name:"secure",control:n,rules:{validate:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(V,{control:e.jsx($,{checked:r.value,...r,disabled:!a})})})})}),e.jsxs(je,{children:[e.jsxs(be,{expandIcon:e.jsx(ge,{fontSize:"small"}),"aria-controls":"panel1-content",id:"panel1-header",children:[t("notification.email.signature"),e.jsx(de,{title:t("notification.email.signatureTooltip"),children:e.jsx(Re,{fontSize:"small",sx:{ml:1,cursor:"help"}})})]}),e.jsxs(ye,{children:[e.jsx(h,{title:t("notification.email.companyName"),children:e.jsx(m,{name:"companyName",control:n,rules:{validate:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",error:!!i.errors[r.name],label:t("notification.email.companyName"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.companyLink"),children:e.jsx(m,{name:"companyLink",control:n,rules:{validate:a?k:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",error:!!i.errors[r.name],label:t("notification.email.companyLink"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.companyAddress"),children:e.jsx(m,{name:"companyAddress",control:n,rules:{validate:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",error:!!i.errors[r.name],label:t("notification.email.companyAddress"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.supportEmail"),children:e.jsx(m,{name:"supportEmail",control:n,rules:{validate:a?I:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",type:"email",error:!!i.errors[r.name],label:t("notification.email.supportEmail"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})})]})]}),e.jsxs(R,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(A,{variant:"outlined",color:"warning",onClick:E(W),disabled:!a,children:t("oauth.runTest")}),e.jsx(A,{type:"submit",variant:"contained",disabled:!i.isDirty,children:t("oauth.save")})]})]}),b]})}const Pe=ie(ne)``,D={enabled:!1,endpoint:"",did:void 0,pushPath:void 0};function _e(){const{api:c}=Z(),{blocklet:s}=ae(),{t}=G(),{confirmApi:d,confirmHolder:b}=ee(),f=s?.meta?.did,P=Object.assign({...D},s?.settings?.notification?.pushKit||{}),{handleSubmit:E,control:n,formState:i,watch:_,reset:q}=se({defaultValues:te(P,Object.keys(D))}),l=re({testReceiver:"",testReceiverError:""}),a=_("enabled"),C=u(async(o,T,v=!0)=>{try{const{blocklet:k}=await c.configNotification({input:{did:f,notification:JSON.stringify({pushKit:o})}}),I=Object.assign({...D},k?.settings?.notification?.pushKit||{});q(I),v&&S.success(t("oauth.saveSuccess"))}catch(k){if(v)S.error(k.message||t("oauth.saveFailed"));else throw k}}),N=u(async(o,T)=>{try{i.isDirty&&await C(o,T,!1);const v=(s?.configs||[]).find(j=>j.key==="BLOCKLET_APP_URL")?.value,k=me(fe(v,he.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo"),{v:s?.meta?.version,t:new Date(s?.updatedAt||0).getTime()}),I={type:"passthrough",passthroughType:"messageStatus",data:{message:{title:"Test push-kit notification",body:"This is message from push-kit config test",sender:{did:s?.appDid,fullName:s?.meta?.title,avatar:k}}}};await c.sendPush({input:{did:f,receiver:l.testReceiver,notification:JSON.stringify(I)}}),S.success(t("notification.pushKit.testSuccess"))}catch(v){S.error(v.message||t("notification.pushKit.testfailed"))}}),W=u((o,T)=>{l.testReceiverError="",d.open({title:t("notification.pushKit.testSend"),content:()=>e.jsx(R,{sx:{width:"450px",maxWidth:"100%"},children:e.jsx(x,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:t("notification.pushKit.inputTestReceiver"),value:l.testReceiver,onChange:v=>{l.testReceiver=v.target.value},error:!!l.testReceiverError,helperText:l.testReceiverError||" "})}),confirmButtonText:t("common.confirm"),cancelButtonText:t("common.cancel"),async onConfirm(v){if(!l.testReceiver?.trim()){l.testReceiverError=t("notification.pushKit.receiverRequired");return}l.testReceiverError="",await N(o,T),v()}})}),F=u(o=>{const T=o?.trim();return T?H(T)?!0:t("notification.pushKit.endpointInvalid"):t("notification.pushKit.endpointRequired")}),L=u(()=>!0);return e.jsxs(R,{children:[e.jsxs(qe,{component:"form",onSubmit:E(C),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(h,{title:t("notification.pushKit.enable"),my:2.5,children:e.jsx(m,{name:"enabled",control:n,render:({field:o})=>e.jsx(V,{control:e.jsx($,{checked:o.value,...o})})})}),e.jsx(h,{title:t("notification.pushKit.endpoint"),children:e.jsx(m,{name:"endpoint",control:n,rules:{validate:a?F:L},render:({field:o})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...o,size:"small",required:!0,label:t("notification.pushKit.endpoint"),error:!!i.errors[o.name],helperText:i.errors[o.name]?.message||" ",disabled:!a})})})}),e.jsxs(h,{title:t("notification.pushKit.customOptions"),children:[e.jsx(m,{name:"did",control:n,render:({field:o})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...o,size:"small",label:t("notification.pushKit.did"),error:!!i.errors[o.name],helperText:i.errors[o.name]?.message||" ",disabled:!a})})}),e.jsx(m,{name:"pushPath",control:n,render:({field:o})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...o,size:"small",label:t("notification.pushKit.pushPath"),error:!!i.errors[o.name],helperText:i.errors[o.name]?.message||" ",disabled:!a})})})]}),e.jsxs(R,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(A,{variant:"outlined",color:"warning",onClick:E(W),disabled:!a,children:t("oauth.runTest")}),e.jsx(A,{type:"submit",variant:"contained",disabled:!i.isDirty,children:t("oauth.save")})]})]}),b]})}const qe=ie(ne)``,Y=[{label:e.jsx(R,{sx:{textAlign:"center",width:"100%"},children:"Email"}),value:"email"},{label:e.jsx(R,{sx:{textAlign:"center",width:"100%"},children:"Push Kit"}),value:"pushKit"}];function We(){const[c,s]=B.useState(Y[0].value),{locale:t}=B.useContext(xe),d=pe(()=>({email:e.jsx(Ce,{}),pushKit:e.jsx(_e,{})}),[t]),b=B.useMemo(()=>({padding:"10px 0"}),[]);return e.jsxs(R,{children:[e.jsx(ve,{tabs:Y,current:c,onChange:s}),e.jsx(R,{style:b,children:d[c]})]})}export{We as B};
@@ -1 +1 @@
1
- import{bd as x}from"./index-DGSsefUZ.js";function D(a,i){for(var r=0;r<i.length;r++){const e=i[r];if(typeof e!="string"&&!Array.isArray(e)){for(const s in e)if(s!=="default"&&!(s in a)){const t=Object.getOwnPropertyDescriptor(e,s);t&&Object.defineProperty(a,s,t.get?t:{enumerable:!0,get:()=>e[s]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var l,w;function J(){if(w)return l;w=1;var a={default:l,call:function(i,r,e){var s="";typeof r=="function"&&(e=r,r={});var t={data:r===void 0?null:r};if(typeof e=="function"){var d="dscb"+window.dscb++;window[d]=e,t._dscbstub=d}return t=JSON.stringify(t),window._dsbridge?s=_dsbridge.call(i,t):(window._dswk||navigator.userAgent.indexOf("_dsbridge")!=-1)&&(s=prompt("_dsbridge="+i,t)),JSON.parse(s||"{}").data},register:function(i,r,e){var s=e?window._dsaf:window._dsf;window._dsInit||(window._dsInit=!0,setTimeout(function(){a.call("_dsb.dsinit")},0)),typeof r=="object"?s._obs[i]=r:s[i]=r},registerAsyn:function(i,r){this.register(i,r,!0)},hasNativeMethod:function(i,r){return this.call("_dsb.hasNativeMethod",{name:i,type:r||"all"})},disableJavascriptDialogBlock:function(i){this.call("_dsb.disableJavascriptDialogBlock",{disable:i!==!1})}};return function(){if(!window._dsf){var i={_dsf:{_obs:{}},_dsaf:{_obs:{}},dscb:0,dsBridge:a,close:function(){a.call("_dsb.closePage")},_handleMessageFromNative:function(e){var s=JSON.parse(e.data),t={id:e.callbackId,complete:!0},d=this._dsf[e.method],o=this._dsaf[e.method],v=function(_,p){t.data=_.apply(p,s),a.call("_dsb.returnValue",t)},g=function(_,p){s.push(function(O,j){t.data=O,t.complete=j!==!1,a.call("_dsb.returnValue",t)}),_.apply(p,s)};if(d)v(d,this._dsf);else if(o)g(o,this._dsaf);else{var u=e.method.split(".");if(u.length<2)return;var b=u.pop(),h=u.join("."),c=this._dsf._obs,f=c[h]||{},n=f[b];if(n&&typeof n=="function"){v(n,f);return}if(c=this._dsaf._obs,f=c[h]||{},n=f[b],n&&typeof n=="function"){g(n,f);return}}}};for(var r in i)window[r]=i[r];a.register("_hasJavascriptMethod",function(e,s){var t=e.split(".");if(t.length<2)return!!(_dsf[t]||_dsaf[t]);var e=t.pop(),d=t.join("."),o=_dsf._obs[d]||_dsaf._obs[d];return o&&!!o[e]})}}(),l=a,l}var y=J();const N=x(y),k=D({__proto__:null,default:N},[y]);export{k as i};
1
+ import{bd as x}from"./index-C7egXf_h.js";function D(a,i){for(var r=0;r<i.length;r++){const e=i[r];if(typeof e!="string"&&!Array.isArray(e)){for(const s in e)if(s!=="default"&&!(s in a)){const t=Object.getOwnPropertyDescriptor(e,s);t&&Object.defineProperty(a,s,t.get?t:{enumerable:!0,get:()=>e[s]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var l,w;function J(){if(w)return l;w=1;var a={default:l,call:function(i,r,e){var s="";typeof r=="function"&&(e=r,r={});var t={data:r===void 0?null:r};if(typeof e=="function"){var d="dscb"+window.dscb++;window[d]=e,t._dscbstub=d}return t=JSON.stringify(t),window._dsbridge?s=_dsbridge.call(i,t):(window._dswk||navigator.userAgent.indexOf("_dsbridge")!=-1)&&(s=prompt("_dsbridge="+i,t)),JSON.parse(s||"{}").data},register:function(i,r,e){var s=e?window._dsaf:window._dsf;window._dsInit||(window._dsInit=!0,setTimeout(function(){a.call("_dsb.dsinit")},0)),typeof r=="object"?s._obs[i]=r:s[i]=r},registerAsyn:function(i,r){this.register(i,r,!0)},hasNativeMethod:function(i,r){return this.call("_dsb.hasNativeMethod",{name:i,type:r||"all"})},disableJavascriptDialogBlock:function(i){this.call("_dsb.disableJavascriptDialogBlock",{disable:i!==!1})}};return function(){if(!window._dsf){var i={_dsf:{_obs:{}},_dsaf:{_obs:{}},dscb:0,dsBridge:a,close:function(){a.call("_dsb.closePage")},_handleMessageFromNative:function(e){var s=JSON.parse(e.data),t={id:e.callbackId,complete:!0},d=this._dsf[e.method],o=this._dsaf[e.method],v=function(_,p){t.data=_.apply(p,s),a.call("_dsb.returnValue",t)},g=function(_,p){s.push(function(O,j){t.data=O,t.complete=j!==!1,a.call("_dsb.returnValue",t)}),_.apply(p,s)};if(d)v(d,this._dsf);else if(o)g(o,this._dsaf);else{var u=e.method.split(".");if(u.length<2)return;var b=u.pop(),h=u.join("."),c=this._dsf._obs,f=c[h]||{},n=f[b];if(n&&typeof n=="function"){v(n,f);return}if(c=this._dsaf._obs,f=c[h]||{},n=f[b],n&&typeof n=="function"){g(n,f);return}}}};for(var r in i)window[r]=i[r];a.register("_hasJavascriptMethod",function(e,s){var t=e.split(".");if(t.length<2)return!!(_dsf[t]||_dsaf[t]);var e=t.pop(),d=t.join("."),o=_dsf._obs[d]||_dsaf._obs[d];return o&&!!o[e]})}}(),l=a,l}var y=J();const N=x(y),k=D({__proto__:null,default:N},[y]);export{k as i};