@abtnode/blocklet-services 1.16.25-next-3d78a4cb → 1.16.25-next-bc2f4c63
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/api/services/auth/connect/connect-to-did-spaces-for-user.js +4 -1
- package/dist/assets/{Add-NMa-M1Q0.js → Add-E-Uy_6DF.js} +1 -1
- package/dist/assets/{Alert-9wz-SfVH.js → Alert-Pt-ZsdXz.js} +1 -1
- package/dist/assets/{ArrowDropDown-2jJxChvP.js → ArrowDropDown-QDp9yLZu.js} +1 -1
- package/dist/assets/{Avatar-gImElMr2.js → Avatar-DjYDdC4Y.js} +1 -1
- package/dist/assets/{ButtonGroup-yDF0xi1D.js → ButtonGroup-INcuOk6N.js} +1 -1
- package/dist/assets/{CheckCircle-lHs77bkx.js → CheckCircle-ZE36oFm6.js} +1 -1
- package/dist/assets/{ChevronRight-mO238vY_.js → ChevronRight-10j1EEGW.js} +1 -1
- package/dist/assets/{CloseOutlined-_SreG5tJ.js → CloseOutlined-eARgu6L1.js} +1 -1
- package/dist/assets/{Delete-FIV1VRAH.js → Delete-RZzg-ZC4.js} +1 -1
- package/dist/assets/{DeleteOutline-cT2nXpK-.js → DeleteOutline-SM-0L53U.js} +1 -1
- package/dist/assets/{Done-UoP7s52I.js → Done-qS9bIH_w.js} +1 -1
- package/dist/assets/{Download-LxurGFpv.js → Download-5_huAfzh.js} +1 -1
- package/dist/assets/{Edit-HaU-_qL4.js → Edit-wWRWmpt5.js} +1 -1
- package/dist/assets/{EditIcon-b5c6BhD5.js → EditIcon-K0a_S0gh.js} +1 -1
- package/dist/assets/{ExpandMore-OAGMzw3l.js → ExpandMore-OJdD8wBw.js} +1 -1
- package/dist/assets/{FilterList-7ij1AZQJ.js → FilterList-Wlh0o175.js} +4 -4
- package/dist/assets/{FormControl-oDdBAHRY.js → FormControl-b6R3X9iZ.js} +1 -1
- package/dist/assets/{FormControlLabel-mxbf-j4N.js → FormControlLabel-tkk4UmT-.js} +1 -1
- package/dist/assets/{FormGroup-g0YmWnKj.js → FormGroup-GIaS19hu.js} +1 -1
- package/dist/assets/{Google-AxxsJlUn.js → Google-Vp4kt3Yw.js} +1 -1
- package/dist/assets/{Grid-AT3ygHJV.js → Grid-op03i2gG.js} +1 -1
- package/dist/assets/{Hidden-LQKjswzc.js → Hidden-LDXaA7QE.js} +1 -1
- package/dist/assets/{InfoOutlined-06EXFeDn.js → InfoOutlined-83Bt9cc3.js} +1 -1
- package/dist/assets/{InputAdornment-VuS2_oMc.js → InputAdornment-MNhfGdzm.js} +1 -1
- package/dist/assets/{InputLabel-2qJR9Egb.js → InputLabel-RWdZETCM.js} +1 -1
- package/dist/assets/{LastPage-5fS6cOhK.js → LastPage-xhjc0FYv.js} +1 -1
- package/dist/assets/{Launch-PWcKbIzR.js → Launch-kfYUoiJm.js} +1 -1
- package/dist/assets/{LaunchOutlined-NH837_ZB.js → LaunchOutlined-EuVayCey.js} +1 -1
- package/dist/assets/{Link-HTHg_pUm.js → Link-sMHRLAhK.js} +1 -1
- package/dist/assets/{ListItem-NGeUkLV-.js → ListItem-DY28wT0F.js} +1 -1
- package/dist/assets/{ListItemText-7v7ZTw5u.js → ListItemText-CHlc1cm0.js} +1 -1
- package/dist/assets/{LockIcon-EVmvDasu.js → LockIcon-AxFBOElS.js} +1 -1
- package/dist/assets/{Loop-fYtWuUwa.js → Loop-k74terNK.js} +1 -1
- package/dist/assets/{MoreHoriz-iTa90LIi.js → MoreHoriz-6oCyuqz1.js} +1 -1
- package/dist/assets/{MoreVert-lieR_Xff.js → MoreVert-S0JjL3ST.js} +1 -1
- package/dist/assets/{OpenInNew-2IVN35Wq.js → OpenInNew-dHB8I-mY.js} +1 -1
- package/dist/assets/{Pagination-p0K608Pw.js → Pagination-K37lnAAf.js} +1 -1
- package/dist/assets/{PlayArrow-NklJcWlF.js → PlayArrow-RgVA_Vhu.js} +1 -1
- package/dist/assets/{RadioGroup-H5jcgCgt.js → RadioGroup-mdoQCIlz.js} +1 -1
- package/dist/assets/{Search-5XETl0i_.js → Search-Ws1Y067Y.js} +1 -1
- package/dist/assets/{Select-pV3i3qpz.js → Select-XOhKkdl9.js} +2 -2
- package/dist/assets/{ServerLogo-HX8hLzvi.js → ServerLogo-uQwvyIVW.js} +1 -1
- package/dist/assets/{Skeleton-D6saHrZm.js → Skeleton-XRsF_kRv.js} +1 -1
- package/dist/assets/{Slider-z3HJyOTL.js → Slider-AQ61Nhmq.js} +1 -1
- package/dist/assets/{Stepper-VPMrTHZb.js → Stepper-JhYpYItY.js} +1 -1
- package/dist/assets/{TableRow-C_coU4a1.js → TableRow-McErKo52.js} +2 -2
- package/dist/assets/{TextField-upXvpfEU.js → TextField-ojrDs8Sg.js} +1 -1
- package/dist/assets/{Toolbar-y-RPR7ka.js → Toolbar-fKSQD6kR.js} +1 -1
- package/dist/assets/{ViewList-kXhlrqjT.js → ViewList-Z3lkWLAm.js} +1 -1
- package/dist/assets/{access-control-762y7PVy.js → access-control-xrWRFAND.js} +1 -1
- package/dist/assets/{actions-lQzb6Jj9.js → actions-PlS7MPBA.js} +1 -1
- package/dist/assets/{add-component-core-r_9ZAl_l.js → add-component-core-Z20TfzQ1.js} +8 -8
- package/dist/assets/add-resource-zQZqtMQL.js +1 -0
- package/dist/assets/{addon-6GKJUulN.js → addon-aCfJtGQ6.js} +1 -1
- package/dist/assets/{analytics-VXDqCcaZ.js → analytics-o2kYELNS.js} +6 -6
- package/dist/assets/api-rGSobLSz.js +1 -0
- package/dist/assets/{audit-logs-dCDjHCkV.js → audit-logs-u_H5563O.js} +1 -1
- package/dist/assets/{button-9IYN9Hx2.js → button-QdRLQj98.js} +1 -1
- package/dist/assets/{click-to-copy-1QBfdqHN.js → click-to-copy-JCuFDJdG.js} +1 -1
- package/dist/assets/{complete-bjB1jkBY.js → complete-ZAhfn1MI.js} +2 -2
- package/dist/assets/{component-3PxHqzLG.js → component-qxbIyx-x.js} +16 -16
- package/dist/assets/{config-qko_RKYv.js → config-B4S7nDlc.js} +1 -1
- package/dist/assets/{config-guBQ2xXX.js → config-PU2jWUqp.js} +1 -1
- package/dist/assets/{config-navigation-j2hxqzBt.js → config-navigation-EAEaByBJ.js} +5 -5
- package/dist/assets/{config-space-YwSwWRVo.js → config-space-qgmh9-fz.js} +1 -1
- package/dist/assets/{confirm-7Hh_SSFd.js → confirm-W3yNAofT.js} +1 -1
- package/dist/assets/{connect-tmvrTIsQ.js → connect-Fmsi6PXI.js} +1 -1
- package/dist/assets/{connect-gJq3eOk3.js → connect-gI1khV3G.js} +1 -1
- package/dist/assets/connect-to-1ewiHWT6.js +54 -0
- package/dist/assets/{content-layout-AtLirrgM.js → content-layout-zMIKXX1i.js} +1 -1
- package/dist/assets/dashboard-JHZuW25_.js +134 -0
- package/dist/assets/{did-address-8E42uyI-.js → did-address-9m9tYh5q.js} +1 -1
- package/dist/assets/{domain-Qws0qQ3h.js → domain-Sk0SMdZH.js} +1 -1
- package/dist/assets/{domain-list-xipbIs2T.js → domain-list-53da40TE.js} +2 -2
- package/dist/assets/{exchange-passport-nOrxxaSx.js → exchange-passport-xuyvag2R.js} +1 -1
- package/dist/assets/{fallback-mHcLRxLo.js → fallback-gmfSXd3Y.js} +1 -1
- package/dist/assets/{fuel-yFF_NzsF.js → fuel-zS6cXb-c.js} +1 -1
- package/dist/assets/{fullpage-rrOmqxSy.js → fullpage-A7HeCoHY.js} +1 -1
- package/dist/assets/{home-5_BgRDNM.js → home-_SLX6F5b.js} +1 -1
- package/dist/assets/{iframe-ajsEFsJa.js → iframe-EUkUor9M.js} +1 -1
- package/dist/assets/{index-iq_e37_h.js → index-1XFBUK0L.js} +3 -3
- package/dist/assets/{index-ewlbl2rV.js → index-3m5m0Azr.js} +4 -4
- package/dist/assets/{index-QUz246T1.js → index-4G6oewXC.js} +1 -1
- package/dist/assets/{index-MxDjYbBB.js → index-5RAPyZhu.js} +1 -1
- package/dist/assets/{index-7d02nDqC.js → index-6-a1zIdI.js} +1 -1
- package/dist/assets/{index-RFIYPU8k.js → index-6YTWue35.js} +1 -1
- package/dist/assets/{index-Y4ui5f0Z.js → index-9sNhSE2Y.js} +9 -9
- package/dist/assets/{index-VDbohr0m.js → index-GI1yS25N.js} +2 -2
- package/dist/assets/index-Ly_Yd813.js +1 -0
- package/dist/assets/{index-nI8IL2Hs.js → index-NkljuAao.js} +1 -1
- package/dist/assets/{index-viQfv9eh.js → index-Oxu7k4-x.js} +3 -3
- package/dist/assets/{index-8_lv4I5h.js → index-RFmSVBpK.js} +1 -1
- package/dist/assets/index-T7wxd3j-.js +13 -0
- package/dist/assets/{index-_ctbZdsq.js → index-_k-czSGL.js} +7 -7
- package/dist/assets/{index-zvnLTd7V.js → index-_oP7djMv.js} +1 -1
- package/dist/assets/{index-XXPjiGPU.js → index-eE-NCd9F.js} +1 -1
- package/dist/assets/{index-goxpAoXB.js → index-eEL2jyON.js} +1 -1
- package/dist/assets/{index-Hg8SES5w.js → index-eEjVn98u.js} +1 -1
- package/dist/assets/{index-G4D865RD.js → index-h8_sQZk8.js} +18 -18
- package/dist/assets/{index-cSpRcGEF.js → index-ieRv_ikC.js} +1 -1
- package/dist/assets/{index-ug8ILiCN.js → index-jf1H7R2D.js} +93 -93
- package/dist/assets/{index-aPbuN1__.js → index-jfsLCTyu.js} +1 -1
- package/dist/assets/{index-zR6QuaBQ.js → index-pakggjkF.js} +9 -9
- package/dist/assets/{index-6P3wKob2.js → index-ptjnk_N2.js} +1 -1
- package/dist/assets/{index-O020ew9R.js → index-rnEgZe00.js} +1 -1
- package/dist/assets/{index-TM5n4RIg.js → index-t1hxKaXM.js} +5 -5
- package/dist/assets/{index-LLIyId-n.js → index-wY-UkzyM.js} +1 -1
- package/dist/assets/{index-WHCTABmF.js → index-zpm_l8Rt.js} +1 -1
- package/dist/assets/{index.es-ZHZzppEf.js → index.es-BtZ2SL-q.js} +3 -3
- package/dist/assets/{index.esm-721HBjKH.js → index.esm-WG0jmlDj.js} +1 -1
- package/dist/assets/{invitation-g37oqDwV.js → invitation-ldyeGnCr.js} +1 -1
- package/dist/assets/{invite-d69YWpHA.js → invite-vUWcovLZ.js} +1 -1
- package/dist/assets/{issue-passport-dW50nDwX.js → issue-passport-W2hj9o8C.js} +1 -1
- package/dist/assets/{jss-plugin-props-sort.esm-Rx5MOaXm.js → jss-plugin-props-sort.esm-wWr140ix.js} +1 -1
- package/dist/assets/{launch-result-message-GVlquU-F.js → launch-result-message-S3BXYmn8.js} +1 -1
- package/dist/assets/{layout-shVaPNBI.js → layout-HQzktH_z.js} +2 -2
- package/dist/assets/{list-header-8NAw2mf5.js → list-header-UJPF00gt.js} +1 -1
- package/dist/assets/localization-YS4N8wIH.js +1 -0
- package/dist/assets/{log-GXgOa-mv.js → log-UdsKugr5.js} +1 -1
- package/dist/assets/{login-UQMbPJwO.js → login-G8GqsUr6.js} +1 -1
- package/dist/assets/{logo-uploader-TIyOiPM3.js → logo-uploader-qoqn-ySy.js} +3 -3
- package/dist/assets/{lost-passport-_aDgWs63.js → lost-passport-kV_VrG75.js} +3 -3
- package/dist/assets/{lottie-xKIBeEPM.js → lottie-ruxsBqYl.js} +1 -1
- package/dist/assets/{notifications--xS7ebff.js → notifications-Pdzrsh0_.js} +2 -2
- package/dist/assets/overview-tFit8gVN.js +12 -0
- package/dist/assets/{page-header-ak7IAddF.js → page-header-u-U54mSY.js} +1 -1
- package/dist/assets/{permission-JPMtSvqY.js → permission-LFDtcUJ-.js} +1 -1
- package/dist/assets/{preferences-qBE3VogO.js → preferences-SKOBPRWu.js} +1 -1
- package/dist/assets/publish-resource-VoUxFlbI.js +1 -0
- package/dist/assets/{react-hL3RwciS.js → react-W_eG3Zih.js} +3 -3
- package/dist/assets/{redux-WDzBVqX6.js → redux-WfHEzn4a.js} +1 -1
- package/dist/assets/{selector-BKU6rDfk.js → selector-FHo2eGtC.js} +3 -3
- package/dist/assets/session-O1SiVihc.js +1 -0
- package/dist/assets/{setup-lonJmA3s.js → setup-U-3DA_c5.js} +3 -3
- package/dist/assets/{slicedToArray-2rPrh7Wd.js → slicedToArray-yVMslDaB.js} +1 -1
- package/dist/assets/{spaces-iblVQdlV.js → spaces-HonhbzPi.js} +1 -1
- package/dist/assets/{start-OIH_hW56.js → start-NyxE34ag.js} +1 -1
- package/dist/assets/{step-actions-EE6feCxq.js → step-actions-zuFESXuF.js} +1 -1
- package/dist/assets/{studio-pwHgJvf5.js → studio-pkpk6r_C.js} +1 -1
- package/dist/assets/{switch-control-tcY98nZ9.js → switch-control--mMgueKK.js} +1 -1
- package/dist/assets/{toUpper-21RJ-5gN.js → toUpper-hoSFB9Cp.js} +1 -1
- package/dist/assets/{transfer-OzO17Pcs.js → transfer-xLs4sizv.js} +1 -1
- package/dist/assets/{ua-parser-J1qbmQ9r.js → ua-parser-IG43pig6.js} +1 -1
- package/dist/assets/uniqBy-UuyoKNv3.js +1 -0
- package/dist/assets/{unsubscribe-xOo9aVq6.js → unsubscribe-VAifBi0o.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-3v-_M2kK.js → use-blocklet-info-for-connect-did-spaces-rGpiZ7NN.js} +1 -1
- package/dist/assets/useAsync-0ZkqOKUc.js +1 -0
- package/dist/assets/{useFormControl-vFMW8QlB.js → useFormControl-JPOhw-bl.js} +1 -1
- package/dist/assets/{useLocalStorage-06lVqZYx.js → useLocalStorage-DmY46DDm.js} +1 -1
- package/dist/assets/{useSetState-eCfkvDeH.js → useSetState-dzByTBic.js} +1 -1
- package/dist/assets/{useSlot-Hgy7wgji.js → useSlot-v5bcc8Kc.js} +1 -1
- package/dist/assets/{user-center-_9WdvukY.js → user-center-solRldPR.js} +1 -1
- package/dist/assets/{user-sessions-8fjUaysv.js → user-sessions-pCF1CYcG.js} +1 -1
- package/dist/assets/{util-4lnt5jw_.js → util-T6ywpBlM.js} +1 -1
- package/dist/assets/{wrap-locale-k5RASHR2.js → wrap-locale-X1izeBJD.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +18 -18
- package/dist/assets/add-resource-gRp69UNL.js +0 -1
- package/dist/assets/api-LgIxKv8G.js +0 -1
- package/dist/assets/connect-to-H_Vjwa1I.js +0 -54
- package/dist/assets/dashboard-HCTOZrs8.js +0 -134
- package/dist/assets/index-YVKYSpyM.js +0 -1
- package/dist/assets/index-oqz0KKiU.js +0 -13
- package/dist/assets/localization-VsUQgdut.js +0 -1
- package/dist/assets/overview-TLa2IGzX.js +0 -12
- package/dist/assets/publish-resource--tWTaChj.js +0 -1
- package/dist/assets/session-hMz18Oeh.js +0 -1
- package/dist/assets/uniqBy-4E93YRzM.js +0 -1
- package/dist/assets/useAsync-QfOGCMkY.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as r,T as i,P as e,
|
|
1
|
+
import{j as r,T as i,P as e,db as c,eU as f,bR as u}from"./index-jf1H7R2D.js";function l({name:t,nameFormatter:o,layout:a,children:n,valueComponent:s,nameWidth:m,...p}){return r.jsxs(d,{layout:a,width:m,...p,children:[r.jsx(i,{color:"textSecondary",className:"info-row__name",children:o(t)}),n&&r.jsx(i,{color:"textPrimary",component:s,className:"info-row__value",children:n})]})}l.propTypes={name:e.any.isRequired,layout:e.oneOf(["horizontal","vertical"]),children:e.any,nameFormatter:e.func,valueComponent:e.string,nameWidth:e.number};l.defaultProps={children:null,nameWidth:90,nameFormatter:t=>{const o=t.split(" ").map(a=>c(f(a))).join(" ");return typeof t=="string"?o:t},valueComponent:"div",layout:"horizontal"};const d=u("div")`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: ${t=>t.layout==="vertical"?"column":"row"};
|
|
4
4
|
justify-content: flex-start;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{ao as At,j as l,aC as K,
|
|
1
|
+
import{ao as At,j as l,aC as K,cp as _t,aF as $,f6 as ot,aE as se,aA as _e,aB as Le,T as L,r as x,aJ as Oe,aG as ht,aH as Me,aI as Ve,B as j,S as we,P,u as ne,aZ as be,b9 as xe,bx as ge,L as W,X as F,bA as bt,ay as Se,o as w,U as q,e as xt,y as Lt,b3 as Ot,db as Mt,a8 as z,c as me,x as pe,c0 as gt,ck as Vt,ct as he,cu as kt,bn as Ft,cK as zt,co as Ne,f7 as yt,by as Wt,bP as lt,f8 as Fe,bH as Ut,cz as Kt,Z as qt,f9 as Ie,ax as Ht,al as Jt,am as Te}from"./index-jf1H7R2D.js";import{d as jt}from"./Delete-RZzg-ZC4.js";import{D as ze}from"./index-wY-UkzyM.js";import{T as Ct}from"./index-T7wxd3j-.js";import{W as Xt}from"./did-address-9m9tYh5q.js";import{C as Nt}from"./confirm-W3yNAofT.js";import{B as We,d as Gt}from"./ChevronRight-10j1EEGW.js";import{_ as Zt}from"./useLocalStorage-DmY46DDm.js";import{u as Qt}from"./session-O1SiVihc.js";import{T as G}from"./TextField-ojrDs8Sg.js";import{M as $e}from"./InputAdornment-MNhfGdzm.js";import{d as st}from"./Download-5_huAfzh.js";import{_ as Yt}from"./useSetState-dzByTBic.js";import{d as eo}from"./DeleteOutline-SM-0L53U.js";import{T as to}from"./MoreVert-S0JjL3ST.js";import{A as oo,f as Ee}from"./index-3m5m0Azr.js";import{C as lo}from"./click-to-copy-JCuFDJdG.js";import{c as Ue}from"./index-_oP7djMv.js";import{i as so}from"./index-zpm_l8Rt.js";import{d as no}from"./ExpandMore-OJdD8wBw.js";import{d as ro}from"./OpenInNew-dHB8I-mY.js";import{F as io,C as De}from"./FormControlLabel-tkk4UmT-.js";import"./api-rGSobLSz.js";import{A as co}from"./Avatar-DjYDdC4Y.js";import"./FilterList-Wlh0o175.js";import"./TableRow-McErKo52.js";import"./Grid-op03i2gG.js";import"./FormControl-b6R3X9iZ.js";import"./useFormControl-JPOhw-bl.js";import"./FormGroup-GIaS19hu.js";import"./InputLabel-RWdZETCM.js";import"./ListItemText-CHlc1cm0.js";import"./Select-XOhKkdl9.js";import"./LastPage-xhjc0FYv.js";import"./Toolbar-fKSQD6kR.js";import"./index-eEL2jyON.js";import"./redux-WfHEzn4a.js";import"./Search-Ws1Y067Y.js";import"./Link-sMHRLAhK.js";import"./Alert-Pt-ZsdXz.js";import"./useSlot-v5bcc8Kc.js";const ao=At(l.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),uo=["slots","slotProps"],po=K(_t)(({theme:e})=>$({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":$({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":$({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:ot(e.palette.grey[200],.12)}:{backgroundColor:ot(e.palette.grey[600],.12)})})),fo=K(ao)({width:24,height:16});function mo(e){const{slots:t={},slotProps:o={}}=e,n=se(e,uo),d=e;return l.jsx("li",{children:l.jsx(po,$({focusRipple:!0},n,{ownerState:d,children:l.jsx(fo,$({as:t.CollapsedIcon,ownerState:d},o.collapsedIcon))}))})}function ho(e){return Le("MuiBreadcrumbs",e)}const bo=_e("MuiBreadcrumbs",["root","ol","li","separator"]),xo=bo,go=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],ko=e=>{const{classes:t}=e;return Ve({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},ho,t)},yo=K(L,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${xo.li}`]:t.li},t.root]})({}),jo=K("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),Co=K("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function No(e,t,o,n){return e.reduce((d,a,p)=>(p<e.length-1?d=d.concat(a,l.jsx(Co,{"aria-hidden":!0,className:t,ownerState:n,children:o},`separator-${p}`)):d.push(a),d),[])}const To=x.forwardRef(function(t,o){const n=Oe({props:t,name:"MuiBreadcrumbs"}),{children:d,className:a,component:p="nav",slots:c={},slotProps:h={},expandText:u="Show path",itemsAfterCollapse:b=1,itemsBeforeCollapse:m=1,maxItems:g=8,separator:r="/"}=n,s=se(n,go),[i,f]=x.useState(!1),k=$({},n,{component:p,expanded:i,expandText:u,itemsAfterCollapse:b,itemsBeforeCollapse:m,maxItems:g,separator:r}),C=ko(k),y=ht({elementType:c.CollapsedIcon,externalSlotProps:h.collapsedIcon,ownerState:k}),T=x.useRef(null),E=v=>{const D=()=>{f(!0);const I=T.current.querySelector("a[href],button,[tabindex]");I&&I.focus()};return m+b>=v.length?v:[...v.slice(0,m),l.jsx(mo,{"aria-label":u,slots:{CollapsedIcon:c.CollapsedIcon},slotProps:{collapsedIcon:y},onClick:D},"ellipsis"),...v.slice(v.length-b,v.length)]},S=x.Children.toArray(d).filter(v=>x.isValidElement(v)).map((v,D)=>l.jsx("li",{className:C.li,children:v},`child-${D}`));return l.jsx(yo,$({ref:o,component:p,color:"text.secondary",className:Me(C.root,a),ownerState:k},s,{children:l.jsx(jo,{className:C.ol,ref:T,ownerState:k,children:No(i||g&&S.length<=g?S:E(S),C.separator,r,k)})}))}),Ke=To;function ke({size:e,...t}){return l.jsx(j,{display:"flex",mt:4,...t,children:l.jsx(we,{size:e})})}ke.propTypes={size:P.number};ke.defaultProps={size:24};function Tt(){const{t:e,locale:t}=ne(),{api:o}=be(),[n,d]=x.useState(!0),{blocklet:a}=xe(),[p,c]=x.useState(null),{componentDid:h=""}=ge(),[u,b]=x.useState(null),m=()=>{o.getProjects({input:{did:a.meta.did,componentDid:h}}).then(i=>{const f=(i==null?void 0:i.projects)||[];d(!1),b(f)}).catch(i=>{d(!1),w.error(i.message)})},g=i=>{c(i)},r=()=>{d(!1);const i=p.id;o.deleteProject({input:{did:a.meta.did,projectId:i}}).then(()=>{d(!1),m(),w.success(e("common.removeSuccess")),c(null)}).catch(f=>{d(!1),w.error(f.message)})};if(x.useEffect(()=>{m()},[]),!u&&n)return l.jsx(ke,{});if(!u)return null;if(!u.length)return l.jsxs(j,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[l.jsx(j,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:e("blocklet.publish.blockletEmptyTip")}),l.jsx(j,{sx:{fontSize:14,color:"text.secondary",mb:3},children:e("blocklet.publish.createBlockletTip")}),l.jsx(W,{to:"create",children:l.jsx(F,{variant:"contained",children:e("blocklet.publish.createBlocklet")})})]});const s=[{label:"Blocklet",name:"blockletTitle",options:{customBodyRenderLite:i=>{const f=u[i];return l.jsx(W,{to:`${f.id}`,children:f.blockletTitle||"/"})}}},{label:"DID",name:"blockletDid",options:{customBodyRender:i=>l.jsx(Xt,{size:14,responsive:!0,did:i})}},{label:"Version",name:"blockletVersion",options:{customBodyRender:i=>i?l.jsx(Ct,{type:"success",children:i}):""}},h?null:{label:e("common.scope"),name:"componentDid",options:{customBodyRender:i=>{const f=(a.children||[]).find(k=>k.meta.did===i);return f?l.jsxs(j,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[l.jsx(We,{size:14,blocklet:f,ancestors:[a]}),l.jsx(j,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:f.meta.title})]},i):""}}},{label:e("common.updatedAt"),name:"updatedAt",options:{customBodyRender:i=>l.jsx(bt,{value:Number(i),locale:t})}},{label:e("common.actions"),name:"actions",options:{customBodyRenderLite:i=>{const f=u[i];return l.jsx(j,{display:"flex",children:l.jsx(Se,{color:"error","aria-label":"delete",onClick:()=>g(f),children:l.jsx(jt,{sx:{fontSize:18}})})})}}}].filter(Boolean);return l.jsxs(Io,{children:[l.jsx(j,{sx:{textAlign:"right"},children:l.jsx(W,{to:"create",children:l.jsx(F,{variant:"contained",children:e("blocklet.publish.createBlocklet")})})}),l.jsx(ze,{className:"main-table",locale:t,data:u,columns:s,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),p&&l.jsx(Nt,{title:`${e("common.delete")} ${p.blockletTitle}`,description:e("blocklet.publish.deleteBlockletTip"),confirm:e("common.confirm"),onConfirm:r,onCancel:()=>c(null)})]})}Tt.propTypes={};const Io=q(j)`
|
|
2
2
|
.main-table > div:first-child {
|
|
3
3
|
display: none;
|
|
4
4
|
}
|
|
5
|
-
`,So=[{label:{en:"Resource",zh:"资源"},value:"resource"},{label:{en:"Application",zh:"应用"},value:"pack"}];function qe({...e}){const t=xt(),{t:o,locale:n}=ne(),{blocklet:d}=xe(),[a,p]=x.useState(""),[c,h]=x.useState(!1),[u,b]=x.useState("resource"),{api:m}=
|
|
5
|
+
`,So=[{label:{en:"Resource",zh:"资源"},value:"resource"},{label:{en:"Application",zh:"应用"},value:"pack"}];function qe({...e}){const t=xt(),{t:o,locale:n}=ne(),{blocklet:d}=xe(),[a,p]=x.useState(""),[c,h]=x.useState(!1),[u,b]=x.useState("resource"),{api:m}=Qt(),{api:g}=be(),[r,s]=x.useState(),[i,f]=x.useState(!1),[k]=Zt("manual-create-blocklet-did",!1),{componentDid:C=""}=ge(),y=S=>{w.error(S.message),f(!1)},T=S=>{var D;const v=(D=S==null?void 0:S.blockletWallet)==null?void 0:D.address;v?s(v):w.error("Empty Blocklet DID"),f(!1)},E=()=>{if(!r){w.error(o("blocklet.publish.errorTip.noDid"));return}if(!a){w.error(o("blocklet.publish.errorTip.noTitle"));return}h(!0),g.createProject({input:{did:d.meta.did,blockletTitle:a||"",blockletDid:r,type:u,componentDid:C}}).then(()=>{h(!1),t("../",{replace:!0})}).catch(S=>{h(!1),w.error(S.message)})};return l.jsxs(Eo,{...e,children:[l.jsxs(Ke,{className:"breadcrumbs","aria-label":"breadcrumb",children:[l.jsx(W,{to:"..",children:o("common.publish")}),l.jsxs(L,{color:"text.primary",children:[o("common.create")," Blocklet"]})]}),l.jsxs(j,{style:{maxWidth:500},children:[l.jsx(G,{required:!0,sx:{mb:4},label:"Blocklet DID",fullWidth:!0,readonly:!0,autoComplete:"off",variant:"outlined",onChange:S=>k&&s(S.target.value),onClick:()=>!k&&!r&&f(!0),InputProps:{"data-cy":"export-blocklet-did",endAdornment:!k&&l.jsx($e,{position:"end",children:l.jsx(F,{onClick:()=>f(!0),children:o(r?"common.update":"common.create")})})},helperText:"",value:r||""}),i&&l.jsx(Lt,{open:!0,popup:!0,onClose:()=>f(!1),action:"gen-blocklet-key-pair",locale:n,checkFn:m.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:T,onError:y,extraParams:{did:d.meta.did},messages:{title:o("blocklet.publish.connect.title"),scan:o("blocklet.publish.connect.scan"),confirm:o("blocklet.publish.connect.confirm"),success:o("blocklet.publish.connect.success")}}),l.jsx(G,{required:!0,label:`Blocklet ${o("common.title")}`,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-title"},fullWidth:!0,helperText:"",value:a||"",onChange:S=>{p(S.target.value)}}),l.jsx(G,{sx:{my:4},id:"blocklet-type",select:!0,label:`Blocklet ${o("common.type")}`,helperText:"",fullWidth:!0,value:u,onChange:S=>b(S.target.value),children:So.map(S=>l.jsx(Ot,{value:S.value,disabled:S.disabled,children:S.label[n]||S.label.en},S.value))})]}),l.jsx(F,{variant:"contained",disabled:c,onClick:E,children:o("common.create")})]})}qe.propTypes={};qe.defaultProps={};const Eo=q.div`
|
|
6
6
|
.breadcrumbs {
|
|
7
7
|
margin-bottom: 24px;
|
|
8
8
|
}
|
|
9
|
-
`;function
|
|
9
|
+
`;function It(){const{t:e,locale:t}=ne(),{projectId:o}=ge(),{api:n}=be(),[d,a]=x.useState(!0),{blocklet:p}=xe(),[c,h]=x.useState(null),[u,b]=x.useState(null),[m,g]=x.useState(null),r=()=>{n.getReleases({input:{did:p.meta.did,projectId:o}}).then(y=>{const T=(y==null?void 0:y.releases)||[];a(!1),h(T)}).catch(y=>{a(!1),w.error(y.message)})},s=()=>{n.doBatchQuery({getProject:{input:{did:p.meta.did,projectId:o}},getReleases:{input:{did:p.meta.did,projectId:o}}}).then(y=>{b(y.getProject.project||{}),h(y.getReleases.releases||[]),a(!1)}).catch(y=>{a(!1),w.error(y.message)})};x.useEffect(()=>{s()},[]);const i=()=>{a(!1);const y=m.id;n.deleteRelease({input:{did:p.meta.did,projectId:o,releaseId:y}}).then(()=>{a(!1),r(),w.success(e("common.removeSuccess")),g(null)}).catch(T=>{a(!1),w.error(T.message)})},f=y=>{g(y)};if(!c&&d)return l.jsx(ke,{});if(!c)return null;const k=l.jsxs(Ke,{className:"breadcrumbs","aria-label":"breadcrumb",children:[l.jsx(W,{to:"..",children:e("common.publish")}),l.jsx(L,{color:"text.primary",children:u.blockletTitle})]});if(!c.length)return l.jsxs(l.Fragment,{children:[k,l.jsxs(j,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[l.jsx(j,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:e("blocklet.publish.releaseEmptyTip")}),l.jsx(j,{sx:{fontSize:14,color:"text.secondary",mb:3},children:e("blocklet.publish.createReleaseTip")}),l.jsx(W,{to:"create",children:l.jsx(F,{variant:"contained",children:e("blocklet.publish.createRelease")})})]})]});const C=[{label:e("common.version"),name:"blockletVersion",options:{customBodyRenderLite:y=>{const T=c[y];return l.jsx(W,{to:`${T.id}`,children:T.blockletVersion||"/"})}}},{label:e("blocklet.publish.releaseNote"),name:"note",options:{customBodyRenderLite:y=>{const T=c[y];return l.jsx(L,{className:"note",children:T.note||""})}}},{label:e("common.status"),name:"status",options:{customBodyRender:y=>l.jsx(Ct,{type:y==="published"?"success":"warning",children:Mt(y)})}},{label:e("common.lastPublishedAt"),name:"updatedAt",options:{customBodyRenderLite:y=>{const T=c[y];return T.status!==z.PROJECT.RELEASE_STATUS.published?"":l.jsx(bt,{value:Number(T.updatedAt),locale:t})}}},{label:e("common.actions"),name:"actions",options:{customBodyRenderLite:y=>{const T=c[y];return l.jsxs(j,{display:"flex",alignItems:"center",children:[l.jsx(Se,{color:"primary","aria-label":"download",disabled:T.status!=="published",children:T.status==="published"?l.jsx("a",{style:{display:"flex"},href:me(`${pe.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${p.meta.did}/${u.id}/${T.id}/download/${(T.files||[])[0]}`),children:l.jsx(st,{sx:{fontSize:18}})}):l.jsx(st,{sx:{fontSize:18}})}),l.jsx(Se,{color:"error","aria-label":"delete",onClick:()=>f(T),children:l.jsx(jt,{sx:{fontSize:18}})})]})}}}];return l.jsxs(vo,{children:[l.jsxs(j,{className:"header",children:[k,l.jsx(W,{to:"create",children:l.jsx(F,{variant:"contained",children:e("blocklet.publish.createRelease")})})]}),l.jsx(ze,{className:"main-table",verticalKeyWidth:100,locale:t,data:c,columns:C,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),m&&l.jsx(Nt,{title:e(`${e("common.delete")} ${m.blockletVersion}`),description:e("blocklet.publish.deleteReleaseTip"),confirm:e("common.confirm"),onConfirm:i,onCancel:()=>g(null)})]})}It.propTypes={};const vo=q(j)`
|
|
10
10
|
.header {
|
|
11
11
|
display: flex;
|
|
12
12
|
align-items: center;
|
|
@@ -19,7 +19,7 @@ import{ao as At,j as l,aC as K,cq as Lt,aF as $,f7 as ot,aE as se,aA as Le,aB as
|
|
|
19
19
|
word-break: break-all;
|
|
20
20
|
white-space: pre-line;
|
|
21
21
|
}
|
|
22
|
-
`;function Ro(e){return _e("MuiTreeView",e)}Le("MuiTreeView",["root"]);const St={instance:null,multiSelect:!1,disabledItemsFocusable:!1,treeId:void 0,icons:{defaultCollapseIcon:null,defaultExpandIcon:null,defaultParentIcon:null,defaultEndIcon:null}},Et=x.createContext(St),Po=(e,t)=>{const o=x.useRef({}),[n,d]=x.useState(()=>{const p={};return e.forEach(c=>{c.models&&Object.entries(c.models).forEach(([h,u])=>{o.current[h]={controlledProp:u.controlledProp,defaultProp:u.defaultProp,isControlled:t[u.controlledProp]!==void 0},p[h]=t[u.defaultProp]})}),p});return Object.fromEntries(Object.entries(o.current).map(([p,c])=>{const h=c.isControlled?t[c.controlledProp]:n[p];return[p,{value:h,setValue:u=>{c.isControlled||d(b=>$({},b,{[p]:u}))}}]}))};class wo{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(t,o,n={}){let d=this.events[t];d||(d={highPriority:new Map,regular:new Map},this.events[t]=d),n.isFirst?d.highPriority.set(o,!0):d.regular.set(o,!0)}removeListener(t,o){this.events[t]&&(this.events[t].regular.delete(o),this.events[t].highPriority.delete(o))}removeAllListeners(){this.events={}}emit(t,...o){const n=this.events[t];if(!n)return;const d=Array.from(n.highPriority.keys()),a=Array.from(n.regular.keys());for(let p=d.length-1;p>=0;p-=1){const c=d[p];n.highPriority.has(c)&&c.apply(this,o)}for(let p=0;p<a.length;p+=1){const c=a[p];n.regular.has(c)&&c.apply(this,o)}}once(t,o){const n=this;this.on(t,function d(...a){n.removeListener(t,d),o.apply(n,a)})}}const ve=(e,t)=>{const o=e.getNode(t),n=e.getNavigableChildrenIds(o.parentId),d=n.indexOf(t);if(d===0)return o.parentId;let a=n[d-1];for(;e.isNodeExpanded(a)&&e.getNavigableChildrenIds(a).length>0;)a=e.getNavigableChildrenIds(a).pop();return a},fe=(e,t)=>{if(e.isNodeExpanded(t)&&e.getNavigableChildrenIds(t).length>0)return e.getNavigableChildrenIds(t)[0];let o=e.getNode(t);for(;o!=null;){const n=e.getNavigableChildrenIds(o.parentId),d=n[n.indexOf(o.id)+1];if(d)return d;o=e.getNode(o.parentId)}return null},Be=e=>{let t=e.getNavigableChildrenIds(null).pop();for(;e.isNodeExpanded(t);)t=e.getNavigableChildrenIds(t).pop();return t},Ae=e=>e.getNavigableChildrenIds(null)[0],re=(e,t)=>{Object.assign(e,t)},$o=e=>e.isPropagationStopped!==void 0,Do=({instance:e})=>{const[t]=x.useState(()=>new wo),o=x.useCallback((...d)=>{const[a,p,c={}]=d;c.defaultMuiPrevented=!1,!($o(c)&&c.isPropagationStopped())&&t.emit(a,p,c)},[t]),n=x.useCallback((d,a)=>(t.on(d,a),()=>{t.removeListener(d,a)}),[t]);re(e,{$$publishEvent:o,$$subscribeEvent:n})},Bo=[Do],Ao=e=>{const t=[...Bo,...e.plugins],o=t.reduce((s,i)=>i.getDefaultizedParams?i.getDefaultizedParams(s):s,e),n=Po(t,o),a=x.useRef({}).current,p=x.useRef(null),c=gt(p,e.rootRef),[h,u]=x.useState(()=>{const s={};return t.forEach(i=>{i.getInitialState&&Object.assign(s,i.getInitialState(o))}),s}),b=[];let m=St;const g=s=>{const i=s({instance:a,params:o,state:h,setState:u,rootRef:p,models:n})||{};i.getRootProps&&b.push(i.getRootProps),i.contextValue&&(m=i.contextValue)};return t.forEach(g),{getRootProps:(s={})=>{const i=$({role:"tree",tabIndex:0},s,{ref:c});return b.forEach(f=>{Object.assign(i,f(s))}),i},rootRef:c,contextValue:m}},Lo=["element"];function _o(e,t){for(let o=0;o<e.length;o+=1)if(t(e[o]))return o;return-1}function Oo(e,t){let o=0,n=e.length-1;for(;o<=n;){const d=Math.floor((o+n)/2);if(e[d].element===t)return d;e[d].element.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING?n=d-1:o=d+1}return o}const vt=x.createContext({});function Mo(e){const t=x.useRef(null);return x.useEffect(()=>{t.current=e},[e]),t.current}const nt=()=>{};function Vo(e){const[,t]=x.useState(),{registerDescendant:o=nt,unregisterDescendant:n=nt,descendants:d=[],parentId:a=null}=x.useContext(vt),p=_o(d,u=>u.element===e.element),c=Mo(d),h=d.some((u,b)=>c&&c[b]&&c[b].element!==u.element);return Vt(()=>{if(e.element)return o($({},e,{index:p})),()=>{n(e.element)};t({})},[o,n,p,h,e]),{parentId:a,index:p}}function Rt(e){const{children:t,id:o}=e,[n,d]=x.useState([]),a=x.useCallback(h=>{let{element:u}=h,b=se(h,Lo);d(m=>{if(m.length===0)return[$({},b,{element:u,index:0})];const g=Oo(m,u);let r;if(m[g]&&m[g].element===u)r=m;else{const s=$({},b,{element:u,index:g});r=m.slice(),r.splice(g,0,s)}return r.forEach((s,i)=>{s.index=i}),r})},[]),p=x.useCallback(h=>{d(u=>u.filter(b=>h!==b.element))},[]),c=x.useMemo(()=>({descendants:n,registerDescendant:a,unregisterDescendant:p,parentId:o}),[n,a,p,o]);return l.jsx(vt.Provider,{value:c,children:t})}function Fo(e){const{value:t,children:o}=e;return l.jsx(Et.Provider,{value:t,children:l.jsx(Rt,{children:o})})}const zo=(e,t,o)=>{e.$$publishEvent(t,o)},Wo=({instance:e,params:t})=>{const o=x.useRef({}),n=x.useCallback(u=>o.current[u],[]),d=x.useCallback(u=>{o.current[u.id]=u},[]),a=x.useCallback(u=>{const b=$({},o.current);delete b[u],o.current=b,zo(e,"removeNode",{id:u})},[e]),p=x.useCallback(u=>{if(u==null)return!1;let b=e.getNode(u);if(!b)return!1;if(b.disabled)return!0;for(;b.parentId!=null;)if(b=e.getNode(b.parentId),b.disabled)return!0;return!1},[e]),c=he(u=>Object.values(o.current).filter(b=>b.parentId===u).sort((b,m)=>b.index-m.index).map(b=>b.id));re(e,{getNode:n,updateNode:d,removeNode:a,getChildrenIds:c,getNavigableChildrenIds:u=>{let b=e.getChildrenIds(u);return t.disabledItemsFocusable||(b=b.filter(m=>!e.isNodeDisabled(m))),b},isNodeDisabled:p})},He=({instance:e,params:t,models:o})=>{const n=x.useCallback(c=>Array.isArray(o.expanded.value)?o.expanded.value.indexOf(c)!==-1:!1,[o.expanded.value]),d=x.useCallback(c=>{var h;return!!((h=e.getNode(c))!=null&&h.expandable)},[e]),a=he((c,h)=>{if(h==null)return;let u;o.expanded.value.indexOf(h)!==-1?u=o.expanded.value.filter(b=>b!==h):u=[h].concat(o.expanded.value),t.onNodeToggle&&t.onNodeToggle(c,u),o.expanded.setValue(u)});re(e,{isNodeExpanded:n,isNodeExpandable:d,toggleNodeExpansion:a,expandAllSiblings:(c,h)=>{const u=e.getNode(h),m=e.getChildrenIds(u.parentId).filter(r=>e.isNodeExpandable(r)&&!e.isNodeExpanded(r)),g=o.expanded.value.concat(m);m.length>0&&(o.expanded.setValue(g),t.onNodeToggle&&t.onNodeToggle(c,g))}})};He.models={expanded:{controlledProp:"expanded",defaultProp:"defaultExpanded"}};const Uo=[];He.getDefaultizedParams=e=>{var t;return $({},e,{defaultExpanded:(t=e.defaultExpanded)!=null?t:Uo})};const Ko=(e,t,o)=>{if(t===o)return[t,o];const n=e.getNode(t),d=e.getNode(o);if(n.parentId===d.id||d.parentId===n.id)return d.parentId===n.id?[n.id,d.id]:[d.id,n.id];const a=[n.id],p=[d.id];let c=n.parentId,h=d.parentId,u=p.indexOf(c)!==-1,b=a.indexOf(h)!==-1,m=!0,g=!0;for(;!b&&!u;)m&&(a.push(c),u=p.indexOf(c)!==-1,m=c!==null,!u&&m&&(c=e.getNode(c).parentId)),g&&!u&&(p.push(h),b=a.indexOf(h)!==-1,g=h!==null,!b&&g&&(h=e.getNode(h).parentId));const r=u?c:h,s=e.getChildrenIds(r),i=a[a.indexOf(r)-1],f=p[p.indexOf(r)-1];return s.indexOf(i)<s.indexOf(f)?[t,o]:[o,t]},Je=({instance:e,params:t,models:o})=>{const n=x.useRef(null),d=x.useRef(!1),a=x.useRef([]),p=s=>Array.isArray(o.selected.value)?o.selected.value.indexOf(s)!==-1:o.selected.value===s,c=(s,i,f=!1)=>{if(!t.disableSelection){if(f){if(Array.isArray(o.selected.value)){let k;o.selected.value.indexOf(i)!==-1?k=o.selected.value.filter(C=>C!==i):k=[i].concat(o.selected.value),t.onNodeSelect&&t.onNodeSelect(s,k),o.selected.setValue(k)}}else{const k=t.multiSelect?[i]:i;t.onNodeSelect&&t.onNodeSelect(s,k),o.selected.setValue(k)}n.current=i,d.current=!1,a.current=[]}},h=(s,i)=>{const[f,k]=Ko(e,s,i),C=[f];let y=f;for(;y!==k;)y=fe(e,y),C.push(y);return C},u=(s,i)=>{let f=o.selected.value.slice();const{start:k,next:C,current:y}=i;!C||!y||(a.current.indexOf(y)===-1&&(a.current=[]),d.current?a.current.indexOf(C)!==-1?(f=f.filter(I=>I===k||I!==y),a.current=a.current.filter(I=>I===k||I!==y)):(f.push(C),a.current.push(C)):(f.push(C),a.current.push(y,C)),t.onNodeSelect&&t.onNodeSelect(s,f),o.selected.setValue(f))},b=(s,i)=>{let f=o.selected.value.slice();const{start:k,end:C}=i;d.current&&(f=f.filter(E=>a.current.indexOf(E)===-1));let y=h(k,C);y=y.filter(E=>!e.isNodeDisabled(E)),a.current=y;let I=f.concat(y);I=I.filter((E,S)=>I.indexOf(E)===S),t.onNodeSelect&&t.onNodeSelect(s,I),o.selected.setValue(I)};return re(e,{isNodeSelected:p,selectNode:c,selectRange:(s,i,f=!1)=>{if(t.disableSelection)return;const{start:k=n.current,end:C,current:y}=i;f?u(s,{start:k,next:C,current:y}):k!=null&&C!=null&&b(s,{start:k,end:C}),d.current=!0},rangeSelectToLast:(s,i)=>{n.current||(n.current=i);const f=d.current?n.current:i;e.selectRange(s,{start:f,end:Be(e)})},rangeSelectToFirst:(s,i)=>{n.current||(n.current=i);const f=d.current?n.current:i;e.selectRange(s,{start:f,end:Ae(e)})}}),{getRootProps:()=>({"aria-multiselectable":t.multiSelect})}};Je.models={selected:{controlledProp:"selected",defaultProp:"defaultSelected"}};const qo=[];Je.getDefaultizedParams=e=>{var t,o,n;return $({},e,{disableSelection:(t=e.disableSelection)!=null?t:!1,multiSelect:(o=e.multiSelect)!=null?o:!1,defaultSelected:(n=e.defaultSelected)!=null?n:e.multiSelect?qo:null})};const rt=1e3;class Ho{constructor(t=rt){this.timeouts=new Map,this.cleanupTimeout=rt,this.cleanupTimeout=t}register(t,o,n){this.timeouts||(this.timeouts=new Map);const d=setTimeout(()=>{typeof o=="function"&&o(),this.timeouts.delete(n.cleanupToken)},this.cleanupTimeout);this.timeouts.set(n.cleanupToken,d)}unregister(t){const o=this.timeouts.get(t.cleanupToken);o&&(this.timeouts.delete(t.cleanupToken),clearTimeout(o))}reset(){this.timeouts&&(this.timeouts.forEach((t,o)=>{this.unregister({cleanupToken:o})}),this.timeouts=void 0)}}class Jo{constructor(){this.registry=new FinalizationRegistry(t=>{typeof t=="function"&&t()})}register(t,o,n){this.registry.register(t,o,n)}unregister(t){this.registry.unregister(t)}reset(){}}class Xo{}function Go(e){let t=0;return function(n,d,a){e.registry===null&&(e.registry=typeof FinalizationRegistry<"u"?new Jo:new Ho);const[p]=x.useState(new Xo),c=x.useRef(null),h=x.useRef();h.current=a;const u=x.useRef(null);if(!c.current&&h.current){const b=(m,g)=>{if(!g.defaultMuiPrevented){var r;(r=h.current)==null||r.call(h,m,g)}};c.current=n.$$subscribeEvent(d,b),t+=1,u.current={cleanupToken:t},e.registry.register(p,()=>{var m;(m=c.current)==null||m.call(c),c.current=null,u.current=null},u.current)}else!h.current&&c.current&&(c.current(),c.current=null,u.current&&(e.registry.unregister(u.current),u.current=null));x.useEffect(()=>{if(!c.current&&h.current){const b=(m,g)=>{if(!g.defaultMuiPrevented){var r;(r=h.current)==null||r.call(h,m,g)}};c.current=n.$$subscribeEvent(d,b)}return u.current&&e.registry&&(e.registry.unregister(u.current),u.current=null),()=>{var b;(b=c.current)==null||b.call(c),c.current=null}},[n,d])}}const Qo={registry:null},Zo=Go(Qo),Xe=({instance:e,params:t,state:o,setState:n,models:d,rootRef:a})=>{const p=he(r=>{const s=typeof r=="function"?r(o.focusedNodeId):r;n(i=>$({},i,{focusedNodeId:s}))}),c=x.useCallback(r=>o.focusedNodeId===r,[o.focusedNodeId]),h=he((r,s)=>{s&&(p(s),t.onNodeFocus&&t.onNodeFocus(r,s))});re(e,{isNodeFocused:c,focusNode:h}),Zo(e,"removeNode",({id:r})=>{p(s=>s===r&&a.current===kt(a.current).activeElement?e.getChildrenIds(null)[0]:s)});const u=r=>s=>{var i;if((i=r.onFocus)==null||i.call(r,s),s.target===s.currentTarget){const f=C=>{const y=e.getNode(C);return y&&(y.parentId==null||e.isNodeExpanded(y.parentId))};let k;Array.isArray(d.selected.value)?k=d.selected.value.find(f):d.selected.value!=null&&f(d.selected.value)&&(k=d.selected.value),k==null&&(k=e.getNavigableChildrenIds(null)[0]),e.focusNode(s,k)}},b=r=>s=>{var i;(i=r.onBlur)==null||i.call(r,s),p(null)},m=e.getNode(o.focusedNodeId),g=m?m.idAttribute:null;return{getRootProps:r=>({onFocus:u(r),onBlur:b(r),"aria-activedescendant":g??void 0})}};Xe.getInitialState=()=>({focusedNodeId:null});Xe.getDefaultizedParams=e=>{var t;return $({},e,{disabledItemsFocusable:(t=e.disabledItemsFocusable)!=null?t:!1})};function Yo(e){return e&&e.length===1&&e.match(/\S/)}function it(e,t,o){for(let n=t;n<e.length;n+=1)if(o===e[n])return n;return-1}const el=({instance:e,params:t,state:o})=>{const d=Ft().direction==="rtl",a=x.useRef({}),p=he((r,s)=>(a.current[r]=s,()=>{const i=$({},a.current);delete i[r],a.current=i}));re(e,{mapFirstChar:p});const c=r=>(o.focusedNodeId!=null&&e.isNodeExpandable(o.focusedNodeId)&&(e.isNodeExpanded(o.focusedNodeId)?e.focusNode(r,fe(e,o.focusedNodeId)):e.isNodeDisabled(o.focusedNodeId)||e.toggleNodeExpansion(r,o.focusedNodeId)),!0),h=r=>{if(o.focusedNodeId==null)return!1;if(e.isNodeExpanded(o.focusedNodeId)&&!e.isNodeDisabled(o.focusedNodeId))return e.toggleNodeExpansion(r,o.focusedNodeId),!0;const s=e.getNode(o.focusedNodeId).parentId;return s?(e.focusNode(r,s),!0):!1},u=(r,s,i)=>{let f,k;const C=i.toLowerCase(),y=[],I=[];Object.keys(a.current).forEach(E=>{const S=e.getNode(E),v=S.parentId?e.isNodeExpanded(S.parentId):!0,D=t.disabledItemsFocusable?!1:e.isNodeDisabled(E);v&&!D&&(y.push(E),I.push(a.current[E]))}),f=y.indexOf(s)+1,f>=y.length&&(f=0),k=it(I,f,C),k===-1&&(k=it(I,0,C)),k>-1&&e.focusNode(r,y[k])},b=(r,s)=>{e.isNodeDisabled(fe(e,s))||e.selectRange(r,{end:fe(e,s),current:s},!0)},m=(r,s)=>{e.isNodeDisabled(ve(e,s))||e.selectRange(r,{end:ve(e,s),current:s},!0)},g=r=>s=>{var i;(i=r.onKeyDown)==null||i.call(r,s);let f=!1;const k=s.key;if(s.altKey||s.currentTarget!==s.target||o.focusedNodeId==null)return;const C=s.ctrlKey||s.metaKey;switch(k){case" ":!t.disableSelection&&!e.isNodeDisabled(o.focusedNodeId)&&(f=!0,t.multiSelect&&s.shiftKey?e.selectRange(s,{end:o.focusedNodeId}):t.multiSelect?e.selectNode(s,o.focusedNodeId,!0):e.selectNode(s,o.focusedNodeId)),s.stopPropagation();break;case"Enter":e.isNodeDisabled(o.focusedNodeId)||(e.isNodeExpandable(o.focusedNodeId)?(e.toggleNodeExpansion(s,o.focusedNodeId),f=!0):t.disableSelection||(f=!0,t.multiSelect?e.selectNode(s,o.focusedNodeId,!0):e.selectNode(s,o.focusedNodeId))),s.stopPropagation();break;case"ArrowDown":t.multiSelect&&s.shiftKey&&!t.disableSelection&&b(s,o.focusedNodeId),e.focusNode(s,fe(e,o.focusedNodeId)),f=!0;break;case"ArrowUp":t.multiSelect&&s.shiftKey&&!t.disableSelection&&m(s,o.focusedNodeId),e.focusNode(s,ve(e,o.focusedNodeId)),f=!0;break;case"ArrowRight":d?f=h(s):f=c(s);break;case"ArrowLeft":d?f=c(s):f=h(s);break;case"Home":t.multiSelect&&C&&s.shiftKey&&!t.disableSelection&&!e.isNodeDisabled(o.focusedNodeId)&&e.rangeSelectToFirst(s,o.focusedNodeId),e.focusNode(s,Ae(e)),f=!0;break;case"End":t.multiSelect&&C&&s.shiftKey&&!t.disableSelection&&!e.isNodeDisabled(o.focusedNodeId)&&e.rangeSelectToLast(s,o.focusedNodeId),e.focusNode(s,Be(e)),f=!0;break;default:k==="*"?(e.expandAllSiblings(s,o.focusedNodeId),f=!0):t.multiSelect&&C&&k.toLowerCase()==="a"&&!t.disableSelection?(e.selectRange(s,{start:Ae(e),end:Be(e)}),f=!0):!C&&!s.shiftKey&&Yo(k)&&(u(s,o.focusedNodeId,k),f=!0)}f&&(s.preventDefault(),s.stopPropagation())};return{getRootProps:r=>({onKeyDown:g(r)})}},tl=({instance:e,params:t})=>{const o=zt(t.id);return{getRootProps:()=>({id:o}),contextValue:{treeId:o,instance:e,multiSelect:t.multiSelect,disabledItemsFocusable:t.disabledItemsFocusable,icons:{defaultCollapseIcon:t.defaultCollapseIcon,defaultEndIcon:t.defaultEndIcon,defaultExpandIcon:t.defaultExpandIcon,defaultParentIcon:t.defaultParentIcon}}}},ol=[Wo,He,Je,Xe,el,tl],ll=["disabledItemsFocusable","expanded","defaultExpanded","onNodeToggle","onNodeFocus","disableSelection","defaultSelected","selected","multiSelect","onNodeSelect","id","defaultCollapseIcon","defaultEndIcon","defaultExpandIcon","defaultParentIcon","children"],sl=e=>{const{classes:t}=e;return Ve({root:["root"]},Ro,t)},ct=K("ul",{name:"MuiTreeView",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,margin:0,listStyle:"none",outline:0}),nl=x.forwardRef(function(t,o){const n=Oe({props:t,name:"MuiTreeView"}),d=n,a=n,{disabledItemsFocusable:p,expanded:c,defaultExpanded:h,onNodeToggle:u,onNodeFocus:b,disableSelection:m,defaultSelected:g,selected:r,multiSelect:s,onNodeSelect:i,id:f,defaultCollapseIcon:k,defaultEndIcon:C,defaultExpandIcon:y,defaultParentIcon:I,children:E}=a,S=se(a,ll),{getRootProps:v,contextValue:D}=Ao({disabledItemsFocusable:p,expanded:c,defaultExpanded:h,onNodeToggle:u,onNodeFocus:b,disableSelection:m,defaultSelected:g,selected:r,multiSelect:s,onNodeSelect:i,id:f,defaultCollapseIcon:k,defaultEndIcon:C,defaultExpandIcon:y,defaultParentIcon:I,plugins:ol,rootRef:o}),T=sl(n),B=ht({elementType:ct,externalSlotProps:{},externalForwardedProps:S,className:T.root,getSlotProps:v,ownerState:d});return l.jsx(Fo,{value:D,children:l.jsx(ct,$({},B,{children:E}))})}),Pt=()=>x.useContext(Et);function rl(e){const{instance:t,multiSelect:o}=Pt(),n=t?t.isNodeExpandable(e):!1,d=t?t.isNodeExpanded(e):!1,a=t?t.isNodeFocused(e):!1,p=t?t.isNodeSelected(e):!1,c=t?t.isNodeDisabled(e):!1;return{disabled:c,expanded:d,selected:p,focused:a,handleExpansion:m=>{if(t&&!c){a||t.focusNode(m,e);const g=o&&(m.shiftKey||m.ctrlKey||m.metaKey);n&&!(g&&t.isNodeExpanded(e))&&t.toggleNodeExpansion(m,e)}},handleSelection:m=>{t&&!c&&(a||t.focusNode(m,e),o&&(m.shiftKey||m.ctrlKey||m.metaKey)?m.shiftKey?t.selectRange(m,{end:e}):t.selectNode(m,e,!0):t.selectNode(m,e))},preventSelection:m=>{(m.shiftKey||m.ctrlKey||m.metaKey||c)&&m.preventDefault()}}}const il=["classes","className","displayIcon","expansionIcon","icon","label","nodeId","onClick","onMouseDown"],wt=x.forwardRef(function(t,o){const{classes:n,className:d,displayIcon:a,expansionIcon:p,icon:c,label:h,nodeId:u,onClick:b,onMouseDown:m}=t,g=se(t,il),{disabled:r,expanded:s,selected:i,focused:f,handleExpansion:k,handleSelection:C,preventSelection:y}=rl(u),I=c||p||a,E=v=>{y(v),m&&m(v)},S=v=>{k(v),C(v),b&&b(v)};return l.jsxs("div",$({},g,{className:Me(d,n.root,s&&n.expanded,i&&n.selected,f&&n.focused,r&&n.disabled),onClick:S,onMouseDown:E,ref:o,children:[l.jsx("div",{className:n.iconContainer,children:I}),l.jsx("div",{className:n.label,children:h})]}))});function cl(e){return _e("MuiTreeItem",e)}const X=Le("MuiTreeItem",["root","group","content","expanded","selected","focused","disabled","iconContainer","label"]),al=["children","className","collapseIcon","ContentComponent","ContentProps","endIcon","expandIcon","disabled","icon","id","label","nodeId","onClick","onMouseDown","TransitionComponent","TransitionProps"],dl=e=>{const{classes:t}=e;return Ve({root:["root"],content:["content"],expanded:["expanded"],selected:["selected"],focused:["focused"],disabled:["disabled"],iconContainer:["iconContainer"],label:["label"],group:["group"]},cl,t)},ul=K("li",{name:"MuiTreeItem",slot:"Root",overridesResolver:(e,t)=>t.root})({listStyle:"none",margin:0,padding:0,outline:0}),pl=K(wt,{name:"MuiTreeItem",slot:"Content",overridesResolver:(e,t)=>[t.content,t.iconContainer&&{[`& .${X.iconContainer}`]:t.iconContainer},t.label&&{[`& .${X.label}`]:t.label}]})(({theme:e})=>({padding:"0 8px",width:"100%",boxSizing:"border-box",display:"flex",alignItems:"center",cursor:"pointer",WebkitTapHighlightColor:"transparent","&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${X.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,backgroundColor:"transparent"},[`&.${X.focused}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${X.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ne(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Ne(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ne(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${X.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Ne(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`& .${X.iconContainer}`]:{marginRight:4,width:15,display:"flex",flexShrink:0,justifyContent:"center","& svg":{fontSize:18}},[`& .${X.label}`]:$({paddingLeft:4,width:"100%",boxSizing:"border-box",minWidth:0,position:"relative"},e.typography.body1)})),fl=K(yt,{name:"MuiTreeItem",slot:"Group",overridesResolver:(e,t)=>t.group})({margin:0,padding:0,marginLeft:17}),ml=x.forwardRef(function(t,o){const n=Oe({props:t,name:"MuiTreeItem"}),{children:d,className:a,collapseIcon:p,ContentComponent:c=wt,ContentProps:h,endIcon:u,expandIcon:b,disabled:m,icon:g,id:r,label:s,nodeId:i,onClick:f,onMouseDown:k,TransitionComponent:C=yt,TransitionProps:y}=n,I=se(n,al),{icons:E,multiSelect:S,disabledItemsFocusable:v,treeId:D,instance:T}=Pt();let B;r!=null?B=r:D&&i&&(B=`${D}-${i}`);const[H,ye]=x.useState(null),je=x.useRef(null),te=gt(ye,o),O=x.useMemo(()=>({element:H,id:i}),[i,H]),{index:oe,parentId:ie}=Vo(O),J=!!(Array.isArray(d)?d.length:d),Q=T?T.isNodeExpanded(i):!1,ce=T?T.isNodeFocused(i):!1,le=T?T.isNodeSelected(i):!1,ae=T?T.isNodeDisabled(i):!1,Z=$({},n,{expanded:Q,focused:ce,selected:le,disabled:ae}),V=dl(Z);let de,ue;J&&(Q?ue=p||E.defaultCollapseIcon:ue=b||E.defaultExpandIcon),J?de=E.defaultParentIcon:de=u||E.defaultEndIcon,x.useEffect(()=>{if(T&&oe!==-1)return T.updateNode({id:i,idAttribute:B,index:oe,parentId:ie,expandable:J,disabled:m}),()=>T.removeNode(i)},[T,ie,oe,i,J,m,B]),x.useEffect(()=>{if(T&&s){var L,ee;return T.mapFirstChar(i,((L=(ee=je.current)==null?void 0:ee.textContent)!=null?L:"").substring(0,1).toLowerCase())}},[T,i,s]);let Y;S?Y=le:le&&(Y=!0);function Ce(L){if(L.target===L.currentTarget){let N;typeof L.target.getRootNode=="function"?N=L.target.getRootNode():N=kt(L.target),N.getElementById(D).focus({preventScroll:!0})}const ee=!v&&ae;T&&!ce&&L.currentTarget===L.target&&!ee&&T.focusNode(L,i)}return l.jsxs(ul,$({className:Me(V.root,a),role:"treeitem","aria-expanded":J?Q:void 0,"aria-selected":Y,"aria-disabled":ae||void 0,id:B,tabIndex:-1},I,{ownerState:Z,onFocus:Ce,ref:te,children:[l.jsx(pl,$({as:c,ref:je,classes:{root:V.content,expanded:V.expanded,selected:V.selected,focused:V.focused,disabled:V.disabled,iconContainer:V.iconContainer,label:V.label},label:s,nodeId:i,onClick:f,onMouseDown:k,icon:g,expansionIcon:ue,displayIcon:de,ownerState:Z},h)),d&&l.jsx(Rt,{id:i,children:l.jsx(fl,$({as:C,unmountOnExit:!0,className:V.group,in:Q,component:"ul",role:"group"},y,{children:d}))})]}))});function Ge({data:e,...t}){return!e||!e.length?null:l.jsx(hl,{...t,children:e.map(o=>l.jsx("a",{href:o.url,target:"_blank",rel:"noreferrer",children:l.jsx("img",{src:o.url,alt:o.alt||""})},o.url))})}Ge.propTypes={data:P.arrayOf(P.shape({url:P.string,alt:P.string}))};Ge.defaultProps={data:[]};const hl=q(j)`
|
|
22
|
+
`;function Ro(e){return Le("MuiTreeView",e)}_e("MuiTreeView",["root"]);const St={instance:null,multiSelect:!1,disabledItemsFocusable:!1,treeId:void 0,icons:{defaultCollapseIcon:null,defaultExpandIcon:null,defaultParentIcon:null,defaultEndIcon:null}},Et=x.createContext(St),Po=(e,t)=>{const o=x.useRef({}),[n,d]=x.useState(()=>{const p={};return e.forEach(c=>{c.models&&Object.entries(c.models).forEach(([h,u])=>{o.current[h]={controlledProp:u.controlledProp,defaultProp:u.defaultProp,isControlled:t[u.controlledProp]!==void 0},p[h]=t[u.defaultProp]})}),p});return Object.fromEntries(Object.entries(o.current).map(([p,c])=>{const h=c.isControlled?t[c.controlledProp]:n[p];return[p,{value:h,setValue:u=>{c.isControlled||d(b=>$({},b,{[p]:u}))}}]}))};class wo{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(t,o,n={}){let d=this.events[t];d||(d={highPriority:new Map,regular:new Map},this.events[t]=d),n.isFirst?d.highPriority.set(o,!0):d.regular.set(o,!0)}removeListener(t,o){this.events[t]&&(this.events[t].regular.delete(o),this.events[t].highPriority.delete(o))}removeAllListeners(){this.events={}}emit(t,...o){const n=this.events[t];if(!n)return;const d=Array.from(n.highPriority.keys()),a=Array.from(n.regular.keys());for(let p=d.length-1;p>=0;p-=1){const c=d[p];n.highPriority.has(c)&&c.apply(this,o)}for(let p=0;p<a.length;p+=1){const c=a[p];n.regular.has(c)&&c.apply(this,o)}}once(t,o){const n=this;this.on(t,function d(...a){n.removeListener(t,d),o.apply(n,a)})}}const ve=(e,t)=>{const o=e.getNode(t),n=e.getNavigableChildrenIds(o.parentId),d=n.indexOf(t);if(d===0)return o.parentId;let a=n[d-1];for(;e.isNodeExpanded(a)&&e.getNavigableChildrenIds(a).length>0;)a=e.getNavigableChildrenIds(a).pop();return a},fe=(e,t)=>{if(e.isNodeExpanded(t)&&e.getNavigableChildrenIds(t).length>0)return e.getNavigableChildrenIds(t)[0];let o=e.getNode(t);for(;o!=null;){const n=e.getNavigableChildrenIds(o.parentId),d=n[n.indexOf(o.id)+1];if(d)return d;o=e.getNode(o.parentId)}return null},Be=e=>{let t=e.getNavigableChildrenIds(null).pop();for(;e.isNodeExpanded(t);)t=e.getNavigableChildrenIds(t).pop();return t},Ae=e=>e.getNavigableChildrenIds(null)[0],re=(e,t)=>{Object.assign(e,t)},$o=e=>e.isPropagationStopped!==void 0,Do=({instance:e})=>{const[t]=x.useState(()=>new wo),o=x.useCallback((...d)=>{const[a,p,c={}]=d;c.defaultMuiPrevented=!1,!($o(c)&&c.isPropagationStopped())&&t.emit(a,p,c)},[t]),n=x.useCallback((d,a)=>(t.on(d,a),()=>{t.removeListener(d,a)}),[t]);re(e,{$$publishEvent:o,$$subscribeEvent:n})},Bo=[Do],Ao=e=>{const t=[...Bo,...e.plugins],o=t.reduce((s,i)=>i.getDefaultizedParams?i.getDefaultizedParams(s):s,e),n=Po(t,o),a=x.useRef({}).current,p=x.useRef(null),c=gt(p,e.rootRef),[h,u]=x.useState(()=>{const s={};return t.forEach(i=>{i.getInitialState&&Object.assign(s,i.getInitialState(o))}),s}),b=[];let m=St;const g=s=>{const i=s({instance:a,params:o,state:h,setState:u,rootRef:p,models:n})||{};i.getRootProps&&b.push(i.getRootProps),i.contextValue&&(m=i.contextValue)};return t.forEach(g),{getRootProps:(s={})=>{const i=$({role:"tree",tabIndex:0},s,{ref:c});return b.forEach(f=>{Object.assign(i,f(s))}),i},rootRef:c,contextValue:m}},_o=["element"];function Lo(e,t){for(let o=0;o<e.length;o+=1)if(t(e[o]))return o;return-1}function Oo(e,t){let o=0,n=e.length-1;for(;o<=n;){const d=Math.floor((o+n)/2);if(e[d].element===t)return d;e[d].element.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING?n=d-1:o=d+1}return o}const vt=x.createContext({});function Mo(e){const t=x.useRef(null);return x.useEffect(()=>{t.current=e},[e]),t.current}const nt=()=>{};function Vo(e){const[,t]=x.useState(),{registerDescendant:o=nt,unregisterDescendant:n=nt,descendants:d=[],parentId:a=null}=x.useContext(vt),p=Lo(d,u=>u.element===e.element),c=Mo(d),h=d.some((u,b)=>c&&c[b]&&c[b].element!==u.element);return Vt(()=>{if(e.element)return o($({},e,{index:p})),()=>{n(e.element)};t({})},[o,n,p,h,e]),{parentId:a,index:p}}function Rt(e){const{children:t,id:o}=e,[n,d]=x.useState([]),a=x.useCallback(h=>{let{element:u}=h,b=se(h,_o);d(m=>{if(m.length===0)return[$({},b,{element:u,index:0})];const g=Oo(m,u);let r;if(m[g]&&m[g].element===u)r=m;else{const s=$({},b,{element:u,index:g});r=m.slice(),r.splice(g,0,s)}return r.forEach((s,i)=>{s.index=i}),r})},[]),p=x.useCallback(h=>{d(u=>u.filter(b=>h!==b.element))},[]),c=x.useMemo(()=>({descendants:n,registerDescendant:a,unregisterDescendant:p,parentId:o}),[n,a,p,o]);return l.jsx(vt.Provider,{value:c,children:t})}function Fo(e){const{value:t,children:o}=e;return l.jsx(Et.Provider,{value:t,children:l.jsx(Rt,{children:o})})}const zo=(e,t,o)=>{e.$$publishEvent(t,o)},Wo=({instance:e,params:t})=>{const o=x.useRef({}),n=x.useCallback(u=>o.current[u],[]),d=x.useCallback(u=>{o.current[u.id]=u},[]),a=x.useCallback(u=>{const b=$({},o.current);delete b[u],o.current=b,zo(e,"removeNode",{id:u})},[e]),p=x.useCallback(u=>{if(u==null)return!1;let b=e.getNode(u);if(!b)return!1;if(b.disabled)return!0;for(;b.parentId!=null;)if(b=e.getNode(b.parentId),b.disabled)return!0;return!1},[e]),c=he(u=>Object.values(o.current).filter(b=>b.parentId===u).sort((b,m)=>b.index-m.index).map(b=>b.id));re(e,{getNode:n,updateNode:d,removeNode:a,getChildrenIds:c,getNavigableChildrenIds:u=>{let b=e.getChildrenIds(u);return t.disabledItemsFocusable||(b=b.filter(m=>!e.isNodeDisabled(m))),b},isNodeDisabled:p})},He=({instance:e,params:t,models:o})=>{const n=x.useCallback(c=>Array.isArray(o.expanded.value)?o.expanded.value.indexOf(c)!==-1:!1,[o.expanded.value]),d=x.useCallback(c=>{var h;return!!((h=e.getNode(c))!=null&&h.expandable)},[e]),a=he((c,h)=>{if(h==null)return;let u;o.expanded.value.indexOf(h)!==-1?u=o.expanded.value.filter(b=>b!==h):u=[h].concat(o.expanded.value),t.onNodeToggle&&t.onNodeToggle(c,u),o.expanded.setValue(u)});re(e,{isNodeExpanded:n,isNodeExpandable:d,toggleNodeExpansion:a,expandAllSiblings:(c,h)=>{const u=e.getNode(h),m=e.getChildrenIds(u.parentId).filter(r=>e.isNodeExpandable(r)&&!e.isNodeExpanded(r)),g=o.expanded.value.concat(m);m.length>0&&(o.expanded.setValue(g),t.onNodeToggle&&t.onNodeToggle(c,g))}})};He.models={expanded:{controlledProp:"expanded",defaultProp:"defaultExpanded"}};const Uo=[];He.getDefaultizedParams=e=>{var t;return $({},e,{defaultExpanded:(t=e.defaultExpanded)!=null?t:Uo})};const Ko=(e,t,o)=>{if(t===o)return[t,o];const n=e.getNode(t),d=e.getNode(o);if(n.parentId===d.id||d.parentId===n.id)return d.parentId===n.id?[n.id,d.id]:[d.id,n.id];const a=[n.id],p=[d.id];let c=n.parentId,h=d.parentId,u=p.indexOf(c)!==-1,b=a.indexOf(h)!==-1,m=!0,g=!0;for(;!b&&!u;)m&&(a.push(c),u=p.indexOf(c)!==-1,m=c!==null,!u&&m&&(c=e.getNode(c).parentId)),g&&!u&&(p.push(h),b=a.indexOf(h)!==-1,g=h!==null,!b&&g&&(h=e.getNode(h).parentId));const r=u?c:h,s=e.getChildrenIds(r),i=a[a.indexOf(r)-1],f=p[p.indexOf(r)-1];return s.indexOf(i)<s.indexOf(f)?[t,o]:[o,t]},Je=({instance:e,params:t,models:o})=>{const n=x.useRef(null),d=x.useRef(!1),a=x.useRef([]),p=s=>Array.isArray(o.selected.value)?o.selected.value.indexOf(s)!==-1:o.selected.value===s,c=(s,i,f=!1)=>{if(!t.disableSelection){if(f){if(Array.isArray(o.selected.value)){let k;o.selected.value.indexOf(i)!==-1?k=o.selected.value.filter(C=>C!==i):k=[i].concat(o.selected.value),t.onNodeSelect&&t.onNodeSelect(s,k),o.selected.setValue(k)}}else{const k=t.multiSelect?[i]:i;t.onNodeSelect&&t.onNodeSelect(s,k),o.selected.setValue(k)}n.current=i,d.current=!1,a.current=[]}},h=(s,i)=>{const[f,k]=Ko(e,s,i),C=[f];let y=f;for(;y!==k;)y=fe(e,y),C.push(y);return C},u=(s,i)=>{let f=o.selected.value.slice();const{start:k,next:C,current:y}=i;!C||!y||(a.current.indexOf(y)===-1&&(a.current=[]),d.current?a.current.indexOf(C)!==-1?(f=f.filter(T=>T===k||T!==y),a.current=a.current.filter(T=>T===k||T!==y)):(f.push(C),a.current.push(C)):(f.push(C),a.current.push(y,C)),t.onNodeSelect&&t.onNodeSelect(s,f),o.selected.setValue(f))},b=(s,i)=>{let f=o.selected.value.slice();const{start:k,end:C}=i;d.current&&(f=f.filter(E=>a.current.indexOf(E)===-1));let y=h(k,C);y=y.filter(E=>!e.isNodeDisabled(E)),a.current=y;let T=f.concat(y);T=T.filter((E,S)=>T.indexOf(E)===S),t.onNodeSelect&&t.onNodeSelect(s,T),o.selected.setValue(T)};return re(e,{isNodeSelected:p,selectNode:c,selectRange:(s,i,f=!1)=>{if(t.disableSelection)return;const{start:k=n.current,end:C,current:y}=i;f?u(s,{start:k,next:C,current:y}):k!=null&&C!=null&&b(s,{start:k,end:C}),d.current=!0},rangeSelectToLast:(s,i)=>{n.current||(n.current=i);const f=d.current?n.current:i;e.selectRange(s,{start:f,end:Be(e)})},rangeSelectToFirst:(s,i)=>{n.current||(n.current=i);const f=d.current?n.current:i;e.selectRange(s,{start:f,end:Ae(e)})}}),{getRootProps:()=>({"aria-multiselectable":t.multiSelect})}};Je.models={selected:{controlledProp:"selected",defaultProp:"defaultSelected"}};const qo=[];Je.getDefaultizedParams=e=>{var t,o,n;return $({},e,{disableSelection:(t=e.disableSelection)!=null?t:!1,multiSelect:(o=e.multiSelect)!=null?o:!1,defaultSelected:(n=e.defaultSelected)!=null?n:e.multiSelect?qo:null})};const rt=1e3;class Ho{constructor(t=rt){this.timeouts=new Map,this.cleanupTimeout=rt,this.cleanupTimeout=t}register(t,o,n){this.timeouts||(this.timeouts=new Map);const d=setTimeout(()=>{typeof o=="function"&&o(),this.timeouts.delete(n.cleanupToken)},this.cleanupTimeout);this.timeouts.set(n.cleanupToken,d)}unregister(t){const o=this.timeouts.get(t.cleanupToken);o&&(this.timeouts.delete(t.cleanupToken),clearTimeout(o))}reset(){this.timeouts&&(this.timeouts.forEach((t,o)=>{this.unregister({cleanupToken:o})}),this.timeouts=void 0)}}class Jo{constructor(){this.registry=new FinalizationRegistry(t=>{typeof t=="function"&&t()})}register(t,o,n){this.registry.register(t,o,n)}unregister(t){this.registry.unregister(t)}reset(){}}class Xo{}function Go(e){let t=0;return function(n,d,a){e.registry===null&&(e.registry=typeof FinalizationRegistry<"u"?new Jo:new Ho);const[p]=x.useState(new Xo),c=x.useRef(null),h=x.useRef();h.current=a;const u=x.useRef(null);if(!c.current&&h.current){const b=(m,g)=>{if(!g.defaultMuiPrevented){var r;(r=h.current)==null||r.call(h,m,g)}};c.current=n.$$subscribeEvent(d,b),t+=1,u.current={cleanupToken:t},e.registry.register(p,()=>{var m;(m=c.current)==null||m.call(c),c.current=null,u.current=null},u.current)}else!h.current&&c.current&&(c.current(),c.current=null,u.current&&(e.registry.unregister(u.current),u.current=null));x.useEffect(()=>{if(!c.current&&h.current){const b=(m,g)=>{if(!g.defaultMuiPrevented){var r;(r=h.current)==null||r.call(h,m,g)}};c.current=n.$$subscribeEvent(d,b)}return u.current&&e.registry&&(e.registry.unregister(u.current),u.current=null),()=>{var b;(b=c.current)==null||b.call(c),c.current=null}},[n,d])}}const Zo={registry:null},Qo=Go(Zo),Xe=({instance:e,params:t,state:o,setState:n,models:d,rootRef:a})=>{const p=he(r=>{const s=typeof r=="function"?r(o.focusedNodeId):r;n(i=>$({},i,{focusedNodeId:s}))}),c=x.useCallback(r=>o.focusedNodeId===r,[o.focusedNodeId]),h=he((r,s)=>{s&&(p(s),t.onNodeFocus&&t.onNodeFocus(r,s))});re(e,{isNodeFocused:c,focusNode:h}),Qo(e,"removeNode",({id:r})=>{p(s=>s===r&&a.current===kt(a.current).activeElement?e.getChildrenIds(null)[0]:s)});const u=r=>s=>{var i;if((i=r.onFocus)==null||i.call(r,s),s.target===s.currentTarget){const f=C=>{const y=e.getNode(C);return y&&(y.parentId==null||e.isNodeExpanded(y.parentId))};let k;Array.isArray(d.selected.value)?k=d.selected.value.find(f):d.selected.value!=null&&f(d.selected.value)&&(k=d.selected.value),k==null&&(k=e.getNavigableChildrenIds(null)[0]),e.focusNode(s,k)}},b=r=>s=>{var i;(i=r.onBlur)==null||i.call(r,s),p(null)},m=e.getNode(o.focusedNodeId),g=m?m.idAttribute:null;return{getRootProps:r=>({onFocus:u(r),onBlur:b(r),"aria-activedescendant":g??void 0})}};Xe.getInitialState=()=>({focusedNodeId:null});Xe.getDefaultizedParams=e=>{var t;return $({},e,{disabledItemsFocusable:(t=e.disabledItemsFocusable)!=null?t:!1})};function Yo(e){return e&&e.length===1&&e.match(/\S/)}function it(e,t,o){for(let n=t;n<e.length;n+=1)if(o===e[n])return n;return-1}const el=({instance:e,params:t,state:o})=>{const d=Ft().direction==="rtl",a=x.useRef({}),p=he((r,s)=>(a.current[r]=s,()=>{const i=$({},a.current);delete i[r],a.current=i}));re(e,{mapFirstChar:p});const c=r=>(o.focusedNodeId!=null&&e.isNodeExpandable(o.focusedNodeId)&&(e.isNodeExpanded(o.focusedNodeId)?e.focusNode(r,fe(e,o.focusedNodeId)):e.isNodeDisabled(o.focusedNodeId)||e.toggleNodeExpansion(r,o.focusedNodeId)),!0),h=r=>{if(o.focusedNodeId==null)return!1;if(e.isNodeExpanded(o.focusedNodeId)&&!e.isNodeDisabled(o.focusedNodeId))return e.toggleNodeExpansion(r,o.focusedNodeId),!0;const s=e.getNode(o.focusedNodeId).parentId;return s?(e.focusNode(r,s),!0):!1},u=(r,s,i)=>{let f,k;const C=i.toLowerCase(),y=[],T=[];Object.keys(a.current).forEach(E=>{const S=e.getNode(E),v=S.parentId?e.isNodeExpanded(S.parentId):!0,D=t.disabledItemsFocusable?!1:e.isNodeDisabled(E);v&&!D&&(y.push(E),T.push(a.current[E]))}),f=y.indexOf(s)+1,f>=y.length&&(f=0),k=it(T,f,C),k===-1&&(k=it(T,0,C)),k>-1&&e.focusNode(r,y[k])},b=(r,s)=>{e.isNodeDisabled(fe(e,s))||e.selectRange(r,{end:fe(e,s),current:s},!0)},m=(r,s)=>{e.isNodeDisabled(ve(e,s))||e.selectRange(r,{end:ve(e,s),current:s},!0)},g=r=>s=>{var i;(i=r.onKeyDown)==null||i.call(r,s);let f=!1;const k=s.key;if(s.altKey||s.currentTarget!==s.target||o.focusedNodeId==null)return;const C=s.ctrlKey||s.metaKey;switch(k){case" ":!t.disableSelection&&!e.isNodeDisabled(o.focusedNodeId)&&(f=!0,t.multiSelect&&s.shiftKey?e.selectRange(s,{end:o.focusedNodeId}):t.multiSelect?e.selectNode(s,o.focusedNodeId,!0):e.selectNode(s,o.focusedNodeId)),s.stopPropagation();break;case"Enter":e.isNodeDisabled(o.focusedNodeId)||(e.isNodeExpandable(o.focusedNodeId)?(e.toggleNodeExpansion(s,o.focusedNodeId),f=!0):t.disableSelection||(f=!0,t.multiSelect?e.selectNode(s,o.focusedNodeId,!0):e.selectNode(s,o.focusedNodeId))),s.stopPropagation();break;case"ArrowDown":t.multiSelect&&s.shiftKey&&!t.disableSelection&&b(s,o.focusedNodeId),e.focusNode(s,fe(e,o.focusedNodeId)),f=!0;break;case"ArrowUp":t.multiSelect&&s.shiftKey&&!t.disableSelection&&m(s,o.focusedNodeId),e.focusNode(s,ve(e,o.focusedNodeId)),f=!0;break;case"ArrowRight":d?f=h(s):f=c(s);break;case"ArrowLeft":d?f=c(s):f=h(s);break;case"Home":t.multiSelect&&C&&s.shiftKey&&!t.disableSelection&&!e.isNodeDisabled(o.focusedNodeId)&&e.rangeSelectToFirst(s,o.focusedNodeId),e.focusNode(s,Ae(e)),f=!0;break;case"End":t.multiSelect&&C&&s.shiftKey&&!t.disableSelection&&!e.isNodeDisabled(o.focusedNodeId)&&e.rangeSelectToLast(s,o.focusedNodeId),e.focusNode(s,Be(e)),f=!0;break;default:k==="*"?(e.expandAllSiblings(s,o.focusedNodeId),f=!0):t.multiSelect&&C&&k.toLowerCase()==="a"&&!t.disableSelection?(e.selectRange(s,{start:Ae(e),end:Be(e)}),f=!0):!C&&!s.shiftKey&&Yo(k)&&(u(s,o.focusedNodeId,k),f=!0)}f&&(s.preventDefault(),s.stopPropagation())};return{getRootProps:r=>({onKeyDown:g(r)})}},tl=({instance:e,params:t})=>{const o=zt(t.id);return{getRootProps:()=>({id:o}),contextValue:{treeId:o,instance:e,multiSelect:t.multiSelect,disabledItemsFocusable:t.disabledItemsFocusable,icons:{defaultCollapseIcon:t.defaultCollapseIcon,defaultEndIcon:t.defaultEndIcon,defaultExpandIcon:t.defaultExpandIcon,defaultParentIcon:t.defaultParentIcon}}}},ol=[Wo,He,Je,Xe,el,tl],ll=["disabledItemsFocusable","expanded","defaultExpanded","onNodeToggle","onNodeFocus","disableSelection","defaultSelected","selected","multiSelect","onNodeSelect","id","defaultCollapseIcon","defaultEndIcon","defaultExpandIcon","defaultParentIcon","children"],sl=e=>{const{classes:t}=e;return Ve({root:["root"]},Ro,t)},ct=K("ul",{name:"MuiTreeView",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,margin:0,listStyle:"none",outline:0}),nl=x.forwardRef(function(t,o){const n=Oe({props:t,name:"MuiTreeView"}),d=n,a=n,{disabledItemsFocusable:p,expanded:c,defaultExpanded:h,onNodeToggle:u,onNodeFocus:b,disableSelection:m,defaultSelected:g,selected:r,multiSelect:s,onNodeSelect:i,id:f,defaultCollapseIcon:k,defaultEndIcon:C,defaultExpandIcon:y,defaultParentIcon:T,children:E}=a,S=se(a,ll),{getRootProps:v,contextValue:D}=Ao({disabledItemsFocusable:p,expanded:c,defaultExpanded:h,onNodeToggle:u,onNodeFocus:b,disableSelection:m,defaultSelected:g,selected:r,multiSelect:s,onNodeSelect:i,id:f,defaultCollapseIcon:k,defaultEndIcon:C,defaultExpandIcon:y,defaultParentIcon:T,plugins:ol,rootRef:o}),I=sl(n),B=ht({elementType:ct,externalSlotProps:{},externalForwardedProps:S,className:I.root,getSlotProps:v,ownerState:d});return l.jsx(Fo,{value:D,children:l.jsx(ct,$({},B,{children:E}))})}),Pt=()=>x.useContext(Et);function rl(e){const{instance:t,multiSelect:o}=Pt(),n=t?t.isNodeExpandable(e):!1,d=t?t.isNodeExpanded(e):!1,a=t?t.isNodeFocused(e):!1,p=t?t.isNodeSelected(e):!1,c=t?t.isNodeDisabled(e):!1;return{disabled:c,expanded:d,selected:p,focused:a,handleExpansion:m=>{if(t&&!c){a||t.focusNode(m,e);const g=o&&(m.shiftKey||m.ctrlKey||m.metaKey);n&&!(g&&t.isNodeExpanded(e))&&t.toggleNodeExpansion(m,e)}},handleSelection:m=>{t&&!c&&(a||t.focusNode(m,e),o&&(m.shiftKey||m.ctrlKey||m.metaKey)?m.shiftKey?t.selectRange(m,{end:e}):t.selectNode(m,e,!0):t.selectNode(m,e))},preventSelection:m=>{(m.shiftKey||m.ctrlKey||m.metaKey||c)&&m.preventDefault()}}}const il=["classes","className","displayIcon","expansionIcon","icon","label","nodeId","onClick","onMouseDown"],wt=x.forwardRef(function(t,o){const{classes:n,className:d,displayIcon:a,expansionIcon:p,icon:c,label:h,nodeId:u,onClick:b,onMouseDown:m}=t,g=se(t,il),{disabled:r,expanded:s,selected:i,focused:f,handleExpansion:k,handleSelection:C,preventSelection:y}=rl(u),T=c||p||a,E=v=>{y(v),m&&m(v)},S=v=>{k(v),C(v),b&&b(v)};return l.jsxs("div",$({},g,{className:Me(d,n.root,s&&n.expanded,i&&n.selected,f&&n.focused,r&&n.disabled),onClick:S,onMouseDown:E,ref:o,children:[l.jsx("div",{className:n.iconContainer,children:T}),l.jsx("div",{className:n.label,children:h})]}))});function cl(e){return Le("MuiTreeItem",e)}const X=_e("MuiTreeItem",["root","group","content","expanded","selected","focused","disabled","iconContainer","label"]),al=["children","className","collapseIcon","ContentComponent","ContentProps","endIcon","expandIcon","disabled","icon","id","label","nodeId","onClick","onMouseDown","TransitionComponent","TransitionProps"],dl=e=>{const{classes:t}=e;return Ve({root:["root"],content:["content"],expanded:["expanded"],selected:["selected"],focused:["focused"],disabled:["disabled"],iconContainer:["iconContainer"],label:["label"],group:["group"]},cl,t)},ul=K("li",{name:"MuiTreeItem",slot:"Root",overridesResolver:(e,t)=>t.root})({listStyle:"none",margin:0,padding:0,outline:0}),pl=K(wt,{name:"MuiTreeItem",slot:"Content",overridesResolver:(e,t)=>[t.content,t.iconContainer&&{[`& .${X.iconContainer}`]:t.iconContainer},t.label&&{[`& .${X.label}`]:t.label}]})(({theme:e})=>({padding:"0 8px",width:"100%",boxSizing:"border-box",display:"flex",alignItems:"center",cursor:"pointer",WebkitTapHighlightColor:"transparent","&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${X.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,backgroundColor:"transparent"},[`&.${X.focused}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${X.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ne(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Ne(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ne(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${X.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Ne(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`& .${X.iconContainer}`]:{marginRight:4,width:15,display:"flex",flexShrink:0,justifyContent:"center","& svg":{fontSize:18}},[`& .${X.label}`]:$({paddingLeft:4,width:"100%",boxSizing:"border-box",minWidth:0,position:"relative"},e.typography.body1)})),fl=K(yt,{name:"MuiTreeItem",slot:"Group",overridesResolver:(e,t)=>t.group})({margin:0,padding:0,marginLeft:17}),ml=x.forwardRef(function(t,o){const n=Oe({props:t,name:"MuiTreeItem"}),{children:d,className:a,collapseIcon:p,ContentComponent:c=wt,ContentProps:h,endIcon:u,expandIcon:b,disabled:m,icon:g,id:r,label:s,nodeId:i,onClick:f,onMouseDown:k,TransitionComponent:C=yt,TransitionProps:y}=n,T=se(n,al),{icons:E,multiSelect:S,disabledItemsFocusable:v,treeId:D,instance:I}=Pt();let B;r!=null?B=r:D&&i&&(B=`${D}-${i}`);const[H,ye]=x.useState(null),je=x.useRef(null),te=gt(ye,o),O=x.useMemo(()=>({element:H,id:i}),[i,H]),{index:oe,parentId:ie}=Vo(O),J=!!(Array.isArray(d)?d.length:d),Z=I?I.isNodeExpanded(i):!1,ce=I?I.isNodeFocused(i):!1,le=I?I.isNodeSelected(i):!1,ae=I?I.isNodeDisabled(i):!1,Q=$({},n,{expanded:Z,focused:ce,selected:le,disabled:ae}),V=dl(Q);let de,ue;J&&(Z?ue=p||E.defaultCollapseIcon:ue=b||E.defaultExpandIcon),J?de=E.defaultParentIcon:de=u||E.defaultEndIcon,x.useEffect(()=>{if(I&&oe!==-1)return I.updateNode({id:i,idAttribute:B,index:oe,parentId:ie,expandable:J,disabled:m}),()=>I.removeNode(i)},[I,ie,oe,i,J,m,B]),x.useEffect(()=>{if(I&&s){var _,ee;return I.mapFirstChar(i,((_=(ee=je.current)==null?void 0:ee.textContent)!=null?_:"").substring(0,1).toLowerCase())}},[I,i,s]);let Y;S?Y=le:le&&(Y=!0);function Ce(_){if(_.target===_.currentTarget){let N;typeof _.target.getRootNode=="function"?N=_.target.getRootNode():N=kt(_.target),N.getElementById(D).focus({preventScroll:!0})}const ee=!v&&ae;I&&!ce&&_.currentTarget===_.target&&!ee&&I.focusNode(_,i)}return l.jsxs(ul,$({className:Me(V.root,a),role:"treeitem","aria-expanded":J?Z:void 0,"aria-selected":Y,"aria-disabled":ae||void 0,id:B,tabIndex:-1},T,{ownerState:Q,onFocus:Ce,ref:te,children:[l.jsx(pl,$({as:c,ref:je,classes:{root:V.content,expanded:V.expanded,selected:V.selected,focused:V.focused,disabled:V.disabled,iconContainer:V.iconContainer,label:V.label},label:s,nodeId:i,onClick:f,onMouseDown:k,icon:g,expansionIcon:ue,displayIcon:de,ownerState:Q},h)),d&&l.jsx(Rt,{id:i,children:l.jsx(fl,$({as:C,unmountOnExit:!0,className:V.group,in:Z,component:"ul",role:"group"},y,{children:d}))})]}))});function Ge({data:e,...t}){return!e||!e.length?null:l.jsx(hl,{...t,children:e.map(o=>l.jsx("a",{href:o.url,target:"_blank",rel:"noreferrer",children:l.jsx("img",{src:o.url,alt:o.alt||""})},o.url))})}Ge.propTypes={data:P.arrayOf(P.shape({url:P.string,alt:P.string}))};Ge.defaultProps={data:[]};const hl=q(j)`
|
|
23
23
|
display: flex;
|
|
24
24
|
justify-content: flex-start;
|
|
25
25
|
flex-wrap: wrap;
|
|
@@ -33,7 +33,7 @@ import{ao as At,j as l,aC as K,cq as Lt,aF as $,f7 as ot,aE as se,aA as Le,aB as
|
|
|
33
33
|
margin-right: 12px;
|
|
34
34
|
margin-bottom: 12px;
|
|
35
35
|
}
|
|
36
|
-
`,Re=(e,t)=>{const o=[...e];for(;o.length>0;){const n=o.shift();if(n.id===t)return n;n.children&&o.push(...n.children)}return[]};function
|
|
36
|
+
`,Re=(e,t)=>{const o=[...e];for(;o.length>0;){const n=o.shift();if(n.id===t)return n;n.children&&o.push(...n.children)}return[]};function Ze({icon:e}){return e?so(e)?l.jsx("img",{className:"resource-icon",src:e,alt:"icon"}):l.jsx(Wt,{className:"resource-icon",icon:e}):null}Ze.propTypes={icon:P.string};Ze.defaultProps={icon:""};function Qe({disabled:e,data:t,onChange:o,value:n}){const d=n;function a(r,s=[]){return s.push(r.id),r.children&&r.children.forEach(i=>a(i,s)),s}const p=r=>a(Re(t,r)),c=(r,s=[])=>{const i=Re(t,r);return i.parent?(s.push(i.parent),c(i.parent,s)):s};function h(r,s){const i=p(r.id),f=i.indexOf(r.id);return i.splice(f,1),i.every(k=>d.concat(s).includes(k))}const u=(r,s)=>{r.stopPropagation();const i=p(s),f=c(s);if(d.includes(s)){const k=d.filter(C=>!i.concat(f).includes(C));o(k)}else{const k=i;for(let C=0;C<f.length;++C)h(Re(t,f[C]),k)&&k.push(f[C]);o([...d].concat(k))}},b=r=>{r.stopPropagation()},m=t.some(r=>{var s;return((s=r.children)==null?void 0:s.length)>0}),g=r=>{var s;return l.jsx(ml,{nodeId:r.id,label:l.jsx(io,{onClick:b,control:l.jsx(De,{size:"small",checked:d.indexOf(r.id)!==-1,tabIndex:-1,disableRipple:!0,onClick:i=>u(i,r.id),disabled:e}),label:l.jsxs(j,{className:"content",children:[l.jsxs(j,{display:"flex",alignItems:"center",children:[r.icon&&l.jsx(Ze,{icon:r.icon}),l.jsx(j,{className:"name",children:r.name}),r.url&&l.jsx("a",{href:r.url,target:"_blank",rel:"noreferrer",className:"link",children:l.jsx(ro,{className:"link-icon"})})]}),!!r.description&&l.jsx(j,{className:"description",children:r.description}),!!((s=r.images)!=null&&s.length)&&l.jsx(Ge,{className:"images",data:r.images})]})}),children:Array.isArray(r.children)?r.children.map(g):null},r.id)};return l.jsx(bl,{className:Ue(!m&&"no-children"),multiSelect:!0,defaultCollapseIcon:l.jsx(no,{}),defaultExpandIcon:l.jsx(Gt,{}),selected:d,children:t.map(r=>g(r))})}Qe.propTypes={data:P.array,value:P.array,onChange:P.func,disabled:P.bool};Qe.defaultProps={data:[],value:[],onChange:()=>{},disabled:!1};const bl=q(nl)`
|
|
37
37
|
&.no-children {
|
|
38
38
|
.MuiTreeItem-content {
|
|
39
39
|
padding: 0;
|
|
@@ -88,7 +88,7 @@ import{ao as At,j as l,aC as K,cq as Lt,aF as $,f7 as ot,aE as se,aA as Le,aB as
|
|
|
88
88
|
font-size: 14px;
|
|
89
89
|
color: ${({theme:e})=>e.palette.text.secondary};
|
|
90
90
|
}
|
|
91
|
-
`,$t=(e,t)=>(e.forEach(o=>{t&&(o.parent=t),(o.children||[]).forEach(n=>{n.parent=o.id,$t(n.children||[],n.id)})}),e);function xl(e,t){return e.length!==t.length?!1:e.every((o,n)=>o===t[n])}function Ye({app:e,component:t,projectId:o,release:n,error:d,onSave:a}){const{t:p,locale:c}=ne(),{api:h}=be(),[u,b]=x.useState([]),[m,g]=x.useState([]),[r,s]=x.useState([]),[i,f]=x.useState(!1),k=x.useMemo(()=>xl(m,r)?null:p("blocklet.publish.resourceChangedWarning"),[m,r,p]),C=n.id,y=n.status==="published",{exportApi:
|
|
91
|
+
`,$t=(e,t)=>(e.forEach(o=>{t&&(o.parent=t),(o.children||[]).forEach(n=>{n.parent=o.id,$t(n.children||[],n.id)})}),e);function xl(e,t){return e.length!==t.length?!1:e.every((o,n)=>o===t[n])}function Ye({app:e,component:t,projectId:o,release:n,error:d,onSave:a}){const{t:p,locale:c}=ne(),{api:h}=be(),[u,b]=x.useState([]),[m,g]=x.useState([]),[r,s]=x.useState([]),[i,f]=x.useState(!1),k=x.useMemo(()=>xl(m,r)?null:p("blocklet.publish.resourceChangedWarning"),[m,r,p]),C=n.id,y=n.status==="published",{exportApi:T="/"}=(t==null?void 0:t.meta.resource)||{},E=new URL(me("http://127.0.0.1",t.mountPoint,T||"/").replace(/\/+/g,"/"));E.searchParams.set("projectId",o),E.searchParams.set("releaseId",C),E.searchParams.set("local",c);const S=`${E.pathname}${E.search}`,v=async I=>{try{await h.updateSelectedResources({input:{did:e.meta.did,projectId:o,releaseId:C,componentDid:t.meta.did,resources:I}})}catch(B){w.error(B.message)}},D=async()=>{const I=m;try{f(!0),await lt.post(S,{resources:I,projectId:o,releaseId:C,locale:c}),w.success(p("common.saveSuccess")),f(!1),v(m),s(m),a(m)}catch(B){f(!1),w.error(B.message)}};return x.useEffect(()=>{lt.get(S).then(I=>{var H;const B=$t(((H=I.data)==null?void 0:H.resources)||[]);b(B)}).catch(I=>{w.error(I.message)}),h.getSelectedResources({input:{did:e.meta.did,projectId:o,releaseId:C,componentDid:t.meta.did}}).then(I=>{const B=(I==null?void 0:I.resources)||[];g(B),s(B)}).catch(I=>{w.error(I.message)})},[S]),t.status!=="running"?l.jsx(at,{children:l.jsx(j,{pt:6,children:p("blocklet.publish.componentNotRunning",{name:t.meta.title})})}):[l.jsx(at,{className:Ue(d&&"error"),children:l.jsxs(j,{children:[l.jsx(Qe,{data:u,value:m,onChange:I=>{g(I)},disabled:i||y}),!y&&l.jsx(j,{className:"footer",children:l.jsx(F,{variant:"contained",disabled:i,onClick:()=>D(),children:p("common.save")})})]})}),!!k&&l.jsx(j,{color:"warning.main",mt:1,fontSize:14,children:k}),!!d&&l.jsx(j,{color:"error.main",mt:1,fontSize:14,children:d})]}Ye.propTypes={component:P.object.isRequired,app:P.object.isRequired,projectId:P.string.isRequired,error:P.string,release:P.shape({id:P.string.isRequired,status:P.string}),onSave:P.func};Ye.defaultProps={error:"",release:{id:""},onSave:()=>{}};const at=q(j)`
|
|
92
92
|
border: 1px solid #ccc;
|
|
93
93
|
&.error {
|
|
94
94
|
border-color: ${e=>e.theme.palette.error.main};
|
|
@@ -132,7 +132,7 @@ import{ao as At,j as l,aC as K,cq as Lt,aF as $,f7 as ot,aE as se,aA as Le,aB as
|
|
|
132
132
|
display: none;
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
`,dt=["image/*",".jpg",".jpeg",".png",".gif",".svg"],ut=1024*1024*10;var mt;const Pe=(mt=window.env)==null?void 0:mt.serverEndpoint,pt=x.lazy(()=>qt(()=>import("./react-hL3RwciS.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])).then(e=>({default:e.Uploader}))),kl=(e,t,o)=>{const n=[];return e.blockletTitle||n.push({param:"blockletTitle",message:o("blocklet.publish.errorTip.noTitle")}),e.blockletVersion?Te.valid(e.blockletVersion)||n.push({param:"blockletVersion",message:"Invalid Blocklet Version"}):n.push({param:"blockletVersion",message:o("blocklet.publish.errorTip.noVersion")}),t===z.PROJECT.RELEASE_STATUS.published&&(e.blockletDescription||n.push({param:"blockletDescription",message:o("blocklet.publish.errorTip.noDescription")}),e.note||n.push({param:"note",message:o("blocklet.publish.errorTip.noNote")})),n.length?n:null},yl=({tabs:e,blocklet:t,ancestors:o=[]})=>{const n=t.meta.did;e.push({label:l.jsxs(j,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[l.jsx(We,{size:24,blocklet:t,ancestors:o}),l.jsx(j,{ml:"4px",className:"text",children:l.jsx(j,{children:t.meta.title})})]},n),value:n})},ft=(e,t)=>{const o=Fe(e,["blockletVersion","blockletTitle","blockletDescription","blockletLogo","blockletIntroduction","blockletScreenshots","blockletComponents","note"]);return o.blockletScreenshots||(o.blockletScreenshots=[]),o.blockletComponents?o.blockletComponents=o.blockletComponents.map(n=>({...n,included:!0})):o.blockletComponents=(t.children||[]).map(n=>({did:n.meta.did,included:!0,required:!0})),o};function tt({...e}){var Ce,L,ee;const t=xt(),{projectId:o,releaseId:n,componentDid:d}=ge(),{t:a}=ne(),{blocklet:p}=xe(),[c,h]=Yt(null),[u,b]=x.useState({}),[m,g]=x.useState(!1),[r,s]=x.useState(!1),[i,f]=x.useState(null),{api:k}=be(),C=x.useRef(null),y=x.useRef(null),[I,E]=x.useState(),[S,v]=x.useState(),D=n==="create"?"":n,T=n==="create"?"create":"edit",B=[],H=((p==null?void 0:p.children)||[]).filter(N=>{var A;return(A=N.meta.resource)==null?void 0:A.exportApi}).filter(N=>!d||N.meta.did===d);H.forEach(N=>{yl({tabs:B,blocklet:N,t:a,ancestors:[p]})});const[ye,je]=x.useState((Ce=B[0])==null?void 0:Ce.value),te=(i==null?void 0:i.status)==="published",O=te,oe=({typeOnly:N}={})=>{k.getProject({input:{did:p.meta.did,projectId:o}}).then(A=>{g(!1);const R=A.project||{};if(N){E(R.type);return}R.blockletVersion?Te.valid(R.blockletVersion)&&(R.blockletVersion=Te.inc(R.blockletVersion,"patch")):R.blockletVersion="1.0.0",h(ft(R,p)),E(R.type)}).catch(A=>{g(!1),w.error(Ee(A))})},ie=()=>{k.getRelease({input:{did:p.meta.did,projectId:o,releaseId:D}}).then(N=>{g(!1),h(ft(N==null?void 0:N.release,p)),f(N==null?void 0:N.release)}).catch(N=>{g(!1),w.error(Ee(N))})},J=x.useCallback(()=>{if(T==="edit"){if(!D){w.error("Empty release id");return}ie(),oe({typeOnly:!0})}T==="create"&&oe()},[T,D]);x.useEffect(()=>{J()},[J]);const Q=N=>{const A=kl(c,N,a);if(A){w.error(A.map(M=>M.message).join("; ")),b(A.reduce((M,U)=>({...M,[U.param]:U.message}),{}));return}const R={...c};if(R.blockletVersion=Te.valid(R.blockletVersion),!R.blockletVersion){w.error("Invalid Blocklet Version"),b({blockletVersion:"Invalid Blocklet Version"});return}R.blockletTitle=(R.blockletTitle||"").trim(),R.blockletDescription=(R.blockletDescription||"").trim(),R.blockletIntroduction=(R.blockletIntroduction||"").trim(),R.note=(R.note||"").trim(),I==="pack"?R.blockletComponents=(R.blockletComponents||[]).filter(M=>M.included).map(M=>Fe(M,["did","required"])).map(JSON.stringify):delete R.blockletComponents,s(N),g(!0),k.createRelease({input:{...R,did:p.meta.did,projectId:o,releaseId:D,status:N}}).then(M=>{var U;if(s(!1),g(!1),N==="draft"?w.success(a("blocklet.publish.saveDraftSuccess")):w.success(a("blocklet.publish.createReleaseSuccess")),T==="create"){const Bt=(U=M==null?void 0:M.release)==null?void 0:U.id;t(`../${o}/${Bt}`,{replace:!0})}else ie()}).catch(M=>{s(!1),g(!1);const U=Ee(M);w.error(U),/resource.*empty/.test(U)&&b({blockletResource:U})})};if(!c&&m)return l.jsx(ke,{});if(!c)return null;const ce=`${pe.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${p.meta.did}/${o}/logo/upload`,le=`${pe.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${p.meta.did}/${o}/screenshot/upload`,ae=c!=null&&c.blockletLogo?`${ce}/${c.blockletLogo}`:`${pe.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,Z=((c==null?void 0:c.blockletScreenshots)||[]).filter(Boolean).map(N=>`${le}/${N}`),V=H.find(N=>N.meta.did===ye),de=V?l.jsx(j,{children:l.jsx(Ye,{error:u.blockletResource,app:p,component:V,projectId:o,release:{...i,id:D},onSave:N=>{N.length&&b({blockletResource:""})}})}):l.jsx(j,{display:"flex",mt:-3,children:l.jsx(Ut,{children:a("common.empty")})}),ue=N=>{je(N)};let Y=null;if(te&&Pe){const N=me(Pe,`/api/project/${p.meta.did}/${o}/${D}/release/blocklet.json`);if(I==="pack"){const A=new URL(Pe);A.pathname=me(A.pathname,"/launch-blocklet/agreement"),A.searchParams.set("blocklet_meta_url",N),Y=l.jsx(F,{variant:"outlined",style:{marginRight:8},children:l.jsx("a",{href:A.href,target:"_blank",rel:"noreferrer",children:a("common.install")})})}else Y=l.jsxs(l.Fragment,{children:[l.jsx(F,{variant:"outlined",style:{marginRight:8},onClick:()=>v(N),children:a("common.install")}),l.jsx(Kt,{fullWidth:!0,maxWidth:"sm",open:S,onClose:()=>v(""),children:l.jsxs(j,{sx:{py:5,px:4,wordBreak:"break-all"},children:[l.jsx(_,{variant:"h6",sx:{mb:2},children:a("blocklet.publish.installResourceTip")}),l.jsx(lo,{children:S}),l.jsxs(_,{sx:{mt:2},children:[a("blocklet.publish.installResourceTip2"),l.jsx("a",{style:{marginLeft:4},href:"https://www.arcblock.io/docs/blocklet-developer/R3weqCy7WPI8ggudt0C2alWv",target:"_blank",rel:"noreferrer",children:a("blocklet.publish.installResourceHelp")})]})]})})]})}return l.jsxs(jl,{...e,children:[l.jsxs(j,{className:"sticky-header",children:[l.jsxs(Ke,{className:"breadcrumbs","aria-label":"breadcrumb",children:[l.jsx(W,{to:"../",children:a("common.publish")}),l.jsx(W,{to:`../${o}`,children:(c==null?void 0:c.blockletTitle)||"Blocklet"}),l.jsx(_,{color:"text.primary",children:T==="create"?a("common.create"):(c==null?void 0:c.blockletVersion)||a("common.edit")})]}),l.jsxs(j,{display:"flex",children:[!te&&l.jsxs(l.Fragment,{children:[l.jsxs(F,{variant:"outlined",disabled:m||r,onClick:()=>Q(z.PROJECT.RELEASE_STATUS.draft),style:{marginRight:12},children:[r===z.PROJECT.RELEASE_STATUS.draft&&l.jsx(we,{size:14,sx:{mr:.5}}),a("blocklet.publish.saveDraft")]}),l.jsxs(F,{variant:"contained",disabled:m||r,onClick:()=>Q(z.PROJECT.RELEASE_STATUS.published),children:[r===z.PROJECT.RELEASE_STATUS.published&&l.jsx(we,{size:14,sx:{mr:.5},color:"inherit"}),a("common.release")]})]}),te&&l.jsxs(l.Fragment,{children:[Y,l.jsx(F,{variant:"contained",children:l.jsx("a",{href:me(`${pe.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${p.meta.did}/${o}/${D}/download/${(i.files||[])[0]}`),children:a("common.download")})})]})]})]}),l.jsxs(j,{children:[I==="pack"&&l.jsx(oo,{type:"info",style:{width:"100%"},children:a("blocklet.publish.packTip")}),l.jsx(j,{pt:3}),l.jsxs(j,{display:"flex",className:"section",children:[l.jsx(_,{variant:"h3",className:"left",children:a("blocklet.publish.productTitle")}),l.jsxs(j,{sx:{flex:1},children:[l.jsx(G,{label:`Blocklet ${a("common.title")}`,placeholder:`Blocklet ${a("common.title")}`,InputProps:{"data-cy":"blocklet-title",readOnly:O},autoComplete:"off",variant:"outlined",fullWidth:!0,required:!0,value:c.blockletTitle||"",onChange:N=>{b({blockletTitle:""}),h({blockletTitle:N.target.value})},error:!!u.blockletTitle,helperText:u.blockletTitle||""}),l.jsx(G,{label:`Blocklet ${a("common.description")}`,placeholder:`Blocklet ${a("common.description")}`,InputProps:{"data-cy":"blocklet-description",readOnly:O},required:!0,autoComplete:"off",variant:"outlined",fullWidth:!0,value:c.blockletDescription||"",onChange:N=>{b({blockletDescription:""}),h({blockletDescription:N.target.value})},error:!!u.blockletDescription,helperText:u.blockletDescription||"",sx:{mt:3}}),l.jsx(G,{label:`Blocklet ${a("common.introduction")}`,placeholder:`Blocklet ${a("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:O,endAdornment:l.jsxs($e,{position:"end",children:[((L=c==null?void 0:c.blockletIntroduction)==null?void 0:L.length)||0," / ",z.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:c.blockletIntroduction||"",onChange:N=>{b({blockletIntroduction:""}),h({blockletIntroduction:N.target.value.slice(0,z.PROJECT.MAX_INTRO_LENGTH)})},error:!!u.blockletIntroduction,helperText:u.blockletIntroduction||"",sx:{mt:3}})]})]}),l.jsxs(j,{display:"flex",mt:3,className:"section",children:[l.jsx(_,{variant:"h3",className:"left",children:a("blocklet.publish.versionTitle")}),l.jsxs(j,{sx:{flex:1},children:[l.jsx(G,{required:!0,label:`Blocklet ${a("common.version")}`,placeholder:`Blocklet ${a("common.version")}`,InputProps:{"data-cy":"blocklet-version",readOnly:O},autoComplete:"off",variant:"outlined",fullWidth:!0,value:c.blockletVersion,onChange:N=>{b({blockletVersion:""}),h({blockletVersion:N.target.value})},error:!!u.blockletVersion,helperText:u.blockletVersion||""}),l.jsx(G,{label:a("blocklet.publish.releaseNote"),autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:O,endAdornment:l.jsxs($e,{position:"end",children:[((ee=c==null?void 0:c.note)==null?void 0:ee.length)||0," / ",z.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:c.note,onChange:N=>{b({note:""}),h({note:N.target.value.slice(0,z.PROJECT.MAX_NOTE_LENGTH)})},error:!!u.note,helperText:u.note||"",sx:{mt:3}})]})]}),l.jsxs(j,{display:"flex",mt:3,className:"section full-width",children:[l.jsx(_,{variant:"h3",className:"left",children:a("blocklet.publish.imgTitle")}),l.jsxs(j,{sx:{flex:1},children:[l.jsxs(j,{display:"flex",children:[l.jsx(_,{variant:"subtitle1",sx:{mr:2},children:a("common.logo")}),l.jsx(j,{sx:{flex:1,cursor:O?"default":"pointer"},children:l.jsx(co,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:ae,onClick:()=>!O&&C.current.open()})})]}),l.jsxs(j,{display:"flex",mt:3,children:[l.jsx(_,{variant:"subtitle1",sx:{mr:2},children:a("common.screenshot")}),l.jsxs(j,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap"},children:[Z.map((N,A)=>l.jsxs(j,{className:"screenshot",children:[l.jsx("img",{alt:"screenshot",src:N}),!O&&l.jsx(Se,{className:"action",onClick:()=>{const R=[...c.blockletScreenshots];R.splice(A,1),h({blockletScreenshots:R})},children:l.jsx(eo,{})})]})),Z.length<5&&l.jsx(j,{sx:{width:200,height:140,background:"#eee",cursor:O?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>!O&&y.current.open(),children:"+"})]})]})]}),l.jsx(pt,{id:"uploader-logo",ref:C,popup:!0,onUploadFinish:N=>{h({blockletLogo:N.data.filename}),C.current.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:ce,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileTypes:dt,maxFileSize:ut,maxNumberOfFiles:1}}},"uploader-logo"),l.jsx(pt,{id:"uploader-screenshot",ref:y,popup:!0,onUploadFinish:N=>{var R;const A=c.blockletScreenshots||[];A.push((R=N.data)==null?void 0:R.filename),h({blockletScreenshots:A}),y.current.close()},plugins:["ImageEditor"],apiPathProps:{uploader:le,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileTypes:dt,maxFileSize:ut,maxNumberOfFiles:5-Z.length}}},"uploader-screenshot")]}),l.jsxs(j,{display:"flex",mt:3,className:"section full-width",children:[l.jsx(j,{className:"left",children:l.jsx(_,{variant:"h3",children:a("blocklet.publish.resourceTitle")})}),l.jsxs(j,{sx:{flex:1},children:[l.jsx(to,{tabs:B,current:ye,onChange:ue,sx:{ml:-2,mt:-1.5}}),l.jsx(j,{children:de})]})]}),I==="pack"&&l.jsxs(j,{display:"flex",mt:3,className:"section full-width",children:[l.jsx(j,{className:"left",children:l.jsx(_,{variant:"h3",children:a("common.components")})}),l.jsx(j,{sx:{flex:1},children:l.jsx(et,{disabled:m||O,app:p,value:c.blockletComponents,onChange:N=>{h({blockletComponents:N})}})})]})]})]})}tt.propTypes={};tt.defaultProps={};const jl=q.div`
|
|
135
|
+
`,dt=["image/*",".jpg",".jpeg",".png",".gif",".svg"],ut=1024*1024*10;var mt;const Pe=(mt=window.env)==null?void 0:mt.serverEndpoint,pt=x.lazy(()=>qt(()=>import("./react-W_eG3Zih.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])).then(e=>({default:e.Uploader}))),kl=(e,t,o)=>{const n=[];return e.blockletTitle||n.push({param:"blockletTitle",message:o("blocklet.publish.errorTip.noTitle")}),e.blockletVersion?Ie.valid(e.blockletVersion)||n.push({param:"blockletVersion",message:"Invalid Blocklet Version"}):n.push({param:"blockletVersion",message:o("blocklet.publish.errorTip.noVersion")}),t===z.PROJECT.RELEASE_STATUS.published&&(e.blockletDescription||n.push({param:"blockletDescription",message:o("blocklet.publish.errorTip.noDescription")}),e.note||n.push({param:"note",message:o("blocklet.publish.errorTip.noNote")})),n.length?n:null},yl=({tabs:e,blocklet:t,ancestors:o=[]})=>{const n=t.meta.did;e.push({label:l.jsxs(j,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[l.jsx(We,{size:24,blocklet:t,ancestors:o}),l.jsx(j,{ml:"4px",className:"text",children:l.jsx(j,{children:t.meta.title})})]},n),value:n})},ft=(e,t)=>{const o=Fe(e,["blockletVersion","blockletTitle","blockletDescription","blockletLogo","blockletIntroduction","blockletScreenshots","blockletComponents","note"]);return o.blockletScreenshots||(o.blockletScreenshots=[]),o.blockletComponents?o.blockletComponents=o.blockletComponents.map(n=>({...n,included:!0})):o.blockletComponents=(t.children||[]).map(n=>({did:n.meta.did,included:!0,required:!0})),o};function tt({...e}){var Ce,_,ee;const t=xt(),{projectId:o,releaseId:n,componentDid:d}=ge(),{t:a}=ne(),{blocklet:p}=xe(),[c,h]=Yt(null),[u,b]=x.useState({}),[m,g]=x.useState(!1),[r,s]=x.useState(!1),[i,f]=x.useState(null),{api:k}=be(),C=x.useRef(null),y=x.useRef(null),[T,E]=x.useState(),[S,v]=x.useState(),D=n==="create"?"":n,I=n==="create"?"create":"edit",B=[],H=((p==null?void 0:p.children)||[]).filter(N=>{var A;return(A=N.meta.resource)==null?void 0:A.exportApi}).filter(N=>!d||N.meta.did===d);H.forEach(N=>{yl({tabs:B,blocklet:N,t:a,ancestors:[p]})});const[ye,je]=x.useState((Ce=B[0])==null?void 0:Ce.value),te=(i==null?void 0:i.status)==="published",O=te,oe=({typeOnly:N}={})=>{k.getProject({input:{did:p.meta.did,projectId:o}}).then(A=>{g(!1);const R=A.project||{};if(N){E(R.type);return}R.blockletVersion?Ie.valid(R.blockletVersion)&&(R.blockletVersion=Ie.inc(R.blockletVersion,"patch")):R.blockletVersion="1.0.0",h(ft(R,p)),E(R.type)}).catch(A=>{g(!1),w.error(Ee(A))})},ie=()=>{k.getRelease({input:{did:p.meta.did,projectId:o,releaseId:D}}).then(N=>{g(!1),h(ft(N==null?void 0:N.release,p)),f(N==null?void 0:N.release)}).catch(N=>{g(!1),w.error(Ee(N))})},J=x.useCallback(()=>{if(I==="edit"){if(!D){w.error("Empty release id");return}ie(),oe({typeOnly:!0})}I==="create"&&oe()},[I,D]);x.useEffect(()=>{J()},[J]);const Z=N=>{const A=kl(c,N,a);if(A){w.error(A.map(M=>M.message).join("; ")),b(A.reduce((M,U)=>({...M,[U.param]:U.message}),{}));return}const R={...c};if(R.blockletVersion=Ie.valid(R.blockletVersion),!R.blockletVersion){w.error("Invalid Blocklet Version"),b({blockletVersion:"Invalid Blocklet Version"});return}R.blockletTitle=(R.blockletTitle||"").trim(),R.blockletDescription=(R.blockletDescription||"").trim(),R.blockletIntroduction=(R.blockletIntroduction||"").trim(),R.note=(R.note||"").trim(),T==="pack"?R.blockletComponents=(R.blockletComponents||[]).filter(M=>M.included).map(M=>Fe(M,["did","required"])).map(JSON.stringify):delete R.blockletComponents,s(N),g(!0),k.createRelease({input:{...R,did:p.meta.did,projectId:o,releaseId:D,status:N}}).then(M=>{var U;if(s(!1),g(!1),N==="draft"?w.success(a("blocklet.publish.saveDraftSuccess")):w.success(a("blocklet.publish.createReleaseSuccess")),I==="create"){const Bt=(U=M==null?void 0:M.release)==null?void 0:U.id;t(`../${o}/${Bt}`,{replace:!0})}else ie()}).catch(M=>{s(!1),g(!1);const U=Ee(M);w.error(U),/resource.*empty/.test(U)&&b({blockletResource:U})})};if(!c&&m)return l.jsx(ke,{});if(!c)return null;const ce=`${pe.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${p.meta.did}/${o}/logo/upload`,le=`${pe.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${p.meta.did}/${o}/screenshot/upload`,ae=c!=null&&c.blockletLogo?`${ce}/${c.blockletLogo}`:`${pe.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,Q=((c==null?void 0:c.blockletScreenshots)||[]).filter(Boolean).map(N=>`${le}/${N}`),V=H.find(N=>N.meta.did===ye),de=V?l.jsx(j,{children:l.jsx(Ye,{error:u.blockletResource,app:p,component:V,projectId:o,release:{...i,id:D},onSave:N=>{N.length&&b({blockletResource:""})}})}):l.jsx(j,{display:"flex",mt:-3,children:l.jsx(Ut,{children:a("common.empty")})}),ue=N=>{je(N)};let Y=null;if(te&&Pe){const N=me(Pe,`/api/project/${p.meta.did}/${o}/${D}/release/blocklet.json`);if(T==="pack"){const A=new URL(Pe);A.pathname=me(A.pathname,"/launch-blocklet/agreement"),A.searchParams.set("blocklet_meta_url",N),Y=l.jsx(F,{variant:"outlined",style:{marginRight:8},children:l.jsx("a",{href:A.href,target:"_blank",rel:"noreferrer",children:a("common.install")})})}else Y=l.jsxs(l.Fragment,{children:[l.jsx(F,{variant:"outlined",style:{marginRight:8},onClick:()=>v(N),children:a("common.install")}),l.jsx(Kt,{fullWidth:!0,maxWidth:"sm",open:S,onClose:()=>v(""),children:l.jsxs(j,{sx:{py:5,px:4,wordBreak:"break-all"},children:[l.jsx(L,{variant:"h6",sx:{mb:2},children:a("blocklet.publish.installResourceTip")}),l.jsx(lo,{children:S}),l.jsxs(L,{sx:{mt:2},children:[a("blocklet.publish.installResourceTip2"),l.jsx("a",{style:{marginLeft:4},href:"https://www.arcblock.io/docs/blocklet-developer/R3weqCy7WPI8ggudt0C2alWv",target:"_blank",rel:"noreferrer",children:a("blocklet.publish.installResourceHelp")})]})]})})]})}return l.jsxs(jl,{...e,children:[l.jsxs(j,{className:"sticky-header",children:[l.jsxs(Ke,{className:"breadcrumbs","aria-label":"breadcrumb",children:[l.jsx(W,{to:"../",children:a("common.publish")}),l.jsx(W,{to:`../${o}`,children:(c==null?void 0:c.blockletTitle)||"Blocklet"}),l.jsx(L,{color:"text.primary",children:I==="create"?a("common.create"):(c==null?void 0:c.blockletVersion)||a("common.edit")})]}),l.jsxs(j,{display:"flex",children:[!te&&l.jsxs(l.Fragment,{children:[l.jsxs(F,{variant:"outlined",disabled:m||r,onClick:()=>Z(z.PROJECT.RELEASE_STATUS.draft),style:{marginRight:12},children:[r===z.PROJECT.RELEASE_STATUS.draft&&l.jsx(we,{size:14,sx:{mr:.5}}),a("blocklet.publish.saveDraft")]}),l.jsxs(F,{variant:"contained",disabled:m||r,onClick:()=>Z(z.PROJECT.RELEASE_STATUS.published),children:[r===z.PROJECT.RELEASE_STATUS.published&&l.jsx(we,{size:14,sx:{mr:.5},color:"inherit"}),a("common.release")]})]}),te&&l.jsxs(l.Fragment,{children:[Y,l.jsx(F,{variant:"contained",children:l.jsx("a",{href:me(`${pe.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${p.meta.did}/${o}/${D}/download/${(i.files||[])[0]}`),children:a("common.download")})})]})]})]}),l.jsxs(j,{children:[T==="pack"&&l.jsx(oo,{type:"info",style:{width:"100%"},children:a("blocklet.publish.packTip")}),l.jsx(j,{pt:3}),l.jsxs(j,{display:"flex",className:"section",children:[l.jsx(L,{variant:"h3",className:"left",children:a("blocklet.publish.productTitle")}),l.jsxs(j,{sx:{flex:1},children:[l.jsx(G,{label:`Blocklet ${a("common.title")}`,placeholder:`Blocklet ${a("common.title")}`,InputProps:{"data-cy":"blocklet-title",readOnly:O},autoComplete:"off",variant:"outlined",fullWidth:!0,required:!0,value:c.blockletTitle||"",onChange:N=>{b({blockletTitle:""}),h({blockletTitle:N.target.value})},error:!!u.blockletTitle,helperText:u.blockletTitle||""}),l.jsx(G,{label:`Blocklet ${a("common.description")}`,placeholder:`Blocklet ${a("common.description")}`,InputProps:{"data-cy":"blocklet-description",readOnly:O},required:!0,autoComplete:"off",variant:"outlined",fullWidth:!0,value:c.blockletDescription||"",onChange:N=>{b({blockletDescription:""}),h({blockletDescription:N.target.value})},error:!!u.blockletDescription,helperText:u.blockletDescription||"",sx:{mt:3}}),l.jsx(G,{label:`Blocklet ${a("common.introduction")}`,placeholder:`Blocklet ${a("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:O,endAdornment:l.jsxs($e,{position:"end",children:[((_=c==null?void 0:c.blockletIntroduction)==null?void 0:_.length)||0," / ",z.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:c.blockletIntroduction||"",onChange:N=>{b({blockletIntroduction:""}),h({blockletIntroduction:N.target.value.slice(0,z.PROJECT.MAX_INTRO_LENGTH)})},error:!!u.blockletIntroduction,helperText:u.blockletIntroduction||"",sx:{mt:3}})]})]}),l.jsxs(j,{display:"flex",mt:3,className:"section",children:[l.jsx(L,{variant:"h3",className:"left",children:a("blocklet.publish.versionTitle")}),l.jsxs(j,{sx:{flex:1},children:[l.jsx(G,{required:!0,label:`Blocklet ${a("common.version")}`,placeholder:`Blocklet ${a("common.version")}`,InputProps:{"data-cy":"blocklet-version",readOnly:O},autoComplete:"off",variant:"outlined",fullWidth:!0,value:c.blockletVersion,onChange:N=>{b({blockletVersion:""}),h({blockletVersion:N.target.value})},error:!!u.blockletVersion,helperText:u.blockletVersion||""}),l.jsx(G,{label:a("blocklet.publish.releaseNote"),autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:O,endAdornment:l.jsxs($e,{position:"end",children:[((ee=c==null?void 0:c.note)==null?void 0:ee.length)||0," / ",z.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:c.note,onChange:N=>{b({note:""}),h({note:N.target.value.slice(0,z.PROJECT.MAX_NOTE_LENGTH)})},error:!!u.note,helperText:u.note||"",sx:{mt:3}})]})]}),l.jsxs(j,{display:"flex",mt:3,className:"section full-width",children:[l.jsx(L,{variant:"h3",className:"left",children:a("blocklet.publish.imgTitle")}),l.jsxs(j,{sx:{flex:1},children:[l.jsxs(j,{display:"flex",children:[l.jsx(L,{variant:"subtitle1",sx:{mr:2},children:a("common.logo")}),l.jsx(j,{sx:{flex:1,cursor:O?"default":"pointer"},children:l.jsx(co,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:ae,onClick:()=>!O&&C.current.open()})})]}),l.jsxs(j,{display:"flex",mt:3,children:[l.jsx(L,{variant:"subtitle1",sx:{mr:2},children:a("common.screenshot")}),l.jsxs(j,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap"},children:[Q.map((N,A)=>l.jsxs(j,{className:"screenshot",children:[l.jsx("img",{alt:"screenshot",src:N}),!O&&l.jsx(Se,{className:"action",onClick:()=>{const R=[...c.blockletScreenshots];R.splice(A,1),h({blockletScreenshots:R})},children:l.jsx(eo,{})})]})),Q.length<5&&l.jsx(j,{sx:{width:200,height:140,background:"#eee",cursor:O?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>!O&&y.current.open(),children:"+"})]})]})]}),l.jsx(pt,{id:"uploader-logo",ref:C,popup:!0,onUploadFinish:N=>{h({blockletLogo:N.data.filename}),C.current.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:ce,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileTypes:dt,maxFileSize:ut,maxNumberOfFiles:1}}},"uploader-logo"),l.jsx(pt,{id:"uploader-screenshot",ref:y,popup:!0,onUploadFinish:N=>{var R;const A=c.blockletScreenshots||[];A.push((R=N.data)==null?void 0:R.filename),h({blockletScreenshots:A}),y.current.close()},plugins:["ImageEditor"],apiPathProps:{uploader:le,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileTypes:dt,maxFileSize:ut,maxNumberOfFiles:5-Q.length}}},"uploader-screenshot")]}),l.jsxs(j,{display:"flex",mt:3,className:"section full-width",children:[l.jsx(j,{className:"left",children:l.jsx(L,{variant:"h3",children:a("blocklet.publish.resourceTitle")})}),l.jsxs(j,{sx:{flex:1},children:[l.jsx(to,{tabs:B,current:ye,onChange:ue,sx:{ml:-2,mt:-1.5}}),l.jsx(j,{children:de})]})]}),T==="pack"&&l.jsxs(j,{display:"flex",mt:3,className:"section full-width",children:[l.jsx(j,{className:"left",children:l.jsx(L,{variant:"h3",children:a("common.components")})}),l.jsx(j,{sx:{flex:1},children:l.jsx(et,{disabled:m||O,app:p,value:c.blockletComponents,onChange:N=>{h({blockletComponents:N})}})})]})]})]})}tt.propTypes={};tt.defaultProps={};const jl=q.div`
|
|
136
136
|
.sticky-header {
|
|
137
137
|
margin-top: -12px;
|
|
138
138
|
padding: 12px 0;
|
|
@@ -212,14 +212,14 @@ import{ao as At,j as l,aC as K,cq as Lt,aF as $,f7 as ot,aE as se,aA as Le,aB as
|
|
|
212
212
|
}
|
|
213
213
|
font-size: 0.8rem;
|
|
214
214
|
}
|
|
215
|
-
`;function Dt({padding:e}){const{blocklet:t}=xe(),o=Ht(),{componentDid:n}=ge();if(x.useEffect(()=>{if(n&&window.parent){const a=`${o.pathname}${o.search}`;window.parent.postMessage({event:"popstate",page:"publish",componentDid:n,path:a},"*")}},[n,o]),!t)return null;const d={};return e&&(d.padding=e),l.jsx(Cl,{style:d,children:l.jsxs(Jt,{children:[l.jsx(
|
|
215
|
+
`;function Dt({padding:e}){const{blocklet:t}=xe(),o=Ht(),{componentDid:n}=ge();if(x.useEffect(()=>{if(n&&window.parent){const a=`${o.pathname}${o.search}`;window.parent.postMessage({event:"popstate",page:"publish",componentDid:n,path:a},"*")}},[n,o]),!t)return null;const d={};return e&&(d.padding=e),l.jsx(Cl,{style:d,children:l.jsxs(Jt,{children:[l.jsx(Te,{path:"/",element:l.jsx(Tt,{})}),l.jsx(Te,{path:"/create",element:l.jsx(qe,{})}),l.jsx(Te,{path:"/:projectId",element:l.jsx(It,{})}),l.jsx(Te,{path:"/:projectId/:releaseId",element:l.jsx(tt,{})})]})})}Dt.propTypes={padding:P.oneOfType([P.string,P.number])};Dt.defaultProps={padding:""};const Cl=q(j)`
|
|
216
216
|
a {
|
|
217
217
|
color: ${({theme:e})=>e.palette.primary.main};
|
|
218
218
|
}
|
|
219
219
|
`;export{Dt as default};
|
|
220
220
|
function __vite__mapDeps(indexes) {
|
|
221
221
|
if (!__vite__mapDeps.viteFileDeps) {
|
|
222
|
-
__vite__mapDeps.viteFileDeps = ["assets/react-
|
|
222
|
+
__vite__mapDeps.viteFileDeps = ["assets/react-W_eG3Zih.js","assets/index-jf1H7R2D.js","assets/index-F9vDNwHQ.css","assets/index-Ly_Yd813.js","assets/preact.module-CqtzSW6G.js","assets/index-5RAPyZhu.js","assets/index-_oP7djMv.js","assets/toUpper-hoSFB9Cp.js","assets/index-Oxu7k4-x.js","assets/fallback-gmfSXd3Y.js","assets/index-h8_sQZk8.js","assets/Toolbar-fKSQD6kR.js","assets/Hidden-LDXaA7QE.js","assets/MoreHoriz-6oCyuqz1.js","assets/ExpandMore-OJdD8wBw.js","assets/index-1XFBUK0L.js","assets/ListItem-DY28wT0F.js","assets/selector-FHo2eGtC.js","assets/Avatar-DjYDdC4Y.js","assets/useSlot-v5bcc8Kc.js","assets/ua-parser-IG43pig6.js","assets/index-d-Rw6UM2.js","assets/OpenInNew-dHB8I-mY.js","assets/CloseOutlined-eARgu6L1.js","assets/MoreVert-S0JjL3ST.js","assets/index-ptjnk_N2.js","assets/FormControlLabel-tkk4UmT-.js","assets/useFormControl-JPOhw-bl.js","assets/index-wY-UkzyM.js","assets/FilterList-Wlh0o175.js","assets/TableRow-McErKo52.js","assets/Grid-op03i2gG.js","assets/FormControl-b6R3X9iZ.js","assets/FormGroup-GIaS19hu.js","assets/InputLabel-RWdZETCM.js","assets/ListItemText-CHlc1cm0.js","assets/Select-XOhKkdl9.js","assets/TextField-ojrDs8Sg.js","assets/LastPage-xhjc0FYv.js","assets/index-eEL2jyON.js","assets/redux-WfHEzn4a.js","assets/Search-Ws1Y067Y.js","assets/Delete-RZzg-ZC4.js","assets/uniqBy-UuyoKNv3.js","assets/react-i1f7jPtW.css"]
|
|
223
223
|
}
|
|
224
224
|
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
|
225
225
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aA as $,aB as x,aC as d,aD as e,
|
|
1
|
+
import{aA as $,aB as x,aC as d,aD as e,b_ as k,cB as y,cA as m,r as C,aE as M,aF as l,j as s,aH as z,aI as j,bR as R,P as B}from"./index-jf1H7R2D.js";import{a as T,F as E}from"./FormControlLabel-tkk4UmT-.js";import{c as P}from"./useSlot-v5bcc8Kc.js";function _(t){return x("MuiSwitch",t)}const o=$("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),A=["className","color","edge","size","sx"],D=P(),I=t=>{const{classes:a,edge:i,size:r,color:p,checked:u,disabled:h}=t,g={root:["root",i&&`edge${e(i)}`,`size${e(r)}`],switchBase:["switchBase",`color${e(p)}`,u&&"checked",h&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},b=j(g,_,a);return l({},a,b)},N=d("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,a)=>{const{ownerState:i}=t;return[a.root,i.edge&&a[`edge${e(i.edge)}`],a[`size${e(i.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${o.thumb}`]:{width:16,height:16},[`& .${o.switchBase}`]:{padding:4,[`&.${o.checked}`]:{transform:"translateX(16px)"}}}}]}),O=d(T,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,a)=>{const{ownerState:i}=t;return[a.switchBase,{[`& .${o.input}`]:a.input},i.color!=="default"&&a[`color${e(i.color)}`]]}})(({theme:t})=>({position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${t.palette.mode==="light"?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${o.checked}`]:{transform:"translateX(20px)"},[`&.${o.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${o.checked} + .${o.track}`]:{opacity:.5},[`&.${o.disabled} + .${o.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:`${t.palette.mode==="light"?.12:.2}`},[`& .${o.input}`]:{left:"-100%",width:"300%"}}),({theme:t})=>({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:k(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter(([,a])=>a.main&&a.light).map(([a])=>({props:{color:a},style:{[`&.${o.checked}`]:{color:(t.vars||t).palette[a].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[a].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:k(t.palette[a].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${o.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${a}DisabledColor`]:`${t.palette.mode==="light"?y(t.palette[a].main,.62):m(t.palette[a].main,.55)}`}},[`&.${o.checked} + .${o.track}`]:{backgroundColor:(t.vars||t).palette[a].main}}}))]})),U=d("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(t,a)=>a.track})(({theme:t})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${t.palette.mode==="light"?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:`${t.palette.mode==="light"?.38:.3}`})),F=d("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(t,a)=>a.thumb})(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),L=C.forwardRef(function(a,i){const r=D({props:a,name:"MuiSwitch"}),{className:p,color:u="primary",edge:h=!1,size:g="medium",sx:b}=r,f=M(r,A),c=l({},r,{color:u,edge:h,size:g}),n=I(c),w=s.jsx(F,{className:n.thumb,ownerState:c});return s.jsxs(N,{className:z(n.root,p),sx:b,ownerState:c,children:[s.jsx(O,l({type:"checkbox",icon:w,checkedIcon:w,ref:i,ownerState:c},f,{classes:l({},n,{root:n.switchBase})})),s.jsx(U,{className:n.track,ownerState:c})]})}),V=L,v=R(t=>s.jsx(V,{focusVisibleClassName:".Mui-focusVisible",disableRipple:!0,...t}))(({theme:t})=>({width:42,height:26,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:2,transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{backgroundColor:t.palette.mode==="dark"?"#2ECA45":"#65C466",opacity:1,border:0},"&.Mui-disabled + .MuiSwitch-track":{opacity:.5}},"&.Mui-focusVisible .MuiSwitch-thumb":{color:"#33cf4d",border:"6px solid #fff"},"&.Mui-disabled .MuiSwitch-thumb":{color:t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]},"&.Mui-disabled + .MuiSwitch-track":{opacity:t.palette.mode==="light"?.7:.3}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:22,height:22},"& .MuiSwitch-track":{borderRadius:26/2,backgroundColor:t.palette.mode==="light"?"#E9E9EA":"#39393D",opacity:1,transition:t.transitions.create(["background-color"],{duration:500})}}));function S({labelProps:t,...a}){return t?s.jsx(E,{control:s.jsx(v,{...a}),...t}):s.jsx(v,{...a})}S.propTypes={labelProps:B.object};S.defaultProps={labelProps:null};export{S,V as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{aU as G}from"./index-ug8ILiCN.js";class w{constructor(e,t,o){this.property=e,this.normal=t,o&&(this.space=o)}}w.prototype.property={};w.prototype.normal={};w.prototype.space=null;function B(l,e){const t={},o={};let c=-1;for(;++c<l.length;)Object.assign(t,l[c].property),Object.assign(o,l[c].normal);return new w(t,o,e)}function L(l){return l.toLowerCase()}class h{constructor(e,t){this.property=e,this.attribute=t}}h.prototype.space=null;h.prototype.boolean=!1;h.prototype.booleanish=!1;h.prototype.overloadedBoolean=!1;h.prototype.number=!1;h.prototype.commaSeparated=!1;h.prototype.spaceSeparated=!1;h.prototype.commaOrSpaceSeparated=!1;h.prototype.mustUseProperty=!1;h.prototype.defined=!1;let $=0;const r=k(),p=k(),H=k(),n=k(),u=k(),x=k(),g=k();function k(){return 2**++$}const P=Object.freeze(Object.defineProperty({__proto__:null,boolean:r,booleanish:p,commaOrSpaceSeparated:g,commaSeparated:x,number:n,overloadedBoolean:H,spaceSeparated:u},Symbol.toStringTag,{value:"Module"})),C=Object.keys(P);class E extends h{constructor(e,t,o,c){let s=-1;if(super(e,t),R(this,"space",c),typeof o=="number")for(;++s<C.length;){const d=C[s];R(this,C[s],(o&P[d])===P[d])}}}E.prototype.defined=!0;function R(l,e,t){t&&(l[e]=t)}const Z={}.hasOwnProperty;function S(l){const e={},t={};let o;for(o in l.properties)if(Z.call(l.properties,o)){const c=l.properties[o],s=new E(o,l.transform(l.attributes||{},o),c,l.space);l.mustUseProperty&&l.mustUseProperty.includes(o)&&(s.mustUseProperty=!0),e[o]=s,t[L(o)]=o,t[L(s.attribute)]=o}return new w(e,t,l.space)}const F=S({space:"xlink",transform(l,e){return"xlink:"+e.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),j=S({space:"xml",transform(l,e){return"xml:"+e.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function N(l,e){return e in l?l[e]:e}function X(l,e){return N(l,e.toLowerCase())}const _=S({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:X,properties:{xmlns:null,xmlnsXLink:null}}),V=S({transform(l,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:p,ariaAutoComplete:null,ariaBusy:p,ariaChecked:p,ariaColCount:n,ariaColIndex:n,ariaColSpan:n,ariaControls:u,ariaCurrent:null,ariaDescribedBy:u,ariaDetails:null,ariaDisabled:p,ariaDropEffect:u,ariaErrorMessage:null,ariaExpanded:p,ariaFlowTo:u,ariaGrabbed:p,ariaHasPopup:null,ariaHidden:p,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:u,ariaLevel:n,ariaLive:null,ariaModal:p,ariaMultiLine:p,ariaMultiSelectable:p,ariaOrientation:null,ariaOwns:u,ariaPlaceholder:null,ariaPosInSet:n,ariaPressed:p,ariaReadOnly:p,ariaRelevant:null,ariaRequired:p,ariaRoleDescription:u,ariaRowCount:n,ariaRowIndex:n,ariaRowSpan:n,ariaSelected:p,ariaSetSize:n,ariaSort:null,ariaValueMax:n,ariaValueMin:n,ariaValueNow:n,ariaValueText:null,role:null}}),J=S({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:X,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:x,acceptCharset:u,accessKey:u,action:null,allow:null,allowFullScreen:r,allowPaymentRequest:r,allowUserMedia:r,alt:null,as:null,async:r,autoCapitalize:null,autoComplete:u,autoFocus:r,autoPlay:r,capture:r,charSet:null,checked:r,cite:null,className:u,cols:n,colSpan:null,content:null,contentEditable:p,controls:r,controlsList:u,coords:n|x,crossOrigin:null,data:null,dateTime:null,decoding:null,default:r,defer:r,dir:null,dirName:null,disabled:r,download:H,draggable:p,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:r,formTarget:null,headers:u,height:n,hidden:r,high:n,href:null,hrefLang:null,htmlFor:u,httpEquiv:u,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:r,itemId:null,itemProp:u,itemRef:u,itemScope:r,itemType:u,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:r,low:n,manifest:null,max:null,maxLength:n,media:null,method:null,min:null,minLength:n,multiple:r,muted:r,name:null,nonce:null,noModule:r,noValidate:r,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:r,optimum:n,pattern:null,ping:u,placeholder:null,playsInline:r,poster:null,preload:null,readOnly:r,referrerPolicy:null,rel:u,required:r,reversed:r,rows:n,rowSpan:n,sandbox:u,scope:null,scoped:r,seamless:r,selected:r,shape:null,size:n,sizes:null,slot:null,span:n,spellCheck:p,src:null,srcDoc:null,srcLang:null,srcSet:null,start:n,step:null,style:null,tabIndex:n,target:null,title:null,translate:null,type:null,typeMustMatch:r,useMap:null,value:p,width:n,wrap:null,align:null,aLink:null,archive:u,axis:null,background:null,bgColor:null,border:n,borderColor:null,bottomMargin:n,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:r,declare:r,event:null,face:null,frame:null,frameBorder:null,hSpace:n,leftMargin:n,link:null,longDesc:null,lowSrc:null,marginHeight:n,marginWidth:n,noResize:r,noHref:r,noShade:r,noWrap:r,object:null,profile:null,prompt:null,rev:null,rightMargin:n,rules:null,scheme:null,scrolling:p,standby:null,summary:null,text:null,topMargin:n,valueType:null,version:null,vAlign:null,vLink:null,vSpace:n,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:r,disableRemotePlayback:r,prefix:null,property:null,results:n,security:null,unselectable:null}}),Q=S({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:N,properties:{about:g,accentHeight:n,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:n,amplitude:n,arabicForm:null,ascent:n,attributeName:null,attributeType:null,azimuth:n,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:n,by:null,calcMode:null,capHeight:n,className:u,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:n,diffuseConstant:n,direction:null,display:null,dur:null,divisor:n,dominantBaseline:null,download:r,dx:null,dy:null,edgeMode:null,editable:null,elevation:n,enableBackground:null,end:null,event:null,exponent:n,externalResourcesRequired:null,fill:null,fillOpacity:n,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:x,g2:x,glyphName:x,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:n,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:n,horizOriginX:n,horizOriginY:n,id:null,ideographic:n,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:n,k:n,k1:n,k2:n,k3:n,k4:n,kernelMatrix:g,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:n,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:n,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:n,overlineThickness:n,paintOrder:null,panose1:null,path:null,pathLength:n,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:u,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:n,pointsAtY:n,pointsAtZ:n,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:g,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:g,rev:g,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:g,requiredFeatures:g,requiredFonts:g,requiredFormats:g,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:n,specularExponent:n,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:n,strikethroughThickness:n,string:null,stroke:null,strokeDashArray:g,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:n,strokeOpacity:n,strokeWidth:null,style:null,surfaceScale:n,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:g,tabIndex:n,tableValues:null,target:null,targetX:n,targetY:n,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:g,to:null,transform:null,u1:null,u2:null,underlinePosition:n,underlineThickness:n,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:n,values:null,vAlphabetic:n,vMathematical:n,vectorEffect:null,vHanging:n,vIdeographic:n,version:null,vertAdvY:n,vertOriginX:n,vertOriginY:n,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:n,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),nn=/^data[-\w.:]+$/i,T=/-[a-z]/g,ln=/[A-Z]/g;function kn(l,e){const t=L(e);let o=e,c=h;if(t in l.normal)return l.property[l.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&nn.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(T,on);o="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!T.test(s)){let d=s.replace(ln,en);d.charAt(0)!=="-"&&(d="-"+d),e="data"+d}}c=E}return new c(o,e)}function en(l){return"-"+l.toLowerCase()}function on(l){return l.charAt(1).toUpperCase()}const xn={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Sn=B([j,F,_,V,J],"html"),wn=B([j,F,_,V,Q],"svg");function bn(l){const e=String(l||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function Cn(l){return l.join(" ").trim()}function Ln(l){const e=[],t=String(l||"");let o=t.indexOf(","),c=0,s=!1;for(;!s;){o===-1&&(o=t.length,s=!0);const d=t.slice(c,o).trim();(d||!s)&&e.push(d),c=o+1,o=t.indexOf(",",c)}return e}function Pn(l,e){const t=e||{};return(l[l.length-1]===""?[...l,""]:l).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}var O={exports:{}},A=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,tn=/\n/g,rn=/^\s*/,an=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,un=/^:\s*/,sn=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,cn=/^[;\s]*/,pn=/^\s+|\s+$/g,dn=`
|
|
1
|
+
import{aU as G}from"./index-jf1H7R2D.js";class w{constructor(e,t,o){this.property=e,this.normal=t,o&&(this.space=o)}}w.prototype.property={};w.prototype.normal={};w.prototype.space=null;function B(l,e){const t={},o={};let c=-1;for(;++c<l.length;)Object.assign(t,l[c].property),Object.assign(o,l[c].normal);return new w(t,o,e)}function L(l){return l.toLowerCase()}class h{constructor(e,t){this.property=e,this.attribute=t}}h.prototype.space=null;h.prototype.boolean=!1;h.prototype.booleanish=!1;h.prototype.overloadedBoolean=!1;h.prototype.number=!1;h.prototype.commaSeparated=!1;h.prototype.spaceSeparated=!1;h.prototype.commaOrSpaceSeparated=!1;h.prototype.mustUseProperty=!1;h.prototype.defined=!1;let $=0;const r=k(),p=k(),H=k(),n=k(),u=k(),x=k(),g=k();function k(){return 2**++$}const P=Object.freeze(Object.defineProperty({__proto__:null,boolean:r,booleanish:p,commaOrSpaceSeparated:g,commaSeparated:x,number:n,overloadedBoolean:H,spaceSeparated:u},Symbol.toStringTag,{value:"Module"})),C=Object.keys(P);class E extends h{constructor(e,t,o,c){let s=-1;if(super(e,t),R(this,"space",c),typeof o=="number")for(;++s<C.length;){const d=C[s];R(this,C[s],(o&P[d])===P[d])}}}E.prototype.defined=!0;function R(l,e,t){t&&(l[e]=t)}const Z={}.hasOwnProperty;function S(l){const e={},t={};let o;for(o in l.properties)if(Z.call(l.properties,o)){const c=l.properties[o],s=new E(o,l.transform(l.attributes||{},o),c,l.space);l.mustUseProperty&&l.mustUseProperty.includes(o)&&(s.mustUseProperty=!0),e[o]=s,t[L(o)]=o,t[L(s.attribute)]=o}return new w(e,t,l.space)}const F=S({space:"xlink",transform(l,e){return"xlink:"+e.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),j=S({space:"xml",transform(l,e){return"xml:"+e.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function N(l,e){return e in l?l[e]:e}function X(l,e){return N(l,e.toLowerCase())}const _=S({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:X,properties:{xmlns:null,xmlnsXLink:null}}),V=S({transform(l,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:p,ariaAutoComplete:null,ariaBusy:p,ariaChecked:p,ariaColCount:n,ariaColIndex:n,ariaColSpan:n,ariaControls:u,ariaCurrent:null,ariaDescribedBy:u,ariaDetails:null,ariaDisabled:p,ariaDropEffect:u,ariaErrorMessage:null,ariaExpanded:p,ariaFlowTo:u,ariaGrabbed:p,ariaHasPopup:null,ariaHidden:p,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:u,ariaLevel:n,ariaLive:null,ariaModal:p,ariaMultiLine:p,ariaMultiSelectable:p,ariaOrientation:null,ariaOwns:u,ariaPlaceholder:null,ariaPosInSet:n,ariaPressed:p,ariaReadOnly:p,ariaRelevant:null,ariaRequired:p,ariaRoleDescription:u,ariaRowCount:n,ariaRowIndex:n,ariaRowSpan:n,ariaSelected:p,ariaSetSize:n,ariaSort:null,ariaValueMax:n,ariaValueMin:n,ariaValueNow:n,ariaValueText:null,role:null}}),J=S({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:X,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:x,acceptCharset:u,accessKey:u,action:null,allow:null,allowFullScreen:r,allowPaymentRequest:r,allowUserMedia:r,alt:null,as:null,async:r,autoCapitalize:null,autoComplete:u,autoFocus:r,autoPlay:r,capture:r,charSet:null,checked:r,cite:null,className:u,cols:n,colSpan:null,content:null,contentEditable:p,controls:r,controlsList:u,coords:n|x,crossOrigin:null,data:null,dateTime:null,decoding:null,default:r,defer:r,dir:null,dirName:null,disabled:r,download:H,draggable:p,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:r,formTarget:null,headers:u,height:n,hidden:r,high:n,href:null,hrefLang:null,htmlFor:u,httpEquiv:u,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:r,itemId:null,itemProp:u,itemRef:u,itemScope:r,itemType:u,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:r,low:n,manifest:null,max:null,maxLength:n,media:null,method:null,min:null,minLength:n,multiple:r,muted:r,name:null,nonce:null,noModule:r,noValidate:r,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:r,optimum:n,pattern:null,ping:u,placeholder:null,playsInline:r,poster:null,preload:null,readOnly:r,referrerPolicy:null,rel:u,required:r,reversed:r,rows:n,rowSpan:n,sandbox:u,scope:null,scoped:r,seamless:r,selected:r,shape:null,size:n,sizes:null,slot:null,span:n,spellCheck:p,src:null,srcDoc:null,srcLang:null,srcSet:null,start:n,step:null,style:null,tabIndex:n,target:null,title:null,translate:null,type:null,typeMustMatch:r,useMap:null,value:p,width:n,wrap:null,align:null,aLink:null,archive:u,axis:null,background:null,bgColor:null,border:n,borderColor:null,bottomMargin:n,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:r,declare:r,event:null,face:null,frame:null,frameBorder:null,hSpace:n,leftMargin:n,link:null,longDesc:null,lowSrc:null,marginHeight:n,marginWidth:n,noResize:r,noHref:r,noShade:r,noWrap:r,object:null,profile:null,prompt:null,rev:null,rightMargin:n,rules:null,scheme:null,scrolling:p,standby:null,summary:null,text:null,topMargin:n,valueType:null,version:null,vAlign:null,vLink:null,vSpace:n,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:r,disableRemotePlayback:r,prefix:null,property:null,results:n,security:null,unselectable:null}}),Q=S({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:N,properties:{about:g,accentHeight:n,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:n,amplitude:n,arabicForm:null,ascent:n,attributeName:null,attributeType:null,azimuth:n,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:n,by:null,calcMode:null,capHeight:n,className:u,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:n,diffuseConstant:n,direction:null,display:null,dur:null,divisor:n,dominantBaseline:null,download:r,dx:null,dy:null,edgeMode:null,editable:null,elevation:n,enableBackground:null,end:null,event:null,exponent:n,externalResourcesRequired:null,fill:null,fillOpacity:n,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:x,g2:x,glyphName:x,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:n,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:n,horizOriginX:n,horizOriginY:n,id:null,ideographic:n,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:n,k:n,k1:n,k2:n,k3:n,k4:n,kernelMatrix:g,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:n,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:n,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:n,overlineThickness:n,paintOrder:null,panose1:null,path:null,pathLength:n,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:u,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:n,pointsAtY:n,pointsAtZ:n,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:g,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:g,rev:g,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:g,requiredFeatures:g,requiredFonts:g,requiredFormats:g,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:n,specularExponent:n,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:n,strikethroughThickness:n,string:null,stroke:null,strokeDashArray:g,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:n,strokeOpacity:n,strokeWidth:null,style:null,surfaceScale:n,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:g,tabIndex:n,tableValues:null,target:null,targetX:n,targetY:n,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:g,to:null,transform:null,u1:null,u2:null,underlinePosition:n,underlineThickness:n,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:n,values:null,vAlphabetic:n,vMathematical:n,vectorEffect:null,vHanging:n,vIdeographic:n,version:null,vertAdvY:n,vertOriginX:n,vertOriginY:n,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:n,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),nn=/^data[-\w.:]+$/i,T=/-[a-z]/g,ln=/[A-Z]/g;function kn(l,e){const t=L(e);let o=e,c=h;if(t in l.normal)return l.property[l.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&nn.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(T,on);o="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!T.test(s)){let d=s.replace(ln,en);d.charAt(0)!=="-"&&(d="-"+d),e="data"+d}}c=E}return new c(o,e)}function en(l){return"-"+l.toLowerCase()}function on(l){return l.charAt(1).toUpperCase()}const xn={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Sn=B([j,F,_,V,J],"html"),wn=B([j,F,_,V,Q],"svg");function bn(l){const e=String(l||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function Cn(l){return l.join(" ").trim()}function Ln(l){const e=[],t=String(l||"");let o=t.indexOf(","),c=0,s=!1;for(;!s;){o===-1&&(o=t.length,s=!0);const d=t.slice(c,o).trim();(d||!s)&&e.push(d),c=o+1,o=t.indexOf(",",c)}return e}function Pn(l,e){const t=e||{};return(l[l.length-1]===""?[...l,""]:l).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}var O={exports:{}},A=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,tn=/\n/g,rn=/^\s*/,an=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,un=/^:\s*/,sn=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,cn=/^[;\s]*/,pn=/^\s+|\s+$/g,dn=`
|
|
2
2
|
`,I="/",U="*",y="",gn="comment",hn="declaration",mn=function(l,e){if(typeof l!="string")throw new TypeError("First argument must be a string");if(!l)return[];e=e||{};var t=1,o=1;function c(i){var a=i.match(tn);a&&(t+=a.length);var m=i.lastIndexOf(dn);o=~m?i.length-m:o+i.length}function s(){var i={line:t,column:o};return function(a){return a.position=new d(i),b(),a}}function d(i){this.start=i,this.end={line:t,column:o},this.source=e.source}d.prototype.content=l;function v(i){var a=new Error(e.source+":"+t+":"+o+": "+i);if(a.reason=i,a.filename=e.source,a.line=t,a.column=o,a.source=l,!e.silent)throw a}function f(i){var a=i.exec(l);if(a){var m=a[0];return c(m),l=l.slice(m.length),a}}function b(){f(rn)}function M(i){var a;for(i=i||[];a=D();)a!==!1&&i.push(a);return i}function D(){var i=s();if(!(I!=l.charAt(0)||U!=l.charAt(1))){for(var a=2;y!=l.charAt(a)&&(U!=l.charAt(a)||I!=l.charAt(a+1));)++a;if(a+=2,y===l.charAt(a-1))return v("End of comment missing");var m=l.slice(2,a-2);return o+=2,c(m),l=l.slice(a),o+=2,i({type:gn,comment:m})}}function K(){var i=s(),a=f(an);if(a){if(D(),!f(un))return v("property missing ':'");var m=f(sn),q=i({type:hn,property:z(a[0].replace(A,y)),value:m?z(m[0].replace(A,y)):y});return f(cn),q}}function Y(){var i=[];M(i);for(var a;a=K();)a!==!1&&(i.push(a),M(i));return i}return b(),Y()};function z(l){return l?l.replace(pn,y):y}var fn=mn;function W(l,e){var t=null;if(!l||typeof l!="string")return t;for(var o,c=fn(l),s=typeof e=="function",d,v,f=0,b=c.length;f<b;f++)o=c[f],d=o.property,v=o.value,s?e(d,v,o):v&&(t||(t={}),t[d]=v);return t}O.exports=W;O.exports.default=W;var vn=O.exports;const En=G(vn),On={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Mn(l){const e=l&&typeof l=="object"&&l.type==="text"?l.value||"":l;return typeof e=="string"&&e.replace(/[ \t\n\f\r]/g,"")===""}export{En as S,Pn as a,Cn as b,xn as c,Mn as d,Ln as e,kn as f,Sn as h,L as n,bn as p,wn as s,On as w};
|