@abtnode/webapp 1.17.4 → 1.17.5-beta-20251208-123021-e8c53f96
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.
- package/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{AdapterDayjs-AIDIzsfb.js → AdapterDayjs-D92-n47b.js} +1 -1
- package/dist/assets/{Add-l7OvfXrD.js → Add-Dv85KL5N.js} +1 -1
- package/dist/assets/ArrowDropDown-CPeg07nO.js +1 -0
- package/dist/assets/{Autocomplete-Bme-ElpV.js → Autocomplete-DVV2RD2A.js} +1 -1
- package/dist/assets/{Breadcrumbs-Bf0qzrkp.js → Breadcrumbs-C7NX6NEA.js} +1 -1
- package/dist/assets/{ButtonGroup-CMlvIctd.js → ButtonGroup-C6xSllEr.js} +1 -1
- package/dist/assets/{CSSTransition-Cf_KzaPo.js → CSSTransition-BnYuNWzI.js} +1 -1
- package/dist/assets/{CallMerge-DaaiIZ0e.js → CallMerge-DYEM4wZM.js} +1 -1
- package/dist/assets/{CardContent-gyrk9EIw.js → CardContent-cV0ZtLFb.js} +1 -1
- package/dist/assets/{ChevronLeft-OivB2aTv.js → ChevronLeft-DaNTS9Ry.js} +1 -1
- package/dist/assets/{ChevronRight-CV3PmYHH.js → ChevronRight-DMRng8w4.js} +1 -1
- package/dist/assets/{Clear-Cz6Yzx0g.js → Clear-DYWNGGPP.js} +1 -1
- package/dist/assets/{DeleteOutline-DmEDUBgP.js → DeleteOutline-C9hdvFLW.js} +1 -1
- package/dist/assets/{Done-BuJjZzMV.js → Done-CEq9fQ91.js} +1 -1
- package/dist/assets/{Edit-HxzEBQ9h.js → Edit-T_ynXw3J.js} +1 -1
- package/dist/assets/{ErrorOutline-CUOja7My.js → ErrorOutline-CQZdYJL-.js} +1 -1
- package/dist/assets/{FilterList-xUYmSJ-Y.js → FilterList-C0g86vDh.js} +1 -1
- package/dist/assets/{Google-cG0hx3oK.js → Google-sh3pICro.js} +1 -1
- package/dist/assets/{HelpOutline-DapRasSH.js → HelpOutline-CDfUVKlB.js} +1 -1
- package/dist/assets/{KeyboardArrowDown-9mIUY7eq.js → KeyboardArrowDown-BCCwKNMP.js} +1 -1
- package/dist/assets/{Launch-DITLracb.js → Launch-Cy-Ri5E0.js} +1 -1
- package/dist/assets/{Link-DGt16osR.js → Link-LRqXezP_.js} +1 -1
- package/dist/assets/{ListItemButton-Cs40YHcx.js → ListItemButton-D_BFfEfg.js} +1 -1
- package/dist/assets/{ListSubheader-l4UAKUMT.js → ListSubheader-DVUYAhXC.js} +1 -1
- package/dist/assets/{LoadingButton-D6uT1qbm.js → LoadingButton--tsix-yw.js} +1 -1
- package/dist/assets/{MoreVert-BUlWqUnK.js → MoreVert-D2cSYolp.js} +1 -1
- package/dist/assets/{OpenInNew-CCi7ydva.js → OpenInNew-KWw6IL4k.js} +1 -1
- package/dist/assets/{Refresh-CGgBW-me.js → Refresh-DWTzO6Zf.js} +1 -1
- package/dist/assets/{Search-3L2yy5pr.js → Search-soT1P5WL.js} +1 -1
- package/dist/assets/{Stepper-D4Zig93k.js → Stepper-CO2wnCjY.js} +1 -1
- package/dist/assets/{Switch-B-AVsYNw.js → Switch-CYCG_kxE.js} +1 -1
- package/dist/assets/{TableSearch-CAaRXXpO.js → TableSearch-BJJrOkE2.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-uvIn6Jyh.js → ToggleButtonGroup-Dl-zl-V4.js} +1 -1
- package/dist/assets/{UnfoldMore-DcBVcc2h.js → UnfoldMore-XLA7xpTo.js} +1 -1
- package/dist/assets/{Verified-BpzZH8QJ.js → Verified-Blm2AEgo.js} +1 -1
- package/dist/assets/{VerifiedUser-B-ONuNVC.js → VerifiedUser-DitkeanA.js} +1 -1
- package/dist/assets/{ViewList-CvnWfuPG.js → ViewList-dS2IrLuW.js} +1 -1
- package/dist/assets/{_createAggregator-CqUOxBsA.js → _createAggregator-CQmKIqh9.js} +1 -1
- package/dist/assets/{actions-Dv4j7XcE.js → actions-C_YtyiJN.js} +1 -1
- package/dist/assets/{actions-DVOuh-Fv.js → actions-CqTr_UpD.js} +1 -1
- package/dist/assets/{agreement-ttzsGTtZ.js → agreement-CB8zAClF.js} +1 -1
- package/dist/assets/api-gDzILycU.js +1 -0
- package/dist/assets/{appearance-BoEskUU3.js → appearance-CvBqnNxC.js} +1 -1
- package/dist/assets/{audit-logs-BjJ1_rVq.js → audit-logs-DG20CWcK.js} +1 -1
- package/dist/assets/{base-chart-AQkuFrPC.js → base-chart-hRqEcUf1.js} +1 -1
- package/dist/assets/{blocklet-D2MB-zOx.js → blocklet-4xcBoALi.js} +1 -1
- package/dist/assets/{chain-l1zX37z1.js → chain-4NohS0Y9.js} +1 -1
- package/dist/assets/{click-to-copy-D16LYOaz.js → click-to-copy-Xg1hTHwq.js} +1 -1
- package/dist/assets/cloneDeep-o7Kp18y-.js +1 -0
- package/dist/assets/{collapse-DjVUQHBf.js → collapse-CvIW0hIW.js} +1 -1
- package/dist/assets/{config-navigation-D5cL0ut2.js → config-navigation-BHLHrDuf.js} +3 -3
- package/dist/assets/{connect-to-MJFTP0S_.js → connect-to-BzOsNzCo.js} +1 -1
- package/dist/assets/{cssMode-Fsxj3561.js → cssMode-CtAuRBnQ.js} +1 -1
- package/dist/assets/{delete-confirm-xUATcCih.js → delete-confirm-CmK028cX.js} +1 -1
- package/dist/assets/{depsEqual-BNz3Z5UN.js → depsEqual-D4SkOvpW.js} +1 -1
- package/dist/assets/{detail-cazmKFj_.js → detail-39U2ZB1M.js} +3 -3
- package/dist/assets/{domains-vCwCURM3.js → domains-D2j6_7aU.js} +1 -1
- package/dist/assets/{download-O9kMYIC6.js → download-fdrmqknu.js} +1 -1
- package/dist/assets/{edit.svg-B0aHUSZw.js → edit.svg-BCm3ag4u.js} +1 -1
- package/dist/assets/emotion-cache.browser.esm-B1_0wYNC.js +1 -0
- package/dist/assets/engine-D2zNg6-2.js +1 -0
- package/dist/assets/{freemarker2-DajhvZDQ.js → freemarker2-CTfgMDhs.js} +1 -1
- package/dist/assets/{get-safe-url-B_yWzv49.js → get-safe-url-nXPF2sGJ.js} +1 -1
- package/dist/assets/getValidReactChildren-CIqQKAkN.js +1 -0
- package/dist/assets/{graphqlMode-DQTpyvXV.js → graphqlMode-B6W6zwCs.js} +2 -2
- package/dist/assets/{handlebars-CFycpwy_.js → handlebars-DOdON862.js} +1 -1
- package/dist/assets/{html-fOaqMnCB.js → html-DEp9zO-t.js} +1 -1
- package/dist/assets/{html-title-xzTyg8m0.js → html-title-D-skaBwb.js} +1 -1
- package/dist/assets/{htmlMode-DwojGB9N.js → htmlMode-BsvwfKqY.js} +1 -1
- package/dist/assets/{iframe-DhbAf7eB.js → iframe-DyfK1MII.js} +1 -1
- package/dist/assets/{index-Bvn9twlG.js → index-3WfGtOlv.js} +1 -1
- package/dist/assets/{index-XgkYfld7.js → index-AqKhw9Wu.js} +3 -3
- package/dist/assets/{index-CEPQQlo6.js → index-B1omHpBR.js} +1 -1
- package/dist/assets/{index-DvBW_mZc.js → index-B9vFJyc6.js} +1 -1
- package/dist/assets/{index-yORTeDE5.js → index-BAeHHGc5.js} +1 -1
- package/dist/assets/{index-Cacyj92F.js → index-BFwfrWj_.js} +1 -1
- package/dist/assets/{index-kFk_mggT.js → index-BHRDAZr5.js} +1 -1
- package/dist/assets/{index-CprJrzzj.js → index-BKYNnQgG.js} +1 -1
- package/dist/assets/{index-jIRER_d6.js → index-BR2CcckZ.js} +1 -1
- package/dist/assets/{index-CBrQ9aZ7.js → index-Beqyq0Xy.js} +1 -1
- package/dist/assets/{index-CGtaecKe.js → index-Bmeli3vt.js} +1 -1
- package/dist/assets/{index-DBOqxRpP.js → index-BoBukMl6.js} +1 -1
- package/dist/assets/{index-B-V1EiVF.js → index-Boc_ElPU.js} +1 -1
- package/dist/assets/{index-DcXoiIcd.js → index-Bpl7ZPdw.js} +1 -1
- package/dist/assets/{index-BCEB7zAW.js → index-BqOHFDpP.js} +1 -1
- package/dist/assets/{index-BACYRg7R.js → index-BsFiddFP.js} +9 -9
- package/dist/assets/{index-KR6tqxjN.js → index-Bzt3kp1o.js} +1 -1
- package/dist/assets/{index-BhmdgQ6h.js → index-C1FfiSCs.js} +1 -1
- package/dist/assets/{index-iLcm3xJO.js → index-C3owZL72.js} +1 -1
- package/dist/assets/{index-BlnAC-LC.js → index-C9N-dK-U.js} +1 -1
- package/dist/assets/{index-BzMgQhvT.js → index-CAfX9jEw.js} +1 -1
- package/dist/assets/{index-DkBdKcP-.js → index-CB9i2iit.js} +1 -1
- package/dist/assets/{index-BI2RNyn2.js → index-CEA-JNUf.js} +1 -1
- package/dist/assets/{index-BbWPK5o6.js → index-CFPB3xkO.js} +1 -1
- package/dist/assets/{index-BsntE0No.js → index-CJ-WZj-1.js} +1 -1
- package/dist/assets/{index-Cl5G4tna.js → index-CO1fNIoe.js} +3 -3
- package/dist/assets/{index-i28M3WTw.js → index-CSmLj9hN.js} +1 -1
- package/dist/assets/{index-4yUut_bV.js → index-CVvQ2yKp.js} +1 -1
- package/dist/assets/index-CpC6KyFR.js +1 -0
- package/dist/assets/{index-CO0vAndr.js → index-D0Nij003.js} +1 -1
- package/dist/assets/{index-CPLXcmCK.js → index-D9OyVcfq.js} +3 -3
- package/dist/assets/{index-BFqAcspj.js → index-DCo3tzgk.js} +2 -2
- package/dist/assets/{index-hu34K3US.js → index-DIdPY5JS.js} +1 -1
- package/dist/assets/{index-BZw-IddS.js → index-DLm3d5Lz.js} +1 -1
- package/dist/assets/{index-CCv_8omK.js → index-DaEjX2SO.js} +5 -5
- package/dist/assets/{index-DeYmBhXX.js → index-DeOpdMmq.js} +1 -1
- package/dist/assets/{index-BddlETK4.js → index-DfJQllIT.js} +1 -1
- package/dist/assets/{index-B_8MhQGp.js → index-DikEqQbY.js} +3 -3
- package/dist/assets/{index-BftkyDmu.js → index-DrkFgZdM.js} +1 -1
- package/dist/assets/{index-g_RqxcM4.js → index-DyCZ__uc.js} +1 -1
- package/dist/assets/{index-BEOeUot7.js → index-JD_f3m8u.js} +1 -1
- package/dist/assets/{index-COT6fHf0.js → index-RqR7C4_G.js} +1 -1
- package/dist/assets/{index-aZqjDrOh.js → index-T2sa7QI9.js} +1 -1
- package/dist/assets/{index-4-FW3N_0.js → index-Uf4kWlzq.js} +1 -1
- package/dist/assets/{index-gqKcev8E.js → index-ZtBV9VDq.js} +1 -1
- package/dist/assets/{index-0EXUatvL.js → index-xhxy4seW.js} +1 -1
- package/dist/assets/{index.esm-Bsyk9Gld.js → index.esm-Di7pxRR7.js} +1 -1
- package/dist/assets/{install-from-url-4VtQ9_35.js → install-from-url-BYJQqH88.js} +1 -1
- package/dist/assets/{invitation-B5QYli1h.js → invitation-DhpFShM_.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-RoIvuAJE.js → is-path-prefix-equal-jo7g0Qmd.js} +1 -1
- package/dist/assets/{item-CjFxs-Zt.js → item-D6K3xZvf.js} +1 -1
- package/dist/assets/{javascript-luLw15rJ.js → javascript-DcFlp6iK.js} +1 -1
- package/dist/assets/{jsonMode-Cxdqt0IL.js → jsonMode-RPWtRIbN.js} +1 -1
- package/dist/assets/{liquid-D1qp1ZF3.js → liquid-Dd2yvvP7.js} +1 -1
- package/dist/assets/{list-header-D-U957cP.js → list-header-BEqD50lj.js} +1 -1
- package/dist/assets/{lock.svg-Dz9J-uBq.js → lock.svg-CqbkAjfs.js} +1 -1
- package/dist/assets/{log--2ZY9nHz.js → log-CJyQvDex.js} +1 -1
- package/dist/assets/{lottie-react.esm-C6caiayN.js → lottie-react.esm-CkMUkUNW.js} +1 -1
- package/dist/assets/{mdx-Dzy-X9qt.js → mdx-BD-ePdgm.js} +1 -1
- package/dist/assets/{memory-r4Kexlry.js → memory-C2g1lVx4.js} +1 -1
- package/dist/assets/{metric-BTKuNvY9.js → metric-Ce6h_fps.js} +1 -1
- package/dist/assets/omit-dFmEevUc.js +1 -0
- package/dist/assets/{overview-CFHOUNfH.js → overview-DIJq7smI.js} +1 -1
- package/dist/assets/{permission-RtK6f5af.js → permission-DHDlX-2p.js} +1 -1
- package/dist/assets/{preference-C7Ge_XOi.js → preference-BFNujwfR.js} +3 -3
- package/dist/assets/{python-hpNfnPxJ.js → python-CSfuDNWh.js} +1 -1
- package/dist/assets/{raf-schd.esm-rR8pKw9W.js → raf-schd.esm-C7cnOwIv.js} +1 -1
- package/dist/assets/{razor-BI0kEBq5.js → razor-PrxsK0Yf.js} +1 -1
- package/dist/assets/{rotate-session-key-B6NXbgEc.js → rotate-session-key-DlCO0JRQ.js} +1 -1
- package/dist/assets/{runtime-CVAdQ8wh.js → runtime-DGTHh6A9.js} +1 -1
- package/dist/assets/schema-CEPuPgwv.js +1 -0
- package/dist/assets/sdk-D8tCPukn.js +1 -0
- package/dist/assets/{service-Cy6pWzv_.js → service-Bh0rr8zW.js} +1 -1
- package/dist/assets/{shorten-label-CvhqR616.js → shorten-label-BS4FNgmI.js} +1 -1
- package/dist/assets/{simple-select-Dqs9YolY.js → simple-select-Dkbl-a1m.js} +1 -1
- package/dist/assets/{spaces-Dif7Qa2a.js → spaces-BTKqW9YY.js} +1 -1
- package/dist/assets/{status-DIqT0--1.js → status-DTDPbaoZ.js} +1 -1
- package/dist/assets/{status-Dcx3B-gc.js → status-Dgr7tZJl.js} +1 -1
- package/dist/assets/{switch-control-BLvkR0UT.js → switch-control-bRPrVj4O.js} +1 -1
- package/dist/assets/{table-icons-DHCKcouf.js → table-icons-DaKDKKxZ.js} +1 -1
- package/dist/assets/{team-BV9bl_r7.js → team-DdhNY9E2.js} +1 -1
- package/dist/assets/{toLower-CL0ukT8_.js → toLower-DC-Tk5Hb.js} +1 -1
- package/dist/assets/toUpper-DglD32bj.js +1 -0
- package/dist/assets/{traffic-DrN7qkrg.js → traffic-9tAQAbVA.js} +1 -1
- package/dist/assets/{tsMode-Bqd_EuMj.js → tsMode-B19hnwr8.js} +1 -1
- package/dist/assets/{typescript-BVOjm5kD.js → typescript-C9cjacUF.js} +1 -1
- package/dist/assets/{url-evaluation-B5iexDQo.js → url-evaluation-Dm_mNoMs.js} +1 -1
- package/dist/assets/{url-join-DGMfgD17.js → url-join-BgacTiZS.js} +1 -1
- package/dist/assets/{use-mobile-DvM8SqYH.js → use-mobile-CWB6Jtv1.js} +1 -1
- package/dist/assets/{use-mobile-DyKd7giP.js → use-mobile-D6E5km4P.js} +1 -1
- package/dist/assets/{useAsync-DRXRxEMN.js → useAsync-CyivJzD4.js} +1 -1
- package/dist/assets/{useAsyncRetry-l2Si2r3C.js → useAsyncRetry-BDLoOcvn.js} +1 -1
- package/dist/assets/{useLocalStorage-CbBU4OS9.js → useLocalStorage-Df3_jlsm.js} +1 -1
- package/dist/assets/{useThemeProps-CRd6upHX.js → useThemeProps-R3T9xrvH.js} +1 -1
- package/dist/assets/{util-CziUIk8v.js → util-BDvErAjW.js} +1 -1
- package/dist/assets/{wait-container-CCe_xsZw.js → wait-container-B1wIefva.js} +1 -1
- package/dist/assets/{without-wallet-DcI5W8cf.js → without-wallet-DQfnDo2u.js} +1 -1
- package/dist/assets/wrap-locale-l_P1jXYo.js +1 -0
- package/dist/assets/{xml-86YzaLiM.js → xml-a8bUYHho.js} +1 -1
- package/dist/assets/{yaml-hqPmcqsD.js → yaml-Cp0Ib5KC.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/ArrowDropDown-Br_oPfQI.js +0 -1
- package/dist/assets/api-CWyPHkC_.js +0 -1
- package/dist/assets/cloneDeep-BOd1J0Sv.js +0 -1
- package/dist/assets/emotion-cache.browser.esm-CdT-VIlA.js +0 -1
- package/dist/assets/engine-7ix2eBzw.js +0 -1
- package/dist/assets/getValidReactChildren-BQH98pcn.js +0 -1
- package/dist/assets/index-BiAAgnpw.js +0 -1
- package/dist/assets/omit-BwCXmJ0x.js +0 -1
- package/dist/assets/schema-Dsc1QRMh.js +0 -1
- package/dist/assets/sdk-BJ8ul4G_.js +0 -1
- package/dist/assets/toUpper-CcZcHFDe.js +0 -1
- package/dist/assets/wrap-locale-B1uKF2jP.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
import{c1 as qf,c0 as Vf,r as I,c2 as Kf,eT as Yf,j as g,b9 as ot,c4 as nt,c5 as Jf,hz as Xf,hA as Qf,gx as Zf,du as ep,hB as tp,dv as rp,bR as ac,bS as np,bP as ip,bQ as op,bU as sc,dy as Gn,hC as ap,eD as sp,hn as lp,gR as cp,dF as up,gO as lc,hD as dp,gB as fp,fp as pp,eE as hp,ha as gp,V as Me,a3 as Qe,y as Ie,aH as be,aP as zt,c8 as Et,i as vp,fa as mp,eO as bp,hq as yp,dx as Rr,ez as vr,di as cc,dC as xp,hE as Sp,dB as uc,be as $n,dO as nr,hF as F,e_ as K,eH as wp,hG as Yr,bf as Q,o as x,dM as Wn,aQ as Do,hH as Po,cB as er,aD as xe,b as pt,K as oe,ag as Cp,aT as se,ba as _o,dD as Yt,T as me,a4 as Ae,b2 as Ui,bB as xt,hI as Ip,bo as dc,E as Hn,hJ as Rp,hK as Tp,t as it,fn as Rn,O as Dp,bs as Ve,fd as fc,C as pc,bK as Pp,hL as ka,M as ko,f9 as _p,f6 as hc,H as Ot,P as gc,$ as vc,v as Tn,hM as mc,f as jt,dL as kp,bz as Op,gF as bc,dJ as Or,a7 as Ep,a8 as Np,hN as Oa,hO as yc,hP as Mp,hQ as Ap,hR as Un,fe as Lp,g8 as zp,g9 as jp,ge as qn,bE as Le,hS as Fp,h6 as Bp,hT as Gp,hU as $p,gK as Wp,hV as Dn,hW as xc,L as Sc,z as Vn,hX as Ea,hY as wc,hZ as qi,h_ as Hp,h$ as Up,s as cr,i0 as qp,f5 as Vp,cA as Cc,i1 as Kp,bH as Yp,i2 as Jp,dI as Ye,D as Xp,X as Qp,cw as Zp,i3 as eh,b0 as th,bh as Na,R as Pn,a9 as Ma,i4 as rh,i5 as nh,i6 as ih,i7 as oh,i8 as Ic,i9 as ah,aB as Rc,f0 as Tc,ia as Oo,ib as sh,hj as Dc,ic as lh,b6 as ch,cF as Jt,id as uh,cU as dh,ie as fh,d3 as ph,G as Aa,dq as ui,eI as La,dN as hh,ig as gh,a5 as Pc,Y as za,ih as ja,Q as vh,S as Fa}from"./index-CCv_8omK.js";import{r as mh}from"./omit-BwCXmJ0x.js";import{r as bh}from"./cloneDeep-BOd1J0Sv.js";import{r as yh}from"./index-DvBW_mZc.js";import{c as xh,u as Sh}from"./_createAggregator-CqUOxBsA.js";import{u as Ft}from"./blocklet-D2MB-zOx.js";import{H as wh,G as Ch,M as Ih,N as Rh,O as Ba,K as Th,L as Dh}from"./index-hu34K3US.js";import{_ as Se,a as we,b as $e,c as We,d as He,e as Ph,f as _c,u as fe,g as ne,r as Fr,w as _n,h as kc,i as Bt,j as Oc,k as _h,l as kh,o as Vi}from"./raf-schd.esm-rR8pKw9W.js";import{_ as A,b as Ga,c as Oh,a as Eh,d as Nh}from"./redux-DfszZyTl.js";import{_ as Mh}from"./typeof-QjJsDpFa.js";import{u as Ec,b as Ah}from"./team-BV9bl_r7.js";import{b as Lh}from"./actions-DVOuh-Fv.js";import{u as zh,a as jh,C as lt}from"./index.esm-Bsyk9Gld.js";import{S as Ki}from"./simple-select-Dqs9YolY.js";import{b as Fh,a as $a}from"./html-title-xzTyg8m0.js";import{C as Nc}from"./Clear-Cz6Yzx0g.js";import{A as Bh}from"./ArrowDropDown-Br_oPfQI.js";import{a as Gh}from"./api-CWyPHkC_.js";import{A as $h}from"./Autocomplete-Bme-ElpV.js";import{L as Wh}from"./ListItemButton-Cs40YHcx.js";import{u as Mc}from"./use-mobile-DyKd7giP.js";import{u as Hh}from"./index-BZw-IddS.js";import{d as Uh}from"./KeyboardArrowDown-9mIUY7eq.js";import{S as qh}from"./Search-3L2yy5pr.js";import{A as Vh}from"./Add-l7OvfXrD.js";import{O as Kh}from"./OpenInNew-CCi7ydva.js";import{t as Yh}from"./index-gqKcev8E.js";import{I as Jh}from"./iframe-DhbAf7eB.js";import{B as di}from"./ButtonGroup-CMlvIctd.js";import{L as Wa}from"./LoadingButton-D6uT1qbm.js";import"./depsEqual-BNz3Z5UN.js";import"./url-evaluation-B5iexDQo.js";import"./useLocalStorage-CbBU4OS9.js";import"./MoreVert-BUlWqUnK.js";import"./get-safe-url-B_yWzv49.js";import"./permission-RtK6f5af.js";import"./ListSubheader-l4UAKUMT.js";import"./getValidReactChildren-BQH98pcn.js";function Xh(e){return qf("MuiListItemAvatar",e)}Vf("MuiListItemAvatar",["root","alignItemsFlexStart"]);const Qh=e=>{const{alignItems:r,classes:n}=e;return Jf({root:["root",r==="flex-start"&&"alignItemsFlexStart"]},Xh,n)},Zh=ot("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.root,n.alignItems==="flex-start"&&r.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),Ha=I.forwardRef(function(r,n){const t=Kf({props:r,name:"MuiListItemAvatar"}),{className:i,...o}=t,a=I.useContext(Yf),s={...t,alignItems:a.alignItems},l=Qh(s);return g.jsx(Zh,{className:nt(l.root,i),ownerState:s,ref:n,...o})});var eg=Xf(function(){return Qf?sessionStorage:void 0});function tg(e,r){return Zf(r,function(n){return e[n]})}function rg(e){return e==null?[]:tg(e,ep(e))}var ng=tp.isFinite;function Ua(e){return typeof e=="number"&&ng(e)}function ig(e){return typeof e=="number"&&e==rp(e)}var og=xh(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const ag=Object.freeze(Object.defineProperty({__proto__:null,default:og},Symbol.toStringTag,{value:"Module"}));var sg=ac(function(e){var r=np(e);return r=typeof r=="function"?r:void 0,ip(op(e,1,sc,!0),void 0,r)});const lg=Object.freeze(Object.defineProperty({__proto__:null,default:sg},Symbol.toStringTag,{value:"Module"}));var Ac=ac(function(e,r){return sc(e)?Lh(e,r):[]}),mr={};const cg=Gn(lg),ug=Gn(ap),dg=Gn(ag);var qa;function fg(){return qa||(qa=1,function(e){var r=mr&&mr.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=ie,e.deepWalk=w,e.isMatchSection=P,e.nestNavigationList=ee,e.filterNavigation=X,e.cleanOrphanNavigation=Z,e.joinLink=j,e.flattenNavigation=M,e.splitNavigationBySection=J;const n=sp(),t=r(cg),i=r(lp),o=r(cp),a=r(ug),s=r(up),l=r(mh),c=r(bh),u=gp(),f=r(yh()),d=r(lc()),p=r(dp),h=r(fp),v=r(dg),m=pp(),y=hp();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return y.checkLink}});const b="header",C="/",D="/",_="/";function w($,W=()=>{},{key:L="children",order:N="first"}={}){function O(U,{index:te=0,parent:ae=null,level:de=0}={}){Array.isArray(U)?U.forEach((pe,Ce)=>{O(pe,{index:Ce,parent:ae,level:de+1})}):U&&(N==="first"&&W(U,ae,{index:te,level:de}),O(U[L],{parent:U,level:de}),N==="last"&&W(U,ae,{index:te,level:de}))}O($)}function P($,W){return W===b&&(0,a.default)($)?!0:Array.isArray($)?$.includes(W):$===W}function S($){try{return JSON.parse($)}catch{return $}}function T($){return $.map(W=>{const L={...W};return L.role&&(L.role=S(L.role)),L.section&&(L.section=S(L.section)),L.title&&(L.title=S(L.title)),L.description&&(L.description=S(L.description)),L.link&&(L.link=S(L.link)),L})}function R($="/",W=""){if((0,d.default)(W||""))return W;const L=f.default.join($,W||D);return L.length>1&&L.endsWith("/")?L.slice(0,L.length-1):L}function k($,W,{strict:L=!0}={}){let N=$,O=W;return L||(N=N||"/",O=O||"/"),(0,p.default)(N)&&(0,h.default)(O)&&(0,y.checkLink)(O)?Object.keys(N).reduce((U,te)=>(U[te]=R(N[te],O),U),{}):(0,h.default)(N)&&(0,y.checkLink)(N)&&(0,p.default)(O)?Object.keys(O).reduce((U,te)=>(U[te]=R(N,O[te]),U),{}):(0,h.default)(N)&&(0,h.default)(O)?(0,y.checkLink)(N)||(0,y.checkLink)(O)?R(N,O):O:(0,p.default)(N)&&(0,p.default)(O)?[...new Set([...Object.keys(N),...Object.keys(O)])].reduce((te,ae)=>(te[ae]=R(N[ae],O[ae]),te),{}):O}function j($,W){const L=(0,c.default)($);return w(L,(N,O)=>{const U=N.component||N.child;if(U){const te=W.find(ae=>ae.name===U);te&&(N.link=k(te.link,N.link,{strict:!1}))}else O&&(N.link=k(O.link,N.link))},{key:"items"}),L}function M($=[],{depth:W=1,transform:L=N=>N}={}){const N=(0,c.default)($),O=[];return w(N,(U,te,{level:ae})=>{if(ae>=W){const{items:de=[]}=U;if(de&&Array.isArray(de)&&de.length>0){delete U.items;const pe=de.map(Ce=>L(Ce,U));if(te)te.items.push(...pe);else{const Ce=L((0,l.default)(U,["items"]),te);O.push(Ce,...pe)}}else if(ae===1){const pe=L((0,l.default)(U,["items"]),te);O.push(pe)}}else ae===1&&O.push(U)},{key:"items",order:"last"}),O}function H($){if($.section!=="bottomNavigation")return $;const W={...$};return n.NAVIGATION_I18N_FIELDS.forEach(L=>{const N=W[L];typeof N=="string"&&(W[L]={en:N})}),W}function E($={}){const W=[];function L(O,U={}){const te=[],{children:ae=[],meta:de={}}=O,pe=(0,c.default)(de?.navigation||[]);(0,m.hasStartEngine)(de)&&O.meta?.capabilities?.navigation!==!1&&te.push(...pe);const Ce=U.name||"",ze=U.mountPoint||C,ye=O===$?"":de.name||"",Pe=O===$?"":O.mountPoint||C;for(const le of ae){if(!(0,m.hasStartEngine)(le.meta))continue;const ve=le.meta.name,at=le.mountPoint,gr=[Ce,ye,ve].filter(Boolean).join("."),li=le.meta.navigation||[],ci=(0,u.joinURL)(ze,Pe,at);le.meta?.capabilities?.navigation!==!1&&W.push({did:le.meta.did,name:gr,link:ci,title:le.meta.title||"",navigation:li.map(Xe=>({section:b,...Xe}))});const st=pe.find(Xe=>Xe.component?Xe.component===ve:!1);if(st){if(!st.link)if(le.meta.navigation&&le.meta.navigation.length>0){const Xe=L(le,{mountPoint:Pe,name:ye});Xe.length>0&&(st.items=st.items??[],st.items.push(...Xe))}else st.link=D}else if(le.meta?.capabilities?.navigation!==!1){const Xe=L(le,{mountPoint:Pe,name:ye}),an={title:le.meta.title,component:ve,id:le.meta.did};Xe.length>0?(an.items=Xe,an.link=void 0):an.link=D,te.push(an)}}return te}return{navigationList:L($),components:W}}function B($){const W=(0,c.default)($).filter(L=>L.id);return w(W,(L,N)=>{if(L.items&&L.items.length){for(let O=L.items.length-1;O>=0;O--)L.items[O].id||L.items.splice(O,1);L.items.length===0&&L.component&&(L.link=L.link||D)}N&&(L.parent=N.id,L.id=[N.id,L.id].join(_)),L.from=L.from||"yaml",L.visible=L.visible??!0},{key:"items"}),W}function G($,W=2){const L=(0,c.default)($),N=M(L,{depth:W,transform:(O,U)=>(U&&(O._parent||(O._parent=U.id,U.component||(O.link=k(U.link,O.link))),O.section=O.section||U.section||[b],O.visible=O.visible??U.visible,U.role&&(O.role=O.role||U.role)),O.component=[U.component,O.component].filter(Boolean).join("."),O)});return w(N,O=>{O.items&&O.items.length>0&&O.items.reduceRight((U,te)=>{if(te._parent){const ae=O.items.findIndex(de=>de.id===te._parent);ae>=0&&O.items.splice(ae,1),delete te._parent}return null},null)},{key:"items"}),N}function q($,W){return W&&Array.isArray($.items)?$.items.filter(L=>(0,a.default)(L.section)?P($.section,W):!!P(L.section,W)).map(L=>({...L,section:W})):[]}function J($){const W=(0,c.default)($),L=[];for(const N of W){let te=function(ae,de){const pe=q(ae,de);U.push({...O,section:de,items:pe})};const O=(0,c.default)((0,l.default)(N,["items"])),U=[];if(Array.isArray(N.section))for(const ae of N.section)te(N,ae);else if(N.section){const{section:ae}=N;te(N,ae)}else if(N.items&&N.items.length>0){const ae=N.items.reduce((pe,Ce)=>{const{section:ze=[b]}=Ce||{};return pe.push(...ze),pe},[]),de=[...new Set(ae)];for(const pe of de)te(N,pe)}else U.push({...N,section:b});L.push(...U)}return L}function ee($=[]){const W=(0,c.default)($);return W.reduceRight((L,N,O)=>{if(N.parent){const U=W.find(te=>N.section&&te.section?te.section===N.section&&te.id===N.parent:te.id===N.parent);U&&(U.items||(U.items=[]),U.items=[N,...U.items]),W.splice(O,1)}return null},null),W}function X($,W=[]){const L=ee($);return w(L,O=>{if(O?.component&&(W.some(U=>U.name===O.component)||(O.visible=!1)),O.items&&O.items.length)for(let U=O.items.length-1;U>=0;U--)O.items[U].visible===!1&&O.items.splice(U,1)},{key:"items"}),L.filter(O=>!(O.visible===!1||O.items&&Array.isArray(O.items)&&O.items.length>0&&O.items?.every(U=>U.visible===!1)))}function Z($){return $.map(W=>W.items&&Array.isArray(W.items)&&W.items.length===1&&["header","footer","",void 0,null].includes(W.section)?W.items[0]:W)}const V=$=>{const[W,L]=(0,v.default)($,N=>N.id==="/team");return[...W,...L]};e.sortRootNavigation=V;const re=$=>{const[,W]=(0,v.default)($,L=>{const N=typeof L.title=="string"?L.title:L.title?.en;return L.id==="/team"&&N==="Access"||L.id==="/dashboard"&&N==="Blocklet"});return W};e.cleanOldNavigationHistory=re;function ie($={},W={}){const{beforeProcess:L=le=>le}=W,{navigationList:N,components:O}=E($),U=new Map;N.forEach(le=>{le.items?.forEach(ve=>{U.set((0,u.joinURL)(le.id,ve.id),ve)})});const te=(0,s.default)($,"settings.org.enabled",!1);$?.settings?.navigations&&(Array.isArray($.settings.navigations)?$.settings.navigations=[...$.settings.navigations].filter(le=>!(le?.parent==="/team"&&le.from==="team-tmpl")).map(le=>{if(le.section==="userCenter"&&!Object.prototype.hasOwnProperty.call(le,"private")){const ve=U.get(le.id);ve&&Object.prototype.hasOwnProperty.call(ve,"private")&&(le.private=ve.private)}return!te&&le.section==="userCenter"&&le.id==="/userCenter/orgs"?null:le}).filter(Boolean):$.settings.navigations=[]);const ae=T(re($?.settings?.navigations||[])).map(H),de=G(L(N)),pe=B(de),ze=J(pe).reduce((le,ve)=>["bottom","social","sessionManager","userCenter"].includes(ve.section)&&ve.items&&ve.items.length>0?(le.push(...ve.items.map(gr=>{const{section:li}=ve,ci=k(ve.link,gr.link),st=[ve.component,gr.component].filter(Boolean).join(".");return{...gr,section:li,link:ci,component:st,parent:""}})),le):(le.push(ve),le),[]),ye=M(ze,{transform(le,ve){let{component:at}=le;return ve?.component&&(at=[ve.component,le.component].filter(Boolean).join(".")),H({...le,component:at})}});return{navigationList:(0,t.default)(ae,ye,(le,ve)=>{const at=["id","section"];return(0,i.default)((0,o.default)(le,at),(0,o.default)(ve,at))}),components:O,builtinList:ye}}}(mr)),mr}var Ee=fg();const Lc=I.createContext(null),Va="/",pg="header",Ka={dashboard:[{id:"/team",title:{en:"Access",zh:"访问控制"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"member",title:{en:"Members",zh:"成员"},icon:"ant-design:user-outlined",link:`${be.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${be.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/passports`,from:"team-tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"仪表盘"},icon:"ant-design:dashboard-outlined",link:`${be.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Ie(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/orgs",title:{en:"Organizations",zh:"组织"},icon:"ant-design:team-outlined",link:Ie(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/orgs"),from:"team-tmpl",section:["userCenter"],shouldDisplay:e=>e.settings?.org?.enabled},{id:"/userCenter/nfts",title:{en:"NFTs",zh:"NFTs"},icon:"ant-design:gold-outlined",link:Ie(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/nfts"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/settings",title:{en:"Settings",zh:"设置"},icon:"ant-design:setting-outlined",link:Ie(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/settings"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/did-spaces",title:{en:"DID Spaces",zh:"DID Spaces"},icon:"ant-design:cloud-outlined",link:Ie(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/did-spaces"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/user-followers",title:{en:"Follow",zh:"关注"},icon:"ant-design:user-outlined",link:Ie(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/user-followers"),from:"team-tmpl",section:["userCenter"]}]};function fi(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const ct=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:Ie(be.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),hg=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),gg=(e,r)=>{const n=Ee.cleanOldNavigationHistory(r);return n.findIndex(i=>i.id==="/team")===-1&&n.unshift(hg("/team",e("navigation.blockletService"),[ct("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),ct("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),ct("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),ct("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),ct("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations"),ct("developer",e("navigation.developer"),"heroicons:command-line","/admin/developers"),ct("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),ct("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n};function Ya({name:e}){return g.jsx(bp,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function vg({children:e}){const{blocklet:r,actions:n}=Ft(),{t}=Me(),{navigationList:i,components:o,builtinList:a}=Ee.parseNavigation(r,{beforeProcess(w){const P=Qe(w);return["dashboard","userCenter"].forEach(S=>{Object.prototype.hasOwnProperty.call(Ka,S)&&Ka[S].forEach(T=>{(T.shouldDisplay&&typeof T.shouldDisplay=="function"?T.shouldDisplay:()=>!0)(r)&&!P.some(k=>k.id===T.id)&&P.push(T)})}),gg(t,P)}}),s=zt({rawNavigation:Qe(i),activeSection:pg,components:o}),l=I.useMemo(()=>Ee.nestNavigationList(Qe(s.rawNavigation)),[s.rawNavigation]),c=I.useMemo(()=>{const w=Ee.filterNavigation(Qe(s.rawNavigation),o);return Ee.joinLink(w,o)},[o,s.rawNavigation]),u=I.useCallback(w=>{if(!w.id)return"";const P=Ee.flattenNavigation(Ee.joinLink(l,o)),S=P.find(T=>T.id===w.id);if(S?.component){if(!o.some(T=>T.name===S.component))return g.jsx(Ya,{name:S.component})}else if(S.parent){const T=P.find(R=>R.id===S.parent);if(T?.component&&!o.some(R=>R.name===T.component))return g.jsx(Ya,{name:T.component})}return S?.link},[l,o]),f=I.useCallback(w=>{s.activeSection=w},[s]),d=I.useCallback(w=>{const P=[];Ee.deepWalk(w,(T,R)=>{const k={...Et(T,["children","expand"]),parent:R?.id};P.push(k)});const S=Qe(s.rawNavigation).filter(T=>{if(!s.activeSection)return!1;const R=P.find(k=>fi(k,T));return R?!Ee.isMatchSection(R.section,s.activeSection):!0});s.rawNavigation=[...S,...P]},[s]),p=I.useCallback((w=[])=>{const P=Qe(s.rawNavigation).map(S=>{const T=w.find(R=>fi({...R,section:s.activeSection},S));return T?{...S,...T}:S});s.rawNavigation=P},[s]),h=I.useCallback((w,P=Va)=>w.map(T=>{const k=o.find(H=>H.name===T.component)?.link||P,j=T.items||[],{link:M}=T;return{title:T.title,description:T.description,subtitle:u(T),link:M,icon:T.icon,children:h(j,M||Va),section:T.section,visible:T.visible,parent:T.parent,component:T.component,id:T.id,role:T.role,from:T.from,__base:k}}),[o,u]),v=I.useCallback(w=>{p([w])},[p]),m=I.useCallback(w=>{const P=s.rawNavigation.filter(S=>S.id===w||S.parent===w).map(S=>S.id);s.rawNavigation=Qe(s.rawNavigation).filter(S=>!P.includes(S.id))},[s]),y=I.useCallback((w={},P=-1)=>{const S={...w,id:vp.nanoid(),section:s.activeSection,visible:!0},T=[...s.rawNavigation],R=T.filter(k=>k.section===s.activeSection);if(P<0||P>R.length-1)T.push(S);else{const k=R[P],j=T.findIndex(M=>fi(M,k));T.splice(j,0,S)}return s.rawNavigation=T,S},[s]),b=I.useCallback(w=>{const S=Qe(l).filter(T=>Ee.isMatchSection(T.section,w));return h(S)},[l,h]),C=I.useCallback(async w=>{const S=w.map(T=>mp(T,yp)).map(T=>{const R={...T};return R.role&&Array.isArray(R.role)&&(R.role=JSON.stringify(R.role)),R.section&&Array.isArray(R.section)&&(R.section=JSON.stringify(R.section)),R.title&&R.title instanceof Object&&(R.title=JSON.stringify(R.title)),R.description&&R.description instanceof Object&&(R.description=JSON.stringify(R.description)),R.link&&R.link instanceof Object&&(R.link=JSON.stringify(R.link)),R});await n.configNavigations(S)},[n]),D=I.useCallback(async w=>{if(w){const P=a.filter(T=>Ee.isMatchSection(T.section,w)),S=s.rawNavigation.filter(T=>!Ee.isMatchSection(T.section,w));await C(S),s.rawNavigation=[...S,...P]}else await C([]),s.rawNavigation=Qe(a)},[C,s,a]),_=I.useMemo(()=>({state:s,navigation:c,components:o,getNavigationFullLink:u,updateActiveSection:f,updateNavigationItem:v,delNavigationItem:m,addNavigationItem:y,updateNavigationTree:d,getNavigation:b,saveNavigationList:C,resetNavigation:D}),[s,c,o,u,f,v,m,y,d,b,C,D]);return g.jsx(Lc.Provider,{value:_,children:e})}function zc(){const e=I.useContext(Lc);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Ke={},pi,Ja;function mg(){if(Ja)return pi;Ja=1;var e="Expected a function",r=NaN,n="[object Symbol]",t=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,l=typeof Rr=="object"&&Rr&&Rr.Object===Object&&Rr,c=typeof self=="object"&&self&&self.Object===Object&&self,u=l||c||Function("return this")(),f=Object.prototype,d=f.toString,p=Math.max,h=Math.min,v=function(){return u.Date.now()};function m(w,P,S){var T,R,k,j,M,H,E=0,B=!1,G=!1,q=!0;if(typeof w!="function")throw new TypeError(e);P=_(P)||0,b(S)&&(B=!!S.leading,G="maxWait"in S,k=G?p(_(S.maxWait)||0,P):k,q="trailing"in S?!!S.trailing:q);function J(L){var N=T,O=R;return T=R=void 0,E=L,j=w.apply(O,N),j}function ee(L){return E=L,M=setTimeout(V,P),B?J(L):j}function X(L){var N=L-H,O=L-E,U=P-N;return G?h(U,k-O):U}function Z(L){var N=L-H,O=L-E;return H===void 0||N>=P||N<0||G&&O>=k}function V(){var L=v();if(Z(L))return re(L);M=setTimeout(V,X(L))}function re(L){return M=void 0,q&&T?J(L):(T=R=void 0,j)}function ie(){M!==void 0&&clearTimeout(M),E=0,T=H=R=M=void 0}function $(){return M===void 0?j:re(v())}function W(){var L=v(),N=Z(L);if(T=arguments,R=this,H=L,N){if(M===void 0)return ee(H);if(G)return M=setTimeout(V,P),J(H)}return M===void 0&&(M=setTimeout(V,P)),j}return W.cancel=ie,W.flush=$,W}function y(w,P,S){var T=!0,R=!0;if(typeof w!="function")throw new TypeError(e);return b(S)&&(T="leading"in S?!!S.leading:T,R="trailing"in S?!!S.trailing:R),m(w,P,{leading:T,maxWait:P,trailing:R})}function b(w){var P=typeof w;return!!w&&(P=="object"||P=="function")}function C(w){return!!w&&typeof w=="object"}function D(w){return typeof w=="symbol"||C(w)&&d.call(w)==n}function _(w){if(typeof w=="number")return w;if(D(w))return r;if(b(w)){var P=typeof w.valueOf=="function"?w.valueOf():w;w=b(P)?P+"":P}if(typeof w!="string")return w===0?w:+w;w=w.replace(t,"");var S=o.test(w);return S||a.test(w)?s(w.slice(2),S?2:8):i.test(w)?r:+w}return pi=y,pi}var br={exports:{}},Dt={exports:{}},bg=Dt.exports,Xa;function yg(){return Xa||(Xa=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?Dt.exports=function(){return performance.now()}:typeof vr<"u"&&vr!==null&&vr.hrtime?(Dt.exports=function(){return(e()-i)/1e6},r=vr.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=vr.uptime()*1e9,i=t-o):Date.now?(Dt.exports=function(){return Date.now()-n},n=Date.now()):(Dt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(bg)),Dt.exports}var Qa;function xg(){if(Qa)return br.exports;Qa=1;for(var e=yg(),r=typeof window>"u"?Rr:window,n=["moz","webkit"],t="AnimationFrame",i=r["request"+t],o=r["cancel"+t]||r["cancelRequest"+t],a=0;!i&&a<n.length;a++)i=r[n[a]+"Request"+t],o=r[n[a]+"Cancel"+t]||r[n[a]+"CancelRequest"+t];if(!i||!o){var s=0,l=0,c=[],u=1e3/60;i=function(f){if(c.length===0){var d=e(),p=Math.max(0,u-(d-s));s=p+d,setTimeout(function(){var h=c.slice(0);c.length=0;for(var v=0;v<h.length;v++)if(!h[v].cancelled)try{h[v].callback(s)}catch(m){setTimeout(function(){throw m},0)}},Math.round(p))}return c.push({handle:++l,callback:f,cancelled:!1}),l},o=function(f){for(var d=0;d<c.length;d++)c[d].handle===f&&(c[d].cancelled=!0)}}return br.exports=function(f){return i.call(r,f)},br.exports.cancel=function(){o.apply(r,arguments)},br.exports.polyfill=function(f){f||(f=r),f.requestAnimationFrame=i,f.cancelAnimationFrame=o},br.exports}var sn={},Za;function Sg(){if(Za)return sn;Za=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return sn}var $t={},es;function wg(){if(es)return $t;es=1,Object.defineProperty($t,"__esModule",{value:!0}),$t.noop=e,$t.intBetween=r,$t.getCoords=n;function e(){}function r(t,i,o){return Math.floor(Math.min(i,Math.max(t,o)))}function n(t){return t.type==="touchmove"?{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}:{x:t.clientX,y:t.clientY}}return $t}var ts;function Cg(){if(ts)return Ke;ts=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.createHorizontalStrength=T,Ke.createVerticalStrength=R,Ke.createScrollingComponent=M,Ke.default=H,Ke.defaultVerticalStrength=Ke.defaultHorizontalStrength=void 0;var e=u(cc()),r=c(uc()),n=xp(),t=c(mg()),i=c(xg()),o=c(Sg()),a=wh,s=c(Sp()),l=wg();function c(E){return E&&E.__esModule?E:{default:E}}function u(E){if(E&&E.__esModule)return E;var B={};if(E!=null){for(var G in E)if(Object.prototype.hasOwnProperty.call(E,G)){var q=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(E,G):{};q.get||q.set?Object.defineProperty(B,G,q):B[G]=E[G]}}return B.default=E,B}function f(E){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(G){return typeof G}:f=function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},f(E)}function d(){return d=Object.assign||function(E){for(var B=1;B<arguments.length;B++){var G=arguments[B];for(var q in G)Object.prototype.hasOwnProperty.call(G,q)&&(E[q]=G[q])}return E},d.apply(this,arguments)}function p(E,B){if(E==null)return{};var G=h(E,B),q,J;if(Object.getOwnPropertySymbols){var ee=Object.getOwnPropertySymbols(E);for(J=0;J<ee.length;J++)q=ee[J],!(B.indexOf(q)>=0)&&Object.prototype.propertyIsEnumerable.call(E,q)&&(G[q]=E[q])}return G}function h(E,B){if(E==null)return{};var G={},q=Object.keys(E),J,ee;for(ee=0;ee<q.length;ee++)J=q[ee],!(B.indexOf(J)>=0)&&(G[J]=E[J]);return G}function v(E,B){if(!(E instanceof B))throw new TypeError("Cannot call a class as a function")}function m(E,B){for(var G=0;G<B.length;G++){var q=B[G];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(E,q.key,q)}}function y(E,B,G){return B&&m(E.prototype,B),E}function b(E,B){return B&&(f(B)==="object"||typeof B=="function")?B:w(E)}function C(E){return C=Object.setPrototypeOf?Object.getPrototypeOf:function(G){return G.__proto__||Object.getPrototypeOf(G)},C(E)}function D(E,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(B&&B.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),B&&_(E,B)}function _(E,B){return _=Object.setPrototypeOf||function(q,J){return q.__proto__=J,q},_(E,B)}function w(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function P(E,B,G){return B in E?Object.defineProperty(E,B,{value:G,enumerable:!0,configurable:!0,writable:!0}):E[B]=G,E}var S=150;function T(E){return function(G,q){var J=G.x,ee=G.w,X=G.y,Z=G.h,V=Math.min(ee/2,E),re=q.x>=J&&q.x<=J+ee,ie=re&&q.y>=X&&q.y<=X+Z;if(ie){if(q.x<J+V)return(q.x-J-V)/V;if(q.x>J+ee-V)return-(J+ee-q.x-V)/V}return 0}}function R(E){return function(G,q){var J=G.y,ee=G.h,X=G.x,Z=G.w,V=Math.min(ee/2,E),re=q.y>=J&&q.y<=J+ee,ie=re&&q.x>=X&&q.x<=X+Z;if(ie){if(q.y<J+V)return(q.y-J-V)/V;if(q.y>J+ee-V)return-(J+ee-q.y-V)/V}return 0}}var k=T(S);Ke.defaultHorizontalStrength=k;var j=R(S);Ke.defaultVerticalStrength=j;function M(E){var B=function(G){D(q,G);function q(J,ee){var X;return v(this,q),X=b(this,C(q).call(this,J,ee)),P(w(w(X)),"updateScrolling",(0,t.default)(function(Z){var V=X.container.getBoundingClientRect(),re=V.left,ie=V.top,$=V.width,W=V.height,L={x:re,y:ie,w:$,h:W},N=(0,l.getCoords)(Z),O=X.props,U=O.horizontalStrength,te=O.verticalStrength;X.scaleX=U(L,N),X.scaleY=te(L,N),!X.frame&&(X.scaleX||X.scaleY)&&X.startScrolling()},100,{trailing:!1})),P(w(w(X)),"handleEvent",function(Z){X.dragging&&!X.attached&&(X.attach(),X.updateScrolling(Z))}),X.wrappedInstance=e.default.createRef(),X.scaleX=0,X.scaleY=0,X.frame=null,X.attached=!1,X.dragging=!1,X}return y(q,[{key:"componentDidMount",value:function(){var ee=this;this.container=(0,n.findDOMNode)(this.wrappedInstance.current),this.container&&typeof this.container.addEventListener=="function"&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var X=this.props.dragDropManager;this.clearMonitorSubscription=X.getMonitor().subscribeToStateChange(function(){return ee.handleMonitorChange()})}},{key:"componentWillUnmount",value:function(){this.container&&typeof this.container.removeEventListener=="function"&&this.container.removeEventListener("dragover",this.handleEvent),window.document.body.removeEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription(),this.stopScrolling()}},{key:"handleMonitorChange",value:function(){var ee=this.props.dragDropManager,X=ee.getMonitor().isDragging();!this.dragging&&X?this.dragging=!0:this.dragging&&!X&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var ee=this,X=0,Z=function V(){var re=ee.scaleX,ie=ee.scaleY,$=ee.container,W=ee.props,L=W.strengthMultiplier,N=W.onScrollChange;if(L===0||re+ie===0){ee.stopScrolling();return}if(X+=1,X%2){var O=$.scrollLeft,U=$.scrollTop,te=$.scrollWidth,ae=$.scrollHeight,de=$.clientWidth,pe=$.clientHeight,Ce=re?$.scrollLeft=(0,l.intBetween)(0,te-de,O+re*L):O,ze=ie?$.scrollTop=(0,l.intBetween)(0,ae-pe,U+ie*L):U;N(Ce,ze)}ee.frame=(0,i.default)(V)};Z()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(i.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var ee=this.props;ee.strengthMultiplier,ee.verticalStrength,ee.horizontalStrength,ee.onScrollChange;var X=p(ee,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(E,d({ref:this.wrappedInstance},X))}}]),q}(e.Component);return P(B,"displayName","Scrolling(".concat((0,o.default)(E),")")),P(B,"propTypes",{dragDropManager:r.default.object.isRequired,onScrollChange:r.default.func,verticalStrength:r.default.func,horizontalStrength:r.default.func,strengthMultiplier:r.default.number}),P(B,"defaultProps",{onScrollChange:l.noop,verticalStrength:j,horizontalStrength:k,strengthMultiplier:30}),(0,s.default)(B,E)}function H(E){var B=M(E);return function(G){return e.default.createElement(a.DragDropContextConsumer,null,function(q){var J=q.dragDropManager;return J===void 0?null:e.default.createElement(B,d({},G,{dragDropManager:J}))})}}return Ke}var bn=Cg();const Ig=$n(bn);var Rg=Ch();const rs=$n(Rg);function jc(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function Fc(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function Bc(e,r){try{var n=this.props,t=this.state;this.props=e,this.state=r,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,t)}finally{this.props=n,this.state=t}}jc.__suppressDeprecationWarning=!0;Fc.__suppressDeprecationWarning=!0;Bc.__suppressDeprecationWarning=!0;function Jr(e){var r=e.prototype;if(!r||!r.isReactComponent)throw new Error("Can only polyfill class components");if(typeof e.getDerivedStateFromProps!="function"&&typeof r.getSnapshotBeforeUpdate!="function")return e;var n=null,t=null,i=null;if(typeof r.componentWillMount=="function"?n="componentWillMount":typeof r.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof r.componentWillReceiveProps=="function"?t="componentWillReceiveProps":typeof r.UNSAFE_componentWillReceiveProps=="function"&&(t="UNSAFE_componentWillReceiveProps"),typeof r.componentWillUpdate=="function"?i="componentWillUpdate":typeof r.UNSAFE_componentWillUpdate=="function"&&(i="UNSAFE_componentWillUpdate"),n!==null||t!==null||i!==null){var o=e.displayName||e.name,a=typeof e.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-AqKhw9Wu.js","./index-DaEjX2SO.js","./index-DGkT7afN.css","./url-join-BgacTiZS.js","./index-B9vFJyc6.js","./_createAggregator-CQmKIqh9.js","./depsEqual-D4SkOvpW.js","./index-Beqyq0Xy.js","./index-DRYJ0xIl.js","./toUpper-DglD32bj.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c1 as qf,c0 as Vf,r as I,c2 as Kf,eT as Yf,j as g,b9 as ot,c4 as nt,c5 as Jf,hz as Xf,hA as Qf,gx as Zf,du as ep,hB as tp,dv as rp,bR as ac,bS as np,bP as ip,bQ as op,bU as sc,dy as Gn,hC as ap,eD as sp,hn as lp,gR as cp,dF as up,gO as lc,hD as dp,gB as fp,fp as pp,eE as hp,ha as gp,V as Me,a3 as Qe,y as Ie,aH as be,aP as zt,c8 as Et,i as vp,fa as mp,eO as bp,hq as yp,dx as Rr,ez as vr,di as cc,dC as xp,hE as Sp,dB as uc,be as $n,dO as nr,hF as F,e_ as K,eH as wp,hG as Yr,bf as Q,o as x,dM as Wn,aQ as Do,hH as Po,cB as er,aD as xe,b as pt,K as oe,ag as Cp,aT as se,ba as _o,dD as Yt,T as me,a4 as Ae,b2 as Ui,bB as xt,hI as Ip,bo as dc,E as Hn,hJ as Rp,hK as Tp,t as it,fn as Rn,O as Dp,bs as Ve,fd as fc,C as pc,bK as Pp,hL as ka,M as ko,f9 as _p,f6 as hc,H as Ot,P as gc,$ as vc,v as Tn,hM as mc,f as jt,dL as kp,bz as Op,gF as bc,dJ as Or,a7 as Ep,a8 as Np,hN as Oa,hO as yc,hP as Mp,hQ as Ap,hR as Un,fe as Lp,g8 as zp,g9 as jp,ge as qn,bE as Le,hS as Fp,h6 as Bp,hT as Gp,hU as $p,gK as Wp,hV as Dn,hW as xc,L as Sc,z as Vn,hX as Ea,hY as wc,hZ as qi,h_ as Hp,h$ as Up,s as cr,i0 as qp,f5 as Vp,cA as Cc,i1 as Kp,bH as Yp,i2 as Jp,dI as Ye,D as Xp,X as Qp,cw as Zp,i3 as eh,b0 as th,bh as Na,R as Pn,a9 as Ma,i4 as rh,i5 as nh,i6 as ih,i7 as oh,i8 as Ic,i9 as ah,aB as Rc,f0 as Tc,ia as Oo,ib as sh,hj as Dc,ic as lh,b6 as ch,cF as Jt,id as uh,cU as dh,ie as fh,d3 as ph,G as Aa,dq as ui,eI as La,dN as hh,ig as gh,a5 as Pc,Y as za,ih as ja,Q as vh,S as Fa}from"./index-DaEjX2SO.js";import{r as mh}from"./omit-dFmEevUc.js";import{r as bh}from"./cloneDeep-o7Kp18y-.js";import{r as yh}from"./index-B9vFJyc6.js";import{c as xh,u as Sh}from"./_createAggregator-CQmKIqh9.js";import{u as Ft}from"./blocklet-4xcBoALi.js";import{H as wh,G as Ch,M as Ih,N as Rh,O as Ba,K as Th,L as Dh}from"./index-DIdPY5JS.js";import{_ as Se,a as we,b as $e,c as We,d as He,e as Ph,f as _c,u as fe,g as ne,r as Fr,w as _n,h as kc,i as Bt,j as Oc,k as _h,l as kh,o as Vi}from"./raf-schd.esm-C7cnOwIv.js";import{_ as A,b as Ga,c as Oh,a as Eh,d as Nh}from"./redux-DfszZyTl.js";import{_ as Mh}from"./typeof-QjJsDpFa.js";import{u as Ec,b as Ah}from"./team-DdhNY9E2.js";import{b as Lh}from"./actions-CqTr_UpD.js";import{u as zh,a as jh,C as lt}from"./index.esm-Di7pxRR7.js";import{S as Ki}from"./simple-select-Dkbl-a1m.js";import{b as Fh,a as $a}from"./html-title-D-skaBwb.js";import{C as Nc}from"./Clear-DYWNGGPP.js";import{A as Bh}from"./ArrowDropDown-CPeg07nO.js";import{a as Gh}from"./api-gDzILycU.js";import{A as $h}from"./Autocomplete-DVV2RD2A.js";import{L as Wh}from"./ListItemButton-D_BFfEfg.js";import{u as Mc}from"./use-mobile-D6E5km4P.js";import{u as Hh}from"./index-DLm3d5Lz.js";import{d as Uh}from"./KeyboardArrowDown-BCCwKNMP.js";import{S as qh}from"./Search-soT1P5WL.js";import{A as Vh}from"./Add-Dv85KL5N.js";import{O as Kh}from"./OpenInNew-KWw6IL4k.js";import{t as Yh}from"./index-ZtBV9VDq.js";import{I as Jh}from"./iframe-DyfK1MII.js";import{B as di}from"./ButtonGroup-C6xSllEr.js";import{L as Wa}from"./LoadingButton--tsix-yw.js";import"./depsEqual-D4SkOvpW.js";import"./url-evaluation-Dm_mNoMs.js";import"./useLocalStorage-Df3_jlsm.js";import"./MoreVert-D2cSYolp.js";import"./get-safe-url-nXPF2sGJ.js";import"./permission-DHDlX-2p.js";import"./ListSubheader-DVUYAhXC.js";import"./getValidReactChildren-CIqQKAkN.js";function Xh(e){return qf("MuiListItemAvatar",e)}Vf("MuiListItemAvatar",["root","alignItemsFlexStart"]);const Qh=e=>{const{alignItems:r,classes:n}=e;return Jf({root:["root",r==="flex-start"&&"alignItemsFlexStart"]},Xh,n)},Zh=ot("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.root,n.alignItems==="flex-start"&&r.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),Ha=I.forwardRef(function(r,n){const t=Kf({props:r,name:"MuiListItemAvatar"}),{className:i,...o}=t,a=I.useContext(Yf),s={...t,alignItems:a.alignItems},l=Qh(s);return g.jsx(Zh,{className:nt(l.root,i),ownerState:s,ref:n,...o})});var eg=Xf(function(){return Qf?sessionStorage:void 0});function tg(e,r){return Zf(r,function(n){return e[n]})}function rg(e){return e==null?[]:tg(e,ep(e))}var ng=tp.isFinite;function Ua(e){return typeof e=="number"&&ng(e)}function ig(e){return typeof e=="number"&&e==rp(e)}var og=xh(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const ag=Object.freeze(Object.defineProperty({__proto__:null,default:og},Symbol.toStringTag,{value:"Module"}));var sg=ac(function(e){var r=np(e);return r=typeof r=="function"?r:void 0,ip(op(e,1,sc,!0),void 0,r)});const lg=Object.freeze(Object.defineProperty({__proto__:null,default:sg},Symbol.toStringTag,{value:"Module"}));var Ac=ac(function(e,r){return sc(e)?Lh(e,r):[]}),mr={};const cg=Gn(lg),ug=Gn(ap),dg=Gn(ag);var qa;function fg(){return qa||(qa=1,function(e){var r=mr&&mr.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=ie,e.deepWalk=w,e.isMatchSection=P,e.nestNavigationList=ee,e.filterNavigation=X,e.cleanOrphanNavigation=Z,e.joinLink=j,e.flattenNavigation=M,e.splitNavigationBySection=J;const n=sp(),t=r(cg),i=r(lp),o=r(cp),a=r(ug),s=r(up),l=r(mh),c=r(bh),u=gp(),f=r(yh()),d=r(lc()),p=r(dp),h=r(fp),v=r(dg),m=pp(),y=hp();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return y.checkLink}});const b="header",C="/",D="/",_="/";function w($,W=()=>{},{key:L="children",order:N="first"}={}){function O(U,{index:te=0,parent:ae=null,level:de=0}={}){Array.isArray(U)?U.forEach((pe,Ce)=>{O(pe,{index:Ce,parent:ae,level:de+1})}):U&&(N==="first"&&W(U,ae,{index:te,level:de}),O(U[L],{parent:U,level:de}),N==="last"&&W(U,ae,{index:te,level:de}))}O($)}function P($,W){return W===b&&(0,a.default)($)?!0:Array.isArray($)?$.includes(W):$===W}function S($){try{return JSON.parse($)}catch{return $}}function T($){return $.map(W=>{const L={...W};return L.role&&(L.role=S(L.role)),L.section&&(L.section=S(L.section)),L.title&&(L.title=S(L.title)),L.description&&(L.description=S(L.description)),L.link&&(L.link=S(L.link)),L})}function R($="/",W=""){if((0,d.default)(W||""))return W;const L=f.default.join($,W||D);return L.length>1&&L.endsWith("/")?L.slice(0,L.length-1):L}function k($,W,{strict:L=!0}={}){let N=$,O=W;return L||(N=N||"/",O=O||"/"),(0,p.default)(N)&&(0,h.default)(O)&&(0,y.checkLink)(O)?Object.keys(N).reduce((U,te)=>(U[te]=R(N[te],O),U),{}):(0,h.default)(N)&&(0,y.checkLink)(N)&&(0,p.default)(O)?Object.keys(O).reduce((U,te)=>(U[te]=R(N,O[te]),U),{}):(0,h.default)(N)&&(0,h.default)(O)?(0,y.checkLink)(N)||(0,y.checkLink)(O)?R(N,O):O:(0,p.default)(N)&&(0,p.default)(O)?[...new Set([...Object.keys(N),...Object.keys(O)])].reduce((te,ae)=>(te[ae]=R(N[ae],O[ae]),te),{}):O}function j($,W){const L=(0,c.default)($);return w(L,(N,O)=>{const U=N.component||N.child;if(U){const te=W.find(ae=>ae.name===U);te&&(N.link=k(te.link,N.link,{strict:!1}))}else O&&(N.link=k(O.link,N.link))},{key:"items"}),L}function M($=[],{depth:W=1,transform:L=N=>N}={}){const N=(0,c.default)($),O=[];return w(N,(U,te,{level:ae})=>{if(ae>=W){const{items:de=[]}=U;if(de&&Array.isArray(de)&&de.length>0){delete U.items;const pe=de.map(Ce=>L(Ce,U));if(te)te.items.push(...pe);else{const Ce=L((0,l.default)(U,["items"]),te);O.push(Ce,...pe)}}else if(ae===1){const pe=L((0,l.default)(U,["items"]),te);O.push(pe)}}else ae===1&&O.push(U)},{key:"items",order:"last"}),O}function H($){if($.section!=="bottomNavigation")return $;const W={...$};return n.NAVIGATION_I18N_FIELDS.forEach(L=>{const N=W[L];typeof N=="string"&&(W[L]={en:N})}),W}function E($={}){const W=[];function L(O,U={}){const te=[],{children:ae=[],meta:de={}}=O,pe=(0,c.default)(de?.navigation||[]);(0,m.hasStartEngine)(de)&&O.meta?.capabilities?.navigation!==!1&&te.push(...pe);const Ce=U.name||"",ze=U.mountPoint||C,ye=O===$?"":de.name||"",Pe=O===$?"":O.mountPoint||C;for(const le of ae){if(!(0,m.hasStartEngine)(le.meta))continue;const ve=le.meta.name,at=le.mountPoint,gr=[Ce,ye,ve].filter(Boolean).join("."),li=le.meta.navigation||[],ci=(0,u.joinURL)(ze,Pe,at);le.meta?.capabilities?.navigation!==!1&&W.push({did:le.meta.did,name:gr,link:ci,title:le.meta.title||"",navigation:li.map(Xe=>({section:b,...Xe}))});const st=pe.find(Xe=>Xe.component?Xe.component===ve:!1);if(st){if(!st.link)if(le.meta.navigation&&le.meta.navigation.length>0){const Xe=L(le,{mountPoint:Pe,name:ye});Xe.length>0&&(st.items=st.items??[],st.items.push(...Xe))}else st.link=D}else if(le.meta?.capabilities?.navigation!==!1){const Xe=L(le,{mountPoint:Pe,name:ye}),an={title:le.meta.title,component:ve,id:le.meta.did};Xe.length>0?(an.items=Xe,an.link=void 0):an.link=D,te.push(an)}}return te}return{navigationList:L($),components:W}}function B($){const W=(0,c.default)($).filter(L=>L.id);return w(W,(L,N)=>{if(L.items&&L.items.length){for(let O=L.items.length-1;O>=0;O--)L.items[O].id||L.items.splice(O,1);L.items.length===0&&L.component&&(L.link=L.link||D)}N&&(L.parent=N.id,L.id=[N.id,L.id].join(_)),L.from=L.from||"yaml",L.visible=L.visible??!0},{key:"items"}),W}function G($,W=2){const L=(0,c.default)($),N=M(L,{depth:W,transform:(O,U)=>(U&&(O._parent||(O._parent=U.id,U.component||(O.link=k(U.link,O.link))),O.section=O.section||U.section||[b],O.visible=O.visible??U.visible,U.role&&(O.role=O.role||U.role)),O.component=[U.component,O.component].filter(Boolean).join("."),O)});return w(N,O=>{O.items&&O.items.length>0&&O.items.reduceRight((U,te)=>{if(te._parent){const ae=O.items.findIndex(de=>de.id===te._parent);ae>=0&&O.items.splice(ae,1),delete te._parent}return null},null)},{key:"items"}),N}function q($,W){return W&&Array.isArray($.items)?$.items.filter(L=>(0,a.default)(L.section)?P($.section,W):!!P(L.section,W)).map(L=>({...L,section:W})):[]}function J($){const W=(0,c.default)($),L=[];for(const N of W){let te=function(ae,de){const pe=q(ae,de);U.push({...O,section:de,items:pe})};const O=(0,c.default)((0,l.default)(N,["items"])),U=[];if(Array.isArray(N.section))for(const ae of N.section)te(N,ae);else if(N.section){const{section:ae}=N;te(N,ae)}else if(N.items&&N.items.length>0){const ae=N.items.reduce((pe,Ce)=>{const{section:ze=[b]}=Ce||{};return pe.push(...ze),pe},[]),de=[...new Set(ae)];for(const pe of de)te(N,pe)}else U.push({...N,section:b});L.push(...U)}return L}function ee($=[]){const W=(0,c.default)($);return W.reduceRight((L,N,O)=>{if(N.parent){const U=W.find(te=>N.section&&te.section?te.section===N.section&&te.id===N.parent:te.id===N.parent);U&&(U.items||(U.items=[]),U.items=[N,...U.items]),W.splice(O,1)}return null},null),W}function X($,W=[]){const L=ee($);return w(L,O=>{if(O?.component&&(W.some(U=>U.name===O.component)||(O.visible=!1)),O.items&&O.items.length)for(let U=O.items.length-1;U>=0;U--)O.items[U].visible===!1&&O.items.splice(U,1)},{key:"items"}),L.filter(O=>!(O.visible===!1||O.items&&Array.isArray(O.items)&&O.items.length>0&&O.items?.every(U=>U.visible===!1)))}function Z($){return $.map(W=>W.items&&Array.isArray(W.items)&&W.items.length===1&&["header","footer","",void 0,null].includes(W.section)?W.items[0]:W)}const V=$=>{const[W,L]=(0,v.default)($,N=>N.id==="/team");return[...W,...L]};e.sortRootNavigation=V;const re=$=>{const[,W]=(0,v.default)($,L=>{const N=typeof L.title=="string"?L.title:L.title?.en;return L.id==="/team"&&N==="Access"||L.id==="/dashboard"&&N==="Blocklet"});return W};e.cleanOldNavigationHistory=re;function ie($={},W={}){const{beforeProcess:L=le=>le}=W,{navigationList:N,components:O}=E($),U=new Map;N.forEach(le=>{le.items?.forEach(ve=>{U.set((0,u.joinURL)(le.id,ve.id),ve)})});const te=(0,s.default)($,"settings.org.enabled",!1);$?.settings?.navigations&&(Array.isArray($.settings.navigations)?$.settings.navigations=[...$.settings.navigations].filter(le=>!(le?.parent==="/team"&&le.from==="team-tmpl")).map(le=>{if(le.section==="userCenter"&&!Object.prototype.hasOwnProperty.call(le,"private")){const ve=U.get(le.id);ve&&Object.prototype.hasOwnProperty.call(ve,"private")&&(le.private=ve.private)}return!te&&le.section==="userCenter"&&le.id==="/userCenter/orgs"?null:le}).filter(Boolean):$.settings.navigations=[]);const ae=T(re($?.settings?.navigations||[])).map(H),de=G(L(N)),pe=B(de),ze=J(pe).reduce((le,ve)=>["bottom","social","sessionManager","userCenter"].includes(ve.section)&&ve.items&&ve.items.length>0?(le.push(...ve.items.map(gr=>{const{section:li}=ve,ci=k(ve.link,gr.link),st=[ve.component,gr.component].filter(Boolean).join(".");return{...gr,section:li,link:ci,component:st,parent:""}})),le):(le.push(ve),le),[]),ye=M(ze,{transform(le,ve){let{component:at}=le;return ve?.component&&(at=[ve.component,le.component].filter(Boolean).join(".")),H({...le,component:at})}});return{navigationList:(0,t.default)(ae,ye,(le,ve)=>{const at=["id","section"];return(0,i.default)((0,o.default)(le,at),(0,o.default)(ve,at))}),components:O,builtinList:ye}}}(mr)),mr}var Ee=fg();const Lc=I.createContext(null),Va="/",pg="header",Ka={dashboard:[{id:"/team",title:{en:"Access",zh:"访问控制"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"member",title:{en:"Members",zh:"成员"},icon:"ant-design:user-outlined",link:`${be.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${be.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/passports`,from:"team-tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"仪表盘"},icon:"ant-design:dashboard-outlined",link:`${be.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Ie(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/orgs",title:{en:"Organizations",zh:"组织"},icon:"ant-design:team-outlined",link:Ie(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/orgs"),from:"team-tmpl",section:["userCenter"],shouldDisplay:e=>e.settings?.org?.enabled},{id:"/userCenter/nfts",title:{en:"NFTs",zh:"NFTs"},icon:"ant-design:gold-outlined",link:Ie(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/nfts"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/settings",title:{en:"Settings",zh:"设置"},icon:"ant-design:setting-outlined",link:Ie(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/settings"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/did-spaces",title:{en:"DID Spaces",zh:"DID Spaces"},icon:"ant-design:cloud-outlined",link:Ie(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/did-spaces"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/user-followers",title:{en:"Follow",zh:"关注"},icon:"ant-design:user-outlined",link:Ie(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/user-followers"),from:"team-tmpl",section:["userCenter"]}]};function fi(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const ct=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:Ie(be.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),hg=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),gg=(e,r)=>{const n=Ee.cleanOldNavigationHistory(r);return n.findIndex(i=>i.id==="/team")===-1&&n.unshift(hg("/team",e("navigation.blockletService"),[ct("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),ct("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),ct("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),ct("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),ct("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations"),ct("developer",e("navigation.developer"),"heroicons:command-line","/admin/developers"),ct("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),ct("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n};function Ya({name:e}){return g.jsx(bp,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function vg({children:e}){const{blocklet:r,actions:n}=Ft(),{t}=Me(),{navigationList:i,components:o,builtinList:a}=Ee.parseNavigation(r,{beforeProcess(w){const P=Qe(w);return["dashboard","userCenter"].forEach(S=>{Object.prototype.hasOwnProperty.call(Ka,S)&&Ka[S].forEach(T=>{(T.shouldDisplay&&typeof T.shouldDisplay=="function"?T.shouldDisplay:()=>!0)(r)&&!P.some(k=>k.id===T.id)&&P.push(T)})}),gg(t,P)}}),s=zt({rawNavigation:Qe(i),activeSection:pg,components:o}),l=I.useMemo(()=>Ee.nestNavigationList(Qe(s.rawNavigation)),[s.rawNavigation]),c=I.useMemo(()=>{const w=Ee.filterNavigation(Qe(s.rawNavigation),o);return Ee.joinLink(w,o)},[o,s.rawNavigation]),u=I.useCallback(w=>{if(!w.id)return"";const P=Ee.flattenNavigation(Ee.joinLink(l,o)),S=P.find(T=>T.id===w.id);if(S?.component){if(!o.some(T=>T.name===S.component))return g.jsx(Ya,{name:S.component})}else if(S.parent){const T=P.find(R=>R.id===S.parent);if(T?.component&&!o.some(R=>R.name===T.component))return g.jsx(Ya,{name:T.component})}return S?.link},[l,o]),f=I.useCallback(w=>{s.activeSection=w},[s]),d=I.useCallback(w=>{const P=[];Ee.deepWalk(w,(T,R)=>{const k={...Et(T,["children","expand"]),parent:R?.id};P.push(k)});const S=Qe(s.rawNavigation).filter(T=>{if(!s.activeSection)return!1;const R=P.find(k=>fi(k,T));return R?!Ee.isMatchSection(R.section,s.activeSection):!0});s.rawNavigation=[...S,...P]},[s]),p=I.useCallback((w=[])=>{const P=Qe(s.rawNavigation).map(S=>{const T=w.find(R=>fi({...R,section:s.activeSection},S));return T?{...S,...T}:S});s.rawNavigation=P},[s]),h=I.useCallback((w,P=Va)=>w.map(T=>{const k=o.find(H=>H.name===T.component)?.link||P,j=T.items||[],{link:M}=T;return{title:T.title,description:T.description,subtitle:u(T),link:M,icon:T.icon,children:h(j,M||Va),section:T.section,visible:T.visible,parent:T.parent,component:T.component,id:T.id,role:T.role,from:T.from,__base:k}}),[o,u]),v=I.useCallback(w=>{p([w])},[p]),m=I.useCallback(w=>{const P=s.rawNavigation.filter(S=>S.id===w||S.parent===w).map(S=>S.id);s.rawNavigation=Qe(s.rawNavigation).filter(S=>!P.includes(S.id))},[s]),y=I.useCallback((w={},P=-1)=>{const S={...w,id:vp.nanoid(),section:s.activeSection,visible:!0},T=[...s.rawNavigation],R=T.filter(k=>k.section===s.activeSection);if(P<0||P>R.length-1)T.push(S);else{const k=R[P],j=T.findIndex(M=>fi(M,k));T.splice(j,0,S)}return s.rawNavigation=T,S},[s]),b=I.useCallback(w=>{const S=Qe(l).filter(T=>Ee.isMatchSection(T.section,w));return h(S)},[l,h]),C=I.useCallback(async w=>{const S=w.map(T=>mp(T,yp)).map(T=>{const R={...T};return R.role&&Array.isArray(R.role)&&(R.role=JSON.stringify(R.role)),R.section&&Array.isArray(R.section)&&(R.section=JSON.stringify(R.section)),R.title&&R.title instanceof Object&&(R.title=JSON.stringify(R.title)),R.description&&R.description instanceof Object&&(R.description=JSON.stringify(R.description)),R.link&&R.link instanceof Object&&(R.link=JSON.stringify(R.link)),R});await n.configNavigations(S)},[n]),D=I.useCallback(async w=>{if(w){const P=a.filter(T=>Ee.isMatchSection(T.section,w)),S=s.rawNavigation.filter(T=>!Ee.isMatchSection(T.section,w));await C(S),s.rawNavigation=[...S,...P]}else await C([]),s.rawNavigation=Qe(a)},[C,s,a]),_=I.useMemo(()=>({state:s,navigation:c,components:o,getNavigationFullLink:u,updateActiveSection:f,updateNavigationItem:v,delNavigationItem:m,addNavigationItem:y,updateNavigationTree:d,getNavigation:b,saveNavigationList:C,resetNavigation:D}),[s,c,o,u,f,v,m,y,d,b,C,D]);return g.jsx(Lc.Provider,{value:_,children:e})}function zc(){const e=I.useContext(Lc);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Ke={},pi,Ja;function mg(){if(Ja)return pi;Ja=1;var e="Expected a function",r=NaN,n="[object Symbol]",t=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,l=typeof Rr=="object"&&Rr&&Rr.Object===Object&&Rr,c=typeof self=="object"&&self&&self.Object===Object&&self,u=l||c||Function("return this")(),f=Object.prototype,d=f.toString,p=Math.max,h=Math.min,v=function(){return u.Date.now()};function m(w,P,S){var T,R,k,j,M,H,E=0,B=!1,G=!1,q=!0;if(typeof w!="function")throw new TypeError(e);P=_(P)||0,b(S)&&(B=!!S.leading,G="maxWait"in S,k=G?p(_(S.maxWait)||0,P):k,q="trailing"in S?!!S.trailing:q);function J(L){var N=T,O=R;return T=R=void 0,E=L,j=w.apply(O,N),j}function ee(L){return E=L,M=setTimeout(V,P),B?J(L):j}function X(L){var N=L-H,O=L-E,U=P-N;return G?h(U,k-O):U}function Z(L){var N=L-H,O=L-E;return H===void 0||N>=P||N<0||G&&O>=k}function V(){var L=v();if(Z(L))return re(L);M=setTimeout(V,X(L))}function re(L){return M=void 0,q&&T?J(L):(T=R=void 0,j)}function ie(){M!==void 0&&clearTimeout(M),E=0,T=H=R=M=void 0}function $(){return M===void 0?j:re(v())}function W(){var L=v(),N=Z(L);if(T=arguments,R=this,H=L,N){if(M===void 0)return ee(H);if(G)return M=setTimeout(V,P),J(H)}return M===void 0&&(M=setTimeout(V,P)),j}return W.cancel=ie,W.flush=$,W}function y(w,P,S){var T=!0,R=!0;if(typeof w!="function")throw new TypeError(e);return b(S)&&(T="leading"in S?!!S.leading:T,R="trailing"in S?!!S.trailing:R),m(w,P,{leading:T,maxWait:P,trailing:R})}function b(w){var P=typeof w;return!!w&&(P=="object"||P=="function")}function C(w){return!!w&&typeof w=="object"}function D(w){return typeof w=="symbol"||C(w)&&d.call(w)==n}function _(w){if(typeof w=="number")return w;if(D(w))return r;if(b(w)){var P=typeof w.valueOf=="function"?w.valueOf():w;w=b(P)?P+"":P}if(typeof w!="string")return w===0?w:+w;w=w.replace(t,"");var S=o.test(w);return S||a.test(w)?s(w.slice(2),S?2:8):i.test(w)?r:+w}return pi=y,pi}var br={exports:{}},Dt={exports:{}},bg=Dt.exports,Xa;function yg(){return Xa||(Xa=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?Dt.exports=function(){return performance.now()}:typeof vr<"u"&&vr!==null&&vr.hrtime?(Dt.exports=function(){return(e()-i)/1e6},r=vr.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=vr.uptime()*1e9,i=t-o):Date.now?(Dt.exports=function(){return Date.now()-n},n=Date.now()):(Dt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(bg)),Dt.exports}var Qa;function xg(){if(Qa)return br.exports;Qa=1;for(var e=yg(),r=typeof window>"u"?Rr:window,n=["moz","webkit"],t="AnimationFrame",i=r["request"+t],o=r["cancel"+t]||r["cancelRequest"+t],a=0;!i&&a<n.length;a++)i=r[n[a]+"Request"+t],o=r[n[a]+"Cancel"+t]||r[n[a]+"CancelRequest"+t];if(!i||!o){var s=0,l=0,c=[],u=1e3/60;i=function(f){if(c.length===0){var d=e(),p=Math.max(0,u-(d-s));s=p+d,setTimeout(function(){var h=c.slice(0);c.length=0;for(var v=0;v<h.length;v++)if(!h[v].cancelled)try{h[v].callback(s)}catch(m){setTimeout(function(){throw m},0)}},Math.round(p))}return c.push({handle:++l,callback:f,cancelled:!1}),l},o=function(f){for(var d=0;d<c.length;d++)c[d].handle===f&&(c[d].cancelled=!0)}}return br.exports=function(f){return i.call(r,f)},br.exports.cancel=function(){o.apply(r,arguments)},br.exports.polyfill=function(f){f||(f=r),f.requestAnimationFrame=i,f.cancelAnimationFrame=o},br.exports}var sn={},Za;function Sg(){if(Za)return sn;Za=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return sn}var $t={},es;function wg(){if(es)return $t;es=1,Object.defineProperty($t,"__esModule",{value:!0}),$t.noop=e,$t.intBetween=r,$t.getCoords=n;function e(){}function r(t,i,o){return Math.floor(Math.min(i,Math.max(t,o)))}function n(t){return t.type==="touchmove"?{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}:{x:t.clientX,y:t.clientY}}return $t}var ts;function Cg(){if(ts)return Ke;ts=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.createHorizontalStrength=T,Ke.createVerticalStrength=R,Ke.createScrollingComponent=M,Ke.default=H,Ke.defaultVerticalStrength=Ke.defaultHorizontalStrength=void 0;var e=u(cc()),r=c(uc()),n=xp(),t=c(mg()),i=c(xg()),o=c(Sg()),a=wh,s=c(Sp()),l=wg();function c(E){return E&&E.__esModule?E:{default:E}}function u(E){if(E&&E.__esModule)return E;var B={};if(E!=null){for(var G in E)if(Object.prototype.hasOwnProperty.call(E,G)){var q=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(E,G):{};q.get||q.set?Object.defineProperty(B,G,q):B[G]=E[G]}}return B.default=E,B}function f(E){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(G){return typeof G}:f=function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},f(E)}function d(){return d=Object.assign||function(E){for(var B=1;B<arguments.length;B++){var G=arguments[B];for(var q in G)Object.prototype.hasOwnProperty.call(G,q)&&(E[q]=G[q])}return E},d.apply(this,arguments)}function p(E,B){if(E==null)return{};var G=h(E,B),q,J;if(Object.getOwnPropertySymbols){var ee=Object.getOwnPropertySymbols(E);for(J=0;J<ee.length;J++)q=ee[J],!(B.indexOf(q)>=0)&&Object.prototype.propertyIsEnumerable.call(E,q)&&(G[q]=E[q])}return G}function h(E,B){if(E==null)return{};var G={},q=Object.keys(E),J,ee;for(ee=0;ee<q.length;ee++)J=q[ee],!(B.indexOf(J)>=0)&&(G[J]=E[J]);return G}function v(E,B){if(!(E instanceof B))throw new TypeError("Cannot call a class as a function")}function m(E,B){for(var G=0;G<B.length;G++){var q=B[G];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(E,q.key,q)}}function y(E,B,G){return B&&m(E.prototype,B),E}function b(E,B){return B&&(f(B)==="object"||typeof B=="function")?B:w(E)}function C(E){return C=Object.setPrototypeOf?Object.getPrototypeOf:function(G){return G.__proto__||Object.getPrototypeOf(G)},C(E)}function D(E,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(B&&B.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),B&&_(E,B)}function _(E,B){return _=Object.setPrototypeOf||function(q,J){return q.__proto__=J,q},_(E,B)}function w(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function P(E,B,G){return B in E?Object.defineProperty(E,B,{value:G,enumerable:!0,configurable:!0,writable:!0}):E[B]=G,E}var S=150;function T(E){return function(G,q){var J=G.x,ee=G.w,X=G.y,Z=G.h,V=Math.min(ee/2,E),re=q.x>=J&&q.x<=J+ee,ie=re&&q.y>=X&&q.y<=X+Z;if(ie){if(q.x<J+V)return(q.x-J-V)/V;if(q.x>J+ee-V)return-(J+ee-q.x-V)/V}return 0}}function R(E){return function(G,q){var J=G.y,ee=G.h,X=G.x,Z=G.w,V=Math.min(ee/2,E),re=q.y>=J&&q.y<=J+ee,ie=re&&q.x>=X&&q.x<=X+Z;if(ie){if(q.y<J+V)return(q.y-J-V)/V;if(q.y>J+ee-V)return-(J+ee-q.y-V)/V}return 0}}var k=T(S);Ke.defaultHorizontalStrength=k;var j=R(S);Ke.defaultVerticalStrength=j;function M(E){var B=function(G){D(q,G);function q(J,ee){var X;return v(this,q),X=b(this,C(q).call(this,J,ee)),P(w(w(X)),"updateScrolling",(0,t.default)(function(Z){var V=X.container.getBoundingClientRect(),re=V.left,ie=V.top,$=V.width,W=V.height,L={x:re,y:ie,w:$,h:W},N=(0,l.getCoords)(Z),O=X.props,U=O.horizontalStrength,te=O.verticalStrength;X.scaleX=U(L,N),X.scaleY=te(L,N),!X.frame&&(X.scaleX||X.scaleY)&&X.startScrolling()},100,{trailing:!1})),P(w(w(X)),"handleEvent",function(Z){X.dragging&&!X.attached&&(X.attach(),X.updateScrolling(Z))}),X.wrappedInstance=e.default.createRef(),X.scaleX=0,X.scaleY=0,X.frame=null,X.attached=!1,X.dragging=!1,X}return y(q,[{key:"componentDidMount",value:function(){var ee=this;this.container=(0,n.findDOMNode)(this.wrappedInstance.current),this.container&&typeof this.container.addEventListener=="function"&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var X=this.props.dragDropManager;this.clearMonitorSubscription=X.getMonitor().subscribeToStateChange(function(){return ee.handleMonitorChange()})}},{key:"componentWillUnmount",value:function(){this.container&&typeof this.container.removeEventListener=="function"&&this.container.removeEventListener("dragover",this.handleEvent),window.document.body.removeEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription(),this.stopScrolling()}},{key:"handleMonitorChange",value:function(){var ee=this.props.dragDropManager,X=ee.getMonitor().isDragging();!this.dragging&&X?this.dragging=!0:this.dragging&&!X&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var ee=this,X=0,Z=function V(){var re=ee.scaleX,ie=ee.scaleY,$=ee.container,W=ee.props,L=W.strengthMultiplier,N=W.onScrollChange;if(L===0||re+ie===0){ee.stopScrolling();return}if(X+=1,X%2){var O=$.scrollLeft,U=$.scrollTop,te=$.scrollWidth,ae=$.scrollHeight,de=$.clientWidth,pe=$.clientHeight,Ce=re?$.scrollLeft=(0,l.intBetween)(0,te-de,O+re*L):O,ze=ie?$.scrollTop=(0,l.intBetween)(0,ae-pe,U+ie*L):U;N(Ce,ze)}ee.frame=(0,i.default)(V)};Z()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(i.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var ee=this.props;ee.strengthMultiplier,ee.verticalStrength,ee.horizontalStrength,ee.onScrollChange;var X=p(ee,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(E,d({ref:this.wrappedInstance},X))}}]),q}(e.Component);return P(B,"displayName","Scrolling(".concat((0,o.default)(E),")")),P(B,"propTypes",{dragDropManager:r.default.object.isRequired,onScrollChange:r.default.func,verticalStrength:r.default.func,horizontalStrength:r.default.func,strengthMultiplier:r.default.number}),P(B,"defaultProps",{onScrollChange:l.noop,verticalStrength:j,horizontalStrength:k,strengthMultiplier:30}),(0,s.default)(B,E)}function H(E){var B=M(E);return function(G){return e.default.createElement(a.DragDropContextConsumer,null,function(q){var J=q.dragDropManager;return J===void 0?null:e.default.createElement(B,d({},G,{dragDropManager:J}))})}}return Ke}var bn=Cg();const Ig=$n(bn);var Rg=Ch();const rs=$n(Rg);function jc(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function Fc(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function Bc(e,r){try{var n=this.props,t=this.state;this.props=e,this.state=r,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,t)}finally{this.props=n,this.state=t}}jc.__suppressDeprecationWarning=!0;Fc.__suppressDeprecationWarning=!0;Bc.__suppressDeprecationWarning=!0;function Jr(e){var r=e.prototype;if(!r||!r.isReactComponent)throw new Error("Can only polyfill class components");if(typeof e.getDerivedStateFromProps!="function"&&typeof r.getSnapshotBeforeUpdate!="function")return e;var n=null,t=null,i=null;if(typeof r.componentWillMount=="function"?n="componentWillMount":typeof r.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof r.componentWillReceiveProps=="function"?t="componentWillReceiveProps":typeof r.UNSAFE_componentWillReceiveProps=="function"&&(t="UNSAFE_componentWillReceiveProps"),typeof r.componentWillUpdate=="function"?i="componentWillUpdate":typeof r.UNSAFE_componentWillUpdate=="function"&&(i="UNSAFE_componentWillUpdate"),n!==null||t!==null||i!==null){var o=e.displayName||e.name,a=typeof e.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
3
3
|
|
|
4
4
|
`+o+" uses "+a+" but also contains the following legacy lifecycles:"+(n!==null?`
|
|
5
5
|
`+n:"")+(t!==null?`
|
|
@@ -40,7 +40,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
|
|
|
40
40
|
*
|
|
41
41
|
* @license MIT
|
|
42
42
|
* @version 1.0.8
|
|
43
|
-
*/const Bu=Object.freeze({left:0,top:0,width:16,height:16}),En=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),tn=Object.freeze({...Bu,...En}),so=Object.freeze({...tn,body:"",hidden:!1}),cy=Object.freeze({width:null,height:null}),Gu=Object.freeze({...cy,...En});function uy(e,r=0){const n=e.replace(/^-?[0-9.]*/,"");function t(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:t(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?t(o):0)}}return r}const dy=/[\s,]+/;function fy(e,r){r.split(dy).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const $u={...Gu,preserveAspectRatio:""};function rl(e){const r={...$u},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=uy(n("rotate","")),fy(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function py(e,r){for(const n in $u)if(e[n]!==r[n])return!0;return!1}const Ar=/^[a-z0-9]+(-[a-z0-9]+)*$/,rn=(e,r,n,t="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;t=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const s=i.pop(),l=i.pop(),c={provider:i.length>0?i[0]:t,prefix:l,name:s};return r&&!Sn(c)?null:c}const o=i[0],a=o.split("-");if(a.length>1){const s={provider:t,prefix:a.shift(),name:a.join("-")};return r&&!Sn(s)?null:s}if(n&&t===""){const s={provider:t,prefix:"",name:o};return r&&!Sn(s,n)?null:s}return null},Sn=(e,r)=>e?!!((e.provider===""||e.provider.match(Ar))&&(r&&e.prefix===""||e.prefix.match(Ar))&&e.name.match(Ar)):!1;function hy(e,r){const n={};!e.hFlip!=!r.hFlip&&(n.hFlip=!0),!e.vFlip!=!r.vFlip&&(n.vFlip=!0);const t=((e.rotate||0)+(r.rotate||0))%4;return t&&(n.rotate=t),n}function nl(e,r){const n=hy(e,r);for(const t in so)t in En?t in e&&!(t in n)&&(n[t]=En[t]):t in r?n[t]=r[t]:t in e&&(n[t]=e[t]);return n}function gy(e,r){const n=e.icons,t=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const s=t[a]&&t[a].parent,l=s&&o(s);l&&(i[a]=[s].concat(l))}return i[a]}return Object.keys(n).concat(Object.keys(t)).forEach(o),i}function vy(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(s){o=nl(t[s]||i[s],o)}return a(r),n.forEach(a),nl(e,o)}function Wu(e,r){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{r(i,null),n.push(i)});const t=gy(e);for(const i in t){const o=t[i];o&&(r(i,vy(e,i,o)),n.push(i))}return n}const my={provider:"",aliases:{},not_found:{},...Bu};function ki(e,r){for(const n in r)if(n in e&&typeof e[n]!=typeof r[n])return!1;return!0}function Hu(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!ki(e,my))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(Ar)||typeof o.body!="string"||!ki(o,so))return null}const t=r.aliases||Object.create(null);for(const i in t){const o=t[i],a=o.parent;if(!i.match(Ar)||typeof a!="string"||!n[a]&&!t[a]||!ki(o,so))return null}return r}const Nn=Object.create(null);function by(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function wt(e,r){const n=Nn[e]||(Nn[e]=Object.create(null));return n[r]||(n[r]=by(e,r))}function Yo(e,r){return Hu(r)?Wu(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function yy(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function xy(e,r){let n=[];return(typeof e=="string"?[e]:Object.keys(Nn)).forEach(i=>{(typeof i=="string"&&typeof r=="string"?[r]:Object.keys(Nn[i]||{})).forEach(a=>{const s=wt(i,a);n=n.concat(Object.keys(s.icons).map(l=>(i!==""?"@"+i+":":"")+a+":"+l))})}),n}let $r=!1;function Uu(e){return typeof e=="boolean"&&($r=e),$r}function Wr(e){const r=typeof e=="string"?rn(e,!0,$r):e;if(r){const n=wt(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function qu(e,r){const n=rn(e,!0,$r);if(!n)return!1;const t=wt(n.provider,n.prefix);return yy(t,n.name,r)}function il(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),$r&&!r&&!e.prefix){let i=!1;return Hu(e)&&(e.prefix="",Wu(e,(o,a)=>{a&&qu(o,a)&&(i=!0)})),i}const n=e.prefix;if(!Sn({provider:r,prefix:n,name:"a"}))return!1;const t=wt(r,n);return!!Yo(t,e)}function Sy(e){return!!Wr(e)}function wy(e){const r=Wr(e);return r?{...tn,...r}:null}function Cy(e){const r={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let t={provider:"",prefix:"",name:""};return e.forEach(i=>{if(t.name===i.name&&t.prefix===i.prefix&&t.provider===i.provider)return;t=i;const o=i.provider,a=i.prefix,s=i.name,l=n[o]||(n[o]=Object.create(null)),c=l[a]||(l[a]=wt(o,a));let u;s in c.icons?u=r.loaded:a===""||c.missing.has(s)?u=r.missing:u=r.pending;const f={provider:o,prefix:a,name:s};u.push(f)}),r}function Vu(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function Iy(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const r=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!r.length)return;let n=!1;const t=e.provider,i=e.prefix;r.forEach(o=>{const a=o.icons,s=a.pending.length;a.pending=a.pending.filter(l=>{if(l.prefix!==i)return!0;const c=l.name;if(e.icons[c])a.loaded.push({provider:t,prefix:i,name:c});else if(e.missing.has(c))a.missing.push({provider:t,prefix:i,name:c});else return n=!0,!0;return!1}),a.pending.length!==s&&(n||Vu([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let Ry=0;function Ty(e,r,n){const t=Ry++,i=Vu.bind(null,n,t);if(!r.pending.length)return i;const o={id:t,icons:r,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),i}const lo=Object.create(null);function ol(e,r){lo[e]=r}function co(e){return lo[e]||lo[""]}function Dy(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?rn(i,r,n):i;o&&t.push(o)}),t}var Py={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function _y(e,r,n,t){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let w=e.resources.slice(0);for(a=[];w.length>1;){const P=Math.floor(Math.random()*w.length);a.push(w[P]),w=w.slice(0,P).concat(w.slice(P+1))}a=a.concat(w)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const s=Date.now();let l="pending",c=0,u,f=null,d=[],p=[];typeof t=="function"&&p.push(t);function h(){f&&(clearTimeout(f),f=null)}function v(){l==="pending"&&(l="aborted"),h(),d.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),d=[]}function m(w,P){P&&(p=[]),typeof w=="function"&&p.push(w)}function y(){return{startTime:s,payload:r,status:l,queriesSent:c,queriesPending:d.length,subscribe:m,abort:v}}function b(){l="failed",p.forEach(w=>{w(void 0,u)})}function C(){d.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),d=[]}function D(w,P,S){const T=P!=="success";switch(d=d.filter(R=>R!==w),l){case"pending":break;case"failed":if(T||!e.dataAfterTimeout)return;break;default:return}if(P==="abort"){u=S,b();return}if(T){u=S,d.length||(a.length?_():b());return}if(h(),C(),!e.random){const R=e.resources.indexOf(w.resource);R!==-1&&R!==e.index&&(e.index=R)}l="completed",p.forEach(R=>{R(S)})}function _(){if(l!=="pending")return;h();const w=a.shift();if(w===void 0){if(d.length){f=setTimeout(()=>{h(),l==="pending"&&(C(),b())},e.timeout);return}b();return}const P={status:"pending",resource:w,callback:(S,T)=>{D(P,S,T)}};d.push(P),c++,f=setTimeout(_,e.rotate),n(w,r,P.callback)}return setTimeout(_),y}function Ku(e){const r={...Py,...e};let n=[];function t(){n=n.filter(s=>s().status==="pending")}function i(s,l,c){const u=_y(r,s,l,(f,d)=>{t(),c&&c(f,d)});return n.push(u),u}function o(s){return n.find(l=>s(l))||null}return{query:i,find:o,setIndex:s=>{r.index=s},getIndex:()=>r.index,cleanup:t}}function Jo(e){let r;if(typeof e.resources=="string")r=[e.resources];else if(r=e.resources,!(r instanceof Array)||!r.length)return null;return{resources:r,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Zn=Object.create(null),xr=["https://api.simplesvg.com","https://api.unisvg.com"],wn=[];for(;xr.length>0;)xr.length===1||Math.random()>.5?wn.push(xr.shift()):wn.push(xr.pop());Zn[""]=Jo({resources:["https://api.iconify.design"].concat(wn)});function al(e,r){const n=Jo(r);return n===null?!1:(Zn[e]=n,!0)}function ei(e){return Zn[e]}function ky(){return Object.keys(Zn)}function sl(){}const Oi=Object.create(null);function Oy(e){if(!Oi[e]){const r=ei(e);if(!r)return;const n=Ku(r),t={config:r,redundancy:n};Oi[e]=t}return Oi[e]}function Yu(e,r,n){let t,i;if(typeof e=="string"){const o=co(e);if(!o)return n(void 0,424),sl;i=o.send;const a=Oy(e);a&&(t=a.redundancy)}else{const o=Jo(e);if(o){t=Ku(o);const a=e.resources?e.resources[0]:"",s=co(a);s&&(i=s.send)}}return!t||!i?(n(void 0,424),sl):t.query(r,i,n)().abort}const ll="iconify2",Hr="iconify",Ju=Hr+"-count",cl=Hr+"-version",Xu=36e5,Ey=168;function uo(e,r){try{return e.getItem(r)}catch{}}function Xo(e,r,n){try{return e.setItem(r,n),!0}catch{}}function ul(e,r){try{e.removeItem(r)}catch{}}function fo(e,r){return Xo(e,Ju,r.toString())}function po(e){return parseInt(uo(e,Ju))||0}const At={local:!0,session:!0},Qu={local:new Set,session:new Set};let Qo=!1;function Ny(e){Qo=e}let dn=typeof window>"u"?{}:window;function Zu(e){const r=e+"Storage";try{if(dn&&dn[r]&&typeof dn[r].length=="number")return dn[r]}catch{}At[e]=!1}function ed(e,r){const n=Zu(e);if(!n)return;const t=uo(n,cl);if(t!==ll){if(t){const s=po(n);for(let l=0;l<s;l++)ul(n,Hr+l.toString())}Xo(n,cl,ll),fo(n,0);return}const i=Math.floor(Date.now()/Xu)-Ey,o=s=>{const l=Hr+s.toString(),c=uo(n,l);if(typeof c=="string"){try{const u=JSON.parse(c);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>i&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&r(u,s))return!0}catch{}ul(n,l)}};let a=po(n);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,fo(n,a)):Qu[e].add(s))}function td(){if(!Qo){Ny(!0);for(const e in At)ed(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=wt(t,i);if(!Yo(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function My(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in At)ed(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function Ay(e,r){Qo||td();function n(t){let i;if(!At[t]||!(i=Zu(t)))return;const o=Qu[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=po(i),!fo(i,a+1))return;const s={cached:Math.floor(Date.now()/Xu),provider:e.provider,data:r};return Xo(i,Hr+a.toString(),JSON.stringify(s))}r.lastModified&&!My(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function dl(){}function Ly(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Iy(e)}))}function zy(e,r){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(r).sort():e.iconsToLoad=r,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:t}=e,i=e.iconsToLoad;delete e.iconsToLoad;let o;if(!i||!(o=co(n)))return;o.prepare(n,t,i).forEach(s=>{Yu(n,s,l=>{if(typeof l!="object")s.icons.forEach(c=>{e.missing.add(c)});else try{const c=Yo(e,l);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(f=>{u.delete(f)}),Ay(e,l)}catch(c){console.error(c)}Ly(e)})})}))}const Zo=(e,r)=>{const n=Dy(e,!0,Uu()),t=Cy(n);if(!t.pending.length){let l=!0;return r&&setTimeout(()=>{l&&r(t.loaded,t.missing,t.pending,dl)}),()=>{l=!1}}const i=Object.create(null),o=[];let a,s;return t.pending.forEach(l=>{const{provider:c,prefix:u}=l;if(u===s&&c===a)return;a=c,s=u,o.push(wt(c,u));const f=i[c]||(i[c]=Object.create(null));f[u]||(f[u]=[])}),t.pending.forEach(l=>{const{provider:c,prefix:u,name:f}=l,d=wt(c,u),p=d.pendingIcons||(d.pendingIcons=new Set);p.has(f)||(p.add(f),i[c][u].push(f))}),o.forEach(l=>{const{provider:c,prefix:u}=l;i[c][u].length&&zy(l,i[c][u])}),r?Ty(r,t,o):dl},jy=e=>new Promise((r,n)=>{const t=typeof e=="string"?rn(e,!0):e;if(!t){n(e);return}Zo([t||e],i=>{if(i.length&&t){const o=Wr(t);if(o){r({...tn,...o});return}}n(e)})});function Fy(e){try{const r=typeof e=="string"?JSON.parse(e):e;if(typeof r.body=="string")return{...r}}catch{}}function By(e,r){const n=typeof e=="string"?rn(e,!0,!0):null;if(!n){const o=Fy(e);return{value:e,data:o}}const t=Wr(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=Zo([n],()=>r(e,n,Wr(n)));return{value:e,name:n,loading:i}}function Ei(e){return e.hasAttribute("inline")}let rd=!1;try{rd=navigator.vendor.indexOf("Apple")===0}catch{}function Gy(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(rd||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const $y=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Wy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ho(e,r,n){if(r===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*r*n)/n;if(typeof e!="string")return e;const t=e.split($y);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=Wy.test(o);for(;;){if(a){const s=parseFloat(o);isNaN(s)?i.push(o):i.push(Math.ceil(s*r*n)/n)}else i.push(o);if(o=t.shift(),o===void 0)return i.join("");a=!a}}const Hy=e=>e==="unset"||e==="undefined"||e==="none";function nd(e,r){const n={...tn,...e},t={...Gu,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(h=>{const v=[],m=h.hFlip,y=h.vFlip;let b=h.rotate;m?y?b+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):y&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let C;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:C=i.height/2+i.top,v.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:C=i.width/2+i.left,v.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}b%2===1&&(i.left!==i.top&&(C=i.left,i.left=i.top,i.top=C),i.width!==i.height&&(C=i.width,i.width=i.height,i.height=C)),v.length&&(o='<g transform="'+v.join(" ")+'">'+o+"</g>")});const a=t.width,s=t.height,l=i.width,c=i.height;let u,f;a===null?(f=s===null?"1em":s==="auto"?c:s,u=ho(f,l/c)):(u=a==="auto"?l:a,f=s===null?ho(u,c/l):s==="auto"?c:s);const d={},p=(h,v)=>{Hy(v)||(d[h]=v.toString())};return p("width",u),p("height",f),d.viewBox=i.left.toString()+" "+i.top.toString()+" "+l.toString()+" "+c.toString(),{attributes:d,body:o}}const Uy=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Mn=Uy();function qy(e){Mn=e}function Vy(){return Mn}function Ky(e,r){const n=ei(e);if(!n)return 0;let t;if(!n.maxURL)t=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const o=r+".json?icons=";t=n.maxURL-i-n.path.length-o.length}return t}function Yy(e){return e===404}const Jy=(e,r,n)=>{const t=[],i=Ky(e,r),o="icons";let a={type:o,provider:e,prefix:r,icons:[]},s=0;return n.forEach((l,c)=>{s+=l.length+1,s>=i&&c>0&&(t.push(a),a={type:o,provider:e,prefix:r,icons:[]},s=l.length),a.icons.push(l)}),t.push(a),t};function Xy(e){if(typeof e=="string"){const r=ei(e);if(r)return r.path}return"/"}const Qy=(e,r,n)=>{if(!Mn){n("abort",424);return}let t=Xy(r.provider);switch(r.type){case"icons":{const o=r.prefix,s=r.icons.join(","),l=new URLSearchParams({icons:s});t+=o+".json?"+l.toString();break}case"custom":{const o=r.uri;t+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;Mn(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(Yy(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},Zy={prepare:Jy,send:Qy};function fl(e,r){switch(e){case"local":case"session":At[e]=r;break;case"all":for(const n in At)At[n]=r;break}}const Ni="data-style";let id="";function ex(e){id=e}function pl(e,r){let n=Array.from(e.childNodes).find(t=>t.hasAttribute&&t.hasAttribute(Ni));n||(n=document.createElement("style"),n.setAttribute(Ni,Ni),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(r?"-0.125em":"0")+"}span,svg{display:block}"+id}function od(){ol("",Zy),Uu(!0);let e;try{e=window}catch{}if(e){if(td(),e.IconifyPreload!==void 0){const n=e.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!il(i))&&console.error(t)}catch{console.error(t)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(const t in n){const i="IconifyProviders["+t+"] is invalid.";try{const o=n[t];if(typeof o!="object"||!o||o.resources===void 0)continue;al(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>fl(n,!0),disableCache:n=>fl(n,!1),iconExists:Sy,getIcon:wy,listIcons:xy,addIcon:qu,addCollection:il,calculateSize:ho,buildIcon:nd,loadIcons:Zo,loadIcon:jy,addAPIProvider:al,appendCustomStyle:ex,_api:{getAPIConfig:ei,setAPIModule:ol,sendAPIQuery:Yu,setFetch:qy,getFetch:Vy,listAPIProviders:ky}}}function ad(e,r){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in r)n+=" "+t+'="'+r[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function tx(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function rx(e){return"data:image/svg+xml,"+tx(e)}function nx(e){return'url("'+rx(e)+'")'}const go={"background-color":"currentColor"},sd={"background-color":"transparent"},hl={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},gl={"-webkit-mask":go,mask:go,background:sd};for(const e in gl){const r=gl[e];for(const n in hl)r[e+"-"+n]=hl[n]}function vl(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function ix(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=ad(i,{...o,width:r.width+"",height:r.height+""}),s=nx(a),l=t.style,c={"--svg":s,width:vl(o.width),height:vl(o.height),...n?go:sd};for(const u in c)l.setProperty(u,c[u]);return t}let Lr;function ox(){try{Lr=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Lr=null}}function ax(e){return Lr===void 0&&ox(),Lr?Lr.createHTML(e):e}function sx(e){const r=document.createElement("span"),n=e.attributes;let t="";n.width||(t="width: inherit;"),n.height||(t+="height: inherit;"),t&&(n.style=t);const i=ad(e.body,n);return r.innerHTML=ax(i),r.firstChild}function ml(e,r){const n=r.icon.data,t=r.customisations,i=nd(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=sx(i);break;default:a=ix(i,{...tn,...n},o==="mask")}const s=Array.from(e.childNodes).find(l=>{const c=l.tagName&&l.tagName.toUpperCase();return c==="SPAN"||c==="SVG"});s?a.tagName==="SPAN"&&s.tagName===a.tagName?s.setAttribute("style",a.getAttribute("style")):e.replaceChild(a,s):e.appendChild(a)}function bl(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function lx(e="iconify-icon"){let r,n;try{r=window.customElements,n=window.HTMLElement}catch{return}if(!r||!n)return;const t=r.get(e);if(t)return t;const i=["icon","mode","inline","width","height","rotate","flip"],o=class extends n{_shadowRoot;_state;_checkQueued=!1;constructor(){super();const s=this._shadowRoot=this.attachShadow({mode:"open"}),l=Ei(this);pl(s,l),this._state=bl({value:""},l),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(s){if(s==="inline"){const l=Ei(this),c=this._state;l!==c.inline&&(c.inline=l,pl(this._shadowRoot,l))}else this._queueCheck()}get icon(){const s=this.getAttribute("icon");if(s&&s.slice(0,1)==="{")try{return JSON.parse(s)}catch{}return s}set icon(s){typeof s=="object"&&(s=JSON.stringify(s)),this.setAttribute("icon",s)}get inline(){return Ei(this)}set inline(s){s?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const s=this._state;if(s.rendered){const l=this._shadowRoot;if(s.renderedMode==="svg")try{l.lastChild.setCurrentTime(0);return}catch{}ml(l,s)}}get status(){const s=this._state;return s.rendered?"rendered":s.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const s=this._state,l=this.getAttribute("icon");if(l!==s.icon.value){this._iconChanged(l);return}if(!s.rendered)return;const c=this.getAttribute("mode"),u=rl(this);(s.attrMode!==c||py(s.customisations,u))&&this._renderIcon(s.icon,u,c)}_iconChanged(s){const l=By(s,(c,u,f)=>{const d=this._state;if(d.rendered||this.getAttribute("icon")!==c)return;const p={value:c,name:u,data:f};p.data?this._gotIconData(p):d.icon=p});l.data?this._gotIconData(l):this._state=bl(l,this._state.inline,this._state)}_gotIconData(s){this._checkQueued=!1,this._renderIcon(s,rl(this),this.getAttribute("mode"))}_renderIcon(s,l,c){const u=Gy(s.data.body,c),f=this._state.inline;ml(this._shadowRoot,this._state={rendered:!0,icon:s,inline:f,customisations:l,attrMode:c,renderedMode:u})}};i.forEach(s=>{s in o.prototype||Object.defineProperty(o.prototype,s,{get:function(){return this.getAttribute(s)},set:function(l){l!==null?this.setAttribute(s,l):this.removeAttribute(s)}})});const a=od();for(const s in a)o[s]=o.prototype[s]=a[s];return r.define(e,o),o}const cx=lx()||od(),{enableCache:wT,disableCache:CT,iconExists:IT,getIcon:RT,listIcons:TT,addIcon:DT,addCollection:PT,calculateSize:_T,buildIcon:kT,loadIcons:OT,loadIcon:ET,addAPIProvider:NT,_api:MT}=cx,Gt=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:Gt(t[n],r,n)}):r(t)),ld=(e,r="children")=>{const n=[];return Gt(e,t=>n.push(t),r),n},ea=(e,r,n="children")=>e.map(t=>({...t})).filter(t=>{const i=t[n];if(Array.isArray(i)){const a=ea(i,r,n);t[n]=a?.length?a:void 0}const o={filteredChildren:t[n],isLeaf:!i?.length};return r(t,o)}),cd=e=>/^https?:\/\//.test(e),ud=e=>/^mailto:/i.test(e.trim()),ux=e=>{if(!e||!e?.startsWith("/"))return!1;const r=i=>i.endsWith("/")?i:`${i}/`,n=r(window.location.pathname),t=r(new URL(e,window.location.origin).pathname);return n.startsWith(t)},dd=(e=[])=>{const r=e.map((n,t)=>({path:n,index:t})).filter(n=>ux(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},dx=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,s=e.reduce((h,v)=>h+i+(v[a]?.length||0)*o,0),l=Math.ceil(s/n),c=[[]];let u=0,f=0;const d=l*.2,p=h=>f>l-d&&u<n-1&&f+h>l+d;return e.forEach(h=>{const v=i+(h[a]?.length||0)*o;t&&p(i)&&(u++,f=0,c[u]=[]),!t&&f>0&&p(v)&&(u++,f=0,c[u]=[]),c[u].push({...h,group:!0}),f+=i,h[a]&&h[a].forEach(m=>{t&&p(o)&&(u++,f=0,c[u]=[]),c[u].push({...m,group:!1}),f+=o})}),c};function Ze({icon:e,size:r=void 0,sx:n={},...t}){const i=[...Array.isArray(n)?n:[n]];r&&i.push({width:r,height:r});const[o,a]=I.useState(!1),[s,l]=I.useState(!0);if(Do(async()=>{l(!0);try{await Po(e),a(!0)}catch{a(!1)}l(!1)},[e]),t.variant||i.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),cd(e))return g.jsx(er,{component:"span",...t,src:e,sx:i});const c=r?.6*r+4:0;return s?g.jsx(xe,{icon:"codicon:blank",height:c||void 0}):o?g.jsx(er,{component:"span",...t,sx:i,children:g.jsx(xe,{icon:e,height:c||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),g.jsx(er,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}function ta(e=["en","zh"]){const{blocklet:r}=Ft();return I.useMemo(()=>{const t=r.environments.find(c=>c.key==="BLOCKLET_APP_LANGUAGES"),i=t?t.value.split(","):e,o=i[0]||"en",a=i.filter(c=>pt.SUPPORTED_LANGUAGES[c]),s=a.reduce((c,u)=>(c[u]=pt.SUPPORTED_LANGUAGES[u].nativeName,c),{}),l=a.map(c=>({code:c,name:pt.SUPPORTED_LANGUAGES[c].nativeName}));return{locales:i,localeMap:s,defaultLocale:o,languages:l}},[r.environments,e])}const fx=e=>e.from!=="team-tmpl";function px({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&Cp(e.slice(0,t-1),r.slice(0,i-1)))}function fd({treeNode:e}){const{locale:r}=Me(),{blocklet:n}=Ft(),{defaultLocale:t}=ta(),i=n.environments.find(s=>s.key===pt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),o=se(s=>{if(s?.startsWith("/"))try{return new URL(s,i?.value).href}catch{console.error("Failed to parse url",{url:s,origin:i?.value})}return s});function a(){const{title:s,subtitle:l}=e;let c=s,u=l;return Yt(s)&&(c=s[r]||s[t]||s.en),!I.isValidElement(l)&&Yt(l)&&(u=l[r]||l[t]||l.en),g.jsxs(oe,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(me,{variant:"subtitle1",sx:{fontSize:16},children:c}),l&&g.jsx(me,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:u})]})}return g.jsxs(g.Fragment,{children:[e.icon&&(_o(o(e.icon))?g.jsx(Ze,{size:16,style:{marginRight:4},icon:o(e.icon)}):g.jsx(xe,{size:16,style:{marginRight:4},icon:e.icon})),a()]})}fd.propTypes={treeNode:x.object.isRequired};const hx=ot(oe)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function pd({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),g.jsx(hx,{children:g.jsx(Th,{backend:Dh,...i,children:g.jsx(nm,{generateNodeProps:o=>{const a=fx(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?g.jsx(xe,{icon:"ic:round-drag-indicator"}):g.jsx(oe,{sx:{width:16,height:16}}),title:g.jsx(fd,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:px,theme:ly})})})}pd.propTypes={treeData:x.object.isRequired,setTreeData:x.func,renderActions:x.func};var gx=lc();const vx=$n(gx);function hd({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},defaultLocale:t="en",locale:i="",locales:o=[],localeMap:a={},onRemoveLocale:s=()=>{}}){const{t:l}=Me(),c=I.useRef(),[u,f]=I.useState(null),d=zt({localeList:[],inputLocale:"",localeError:""}),p=I.useMemo(()=>!!u,[u]),h=I.useMemo(()=>o.includes(i)?i:t,[o,i]),v=I.useMemo(()=>d.localeList.filter(S=>!!a[S]),[d.localeList,a]),m=I.useMemo(()=>Object.keys(Et(a,[...d.localeList,t])).map(S=>({title:a[S],value:S})),[d.localeList]),y=I.useMemo(()=>`Default (${a[t]||Object.values(a)?.[0]})`,[a]),b=se(S=>S?S===t||d.localeList.includes(S)?l("navigation.form.localeExists",{value:S}):!0:l("common.requiredErrorText",{name:"Locale"})),C=se((S="")=>{const T=S?.trim(),R=b(T);return R!==!0?d.localeError=R:d.localeError="",R}),D=se(()=>{f(null),d.inputLocale="",d.localeError=""}),_=se(()=>{const S=d.inputLocale?.trim();C(S)===!0&&(D(),d.localeList.push(S),r(S))}),w=se((S,T)=>{S.preventDefault(),S.stopPropagation(),d.localeList=Ac(d.localeList,T),s(T)}),P=se(S=>{const{value:T}=S.target;C(T),d.inputLocale=T});return I.useEffect(()=>{d.localeList=[...o]},[o,d]),Sh("enter",()=>{setTimeout(()=>{_()})},{target:c}),g.jsxs(g.Fragment,{children:[g.jsxs(Fh,{sx:e,value:h,onChange:(S,T)=>{n(T)},children:[g.jsx($a,{label:y,value:t}),v.map(S=>g.jsx($a,{sx:{position:"relative"},label:g.jsxs(g.Fragment,{children:[a[S],g.jsx(Ae,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:T=>{w(T,S)},children:g.jsx(xe,{icon:"mdi:close",height:14})})]}),value:S},S)),g.jsx(Ae,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:S=>{f(S.currentTarget)},children:g.jsx(xe,{icon:"mdi:plus"})})]}),g.jsx(Ui,{open:p,anchorEl:u,onClose:D,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:g.jsxs(oe,{sx:{p:2,width:"270px"},children:[g.jsx(me,{variant:"subtitle2",children:l("navigation.form.localePlaceholder")}),g.jsx(oe,{sx:{mt:1},children:g.jsx(Ki,{required:!0,fullWidth:!0,label:"Locale",value:d.inputLocale,options:m,onChange:P,error:!!d.localeError,helperText:d.localeError||" "})}),g.jsx(oe,{sx:{display:"flex",justifyContent:"flex-end"},children:g.jsx(xt,{size:"small",variant:"contained",onClick:_,children:l("common.confirm")})})]})})]})}hd.propTypes={sx:x.any,onAdd:x.func,onChange:x.func,onRemoveLocale:x.func,defaultLocale:x.string,locale:x.string,localeMap:x.object,locales:x.array};const ra=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function gd(e,r,n=5e3){for(const t of ra){const i=Ie(t,e);try{return await Gh.get(i,{params:r,timeout:n})}catch(o){console.warn(`Failed to fetch from ${i}:`,o)}}throw new Error(`All icon API endpoints ${e} failed`)}async function mx({keyword:e,limit:r=999,start:n=0,palette:t=!1}){let i="",o=e;e.includes(":")&&([i,o]=e.split(":"));const{data:a}=await gd("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const fn=new Map;async function bx(e){if(fn.has(e))return fn.get(e);const r=(async()=>{const{data:n}=await gd("/collection",{prefix:e}),t=new Set;return n.uncategorized?.forEach(i=>t.add(`${e}:${i}`)),Object.values(n.categories??{}).forEach(i=>{i.forEach(o=>t.add(`${e}:${o}`))}),Array.from(t)})();fn.set(e,r);try{return await r}catch(n){throw fn.delete(e),n}}function yx(e){return Ie(ra[0],`${e}.svg`)}function xx(e){try{const r=new URL(e);for(const n of ra)if(r.origin===n)return Ip(r.pathname).replace(".svg","");return""}catch{return""}}function Sx(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):_o(e)&&(n=xx(e))),{isIconId:r,iconId:n}}const wx=I.lazy(()=>Pp(()=>import("./index-XgkYfld7.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url).then(e=>({default:e.Uploader}))),yl=Ve(Ze)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function vd({icon:e,...r}){const[n,t]=I.useState(!1);return Do(async()=>{t(!1),await Po(e),t(!0)},[e]),e?n?g.jsx(xe,{icon:e,...r}):g.jsx(xe,{color:"#f06f6e",icon:"ic:baseline-error",...r}):g.jsx(xe,{icon:"material-symbols-light:select-rounded",...r})}vd.propTypes={icon:x.string.isRequired};function vo({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:s,prefix:l,inService:c}=dc(),{blocklet:u}=Ft(),f=Hn(Z=>Z.breakpoints.down("md")),d=u.environments.find(Z=>Z.key===pt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),p=s(),h=I.useRef(null),v=I.useRef(null),m=I.useRef(null),{t:y,locale:b}=Me(),{isIconId:C,iconId:D}=Sx(e),[_,w]=I.useState(null),{onChange:P,onBlur:S,sx:T,...R}=a,k=i.includes("upload"),j=i.includes("select"),M=Ie(l,"/api/media/upload",u.appPid),H=zt({showPopover:!1}),E=se(Z=>{if(Z?.startsWith("/"))try{const V=c?window.location.origin:d?.value;return new URL(Z,V).href}catch{console.error("Failed to resolve url: ",Z)}return Z},[d?.value,c]),B=se(async Z=>await h.current.getUploader().uploadFile(Z)),G=se(()=>{w(null)}),q=se(()=>{j&&w(m.current)}),J=se(async Z=>{try{if(o==="url"){const V=yx(Z),re=await Rp(V,{width:128,height:128}),ie=await Tp(re,Z);await B(ie)}else P?.(Z)}catch(V){console.error("Failed to pick icon:",V)}G()}),ee=se(Z=>{Z.stopPropagation(),v.current.open(),G()}),X=se(Z=>{a?.onChange?.(Z.data.url)});return g.jsxs(g.Fragment,{children:[g.jsx(it,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...T},onClick:j?q:void 0,...R,label:n,placeholder:t,slotProps:{input:{ref:m,readOnly:!0,startAdornment:g.jsx(Rn,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(H.showPopover=!0)},onMouseLeave:()=>{H.showPopover=!1},children:g.jsx(yl,{size:28,icon:E(e),alt:"Error"})}),endAdornment:g.jsxs(Rn,{position:"end",children:[g.jsx(Ae,{sx:{visibility:e?"visible":"hidden"},onClick:Z=>{Z.stopPropagation(),P("")},children:g.jsx(Nc,{style:{fontSize:18}})}),k&&g.jsx(Dp,{title:y("common.upload"),children:g.jsx(Ae,{disableFocusRipple:!1,disableRipple:!1,onClick:ee,children:g.jsx(vd,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),j&&g.jsx(oe,{component:Bh,sx:{mr:"-6px",fontSize:24,transform:_?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),j&&g.jsx(Ui,{open:!!_,anchorEl:_,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...f&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:G,children:g.jsx(md,{label:n,placeholder:t,value:C?D:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:J,onClose:G})}),g.jsx(mo,{ref:h,locale:b,apiPath:M,headers:p,imageEditorProps:{},onUploadFinish:X}),g.jsx(mo,{ref:v,locale:b,apiPath:M,headers:p,onUploadFinish:X}),g.jsx(Ui,{sx:{pointerEvents:"none"},open:H.showPopover,anchorEl:m.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{H.showPopover=!1},disableRestoreFocus:!0,children:g.jsx(yl,{size:120,icon:E(e),alt:"Error"})})]})}vo.propTypes={value:x.string.isRequired,label:x.any,placeholder:x.any,helperText:x.string,methods:x.arrayOf(x.oneOf(["select","upload"])),iconifyShape:x.oneOf(["id","url"])};function md({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[s,l]=I.useState([]),[c,u]=I.useState(!0),[f,d]=I.useState(n),[p,h]=I.useState(!1),v=I.useRef(null),m=I.useRef([]),y=I.useRef(1),b=I.useRef(!0),{t:C}=Me(),D=96,_=se(()=>{!b.current||c||(u(!0),setTimeout(()=>{const S=y.current+1,T=(S-1)*D,R=S*D,k=m.current.slice(T,R);l(j=>[...j,...k]),y.current=S,b.current=R<m.current.length,u(!1)},300))}),w=se(S=>{m.current=S,y.current=1,b.current=S.length>D;const T=S.slice(0,D);l(T),h(S.length===0),b.current&&_()}),{run:P}=fc(async S=>{if(S){u(!0);try{const{icons:T}=await mx({keyword:S});w(T)}catch(T){console.error("Failed to search icons:",T),h(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return I.useEffect(()=>{const S=()=>{if(!v.current)return;const{scrollTop:R,scrollHeight:k,clientHeight:j}=v.current;(R+j>=k-150||k<=j)&&_()},T=v.current;return T&&(T.addEventListener("scroll",S),S()),()=>{T&&T.removeEventListener("scroll",S)}},[_,c]),Do(async()=>{if(f)P(f);else{u(!0);try{const S=await bx("mdi-light");w(S)}catch(S){console.error("Failed to fetch default icons:",S),h(!0)}finally{u(!1)}}},[f,P,w]),g.jsxs(Cx,{ref:v,sx:t,...a,children:[g.jsxs(oe,{className:"icon-picker-input",children:[g.jsx(it,{label:C("navigation.form.searchIcons"),placeholder:C("navigation.form.searchIconsPlaceholder"),size:"small",value:f,sx:{flexGrow:1},autoFocus:!0,onChange:S=>d(S.target.value),slotProps:{input:{endAdornment:g.jsx(Ae,{sx:{visibility:f?"visible":"hidden"},onClick:()=>d(""),children:g.jsx(Nc,{style:{fontSize:18}})})}}}),g.jsx(xt,{onClick:o,children:C("common.cancel")})]}),g.jsxs(oe,{children:[s.length>0&&g.jsx(oe,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:s.map(S=>g.jsx(Ix,{$active:n===S,onClick:()=>{i(S)},children:g.jsx(xe,{icon:S,width:"32",height:"32"})},S))}),p&&g.jsx(oe,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:g.jsx(oe,{sx:{textAlign:"center"},children:"No matching results"})}),c&&g.jsx(oe,{sx:{p:2,display:"flex",justifyContent:"center"},children:g.jsx(pc,{size:20})})]})]})}md.propTypes={label:x.any,placeholder:x.any,value:x.string,sx:x.object,onPick:x.func.isRequired,onClose:x.func.isRequired};const Cx=Ve(oe)(({theme:e})=>({minWidth:"100%",height:"100%",padding:0,overflow:"auto",[e.breakpoints.up("md")]:{minWidth:"480px",maxHeight:"400px",padding:e.spacing(1),paddingTop:0,".icon-picker-input":{paddingTop:e.spacing(2),paddingBottom:e.spacing(1),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}},".icon-picker-input":{position:"sticky",display:"flex",alignItems:"center",gap:e.spacing(1),top:0,zIndex:1,backgroundColor:e.palette.background.paper}})),Ix=Ve(Ae,{shouldForwardProp:e=>e!=="$active"})(({$active:e,theme:r})=>({boxSizing:"content-box",backgroundColor:e?r.palette.action.hover:"transparent",borderRadius:4,padding:1,width:32,height:32,"&:hover":{backgroundColor:r.palette.action.hover}}));function mo({ref:e=null,locale:r,apiPath:n,headers:t,imageEditorProps:i={actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:1,initialAspectRatio:1,croppedCanvasOptions:{minWidth:120,minHeight:120}}},onUploadFinish:o}){return g.jsx(I.Suspense,{children:g.jsx(wx,{locale:r,ref:e,popup:!0,installerProps:{disabled:!0},plugins:["ImageEditor"],onUploadFinish:a=>o?.(a),coreProps:{restrictions:{allowedFileTypes:["image/*"],maxFileSize:1024*1024*1,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:i,apiPathProps:{uploader:n,disableMediaKitPrefix:!0,disableAutoPrefix:!0,disableMediaKitStatus:!0},tusProps:{headers:t}})})}mo.propTypes={ref:x.any,locale:x.string,apiPath:x.string,headers:x.object,imageEditorProps:x.object,onUploadFinish:x.func};const xl=24,Sl=48,wl="add";x.string.isRequired;function na({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Ec(),{t:s,locale:l}=Me(),{localeMap:c,defaultLocale:u}=ta(),f=se(()=>({title:{[u]:""},description:{[u]:""},link:{[u]:""}})),d=se(N=>Ac(Array.from(new Set(be.NAVIGATION_I18N_FIELDS.flatMap(O=>Yt(N[O])?Object.keys(N[O]):[]))),u)),p=I.useRef(()=>{}),h=zt({isRoot:!0,type:wl,linkDisabled:!1,locale:u,formState:f(),get localeList(){return d(h.formState)}}),{handleSubmit:v,control:m,reset:y,setValue:b,clearErrors:C,formState:{errors:D}}=zh({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});I.useEffect(()=>{be.NAVIGATION_I18N_FIELDS.forEach(N=>b(N,h.formState[N][h.locale]))},[b,h.locale]);const _=jh({control:m}),w=_.component,P=_.title,S=_.description,T=_.link,R=_.parent;I.useEffect(()=>{h.formState.title[h.locale]=P},[P]),I.useEffect(()=>{h.formState.description[h.locale]=S},[S]),I.useEffect(()=>{h.formState.link[h.locale]=T},[T]),I.useEffect(()=>{i?.(_)},[_,i]);const k=I.useMemo(()=>t.find(O=>w?n.find(te=>te.name===w).did===O.id:O.id===R),[n,t,w,R]),j=I.useMemo(()=>{if(k?.component){const N=n.find(ae=>ae.name===k.component),{link:O}=N||{},U=Yt(O)?O[h.locale]:O;if(w)return ka(U);const te=Yt(k.link)?k.link[h.locale]:k.link;return ka(Ie(U,te||"/"))}return null},[n,h.locale,k,w]),M=I.useMemo(()=>{const{component:N}=k||{},O=n.find(ae=>ae.name===N),{navigation:U=[]}=O||{};return Ee.flattenNavigation(U,{transform(ae,de){return de?.section&&(ae.section=ae.section||de.section),ae}}).filter(ae=>ae.link).filter(ae=>Ee.isMatchSection(ae.section,r)).map(ae=>({label:ae.link,title:ae.title[l]||ae.title}))},[k,n,r,l]),H=se(()=>{h.isRoot=!0,h.locale=u,h.type=wl,h.linkDisabled=!1,h.formState=f(),y(),C(),p.current=()=>{}}),E=se((N={})=>(h.localeList.length>0&&be.NAVIGATION_I18N_FIELDS.forEach(O=>{rg(h.formState[O]).length>1&&(N[O]=h.formState[O])}),ko(N.role)&&(N.role=void 0),N)),B=se(({parent:N}={},O=()=>{})=>{h.type="add",h.isRoot=!N,b("parent",N?.id),p.current=U=>{O(U)}}),G=se((N={},O=()=>{})=>{const{id:U,icon:te,parent:ae,component:de,role:pe=[]}=N;b("id",U),b("icon",te),N.from==="team-tmpl"&&(h.linkDisabled=!0);const Ce=d(N),ze=(ye,Pe)=>{hc(ye)?h.formState[Pe]=Ce.reduce((le,ve)=>(le[ve]=ye,le),{[u]:ye}):Yt(ye)?h.formState[Pe]=Qe(ye):h.formState[Pe]={}};be.NAVIGATION_I18N_FIELDS.forEach(ye=>ze(N[ye],ye)),be.NAVIGATION_I18N_FIELDS.forEach(ye=>b(ye,h.formState[ye][h.locale])),b("component",de),b("parent",ae),b("role",pe||[]),h.type="edit",h.isRoot=!ae,p.current=ye=>{const Pe=_p(ye,["id","title","description","icon","component","link","role"]);O(Pe)}}),q=se(N=>{const O=N?.trim();if(r!=="bottomNavigation"){if(!O)return s("common.requiredErrorText",{name:s("navigation.form.title")});if(O.length>xl)return s("navigation.form.titleTooLong",{len:xl})}return!0}),J=se(N=>{const O=N?.trim();return O&&O.length>Sl?s("navigation.form.descriptionTooLong",{len:Sl}):!0}),ee=se(N=>N?.startsWith("/")?new URL(N,window.location.origin).href:N),X=se(async N=>{const O=N?.trim();if(O){if(_o(ee(O)))return!0;try{await Po(O)}catch{return s("navigation.form.invalidIcon")}}return!0}),Z=se(N=>{const O=N?.trim();return O?X(O):s("common.requiredErrorText",{name:s("navigation.form.icon")})}),V=se(N=>{const O=N?.trim();return O?Ee.checkLink(O)?!0:s("navigation.form.invalidLink"):h.isRoot?!0:s("common.requiredErrorText",{name:s("navigation.form.link")})}),re=se(N=>{h.locale=N,be.NAVIGATION_I18N_FIELDS.forEach(O=>{h.formState[O][N]||(h.formState[O][N]="")}),setTimeout(()=>{C()})}),ie=se(()=>{const{title:N,link:O}=h.formState;if(r!=="bottomNavigation")for(const U of Object.keys(N)){const te=q(N[U]);if(te!==!0)return te}for(const U of Object.keys(O)){const te=V(O[U]);if(te!==!0)return te}return!0}),$=se(N=>{const O=ie();O===!0?p.current(E(N)):Ot.error(O)}),W=se(N=>{h.locale=u,be.NAVIGATION_I18N_FIELDS.forEach(O=>{h.formState[O]=Et(h.formState[O],N)}),i?.(_)}),L=se(N=>{h.locale=N,be.NAVIGATION_I18N_FIELDS.forEach(O=>{h.formState[O][N]=h.formState[O][u]}),i?.(_),setTimeout(()=>{C()})});return I.useImperativeHandle(e,()=>({add:B,edit:G,resetImmediate:()=>H(),reset:()=>setTimeout(()=>H(),0),submit:v($)}),[B,H,G,v,$]),g.jsxs(oe,{...o,children:[g.jsx(hd,{sx:{mb:1},onAdd:L,onChange:re,onRemoveLocale:W,defaultLocale:u,locale:h.locale,localeMap:c,locales:h.localeList}),g.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&g.jsx(lt,{name:"title",control:m,rules:{validate:q},render:({field:N})=>g.jsx(it,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:h.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...N})}),r==="bottomNavigation"?g.jsx(lt,{name:"icon",control:m,rules:{validate:Z},render:({field:N})=>g.jsx(vo,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!D?.icon?.message,helperText:D?.icon?.message,disabled:h.locale!==u,methods:["select"],iconifyShape:"url",...N})}):g.jsx(lt,{name:"icon",control:m,rules:{validate:X},render:({field:N})=>g.jsx(vo,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!D?.icon?.message,helperText:D?.icon?.message,disabled:h.locale!==u,...N})}),h.isRoot&&g.jsx(lt,{name:"component",control:m,render:({field:N})=>g.jsx(Ki,{fullWidth:!0,margin:"dense",disabled:h.locale!==u&&N.value,label:s("navigation.form.component"),placeholer:s("navigation.form.componentPlaceholder"),options:n.map(O=>({title:O.title,value:O.name,description:O.link})),error:!!D?.component?.message,helperText:D?.component?.message||" ",...Et(N,"ref")})}),!h.isRoot&&["header"].includes(r)&&g.jsx(lt,{name:"description",control:m,rules:{validate:J},render:({field:N})=>g.jsx(it,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.descriptionPlaceholder"),label:s("navigation.form.description"),disabled:h.isEdit,error:!!D?.description?.message,helperText:D?.description?.message||" ",...N})}),g.jsx(lt,{name:"link",control:m,rules:{validate:V},render:({field:N})=>g.jsx(gc,{fullWidth:!0,margin:"dense",children:g.jsx($h,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:h.linkDisabled,isOptionEqualToValue:O=>O.label,options:M,renderInput:O=>g.jsx(it,{...O,placeholder:s("navigation.form.linkPlaceholder"),label:s("navigation.form.link"),error:!!D?.link?.message,helperText:D?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:j?g.jsx(Rn,{position:"start",sx:{textDecoration:vx(T||"")?"line-through":""},children:j}):null}}}),renderOption:(O,U)=>g.jsxs(oe,{component:"li",...O,children:[U.label,g.jsx(me,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:U.title})]}),margin:"dense",...N,onChange:()=>{},onInputChange:(O,U)=>{N.onChange(U)}})})}),["dashboard","sessionManager"].includes(r)&&g.jsx(lt,{name:"role",control:m,render:({field:N})=>g.jsx(Ki,{fullWidth:!0,multiple:!0,margin:"dense",label:s("navigation.form.role"),placeholer:s("navigation.form.rolePlaceholder"),options:a.map(O=>({title:O.title,value:O.name})),error:!!D?.role?.message,helperText:D?.role?.message||" ",...Et(N,"ref")})}),r==="bottomNavigation"&&g.jsx(lt,{name:"title",control:m,rules:{validate:q},render:({field:N})=>g.jsx(it,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:h.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...N})})]})]})}na.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array,onChange:x.func};function ia({ref:e=null,section:r="",components:n=[],rawNavigations:t=[]}){const{t:i}=Me(),[o,{setTrue:a,setFalse:s}]=Ah(),[l,c]=I.useState("add"),u=I.useRef(null),f=I.useMemo(()=>{const m={add:i("common.create"),edit:i("common.edit")}[l];return m?`${m} ${i("navigation.navigation")}`:"--"},[i,l]),d=I.useCallback(()=>{s(),u.current?.reset()},[s]),p=I.useCallback((v={},m=()=>{})=>{c("add"),u.current?.add(v,y=>m(d,y)),a()},[a,d]),h=I.useCallback((v={},m=()=>{})=>{c("edit"),u.current?.edit(v,y=>m(d,y)),a()},[a,d]);return I.useImperativeHandle(e,()=>({add:p,edit:h,close:d}),[p,h,d]),g.jsx(vc,{open:o,title:f,keepMounted:!0,onClose:d,sx:{".MuiDialogContent-root":{pt:0}},actions:g.jsx(Tn,{color:"primary",variant:"contained",onClick:()=>u.current?.submit(),children:i("common.confirm")}),children:g.jsx(na,{ref:u,section:r,components:n,rawNavigations:t})})}ia.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array};function bd({className:e="",add:r=()=>{},edit:n=()=>{},toggle:t=()=>{},del:i=()=>{},data:o,section:a=""}){const{t:s}=Me(),l=["yaml","team-tmpl"].includes(o.from),c=I.isValidElement(o.subtitle);function u(v){v.preventDefault(),v.stopPropagation()}const f=I.useCallback(v=>{u(v),r(o)},[r,o]),d=I.useCallback(v=>{u(v),n(o)},[n,o]),p=I.useCallback(v=>{u(v),t(o)},[t,o]),h=I.useCallback(v=>{u(v),i(o)},[i,o]);return g.jsxs("div",{className:e,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&g.jsx("span",{title:s(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:g.jsx(Ae,{size:"small",color:"success",onClick:f,disabled:c,children:g.jsx(xe,{icon:"mdi:plus-box-outline"})})}),g.jsx("span",{title:s(c?"navigation.action.noEdit":"navigation.action.edit"),children:g.jsx(Ae,{size:"small",color:"primary",onClick:d,disabled:c||o.from==="team-tmpl",children:g.jsx(xe,{icon:"mdi:pencil-outline"})})}),g.jsx("span",{title:c?s("navigation.action.noEdit"):o.visible?s("navigation.action.hide"):s("navigation.action.show"),children:g.jsx(Ae,{size:"small",color:"warning",onClick:p,disabled:c,children:o.visible===!1?g.jsx(xe,{icon:"mdi:eye-off-outline"}):g.jsx(xe,{icon:"mdi:eye-outline"})})}),g.jsx("span",{title:s(l&&!c?"navigation.action.noDel":"navigation.action.del"),children:g.jsx(Ae,{disabled:l&&!c,size:"small",color:"error",onClick:h,children:g.jsx(xe,{icon:"mdi:delete"})})})]})}bd.propTypes={data:x.object.isRequired,className:x.string,add:x.func,edit:x.func,toggle:x.func,del:x.func,section:x.string};const Cn=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",Rx=e=>{const r={...e},n=e?.background;return typeof n=="string"?r.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(r.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),r},Tx=(e,r="en",n="en")=>{if(typeof e=="string"){if(cd(e)){const i=new URL(e);return i.searchParams.set("locale",r),i.href}if(ud(e))return e;const t=new URL(e,window.location.origin);return t.searchParams.set("locale",r),t.pathname+t.search}return typeof e=="object"?e[r]||e[n]||e.en:e},rr=({navigation:e,locale:r,defaultLocale:n,section:t="header"})=>{if(!e?.length)return e;const i=(o,a)=>o&&typeof o=="object"?o[a]||o[n]||o.en:o;return Gt(e,o=>({...o,title:i(o.title,r),description:i(o.description,r),link:mc(o.items?.length?o.link:Tx(o.link,r,n),t),_rawLink:o.link}),"items")},Dx=e=>Gt(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),Px=e=>{if(!e?.length)return null;const r=Dx(e),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return r.forEach(t=>{t.section?Array.isArray(t.section)?t.section.forEach(i=>{n[i]?.push(t)}):typeof t.section=="string"&&n[t.section]?.push(t):n.header.push(t)}),n},oa=e=>{if(!e)return null;const r={...e};return r.theme=Rx(r.theme),r.navigation=Px(_x(r.navigation)),r},_x=(e=[])=>ea(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),yd=(e,r)=>ea(e,(n,t)=>{const i=!n.role||r&&(n.role.includes(r)||n.role.includes("guest"));return t.isLeaf?i:i&&t.filteredChildren?.length},"items"),kx={top:-960,width:960,height:960,body:'<path fill="currentColor" d="M510-600v-210q0-12.75 8.625-21.375T540-840h270q12.75 0 21.375 8.625T840-810v210q0 12.75-8.625 21.375T810-570H540q-12.75 0-21.375-8.625T510-600M120-480v-330q0-12.75 8.625-21.375T150-840h270q12.75 0 21.375 8.625T450-810v330q0 12.75-8.625 21.375T420-450H150q-12.75 0-21.375-8.625T120-480m390 330v-330q0-12.75 8.625-21.375T540-510h270q12.75 0 21.375 8.625T840-480v330q0 12.75-8.625 21.375T810-120H540q-12.75 0-21.375-8.625T510-150m-390 0v-210q0-12.75 8.625-21.375T150-390h270q12.75 0 21.375 8.625T450-360v210q0 12.75-8.625 21.375T420-120H150q-12.75 0-21.375-8.625T120-150m60-360h210v-270H180zm390 330h210v-270H570zm0-450h210v-150H570zM180-180h210v-150H180zm210-150"/>'},Ox={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function Ex({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},s=(a.navigation||[]).filter(p=>p.section==="sessionManager"&&!["/sessionManager"].includes(p.id)).filter(p=>!!(p?.role||[]).includes(e?.user?.role||"guest")).map(p=>{const h=(a?.componentMountPoints||[]).find(v=>p.component===v.name);return{...p,component:h}}),l=jt(),c=I.useRef(null),u=zt({open:!1}),f=se((p=!u.open)=>{u.open=p}),d=t==="hover"?{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1)}:{onClick:()=>f()};return s.length===0||!e?.user?null:g.jsxs(oe,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...i},...o,...d,children:[g.jsx(Ae,{size:"medium",ref:c,children:g.jsx(xe,{icon:kx,fontSize:n,style:{transform:"scale(1.08)"}})}),g.jsx(kp,{open:u.open,anchorEl:c.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:p})=>g.jsx(Op,{onClickAway:h=>{h.preventDefault(),h.stopPropagation(),f(!1)},children:g.jsx(bc,{...p,timeout:350,children:g.jsxs(Or,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[g.jsx(Ep,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:s.map(h=>g.jsx(Np,{disablePadding:!0,children:g.jsxs(Wh,{href:Oa(h.link,r),sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[h?.component?.did?g.jsx(oe,{component:"img",src:`${yc}/blocklet/logo-bundle/${h.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):g.jsx(xe,{fontSize:50,icon:h.icon||Ox,color:l.palette.text.secondary}),g.jsx(me,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:Oa(h.title,r)})]})},h.id))}),g.jsx(Mp,{session:e,children:g.jsx(Tn,{variant:"outlined",fullWidth:!0,href:Ap,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const xd=x.shape({appLogo:x.node,appName:x.string,theme:x.shape({background:x.string}),enableConnect:x.bool,enableLocale:x.bool,navigation:x.arrayOf(x.shape({title:x.oneOfType([x.string,x.object]),link:x.oneOfType([x.string,x.object]),icon:x.string,items:x.arrayOf(x.shape({title:x.oneOfType([x.string,x.object]),link:x.oneOfType([x.string,x.object])}))}))}),Sd=x.shape({showText:x.bool,showRole:x.bool,switchDid:x.bool,switchProfile:x.bool,switchPassport:x.bool,disableLogout:x.bool,onLogin:x.func,onLogout:x.func,onSwitchDid:x.func,onSwitchProfile:x.func,onSwitchPassport:x.func,menu:x.array,menuRender:x.func,dark:x.bool,size:x.number}),Nx=["admin","owner"],Mx=e=>e.endsWith(".ip.abtnet.io"),Ax=e=>e.endsWith(".did.abtnet.io"),Lx={en:{guest:{title:"Notice: You are using a temporary domain",description:"You are accessing this site through a temporary domain. For a better experience, please contact the site administrator to configure a custom domain. Using a custom domain not only makes access more convenient but also ensures your access is more secure."},owner:{title:"Enhance Your Website Security",description:"Dear administrator, we recommend configuring your custom domain immediately, which will:",benefits1:"Automatically obtain HTTPS certificates to ensure secure data transmission",benefits2:"Create an exclusive brand image and increase website credibility",benefits3:"Get a shorter, more memorable access address",benefits4:"Provide visitors with a more professional experience",benefits5:"Domain configuration takes just minutes to complete, taking your website to the next level!"},skip:"Remind Me Later",bindDomain:"Configure Domain"},zh:{guest:{title:"温馨提示:当前使用的是临时域名",description:"您正在通过临时域名访问本站点。为了获得更好的访问体验,请联系站点管理员配置自定义域名。使用自定义域名不仅访问更便捷,还能确保您的访问更加安全。"},owner:{title:"提升网站安全性与专业度",description:"尊敬的管理员,我们建议您尽快配置自定义域名,这样可以:",benefits1:"自动获取 HTTPS 证书,确保数据传输安全",benefits2:"打造专属品牌形象,提升网站可信度",benefits3:"获得更简短、易记的访问地址",benefits4:"为访客提供更专业的访问体验",benefits5:"只需几分钟即可完成域名配置,全面提升您的网站品质!"},skip:"稍后提醒",bindDomain:"配置域名"}},zx=1e3*60*60*24*30,Cl=".well-known/service/admin/domains";function wd({locale:e="en",session:r={}}){const n=r?.user,t=Mc(),[i,o]=I.useState(()=>{const d=window.localStorage.getItem("domain-warning-skip");if(!d)return!0;const p=+new Date,h=+new Date(d);return p-h>zx}),a=se((d,p={})=>Un(Lx,d,e,"en",p)),s=I.useMemo(()=>{try{const{hostname:d}=new URL(window.location.href);return d}catch{return""}},[]),l=I.useMemo(()=>[a("owner.benefits1"),a("owner.benefits2"),a("owner.benefits3"),a("owner.benefits4"),a("owner.benefits5")],[a]),c=I.useCallback(()=>{window.localStorage.setItem("domain-warning-skip",new Date().toISOString()),o(!1)},[]),u=I.useCallback(()=>{const d=Ie(window.location.origin,Cl);d.startsWith("http")&&window.open(d,"_blank"),o(!1)},[]),f=n?.role&&Nx.includes(n.role);return window.location.href.includes(Cl)||t||!Mx(s)&&!Ax(s)?null:g.jsxs(Lp,{open:i,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"sm",onClose:()=>o(!1),children:[g.jsxs(zp,{sx:{padding:"20px !important"},children:[g.jsx(me,{sx:{fontSize:"20px",fontWeight:"500"},children:a(f?"owner.title":"guest.title")}),g.jsx(me,{sx:{marginTop:"20px",fontSize:"14px",color:"text.secondary"},children:a(f?"owner.description":"guest.description")}),f&&g.jsx(oe,{component:"ul",children:l.map(d=>g.jsx(me,{component:"li",sx:{fontSize:"14px",color:"text.secondary"},children:d},d))})]}),g.jsxs(jp,{sx:{px:"12px !important"},children:[g.jsx(xt,{onClick:c,children:a("skip")}),f&&g.jsx(xt,{variant:"contained",onClick:u,children:a("bindDomain")})]})]})}wd.propTypes={locale:x.string,session:x.object};const ke={};function jx(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=Ie(r,yc,e);return new Gp.WsClient(n,{heartbeatIntervalMs:100*1e3})}function Fx(e="admin"){return ke[e]||(ke[e]=jx(e)),ke[e]}const Bx=(e="admin")=>{const r=I.use(qn),{session:n}=r??{},t=Le(()=>n.user?.did,[n.user]),i=Fp(t);return Bp(()=>{Object.keys(ke).forEach(o=>{ke[o]?.isConnected()&&ke[o]?.disconnect(),delete ke[o]})}),t?(i&&i!==t&&Object.keys(ke).forEach(o=>{ke[o]&&(ke[o].isConnected()&&ke[o].disconnect(),ke[o].connect())}),!ke[e]&&n.user&&(ke[e]=Fx(e),ke[e].connect()),ke[e]):null},Gx={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0"/><path d="m9 12l2 2l4-4"/></g>'},$x={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0m9-3v4m0 3v.01"/>'},Wx={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 21a9 9 0 0 0 9-9a9 9 0 0 0-9-9a9 9 0 0 0-9 9a9 9 0 0 0 9 9zM9 8l6 8m0-8l-6 8"/>'};function Hx(){const e=jt();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=Hn(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const kr=new $p,Ux=e=>!ko(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,qx=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},Vx=async(e,r)=>{try{return await kr.user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},Kx=async(e,r)=>{const{type:n,did:t}=e;return xc.isSameAddr(n,"did")?await Vx(t,r)||Dn.getLink(e):Dn.getLink(e)},Yx=async(e,r,n=!0)=>{const t=Dn.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof Dn.Link){if(n){const o=await Kx(i,r),{type:a,chainId:s,did:l}=i;return xc.isSameAddr(a,"dapp")?`<em class="dapp" data-type="${a}" data-chain-id="${s}" data-did="${l}">${i.text}</em>`:o?`<a target="_blank" rel="noopener noreferrer" class="link" href="${o}">${i.text}</a>`:`<em class="common" data-type="${a}" data-chain-id="${s}" data-did="${l}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))},Jx=e=>Wp.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),Xx={comment:(e,r)=>r&&r>1?g.jsxs(g.Fragment,{children:["left ",r," comments on your ",e]}):g.jsxs(g.Fragment,{children:["commented on your ",e]}),like:e=>g.jsxs(g.Fragment,{children:["liked your ",e]}),follow:()=>g.jsx(g.Fragment,{children:"followed you"}),tips:e=>g.jsxs(g.Fragment,{children:["gave tips to your ",e]}),mention:e=>g.jsxs(g.Fragment,{children:["mentioned you in ",e]}),assign:()=>g.jsx(g.Fragment,{children:"assigned you a task"})};function Kt({user:e,color:r=void 0}){const{palette:n}=jt(),t=Vn(Ie(be.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return g.jsx(Sc,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Kt.displayName="UserLink";function Qx({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=jt(),{type:a,target:s}=e||{},{type:l}=s||{},{linkColor:c=o.text.primary}=t||{},u=Le(()=>{if(!Array.isArray(r))return new Map;const m=new Map;return r.forEach(y=>{y?.did&&!m.has(y.did)&&m.set(y.did,y)}),m},[r]),f=Le(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),d=se(()=>{if(!Array.isArray(f)||f.length===0)return null;if(f.length===1)return g.jsx(Kt,{user:f[0],color:c});const m=f.slice(0,-1),y=f[f.length-1];if(f.length===2)return g.jsxs(g.Fragment,{children:[g.jsx(Kt,{user:m[0],color:c})," and ",g.jsx(Kt,{user:y,color:c})]});const b=f.length>3,C=b?f.slice(0,2):m;return g.jsxs(g.Fragment,{children:[C.map((D,_)=>g.jsxs(Q.Fragment,{children:[g.jsx(Kt,{user:D,color:c}),_<C.length-1?", ":""]},D.did)),b?`, and ${f.length-2} others`:g.jsxs(g.Fragment,{children:[", and ",g.jsx(Kt,{user:y,color:c})]})]})}),p=se(()=>{const m=a?Xx[a]:null;return m?m(l,r.length):null}),h=Le(()=>{const m=d(),y=p();return!m||!y?null:g.jsxs(g.Fragment,{children:[m," ",y]})},[a,l,f,d,p]),v=Le(()=>{if(!e)return null;const m=qx(e);return m?.targetLink?Ie(i,m.targetLink):null},[e,i]);return!a||ko(s)?null:g.jsxs(g.Fragment,{children:[h," ",v&&g.jsx(Sc,{href:v,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:s.name})]})}const Zx={normal:Ea,success:Gx,info:Ea,warning:$x,error:Wx},eS=cr(Vp)`
|
|
43
|
+
*/const Bu=Object.freeze({left:0,top:0,width:16,height:16}),En=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),tn=Object.freeze({...Bu,...En}),so=Object.freeze({...tn,body:"",hidden:!1}),cy=Object.freeze({width:null,height:null}),Gu=Object.freeze({...cy,...En});function uy(e,r=0){const n=e.replace(/^-?[0-9.]*/,"");function t(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:t(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?t(o):0)}}return r}const dy=/[\s,]+/;function fy(e,r){r.split(dy).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const $u={...Gu,preserveAspectRatio:""};function rl(e){const r={...$u},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=uy(n("rotate","")),fy(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function py(e,r){for(const n in $u)if(e[n]!==r[n])return!0;return!1}const Ar=/^[a-z0-9]+(-[a-z0-9]+)*$/,rn=(e,r,n,t="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;t=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const s=i.pop(),l=i.pop(),c={provider:i.length>0?i[0]:t,prefix:l,name:s};return r&&!Sn(c)?null:c}const o=i[0],a=o.split("-");if(a.length>1){const s={provider:t,prefix:a.shift(),name:a.join("-")};return r&&!Sn(s)?null:s}if(n&&t===""){const s={provider:t,prefix:"",name:o};return r&&!Sn(s,n)?null:s}return null},Sn=(e,r)=>e?!!((e.provider===""||e.provider.match(Ar))&&(r&&e.prefix===""||e.prefix.match(Ar))&&e.name.match(Ar)):!1;function hy(e,r){const n={};!e.hFlip!=!r.hFlip&&(n.hFlip=!0),!e.vFlip!=!r.vFlip&&(n.vFlip=!0);const t=((e.rotate||0)+(r.rotate||0))%4;return t&&(n.rotate=t),n}function nl(e,r){const n=hy(e,r);for(const t in so)t in En?t in e&&!(t in n)&&(n[t]=En[t]):t in r?n[t]=r[t]:t in e&&(n[t]=e[t]);return n}function gy(e,r){const n=e.icons,t=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const s=t[a]&&t[a].parent,l=s&&o(s);l&&(i[a]=[s].concat(l))}return i[a]}return Object.keys(n).concat(Object.keys(t)).forEach(o),i}function vy(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(s){o=nl(t[s]||i[s],o)}return a(r),n.forEach(a),nl(e,o)}function Wu(e,r){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{r(i,null),n.push(i)});const t=gy(e);for(const i in t){const o=t[i];o&&(r(i,vy(e,i,o)),n.push(i))}return n}const my={provider:"",aliases:{},not_found:{},...Bu};function ki(e,r){for(const n in r)if(n in e&&typeof e[n]!=typeof r[n])return!1;return!0}function Hu(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!ki(e,my))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(Ar)||typeof o.body!="string"||!ki(o,so))return null}const t=r.aliases||Object.create(null);for(const i in t){const o=t[i],a=o.parent;if(!i.match(Ar)||typeof a!="string"||!n[a]&&!t[a]||!ki(o,so))return null}return r}const Nn=Object.create(null);function by(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function wt(e,r){const n=Nn[e]||(Nn[e]=Object.create(null));return n[r]||(n[r]=by(e,r))}function Yo(e,r){return Hu(r)?Wu(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function yy(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function xy(e,r){let n=[];return(typeof e=="string"?[e]:Object.keys(Nn)).forEach(i=>{(typeof i=="string"&&typeof r=="string"?[r]:Object.keys(Nn[i]||{})).forEach(a=>{const s=wt(i,a);n=n.concat(Object.keys(s.icons).map(l=>(i!==""?"@"+i+":":"")+a+":"+l))})}),n}let $r=!1;function Uu(e){return typeof e=="boolean"&&($r=e),$r}function Wr(e){const r=typeof e=="string"?rn(e,!0,$r):e;if(r){const n=wt(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function qu(e,r){const n=rn(e,!0,$r);if(!n)return!1;const t=wt(n.provider,n.prefix);return yy(t,n.name,r)}function il(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),$r&&!r&&!e.prefix){let i=!1;return Hu(e)&&(e.prefix="",Wu(e,(o,a)=>{a&&qu(o,a)&&(i=!0)})),i}const n=e.prefix;if(!Sn({provider:r,prefix:n,name:"a"}))return!1;const t=wt(r,n);return!!Yo(t,e)}function Sy(e){return!!Wr(e)}function wy(e){const r=Wr(e);return r?{...tn,...r}:null}function Cy(e){const r={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let t={provider:"",prefix:"",name:""};return e.forEach(i=>{if(t.name===i.name&&t.prefix===i.prefix&&t.provider===i.provider)return;t=i;const o=i.provider,a=i.prefix,s=i.name,l=n[o]||(n[o]=Object.create(null)),c=l[a]||(l[a]=wt(o,a));let u;s in c.icons?u=r.loaded:a===""||c.missing.has(s)?u=r.missing:u=r.pending;const f={provider:o,prefix:a,name:s};u.push(f)}),r}function Vu(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function Iy(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const r=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!r.length)return;let n=!1;const t=e.provider,i=e.prefix;r.forEach(o=>{const a=o.icons,s=a.pending.length;a.pending=a.pending.filter(l=>{if(l.prefix!==i)return!0;const c=l.name;if(e.icons[c])a.loaded.push({provider:t,prefix:i,name:c});else if(e.missing.has(c))a.missing.push({provider:t,prefix:i,name:c});else return n=!0,!0;return!1}),a.pending.length!==s&&(n||Vu([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let Ry=0;function Ty(e,r,n){const t=Ry++,i=Vu.bind(null,n,t);if(!r.pending.length)return i;const o={id:t,icons:r,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),i}const lo=Object.create(null);function ol(e,r){lo[e]=r}function co(e){return lo[e]||lo[""]}function Dy(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?rn(i,r,n):i;o&&t.push(o)}),t}var Py={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function _y(e,r,n,t){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let w=e.resources.slice(0);for(a=[];w.length>1;){const P=Math.floor(Math.random()*w.length);a.push(w[P]),w=w.slice(0,P).concat(w.slice(P+1))}a=a.concat(w)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const s=Date.now();let l="pending",c=0,u,f=null,d=[],p=[];typeof t=="function"&&p.push(t);function h(){f&&(clearTimeout(f),f=null)}function v(){l==="pending"&&(l="aborted"),h(),d.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),d=[]}function m(w,P){P&&(p=[]),typeof w=="function"&&p.push(w)}function y(){return{startTime:s,payload:r,status:l,queriesSent:c,queriesPending:d.length,subscribe:m,abort:v}}function b(){l="failed",p.forEach(w=>{w(void 0,u)})}function C(){d.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),d=[]}function D(w,P,S){const T=P!=="success";switch(d=d.filter(R=>R!==w),l){case"pending":break;case"failed":if(T||!e.dataAfterTimeout)return;break;default:return}if(P==="abort"){u=S,b();return}if(T){u=S,d.length||(a.length?_():b());return}if(h(),C(),!e.random){const R=e.resources.indexOf(w.resource);R!==-1&&R!==e.index&&(e.index=R)}l="completed",p.forEach(R=>{R(S)})}function _(){if(l!=="pending")return;h();const w=a.shift();if(w===void 0){if(d.length){f=setTimeout(()=>{h(),l==="pending"&&(C(),b())},e.timeout);return}b();return}const P={status:"pending",resource:w,callback:(S,T)=>{D(P,S,T)}};d.push(P),c++,f=setTimeout(_,e.rotate),n(w,r,P.callback)}return setTimeout(_),y}function Ku(e){const r={...Py,...e};let n=[];function t(){n=n.filter(s=>s().status==="pending")}function i(s,l,c){const u=_y(r,s,l,(f,d)=>{t(),c&&c(f,d)});return n.push(u),u}function o(s){return n.find(l=>s(l))||null}return{query:i,find:o,setIndex:s=>{r.index=s},getIndex:()=>r.index,cleanup:t}}function Jo(e){let r;if(typeof e.resources=="string")r=[e.resources];else if(r=e.resources,!(r instanceof Array)||!r.length)return null;return{resources:r,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Zn=Object.create(null),xr=["https://api.simplesvg.com","https://api.unisvg.com"],wn=[];for(;xr.length>0;)xr.length===1||Math.random()>.5?wn.push(xr.shift()):wn.push(xr.pop());Zn[""]=Jo({resources:["https://api.iconify.design"].concat(wn)});function al(e,r){const n=Jo(r);return n===null?!1:(Zn[e]=n,!0)}function ei(e){return Zn[e]}function ky(){return Object.keys(Zn)}function sl(){}const Oi=Object.create(null);function Oy(e){if(!Oi[e]){const r=ei(e);if(!r)return;const n=Ku(r),t={config:r,redundancy:n};Oi[e]=t}return Oi[e]}function Yu(e,r,n){let t,i;if(typeof e=="string"){const o=co(e);if(!o)return n(void 0,424),sl;i=o.send;const a=Oy(e);a&&(t=a.redundancy)}else{const o=Jo(e);if(o){t=Ku(o);const a=e.resources?e.resources[0]:"",s=co(a);s&&(i=s.send)}}return!t||!i?(n(void 0,424),sl):t.query(r,i,n)().abort}const ll="iconify2",Hr="iconify",Ju=Hr+"-count",cl=Hr+"-version",Xu=36e5,Ey=168;function uo(e,r){try{return e.getItem(r)}catch{}}function Xo(e,r,n){try{return e.setItem(r,n),!0}catch{}}function ul(e,r){try{e.removeItem(r)}catch{}}function fo(e,r){return Xo(e,Ju,r.toString())}function po(e){return parseInt(uo(e,Ju))||0}const At={local:!0,session:!0},Qu={local:new Set,session:new Set};let Qo=!1;function Ny(e){Qo=e}let dn=typeof window>"u"?{}:window;function Zu(e){const r=e+"Storage";try{if(dn&&dn[r]&&typeof dn[r].length=="number")return dn[r]}catch{}At[e]=!1}function ed(e,r){const n=Zu(e);if(!n)return;const t=uo(n,cl);if(t!==ll){if(t){const s=po(n);for(let l=0;l<s;l++)ul(n,Hr+l.toString())}Xo(n,cl,ll),fo(n,0);return}const i=Math.floor(Date.now()/Xu)-Ey,o=s=>{const l=Hr+s.toString(),c=uo(n,l);if(typeof c=="string"){try{const u=JSON.parse(c);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>i&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&r(u,s))return!0}catch{}ul(n,l)}};let a=po(n);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,fo(n,a)):Qu[e].add(s))}function td(){if(!Qo){Ny(!0);for(const e in At)ed(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=wt(t,i);if(!Yo(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function My(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in At)ed(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function Ay(e,r){Qo||td();function n(t){let i;if(!At[t]||!(i=Zu(t)))return;const o=Qu[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=po(i),!fo(i,a+1))return;const s={cached:Math.floor(Date.now()/Xu),provider:e.provider,data:r};return Xo(i,Hr+a.toString(),JSON.stringify(s))}r.lastModified&&!My(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function dl(){}function Ly(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Iy(e)}))}function zy(e,r){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(r).sort():e.iconsToLoad=r,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:t}=e,i=e.iconsToLoad;delete e.iconsToLoad;let o;if(!i||!(o=co(n)))return;o.prepare(n,t,i).forEach(s=>{Yu(n,s,l=>{if(typeof l!="object")s.icons.forEach(c=>{e.missing.add(c)});else try{const c=Yo(e,l);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(f=>{u.delete(f)}),Ay(e,l)}catch(c){console.error(c)}Ly(e)})})}))}const Zo=(e,r)=>{const n=Dy(e,!0,Uu()),t=Cy(n);if(!t.pending.length){let l=!0;return r&&setTimeout(()=>{l&&r(t.loaded,t.missing,t.pending,dl)}),()=>{l=!1}}const i=Object.create(null),o=[];let a,s;return t.pending.forEach(l=>{const{provider:c,prefix:u}=l;if(u===s&&c===a)return;a=c,s=u,o.push(wt(c,u));const f=i[c]||(i[c]=Object.create(null));f[u]||(f[u]=[])}),t.pending.forEach(l=>{const{provider:c,prefix:u,name:f}=l,d=wt(c,u),p=d.pendingIcons||(d.pendingIcons=new Set);p.has(f)||(p.add(f),i[c][u].push(f))}),o.forEach(l=>{const{provider:c,prefix:u}=l;i[c][u].length&&zy(l,i[c][u])}),r?Ty(r,t,o):dl},jy=e=>new Promise((r,n)=>{const t=typeof e=="string"?rn(e,!0):e;if(!t){n(e);return}Zo([t||e],i=>{if(i.length&&t){const o=Wr(t);if(o){r({...tn,...o});return}}n(e)})});function Fy(e){try{const r=typeof e=="string"?JSON.parse(e):e;if(typeof r.body=="string")return{...r}}catch{}}function By(e,r){const n=typeof e=="string"?rn(e,!0,!0):null;if(!n){const o=Fy(e);return{value:e,data:o}}const t=Wr(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=Zo([n],()=>r(e,n,Wr(n)));return{value:e,name:n,loading:i}}function Ei(e){return e.hasAttribute("inline")}let rd=!1;try{rd=navigator.vendor.indexOf("Apple")===0}catch{}function Gy(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(rd||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const $y=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Wy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ho(e,r,n){if(r===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*r*n)/n;if(typeof e!="string")return e;const t=e.split($y);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=Wy.test(o);for(;;){if(a){const s=parseFloat(o);isNaN(s)?i.push(o):i.push(Math.ceil(s*r*n)/n)}else i.push(o);if(o=t.shift(),o===void 0)return i.join("");a=!a}}const Hy=e=>e==="unset"||e==="undefined"||e==="none";function nd(e,r){const n={...tn,...e},t={...Gu,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(h=>{const v=[],m=h.hFlip,y=h.vFlip;let b=h.rotate;m?y?b+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):y&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let C;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:C=i.height/2+i.top,v.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:C=i.width/2+i.left,v.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}b%2===1&&(i.left!==i.top&&(C=i.left,i.left=i.top,i.top=C),i.width!==i.height&&(C=i.width,i.width=i.height,i.height=C)),v.length&&(o='<g transform="'+v.join(" ")+'">'+o+"</g>")});const a=t.width,s=t.height,l=i.width,c=i.height;let u,f;a===null?(f=s===null?"1em":s==="auto"?c:s,u=ho(f,l/c)):(u=a==="auto"?l:a,f=s===null?ho(u,c/l):s==="auto"?c:s);const d={},p=(h,v)=>{Hy(v)||(d[h]=v.toString())};return p("width",u),p("height",f),d.viewBox=i.left.toString()+" "+i.top.toString()+" "+l.toString()+" "+c.toString(),{attributes:d,body:o}}const Uy=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Mn=Uy();function qy(e){Mn=e}function Vy(){return Mn}function Ky(e,r){const n=ei(e);if(!n)return 0;let t;if(!n.maxURL)t=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const o=r+".json?icons=";t=n.maxURL-i-n.path.length-o.length}return t}function Yy(e){return e===404}const Jy=(e,r,n)=>{const t=[],i=Ky(e,r),o="icons";let a={type:o,provider:e,prefix:r,icons:[]},s=0;return n.forEach((l,c)=>{s+=l.length+1,s>=i&&c>0&&(t.push(a),a={type:o,provider:e,prefix:r,icons:[]},s=l.length),a.icons.push(l)}),t.push(a),t};function Xy(e){if(typeof e=="string"){const r=ei(e);if(r)return r.path}return"/"}const Qy=(e,r,n)=>{if(!Mn){n("abort",424);return}let t=Xy(r.provider);switch(r.type){case"icons":{const o=r.prefix,s=r.icons.join(","),l=new URLSearchParams({icons:s});t+=o+".json?"+l.toString();break}case"custom":{const o=r.uri;t+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;Mn(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(Yy(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},Zy={prepare:Jy,send:Qy};function fl(e,r){switch(e){case"local":case"session":At[e]=r;break;case"all":for(const n in At)At[n]=r;break}}const Ni="data-style";let id="";function ex(e){id=e}function pl(e,r){let n=Array.from(e.childNodes).find(t=>t.hasAttribute&&t.hasAttribute(Ni));n||(n=document.createElement("style"),n.setAttribute(Ni,Ni),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(r?"-0.125em":"0")+"}span,svg{display:block}"+id}function od(){ol("",Zy),Uu(!0);let e;try{e=window}catch{}if(e){if(td(),e.IconifyPreload!==void 0){const n=e.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!il(i))&&console.error(t)}catch{console.error(t)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(const t in n){const i="IconifyProviders["+t+"] is invalid.";try{const o=n[t];if(typeof o!="object"||!o||o.resources===void 0)continue;al(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>fl(n,!0),disableCache:n=>fl(n,!1),iconExists:Sy,getIcon:wy,listIcons:xy,addIcon:qu,addCollection:il,calculateSize:ho,buildIcon:nd,loadIcons:Zo,loadIcon:jy,addAPIProvider:al,appendCustomStyle:ex,_api:{getAPIConfig:ei,setAPIModule:ol,sendAPIQuery:Yu,setFetch:qy,getFetch:Vy,listAPIProviders:ky}}}function ad(e,r){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in r)n+=" "+t+'="'+r[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function tx(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function rx(e){return"data:image/svg+xml,"+tx(e)}function nx(e){return'url("'+rx(e)+'")'}const go={"background-color":"currentColor"},sd={"background-color":"transparent"},hl={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},gl={"-webkit-mask":go,mask:go,background:sd};for(const e in gl){const r=gl[e];for(const n in hl)r[e+"-"+n]=hl[n]}function vl(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function ix(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=ad(i,{...o,width:r.width+"",height:r.height+""}),s=nx(a),l=t.style,c={"--svg":s,width:vl(o.width),height:vl(o.height),...n?go:sd};for(const u in c)l.setProperty(u,c[u]);return t}let Lr;function ox(){try{Lr=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Lr=null}}function ax(e){return Lr===void 0&&ox(),Lr?Lr.createHTML(e):e}function sx(e){const r=document.createElement("span"),n=e.attributes;let t="";n.width||(t="width: inherit;"),n.height||(t+="height: inherit;"),t&&(n.style=t);const i=ad(e.body,n);return r.innerHTML=ax(i),r.firstChild}function ml(e,r){const n=r.icon.data,t=r.customisations,i=nd(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=sx(i);break;default:a=ix(i,{...tn,...n},o==="mask")}const s=Array.from(e.childNodes).find(l=>{const c=l.tagName&&l.tagName.toUpperCase();return c==="SPAN"||c==="SVG"});s?a.tagName==="SPAN"&&s.tagName===a.tagName?s.setAttribute("style",a.getAttribute("style")):e.replaceChild(a,s):e.appendChild(a)}function bl(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function lx(e="iconify-icon"){let r,n;try{r=window.customElements,n=window.HTMLElement}catch{return}if(!r||!n)return;const t=r.get(e);if(t)return t;const i=["icon","mode","inline","width","height","rotate","flip"],o=class extends n{_shadowRoot;_state;_checkQueued=!1;constructor(){super();const s=this._shadowRoot=this.attachShadow({mode:"open"}),l=Ei(this);pl(s,l),this._state=bl({value:""},l),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(s){if(s==="inline"){const l=Ei(this),c=this._state;l!==c.inline&&(c.inline=l,pl(this._shadowRoot,l))}else this._queueCheck()}get icon(){const s=this.getAttribute("icon");if(s&&s.slice(0,1)==="{")try{return JSON.parse(s)}catch{}return s}set icon(s){typeof s=="object"&&(s=JSON.stringify(s)),this.setAttribute("icon",s)}get inline(){return Ei(this)}set inline(s){s?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const s=this._state;if(s.rendered){const l=this._shadowRoot;if(s.renderedMode==="svg")try{l.lastChild.setCurrentTime(0);return}catch{}ml(l,s)}}get status(){const s=this._state;return s.rendered?"rendered":s.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const s=this._state,l=this.getAttribute("icon");if(l!==s.icon.value){this._iconChanged(l);return}if(!s.rendered)return;const c=this.getAttribute("mode"),u=rl(this);(s.attrMode!==c||py(s.customisations,u))&&this._renderIcon(s.icon,u,c)}_iconChanged(s){const l=By(s,(c,u,f)=>{const d=this._state;if(d.rendered||this.getAttribute("icon")!==c)return;const p={value:c,name:u,data:f};p.data?this._gotIconData(p):d.icon=p});l.data?this._gotIconData(l):this._state=bl(l,this._state.inline,this._state)}_gotIconData(s){this._checkQueued=!1,this._renderIcon(s,rl(this),this.getAttribute("mode"))}_renderIcon(s,l,c){const u=Gy(s.data.body,c),f=this._state.inline;ml(this._shadowRoot,this._state={rendered:!0,icon:s,inline:f,customisations:l,attrMode:c,renderedMode:u})}};i.forEach(s=>{s in o.prototype||Object.defineProperty(o.prototype,s,{get:function(){return this.getAttribute(s)},set:function(l){l!==null?this.setAttribute(s,l):this.removeAttribute(s)}})});const a=od();for(const s in a)o[s]=o.prototype[s]=a[s];return r.define(e,o),o}const cx=lx()||od(),{enableCache:wT,disableCache:CT,iconExists:IT,getIcon:RT,listIcons:TT,addIcon:DT,addCollection:PT,calculateSize:_T,buildIcon:kT,loadIcons:OT,loadIcon:ET,addAPIProvider:NT,_api:MT}=cx,Gt=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:Gt(t[n],r,n)}):r(t)),ld=(e,r="children")=>{const n=[];return Gt(e,t=>n.push(t),r),n},ea=(e,r,n="children")=>e.map(t=>({...t})).filter(t=>{const i=t[n];if(Array.isArray(i)){const a=ea(i,r,n);t[n]=a?.length?a:void 0}const o={filteredChildren:t[n],isLeaf:!i?.length};return r(t,o)}),cd=e=>/^https?:\/\//.test(e),ud=e=>/^mailto:/i.test(e.trim()),ux=e=>{if(!e||!e?.startsWith("/"))return!1;const r=i=>i.endsWith("/")?i:`${i}/`,n=r(window.location.pathname),t=r(new URL(e,window.location.origin).pathname);return n.startsWith(t)},dd=(e=[])=>{const r=e.map((n,t)=>({path:n,index:t})).filter(n=>ux(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},dx=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,s=e.reduce((h,v)=>h+i+(v[a]?.length||0)*o,0),l=Math.ceil(s/n),c=[[]];let u=0,f=0;const d=l*.2,p=h=>f>l-d&&u<n-1&&f+h>l+d;return e.forEach(h=>{const v=i+(h[a]?.length||0)*o;t&&p(i)&&(u++,f=0,c[u]=[]),!t&&f>0&&p(v)&&(u++,f=0,c[u]=[]),c[u].push({...h,group:!0}),f+=i,h[a]&&h[a].forEach(m=>{t&&p(o)&&(u++,f=0,c[u]=[]),c[u].push({...m,group:!1}),f+=o})}),c};function Ze({icon:e,size:r=void 0,sx:n={},...t}){const i=[...Array.isArray(n)?n:[n]];r&&i.push({width:r,height:r});const[o,a]=I.useState(!1),[s,l]=I.useState(!0);if(Do(async()=>{l(!0);try{await Po(e),a(!0)}catch{a(!1)}l(!1)},[e]),t.variant||i.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),cd(e))return g.jsx(er,{component:"span",...t,src:e,sx:i});const c=r?.6*r+4:0;return s?g.jsx(xe,{icon:"codicon:blank",height:c||void 0}):o?g.jsx(er,{component:"span",...t,sx:i,children:g.jsx(xe,{icon:e,height:c||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),g.jsx(er,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}function ta(e=["en","zh"]){const{blocklet:r}=Ft();return I.useMemo(()=>{const t=r.environments.find(c=>c.key==="BLOCKLET_APP_LANGUAGES"),i=t?t.value.split(","):e,o=i[0]||"en",a=i.filter(c=>pt.SUPPORTED_LANGUAGES[c]),s=a.reduce((c,u)=>(c[u]=pt.SUPPORTED_LANGUAGES[u].nativeName,c),{}),l=a.map(c=>({code:c,name:pt.SUPPORTED_LANGUAGES[c].nativeName}));return{locales:i,localeMap:s,defaultLocale:o,languages:l}},[r.environments,e])}const fx=e=>e.from!=="team-tmpl";function px({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&Cp(e.slice(0,t-1),r.slice(0,i-1)))}function fd({treeNode:e}){const{locale:r}=Me(),{blocklet:n}=Ft(),{defaultLocale:t}=ta(),i=n.environments.find(s=>s.key===pt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),o=se(s=>{if(s?.startsWith("/"))try{return new URL(s,i?.value).href}catch{console.error("Failed to parse url",{url:s,origin:i?.value})}return s});function a(){const{title:s,subtitle:l}=e;let c=s,u=l;return Yt(s)&&(c=s[r]||s[t]||s.en),!I.isValidElement(l)&&Yt(l)&&(u=l[r]||l[t]||l.en),g.jsxs(oe,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(me,{variant:"subtitle1",sx:{fontSize:16},children:c}),l&&g.jsx(me,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:u})]})}return g.jsxs(g.Fragment,{children:[e.icon&&(_o(o(e.icon))?g.jsx(Ze,{size:16,style:{marginRight:4},icon:o(e.icon)}):g.jsx(xe,{size:16,style:{marginRight:4},icon:e.icon})),a()]})}fd.propTypes={treeNode:x.object.isRequired};const hx=ot(oe)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function pd({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),g.jsx(hx,{children:g.jsx(Th,{backend:Dh,...i,children:g.jsx(nm,{generateNodeProps:o=>{const a=fx(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?g.jsx(xe,{icon:"ic:round-drag-indicator"}):g.jsx(oe,{sx:{width:16,height:16}}),title:g.jsx(fd,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:px,theme:ly})})})}pd.propTypes={treeData:x.object.isRequired,setTreeData:x.func,renderActions:x.func};var gx=lc();const vx=$n(gx);function hd({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},defaultLocale:t="en",locale:i="",locales:o=[],localeMap:a={},onRemoveLocale:s=()=>{}}){const{t:l}=Me(),c=I.useRef(),[u,f]=I.useState(null),d=zt({localeList:[],inputLocale:"",localeError:""}),p=I.useMemo(()=>!!u,[u]),h=I.useMemo(()=>o.includes(i)?i:t,[o,i]),v=I.useMemo(()=>d.localeList.filter(S=>!!a[S]),[d.localeList,a]),m=I.useMemo(()=>Object.keys(Et(a,[...d.localeList,t])).map(S=>({title:a[S],value:S})),[d.localeList]),y=I.useMemo(()=>`Default (${a[t]||Object.values(a)?.[0]})`,[a]),b=se(S=>S?S===t||d.localeList.includes(S)?l("navigation.form.localeExists",{value:S}):!0:l("common.requiredErrorText",{name:"Locale"})),C=se((S="")=>{const T=S?.trim(),R=b(T);return R!==!0?d.localeError=R:d.localeError="",R}),D=se(()=>{f(null),d.inputLocale="",d.localeError=""}),_=se(()=>{const S=d.inputLocale?.trim();C(S)===!0&&(D(),d.localeList.push(S),r(S))}),w=se((S,T)=>{S.preventDefault(),S.stopPropagation(),d.localeList=Ac(d.localeList,T),s(T)}),P=se(S=>{const{value:T}=S.target;C(T),d.inputLocale=T});return I.useEffect(()=>{d.localeList=[...o]},[o,d]),Sh("enter",()=>{setTimeout(()=>{_()})},{target:c}),g.jsxs(g.Fragment,{children:[g.jsxs(Fh,{sx:e,value:h,onChange:(S,T)=>{n(T)},children:[g.jsx($a,{label:y,value:t}),v.map(S=>g.jsx($a,{sx:{position:"relative"},label:g.jsxs(g.Fragment,{children:[a[S],g.jsx(Ae,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:T=>{w(T,S)},children:g.jsx(xe,{icon:"mdi:close",height:14})})]}),value:S},S)),g.jsx(Ae,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:S=>{f(S.currentTarget)},children:g.jsx(xe,{icon:"mdi:plus"})})]}),g.jsx(Ui,{open:p,anchorEl:u,onClose:D,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:g.jsxs(oe,{sx:{p:2,width:"270px"},children:[g.jsx(me,{variant:"subtitle2",children:l("navigation.form.localePlaceholder")}),g.jsx(oe,{sx:{mt:1},children:g.jsx(Ki,{required:!0,fullWidth:!0,label:"Locale",value:d.inputLocale,options:m,onChange:P,error:!!d.localeError,helperText:d.localeError||" "})}),g.jsx(oe,{sx:{display:"flex",justifyContent:"flex-end"},children:g.jsx(xt,{size:"small",variant:"contained",onClick:_,children:l("common.confirm")})})]})})]})}hd.propTypes={sx:x.any,onAdd:x.func,onChange:x.func,onRemoveLocale:x.func,defaultLocale:x.string,locale:x.string,localeMap:x.object,locales:x.array};const ra=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function gd(e,r,n=5e3){for(const t of ra){const i=Ie(t,e);try{return await Gh.get(i,{params:r,timeout:n})}catch(o){console.warn(`Failed to fetch from ${i}:`,o)}}throw new Error(`All icon API endpoints ${e} failed`)}async function mx({keyword:e,limit:r=999,start:n=0,palette:t=!1}){let i="",o=e;e.includes(":")&&([i,o]=e.split(":"));const{data:a}=await gd("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const fn=new Map;async function bx(e){if(fn.has(e))return fn.get(e);const r=(async()=>{const{data:n}=await gd("/collection",{prefix:e}),t=new Set;return n.uncategorized?.forEach(i=>t.add(`${e}:${i}`)),Object.values(n.categories??{}).forEach(i=>{i.forEach(o=>t.add(`${e}:${o}`))}),Array.from(t)})();fn.set(e,r);try{return await r}catch(n){throw fn.delete(e),n}}function yx(e){return Ie(ra[0],`${e}.svg`)}function xx(e){try{const r=new URL(e);for(const n of ra)if(r.origin===n)return Ip(r.pathname).replace(".svg","");return""}catch{return""}}function Sx(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):_o(e)&&(n=xx(e))),{isIconId:r,iconId:n}}const wx=I.lazy(()=>Pp(()=>import("./index-AqKhw9Wu.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url).then(e=>({default:e.Uploader}))),yl=Ve(Ze)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function vd({icon:e,...r}){const[n,t]=I.useState(!1);return Do(async()=>{t(!1),await Po(e),t(!0)},[e]),e?n?g.jsx(xe,{icon:e,...r}):g.jsx(xe,{color:"#f06f6e",icon:"ic:baseline-error",...r}):g.jsx(xe,{icon:"material-symbols-light:select-rounded",...r})}vd.propTypes={icon:x.string.isRequired};function vo({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:s,prefix:l,inService:c}=dc(),{blocklet:u}=Ft(),f=Hn(Z=>Z.breakpoints.down("md")),d=u.environments.find(Z=>Z.key===pt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),p=s(),h=I.useRef(null),v=I.useRef(null),m=I.useRef(null),{t:y,locale:b}=Me(),{isIconId:C,iconId:D}=Sx(e),[_,w]=I.useState(null),{onChange:P,onBlur:S,sx:T,...R}=a,k=i.includes("upload"),j=i.includes("select"),M=Ie(l,"/api/media/upload",u.appPid),H=zt({showPopover:!1}),E=se(Z=>{if(Z?.startsWith("/"))try{const V=c?window.location.origin:d?.value;return new URL(Z,V).href}catch{console.error("Failed to resolve url: ",Z)}return Z},[d?.value,c]),B=se(async Z=>await h.current.getUploader().uploadFile(Z)),G=se(()=>{w(null)}),q=se(()=>{j&&w(m.current)}),J=se(async Z=>{try{if(o==="url"){const V=yx(Z),re=await Rp(V,{width:128,height:128}),ie=await Tp(re,Z);await B(ie)}else P?.(Z)}catch(V){console.error("Failed to pick icon:",V)}G()}),ee=se(Z=>{Z.stopPropagation(),v.current.open(),G()}),X=se(Z=>{a?.onChange?.(Z.data.url)});return g.jsxs(g.Fragment,{children:[g.jsx(it,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...T},onClick:j?q:void 0,...R,label:n,placeholder:t,slotProps:{input:{ref:m,readOnly:!0,startAdornment:g.jsx(Rn,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(H.showPopover=!0)},onMouseLeave:()=>{H.showPopover=!1},children:g.jsx(yl,{size:28,icon:E(e),alt:"Error"})}),endAdornment:g.jsxs(Rn,{position:"end",children:[g.jsx(Ae,{sx:{visibility:e?"visible":"hidden"},onClick:Z=>{Z.stopPropagation(),P("")},children:g.jsx(Nc,{style:{fontSize:18}})}),k&&g.jsx(Dp,{title:y("common.upload"),children:g.jsx(Ae,{disableFocusRipple:!1,disableRipple:!1,onClick:ee,children:g.jsx(vd,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),j&&g.jsx(oe,{component:Bh,sx:{mr:"-6px",fontSize:24,transform:_?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),j&&g.jsx(Ui,{open:!!_,anchorEl:_,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...f&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:G,children:g.jsx(md,{label:n,placeholder:t,value:C?D:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:J,onClose:G})}),g.jsx(mo,{ref:h,locale:b,apiPath:M,headers:p,imageEditorProps:{},onUploadFinish:X}),g.jsx(mo,{ref:v,locale:b,apiPath:M,headers:p,onUploadFinish:X}),g.jsx(Ui,{sx:{pointerEvents:"none"},open:H.showPopover,anchorEl:m.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{H.showPopover=!1},disableRestoreFocus:!0,children:g.jsx(yl,{size:120,icon:E(e),alt:"Error"})})]})}vo.propTypes={value:x.string.isRequired,label:x.any,placeholder:x.any,helperText:x.string,methods:x.arrayOf(x.oneOf(["select","upload"])),iconifyShape:x.oneOf(["id","url"])};function md({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[s,l]=I.useState([]),[c,u]=I.useState(!0),[f,d]=I.useState(n),[p,h]=I.useState(!1),v=I.useRef(null),m=I.useRef([]),y=I.useRef(1),b=I.useRef(!0),{t:C}=Me(),D=96,_=se(()=>{!b.current||c||(u(!0),setTimeout(()=>{const S=y.current+1,T=(S-1)*D,R=S*D,k=m.current.slice(T,R);l(j=>[...j,...k]),y.current=S,b.current=R<m.current.length,u(!1)},300))}),w=se(S=>{m.current=S,y.current=1,b.current=S.length>D;const T=S.slice(0,D);l(T),h(S.length===0),b.current&&_()}),{run:P}=fc(async S=>{if(S){u(!0);try{const{icons:T}=await mx({keyword:S});w(T)}catch(T){console.error("Failed to search icons:",T),h(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return I.useEffect(()=>{const S=()=>{if(!v.current)return;const{scrollTop:R,scrollHeight:k,clientHeight:j}=v.current;(R+j>=k-150||k<=j)&&_()},T=v.current;return T&&(T.addEventListener("scroll",S),S()),()=>{T&&T.removeEventListener("scroll",S)}},[_,c]),Do(async()=>{if(f)P(f);else{u(!0);try{const S=await bx("mdi-light");w(S)}catch(S){console.error("Failed to fetch default icons:",S),h(!0)}finally{u(!1)}}},[f,P,w]),g.jsxs(Cx,{ref:v,sx:t,...a,children:[g.jsxs(oe,{className:"icon-picker-input",children:[g.jsx(it,{label:C("navigation.form.searchIcons"),placeholder:C("navigation.form.searchIconsPlaceholder"),size:"small",value:f,sx:{flexGrow:1},autoFocus:!0,onChange:S=>d(S.target.value),slotProps:{input:{endAdornment:g.jsx(Ae,{sx:{visibility:f?"visible":"hidden"},onClick:()=>d(""),children:g.jsx(Nc,{style:{fontSize:18}})})}}}),g.jsx(xt,{onClick:o,children:C("common.cancel")})]}),g.jsxs(oe,{children:[s.length>0&&g.jsx(oe,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:s.map(S=>g.jsx(Ix,{$active:n===S,onClick:()=>{i(S)},children:g.jsx(xe,{icon:S,width:"32",height:"32"})},S))}),p&&g.jsx(oe,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:g.jsx(oe,{sx:{textAlign:"center"},children:"No matching results"})}),c&&g.jsx(oe,{sx:{p:2,display:"flex",justifyContent:"center"},children:g.jsx(pc,{size:20})})]})]})}md.propTypes={label:x.any,placeholder:x.any,value:x.string,sx:x.object,onPick:x.func.isRequired,onClose:x.func.isRequired};const Cx=Ve(oe)(({theme:e})=>({minWidth:"100%",height:"100%",padding:0,overflow:"auto",[e.breakpoints.up("md")]:{minWidth:"480px",maxHeight:"400px",padding:e.spacing(1),paddingTop:0,".icon-picker-input":{paddingTop:e.spacing(2),paddingBottom:e.spacing(1),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}},".icon-picker-input":{position:"sticky",display:"flex",alignItems:"center",gap:e.spacing(1),top:0,zIndex:1,backgroundColor:e.palette.background.paper}})),Ix=Ve(Ae,{shouldForwardProp:e=>e!=="$active"})(({$active:e,theme:r})=>({boxSizing:"content-box",backgroundColor:e?r.palette.action.hover:"transparent",borderRadius:4,padding:1,width:32,height:32,"&:hover":{backgroundColor:r.palette.action.hover}}));function mo({ref:e=null,locale:r,apiPath:n,headers:t,imageEditorProps:i={actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:1,initialAspectRatio:1,croppedCanvasOptions:{minWidth:120,minHeight:120}}},onUploadFinish:o}){return g.jsx(I.Suspense,{children:g.jsx(wx,{locale:r,ref:e,popup:!0,installerProps:{disabled:!0},plugins:["ImageEditor"],onUploadFinish:a=>o?.(a),coreProps:{restrictions:{allowedFileTypes:["image/*"],maxFileSize:1024*1024*1,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:i,apiPathProps:{uploader:n,disableMediaKitPrefix:!0,disableAutoPrefix:!0,disableMediaKitStatus:!0},tusProps:{headers:t}})})}mo.propTypes={ref:x.any,locale:x.string,apiPath:x.string,headers:x.object,imageEditorProps:x.object,onUploadFinish:x.func};const xl=24,Sl=48,wl="add";x.string.isRequired;function na({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Ec(),{t:s,locale:l}=Me(),{localeMap:c,defaultLocale:u}=ta(),f=se(()=>({title:{[u]:""},description:{[u]:""},link:{[u]:""}})),d=se(N=>Ac(Array.from(new Set(be.NAVIGATION_I18N_FIELDS.flatMap(O=>Yt(N[O])?Object.keys(N[O]):[]))),u)),p=I.useRef(()=>{}),h=zt({isRoot:!0,type:wl,linkDisabled:!1,locale:u,formState:f(),get localeList(){return d(h.formState)}}),{handleSubmit:v,control:m,reset:y,setValue:b,clearErrors:C,formState:{errors:D}}=zh({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});I.useEffect(()=>{be.NAVIGATION_I18N_FIELDS.forEach(N=>b(N,h.formState[N][h.locale]))},[b,h.locale]);const _=jh({control:m}),w=_.component,P=_.title,S=_.description,T=_.link,R=_.parent;I.useEffect(()=>{h.formState.title[h.locale]=P},[P]),I.useEffect(()=>{h.formState.description[h.locale]=S},[S]),I.useEffect(()=>{h.formState.link[h.locale]=T},[T]),I.useEffect(()=>{i?.(_)},[_,i]);const k=I.useMemo(()=>t.find(O=>w?n.find(te=>te.name===w).did===O.id:O.id===R),[n,t,w,R]),j=I.useMemo(()=>{if(k?.component){const N=n.find(ae=>ae.name===k.component),{link:O}=N||{},U=Yt(O)?O[h.locale]:O;if(w)return ka(U);const te=Yt(k.link)?k.link[h.locale]:k.link;return ka(Ie(U,te||"/"))}return null},[n,h.locale,k,w]),M=I.useMemo(()=>{const{component:N}=k||{},O=n.find(ae=>ae.name===N),{navigation:U=[]}=O||{};return Ee.flattenNavigation(U,{transform(ae,de){return de?.section&&(ae.section=ae.section||de.section),ae}}).filter(ae=>ae.link).filter(ae=>Ee.isMatchSection(ae.section,r)).map(ae=>({label:ae.link,title:ae.title[l]||ae.title}))},[k,n,r,l]),H=se(()=>{h.isRoot=!0,h.locale=u,h.type=wl,h.linkDisabled=!1,h.formState=f(),y(),C(),p.current=()=>{}}),E=se((N={})=>(h.localeList.length>0&&be.NAVIGATION_I18N_FIELDS.forEach(O=>{rg(h.formState[O]).length>1&&(N[O]=h.formState[O])}),ko(N.role)&&(N.role=void 0),N)),B=se(({parent:N}={},O=()=>{})=>{h.type="add",h.isRoot=!N,b("parent",N?.id),p.current=U=>{O(U)}}),G=se((N={},O=()=>{})=>{const{id:U,icon:te,parent:ae,component:de,role:pe=[]}=N;b("id",U),b("icon",te),N.from==="team-tmpl"&&(h.linkDisabled=!0);const Ce=d(N),ze=(ye,Pe)=>{hc(ye)?h.formState[Pe]=Ce.reduce((le,ve)=>(le[ve]=ye,le),{[u]:ye}):Yt(ye)?h.formState[Pe]=Qe(ye):h.formState[Pe]={}};be.NAVIGATION_I18N_FIELDS.forEach(ye=>ze(N[ye],ye)),be.NAVIGATION_I18N_FIELDS.forEach(ye=>b(ye,h.formState[ye][h.locale])),b("component",de),b("parent",ae),b("role",pe||[]),h.type="edit",h.isRoot=!ae,p.current=ye=>{const Pe=_p(ye,["id","title","description","icon","component","link","role"]);O(Pe)}}),q=se(N=>{const O=N?.trim();if(r!=="bottomNavigation"){if(!O)return s("common.requiredErrorText",{name:s("navigation.form.title")});if(O.length>xl)return s("navigation.form.titleTooLong",{len:xl})}return!0}),J=se(N=>{const O=N?.trim();return O&&O.length>Sl?s("navigation.form.descriptionTooLong",{len:Sl}):!0}),ee=se(N=>N?.startsWith("/")?new URL(N,window.location.origin).href:N),X=se(async N=>{const O=N?.trim();if(O){if(_o(ee(O)))return!0;try{await Po(O)}catch{return s("navigation.form.invalidIcon")}}return!0}),Z=se(N=>{const O=N?.trim();return O?X(O):s("common.requiredErrorText",{name:s("navigation.form.icon")})}),V=se(N=>{const O=N?.trim();return O?Ee.checkLink(O)?!0:s("navigation.form.invalidLink"):h.isRoot?!0:s("common.requiredErrorText",{name:s("navigation.form.link")})}),re=se(N=>{h.locale=N,be.NAVIGATION_I18N_FIELDS.forEach(O=>{h.formState[O][N]||(h.formState[O][N]="")}),setTimeout(()=>{C()})}),ie=se(()=>{const{title:N,link:O}=h.formState;if(r!=="bottomNavigation")for(const U of Object.keys(N)){const te=q(N[U]);if(te!==!0)return te}for(const U of Object.keys(O)){const te=V(O[U]);if(te!==!0)return te}return!0}),$=se(N=>{const O=ie();O===!0?p.current(E(N)):Ot.error(O)}),W=se(N=>{h.locale=u,be.NAVIGATION_I18N_FIELDS.forEach(O=>{h.formState[O]=Et(h.formState[O],N)}),i?.(_)}),L=se(N=>{h.locale=N,be.NAVIGATION_I18N_FIELDS.forEach(O=>{h.formState[O][N]=h.formState[O][u]}),i?.(_),setTimeout(()=>{C()})});return I.useImperativeHandle(e,()=>({add:B,edit:G,resetImmediate:()=>H(),reset:()=>setTimeout(()=>H(),0),submit:v($)}),[B,H,G,v,$]),g.jsxs(oe,{...o,children:[g.jsx(hd,{sx:{mb:1},onAdd:L,onChange:re,onRemoveLocale:W,defaultLocale:u,locale:h.locale,localeMap:c,locales:h.localeList}),g.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&g.jsx(lt,{name:"title",control:m,rules:{validate:q},render:({field:N})=>g.jsx(it,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:h.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...N})}),r==="bottomNavigation"?g.jsx(lt,{name:"icon",control:m,rules:{validate:Z},render:({field:N})=>g.jsx(vo,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!D?.icon?.message,helperText:D?.icon?.message,disabled:h.locale!==u,methods:["select"],iconifyShape:"url",...N})}):g.jsx(lt,{name:"icon",control:m,rules:{validate:X},render:({field:N})=>g.jsx(vo,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!D?.icon?.message,helperText:D?.icon?.message,disabled:h.locale!==u,...N})}),h.isRoot&&g.jsx(lt,{name:"component",control:m,render:({field:N})=>g.jsx(Ki,{fullWidth:!0,margin:"dense",disabled:h.locale!==u&&N.value,label:s("navigation.form.component"),placeholer:s("navigation.form.componentPlaceholder"),options:n.map(O=>({title:O.title,value:O.name,description:O.link})),error:!!D?.component?.message,helperText:D?.component?.message||" ",...Et(N,"ref")})}),!h.isRoot&&["header"].includes(r)&&g.jsx(lt,{name:"description",control:m,rules:{validate:J},render:({field:N})=>g.jsx(it,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.descriptionPlaceholder"),label:s("navigation.form.description"),disabled:h.isEdit,error:!!D?.description?.message,helperText:D?.description?.message||" ",...N})}),g.jsx(lt,{name:"link",control:m,rules:{validate:V},render:({field:N})=>g.jsx(gc,{fullWidth:!0,margin:"dense",children:g.jsx($h,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:h.linkDisabled,isOptionEqualToValue:O=>O.label,options:M,renderInput:O=>g.jsx(it,{...O,placeholder:s("navigation.form.linkPlaceholder"),label:s("navigation.form.link"),error:!!D?.link?.message,helperText:D?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:j?g.jsx(Rn,{position:"start",sx:{textDecoration:vx(T||"")?"line-through":""},children:j}):null}}}),renderOption:(O,U)=>g.jsxs(oe,{component:"li",...O,children:[U.label,g.jsx(me,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:U.title})]}),margin:"dense",...N,onChange:()=>{},onInputChange:(O,U)=>{N.onChange(U)}})})}),["dashboard","sessionManager"].includes(r)&&g.jsx(lt,{name:"role",control:m,render:({field:N})=>g.jsx(Ki,{fullWidth:!0,multiple:!0,margin:"dense",label:s("navigation.form.role"),placeholer:s("navigation.form.rolePlaceholder"),options:a.map(O=>({title:O.title,value:O.name})),error:!!D?.role?.message,helperText:D?.role?.message||" ",...Et(N,"ref")})}),r==="bottomNavigation"&&g.jsx(lt,{name:"title",control:m,rules:{validate:q},render:({field:N})=>g.jsx(it,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:h.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...N})})]})]})}na.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array,onChange:x.func};function ia({ref:e=null,section:r="",components:n=[],rawNavigations:t=[]}){const{t:i}=Me(),[o,{setTrue:a,setFalse:s}]=Ah(),[l,c]=I.useState("add"),u=I.useRef(null),f=I.useMemo(()=>{const m={add:i("common.create"),edit:i("common.edit")}[l];return m?`${m} ${i("navigation.navigation")}`:"--"},[i,l]),d=I.useCallback(()=>{s(),u.current?.reset()},[s]),p=I.useCallback((v={},m=()=>{})=>{c("add"),u.current?.add(v,y=>m(d,y)),a()},[a,d]),h=I.useCallback((v={},m=()=>{})=>{c("edit"),u.current?.edit(v,y=>m(d,y)),a()},[a,d]);return I.useImperativeHandle(e,()=>({add:p,edit:h,close:d}),[p,h,d]),g.jsx(vc,{open:o,title:f,keepMounted:!0,onClose:d,sx:{".MuiDialogContent-root":{pt:0}},actions:g.jsx(Tn,{color:"primary",variant:"contained",onClick:()=>u.current?.submit(),children:i("common.confirm")}),children:g.jsx(na,{ref:u,section:r,components:n,rawNavigations:t})})}ia.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array};function bd({className:e="",add:r=()=>{},edit:n=()=>{},toggle:t=()=>{},del:i=()=>{},data:o,section:a=""}){const{t:s}=Me(),l=["yaml","team-tmpl"].includes(o.from),c=I.isValidElement(o.subtitle);function u(v){v.preventDefault(),v.stopPropagation()}const f=I.useCallback(v=>{u(v),r(o)},[r,o]),d=I.useCallback(v=>{u(v),n(o)},[n,o]),p=I.useCallback(v=>{u(v),t(o)},[t,o]),h=I.useCallback(v=>{u(v),i(o)},[i,o]);return g.jsxs("div",{className:e,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&g.jsx("span",{title:s(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:g.jsx(Ae,{size:"small",color:"success",onClick:f,disabled:c,children:g.jsx(xe,{icon:"mdi:plus-box-outline"})})}),g.jsx("span",{title:s(c?"navigation.action.noEdit":"navigation.action.edit"),children:g.jsx(Ae,{size:"small",color:"primary",onClick:d,disabled:c||o.from==="team-tmpl",children:g.jsx(xe,{icon:"mdi:pencil-outline"})})}),g.jsx("span",{title:c?s("navigation.action.noEdit"):o.visible?s("navigation.action.hide"):s("navigation.action.show"),children:g.jsx(Ae,{size:"small",color:"warning",onClick:p,disabled:c,children:o.visible===!1?g.jsx(xe,{icon:"mdi:eye-off-outline"}):g.jsx(xe,{icon:"mdi:eye-outline"})})}),g.jsx("span",{title:s(l&&!c?"navigation.action.noDel":"navigation.action.del"),children:g.jsx(Ae,{disabled:l&&!c,size:"small",color:"error",onClick:h,children:g.jsx(xe,{icon:"mdi:delete"})})})]})}bd.propTypes={data:x.object.isRequired,className:x.string,add:x.func,edit:x.func,toggle:x.func,del:x.func,section:x.string};const Cn=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",Rx=e=>{const r={...e},n=e?.background;return typeof n=="string"?r.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(r.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),r},Tx=(e,r="en",n="en")=>{if(typeof e=="string"){if(cd(e)){const i=new URL(e);return i.searchParams.set("locale",r),i.href}if(ud(e))return e;const t=new URL(e,window.location.origin);return t.searchParams.set("locale",r),t.pathname+t.search}return typeof e=="object"?e[r]||e[n]||e.en:e},rr=({navigation:e,locale:r,defaultLocale:n,section:t="header"})=>{if(!e?.length)return e;const i=(o,a)=>o&&typeof o=="object"?o[a]||o[n]||o.en:o;return Gt(e,o=>({...o,title:i(o.title,r),description:i(o.description,r),link:mc(o.items?.length?o.link:Tx(o.link,r,n),t),_rawLink:o.link}),"items")},Dx=e=>Gt(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),Px=e=>{if(!e?.length)return null;const r=Dx(e),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return r.forEach(t=>{t.section?Array.isArray(t.section)?t.section.forEach(i=>{n[i]?.push(t)}):typeof t.section=="string"&&n[t.section]?.push(t):n.header.push(t)}),n},oa=e=>{if(!e)return null;const r={...e};return r.theme=Rx(r.theme),r.navigation=Px(_x(r.navigation)),r},_x=(e=[])=>ea(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),yd=(e,r)=>ea(e,(n,t)=>{const i=!n.role||r&&(n.role.includes(r)||n.role.includes("guest"));return t.isLeaf?i:i&&t.filteredChildren?.length},"items"),kx={top:-960,width:960,height:960,body:'<path fill="currentColor" d="M510-600v-210q0-12.75 8.625-21.375T540-840h270q12.75 0 21.375 8.625T840-810v210q0 12.75-8.625 21.375T810-570H540q-12.75 0-21.375-8.625T510-600M120-480v-330q0-12.75 8.625-21.375T150-840h270q12.75 0 21.375 8.625T450-810v330q0 12.75-8.625 21.375T420-450H150q-12.75 0-21.375-8.625T120-480m390 330v-330q0-12.75 8.625-21.375T540-510h270q12.75 0 21.375 8.625T840-480v330q0 12.75-8.625 21.375T810-120H540q-12.75 0-21.375-8.625T510-150m-390 0v-210q0-12.75 8.625-21.375T150-390h270q12.75 0 21.375 8.625T450-360v210q0 12.75-8.625 21.375T420-120H150q-12.75 0-21.375-8.625T120-150m60-360h210v-270H180zm390 330h210v-270H570zm0-450h210v-150H570zM180-180h210v-150H180zm210-150"/>'},Ox={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function Ex({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},s=(a.navigation||[]).filter(p=>p.section==="sessionManager"&&!["/sessionManager"].includes(p.id)).filter(p=>!!(p?.role||[]).includes(e?.user?.role||"guest")).map(p=>{const h=(a?.componentMountPoints||[]).find(v=>p.component===v.name);return{...p,component:h}}),l=jt(),c=I.useRef(null),u=zt({open:!1}),f=se((p=!u.open)=>{u.open=p}),d=t==="hover"?{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1)}:{onClick:()=>f()};return s.length===0||!e?.user?null:g.jsxs(oe,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...i},...o,...d,children:[g.jsx(Ae,{size:"medium",ref:c,children:g.jsx(xe,{icon:kx,fontSize:n,style:{transform:"scale(1.08)"}})}),g.jsx(kp,{open:u.open,anchorEl:c.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:p})=>g.jsx(Op,{onClickAway:h=>{h.preventDefault(),h.stopPropagation(),f(!1)},children:g.jsx(bc,{...p,timeout:350,children:g.jsxs(Or,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[g.jsx(Ep,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:s.map(h=>g.jsx(Np,{disablePadding:!0,children:g.jsxs(Wh,{href:Oa(h.link,r),sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[h?.component?.did?g.jsx(oe,{component:"img",src:`${yc}/blocklet/logo-bundle/${h.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):g.jsx(xe,{fontSize:50,icon:h.icon||Ox,color:l.palette.text.secondary}),g.jsx(me,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:Oa(h.title,r)})]})},h.id))}),g.jsx(Mp,{session:e,children:g.jsx(Tn,{variant:"outlined",fullWidth:!0,href:Ap,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const xd=x.shape({appLogo:x.node,appName:x.string,theme:x.shape({background:x.string}),enableConnect:x.bool,enableLocale:x.bool,navigation:x.arrayOf(x.shape({title:x.oneOfType([x.string,x.object]),link:x.oneOfType([x.string,x.object]),icon:x.string,items:x.arrayOf(x.shape({title:x.oneOfType([x.string,x.object]),link:x.oneOfType([x.string,x.object])}))}))}),Sd=x.shape({showText:x.bool,showRole:x.bool,switchDid:x.bool,switchProfile:x.bool,switchPassport:x.bool,disableLogout:x.bool,onLogin:x.func,onLogout:x.func,onSwitchDid:x.func,onSwitchProfile:x.func,onSwitchPassport:x.func,menu:x.array,menuRender:x.func,dark:x.bool,size:x.number}),Nx=["admin","owner"],Mx=e=>e.endsWith(".ip.abtnet.io"),Ax=e=>e.endsWith(".did.abtnet.io"),Lx={en:{guest:{title:"Notice: You are using a temporary domain",description:"You are accessing this site through a temporary domain. For a better experience, please contact the site administrator to configure a custom domain. Using a custom domain not only makes access more convenient but also ensures your access is more secure."},owner:{title:"Enhance Your Website Security",description:"Dear administrator, we recommend configuring your custom domain immediately, which will:",benefits1:"Automatically obtain HTTPS certificates to ensure secure data transmission",benefits2:"Create an exclusive brand image and increase website credibility",benefits3:"Get a shorter, more memorable access address",benefits4:"Provide visitors with a more professional experience",benefits5:"Domain configuration takes just minutes to complete, taking your website to the next level!"},skip:"Remind Me Later",bindDomain:"Configure Domain"},zh:{guest:{title:"温馨提示:当前使用的是临时域名",description:"您正在通过临时域名访问本站点。为了获得更好的访问体验,请联系站点管理员配置自定义域名。使用自定义域名不仅访问更便捷,还能确保您的访问更加安全。"},owner:{title:"提升网站安全性与专业度",description:"尊敬的管理员,我们建议您尽快配置自定义域名,这样可以:",benefits1:"自动获取 HTTPS 证书,确保数据传输安全",benefits2:"打造专属品牌形象,提升网站可信度",benefits3:"获得更简短、易记的访问地址",benefits4:"为访客提供更专业的访问体验",benefits5:"只需几分钟即可完成域名配置,全面提升您的网站品质!"},skip:"稍后提醒",bindDomain:"配置域名"}},zx=1e3*60*60*24*30,Cl=".well-known/service/admin/domains";function wd({locale:e="en",session:r={}}){const n=r?.user,t=Mc(),[i,o]=I.useState(()=>{const d=window.localStorage.getItem("domain-warning-skip");if(!d)return!0;const p=+new Date,h=+new Date(d);return p-h>zx}),a=se((d,p={})=>Un(Lx,d,e,"en",p)),s=I.useMemo(()=>{try{const{hostname:d}=new URL(window.location.href);return d}catch{return""}},[]),l=I.useMemo(()=>[a("owner.benefits1"),a("owner.benefits2"),a("owner.benefits3"),a("owner.benefits4"),a("owner.benefits5")],[a]),c=I.useCallback(()=>{window.localStorage.setItem("domain-warning-skip",new Date().toISOString()),o(!1)},[]),u=I.useCallback(()=>{const d=Ie(window.location.origin,Cl);d.startsWith("http")&&window.open(d,"_blank"),o(!1)},[]),f=n?.role&&Nx.includes(n.role);return window.location.href.includes(Cl)||t||!Mx(s)&&!Ax(s)?null:g.jsxs(Lp,{open:i,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"sm",onClose:()=>o(!1),children:[g.jsxs(zp,{sx:{padding:"20px !important"},children:[g.jsx(me,{sx:{fontSize:"20px",fontWeight:"500"},children:a(f?"owner.title":"guest.title")}),g.jsx(me,{sx:{marginTop:"20px",fontSize:"14px",color:"text.secondary"},children:a(f?"owner.description":"guest.description")}),f&&g.jsx(oe,{component:"ul",children:l.map(d=>g.jsx(me,{component:"li",sx:{fontSize:"14px",color:"text.secondary"},children:d},d))})]}),g.jsxs(jp,{sx:{px:"12px !important"},children:[g.jsx(xt,{onClick:c,children:a("skip")}),f&&g.jsx(xt,{variant:"contained",onClick:u,children:a("bindDomain")})]})]})}wd.propTypes={locale:x.string,session:x.object};const ke={};function jx(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=Ie(r,yc,e);return new Gp.WsClient(n,{heartbeatIntervalMs:100*1e3})}function Fx(e="admin"){return ke[e]||(ke[e]=jx(e)),ke[e]}const Bx=(e="admin")=>{const r=I.use(qn),{session:n}=r??{},t=Le(()=>n.user?.did,[n.user]),i=Fp(t);return Bp(()=>{Object.keys(ke).forEach(o=>{ke[o]?.isConnected()&&ke[o]?.disconnect(),delete ke[o]})}),t?(i&&i!==t&&Object.keys(ke).forEach(o=>{ke[o]&&(ke[o].isConnected()&&ke[o].disconnect(),ke[o].connect())}),!ke[e]&&n.user&&(ke[e]=Fx(e),ke[e].connect()),ke[e]):null},Gx={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0"/><path d="m9 12l2 2l4-4"/></g>'},$x={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0m9-3v4m0 3v.01"/>'},Wx={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 21a9 9 0 0 0 9-9a9 9 0 0 0-9-9a9 9 0 0 0-9 9a9 9 0 0 0 9 9zM9 8l6 8m0-8l-6 8"/>'};function Hx(){const e=jt();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=Hn(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const kr=new $p,Ux=e=>!ko(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,qx=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},Vx=async(e,r)=>{try{return await kr.user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},Kx=async(e,r)=>{const{type:n,did:t}=e;return xc.isSameAddr(n,"did")?await Vx(t,r)||Dn.getLink(e):Dn.getLink(e)},Yx=async(e,r,n=!0)=>{const t=Dn.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof Dn.Link){if(n){const o=await Kx(i,r),{type:a,chainId:s,did:l}=i;return xc.isSameAddr(a,"dapp")?`<em class="dapp" data-type="${a}" data-chain-id="${s}" data-did="${l}">${i.text}</em>`:o?`<a target="_blank" rel="noopener noreferrer" class="link" href="${o}">${i.text}</a>`:`<em class="common" data-type="${a}" data-chain-id="${s}" data-did="${l}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))},Jx=e=>Wp.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),Xx={comment:(e,r)=>r&&r>1?g.jsxs(g.Fragment,{children:["left ",r," comments on your ",e]}):g.jsxs(g.Fragment,{children:["commented on your ",e]}),like:e=>g.jsxs(g.Fragment,{children:["liked your ",e]}),follow:()=>g.jsx(g.Fragment,{children:"followed you"}),tips:e=>g.jsxs(g.Fragment,{children:["gave tips to your ",e]}),mention:e=>g.jsxs(g.Fragment,{children:["mentioned you in ",e]}),assign:()=>g.jsx(g.Fragment,{children:"assigned you a task"})};function Kt({user:e,color:r=void 0}){const{palette:n}=jt(),t=Vn(Ie(be.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return g.jsx(Sc,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Kt.displayName="UserLink";function Qx({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=jt(),{type:a,target:s}=e||{},{type:l}=s||{},{linkColor:c=o.text.primary}=t||{},u=Le(()=>{if(!Array.isArray(r))return new Map;const m=new Map;return r.forEach(y=>{y?.did&&!m.has(y.did)&&m.set(y.did,y)}),m},[r]),f=Le(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),d=se(()=>{if(!Array.isArray(f)||f.length===0)return null;if(f.length===1)return g.jsx(Kt,{user:f[0],color:c});const m=f.slice(0,-1),y=f[f.length-1];if(f.length===2)return g.jsxs(g.Fragment,{children:[g.jsx(Kt,{user:m[0],color:c})," and ",g.jsx(Kt,{user:y,color:c})]});const b=f.length>3,C=b?f.slice(0,2):m;return g.jsxs(g.Fragment,{children:[C.map((D,_)=>g.jsxs(Q.Fragment,{children:[g.jsx(Kt,{user:D,color:c}),_<C.length-1?", ":""]},D.did)),b?`, and ${f.length-2} others`:g.jsxs(g.Fragment,{children:[", and ",g.jsx(Kt,{user:y,color:c})]})]})}),p=se(()=>{const m=a?Xx[a]:null;return m?m(l,r.length):null}),h=Le(()=>{const m=d(),y=p();return!m||!y?null:g.jsxs(g.Fragment,{children:[m," ",y]})},[a,l,f,d,p]),v=Le(()=>{if(!e)return null;const m=qx(e);return m?.targetLink?Ie(i,m.targetLink):null},[e,i]);return!a||ko(s)?null:g.jsxs(g.Fragment,{children:[h," ",v&&g.jsx(Sc,{href:v,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:s.name})]})}const Zx={normal:Ea,success:Gx,info:Ea,warning:$x,error:Wx},eS=cr(Vp)`
|
|
44
44
|
font-size: 20px;
|
|
45
45
|
`,tS=cr.div`
|
|
46
46
|
display: flex;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aF as c6,j as r,r as t,bo as U1,aQ as l6,M as $,H as R,a2 as u6,b as O1,a0 as H1,f8 as e1,f as b1,E as p6,cw as k1,ba as t1,iL as R1,V as M,aT as M1,hR as V1,iM as C6,y as x,fe as d6,g8 as h6,a4 as T1,bE as G,dq as j1,K as S,L as J,iN as N1,aW as m6,dH as f6,aO as k,bs as g6,z as N,O as J1,gD as E6,f6 as A6,F as x6,dD as D6,T as b,$ as y6,D as w6,t as S6,v as l1,C as B6,iO as u1,w as I6,hf as F6,bB as L6,hU as v6,a5 as U6,Y as n1,o as I,i as p1,x as O6,ax as H6,al as b6}from"./index-
|
|
1
|
+
import{aF as c6,j as r,r as t,bo as U1,aQ as l6,M as $,H as R,a2 as u6,b as O1,a0 as H1,f8 as e1,f as b1,E as p6,cw as k1,ba as t1,iL as R1,V as M,aT as M1,hR as V1,iM as C6,y as x,fe as d6,g8 as h6,a4 as T1,bE as G,dq as j1,K as S,L as J,iN as N1,aW as m6,dH as f6,aO as k,bs as g6,z as N,O as J1,gD as E6,f6 as A6,F as x6,dD as D6,T as b,$ as y6,D as w6,t as S6,v as l1,C as B6,iO as u1,w as I6,hf as F6,bB as L6,hU as v6,a5 as U6,Y as n1,o as I,i as p1,x as O6,ax as H6,al as b6}from"./index-DaEjX2SO.js";import{v as C1}from"./index-Bpl7ZPdw.js";import{f as k6}from"./index-BojVbZw0.js";import{b as R6,c as M6,d as V6}from"./spaces-BTKqW9YY.js";import{u as a1}from"./blocklet-4xcBoALi.js";import{D as T6}from"./DeleteOutline-C9hdvFLW.js";import{O as Z1}from"./OpenInNew-KWw6IL4k.js";import{x as j6}from"./index-DRYJ0xIl.js";import{H as N6}from"./HelpOutline-CDfUVKlB.js";import"./api-gDzILycU.js";const J6=c6(r.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}));function Z6(){const[e,n]=t.useState(null),{blocklet:a}=a1();return t.useEffect(()=>{n(R6(a))},[a]),{storageEndpoint:e}}const P1=t.createContext({}),{Provider:P6,Consumer:He}=P1;function Q6({children:e}){const[n,a]=t.useState(!1),[s,o]=t.useState(null),{blocklet:i,actions:{refreshBlocklet:u}}=a1(),{storageEndpoint:c}=Z6(),{api:p}=U1();l6(async()=>{try{if(a(!0),$(c)){o(null);return}const d=await M6(c);o(d)}catch(d){console.error(d),R.error(d.message)}finally{a(!1)}},[c]);const l=()=>{o(null),u()},C=async d=>{o(d),await m(d.endpoint),u()},m=async d=>{await p.configBlocklet({input:{did:[i.meta.did],configs:[{key:O1.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:d}]}}),u()};t.useEffect(()=>{async function d(){if(!s)return;const E=await V6(s.endpoint,s.name),w=u6(s,{name:E});o(w)}d()},[]);const f=!!(c&&s);return r.jsx(P6,{value:{loading:n,spaceGateway:s,deleteSpaceGateway:l,updateSpaceGateway:C,storageEndpoint:c,settingStorageEndpoint:m,hasStorageEndpoint:f},children:e})}Q6.propTypes={children:H1.node.isRequired};function G6(){return t.useContext(P1)}const Z=e1({});function X6({key:e}={key:"md"}){const n=b1();return p6(n.breakpoints.down(e))}var A=(e=>(e[e.NETWORK_ERROR=1001]="NETWORK_ERROR",e[e.UNAUTHORIZED=1002]="UNAUTHORIZED",e[e.EXPIRED=1003]="EXPIRED",e[e.PAST_DUE=1004]="PAST_DUE",e[e.INVALID=1005]="INVALID",e[e.UNIT_LIMIT=1006]="UNIT_LIMIT",e[e.CORS_BLOCKED=1007]="CORS_BLOCKED",e[e.INCOMPATIBLE=1008]="INCOMPATIBLE",e))(A||{}),Q1=(e=>(e.DEFAULT="default",e.SUCCEEDED="succeeded",e.FAILED="failed",e.PENDING="pending",e))(Q1||{}),v=(e=>(e.APP_DISCONNECTED="app-disconnected",e.APP_RESTORE="app-restore",e.APP_BACKUP="app-backup",e.APP_CONNECTED="app-connected",e.APP_OBJECTS_SYNC="app-objects-sync",e))(v||{});function z6({endpoint:e,deps:n=[]}){return k1(async()=>{if(!t1(e))return;const{headers:a}=await Z.head(e,{timeout:1e3*30,params:{withExtras:!0}}),[s,o,i,u,c,p,l,C,m,f]=[a["x-space-name"],a["x-subscription-id"],a["x-listable"]==="true",a["x-readable"]==="true",a["x-writeable"]==="true",a["x-space-version"],a["x-space-owner-did"],a["x-space-is-available"],a["x-error-code"],a["x-is-site-admin"]],d=s?decodeURIComponent(s):"";if(C===void 0||m===void 0){const E=i&&u&&c;return{version:p,name:d,subscriptionId:o,ownerDid:l||"",isAvailable:E,errorCode:E?0:A.UNAUTHORIZED,isSiteAdmin:f==="true"}}return{version:p,name:d,subscriptionId:o,ownerDid:l,isAvailable:C==="true",errorCode:parseInt(m,10),isSiteAdmin:f==="true"}},{refreshDeps:[e].concat(n),onError(a){console.error(a)}})}const K6=R1.flatten({common:{cancel:"Cancel",confirm:"Confirm",delete:"Delete",error:"Error",open:"Open",unknown:"Unknown",invalidUrl:"Invalid url: {url}",upgrade:"Upgrade",viewMore:"View More"},storage:{spaces:{authorize:{title:"Connect {appName} to DID Spaces",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} to connect to DID Spaces",success:"Connected successfully"},connect:{reconnect:"Reconnect Now",useSpaceGateway:"Connect using the DID Spaces gateway",useWallet:"Connect to DID Spaces",howToGetGatewayUrl:"How to get the url of did spaces",providerForStorage:"Please connect your DID Spaces"},connected:{title:"Connected DID Spaces",tag:"Connected"},disconnected:{tag:"Disconnected"},error:{tag:"Need Attention",blockedByCors:"Access blocked by CORS",unreachable:"DID Space is unreachable",expired:"DID Spaces has expired, click this link to re-subscribe",pastDue:"DID Spaces has unpaid bills, click this link to complete payment",invalid:"DID Spaces subscription anomaly, click this link to check",unitLimit:"DID Spaces free quota has been used up, click this link to pay for the upgrade",cors:`The connection request may fail due to CORS restrictions:
|
|
2
2
|
1. Please contact the DID Space administrator to verify the relevant configuration.
|
|
3
3
|
2. If you are the administrator, click the link below to view the detailed setup guide and resolve the issue.`,networkError:"DID Space is currently unreachable due to potential server issues, network problems, or maintenance. Please click the link to visit the homepage and check its status.",incompatible:`The current connection of DID Spaces version ({spaceVersion}) is not compatible with the component version ({expectVersion}). Please contact the administrator for adjustments.
|
|
4
4
|
If you are the administrator, you can click the link below to take action.`},gateway:{add:{invalidUrl:"Invalid DID Spaces gateway url",label:"Enter the url of the DID Spaces",title:"Add DID Spaces"}},provideNFT:{title:"Please show the DID Spaces NFT for {appName}",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} show DID Spaces NFT",success:"Connected successfully"},helperText:{fixCorsError:"Fixing CORS Errors When Connecting to DID Spaces"}}},auditLog:{backup:{description:"A backup operation was completed {relativeTime}"},restore:{description:"A restore operation was completed {relativeTime}"},connected:{description:"A connection was established {relativeTime}"},disconnected:{description:"The connection was disconnected {relativeTime}"},objectsSync:{description:"{totalCount} objects ({size}) were synchronized {relativeTime}"}}}),Y6=R1.flatten({common:{cancel:"取消",confirm:"确认",delete:"删除",error:"错误",open:"打开",unknown:"未知",invalidUrl:"无效的 url: {url}",upgrade:"升级",viewMore:"查看更多"},storage:{spaces:{authorize:{title:"连接 {appName} 至 DID Spaces",scan:"使用你的 DID Wallet 扫描下面的二维码以允许应用 {appName} 连接至 DID Spaces",success:"连接成功"},connect:{reconnect:"立即重连",useSpaceGateway:"使用 DID Spaces 网关连接",useWallet:"连接至 DID Spaces",howToGetGatewayUrl:"如何获取 DID Spaces 的网关地址",providerForStorage:"请连接您的 DID Spaces"},connected:{title:"已连接的 DID Spaces",tag:"已连接"},disconnected:{tag:"连接已断开"},error:{tag:"需要关注",blockedByCors:"因 CORS 限制,访问被阻止",unreachable:"DID Space 无法访问",expired:"DID Spaces 已过期,点击此链接重新订阅",pastDue:"DID Spaces 有未支付账单,点击此链接完成支付",invalid:"DID Spaces 订阅异常,点击此链接检查",unitLimit:"DID Spaces 免费额度已用完,点击此链接付费升级",cors:`连接请求可能因 CORS 限制而失败:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m as et}from"./index-
|
|
1
|
+
import{m as et}from"./index-BsFiddFP.js";import"./index-DaEjX2SO.js";import"./decode-DPztD6kB.js";/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
4
4
|
* Released under the MIT license
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{V as h,j as e,ad as j,K as o,X as g,T as _,t as b,o as n}from"./index-
|
|
1
|
+
import{V as h,j as e,ad as j,K as o,X as g,T as _,t as b,o as n}from"./index-DaEjX2SO.js";import{C as R}from"./click-to-copy-Xg1hTHwq.js";function T({title:c,description:l,confirmPlaceholder:m,cancel:d="",confirm:u="Confirm",params:p={},onCancel:f=()=>{},onConfirm:C,keyName:t}){const{t:a}=h(),i={title:()=>e.jsx(o,{children:c}),description:(s,y)=>{const x=r=>{y({...r,__disableConfirm:r.__disableConfirm})};return e.jsxs(o,{children:[e.jsx(g,{severity:"warning",style:{width:"100%"},children:a("common.notice")}),e.jsx(o,{sx:{my:3,b:{wordBreak:"break-word"}},dangerouslySetInnerHTML:{__html:l}}),e.jsxs(o,{style:{marginBottom:24},children:[a("common.click"),":",e.jsx(R,{"data-cy":"click-copy",children:t})]}),e.jsx(_,{component:"div",children:e.jsx(b,{label:m,autoComplete:"off","data-cy":"delete-confirm-input",variant:"outlined",fullWidth:!0,autoFocus:!0,value:s.inputVal,onChange:r=>{x({...s,inputVal:r.target.value,__disableConfirm:t!==r.target.value})}})})]})},confirm:u,cancel:d,onConfirm:C,onCancel:f,params:{inputVal:"",__disableConfirm:!0,...p}};return e.jsx(j,{title:i.title,description:i.description,confirm:i.confirm,cancel:i.cancel,params:i.params,onConfirm:i.onConfirm,onCancel:i.onCancel})}T.propTypes={title:n.any.isRequired,keyName:n.any.isRequired,description:n.any.isRequired,confirmPlaceholder:n.any.isRequired,cancel:n.string,confirm:n.string,params:n.object,onCancel:n.func,onConfirm:n.func.isRequired};export{T as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{eJ as r}from"./index-
|
|
1
|
+
import{eJ as r}from"./index-DaEjX2SO.js";var f=function(i,o){return i===void 0&&(i=[]),o===void 0&&(o=[]),r(i,o)};export{f as d};
|