@abtnode/webapp 1.17.7 → 1.17.8-beta-20260104-120132-cb5b1914
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{AdapterDayjs-Bf62_KHd.js → AdapterDayjs-Vs-c78Fd.js} +1 -1
- package/dist/assets/{Add-DsCZxomS.js → Add-DDUKFJZu.js} +1 -1
- package/dist/assets/ArrowDropDown-D2C1Adnj.js +1 -0
- package/dist/assets/{Autocomplete-3RVWHTcY.js → Autocomplete-D16Gs8zB.js} +1 -1
- package/dist/assets/{Breadcrumbs-Ce4oQ7Yc.js → Breadcrumbs-Ce4ltGu-.js} +1 -1
- package/dist/assets/{ButtonGroup-BBkFKNOE.js → ButtonGroup-BHahRCP8.js} +1 -1
- package/dist/assets/{CSSTransition-Bdj4Mjb5.js → CSSTransition-CgzKcQFn.js} +1 -1
- package/dist/assets/{CallMerge-DB0zaZAy.js → CallMerge-DxAFzQUN.js} +1 -1
- package/dist/assets/{CardContent-DYbZwS2P.js → CardContent-lfT7ngTs.js} +1 -1
- package/dist/assets/{ChevronLeft-LUIxb-Gs.js → ChevronLeft-j4acQ5VL.js} +1 -1
- package/dist/assets/{ChevronRight-CMxsc1-C.js → ChevronRight-DkMJwq2n.js} +1 -1
- package/dist/assets/{Clear-C3sN6cHh.js → Clear-CwtlvQC0.js} +1 -1
- package/dist/assets/{Delete-Dfzx-_QK.js → Delete-Go0rVsno.js} +1 -1
- package/dist/assets/{DeleteOutline-DpQcJ9uI.js → DeleteOutline-Cb8Q1XUk.js} +1 -1
- package/dist/assets/{Done-B-lhh5Lr.js → Done-pmipBbat.js} +1 -1
- package/dist/assets/{Edit-BC3nr7bV.js → Edit-CcS7V9Ak.js} +1 -1
- package/dist/assets/{ErrorOutline-B8rqfUz9.js → ErrorOutline-DrIyPB6z.js} +1 -1
- package/dist/assets/{FilterList-rsYn09vK.js → FilterList-2EXj6a6n.js} +1 -1
- package/dist/assets/{Google-DvG9EWSC.js → Google-DktWgt0U.js} +1 -1
- package/dist/assets/{HelpOutline-DV_Sx2ni.js → HelpOutline-Hg9WCxla.js} +1 -1
- package/dist/assets/{KeyboardArrowDown-DrxfizRQ.js → KeyboardArrowDown-BWVvLKw7.js} +1 -1
- package/dist/assets/{Launch-CtQmWL-A.js → Launch-BLe0UBZt.js} +1 -1
- package/dist/assets/{Link-DWefbDaG.js → Link-y1h-oO1V.js} +1 -1
- package/dist/assets/{ListItemButton-3I3mSJkP.js → ListItemButton-Ce85VoIN.js} +1 -1
- package/dist/assets/{ListSubheader-6QF36c7B.js → ListSubheader-BcKYZ8JH.js} +1 -1
- package/dist/assets/{LoadingButton-BYeGfUfG.js → LoadingButton-Dcydz6oY.js} +1 -1
- package/dist/assets/{MoreVert-trwGA3wl.js → MoreVert-CiOr5AIx.js} +1 -1
- package/dist/assets/{OpenInNew-BPFABZ3A.js → OpenInNew-Dk7iCLrt.js} +1 -1
- package/dist/assets/{Refresh-BHzztae5.js → Refresh-BobTHUut.js} +1 -1
- package/dist/assets/{Replay-DL5tXUkH.js → Replay-Dea3-rmp.js} +1 -1
- package/dist/assets/{Search-3NZ8vA4F.js → Search-BZH2Y-GF.js} +1 -1
- package/dist/assets/{Stepper-Czt9JHmf.js → Stepper-BIVcZycJ.js} +1 -1
- package/dist/assets/{TableSearch-B_n7jlL9.js → TableSearch-qOyd56Ni.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-BUuAjiiA.js → ToggleButtonGroup-CATAh5dF.js} +1 -1
- package/dist/assets/{UnfoldMore-C_VudNPV.js → UnfoldMore-DVzs5Fd_.js} +1 -1
- package/dist/assets/{Verified-Wsp8TANt.js → Verified-DXMVMP7I.js} +1 -1
- package/dist/assets/{VerifiedUser-BtmbPbB1.js → VerifiedUser-D4F-7jv5.js} +1 -1
- package/dist/assets/{ViewList-B70rgoza.js → ViewList-CbzcdOde.js} +1 -1
- package/dist/assets/{_createAggregator-3CFJfow4.js → _createAggregator-Lfp1Ke0G.js} +1 -1
- package/dist/assets/{actions-BAAc2dMh.js → actions-CGUgsaws.js} +1 -1
- package/dist/assets/{actions-CVw0Ioh6.js → actions-DG35HPVB.js} +1 -1
- package/dist/assets/{agreement-CN5OCdHh.js → agreement-Cv-J-Fjv.js} +1 -1
- package/dist/assets/api-C_DWrTOw.js +1 -0
- package/dist/assets/{appearance-Bg3eFrYH.js → appearance-BZ4JSCZa.js} +1 -1
- package/dist/assets/{audit-logs-BqRm_F9G.js → audit-logs-BJKzDQxA.js} +1 -1
- package/dist/assets/{base-chart-CLPgrkli.js → base-chart-CwZKJ_pP.js} +1 -1
- package/dist/assets/{blocklet-DI09kb3z.js → blocklet-CVUABgLB.js} +1 -1
- package/dist/assets/{chain-C3ooT1VP.js → chain-W2rcXV0v.js} +1 -1
- package/dist/assets/{click-to-copy-D3DsyQ7B.js → click-to-copy-C9CEoG_G.js} +1 -1
- package/dist/assets/cloneDeep-xQSdy3ru.js +1 -0
- package/dist/assets/{config-navigation-B2tX-3vU.js → config-navigation-4S-dNGE7.js} +3 -3
- package/dist/assets/{connect-to-D2kofpuz.js → connect-to-XIJwhb9Y.js} +2 -2
- package/dist/assets/{cssMode-C-HXmW9S.js → cssMode-Du7mCixB.js} +1 -1
- package/dist/assets/{delete-confirm-y9uI0hXG.js → delete-confirm-DzRNsfZf.js} +1 -1
- package/dist/assets/{depsEqual-AZEPsRt3.js → depsEqual-DGV4LqLy.js} +1 -1
- package/dist/assets/{detail-CUJgqlsd.js → detail-BuBPXCBN.js} +3 -3
- package/dist/assets/{domains-Ds-t-5cC.js → domains-Dx67UXgN.js} +1 -1
- package/dist/assets/{download-CRh8yH_q.js → download-CH7_x1eB.js} +1 -1
- package/dist/assets/{edit.svg-BRRfsd3L.js → edit.svg-dSshOuok.js} +1 -1
- package/dist/assets/emotion-cache.browser.esm-SC5V9-Mk.js +1 -0
- package/dist/assets/engine-C0EQfmPn.js +1 -0
- package/dist/assets/{freemarker2-CGpgj78_.js → freemarker2-B9kx0OLY.js} +1 -1
- package/dist/assets/{get-safe-url-BR_QU8Dh.js → get-safe-url-BM3lF-2e.js} +1 -1
- package/dist/assets/getValidReactChildren-epDyUSMI.js +1 -0
- package/dist/assets/{graphqlMode-C9KkLkCB.js → graphqlMode-CkbaDQgp.js} +2 -2
- package/dist/assets/{handlebars-D_BNerME.js → handlebars-DUBIehcf.js} +1 -1
- package/dist/assets/{html-C8nmUyPA.js → html-COyeeKnL.js} +1 -1
- package/dist/assets/{html-title-CHWL92Ab.js → html-title-BmeDpLW7.js} +1 -1
- package/dist/assets/{htmlMode-Cbln7vuj.js → htmlMode-Bu-rnyRy.js} +1 -1
- package/dist/assets/{iframe-DJmf2DN1.js → iframe-LFRAd_0t.js} +1 -1
- package/dist/assets/{index-sdZCV0b1.js → index-B5dTlpQ6.js} +3 -3
- package/dist/assets/{index-BeQc3UkQ.js → index-BAG4sFIa.js} +474 -474
- package/dist/assets/{index-DqxSKSRU.js → index-BFlu8DSs.js} +1 -1
- package/dist/assets/{index-Bl4BVg_B.js → index-BFqzpwMp.js} +3 -3
- package/dist/assets/{index-C6cCABCg.js → index-BHBFPu4-.js} +1 -1
- package/dist/assets/{index-hAMgv1Ac.js → index-BII0tBQJ.js} +1 -1
- package/dist/assets/{index-DiZi9bmR.js → index-BJGsab_w.js} +1 -1
- package/dist/assets/{index-D3erh2pC.js → index-BMJQwcrZ.js} +3 -3
- package/dist/assets/{index-BHXV_Uyd.js → index-BNneiGbE.js} +1 -1
- package/dist/assets/{index-BgCWds86.js → index-B_CFto00.js} +1 -1
- package/dist/assets/{index-DNUQq8Bi.js → index-BgREj7bL.js} +1 -1
- package/dist/assets/{index-BbeJesOq.js → index-BiHajix6.js} +1 -1
- package/dist/assets/{index-aU6di1GB.js → index-BlTw-6BM.js} +1 -1
- package/dist/assets/{index--sEMugrz.js → index-BlwUzAku.js} +1 -1
- package/dist/assets/{index-CbALc3XH.js → index-Br-U1FnX.js} +1 -1
- package/dist/assets/{index-CJ1w1KYa.js → index-Bw9bFr7r.js} +9 -9
- package/dist/assets/{index-COUqJ9-z.js → index-C05tV0ZE.js} +1 -1
- package/dist/assets/{index-CxvZy8qq.js → index-C0YtVsBZ.js} +1 -1
- package/dist/assets/{index-O0QMxlIj.js → index-C2IzEz22.js} +1 -1
- package/dist/assets/{index-xcANvyL-.js → index-C81qWcGU.js} +1 -1
- package/dist/assets/{index-CODhl4Ao.js → index-C9MSpDFK.js} +1 -1
- package/dist/assets/{index--aRvqG_y.js → index-Cae5PiHg.js} +1 -1
- package/dist/assets/{index-BDT45MlS.js → index-Cb-DKFcI.js} +1 -1
- package/dist/assets/{index-D31fr5VL.js → index-D7So_MpN.js} +1 -1
- package/dist/assets/{index-52mqVMFt.js → index-DE_vu8sU.js} +1 -1
- package/dist/assets/{index-6nMPypbs.js → index-DLuK9hbg.js} +1 -1
- package/dist/assets/{index-ClbnPUTw.js → index-DTbf05gc.js} +1 -1
- package/dist/assets/{index-xEJdUfGB.js → index-DZS5ngzW.js} +1 -1
- package/dist/assets/{index-2MKd-1Yf.js → index-DkuvHf4y.js} +3 -3
- package/dist/assets/{index-DKUJWUc3.js → index-Dn2Htnmc.js} +1 -1
- package/dist/assets/{index-BozRXjdh.js → index-K0hgrWRS.js} +1 -1
- package/dist/assets/{index-D3Ou3XmE.js → index-UmFQuVKj.js} +1 -1
- package/dist/assets/{index-BAreTrrc.js → index-VknOfNJf.js} +1 -1
- package/dist/assets/{index-DOgexfV_.js → index-VmjW0dsI.js} +1 -1
- package/dist/assets/index-ZOh2DQ-e.js +1 -0
- package/dist/assets/{index-BZEpEbZE.js → index-Z_UozIXP.js} +1 -1
- package/dist/assets/{index-8mapgkUu.js → index-chjM6enQ.js} +1 -1
- package/dist/assets/{index-L59zcQ3y.js → index-fMsDDFcL.js} +1 -1
- package/dist/assets/{index-xstE610P.js → index-fVVKWgqI.js} +1 -1
- package/dist/assets/{index-D-SnE_aW.js → index-gCoH7vaA.js} +1 -1
- package/dist/assets/{index-Fn1MOxir.js → index-qc1lGVZ3.js} +1 -1
- package/dist/assets/{index-DOir4J5b.js → index-u_QBRhjP.js} +2 -2
- package/dist/assets/{index-BWJoCxfo.js → index-x0PsmbaE.js} +1 -1
- package/dist/assets/{index-TBuePazk.js → index-xAYo0tnA.js} +1 -1
- package/dist/assets/{index.esm-DWSKQCVf.js → index.esm-Bf_QZb6r.js} +1 -1
- package/dist/assets/{install-from-url-DDaq0WfF.js → install-from-url-nk7F4qMd.js} +1 -1
- package/dist/assets/{invitation-BtOYVKCc.js → invitation-B_9wi5W5.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-DSamcBqo.js → is-path-prefix-equal-CzIiUrel.js} +1 -1
- package/dist/assets/{item-DixRT1Ir.js → item-DkZh8Hhp.js} +1 -1
- package/dist/assets/{javascript-COnhTyPR.js → javascript-Q7umZWAd.js} +1 -1
- package/dist/assets/{jsonMode-B-wg4b0L.js → jsonMode-C6c2lIq6.js} +1 -1
- package/dist/assets/{liquid-DkJ8XF8g.js → liquid-CUNhEHdT.js} +1 -1
- package/dist/assets/{list-header-CQPLxTLi.js → list-header-iCOCzxwu.js} +1 -1
- package/dist/assets/{lock.svg-CfRs8nBP.js → lock.svg-BHzJlnL9.js} +1 -1
- package/dist/assets/{log-3m4zIEL-.js → log-fZVSp3m5.js} +1 -1
- package/dist/assets/{lottie-react.esm-Ho0K4HxG.js → lottie-react.esm-DdCGF8TN.js} +1 -1
- package/dist/assets/{mdx-BaqshKqy.js → mdx-BVwzzx49.js} +1 -1
- package/dist/assets/{memory-Bmu9KdH5.js → memory-D5_ocLrh.js} +1 -1
- package/dist/assets/{metric-CYgfR-6x.js → metric-CKUrN2-J.js} +1 -1
- package/dist/assets/omit-AtPtqkZn.js +1 -0
- package/dist/assets/{overview-DPxRgZrc.js → overview-DpaUtqpu.js} +1 -1
- package/dist/assets/{permission-fAWDL6eA.js → permission-CHoPVbRo.js} +1 -1
- package/dist/assets/{preference-BdCzfdKd.js → preference-ByJourOS.js} +3 -3
- package/dist/assets/{python-DDh1Sld9.js → python-DLHaQGBR.js} +1 -1
- package/dist/assets/{raf-schd.esm-y75m-HYf.js → raf-schd.esm-CCmBZGJO.js} +1 -1
- package/dist/assets/{razor-B6iT4xzc.js → razor-CKWImlfd.js} +1 -1
- package/dist/assets/{rotate-session-key-Bh2rfrqq.js → rotate-session-key-DUFrAiqM.js} +1 -1
- package/dist/assets/{runtime-Br6d5OIR.js → runtime-DjHvP0dh.js} +1 -1
- package/dist/assets/schema-Cs8BMbik.js +1 -0
- package/dist/assets/sdk-BgSACA1b.js +1 -0
- package/dist/assets/{service-CktTTJWl.js → service-BKneL2po.js} +1 -1
- package/dist/assets/{shorten-label-hqt7jmPr.js → shorten-label-Bbwb6iCZ.js} +1 -1
- package/dist/assets/{simple-select-CQeor5tC.js → simple-select-Dmadn013.js} +1 -1
- package/dist/assets/{spaces-CfDVuFGr.js → spaces-DiNJcyfo.js} +1 -1
- package/dist/assets/{status-B5KZ8DJC.js → status-BBz_v2_j.js} +1 -1
- package/dist/assets/{status--oG1pao2.js → status-Cjdz-yj2.js} +1 -1
- package/dist/assets/{switch-control-Ce7-RZ39.js → switch-control-CUmdJFfi.js} +1 -1
- package/dist/assets/{table-icons-CRF7M3DQ.js → table-icons-Cz9AeFAu.js} +1 -1
- package/dist/assets/{team-B5ZkAUsr.js → team-CBKW6kF_.js} +1 -1
- package/dist/assets/{toLower-D3hDe9vm.js → toLower-CoePqXpD.js} +1 -1
- package/dist/assets/toUpper-cyn7A90V.js +1 -0
- package/dist/assets/{traffic-DLkNU8lW.js → traffic-BA_E7yI0.js} +1 -1
- package/dist/assets/{tsMode-Cgz7fmer.js → tsMode-CFU_SCMw.js} +1 -1
- package/dist/assets/{typescript-DeFz7cju.js → typescript-CQJv57lf.js} +1 -1
- package/dist/assets/{url-evaluation-CnA0uWcs.js → url-evaluation-2HGMyS33.js} +1 -1
- package/dist/assets/{url-join-Di70zMv6.js → url-join-Cb-sLZRl.js} +1 -1
- package/dist/assets/{use-mobile-DHdENrRR.js → use-mobile-BZHIPj7_.js} +1 -1
- package/dist/assets/{use-mobile-BoSC-OO1.js → use-mobile-CnGwCUj_.js} +1 -1
- package/dist/assets/{useAsync-EIK7zv0J.js → useAsync-DOTk7wjs.js} +1 -1
- package/dist/assets/{useAsyncRetry-CDmpGaec.js → useAsyncRetry-CsHLaHBL.js} +1 -1
- package/dist/assets/{useLocalStorage-CAyV6Ga8.js → useLocalStorage-Cf7Ll0kD.js} +1 -1
- package/dist/assets/{useThemeProps-BT_wjfR7.js → useThemeProps-C7GjsUo9.js} +1 -1
- package/dist/assets/{util-D64hwso0.js → util-BcCxYadv.js} +1 -1
- package/dist/assets/{wait-container-XW4Jhu4r.js → wait-container-Da9bS4MH.js} +1 -1
- package/dist/assets/{without-wallet-BasvtIaA.js → without-wallet-C1RpuGzp.js} +1 -1
- package/dist/assets/wrap-locale-xftzzPT-.js +1 -0
- package/dist/assets/{xml-C_dKn8b3.js → xml-B3UH2gda.js} +1 -1
- package/dist/assets/{yaml-BUcCDLGx.js → yaml-z0fSM7T1.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/ArrowDropDown-Cm-Ihf0X.js +0 -1
- package/dist/assets/api-DSxoqzJR.js +0 -1
- package/dist/assets/cloneDeep-Dt4wqcIj.js +0 -1
- package/dist/assets/emotion-cache.browser.esm-D3p6zzp2.js +0 -1
- package/dist/assets/engine-PI4c2H--.js +0 -1
- package/dist/assets/getValidReactChildren-COj4IOg4.js +0 -1
- package/dist/assets/index-CNkhBuLJ.js +0 -1
- package/dist/assets/omit-BmEXjsUv.js +0 -1
- package/dist/assets/schema-BeTx8rxj.js +0 -1
- package/dist/assets/sdk-D4uiEFbJ.js +0 -1
- package/dist/assets/toUpper-DLp0iOYu.js +0 -1
- package/dist/assets/wrap-locale--ZpyxCeq.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{V as T,f as k,aw as m,j as l,fG as M,o as e,k as L,K as P}from"./index-
|
|
1
|
+
import{V as T,f as k,aw as m,j as l,fG as M,o as e,k as L,K as P}from"./index-BAG4sFIa.js";import{B as F}from"./base-chart-CwZKJ_pP.js";import{x as E}from"./index-DRYJ0xIl.js";function R({title:h="",cpus:b=[],currentLoad:r=0,history:c=[],empty:g=null,onHover:v=()=>{},hoverIndex:$=null}){const{t:x,locale:d}=T(),t=k(),o=`${h||x("common.cpu")} (${Math.floor(r||0)}%)`,f=100,a=80,p=y=>`${y}%`,w=[{max:a,color:m(t.palette.primary.main,t.palette.mode==="dark"?.15:.08)},{min:a,max:100,color:m(t.palette.warning.main,t.palette.mode==="dark"?.18:.12)},{min:100,color:m(t.palette.error.main,t.palette.mode==="dark"?.25:.18)}],i={silent:!0,symbol:["none","none"],data:[{yAxis:100,lineStyle:{color:t.palette.error.main,type:"dashed",width:1.5},label:{formatter:`${p(100)}`,position:"insideEndTop",color:t.palette.text.secondary,padding:[2,4],borderRadius:2}},{yAxis:a,lineStyle:{color:t.palette.warning.light,type:"dashed",width:1.5},label:{formatter:`${p(a)}`,position:"insideEndTop",color:t.palette.text.secondary,padding:[2,4],borderRadius:2}}]},s=l.jsx("span",{children:`${x("system.cores")}: ${b?.length||0}`}),u=y=>M(Number(y),"HH:mm",d);return l.jsx(F,{title:o,total:f,history:c,valueFn:p,xAxisFormat:u,visualMapPieces:w,markLineData:i,extraInfo:s,empty:g,onHover:v,hoverIndex:$})}R.propTypes={title:e.string,cpus:e.array,currentLoad:e.number,history:e.array,empty:e.node,onHover:e.func,hoverIndex:e.number};function D({instanceCount:h=null,title:b="",total:r=null,used:c=null,history:g=[],empty:v=null,onHover:$=()=>{},hoverIndex:x=null}){const{t:d,locale:t}=T(),o=k(),f=!!r,a=r-c,p=f?`(${L(c)}, ${Math.floor(c/r*100)}%)`:"",w=`${b||d("common.memory")} ${p}`,i=Math.ceil(r*.8),s=n=>E(n,{short:!0,iec:!0}),u=[];h&&u.push({title:d("system.instances"),metric:h}),f&&u.push({title:d("system.free"),metric:s(a)});const y=[{max:i,color:m(o.palette.primary.main,o.palette.mode==="dark"?.15:.08)},{min:i,max:r,color:m(o.palette.warning.main,o.palette.mode==="dark"?.18:.12)},{min:r,color:m(o.palette.error.main,o.palette.mode==="dark"?.25:.18)}],I={silent:!0,symbol:["none","none"],data:[{yAxis:r,lineStyle:{color:o.palette.error.main,type:"dashed",width:1.5},label:{formatter:`${s(r)}`,position:"insideEndTop",color:o.palette.text.secondary,padding:[2,4],borderRadius:2}},{yAxis:i,lineStyle:{color:o.palette.warning.light,type:"dashed",width:1.5},label:{formatter:`${s(i)}`,position:"insideEndTop",color:o.palette.text.secondary,padding:[2,4],borderRadius:2}}]},A=l.jsx(l.Fragment,{children:u.map((n,j)=>l.jsxs(P,{sx:{marginLeft:j===0?0:1,display:"inline-flex"},children:[n.title,": ",n.metric]},n.title))}),H=n=>M(Number(n),"HH:mm",t);return l.jsx(F,{title:w,total:r,history:g,valueFn:s,xAxisFormat:H,visualMapPieces:y,markLineData:I,extraInfo:A,empty:v,onHover:$,hoverIndex:x})}D.propTypes={title:e.string,instanceCount:e.number,total:e.number,used:e.number,history:e.array,empty:e.node,onHover:e.func,hoverIndex:e.number};export{R as C,D as M};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,K as n,dr as o,L as _,r as u,s as f,b3 as g,bf as y,aE as b,o as i}from"./index-
|
|
1
|
+
import{j as t,K as n,dr as o,L as _,r as u,s as f,b3 as g,bf as y,aE as b,o as i}from"./index-BAG4sFIa.js";import{C as c}from"./CardContent-lfT7ngTs.js";function j({icon:e=void 0,value:a,name:s,url:m="",animated:r=!1,LinkComponent:h=_,loading:p=!1}){const x=()=>y.isValidElement(e)?e:t.jsx(n,{component:b,icon:e,alt:typeof s=="string"?s:"",sx:{fontSize:30}}),l=t.jsxs(c,{className:"metric__content",children:[e&&t.jsx(n,{className:"metric__icon",children:x()}),t.jsx(n,{className:"metric__title",children:s}),t.jsx(n,{className:"metric__value",children:u.isValidElement(a)?t.jsx(n,{className:`metric__number ${r?"metric__number--animated":""}`,children:a}):t.jsx(n,{className:`metric__number ${r?"metric__number--animated":""}`,dangerouslySetInnerHTML:{__html:a}})})]});return p?t.jsx(d,{variant:"outlined",children:t.jsxs(c,{className:"metric__content",children:[e&&t.jsx(n,{className:"metric__icon",children:t.jsx(o,{variant:"circular",width:40,height:40})}),t.jsx(o,{className:"metric__title",variant:"rounded",width:120,height:20,sx:{mb:1}}),t.jsx(o,{className:`metric__number ${r?"metric__number--animated":""}`,variant:"rounded",width:100,height:"32px"})]})}):t.jsx(d,{variant:"outlined",children:m?t.jsx(h,{href:m,sx:{textDecoration:"none",color:"inherit"},children:l}):l})}j.propTypes={icon:i.oneOfType([i.string,i.element]),value:i.oneOfType([i.string,i.element]).isRequired,name:i.oneOfType([i.string,i.element]).isRequired,url:i.string,animated:i.bool,LinkComponent:i.elementType,loading:i.bool};const d=f(g)`
|
|
2
2
|
height: 100%;
|
|
3
3
|
transition:
|
|
4
4
|
box-shadow 0.2s ease-in-out,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{dz as e,h5 as r}from"./index-BAG4sFIa.js";const a=e(r);export{a as r};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,o as q,V as T,bo as J,e as ee,j as e,W as f,K as s,Q as h,v as te,aE as p,h2 as oe,d2 as ne,P as se,g as ae,i as L,cp as re,T as y,G as O,aI as S,y as le,aS as D,bg as E,l as ie,s as ce}from"./index-BeQc3UkQ.js";import{H as de}from"./HelpOutline-DV_Sx2ni.js";import{f as P}from"./index-BojVbZw0.js";import{v as me}from"./index-6nMPypbs.js";import{u as ue}from"./blocklet-DI09kb3z.js";import{u as pe}from"./team-B5ZkAUsr.js";import{V as he}from"./status-B5KZ8DJC.js";import{M as xe}from"./metric-CYgfR-6x.js";import{a as ge}from"./spaces-CfDVuFGr.js";import"./url-evaluation-CnA0uWcs.js";import"./index-CNkhBuLJ.js";import"./ErrorOutline-B8rqfUz9.js";import"./omit-BmEXjsUv.js";import"./CardContent-DYbZwS2P.js";import"./api-DSxoqzJR.js";const fe={width:24,height:24,body:'<path fill="currentColor" d="M12 14.975q-.2 0-.375-.062T11.3 14.7l-4.6-4.6q-.275-.275-.275-.7t.275-.7q.275-.275.7-.275t.7.275l3.9 3.9l3.9-3.9q.275-.275.7-.275t.7.275q.275.275.275.7t-.275.7l-4.6 4.6q-.15.15-.325.213t-.375.062Z"/>'},ve={width:24,height:24,body:'<path fill="currentColor" d="m12 10.8l-3.9 3.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.6-4.6q.3-.3.7-.3t.7.3l4.6 4.6q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275L12 10.8Z"/>'},ke={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 17a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2zm12 0a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zM9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zM6 15v-1a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v1m-6-6v3"/>'},je={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 7a4 4 0 1 0 8 0a4 4 0 1 0-8 0M3 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2m1-17.87a4 4 0 0 1 0 7.75M21 21v-2a4 4 0 0 0-3-3.85"/>'},be={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M7 12h3v4H7z"/><path d="M10 6H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1h-6"/><path d="M10 4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1zm4 12h2m-2-4h4"/></g>'},we={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M19.5 7A9 9 0 0 0 12 3a8.991 8.991 0 0 0-7.484 4"/><path d="M11.5 3a16.989 16.989 0 0 0-1.826 4M12.5 3a16.989 16.989 0 0 1 1.828 4M19.5 17a9 9 0 0 1-7.5 4a8.991 8.991 0 0 1-7.484-4"/><path d="M11.5 21a16.989 16.989 0 0 1-1.826-4m2.826 4a16.989 16.989 0 0 0 1.828-4M2 10l1 4l1.5-4L6 14l1-4m10 0l1 4l1.5-4l1.5 4l1-4M9.5 10l1 4l1.5-4l1.5 4l1-4"/></g>'},K={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0"/><path d="M12 7v5l3 3"/></g>'},Se={width:24,height:24,body:'<path fill="currentColor" d="M12 14q-.825 0-1.413-.588T10 12q0-.825.588-1.413T12 10q.825 0 1.413.588T14 12q0 .825-.588 1.413T12 14Zm0 7q-3.475 0-6.025-2.288T3.05 13H5.1q.35 2.6 2.313 4.3T12 19q2.925 0 4.963-2.038T19 12q0-2.925-2.038-4.963T12 5q-1.725 0-3.225.8T6.25 8H9v2H3V4h2v2.35q1.275-1.6 3.113-2.475T12 3q1.875 0 3.513.713t2.85 1.924q1.212 1.213 1.925 2.85T21 12q0 1.875-.713 3.513t-1.924 2.85q-1.213 1.212-2.85 1.925T12 21Z"/>'},v={oneSecond:1,oneMin:1*60,oneHour:1*60*60,oneDay:24*60*60},ye=(t,a)=>{const[n,r]=u.useState(0),i=g=>g>=v.oneDay?v.oneDay:g>=v.oneHour?v.oneHour:g>=v.oneMin?v.oneMin:v.oneSecond,[m,x]=u.useState(i(t/1e3));return u.useEffect(()=>{const g=setInterval(()=>{r(n+m);const A=i(t/1e3+n+m);m!==A&&x(A)},m*1e3);return()=>clearInterval(g)},[m,n]),u.useEffect(()=>{r(0),x(i(t/1e3))},[t]),a(t+n*1e3)};q.number.isRequired,q.func;const Te={arcblock:"ArcBlock",ethereum:"Ethereum"};function Q({source:t,migrated:a}){const{t:n}=T();return t?t.startsWith("managed")?e.jsxs(s,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx(y,{children:t}),e.jsx(h,{title:n(a?"blocklet.skSourceMigratedTip":"blocklet.skSourceManagedTip"),children:e.jsx(D,{sx:{fontSize:16,color:a?"text.secondary":"warning.main"}})})]}):e.jsx(y,{children:t}):null}Q.propTypes={source:q.string.isRequired,migrated:q.bool.isRequired};const Ae=t=>{const{t:a}=T();let n=0,r=0;t&&(n=t.length,r=t.filter(m=>L.isBlockletRunning(m)).length);let i=n;return r&&(i+=`<small>${a("common.running")} ${r}</small>`),i},Me=(t,a)=>{const{t:n}=T();return a.length?e.jsxs(s,{component:"small",children:[n("router.domainAlias.custom")," ",a.length]}):e.jsxs(s,{component:"small",sx:{display:"flex",alignItems:"center",gap:.5,color:a.length?"text.primary":"warning.main"},children:[n("router.domainAlias.noCustom"),e.jsx(h,{title:n("router.domainAlias.noCustomTip"),children:e.jsx(D,{sx:{fontSize:16}})})]})},Ie=(t,a,n)=>{const r=t===S.BACKUPS.STATUS.PROGRESS&&E().diff(a,"hours")>=S.BACKUPS.TIMEOUT_HOURS,i=t===S.BACKUPS.STATUS.PROGRESS&&!r,m=t===S.BACKUPS.STATUS.SUCCEEDED&&!r;return r?e.jsx(h,{title:n("storage.spaces.backup.timeout"),children:e.jsx(s,{sx:{width:8,height:8,borderRadius:"100%",bgcolor:"error.main"}})}):i?e.jsx(h,{title:n("storage.spaces.backup.pending"),children:e.jsx(s,{sx:{width:8,height:8,borderRadius:"100%",bgcolor:"warning.main"}})}):m?e.jsx(h,{title:n("storage.spaces.backup.succeeded"),children:e.jsx(s,{sx:{width:8,height:8,borderRadius:"100%",bgcolor:"success.main"}})}):null},qe=(t,a)=>{const{t:n,locale:r}=T(),i=a?.createdAt;return t&&i?e.jsxs(s,{sx:{display:"flex",alignItems:"baseline",gap:.5,color:E(i).add(1,"day").isAfter(E())?"text.primary":"warning.main"},children:[P(i,r==="tw"?"zh":r),e.jsx(h,{title:n("storage.spaces.backup.lastBackupTip",{time:P(i,r==="tw"?"zh":r)}),children:e.jsx(D,{sx:{fontSize:16}})})]}):e.jsxs(s,{sx:{display:"flex",alignItems:"baseline",gap:.5,color:"warning.main",fontSize:30},children:[n("storage.spaces.backup.noBackup"),e.jsx(h,{title:n("storage.spaces.backup.noBackupTip"),children:e.jsx(D,{sx:{fontSize:16}})})]})},k={fontSize:30,color:"text.primary"};function Ve(){const{t,locale:a}=T(),{info:n,inService:r,api:i}=J(),{teamDid:m}=pe(),[x,g]=u.useState(!1),{did:A,blocklet:o}=ue(),c=ee(()=>i.getBlockletBaseInfo({input:{teamDid:m}})),{appDid:B,appPid:C,migratedFrom:j=[]}=o,R=o.environments.find(l=>l.key==="BLOCKLET_APP_CHAIN_TYPE")?.value,M=l=>typeof l!="number"||Number.isNaN(l)?"0":l>=1e4?new Intl.NumberFormat(a,{notation:"compact",compactDisplay:"short"}).format(l):new Intl.NumberFormat(a).format(l),$=[B?{name:t("blocklet.appId"),value:e.jsx(f,{did:B,showQrcode:!0})}:null,C&&B!==C?{name:e.jsxs(s,{children:[t("blocklet.appPid"),e.jsx(h,{title:t("blocklet.whyNeedAppPid"),style:{cursor:"help",fontSize:16},children:e.jsx(de,{sx:{verticalAlign:"middle",mt:"-2px",ml:"2px"}})})]}),value:e.jsx(f,{did:C,showQrcode:!0})}:null,j?.length>1?{name:t("blocklet.alsoKnownAs"),value:e.jsxs("div",{children:[(x?j.slice(1):j.slice(1,2)).map(l=>e.jsx(f,{did:l.appDid,showQrcode:!0})),j.length>2&&e.jsx(te,{sx:{pl:0,"&:hover":{backgroundColor:"transparent"}},endIcon:x?e.jsx(p,{icon:ve}):e.jsx(p,{icon:fe}),onClick:()=>g(!x),children:t(x?"common.collapseAll":"blocklet.router.showAllDIDs")})]})}:null,oe(o)?{name:"NFT",value:e.jsx(f,{external:!0,href:ne(o?.controller?.chainHost,o?.controller?.nftId,"asset"),did:o?.controller?.nftId,showQrcode:!0})}:null,{name:t("common.owner"),value:o.settings?.owner?e.jsx(f,{did:o.settings.owner.did,showQrcode:!0}):"-"},o.vaults?.length?{name:t("blocklet.config.vault.name"),value:e.jsxs(s,{sx:{display:"flex",alignItems:"center",gap:.5,"& > span":{width:"auto"}},children:[e.jsx(f,{did:o.vaults[o.vaults.length-1].did,showQrcode:!0}),e.jsx(he,{vaults:o.vaults,appPid:o.appPid})]})}:null,{name:t("blocklet.installedAt"),value:o.installedAt?e.jsx(se,{value:o.installedAt,type:"all",locale:a}):"-"},{name:t("blocklet.config.walletType.name"),value:Te[R||"arcblock"]||R},o.externalSkSource?{name:t("blocklet.skSource"),value:e.jsx(Q,{source:o.externalSkSource,migrated:j.length>0})}:null].filter(Boolean);r&&$.push({name:t("common.serverDid"),value:e.jsx(f,{did:n.did,showQrcode:!0})},{name:t("common.serverVersion"),value:e.jsx(ae,{children:n.version})});const V=l=>l.map(d=>e.jsx(me,{style:{display:"flex",alignItems:"flex-start"},valueComponent:"div",nameWidth:150,name:d.name,nameFormatter:()=>d.name,children:d.value},d.name)),W=Ae(o.children),z=o?.startedAt?new Date(o.startedAt).getTime():0,N=z&&L.isBlockletRunning(o)?Date.now()-z:0,F=ye(N,l=>ie(l,{compact:!0,verbose:!0,locale:a==="tw"?"zh":a})),I=u.useMemo(()=>o?.site?.domainAliases||[],[o?.site?.domainAliases]),G=u.useMemo(()=>I.filter(l=>re.isCustomDomain(l.value)),[I]),Z=Me(I,G),H=u.useMemo(()=>c?.value?.passport||{},[c?.value?.passport]),U=u.useMemo(()=>c?.value?.user||{},[c?.value?.user]),_=u.useMemo(()=>ge(o?.environments),[o?.environments]),X=qe(_,c?.value?.backup),b=(l,d)=>`${S.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${l}/${d}`,w=l=>{const d=n?.routing?.adminPath;return le(d,`/blocklets/${A}/${l}`)},Y=[{name:t("common.blocklets"),value:W,icon:e.jsx(s,{component:p,icon:ke,sx:k}),url:r?b("overview","components"):w("components")},{loading:c?.loading,name:t("common.members"),value:`${M(U?.users||0)}<small>${t("common.active")} ${M(U?.approvedUsers)}</small>`,icon:e.jsx(s,{component:p,icon:je,sx:k}),url:r?b("did-connect","members"):w("members")},{loading:c?.loading,name:t("team.member.passports"),value:`${M(H?.passports||0)}<small>${t("common.active")} ${M(H?.activePassports)}</small>`,icon:e.jsx(s,{component:p,icon:be,sx:k}),url:r?b("did-connect","passports"):w("passports")},{loading:c?.loading,name:t("common.domains"),value:e.jsxs(s,{sx:{display:"flex",alignItems:"baseline"},children:[I.length,Z]}),icon:e.jsx(s,{component:p,icon:we,sx:k}),url:r?b("website","domains"):w("domains")},{name:t("common.uptime"),value:N?F:e.jsx(s,{sx:{fontSize:28,color:"text.secondary"},children:`${t("common.waiting")}...`}),icon:e.jsx(s,{component:p,icon:K,sx:k})},o.createdAt&&+new Date(o.createdAt)!=+new Date(0)?{name:t("common.created"),value:P(new Date(o.createdAt).getTime(),a==="tw"?"zh":a),icon:e.jsx(s,{component:p,icon:K,sx:k})}:null,{loading:c?.loading,name:e.jsxs(s,{sx:{display:"flex",alignItems:"baseline",gap:.5},children:[t("storage.spaces.backup.lastBackup"),c?.value?.backup&&_&&Ie(c?.value?.backup?.status,c?.value?.backup?.createdAt,t)]}),value:X,icon:e.jsx(s,{component:p,icon:Se,sx:k}),url:r?b("did-spaces","backups"):w("didSpaces")}].filter(Boolean);return e.jsxs(De,{component:"div",children:[e.jsxs(s,{className:"section",children:[e.jsx(y,{className:"section__header",color:"textPrimary",children:t("common.overview")}),e.jsx(O,{className:"page-metrics",container:!0,spacing:{xs:1,md:2},children:Y.map(({icon:l,...d})=>e.jsx(O,{sx:{small:{ml:.5}},size:{xl:1.5,lg:3,md:4,sm:12,xs:12},children:e.jsx(xe,{...d})},d.name))})]}),e.jsxs(s,{className:"section",children:[e.jsx(y,{className:"section__header",color:"textPrimary",children:t("common.basicInfo")}),e.jsx(s,{className:"basicInfo",children:V($)})]})]})}const De=ce(y)`
|
|
1
|
+
import{r as u,o as q,V as T,bo as J,e as ee,j as e,W as f,K as s,Q as h,v as te,aE as p,h2 as oe,d2 as ne,P as se,g as ae,i as L,cp as re,T as y,G as O,aI as S,y as le,aS as D,bg as E,l as ie,s as ce}from"./index-BAG4sFIa.js";import{H as de}from"./HelpOutline-Hg9WCxla.js";import{f as P}from"./index-BojVbZw0.js";import{v as me}from"./index-DLuK9hbg.js";import{u as ue}from"./blocklet-CVUABgLB.js";import{u as pe}from"./team-CBKW6kF_.js";import{V as he}from"./status-BBz_v2_j.js";import{M as xe}from"./metric-CKUrN2-J.js";import{a as ge}from"./spaces-DiNJcyfo.js";import"./url-evaluation-2HGMyS33.js";import"./index-ZOh2DQ-e.js";import"./ErrorOutline-DrIyPB6z.js";import"./omit-AtPtqkZn.js";import"./CardContent-lfT7ngTs.js";import"./api-C_DWrTOw.js";const fe={width:24,height:24,body:'<path fill="currentColor" d="M12 14.975q-.2 0-.375-.062T11.3 14.7l-4.6-4.6q-.275-.275-.275-.7t.275-.7q.275-.275.7-.275t.7.275l3.9 3.9l3.9-3.9q.275-.275.7-.275t.7.275q.275.275.275.7t-.275.7l-4.6 4.6q-.15.15-.325.213t-.375.062Z"/>'},ve={width:24,height:24,body:'<path fill="currentColor" d="m12 10.8l-3.9 3.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.6-4.6q.3-.3.7-.3t.7.3l4.6 4.6q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275L12 10.8Z"/>'},ke={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 17a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2zm12 0a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zM9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zM6 15v-1a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v1m-6-6v3"/>'},je={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 7a4 4 0 1 0 8 0a4 4 0 1 0-8 0M3 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2m1-17.87a4 4 0 0 1 0 7.75M21 21v-2a4 4 0 0 0-3-3.85"/>'},be={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M7 12h3v4H7z"/><path d="M10 6H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1h-6"/><path d="M10 4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1zm4 12h2m-2-4h4"/></g>'},we={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M19.5 7A9 9 0 0 0 12 3a8.991 8.991 0 0 0-7.484 4"/><path d="M11.5 3a16.989 16.989 0 0 0-1.826 4M12.5 3a16.989 16.989 0 0 1 1.828 4M19.5 17a9 9 0 0 1-7.5 4a8.991 8.991 0 0 1-7.484-4"/><path d="M11.5 21a16.989 16.989 0 0 1-1.826-4m2.826 4a16.989 16.989 0 0 0 1.828-4M2 10l1 4l1.5-4L6 14l1-4m10 0l1 4l1.5-4l1.5 4l1-4M9.5 10l1 4l1.5-4l1.5 4l1-4"/></g>'},K={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0"/><path d="M12 7v5l3 3"/></g>'},Se={width:24,height:24,body:'<path fill="currentColor" d="M12 14q-.825 0-1.413-.588T10 12q0-.825.588-1.413T12 10q.825 0 1.413.588T14 12q0 .825-.588 1.413T12 14Zm0 7q-3.475 0-6.025-2.288T3.05 13H5.1q.35 2.6 2.313 4.3T12 19q2.925 0 4.963-2.038T19 12q0-2.925-2.038-4.963T12 5q-1.725 0-3.225.8T6.25 8H9v2H3V4h2v2.35q1.275-1.6 3.113-2.475T12 3q1.875 0 3.513.713t2.85 1.924q1.212 1.213 1.925 2.85T21 12q0 1.875-.713 3.513t-1.924 2.85q-1.213 1.212-2.85 1.925T12 21Z"/>'},v={oneSecond:1,oneMin:1*60,oneHour:1*60*60,oneDay:24*60*60},ye=(t,a)=>{const[n,r]=u.useState(0),i=g=>g>=v.oneDay?v.oneDay:g>=v.oneHour?v.oneHour:g>=v.oneMin?v.oneMin:v.oneSecond,[m,x]=u.useState(i(t/1e3));return u.useEffect(()=>{const g=setInterval(()=>{r(n+m);const A=i(t/1e3+n+m);m!==A&&x(A)},m*1e3);return()=>clearInterval(g)},[m,n]),u.useEffect(()=>{r(0),x(i(t/1e3))},[t]),a(t+n*1e3)};q.number.isRequired,q.func;const Te={arcblock:"ArcBlock",ethereum:"Ethereum"};function Q({source:t,migrated:a}){const{t:n}=T();return t?t.startsWith("managed")?e.jsxs(s,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx(y,{children:t}),e.jsx(h,{title:n(a?"blocklet.skSourceMigratedTip":"blocklet.skSourceManagedTip"),children:e.jsx(D,{sx:{fontSize:16,color:a?"text.secondary":"warning.main"}})})]}):e.jsx(y,{children:t}):null}Q.propTypes={source:q.string.isRequired,migrated:q.bool.isRequired};const Ae=t=>{const{t:a}=T();let n=0,r=0;t&&(n=t.length,r=t.filter(m=>L.isBlockletRunning(m)).length);let i=n;return r&&(i+=`<small>${a("common.running")} ${r}</small>`),i},Me=(t,a)=>{const{t:n}=T();return a.length?e.jsxs(s,{component:"small",children:[n("router.domainAlias.custom")," ",a.length]}):e.jsxs(s,{component:"small",sx:{display:"flex",alignItems:"center",gap:.5,color:a.length?"text.primary":"warning.main"},children:[n("router.domainAlias.noCustom"),e.jsx(h,{title:n("router.domainAlias.noCustomTip"),children:e.jsx(D,{sx:{fontSize:16}})})]})},Ie=(t,a,n)=>{const r=t===S.BACKUPS.STATUS.PROGRESS&&E().diff(a,"hours")>=S.BACKUPS.TIMEOUT_HOURS,i=t===S.BACKUPS.STATUS.PROGRESS&&!r,m=t===S.BACKUPS.STATUS.SUCCEEDED&&!r;return r?e.jsx(h,{title:n("storage.spaces.backup.timeout"),children:e.jsx(s,{sx:{width:8,height:8,borderRadius:"100%",bgcolor:"error.main"}})}):i?e.jsx(h,{title:n("storage.spaces.backup.pending"),children:e.jsx(s,{sx:{width:8,height:8,borderRadius:"100%",bgcolor:"warning.main"}})}):m?e.jsx(h,{title:n("storage.spaces.backup.succeeded"),children:e.jsx(s,{sx:{width:8,height:8,borderRadius:"100%",bgcolor:"success.main"}})}):null},qe=(t,a)=>{const{t:n,locale:r}=T(),i=a?.createdAt;return t&&i?e.jsxs(s,{sx:{display:"flex",alignItems:"baseline",gap:.5,color:E(i).add(1,"day").isAfter(E())?"text.primary":"warning.main"},children:[P(i,r==="tw"?"zh":r),e.jsx(h,{title:n("storage.spaces.backup.lastBackupTip",{time:P(i,r==="tw"?"zh":r)}),children:e.jsx(D,{sx:{fontSize:16}})})]}):e.jsxs(s,{sx:{display:"flex",alignItems:"baseline",gap:.5,color:"warning.main",fontSize:30},children:[n("storage.spaces.backup.noBackup"),e.jsx(h,{title:n("storage.spaces.backup.noBackupTip"),children:e.jsx(D,{sx:{fontSize:16}})})]})},k={fontSize:30,color:"text.primary"};function Ve(){const{t,locale:a}=T(),{info:n,inService:r,api:i}=J(),{teamDid:m}=pe(),[x,g]=u.useState(!1),{did:A,blocklet:o}=ue(),c=ee(()=>i.getBlockletBaseInfo({input:{teamDid:m}})),{appDid:B,appPid:C,migratedFrom:j=[]}=o,R=o.environments.find(l=>l.key==="BLOCKLET_APP_CHAIN_TYPE")?.value,M=l=>typeof l!="number"||Number.isNaN(l)?"0":l>=1e4?new Intl.NumberFormat(a,{notation:"compact",compactDisplay:"short"}).format(l):new Intl.NumberFormat(a).format(l),$=[B?{name:t("blocklet.appId"),value:e.jsx(f,{did:B,showQrcode:!0})}:null,C&&B!==C?{name:e.jsxs(s,{children:[t("blocklet.appPid"),e.jsx(h,{title:t("blocklet.whyNeedAppPid"),style:{cursor:"help",fontSize:16},children:e.jsx(de,{sx:{verticalAlign:"middle",mt:"-2px",ml:"2px"}})})]}),value:e.jsx(f,{did:C,showQrcode:!0})}:null,j?.length>1?{name:t("blocklet.alsoKnownAs"),value:e.jsxs("div",{children:[(x?j.slice(1):j.slice(1,2)).map(l=>e.jsx(f,{did:l.appDid,showQrcode:!0})),j.length>2&&e.jsx(te,{sx:{pl:0,"&:hover":{backgroundColor:"transparent"}},endIcon:x?e.jsx(p,{icon:ve}):e.jsx(p,{icon:fe}),onClick:()=>g(!x),children:t(x?"common.collapseAll":"blocklet.router.showAllDIDs")})]})}:null,oe(o)?{name:"NFT",value:e.jsx(f,{external:!0,href:ne(o?.controller?.chainHost,o?.controller?.nftId,"asset"),did:o?.controller?.nftId,showQrcode:!0})}:null,{name:t("common.owner"),value:o.settings?.owner?e.jsx(f,{did:o.settings.owner.did,showQrcode:!0}):"-"},o.vaults?.length?{name:t("blocklet.config.vault.name"),value:e.jsxs(s,{sx:{display:"flex",alignItems:"center",gap:.5,"& > span":{width:"auto"}},children:[e.jsx(f,{did:o.vaults[o.vaults.length-1].did,showQrcode:!0}),e.jsx(he,{vaults:o.vaults,appPid:o.appPid})]})}:null,{name:t("blocklet.installedAt"),value:o.installedAt?e.jsx(se,{value:o.installedAt,type:"all",locale:a}):"-"},{name:t("blocklet.config.walletType.name"),value:Te[R||"arcblock"]||R},o.externalSkSource?{name:t("blocklet.skSource"),value:e.jsx(Q,{source:o.externalSkSource,migrated:j.length>0})}:null].filter(Boolean);r&&$.push({name:t("common.serverDid"),value:e.jsx(f,{did:n.did,showQrcode:!0})},{name:t("common.serverVersion"),value:e.jsx(ae,{children:n.version})});const V=l=>l.map(d=>e.jsx(me,{style:{display:"flex",alignItems:"flex-start"},valueComponent:"div",nameWidth:150,name:d.name,nameFormatter:()=>d.name,children:d.value},d.name)),W=Ae(o.children),z=o?.startedAt?new Date(o.startedAt).getTime():0,N=z&&L.isBlockletRunning(o)?Date.now()-z:0,F=ye(N,l=>ie(l,{compact:!0,verbose:!0,locale:a==="tw"?"zh":a})),I=u.useMemo(()=>o?.site?.domainAliases||[],[o?.site?.domainAliases]),G=u.useMemo(()=>I.filter(l=>re.isCustomDomain(l.value)),[I]),Z=Me(I,G),H=u.useMemo(()=>c?.value?.passport||{},[c?.value?.passport]),U=u.useMemo(()=>c?.value?.user||{},[c?.value?.user]),_=u.useMemo(()=>ge(o?.environments),[o?.environments]),X=qe(_,c?.value?.backup),b=(l,d)=>`${S.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${l}/${d}`,w=l=>{const d=n?.routing?.adminPath;return le(d,`/blocklets/${A}/${l}`)},Y=[{name:t("common.blocklets"),value:W,icon:e.jsx(s,{component:p,icon:ke,sx:k}),url:r?b("overview","components"):w("components")},{loading:c?.loading,name:t("common.members"),value:`${M(U?.users||0)}<small>${t("common.active")} ${M(U?.approvedUsers)}</small>`,icon:e.jsx(s,{component:p,icon:je,sx:k}),url:r?b("did-connect","members"):w("members")},{loading:c?.loading,name:t("team.member.passports"),value:`${M(H?.passports||0)}<small>${t("common.active")} ${M(H?.activePassports)}</small>`,icon:e.jsx(s,{component:p,icon:be,sx:k}),url:r?b("did-connect","passports"):w("passports")},{loading:c?.loading,name:t("common.domains"),value:e.jsxs(s,{sx:{display:"flex",alignItems:"baseline"},children:[I.length,Z]}),icon:e.jsx(s,{component:p,icon:we,sx:k}),url:r?b("website","domains"):w("domains")},{name:t("common.uptime"),value:N?F:e.jsx(s,{sx:{fontSize:28,color:"text.secondary"},children:`${t("common.waiting")}...`}),icon:e.jsx(s,{component:p,icon:K,sx:k})},o.createdAt&&+new Date(o.createdAt)!=+new Date(0)?{name:t("common.created"),value:P(new Date(o.createdAt).getTime(),a==="tw"?"zh":a),icon:e.jsx(s,{component:p,icon:K,sx:k})}:null,{loading:c?.loading,name:e.jsxs(s,{sx:{display:"flex",alignItems:"baseline",gap:.5},children:[t("storage.spaces.backup.lastBackup"),c?.value?.backup&&_&&Ie(c?.value?.backup?.status,c?.value?.backup?.createdAt,t)]}),value:X,icon:e.jsx(s,{component:p,icon:Se,sx:k}),url:r?b("did-spaces","backups"):w("didSpaces")}].filter(Boolean);return e.jsxs(De,{component:"div",children:[e.jsxs(s,{className:"section",children:[e.jsx(y,{className:"section__header",color:"textPrimary",children:t("common.overview")}),e.jsx(O,{className:"page-metrics",container:!0,spacing:{xs:1,md:2},children:Y.map(({icon:l,...d})=>e.jsx(O,{sx:{small:{ml:.5}},size:{xl:1.5,lg:3,md:4,sm:12,xs:12},children:e.jsx(xe,{...d})},d.name))})]}),e.jsxs(s,{className:"section",children:[e.jsx(y,{className:"section__header",color:"textPrimary",children:t("common.basicInfo")}),e.jsx(s,{className:"basicInfo",children:V($)})]})]})}const De=ce(y)`
|
|
2
2
|
.section {
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as m,j as l,o as n}from"./index-
|
|
1
|
+
import{n as m,j as l,o as n}from"./index-BAG4sFIa.js";function c({permission:i="",role:t="",component:e=null,children:o=null}){const{session:r}=m();let s=!0;const u=[].concat(i).filter(Boolean),f=[].concat(t).filter(Boolean);if(u.length){const p=r.user&&r.user.permissions||[];s=u.some(a=>p.includes(a))}return s&&f.length&&(s=f.includes(r.user.role)),typeof e=="function"?e(s):typeof o=="function"?o(s):s&&(e||o)||null}function g(i,t,e){return function(r){return l.jsx(c,{permission:t,role:e,children:s=>l.jsx(i,{...r,hasPermission:s})})}}c.propTypes={permission:n.oneOfType([n.string,n.arrayOf(n.string)]),role:n.oneOfType([n.string,n.arrayOf(n.string)]),component:n.oneOfType([n.func,n.node]),children:n.oneOfType([n.func,n.node])};export{c as P,g as w};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
import{r as Xe}from"./omit-BmEXjsUv.js";import{r as He}from"./index-CODhl4Ao.js";import{r as $,c0 as me,c1 as he,c2 as be,ck as Ke,cg as K,c4 as ie,b9 as V,b7 as Qe,j as m,c5 as xe,dK as We,b_ as Q,bZ as Ze,aG as Je,s as ne,K as M,bf as ye,a5 as de,bB as Ye,dM as et,bz as tt,dL as rt,X as at,o as A,p as it,t as nt,C as ot,f6 as st,bj as lt,hC as ft,V as ut,dJ as we,y as pe,bK as ct,aW as Ae,T as dt,bo as pt,aI as gt}from"./index-BeQc3UkQ.js";import{D as mt}from"./Done-B-lhh5Lr.js";import{e as ht}from"./edit.svg-BRRfsd3L.js";import{A as bt}from"./ArrowDropDown-Cm-Ihf0X.js";import{B as xt}from"./ButtonGroup-BBkFKNOE.js";import{c as vt}from"./index-aU6di1GB.js";import{I as yt}from"./iframe-DJmf2DN1.js";const Ne=$.createContext({});function wt(t){return he("MuiAccordion",t)}const Y=me("MuiAccordion",["root","heading","rounded","expanded","disabled","gutters","region"]),At=t=>{const{classes:a,square:o,expanded:n,disabled:h,disableGutters:e}=t;return xe({root:["root",!o&&"rounded",n&&"expanded",h&&"disabled",!e&&"gutters"],heading:["heading"],region:["region"]},wt,a)},St=V(We,{name:"MuiAccordion",slot:"Root",overridesResolver:(t,a)=>{const{ownerState:o}=t;return[{[`& .${Y.region}`]:a.region},a.root,!o.square&&a.rounded,!o.disableGutters&&a.gutters]}})(Q(({theme:t})=>{const a={duration:t.transitions.duration.shortest};return{position:"relative",transition:t.transitions.create(["margin"],a),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(t.vars||t).palette.divider,transition:t.transitions.create(["opacity","background-color"],a)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${Y.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${Y.disabled}`]:{backgroundColor:(t.vars||t).palette.action.disabledBackground}}}),Q(({theme:t})=>({variants:[{props:a=>!a.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(t.vars||t).shape.borderRadius,borderBottomRightRadius:(t.vars||t).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:a=>!a.disableGutters,style:{[`&.${Y.expanded}`]:{margin:"16px 0"}}}]}))),kt=V("h3",{name:"MuiAccordion",slot:"Heading"})({all:"unset"}),Tt=$.forwardRef(function(a,o){const n=be({props:a,name:"MuiAccordion"}),{children:h,className:e,defaultExpanded:f=!1,disabled:u=!1,disableGutters:w=!1,expanded:S,onChange:k,square:r=!1,slots:d={},slotProps:l={},TransitionComponent:T,TransitionProps:R,...y}=n,[C,i]=Ke({controlled:S,default:f,name:"Accordion",state:"expanded"}),s=$.useCallback(v=>{i(!C),k&&k(v,!C)},[C,k,i]),[g,...c]=$.Children.toArray(h),p=$.useMemo(()=>({expanded:C,disabled:u,disableGutters:w,toggle:s}),[C,u,w,s]),b={...n,square:r,disabled:u,disableGutters:w,expanded:C},I=At(b),q={transition:T,...d},z={transition:R,...l},E={slots:q,slotProps:z},[O,G]=K("root",{elementType:St,externalForwardedProps:{...E,...y},className:ie(I.root,e),shouldForwardComponentProp:!0,ownerState:b,ref:o,additionalProps:{square:r}}),[D,F]=K("heading",{elementType:kt,externalForwardedProps:E,className:I.heading,ownerState:b}),[x,_]=K("transition",{elementType:Qe,externalForwardedProps:E,ownerState:b});return m.jsxs(O,{...G,children:[m.jsx(D,{...F,children:m.jsx(Ne.Provider,{value:p,children:g})}),m.jsx(x,{in:C,timeout:"auto",..._,children:m.jsx("div",{"aria-labelledby":g.props.id,id:g.props["aria-controls"],role:"region",className:I.region,children:c})})]})});function Ct(t){return he("MuiAccordionDetails",t)}me("MuiAccordionDetails",["root"]);const Rt=t=>{const{classes:a}=t;return xe({root:["root"]},Ct,a)},It=V("div",{name:"MuiAccordionDetails",slot:"Root"})(Q(({theme:t})=>({padding:t.spacing(1,2,2)}))),Pt=$.forwardRef(function(a,o){const n=be({props:a,name:"MuiAccordionDetails"}),{className:h,...e}=n,f=n,u=Rt(f);return m.jsx(It,{className:ie(u.root,h),ref:o,ownerState:f,...e})});function _t(t){return he("MuiAccordionSummary",t)}const H=me("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),Lt=t=>{const{classes:a,expanded:o,disabled:n,disableGutters:h}=t;return xe({root:["root",o&&"expanded",n&&"disabled",!h&&"gutters"],focusVisible:["focusVisible"],content:["content",o&&"expanded",!h&&"contentGutters"],expandIconWrapper:["expandIconWrapper",o&&"expanded"]},_t,a)},Et=V(Ze,{name:"MuiAccordionSummary",slot:"Root"})(Q(({theme:t})=>{const a={duration:t.transitions.duration.shortest};return{display:"flex",width:"100%",minHeight:48,padding:t.spacing(0,2),transition:t.transitions.create(["min-height","background-color"],a),[`&.${H.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${H.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`&:hover:not(.${H.disabled})`]:{cursor:"pointer"},variants:[{props:o=>!o.disableGutters,style:{[`&.${H.expanded}`]:{minHeight:64}}}]}})),jt=V("span",{name:"MuiAccordionSummary",slot:"Content"})(Q(({theme:t})=>({display:"flex",textAlign:"start",flexGrow:1,margin:"12px 0",variants:[{props:a=>!a.disableGutters,style:{transition:t.transitions.create(["margin"],{duration:t.transitions.duration.shortest}),[`&.${H.expanded}`]:{margin:"20px 0"}}}]}))),$t=V("span",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper"})(Q(({theme:t})=>({display:"flex",color:(t.vars||t).palette.action.active,transform:"rotate(0deg)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shortest}),[`&.${H.expanded}`]:{transform:"rotate(180deg)"}}))),qt=$.forwardRef(function(a,o){const n=be({props:a,name:"MuiAccordionSummary"}),{children:h,className:e,expandIcon:f,focusVisibleClassName:u,onClick:w,slots:S,slotProps:k,...r}=n,{disabled:d=!1,disableGutters:l,expanded:T,toggle:R}=$.useContext(Ne),y=z=>{R&&R(z),w&&w(z)},C={...n,expanded:T,disabled:d,disableGutters:l},i=Lt(C),s={slots:S,slotProps:k},[g,c]=K("root",{ref:o,shouldForwardComponentProp:!0,className:ie(i.root,e),elementType:Et,externalForwardedProps:{...s,...r},ownerState:C,additionalProps:{focusRipple:!1,disableRipple:!0,disabled:d,"aria-expanded":T,focusVisibleClassName:ie(i.focusVisible,u)},getSlotProps:z=>({...z,onClick:E=>{z.onClick?.(E),y(E)}})}),[p,b]=K("content",{className:i.content,elementType:jt,externalForwardedProps:s,ownerState:C}),[I,q]=K("expandIconWrapper",{className:i.expandIconWrapper,elementType:$t,externalForwardedProps:s,ownerState:C});return m.jsxs(g,{...c,children:[m.jsx(p,{...b,children:h}),f&&m.jsx(I,{...q,children:f})]})}),zt=Je(m.jsx("path",{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"}));var ee={exports:{}},U={},te={exports:{}},j={},re={exports:{}},X={},Se;function Fe(){if(Se)return X;Se=1;function t(){var e={};return e["align-content"]=!1,e["align-items"]=!1,e["align-self"]=!1,e["alignment-adjust"]=!1,e["alignment-baseline"]=!1,e.all=!1,e["anchor-point"]=!1,e.animation=!1,e["animation-delay"]=!1,e["animation-direction"]=!1,e["animation-duration"]=!1,e["animation-fill-mode"]=!1,e["animation-iteration-count"]=!1,e["animation-name"]=!1,e["animation-play-state"]=!1,e["animation-timing-function"]=!1,e.azimuth=!1,e["backface-visibility"]=!1,e.background=!0,e["background-attachment"]=!0,e["background-clip"]=!0,e["background-color"]=!0,e["background-image"]=!0,e["background-origin"]=!0,e["background-position"]=!0,e["background-repeat"]=!0,e["background-size"]=!0,e["baseline-shift"]=!1,e.binding=!1,e.bleed=!1,e["bookmark-label"]=!1,e["bookmark-level"]=!1,e["bookmark-state"]=!1,e.border=!0,e["border-bottom"]=!0,e["border-bottom-color"]=!0,e["border-bottom-left-radius"]=!0,e["border-bottom-right-radius"]=!0,e["border-bottom-style"]=!0,e["border-bottom-width"]=!0,e["border-collapse"]=!0,e["border-color"]=!0,e["border-image"]=!0,e["border-image-outset"]=!0,e["border-image-repeat"]=!0,e["border-image-slice"]=!0,e["border-image-source"]=!0,e["border-image-width"]=!0,e["border-left"]=!0,e["border-left-color"]=!0,e["border-left-style"]=!0,e["border-left-width"]=!0,e["border-radius"]=!0,e["border-right"]=!0,e["border-right-color"]=!0,e["border-right-style"]=!0,e["border-right-width"]=!0,e["border-spacing"]=!0,e["border-style"]=!0,e["border-top"]=!0,e["border-top-color"]=!0,e["border-top-left-radius"]=!0,e["border-top-right-radius"]=!0,e["border-top-style"]=!0,e["border-top-width"]=!0,e["border-width"]=!0,e.bottom=!1,e["box-decoration-break"]=!0,e["box-shadow"]=!0,e["box-sizing"]=!0,e["box-snap"]=!0,e["box-suppress"]=!0,e["break-after"]=!0,e["break-before"]=!0,e["break-inside"]=!0,e["caption-side"]=!1,e.chains=!1,e.clear=!0,e.clip=!1,e["clip-path"]=!1,e["clip-rule"]=!1,e.color=!0,e["color-interpolation-filters"]=!0,e["column-count"]=!1,e["column-fill"]=!1,e["column-gap"]=!1,e["column-rule"]=!1,e["column-rule-color"]=!1,e["column-rule-style"]=!1,e["column-rule-width"]=!1,e["column-span"]=!1,e["column-width"]=!1,e.columns=!1,e.contain=!1,e.content=!1,e["counter-increment"]=!1,e["counter-reset"]=!1,e["counter-set"]=!1,e.crop=!1,e.cue=!1,e["cue-after"]=!1,e["cue-before"]=!1,e.cursor=!1,e.direction=!1,e.display=!0,e["display-inside"]=!0,e["display-list"]=!0,e["display-outside"]=!0,e["dominant-baseline"]=!1,e.elevation=!1,e["empty-cells"]=!1,e.filter=!1,e.flex=!1,e["flex-basis"]=!1,e["flex-direction"]=!1,e["flex-flow"]=!1,e["flex-grow"]=!1,e["flex-shrink"]=!1,e["flex-wrap"]=!1,e.float=!1,e["float-offset"]=!1,e["flood-color"]=!1,e["flood-opacity"]=!1,e["flow-from"]=!1,e["flow-into"]=!1,e.font=!0,e["font-family"]=!0,e["font-feature-settings"]=!0,e["font-kerning"]=!0,e["font-language-override"]=!0,e["font-size"]=!0,e["font-size-adjust"]=!0,e["font-stretch"]=!0,e["font-style"]=!0,e["font-synthesis"]=!0,e["font-variant"]=!0,e["font-variant-alternates"]=!0,e["font-variant-caps"]=!0,e["font-variant-east-asian"]=!0,e["font-variant-ligatures"]=!0,e["font-variant-numeric"]=!0,e["font-variant-position"]=!0,e["font-weight"]=!0,e.grid=!1,e["grid-area"]=!1,e["grid-auto-columns"]=!1,e["grid-auto-flow"]=!1,e["grid-auto-rows"]=!1,e["grid-column"]=!1,e["grid-column-end"]=!1,e["grid-column-start"]=!1,e["grid-row"]=!1,e["grid-row-end"]=!1,e["grid-row-start"]=!1,e["grid-template"]=!1,e["grid-template-areas"]=!1,e["grid-template-columns"]=!1,e["grid-template-rows"]=!1,e["hanging-punctuation"]=!1,e.height=!0,e.hyphens=!1,e.icon=!1,e["image-orientation"]=!1,e["image-resolution"]=!1,e["ime-mode"]=!1,e["initial-letters"]=!1,e["inline-box-align"]=!1,e["justify-content"]=!1,e["justify-items"]=!1,e["justify-self"]=!1,e.left=!1,e["letter-spacing"]=!0,e["lighting-color"]=!0,e["line-box-contain"]=!1,e["line-break"]=!1,e["line-grid"]=!1,e["line-height"]=!1,e["line-snap"]=!1,e["line-stacking"]=!1,e["line-stacking-ruby"]=!1,e["line-stacking-shift"]=!1,e["line-stacking-strategy"]=!1,e["list-style"]=!0,e["list-style-image"]=!0,e["list-style-position"]=!0,e["list-style-type"]=!0,e.margin=!0,e["margin-bottom"]=!0,e["margin-left"]=!0,e["margin-right"]=!0,e["margin-top"]=!0,e["marker-offset"]=!1,e["marker-side"]=!1,e.marks=!1,e.mask=!1,e["mask-box"]=!1,e["mask-box-outset"]=!1,e["mask-box-repeat"]=!1,e["mask-box-slice"]=!1,e["mask-box-source"]=!1,e["mask-box-width"]=!1,e["mask-clip"]=!1,e["mask-image"]=!1,e["mask-origin"]=!1,e["mask-position"]=!1,e["mask-repeat"]=!1,e["mask-size"]=!1,e["mask-source-type"]=!1,e["mask-type"]=!1,e["max-height"]=!0,e["max-lines"]=!1,e["max-width"]=!0,e["min-height"]=!0,e["min-width"]=!0,e["move-to"]=!1,e["nav-down"]=!1,e["nav-index"]=!1,e["nav-left"]=!1,e["nav-right"]=!1,e["nav-up"]=!1,e["object-fit"]=!1,e["object-position"]=!1,e.opacity=!1,e.order=!1,e.orphans=!1,e.outline=!1,e["outline-color"]=!1,e["outline-offset"]=!1,e["outline-style"]=!1,e["outline-width"]=!1,e.overflow=!1,e["overflow-wrap"]=!1,e["overflow-x"]=!1,e["overflow-y"]=!1,e.padding=!0,e["padding-bottom"]=!0,e["padding-left"]=!0,e["padding-right"]=!0,e["padding-top"]=!0,e.page=!1,e["page-break-after"]=!1,e["page-break-before"]=!1,e["page-break-inside"]=!1,e["page-policy"]=!1,e.pause=!1,e["pause-after"]=!1,e["pause-before"]=!1,e.perspective=!1,e["perspective-origin"]=!1,e.pitch=!1,e["pitch-range"]=!1,e["play-during"]=!1,e.position=!1,e["presentation-level"]=!1,e.quotes=!1,e["region-fragment"]=!1,e.resize=!1,e.rest=!1,e["rest-after"]=!1,e["rest-before"]=!1,e.richness=!1,e.right=!1,e.rotation=!1,e["rotation-point"]=!1,e["ruby-align"]=!1,e["ruby-merge"]=!1,e["ruby-position"]=!1,e["shape-image-threshold"]=!1,e["shape-outside"]=!1,e["shape-margin"]=!1,e.size=!1,e.speak=!1,e["speak-as"]=!1,e["speak-header"]=!1,e["speak-numeral"]=!1,e["speak-punctuation"]=!1,e["speech-rate"]=!1,e.stress=!1,e["string-set"]=!1,e["tab-size"]=!1,e["table-layout"]=!1,e["text-align"]=!0,e["text-align-last"]=!0,e["text-combine-upright"]=!0,e["text-decoration"]=!0,e["text-decoration-color"]=!0,e["text-decoration-line"]=!0,e["text-decoration-skip"]=!0,e["text-decoration-style"]=!0,e["text-emphasis"]=!0,e["text-emphasis-color"]=!0,e["text-emphasis-position"]=!0,e["text-emphasis-style"]=!0,e["text-height"]=!0,e["text-indent"]=!0,e["text-justify"]=!0,e["text-orientation"]=!0,e["text-overflow"]=!0,e["text-shadow"]=!0,e["text-space-collapse"]=!0,e["text-transform"]=!0,e["text-underline-position"]=!0,e["text-wrap"]=!0,e.top=!1,e.transform=!1,e["transform-origin"]=!1,e["transform-style"]=!1,e.transition=!1,e["transition-delay"]=!1,e["transition-duration"]=!1,e["transition-property"]=!1,e["transition-timing-function"]=!1,e["unicode-bidi"]=!1,e["vertical-align"]=!1,e.visibility=!1,e["voice-balance"]=!1,e["voice-duration"]=!1,e["voice-family"]=!1,e["voice-pitch"]=!1,e["voice-range"]=!1,e["voice-rate"]=!1,e["voice-stress"]=!1,e["voice-volume"]=!1,e.volume=!1,e["white-space"]=!1,e.widows=!1,e.width=!0,e["will-change"]=!1,e["word-break"]=!0,e["word-spacing"]=!0,e["word-wrap"]=!0,e["wrap-flow"]=!1,e["wrap-through"]=!1,e["writing-mode"]=!1,e["z-index"]=!1,e}function a(e,f,u){}function o(e,f,u){}var n=/javascript\s*\:/img;function h(e,f){return n.test(f)?"":f}return X.whiteList=t(),X.getDefaultWhiteList=t,X.onAttr=a,X.onIgnoreAttr=o,X.safeAttrValue=h,X}var oe,ke;function Me(){return ke||(ke=1,oe={indexOf:function(t,a){var o,n;if(Array.prototype.indexOf)return t.indexOf(a);for(o=0,n=t.length;o<n;o++)if(t[o]===a)return o;return-1},forEach:function(t,a,o){var n,h;if(Array.prototype.forEach)return t.forEach(a,o);for(n=0,h=t.length;n<h;n++)a.call(o,t[n],n,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(t){return String.prototype.trimRight?t.trimRight():t.replace(/(\s*$)/g,"")}}),oe}var se,Te;function Ot(){if(Te)return se;Te=1;var t=Me();function a(o,n){o=t.trimRight(o),o[o.length-1]!==";"&&(o+=";");var h=o.length,e=!1,f=0,u=0,w="";function S(){if(!e){var d=t.trim(o.slice(f,u)),l=d.indexOf(":");if(l!==-1){var T=t.trim(d.slice(0,l)),R=t.trim(d.slice(l+1));if(T){var y=n(f,w.length,T,R,d);y&&(w+=y+"; ")}}}f=u+1}for(;u<h;u++){var k=o[u];if(k==="/"&&o[u+1]==="*"){var r=o.indexOf("*/",u+2);if(r===-1)break;u=r+1,f=u+1,e=!1}else k==="("?e=!0:k===")"?e=!1:k===";"?e||S():k===`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DkuvHf4y.js","./index-BAG4sFIa.js","./index-DGkT7afN.css","./url-join-Cb-sLZRl.js","./index-C9MSpDFK.js","./_createAggregator-Lfp1Ke0G.js","./depsEqual-DGV4LqLy.js","./index-BlTw-6BM.js","./index-DRYJ0xIl.js","./toUpper-cyn7A90V.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as Xe}from"./omit-AtPtqkZn.js";import{r as He}from"./index-C9MSpDFK.js";import{r as $,c0 as me,c1 as he,c2 as be,ck as Ke,cg as K,c4 as ie,b9 as V,b7 as Qe,j as m,c5 as xe,dK as We,b_ as Q,bZ as Ze,aG as Je,s as ne,K as M,bf as ye,a5 as de,bB as Ye,dM as et,bz as tt,dL as rt,X as at,o as A,p as it,t as nt,C as ot,f6 as st,bj as lt,hC as ft,V as ut,dJ as we,y as pe,bK as ct,aW as Ae,T as dt,bo as pt,aI as gt}from"./index-BAG4sFIa.js";import{D as mt}from"./Done-pmipBbat.js";import{e as ht}from"./edit.svg-dSshOuok.js";import{A as bt}from"./ArrowDropDown-D2C1Adnj.js";import{B as xt}from"./ButtonGroup-BHahRCP8.js";import{c as vt}from"./index-BlTw-6BM.js";import{I as yt}from"./iframe-LFRAd_0t.js";const Ne=$.createContext({});function wt(t){return he("MuiAccordion",t)}const Y=me("MuiAccordion",["root","heading","rounded","expanded","disabled","gutters","region"]),At=t=>{const{classes:a,square:o,expanded:n,disabled:h,disableGutters:e}=t;return xe({root:["root",!o&&"rounded",n&&"expanded",h&&"disabled",!e&&"gutters"],heading:["heading"],region:["region"]},wt,a)},St=V(We,{name:"MuiAccordion",slot:"Root",overridesResolver:(t,a)=>{const{ownerState:o}=t;return[{[`& .${Y.region}`]:a.region},a.root,!o.square&&a.rounded,!o.disableGutters&&a.gutters]}})(Q(({theme:t})=>{const a={duration:t.transitions.duration.shortest};return{position:"relative",transition:t.transitions.create(["margin"],a),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(t.vars||t).palette.divider,transition:t.transitions.create(["opacity","background-color"],a)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${Y.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${Y.disabled}`]:{backgroundColor:(t.vars||t).palette.action.disabledBackground}}}),Q(({theme:t})=>({variants:[{props:a=>!a.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(t.vars||t).shape.borderRadius,borderBottomRightRadius:(t.vars||t).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:a=>!a.disableGutters,style:{[`&.${Y.expanded}`]:{margin:"16px 0"}}}]}))),kt=V("h3",{name:"MuiAccordion",slot:"Heading"})({all:"unset"}),Tt=$.forwardRef(function(a,o){const n=be({props:a,name:"MuiAccordion"}),{children:h,className:e,defaultExpanded:f=!1,disabled:u=!1,disableGutters:w=!1,expanded:S,onChange:k,square:r=!1,slots:d={},slotProps:l={},TransitionComponent:T,TransitionProps:R,...y}=n,[C,i]=Ke({controlled:S,default:f,name:"Accordion",state:"expanded"}),s=$.useCallback(v=>{i(!C),k&&k(v,!C)},[C,k,i]),[g,...c]=$.Children.toArray(h),p=$.useMemo(()=>({expanded:C,disabled:u,disableGutters:w,toggle:s}),[C,u,w,s]),b={...n,square:r,disabled:u,disableGutters:w,expanded:C},I=At(b),q={transition:T,...d},z={transition:R,...l},E={slots:q,slotProps:z},[O,G]=K("root",{elementType:St,externalForwardedProps:{...E,...y},className:ie(I.root,e),shouldForwardComponentProp:!0,ownerState:b,ref:o,additionalProps:{square:r}}),[D,F]=K("heading",{elementType:kt,externalForwardedProps:E,className:I.heading,ownerState:b}),[x,_]=K("transition",{elementType:Qe,externalForwardedProps:E,ownerState:b});return m.jsxs(O,{...G,children:[m.jsx(D,{...F,children:m.jsx(Ne.Provider,{value:p,children:g})}),m.jsx(x,{in:C,timeout:"auto",..._,children:m.jsx("div",{"aria-labelledby":g.props.id,id:g.props["aria-controls"],role:"region",className:I.region,children:c})})]})});function Ct(t){return he("MuiAccordionDetails",t)}me("MuiAccordionDetails",["root"]);const Rt=t=>{const{classes:a}=t;return xe({root:["root"]},Ct,a)},It=V("div",{name:"MuiAccordionDetails",slot:"Root"})(Q(({theme:t})=>({padding:t.spacing(1,2,2)}))),Pt=$.forwardRef(function(a,o){const n=be({props:a,name:"MuiAccordionDetails"}),{className:h,...e}=n,f=n,u=Rt(f);return m.jsx(It,{className:ie(u.root,h),ref:o,ownerState:f,...e})});function _t(t){return he("MuiAccordionSummary",t)}const H=me("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),Lt=t=>{const{classes:a,expanded:o,disabled:n,disableGutters:h}=t;return xe({root:["root",o&&"expanded",n&&"disabled",!h&&"gutters"],focusVisible:["focusVisible"],content:["content",o&&"expanded",!h&&"contentGutters"],expandIconWrapper:["expandIconWrapper",o&&"expanded"]},_t,a)},Et=V(Ze,{name:"MuiAccordionSummary",slot:"Root"})(Q(({theme:t})=>{const a={duration:t.transitions.duration.shortest};return{display:"flex",width:"100%",minHeight:48,padding:t.spacing(0,2),transition:t.transitions.create(["min-height","background-color"],a),[`&.${H.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${H.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`&:hover:not(.${H.disabled})`]:{cursor:"pointer"},variants:[{props:o=>!o.disableGutters,style:{[`&.${H.expanded}`]:{minHeight:64}}}]}})),jt=V("span",{name:"MuiAccordionSummary",slot:"Content"})(Q(({theme:t})=>({display:"flex",textAlign:"start",flexGrow:1,margin:"12px 0",variants:[{props:a=>!a.disableGutters,style:{transition:t.transitions.create(["margin"],{duration:t.transitions.duration.shortest}),[`&.${H.expanded}`]:{margin:"20px 0"}}}]}))),$t=V("span",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper"})(Q(({theme:t})=>({display:"flex",color:(t.vars||t).palette.action.active,transform:"rotate(0deg)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shortest}),[`&.${H.expanded}`]:{transform:"rotate(180deg)"}}))),qt=$.forwardRef(function(a,o){const n=be({props:a,name:"MuiAccordionSummary"}),{children:h,className:e,expandIcon:f,focusVisibleClassName:u,onClick:w,slots:S,slotProps:k,...r}=n,{disabled:d=!1,disableGutters:l,expanded:T,toggle:R}=$.useContext(Ne),y=z=>{R&&R(z),w&&w(z)},C={...n,expanded:T,disabled:d,disableGutters:l},i=Lt(C),s={slots:S,slotProps:k},[g,c]=K("root",{ref:o,shouldForwardComponentProp:!0,className:ie(i.root,e),elementType:Et,externalForwardedProps:{...s,...r},ownerState:C,additionalProps:{focusRipple:!1,disableRipple:!0,disabled:d,"aria-expanded":T,focusVisibleClassName:ie(i.focusVisible,u)},getSlotProps:z=>({...z,onClick:E=>{z.onClick?.(E),y(E)}})}),[p,b]=K("content",{className:i.content,elementType:jt,externalForwardedProps:s,ownerState:C}),[I,q]=K("expandIconWrapper",{className:i.expandIconWrapper,elementType:$t,externalForwardedProps:s,ownerState:C});return m.jsxs(g,{...c,children:[m.jsx(p,{...b,children:h}),f&&m.jsx(I,{...q,children:f})]})}),zt=Je(m.jsx("path",{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"}));var ee={exports:{}},U={},te={exports:{}},j={},re={exports:{}},X={},Se;function Fe(){if(Se)return X;Se=1;function t(){var e={};return e["align-content"]=!1,e["align-items"]=!1,e["align-self"]=!1,e["alignment-adjust"]=!1,e["alignment-baseline"]=!1,e.all=!1,e["anchor-point"]=!1,e.animation=!1,e["animation-delay"]=!1,e["animation-direction"]=!1,e["animation-duration"]=!1,e["animation-fill-mode"]=!1,e["animation-iteration-count"]=!1,e["animation-name"]=!1,e["animation-play-state"]=!1,e["animation-timing-function"]=!1,e.azimuth=!1,e["backface-visibility"]=!1,e.background=!0,e["background-attachment"]=!0,e["background-clip"]=!0,e["background-color"]=!0,e["background-image"]=!0,e["background-origin"]=!0,e["background-position"]=!0,e["background-repeat"]=!0,e["background-size"]=!0,e["baseline-shift"]=!1,e.binding=!1,e.bleed=!1,e["bookmark-label"]=!1,e["bookmark-level"]=!1,e["bookmark-state"]=!1,e.border=!0,e["border-bottom"]=!0,e["border-bottom-color"]=!0,e["border-bottom-left-radius"]=!0,e["border-bottom-right-radius"]=!0,e["border-bottom-style"]=!0,e["border-bottom-width"]=!0,e["border-collapse"]=!0,e["border-color"]=!0,e["border-image"]=!0,e["border-image-outset"]=!0,e["border-image-repeat"]=!0,e["border-image-slice"]=!0,e["border-image-source"]=!0,e["border-image-width"]=!0,e["border-left"]=!0,e["border-left-color"]=!0,e["border-left-style"]=!0,e["border-left-width"]=!0,e["border-radius"]=!0,e["border-right"]=!0,e["border-right-color"]=!0,e["border-right-style"]=!0,e["border-right-width"]=!0,e["border-spacing"]=!0,e["border-style"]=!0,e["border-top"]=!0,e["border-top-color"]=!0,e["border-top-left-radius"]=!0,e["border-top-right-radius"]=!0,e["border-top-style"]=!0,e["border-top-width"]=!0,e["border-width"]=!0,e.bottom=!1,e["box-decoration-break"]=!0,e["box-shadow"]=!0,e["box-sizing"]=!0,e["box-snap"]=!0,e["box-suppress"]=!0,e["break-after"]=!0,e["break-before"]=!0,e["break-inside"]=!0,e["caption-side"]=!1,e.chains=!1,e.clear=!0,e.clip=!1,e["clip-path"]=!1,e["clip-rule"]=!1,e.color=!0,e["color-interpolation-filters"]=!0,e["column-count"]=!1,e["column-fill"]=!1,e["column-gap"]=!1,e["column-rule"]=!1,e["column-rule-color"]=!1,e["column-rule-style"]=!1,e["column-rule-width"]=!1,e["column-span"]=!1,e["column-width"]=!1,e.columns=!1,e.contain=!1,e.content=!1,e["counter-increment"]=!1,e["counter-reset"]=!1,e["counter-set"]=!1,e.crop=!1,e.cue=!1,e["cue-after"]=!1,e["cue-before"]=!1,e.cursor=!1,e.direction=!1,e.display=!0,e["display-inside"]=!0,e["display-list"]=!0,e["display-outside"]=!0,e["dominant-baseline"]=!1,e.elevation=!1,e["empty-cells"]=!1,e.filter=!1,e.flex=!1,e["flex-basis"]=!1,e["flex-direction"]=!1,e["flex-flow"]=!1,e["flex-grow"]=!1,e["flex-shrink"]=!1,e["flex-wrap"]=!1,e.float=!1,e["float-offset"]=!1,e["flood-color"]=!1,e["flood-opacity"]=!1,e["flow-from"]=!1,e["flow-into"]=!1,e.font=!0,e["font-family"]=!0,e["font-feature-settings"]=!0,e["font-kerning"]=!0,e["font-language-override"]=!0,e["font-size"]=!0,e["font-size-adjust"]=!0,e["font-stretch"]=!0,e["font-style"]=!0,e["font-synthesis"]=!0,e["font-variant"]=!0,e["font-variant-alternates"]=!0,e["font-variant-caps"]=!0,e["font-variant-east-asian"]=!0,e["font-variant-ligatures"]=!0,e["font-variant-numeric"]=!0,e["font-variant-position"]=!0,e["font-weight"]=!0,e.grid=!1,e["grid-area"]=!1,e["grid-auto-columns"]=!1,e["grid-auto-flow"]=!1,e["grid-auto-rows"]=!1,e["grid-column"]=!1,e["grid-column-end"]=!1,e["grid-column-start"]=!1,e["grid-row"]=!1,e["grid-row-end"]=!1,e["grid-row-start"]=!1,e["grid-template"]=!1,e["grid-template-areas"]=!1,e["grid-template-columns"]=!1,e["grid-template-rows"]=!1,e["hanging-punctuation"]=!1,e.height=!0,e.hyphens=!1,e.icon=!1,e["image-orientation"]=!1,e["image-resolution"]=!1,e["ime-mode"]=!1,e["initial-letters"]=!1,e["inline-box-align"]=!1,e["justify-content"]=!1,e["justify-items"]=!1,e["justify-self"]=!1,e.left=!1,e["letter-spacing"]=!0,e["lighting-color"]=!0,e["line-box-contain"]=!1,e["line-break"]=!1,e["line-grid"]=!1,e["line-height"]=!1,e["line-snap"]=!1,e["line-stacking"]=!1,e["line-stacking-ruby"]=!1,e["line-stacking-shift"]=!1,e["line-stacking-strategy"]=!1,e["list-style"]=!0,e["list-style-image"]=!0,e["list-style-position"]=!0,e["list-style-type"]=!0,e.margin=!0,e["margin-bottom"]=!0,e["margin-left"]=!0,e["margin-right"]=!0,e["margin-top"]=!0,e["marker-offset"]=!1,e["marker-side"]=!1,e.marks=!1,e.mask=!1,e["mask-box"]=!1,e["mask-box-outset"]=!1,e["mask-box-repeat"]=!1,e["mask-box-slice"]=!1,e["mask-box-source"]=!1,e["mask-box-width"]=!1,e["mask-clip"]=!1,e["mask-image"]=!1,e["mask-origin"]=!1,e["mask-position"]=!1,e["mask-repeat"]=!1,e["mask-size"]=!1,e["mask-source-type"]=!1,e["mask-type"]=!1,e["max-height"]=!0,e["max-lines"]=!1,e["max-width"]=!0,e["min-height"]=!0,e["min-width"]=!0,e["move-to"]=!1,e["nav-down"]=!1,e["nav-index"]=!1,e["nav-left"]=!1,e["nav-right"]=!1,e["nav-up"]=!1,e["object-fit"]=!1,e["object-position"]=!1,e.opacity=!1,e.order=!1,e.orphans=!1,e.outline=!1,e["outline-color"]=!1,e["outline-offset"]=!1,e["outline-style"]=!1,e["outline-width"]=!1,e.overflow=!1,e["overflow-wrap"]=!1,e["overflow-x"]=!1,e["overflow-y"]=!1,e.padding=!0,e["padding-bottom"]=!0,e["padding-left"]=!0,e["padding-right"]=!0,e["padding-top"]=!0,e.page=!1,e["page-break-after"]=!1,e["page-break-before"]=!1,e["page-break-inside"]=!1,e["page-policy"]=!1,e.pause=!1,e["pause-after"]=!1,e["pause-before"]=!1,e.perspective=!1,e["perspective-origin"]=!1,e.pitch=!1,e["pitch-range"]=!1,e["play-during"]=!1,e.position=!1,e["presentation-level"]=!1,e.quotes=!1,e["region-fragment"]=!1,e.resize=!1,e.rest=!1,e["rest-after"]=!1,e["rest-before"]=!1,e.richness=!1,e.right=!1,e.rotation=!1,e["rotation-point"]=!1,e["ruby-align"]=!1,e["ruby-merge"]=!1,e["ruby-position"]=!1,e["shape-image-threshold"]=!1,e["shape-outside"]=!1,e["shape-margin"]=!1,e.size=!1,e.speak=!1,e["speak-as"]=!1,e["speak-header"]=!1,e["speak-numeral"]=!1,e["speak-punctuation"]=!1,e["speech-rate"]=!1,e.stress=!1,e["string-set"]=!1,e["tab-size"]=!1,e["table-layout"]=!1,e["text-align"]=!0,e["text-align-last"]=!0,e["text-combine-upright"]=!0,e["text-decoration"]=!0,e["text-decoration-color"]=!0,e["text-decoration-line"]=!0,e["text-decoration-skip"]=!0,e["text-decoration-style"]=!0,e["text-emphasis"]=!0,e["text-emphasis-color"]=!0,e["text-emphasis-position"]=!0,e["text-emphasis-style"]=!0,e["text-height"]=!0,e["text-indent"]=!0,e["text-justify"]=!0,e["text-orientation"]=!0,e["text-overflow"]=!0,e["text-shadow"]=!0,e["text-space-collapse"]=!0,e["text-transform"]=!0,e["text-underline-position"]=!0,e["text-wrap"]=!0,e.top=!1,e.transform=!1,e["transform-origin"]=!1,e["transform-style"]=!1,e.transition=!1,e["transition-delay"]=!1,e["transition-duration"]=!1,e["transition-property"]=!1,e["transition-timing-function"]=!1,e["unicode-bidi"]=!1,e["vertical-align"]=!1,e.visibility=!1,e["voice-balance"]=!1,e["voice-duration"]=!1,e["voice-family"]=!1,e["voice-pitch"]=!1,e["voice-range"]=!1,e["voice-rate"]=!1,e["voice-stress"]=!1,e["voice-volume"]=!1,e.volume=!1,e["white-space"]=!1,e.widows=!1,e.width=!0,e["will-change"]=!1,e["word-break"]=!0,e["word-spacing"]=!0,e["word-wrap"]=!0,e["wrap-flow"]=!1,e["wrap-through"]=!1,e["writing-mode"]=!1,e["z-index"]=!1,e}function a(e,f,u){}function o(e,f,u){}var n=/javascript\s*\:/img;function h(e,f){return n.test(f)?"":f}return X.whiteList=t(),X.getDefaultWhiteList=t,X.onAttr=a,X.onIgnoreAttr=o,X.safeAttrValue=h,X}var oe,ke;function Me(){return ke||(ke=1,oe={indexOf:function(t,a){var o,n;if(Array.prototype.indexOf)return t.indexOf(a);for(o=0,n=t.length;o<n;o++)if(t[o]===a)return o;return-1},forEach:function(t,a,o){var n,h;if(Array.prototype.forEach)return t.forEach(a,o);for(n=0,h=t.length;n<h;n++)a.call(o,t[n],n,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(t){return String.prototype.trimRight?t.trimRight():t.replace(/(\s*$)/g,"")}}),oe}var se,Te;function Ot(){if(Te)return se;Te=1;var t=Me();function a(o,n){o=t.trimRight(o),o[o.length-1]!==";"&&(o+=";");var h=o.length,e=!1,f=0,u=0,w="";function S(){if(!e){var d=t.trim(o.slice(f,u)),l=d.indexOf(":");if(l!==-1){var T=t.trim(d.slice(0,l)),R=t.trim(d.slice(l+1));if(T){var y=n(f,w.length,T,R,d);y&&(w+=y+"; ")}}}f=u+1}for(;u<h;u++){var k=o[u];if(k==="/"&&o[u+1]==="*"){var r=o.indexOf("*/",u+2);if(r===-1)break;u=r+1,f=u+1,e=!1}else k==="("?e=!0:k===")"?e=!1:k===";"?e||S():k===`
|
|
3
3
|
`&&S()}return t.trim(w)}return se=a,se}var le,Ce;function Wt(){if(Ce)return le;Ce=1;var t=Fe(),a=Ot();Me();function o(e){return e==null}function n(e){var f={};for(var u in e)f[u]=e[u];return f}function h(e){e=n(e||{}),e.whiteList=e.whiteList||t.whiteList,e.onAttr=e.onAttr||t.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||t.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||t.safeAttrValue,this.options=e}return h.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var f=this,u=f.options,w=u.whiteList,S=u.onAttr,k=u.onIgnoreAttr,r=u.safeAttrValue,d=a(e,function(l,T,R,y,C){var i=w[R],s=!1;if(i===!0?s=i:typeof i=="function"?s=i(y):i instanceof RegExp&&(s=i.test(y)),s!==!0&&(s=!1),y=r(R,y),!!y){var g={position:T,sourcePosition:l,source:C,isWhite:s};if(s){var c=S(R,y,g);return o(c)?R+":"+y:c}else{var c=k(R,y,g);if(!o(c))return c}}});return d},le=h,le}var Re;function ge(){return Re||(Re=1,function(t,a){var o=Fe(),n=Wt();function h(f,u){var w=new n(u);return w.process(f)}a=t.exports=h,a.FilterCSS=n;for(var e in o)a[e]=o[e];typeof window<"u"&&(window.filterCSS=t.exports)}(re,re.exports)),re.exports}var fe,Ie;function ve(){return Ie||(Ie=1,fe={indexOf:function(t,a){var o,n;if(Array.prototype.indexOf)return t.indexOf(a);for(o=0,n=t.length;o<n;o++)if(t[o]===a)return o;return-1},forEach:function(t,a,o){var n,h;if(Array.prototype.forEach)return t.forEach(a,o);for(n=0,h=t.length;n<h;n++)a.call(o,t[n],n,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(t){var a=/\s|\n|\t/,o=a.exec(t);return o?o.index:-1}}),fe}var Pe;function De(){if(Pe)return j;Pe=1;var t=ge().FilterCSS,a=ge().getDefaultWhiteList,o=ve();function n(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var h=new t;function e(x,_,v){}function f(x,_,v){}function u(x,_,v){}function w(x,_,v){}function S(x){return x.replace(r,"<").replace(d,">")}function k(x,_,v,P){if(v=z(v),_==="href"||_==="src"){if(v=o.trim(v),v==="#")return"#";if(!(v.substr(0,7)==="http://"||v.substr(0,8)==="https://"||v.substr(0,7)==="mailto:"||v.substr(0,4)==="tel:"||v.substr(0,11)==="data:image/"||v.substr(0,6)==="ftp://"||v.substr(0,2)==="./"||v.substr(0,3)==="../"||v[0]==="#"||v[0]==="/"))return""}else if(_==="background"){if(i.lastIndex=0,i.test(v))return""}else if(_==="style"){if(s.lastIndex=0,s.test(v)||(g.lastIndex=0,g.test(v)&&(i.lastIndex=0,i.test(v))))return"";P!==!1&&(P=P||h,v=P.process(v))}return v=E(v),v}var r=/</g,d=/>/g,l=/"/g,T=/"/g,R=/&#([a-zA-Z0-9]*);?/gim,y=/:?/gim,C=/&newline;?/gim,i=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,s=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,g=/u\s*r\s*l\s*\(.*/gi;function c(x){return x.replace(l,""")}function p(x){return x.replace(T,'"')}function b(x){return x.replace(R,function(v,P){return P[0]==="x"||P[0]==="X"?String.fromCharCode(parseInt(P.substr(1),16)):String.fromCharCode(parseInt(P,10))})}function I(x){return x.replace(y,":").replace(C," ")}function q(x){for(var _="",v=0,P=x.length;v<P;v++)_+=x.charCodeAt(v)<32?" ":x.charAt(v);return o.trim(_)}function z(x){return x=p(x),x=b(x),x=I(x),x=q(x),x}function E(x){return x=c(x),x=S(x),x}function O(){return""}function G(x,_){typeof _!="function"&&(_=function(){});var v=!Array.isArray(x);function P(W){return v?!0:o.indexOf(x,W)!==-1}var N=[],L=!1;return{onIgnoreTag:function(W,Z,B){if(P(W))if(B.isClosing){var J="[/removed]",Ge=B.position+J.length;return N.push([L!==!1?L:B.position,Ge]),L=!1,J}else return L||(L=B.position),"[removed]";else return _(W,Z,B)},remove:function(W){var Z="",B=0;return o.forEach(N,function(J){Z+=W.slice(B,J[0]),B=J[1]}),Z+=W.slice(B),Z}}}function D(x){for(var _="",v=0;v<x.length;){var P=x.indexOf("<!--",v);if(P===-1){_+=x.slice(v);break}_+=x.slice(v,P);var N=x.indexOf("-->",P);if(N===-1)break;v=N+3}return _}function F(x){var _=x.split("");return _=_.filter(function(v){var P=v.charCodeAt(0);return P===127?!1:P<=31?P===10||P===13:!0}),_.join("")}return j.whiteList=n(),j.getDefaultWhiteList=n,j.onTag=e,j.onIgnoreTag=f,j.onTagAttr=u,j.onIgnoreTagAttr=w,j.safeAttrValue=k,j.escapeHtml=S,j.escapeQuote=c,j.unescapeQuote=p,j.escapeHtmlEntities=b,j.escapeDangerHtml5Entities=I,j.clearNonPrintableCharacter=q,j.friendlyAttrValue=z,j.escapeAttrValue=E,j.onIgnoreTagStripAll=O,j.StripTagBody=G,j.stripCommentTag=D,j.stripBlankChar=F,j.attributeWrapSign='"',j.cssFilter=h,j.getDefaultCSSWhiteList=a,j}var ae={},_e;function Ue(){if(_e)return ae;_e=1;var t=ve();function a(r){var d=t.spaceIndex(r),l;return d===-1?l=r.slice(1,-1):l=r.slice(1,d+1),l=t.trim(l).toLowerCase(),l.slice(0,1)==="/"&&(l=l.slice(1)),l.slice(-1)==="/"&&(l=l.slice(0,-1)),l}function o(r){return r.slice(0,2)==="</"}function n(r,d,l){var T="",R=0,y=!1,C=!1,i=0,s=r.length,g="",c="";e:for(i=0;i<s;i++){var p=r.charAt(i);if(y===!1){if(p==="<"){y=i;continue}}else if(C===!1){if(p==="<"){T+=l(r.slice(R,i)),y=i,R=i;continue}if(p===">"||i===s-1){T+=l(r.slice(R,y)),c=r.slice(y,i+1),g=a(c),T+=d(y,T.length,g,c,o(c)),R=i+1,y=!1;continue}if(p==='"'||p==="'")for(var b=1,I=r.charAt(i-b);I.trim()===""||I==="=";){if(I==="="){C=p;continue e}I=r.charAt(i-++b)}}else if(p===C){C=!1;continue}}return R<s&&(T+=l(r.substr(R))),T}var h=/[^a-zA-Z0-9\\_:.-]/gim;function e(r,d){var l=0,T=0,R=[],y=!1,C=r.length;function i(b,I){if(b=t.trim(b),b=b.replace(h,"").toLowerCase(),!(b.length<1)){var q=d(b,I||"");q&&R.push(q)}}for(var s=0;s<C;s++){var g=r.charAt(s),c,p;if(y===!1&&g==="="){y=r.slice(l,s),l=s+1,T=r.charAt(l)==='"'||r.charAt(l)==="'"?l:u(r,s+1);continue}if(y!==!1&&s===T){if(p=r.indexOf(g,s+1),p===-1)break;c=t.trim(r.slice(T+1,p)),i(y,c),y=!1,s=p,l=s+1;continue}if(/\s|\n|\t/.test(g))if(r=r.replace(/\s|\n|\t/g," "),y===!1)if(p=f(r,s),p===-1){c=t.trim(r.slice(l,s)),i(c),y=!1,l=s+1;continue}else{s=p-1;continue}else if(p=w(r,s-1),p===-1){c=t.trim(r.slice(l,s)),c=k(c),i(y,c),y=!1,l=s+1;continue}else continue}return l<r.length&&(y===!1?i(r.slice(l)):i(y,k(t.trim(r.slice(l))))),t.trim(R.join(" "))}function f(r,d){for(;d<r.length;d++){var l=r[d];if(l!==" ")return l==="="?d:-1}}function u(r,d){for(;d<r.length;d++){var l=r[d];if(l!==" ")return l==="'"||l==='"'?d:-1}}function w(r,d){for(;d>0;d--){var l=r[d];if(l!==" ")return l==="="?d:-1}}function S(r){return r[0]==='"'&&r[r.length-1]==='"'||r[0]==="'"&&r[r.length-1]==="'"}function k(r){return S(r)?r.substr(1,r.length-2):r}return ae.parseTag=n,ae.parseAttr=e,ae}var ue,Le;function Nt(){if(Le)return ue;Le=1;var t=ge().FilterCSS,a=De(),o=Ue(),n=o.parseTag,h=o.parseAttr,e=ve();function f(r){return r==null}function u(r){var d=e.spaceIndex(r);if(d===-1)return{html:"",closing:r[r.length-2]==="/"};r=e.trim(r.slice(d+1,-1));var l=r[r.length-1]==="/";return l&&(r=e.trim(r.slice(0,-1))),{html:r,closing:l}}function w(r){var d={};for(var l in r)d[l]=r[l];return d}function S(r){var d={};for(var l in r)Array.isArray(r[l])?d[l.toLowerCase()]=r[l].map(function(T){return T.toLowerCase()}):d[l.toLowerCase()]=r[l];return d}function k(r){r=w(r||{}),r.stripIgnoreTag&&(r.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),r.onIgnoreTag=a.onIgnoreTagStripAll),r.whiteList||r.allowList?r.whiteList=S(r.whiteList||r.allowList):r.whiteList=a.whiteList,this.attributeWrapSign=r.singleQuotedAttributeValue===!0?"'":a.attributeWrapSign,r.onTag=r.onTag||a.onTag,r.onTagAttr=r.onTagAttr||a.onTagAttr,r.onIgnoreTag=r.onIgnoreTag||a.onIgnoreTag,r.onIgnoreTagAttr=r.onIgnoreTagAttr||a.onIgnoreTagAttr,r.safeAttrValue=r.safeAttrValue||a.safeAttrValue,r.escapeHtml=r.escapeHtml||a.escapeHtml,this.options=r,r.css===!1?this.cssFilter=!1:(r.css=r.css||{},this.cssFilter=new t(r.css))}return k.prototype.process=function(r){if(r=r||"",r=r.toString(),!r)return"";var d=this,l=d.options,T=l.whiteList,R=l.onTag,y=l.onIgnoreTag,C=l.onTagAttr,i=l.onIgnoreTagAttr,s=l.safeAttrValue,g=l.escapeHtml,c=d.attributeWrapSign,p=d.cssFilter;l.stripBlankChar&&(r=a.stripBlankChar(r)),l.allowCommentTag||(r=a.stripCommentTag(r));var b=!1;l.stripIgnoreTagBody&&(b=a.StripTagBody(l.stripIgnoreTagBody,y),y=b.onIgnoreTag);var I=n(r,function(q,z,E,O,G){var D={sourcePosition:q,position:z,isClosing:G,isWhite:Object.prototype.hasOwnProperty.call(T,E)},F=R(E,O,D);if(!f(F))return F;if(D.isWhite){if(D.isClosing)return"</"+E+">";var x=u(O),_=T[E],v=h(x.html,function(P,N){var L=e.indexOf(_,P)!==-1,W=C(E,P,N,L);return f(W)?L?(N=s(E,P,N,p),N?P+"="+c+N+c:P):(W=i(E,P,N,L),f(W)?void 0:W):W});return O="<"+E,v&&(O+=" "+v),x.closing&&(O+=" /"),O+=">",O}else return F=y(E,O,D),f(F)?g(O):F},g);return b&&(I=b.remove(I)),I},ue=k,ue}var Ee;function Ft(){return Ee||(Ee=1,function(t,a){var o=De(),n=Ue(),h=Nt();function e(u,w){var S=new h(w);return S.process(u)}a=t.exports=e,a.filterXSS=e,a.FilterXSS=h,function(){for(var u in o)a[u]=o[u];for(var w in n)a[w]=n[w]}(),typeof window<"u"&&(window.filterXSS=t.exports);function f(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}f()&&(self.filterXSS=t.exports)}(te,te.exports)),te.exports}var je;function Mt(){if(je)return U;je=1,Object.defineProperty(U,"__esModule",{value:!0}),U.svgWhiteList=U.sanitizeSvg=U.isSvgFile=U.initSanitize=void 0;var t=f(Ft()),a=t,o=h(Xe),n=h(He());function h(i){return i&&i.__esModule?i:{default:i}}function e(i){if(typeof WeakMap!="function")return null;var s=new WeakMap,g=new WeakMap;return(e=function(c){return c?g:s})(i)}function f(i,s){if(i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var g=e(s);if(g&&g.has(i))return g.get(i);var c={__proto__:null},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var b in i)if(b!=="default"&&{}.hasOwnProperty.call(i,b)){var I=p?Object.getOwnPropertyDescriptor(i,b):null;I&&(I.get||I.set)?Object.defineProperty(c,b,I):c[b]=i[b]}return c.default=i,g&&g.set(i,c),c}const u=["script","img","iframe","body","form","style","link","meta","bgsound","svg","embed","object","video","audio","source","track","marquee","blink","noscript","param","textarea","input","select","button"],w=u.reduce((i,s)=>(i[s]=!0,i),{});let S={escapeHtml:i=>i,whiteList:(0,o.default)(a.getDefaultWhiteList(),u),onIgnoreTag:function(i,s,g){if(w[i])return""},onTagAttr:(i,s)=>{if(i==="!BACKUP")return s},stripIgnoreTagBody:["script"]};function k(i,s){for(;i!==(0,t.filterXSS)(i,s);)i=(0,t.filterXSS)(i,s);return i}const r=(i={})=>{const s={...S,...i},g=c=>typeof c=="string"?k(c,s):Array.isArray(c)?c.map(p=>typeof p=="string"?k(p,s):Array.isArray(p)||typeof p=="object"?g(p):p):(typeof c=="object"&&c!==null&&Object.keys(c).forEach(p=>{if(s?.allowedKeys?.includes(p))return;const b=c[p];typeof b=="string"?c[p]=k(b,s):(Array.isArray(b)||typeof b=="object")&&(c[p]=g(b))}),c);return g};U.initSanitize=r;function d(i){const s={};Object.keys(T).forEach(c=>{const p=c.toLowerCase();p!==c&&(s[p]=c)});let g=i;return Object.entries(s).forEach(([c,p])=>{g=g.replace(new RegExp(`<${c}([^>]*)>`,"gi"),(b,I)=>`<${p}${I}>`),g=g.replace(new RegExp(`</${c}>`,"gi"),`</${p}>`)}),g}function l(i,s,g,c){if(c){const p=Object.keys(T).find(b=>b.toLowerCase()===i.toLowerCase());if(p){const b=T[p].find(I=>I.toLowerCase()===s.toLowerCase());if(b)return g=a.safeAttrValue(i,s,g),g?b+'="'+g+'"':b}}}const T=U.svgWhiteList={svg:["width","height","viewBox","xmlns","version","preserveAspectRatio","xml:space"],circle:["cx","cy","r","fill","stroke","stroke-width","fill-opacity","stroke-opacity"],ellipse:["cx","cy","rx","ry","fill","stroke","stroke-width"],line:["x1","y1","x2","y2","stroke","stroke-width"],path:["d","fill","stroke","stroke-width","fill-rule","stroke-linecap","stroke-linejoin"],polygon:["points","fill","stroke","stroke-width"],polyline:["points","fill","stroke","stroke-width"],rect:["x","y","width","height","rx","ry","fill","stroke","stroke-width"],g:["transform","fill","stroke"],text:["x","y","font-size","font-family","text-anchor","fill"],defs:[],clipPath:["id"],mask:["id"],use:["x","y","width","height"],linearGradient:["id","x1","y1","x2","y2","gradientUnits"],radialGradient:["id","cx","cy","r","fx","fy","gradientUnits"],stop:["offset","stop-color","stop-opacity"],pattern:["id","width","height","patternUnits","patternTransform"]},R={whiteList:T,stripIgnoreTagBody:["script","style"],onIgnoreTag:function(i,s,g){return""},onIgnoreTagAttr:function(i,s,g,c){if(s.startsWith("on")||s==="href"||s==="xlink:href")return"";if(s==="style"){const p=g.replace(/expression\(.*\)|javascript:|data:|@import|behavior|binding|moz-binding/gi,"");return p!==g?"":`${s}="${p}"`}if(i==="use"&&(s==="href"||s==="xlink:href"))return g.startsWith("#")&&!/[<>"']/.test(g)?`${s}="${g}"`:"";if(s==="id"||s==="class")return`${s}="${g}"`}},y=(i,s,g)=>{if(!C(i))throw new Error("Invalid SVG content");const p={...R,...g||{}};s?.preserveCase&&(p.onTagAttr=l);const b=k(i,p);return s?.preserveCase?d(b):b};U.sanitizeSvg=y;const C=(i,s)=>!(typeof i!="string"||!/<svg[^>]*?(?:>|\/>)|<\?xml[^>]*>\s*<svg[^>]*?(?:>|\/?>)/i.test(i)||s?.name&&n.default.extname(s.name).toLowerCase()!==".svg"||s?.type&&!s.type.toLowerCase().includes("image/svg"));return U.isSvgFile=C,U}var $e;function Dt(){return $e||($e=1,function(t,a){Object.defineProperty(a,"__esModule",{value:!0});var o={xss:!0};a.xss=h;var n=Mt();Object.keys(n).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(o,e)||e in a&&a[e]===n[e]||Object.defineProperty(a,e,{enumerable:!0,get:function(){return n[e]}})});function h(e={}){const f=(0,n.initSanitize)(e);return(u,w,S)=>{["body","params","headers","query"].forEach(k=>{u[k]&&(u[k]=f(u[k]))}),S()}}t.exports={xss:h,initSanitize:n.initSanitize,isSvgFile:n.isSvgFile,sanitizeSvg:n.sanitizeSvg}}(ee,ee.exports)),ee.exports}var ce,qe;function Ut(){if(qe)return ce;qe=1;const{initSanitize:t}=Dt();return ce={sanitizeTag:n=>!n||typeof n!="string"?n:t({whiteList:{},stripIgnoreTag:!1,stripIgnoreTagBody:[],onIgnoreTag:(e,f)=>f.replace(/</g,"<").replace(/>/g,">"),onIgnoreTagAttr:(e,f,u)=>`${f}="${u}"`,onTag:(e,f)=>f.replace(/</g,"<").replace(/>/g,">"),escapeHtml:e=>e.replace(/</g,"<").replace(/>/g,">")})(n),escapeTag:n=>!n||typeof n!="string"?n:t({whiteList:{},stripIgnoreTag:!1,onIgnoreTag:(e,f)=>f.replace(/</g,"<").replace(/>/g,">"),onIgnoreTagAttr:(e,f,u)=>`${f}="${u}"`,stripIgnoreTagBody:[],escapeHtml:e=>e.replace(/</g,"<").replace(/>/g,">")})(n)},ce}var fr=Ut();const Be=ne.span`
|
|
4
4
|
color: ${t=>t.theme.palette.error.main};
|
|
5
5
|
&::before {
|
|
@@ -113,7 +113,7 @@ import{r as Xe}from"./omit-BmEXjsUv.js";import{r as He}from"./index-CODhl4Ao.js"
|
|
|
113
113
|
25%, 75% {
|
|
114
114
|
transform: scale(1.1) translateX(3px);
|
|
115
115
|
}
|
|
116
|
-
`;function Gt({label:t="",disabled:a=!1,required:o=!1,initialValue:n="",onChange:h=()=>{},placeholder:e="",style:f={},onSubmit:u=()=>{},secure:w=!1,type:S="",triggers:k=[],formatterBeforeSubmit:r=null,directEditing:d=!1,autoFocus:l=!0,errorTips:T="",...R}){const[y,C]=$.useState(d),[i,s]=$.useState(!1),{t:g}=$.useContext(it),[c,p]=$.useState(""),[b,I]=$.useState(w&&n==="__encrypted__"?null:n),[q,z]=$.useState(b),[E,O]=$.useState(!1),[G,D]=$.useState(!1),F=async()=>{if(R.validate&&typeof R.validate=="function"){const L=R.validate(q);if(L){p(L);return}}p(""),s(!0);try{if(await u(q)===!1)z(b);else{let W=q;typeof r=="function"&&(W=r(q)),z(W),I(W),O(!1)}}catch{z(b)}finally{s(!1),C(!1)}};$.useEffect(()=>{const L=w&&n==="__encrypted__"?null:n;L!==b&&(I(L),z(L),O(!1))},[n,w,b]);const x=L=>{O(L!==q),z(L),h(L)},_=L=>{L.key==="Enter"&&F()},v=$.useCallback(()=>{D(!0),setTimeout(()=>{D(!1)},500)},[]),P=()=>{if(d&&!a&&!i){F();return}E&&v(),!E&&!a&&!i&&(C(!1),O(!1))},N=y||d?m.jsx(nt,{style:{flex:1},fullWidth:!0,value:q,onChange:L=>{x(L.target.value)},autoFocus:l,size:"small",variant:"outlined",placeholder:e,onKeyDown:_,onBlur:P,disabled:a,error:!!T,multiline:S==="textarea",type:w?"password":S||"text",...R}):m.jsx(M,{"data-cy":"schema-form-item-edit",className:"form-item-input slot",style:{whiteSpace:"pre-wrap",cursor:"text"},onClick:()=>{a||C(!0)},sx:{px:1},children:ze(q,w,n)?ze(q,w,n):m.jsx("span",{className:"placeholder",children:g("common.requiredInputPlaceholder",{name:e||t})})});return m.jsx(Bt,{className:"form",style:f,children:m.jsxs(M,{children:[m.jsxs(M,{className:"form-item-label",children:[t,o&&m.jsx(Be,{})]}),m.jsxs(M,{className:"form-item-body",style:{alignItems:"flex-start"},children:[m.jsx(M,{className:"form-item-input",children:N}),m.jsx(M,{className:"form-item-action",style:{marginLeft:!k.length||d?0:12},children:y&&!d?m.jsxs(m.Fragment,{children:[E?m.jsx(de,{"data-cy":"schema-form-item-confirm",onClick:F,disabled:a||i||!E,sx:{animation:G?`${Vt} 0.5s linear`:"none"},style:{paddingRight:4},size:"large",children:i?m.jsx(ot,{size:24}):m.jsx(mt,{})}):null,m.jsx(de,{"data-cy":"schema-form-item-cancel",onClick:()=>{z(b),C(!1),O(!1)},style:{paddingLeft:E?4:8},disabled:a||i,size:"large",children:m.jsx(st,{})})]}):m.jsx(M,{children:k.length?m.jsx(Ve,{triggers:k,disabled:a}):null})})]}),(T||c)&&m.jsx(lt,{error:!0,children:T||c})]})})}Gt.propTypes={style:A.object,onSubmit:A.func,onChange:A.func,label:A.string,initialValue:A.string,placeholder:A.string,required:A.bool,disabled:A.bool,secure:A.bool,triggers:A.array,formatterBeforeSubmit:A.func,directEditing:A.bool,type:A.string,autoFocus:A.bool,errorTips:A.string};const Xt=$.lazy(()=>ct(()=>import("./index-
|
|
116
|
+
`;function Gt({label:t="",disabled:a=!1,required:o=!1,initialValue:n="",onChange:h=()=>{},placeholder:e="",style:f={},onSubmit:u=()=>{},secure:w=!1,type:S="",triggers:k=[],formatterBeforeSubmit:r=null,directEditing:d=!1,autoFocus:l=!0,errorTips:T="",...R}){const[y,C]=$.useState(d),[i,s]=$.useState(!1),{t:g}=$.useContext(it),[c,p]=$.useState(""),[b,I]=$.useState(w&&n==="__encrypted__"?null:n),[q,z]=$.useState(b),[E,O]=$.useState(!1),[G,D]=$.useState(!1),F=async()=>{if(R.validate&&typeof R.validate=="function"){const L=R.validate(q);if(L){p(L);return}}p(""),s(!0);try{if(await u(q)===!1)z(b);else{let W=q;typeof r=="function"&&(W=r(q)),z(W),I(W),O(!1)}}catch{z(b)}finally{s(!1),C(!1)}};$.useEffect(()=>{const L=w&&n==="__encrypted__"?null:n;L!==b&&(I(L),z(L),O(!1))},[n,w,b]);const x=L=>{O(L!==q),z(L),h(L)},_=L=>{L.key==="Enter"&&F()},v=$.useCallback(()=>{D(!0),setTimeout(()=>{D(!1)},500)},[]),P=()=>{if(d&&!a&&!i){F();return}E&&v(),!E&&!a&&!i&&(C(!1),O(!1))},N=y||d?m.jsx(nt,{style:{flex:1},fullWidth:!0,value:q,onChange:L=>{x(L.target.value)},autoFocus:l,size:"small",variant:"outlined",placeholder:e,onKeyDown:_,onBlur:P,disabled:a,error:!!T,multiline:S==="textarea",type:w?"password":S||"text",...R}):m.jsx(M,{"data-cy":"schema-form-item-edit",className:"form-item-input slot",style:{whiteSpace:"pre-wrap",cursor:"text"},onClick:()=>{a||C(!0)},sx:{px:1},children:ze(q,w,n)?ze(q,w,n):m.jsx("span",{className:"placeholder",children:g("common.requiredInputPlaceholder",{name:e||t})})});return m.jsx(Bt,{className:"form",style:f,children:m.jsxs(M,{children:[m.jsxs(M,{className:"form-item-label",children:[t,o&&m.jsx(Be,{})]}),m.jsxs(M,{className:"form-item-body",style:{alignItems:"flex-start"},children:[m.jsx(M,{className:"form-item-input",children:N}),m.jsx(M,{className:"form-item-action",style:{marginLeft:!k.length||d?0:12},children:y&&!d?m.jsxs(m.Fragment,{children:[E?m.jsx(de,{"data-cy":"schema-form-item-confirm",onClick:F,disabled:a||i||!E,sx:{animation:G?`${Vt} 0.5s linear`:"none"},style:{paddingRight:4},size:"large",children:i?m.jsx(ot,{size:24}):m.jsx(mt,{})}):null,m.jsx(de,{"data-cy":"schema-form-item-cancel",onClick:()=>{z(b),C(!1),O(!1)},style:{paddingLeft:E?4:8},disabled:a||i,size:"large",children:m.jsx(st,{})})]}):m.jsx(M,{children:k.length?m.jsx(Ve,{triggers:k,disabled:a}):null})})]}),(T||c)&&m.jsx(lt,{error:!0,children:T||c})]})})}Gt.propTypes={style:A.object,onSubmit:A.func,onChange:A.func,label:A.string,initialValue:A.string,placeholder:A.string,required:A.bool,disabled:A.bool,secure:A.bool,triggers:A.array,formatterBeforeSubmit:A.func,directEditing:A.bool,type:A.string,autoFocus:A.bool,errorTips:A.string};const Xt=$.lazy(()=>ct(()=>import("./index-DkuvHf4y.js").then(t=>t.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url).then(t=>({default:t.Uploader}))),Ht="/blocklet/logo/upload",Oe=[".png",".jpg",".jpeg",".webp",".bmp",".ico"];function Kt({url:t,height:a=80,width:o="auto",enabled:n=!0,allowSVG:h=!0,type:e,did:f,prefix:u,headers:w=we,aspectRatio:S=1,minWidth:k=256,minHeight:r=256,onUploaded:d=we,children:l=null}){const{t:T,locale:R}=ut(),y=$.useRef(null),C=()=>{y.current?.open()},i=()=>{d(),y.current?.close()},s={cursor:n?"pointer":"default","&::after":{content:`"${T("common.switch")}"`}};return m.jsxs(Qt,{id:`uploader-${f}-${e}`,children:[m.jsx(Xt,{ref:y,locale:R,popup:!0,onUploadFinish:i,plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:pe(u,Ht,e,f),disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileExts:h?[...Oe,".svg"]:Oe,maxFileSize:1024*1024*5,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:S,initialAspectRatio:S,croppedCanvasOptions:{minWidth:k,minHeight:r}}},tusProps:{headers:w}}),l?m.jsx(M,{onClick:C,children:l}):m.jsx(M,{className:vt("uploader-wrapper",n&&"enabled"),sx:s,onClick:C,children:m.jsx("img",{alt:e,src:t,style:{width:o,height:a}})})]},`uploader-${f}-${e}`)}Kt.propTypes={url:A.string.isRequired,type:A.oneOf(["square","rect","favicon","splash-portrait","splash-landscape","og-image"]).isRequired,did:A.string.isRequired,prefix:A.string.isRequired,headers:A.func,onUploaded:A.func,height:A.number,width:A.any,enabled:A.bool,allowSVG:A.bool,aspectRatio:A.number,minWidth:A.number,minHeight:A.number,children:A.node};const Qt=ne.div`
|
|
117
117
|
.uploader-wrapper {
|
|
118
118
|
display: inline-flex;
|
|
119
119
|
position: relative;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m as o}from"./index-
|
|
1
|
+
import{m as o}from"./index-Bw9bFr7r.js";import"./index-BAG4sFIa.js";import"./decode-DPztD6kB.js";/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
4
4
|
* Released under the MIT license
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ir as O,hJ as B,r as p}from"./index-
|
|
1
|
+
import{ir as O,hJ as B,r as p}from"./index-BAG4sFIa.js";import{_ as S}from"./typeof-QjJsDpFa.js";import{t as j}from"./redux-DfszZyTl.js";function v(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,o=Array(r);t<r;t++)o[t]=e[t];return o}function M(e,r){if(e){if(typeof e=="string")return v(e,r);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?v(e,r):void 0}}function N(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&O(e,r)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},g(e)}function k(e,r){if(r&&(S(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return B(e)}function q(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function b(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,j(o.key),o)}}function z(e,r,t){return r&&b(e.prototype,r),t&&b(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function C(e,r){if(e.length!==r.length)return!1;for(var t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}function h(e,r){var t=p.useState(function(){return{inputs:r,result:e()}})[0],o=p.useRef(!0),n=p.useRef(t),a=o.current||!!(r&&n.current.inputs&&C(r,n.current.inputs)),i=a?n.current:{inputs:r,result:e()};return p.useEffect(function(){o.current=!1,n.current=i},[i]),i.result}function A(e,r){return h(function(){return e},r)}var D=h,J=A,P="Invariant failed";function _(e,r){throw new Error(P)}var d=function(r){var t=r.top,o=r.right,n=r.bottom,a=r.left,i=o-a,f=n-t,c={top:t,right:o,bottom:n,left:a,width:i,height:f,x:a,y:t,center:{x:(o+a)/2,y:(n+t)/2}};return c},R=function(r,t){return{top:r.top-t.top,left:r.left-t.left,bottom:r.bottom+t.bottom,right:r.right+t.right}},m=function(r,t){return{top:r.top+t.top,left:r.left+t.left,bottom:r.bottom-t.bottom,right:r.right-t.right}},T=function(r,t){return{top:r.top+t.y,left:r.left+t.x,bottom:r.bottom+t.y,right:r.right+t.x}},l={top:0,right:0,bottom:0,left:0},x=function(r){var t=r.borderBox,o=r.margin,n=o===void 0?l:o,a=r.border,i=a===void 0?l:a,f=r.padding,c=f===void 0?l:f,w=d(R(t,n)),s=d(m(t,i)),y=d(m(s,c));return{marginBox:w,borderBox:d(t),paddingBox:s,contentBox:y,margin:n,border:i,padding:c}},u=function(r){var t=r.slice(0,-2),o=r.slice(-2);if(o!=="px")return 0;var n=Number(t);return isNaN(n)&&_(),n},E=function(){return{x:window.pageXOffset,y:window.pageYOffset}},W=function(r,t){var o=r.borderBox,n=r.border,a=r.margin,i=r.padding,f=T(o,t);return x({borderBox:f,border:n,margin:a,padding:i})},K=function(r,t){return t===void 0&&(t=E()),W(r,t)},F=function(r,t){var o={top:u(t.marginTop),right:u(t.marginRight),bottom:u(t.marginBottom),left:u(t.marginLeft)},n={top:u(t.paddingTop),right:u(t.paddingRight),bottom:u(t.paddingBottom),left:u(t.paddingLeft)},a={top:u(t.borderTopWidth),right:u(t.borderRightWidth),bottom:u(t.borderBottomWidth),left:u(t.borderLeftWidth)};return x({borderBox:r,margin:o,padding:n,border:a})},U=function(r){var t=r.getBoundingClientRect(),o=window.getComputedStyle(r);return F(t,o)},X=function(r){var t=[],o=null,n=function(){for(var i=arguments.length,f=new Array(i),c=0;c<i;c++)f[c]=arguments[c];t=f,!o&&(o=requestAnimationFrame(function(){o=null,r.apply(void 0,t)}))};return n.cancel=function(){o&&(cancelAnimationFrame(o),o=null)},n};export{z as _,q as a,N as b,k as c,g as d,v as e,M as f,J as g,U as h,d as i,R as j,x as k,F as l,W as o,X as r,D as u,K as w};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m}from"./index-
|
|
1
|
+
import{m}from"./index-Bw9bFr7r.js";import"./index-BAG4sFIa.js";import"./decode-DPztD6kB.js";/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
4
4
|
* Released under the MIT license
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as v,ck as pt,fy as ue,cl as ft,d9 as mt,df as Ue,dg as Re,fz as Ye,fA as _e,fB as ze,c0 as bt,c1 as ht,j as m,c4 as de,c2 as gt,dc as vt,c3 as K,b9 as G,ch as U,c5 as yt,b_ as ne,cj as Be,fw as Xe,fx as qe,aw as Ge,fC as tt,aG as kt,V as rt,bo as ot,v as at,C as nt,ae as st,H as Ie,_ as lt}from"./index-BeQc3UkQ.js";import{v as St}from"./visuallyHidden-Dan1xhjv.js";function xt(e,t,n=(a,p)=>a===p){return e.length===t.length&&e.every((a,p)=>n(a,t[p]))}const wt=2;function ae(e,t,n,a,p){return n===1?Math.min(e+t,p):Math.max(e-t,a)}function it(e,t){return e-t}function Je(e,t){const{index:n}=e.reduce((a,p,k)=>{const S=Math.abs(t-p);return a===null||S<a.distance||S===a.distance?{distance:S,index:k}:a},null)??{};return n}function Le(e,t){if(t.current!==void 0&&e.changedTouches){const n=e;for(let a=0;a<n.changedTouches.length;a+=1){const p=n.changedTouches[a];if(p.identifier===t.current)return{x:p.clientX,y:p.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Me(e,t,n){return(e-t)*100/(n-t)}function Ct(e,t,n){return(n-t)*e+t}function Lt(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),a=n[0].split(".")[1];return(a?a.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function Pt(e,t,n){const a=Math.round((e-n)/t)*t+n;return Number(a.toFixed(Lt(t)))}function Qe({values:e,newValue:t,index:n}){const a=e.slice();return a[n]=t,a.sort(it)}function Pe({sliderRef:e,activeIndex:t,setActive:n}){const a=Re(e.current);(!e.current?.contains(a.activeElement)||Number(a?.activeElement?.getAttribute("data-index"))!==t)&&e.current?.querySelector(`[type="range"][data-index="${t}"]`).focus(),n&&n(t)}function Te(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?xt(e,t):!1}const Tt={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},At=e=>e;let Ae;function Ze(){return Ae===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Ae=CSS.supports("touch-action","none"):Ae=!0),Ae}function Rt(e){const{"aria-labelledby":t,defaultValue:n,disabled:a=!1,disableSwap:p=!1,isRtl:k=!1,marks:S=!1,max:s=100,min:c=0,name:x,onChange:L,onChangeCommitted:H,orientation:A="horizontal",rootRef:Ee,scale:pe=At,step:N=1,shiftStep:J=10,tabIndex:fe,value:Ne}=e,j=v.useRef(void 0),[D,Q]=v.useState(-1),[We,Z]=v.useState(-1),[me,be]=v.useState(!1),ee=v.useRef(0),se=v.useRef(null),[I,R]=pt({controlled:Ne,default:n??c,name:"Slider"}),w=L&&((o,r,l)=>{const d=o.nativeEvent||o,u=new d.constructor(d.type,d);Object.defineProperty(u,"target",{writable:!0,value:{value:r,name:x}}),se.current=r,L(u,r,l)}),te=Array.isArray(I);let h=te?I.slice().sort(it):[I];h=h.map(o=>o==null?c:ue(o,c,s));const le=S===!0&&N!==null?[...Array(Math.floor((s-c)/N)+1)].map((o,r)=>({value:c+N*r})):S||[],b=le.map(o=>o.value),[F,re]=v.useState(-1),f=v.useRef(null),Y=ft(Ee,f),je=o=>r=>{const l=Number(r.currentTarget.getAttribute("data-index"));_e(r.target)&&re(l),Z(l),o?.onFocus?.(r)},He=o=>r=>{_e(r.target)||re(-1),Z(-1),o?.onBlur?.(r)},he=(o,r)=>{const l=Number(o.currentTarget.getAttribute("data-index")),d=h[l],u=b.indexOf(d);let i=r;if(le&&N==null){const z=b[b.length-1];i>=z?i=z:i<=b[0]?i=b[0]:i=i<d?b[u-1]:b[u+1]}if(i=ue(i,c,s),te){p&&(i=ue(i,h[l-1]||-1/0,h[l+1]||1/0));const z=i;i=Qe({values:h,newValue:i,index:l});let M=l;p||(M=i.indexOf(z)),Pe({sliderRef:f,activeIndex:M})}R(i),re(l),w&&!Te(i,I)&&w(o,i,l),H&&H(o,se.current??i)},Ve=o=>r=>{if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(r.key)){r.preventDefault();const l=Number(r.currentTarget.getAttribute("data-index")),d=h[l];let u=null;if(N!=null){const i=r.shiftKey?J:N;switch(r.key){case"ArrowUp":u=ae(d,i,1,c,s);break;case"ArrowRight":u=ae(d,i,k?-1:1,c,s);break;case"ArrowDown":u=ae(d,i,-1,c,s);break;case"ArrowLeft":u=ae(d,i,k?1:-1,c,s);break;case"PageUp":u=ae(d,J,1,c,s);break;case"PageDown":u=ae(d,J,-1,c,s);break;case"Home":u=c;break;case"End":u=s;break}}else if(le){const i=b[b.length-1],z=b.indexOf(d),M=[k?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],y=[k?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];M.includes(r.key)?z===0?u=b[0]:u=b[z-1]:y.includes(r.key)&&(z===b.length-1?u=i:u=b[z+1])}u!=null&&he(r,u)}o?.onKeyDown?.(r)};mt(()=>{a&&f.current.contains(document.activeElement)&&document.activeElement?.blur()},[a]),a&&D!==-1&&Q(-1),a&&F!==-1&&re(-1);const ge=o=>r=>{o.onChange?.(r),he(r,r.target.valueAsNumber)},B=v.useRef(void 0);let W=A;k&&A==="horizontal"&&(W+="-reverse");const _=({finger:o,move:r=!1})=>{const{current:l}=f,{width:d,height:u,bottom:i,left:z}=l.getBoundingClientRect();let M;W.startsWith("vertical")?M=(i-o.y)/u:M=(o.x-z)/d,W.includes("-reverse")&&(M=1-M);let y;if(y=Ct(M,c,s),N)y=Pt(y,N,c);else{const ce=Je(b,y);y=b[ce]}y=ue(y,c,s);let $=0;if(te){r?$=B.current:$=Je(h,y),p&&(y=ue(y,h[$-1]||-1/0,h[$+1]||1/0));const ce=y;y=Qe({values:h,newValue:y,index:$}),p&&r||($=y.indexOf(ce),B.current=$)}return{newValue:y,activeIndex:$}},X=Ue(o=>{const r=Le(o,j);if(!r)return;if(ee.current+=1,o.type==="mousemove"&&o.buttons===0){V(o);return}const{newValue:l,activeIndex:d}=_({finger:r,move:!0});Pe({sliderRef:f,activeIndex:d,setActive:Q}),R(l),!me&&ee.current>wt&&be(!0),w&&!Te(l,I)&&w(o,l,d)}),V=Ue(o=>{const r=Le(o,j);if(be(!1),!r)return;const{newValue:l}=_({finger:r,move:!0});Q(-1),o.type==="touchend"&&Z(-1),H&&H(o,se.current??l),j.current=void 0,q()}),P=Ue(o=>{if(a)return;Ze()||o.preventDefault();const r=o.changedTouches[0];r!=null&&(j.current=r.identifier);const l=Le(o,j);if(l!==!1){const{newValue:u,activeIndex:i}=_({finger:l});Pe({sliderRef:f,activeIndex:i,setActive:Q}),R(u),w&&!Te(u,I)&&w(o,u,i)}ee.current=0;const d=Re(f.current);d.addEventListener("touchmove",X,{passive:!0}),d.addEventListener("touchend",V,{passive:!0})}),q=v.useCallback(()=>{const o=Re(f.current);o.removeEventListener("mousemove",X),o.removeEventListener("mouseup",V),o.removeEventListener("touchmove",X),o.removeEventListener("touchend",V)},[V,X]);v.useEffect(()=>{const{current:o}=f;return o.addEventListener("touchstart",P,{passive:Ze()}),()=>{o.removeEventListener("touchstart",P),q()}},[q,P]),v.useEffect(()=>{a&&q()},[a,q]);const $e=o=>r=>{if(o.onMouseDown?.(r),a||r.defaultPrevented||r.button!==0)return;r.preventDefault();const l=Le(r,j);if(l!==!1){const{newValue:u,activeIndex:i}=_({finger:l});Pe({sliderRef:f,activeIndex:i,setActive:Q}),R(u),w&&!Te(u,I)&&w(r,u,i)}ee.current=0;const d=Re(f.current);d.addEventListener("mousemove",X,{passive:!0}),d.addEventListener("mouseup",V)},ve=Me(te?h[0]:c,c,s),T=Me(h[h.length-1],c,s)-ve,ie=(o={})=>{const r=Ye(o),l={onMouseDown:$e(r||{})},d={...r,...l};return{...o,ref:Y,...d}},ye=o=>r=>{o.onMouseOver?.(r);const l=Number(r.currentTarget.getAttribute("data-index"));Z(l)},ke=o=>r=>{o.onMouseLeave?.(r),Z(-1)},Se=(o={})=>{const r=Ye(o),l={onMouseOver:ye(r||{}),onMouseLeave:ke(r||{})};return{...o,...r,...l}},xe=o=>({pointerEvents:D!==-1&&D!==o?"none":void 0});let oe;return A==="vertical"&&(oe=k?"vertical-rl":"vertical-lr"),{active:D,axis:W,axisProps:Tt,dragging:me,focusedThumbIndex:F,getHiddenInputProps:(o={})=>{const r=Ye(o),l={onChange:ge(r||{}),onFocus:je(r||{}),onBlur:He(r||{}),onKeyDown:Ve(r||{})},d={...r,...l};return{tabIndex:fe,"aria-labelledby":t,"aria-orientation":A,"aria-valuemax":pe(s),"aria-valuemin":pe(c),name:x,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:a,...o,...d,style:{...St,direction:k?"rtl":"ltr",width:"100%",height:"100%",writingMode:oe}}},getRootProps:ie,getThumbProps:Se,marks:le,open:We,range:te,rootRef:Y,trackLeap:T,trackOffset:ve,values:h,getThumbStyle:xe}}const zt=e=>!e||!ze(e);function It(e){return ht("MuiSlider",e)}const E=bt("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),Mt=e=>{const{open:t}=e;return{offset:de(t&&E.valueLabelOpen),circle:E.valueLabelCircle,label:E.valueLabelLabel}};function Et(e){const{children:t,className:n,value:a}=e,p=Mt(e);return t?v.cloneElement(t,{className:t.props.className},m.jsxs(v.Fragment,{children:[t.props.children,m.jsx("span",{className:de(p.offset,n),"aria-hidden":!0,children:m.jsx("span",{className:p.circle,children:m.jsx("span",{className:p.label,children:a})})})]})):null}function et(e){return e}const Nt=G("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${U(n.color)}`],n.size!=="medium"&&t[`size${U(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(ne(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${E.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${E.dragging}`]:{[`& .${E.thumb}, & .${E.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(Be()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),jt=G("span",{name:"MuiSlider",slot:"Rail"})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),Ht=G("span",{name:"MuiSlider",slot:"Track"})(ne(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter(Be()).map(([t])=>({props:{color:t,track:"inverted"},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:Xe(e.palette[t].main,.62),borderColor:Xe(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:qe(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:qe(e.palette[t].main,.5)})}}}))]}))),Vt=G("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${U(n.color)}`],n.size!=="medium"&&t[`thumbSize${U(n.size)}`]]}})(ne(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${E.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(e.palette).filter(Be()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${E.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${Ge(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${E.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${Ge(e.palette[t].main,.16)}`}}}}))]}))),$t=G(Et,{name:"MuiSlider",slot:"ValueLabel"})(ne(({theme:e})=>({zIndex:1,whiteSpace:"nowrap",...e.typography.body2,fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${E.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${E.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]}))),Dt=G("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>tt(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(ne(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),Ot=G("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>tt(e)&&e!=="markLabelActive"})(ne(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),Ft=e=>{const{disabled:t,dragging:n,marked:a,orientation:p,track:k,classes:S,color:s,size:c}=e,x={root:["root",t&&"disabled",n&&"dragging",a&&"marked",p==="vertical"&&"vertical",k==="inverted"&&"trackInverted",k===!1&&"trackFalse",s&&`color${U(s)}`,c&&`size${U(c)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",c&&`thumbSize${U(c)}`,s&&`thumbColor${U(s)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return yt(x,It,S)},Kt=({children:e})=>e,Bt=v.forwardRef(function(t,n){const a=gt({props:t,name:"MuiSlider"}),p=vt(),{"aria-label":k,"aria-valuetext":S,"aria-labelledby":s,component:c="span",components:x={},componentsProps:L={},color:H="primary",classes:A,className:Ee,disableSwap:pe=!1,disabled:N=!1,getAriaLabel:J,getAriaValueText:fe,marks:Ne=!1,max:j=100,min:D=0,name:Q,onChange:We,onChangeCommitted:Z,orientation:me="horizontal",shiftStep:be=10,size:ee="medium",step:se=1,scale:I=et,slotProps:R,slots:w,tabIndex:te,track:h="normal",value:le,valueLabelDisplay:b="off",valueLabelFormat:F=et,...re}=a,f={...a,isRtl:p,max:j,min:D,classes:A,disabled:N,disableSwap:pe,orientation:me,marks:Ne,color:H,size:ee,step:se,shiftStep:be,scale:I,track:h,valueLabelDisplay:b,valueLabelFormat:F},{axisProps:Y,getRootProps:je,getHiddenInputProps:He,getThumbProps:he,open:Ve,active:ge,axis:B,focusedThumbIndex:W,range:_,dragging:X,marks:V,values:P,trackOffset:q,trackLeap:$e,getThumbStyle:ve}=Rt({...f,rootRef:n});f.marked=V.length>0&&V.some(g=>g.label),f.dragging=X,f.focusedThumbIndex=W;const T=Ft(f),ie=w?.root??x.Root??Nt,ye=w?.rail??x.Rail??jt,ke=w?.track??x.Track??Ht,Se=w?.thumb??x.Thumb??Vt,xe=w?.valueLabel??x.ValueLabel??$t,oe=w?.mark??x.Mark??Dt,we=w?.markLabel??x.MarkLabel??Ot,o=w?.input??x.Input??"input",r=R?.root??L.root,l=R?.rail??L.rail,d=R?.track??L.track,u=R?.thumb??L.thumb,i=R?.valueLabel??L.valueLabel,z=R?.mark??L.mark,M=R?.markLabel??L.markLabel,y=R?.input??L.input,$=K({elementType:ie,getSlotProps:je,externalSlotProps:r,externalForwardedProps:re,additionalProps:{...zt(ie)&&{as:c}},ownerState:{...f,...r?.ownerState},className:[T.root,Ee]}),ce=K({elementType:ye,externalSlotProps:l,ownerState:f,className:T.rail}),ct=K({elementType:ke,externalSlotProps:d,additionalProps:{style:{...Y[B].offset(q),...Y[B].leap($e)}},ownerState:{...f,...d?.ownerState},className:T.track}),De=K({elementType:Se,getSlotProps:he,externalSlotProps:u,ownerState:{...f,...u?.ownerState},className:T.thumb}),ut=K({elementType:xe,externalSlotProps:i,ownerState:{...f,...i?.ownerState},className:T.valueLabel}),Oe=K({elementType:oe,externalSlotProps:z,ownerState:f,className:T.mark}),Fe=K({elementType:we,externalSlotProps:M,ownerState:f,className:T.markLabel}),dt=K({elementType:o,getSlotProps:He,externalSlotProps:y,ownerState:f});return m.jsxs(ie,{...$,children:[m.jsx(ye,{...ce}),m.jsx(ke,{...ct}),V.filter(g=>g.value>=D&&g.value<=j).map((g,C)=>{const Ke=Me(g.value,D,j),Ce=Y[B].offset(Ke);let O;return h===!1?O=P.includes(g.value):O=h==="normal"&&(_?g.value>=P[0]&&g.value<=P[P.length-1]:g.value<=P[0])||h==="inverted"&&(_?g.value<=P[0]||g.value>=P[P.length-1]:g.value>=P[0]),m.jsxs(v.Fragment,{children:[m.jsx(oe,{"data-index":C,...Oe,...!ze(oe)&&{markActive:O},style:{...Ce,...Oe.style},className:de(Oe.className,O&&T.markActive)}),g.label!=null?m.jsx(we,{"aria-hidden":!0,"data-index":C,...Fe,...!ze(we)&&{markLabelActive:O},style:{...Ce,...Fe.style},className:de(T.markLabel,Fe.className,O&&T.markLabelActive),children:g.label}):null]},C)}),P.map((g,C)=>{const Ke=Me(g,D,j),Ce=Y[B].offset(Ke),O=b==="off"?Kt:xe;return m.jsx(O,{...!ze(O)&&{valueLabelFormat:F,valueLabelDisplay:b,value:typeof F=="function"?F(I(g),C):F,index:C,open:Ve===C||ge===C||b==="on",disabled:N},...ut,children:m.jsx(Se,{"data-index":C,...De,className:de(T.thumb,De.className,ge===C&&T.active,W===C&&T.focusVisible),style:{...Ce,...ve(C),...De.style},children:m.jsx(o,{"data-index":C,"aria-label":J?J(C):k,"aria-valuenow":I(g),"aria-labelledby":s,"aria-valuetext":fe?fe(I(g),C):S,value:P[C],...dt})})},C)})]})}),Wt=kt(m.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39"}));function _t({teamDid:e,size:t="small",...n}){const{t:a}=rt(),{api:p}=ot(),[k,S]=v.useState(!1),[s,c]=v.useState(null),x=()=>{S(!1),c(null)},L=async()=>{try{S(!0);const A=await p.clearCache({input:{teamDid:e}});Ie.success(a("blocklet.config.clearCache.success",{count:A.removed?.length||0}))}catch(A){Ie.error(lt(A))}finally{S(!1),c(null)}},H={title:a("blocklet.config.clearCache.title"),description:a("blocklet.config.clearCache.description"),confirm:a("common.confirm"),cancel:a("common.cancel"),onConfirm:L,onCancel:x};return m.jsxs("div",{...n,children:[m.jsxs(at,{onClick:()=>c(H),color:"error",variant:"outlined",size:t,children:[k?m.jsx(nt,{size:16,style:{marginRight:5}}):null,a("blocklet.config.clearCache.action")]}),s&&m.jsx(st,{title:s.title,description:s.description,confirm:s.confirm,cancel:s.cancel,onConfirm:s.onConfirm,onCancel:s.onCancel})]})}function Xt({teamDid:e,size:t="small",...n}){const{t:a}=rt(),{api:p}=ot(),[k,S]=v.useState(!1),[s,c]=v.useState(null),x=()=>{S(!1),c(null)},L=async()=>{try{S(!0);const A=await p.rotateSessionKey({input:{teamDid:e}});Ie.success(a("blocklet.config.rotateSessionKey.success",{count:A.removed?.length||0})),setTimeout(()=>{window.location.reload()},1e3)}catch(A){Ie.error(lt(A))}finally{S(!1),c(null)}},H={title:a("blocklet.config.rotateSessionKey.title"),description:a("blocklet.config.rotateSessionKey.description"),confirm:a("common.confirm"),cancel:a("common.cancel"),onConfirm:L,onCancel:x};return m.jsxs("div",{...n,children:[m.jsxs(at,{onClick:()=>c(H),color:"error",variant:"outlined",size:t,children:[k?m.jsx(nt,{size:16,style:{marginRight:5}}):null,a("blocklet.config.rotateSessionKey.action")]}),s&&m.jsx(st,{title:s.title,description:s.description,confirm:s.confirm,cancel:s.cancel,onConfirm:s.onConfirm,onCancel:s.onCancel})]})}export{_t as C,Wt as P,Xt as R,Bt as S};
|
|
1
|
+
import{r as v,ck as pt,fy as ue,cl as ft,d9 as mt,df as Ue,dg as Re,fz as Ye,fA as _e,fB as ze,c0 as bt,c1 as ht,j as m,c4 as de,c2 as gt,dc as vt,c3 as K,b9 as G,ch as U,c5 as yt,b_ as ne,cj as Be,fw as Xe,fx as qe,aw as Ge,fC as tt,aG as kt,V as rt,bo as ot,v as at,C as nt,ae as st,H as Ie,_ as lt}from"./index-BAG4sFIa.js";import{v as St}from"./visuallyHidden-Dan1xhjv.js";function xt(e,t,n=(a,p)=>a===p){return e.length===t.length&&e.every((a,p)=>n(a,t[p]))}const wt=2;function ae(e,t,n,a,p){return n===1?Math.min(e+t,p):Math.max(e-t,a)}function it(e,t){return e-t}function Je(e,t){const{index:n}=e.reduce((a,p,k)=>{const S=Math.abs(t-p);return a===null||S<a.distance||S===a.distance?{distance:S,index:k}:a},null)??{};return n}function Le(e,t){if(t.current!==void 0&&e.changedTouches){const n=e;for(let a=0;a<n.changedTouches.length;a+=1){const p=n.changedTouches[a];if(p.identifier===t.current)return{x:p.clientX,y:p.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Me(e,t,n){return(e-t)*100/(n-t)}function Ct(e,t,n){return(n-t)*e+t}function Lt(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),a=n[0].split(".")[1];return(a?a.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function Pt(e,t,n){const a=Math.round((e-n)/t)*t+n;return Number(a.toFixed(Lt(t)))}function Qe({values:e,newValue:t,index:n}){const a=e.slice();return a[n]=t,a.sort(it)}function Pe({sliderRef:e,activeIndex:t,setActive:n}){const a=Re(e.current);(!e.current?.contains(a.activeElement)||Number(a?.activeElement?.getAttribute("data-index"))!==t)&&e.current?.querySelector(`[type="range"][data-index="${t}"]`).focus(),n&&n(t)}function Te(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?xt(e,t):!1}const Tt={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},At=e=>e;let Ae;function Ze(){return Ae===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Ae=CSS.supports("touch-action","none"):Ae=!0),Ae}function Rt(e){const{"aria-labelledby":t,defaultValue:n,disabled:a=!1,disableSwap:p=!1,isRtl:k=!1,marks:S=!1,max:s=100,min:c=0,name:x,onChange:L,onChangeCommitted:H,orientation:A="horizontal",rootRef:Ee,scale:pe=At,step:N=1,shiftStep:J=10,tabIndex:fe,value:Ne}=e,j=v.useRef(void 0),[D,Q]=v.useState(-1),[We,Z]=v.useState(-1),[me,be]=v.useState(!1),ee=v.useRef(0),se=v.useRef(null),[I,R]=pt({controlled:Ne,default:n??c,name:"Slider"}),w=L&&((o,r,l)=>{const d=o.nativeEvent||o,u=new d.constructor(d.type,d);Object.defineProperty(u,"target",{writable:!0,value:{value:r,name:x}}),se.current=r,L(u,r,l)}),te=Array.isArray(I);let h=te?I.slice().sort(it):[I];h=h.map(o=>o==null?c:ue(o,c,s));const le=S===!0&&N!==null?[...Array(Math.floor((s-c)/N)+1)].map((o,r)=>({value:c+N*r})):S||[],b=le.map(o=>o.value),[F,re]=v.useState(-1),f=v.useRef(null),Y=ft(Ee,f),je=o=>r=>{const l=Number(r.currentTarget.getAttribute("data-index"));_e(r.target)&&re(l),Z(l),o?.onFocus?.(r)},He=o=>r=>{_e(r.target)||re(-1),Z(-1),o?.onBlur?.(r)},he=(o,r)=>{const l=Number(o.currentTarget.getAttribute("data-index")),d=h[l],u=b.indexOf(d);let i=r;if(le&&N==null){const z=b[b.length-1];i>=z?i=z:i<=b[0]?i=b[0]:i=i<d?b[u-1]:b[u+1]}if(i=ue(i,c,s),te){p&&(i=ue(i,h[l-1]||-1/0,h[l+1]||1/0));const z=i;i=Qe({values:h,newValue:i,index:l});let M=l;p||(M=i.indexOf(z)),Pe({sliderRef:f,activeIndex:M})}R(i),re(l),w&&!Te(i,I)&&w(o,i,l),H&&H(o,se.current??i)},Ve=o=>r=>{if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(r.key)){r.preventDefault();const l=Number(r.currentTarget.getAttribute("data-index")),d=h[l];let u=null;if(N!=null){const i=r.shiftKey?J:N;switch(r.key){case"ArrowUp":u=ae(d,i,1,c,s);break;case"ArrowRight":u=ae(d,i,k?-1:1,c,s);break;case"ArrowDown":u=ae(d,i,-1,c,s);break;case"ArrowLeft":u=ae(d,i,k?1:-1,c,s);break;case"PageUp":u=ae(d,J,1,c,s);break;case"PageDown":u=ae(d,J,-1,c,s);break;case"Home":u=c;break;case"End":u=s;break}}else if(le){const i=b[b.length-1],z=b.indexOf(d),M=[k?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],y=[k?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];M.includes(r.key)?z===0?u=b[0]:u=b[z-1]:y.includes(r.key)&&(z===b.length-1?u=i:u=b[z+1])}u!=null&&he(r,u)}o?.onKeyDown?.(r)};mt(()=>{a&&f.current.contains(document.activeElement)&&document.activeElement?.blur()},[a]),a&&D!==-1&&Q(-1),a&&F!==-1&&re(-1);const ge=o=>r=>{o.onChange?.(r),he(r,r.target.valueAsNumber)},B=v.useRef(void 0);let W=A;k&&A==="horizontal"&&(W+="-reverse");const _=({finger:o,move:r=!1})=>{const{current:l}=f,{width:d,height:u,bottom:i,left:z}=l.getBoundingClientRect();let M;W.startsWith("vertical")?M=(i-o.y)/u:M=(o.x-z)/d,W.includes("-reverse")&&(M=1-M);let y;if(y=Ct(M,c,s),N)y=Pt(y,N,c);else{const ce=Je(b,y);y=b[ce]}y=ue(y,c,s);let $=0;if(te){r?$=B.current:$=Je(h,y),p&&(y=ue(y,h[$-1]||-1/0,h[$+1]||1/0));const ce=y;y=Qe({values:h,newValue:y,index:$}),p&&r||($=y.indexOf(ce),B.current=$)}return{newValue:y,activeIndex:$}},X=Ue(o=>{const r=Le(o,j);if(!r)return;if(ee.current+=1,o.type==="mousemove"&&o.buttons===0){V(o);return}const{newValue:l,activeIndex:d}=_({finger:r,move:!0});Pe({sliderRef:f,activeIndex:d,setActive:Q}),R(l),!me&&ee.current>wt&&be(!0),w&&!Te(l,I)&&w(o,l,d)}),V=Ue(o=>{const r=Le(o,j);if(be(!1),!r)return;const{newValue:l}=_({finger:r,move:!0});Q(-1),o.type==="touchend"&&Z(-1),H&&H(o,se.current??l),j.current=void 0,q()}),P=Ue(o=>{if(a)return;Ze()||o.preventDefault();const r=o.changedTouches[0];r!=null&&(j.current=r.identifier);const l=Le(o,j);if(l!==!1){const{newValue:u,activeIndex:i}=_({finger:l});Pe({sliderRef:f,activeIndex:i,setActive:Q}),R(u),w&&!Te(u,I)&&w(o,u,i)}ee.current=0;const d=Re(f.current);d.addEventListener("touchmove",X,{passive:!0}),d.addEventListener("touchend",V,{passive:!0})}),q=v.useCallback(()=>{const o=Re(f.current);o.removeEventListener("mousemove",X),o.removeEventListener("mouseup",V),o.removeEventListener("touchmove",X),o.removeEventListener("touchend",V)},[V,X]);v.useEffect(()=>{const{current:o}=f;return o.addEventListener("touchstart",P,{passive:Ze()}),()=>{o.removeEventListener("touchstart",P),q()}},[q,P]),v.useEffect(()=>{a&&q()},[a,q]);const $e=o=>r=>{if(o.onMouseDown?.(r),a||r.defaultPrevented||r.button!==0)return;r.preventDefault();const l=Le(r,j);if(l!==!1){const{newValue:u,activeIndex:i}=_({finger:l});Pe({sliderRef:f,activeIndex:i,setActive:Q}),R(u),w&&!Te(u,I)&&w(r,u,i)}ee.current=0;const d=Re(f.current);d.addEventListener("mousemove",X,{passive:!0}),d.addEventListener("mouseup",V)},ve=Me(te?h[0]:c,c,s),T=Me(h[h.length-1],c,s)-ve,ie=(o={})=>{const r=Ye(o),l={onMouseDown:$e(r||{})},d={...r,...l};return{...o,ref:Y,...d}},ye=o=>r=>{o.onMouseOver?.(r);const l=Number(r.currentTarget.getAttribute("data-index"));Z(l)},ke=o=>r=>{o.onMouseLeave?.(r),Z(-1)},Se=(o={})=>{const r=Ye(o),l={onMouseOver:ye(r||{}),onMouseLeave:ke(r||{})};return{...o,...r,...l}},xe=o=>({pointerEvents:D!==-1&&D!==o?"none":void 0});let oe;return A==="vertical"&&(oe=k?"vertical-rl":"vertical-lr"),{active:D,axis:W,axisProps:Tt,dragging:me,focusedThumbIndex:F,getHiddenInputProps:(o={})=>{const r=Ye(o),l={onChange:ge(r||{}),onFocus:je(r||{}),onBlur:He(r||{}),onKeyDown:Ve(r||{})},d={...r,...l};return{tabIndex:fe,"aria-labelledby":t,"aria-orientation":A,"aria-valuemax":pe(s),"aria-valuemin":pe(c),name:x,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:a,...o,...d,style:{...St,direction:k?"rtl":"ltr",width:"100%",height:"100%",writingMode:oe}}},getRootProps:ie,getThumbProps:Se,marks:le,open:We,range:te,rootRef:Y,trackLeap:T,trackOffset:ve,values:h,getThumbStyle:xe}}const zt=e=>!e||!ze(e);function It(e){return ht("MuiSlider",e)}const E=bt("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),Mt=e=>{const{open:t}=e;return{offset:de(t&&E.valueLabelOpen),circle:E.valueLabelCircle,label:E.valueLabelLabel}};function Et(e){const{children:t,className:n,value:a}=e,p=Mt(e);return t?v.cloneElement(t,{className:t.props.className},m.jsxs(v.Fragment,{children:[t.props.children,m.jsx("span",{className:de(p.offset,n),"aria-hidden":!0,children:m.jsx("span",{className:p.circle,children:m.jsx("span",{className:p.label,children:a})})})]})):null}function et(e){return e}const Nt=G("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${U(n.color)}`],n.size!=="medium"&&t[`size${U(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(ne(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${E.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${E.dragging}`]:{[`& .${E.thumb}, & .${E.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(Be()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),jt=G("span",{name:"MuiSlider",slot:"Rail"})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),Ht=G("span",{name:"MuiSlider",slot:"Track"})(ne(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter(Be()).map(([t])=>({props:{color:t,track:"inverted"},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:Xe(e.palette[t].main,.62),borderColor:Xe(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:qe(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:qe(e.palette[t].main,.5)})}}}))]}))),Vt=G("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${U(n.color)}`],n.size!=="medium"&&t[`thumbSize${U(n.size)}`]]}})(ne(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${E.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(e.palette).filter(Be()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${E.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${Ge(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${E.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${Ge(e.palette[t].main,.16)}`}}}}))]}))),$t=G(Et,{name:"MuiSlider",slot:"ValueLabel"})(ne(({theme:e})=>({zIndex:1,whiteSpace:"nowrap",...e.typography.body2,fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${E.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${E.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]}))),Dt=G("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>tt(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(ne(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),Ot=G("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>tt(e)&&e!=="markLabelActive"})(ne(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),Ft=e=>{const{disabled:t,dragging:n,marked:a,orientation:p,track:k,classes:S,color:s,size:c}=e,x={root:["root",t&&"disabled",n&&"dragging",a&&"marked",p==="vertical"&&"vertical",k==="inverted"&&"trackInverted",k===!1&&"trackFalse",s&&`color${U(s)}`,c&&`size${U(c)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",c&&`thumbSize${U(c)}`,s&&`thumbColor${U(s)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return yt(x,It,S)},Kt=({children:e})=>e,Bt=v.forwardRef(function(t,n){const a=gt({props:t,name:"MuiSlider"}),p=vt(),{"aria-label":k,"aria-valuetext":S,"aria-labelledby":s,component:c="span",components:x={},componentsProps:L={},color:H="primary",classes:A,className:Ee,disableSwap:pe=!1,disabled:N=!1,getAriaLabel:J,getAriaValueText:fe,marks:Ne=!1,max:j=100,min:D=0,name:Q,onChange:We,onChangeCommitted:Z,orientation:me="horizontal",shiftStep:be=10,size:ee="medium",step:se=1,scale:I=et,slotProps:R,slots:w,tabIndex:te,track:h="normal",value:le,valueLabelDisplay:b="off",valueLabelFormat:F=et,...re}=a,f={...a,isRtl:p,max:j,min:D,classes:A,disabled:N,disableSwap:pe,orientation:me,marks:Ne,color:H,size:ee,step:se,shiftStep:be,scale:I,track:h,valueLabelDisplay:b,valueLabelFormat:F},{axisProps:Y,getRootProps:je,getHiddenInputProps:He,getThumbProps:he,open:Ve,active:ge,axis:B,focusedThumbIndex:W,range:_,dragging:X,marks:V,values:P,trackOffset:q,trackLeap:$e,getThumbStyle:ve}=Rt({...f,rootRef:n});f.marked=V.length>0&&V.some(g=>g.label),f.dragging=X,f.focusedThumbIndex=W;const T=Ft(f),ie=w?.root??x.Root??Nt,ye=w?.rail??x.Rail??jt,ke=w?.track??x.Track??Ht,Se=w?.thumb??x.Thumb??Vt,xe=w?.valueLabel??x.ValueLabel??$t,oe=w?.mark??x.Mark??Dt,we=w?.markLabel??x.MarkLabel??Ot,o=w?.input??x.Input??"input",r=R?.root??L.root,l=R?.rail??L.rail,d=R?.track??L.track,u=R?.thumb??L.thumb,i=R?.valueLabel??L.valueLabel,z=R?.mark??L.mark,M=R?.markLabel??L.markLabel,y=R?.input??L.input,$=K({elementType:ie,getSlotProps:je,externalSlotProps:r,externalForwardedProps:re,additionalProps:{...zt(ie)&&{as:c}},ownerState:{...f,...r?.ownerState},className:[T.root,Ee]}),ce=K({elementType:ye,externalSlotProps:l,ownerState:f,className:T.rail}),ct=K({elementType:ke,externalSlotProps:d,additionalProps:{style:{...Y[B].offset(q),...Y[B].leap($e)}},ownerState:{...f,...d?.ownerState},className:T.track}),De=K({elementType:Se,getSlotProps:he,externalSlotProps:u,ownerState:{...f,...u?.ownerState},className:T.thumb}),ut=K({elementType:xe,externalSlotProps:i,ownerState:{...f,...i?.ownerState},className:T.valueLabel}),Oe=K({elementType:oe,externalSlotProps:z,ownerState:f,className:T.mark}),Fe=K({elementType:we,externalSlotProps:M,ownerState:f,className:T.markLabel}),dt=K({elementType:o,getSlotProps:He,externalSlotProps:y,ownerState:f});return m.jsxs(ie,{...$,children:[m.jsx(ye,{...ce}),m.jsx(ke,{...ct}),V.filter(g=>g.value>=D&&g.value<=j).map((g,C)=>{const Ke=Me(g.value,D,j),Ce=Y[B].offset(Ke);let O;return h===!1?O=P.includes(g.value):O=h==="normal"&&(_?g.value>=P[0]&&g.value<=P[P.length-1]:g.value<=P[0])||h==="inverted"&&(_?g.value<=P[0]||g.value>=P[P.length-1]:g.value>=P[0]),m.jsxs(v.Fragment,{children:[m.jsx(oe,{"data-index":C,...Oe,...!ze(oe)&&{markActive:O},style:{...Ce,...Oe.style},className:de(Oe.className,O&&T.markActive)}),g.label!=null?m.jsx(we,{"aria-hidden":!0,"data-index":C,...Fe,...!ze(we)&&{markLabelActive:O},style:{...Ce,...Fe.style},className:de(T.markLabel,Fe.className,O&&T.markLabelActive),children:g.label}):null]},C)}),P.map((g,C)=>{const Ke=Me(g,D,j),Ce=Y[B].offset(Ke),O=b==="off"?Kt:xe;return m.jsx(O,{...!ze(O)&&{valueLabelFormat:F,valueLabelDisplay:b,value:typeof F=="function"?F(I(g),C):F,index:C,open:Ve===C||ge===C||b==="on",disabled:N},...ut,children:m.jsx(Se,{"data-index":C,...De,className:de(T.thumb,De.className,ge===C&&T.active,W===C&&T.focusVisible),style:{...Ce,...ve(C),...De.style},children:m.jsx(o,{"data-index":C,"aria-label":J?J(C):k,"aria-valuenow":I(g),"aria-labelledby":s,"aria-valuetext":fe?fe(I(g),C):S,value:P[C],...dt})})},C)})]})}),Wt=kt(m.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39"}));function _t({teamDid:e,size:t="small",...n}){const{t:a}=rt(),{api:p}=ot(),[k,S]=v.useState(!1),[s,c]=v.useState(null),x=()=>{S(!1),c(null)},L=async()=>{try{S(!0);const A=await p.clearCache({input:{teamDid:e}});Ie.success(a("blocklet.config.clearCache.success",{count:A.removed?.length||0}))}catch(A){Ie.error(lt(A))}finally{S(!1),c(null)}},H={title:a("blocklet.config.clearCache.title"),description:a("blocklet.config.clearCache.description"),confirm:a("common.confirm"),cancel:a("common.cancel"),onConfirm:L,onCancel:x};return m.jsxs("div",{...n,children:[m.jsxs(at,{onClick:()=>c(H),color:"error",variant:"outlined",size:t,children:[k?m.jsx(nt,{size:16,style:{marginRight:5}}):null,a("blocklet.config.clearCache.action")]}),s&&m.jsx(st,{title:s.title,description:s.description,confirm:s.confirm,cancel:s.cancel,onConfirm:s.onConfirm,onCancel:s.onCancel})]})}function Xt({teamDid:e,size:t="small",...n}){const{t:a}=rt(),{api:p}=ot(),[k,S]=v.useState(!1),[s,c]=v.useState(null),x=()=>{S(!1),c(null)},L=async()=>{try{S(!0);const A=await p.rotateSessionKey({input:{teamDid:e}});Ie.success(a("blocklet.config.rotateSessionKey.success",{count:A.removed?.length||0})),setTimeout(()=>{window.location.reload()},1e3)}catch(A){Ie.error(lt(A))}finally{S(!1),c(null)}},H={title:a("blocklet.config.rotateSessionKey.title"),description:a("blocklet.config.rotateSessionKey.description"),confirm:a("common.confirm"),cancel:a("common.cancel"),onConfirm:L,onCancel:x};return m.jsxs("div",{...n,children:[m.jsxs(at,{onClick:()=>c(H),color:"error",variant:"outlined",size:t,children:[k?m.jsx(nt,{size:16,style:{marginRight:5}}):null,a("blocklet.config.rotateSessionKey.action")]}),s&&m.jsx(st,{title:s.title,description:s.description,confirm:s.confirm,cancel:s.cancel,onConfirm:s.onConfirm,onCancel:s.onCancel})]})}export{_t as C,Wt as P,Xt as R,Bt as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{V as k,bo as C,r as d,j as t,T as c,J as D,G as p,s as B,o as l,i as m,K as a,by as H,Q as x,k as L,aE as M,d8 as z,l as U,m as N}from"./index-
|
|
1
|
+
import{V as k,bo as C,r as d,j as t,T as c,J as D,G as p,s as B,o as l,i as m,K as a,by as H,Q as x,k as L,aE as M,d8 as z,l as U,m as N}from"./index-BAG4sFIa.js";import{H as S}from"./index-Z_UozIXP.js";import{u as v}from"./blocklet-CVUABgLB.js";import{x as E}from"./index-DRYJ0xIl.js";import{C as T,M as $}from"./memory-D5_ocLrh.js";import{B as P}from"./status-Cjdz-yj2.js";import{T as w,a as G}from"./ToggleButtonGroup-CATAh5dF.js";import"./FilterList-2EXj6a6n.js";import"./CSSTransition-CgzKcQFn.js";import"./emotion-cache.browser.esm-SC5V9-Mk.js";import"./index-C2IzEz22.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-DGV4LqLy.js";import"./TableSearch-qOyd56Ni.js";import"./Search-BZH2Y-GF.js";import"./Clear-CwtlvQC0.js";import"./MoreVert-CiOr5AIx.js";import"./base-chart-CwZKJ_pP.js";import"./index-VknOfNJf.js";import"./getValidReactChildren-epDyUSMI.js";function R({blocklet:r,cpuHistory:y=[],memoryHistory:u=[],...j}){const{t:i}=k(),{info:f}=C(),{runtimeHistory:s}=v(),[g,b]=d.useState(null),n=d.useCallback(e=>r.status!=="running"?t.jsx(c,{children:i("blocklet.runtimeInfo.noRunning")}):e.length?null:t.jsx(D,{children:i("common.empty")}),[r.status,i]),o=d.useCallback(e=>{b(e)},[]);return s.length===0?t.jsx(c,{children:i("blocklet.runtimeInfo.noRunning")}):t.jsxs(W,{component:"div",...j,memoryHistory:u,cpuHistory:y,children:[t.jsxs(p,{className:"page-metrics",container:!0,spacing:5,children:[t.jsx(p,{sx:{pt:"16px !important"},size:12,children:t.jsx(c,{sx:{fontSize:"16px",fontWeight:"bold"},children:"CPU"})}),s?.map(e=>t.jsx(p,{sx:{pt:"16px !important"},size:{lg:4,md:6,sm:6,xs:12},children:t.jsx(T,{title:`${e.name} CPU`,empty:n(e.cpu),currentLoad:e.appRuntimeInfo?.cpuUsage||0,cpus:e.appRuntimeInfo?.cpus||[],history:e.cpu,onHover:o,hoverIndex:g,style:{height:150}})},`${e.key}-cpu`))]}),t.jsxs(p,{className:"page-metrics",container:!0,spacing:5,sx:{mt:1},children:[t.jsx(p,{sx:{pt:"16px !important"},size:12,children:t.jsx(c,{sx:{fontSize:"16px",fontWeight:"bold"},children:"Memory"})}),s?.map(e=>t.jsx(p,{sx:{pt:"16px !important"},size:{lg:4,md:6,sm:6,xs:12},children:t.jsx($,{title:`${e.name} Memory`,empty:n(e.memory),total:f.runtimeConfig?.blockletMaxMemoryLimit?E.parseSize(`${f.runtimeConfig.blockletMaxMemoryLimit*(e.key===r?.meta?.did?s.length-1:1)}MiB`):0,used:e.appRuntimeInfo?.memoryUsage||0,history:e.memory,onHover:o,hoverIndex:g,style:{height:150}})},`${e.key}-memory`))]})]})}R.propTypes={blocklet:l.object.isRequired,cpuHistory:l.arrayOf(l.shape({date:l.number,value:l.number})),memoryHistory:l.arrayOf(l.shape({date:l.number,value:l.number}))};const W=B(c)``;function ce(){const{t:r,locale:y}=k(),[u,j]=d.useState(6),{blocklet:i,actions:{refreshBlocklet:f}}=v(),s=d.useMemo(()=>{const n=[];return m.forEachBlockletSync(i,(o,{ancestors:e,id:I,level:h})=>{o?.meta?.did&&o.meta.did!==i.meta.did&&n.push({type:"blocklet",groupId:i.meta.did,groupName:m.getDisplayName(i),id:I,name:m.getDisplayName(o,!0),blocklet:i,component:o,level:h-1>=0?h-1:0,runtimeInfo:o.runtimeInfo,ancestors:e})}),n},[i]);d.useEffect(()=>{f({hours:u});const n=setInterval(()=>{f({hours:u})},1e3*10);return()=>{clearInterval(n)}},[u]);const g=n=>U(Number(n||0),{locale:N(y)}),b=[{label:r("common.name"),name:"name",options:{customBodyRenderLite(n){const{name:o,component:e,level:I,ancestors:h}=s[n];return t.jsxs(a,{sx:{display:"flex",alignItems:"center",pl:I*2},children:[t.jsx(H,{size:20,blocklet:e,ancestors:h}),t.jsx(a,{sx:{ml:1},children:o}),t.jsx(P,{variant:"pin",style:{marginLeft:8},status:m.isBlockletRunning(e)?"running":e.status,source:e.source,progress:e.progress})]})}}},{label:r("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(n){const{runtimeInfo:o,component:e}=s[n];return m.isBlockletRunning(e)?g(o?.uptime):t.jsx(x,{title:r("common.noData"),children:"--"})}}},{label:r("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(n){const{runtimeInfo:o,component:e}=s[n];return m.isBlockletRunning(e)?L(o?.memoryUsage||0):t.jsx(x,{title:r("common.noData"),children:"--"})}}},{label:r("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(n){const{runtimeInfo:o,component:e}=s[n];return m.isBlockletRunning(e)?`${(o?.cpuUsage||0).toFixed(1)}%`:t.jsx(x,{title:r("common.noData"),children:"--"})}}},{label:r("analytics.runtime"),name:"runtimeInfo.runtime",options:{customBodyRenderLite(n){const{runtimeInfo:o}=s[n];return o?.uptime?t.jsxs(a,{sx:{display:"flex",alignItems:"center"},children:[t.jsx(M,{icon:o?.runningDocker?"catppuccin:docker-ignore":"logos:nodejs-icon"}),t.jsx(a,{sx:{ml:1},children:o?.runningDocker?"Docker":"Nodejs"})]}):null}}},{label:r("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid",options:{customBodyRenderLite(n){const{runtimeInfo:o,component:e}=s[n];return m.isBlockletRunning(e)?o?.pid:t.jsx(x,{title:r("common.noData"),children:"--"})}}},{label:r("blocklet.runtimeInfo.port"),name:"runtimeInfo.port",options:{customBodyRenderLite(n){const{runtimeInfo:o,component:e}=s[n];return m.isBlockletRunning(e)?o?.port:t.jsx(x,{title:r("common.noData"),children:"--"})}}}];return t.jsxs(O,{component:"div",children:[t.jsxs(a,{sx:{display:"flex",justifyContent:"space-between",flexDirection:"row",mb:2},children:[t.jsx(c,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},sx:{mb:2},children:r("analytics.trend")}),t.jsx(w,{size:"small",exclusive:!0,value:u,onChange:(n,o)=>{z(o)&&j(o)},children:[1,3,6,12,24].map(n=>t.jsxs(G,{value:n,children:[n,"H"]},n))})]}),t.jsx(a,{children:t.jsx(R,{blocklet:i})}),t.jsx(a,{sx:{mt:3},children:t.jsx(S,{title:r("analytics.detail"),className:"monitor-table",locale:y,data:s,columns:b,options:{search:!1,download:!1,filter:!1,print:!1,viewColumns:!1,pagination:!1,rowsPerPage:100}})})]})}const O=B(c)``;export{ce as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r}from"./without-wallet-C1RpuGzp.js";var e=r();export{e as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{gw as o}from"./index-BAG4sFIa.js";const e=o();export{e as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as p,p as s,i as a,j as o,o as m}from"./index-
|
|
1
|
+
import{r as p,p as s,i as a,j as o,o as m}from"./index-BAG4sFIa.js";import{T as c,M as n,t as u}from"./table-icons-Cz9AeFAu.js";import"./FilterList-2EXj6a6n.js";import"./CSSTransition-CgzKcQFn.js";import"./emotion-cache.browser.esm-SC5V9-Mk.js";import"./index-DBii9-f-.js";import"./typeof-QjJsDpFa.js";import"./raf-schd.esm-CCmBZGJO.js";import"./redux-DfszZyTl.js";import"./useThemeProps-C7GjsUo9.js";import"./html-title-BmeDpLW7.js";import"./Add-DDUKFJZu.js";import"./Delete-Go0rVsno.js";import"./Clear-CwtlvQC0.js";import"./Edit-CcS7V9Ak.js";import"./ChevronRight-DkMJwq2n.js";import"./ChevronLeft-j4acQ5VL.js";import"./Search-BZH2Y-GF.js";import"./ArrowDropDown-D2C1Adnj.js";function d({blocklet:i,...r}){const{t}=p.useContext(s),e=a.getBlockletServices(i);if(e.length===0)return o.jsx("div",{children:t("blocklet.noService")});const l=[{title:t("common.name"),field:"name"},{title:t("common.protocol"),field:"protocol"},{title:t("common.port"),field:"port"},{title:t("blocklet.upstreamPort"),field:"upstreamPort"}];return o.jsx(c,{...r,children:o.jsx(n,{columns:l,icons:{...u},options:{sorting:!1,emptyRowsWhenPaging:!1,actionsColumnIndex:-1,tableLayout:"auto",maxBodyHeight:"100%",search:!1,pageSize:1e3,pageSizeOptions:[1e3]},localization:{body:{emptyDataSourceMessage:t("blocklet.noService")}},data:e})})}d.propTypes={blocklet:m.object.isRequired};export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r,T as o,Q as p,o as i}from"./index-
|
|
1
|
+
import{j as r,T as o,Q as p,o as i}from"./index-BAG4sFIa.js";function s(e,n=10){return typeof e=="string"&&e?.length>n?`${e.slice(0,n-1)}...${e.slice(-2)}`:e}function u({children:e,maxLength:n=10,sx:t=null,hiddenTip:l=!1}){return e?.length<=n?r.jsx(o,{sx:t,children:e}):l?r.jsx(o,{sx:t,children:s(e,n)}):r.jsx(p,{title:e,placement:"top",children:r.jsx(o,{sx:t,children:s(e,n)})})}u.propTypes={children:i.string.isRequired,maxLength:i.number,sx:i.object,hiddenTip:i.bool};export{u as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,R as S,S as I,U as O,X as c,K as x,bl as T,T as i,bq as z,eP as W,fg as B,bj as C,o as s}from"./index-
|
|
1
|
+
import{j as e,R as S,S as I,U as O,X as c,K as x,bl as T,T as i,bq as z,eP as W,fg as B,bj as C,o as s}from"./index-BAG4sFIa.js";function M({fullWidth:m=!1,multiple:a=!1,required:o=!1,label:p="",placeholder:j="",options:t=[],helperText:b="",error:v=!1,margin:u="",size:f,slotProps:g={},...h}){const y=t.find(l=>l.value===h.value)?.title;return e.jsxs(S,{margin:u,fullWidth:m,error:v,children:[e.jsx(I,{size:f,children:`${p}${o?"*":""}`}),e.jsxs(O,{multiple:a,sx:{"& .MuiInputBase-input":{width:"calc(100% - 46px)","& > .MuiBox-root:first-of-type":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},input:e.jsx(B,{defaultValue:y,sx:{flex:1},required:o,label:p,inputProps:{margin:u},size:f}),renderValue:l=>{if(a)return e.jsx(x,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:l.map(r=>{const d=t.find(w=>w.value===r);return d&&d.title&&e.jsx(W,{size:"small",label:d.title},r)})});const n=t.find(r=>r.value===l);return n&&n.title&&e.jsxs(x,{children:[e.jsx(i,{component:"span",children:n.title}),e.jsx(i,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:n.description})]})},IconComponent:l=>e.jsx(z,{...l,width:20,height:20}),...h,children:[e.jsx(c,{disabled:!0,children:e.jsx("em",{children:j})}),!o&&!a&&e.jsx(c,{value:"",children:"None"}),t.map(l=>l&&l.value&&e.jsx(c,{value:l.value,disabled:l.disabled||!1,children:e.jsxs(x,{sx:T({display:"flex",flexDirection:"column"},g?.optionItem?.sx),children:[e.jsx(i,{component:"span",children:l.title}),l.description&&e.jsx(i,{component:"span",variant:"body2",sx:{maxWidth:510,fontSize:12,whiteSpace:"normal",color:"text.secondary"},children:l.description})]})},l.value))]}),e.jsx(C,{children:b})]})}M.propTypes={error:s.bool,required:s.bool,multiple:s.bool,fullWidth:s.bool,label:s.string,placeholder:s.string,options:s.array,helperText:s.string,margin:s.string,size:s.string,textDirection:s.oneOf(["row","column"]),slotProps:s.object};export{M as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as u,f7 as l,y as s,z as f,ba as i,dE as m}from"./index-
|
|
1
|
+
import{b as u,f7 as l,y as s,z as f,ba as i,dE as m}from"./index-BAG4sFIa.js";import{a as c}from"./api-C_DWrTOw.js";function P(t){const e=t.replace(/\/api\/space\/.+/,""),a=t.replace(/\/$/,"").split("/"),r=a.at(-4),n=a.at(-2);return s(e,"space",r,"apps",n,`explorer?key=/apps/${n}/.did-objects/${n}/`)}function U(t){const e=t.replace(/\/api\/space\/.+/,""),r=t.replace(/\/$/,"").split("/").at(-4);return s(e,"space",r)}function h(t){return t.replace(/\/$/,"").split("/").at(-4)}async function C(t){try{if(!i(t))return!1;const{headers:e}=await c.head(t,{timeout:5e3});return e["x-listable"]==="true"&&e["x-readable"]==="true"&&e["x-writeable"]==="true"}catch(e){return console.error(e),!1}}function L(t){return t?.find(e=>e.key===u.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT)?.value||""}function y(t){return t?.replace(/\/api\/space\/.+/,"")}function E(t){const e=new URL(t);return s(e.origin,e.pathname)}async function _(t){try{if(!i(t))return!1;const e=E(t),a=s(e,"space/api/did/one-click-authorization/token"),{status:r,data:n}=await c.get(a,{timeout:5e3});return r===200&&m(n)}catch(e){return console.error(e),!1}}async function w(t,{timeout:e}={timeout:3e3}){try{if(!i(t))return"";const{headers:a}=await c.head(t,{timeout:e}),r=a["x-space-name"];return r?decodeURIComponent(r):""}catch(a){return console.error(a),""}}const A=t=>t?.configs?.find(e=>e.key===u.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT)?.value||null;async function b(t){const e={};return e.did=h(t),e.name=await w(t),e.url=y(t),e.endpoint=t,e}async function k(t,e={timeout:3e4,withSearchParams:!0}){if(!l(t))throw new Error(`url(${t}) must be a string`);const a=t.startsWith("http")?t:`https://${t}`,r=new URL(a),{data:n}=await c.get(s(r.origin,"/__blocklet__.js?type=json"),{timeout:e.timeout}),o=n.componentMountPoints.findLast(d=>d.did==="z8iZnaYxnkMD5AKRjTKiCb8pQr1ut8UantAcf")?.mountPoint;if(!o)throw new Error(`MountPoint(${o}) not found`);const p=s(r.origin,o);return e.withSearchParams&&r.searchParams.get("spaceDid")?f(p,{spaceDid:r.searchParams.get("spaceDid")}):p}export{L as a,A as b,b as c,w as d,h as e,U as f,k as g,P as h,_ as i,C as j};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aG as b,j as u,h3 as j,g2 as x,eD as P,cJ as d,V as k,r as q,C as V,Q as w,o as $}from"./index-
|
|
1
|
+
import{aG as b,j as u,h3 as j,g2 as x,eD as P,cJ as d,V as k,r as q,C as V,Q as w,o as $}from"./index-BAG4sFIa.js";import{u as R}from"./index-ZOh2DQ-e.js";import{E}from"./ErrorOutline-DrIyPB6z.js";import{r as D}from"./omit-AtPtqkZn.js";const I=b(u.jsx("path",{d:"M12 2 4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5zm-1.06 13.54L7.4 12l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41z"}));var a={},h;function K(){if(h)return a;h=1;var l=a&&a.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.signResponse=c,a.verifyResponse=S,a.verifyVault=_;const v=l(D),g=l(j()),n=x(),s=P();async function c(e,p){const o=(0,g.default)(e),y=await p.sign(o);return{...e,$signature:y}}function S(e,p){return e.$signature?p.verify((0,g.default)((0,v.default)(e,"$signature")),e.$signature):Promise.resolve(!1)}async function _(e,p,o=!1){if(!Array.isArray(e)||e.length===0){if(o)throw new Error("vaults list is empty");return""}for(let t=1;t<e.length;t++)if(e[t].at<=e[t-1].at){if(o)throw new Error("vaults are not in ascending order");return""}if(new Set(e.map(t=>t.did)).size!==e.length){if(o)throw new Error("vaults list has duplicate vaults");return""}for(let t=0;t<e.length;t++){const r=e[t];if(!(0,s.isFromPublicKey)(r.did,r.pk)){if(o)throw new Error(`vault did and pk mismatch: ${r.did}(${r.pk})`);return""}let f=d.from(`vault:${p}`);for(let i=0;i<=t;i++)f=d.concat([f,d.from(`:${e[i].did}`)]);if(!r.approverSig){if(o)throw new Error(`vault approve signature missing for ${r.did}`);return""}try{let i;if(t>0){const m=e[t-1];i=(0,n.fromPublicKey)(m.pk,(0,s.toTypeInfo)(m.did))}else{if(!r.approverPk||!r.approverDid||!(0,s.isFromPublicKey)(r.approverDid,r.approverPk)){if(o)throw new Error(`approver config missing for ${r.did}`);return""}i=(0,n.fromPublicKey)(r.approverPk,(0,s.toTypeInfo)(r.approverDid))}if(await i.verify(f,r.approverSig)===!1){if(o)throw new Error(`signature verify failed for ${r.did}`);return""}}catch(i){if(console.error(i),o)throw new Error(`vault approve verify failed: ${i.message}`);return""}if(!r.sig){if(o)throw new Error(`vault commit signature missing for ${r.did}`);return""}try{const i=(0,n.fromPublicKey)(r.pk,(0,s.toTypeInfo)(r.did));if(r.approverSig&&(f=d.concat([f,d.from(`:${r.approverSig}`)])),await i.verify(f,r.sig)===!1){if(o)throw new Error(`commit signature verify failed for ${r.did}`);return""}}catch(i){if(console.error(i),o)throw new Error(`vault commit verify failed: ${i.message}`);return""}}return e[e.length-1].did}return a}var T=K();function z({vaults:l,appPid:v}){const{t:g}=k(),[n,s]=R({verified:!1,verifying:!0,error:""});return q.useEffect(()=>{T.verifyVault(l,v,!0).then(c=>{s({verified:!!c,verifying:!1})}).catch(c=>{s({verified:!1,verifying:!1,error:c.message})})},[l,v,s]),n.verifying?u.jsx(V,{}):n.verified?u.jsx(w,{title:g("blocklet.config.vault.verified"),children:u.jsx(I,{fontSize:"small",color:"success"})}):u.jsx(w,{title:n.error,children:u.jsx(E,{color:"error"})})}z.propTypes={vaults:$.array.isRequired,appPid:$.string.isRequired};export{z as V};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as b,j as e,g as j,o,r as C,p as R,i as T,Q as y,K as c,C as k}from"./index-
|
|
1
|
+
import{s as b,j as e,g as j,o,r as C,p as R,i as T,Q as y,K as c,C as k}from"./index-BAG4sFIa.js";const x={success:"#3ab39d",error:"#D0021B"},w="10px",v=b.div`
|
|
2
2
|
display: inline-block;
|
|
3
3
|
min-width: ${s=>s.size||w};
|
|
4
4
|
min-height: ${s=>s.size||w};
|