@abtnode/webapp 1.16.49-beta-20250902-002109-7f238eb8 → 1.16.50-beta-20250902-043619-201bcaed
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-DimT2cks.js → AdapterDayjs-DPswIgNd.js} +1 -1
- package/dist/assets/{Add-B2ZDVqat.js → Add-CTkKWsbA.js} +1 -1
- package/dist/assets/ArrowDropDown-CPMzkOwU.js +1 -0
- package/dist/assets/{Autocomplete-B6hdnAbf.js → Autocomplete-BnpjHbVI.js} +1 -1
- package/dist/assets/{Breadcrumbs-C0NyAgW3.js → Breadcrumbs-BcwyHALS.js} +1 -1
- package/dist/assets/{ButtonGroup-BxZjrpDd.js → ButtonGroup-B8CEk0Fm.js} +1 -1
- package/dist/assets/{CSSTransition-D9w1WbTD.js → CSSTransition-CgU-qJG1.js} +1 -1
- package/dist/assets/{CallMerge-CT9kGdYw.js → CallMerge-DG9UCIML.js} +1 -1
- package/dist/assets/{CardContent-DZQbbzze.js → CardContent-DUT0SHjO.js} +1 -1
- package/dist/assets/{ChevronLeft-C1WpAw9J.js → ChevronLeft-Mrf8wNcO.js} +1 -1
- package/dist/assets/{ChevronRight-BHex1y5g.js → ChevronRight-CgNj8oK3.js} +1 -1
- package/dist/assets/{Clear-CY2XI9UL.js → Clear-D0eiF7LM.js} +1 -1
- package/dist/assets/{DeleteOutline-DCwd4zu5.js → DeleteOutline-BXGUPwfv.js} +1 -1
- package/dist/assets/{Done-DvjnHsf4.js → Done-B-4ttL5E.js} +1 -1
- package/dist/assets/{Edit-CQvdC-gs.js → Edit-BDZJlnuz.js} +1 -1
- package/dist/assets/{ErrorOutline-3x65gte5.js → ErrorOutline-DM8Q-uGO.js} +1 -1
- package/dist/assets/{FilterList-C7CgIPm8.js → FilterList-BnK3OcNB.js} +1 -1
- package/dist/assets/{Google-Bli8mQj2.js → Google-BnsccEt-.js} +1 -1
- package/dist/assets/{HelpOutline-DK_qkp2M.js → HelpOutline-95P320TL.js} +1 -1
- package/dist/assets/{Launch-Cazur-Fl.js → Launch-C31ynKKh.js} +1 -1
- package/dist/assets/{Link-B32ARgrh.js → Link-DKdN2Z0q.js} +1 -1
- package/dist/assets/{ListItemButton-BOWa6EsK.js → ListItemButton-wejxtEoj.js} +1 -1
- package/dist/assets/{ListSubheader-59vUoVIT.js → ListSubheader-B_qXJClL.js} +1 -1
- package/dist/assets/{LoadingButton-ClNP4uj0.js → LoadingButton-Zo_5FEH-.js} +1 -1
- package/dist/assets/{MoreVert-Dnv5meLi.js → MoreVert-Bg7SRP_I.js} +1 -1
- package/dist/assets/{OpenInNew-CVZ7jhVw.js → OpenInNew-C4rxt70p.js} +1 -1
- package/dist/assets/{Refresh-BU7QWHYu.js → Refresh-L5IK_LF1.js} +1 -1
- package/dist/assets/{Search-CviyP5PC.js → Search-2a28Zd0Q.js} +1 -1
- package/dist/assets/{Slider-DEcPJiVm.js → Slider-DfrL_KUv.js} +1 -1
- package/dist/assets/{Stepper-BXOkpPZl.js → Stepper-B6f7_MVS.js} +1 -1
- package/dist/assets/{Switch-C_vix7qp.js → Switch-iXfQHCNE.js} +1 -1
- package/dist/assets/{TableSearch-Dsfp_XUr.js → TableSearch-BfqBG8KC.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-BRuEkEDq.js → ToggleButtonGroup-CAU8g76h.js} +1 -1
- package/dist/assets/{Verified-C1OHOKpp.js → Verified-DFAnifny.js} +1 -1
- package/dist/assets/{VerifiedUser-C0M9SrH7.js → VerifiedUser-BFvcT9A-.js} +1 -1
- package/dist/assets/{ViewList-_seGVlfH.js → ViewList-BF_nxJjM.js} +1 -1
- package/dist/assets/{_createAggregator-s6UGbWKk.js → _createAggregator-DTDqEyEr.js} +1 -1
- package/dist/assets/{actions-DaFcSF4Q.js → actions-BfeIbo_G.js} +1 -1
- package/dist/assets/{actions-BTM30cO2.js → actions-DcrS1GhL.js} +1 -1
- package/dist/assets/{agreement-DSL1Z9Z4.js → agreement-8NAAXeTA.js} +1 -1
- package/dist/assets/api-DHdVnqwS.js +1 -0
- package/dist/assets/{appearance-B5Fxj0pt.js → appearance-BiJ6lD1T.js} +1 -1
- package/dist/assets/{audit-logs-DfhTX_zm.js → audit-logs-xPU-sDla.js} +1 -1
- package/dist/assets/{base-chart-CUBovNRp.js → base-chart-CPd4vePQ.js} +1 -1
- package/dist/assets/{blocklet-Clk0KDdY.js → blocklet-BwXw89V1.js} +1 -1
- package/dist/assets/{chain-Bpi260c_.js → chain-d11c9jLj.js} +1 -1
- package/dist/assets/{click-to-copy-BZWirPDQ.js → click-to-copy-mqyEDC5n.js} +1 -1
- package/dist/assets/client-CSeQ4CUw.js +1 -0
- package/dist/assets/cloneDeep-DrWSOVhF.js +1 -0
- package/dist/assets/{collapse-BOYOLC_4.js → collapse-Co_76D-y.js} +1 -1
- package/dist/assets/{config-navigation-BEIEFUiN.js → config-navigation-Bxan73e2.js} +3 -3
- package/dist/assets/{connect-to-CKfgySWf.js → connect-to-dgAF9yLc.js} +5 -5
- package/dist/assets/{cssMode-B5RVclx-.js → cssMode-C31W-e3q.js} +1 -1
- package/dist/assets/{delete-confirm-BrhseXop.js → delete-confirm-BBlDevSj.js} +1 -1
- package/dist/assets/{depsEqual-msOq5b5x.js → depsEqual-BxsaWGVI.js} +1 -1
- package/dist/assets/{detail-BlLW7YjN.js → detail-DAPMqeRx.js} +3 -3
- package/dist/assets/{domains-C_4AnOp5.js → domains-24jfdV6n.js} +1 -1
- package/dist/assets/{download-DY09iblB.js → download-3kRJTAFI.js} +1 -1
- package/dist/assets/{edit.svg-D-BTMQSd.js → edit.svg-BHgQlE3X.js} +1 -1
- package/dist/assets/emotion-cache.browser.esm-DKCrrwkN.js +1 -0
- package/dist/assets/engine-Cere5Eel.js +1 -0
- package/dist/assets/{freemarker2-qOqeJDqa.js → freemarker2-JmP3cv2S.js} +1 -1
- package/dist/assets/{get-safe-url-0GDhhKMb.js → get-safe-url-DG3hbVuw.js} +1 -1
- package/dist/assets/getValidReactChildren-UBZRExQI.js +1 -0
- package/dist/assets/{graphqlMode-K6gJ3gBf.js → graphqlMode-C78Ld2Eu.js} +2 -2
- package/dist/assets/{handlebars-CpCfM6TO.js → handlebars-CKF2hLML.js} +1 -1
- package/dist/assets/{html-fUKduY5C.js → html-CBskQMFu.js} +1 -1
- package/dist/assets/{html-title-HtPlSvGf.js → html-title-F0NEfYXw.js} +1 -1
- package/dist/assets/{htmlMode-B-5GmxUH.js → htmlMode-DsG66HOr.js} +1 -1
- package/dist/assets/{iframe-CiaMOw3l.js → iframe-B5DJ8-Ji.js} +1 -1
- package/dist/assets/{index-BniP3-Ka.js → index-0496i8uI.js} +2 -2
- package/dist/assets/{index-B58pv6JK.js → index-2hrGtHmX.js} +1 -1
- package/dist/assets/{index-BcVAgGLo.js → index-4ozQpL9g.js} +1 -1
- package/dist/assets/{index--IDE3zqS.js → index-B3FIRHqC.js} +1 -1
- package/dist/assets/{index-B09qWXEi.js → index-BLMobR0e.js} +1 -1
- package/dist/assets/index-BMcGNp8z.js +602 -0
- package/dist/assets/{index-De5Caszn.js → index-BShBVqEp.js} +1 -1
- package/dist/assets/{index-QEEYyfjs.js → index-BTOhdwnt.js} +1 -1
- package/dist/assets/{index-BQl82i43.js → index-BUw2Zomp.js} +1 -1
- package/dist/assets/{index-n4_kY89C.js → index-BWyeLBJr.js} +1 -1
- package/dist/assets/index-B_D_eWlx.js +1 -0
- package/dist/assets/{index-Rr_K0vXu.js → index-BeVhpCa2.js} +1 -1
- package/dist/assets/{index-C_Fk7Rzr.js → index-Bj_Te32l.js} +1 -1
- package/dist/assets/{index-D1AKo-x3.js → index-C-fYS2zX.js} +1 -1
- package/dist/assets/{index-CwANiKOk.js → index-C1YX-486.js} +1 -1
- package/dist/assets/{index-BcMFt6jn.js → index-C3erfPAZ.js} +3 -3
- package/dist/assets/{index-sz3uFV7b.js → index-CIOQij4h.js} +1 -1
- package/dist/assets/{index-DMSf9VmZ.js → index-CN-8L-fW.js} +1 -1
- package/dist/assets/{index-DiVM7PAR.js → index-COFGt098.js} +1 -1
- package/dist/assets/{index-CB6io54J.js → index-COql_jsK.js} +1 -1
- package/dist/assets/{index-C0cmjlmK.js → index-CPewySJ_.js} +1 -1
- package/dist/assets/{index-nbCQMVdu.js → index-CTpUEnRG.js} +1 -1
- package/dist/assets/{index-N8fONOxR.js → index-ChZ3ki2X.js} +9 -9
- package/dist/assets/{index-BCDhEJAj.js → index-ClLVAMtr.js} +1 -1
- package/dist/assets/{index-C_i8vZPM.js → index-Cx9xeHC7.js} +1 -1
- package/dist/assets/{index-CB3gF2be.js → index-D-LfiN9o.js} +1 -1
- package/dist/assets/{index-wdj0FEUp.js → index-D9XGO23S.js} +3 -3
- package/dist/assets/{index-daIR3ecn.js → index-D9nLQXCy.js} +1 -1
- package/dist/assets/{index-tE5HA0JS.js → index-DAw4DSiR.js} +1 -1
- package/dist/assets/{index-NeEbDyYj.js → index-DCkFWlji.js} +1 -1
- package/dist/assets/{index-BVwfeTfE.js → index-DDIG3-mk.js} +1 -1
- package/dist/assets/{index-DCr9iA79.js → index-DGDUIal5.js} +1 -1
- package/dist/assets/{index-Cs7boeoz.js → index-DKPVTl-I.js} +1 -1
- package/dist/assets/{index-BMlarUaU.js → index-DPKaJazb.js} +1 -1
- package/dist/assets/{index-Bz1WmE2z.js → index-DocroCwn.js} +1 -1
- package/dist/assets/{index-BhIGrRjA.js → index-DpRx2tZw.js} +1 -1
- package/dist/assets/{index-DGDwJTNO.js → index-Dsvvy8_K.js} +1 -1
- package/dist/assets/{index-Dm676q-V.js → index-H1nowJu-.js} +1 -1
- package/dist/assets/{index-k6Jydhg7.js → index-Mg5Ud6gu.js} +1 -1
- package/dist/assets/{index-C21lcN-6.js → index-OGdXuzH7.js} +3 -3
- package/dist/assets/{index-Cp668Jsm.js → index-OdvXHPqT.js} +112 -112
- package/dist/assets/{index-DNBJ_q-W.js → index-R68RI5nS.js} +1 -1
- package/dist/assets/{index-DLs4lvkb.js → index-Y2ocg0We.js} +1 -1
- package/dist/assets/{index-BuNutR9F.js → index-g2Hjwa9j.js} +1 -1
- package/dist/assets/{index-CEcRkbK_.js → index-x8ZFxnS7.js} +1 -1
- package/dist/assets/{index.esm-BWXMXe80.js → index.esm-Dt7UO6Gw.js} +1 -1
- package/dist/assets/{install-from-url-CvXm7zrQ.js → install-from-url-DP36MlN0.js} +1 -1
- package/dist/assets/{invitation-Bbd0EUPN.js → invitation-Iv5T__li.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-9dPZdPqq.js → is-path-prefix-equal-DVbPRsdH.js} +1 -1
- package/dist/assets/{item-Czk-LxVv.js → item-D5nrOHxx.js} +1 -1
- package/dist/assets/{javascript-Df4-_tCH.js → javascript-DwMwjVUG.js} +1 -1
- package/dist/assets/{jsonMode-lPvmVuEc.js → jsonMode-Dw4fMRhD.js} +1 -1
- package/dist/assets/{liquid-iErrkmsS.js → liquid-9EaYCIu3.js} +1 -1
- package/dist/assets/{list-header-D9Jtipco.js → list-header-DofW2Ftc.js} +1 -1
- package/dist/assets/{log-D_Iy4G-2.js → log-DaGgK84T.js} +1 -1
- package/dist/assets/{lottie-react.esm-CLF_w70g.js → lottie-react.esm-tNmLlP7P.js} +1 -1
- package/dist/assets/{mdx-CpiXAgeN.js → mdx-WQ_--1yL.js} +1 -1
- package/dist/assets/{memory-0tMnFTeS.js → memory-BPr31Oys.js} +1 -1
- package/dist/assets/{metric-Blz-YEnp.js → metric-D2ucAHiH.js} +1 -1
- package/dist/assets/omit-BPHBFoDu.js +1 -0
- package/dist/assets/{overview-DQoppCkb.js → overview-CCPEnAHB.js} +1 -1
- package/dist/assets/{permission-Dq4G1Nhn.js → permission-CUvNs2Zv.js} +1 -1
- package/dist/assets/{preference-5drfcglD.js → preference-BN0Jy77b.js} +3 -3
- package/dist/assets/{python-DXxIcyYN.js → python-C_uQOER7.js} +1 -1
- package/dist/assets/{raf-schd.esm-le4x5qzb.js → raf-schd.esm-DUMXV33K.js} +1 -1
- package/dist/assets/{razor-DEo7ceFX.js → razor-Bf6ygvvd.js} +1 -1
- package/dist/assets/{rotate-session-key-omld1AuK.js → rotate-session-key-BdVsr217.js} +1 -1
- package/dist/assets/{runtime-myPRlwBo.js → runtime-B54DBemf.js} +1 -1
- package/dist/assets/schema-C8eqaAts.js +1 -0
- package/dist/assets/sdk-B2QHgBcr.js +1 -0
- package/dist/assets/{service-M1mmil55.js → service-CcQaRfy1.js} +1 -1
- package/dist/assets/{shorten-label-Dwsld825.js → shorten-label-CPrM7klu.js} +1 -1
- package/dist/assets/{simple-select-C7PnNUpe.js → simple-select-Y6nLlyX-.js} +1 -1
- package/dist/assets/{spaces-Dz6osU8D.js → spaces-DfU2dhr-.js} +1 -1
- package/dist/assets/{status-Dk7whVRe.js → status-DjEtZNUr.js} +1 -1
- package/dist/assets/{status-DC_uFdhU.js → status-tQggAyS9.js} +1 -1
- package/dist/assets/{switch-control-Dg5zSUdo.js → switch-control-LS_NeTom.js} +1 -1
- package/dist/assets/{table-icons-jOs3s3dQ.js → table-icons-LUDdTh3T.js} +1 -1
- package/dist/assets/{team-D3LeaCxJ.js → team-Dyq5wP2P.js} +1 -1
- package/dist/assets/{toLower-D7KlZyXh.js → toLower-B8SBWvWe.js} +1 -1
- package/dist/assets/toUpper-z0GOUGgF.js +1 -0
- package/dist/assets/{traffic-Dh32_ebe.js → traffic-DgBk3o2N.js} +1 -1
- package/dist/assets/{tsMode-BXE5NTFR.js → tsMode-_qFiyVuf.js} +1 -1
- package/dist/assets/{typescript-Cyw-SWET.js → typescript-BClkULc3.js} +1 -1
- package/dist/assets/{url-evaluation-ZlHZwvb8.js → url-evaluation-DgbmtLnr.js} +1 -1
- package/dist/assets/{url-join-BaK21hdG.js → url-join-CTs-nsh5.js} +1 -1
- package/dist/assets/{use-mobile-fb1R4sTD.js → use-mobile-BeKGXAC7.js} +1 -1
- package/dist/assets/{use-mobile-DmPwZVyR.js → use-mobile-Yz2bScih.js} +1 -1
- package/dist/assets/{useAsync-mK5hkfXk.js → useAsync-DkpPqR2N.js} +1 -1
- package/dist/assets/{useAsyncRetry-Bz9aJRiB.js → useAsyncRetry-Xbq1Vu1J.js} +1 -1
- package/dist/assets/{useLocalStorage-D39oHiv_.js → useLocalStorage-BRX7xEeE.js} +1 -1
- package/dist/assets/{useThemeProps-CEesX7e5.js → useThemeProps-B8kKGfuj.js} +1 -1
- package/dist/assets/{util-B3o9CH5x.js → util-Cw9ZhkhZ.js} +1 -1
- package/dist/assets/{wait-container-Cq-OhUMI.js → wait-container-CESBMuDe.js} +1 -1
- package/dist/assets/{without-wallet-BK9y4GG-.js → without-wallet-DfzBh9gC.js} +1 -1
- package/dist/assets/{wrap-locale-BDWmzfGR.js → wrap-locale-Bz8sQEwG.js} +1 -1
- package/dist/assets/{xml-C7AOEa-o.js → xml-DgLvDwTZ.js} +1 -1
- package/dist/assets/{yaml-D87QX20d.js → yaml-CBYpsbMl.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-DTUdke6O.js +0 -1
- package/dist/assets/api-BDClPnhH.js +0 -1
- package/dist/assets/client-BeAJe0yS.js +0 -1
- package/dist/assets/cloneDeep-BPw0K7hq.js +0 -1
- package/dist/assets/emotion-cache.browser.esm-B-0g7s2E.js +0 -1
- package/dist/assets/engine-CjGipQ8H.js +0 -1
- package/dist/assets/getValidReactChildren-CS8vN0Dc.js +0 -1
- package/dist/assets/index-31DGwfk5.js +0 -602
- package/dist/assets/index-DWCHUGMU.js +0 -1
- package/dist/assets/omit-kqOgzbK4.js +0 -1
- package/dist/assets/schema-B6D_WZyG.js +0 -1
- package/dist/assets/sdk-BbOdEeFV.js +0 -1
- package/dist/assets/toUpper-j7Or1KIp.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
import{hz as Wf,hA as Hf,gt as Uf,ds as qf,hB as Vf,dt as Kf,bL as cc,bM as Yf,bJ as Jf,bK as Qf,bO as uc,dw as Ln,hC as Xf,eC as Zf,hm as eh,gS as th,gP as dc,hD as rh,gx as nh,fo as ih,eD as oh,h9 as ah,m as Ee,a3 as $e,y as qe,E as Ce,aP as or,r as I,j as v,c2 as Dt,J as lh,f9 as sh,eN as ch,hq as uh,dv as xr,ey as hr,dg as fc,dA as dh,hE as fh,dz as hc,bd as zn,dN as Xt,hF as B,eZ as K,eG as hh,hG as Ur,be as Z,o as S,dL as jn,aQ as To,hH as _o,cw as ii,aE as be,b8 as mt,N as ie,ag as ph,b as kt,cr as ve,b9 as Po,dB as Yt,T as Ie,a4 as Oe,b1 as Hi,dH as Zt,hI as gh,bn as pc,F as Fn,hJ as vh,hK as mh,t as Ht,fl as Ui,az as bh,dd as Ve,fb as gc,C as yh,bE as Sh,hL as ka,O as ko,f8 as xh,H as wr,Q as vc,f5 as mc,$ as wh,v as bc,f as Et,dK as Ch,bu as Ih,gB as yc,dI as Tr,a7 as Rh,a8 as Dh,hM as Oa,hN as Sc,hO as Th,hP as _h,fP as xc,fc as Ph,gF as kh,gD as Oh,gN as Eh,hQ as Nh,hR as Mh,ga as Bn,gI as Ah,hS as Cn,hT as wc,by as Ae,L as Cc,z as Oo,hU as Ea,hV as Ic,hW as qi,hX as Lh,hY as zh,s as ar,hZ as jh,f4 as Fh,cv as Rc,h_ as Bh,bB as Gh,h$ as $h,i0 as Wh,i1 as Hh,i2 as Uh,i3 as qh,i4 as Dc,i5 as Vh,aC as Tc,e$ as _c,i6 as Eo,i7 as Kh,hi as Pc,b_ as ot,i8 as Yh,b5 as Jh,cA as Ut,i9 as Qh,cP as Xh,ia as Zh,G as Na,dn as oi,eH as Ma,dM as ep,ib as tp,a5 as kc,Y as Aa,dG as Ze,ic as La,R as rp,S as za,U as ja}from"./index-Cp668Jsm.js";import{r as np}from"./omit-kqOgzbK4.js";import{r as ip}from"./cloneDeep-BPw0K7hq.js";import{r as op}from"./index-n4_kY89C.js";import{c as ap,u as lp}from"./_createAggregator-s6UGbWKk.js";import{u as Nt}from"./blocklet-Clk0KDdY.js";import{H as sp,G as cp,M as up,N as dp,O as Fa,K as fp,L as hp}from"./index-B58pv6JK.js";import{_ as ye,a as Se,b as Fe,c as Be,d as Ge,e as pp,f as Oc,u as ue,g as ne,r as Ar,w as In,h as Ec,i as Mt,j as Nc,k as gp,l as vp,o as Vi}from"./raf-schd.esm-le4x5qzb.js";import{_ as M,b as Ba,c as mp,a as bp,d as yp}from"./redux-DfszZyTl.js";import{_ as Sp}from"./typeof-QjJsDpFa.js";import{u as Mc,b as xp}from"./team-D3LeaCxJ.js";import{b as wp}from"./actions-DaFcSF4Q.js";import{u as Cp,a as Ip,C as rt}from"./index.esm-BWXMXe80.js";import{S as Ki}from"./simple-select-C7PnNUpe.js";import{b as Rp,a as Ga}from"./html-title-HtPlSvGf.js";import{C as Ac}from"./Clear-CY2XI9UL.js";import{A as Dp}from"./ArrowDropDown-DTUdke6O.js";import{a as Tp}from"./api-BDClPnhH.js";import{A as _p}from"./Autocomplete-B6hdnAbf.js";import{L as Pp}from"./ListItemButton-BOWa6EsK.js";import{u as Lc}from"./use-mobile-fb1R4sTD.js";import{e as kp}from"./client-BeAJe0yS.js";import{I as Op}from"./iframe-CiaMOw3l.js";import{B as ai}from"./ButtonGroup-BxZjrpDd.js";import{L as $a}from"./LoadingButton-ClNP4uj0.js";import"./depsEqual-msOq5b5x.js";import"./url-evaluation-ZlHZwvb8.js";import"./useLocalStorage-D39oHiv_.js";import"./MoreVert-Dnv5meLi.js";import"./get-safe-url-0GDhhKMb.js";import"./permission-Dq4G1Nhn.js";import"./ListSubheader-59vUoVIT.js";import"./getValidReactChildren-CS8vN0Dc.js";var Ep=Wf(function(){return Hf?sessionStorage:void 0});function Np(e,r){return Uf(r,function(n){return e[n]})}function Mp(e){return e==null?[]:Np(e,qf(e))}var Ap=Vf.isFinite;function Wa(e){return typeof e=="number"&&Ap(e)}function Lp(e){return typeof e=="number"&&e==Kf(e)}var zp=ap(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const jp=Object.freeze(Object.defineProperty({__proto__:null,default:zp},Symbol.toStringTag,{value:"Module"}));var Fp=cc(function(e){var r=Yf(e);return r=typeof r=="function"?r:void 0,Jf(Qf(e,1,uc,!0),void 0,r)});const Bp=Object.freeze(Object.defineProperty({__proto__:null,default:Fp},Symbol.toStringTag,{value:"Module"}));var zc=cc(function(e,r){return uc(e)?wp(e,r):[]}),pr={};const Gp=Ln(Bp),$p=Ln(Xf),Wp=Ln(jp);var Ha;function Hp(){return Ha||(Ha=1,function(e){var r=pr&&pr.__importDefault||function(F){return F&&F.__esModule?F:{default:F}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=re,e.deepWalk=P,e.isMatchSection=x,e.nestNavigationList=Q,e.filterNavigation=te,e.cleanOrphanNavigation=X,e.joinLink=E,e.flattenNavigation=j,e.splitNavigationBySection=V;const n=Zf(),t=r(Gp),i=r(eh),o=r(th),a=r($p),l=r(np),s=r(ip),c=ah(),u=r(op()),f=r(dc()),d=r(rh),h=r(nh),p=r(Wp),g=ih(),m=oh();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return m.checkLink}});const y="header",b="/",w="/",D="/";function P(F,H=()=>{},{key:k="children",order:O="first"}={}){function A($,{index:J=0,parent:oe=null,level:fe=0}={}){Array.isArray($)?$.forEach((de,me)=>{A(de,{index:me,parent:oe,level:fe+1})}):$&&(O==="first"&&H($,oe,{index:J,level:fe}),A($[k],{parent:$,level:fe}),O==="last"&&H($,oe,{index:J,level:fe}))}A(F)}function x(F,H){return H===y&&(0,a.default)(F)?!0:Array.isArray(F)?F.includes(H):F===H}function T(F){try{return JSON.parse(F)}catch{return F}}function C(F){return F.map(H=>{const k={...H};return k.role&&(k.role=T(k.role)),k.section&&(k.section=T(k.section)),k.title&&(k.title=T(k.title)),k.description&&(k.description=T(k.description)),k.link&&(k.link=T(k.link)),k})}function _(F="/",H=""){if((0,f.default)(H||""))return H;const k=u.default.join(F,H||w);return k.length>1&&k.endsWith("/")?k.slice(0,k.length-1):k}function R(F,H,{strict:k=!0}={}){let O=F,A=H;return k||(O=O||"/",A=A||"/"),(0,d.default)(O)&&(0,h.default)(A)&&(0,m.checkLink)(A)?Object.keys(O).reduce(($,J)=>($[J]=_(O[J],A),$),{}):(0,h.default)(O)&&(0,m.checkLink)(O)&&(0,d.default)(A)?Object.keys(A).reduce(($,J)=>($[J]=_(O,A[J]),$),{}):(0,h.default)(O)&&(0,h.default)(A)?(0,m.checkLink)(O)||(0,m.checkLink)(A)?_(O,A):A:(0,d.default)(O)&&(0,d.default)(A)?[...new Set([...Object.keys(O),...Object.keys(A)])].reduce((J,oe)=>(J[oe]=_(O[oe],A[oe]),J),{}):A}function E(F,H){const k=(0,s.default)(F);return P(k,(O,A)=>{const $=O.component||O.child;if($){const J=H.find(oe=>oe.name===$);J&&(O.link=R(J.link,O.link,{strict:!1}))}else A&&(O.link=R(A.link,O.link))},{key:"items"}),k}function j(F=[],{depth:H=1,transform:k=O=>O}={}){const O=(0,s.default)(F),A=[];return P(O,($,J,{level:oe})=>{if(oe>=H){const{items:fe=[]}=$;if(fe&&Array.isArray(fe)&&fe.length>0){delete $.items;const de=fe.map(me=>k(me,$));if(J)J.items.push(...de);else{const me=k((0,l.default)($,["items"]),J);A.push(me,...de)}}else if(oe===1){const de=k((0,l.default)($,["items"]),J);A.push(de)}}else oe===1&&A.push($)},{key:"items",order:"last"}),A}function N(F){if(F.section!=="bottomNavigation")return F;const H={...F};return n.NAVIGATION_I18N_FIELDS.forEach(k=>{const O=H[k];typeof O=="string"&&(H[k]={en:O})}),H}function U(F={}){const H=[];function k(A,$={}){const J=[],{children:oe=[],meta:fe={}}=A,de=(0,s.default)(fe?.navigation||[]);(0,g.hasStartEngine)(fe)&&A.meta?.capabilities?.navigation!==!1&&J.push(...de);const me=$.name||"",ge=$.mountPoint||b,De=A===F?"":fe.name||"",ce=A===F?"":A.mountPoint||b;for(const ae of oe){if(!(0,g.hasStartEngine)(ae.meta))continue;const ke=ae.meta.name,fr=ae.mountPoint,ti=[me,De,ke].filter(Boolean).join("."),ri=ae.meta.navigation||[],ni=(0,c.joinURL)(ge,ce,fr);ae.meta?.capabilities?.navigation!==!1&&H.push({did:ae.meta.did,name:ti,link:ni,title:ae.meta.title||"",navigation:ri.map(Je=>({section:y,...Je}))});const Lt=de.find(Je=>Je.component?Je.component===ke:!1);if(Lt){if(!Lt.link)if(ae.meta.navigation&&ae.meta.navigation.length>0){const Je=k(ae,{mountPoint:ce,name:De});Je.length>0&&(Lt.items=Lt.items??[],Lt.items.push(...Je))}else Lt.link=w}else if(ae.meta?.capabilities?.navigation!==!1){const Je=k(ae,{mountPoint:ce,name:De}),tn={title:ae.meta.title,component:ke,id:ae.meta.did};Je.length>0?(tn.items=Je,tn.link=void 0):tn.link=w,J.push(tn)}}return J}return{navigationList:k(F),components:H}}function z(F){const H=(0,s.default)(F).filter(k=>k.id);return P(H,(k,O)=>{if(k.items&&k.items.length){for(let A=k.items.length-1;A>=0;A--)k.items[A].id||k.items.splice(A,1);k.items.length===0&&k.component&&(k.link=k.link||w)}O&&(k.parent=O.id,k.id=[O.id,k.id].join(D)),k.from=k.from||"yaml",k.visible=k.visible??!0},{key:"items"}),H}function G(F,H=2){const k=(0,s.default)(F),O=j(k,{depth:H,transform:(A,$)=>($&&(A._parent||(A._parent=$.id,$.component||(A.link=R($.link,A.link))),A.section=A.section||$.section||[y],A.visible=A.visible??$.visible,$.role&&(A.role=A.role||$.role)),A.component=[$.component,A.component].filter(Boolean).join("."),A)});return P(O,A=>{A.items&&A.items.length>0&&A.items.reduceRight(($,J)=>{if(J._parent){const oe=A.items.findIndex(fe=>fe.id===J._parent);oe>=0&&A.items.splice(oe,1),delete J._parent}return null},null)},{key:"items"}),O}function W(F,H){return H&&Array.isArray(F.items)?F.items.filter(k=>(0,a.default)(k.section)?x(F.section,H):!!x(k.section,H)).map(k=>({...k,section:H})):[]}function V(F){const H=(0,s.default)(F),k=[];for(const O of H){let J=function(oe,fe){const de=W(oe,fe);$.push({...A,section:fe,items:de})};const A=(0,s.default)((0,l.default)(O,["items"])),$=[];if(Array.isArray(O.section))for(const oe of O.section)J(O,oe);else if(O.section){const{section:oe}=O;J(O,oe)}else if(O.items&&O.items.length>0){const oe=O.items.reduce((de,me)=>{const{section:ge=[y]}=me||{};return de.push(...ge),de},[]),fe=[...new Set(oe)];for(const de of fe)J(O,de)}else $.push({...O,section:y});k.push(...$)}return k}function Q(F=[]){const H=(0,s.default)(F);return H.reduceRight((k,O,A)=>{if(O.parent){const $=H.find(J=>O.section&&J.section?J.section===O.section&&J.id===O.parent:J.id===O.parent);$&&($.items||($.items=[]),$.items=[O,...$.items]),H.splice(A,1)}return null},null),H}function te(F,H=[]){const k=Q(F);return P(k,A=>{if(A?.component&&(H.some($=>$.name===A.component)||(A.visible=!1)),A.items&&A.items.length)for(let $=A.items.length-1;$>=0;$--)A.items[$].visible===!1&&A.items.splice($,1)},{key:"items"}),k.filter(A=>!(A.visible===!1||A.items&&Array.isArray(A.items)&&A.items.length>0&&A.items?.every($=>$.visible===!1)))}function X(F){return F.map(H=>H.items&&Array.isArray(H.items)&&H.items.length===1&&["header","footer","",void 0,null].includes(H.section)?H.items[0]:H)}const ee=F=>{const[H,k]=(0,p.default)(F,O=>O.id==="/team");return[...H,...k]};e.sortRootNavigation=ee;const q=F=>{const[,H]=(0,p.default)(F,k=>{const O=typeof k.title=="string"?k.title:k.title?.en;return k.id==="/team"&&O==="Access"||k.id==="/dashboard"&&O==="Blocklet"});return H};e.cleanOldNavigationHistory=q;function re(F={},H={}){const{beforeProcess:k=ce=>ce}=H,{navigationList:O,components:A}=U(F),$=new Map;O.forEach(ce=>{ce.items?.forEach(ae=>{$.set((0,c.joinURL)(ce.id,ae.id),ae)})}),F?.settings?.navigations&&(Array.isArray(F.settings.navigations)?F.settings.navigations=[...F.settings.navigations].filter(ce=>!(ce?.parent==="/team"&&ce.from==="team-tmpl")).map(ce=>{if(ce.section==="userCenter"&&!Object.prototype.hasOwnProperty.call(ce,"private")){const ae=$.get(ce.id);ae&&Object.prototype.hasOwnProperty.call(ae,"private")&&(ce.private=ae.private)}return ce}):F.settings.navigations=[]);const J=C(q(F?.settings?.navigations||[])).map(N),oe=G(k(O)),fe=z(oe),me=V(fe).reduce((ce,ae)=>["bottom","social","sessionManager","userCenter"].includes(ae.section)&&ae.items&&ae.items.length>0?(ce.push(...ae.items.map(fr=>{const{section:ti}=ae,ri=R(ae.link,fr.link),ni=[ae.component,fr.component].filter(Boolean).join(".");return{...fr,section:ti,link:ri,component:ni,parent:""}})),ce):(ce.push(ae),ce),[]),ge=j(me,{transform(ce,ae){let{component:ke}=ce;return ae?.component&&(ke=[ae.component,ce.component].filter(Boolean).join(".")),N({...ce,component:ke})}});return{navigationList:(0,t.default)(J,ge,(ce,ae)=>{const ke=["id","section"];return(0,i.default)((0,o.default)(ce,ke),(0,o.default)(ae,ke))}),components:A,builtinList:ge}}}(pr)),pr}var Ne=Hp();const jc=I.createContext(null),Ua="/",Up="header",qa={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:`${Ce.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${Ce.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:`${Ce.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:qe(Ce.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]}]};function li(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const nt=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:qe(Ce.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),qp=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),Vp=(e,r)=>{const n=Ne.cleanOldNavigationHistory(r);return n.findIndex(i=>i.id==="/team")===-1&&n.unshift(qp("/team",e("navigation.blockletService"),[nt("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),nt("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),nt("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),nt("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),nt("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations"),nt("developer",e("navigation.developer"),"heroicons:command-line","/admin/developers"),nt("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),nt("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n};function Va({name:e}){return v.jsx(ch,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function Kp({children:e}){const{blocklet:r,actions:n}=Nt(),{t}=Ee(),{navigationList:i,components:o,builtinList:a}=Ne.parseNavigation(r,{beforeProcess(x){const T=$e(x);return["dashboard","userCenter"].forEach(C=>{Object.prototype.hasOwnProperty.call(qa,C)&&qa[C].forEach(_=>{T.some(R=>R.id===_.id)||T.push(_)})}),Vp(t,T)}}),l=or({rawNavigation:$e(i),activeSection:Up,components:o}),s=I.useMemo(()=>Ne.nestNavigationList($e(l.rawNavigation)),[l.rawNavigation]),c=I.useMemo(()=>{const x=Ne.filterNavigation($e(l.rawNavigation),o);return Ne.joinLink(x,o)},[o,l.rawNavigation]),u=I.useCallback(x=>{if(!x.id)return"";const T=Ne.flattenNavigation(Ne.joinLink(s,o)),C=T.find(_=>_.id===x.id);if(C?.component){if(!o.some(_=>_.name===C.component))return v.jsx(Va,{name:C.component})}else if(C.parent){const _=T.find(R=>R.id===C.parent);if(_?.component&&!o.some(R=>R.name===_.component))return v.jsx(Va,{name:_.component})}return C?.link},[s,o]),f=I.useCallback(x=>{l.activeSection=x},[l]),d=I.useCallback(x=>{const T=[];Ne.deepWalk(x,(_,R)=>{const E={...Dt(_,["children","expand"]),parent:R?.id};T.push(E)});const C=$e(l.rawNavigation).filter(_=>{if(!l.activeSection)return!1;const R=T.find(E=>li(E,_));return R?!Ne.isMatchSection(R.section,l.activeSection):!0});l.rawNavigation=[...C,...T]},[l]),h=I.useCallback((x=[])=>{const T=$e(l.rawNavigation).map(C=>{const _=x.find(R=>li({...R,section:l.activeSection},C));return _?{...C,..._}:C});l.rawNavigation=T},[l]),p=I.useCallback((x,T=Ua)=>x.map(_=>{const E=o.find(U=>U.name===_.component)?.link||T,j=_.items||[],{link:N}=_;return{title:_.title,description:_.description,subtitle:u(_),link:N,icon:_.icon,children:p(j,N||Ua),section:_.section,visible:_.visible,parent:_.parent,component:_.component,id:_.id,role:_.role,from:_.from,__base:E}}),[o,u]),g=I.useCallback(x=>{h([x])},[h]),m=I.useCallback(x=>{const T=l.rawNavigation.filter(C=>C.id===x||C.parent===x).map(C=>C.id);l.rawNavigation=$e(l.rawNavigation).filter(C=>!T.includes(C.id))},[l]),y=I.useCallback((x={},T=-1)=>{const C={...x,id:lh.nanoid(),section:l.activeSection,visible:!0},_=[...l.rawNavigation],R=_.filter(E=>E.section===l.activeSection);if(T<0||T>R.length-1)_.push(C);else{const E=R[T],j=_.findIndex(N=>li(N,E));_.splice(j,0,C)}return l.rawNavigation=_,C},[l]),b=I.useCallback(x=>{const C=$e(s).filter(_=>Ne.isMatchSection(_.section,x));return p(C)},[s,p]),w=I.useCallback(async x=>{const C=x.map(_=>sh(_,uh)).map(_=>{const R={..._};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(C)},[n]),D=I.useCallback(async()=>{await w([]),l.rawNavigation=$e(a)},[w,l,a]),P=I.useMemo(()=>({state:l,navigation:c,components:o,getNavigationFullLink:u,updateActiveSection:f,updateNavigationItem:g,delNavigationItem:m,addNavigationItem:y,updateNavigationTree:d,getNavigation:b,saveNavigationList:w,resetNavigation:D}),[l,c,o,u,f,g,m,y,d,b,w,D]);return v.jsx(jc.Provider,{value:P,children:e})}function Fc(){const e=I.useContext(jc);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Ke={},si,Ka;function Yp(){if(Ka)return si;Ka=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,l=parseInt,s=typeof xr=="object"&&xr&&xr.Object===Object&&xr,c=typeof self=="object"&&self&&self.Object===Object&&self,u=s||c||Function("return this")(),f=Object.prototype,d=f.toString,h=Math.max,p=Math.min,g=function(){return u.Date.now()};function m(x,T,C){var _,R,E,j,N,U,z=0,G=!1,W=!1,V=!0;if(typeof x!="function")throw new TypeError(e);T=P(T)||0,b(C)&&(G=!!C.leading,W="maxWait"in C,E=W?h(P(C.maxWait)||0,T):E,V="trailing"in C?!!C.trailing:V);function Q(O){var A=_,$=R;return _=R=void 0,z=O,j=x.apply($,A),j}function te(O){return z=O,N=setTimeout(q,T),G?Q(O):j}function X(O){var A=O-U,$=O-z,J=T-A;return W?p(J,E-$):J}function ee(O){var A=O-U,$=O-z;return U===void 0||A>=T||A<0||W&&$>=E}function q(){var O=g();if(ee(O))return re(O);N=setTimeout(q,X(O))}function re(O){return N=void 0,V&&_?Q(O):(_=R=void 0,j)}function F(){N!==void 0&&clearTimeout(N),z=0,_=U=R=N=void 0}function H(){return N===void 0?j:re(g())}function k(){var O=g(),A=ee(O);if(_=arguments,R=this,U=O,A){if(N===void 0)return te(U);if(W)return N=setTimeout(q,T),Q(U)}return N===void 0&&(N=setTimeout(q,T)),j}return k.cancel=F,k.flush=H,k}function y(x,T,C){var _=!0,R=!0;if(typeof x!="function")throw new TypeError(e);return b(C)&&(_="leading"in C?!!C.leading:_,R="trailing"in C?!!C.trailing:R),m(x,T,{leading:_,maxWait:T,trailing:R})}function b(x){var T=typeof x;return!!x&&(T=="object"||T=="function")}function w(x){return!!x&&typeof x=="object"}function D(x){return typeof x=="symbol"||w(x)&&d.call(x)==n}function P(x){if(typeof x=="number")return x;if(D(x))return r;if(b(x)){var T=typeof x.valueOf=="function"?x.valueOf():x;x=b(T)?T+"":T}if(typeof x!="string")return x===0?x:+x;x=x.replace(t,"");var C=o.test(x);return C||a.test(x)?l(x.slice(2),C?2:8):i.test(x)?r:+x}return si=y,si}var gr={exports:{}},xt={exports:{}},Jp=xt.exports,Ya;function Qp(){return Ya||(Ya=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?xt.exports=function(){return performance.now()}:typeof hr<"u"&&hr!==null&&hr.hrtime?(xt.exports=function(){return(e()-i)/1e6},r=hr.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=hr.uptime()*1e9,i=t-o):Date.now?(xt.exports=function(){return Date.now()-n},n=Date.now()):(xt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(Jp)),xt.exports}var Ja;function Xp(){if(Ja)return gr.exports;Ja=1;for(var e=Qp(),r=typeof window>"u"?xr: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 l=0,s=0,c=[],u=1e3/60;i=function(f){if(c.length===0){var d=e(),h=Math.max(0,u-(d-l));l=h+d,setTimeout(function(){var p=c.slice(0);c.length=0;for(var g=0;g<p.length;g++)if(!p[g].cancelled)try{p[g].callback(l)}catch(m){setTimeout(function(){throw m},0)}},Math.round(h))}return c.push({handle:++s,callback:f,cancelled:!1}),s},o=function(f){for(var d=0;d<c.length;d++)c[d].handle===f&&(c[d].cancelled=!0)}}return gr.exports=function(f){return i.call(r,f)},gr.exports.cancel=function(){o.apply(r,arguments)},gr.exports.polyfill=function(f){f||(f=r),f.requestAnimationFrame=i,f.cancelAnimationFrame=o},gr.exports}var rn={},Qa;function Zp(){if(Qa)return rn;Qa=1,Object.defineProperty(rn,"__esModule",{value:!0}),rn.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return rn}var zt={},Xa;function eg(){if(Xa)return zt;Xa=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.noop=e,zt.intBetween=r,zt.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 zt}var Za;function tg(){if(Za)return Ke;Za=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.createHorizontalStrength=_,Ke.createVerticalStrength=R,Ke.createScrollingComponent=N,Ke.default=U,Ke.defaultVerticalStrength=Ke.defaultHorizontalStrength=void 0;var e=u(fc()),r=c(hc()),n=dh(),t=c(Yp()),i=c(Xp()),o=c(Zp()),a=sp,l=c(fh()),s=eg();function c(z){return z&&z.__esModule?z:{default:z}}function u(z){if(z&&z.__esModule)return z;var G={};if(z!=null){for(var W in z)if(Object.prototype.hasOwnProperty.call(z,W)){var V=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(z,W):{};V.get||V.set?Object.defineProperty(G,W,V):G[W]=z[W]}}return G.default=z,G}function f(z){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(W){return typeof W}:f=function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},f(z)}function d(){return d=Object.assign||function(z){for(var G=1;G<arguments.length;G++){var W=arguments[G];for(var V in W)Object.prototype.hasOwnProperty.call(W,V)&&(z[V]=W[V])}return z},d.apply(this,arguments)}function h(z,G){if(z==null)return{};var W=p(z,G),V,Q;if(Object.getOwnPropertySymbols){var te=Object.getOwnPropertySymbols(z);for(Q=0;Q<te.length;Q++)V=te[Q],!(G.indexOf(V)>=0)&&Object.prototype.propertyIsEnumerable.call(z,V)&&(W[V]=z[V])}return W}function p(z,G){if(z==null)return{};var W={},V=Object.keys(z),Q,te;for(te=0;te<V.length;te++)Q=V[te],!(G.indexOf(Q)>=0)&&(W[Q]=z[Q]);return W}function g(z,G){if(!(z instanceof G))throw new TypeError("Cannot call a class as a function")}function m(z,G){for(var W=0;W<G.length;W++){var V=G[W];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(z,V.key,V)}}function y(z,G,W){return G&&m(z.prototype,G),z}function b(z,G){return G&&(f(G)==="object"||typeof G=="function")?G:x(z)}function w(z){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(W){return W.__proto__||Object.getPrototypeOf(W)},w(z)}function D(z,G){if(typeof G!="function"&&G!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(G&&G.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),G&&P(z,G)}function P(z,G){return P=Object.setPrototypeOf||function(V,Q){return V.__proto__=Q,V},P(z,G)}function x(z){if(z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z}function T(z,G,W){return G in z?Object.defineProperty(z,G,{value:W,enumerable:!0,configurable:!0,writable:!0}):z[G]=W,z}var C=150;function _(z){return function(W,V){var Q=W.x,te=W.w,X=W.y,ee=W.h,q=Math.min(te/2,z),re=V.x>=Q&&V.x<=Q+te,F=re&&V.y>=X&&V.y<=X+ee;if(F){if(V.x<Q+q)return(V.x-Q-q)/q;if(V.x>Q+te-q)return-(Q+te-V.x-q)/q}return 0}}function R(z){return function(W,V){var Q=W.y,te=W.h,X=W.x,ee=W.w,q=Math.min(te/2,z),re=V.y>=Q&&V.y<=Q+te,F=re&&V.x>=X&&V.x<=X+ee;if(F){if(V.y<Q+q)return(V.y-Q-q)/q;if(V.y>Q+te-q)return-(Q+te-V.y-q)/q}return 0}}var E=_(C);Ke.defaultHorizontalStrength=E;var j=R(C);Ke.defaultVerticalStrength=j;function N(z){var G=function(W){D(V,W);function V(Q,te){var X;return g(this,V),X=b(this,w(V).call(this,Q,te)),T(x(x(X)),"updateScrolling",(0,t.default)(function(ee){var q=X.container.getBoundingClientRect(),re=q.left,F=q.top,H=q.width,k=q.height,O={x:re,y:F,w:H,h:k},A=(0,s.getCoords)(ee),$=X.props,J=$.horizontalStrength,oe=$.verticalStrength;X.scaleX=J(O,A),X.scaleY=oe(O,A),!X.frame&&(X.scaleX||X.scaleY)&&X.startScrolling()},100,{trailing:!1})),T(x(x(X)),"handleEvent",function(ee){X.dragging&&!X.attached&&(X.attach(),X.updateScrolling(ee))}),X.wrappedInstance=e.default.createRef(),X.scaleX=0,X.scaleY=0,X.frame=null,X.attached=!1,X.dragging=!1,X}return y(V,[{key:"componentDidMount",value:function(){var te=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 te.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 te=this.props.dragDropManager,X=te.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 te=this,X=0,ee=function q(){var re=te.scaleX,F=te.scaleY,H=te.container,k=te.props,O=k.strengthMultiplier,A=k.onScrollChange;if(O===0||re+F===0){te.stopScrolling();return}if(X+=1,X%2){var $=H.scrollLeft,J=H.scrollTop,oe=H.scrollWidth,fe=H.scrollHeight,de=H.clientWidth,me=H.clientHeight,ge=re?H.scrollLeft=(0,s.intBetween)(0,oe-de,$+re*O):$,De=F?H.scrollTop=(0,s.intBetween)(0,fe-me,J+F*O):J;A(ge,De)}te.frame=(0,i.default)(q)};ee()}},{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 te=this.props;te.strengthMultiplier,te.verticalStrength,te.horizontalStrength,te.onScrollChange;var X=h(te,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(z,d({ref:this.wrappedInstance},X))}}]),V}(e.Component);return T(G,"displayName","Scrolling(".concat((0,o.default)(z),")")),T(G,"propTypes",{dragDropManager:r.default.object.isRequired,onScrollChange:r.default.func,verticalStrength:r.default.func,horizontalStrength:r.default.func,strengthMultiplier:r.default.number}),T(G,"defaultProps",{onScrollChange:s.noop,verticalStrength:j,horizontalStrength:E,strengthMultiplier:30}),(0,l.default)(G,z)}function U(z){var G=N(z);return function(W){return e.default.createElement(a.DragDropContextConsumer,null,function(V){var Q=V.dragDropManager;return Q===void 0?null:e.default.createElement(G,d({},W,{dragDropManager:Q}))})}}return Ke}var vn=tg();const rg=zn(vn);var ng=cp();const el=zn(ng);function Bc(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function Gc(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function $c(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}}Bc.__suppressDeprecationWarning=!0;Gc.__suppressDeprecationWarning=!0;$c.__suppressDeprecationWarning=!0;function qr(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-D9XGO23S.js","./index-OdvXHPqT.js","./index-DGkT7afN.css","./url-join-CTs-nsh5.js","./index-BWyeLBJr.js","./_createAggregator-DTDqEyEr.js","./depsEqual-BxsaWGVI.js","./index-DpRx2tZw.js","./index-DRYJ0xIl.js","./toUpper-z0GOUGgF.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{hz as Wf,hA as Hf,gt as Uf,ds as qf,hB as Vf,dt as Kf,bL as cc,bM as Yf,bJ as Jf,bK as Qf,bO as uc,dw as Ln,hC as Xf,eC as Zf,hm as eh,gS as th,gP as dc,hD as rh,gx as nh,fo as ih,eD as oh,h9 as ah,m as Ee,a3 as $e,y as qe,E as Ce,aP as or,r as I,j as v,c2 as Dt,J as lh,f9 as sh,eN as ch,hq as uh,dv as xr,ey as hr,dg as fc,dA as dh,hE as fh,dz as hc,bd as zn,dN as Xt,hF as B,eZ as K,eG as hh,hG as Ur,be as Z,o as S,dL as jn,aQ as To,hH as _o,cw as ii,aE as be,b8 as mt,N as ie,ag as ph,b as kt,cr as ve,b9 as Po,dB as Yt,T as Ie,a4 as Oe,b1 as Hi,dH as Zt,hI as gh,bn as pc,F as Fn,hJ as vh,hK as mh,t as Ht,fl as Ui,az as bh,dd as Ve,fb as gc,C as yh,bE as Sh,hL as ka,O as ko,f8 as xh,H as wr,Q as vc,f5 as mc,$ as wh,v as bc,f as Et,dK as Ch,bu as Ih,gB as yc,dI as Tr,a7 as Rh,a8 as Dh,hM as Oa,hN as Sc,hO as Th,hP as _h,fP as xc,fc as Ph,gF as kh,gD as Oh,gN as Eh,hQ as Nh,hR as Mh,ga as Bn,gI as Ah,hS as Cn,hT as wc,by as Ae,L as Cc,z as Oo,hU as Ea,hV as Ic,hW as qi,hX as Lh,hY as zh,s as ar,hZ as jh,f4 as Fh,cv as Rc,h_ as Bh,bB as Gh,h$ as $h,i0 as Wh,i1 as Hh,i2 as Uh,i3 as qh,i4 as Dc,i5 as Vh,aC as Tc,e$ as _c,i6 as Eo,i7 as Kh,hi as Pc,b_ as ot,i8 as Yh,b5 as Jh,cA as Ut,i9 as Qh,cP as Xh,ia as Zh,G as Na,dn as oi,eH as Ma,dM as ep,ib as tp,a5 as kc,Y as Aa,dG as Ze,ic as La,R as rp,S as za,U as ja}from"./index-OdvXHPqT.js";import{r as np}from"./omit-BPHBFoDu.js";import{r as ip}from"./cloneDeep-DrWSOVhF.js";import{r as op}from"./index-BWyeLBJr.js";import{c as ap,u as lp}from"./_createAggregator-DTDqEyEr.js";import{u as Nt}from"./blocklet-BwXw89V1.js";import{H as sp,G as cp,M as up,N as dp,O as Fa,K as fp,L as hp}from"./index-2hrGtHmX.js";import{_ as ye,a as Se,b as Fe,c as Be,d as Ge,e as pp,f as Oc,u as ue,g as ne,r as Ar,w as In,h as Ec,i as Mt,j as Nc,k as gp,l as vp,o as Vi}from"./raf-schd.esm-DUMXV33K.js";import{_ as M,b as Ba,c as mp,a as bp,d as yp}from"./redux-DfszZyTl.js";import{_ as Sp}from"./typeof-QjJsDpFa.js";import{u as Mc,b as xp}from"./team-Dyq5wP2P.js";import{b as wp}from"./actions-BfeIbo_G.js";import{u as Cp,a as Ip,C as rt}from"./index.esm-Dt7UO6Gw.js";import{S as Ki}from"./simple-select-Y6nLlyX-.js";import{b as Rp,a as Ga}from"./html-title-F0NEfYXw.js";import{C as Ac}from"./Clear-D0eiF7LM.js";import{A as Dp}from"./ArrowDropDown-CPMzkOwU.js";import{a as Tp}from"./api-DHdVnqwS.js";import{A as _p}from"./Autocomplete-BnpjHbVI.js";import{L as Pp}from"./ListItemButton-wejxtEoj.js";import{u as Lc}from"./use-mobile-BeKGXAC7.js";import{e as kp}from"./client-CSeQ4CUw.js";import{I as Op}from"./iframe-B5DJ8-Ji.js";import{B as ai}from"./ButtonGroup-B8CEk0Fm.js";import{L as $a}from"./LoadingButton-Zo_5FEH-.js";import"./depsEqual-BxsaWGVI.js";import"./url-evaluation-DgbmtLnr.js";import"./useLocalStorage-BRX7xEeE.js";import"./MoreVert-Bg7SRP_I.js";import"./get-safe-url-DG3hbVuw.js";import"./permission-CUvNs2Zv.js";import"./ListSubheader-B_qXJClL.js";import"./getValidReactChildren-UBZRExQI.js";var Ep=Wf(function(){return Hf?sessionStorage:void 0});function Np(e,r){return Uf(r,function(n){return e[n]})}function Mp(e){return e==null?[]:Np(e,qf(e))}var Ap=Vf.isFinite;function Wa(e){return typeof e=="number"&&Ap(e)}function Lp(e){return typeof e=="number"&&e==Kf(e)}var zp=ap(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const jp=Object.freeze(Object.defineProperty({__proto__:null,default:zp},Symbol.toStringTag,{value:"Module"}));var Fp=cc(function(e){var r=Yf(e);return r=typeof r=="function"?r:void 0,Jf(Qf(e,1,uc,!0),void 0,r)});const Bp=Object.freeze(Object.defineProperty({__proto__:null,default:Fp},Symbol.toStringTag,{value:"Module"}));var zc=cc(function(e,r){return uc(e)?wp(e,r):[]}),pr={};const Gp=Ln(Bp),$p=Ln(Xf),Wp=Ln(jp);var Ha;function Hp(){return Ha||(Ha=1,function(e){var r=pr&&pr.__importDefault||function(F){return F&&F.__esModule?F:{default:F}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=re,e.deepWalk=P,e.isMatchSection=x,e.nestNavigationList=Q,e.filterNavigation=te,e.cleanOrphanNavigation=X,e.joinLink=E,e.flattenNavigation=j,e.splitNavigationBySection=V;const n=Zf(),t=r(Gp),i=r(eh),o=r(th),a=r($p),l=r(np),s=r(ip),c=ah(),u=r(op()),f=r(dc()),d=r(rh),h=r(nh),p=r(Wp),g=ih(),m=oh();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return m.checkLink}});const y="header",b="/",w="/",D="/";function P(F,H=()=>{},{key:k="children",order:O="first"}={}){function A($,{index:J=0,parent:oe=null,level:fe=0}={}){Array.isArray($)?$.forEach((de,me)=>{A(de,{index:me,parent:oe,level:fe+1})}):$&&(O==="first"&&H($,oe,{index:J,level:fe}),A($[k],{parent:$,level:fe}),O==="last"&&H($,oe,{index:J,level:fe}))}A(F)}function x(F,H){return H===y&&(0,a.default)(F)?!0:Array.isArray(F)?F.includes(H):F===H}function T(F){try{return JSON.parse(F)}catch{return F}}function C(F){return F.map(H=>{const k={...H};return k.role&&(k.role=T(k.role)),k.section&&(k.section=T(k.section)),k.title&&(k.title=T(k.title)),k.description&&(k.description=T(k.description)),k.link&&(k.link=T(k.link)),k})}function _(F="/",H=""){if((0,f.default)(H||""))return H;const k=u.default.join(F,H||w);return k.length>1&&k.endsWith("/")?k.slice(0,k.length-1):k}function R(F,H,{strict:k=!0}={}){let O=F,A=H;return k||(O=O||"/",A=A||"/"),(0,d.default)(O)&&(0,h.default)(A)&&(0,m.checkLink)(A)?Object.keys(O).reduce(($,J)=>($[J]=_(O[J],A),$),{}):(0,h.default)(O)&&(0,m.checkLink)(O)&&(0,d.default)(A)?Object.keys(A).reduce(($,J)=>($[J]=_(O,A[J]),$),{}):(0,h.default)(O)&&(0,h.default)(A)?(0,m.checkLink)(O)||(0,m.checkLink)(A)?_(O,A):A:(0,d.default)(O)&&(0,d.default)(A)?[...new Set([...Object.keys(O),...Object.keys(A)])].reduce((J,oe)=>(J[oe]=_(O[oe],A[oe]),J),{}):A}function E(F,H){const k=(0,s.default)(F);return P(k,(O,A)=>{const $=O.component||O.child;if($){const J=H.find(oe=>oe.name===$);J&&(O.link=R(J.link,O.link,{strict:!1}))}else A&&(O.link=R(A.link,O.link))},{key:"items"}),k}function j(F=[],{depth:H=1,transform:k=O=>O}={}){const O=(0,s.default)(F),A=[];return P(O,($,J,{level:oe})=>{if(oe>=H){const{items:fe=[]}=$;if(fe&&Array.isArray(fe)&&fe.length>0){delete $.items;const de=fe.map(me=>k(me,$));if(J)J.items.push(...de);else{const me=k((0,l.default)($,["items"]),J);A.push(me,...de)}}else if(oe===1){const de=k((0,l.default)($,["items"]),J);A.push(de)}}else oe===1&&A.push($)},{key:"items",order:"last"}),A}function N(F){if(F.section!=="bottomNavigation")return F;const H={...F};return n.NAVIGATION_I18N_FIELDS.forEach(k=>{const O=H[k];typeof O=="string"&&(H[k]={en:O})}),H}function U(F={}){const H=[];function k(A,$={}){const J=[],{children:oe=[],meta:fe={}}=A,de=(0,s.default)(fe?.navigation||[]);(0,g.hasStartEngine)(fe)&&A.meta?.capabilities?.navigation!==!1&&J.push(...de);const me=$.name||"",ge=$.mountPoint||b,De=A===F?"":fe.name||"",ce=A===F?"":A.mountPoint||b;for(const ae of oe){if(!(0,g.hasStartEngine)(ae.meta))continue;const ke=ae.meta.name,fr=ae.mountPoint,ti=[me,De,ke].filter(Boolean).join("."),ri=ae.meta.navigation||[],ni=(0,c.joinURL)(ge,ce,fr);ae.meta?.capabilities?.navigation!==!1&&H.push({did:ae.meta.did,name:ti,link:ni,title:ae.meta.title||"",navigation:ri.map(Je=>({section:y,...Je}))});const Lt=de.find(Je=>Je.component?Je.component===ke:!1);if(Lt){if(!Lt.link)if(ae.meta.navigation&&ae.meta.navigation.length>0){const Je=k(ae,{mountPoint:ce,name:De});Je.length>0&&(Lt.items=Lt.items??[],Lt.items.push(...Je))}else Lt.link=w}else if(ae.meta?.capabilities?.navigation!==!1){const Je=k(ae,{mountPoint:ce,name:De}),tn={title:ae.meta.title,component:ke,id:ae.meta.did};Je.length>0?(tn.items=Je,tn.link=void 0):tn.link=w,J.push(tn)}}return J}return{navigationList:k(F),components:H}}function z(F){const H=(0,s.default)(F).filter(k=>k.id);return P(H,(k,O)=>{if(k.items&&k.items.length){for(let A=k.items.length-1;A>=0;A--)k.items[A].id||k.items.splice(A,1);k.items.length===0&&k.component&&(k.link=k.link||w)}O&&(k.parent=O.id,k.id=[O.id,k.id].join(D)),k.from=k.from||"yaml",k.visible=k.visible??!0},{key:"items"}),H}function G(F,H=2){const k=(0,s.default)(F),O=j(k,{depth:H,transform:(A,$)=>($&&(A._parent||(A._parent=$.id,$.component||(A.link=R($.link,A.link))),A.section=A.section||$.section||[y],A.visible=A.visible??$.visible,$.role&&(A.role=A.role||$.role)),A.component=[$.component,A.component].filter(Boolean).join("."),A)});return P(O,A=>{A.items&&A.items.length>0&&A.items.reduceRight(($,J)=>{if(J._parent){const oe=A.items.findIndex(fe=>fe.id===J._parent);oe>=0&&A.items.splice(oe,1),delete J._parent}return null},null)},{key:"items"}),O}function W(F,H){return H&&Array.isArray(F.items)?F.items.filter(k=>(0,a.default)(k.section)?x(F.section,H):!!x(k.section,H)).map(k=>({...k,section:H})):[]}function V(F){const H=(0,s.default)(F),k=[];for(const O of H){let J=function(oe,fe){const de=W(oe,fe);$.push({...A,section:fe,items:de})};const A=(0,s.default)((0,l.default)(O,["items"])),$=[];if(Array.isArray(O.section))for(const oe of O.section)J(O,oe);else if(O.section){const{section:oe}=O;J(O,oe)}else if(O.items&&O.items.length>0){const oe=O.items.reduce((de,me)=>{const{section:ge=[y]}=me||{};return de.push(...ge),de},[]),fe=[...new Set(oe)];for(const de of fe)J(O,de)}else $.push({...O,section:y});k.push(...$)}return k}function Q(F=[]){const H=(0,s.default)(F);return H.reduceRight((k,O,A)=>{if(O.parent){const $=H.find(J=>O.section&&J.section?J.section===O.section&&J.id===O.parent:J.id===O.parent);$&&($.items||($.items=[]),$.items=[O,...$.items]),H.splice(A,1)}return null},null),H}function te(F,H=[]){const k=Q(F);return P(k,A=>{if(A?.component&&(H.some($=>$.name===A.component)||(A.visible=!1)),A.items&&A.items.length)for(let $=A.items.length-1;$>=0;$--)A.items[$].visible===!1&&A.items.splice($,1)},{key:"items"}),k.filter(A=>!(A.visible===!1||A.items&&Array.isArray(A.items)&&A.items.length>0&&A.items?.every($=>$.visible===!1)))}function X(F){return F.map(H=>H.items&&Array.isArray(H.items)&&H.items.length===1&&["header","footer","",void 0,null].includes(H.section)?H.items[0]:H)}const ee=F=>{const[H,k]=(0,p.default)(F,O=>O.id==="/team");return[...H,...k]};e.sortRootNavigation=ee;const q=F=>{const[,H]=(0,p.default)(F,k=>{const O=typeof k.title=="string"?k.title:k.title?.en;return k.id==="/team"&&O==="Access"||k.id==="/dashboard"&&O==="Blocklet"});return H};e.cleanOldNavigationHistory=q;function re(F={},H={}){const{beforeProcess:k=ce=>ce}=H,{navigationList:O,components:A}=U(F),$=new Map;O.forEach(ce=>{ce.items?.forEach(ae=>{$.set((0,c.joinURL)(ce.id,ae.id),ae)})}),F?.settings?.navigations&&(Array.isArray(F.settings.navigations)?F.settings.navigations=[...F.settings.navigations].filter(ce=>!(ce?.parent==="/team"&&ce.from==="team-tmpl")).map(ce=>{if(ce.section==="userCenter"&&!Object.prototype.hasOwnProperty.call(ce,"private")){const ae=$.get(ce.id);ae&&Object.prototype.hasOwnProperty.call(ae,"private")&&(ce.private=ae.private)}return ce}):F.settings.navigations=[]);const J=C(q(F?.settings?.navigations||[])).map(N),oe=G(k(O)),fe=z(oe),me=V(fe).reduce((ce,ae)=>["bottom","social","sessionManager","userCenter"].includes(ae.section)&&ae.items&&ae.items.length>0?(ce.push(...ae.items.map(fr=>{const{section:ti}=ae,ri=R(ae.link,fr.link),ni=[ae.component,fr.component].filter(Boolean).join(".");return{...fr,section:ti,link:ri,component:ni,parent:""}})),ce):(ce.push(ae),ce),[]),ge=j(me,{transform(ce,ae){let{component:ke}=ce;return ae?.component&&(ke=[ae.component,ce.component].filter(Boolean).join(".")),N({...ce,component:ke})}});return{navigationList:(0,t.default)(J,ge,(ce,ae)=>{const ke=["id","section"];return(0,i.default)((0,o.default)(ce,ke),(0,o.default)(ae,ke))}),components:A,builtinList:ge}}}(pr)),pr}var Ne=Hp();const jc=I.createContext(null),Ua="/",Up="header",qa={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:`${Ce.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${Ce.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:`${Ce.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:qe(Ce.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]}]};function li(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const nt=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:qe(Ce.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),qp=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),Vp=(e,r)=>{const n=Ne.cleanOldNavigationHistory(r);return n.findIndex(i=>i.id==="/team")===-1&&n.unshift(qp("/team",e("navigation.blockletService"),[nt("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),nt("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),nt("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),nt("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),nt("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations"),nt("developer",e("navigation.developer"),"heroicons:command-line","/admin/developers"),nt("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),nt("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n};function Va({name:e}){return v.jsx(ch,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function Kp({children:e}){const{blocklet:r,actions:n}=Nt(),{t}=Ee(),{navigationList:i,components:o,builtinList:a}=Ne.parseNavigation(r,{beforeProcess(x){const T=$e(x);return["dashboard","userCenter"].forEach(C=>{Object.prototype.hasOwnProperty.call(qa,C)&&qa[C].forEach(_=>{T.some(R=>R.id===_.id)||T.push(_)})}),Vp(t,T)}}),l=or({rawNavigation:$e(i),activeSection:Up,components:o}),s=I.useMemo(()=>Ne.nestNavigationList($e(l.rawNavigation)),[l.rawNavigation]),c=I.useMemo(()=>{const x=Ne.filterNavigation($e(l.rawNavigation),o);return Ne.joinLink(x,o)},[o,l.rawNavigation]),u=I.useCallback(x=>{if(!x.id)return"";const T=Ne.flattenNavigation(Ne.joinLink(s,o)),C=T.find(_=>_.id===x.id);if(C?.component){if(!o.some(_=>_.name===C.component))return v.jsx(Va,{name:C.component})}else if(C.parent){const _=T.find(R=>R.id===C.parent);if(_?.component&&!o.some(R=>R.name===_.component))return v.jsx(Va,{name:_.component})}return C?.link},[s,o]),f=I.useCallback(x=>{l.activeSection=x},[l]),d=I.useCallback(x=>{const T=[];Ne.deepWalk(x,(_,R)=>{const E={...Dt(_,["children","expand"]),parent:R?.id};T.push(E)});const C=$e(l.rawNavigation).filter(_=>{if(!l.activeSection)return!1;const R=T.find(E=>li(E,_));return R?!Ne.isMatchSection(R.section,l.activeSection):!0});l.rawNavigation=[...C,...T]},[l]),h=I.useCallback((x=[])=>{const T=$e(l.rawNavigation).map(C=>{const _=x.find(R=>li({...R,section:l.activeSection},C));return _?{...C,..._}:C});l.rawNavigation=T},[l]),p=I.useCallback((x,T=Ua)=>x.map(_=>{const E=o.find(U=>U.name===_.component)?.link||T,j=_.items||[],{link:N}=_;return{title:_.title,description:_.description,subtitle:u(_),link:N,icon:_.icon,children:p(j,N||Ua),section:_.section,visible:_.visible,parent:_.parent,component:_.component,id:_.id,role:_.role,from:_.from,__base:E}}),[o,u]),g=I.useCallback(x=>{h([x])},[h]),m=I.useCallback(x=>{const T=l.rawNavigation.filter(C=>C.id===x||C.parent===x).map(C=>C.id);l.rawNavigation=$e(l.rawNavigation).filter(C=>!T.includes(C.id))},[l]),y=I.useCallback((x={},T=-1)=>{const C={...x,id:lh.nanoid(),section:l.activeSection,visible:!0},_=[...l.rawNavigation],R=_.filter(E=>E.section===l.activeSection);if(T<0||T>R.length-1)_.push(C);else{const E=R[T],j=_.findIndex(N=>li(N,E));_.splice(j,0,C)}return l.rawNavigation=_,C},[l]),b=I.useCallback(x=>{const C=$e(s).filter(_=>Ne.isMatchSection(_.section,x));return p(C)},[s,p]),w=I.useCallback(async x=>{const C=x.map(_=>sh(_,uh)).map(_=>{const R={..._};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(C)},[n]),D=I.useCallback(async()=>{await w([]),l.rawNavigation=$e(a)},[w,l,a]),P=I.useMemo(()=>({state:l,navigation:c,components:o,getNavigationFullLink:u,updateActiveSection:f,updateNavigationItem:g,delNavigationItem:m,addNavigationItem:y,updateNavigationTree:d,getNavigation:b,saveNavigationList:w,resetNavigation:D}),[l,c,o,u,f,g,m,y,d,b,w,D]);return v.jsx(jc.Provider,{value:P,children:e})}function Fc(){const e=I.useContext(jc);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Ke={},si,Ka;function Yp(){if(Ka)return si;Ka=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,l=parseInt,s=typeof xr=="object"&&xr&&xr.Object===Object&&xr,c=typeof self=="object"&&self&&self.Object===Object&&self,u=s||c||Function("return this")(),f=Object.prototype,d=f.toString,h=Math.max,p=Math.min,g=function(){return u.Date.now()};function m(x,T,C){var _,R,E,j,N,U,z=0,G=!1,W=!1,V=!0;if(typeof x!="function")throw new TypeError(e);T=P(T)||0,b(C)&&(G=!!C.leading,W="maxWait"in C,E=W?h(P(C.maxWait)||0,T):E,V="trailing"in C?!!C.trailing:V);function Q(O){var A=_,$=R;return _=R=void 0,z=O,j=x.apply($,A),j}function te(O){return z=O,N=setTimeout(q,T),G?Q(O):j}function X(O){var A=O-U,$=O-z,J=T-A;return W?p(J,E-$):J}function ee(O){var A=O-U,$=O-z;return U===void 0||A>=T||A<0||W&&$>=E}function q(){var O=g();if(ee(O))return re(O);N=setTimeout(q,X(O))}function re(O){return N=void 0,V&&_?Q(O):(_=R=void 0,j)}function F(){N!==void 0&&clearTimeout(N),z=0,_=U=R=N=void 0}function H(){return N===void 0?j:re(g())}function k(){var O=g(),A=ee(O);if(_=arguments,R=this,U=O,A){if(N===void 0)return te(U);if(W)return N=setTimeout(q,T),Q(U)}return N===void 0&&(N=setTimeout(q,T)),j}return k.cancel=F,k.flush=H,k}function y(x,T,C){var _=!0,R=!0;if(typeof x!="function")throw new TypeError(e);return b(C)&&(_="leading"in C?!!C.leading:_,R="trailing"in C?!!C.trailing:R),m(x,T,{leading:_,maxWait:T,trailing:R})}function b(x){var T=typeof x;return!!x&&(T=="object"||T=="function")}function w(x){return!!x&&typeof x=="object"}function D(x){return typeof x=="symbol"||w(x)&&d.call(x)==n}function P(x){if(typeof x=="number")return x;if(D(x))return r;if(b(x)){var T=typeof x.valueOf=="function"?x.valueOf():x;x=b(T)?T+"":T}if(typeof x!="string")return x===0?x:+x;x=x.replace(t,"");var C=o.test(x);return C||a.test(x)?l(x.slice(2),C?2:8):i.test(x)?r:+x}return si=y,si}var gr={exports:{}},xt={exports:{}},Jp=xt.exports,Ya;function Qp(){return Ya||(Ya=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?xt.exports=function(){return performance.now()}:typeof hr<"u"&&hr!==null&&hr.hrtime?(xt.exports=function(){return(e()-i)/1e6},r=hr.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=hr.uptime()*1e9,i=t-o):Date.now?(xt.exports=function(){return Date.now()-n},n=Date.now()):(xt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(Jp)),xt.exports}var Ja;function Xp(){if(Ja)return gr.exports;Ja=1;for(var e=Qp(),r=typeof window>"u"?xr: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 l=0,s=0,c=[],u=1e3/60;i=function(f){if(c.length===0){var d=e(),h=Math.max(0,u-(d-l));l=h+d,setTimeout(function(){var p=c.slice(0);c.length=0;for(var g=0;g<p.length;g++)if(!p[g].cancelled)try{p[g].callback(l)}catch(m){setTimeout(function(){throw m},0)}},Math.round(h))}return c.push({handle:++s,callback:f,cancelled:!1}),s},o=function(f){for(var d=0;d<c.length;d++)c[d].handle===f&&(c[d].cancelled=!0)}}return gr.exports=function(f){return i.call(r,f)},gr.exports.cancel=function(){o.apply(r,arguments)},gr.exports.polyfill=function(f){f||(f=r),f.requestAnimationFrame=i,f.cancelAnimationFrame=o},gr.exports}var rn={},Qa;function Zp(){if(Qa)return rn;Qa=1,Object.defineProperty(rn,"__esModule",{value:!0}),rn.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return rn}var zt={},Xa;function eg(){if(Xa)return zt;Xa=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.noop=e,zt.intBetween=r,zt.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 zt}var Za;function tg(){if(Za)return Ke;Za=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.createHorizontalStrength=_,Ke.createVerticalStrength=R,Ke.createScrollingComponent=N,Ke.default=U,Ke.defaultVerticalStrength=Ke.defaultHorizontalStrength=void 0;var e=u(fc()),r=c(hc()),n=dh(),t=c(Yp()),i=c(Xp()),o=c(Zp()),a=sp,l=c(fh()),s=eg();function c(z){return z&&z.__esModule?z:{default:z}}function u(z){if(z&&z.__esModule)return z;var G={};if(z!=null){for(var W in z)if(Object.prototype.hasOwnProperty.call(z,W)){var V=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(z,W):{};V.get||V.set?Object.defineProperty(G,W,V):G[W]=z[W]}}return G.default=z,G}function f(z){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(W){return typeof W}:f=function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},f(z)}function d(){return d=Object.assign||function(z){for(var G=1;G<arguments.length;G++){var W=arguments[G];for(var V in W)Object.prototype.hasOwnProperty.call(W,V)&&(z[V]=W[V])}return z},d.apply(this,arguments)}function h(z,G){if(z==null)return{};var W=p(z,G),V,Q;if(Object.getOwnPropertySymbols){var te=Object.getOwnPropertySymbols(z);for(Q=0;Q<te.length;Q++)V=te[Q],!(G.indexOf(V)>=0)&&Object.prototype.propertyIsEnumerable.call(z,V)&&(W[V]=z[V])}return W}function p(z,G){if(z==null)return{};var W={},V=Object.keys(z),Q,te;for(te=0;te<V.length;te++)Q=V[te],!(G.indexOf(Q)>=0)&&(W[Q]=z[Q]);return W}function g(z,G){if(!(z instanceof G))throw new TypeError("Cannot call a class as a function")}function m(z,G){for(var W=0;W<G.length;W++){var V=G[W];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(z,V.key,V)}}function y(z,G,W){return G&&m(z.prototype,G),z}function b(z,G){return G&&(f(G)==="object"||typeof G=="function")?G:x(z)}function w(z){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(W){return W.__proto__||Object.getPrototypeOf(W)},w(z)}function D(z,G){if(typeof G!="function"&&G!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(G&&G.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),G&&P(z,G)}function P(z,G){return P=Object.setPrototypeOf||function(V,Q){return V.__proto__=Q,V},P(z,G)}function x(z){if(z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z}function T(z,G,W){return G in z?Object.defineProperty(z,G,{value:W,enumerable:!0,configurable:!0,writable:!0}):z[G]=W,z}var C=150;function _(z){return function(W,V){var Q=W.x,te=W.w,X=W.y,ee=W.h,q=Math.min(te/2,z),re=V.x>=Q&&V.x<=Q+te,F=re&&V.y>=X&&V.y<=X+ee;if(F){if(V.x<Q+q)return(V.x-Q-q)/q;if(V.x>Q+te-q)return-(Q+te-V.x-q)/q}return 0}}function R(z){return function(W,V){var Q=W.y,te=W.h,X=W.x,ee=W.w,q=Math.min(te/2,z),re=V.y>=Q&&V.y<=Q+te,F=re&&V.x>=X&&V.x<=X+ee;if(F){if(V.y<Q+q)return(V.y-Q-q)/q;if(V.y>Q+te-q)return-(Q+te-V.y-q)/q}return 0}}var E=_(C);Ke.defaultHorizontalStrength=E;var j=R(C);Ke.defaultVerticalStrength=j;function N(z){var G=function(W){D(V,W);function V(Q,te){var X;return g(this,V),X=b(this,w(V).call(this,Q,te)),T(x(x(X)),"updateScrolling",(0,t.default)(function(ee){var q=X.container.getBoundingClientRect(),re=q.left,F=q.top,H=q.width,k=q.height,O={x:re,y:F,w:H,h:k},A=(0,s.getCoords)(ee),$=X.props,J=$.horizontalStrength,oe=$.verticalStrength;X.scaleX=J(O,A),X.scaleY=oe(O,A),!X.frame&&(X.scaleX||X.scaleY)&&X.startScrolling()},100,{trailing:!1})),T(x(x(X)),"handleEvent",function(ee){X.dragging&&!X.attached&&(X.attach(),X.updateScrolling(ee))}),X.wrappedInstance=e.default.createRef(),X.scaleX=0,X.scaleY=0,X.frame=null,X.attached=!1,X.dragging=!1,X}return y(V,[{key:"componentDidMount",value:function(){var te=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 te.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 te=this.props.dragDropManager,X=te.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 te=this,X=0,ee=function q(){var re=te.scaleX,F=te.scaleY,H=te.container,k=te.props,O=k.strengthMultiplier,A=k.onScrollChange;if(O===0||re+F===0){te.stopScrolling();return}if(X+=1,X%2){var $=H.scrollLeft,J=H.scrollTop,oe=H.scrollWidth,fe=H.scrollHeight,de=H.clientWidth,me=H.clientHeight,ge=re?H.scrollLeft=(0,s.intBetween)(0,oe-de,$+re*O):$,De=F?H.scrollTop=(0,s.intBetween)(0,fe-me,J+F*O):J;A(ge,De)}te.frame=(0,i.default)(q)};ee()}},{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 te=this.props;te.strengthMultiplier,te.verticalStrength,te.horizontalStrength,te.onScrollChange;var X=h(te,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(z,d({ref:this.wrappedInstance},X))}}]),V}(e.Component);return T(G,"displayName","Scrolling(".concat((0,o.default)(z),")")),T(G,"propTypes",{dragDropManager:r.default.object.isRequired,onScrollChange:r.default.func,verticalStrength:r.default.func,horizontalStrength:r.default.func,strengthMultiplier:r.default.number}),T(G,"defaultProps",{onScrollChange:s.noop,verticalStrength:j,horizontalStrength:E,strengthMultiplier:30}),(0,l.default)(G,z)}function U(z){var G=N(z);return function(W){return e.default.createElement(a.DragDropContextConsumer,null,function(V){var Q=V.dragDropManager;return Q===void 0?null:e.default.createElement(G,d({},W,{dragDropManager:Q}))})}}return Ke}var vn=tg();const rg=zn(vn);var ng=cp();const el=zn(ng);function Bc(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function Gc(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function $c(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}}Bc.__suppressDeprecationWarning=!0;Gc.__suppressDeprecationWarning=!0;$c.__suppressDeprecationWarning=!0;function qr(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 $u=Object.freeze({left:0,top:0,width:16,height:16}),Tn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Qr=Object.freeze({...$u,...Tn}),lo=Object.freeze({...Qr,body:"",hidden:!1}),Gb=Object.freeze({width:null,height:null}),Wu=Object.freeze({...Gb,...Tn});function $b(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 Wb=/[\s,]+/;function Hb(e,r){r.split(Wb).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Hu={...Wu,preserveAspectRatio:""};function es(e){const r={...Hu},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=$b(n("rotate","")),Hb(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function Ub(e,r){for(const n in Hu)if(e[n]!==r[n])return!0;return!1}const Or=/^[a-z0-9]+(-[a-z0-9]+)*$/,Xr=(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 l=i.pop(),s=i.pop(),c={provider:i.length>0?i[0]:t,prefix:s,name:l};return r&&!yn(c)?null:c}const o=i[0],a=o.split("-");if(a.length>1){const l={provider:t,prefix:a.shift(),name:a.join("-")};return r&&!yn(l)?null:l}if(n&&t===""){const l={provider:t,prefix:"",name:o};return r&&!yn(l,n)?null:l}return null},yn=(e,r)=>e?!!((e.provider===""||e.provider.match(Or))&&(r&&e.prefix===""||e.prefix.match(Or))&&e.name.match(Or)):!1;function qb(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 ts(e,r){const n=qb(e,r);for(const t in lo)t in Tn?t in e&&!(t in n)&&(n[t]=Tn[t]):t in r?n[t]=r[t]:t in e&&(n[t]=e[t]);return n}function Vb(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 l=t[a]&&t[a].parent,s=l&&o(l);s&&(i[a]=[l].concat(s))}return i[a]}return Object.keys(n).concat(Object.keys(t)).forEach(o),i}function Kb(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(l){o=ts(t[l]||i[l],o)}return a(r),n.forEach(a),ts(e,o)}function Uu(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=Vb(e);for(const i in t){const o=t[i];o&&(r(i,Kb(e,i,o)),n.push(i))}return n}const Yb={provider:"",aliases:{},not_found:{},...$u};function Ri(e,r){for(const n in r)if(n in e&&typeof e[n]!=typeof r[n])return!1;return!0}function qu(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!Ri(e,Yb))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(Or)||typeof o.body!="string"||!Ri(o,lo))return null}const t=r.aliases||Object.create(null);for(const i in t){const o=t[i],a=o.parent;if(!i.match(Or)||typeof a!="string"||!n[a]&&!t[a]||!Ri(o,lo))return null}return r}const _n=Object.create(null);function Jb(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function gt(e,r){const n=_n[e]||(_n[e]=Object.create(null));return n[r]||(n[r]=Jb(e,r))}function Jo(e,r){return qu(r)?Uu(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function Qb(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function Xb(e,r){let n=[];return(typeof e=="string"?[e]:Object.keys(_n)).forEach(i=>{(typeof i=="string"&&typeof r=="string"?[r]:Object.keys(_n[i]||{})).forEach(a=>{const l=gt(i,a);n=n.concat(Object.keys(l.icons).map(s=>(i!==""?"@"+i+":":"")+a+":"+s))})}),n}let jr=!1;function Vu(e){return typeof e=="boolean"&&(jr=e),jr}function Fr(e){const r=typeof e=="string"?Xr(e,!0,jr):e;if(r){const n=gt(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function Ku(e,r){const n=Xr(e,!0,jr);if(!n)return!1;const t=gt(n.provider,n.prefix);return Qb(t,n.name,r)}function rs(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),jr&&!r&&!e.prefix){let i=!1;return qu(e)&&(e.prefix="",Uu(e,(o,a)=>{a&&Ku(o,a)&&(i=!0)})),i}const n=e.prefix;if(!yn({provider:r,prefix:n,name:"a"}))return!1;const t=gt(r,n);return!!Jo(t,e)}function Zb(e){return!!Fr(e)}function ey(e){const r=Fr(e);return r?{...Qr,...r}:null}function ty(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,l=i.name,s=n[o]||(n[o]=Object.create(null)),c=s[a]||(s[a]=gt(o,a));let u;l in c.icons?u=r.loaded:a===""||c.missing.has(l)?u=r.missing:u=r.pending;const f={provider:o,prefix:a,name:l};u.push(f)}),r}function Yu(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function ry(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,l=a.pending.length;a.pending=a.pending.filter(s=>{if(s.prefix!==i)return!0;const c=s.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!==l&&(n||Yu([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let ny=0;function iy(e,r,n){const t=ny++,i=Yu.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 so=Object.create(null);function ns(e,r){so[e]=r}function co(e){return so[e]||so[""]}function oy(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?Xr(i,r,n):i;o&&t.push(o)}),t}var ay={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ly(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 x=e.resources.slice(0);for(a=[];x.length>1;){const T=Math.floor(Math.random()*x.length);a.push(x[T]),x=x.slice(0,T).concat(x.slice(T+1))}a=a.concat(x)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const l=Date.now();let s="pending",c=0,u,f=null,d=[],h=[];typeof t=="function"&&h.push(t);function p(){f&&(clearTimeout(f),f=null)}function g(){s==="pending"&&(s="aborted"),p(),d.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),d=[]}function m(x,T){T&&(h=[]),typeof x=="function"&&h.push(x)}function y(){return{startTime:l,payload:r,status:s,queriesSent:c,queriesPending:d.length,subscribe:m,abort:g}}function b(){s="failed",h.forEach(x=>{x(void 0,u)})}function w(){d.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),d=[]}function D(x,T,C){const _=T!=="success";switch(d=d.filter(R=>R!==x),s){case"pending":break;case"failed":if(_||!e.dataAfterTimeout)return;break;default:return}if(T==="abort"){u=C,b();return}if(_){u=C,d.length||(a.length?P():b());return}if(p(),w(),!e.random){const R=e.resources.indexOf(x.resource);R!==-1&&R!==e.index&&(e.index=R)}s="completed",h.forEach(R=>{R(C)})}function P(){if(s!=="pending")return;p();const x=a.shift();if(x===void 0){if(d.length){f=setTimeout(()=>{p(),s==="pending"&&(w(),b())},e.timeout);return}b();return}const T={status:"pending",resource:x,callback:(C,_)=>{D(T,C,_)}};d.push(T),c++,f=setTimeout(P,e.rotate),n(x,r,T.callback)}return setTimeout(P),y}function Ju(e){const r={...ay,...e};let n=[];function t(){n=n.filter(l=>l().status==="pending")}function i(l,s,c){const u=ly(r,l,s,(f,d)=>{t(),c&&c(f,d)});return n.push(u),u}function o(l){return n.find(s=>l(s))||null}return{query:i,find:o,setIndex:l=>{r.index=l},getIndex:()=>r.index,cleanup:t}}function Qo(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 qn=Object.create(null),mr=["https://api.simplesvg.com","https://api.unisvg.com"],Sn=[];for(;mr.length>0;)mr.length===1||Math.random()>.5?Sn.push(mr.shift()):Sn.push(mr.pop());qn[""]=Qo({resources:["https://api.iconify.design"].concat(Sn)});function is(e,r){const n=Qo(r);return n===null?!1:(qn[e]=n,!0)}function Vn(e){return qn[e]}function sy(){return Object.keys(qn)}function os(){}const Di=Object.create(null);function cy(e){if(!Di[e]){const r=Vn(e);if(!r)return;const n=Ju(r),t={config:r,redundancy:n};Di[e]=t}return Di[e]}function Qu(e,r,n){let t,i;if(typeof e=="string"){const o=co(e);if(!o)return n(void 0,424),os;i=o.send;const a=cy(e);a&&(t=a.redundancy)}else{const o=Qo(e);if(o){t=Ju(o);const a=e.resources?e.resources[0]:"",l=co(a);l&&(i=l.send)}}return!t||!i?(n(void 0,424),os):t.query(r,i,n)().abort}const as="iconify2",Br="iconify",Xu=Br+"-count",ls=Br+"-version",Zu=36e5,uy=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 ss(e,r){try{e.removeItem(r)}catch{}}function fo(e,r){return Xo(e,Xu,r.toString())}function ho(e){return parseInt(uo(e,Xu))||0}const Pt={local:!0,session:!0},ed={local:new Set,session:new Set};let Zo=!1;function dy(e){Zo=e}let ln=typeof window>"u"?{}:window;function td(e){const r=e+"Storage";try{if(ln&&ln[r]&&typeof ln[r].length=="number")return ln[r]}catch{}Pt[e]=!1}function rd(e,r){const n=td(e);if(!n)return;const t=uo(n,ls);if(t!==as){if(t){const l=ho(n);for(let s=0;s<l;s++)ss(n,Br+s.toString())}Xo(n,ls,as),fo(n,0);return}const i=Math.floor(Date.now()/Zu)-uy,o=l=>{const s=Br+l.toString(),c=uo(n,s);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,l))return!0}catch{}ss(n,s)}};let a=ho(n);for(let l=a-1;l>=0;l--)o(l)||(l===a-1?(a--,fo(n,a)):ed[e].add(l))}function nd(){if(!Zo){dy(!0);for(const e in Pt)rd(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=gt(t,i);if(!Jo(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function fy(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in Pt)rd(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function hy(e,r){Zo||nd();function n(t){let i;if(!Pt[t]||!(i=td(t)))return;const o=ed[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=ho(i),!fo(i,a+1))return;const l={cached:Math.floor(Date.now()/Zu),provider:e.provider,data:r};return Xo(i,Br+a.toString(),JSON.stringify(l))}r.lastModified&&!fy(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function cs(){}function py(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,ry(e)}))}function gy(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(l=>{Qu(n,l,s=>{if(typeof s!="object")l.icons.forEach(c=>{e.missing.add(c)});else try{const c=Jo(e,s);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(f=>{u.delete(f)}),hy(e,s)}catch(c){console.error(c)}py(e)})})}))}const ea=(e,r)=>{const n=oy(e,!0,Vu()),t=ty(n);if(!t.pending.length){let s=!0;return r&&setTimeout(()=>{s&&r(t.loaded,t.missing,t.pending,cs)}),()=>{s=!1}}const i=Object.create(null),o=[];let a,l;return t.pending.forEach(s=>{const{provider:c,prefix:u}=s;if(u===l&&c===a)return;a=c,l=u,o.push(gt(c,u));const f=i[c]||(i[c]=Object.create(null));f[u]||(f[u]=[])}),t.pending.forEach(s=>{const{provider:c,prefix:u,name:f}=s,d=gt(c,u),h=d.pendingIcons||(d.pendingIcons=new Set);h.has(f)||(h.add(f),i[c][u].push(f))}),o.forEach(s=>{const{provider:c,prefix:u}=s;i[c][u].length&&gy(s,i[c][u])}),r?iy(r,t,o):cs},vy=e=>new Promise((r,n)=>{const t=typeof e=="string"?Xr(e,!0):e;if(!t){n(e);return}ea([t||e],i=>{if(i.length&&t){const o=Fr(t);if(o){r({...Qr,...o});return}}n(e)})});function my(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"?Xr(e,!0,!0):null;if(!n){const o=my(e);return{value:e,data:o}}const t=Fr(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=ea([n],()=>r(e,n,Fr(n)));return{value:e,name:n,loading:i}}function Ti(e){return e.hasAttribute("inline")}let id=!1;try{id=navigator.vendor.indexOf("Apple")===0}catch{}function yy(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(id||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const Sy=/(-?[0-9.]*[0-9]+[0-9.]*)/g,xy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function po(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(Sy);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=xy.test(o);for(;;){if(a){const l=parseFloat(o);isNaN(l)?i.push(o):i.push(Math.ceil(l*r*n)/n)}else i.push(o);if(o=t.shift(),o===void 0)return i.join("");a=!a}}const wy=e=>e==="unset"||e==="undefined"||e==="none";function od(e,r){const n={...Qr,...e},t={...Wu,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(p=>{const g=[],m=p.hFlip,y=p.vFlip;let b=p.rotate;m?y?b+=2:(g.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),g.push("scale(-1 1)"),i.top=i.left=0):y&&(g.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),g.push("scale(1 -1)"),i.top=i.left=0);let w;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:w=i.height/2+i.top,g.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:g.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:w=i.width/2+i.left,g.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}b%2===1&&(i.left!==i.top&&(w=i.left,i.left=i.top,i.top=w),i.width!==i.height&&(w=i.width,i.width=i.height,i.height=w)),g.length&&(o='<g transform="'+g.join(" ")+'">'+o+"</g>")});const a=t.width,l=t.height,s=i.width,c=i.height;let u,f;a===null?(f=l===null?"1em":l==="auto"?c:l,u=po(f,s/c)):(u=a==="auto"?s:a,f=l===null?po(u,c/s):l==="auto"?c:l);const d={},h=(p,g)=>{wy(g)||(d[p]=g.toString())};return h("width",u),h("height",f),d.viewBox=i.left.toString()+" "+i.top.toString()+" "+s.toString()+" "+c.toString(),{attributes:d,body:o}}const Cy=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Pn=Cy();function Iy(e){Pn=e}function Ry(){return Pn}function Dy(e,r){const n=Vn(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 Ty(e){return e===404}const _y=(e,r,n)=>{const t=[],i=Dy(e,r),o="icons";let a={type:o,provider:e,prefix:r,icons:[]},l=0;return n.forEach((s,c)=>{l+=s.length+1,l>=i&&c>0&&(t.push(a),a={type:o,provider:e,prefix:r,icons:[]},l=s.length),a.icons.push(s)}),t.push(a),t};function Py(e){if(typeof e=="string"){const r=Vn(e);if(r)return r.path}return"/"}const ky=(e,r,n)=>{if(!Pn){n("abort",424);return}let t=Py(r.provider);switch(r.type){case"icons":{const o=r.prefix,l=r.icons.join(","),s=new URLSearchParams({icons:l});t+=o+".json?"+s.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;Pn(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(Ty(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)})},Oy={prepare:_y,send:ky};function us(e,r){switch(e){case"local":case"session":Pt[e]=r;break;case"all":for(const n in Pt)Pt[n]=r;break}}const _i="data-style";let ad="";function Ey(e){ad=e}function ds(e,r){let n=Array.from(e.childNodes).find(t=>t.hasAttribute&&t.hasAttribute(_i));n||(n=document.createElement("style"),n.setAttribute(_i,_i),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(r?"-0.125em":"0")+"}span,svg{display:block}"+ad}function ld(){ns("",Oy),Vu(!0);let e;try{e=window}catch{}if(e){if(nd(),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"||!rs(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;is(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>us(n,!0),disableCache:n=>us(n,!1),iconExists:Zb,getIcon:ey,listIcons:Xb,addIcon:Ku,addCollection:rs,calculateSize:po,buildIcon:od,loadIcons:ea,loadIcon:vy,addAPIProvider:is,appendCustomStyle:Ey,_api:{getAPIConfig:Vn,setAPIModule:ns,sendAPIQuery:Qu,setFetch:Iy,getFetch:Ry,listAPIProviders:sy}}}function sd(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 Ny(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function My(e){return"data:image/svg+xml,"+Ny(e)}function Ay(e){return'url("'+My(e)+'")'}const go={"background-color":"currentColor"},cd={"background-color":"transparent"},fs={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},hs={"-webkit-mask":go,mask:go,background:cd};for(const e in hs){const r=hs[e];for(const n in fs)r[e+"-"+n]=fs[n]}function ps(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Ly(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=sd(i,{...o,width:r.width+"",height:r.height+""}),l=Ay(a),s=t.style,c={"--svg":l,width:ps(o.width),height:ps(o.height),...n?go:cd};for(const u in c)s.setProperty(u,c[u]);return t}let Er;function zy(){try{Er=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Er=null}}function jy(e){return Er===void 0&&zy(),Er?Er.createHTML(e):e}function Fy(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=sd(e.body,n);return r.innerHTML=jy(i),r.firstChild}function gs(e,r){const n=r.icon.data,t=r.customisations,i=od(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=Fy(i);break;default:a=Ly(i,{...Qr,...n},o==="mask")}const l=Array.from(e.childNodes).find(s=>{const c=s.tagName&&s.tagName.toUpperCase();return c==="SPAN"||c==="SVG"});l?a.tagName==="SPAN"&&l.tagName===a.tagName?l.setAttribute("style",a.getAttribute("style")):e.replaceChild(a,l):e.appendChild(a)}function vs(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function By(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 l=this._shadowRoot=this.attachShadow({mode:"open"}),s=Ti(this);ds(l,s),this._state=vs({value:""},s),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(l){if(l==="inline"){const s=Ti(this),c=this._state;s!==c.inline&&(c.inline=s,ds(this._shadowRoot,s))}else this._queueCheck()}get icon(){const l=this.getAttribute("icon");if(l&&l.slice(0,1)==="{")try{return JSON.parse(l)}catch{}return l}set icon(l){typeof l=="object"&&(l=JSON.stringify(l)),this.setAttribute("icon",l)}get inline(){return Ti(this)}set inline(l){l?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const l=this._state;if(l.rendered){const s=this._shadowRoot;if(l.renderedMode==="svg")try{s.lastChild.setCurrentTime(0);return}catch{}gs(s,l)}}get status(){const l=this._state;return l.rendered?"rendered":l.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const l=this._state,s=this.getAttribute("icon");if(s!==l.icon.value){this._iconChanged(s);return}if(!l.rendered)return;const c=this.getAttribute("mode"),u=es(this);(l.attrMode!==c||Ub(l.customisations,u))&&this._renderIcon(l.icon,u,c)}_iconChanged(l){const s=by(l,(c,u,f)=>{const d=this._state;if(d.rendered||this.getAttribute("icon")!==c)return;const h={value:c,name:u,data:f};h.data?this._gotIconData(h):d.icon=h});s.data?this._gotIconData(s):this._state=vs(s,this._state.inline,this._state)}_gotIconData(l){this._checkQueued=!1,this._renderIcon(l,es(this),this.getAttribute("mode"))}_renderIcon(l,s,c){const u=yy(l.data.body,c),f=this._state.inline;gs(this._shadowRoot,this._state={rendered:!0,icon:l,inline:f,customisations:s,attrMode:c,renderedMode:u})}};i.forEach(l=>{l in o.prototype||Object.defineProperty(o.prototype,l,{get:function(){return this.getAttribute(l)},set:function(s){s!==null?this.setAttribute(l,s):this.removeAttribute(l)}})});const a=ld();for(const l in a)o[l]=o.prototype[l]=a[l];return r.define(e,o),o}const Gy=By()||ld(),{enableCache:XR,disableCache:ZR,iconExists:eD,getIcon:tD,listIcons:rD,addIcon:nD,addCollection:iD,calculateSize:oD,buildIcon:aD,loadIcons:lD,loadIcon:sD,addAPIProvider:cD,_api:uD}=Gy,At=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:At(t[n],r,n)}):r(t)),ud=(e,r="children")=>{const n=[];return At(e,t=>n.push(t),r),n},ta=(e,r,n="children")=>e.map(t=>({...t})).filter(t=>{const i=t[n];if(Array.isArray(i)){const a=ta(i,r,n);t[n]=a?.length?a:void 0}const o={filteredChildren:t[n],isLeaf:!i?.length};return r(t,o)}),dd=e=>/^https?:\/\//.test(e),fd=e=>/^mailto:/i.test(e.trim()),$y=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)},hd=(e=[])=>{const r=e.map((n,t)=>({path:n,index:t})).filter(n=>$y(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},Wy=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,l=e.reduce((p,g)=>p+i+(g[a]?.length||0)*o,0),s=Math.ceil(l/n),c=[[]];let u=0,f=0;const d=s*.2,h=p=>f>s-d&&u<n-1&&f+p>s+d;return e.forEach(p=>{const g=i+(p[a]?.length||0)*o;t&&h(i)&&(u++,f=0,c[u]=[]),!t&&f>0&&h(g)&&(u++,f=0,c[u]=[]),c[u].push({...p,group:!0}),f+=i,p[a]&&p[a].forEach(m=>{t&&h(o)&&(u++,f=0,c[u]=[]),c[u].push({...m,group:!1}),f+=o})}),c};function Qe({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),[l,s]=I.useState(!0);if(To(async()=>{s(!0);try{await _o(e),a(!0)}catch{a(!1)}s(!1)},[e]),t.variant||i.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),dd(e))return v.jsx(ii,{component:"span",...t,src:e,sx:i});const c=r?.6*r+4:0;return l?v.jsx(be,{icon:"codicon:blank",height:c||void 0}):o?v.jsx(ii,{component:"span",...t,sx:i,children:v.jsx(be,{icon:e,height:c||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),v.jsx(ii,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}const Hy=e=>e.from!=="team-tmpl";function Uy({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&ph(e.slice(0,t-1),r.slice(0,i-1)))}function pd({treeNode:e}){const{locale:r}=Ee(),{blocklet:n}=Nt(),t=n.environments.find(a=>a.key===kt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),i=ve(a=>{if(a?.startsWith("/"))try{return new URL(a,t?.value).href}catch{console.error("Failed to parse url",{url:a,origin:t?.value})}return a});function o(){const{title:a,subtitle:l}=e;let s=a,c=l;return Yt(a)&&(s=a[r]),!I.isValidElement(l)&&Yt(l)&&(c=l[r]),v.jsxs(ie,{sx:{display:"flex",alignItems:"center"},children:[v.jsx(Ie,{variant:"subtitle1",sx:{fontSize:16},children:s}),l&&v.jsx(Ie,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:c})]})}return v.jsxs(v.Fragment,{children:[e.icon&&(Po(i(e.icon))?v.jsx(Qe,{size:16,style:{marginRight:4},icon:i(e.icon)}):v.jsx(be,{size:16,style:{marginRight:4},icon:e.icon})),o()]})}pd.propTypes={treeNode:S.object.isRequired};const qy=mt(ie)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function gd({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),v.jsx(qy,{children:v.jsx(fp,{backend:hp,...i,children:v.jsx(Av,{generateNodeProps:o=>{const a=Hy(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?v.jsx(be,{icon:"ic:round-drag-indicator"}):v.jsx(ie,{sx:{width:16,height:16}}),title:v.jsx(pd,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:Uy,theme:Bb})})})}gd.propTypes={treeData:S.object.isRequired,setTreeData:S.func,renderActions:S.func};var Vy=dc();const Ky=zn(Vy),sn="en";function vd({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},locale:t=sn,locales:i=[],localeMap:o={},onRemoveLocale:a=()=>{}}){const{t:l}=Ee(),s=I.useRef(),[c,u]=I.useState(null),f=or({localeList:[],inputLocale:"",localeError:""}),d=I.useMemo(()=>!!c,[c]),h=I.useMemo(()=>i.includes(t)?t:sn,[i,t]),p=I.useMemo(()=>Object.keys(Dt(o,[...f.localeList,sn])).map(x=>({title:o[x],value:x})),[f.localeList]),g=I.useMemo(()=>`Default (${o[sn]||Object.values(o)?.[0]})`,[o]);I.useEffect(()=>{f.localeList=[...i]},[i,f]),lp("enter",()=>{setTimeout(()=>{b()})},{target:s});function m(x){return x?x==="en"||f.localeList.includes(x)?l("navigation.form.localeExists",{value:x}):!0:l("common.requiredErrorText",{name:"Locale"})}function y(x=""){const T=x?.trim(),C=m(T);return C!==!0?f.localeError=C:f.localeError="",C}function b(){const x=f.inputLocale?.trim();y(x)===!0&&(w(),f.localeList.push(x),r(x))}function w(){u(null),f.inputLocale="",f.localeError=""}function D(x,T){x.preventDefault(),x.stopPropagation(),f.localeList=zc(f.localeList,T),a(T)}function P(x){const{value:T}=x.target;y(T),f.inputLocale=T}return v.jsxs(v.Fragment,{children:[v.jsxs(Rp,{sx:e,value:h,onChange:(x,T)=>{n(T)},children:[v.jsx(Ga,{label:g,value:"en"}),f.localeList.map(x=>v.jsx(Ga,{sx:{position:"relative"},label:v.jsxs(v.Fragment,{children:[o[x],v.jsx(Oe,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:T=>{D(T,x)},children:v.jsx(be,{icon:"mdi:close",height:14})})]}),value:x},x)),v.jsx(Oe,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:x=>{u(x.currentTarget)},children:v.jsx(be,{icon:"mdi:plus"})})]}),v.jsx(Hi,{open:d,anchorEl:c,onClose:w,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:v.jsxs(ie,{sx:{p:2,width:"270px"},children:[v.jsx(Ie,{variant:"subtitle2",children:l("navigation.form.localePlaceholder")}),v.jsx(ie,{sx:{mt:1},children:v.jsx(Ki,{required:!0,fullWidth:!0,label:"Locale",value:f.inputLocale,options:p,onChange:P,error:!!f.localeError,helperText:f.localeError||" "})}),v.jsx(ie,{sx:{display:"flex",justifyContent:"flex-end"},children:v.jsx(Zt,{size:"small",variant:"contained",onClick:b,children:l("common.confirm")})})]})})]})}vd.propTypes={sx:S.any,onAdd:S.func,onChange:S.func,onRemoveLocale:S.func,locale:S.string,localeMap:S.object,locales:S.array};const ra=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function md(e,r,n=5e3){for(const t of ra){const i=qe(t,e);try{return await Tp.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 Yy({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 md("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const cn=new Map;async function Jy(e){if(cn.has(e))return cn.get(e);const r=(async()=>{const{data:n}=await md("/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)})();cn.set(e,r);try{return await r}catch(n){throw cn.delete(e),n}}function Qy(e){return qe(ra[0],`${e}.svg`)}function Xy(e){try{const r=new URL(e);for(const n of ra)if(r.origin===n)return gh(r.pathname).replace(".svg","");return""}catch{return""}}function Zy(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):Po(e)&&(n=Xy(e))),{isIconId:r,iconId:n}}const eS=I.lazy(()=>Sh(()=>import("./index-wdj0FEUp.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}))),ms=Ve(Qe)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function bd({icon:e,...r}){const[n,t]=I.useState(!1);return To(async()=>{t(!1),await _o(e),t(!0)},[e]),e?n?v.jsx(be,{icon:e,...r}):v.jsx(be,{color:"#f06f6e",icon:"ic:baseline-error",...r}):v.jsx(be,{icon:"material-symbols-light:select-rounded",...r})}bd.propTypes={icon:S.string.isRequired};function vo({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:l,prefix:s,inService:c}=pc(),{blocklet:u}=Nt(),f=Fn(ee=>ee.breakpoints.down("md")),d=u.environments.find(ee=>ee.key===kt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),h=l(),p=I.useRef(null),g=I.useRef(null),m=I.useRef(null),{t:y,locale:b}=Ee(),{isIconId:w,iconId:D}=Zy(e),[P,x]=I.useState(null),{onChange:T,onBlur:C,sx:_,...R}=a,E=i.includes("upload"),j=i.includes("select"),N=qe(s,"/api/media/upload",u.appPid),U=or({showPopover:!1}),z=ve(ee=>{if(ee?.startsWith("/"))try{const q=c?window.location.origin:d?.value;return new URL(ee,q).href}catch{console.error("Failed to resolve url: ",ee)}return ee},[d?.value,c]),G=ve(async ee=>await p.current.getUploader().uploadFile(ee)),W=ve(()=>{x(null)}),V=ve(()=>{j&&x(m.current)}),Q=ve(async ee=>{try{if(o==="url"){const q=Qy(ee),re=await vh(q,{width:128,height:128}),F=await mh(re,ee);await G(F)}else T?.(ee)}catch(q){console.error("Failed to pick icon:",q)}W()}),te=ve(ee=>{ee.stopPropagation(),g.current.open(),W()}),X=ve(ee=>{a?.onChange?.(ee.data.url)});return v.jsxs(v.Fragment,{children:[v.jsx(Ht,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},..._},onClick:j?V:void 0,...R,label:n,placeholder:t,slotProps:{input:{ref:m,readOnly:!0,startAdornment:v.jsx(Ui,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(U.showPopover=!0)},onMouseLeave:()=>{U.showPopover=!1},children:v.jsx(ms,{size:28,icon:z(e),alt:"Error"})}),endAdornment:v.jsxs(Ui,{position:"end",children:[v.jsx(Oe,{sx:{visibility:e?"visible":"hidden"},onClick:ee=>{ee.stopPropagation(),T("")},children:v.jsx(Ac,{style:{fontSize:18}})}),E&&v.jsx(bh,{title:y("common.upload"),children:v.jsx(Oe,{disableFocusRipple:!1,disableRipple:!1,onClick:te,children:v.jsx(bd,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),j&&v.jsx(ie,{component:Dp,sx:{mr:"-6px",fontSize:24,transform:P?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),j&&v.jsx(Hi,{open:!!P,anchorEl:P,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...f&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:W,children:v.jsx(yd,{label:n,placeholder:t,value:w?D:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:Q,onClose:W})}),v.jsx(mo,{ref:p,locale:b,apiPath:N,headers:h,imageEditorProps:{},onUploadFinish:X}),v.jsx(mo,{ref:g,locale:b,apiPath:N,headers:h,onUploadFinish:X}),v.jsx(Hi,{sx:{pointerEvents:"none"},open:U.showPopover,anchorEl:m.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{U.showPopover=!1},disableRestoreFocus:!0,children:v.jsx(ms,{size:120,icon:z(e),alt:"Error"})})]})}vo.propTypes={value:S.string.isRequired,label:S.any,placeholder:S.any,helperText:S.string,methods:S.arrayOf(S.oneOf(["select","upload"])),iconifyShape:S.oneOf(["id","url"])};function yd({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[l,s]=I.useState([]),[c,u]=I.useState(!0),[f,d]=I.useState(n),[h,p]=I.useState(!1),g=I.useRef(null),m=I.useRef([]),y=I.useRef(1),b=I.useRef(!0),{t:w}=Ee(),D=96,P=ve(()=>{!b.current||c||(u(!0),setTimeout(()=>{const C=y.current+1,_=(C-1)*D,R=C*D,E=m.current.slice(_,R);s(j=>[...j,...E]),y.current=C,b.current=R<m.current.length,u(!1)},300))}),x=ve(C=>{m.current=C,y.current=1,b.current=C.length>D;const _=C.slice(0,D);s(_),p(C.length===0),b.current&&P()}),{run:T}=gc(async C=>{if(C){u(!0);try{const{icons:_}=await Yy({keyword:C});x(_)}catch(_){console.error("Failed to search icons:",_),p(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return I.useEffect(()=>{const C=()=>{if(!g.current)return;const{scrollTop:R,scrollHeight:E,clientHeight:j}=g.current;(R+j>=E-150||E<=j)&&P()},_=g.current;return _&&(_.addEventListener("scroll",C),C()),()=>{_&&_.removeEventListener("scroll",C)}},[P,c]),To(async()=>{if(f)T(f);else{u(!0);try{const C=await Jy("mdi-light");x(C)}catch(C){console.error("Failed to fetch default icons:",C),p(!0)}finally{u(!1)}}},[f,T,x]),v.jsxs(tS,{ref:g,sx:t,...a,children:[v.jsxs(ie,{className:"icon-picker-input",children:[v.jsx(Ht,{label:w("navigation.form.searchIcons"),placeholder:w("navigation.form.searchIconsPlaceholder"),size:"small",value:f,sx:{flexGrow:1},autoFocus:!0,onChange:C=>d(C.target.value),slotProps:{input:{endAdornment:v.jsx(Oe,{sx:{visibility:f?"visible":"hidden"},onClick:()=>d(""),children:v.jsx(Ac,{style:{fontSize:18}})})}}}),v.jsx(Zt,{onClick:o,children:w("common.cancel")})]}),v.jsxs(ie,{children:[l.length>0&&v.jsx(ie,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:l.map(C=>v.jsx(rS,{$active:n===C,onClick:()=>{i(C)},children:v.jsx(be,{icon:C,width:"32",height:"32"})},C))}),h&&v.jsx(ie,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:v.jsx(ie,{sx:{textAlign:"center"},children:"No matching results"})}),c&&v.jsx(ie,{sx:{p:2,display:"flex",justifyContent:"center"},children:v.jsx(yh,{size:20})})]})]})}yd.propTypes={label:S.any,placeholder:S.any,value:S.string,sx:S.object,onPick:S.func.isRequired,onClose:S.func.isRequired};const tS=Ve(ie)(({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}})),rS=Ve(Oe,{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 v.jsx(I.Suspense,{children:v.jsx(eS,{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:S.any,locale:S.string,apiPath:S.string,headers:S.object,imageEditorProps:S.object,onUploadFinish:S.func};const bs=24,ys=48,Ss="add",We="en",xs={title:{[We]:""},description:{[We]:""},link:{[We]:""}};function ws(e){return zc(Array.from(new Set(Ce.NAVIGATION_I18N_FIELDS.flatMap(r=>Yt(e[r])?Object.keys(e[r]):[]))),We)}S.string.isRequired;function na({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Mc(),{t:l,locale:s}=Ee(),{blocklet:c}=Nt(),u=I.useMemo(()=>{const k=c.environments.find(A=>A.key==="BLOCKLET_APP_LANGUAGES");return(k?k.value.split(","):["en","zh"]).filter(A=>kt.SUPPORTED_LANGUAGES[A]).reduce((A,$)=>(A[$]=kt.SUPPORTED_LANGUAGES[$].nativeName,A),{})},[c.environments]),f=I.useRef(()=>{}),d=or({isRoot:!0,type:Ss,linkDisabled:!1,locale:We,formState:$e(xs),get localeList(){return ws(d.formState)}}),{handleSubmit:h,control:p,reset:g,setValue:m,clearErrors:y,formState:{errors:b}}=Cp({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});I.useEffect(()=>{Ce.NAVIGATION_I18N_FIELDS.forEach(k=>m(k,d.formState[k][d.locale]))},[m,d.locale]);const w=Ip({control:p}),D=w.component,P=w.title,x=w.description,T=w.link,C=w.parent;I.useEffect(()=>{d.formState.title[d.locale]=P},[P]),I.useEffect(()=>{d.formState.description[d.locale]=x},[x]),I.useEffect(()=>{d.formState.link[d.locale]=T},[T]),I.useEffect(()=>{i?.(w)},[w,i]);const _=I.useMemo(()=>t.find(O=>D?n.find($=>$.name===D).did===O.id:O.id===C),[n,t,D,C]),R=I.useMemo(()=>{if(_?.component){const k=n.find(J=>J.name===_.component),{link:O}=k||{},A=Yt(O)?O[d.locale]:O;if(D)return ka(A);const $=Yt(_.link)?_.link[d.locale]:_.link;return ka(qe(A,$||"/"))}return null},[n,d.locale,_,D]),E=I.useMemo(()=>{const{component:k}=_||{},O=n.find(J=>J.name===k),{navigation:A=[]}=O||{};return Ne.flattenNavigation(A,{transform(J,oe){return oe?.section&&(J.section=J.section||oe.section),J}}).filter(J=>J.link).filter(J=>Ne.isMatchSection(J.section,r)).map(J=>({label:J.link,title:J.title[s]||J.title}))},[_,n,r,s]),j=I.useCallback(()=>{d.isRoot=!0,d.locale=We,d.type=Ss,d.linkDisabled=!1,d.formState=$e(xs),g(),y(),f.current=()=>{}},[y,g,d]),N=I.useCallback((k={})=>(d.localeList.length>0&&Ce.NAVIGATION_I18N_FIELDS.forEach(O=>{Mp(d.formState[O]).length>1&&(k[O]=d.formState[O])}),ko(k.role)&&(k.role=void 0),k),[d.localeList,d.formState]),U=I.useCallback(({parent:k}={},O=()=>{})=>{d.type="add",d.isRoot=!k,m("parent",k?.id),f.current=A=>{O(A)}},[m,d]),z=I.useCallback((k={},O=()=>{})=>{const{id:A,icon:$,parent:J,component:oe,role:fe=[]}=k;m("id",A),m("icon",$),k.from==="team-tmpl"&&(d.linkDisabled=!0);const de=ws(k),me=(ge,De)=>{mc(ge)?d.formState[De]=de.reduce((ce,ae)=>(ce[ae]=ge,ce),{[We]:ge}):Yt(ge)?d.formState[De]=$e(ge):d.formState[De]={}};Ce.NAVIGATION_I18N_FIELDS.forEach(ge=>me(k[ge],ge)),Ce.NAVIGATION_I18N_FIELDS.forEach(ge=>m(ge,d.formState[ge][d.locale])),m("component",oe),m("parent",J),m("role",fe||[]),d.type="edit",d.isRoot=!J,f.current=ge=>{const De=xh(ge,["id","title","description","icon","component","link","role"]);O(De)}},[m,d]);function G(k){const O=k?.trim();if(r!=="bottomNavigation"){if(!O)return l("common.requiredErrorText",{name:l("navigation.form.title")});if(O.length>bs)return l("navigation.form.titleTooLong",{len:bs})}return!0}function W(k){const O=k?.trim();return O&&O.length>ys?l("navigation.form.descriptionTooLong",{len:ys}):!0}const V=ve(k=>k?.startsWith("/")?new URL(k,window.location.origin).href:k);async function Q(k){const O=k?.trim();if(O){if(Po(V(O)))return!0;try{await _o(O)}catch{return l("navigation.form.invalidIcon")}}return!0}function te(k){const O=k?.trim();return O?Q(O):l("common.requiredErrorText",{name:l("navigation.form.icon")})}function X(k){const O=k?.trim();return O?Ne.checkLink(O)?!0:l("navigation.form.invalidLink"):d.isRoot?!0:l("common.requiredErrorText",{name:l("navigation.form.link")})}const ee=I.useCallback(k=>{d.locale=k,Ce.NAVIGATION_I18N_FIELDS.forEach(O=>{d.formState[O][k]||(d.formState[O][k]="")}),setTimeout(()=>{y()})},[y,d]),q=I.useCallback(()=>{const{title:k,link:O}=d.formState;if(r!=="bottomNavigation")for(const A of Object.keys(k)){const $=G(k[A]);if($!==!0)return $}for(const A of Object.keys(O)){const $=X(O[A]);if($!==!0)return $}return!0},[r,d.formState]),re=I.useCallback(k=>{const O=q();O===!0?f.current(N(k)):wr.error(O)},[q,N]),F=I.useCallback(k=>{d.locale=We,Ce.NAVIGATION_I18N_FIELDS.forEach(O=>{d.formState[O]=Dt(d.formState[O],k)}),i?.(w)},[d,w,i]),H=I.useCallback(k=>{d.locale=k,Ce.NAVIGATION_I18N_FIELDS.forEach(O=>{d.formState[O][k]=d.formState[O][We]}),i?.(w),setTimeout(()=>{y()})},[y,d,w,i]);return I.useImperativeHandle(e,()=>({add:U,edit:z,resetImmediate:()=>j(),reset:()=>setTimeout(()=>j(),0),submit:h(re)}),[U,j,z,h,re]),v.jsxs(ie,{...o,children:[v.jsx(vd,{sx:{mb:1},onAdd:H,onChange:ee,onRemoveLocale:F,locale:d.locale,localeMap:u,locales:d.localeList}),v.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&v.jsx(rt,{name:"title",control:p,rules:{validate:G},render:({field:k})=>v.jsx(Ht,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:d.isEdit,error:!!b?.title?.message,helperText:b?.title?.message||" ",...k})}),r==="bottomNavigation"?v.jsx(rt,{name:"icon",control:p,rules:{validate:te},render:({field:k})=>v.jsx(vo,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!b?.icon?.message,helperText:b?.icon?.message,disabled:d.locale!==We,methods:["select"],iconifyShape:"url",...k})}):v.jsx(rt,{name:"icon",control:p,rules:{validate:Q},render:({field:k})=>v.jsx(vo,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!b?.icon?.message,helperText:b?.icon?.message,disabled:d.locale!==We,...k})}),d.isRoot&&v.jsx(rt,{name:"component",control:p,render:({field:k})=>v.jsx(Ki,{fullWidth:!0,margin:"dense",disabled:d.locale!==We&&k.value,label:l("navigation.form.component"),placeholer:l("navigation.form.componentPlaceholder"),options:n.map(O=>({title:O.title,value:O.name,description:O.link})),error:!!b?.component?.message,helperText:b?.component?.message||" ",...Dt(k,"ref")})}),!d.isRoot&&["header"].includes(r)&&v.jsx(rt,{name:"description",control:p,rules:{validate:W},render:({field:k})=>v.jsx(Ht,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.descriptionPlaceholder"),label:l("navigation.form.description"),disabled:d.isEdit,error:!!b?.description?.message,helperText:b?.description?.message||" ",...k})}),v.jsx(rt,{name:"link",control:p,rules:{validate:X},render:({field:k})=>v.jsx(vc,{fullWidth:!0,margin:"dense",children:v.jsx(_p,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:d.linkDisabled,isOptionEqualToValue:O=>O.label,options:E,renderInput:O=>v.jsx(Ht,{...O,placeholder:l("navigation.form.linkPlaceholder"),label:l("navigation.form.link"),error:!!b?.link?.message,helperText:b?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:R?v.jsx(Ui,{position:"start",sx:{textDecoration:Ky(T||"")?"line-through":""},children:R}):null}}}),renderOption:(O,A)=>v.jsxs(ie,{component:"li",...O,children:[A.label,v.jsx(Ie,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:A.title})]}),margin:"dense",...k,onChange:()=>{},onInputChange:(O,A)=>{k.onChange(A)}})})}),["dashboard","sessionManager"].includes(r)&&v.jsx(rt,{name:"role",control:p,render:({field:k})=>v.jsx(Ki,{fullWidth:!0,multiple:!0,margin:"dense",label:l("navigation.form.role"),placeholer:l("navigation.form.rolePlaceholder"),options:a.map(O=>({title:O.title,value:O.name})),error:!!b?.role?.message,helperText:b?.role?.message||" ",...Dt(k,"ref")})}),r==="bottomNavigation"&&v.jsx(rt,{name:"title",control:p,rules:{validate:G},render:({field:k})=>v.jsx(Ht,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:d.isEdit,error:!!b?.title?.message,helperText:b?.title?.message||" ",...k})})]})]})}na.propTypes={ref:S.any,section:S.string,components:S.array,rawNavigations:S.array,onChange:S.func};function ia({ref:e=null,section:r="",components:n=[],rawNavigations:t=[]}){const{t:i}=Ee(),[o,{setTrue:a,setFalse:l}]=xp(),[s,c]=I.useState("add"),u=I.useRef(null),f=I.useMemo(()=>{const m={add:i("common.create"),edit:i("common.edit")}[s];return m?`${m} ${i("navigation.navigation")}`:"--"},[i,s]),d=I.useCallback(()=>{l(),u.current?.reset()},[l]),h=I.useCallback((g={},m=()=>{})=>{c("add"),u.current?.add(g,y=>m(d,y)),a()},[a,d]),p=I.useCallback((g={},m=()=>{})=>{c("edit"),u.current?.edit(g,y=>m(d,y)),a()},[a,d]);return I.useImperativeHandle(e,()=>({add:h,edit:p,close:d}),[h,p,d]),v.jsx(wh,{open:o,title:f,keepMounted:!0,onClose:d,sx:{".MuiDialogContent-root":{pt:0}},actions:v.jsx(bc,{color:"primary",variant:"contained",onClick:()=>u.current?.submit(),children:i("common.confirm")}),children:v.jsx(na,{ref:u,section:r,components:n,rawNavigations:t})})}ia.propTypes={ref:S.any,section:S.string,components:S.array,rawNavigations:S.array};function Sd({className:e="",add:r=()=>{},edit:n=()=>{},toggle:t=()=>{},del:i=()=>{},data:o,section:a=""}){const{t:l}=Ee(),s=["yaml","team-tmpl"].includes(o.from),c=I.isValidElement(o.subtitle);function u(g){g.preventDefault(),g.stopPropagation()}const f=I.useCallback(g=>{u(g),r(o)},[r,o]),d=I.useCallback(g=>{u(g),n(o)},[n,o]),h=I.useCallback(g=>{u(g),t(o)},[t,o]),p=I.useCallback(g=>{u(g),i(o)},[i,o]);return v.jsxs("div",{className:e,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&v.jsx("span",{title:l(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:v.jsx(Oe,{size:"small",color:"success",onClick:f,disabled:c,children:v.jsx(be,{icon:"mdi:plus-box-outline"})})}),v.jsx("span",{title:l(c?"navigation.action.noEdit":"navigation.action.edit"),children:v.jsx(Oe,{size:"small",color:"primary",onClick:d,disabled:c||o.from==="team-tmpl",children:v.jsx(be,{icon:"mdi:pencil-outline"})})}),v.jsx("span",{title:c?l("navigation.action.noEdit"):o.visible?l("navigation.action.hide"):l("navigation.action.show"),children:v.jsx(Oe,{size:"small",color:"warning",onClick:h,disabled:c,children:o.visible===!1?v.jsx(be,{icon:"mdi:eye-off-outline"}):v.jsx(be,{icon:"mdi:eye-outline"})})}),v.jsx("span",{title:l(s&&!c?"navigation.action.noDel":"navigation.action.del"),children:v.jsx(Oe,{disabled:s&&!c,size:"small",color:"error",onClick:p,children:v.jsx(be,{icon:"mdi:delete"})})})]})}Sd.propTypes={data:S.object.isRequired,className:S.string,add:S.func,edit:S.func,toggle:S.func,del:S.func,section:S.string};const xn=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",nS=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},iS=(e,r="en")=>{if(typeof e=="string"){if(dd(e)){const t=new URL(e);return t.searchParams.set("locale",r),t.href}if(fd(e))return e;const n=new URL(e,window.location.origin);return n.searchParams.set("locale",r),n.pathname+n.search}return typeof e=="object"?e[r]||e?.en||e?.zh:e},Qt=(e,r="en")=>{if(!e?.length)return e;const n=(t,i)=>t&&typeof t=="object"?t[i]||t?.en||t?.zh:t;return At(e,t=>({...t,title:n(t.title,r),description:n(t.description,r),link:t.items?.length?t.link:iS(t.link,r),_rawLink:t.link}),"items")},oS=e=>At(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),aS=e=>{if(!e?.length)return null;const r=oS(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=nS(r.theme),r.navigation=aS(lS(r.navigation)),r},lS=(e=[])=>ta(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),xd=(e,r)=>ta(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"),sS={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"/>'},cS={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 uS({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},l=(a.navigation||[]).filter(h=>h.section==="sessionManager"&&!["/sessionManager"].includes(h.id)).filter(h=>!!(h?.role||[]).includes(e?.user?.role||"guest")).map(h=>{const p=(a?.componentMountPoints||[]).find(g=>h.component===g.name);return{...h,component:p}}),s=Et(),c=I.useRef(null),u=or({open:!1}),f=ve((h=!u.open)=>{u.open=h}),d=t==="hover"?{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1)}:{onClick:()=>f()};return l.length===0||!e?.user?null:v.jsxs(ie,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...i},...o,...d,children:[v.jsx(Oe,{size:"medium",ref:c,children:v.jsx(be,{icon:sS,fontSize:n,style:{transform:"scale(1.08)"}})}),v.jsx(Ch,{open:u.open,anchorEl:c.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:h})=>v.jsx(Ih,{onClickAway:p=>{p.preventDefault(),p.stopPropagation(),f(!1)},children:v.jsx(yc,{...h,timeout:350,children:v.jsxs(Tr,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[v.jsx(Rh,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:l.map(p=>v.jsx(Dh,{disablePadding:!0,children:v.jsxs(Pp,{href:Oa(p.link,r),sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[p?.component?.did?v.jsx(ie,{component:"img",src:`${Sc}/blocklet/logo-bundle/${p.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):v.jsx(be,{fontSize:50,icon:p.icon||cS,color:s.palette.text.secondary}),v.jsx(Ie,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:Oa(p.title,r)})]})},p.id))}),v.jsx(Th,{session:e,children:v.jsx(bc,{variant:"outlined",fullWidth:!0,href:_h,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const wd=S.shape({appLogo:S.node,appName:S.string,theme:S.shape({background:S.string}),enableConnect:S.bool,enableLocale:S.bool,navigation:S.arrayOf(S.shape({title:S.oneOfType([S.string,S.object]),link:S.oneOfType([S.string,S.object]),icon:S.string,items:S.arrayOf(S.shape({title:S.oneOfType([S.string,S.object]),link:S.oneOfType([S.string,S.object])}))}))}),Cd=S.shape({showText:S.bool,showRole:S.bool,switchDid:S.bool,switchProfile:S.bool,switchPassport:S.bool,disableLogout:S.bool,onLogin:S.func,onLogout:S.func,onSwitchDid:S.func,onSwitchProfile:S.func,onSwitchPassport:S.func,menu:S.array,menuRender:S.func,dark:S.bool,size:S.number}),dS=["admin","owner"],fS=e=>e.endsWith(".ip.abtnet.io"),hS=e=>e.endsWith(".did.abtnet.io"),pS={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:"配置域名"}},gS=1e3*60*60*24*30,Cs=".well-known/service/admin/domains";function Id({locale:e="en",session:r={}}){const n=r?.user,t=Lc(),[i,o]=I.useState(()=>{const d=window.localStorage.getItem("domain-warning-skip");if(!d)return!0;const h=+new Date,p=+new Date(d);return h-p>gS}),a=ve((d,h={})=>xc(pS,d,e,"en",h)),l=I.useMemo(()=>{try{const{hostname:d}=new URL(window.location.href);return d}catch{return""}},[]),s=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=qe(window.location.origin,Cs);d.startsWith("http")&&window.open(d,"_blank"),o(!1)},[]),f=n?.role&&dS.includes(n.role);return window.location.href.includes(Cs)||t||!fS(l)&&!hS(l)?null:v.jsxs(Ph,{open:i,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"sm",onClose:()=>o(!1),children:[v.jsxs(kh,{sx:{padding:"20px !important"},children:[v.jsx(Ie,{sx:{fontSize:"20px",fontWeight:"500"},children:a(f?"owner.title":"guest.title")}),v.jsx(Ie,{sx:{marginTop:"20px",fontSize:"14px",color:"text.secondary"},children:a(f?"owner.description":"guest.description")}),f&&v.jsx(ie,{component:"ul",children:s.map(d=>v.jsx(Ie,{component:"li",sx:{fontSize:"14px",color:"text.secondary"},children:d},d))})]}),v.jsxs(Oh,{sx:{px:"12px !important"},children:[v.jsx(Zt,{onClick:c,children:a("skip")}),f&&v.jsx(Zt,{variant:"contained",onClick:u,children:a("bindDomain")})]})]})}Id.propTypes={locale:S.string,session:S.object};var Pi,Is;function vS(){if(Is)return Pi;Is=1;const e=Eh();return Pi=(r,n=!1)=>{const t=e(["@arcblock/ws",r].join(":"));return{debug:t,warn:t,info:t,trace:n?t:console.error,error:n?t:console.error}},Pi}var ki,Rs;function mS(){if(Rs)return ki;Rs=1;const e=vS();return ki=(r,n,t)=>class extends r{constructor(o,a={}){super(o,{transport:t,...a}),this._logger=e("client",a.silent),this.emitter=new n,this.onOpen(()=>{this._logger.debug("socket open",o)}),this.onClose(()=>{this._logger.debug("socket close",o)}),this.onError(l=>{this._logger.error("socket error",l.error)}),this.onMessage(l=>{this._logger.debug("socket message",l)})}on(o,a,l={}){this.ensureJoinChannel(o,l),this.emitter.on(o,a)}off(o,a){a?this.emitter.off(o,a):this.emitter.removeAllListeners(o),this.ensureLeaveChannel(o)}disconnect(o,a,l){this.emitter.eventNames().forEach(s=>{this.emitter.removeAllListeners(s)}),super.disconnect(o,a,l)}ensureJoinChannel(o,a={}){if(this.emitter.listenerCount(o)>0)return;const s=this.channel(o,a);s.join().receive("ok",c=>{this._logger.debug("join success",{topic:o,message:c})}).receive("error",c=>{this._logger.error("join error",{topic:o,error:c})}).receive("timeout",()=>{this._logger.debug("join timeout",{topic:o})}),s.on(o,({status:c,response:u})=>{c==="ok"?this.emitter.emit(o,u):this._logger.debug("response error",{topic:o,status:c,data:u})})}ensureLeaveChannel(o){if(this.emitter.listenerCount(o)>0)return;const l=this.channels.find(s=>s.topic===o);l&&(this.remove(l),l.leave().receive("ok",s=>{this._logger.debug("leave success",{topic:o,message:s})}).receive("error",s=>{this._logger.error("leave error",{topic:o,err:s})}).receive("timeout",()=>{this._logger.debug("leave timeout",{topic:o})}),l.off(o))}subscribe(o,a={}){let l=this.channels.find(s=>s.topic===o);return l||(l=this.channel(o,a),l.join().receive("ok",s=>{this._logger.debug("join success",{topic:o,message:s})}).receive("error",s=>{this._logger.error("join error",{topic:o,error:s})}).receive("timeout",()=>{this._logger.debug("join timeout",{topic:o})}),l)}unsubscribe(o){this.ensureLeaveChannel(o)}},ki}var Oi,Ds;function bS(){if(Ds)return Oi;Ds=1;const e=Nh(),{Socket:r}=Mh();return Oi=mS()(r,e),Oi}var Ei,Ts;function yS(){return Ts||(Ts=1,Ei={WsClient:bS()}),Ei}var SS=yS();const Rt={};function xS(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=qe(r,Sc,e);return new SS.WsClient(n,{heartbeatIntervalMs:100*1e3})}function wS(e="admin"){return Rt[e]||(Rt[e]=xS(e)),Rt[e]}const CS=(e="admin")=>{const r=I.use(Bn),{session:n}=r??{};return!Rt[e]&&n.user&&(Rt[e]=wS(e),Rt[e].connect()),Rt[e]},IS={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>'},RS={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"/>'},DS={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 TS(){const e=Et();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=Fn(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const _S=e=>!ko(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,PS=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},kS=async(e,r)=>{try{return await kp.user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},OS=async(e,r)=>{const{type:n,did:t}=e;return wc.isSameAddr(n,"did")?await kS(t,r)||Cn.getLink(e):Cn.getLink(e)},ES=async(e,r,n=!0)=>{const t=Cn.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof Cn.Link){if(n){const o=await OS(i,r),{type:a,chainId:l,did:s}=i;return wc.isSameAddr(a,"dapp")?`<em class="dapp" data-type="${a}" data-chain-id="${l}" data-did="${s}">${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="${l}" data-did="${s}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))},NS=e=>Ah.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),MS={comment:(e,r)=>r&&r>1?v.jsxs(v.Fragment,{children:["left ",r," comments on your ",e]}):v.jsxs(v.Fragment,{children:["commented on your ",e]}),like:e=>v.jsxs(v.Fragment,{children:["liked your ",e]}),follow:()=>v.jsx(v.Fragment,{children:"followed you"}),tips:e=>v.jsxs(v.Fragment,{children:["gave tips to your ",e]}),mention:e=>v.jsxs(v.Fragment,{children:["mentioned you in ",e]}),assign:()=>v.jsx(v.Fragment,{children:"assigned you a task"})};function Wt({user:e,color:r=void 0}){const{palette:n}=Et(),t=Oo(qe(Ce.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return v.jsx(Cc,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Wt.displayName="UserLink";function AS({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=Et(),{type:a,target:l}=e||{},{type:s}=l||{},{linkColor:c=o.text.primary}=t||{},u=Ae(()=>{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=Ae(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),d=ve(()=>{if(!Array.isArray(f)||f.length===0)return null;if(f.length===1)return v.jsx(Wt,{user:f[0],color:c});const m=f.slice(0,-1),y=f[f.length-1];if(f.length===2)return v.jsxs(v.Fragment,{children:[v.jsx(Wt,{user:m[0],color:c})," and ",v.jsx(Wt,{user:y,color:c})]});const b=f.length>3,w=b?f.slice(0,2):m;return v.jsxs(v.Fragment,{children:[w.map((D,P)=>v.jsxs(Z.Fragment,{children:[v.jsx(Wt,{user:D,color:c}),P<w.length-1?", ":""]},D.did)),b?`, and ${f.length-2} others`:v.jsxs(v.Fragment,{children:[", and ",v.jsx(Wt,{user:y,color:c})]})]})}),h=ve(()=>{const m=a?MS[a]:null;return m?m(s,r.length):null}),p=Ae(()=>{const m=d(),y=h();return!m||!y?null:v.jsxs(v.Fragment,{children:[m," ",y]})},[a,s,f,d,h]),g=Ae(()=>{if(!e)return null;const m=PS(e);return m?.targetLink?qe(i,m.targetLink):null},[e,i]);return!a||ko(l)?null:v.jsxs(v.Fragment,{children:[p," ",g&&v.jsx(Cc,{href:g,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:l.name})]})}const LS={normal:Ea,success:IS,info:Ea,warning:RS,error:DS},zS=ar(Fh)`
|
|
43
|
+
*/const $u=Object.freeze({left:0,top:0,width:16,height:16}),Tn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Qr=Object.freeze({...$u,...Tn}),lo=Object.freeze({...Qr,body:"",hidden:!1}),Gb=Object.freeze({width:null,height:null}),Wu=Object.freeze({...Gb,...Tn});function $b(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 Wb=/[\s,]+/;function Hb(e,r){r.split(Wb).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Hu={...Wu,preserveAspectRatio:""};function es(e){const r={...Hu},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=$b(n("rotate","")),Hb(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function Ub(e,r){for(const n in Hu)if(e[n]!==r[n])return!0;return!1}const Or=/^[a-z0-9]+(-[a-z0-9]+)*$/,Xr=(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 l=i.pop(),s=i.pop(),c={provider:i.length>0?i[0]:t,prefix:s,name:l};return r&&!yn(c)?null:c}const o=i[0],a=o.split("-");if(a.length>1){const l={provider:t,prefix:a.shift(),name:a.join("-")};return r&&!yn(l)?null:l}if(n&&t===""){const l={provider:t,prefix:"",name:o};return r&&!yn(l,n)?null:l}return null},yn=(e,r)=>e?!!((e.provider===""||e.provider.match(Or))&&(r&&e.prefix===""||e.prefix.match(Or))&&e.name.match(Or)):!1;function qb(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 ts(e,r){const n=qb(e,r);for(const t in lo)t in Tn?t in e&&!(t in n)&&(n[t]=Tn[t]):t in r?n[t]=r[t]:t in e&&(n[t]=e[t]);return n}function Vb(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 l=t[a]&&t[a].parent,s=l&&o(l);s&&(i[a]=[l].concat(s))}return i[a]}return Object.keys(n).concat(Object.keys(t)).forEach(o),i}function Kb(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(l){o=ts(t[l]||i[l],o)}return a(r),n.forEach(a),ts(e,o)}function Uu(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=Vb(e);for(const i in t){const o=t[i];o&&(r(i,Kb(e,i,o)),n.push(i))}return n}const Yb={provider:"",aliases:{},not_found:{},...$u};function Ri(e,r){for(const n in r)if(n in e&&typeof e[n]!=typeof r[n])return!1;return!0}function qu(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!Ri(e,Yb))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(Or)||typeof o.body!="string"||!Ri(o,lo))return null}const t=r.aliases||Object.create(null);for(const i in t){const o=t[i],a=o.parent;if(!i.match(Or)||typeof a!="string"||!n[a]&&!t[a]||!Ri(o,lo))return null}return r}const _n=Object.create(null);function Jb(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function gt(e,r){const n=_n[e]||(_n[e]=Object.create(null));return n[r]||(n[r]=Jb(e,r))}function Jo(e,r){return qu(r)?Uu(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function Qb(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function Xb(e,r){let n=[];return(typeof e=="string"?[e]:Object.keys(_n)).forEach(i=>{(typeof i=="string"&&typeof r=="string"?[r]:Object.keys(_n[i]||{})).forEach(a=>{const l=gt(i,a);n=n.concat(Object.keys(l.icons).map(s=>(i!==""?"@"+i+":":"")+a+":"+s))})}),n}let jr=!1;function Vu(e){return typeof e=="boolean"&&(jr=e),jr}function Fr(e){const r=typeof e=="string"?Xr(e,!0,jr):e;if(r){const n=gt(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function Ku(e,r){const n=Xr(e,!0,jr);if(!n)return!1;const t=gt(n.provider,n.prefix);return Qb(t,n.name,r)}function rs(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),jr&&!r&&!e.prefix){let i=!1;return qu(e)&&(e.prefix="",Uu(e,(o,a)=>{a&&Ku(o,a)&&(i=!0)})),i}const n=e.prefix;if(!yn({provider:r,prefix:n,name:"a"}))return!1;const t=gt(r,n);return!!Jo(t,e)}function Zb(e){return!!Fr(e)}function ey(e){const r=Fr(e);return r?{...Qr,...r}:null}function ty(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,l=i.name,s=n[o]||(n[o]=Object.create(null)),c=s[a]||(s[a]=gt(o,a));let u;l in c.icons?u=r.loaded:a===""||c.missing.has(l)?u=r.missing:u=r.pending;const f={provider:o,prefix:a,name:l};u.push(f)}),r}function Yu(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function ry(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,l=a.pending.length;a.pending=a.pending.filter(s=>{if(s.prefix!==i)return!0;const c=s.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!==l&&(n||Yu([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let ny=0;function iy(e,r,n){const t=ny++,i=Yu.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 so=Object.create(null);function ns(e,r){so[e]=r}function co(e){return so[e]||so[""]}function oy(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?Xr(i,r,n):i;o&&t.push(o)}),t}var ay={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ly(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 x=e.resources.slice(0);for(a=[];x.length>1;){const T=Math.floor(Math.random()*x.length);a.push(x[T]),x=x.slice(0,T).concat(x.slice(T+1))}a=a.concat(x)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const l=Date.now();let s="pending",c=0,u,f=null,d=[],h=[];typeof t=="function"&&h.push(t);function p(){f&&(clearTimeout(f),f=null)}function g(){s==="pending"&&(s="aborted"),p(),d.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),d=[]}function m(x,T){T&&(h=[]),typeof x=="function"&&h.push(x)}function y(){return{startTime:l,payload:r,status:s,queriesSent:c,queriesPending:d.length,subscribe:m,abort:g}}function b(){s="failed",h.forEach(x=>{x(void 0,u)})}function w(){d.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),d=[]}function D(x,T,C){const _=T!=="success";switch(d=d.filter(R=>R!==x),s){case"pending":break;case"failed":if(_||!e.dataAfterTimeout)return;break;default:return}if(T==="abort"){u=C,b();return}if(_){u=C,d.length||(a.length?P():b());return}if(p(),w(),!e.random){const R=e.resources.indexOf(x.resource);R!==-1&&R!==e.index&&(e.index=R)}s="completed",h.forEach(R=>{R(C)})}function P(){if(s!=="pending")return;p();const x=a.shift();if(x===void 0){if(d.length){f=setTimeout(()=>{p(),s==="pending"&&(w(),b())},e.timeout);return}b();return}const T={status:"pending",resource:x,callback:(C,_)=>{D(T,C,_)}};d.push(T),c++,f=setTimeout(P,e.rotate),n(x,r,T.callback)}return setTimeout(P),y}function Ju(e){const r={...ay,...e};let n=[];function t(){n=n.filter(l=>l().status==="pending")}function i(l,s,c){const u=ly(r,l,s,(f,d)=>{t(),c&&c(f,d)});return n.push(u),u}function o(l){return n.find(s=>l(s))||null}return{query:i,find:o,setIndex:l=>{r.index=l},getIndex:()=>r.index,cleanup:t}}function Qo(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 qn=Object.create(null),mr=["https://api.simplesvg.com","https://api.unisvg.com"],Sn=[];for(;mr.length>0;)mr.length===1||Math.random()>.5?Sn.push(mr.shift()):Sn.push(mr.pop());qn[""]=Qo({resources:["https://api.iconify.design"].concat(Sn)});function is(e,r){const n=Qo(r);return n===null?!1:(qn[e]=n,!0)}function Vn(e){return qn[e]}function sy(){return Object.keys(qn)}function os(){}const Di=Object.create(null);function cy(e){if(!Di[e]){const r=Vn(e);if(!r)return;const n=Ju(r),t={config:r,redundancy:n};Di[e]=t}return Di[e]}function Qu(e,r,n){let t,i;if(typeof e=="string"){const o=co(e);if(!o)return n(void 0,424),os;i=o.send;const a=cy(e);a&&(t=a.redundancy)}else{const o=Qo(e);if(o){t=Ju(o);const a=e.resources?e.resources[0]:"",l=co(a);l&&(i=l.send)}}return!t||!i?(n(void 0,424),os):t.query(r,i,n)().abort}const as="iconify2",Br="iconify",Xu=Br+"-count",ls=Br+"-version",Zu=36e5,uy=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 ss(e,r){try{e.removeItem(r)}catch{}}function fo(e,r){return Xo(e,Xu,r.toString())}function ho(e){return parseInt(uo(e,Xu))||0}const Pt={local:!0,session:!0},ed={local:new Set,session:new Set};let Zo=!1;function dy(e){Zo=e}let ln=typeof window>"u"?{}:window;function td(e){const r=e+"Storage";try{if(ln&&ln[r]&&typeof ln[r].length=="number")return ln[r]}catch{}Pt[e]=!1}function rd(e,r){const n=td(e);if(!n)return;const t=uo(n,ls);if(t!==as){if(t){const l=ho(n);for(let s=0;s<l;s++)ss(n,Br+s.toString())}Xo(n,ls,as),fo(n,0);return}const i=Math.floor(Date.now()/Zu)-uy,o=l=>{const s=Br+l.toString(),c=uo(n,s);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,l))return!0}catch{}ss(n,s)}};let a=ho(n);for(let l=a-1;l>=0;l--)o(l)||(l===a-1?(a--,fo(n,a)):ed[e].add(l))}function nd(){if(!Zo){dy(!0);for(const e in Pt)rd(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=gt(t,i);if(!Jo(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function fy(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in Pt)rd(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function hy(e,r){Zo||nd();function n(t){let i;if(!Pt[t]||!(i=td(t)))return;const o=ed[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=ho(i),!fo(i,a+1))return;const l={cached:Math.floor(Date.now()/Zu),provider:e.provider,data:r};return Xo(i,Br+a.toString(),JSON.stringify(l))}r.lastModified&&!fy(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function cs(){}function py(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,ry(e)}))}function gy(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(l=>{Qu(n,l,s=>{if(typeof s!="object")l.icons.forEach(c=>{e.missing.add(c)});else try{const c=Jo(e,s);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(f=>{u.delete(f)}),hy(e,s)}catch(c){console.error(c)}py(e)})})}))}const ea=(e,r)=>{const n=oy(e,!0,Vu()),t=ty(n);if(!t.pending.length){let s=!0;return r&&setTimeout(()=>{s&&r(t.loaded,t.missing,t.pending,cs)}),()=>{s=!1}}const i=Object.create(null),o=[];let a,l;return t.pending.forEach(s=>{const{provider:c,prefix:u}=s;if(u===l&&c===a)return;a=c,l=u,o.push(gt(c,u));const f=i[c]||(i[c]=Object.create(null));f[u]||(f[u]=[])}),t.pending.forEach(s=>{const{provider:c,prefix:u,name:f}=s,d=gt(c,u),h=d.pendingIcons||(d.pendingIcons=new Set);h.has(f)||(h.add(f),i[c][u].push(f))}),o.forEach(s=>{const{provider:c,prefix:u}=s;i[c][u].length&&gy(s,i[c][u])}),r?iy(r,t,o):cs},vy=e=>new Promise((r,n)=>{const t=typeof e=="string"?Xr(e,!0):e;if(!t){n(e);return}ea([t||e],i=>{if(i.length&&t){const o=Fr(t);if(o){r({...Qr,...o});return}}n(e)})});function my(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"?Xr(e,!0,!0):null;if(!n){const o=my(e);return{value:e,data:o}}const t=Fr(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=ea([n],()=>r(e,n,Fr(n)));return{value:e,name:n,loading:i}}function Ti(e){return e.hasAttribute("inline")}let id=!1;try{id=navigator.vendor.indexOf("Apple")===0}catch{}function yy(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(id||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const Sy=/(-?[0-9.]*[0-9]+[0-9.]*)/g,xy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function po(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(Sy);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=xy.test(o);for(;;){if(a){const l=parseFloat(o);isNaN(l)?i.push(o):i.push(Math.ceil(l*r*n)/n)}else i.push(o);if(o=t.shift(),o===void 0)return i.join("");a=!a}}const wy=e=>e==="unset"||e==="undefined"||e==="none";function od(e,r){const n={...Qr,...e},t={...Wu,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(p=>{const g=[],m=p.hFlip,y=p.vFlip;let b=p.rotate;m?y?b+=2:(g.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),g.push("scale(-1 1)"),i.top=i.left=0):y&&(g.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),g.push("scale(1 -1)"),i.top=i.left=0);let w;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:w=i.height/2+i.top,g.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:g.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:w=i.width/2+i.left,g.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}b%2===1&&(i.left!==i.top&&(w=i.left,i.left=i.top,i.top=w),i.width!==i.height&&(w=i.width,i.width=i.height,i.height=w)),g.length&&(o='<g transform="'+g.join(" ")+'">'+o+"</g>")});const a=t.width,l=t.height,s=i.width,c=i.height;let u,f;a===null?(f=l===null?"1em":l==="auto"?c:l,u=po(f,s/c)):(u=a==="auto"?s:a,f=l===null?po(u,c/s):l==="auto"?c:l);const d={},h=(p,g)=>{wy(g)||(d[p]=g.toString())};return h("width",u),h("height",f),d.viewBox=i.left.toString()+" "+i.top.toString()+" "+s.toString()+" "+c.toString(),{attributes:d,body:o}}const Cy=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Pn=Cy();function Iy(e){Pn=e}function Ry(){return Pn}function Dy(e,r){const n=Vn(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 Ty(e){return e===404}const _y=(e,r,n)=>{const t=[],i=Dy(e,r),o="icons";let a={type:o,provider:e,prefix:r,icons:[]},l=0;return n.forEach((s,c)=>{l+=s.length+1,l>=i&&c>0&&(t.push(a),a={type:o,provider:e,prefix:r,icons:[]},l=s.length),a.icons.push(s)}),t.push(a),t};function Py(e){if(typeof e=="string"){const r=Vn(e);if(r)return r.path}return"/"}const ky=(e,r,n)=>{if(!Pn){n("abort",424);return}let t=Py(r.provider);switch(r.type){case"icons":{const o=r.prefix,l=r.icons.join(","),s=new URLSearchParams({icons:l});t+=o+".json?"+s.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;Pn(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(Ty(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)})},Oy={prepare:_y,send:ky};function us(e,r){switch(e){case"local":case"session":Pt[e]=r;break;case"all":for(const n in Pt)Pt[n]=r;break}}const _i="data-style";let ad="";function Ey(e){ad=e}function ds(e,r){let n=Array.from(e.childNodes).find(t=>t.hasAttribute&&t.hasAttribute(_i));n||(n=document.createElement("style"),n.setAttribute(_i,_i),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(r?"-0.125em":"0")+"}span,svg{display:block}"+ad}function ld(){ns("",Oy),Vu(!0);let e;try{e=window}catch{}if(e){if(nd(),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"||!rs(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;is(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>us(n,!0),disableCache:n=>us(n,!1),iconExists:Zb,getIcon:ey,listIcons:Xb,addIcon:Ku,addCollection:rs,calculateSize:po,buildIcon:od,loadIcons:ea,loadIcon:vy,addAPIProvider:is,appendCustomStyle:Ey,_api:{getAPIConfig:Vn,setAPIModule:ns,sendAPIQuery:Qu,setFetch:Iy,getFetch:Ry,listAPIProviders:sy}}}function sd(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 Ny(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function My(e){return"data:image/svg+xml,"+Ny(e)}function Ay(e){return'url("'+My(e)+'")'}const go={"background-color":"currentColor"},cd={"background-color":"transparent"},fs={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},hs={"-webkit-mask":go,mask:go,background:cd};for(const e in hs){const r=hs[e];for(const n in fs)r[e+"-"+n]=fs[n]}function ps(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Ly(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=sd(i,{...o,width:r.width+"",height:r.height+""}),l=Ay(a),s=t.style,c={"--svg":l,width:ps(o.width),height:ps(o.height),...n?go:cd};for(const u in c)s.setProperty(u,c[u]);return t}let Er;function zy(){try{Er=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Er=null}}function jy(e){return Er===void 0&&zy(),Er?Er.createHTML(e):e}function Fy(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=sd(e.body,n);return r.innerHTML=jy(i),r.firstChild}function gs(e,r){const n=r.icon.data,t=r.customisations,i=od(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=Fy(i);break;default:a=Ly(i,{...Qr,...n},o==="mask")}const l=Array.from(e.childNodes).find(s=>{const c=s.tagName&&s.tagName.toUpperCase();return c==="SPAN"||c==="SVG"});l?a.tagName==="SPAN"&&l.tagName===a.tagName?l.setAttribute("style",a.getAttribute("style")):e.replaceChild(a,l):e.appendChild(a)}function vs(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function By(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 l=this._shadowRoot=this.attachShadow({mode:"open"}),s=Ti(this);ds(l,s),this._state=vs({value:""},s),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(l){if(l==="inline"){const s=Ti(this),c=this._state;s!==c.inline&&(c.inline=s,ds(this._shadowRoot,s))}else this._queueCheck()}get icon(){const l=this.getAttribute("icon");if(l&&l.slice(0,1)==="{")try{return JSON.parse(l)}catch{}return l}set icon(l){typeof l=="object"&&(l=JSON.stringify(l)),this.setAttribute("icon",l)}get inline(){return Ti(this)}set inline(l){l?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const l=this._state;if(l.rendered){const s=this._shadowRoot;if(l.renderedMode==="svg")try{s.lastChild.setCurrentTime(0);return}catch{}gs(s,l)}}get status(){const l=this._state;return l.rendered?"rendered":l.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const l=this._state,s=this.getAttribute("icon");if(s!==l.icon.value){this._iconChanged(s);return}if(!l.rendered)return;const c=this.getAttribute("mode"),u=es(this);(l.attrMode!==c||Ub(l.customisations,u))&&this._renderIcon(l.icon,u,c)}_iconChanged(l){const s=by(l,(c,u,f)=>{const d=this._state;if(d.rendered||this.getAttribute("icon")!==c)return;const h={value:c,name:u,data:f};h.data?this._gotIconData(h):d.icon=h});s.data?this._gotIconData(s):this._state=vs(s,this._state.inline,this._state)}_gotIconData(l){this._checkQueued=!1,this._renderIcon(l,es(this),this.getAttribute("mode"))}_renderIcon(l,s,c){const u=yy(l.data.body,c),f=this._state.inline;gs(this._shadowRoot,this._state={rendered:!0,icon:l,inline:f,customisations:s,attrMode:c,renderedMode:u})}};i.forEach(l=>{l in o.prototype||Object.defineProperty(o.prototype,l,{get:function(){return this.getAttribute(l)},set:function(s){s!==null?this.setAttribute(l,s):this.removeAttribute(l)}})});const a=ld();for(const l in a)o[l]=o.prototype[l]=a[l];return r.define(e,o),o}const Gy=By()||ld(),{enableCache:XR,disableCache:ZR,iconExists:eD,getIcon:tD,listIcons:rD,addIcon:nD,addCollection:iD,calculateSize:oD,buildIcon:aD,loadIcons:lD,loadIcon:sD,addAPIProvider:cD,_api:uD}=Gy,At=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:At(t[n],r,n)}):r(t)),ud=(e,r="children")=>{const n=[];return At(e,t=>n.push(t),r),n},ta=(e,r,n="children")=>e.map(t=>({...t})).filter(t=>{const i=t[n];if(Array.isArray(i)){const a=ta(i,r,n);t[n]=a?.length?a:void 0}const o={filteredChildren:t[n],isLeaf:!i?.length};return r(t,o)}),dd=e=>/^https?:\/\//.test(e),fd=e=>/^mailto:/i.test(e.trim()),$y=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)},hd=(e=[])=>{const r=e.map((n,t)=>({path:n,index:t})).filter(n=>$y(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},Wy=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,l=e.reduce((p,g)=>p+i+(g[a]?.length||0)*o,0),s=Math.ceil(l/n),c=[[]];let u=0,f=0;const d=s*.2,h=p=>f>s-d&&u<n-1&&f+p>s+d;return e.forEach(p=>{const g=i+(p[a]?.length||0)*o;t&&h(i)&&(u++,f=0,c[u]=[]),!t&&f>0&&h(g)&&(u++,f=0,c[u]=[]),c[u].push({...p,group:!0}),f+=i,p[a]&&p[a].forEach(m=>{t&&h(o)&&(u++,f=0,c[u]=[]),c[u].push({...m,group:!1}),f+=o})}),c};function Qe({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),[l,s]=I.useState(!0);if(To(async()=>{s(!0);try{await _o(e),a(!0)}catch{a(!1)}s(!1)},[e]),t.variant||i.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),dd(e))return v.jsx(ii,{component:"span",...t,src:e,sx:i});const c=r?.6*r+4:0;return l?v.jsx(be,{icon:"codicon:blank",height:c||void 0}):o?v.jsx(ii,{component:"span",...t,sx:i,children:v.jsx(be,{icon:e,height:c||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),v.jsx(ii,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}const Hy=e=>e.from!=="team-tmpl";function Uy({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&ph(e.slice(0,t-1),r.slice(0,i-1)))}function pd({treeNode:e}){const{locale:r}=Ee(),{blocklet:n}=Nt(),t=n.environments.find(a=>a.key===kt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),i=ve(a=>{if(a?.startsWith("/"))try{return new URL(a,t?.value).href}catch{console.error("Failed to parse url",{url:a,origin:t?.value})}return a});function o(){const{title:a,subtitle:l}=e;let s=a,c=l;return Yt(a)&&(s=a[r]),!I.isValidElement(l)&&Yt(l)&&(c=l[r]),v.jsxs(ie,{sx:{display:"flex",alignItems:"center"},children:[v.jsx(Ie,{variant:"subtitle1",sx:{fontSize:16},children:s}),l&&v.jsx(Ie,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:c})]})}return v.jsxs(v.Fragment,{children:[e.icon&&(Po(i(e.icon))?v.jsx(Qe,{size:16,style:{marginRight:4},icon:i(e.icon)}):v.jsx(be,{size:16,style:{marginRight:4},icon:e.icon})),o()]})}pd.propTypes={treeNode:S.object.isRequired};const qy=mt(ie)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function gd({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),v.jsx(qy,{children:v.jsx(fp,{backend:hp,...i,children:v.jsx(Av,{generateNodeProps:o=>{const a=Hy(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?v.jsx(be,{icon:"ic:round-drag-indicator"}):v.jsx(ie,{sx:{width:16,height:16}}),title:v.jsx(pd,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:Uy,theme:Bb})})})}gd.propTypes={treeData:S.object.isRequired,setTreeData:S.func,renderActions:S.func};var Vy=dc();const Ky=zn(Vy),sn="en";function vd({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},locale:t=sn,locales:i=[],localeMap:o={},onRemoveLocale:a=()=>{}}){const{t:l}=Ee(),s=I.useRef(),[c,u]=I.useState(null),f=or({localeList:[],inputLocale:"",localeError:""}),d=I.useMemo(()=>!!c,[c]),h=I.useMemo(()=>i.includes(t)?t:sn,[i,t]),p=I.useMemo(()=>Object.keys(Dt(o,[...f.localeList,sn])).map(x=>({title:o[x],value:x})),[f.localeList]),g=I.useMemo(()=>`Default (${o[sn]||Object.values(o)?.[0]})`,[o]);I.useEffect(()=>{f.localeList=[...i]},[i,f]),lp("enter",()=>{setTimeout(()=>{b()})},{target:s});function m(x){return x?x==="en"||f.localeList.includes(x)?l("navigation.form.localeExists",{value:x}):!0:l("common.requiredErrorText",{name:"Locale"})}function y(x=""){const T=x?.trim(),C=m(T);return C!==!0?f.localeError=C:f.localeError="",C}function b(){const x=f.inputLocale?.trim();y(x)===!0&&(w(),f.localeList.push(x),r(x))}function w(){u(null),f.inputLocale="",f.localeError=""}function D(x,T){x.preventDefault(),x.stopPropagation(),f.localeList=zc(f.localeList,T),a(T)}function P(x){const{value:T}=x.target;y(T),f.inputLocale=T}return v.jsxs(v.Fragment,{children:[v.jsxs(Rp,{sx:e,value:h,onChange:(x,T)=>{n(T)},children:[v.jsx(Ga,{label:g,value:"en"}),f.localeList.map(x=>v.jsx(Ga,{sx:{position:"relative"},label:v.jsxs(v.Fragment,{children:[o[x],v.jsx(Oe,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:T=>{D(T,x)},children:v.jsx(be,{icon:"mdi:close",height:14})})]}),value:x},x)),v.jsx(Oe,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:x=>{u(x.currentTarget)},children:v.jsx(be,{icon:"mdi:plus"})})]}),v.jsx(Hi,{open:d,anchorEl:c,onClose:w,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:v.jsxs(ie,{sx:{p:2,width:"270px"},children:[v.jsx(Ie,{variant:"subtitle2",children:l("navigation.form.localePlaceholder")}),v.jsx(ie,{sx:{mt:1},children:v.jsx(Ki,{required:!0,fullWidth:!0,label:"Locale",value:f.inputLocale,options:p,onChange:P,error:!!f.localeError,helperText:f.localeError||" "})}),v.jsx(ie,{sx:{display:"flex",justifyContent:"flex-end"},children:v.jsx(Zt,{size:"small",variant:"contained",onClick:b,children:l("common.confirm")})})]})})]})}vd.propTypes={sx:S.any,onAdd:S.func,onChange:S.func,onRemoveLocale:S.func,locale:S.string,localeMap:S.object,locales:S.array};const ra=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function md(e,r,n=5e3){for(const t of ra){const i=qe(t,e);try{return await Tp.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 Yy({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 md("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const cn=new Map;async function Jy(e){if(cn.has(e))return cn.get(e);const r=(async()=>{const{data:n}=await md("/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)})();cn.set(e,r);try{return await r}catch(n){throw cn.delete(e),n}}function Qy(e){return qe(ra[0],`${e}.svg`)}function Xy(e){try{const r=new URL(e);for(const n of ra)if(r.origin===n)return gh(r.pathname).replace(".svg","");return""}catch{return""}}function Zy(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):Po(e)&&(n=Xy(e))),{isIconId:r,iconId:n}}const eS=I.lazy(()=>Sh(()=>import("./index-D9XGO23S.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}))),ms=Ve(Qe)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function bd({icon:e,...r}){const[n,t]=I.useState(!1);return To(async()=>{t(!1),await _o(e),t(!0)},[e]),e?n?v.jsx(be,{icon:e,...r}):v.jsx(be,{color:"#f06f6e",icon:"ic:baseline-error",...r}):v.jsx(be,{icon:"material-symbols-light:select-rounded",...r})}bd.propTypes={icon:S.string.isRequired};function vo({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:l,prefix:s,inService:c}=pc(),{blocklet:u}=Nt(),f=Fn(ee=>ee.breakpoints.down("md")),d=u.environments.find(ee=>ee.key===kt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),h=l(),p=I.useRef(null),g=I.useRef(null),m=I.useRef(null),{t:y,locale:b}=Ee(),{isIconId:w,iconId:D}=Zy(e),[P,x]=I.useState(null),{onChange:T,onBlur:C,sx:_,...R}=a,E=i.includes("upload"),j=i.includes("select"),N=qe(s,"/api/media/upload",u.appPid),U=or({showPopover:!1}),z=ve(ee=>{if(ee?.startsWith("/"))try{const q=c?window.location.origin:d?.value;return new URL(ee,q).href}catch{console.error("Failed to resolve url: ",ee)}return ee},[d?.value,c]),G=ve(async ee=>await p.current.getUploader().uploadFile(ee)),W=ve(()=>{x(null)}),V=ve(()=>{j&&x(m.current)}),Q=ve(async ee=>{try{if(o==="url"){const q=Qy(ee),re=await vh(q,{width:128,height:128}),F=await mh(re,ee);await G(F)}else T?.(ee)}catch(q){console.error("Failed to pick icon:",q)}W()}),te=ve(ee=>{ee.stopPropagation(),g.current.open(),W()}),X=ve(ee=>{a?.onChange?.(ee.data.url)});return v.jsxs(v.Fragment,{children:[v.jsx(Ht,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},..._},onClick:j?V:void 0,...R,label:n,placeholder:t,slotProps:{input:{ref:m,readOnly:!0,startAdornment:v.jsx(Ui,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(U.showPopover=!0)},onMouseLeave:()=>{U.showPopover=!1},children:v.jsx(ms,{size:28,icon:z(e),alt:"Error"})}),endAdornment:v.jsxs(Ui,{position:"end",children:[v.jsx(Oe,{sx:{visibility:e?"visible":"hidden"},onClick:ee=>{ee.stopPropagation(),T("")},children:v.jsx(Ac,{style:{fontSize:18}})}),E&&v.jsx(bh,{title:y("common.upload"),children:v.jsx(Oe,{disableFocusRipple:!1,disableRipple:!1,onClick:te,children:v.jsx(bd,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),j&&v.jsx(ie,{component:Dp,sx:{mr:"-6px",fontSize:24,transform:P?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),j&&v.jsx(Hi,{open:!!P,anchorEl:P,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...f&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:W,children:v.jsx(yd,{label:n,placeholder:t,value:w?D:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:Q,onClose:W})}),v.jsx(mo,{ref:p,locale:b,apiPath:N,headers:h,imageEditorProps:{},onUploadFinish:X}),v.jsx(mo,{ref:g,locale:b,apiPath:N,headers:h,onUploadFinish:X}),v.jsx(Hi,{sx:{pointerEvents:"none"},open:U.showPopover,anchorEl:m.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{U.showPopover=!1},disableRestoreFocus:!0,children:v.jsx(ms,{size:120,icon:z(e),alt:"Error"})})]})}vo.propTypes={value:S.string.isRequired,label:S.any,placeholder:S.any,helperText:S.string,methods:S.arrayOf(S.oneOf(["select","upload"])),iconifyShape:S.oneOf(["id","url"])};function yd({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[l,s]=I.useState([]),[c,u]=I.useState(!0),[f,d]=I.useState(n),[h,p]=I.useState(!1),g=I.useRef(null),m=I.useRef([]),y=I.useRef(1),b=I.useRef(!0),{t:w}=Ee(),D=96,P=ve(()=>{!b.current||c||(u(!0),setTimeout(()=>{const C=y.current+1,_=(C-1)*D,R=C*D,E=m.current.slice(_,R);s(j=>[...j,...E]),y.current=C,b.current=R<m.current.length,u(!1)},300))}),x=ve(C=>{m.current=C,y.current=1,b.current=C.length>D;const _=C.slice(0,D);s(_),p(C.length===0),b.current&&P()}),{run:T}=gc(async C=>{if(C){u(!0);try{const{icons:_}=await Yy({keyword:C});x(_)}catch(_){console.error("Failed to search icons:",_),p(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return I.useEffect(()=>{const C=()=>{if(!g.current)return;const{scrollTop:R,scrollHeight:E,clientHeight:j}=g.current;(R+j>=E-150||E<=j)&&P()},_=g.current;return _&&(_.addEventListener("scroll",C),C()),()=>{_&&_.removeEventListener("scroll",C)}},[P,c]),To(async()=>{if(f)T(f);else{u(!0);try{const C=await Jy("mdi-light");x(C)}catch(C){console.error("Failed to fetch default icons:",C),p(!0)}finally{u(!1)}}},[f,T,x]),v.jsxs(tS,{ref:g,sx:t,...a,children:[v.jsxs(ie,{className:"icon-picker-input",children:[v.jsx(Ht,{label:w("navigation.form.searchIcons"),placeholder:w("navigation.form.searchIconsPlaceholder"),size:"small",value:f,sx:{flexGrow:1},autoFocus:!0,onChange:C=>d(C.target.value),slotProps:{input:{endAdornment:v.jsx(Oe,{sx:{visibility:f?"visible":"hidden"},onClick:()=>d(""),children:v.jsx(Ac,{style:{fontSize:18}})})}}}),v.jsx(Zt,{onClick:o,children:w("common.cancel")})]}),v.jsxs(ie,{children:[l.length>0&&v.jsx(ie,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:l.map(C=>v.jsx(rS,{$active:n===C,onClick:()=>{i(C)},children:v.jsx(be,{icon:C,width:"32",height:"32"})},C))}),h&&v.jsx(ie,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:v.jsx(ie,{sx:{textAlign:"center"},children:"No matching results"})}),c&&v.jsx(ie,{sx:{p:2,display:"flex",justifyContent:"center"},children:v.jsx(yh,{size:20})})]})]})}yd.propTypes={label:S.any,placeholder:S.any,value:S.string,sx:S.object,onPick:S.func.isRequired,onClose:S.func.isRequired};const tS=Ve(ie)(({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}})),rS=Ve(Oe,{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 v.jsx(I.Suspense,{children:v.jsx(eS,{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:S.any,locale:S.string,apiPath:S.string,headers:S.object,imageEditorProps:S.object,onUploadFinish:S.func};const bs=24,ys=48,Ss="add",We="en",xs={title:{[We]:""},description:{[We]:""},link:{[We]:""}};function ws(e){return zc(Array.from(new Set(Ce.NAVIGATION_I18N_FIELDS.flatMap(r=>Yt(e[r])?Object.keys(e[r]):[]))),We)}S.string.isRequired;function na({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Mc(),{t:l,locale:s}=Ee(),{blocklet:c}=Nt(),u=I.useMemo(()=>{const k=c.environments.find(A=>A.key==="BLOCKLET_APP_LANGUAGES");return(k?k.value.split(","):["en","zh"]).filter(A=>kt.SUPPORTED_LANGUAGES[A]).reduce((A,$)=>(A[$]=kt.SUPPORTED_LANGUAGES[$].nativeName,A),{})},[c.environments]),f=I.useRef(()=>{}),d=or({isRoot:!0,type:Ss,linkDisabled:!1,locale:We,formState:$e(xs),get localeList(){return ws(d.formState)}}),{handleSubmit:h,control:p,reset:g,setValue:m,clearErrors:y,formState:{errors:b}}=Cp({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});I.useEffect(()=>{Ce.NAVIGATION_I18N_FIELDS.forEach(k=>m(k,d.formState[k][d.locale]))},[m,d.locale]);const w=Ip({control:p}),D=w.component,P=w.title,x=w.description,T=w.link,C=w.parent;I.useEffect(()=>{d.formState.title[d.locale]=P},[P]),I.useEffect(()=>{d.formState.description[d.locale]=x},[x]),I.useEffect(()=>{d.formState.link[d.locale]=T},[T]),I.useEffect(()=>{i?.(w)},[w,i]);const _=I.useMemo(()=>t.find(O=>D?n.find($=>$.name===D).did===O.id:O.id===C),[n,t,D,C]),R=I.useMemo(()=>{if(_?.component){const k=n.find(J=>J.name===_.component),{link:O}=k||{},A=Yt(O)?O[d.locale]:O;if(D)return ka(A);const $=Yt(_.link)?_.link[d.locale]:_.link;return ka(qe(A,$||"/"))}return null},[n,d.locale,_,D]),E=I.useMemo(()=>{const{component:k}=_||{},O=n.find(J=>J.name===k),{navigation:A=[]}=O||{};return Ne.flattenNavigation(A,{transform(J,oe){return oe?.section&&(J.section=J.section||oe.section),J}}).filter(J=>J.link).filter(J=>Ne.isMatchSection(J.section,r)).map(J=>({label:J.link,title:J.title[s]||J.title}))},[_,n,r,s]),j=I.useCallback(()=>{d.isRoot=!0,d.locale=We,d.type=Ss,d.linkDisabled=!1,d.formState=$e(xs),g(),y(),f.current=()=>{}},[y,g,d]),N=I.useCallback((k={})=>(d.localeList.length>0&&Ce.NAVIGATION_I18N_FIELDS.forEach(O=>{Mp(d.formState[O]).length>1&&(k[O]=d.formState[O])}),ko(k.role)&&(k.role=void 0),k),[d.localeList,d.formState]),U=I.useCallback(({parent:k}={},O=()=>{})=>{d.type="add",d.isRoot=!k,m("parent",k?.id),f.current=A=>{O(A)}},[m,d]),z=I.useCallback((k={},O=()=>{})=>{const{id:A,icon:$,parent:J,component:oe,role:fe=[]}=k;m("id",A),m("icon",$),k.from==="team-tmpl"&&(d.linkDisabled=!0);const de=ws(k),me=(ge,De)=>{mc(ge)?d.formState[De]=de.reduce((ce,ae)=>(ce[ae]=ge,ce),{[We]:ge}):Yt(ge)?d.formState[De]=$e(ge):d.formState[De]={}};Ce.NAVIGATION_I18N_FIELDS.forEach(ge=>me(k[ge],ge)),Ce.NAVIGATION_I18N_FIELDS.forEach(ge=>m(ge,d.formState[ge][d.locale])),m("component",oe),m("parent",J),m("role",fe||[]),d.type="edit",d.isRoot=!J,f.current=ge=>{const De=xh(ge,["id","title","description","icon","component","link","role"]);O(De)}},[m,d]);function G(k){const O=k?.trim();if(r!=="bottomNavigation"){if(!O)return l("common.requiredErrorText",{name:l("navigation.form.title")});if(O.length>bs)return l("navigation.form.titleTooLong",{len:bs})}return!0}function W(k){const O=k?.trim();return O&&O.length>ys?l("navigation.form.descriptionTooLong",{len:ys}):!0}const V=ve(k=>k?.startsWith("/")?new URL(k,window.location.origin).href:k);async function Q(k){const O=k?.trim();if(O){if(Po(V(O)))return!0;try{await _o(O)}catch{return l("navigation.form.invalidIcon")}}return!0}function te(k){const O=k?.trim();return O?Q(O):l("common.requiredErrorText",{name:l("navigation.form.icon")})}function X(k){const O=k?.trim();return O?Ne.checkLink(O)?!0:l("navigation.form.invalidLink"):d.isRoot?!0:l("common.requiredErrorText",{name:l("navigation.form.link")})}const ee=I.useCallback(k=>{d.locale=k,Ce.NAVIGATION_I18N_FIELDS.forEach(O=>{d.formState[O][k]||(d.formState[O][k]="")}),setTimeout(()=>{y()})},[y,d]),q=I.useCallback(()=>{const{title:k,link:O}=d.formState;if(r!=="bottomNavigation")for(const A of Object.keys(k)){const $=G(k[A]);if($!==!0)return $}for(const A of Object.keys(O)){const $=X(O[A]);if($!==!0)return $}return!0},[r,d.formState]),re=I.useCallback(k=>{const O=q();O===!0?f.current(N(k)):wr.error(O)},[q,N]),F=I.useCallback(k=>{d.locale=We,Ce.NAVIGATION_I18N_FIELDS.forEach(O=>{d.formState[O]=Dt(d.formState[O],k)}),i?.(w)},[d,w,i]),H=I.useCallback(k=>{d.locale=k,Ce.NAVIGATION_I18N_FIELDS.forEach(O=>{d.formState[O][k]=d.formState[O][We]}),i?.(w),setTimeout(()=>{y()})},[y,d,w,i]);return I.useImperativeHandle(e,()=>({add:U,edit:z,resetImmediate:()=>j(),reset:()=>setTimeout(()=>j(),0),submit:h(re)}),[U,j,z,h,re]),v.jsxs(ie,{...o,children:[v.jsx(vd,{sx:{mb:1},onAdd:H,onChange:ee,onRemoveLocale:F,locale:d.locale,localeMap:u,locales:d.localeList}),v.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&v.jsx(rt,{name:"title",control:p,rules:{validate:G},render:({field:k})=>v.jsx(Ht,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:d.isEdit,error:!!b?.title?.message,helperText:b?.title?.message||" ",...k})}),r==="bottomNavigation"?v.jsx(rt,{name:"icon",control:p,rules:{validate:te},render:({field:k})=>v.jsx(vo,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!b?.icon?.message,helperText:b?.icon?.message,disabled:d.locale!==We,methods:["select"],iconifyShape:"url",...k})}):v.jsx(rt,{name:"icon",control:p,rules:{validate:Q},render:({field:k})=>v.jsx(vo,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!b?.icon?.message,helperText:b?.icon?.message,disabled:d.locale!==We,...k})}),d.isRoot&&v.jsx(rt,{name:"component",control:p,render:({field:k})=>v.jsx(Ki,{fullWidth:!0,margin:"dense",disabled:d.locale!==We&&k.value,label:l("navigation.form.component"),placeholer:l("navigation.form.componentPlaceholder"),options:n.map(O=>({title:O.title,value:O.name,description:O.link})),error:!!b?.component?.message,helperText:b?.component?.message||" ",...Dt(k,"ref")})}),!d.isRoot&&["header"].includes(r)&&v.jsx(rt,{name:"description",control:p,rules:{validate:W},render:({field:k})=>v.jsx(Ht,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.descriptionPlaceholder"),label:l("navigation.form.description"),disabled:d.isEdit,error:!!b?.description?.message,helperText:b?.description?.message||" ",...k})}),v.jsx(rt,{name:"link",control:p,rules:{validate:X},render:({field:k})=>v.jsx(vc,{fullWidth:!0,margin:"dense",children:v.jsx(_p,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:d.linkDisabled,isOptionEqualToValue:O=>O.label,options:E,renderInput:O=>v.jsx(Ht,{...O,placeholder:l("navigation.form.linkPlaceholder"),label:l("navigation.form.link"),error:!!b?.link?.message,helperText:b?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:R?v.jsx(Ui,{position:"start",sx:{textDecoration:Ky(T||"")?"line-through":""},children:R}):null}}}),renderOption:(O,A)=>v.jsxs(ie,{component:"li",...O,children:[A.label,v.jsx(Ie,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:A.title})]}),margin:"dense",...k,onChange:()=>{},onInputChange:(O,A)=>{k.onChange(A)}})})}),["dashboard","sessionManager"].includes(r)&&v.jsx(rt,{name:"role",control:p,render:({field:k})=>v.jsx(Ki,{fullWidth:!0,multiple:!0,margin:"dense",label:l("navigation.form.role"),placeholer:l("navigation.form.rolePlaceholder"),options:a.map(O=>({title:O.title,value:O.name})),error:!!b?.role?.message,helperText:b?.role?.message||" ",...Dt(k,"ref")})}),r==="bottomNavigation"&&v.jsx(rt,{name:"title",control:p,rules:{validate:G},render:({field:k})=>v.jsx(Ht,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:d.isEdit,error:!!b?.title?.message,helperText:b?.title?.message||" ",...k})})]})]})}na.propTypes={ref:S.any,section:S.string,components:S.array,rawNavigations:S.array,onChange:S.func};function ia({ref:e=null,section:r="",components:n=[],rawNavigations:t=[]}){const{t:i}=Ee(),[o,{setTrue:a,setFalse:l}]=xp(),[s,c]=I.useState("add"),u=I.useRef(null),f=I.useMemo(()=>{const m={add:i("common.create"),edit:i("common.edit")}[s];return m?`${m} ${i("navigation.navigation")}`:"--"},[i,s]),d=I.useCallback(()=>{l(),u.current?.reset()},[l]),h=I.useCallback((g={},m=()=>{})=>{c("add"),u.current?.add(g,y=>m(d,y)),a()},[a,d]),p=I.useCallback((g={},m=()=>{})=>{c("edit"),u.current?.edit(g,y=>m(d,y)),a()},[a,d]);return I.useImperativeHandle(e,()=>({add:h,edit:p,close:d}),[h,p,d]),v.jsx(wh,{open:o,title:f,keepMounted:!0,onClose:d,sx:{".MuiDialogContent-root":{pt:0}},actions:v.jsx(bc,{color:"primary",variant:"contained",onClick:()=>u.current?.submit(),children:i("common.confirm")}),children:v.jsx(na,{ref:u,section:r,components:n,rawNavigations:t})})}ia.propTypes={ref:S.any,section:S.string,components:S.array,rawNavigations:S.array};function Sd({className:e="",add:r=()=>{},edit:n=()=>{},toggle:t=()=>{},del:i=()=>{},data:o,section:a=""}){const{t:l}=Ee(),s=["yaml","team-tmpl"].includes(o.from),c=I.isValidElement(o.subtitle);function u(g){g.preventDefault(),g.stopPropagation()}const f=I.useCallback(g=>{u(g),r(o)},[r,o]),d=I.useCallback(g=>{u(g),n(o)},[n,o]),h=I.useCallback(g=>{u(g),t(o)},[t,o]),p=I.useCallback(g=>{u(g),i(o)},[i,o]);return v.jsxs("div",{className:e,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&v.jsx("span",{title:l(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:v.jsx(Oe,{size:"small",color:"success",onClick:f,disabled:c,children:v.jsx(be,{icon:"mdi:plus-box-outline"})})}),v.jsx("span",{title:l(c?"navigation.action.noEdit":"navigation.action.edit"),children:v.jsx(Oe,{size:"small",color:"primary",onClick:d,disabled:c||o.from==="team-tmpl",children:v.jsx(be,{icon:"mdi:pencil-outline"})})}),v.jsx("span",{title:c?l("navigation.action.noEdit"):o.visible?l("navigation.action.hide"):l("navigation.action.show"),children:v.jsx(Oe,{size:"small",color:"warning",onClick:h,disabled:c,children:o.visible===!1?v.jsx(be,{icon:"mdi:eye-off-outline"}):v.jsx(be,{icon:"mdi:eye-outline"})})}),v.jsx("span",{title:l(s&&!c?"navigation.action.noDel":"navigation.action.del"),children:v.jsx(Oe,{disabled:s&&!c,size:"small",color:"error",onClick:p,children:v.jsx(be,{icon:"mdi:delete"})})})]})}Sd.propTypes={data:S.object.isRequired,className:S.string,add:S.func,edit:S.func,toggle:S.func,del:S.func,section:S.string};const xn=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",nS=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},iS=(e,r="en")=>{if(typeof e=="string"){if(dd(e)){const t=new URL(e);return t.searchParams.set("locale",r),t.href}if(fd(e))return e;const n=new URL(e,window.location.origin);return n.searchParams.set("locale",r),n.pathname+n.search}return typeof e=="object"?e[r]||e?.en||e?.zh:e},Qt=(e,r="en")=>{if(!e?.length)return e;const n=(t,i)=>t&&typeof t=="object"?t[i]||t?.en||t?.zh:t;return At(e,t=>({...t,title:n(t.title,r),description:n(t.description,r),link:t.items?.length?t.link:iS(t.link,r),_rawLink:t.link}),"items")},oS=e=>At(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),aS=e=>{if(!e?.length)return null;const r=oS(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=nS(r.theme),r.navigation=aS(lS(r.navigation)),r},lS=(e=[])=>ta(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),xd=(e,r)=>ta(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"),sS={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"/>'},cS={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 uS({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},l=(a.navigation||[]).filter(h=>h.section==="sessionManager"&&!["/sessionManager"].includes(h.id)).filter(h=>!!(h?.role||[]).includes(e?.user?.role||"guest")).map(h=>{const p=(a?.componentMountPoints||[]).find(g=>h.component===g.name);return{...h,component:p}}),s=Et(),c=I.useRef(null),u=or({open:!1}),f=ve((h=!u.open)=>{u.open=h}),d=t==="hover"?{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1)}:{onClick:()=>f()};return l.length===0||!e?.user?null:v.jsxs(ie,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...i},...o,...d,children:[v.jsx(Oe,{size:"medium",ref:c,children:v.jsx(be,{icon:sS,fontSize:n,style:{transform:"scale(1.08)"}})}),v.jsx(Ch,{open:u.open,anchorEl:c.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:h})=>v.jsx(Ih,{onClickAway:p=>{p.preventDefault(),p.stopPropagation(),f(!1)},children:v.jsx(yc,{...h,timeout:350,children:v.jsxs(Tr,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[v.jsx(Rh,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:l.map(p=>v.jsx(Dh,{disablePadding:!0,children:v.jsxs(Pp,{href:Oa(p.link,r),sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[p?.component?.did?v.jsx(ie,{component:"img",src:`${Sc}/blocklet/logo-bundle/${p.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):v.jsx(be,{fontSize:50,icon:p.icon||cS,color:s.palette.text.secondary}),v.jsx(Ie,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:Oa(p.title,r)})]})},p.id))}),v.jsx(Th,{session:e,children:v.jsx(bc,{variant:"outlined",fullWidth:!0,href:_h,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const wd=S.shape({appLogo:S.node,appName:S.string,theme:S.shape({background:S.string}),enableConnect:S.bool,enableLocale:S.bool,navigation:S.arrayOf(S.shape({title:S.oneOfType([S.string,S.object]),link:S.oneOfType([S.string,S.object]),icon:S.string,items:S.arrayOf(S.shape({title:S.oneOfType([S.string,S.object]),link:S.oneOfType([S.string,S.object])}))}))}),Cd=S.shape({showText:S.bool,showRole:S.bool,switchDid:S.bool,switchProfile:S.bool,switchPassport:S.bool,disableLogout:S.bool,onLogin:S.func,onLogout:S.func,onSwitchDid:S.func,onSwitchProfile:S.func,onSwitchPassport:S.func,menu:S.array,menuRender:S.func,dark:S.bool,size:S.number}),dS=["admin","owner"],fS=e=>e.endsWith(".ip.abtnet.io"),hS=e=>e.endsWith(".did.abtnet.io"),pS={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:"配置域名"}},gS=1e3*60*60*24*30,Cs=".well-known/service/admin/domains";function Id({locale:e="en",session:r={}}){const n=r?.user,t=Lc(),[i,o]=I.useState(()=>{const d=window.localStorage.getItem("domain-warning-skip");if(!d)return!0;const h=+new Date,p=+new Date(d);return h-p>gS}),a=ve((d,h={})=>xc(pS,d,e,"en",h)),l=I.useMemo(()=>{try{const{hostname:d}=new URL(window.location.href);return d}catch{return""}},[]),s=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=qe(window.location.origin,Cs);d.startsWith("http")&&window.open(d,"_blank"),o(!1)},[]),f=n?.role&&dS.includes(n.role);return window.location.href.includes(Cs)||t||!fS(l)&&!hS(l)?null:v.jsxs(Ph,{open:i,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"sm",onClose:()=>o(!1),children:[v.jsxs(kh,{sx:{padding:"20px !important"},children:[v.jsx(Ie,{sx:{fontSize:"20px",fontWeight:"500"},children:a(f?"owner.title":"guest.title")}),v.jsx(Ie,{sx:{marginTop:"20px",fontSize:"14px",color:"text.secondary"},children:a(f?"owner.description":"guest.description")}),f&&v.jsx(ie,{component:"ul",children:s.map(d=>v.jsx(Ie,{component:"li",sx:{fontSize:"14px",color:"text.secondary"},children:d},d))})]}),v.jsxs(Oh,{sx:{px:"12px !important"},children:[v.jsx(Zt,{onClick:c,children:a("skip")}),f&&v.jsx(Zt,{variant:"contained",onClick:u,children:a("bindDomain")})]})]})}Id.propTypes={locale:S.string,session:S.object};var Pi,Is;function vS(){if(Is)return Pi;Is=1;const e=Eh();return Pi=(r,n=!1)=>{const t=e(["@arcblock/ws",r].join(":"));return{debug:t,warn:t,info:t,trace:n?t:console.error,error:n?t:console.error}},Pi}var ki,Rs;function mS(){if(Rs)return ki;Rs=1;const e=vS();return ki=(r,n,t)=>class extends r{constructor(o,a={}){super(o,{transport:t,...a}),this._logger=e("client",a.silent),this.emitter=new n,this.onOpen(()=>{this._logger.debug("socket open",o)}),this.onClose(()=>{this._logger.debug("socket close",o)}),this.onError(l=>{this._logger.error("socket error",l.error)}),this.onMessage(l=>{this._logger.debug("socket message",l)})}on(o,a,l={}){this.ensureJoinChannel(o,l),this.emitter.on(o,a)}off(o,a){a?this.emitter.off(o,a):this.emitter.removeAllListeners(o),this.ensureLeaveChannel(o)}disconnect(o,a,l){this.emitter.eventNames().forEach(s=>{this.emitter.removeAllListeners(s)}),super.disconnect(o,a,l)}ensureJoinChannel(o,a={}){if(this.emitter.listenerCount(o)>0)return;const s=this.channel(o,a);s.join().receive("ok",c=>{this._logger.debug("join success",{topic:o,message:c})}).receive("error",c=>{this._logger.error("join error",{topic:o,error:c})}).receive("timeout",()=>{this._logger.debug("join timeout",{topic:o})}),s.on(o,({status:c,response:u})=>{c==="ok"?this.emitter.emit(o,u):this._logger.debug("response error",{topic:o,status:c,data:u})})}ensureLeaveChannel(o){if(this.emitter.listenerCount(o)>0)return;const l=this.channels.find(s=>s.topic===o);l&&(this.remove(l),l.leave().receive("ok",s=>{this._logger.debug("leave success",{topic:o,message:s})}).receive("error",s=>{this._logger.error("leave error",{topic:o,err:s})}).receive("timeout",()=>{this._logger.debug("leave timeout",{topic:o})}),l.off(o))}subscribe(o,a={}){let l=this.channels.find(s=>s.topic===o);return l||(l=this.channel(o,a),l.join().receive("ok",s=>{this._logger.debug("join success",{topic:o,message:s})}).receive("error",s=>{this._logger.error("join error",{topic:o,error:s})}).receive("timeout",()=>{this._logger.debug("join timeout",{topic:o})}),l)}unsubscribe(o){this.ensureLeaveChannel(o)}},ki}var Oi,Ds;function bS(){if(Ds)return Oi;Ds=1;const e=Nh(),{Socket:r}=Mh();return Oi=mS()(r,e),Oi}var Ei,Ts;function yS(){return Ts||(Ts=1,Ei={WsClient:bS()}),Ei}var SS=yS();const Rt={};function xS(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=qe(r,Sc,e);return new SS.WsClient(n,{heartbeatIntervalMs:100*1e3})}function wS(e="admin"){return Rt[e]||(Rt[e]=xS(e)),Rt[e]}const CS=(e="admin")=>{const r=I.use(Bn),{session:n}=r??{};return!Rt[e]&&n.user&&(Rt[e]=wS(e),Rt[e].connect()),Rt[e]},IS={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>'},RS={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"/>'},DS={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 TS(){const e=Et();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=Fn(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const _S=e=>!ko(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,PS=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},kS=async(e,r)=>{try{return await kp.user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},OS=async(e,r)=>{const{type:n,did:t}=e;return wc.isSameAddr(n,"did")?await kS(t,r)||Cn.getLink(e):Cn.getLink(e)},ES=async(e,r,n=!0)=>{const t=Cn.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof Cn.Link){if(n){const o=await OS(i,r),{type:a,chainId:l,did:s}=i;return wc.isSameAddr(a,"dapp")?`<em class="dapp" data-type="${a}" data-chain-id="${l}" data-did="${s}">${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="${l}" data-did="${s}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))},NS=e=>Ah.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),MS={comment:(e,r)=>r&&r>1?v.jsxs(v.Fragment,{children:["left ",r," comments on your ",e]}):v.jsxs(v.Fragment,{children:["commented on your ",e]}),like:e=>v.jsxs(v.Fragment,{children:["liked your ",e]}),follow:()=>v.jsx(v.Fragment,{children:"followed you"}),tips:e=>v.jsxs(v.Fragment,{children:["gave tips to your ",e]}),mention:e=>v.jsxs(v.Fragment,{children:["mentioned you in ",e]}),assign:()=>v.jsx(v.Fragment,{children:"assigned you a task"})};function Wt({user:e,color:r=void 0}){const{palette:n}=Et(),t=Oo(qe(Ce.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return v.jsx(Cc,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Wt.displayName="UserLink";function AS({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=Et(),{type:a,target:l}=e||{},{type:s}=l||{},{linkColor:c=o.text.primary}=t||{},u=Ae(()=>{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=Ae(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),d=ve(()=>{if(!Array.isArray(f)||f.length===0)return null;if(f.length===1)return v.jsx(Wt,{user:f[0],color:c});const m=f.slice(0,-1),y=f[f.length-1];if(f.length===2)return v.jsxs(v.Fragment,{children:[v.jsx(Wt,{user:m[0],color:c})," and ",v.jsx(Wt,{user:y,color:c})]});const b=f.length>3,w=b?f.slice(0,2):m;return v.jsxs(v.Fragment,{children:[w.map((D,P)=>v.jsxs(Z.Fragment,{children:[v.jsx(Wt,{user:D,color:c}),P<w.length-1?", ":""]},D.did)),b?`, and ${f.length-2} others`:v.jsxs(v.Fragment,{children:[", and ",v.jsx(Wt,{user:y,color:c})]})]})}),h=ve(()=>{const m=a?MS[a]:null;return m?m(s,r.length):null}),p=Ae(()=>{const m=d(),y=h();return!m||!y?null:v.jsxs(v.Fragment,{children:[m," ",y]})},[a,s,f,d,h]),g=Ae(()=>{if(!e)return null;const m=PS(e);return m?.targetLink?qe(i,m.targetLink):null},[e,i]);return!a||ko(l)?null:v.jsxs(v.Fragment,{children:[p," ",g&&v.jsx(Cc,{href:g,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:l.name})]})}const LS={normal:Ea,success:IS,info:Ea,warning:RS,error:DS},zS=ar(Fh)`
|
|
44
44
|
font-size: 20px;
|
|
45
45
|
`,jS=ar.div`
|
|
46
46
|
display: flex;
|