@abtnode/webapp 1.16.29-beta-1fedbcdd → 1.16.29-beta-8671c2cf
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/{Add-BHECDESg.js → Add-CVNsoK3Q.js} +1 -1
- package/dist/assets/{ArrowDropDown-BDtEjKYX.js → ArrowDropDown-BfO4dBTK.js} +1 -1
- package/dist/assets/{Autocomplete-DFC_FbfN.js → Autocomplete-BuV-jJWs.js} +1 -1
- package/dist/assets/{Breadcrumbs--tlhx_kY.js → Breadcrumbs-D-qFzMeY.js} +1 -1
- package/dist/assets/{ButtonGroup-BsGeyHPH.js → ButtonGroup-DI2J-6OG.js} +1 -1
- package/dist/assets/{CheckCircle-1AjtuJml.js → CheckCircle-ESEiLplI.js} +1 -1
- package/dist/assets/{ChevronLeft-DtF4yZw5.js → ChevronLeft-Bfi7NoHM.js} +1 -1
- package/dist/assets/{ChevronRight-Cg_Yljmq.js → ChevronRight-CviuIMvz.js} +1 -1
- package/dist/assets/{Close-Dh1S6C94.js → Close-NK6lKMNp.js} +1 -1
- package/dist/assets/{Delete-DrNN1_NC.js → Delete-D_zo8qNY.js} +1 -1
- package/dist/assets/DeleteOutline-Cxb7-O66.js +1 -0
- package/dist/assets/{Done-BQoc16v1.js → Done-D45xFqsP.js} +1 -1
- package/dist/assets/{Edit-CJIEc-k0.js → Edit-C2G3tqbR.js} +1 -1
- package/dist/assets/{EditIcon-BCZEwD1D.js → EditIcon-Ck6SNRkS.js} +1 -1
- package/dist/assets/{ExpandMore-DBZtVOu2.js → ExpandMore-CwHt_ZVc.js} +1 -1
- package/dist/assets/{FilterList-DFTqCvYV.js → FilterList-ryS3TXb6.js} +5 -5
- package/dist/assets/{Google-2ljVxqxA.js → Google-D1_AW-DT.js} +3 -3
- package/dist/assets/{Https-HIHB_mu-.js → Https-Dq8brLik.js} +1 -1
- package/dist/assets/{InputAdornment-7NSF5tvp.js → InputAdornment-vZb8BB84.js} +1 -1
- package/dist/assets/{InputLabel-BVacxmju.js → InputLabel-CFeFXjoo.js} +1 -1
- package/dist/assets/{LastPage-TCg78JGB.js → LastPage-qq7jFnRY.js} +1 -1
- package/dist/assets/{Launch-B7XdcudY.js → Launch-DM-OAIt1.js} +1 -1
- package/dist/assets/{Link-DEY_OBXK.js → Link-RUTdr8Sy.js} +1 -1
- package/dist/assets/{LoadingButton-DqL1fjxO.js → LoadingButton-CLB-X53C.js} +1 -1
- package/dist/assets/{LockIcon-C9kXDs34.js → LockIcon-PdwfNCrE.js} +1 -1
- package/dist/assets/{Loop-CU1cNNql.js → Loop-mB6aLQRu.js} +1 -1
- package/dist/assets/{MoreVert-Dt18zfj9.js → MoreVert-Cau6w3Nc.js} +1 -1
- package/dist/assets/{Pagination-BdwJr2l9.js → Pagination-BPEEzqVS.js} +1 -1
- package/dist/assets/{Public-xCpRfmFo.js → Public-RloFzq6s.js} +1 -1
- package/dist/assets/{SchemaReference.es-uz8Zc0eu.js → SchemaReference.es-Cy_VpEXU.js} +1 -1
- package/dist/assets/{Search-CDAInWfT.js → Search-BjnpBn7M.js} +1 -1
- package/dist/assets/{Select-DM4jz5L4.js → Select-DaMjgyJb.js} +2 -2
- package/dist/assets/{Skeleton-gv5XrTGj.js → Skeleton-rnv-ggbJ.js} +1 -1
- package/dist/assets/{Slider--a155kQq.js → Slider-BssF-rMN.js} +1 -1
- package/dist/assets/{Stepper-D4YMSiMG.js → Stepper-Dg253Q8k.js} +1 -1
- package/dist/assets/{TextField-Cb27WYFh.js → TextField-Csggaa8Q.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-zw2F4d4K.js → ToggleButtonGroup-BgYSvys-.js} +1 -1
- package/dist/assets/{ViewList-BN391huQ.js → ViewList-CkwZ1YpX.js} +1 -1
- package/dist/assets/{actions-Dt2hzsMg.js → actions-DDxj2Gro.js} +1 -1
- package/dist/assets/{actions-CqEyEGdi.js → actions-OnAy2baR.js} +1 -1
- package/dist/assets/{agreement-8wzPI5A2.js → agreement-BI9D0qcZ.js} +5 -5
- package/dist/assets/api-C5GhI8g0.js +1 -0
- package/dist/assets/{app-avatar-Ciqu7DzN.js → app-avatar-DxCIyKGs.js} +1 -1
- package/dist/assets/{audit-logs-DM5qrzhq.js → audit-logs-VjS1pNCu.js} +1 -1
- package/dist/assets/blocklet-xOWFDAq8.js +1 -0
- package/dist/assets/{brace-fold.es-CDyoGvqf.js → brace-fold.es-CRh3GTIu.js} +1 -1
- package/dist/assets/{bundle-avatar-DQouFsLp.js → bundle-avatar-aWqgzI5V.js} +1 -1
- package/dist/assets/{chart-CxTMvY28.js → chart-BQeVEXRi.js} +1 -1
- package/dist/assets/{click-to-copy-BWS50T1W.js → click-to-copy-DmXU88NO.js} +1 -1
- package/dist/assets/{closebrackets.es-C8aDSBEc.js → closebrackets.es-Bf8m-8Em.js} +1 -1
- package/dist/assets/{codemirror.es-DIkx1wNL.js → codemirror.es-BDjVt0Cm.js} +1 -1
- package/dist/assets/{comment.es-Bj4rfy15.js → comment.es-I8duadjp.js} +1 -1
- package/dist/assets/{config-navigation-DHVobtoo.js → config-navigation-BbCsdEr0.js} +5 -5
- package/dist/assets/{delete-confirm-COcoVEWd.js → delete-confirm-BmoetJSQ.js} +1 -1
- package/dist/assets/{detail-zEMR4hLv.js → detail-B5zaEe5r.js} +3 -3
- package/dist/assets/{dialog.es-5ELfbGGf.js → dialog.es-ld8i8Wew.js} +1 -1
- package/dist/assets/{download-CufT6M7y.js → download-DgflxEPA.js} +5 -5
- package/dist/assets/{foldgutter.es-BluK5_B7.js → foldgutter.es-BarMj_ub.js} +1 -1
- package/dist/assets/getValidReactChildren-BZgaSkVU.js +1 -0
- package/dist/assets/{hint.es-_r7Ti8Sm.js → hint.es-0PrTUWEC.js} +1 -1
- package/dist/assets/{hint.es2-0WBsR7fo.js → hint.es2-BnIe29Vj.js} +1 -1
- package/dist/assets/{iframe-D7XRwAcu.js → iframe-BR7thU6D.js} +1 -1
- package/dist/assets/{index-Dczcia8A.js → index-1o_Cpjju.js} +3 -3
- package/dist/assets/{index-BQHGajKV.js → index-2cPkOt-p.js} +1 -1
- package/dist/assets/{index-CskaRAHF.js → index-B1y0V6oI.js} +1 -1
- package/dist/assets/{index-CB-tsmEC.js → index-B2mhcMdY.js} +1 -1
- package/dist/assets/{index-LhVZUpfu.js → index-B49E46lJ.js} +1 -1
- package/dist/assets/{index-D4GRkcdU.js → index-B6AJoqpH.js} +1 -1
- package/dist/assets/{index-BdwqHkId.js → index-BZO6weCD.js} +2 -2
- package/dist/assets/{index-C8tv-5HO.js → index-B_SKfObh.js} +1 -1
- package/dist/assets/{index-D3a_ZvXr.js → index-B_X8Mnmw.js} +10 -10
- package/dist/assets/{index-CwegGsPe.js → index-B_whgYLG.js} +1 -1
- package/dist/assets/{index-DnntsDmR.js → index-Bd_QrAUa.js} +1 -1
- package/dist/assets/{index-D52n0VvB.js → index-BgORjHuZ.js} +8 -8
- package/dist/assets/{index-WqNucEB5.js → index-BoyusNjT.js} +9 -9
- package/dist/assets/{index-DCPwvqqA.js → index-BqLwmYDo.js} +1 -1
- package/dist/assets/{index-Db3MJtg9.js → index-C7EE4JGH.js} +1 -1
- package/dist/assets/{index-_k8oY6yd.js → index-CC6C3qvP.js} +1 -1
- package/dist/assets/{index-DmSo_rH-.js → index-CE9jkIu-.js} +7 -7
- package/dist/assets/{index-Ch7pvL8F.js → index-CWcagiwH.js} +1 -1
- package/dist/assets/{index-Ce_LNkxm.js → index-CYFjXOBq.js} +3 -3
- package/dist/assets/{index-DhMPr-Sf.js → index-CZVGhGxp.js} +1 -1
- package/dist/assets/{index-B8SfR5SO.js → index-Cakzfu7O.js} +5 -5
- package/dist/assets/{index-Bx-0NTkd.js → index-CbAhvH5X.js} +1 -1
- package/dist/assets/{index-DAHLtXpZ.js → index-CcAfTAex.js} +3 -3
- package/dist/assets/{index-PLNnQedK.js → index-CiYpieJi.js} +1 -1
- package/dist/assets/{index-4cUBvM9c.js → index-CnMRvtiH.js} +1 -1
- package/dist/assets/{index-Dl7kYtXZ.js → index-Cq4SZMN1.js} +1 -1
- package/dist/assets/{index-BwHAod4o.js → index-CqKpBuSh.js} +1 -1
- package/dist/assets/{index-CkgIO-Ei.js → index-Cwt3A7T1.js} +1 -1
- package/dist/assets/{index-CxOlUKp-.js → index-D-cZu7y9.js} +1 -1
- package/dist/assets/{index-BMpCIzIn.js → index-D07w-tKM.js} +1 -1
- package/dist/assets/{index-B_rtSE94.js → index-D2l1phOs.js} +10 -10
- package/dist/assets/{index-yTu8ymIr.js → index-D83fJ4ZZ.js} +24 -24
- package/dist/assets/{index-D40jtuqJ.js → index-DBffJePm.js} +1 -1
- package/dist/assets/index-DIQO71kA.js +1 -0
- package/dist/assets/index-DSdFsOP8.js +21 -0
- package/dist/assets/{index-BmgCwWx8.js → index-DUwL7XL8.js} +1 -1
- package/dist/assets/{index-_5qLstzu.js → index-DZ-9lK3d.js} +3 -3
- package/dist/assets/{index-opQnaV74.js → index-D_yahWUu.js} +1 -1
- package/dist/assets/{index-BlbV7Lbg.js → index-Df-DcHAh.js} +134 -134
- package/dist/assets/{index-BmZ7fxmH.js → index-DpBO7roy.js} +1 -1
- package/dist/assets/{index-D_4uGOGz.js → index-DwSKqGUi.js} +2 -2
- package/dist/assets/{index-D4-XA9ZN.js → index-ESizcsN5.js} +1 -1
- package/dist/assets/index-RWmdJzPs.js +54 -0
- package/dist/assets/index-n40q7b9N.js +150 -0
- package/dist/assets/{index-sv8YNhSG.js → index-r5OX1XAc.js} +1 -1
- package/dist/assets/{index.es-BYddSuDT.js → index.es-Fps_KP2M.js} +1 -1
- package/dist/assets/{index.esm-BD4d3uVr.js → index.esm-D0DYWJ0J.js} +1 -1
- package/dist/assets/{info-addon.es-BJJ5pk51.js → info-addon.es-BXSU_Qmj.js} +1 -1
- package/dist/assets/{info.es-BprPoOcs.js → info.es-HClq6Fw7.js} +1 -1
- package/dist/assets/install-from-url-Dr1wSd1A.js +1 -0
- package/dist/assets/{invitation-C4QKldyI.js → invitation-sWGyMElP.js} +7 -7
- package/dist/assets/is-path-prefix-equal-DCOkU50l.js +1 -0
- package/dist/assets/{isEqual-D_04lJVB.js → isEqual-CuSHEenP.js} +1 -1
- package/dist/assets/{item-ChafvRb9.js → item-BJWKiK8f.js} +1 -1
- package/dist/assets/{javascript.es-tZuBoyo_.js → javascript.es-B_IsyO6D.js} +1 -1
- package/dist/assets/{jump-to-line.es-DxxXKbig.js → jump-to-line.es-_IMKrBri.js} +1 -1
- package/dist/assets/{jump.es-UWy_0T4j.js → jump.es-CUOB8BsW.js} +1 -1
- package/dist/assets/{line-fPz-YMhM.js → line-ufiIkqQb.js} +4 -4
- package/dist/assets/{lint.es-Dh2OBAEf.js → lint.es-UKbO4MMD.js} +1 -1
- package/dist/assets/{lint.es2-_OaBpmrB.js → lint.es2-B11JVFra.js} +1 -1
- package/dist/assets/{lint.es3-CywO0hV7.js → lint.es3-CpxDSCc5.js} +1 -1
- package/dist/assets/{list-header-Dt_lAmlF.js → list-header-BoMAPPGv.js} +1 -1
- package/dist/assets/{log-KWjsxMN4.js → log-P6GhKjQ3.js} +1 -1
- package/dist/assets/{lottie-CdVErR-8.js → lottie-CWcrdn_r.js} +1 -1
- package/dist/assets/{matchbrackets.es-XbamjB0p.js → matchbrackets.es-BRGFHH5R.js} +1 -1
- package/dist/assets/{memory-iTIi7m4P.js → memory-r4YEj0vP.js} +1 -1
- package/dist/assets/{mode.es-CxfnkJk0.js → mode.es-BbxrAJ36.js} +1 -1
- package/dist/assets/{mode.es2-Dy3nODPA.js → mode.es2-CuBPrcRu.js} +1 -1
- package/dist/assets/{mode.es3-p9hzDihk.js → mode.es3-Bx9ZZNix.js} +1 -1
- package/dist/assets/{onlineParser.es-CpFSa7g2.js → onlineParser.es--mLtLOO_.js} +1 -1
- package/dist/assets/{overview-Cn3o0JSR.js → overview-BT359x8B.js} +2 -2
- package/dist/assets/{react-DOpT91Sx.js → react-CnToiOQq.js} +27 -27
- package/dist/assets/{redux-CrGkFo1C.js → redux-C8OOS_PY.js} +1 -1
- package/dist/assets/{runtime-DH27bqmv.js → runtime-Q3wyKIvm.js} +1 -1
- package/dist/assets/schema-B0MpML_w.js +28 -0
- package/dist/assets/{search.es-DU6gLcL9.js → search.es-CjDQ2Fhj.js} +1 -1
- package/dist/assets/{searchcursor.es-DYLQM5hy.js → searchcursor.es-kDqPKfxE.js} +1 -1
- package/dist/assets/service-DLGpb5Rp.js +1 -0
- package/dist/assets/{shorten-label-C8wzxApJ.js → shorten-label-Co8DUqmu.js} +1 -1
- package/dist/assets/{show-hint.es-aYSOCw1L.js → show-hint.es-Cbx3Ybfe.js} +1 -1
- package/dist/assets/{slicedToArray-CTprXHPZ.js → slicedToArray-C7xZ-QRT.js} +2 -2
- package/dist/assets/{spaces-a8m9RMdh.js → spaces-GvPakdRa.js} +1 -1
- package/dist/assets/{sublime.es-DWBRVmfV.js → sublime.es-C_G3_H-o.js} +1 -1
- package/dist/assets/{switch-control-DPEcexre.js → switch-control-DncyUIeb.js} +1 -1
- package/dist/assets/{table-icons-C4o-NnhS.js → table-icons-DUqTtklC.js} +2 -2
- package/dist/assets/{tag-Bdou5m1X.js → tag-gsV8sxA-.js} +1 -1
- package/dist/assets/{team-DHy_RyhB.js → team-bmjuXLbE.js} +1 -1
- package/dist/assets/toUpper-2qZllqOy.js +1 -0
- package/dist/assets/{traffic-DB2NxLKJ.js → traffic-DqNw6WbG.js} +5 -5
- package/dist/assets/{ua-parser-BSFgl4aM.js → ua-parser-Dzgi3kyq.js} +1 -1
- package/dist/assets/{url-evaluation-C3ISZkf1.js → url-evaluation-B1QGhHSk.js} +1 -1
- package/dist/assets/{url-join-DiQ25GxI.js → url-join-C9rCXo0P.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-D54Dv1sp.js → use-blocklet-info-for-connect-did-spaces-DNT7pV9H.js} +1 -1
- package/dist/assets/{useLocalStorage-DjVTK9Hv.js → useLocalStorage-DQQZU_hU.js} +1 -1
- package/dist/assets/{util-Cymy87Bf.js → util-CY7XCQ7b.js} +1 -1
- package/dist/assets/{wait-container-D3CNDB0j.js → wait-container-CRYt3bDb.js} +1 -1
- package/dist/assets/{withStyles-CeJ3MZXD.js → withStyles-B37CppbG.js} +1 -1
- package/dist/assets/{wrap-locale-OY8SqaYo.js → wrap-locale-D3aDFEon.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/DeleteOutline-BbEJp5Yv.js +0 -1
- package/dist/assets/DeleteOutline-DcoGpr4d.js +0 -1
- package/dist/assets/api-BNsi_m3T.js +0 -1
- package/dist/assets/blocklet-B866XgcM.js +0 -1
- package/dist/assets/getValidReactChildren-C6TVYF1_.js +0 -1
- package/dist/assets/index-8Whrl_cz.js +0 -1
- package/dist/assets/index-BL91wUxY.js +0 -21
- package/dist/assets/index-CXHazti0.js +0 -54
- package/dist/assets/index-CuAczo7P.js +0 -177
- package/dist/assets/install-from-url-ZYnVPJZA.js +0 -1
- package/dist/assets/is-path-prefix-equal-BVP7ErMV.js +0 -1
- package/dist/assets/service-BE-W-CQl.js +0 -1
- package/dist/assets/toUpper-CAcCx7d-.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as v,bR as
|
|
1
|
+
import{r as v,bR as w,bQ as U,bL as x,bN as l,bS as _,bP as W,j as i,bU as z,bV as T,bK as F,eW as K,bY as B}from"./index-Df-DcHAh.js";const Q=v.createContext({}),k=Q,Y=v.createContext({}),D=Y;function q(e){return w("MuiStep",e)}U("MuiStep",["root","horizontal","vertical","alternativeLabel","completed"]);const G=["active","children","className","component","completed","disabled","expanded","index","last"],J=e=>{const{classes:t,orientation:o,alternativeLabel:n,completed:a}=e;return T({root:["root",o,n&&"alternativeLabel",a&&"completed"]},q,t)},O=x("div",{name:"MuiStep",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.orientation],o.alternativeLabel&&t.alternativeLabel,o.completed&&t.completed]}})(({ownerState:e})=>l({},e.orientation==="horizontal"&&{paddingLeft:8,paddingRight:8},e.alternativeLabel&&{flex:1,position:"relative"})),X=v.forwardRef(function(t,o){const n=_({props:t,name:"MuiStep"}),{active:a,children:r,className:b,component:c="div",completed:p,disabled:u,expanded:d=!1,index:s,last:m}=n,R=W(n,G),{activeStep:h,connector:L,alternativeLabel:y,orientation:M,nonLinear:$}=v.useContext(k);let[S=!1,I=!1,C=!1]=[a,p,u];h===s?S=a!==void 0?a:!0:!$&&h>s?I=p!==void 0?p:!0:!$&&h<s&&(C=u!==void 0?u:!0);const N=v.useMemo(()=>({index:s,last:m,expanded:d,icon:s+1,active:S,completed:I,disabled:C}),[s,m,d,S,I,C]),f=l({},n,{active:S,orientation:M,alternativeLabel:y,completed:I,disabled:C,expanded:d,component:c}),j=J(f),P=i.jsxs(O,l({as:c,className:z(j.root,b),ref:o,ownerState:f},R,{children:[L&&y&&s!==0?L:null,r]}));return i.jsx(D.Provider,{value:N,children:L&&!y&&s!==0?i.jsxs(v.Fragment,{children:[L,P]}):P})}),Pe=X,Z=F(i.jsx("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"}),"CheckCircle"),ee=F(i.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");function te(e){return w("MuiStepIcon",e)}const oe=U("MuiStepIcon",["root","active","completed","error","text"]),A=oe;var E;const ne=["active","className","completed","error","icon"],ae=e=>{const{classes:t,active:o,completed:n,error:a}=e;return T({root:["root",o&&"active",n&&"completed",a&&"error"],text:["text"]},te,t)},V=x(K,{name:"MuiStepIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),color:(e.vars||e).palette.text.disabled,[`&.${A.completed}`]:{color:(e.vars||e).palette.primary.main},[`&.${A.active}`]:{color:(e.vars||e).palette.primary.main},[`&.${A.error}`]:{color:(e.vars||e).palette.error.main}})),re=x("text",{name:"MuiStepIcon",slot:"Text",overridesResolver:(e,t)=>t.text})(({theme:e})=>({fill:(e.vars||e).palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily})),se=v.forwardRef(function(t,o){const n=_({props:t,name:"MuiStepIcon"}),{active:a=!1,className:r,completed:b=!1,error:c=!1,icon:p}=n,u=W(n,ne),d=l({},n,{active:a,completed:b,error:c}),s=ae(d);if(typeof p=="number"||typeof p=="string"){const m=z(r,s.root);return c?i.jsx(V,l({as:ee,className:m,ref:o,ownerState:d},u)):b?i.jsx(V,l({as:Z,className:m,ref:o,ownerState:d},u)):i.jsxs(V,l({className:m,ref:o,ownerState:d},u,{children:[E||(E=i.jsx("circle",{cx:"12",cy:"12",r:"12"})),i.jsx(re,{className:s.text,x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",ownerState:d,children:p})]}))}return p}),le=se;function ie(e){return w("MuiStepLabel",e)}const ce=U("MuiStepLabel",["root","horizontal","vertical","label","active","completed","error","disabled","iconContainer","alternativeLabel","labelContainer"]),g=ce,pe=["children","className","componentsProps","error","icon","optional","slotProps","StepIconComponent","StepIconProps"],de=e=>{const{classes:t,orientation:o,active:n,completed:a,error:r,disabled:b,alternativeLabel:c}=e;return T({root:["root",o,r&&"error",b&&"disabled",c&&"alternativeLabel"],label:["label",n&&"active",a&&"completed",r&&"error",b&&"disabled",c&&"alternativeLabel"],iconContainer:["iconContainer",n&&"active",a&&"completed",r&&"error",b&&"disabled",c&&"alternativeLabel"],labelContainer:["labelContainer",c&&"alternativeLabel"]},ie,t)},ve=x("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.orientation]]}})(({ownerState:e})=>l({display:"flex",alignItems:"center",[`&.${g.alternativeLabel}`]:{flexDirection:"column"},[`&.${g.disabled}`]:{cursor:"default"}},e.orientation==="vertical"&&{textAlign:"left",padding:"8px 0"})),be=x("span",{name:"MuiStepLabel",slot:"Label",overridesResolver:(e,t)=>t.label})(({theme:e})=>l({},e.typography.body2,{display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),[`&.${g.active}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${g.completed}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${g.alternativeLabel}`]:{marginTop:16},[`&.${g.error}`]:{color:(e.vars||e).palette.error.main}})),ue=x("span",{name:"MuiStepLabel",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})(()=>({flexShrink:0,display:"flex",paddingRight:8,[`&.${g.alternativeLabel}`]:{paddingRight:0}})),me=x("span",{name:"MuiStepLabel",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>({width:"100%",color:(e.vars||e).palette.text.secondary,[`&.${g.alternativeLabel}`]:{textAlign:"center"}})),H=v.forwardRef(function(t,o){var n;const a=_({props:t,name:"MuiStepLabel"}),{children:r,className:b,componentsProps:c={},error:p=!1,icon:u,optional:d,slotProps:s={},StepIconComponent:m,StepIconProps:R}=a,h=W(a,pe),{alternativeLabel:L,orientation:y}=v.useContext(k),{active:M,disabled:$,completed:S,icon:I}=v.useContext(D),C=u||I;let N=m;C&&!N&&(N=le);const f=l({},a,{active:M,alternativeLabel:L,completed:S,disabled:$,error:p,orientation:y}),j=de(f),P=(n=s.label)!=null?n:c.label;return i.jsxs(ve,l({className:z(j.root,b),ref:o,ownerState:f},h,{children:[C||N?i.jsx(ue,{className:j.iconContainer,ownerState:f,children:i.jsx(N,l({completed:S,active:M,error:p,icon:C},R))}):null,i.jsxs(me,{className:j.labelContainer,ownerState:f,children:[r?i.jsx(be,l({ownerState:f},P,{className:z(j.label,P==null?void 0:P.className),children:r})):null,d]})]}))});H.muiName="StepLabel";const ze=H;function Se(e){return w("MuiStepConnector",e)}U("MuiStepConnector",["root","horizontal","vertical","alternativeLabel","active","completed","disabled","line","lineHorizontal","lineVertical"]);const xe=["className"],Le=e=>{const{classes:t,orientation:o,alternativeLabel:n,active:a,completed:r,disabled:b}=e,c={root:["root",o,n&&"alternativeLabel",a&&"active",r&&"completed",b&&"disabled"],line:["line",`line${B(o)}`]};return T(c,Se,t)},Ce=x("div",{name:"MuiStepConnector",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.orientation],o.alternativeLabel&&t.alternativeLabel,o.completed&&t.completed]}})(({ownerState:e})=>l({flex:"1 1 auto"},e.orientation==="vertical"&&{marginLeft:12},e.alternativeLabel&&{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"})),fe=x("span",{name:"MuiStepConnector",slot:"Line",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.line,t[`line${B(o.orientation)}`]]}})(({ownerState:e,theme:t})=>{const o=t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[600];return l({display:"block",borderColor:t.vars?t.vars.palette.StepConnector.border:o},e.orientation==="horizontal"&&{borderTopStyle:"solid",borderTopWidth:1},e.orientation==="vertical"&&{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24})}),ge=v.forwardRef(function(t,o){const n=_({props:t,name:"MuiStepConnector"}),{className:a}=n,r=W(n,xe),{alternativeLabel:b,orientation:c="horizontal"}=v.useContext(k),{active:p,disabled:u,completed:d}=v.useContext(D),s=l({},n,{alternativeLabel:b,orientation:c,active:p,completed:d,disabled:u}),m=Le(s);return i.jsx(Ce,l({className:z(m.root,a),ref:o,ownerState:s},r,{children:i.jsx(fe,{className:m.line,ownerState:s})}))}),he=ge;function ye(e){return w("MuiStepper",e)}U("MuiStepper",["root","horizontal","vertical","nonLinear","alternativeLabel"]);const $e=["activeStep","alternativeLabel","children","className","component","connector","nonLinear","orientation"],Re=e=>{const{orientation:t,nonLinear:o,alternativeLabel:n,classes:a}=e;return T({root:["root",t,o&&"nonLinear",n&&"alternativeLabel"]},ye,a)},Me=x("div",{name:"MuiStepper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.orientation],o.alternativeLabel&&t.alternativeLabel,o.nonLinear&&t.nonLinear]}})(({ownerState:e})=>l({display:"flex"},e.orientation==="horizontal"&&{flexDirection:"row",alignItems:"center"},e.orientation==="vertical"&&{flexDirection:"column"},e.alternativeLabel&&{alignItems:"flex-start"})),Ie=i.jsx(he,{}),Ne=v.forwardRef(function(t,o){const n=_({props:t,name:"MuiStepper"}),{activeStep:a=0,alternativeLabel:r=!1,children:b,className:c,component:p="div",connector:u=Ie,nonLinear:d=!1,orientation:s="horizontal"}=n,m=W(n,$e),R=l({},n,{nonLinear:d,alternativeLabel:r,orientation:s,component:p}),h=Re(R),L=v.Children.toArray(b).filter(Boolean),y=L.map(($,S)=>v.cloneElement($,l({index:S,last:S+1===L.length},$.props))),M=v.useMemo(()=>({activeStep:a,alternativeLabel:r,connector:u,nonLinear:d,orientation:s}),[a,r,u,d,s]);return i.jsx(k.Provider,{value:M,children:i.jsx(Me,l({as:p,ownerState:R,className:z(h.root,c),ref:o},m,{children:y}))})}),we=Ne;export{we as S,Pe as a,ze as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bR as M,bQ as q,bL as S,bY as L,bN as l,r as N,bS as U,bP as _,
|
|
1
|
+
import{bR as M,bQ as q,bL as S,bY as L,bN as l,r as N,bS as U,bP as _,d3 as re,d4 as le,j as i,bU as B,bV as E,c1 as ae}from"./index-Df-DcHAh.js";import{F as ie,S as ne,a as de,h as ce,O as ue}from"./Select-DaMjgyJb.js";import{I as pe}from"./InputLabel-CFeFXjoo.js";function me(e){return M("MuiFormHelperText",e)}const fe=q("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),j=fe;var w;const xe=["children","className","component","disabled","error","filled","focused","margin","required","variant"],be=e=>{const{classes:s,contained:t,size:r,disabled:n,error:d,filled:c,focused:p,required:u}=e,o={root:["root",n&&"disabled",d&&"error",r&&`size${L(r)}`,t&&"contained",p&&"focused",c&&"filled",u&&"required"]};return E(o,me,s)},Fe=S("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,s)=>{const{ownerState:t}=e;return[s.root,t.size&&s[`size${L(t.size)}`],t.contained&&s.contained,t.filled&&s.filled]}})(({theme:e,ownerState:s})=>l({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${j.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${j.error}`]:{color:(e.vars||e).palette.error.main}},s.size==="small"&&{marginTop:4},s.contained&&{marginLeft:14,marginRight:14})),Te=N.forwardRef(function(s,t){const r=U({props:s,name:"MuiFormHelperText"}),{children:n,className:d,component:c="p"}=r,p=_(r,xe),u=re(),o=le({props:r,muiFormControl:u,states:["variant","size","disabled","error","filled","focused","required"]}),m=l({},r,{component:c,contained:o.variant==="filled"||o.variant==="outlined",variant:o.variant,size:o.size,disabled:o.disabled,error:o.error,filled:o.filled,focused:o.focused,required:o.required}),b=be(m);return i.jsx(Fe,l({as:c,ownerState:m,className:B(b.root,d),ref:t},p,{children:n===" "?w||(w=i.jsx("span",{className:"notranslate",children:""})):n}))}),he=Te;function ve(e){return M("MuiTextField",e)}const Ce=q("MuiTextField",["root"]),je=Ce,ge=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],Re={standard:de,filled:ce,outlined:ue},Ie=e=>{const{classes:s}=e;return E({root:["root"]},ve,s)},ye=S(ie,{name:"MuiTextField",slot:"Root",overridesResolver:(e,s)=>s.root})({}),He=N.forwardRef(function(s,t){const r=U({props:s,name:"MuiTextField"}),{autoComplete:n,autoFocus:d=!1,children:c,className:p,color:u="primary",defaultValue:o,disabled:m=!1,error:b=!1,FormHelperTextProps:O,fullWidth:h=!1,helperText:v,id:V,InputLabelProps:F,inputProps:W,InputProps:k,inputRef:A,label:f,maxRows:Q,minRows:Y,multiline:I=!1,name:D,onBlur:G,onChange:J,onFocus:K,placeholder:X,required:y=!1,rows:Z,select:C=!1,SelectProps:g,type:ee,value:H,variant:T="outlined"}=r,se=_(r,ge),P=l({},r,{autoFocus:d,color:u,disabled:m,error:b,fullWidth:h,multiline:I,required:y,select:C,variant:T}),oe=Ie(P),x={};T==="outlined"&&(F&&typeof F.shrink<"u"&&(x.notched=F.shrink),x.label=f),C&&((!g||!g.native)&&(x.id=void 0),x["aria-describedby"]=void 0);const a=ae(V),R=v&&a?`${a}-helper-text`:void 0,z=f&&a?`${a}-label`:void 0,te=Re[T],$=i.jsx(te,l({"aria-describedby":R,autoComplete:n,autoFocus:d,defaultValue:o,fullWidth:h,multiline:I,name:D,rows:Z,maxRows:Q,minRows:Y,type:ee,value:H,id:a,inputRef:A,onBlur:G,onChange:J,onFocus:K,placeholder:X,inputProps:W},x,k));return i.jsxs(ye,l({className:B(oe.root,p),disabled:m,error:b,fullWidth:h,ref:t,required:y,color:u,variant:T,ownerState:P},se,{children:[f!=null&&f!==""&&i.jsx(pe,l({htmlFor:a,id:z},F,{children:f})),C?i.jsx(ne,l({"aria-describedby":R,id:a,labelId:z,value:H,input:$},g,{children:c})):$,v&&i.jsx(he,l({id:R},O,{children:v}))]}))}),we=He;export{he as F,we as T,me as a,j as f,ve as g,je as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bQ as j,bR as U,r as u,bL as _,bM as H,bY as N,bN as g,
|
|
1
|
+
import{bQ as j,bR as U,r as u,bL as _,bM as H,bY as N,bN as g,ec as W,bP as P,fw as Q,bS as E,j as L,bU as F,bV as V}from"./index-Df-DcHAh.js";import{g as Y}from"./getValidReactChildren-BZgaSkVU.js";function q(t){return U("MuiToggleButton",t)}const I=j("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),x=I,J=u.createContext({}),A=J,K=u.createContext(void 0),D=K;function X(t,o){return o===void 0||t===void 0?!1:Array.isArray(o)?o.indexOf(t)>=0:t===o}const Z=["value"],w=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],S=t=>{const{classes:o,fullWidth:s,selected:r,disabled:f,size:c,color:b}=t,B={root:["root",r&&"selected",f&&"disabled",s&&"fullWidth",`size${N(c)}`,b]};return V(B,q,o)},tt=_(H,{name:"MuiToggleButton",slot:"Root",overridesResolver:(t,o)=>{const{ownerState:s}=t;return[o.root,o[`size${N(s.size)}`]]}})(({theme:t,ownerState:o})=>{let s=o.color==="standard"?t.palette.text.primary:t.palette[o.color].main,r;return t.vars&&(s=o.color==="standard"?t.vars.palette.text.primary:t.vars.palette[o.color].main,r=o.color==="standard"?t.vars.palette.text.primaryChannel:t.vars.palette[o.color].mainChannel),g({},t.typography.button,{borderRadius:(t.vars||t).shape.borderRadius,padding:11,border:`1px solid ${(t.vars||t).palette.divider}`,color:(t.vars||t).palette.action.active},o.fullWidth&&{width:"100%"},{[`&.${x.disabled}`]:{color:(t.vars||t).palette.action.disabled,border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:W(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${x.selected}`]:{color:s,backgroundColor:t.vars?`rgba(${r} / ${t.vars.palette.action.selectedOpacity})`:W(s,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${r} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:W(s,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${r} / ${t.vars.palette.action.selectedOpacity})`:W(s,t.palette.action.selectedOpacity)}}}},o.size==="small"&&{padding:7,fontSize:t.typography.pxToRem(13)},o.size==="large"&&{padding:15,fontSize:t.typography.pxToRem(15)})}),ot=u.forwardRef(function(o,s){const r=u.useContext(A),{value:f}=r,c=P(r,Z),b=u.useContext(D),B=Q(g({},c,{selected:X(o.value,f)}),o),v=E({props:B,name:"MuiToggleButton"}),{children:T,className:p,color:O="standard",disabled:$=!1,disableFocusRipple:a=!1,fullWidth:k=!1,onChange:C,onClick:i,selected:R,size:m="medium",value:h}=v,y=P(v,w),z=g({},v,{color:O,disabled:$,disableFocusRipple:a,fullWidth:k,size:m}),M=S(z),n=d=>{i&&(i(d,h),d.defaultPrevented)||C&&C(d,h)},l=b||"";return L.jsx(tt,g({className:F(c.className,M.root,p,l),disabled:$,focusRipple:!a,ref:s,onClick:n,onChange:C,value:h,ownerState:z,"aria-pressed":R},y,{children:T}))}),ut=ot;function et(t){return U("MuiToggleButtonGroup",t)}const st=j("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),e=st,rt=["children","className","color","disabled","exclusive","fullWidth","onChange","orientation","size","value"],at=t=>{const{classes:o,orientation:s,fullWidth:r,disabled:f}=t,c={root:["root",s==="vertical"&&"vertical",r&&"fullWidth"],grouped:["grouped",`grouped${N(s)}`,f&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return V(c,et,o)},lt=_("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(t,o)=>{const{ownerState:s}=t;return[{[`& .${e.grouped}`]:o.grouped},{[`& .${e.grouped}`]:o[`grouped${N(s.orientation)}`]},{[`& .${e.firstButton}`]:o.firstButton},{[`& .${e.lastButton}`]:o.lastButton},{[`& .${e.middleButton}`]:o.middleButton},o.root,s.orientation==="vertical"&&o.vertical,s.fullWidth&&o.fullWidth]}})(({ownerState:t,theme:o})=>g({display:"inline-flex",borderRadius:(o.vars||o).shape.borderRadius},t.orientation==="vertical"&&{flexDirection:"column"},t.fullWidth&&{width:"100%"},{[`& .${e.grouped}`]:g({},t.orientation==="horizontal"?{[`&.${e.selected} + .${e.grouped}.${e.selected}`]:{borderLeft:0,marginLeft:0}}:{[`&.${e.selected} + .${e.grouped}.${e.selected}`]:{borderTop:0,marginTop:0}})},t.orientation==="horizontal"?{[`& .${e.firstButton},& .${e.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${e.lastButton},& .${e.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0}}:{[`& .${e.firstButton},& .${e.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${e.lastButton},& .${e.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0}},t.orientation==="horizontal"?{[`& .${e.lastButton}.${x.disabled},& .${e.middleButton}.${x.disabled}`]:{borderLeft:"1px solid transparent"}}:{[`& .${e.lastButton}.${x.disabled},& .${e.middleButton}.${x.disabled}`]:{borderTop:"1px solid transparent"}})),nt=u.forwardRef(function(o,s){const r=E({props:o,name:"MuiToggleButtonGroup"}),{children:f,className:c,color:b="standard",disabled:B=!1,exclusive:v=!1,fullWidth:T=!1,onChange:p,orientation:O="horizontal",size:$="medium",value:a}=r,k=P(r,rt),C=g({},r,{disabled:B,fullWidth:T,orientation:O,size:$}),i=at(C),R=u.useCallback((n,l)=>{if(!p)return;const d=a&&a.indexOf(l);let G;a&&d>=0?(G=a.slice(),G.splice(d,1)):G=a?a.concat(l):[l],p(n,G)},[p,a]),m=u.useCallback((n,l)=>{p&&p(n,a===l?null:l)},[p,a]),h=u.useMemo(()=>({className:i.grouped,onChange:v?m:R,value:a,size:$,fullWidth:T,color:b,disabled:B}),[i.grouped,v,m,R,a,$,T,b,B]),y=Y(f),z=y.length,M=n=>{const l=n===0,d=n===z-1;return l&&d?"":l?i.firstButton:d?i.lastButton:i.middleButton};return L.jsx(lt,g({role:"group",className:F(i.root,c),ref:s,ownerState:C},k,{children:L.jsx(A.Provider,{value:h,children:y.map((n,l)=>L.jsx(D.Provider,{value:M(l),children:n},l))})}))}),ct=nt;export{ct as T,ut as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aK as t,aL as a,j as r}from"./index-
|
|
1
|
+
import{aK as t,aL as a,j as r}from"./index-Df-DcHAh.js";var e={},i=a;Object.defineProperty(e,"__esModule",{value:!0});var u=e.default=void 0,v=i(t()),o=r;u=e.default=(0,v.default)((0,o.jsx)("path",{d:"M3 14h4v-4H3zm0 5h4v-4H3zM3 9h4V5H3zm5 5h13v-4H8zm0 5h13v-4H8zM8 5v4h13V5z"}),"ViewList");export{u as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aK as D,aL as E,j as a,r as l,a2 as I,a$ as M,be as _,S as b,aD as z,a9 as R,P as u,n as S}from"./index-
|
|
1
|
+
import{aK as D,aL as E,j as a,r as l,a2 as I,a$ as M,be as _,S as b,aD as z,a9 as R,P as u,n as S}from"./index-Df-DcHAh.js";var o={},C=E;Object.defineProperty(o,"__esModule",{value:!0});var p=o.default=void 0,T=C(D()),k=a;p=o.default=(0,T.default)((0,k.jsx)("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreHoriz");function d({actions:m,size:f,...y}){const[n,i]=l.useState(null),v=!!n,x=e=>{try{e.stopPropagation(),e.preventDefault()}catch{}i(e.currentTarget)},t=e=>{try{e.stopPropagation(),e.preventDefault()}catch{}i(null)};return a.jsxs(q,{...y,children:[a.jsx(I,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"actions-menu-icon",onClick:x,size:f,children:a.jsx(p,{})}),a.jsx(M,{id:"actions-menu","data-cy":"actions-menu",anchorEl:n,keepMounted:!0,open:v,onClose:t,slotProps:{paper:{}},children:m.map((e,r)=>{if(typeof e=="function")return e({close:t});if(e.separator)return a.jsx(_,{},`separator-${r}`);const{icon:h,text:j,render:A,onClick:s,disabled:g=!1,...P}=e;return l.createElement(b,{...P,disabled:g,dense:!0,onClick:async c=>{c.stopPropagation(),await(s==null?void 0:s(c)),t()},key:r,"data-cy":`actions-menu-${r}`},a.jsx(z,{style:{minWidth:24,marginRight:8},children:h}),a.jsx(R,{primary:j}))})})]})}d.propTypes={actions:u.array,size:u.oneOf(["small","medium","large"])};d.defaultProps={actions:[],size:"small"};const q=S.div``;export{d as A};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bt as Ie,bu as Te,bv as Ue,bw as Oe,bx as qe,by as ze,bz as Ne,bA as ke,bB as He,g as Fe,bC as Ge,bD as Ve,bE as We,r as v,j as n,P as j,a1 as Ke,aK as R,aL as b,bF as Xe,n as Je,z as Ze,bm as Qe,f as pe,M as P,b as H,bG as M,a2 as Ye,a$ as et,J as tt,N as nt,be as at,S as rt,aD as st,C as se,a9 as ot,ad as oe,B as it,F as ie,m as q,aZ as ce,A as le,aa as ct,aQ as lt,K as ut,bH as dt,bI as mt,bJ as pt}from"./index-BlbV7Lbg.js";import{_ as ft}from"./useLocalStorage-DjVTK9Hv.js";import{d as vt}from"./MoreVert-Dt18zfj9.js";import{d as ht}from"./Delete-DrNN1_NC.js";import{B as gt}from"./ButtonGroup-BsGeyHPH.js";import{R as xt,b as ue,u as _t}from"./url-evaluation-C3ISZkf1.js";var St=Ie,jt=Oe,yt=qe,Dt=Te,Rt=Ue,bt=ze,$t=200;function Ct(e,r,o,c){var s=-1,u=jt,g=!0,x=e.length,d=[],i=r.length;if(!x)return d;o&&(r=Dt(r,Rt(o))),c?(u=yt,g=!1):r.length>=$t&&(u=bt,g=!1,r=new St(r));e:for(;++s<x;){var p=e[s],f=o==null?p:o(p);if(p=c||p!==0?p:0,g&&f===f){for(var $=i;$--;)if(r[$]===f)continue e;d.push(p)}else u(r,f,c)||d.push(p)}return d}var Lt=Ct,wt=Lt,Bt=Ne,de=ke;function Pt(e,r,o){var c=e.length;if(c<2)return c?de(e[0]):[];for(var s=-1,u=Array(c);++s<c;)for(var g=e[s],x=-1;++x<c;)x!=s&&(u[s]=wt(u[s]||g,e[x],r,o));return de(Bt(u,1),r,o)}var Mt=Pt,At=Ge,Et=He,It=Mt,Tt=We,Ut=Ve,Ot=Et(function(e){var r=Ut(e);return r=typeof r=="function"?r:void 0,It(At(e,Tt),void 0,r)}),qt=Ot;const zt=Fe(qt),fe=v.createContext({});function ve({children:e,type:r}){const[o,c]=v.useState([]),s=v.useRef([]),u=d=>{if(!s.current.includes(d)){const i=[...s.current,d];c(i),s.current=i}},g=d=>{if(s.current.includes(d)){const i=s.current.filter(p=>p!==d);c(i),s.current=i}},x=d=>{const i=o.filter(f=>d.find($=>$===f));zt(i,o).forEach(f=>g(f))};return n.jsx(fe.Provider,{value:{type:r,deletingBlocklets:o,addDeletingDid:u,removeDeletingDid:g,matchDeletingDid:x},children:e})}ve.propTypes={type:j.string,children:j.node.isRequired};ve.defaultProps={type:"blocklets"};function _n(){return v.useContext(fe)}const Nt=(e,r)=>{if(!e)return"";if(!r)return e;const o=new URL(e),c=new URLSearchParams(o.searchParams),s=new URL(Ke(o.origin,r));return s.search=c.toString(),s.toString()};var F={},kt=b;Object.defineProperty(F,"__esModule",{value:!0});var he=F.default=void 0,Ht=kt(R()),Ft=n;he=F.default=(0,Ht.default)((0,Ft.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");var G={},Gt=b;Object.defineProperty(G,"__esModule",{value:!0});var ge=G.default=void 0,Vt=Gt(R()),Wt=n;ge=G.default=(0,Vt.default)((0,Wt.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var V={},Kt=b;Object.defineProperty(V,"__esModule",{value:!0});var xe=V.default=void 0,Xt=Kt(R()),Jt=n;xe=V.default=(0,Xt.default)((0,Jt.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var W={},Zt=b;Object.defineProperty(W,"__esModule",{value:!0});var _e=W.default=void 0,Qt=Zt(R()),Yt=n;_e=W.default=(0,Qt.default)((0,Yt.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var K={},en=b;Object.defineProperty(K,"__esModule",{value:!0});var Se=K.default=void 0,tn=en(R()),nn=n;Se=K.default=(0,tn.default)((0,nn.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var X={},an=b;Object.defineProperty(X,"__esModule",{value:!0});var je=X.default=void 0,rn=an(R()),sn=n;je=X.default=(0,rn.default)((0,sn.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt");var J={},on=b;Object.defineProperty(J,"__esModule",{value:!0});var ye=J.default=void 0,cn=on(R()),ln=n;ye=J.default=(0,cn.default)((0,ln.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var Z={},un=b;Object.defineProperty(Z,"__esModule",{value:!0});var De=Z.default=void 0,dn=un(R()),mn=n;De=Z.default=(0,dn.default)((0,mn.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9"}),"NotInterested");const S={Start:he,Stop:ge,Restart:xe,Reload:_e,Remove:ht,Config:Se,Log:je,Group:ye,Cancel:De,Dashboard:Xe};function Q({blocklet:e,onStart:r,onComplete:o,variant:c,hasPermission:s,getComponentUrl:u,useBlockletUrlEvaluation:g,...x}){const d=Ze(),i=Qe(),[p,f]=v.useState(null),[$,Y]=v.useState(null),[A,E]=v.useState(!1),[m,z]=v.useState(null),{t:a}=v.useContext(pe),[Re]=ft("skip-blocklet-setup",!1),{loading:be,recommendedUrl:$e}=g(e),ee=P.isInProgress(e.status),[N,te]=v.useState(!1);v.useEffect(()=>{var l,y;if(!(e!=null&&e.controller))return;te(((y=(l=e==null?void 0:e.controller)==null?void 0:l.status)==null?void 0:y.value)===H.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var D,C,L;try{const h=await i.api.getLauncherSession({input:{launcherSessionId:(D=e==null?void 0:e.controller)==null?void 0:D.launcherSessionId,launcherUrl:(C=e==null?void 0:e.controller)==null?void 0:C.launcherUrl}});if(h!=null&&h.error){console.error("get launcher session failed",h.error);return}te([ie.LAUNCH_SESSION_STATUS.expired,ie.LAUNCH_SESSION_STATUS.terminated].includes((L=h==null?void 0:h.launcherSession)==null?void 0:L.status))}catch(h){console.error("call getLauncherSession error",h)}})()},[]);const{inService:k}=i,Ce=()=>{const t=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),l=u==null?void 0:u({mountPoint:t,blocklet:e});window.open(Nt(l,".well-known/service/admin"))},I=(t,l,y=!1)=>async()=>{const D=async T=>{var O;r({action:t,blocklet:e}),E(!0),Y(t);let U=!1;try{if(t==="remove")await l(T);else if(t==="start"){if(!P.hasRunnableComponent(e)){le.error(a("blocklet.noComponent"));return}if(!k&&!Re&&!((O=e.settings)!=null&&O.initialized)&&e.mode!==H.BLOCKLET_MODES.DEVELOPMENT){const _=ct(i.info),re=new URL($e);re.searchParams.set("serverUrl",_),window.open(re.href),o({action:t,blocklet:e});return}const w=e.children.filter(_=>!P.isInProgress(_.status)&&_.status!=="running").map(_=>_.meta.did),B={did:e.meta.did,componentDids:w};await l({input:B})}else if(["stop","restart","reload"].includes(t)){const w=e.children.filter(_=>_.status==="running").map(_=>_.meta.did),B={did:e.meta.did,componentDids:w};await l({input:B})}else{const w={did:e.meta.did};await l({input:w})}t==="remove"?U=!0:await lt(1e3),t==="reload"&&le.success(a("blocklet.reloadSuccess")),z(null),o({action:t,blocklet:e})}catch(w){const B=`Blocklet ${t} failed: ${ut(w)}`;throw o({action:t,blocklet:e,error:new Error(B)}),new Error(B)}finally{U||E(!1)}},C=()=>{E(!1),z(null)},L=P.getDisplayName(e,!0),h=e.mode===H.BLOCKLET_MODES.DEVELOPMENT?{description:()=>n.jsx(q,{component:"div",children:n.jsx(q,{gutterBottom:!0,children:a("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(T,U)=>n.jsxs(q,{component:"div",children:[n.jsx(q,{gutterBottom:!0,children:a("blocklet.action.removeApplicationDescription")}),n.jsxs(xt,{name:"removeType",value:T.removeType,onChange:O=>U({...T,removeType:O.target.value}),children:[n.jsx(ce,{value:"backup",control:n.jsx(ue,{}),label:a("blocklet.action.removeApplicationAfterBackup")}),n.jsx(ce,{value:"complete",control:n.jsx(ue,{}),label:a("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},Ee={stop:{title:`${a("common.stop")} ${L}`,description:a("blocklet.action.stopDescription"),confirm:a("blocklet.action.confirmStop"),cancel:a("common.cancel"),onConfirm:D,onCancel:C},restart:{title:`${a("common.restart")} ${L}`,description:a("blocklet.action.restartDescription"),confirm:a("blocklet.action.confirmRestart"),cancel:a("common.cancel"),onConfirm:D,onCancel:C},remove:{title:`${a("common.remove")} ${L}`,confirm:a("blocklet.action.confirmRemove"),cancel:a("common.cancel"),onConfirm:D,onCancel:C,...h},cancelDownload:{title:`${a("common.cancel")}`,description:a("blocklet.action.cancelDownloadDescription",{name:L}),confirm:a("common.confirm"),cancel:a("common.cancel"),onConfirm:D,onCancel:C}};y?z(Ee[t]):await D()},Le=!!p,we=t=>{try{t.stopPropagation(),t.preventDefault()}catch{}f(t.currentTarget)},Be=t=>{try{t.stopPropagation(),t.preventDefault()}catch{}f(null)},ne=async(t,l)=>{try{l.stopPropagation(),l.preventDefault()}catch{}if(typeof t.handler=="function")try{E(!0),Y(t.action),await t.handler()}catch(y){console.error(`Blocklet ${t.name} failed: `,y)}finally{E(!1),f(null)}else f(null)},Pe=!k&&P.isDeletableBlocklet(e)?{action:"remove",icon:S.Remove,name:a("common.remove"),handler:I("remove",async({removeType:t})=>{t==="backup"&&await i.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await i.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:ee}:null,Me={action:"remove",icon:({sx:t,...l})=>n.jsx(S.Cancel,{sx:{...t,paddingRight:"2px",zoom:.95},...l}),name:a("common.cancel"),handler:I("cancelDownload",i.api.cancelDownloadBlocklet,!0)},Ae=P.getAppMissingConfigs(e),ae=[{action:"start",icon:S.Start,name:a("common.start"),handler:I("start",i.api.startBlocklet),disabled:N||e.children.every(t=>t.status==="running")||M(e.status)||be||ee},{action:"stop",icon:S.Stop,name:a("common.stop"),handler:I("stop",i.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",icon:S.Restart,name:a("common.restart"),handler:I("restart",i.api.restartBlocklet,!0),disabled:N||e.status!=="running"},M(e.status)?Me:Pe,{separator:!0},k?null:{action:"dashboard",icon:({style:t,...l})=>n.jsx(S.Dashboard,{...l,style:{...t,width:"26px",height:"26px",paddingRight:"3px"}}),name:a("sidebar.dashboard"),handler:Ce,disabled:N||e.status!=="running"},{separator:!0},{onlyInMenu:!0,action:"config",icon:S.Config,name:a("common.config"),handler:()=>{d(`/blocklets/${e.meta.did}/configuration`)},disabled:M(e.status)},{onlyInMenu:!0,action:"team",icon:S.Group,name:a("common.manageTeam"),handler:()=>{d(`/blocklets/${e.meta.did}/members`)},disabled:M(e.status)},{onlyInMenu:!0,action:"log",icon:S.Log,name:a("common.log"),handler:()=>{d(`/logs/blocklet-${e.meta.did}`)},disabled:M(e.status)}].filter(Boolean);return c==="menu"?n.jsxs(me,{"data-cy":"blocklet-actions",children:[n.jsx(Ye,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:we,size:"small",disabled:!s||!M(e.status)&&A,children:n.jsx(vt,{})}),n.jsxs(et,{id:"actions-menu",anchorEl:p,keepMounted:!0,open:Le,onClose:Be,PaperProps:{},children:[Ae.length>0&&n.jsxs(tt,{style:{maxWidth:"400px"},severity:"error",children:[a("blocklet.config.missingRequired"),n.jsx("br",{}),n.jsx(nt,{to:`/blocklets/${e.meta.did}/components`,children:a("blocklet.config.gotoFix")})]}),ae.map((t,l)=>t.separator?n.jsx(at,{},`separator-${l}`):n.jsxs(rt,{dense:!0,onClick:y=>ne(t,y),disabled:A||t.disabled,"data-cy":`${t.action}-blocklet`,children:[n.jsx(st,{style:{minWidth:24},children:$===t.action&&A?n.jsx(se,{size:16,sx:{marginRight:1}}):n.jsx(t.icon,{fontSize:"small"})}),n.jsx(ot,{primary:t.name})]},t.name))]}),m&&n.jsx(oe,{title:m.title,description:m.description,confirm:m.confirm,cancel:m.cancel,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel})]}):n.jsxs(me,{"data-cy":"blocklet-actions",...x,children:[n.jsx(gt,{children:ae.filter(t=>!t.separator&&!t.onlyInMenu).map(t=>n.jsxs(it,{title:t.name,"data-cy":`${t.action}-blocklet`,onClick:()=>ne(t),disabled:!!t.disabled||A,children:[$===t.action&&A?n.jsx(se,{size:16,sx:{marginRight:1}}):n.jsx(t.icon,{}),n.jsx("span",{className:"blocklet-action-text",children:t.name})]},t.name))}),m&&n.jsx(oe,{title:m.title,description:m.description,confirm:m.confirm,cancel:m.cancel,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel})]})}Q.propTypes={getComponentUrl:j.func,blocklet:j.object.isRequired,onStart:j.func.isRequired,onComplete:j.func.isRequired,variant:j.oneOf(["menu","group"]),hasPermission:j.bool,useBlockletUrlEvaluation:j.func};Q.defaultProps={getComponentUrl:null,variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e;return{loading:!1,recommendedUrl:(e=window==null?void 0:window.location)==null?void 0:e.href}}};const me=Je.div`
|
|
1
|
+
import{bt as Ie,bu as Te,bv as Ue,bw as Oe,bx as qe,by as ze,bz as Ne,bA as ke,bB as He,g as Fe,bC as Ge,bD as Ve,bE as We,r as v,j as n,P as j,a1 as Ke,aK as R,aL as b,bF as Xe,n as Je,z as Ze,bm as Qe,f as pe,M as P,b as H,bG as M,a2 as Ye,a$ as et,J as tt,N as nt,be as at,S as rt,aD as st,C as se,a9 as ot,ad as oe,B as it,F as ie,m as q,aZ as ce,A as le,aa as ct,aQ as lt,K as ut,bH as dt,bI as mt,bJ as pt}from"./index-Df-DcHAh.js";import{_ as ft}from"./useLocalStorage-DQQZU_hU.js";import{d as vt}from"./MoreVert-Cau6w3Nc.js";import{d as ht}from"./Delete-D_zo8qNY.js";import{B as gt}from"./ButtonGroup-DI2J-6OG.js";import{R as xt,b as ue,u as _t}from"./url-evaluation-B1QGhHSk.js";var St=Ie,jt=Oe,yt=qe,Dt=Te,Rt=Ue,bt=ze,$t=200;function Ct(e,r,o,c){var s=-1,u=jt,g=!0,x=e.length,d=[],i=r.length;if(!x)return d;o&&(r=Dt(r,Rt(o))),c?(u=yt,g=!1):r.length>=$t&&(u=bt,g=!1,r=new St(r));e:for(;++s<x;){var p=e[s],f=o==null?p:o(p);if(p=c||p!==0?p:0,g&&f===f){for(var $=i;$--;)if(r[$]===f)continue e;d.push(p)}else u(r,f,c)||d.push(p)}return d}var Lt=Ct,wt=Lt,Bt=Ne,de=ke;function Pt(e,r,o){var c=e.length;if(c<2)return c?de(e[0]):[];for(var s=-1,u=Array(c);++s<c;)for(var g=e[s],x=-1;++x<c;)x!=s&&(u[s]=wt(u[s]||g,e[x],r,o));return de(Bt(u,1),r,o)}var Mt=Pt,At=Ge,Et=He,It=Mt,Tt=We,Ut=Ve,Ot=Et(function(e){var r=Ut(e);return r=typeof r=="function"?r:void 0,It(At(e,Tt),void 0,r)}),qt=Ot;const zt=Fe(qt),fe=v.createContext({});function ve({children:e,type:r}){const[o,c]=v.useState([]),s=v.useRef([]),u=d=>{if(!s.current.includes(d)){const i=[...s.current,d];c(i),s.current=i}},g=d=>{if(s.current.includes(d)){const i=s.current.filter(p=>p!==d);c(i),s.current=i}},x=d=>{const i=o.filter(f=>d.find($=>$===f));zt(i,o).forEach(f=>g(f))};return n.jsx(fe.Provider,{value:{type:r,deletingBlocklets:o,addDeletingDid:u,removeDeletingDid:g,matchDeletingDid:x},children:e})}ve.propTypes={type:j.string,children:j.node.isRequired};ve.defaultProps={type:"blocklets"};function _n(){return v.useContext(fe)}const Nt=(e,r)=>{if(!e)return"";if(!r)return e;const o=new URL(e),c=new URLSearchParams(o.searchParams),s=new URL(Ke(o.origin,r));return s.search=c.toString(),s.toString()};var F={},kt=b;Object.defineProperty(F,"__esModule",{value:!0});var he=F.default=void 0,Ht=kt(R()),Ft=n;he=F.default=(0,Ht.default)((0,Ft.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");var G={},Gt=b;Object.defineProperty(G,"__esModule",{value:!0});var ge=G.default=void 0,Vt=Gt(R()),Wt=n;ge=G.default=(0,Vt.default)((0,Wt.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var V={},Kt=b;Object.defineProperty(V,"__esModule",{value:!0});var xe=V.default=void 0,Xt=Kt(R()),Jt=n;xe=V.default=(0,Xt.default)((0,Jt.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var W={},Zt=b;Object.defineProperty(W,"__esModule",{value:!0});var _e=W.default=void 0,Qt=Zt(R()),Yt=n;_e=W.default=(0,Qt.default)((0,Yt.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var K={},en=b;Object.defineProperty(K,"__esModule",{value:!0});var Se=K.default=void 0,tn=en(R()),nn=n;Se=K.default=(0,tn.default)((0,nn.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var X={},an=b;Object.defineProperty(X,"__esModule",{value:!0});var je=X.default=void 0,rn=an(R()),sn=n;je=X.default=(0,rn.default)((0,sn.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt");var J={},on=b;Object.defineProperty(J,"__esModule",{value:!0});var ye=J.default=void 0,cn=on(R()),ln=n;ye=J.default=(0,cn.default)((0,ln.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var Z={},un=b;Object.defineProperty(Z,"__esModule",{value:!0});var De=Z.default=void 0,dn=un(R()),mn=n;De=Z.default=(0,dn.default)((0,mn.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9"}),"NotInterested");const S={Start:he,Stop:ge,Restart:xe,Reload:_e,Remove:ht,Config:Se,Log:je,Group:ye,Cancel:De,Dashboard:Xe};function Q({blocklet:e,onStart:r,onComplete:o,variant:c,hasPermission:s,getComponentUrl:u,useBlockletUrlEvaluation:g,...x}){const d=Ze(),i=Qe(),[p,f]=v.useState(null),[$,Y]=v.useState(null),[A,E]=v.useState(!1),[m,z]=v.useState(null),{t:a}=v.useContext(pe),[Re]=ft("skip-blocklet-setup",!1),{loading:be,recommendedUrl:$e}=g(e),ee=P.isInProgress(e.status),[N,te]=v.useState(!1);v.useEffect(()=>{var l,y;if(!(e!=null&&e.controller))return;te(((y=(l=e==null?void 0:e.controller)==null?void 0:l.status)==null?void 0:y.value)===H.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var D,C,L;try{const h=await i.api.getLauncherSession({input:{launcherSessionId:(D=e==null?void 0:e.controller)==null?void 0:D.launcherSessionId,launcherUrl:(C=e==null?void 0:e.controller)==null?void 0:C.launcherUrl}});if(h!=null&&h.error){console.error("get launcher session failed",h.error);return}te([ie.LAUNCH_SESSION_STATUS.expired,ie.LAUNCH_SESSION_STATUS.terminated].includes((L=h==null?void 0:h.launcherSession)==null?void 0:L.status))}catch(h){console.error("call getLauncherSession error",h)}})()},[]);const{inService:k}=i,Ce=()=>{const t=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),l=u==null?void 0:u({mountPoint:t,blocklet:e});window.open(Nt(l,".well-known/service/admin"))},I=(t,l,y=!1)=>async()=>{const D=async T=>{var O;r({action:t,blocklet:e}),E(!0),Y(t);let U=!1;try{if(t==="remove")await l(T);else if(t==="start"){if(!P.hasRunnableComponent(e)){le.error(a("blocklet.noComponent"));return}if(!k&&!Re&&!((O=e.settings)!=null&&O.initialized)&&e.mode!==H.BLOCKLET_MODES.DEVELOPMENT){const _=ct(i.info),re=new URL($e);re.searchParams.set("serverUrl",_),window.open(re.href),o({action:t,blocklet:e});return}const w=e.children.filter(_=>!P.isInProgress(_.status)&&_.status!=="running").map(_=>_.meta.did),B={did:e.meta.did,componentDids:w};await l({input:B})}else if(["stop","restart","reload"].includes(t)){const w=e.children.filter(_=>_.status==="running").map(_=>_.meta.did),B={did:e.meta.did,componentDids:w};await l({input:B})}else{const w={did:e.meta.did};await l({input:w})}t==="remove"?U=!0:await lt(1e3),t==="reload"&&le.success(a("blocklet.reloadSuccess")),z(null),o({action:t,blocklet:e})}catch(w){const B=`Blocklet ${t} failed: ${ut(w)}`;throw o({action:t,blocklet:e,error:new Error(B)}),new Error(B)}finally{U||E(!1)}},C=()=>{E(!1),z(null)},L=P.getDisplayName(e,!0),h=e.mode===H.BLOCKLET_MODES.DEVELOPMENT?{description:()=>n.jsx(q,{component:"div",children:n.jsx(q,{gutterBottom:!0,children:a("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(T,U)=>n.jsxs(q,{component:"div",children:[n.jsx(q,{gutterBottom:!0,children:a("blocklet.action.removeApplicationDescription")}),n.jsxs(xt,{name:"removeType",value:T.removeType,onChange:O=>U({...T,removeType:O.target.value}),children:[n.jsx(ce,{value:"backup",control:n.jsx(ue,{}),label:a("blocklet.action.removeApplicationAfterBackup")}),n.jsx(ce,{value:"complete",control:n.jsx(ue,{}),label:a("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},Ee={stop:{title:`${a("common.stop")} ${L}`,description:a("blocklet.action.stopDescription"),confirm:a("blocklet.action.confirmStop"),cancel:a("common.cancel"),onConfirm:D,onCancel:C},restart:{title:`${a("common.restart")} ${L}`,description:a("blocklet.action.restartDescription"),confirm:a("blocklet.action.confirmRestart"),cancel:a("common.cancel"),onConfirm:D,onCancel:C},remove:{title:`${a("common.remove")} ${L}`,confirm:a("blocklet.action.confirmRemove"),cancel:a("common.cancel"),onConfirm:D,onCancel:C,...h},cancelDownload:{title:`${a("common.cancel")}`,description:a("blocklet.action.cancelDownloadDescription",{name:L}),confirm:a("common.confirm"),cancel:a("common.cancel"),onConfirm:D,onCancel:C}};y?z(Ee[t]):await D()},Le=!!p,we=t=>{try{t.stopPropagation(),t.preventDefault()}catch{}f(t.currentTarget)},Be=t=>{try{t.stopPropagation(),t.preventDefault()}catch{}f(null)},ne=async(t,l)=>{try{l.stopPropagation(),l.preventDefault()}catch{}if(typeof t.handler=="function")try{E(!0),Y(t.action),await t.handler()}catch(y){console.error(`Blocklet ${t.name} failed: `,y)}finally{E(!1),f(null)}else f(null)},Pe=!k&&P.isDeletableBlocklet(e)?{action:"remove",icon:S.Remove,name:a("common.remove"),handler:I("remove",async({removeType:t})=>{t==="backup"&&await i.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await i.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:ee}:null,Me={action:"remove",icon:({sx:t,...l})=>n.jsx(S.Cancel,{sx:{...t,paddingRight:"2px",zoom:.95},...l}),name:a("common.cancel"),handler:I("cancelDownload",i.api.cancelDownloadBlocklet,!0)},Ae=P.getAppMissingConfigs(e),ae=[{action:"start",icon:S.Start,name:a("common.start"),handler:I("start",i.api.startBlocklet),disabled:N||e.children.every(t=>t.status==="running")||M(e.status)||be||ee},{action:"stop",icon:S.Stop,name:a("common.stop"),handler:I("stop",i.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",icon:S.Restart,name:a("common.restart"),handler:I("restart",i.api.restartBlocklet,!0),disabled:N||e.status!=="running"},M(e.status)?Me:Pe,{separator:!0},k?null:{action:"dashboard",icon:({style:t,...l})=>n.jsx(S.Dashboard,{...l,style:{...t,width:"26px",height:"26px",paddingRight:"3px"}}),name:a("sidebar.dashboard"),handler:Ce,disabled:N||e.status!=="running"},{separator:!0},{onlyInMenu:!0,action:"config",icon:S.Config,name:a("common.config"),handler:()=>{d(`/blocklets/${e.meta.did}/configuration`)},disabled:M(e.status)},{onlyInMenu:!0,action:"team",icon:S.Group,name:a("common.manageTeam"),handler:()=>{d(`/blocklets/${e.meta.did}/members`)},disabled:M(e.status)},{onlyInMenu:!0,action:"log",icon:S.Log,name:a("common.log"),handler:()=>{d(`/logs/blocklet-${e.meta.did}`)},disabled:M(e.status)}].filter(Boolean);return c==="menu"?n.jsxs(me,{"data-cy":"blocklet-actions",children:[n.jsx(Ye,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:we,size:"small",disabled:!s||!M(e.status)&&A,children:n.jsx(vt,{})}),n.jsxs(et,{id:"actions-menu",anchorEl:p,keepMounted:!0,open:Le,onClose:Be,PaperProps:{},children:[Ae.length>0&&n.jsxs(tt,{style:{maxWidth:"400px"},severity:"error",children:[a("blocklet.config.missingRequired"),n.jsx("br",{}),n.jsx(nt,{to:`/blocklets/${e.meta.did}/components`,children:a("blocklet.config.gotoFix")})]}),ae.map((t,l)=>t.separator?n.jsx(at,{},`separator-${l}`):n.jsxs(rt,{dense:!0,onClick:y=>ne(t,y),disabled:A||t.disabled,"data-cy":`${t.action}-blocklet`,children:[n.jsx(st,{style:{minWidth:24},children:$===t.action&&A?n.jsx(se,{size:16,sx:{marginRight:1}}):n.jsx(t.icon,{fontSize:"small"})}),n.jsx(ot,{primary:t.name})]},t.name))]}),m&&n.jsx(oe,{title:m.title,description:m.description,confirm:m.confirm,cancel:m.cancel,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel})]}):n.jsxs(me,{"data-cy":"blocklet-actions",...x,children:[n.jsx(gt,{children:ae.filter(t=>!t.separator&&!t.onlyInMenu).map(t=>n.jsxs(it,{title:t.name,"data-cy":`${t.action}-blocklet`,onClick:()=>ne(t),disabled:!!t.disabled||A,children:[$===t.action&&A?n.jsx(se,{size:16,sx:{marginRight:1}}):n.jsx(t.icon,{}),n.jsx("span",{className:"blocklet-action-text",children:t.name})]},t.name))}),m&&n.jsx(oe,{title:m.title,description:m.description,confirm:m.confirm,cancel:m.cancel,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel})]})}Q.propTypes={getComponentUrl:j.func,blocklet:j.object.isRequired,onStart:j.func.isRequired,onComplete:j.func.isRequired,variant:j.oneOf(["menu","group"]),hasPermission:j.bool,useBlockletUrlEvaluation:j.func};Q.defaultProps={getComponentUrl:null,variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e;return{loading:!1,recommendedUrl:(e=window==null?void 0:window.location)==null?void 0:e.href}}};const me=Je.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{P as m,n as k,j as i,aK as oe,aL as ae,r as E,B as se,C as le,D as X,g as
|
|
1
|
+
import{P as m,n as k,j as i,aK as oe,aL as ae,r as E,B as se,C as le,D as X,g as H,O as g,M as _,ch as ce,fj as pe,k as y,dH as ue,m as K,F as de,q as V,H as fe,fE as N,bm as me,E as he,z as xe,aZ as ge,a_ as ye,a2 as ve}from"./index-Df-DcHAh.js";import{a as Y,h as be,w as we,f as je,b as Ee,d as ke,e as Ce,M as Ne}from"./index-B6AJoqpH.js";import{j as L}from"./url-join-C9rCXo0P.js";function Se({children:e,...t}){return i.jsx(Te,{...t,children:e})}Se.propTypes={children:m.any.isRequired};const Te=k.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: center;
|
|
@@ -69,8 +69,8 @@ import{P as m,n as k,j as i,aK as oe,aL as ae,r as E,B as se,C as le,D as X,g as
|
|
|
69
69
|
.next-button {
|
|
70
70
|
min-width: 200px;
|
|
71
71
|
}
|
|
72
|
-
`;var $={exports:{}},q=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,$e=/\n/g,Pe=/^\s*/,
|
|
73
|
-
`,z="/",M="*",j="",Me="comment",Ue="declaration",We=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function s(c){var p=c.match($e);p&&(r+=p.length);var v=c.lastIndexOf(ze);n=~v?c.length-v:n+c.length}function a(){var c={line:r,column:n};return function(p){return p.position=new o(c),h(),p}}function o(c){this.start=c,this.end={line:r,column:n},this.source=t.source}o.prototype.content=e;function l(c){var p=new Error(t.source+":"+r+":"+n+": "+c);if(p.reason=c,p.filename=t.source,p.line=r,p.column=n,p.source=e,!t.silent)throw p}function u(c){var p=c.exec(e);if(p){var v=p[0];return s(v),e=e.slice(v.length),p}}function h(){u(Pe)}function f(c){var p;for(c=c||[];p=d();)p!==!1&&c.push(p);return c}function d(){var c=a();if(!(z!=e.charAt(0)||M!=e.charAt(1))){for(var p=2;j!=e.charAt(p)&&(M!=e.charAt(p)||z!=e.charAt(p+1));)++p;if(p+=2,j===e.charAt(p-1))return l("End of comment missing");var v=e.slice(2,p-2);return n+=2,s(v),e=e.slice(p),n+=2,c({type:Me,comment:v})}}function x(){var c=a(),p=u(
|
|
72
|
+
`;var $={exports:{}},q=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,$e=/\n/g,Pe=/^\s*/,Oe=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Be=/^:\s*/,_e=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Le=/^[;\s]*/,qe=/^\s+|\s+$/g,ze=`
|
|
73
|
+
`,z="/",M="*",j="",Me="comment",Ue="declaration",We=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function s(c){var p=c.match($e);p&&(r+=p.length);var v=c.lastIndexOf(ze);n=~v?c.length-v:n+c.length}function a(){var c={line:r,column:n};return function(p){return p.position=new o(c),h(),p}}function o(c){this.start=c,this.end={line:r,column:n},this.source=t.source}o.prototype.content=e;function l(c){var p=new Error(t.source+":"+r+":"+n+": "+c);if(p.reason=c,p.filename=t.source,p.line=r,p.column=n,p.source=e,!t.silent)throw p}function u(c){var p=c.exec(e);if(p){var v=p[0];return s(v),e=e.slice(v.length),p}}function h(){u(Pe)}function f(c){var p;for(c=c||[];p=d();)p!==!1&&c.push(p);return c}function d(){var c=a();if(!(z!=e.charAt(0)||M!=e.charAt(1))){for(var p=2;j!=e.charAt(p)&&(M!=e.charAt(p)||z!=e.charAt(p+1));)++p;if(p+=2,j===e.charAt(p-1))return l("End of comment missing");var v=e.slice(2,p-2);return n+=2,s(v),e=e.slice(p),n+=2,c({type:Me,comment:v})}}function x(){var c=a(),p=u(Oe);if(p){if(d(),!u(Be))return l("property missing ':'");var v=u(_e),ie=c({type:Ue,property:U(p[0].replace(q,j)),value:v?U(v[0].replace(q,j)):j});return u(Le),ie}}function b(){var c=[];f(c);for(var p;p=x();)p!==!1&&(c.push(p),f(c));return c}return h(),b()};function U(e){return e?e.replace(qe,j):j}var Ge=We;function Q(e,t){var r=null;if(!e||typeof e!="string")return r;for(var n,s=Ge(e),a=typeof t=="function",o,l,u=0,h=s.length;u<h;u++)n=s[u],o=n.property,l=n.value,a?t(o,l,n):l&&(r||(r={}),r[o]=l);return r}$.exports=Q;$.exports.default=Q;var Xe=$.exports;const He=H(Xe),Ke={}.hasOwnProperty;function Ve(e,t,r){if(typeof e!="function")throw new TypeError("h is not a function");const n=Qe(e),s=et(e),a=Je(e);let o,l;if(typeof r=="string"||typeof r=="boolean"?(o=r,r={}):(r||(r={}),o=r.prefix),t&&t.type==="root"){const u=t.children[0];l=t.children.length===1&&u.type==="element"?u:{type:"element",tagName:"div",properties:{},children:t.children}}else if(t&&t.type==="element")l=t;else throw new Error("Expected root or element, not `"+(t&&t.type||t)+"`");return Z(e,l,{schema:r.space==="svg"?Y:be,prefix:o==null?n||s||a?"h-":void 0:typeof o=="string"?o:o?"h-":void 0,key:0,react:n,vue:s,vdom:a,hyperscript:Ze(e)})}function Z(e,t,r){const n=r.schema;let s=n,a=t.tagName;const o={},l=[];let u=-1,h;n.space==="html"&&a.toLowerCase()==="svg"&&(s=Y,r.schema=s);for(h in t.properties)t.properties&&Ke.call(t.properties,h)&&Ye(o,h,t.properties[h],r,a);if(r.vdom&&(s.space==="html"?a=a.toUpperCase():s.space&&(o.namespace=we[s.space])),r.prefix&&(r.key++,o.key=r.prefix+r.key),t.children)for(;++u<t.children.length;){const f=t.children[u];f.type==="element"?l.push(Z(e,f,r)):f.type==="text"&&l.push(f.value)}return r.schema=n,l.length>0?e.call(t,a,o,l):e.call(t,a,o)}function Ye(e,t,r,n,s){const a=je(n.schema,t);let o;r==null||typeof r=="number"&&Number.isNaN(r)||r===!1&&(n.vue||n.vdom||n.hyperscript)||!r&&a.boolean&&(n.vue||n.vdom||n.hyperscript)||(Array.isArray(r)&&(r=a.commaSeparated?Ee(r):ke(r)),a.boolean&&n.hyperscript&&(r=""),a.property==="style"&&typeof r=="string"&&(n.react||n.vue||n.vdom)&&(r=tt(r,s)),n.vue?a.property!=="style"&&(o="attrs"):a.mustUseProperty||(n.vdom?a.property!=="style"&&(o="attributes"):n.hyperscript&&(o="attrs")),o?e[o]=Object.assign(e[o]||{},{[a.attribute]:r}):a.space&&n.react?e[Ce[a.property]||a.property]=r:e[a.attribute]=r)}function Qe(e){const t=e("div",{});return!!(t&&("_owner"in t||"_store"in t)&&(t.key===void 0||t.key===null))}function Ze(e){return"context"in e&&"cleanup"in e}function Je(e){return e("div",{}).type==="VirtualNode"}function et(e){const t=e("div",{});return!!(t&&t.context&&t.context._isVue)}function tt(e,t){const r={};try{He(e,(n,s)=>{n.slice(0,4)==="-ms-"&&(n="ms-"+n.slice(4)),r[n.replace(/-([a-z])/g,(a,o)=>o.toUpperCase())]=s})}catch(n){const s=n;throw s.message=t+"[style]"+s.message.slice(9),s}return r}var nt=J;function J(e){if(typeof e=="string")return at(e);if(e==null)return st;if(typeof e=="object")return("length"in e?ot:it)(e);if(typeof e=="function")return e;throw new Error("Expected function, string, or object as test")}function rt(e){for(var t=[],r=e.length,n=-1;++n<r;)t[n]=J(e[n]);return t}function it(e){return t;function t(r){var n;for(n in e)if(r[n]!==e[n])return!1;return!0}}function ot(e){var t=rt(e),r=t.length;return n;function n(){for(var s=-1;++s<r;)if(t[s].apply(this,arguments))return!0;return!1}}function at(e){return t;function t(r){return!!(r&&r.type===e)}}function st(){return!0}var lt=S,ct=nt,ee=!0,te="skip",C=!1;S.CONTINUE=ee;S.SKIP=te;S.EXIT=C;function S(e,t,r,n){var s;typeof t=="function"&&typeof r!="function"&&(n=r,r=t,t=null),s=ct(t),a(e,null,[]);function a(l,u,h){var f=[],d;return(!t||s(l,u,h[h.length-1]||null))&&(f=W(r(l,h)),f[0]===C)?f:l.children&&f[0]!==te?(d=W(o(l.children,h.concat(l))),d[0]===C?d:f):f}function o(l,u){for(var h=-1,f=n?-1:1,d=(n?l.length:h)+f,x;d>h&&d<l.length;){if(x=a(l[d],d,u),x[0]===C)return x;d=typeof x[1]=="number"?x[1]:d+f}}}function W(e){return e!==null&&typeof e=="object"&&"length"in e?e:typeof e=="number"?[ee,e]:[e]}var pt=R,T=lt,ut=T.CONTINUE,dt=T.SKIP,ft=T.EXIT;R.CONTINUE=ut;R.SKIP=dt;R.EXIT=ft;function R(e,t,r,n){typeof t=="function"&&typeof r!="function"&&(n=r,r=t,t=null),T(e,t,s,n);function s(a,o){var l=o[o.length-1],u=l?l.children.indexOf(a):null;return r(a,u,l)}}var mt=pt,ht=Object.prototype.hasOwnProperty,D={align:"text-align",valign:"vertical-align",height:"height",width:"width"},xt=function(t){return mt(t,"element",gt),t};function gt(e){if(!(e.tagName!=="tr"&&e.tagName!=="td"&&e.tagName!=="th")){var t,r;for(t in D)!ht.call(D,t)||e.properties[t]===void 0||(r=D[t],yt(e,r,e.properties[t]),delete e.properties[t])}}function yt(e,t,r){var n=(e.properties.style||"").trim();n&&!/;\s*/.test(n)&&(n+=";"),n&&(n+=" ");var s=n+t+": "+r+";";e.properties.style=s}const vt=H(xt);function bt(e){const t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}const wt={}.hasOwnProperty,jt=new Set(["table","thead","tbody","tfoot","tr"]);function Et(e){if(!e||typeof e.createElement!="function")throw new TypeError("createElement is not a function");const t=e.createElement,r=e.fixTableCellAlign!==!1;Object.assign(this,{Compiler:n});function n(a){let o=Ve(s,r?vt(a):a,e.prefix);return a.type==="root"?(o=o&&typeof o=="object"&&"type"in o&&"props"in o&&o.type==="div"&&(a.children.length!==1||a.children[0].type!=="element")?o.props.children:[o],t(e.Fragment||"div",{},o)):o}function s(a,o,l){if(l&&jt.has(a)&&(l=l.filter(u=>!bt(u))),e.components&&wt.call(e.components,a)){const u=e.components[a];return e.passNode&&typeof u=="function"&&(o=Object.assign({node:this},o)),t(u,o,l)}return t(a,o,l)}}function P({children:e}){return i.jsx(kt,{children:e})}const G="source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace !important",kt=k(g)`
|
|
74
74
|
.highlight pre,
|
|
75
75
|
pre {
|
|
76
76
|
border-radius: 5px;
|
|
@@ -104,7 +104,7 @@ import{P as m,n as k,j as i,aK as oe,aL as ae,r as E,B as se,C as le,D as X,g as
|
|
|
104
104
|
.anchor {
|
|
105
105
|
display: none;
|
|
106
106
|
}
|
|
107
|
-
`;P.propTypes={children:m.any.isRequired};P.defaultProps={};function ne({infoList:e=[]}){return i.jsx(g,{className:"info-table",sx:{display:"grid",gridTemplateColumns:{xs:"1fr",md:"max-content 1fr"},columnGap:4,rowGap:1.5},children:e.map(t=>i.jsxs(i.Fragment,{children:[i.jsx(g,{component:"span",sx:{fontWeight:"bold",whiteSpace:"nowrap"},children:t.key}),i.jsx(g,{component:"span",sx:{marginTop:{xs:-1,md:0}},children:t.value})]}))})}ne.propTypes={infoList:m.arrayOf(m.shape({key:m.string,value:m.string}))};const Ct=e=>e.payment?(e.payment.price||[]).map(r=>r.value||0).every(r=>r===0):!0,Nt=new Et({createElement:E.createElement}).Compiler,w={zh:{appinfo:{name:"应用名",version:"版本号",author:"开发者",description:"描述",community:"社区地址",documentation:"文档手册",support:"服务支持",overview:"概述",requirements:"节点版本要求"}},en:{appinfo:{name:"Name",version:"Version",author:"Author",description:"Description",community:"Community",documentation:"Documentation",support:"Support",overview:"Overview",requirements:"Server requirements"}}};function
|
|
107
|
+
`;P.propTypes={children:m.any.isRequired};P.defaultProps={};function ne({infoList:e=[]}){return i.jsx(g,{className:"info-table",sx:{display:"grid",gridTemplateColumns:{xs:"1fr",md:"max-content 1fr"},columnGap:4,rowGap:1.5},children:e.map(t=>i.jsxs(i.Fragment,{children:[i.jsx(g,{component:"span",sx:{fontWeight:"bold",whiteSpace:"nowrap"},children:t.key}),i.jsx(g,{component:"span",sx:{marginTop:{xs:-1,md:0}},children:t.value})]}))})}ne.propTypes={infoList:m.arrayOf(m.shape({key:m.string,value:m.string}))};const Ct=e=>e.payment?(e.payment.price||[]).map(r=>r.value||0).every(r=>r===0):!0,Nt=new Et({createElement:E.createElement}).Compiler,w={zh:{appinfo:{name:"应用名",version:"版本号",author:"开发者",description:"描述",community:"社区地址",documentation:"文档手册",support:"服务支持",overview:"概述",requirements:"节点版本要求"}},en:{appinfo:{name:"Name",version:"Version",author:"Author",description:"Description",community:"Community",documentation:"Documentation",support:"Support",overview:"Overview",requirements:"Server requirements"}}};function O({blockletMeta:e,locale:t,handleDescEle:r}){const{data:n}=e,{registryUrl:s,did:a}=n,o=_.getDisplayName({meta:n}),l=ce(()=>s&&a?fetch(L(s,"/api/blocklets",a,"readme")).then(c=>c.json()):null,{refreshDeps:[s,a]}),u=pe(()=>l.data?l.data[t]||l.data.en||l.data[Object.keys(l.data)[0]]:"",[l]),h=n&&n.htmlAst?Nt(n.htmlAst):"",f=Ct(n);let d=y(n,"owner.fullName");if(d){const c=y(n,"owner.did");c&&(d=i.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:1},children:[d,i.jsx(ue,{sx:{lineHeight:"initial","&::before":{content:'"("'},"&::after":{content:'")"'}},did:c,compact:!0,size:14,locale:t})]}))}else d=y(n,"author.name");const x=[{key:y(w[t],"appinfo.name"),value:_.getDisplayName({meta:n})},{key:y(w[t],"appinfo.version"),value:n.version},{key:y(w[t],"appinfo.author"),value:d},{type:"description",key:y(w[t],"appinfo.description"),value:n.description}];n.requirements&&x.push({key:y(w[t],"appinfo.requirements"),value:n.requirements.server}),n.community&&x.push({key:y(w[t],"appinfo.community"),value:i.jsx("a",{href:n.community,target:"_blank",rel:"noreferrer",children:n.community})}),n.documentation&&x.push({key:y(w[t],"appinfo.documentation"),value:i.jsx("a",{href:n.documentation,target:"_blank",rel:"noreferrer",children:n.documentation})}),n.support&&x.push({key:y(w[t],"appinfo.support"),value:i.jsx("a",{href:`mailto:${n.support}`,target:"_blank",rel:"noreferrer",children:n.support})}),h&&x.push({key:y(w[t],"appinfo.overview"),value:""});let b;return t==="zh"?b=i.jsxs(i.Fragment,{children:[f?i.jsxs("p",{children:["您可以免费使用 ",i.jsx("b",{children:o}),";"]}):i.jsxs("p",{children:["您需要购买才能使用 ",i.jsx("b",{children:o}),";"]}),i.jsx("p",{children:"在应用启动前,需要选择您的节点;"}),i.jsx("p",{children:"如果您没有节点,我们会引导您创建新的节点;"}),i.jsx("p",{children:"下面为该应用的信息:"})]}):b=i.jsxs(i.Fragment,{children:[f?i.jsxs("p",{children:["You can use ",i.jsx("b",{children:o})," for free;"]}):i.jsxs("p",{children:["You need to purchase before launch ",i.jsx("b",{children:o}),";"]}),i.jsx("p",{children:"Before the blocklet starts, you need to select your Blocklet Server; "}),i.jsx("p",{children:"If you do not have any Blocklet Server, we will guide you to create a new one; "}),i.jsx("p",{children:"Below is the information for the blocklet: "})]}),i.jsxs(Tt,{children:[r||b,i.jsx(ne,{infoList:x}),u?i.jsxs("div",{className:"app-overview",children:[i.jsx(K,{variant:"h5",gutterBottom:!0,children:y(w[t],"appinfo.overview")}),i.jsx(P,{children:i.jsx(St,{component:"div",className:"content-wrapper post-content",children:i.jsx(Ne,{source:u,wrapperElement:{"data-color-mode":"light"},urlTransform:(c,p,v)=>c.startsWith("/")?L(s,c):c})})})]}):h?i.jsx("div",{className:"app-overview",children:h}):null]})}const St=k(K)`
|
|
108
108
|
width: 100%;
|
|
109
109
|
word-wrap: break-word;
|
|
110
110
|
word-break: break-word;
|
|
@@ -152,7 +152,7 @@ import{P as m,n as k,j as i,aK as oe,aL as ae,r as E,B as se,C as le,D as X,g as
|
|
|
152
152
|
margin-left: 2em;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
`;
|
|
155
|
+
`;O.propTypes={blockletMeta:m.object.isRequired,locale:m.string.isRequired,handleDescEle:m.node};O.defaultProps={handleDescEle:""};function Rt({...e}){return i.jsxs("div",{...e,style:{width:"100%"},children:[i.jsx("h3",{children:"End User License Agreement for Application"}),i.jsxs("p",{children:["Blocklet Server License Agreement ",de.COPYRIGHT_OWNER," version 2020-08-28"]}),i.jsx("p",{children:"BLOCKLET SERVER LICENSE AGREEMENT"}),i.jsx("p",{children:"暂无"})]})}function Dt(e){var t,r,n,s;return`${((t=e.bundleSource)==null?void 0:t.store)||e.meta.homepage}/assets/${(r=e.meta)==null?void 0:r.did}/${((n=e.meta)==null?void 0:n.logo)||"logo.png"}?v=${(s=e.meta)==null?void 0:s.version}`}function B({installRelated:e,meta:t,show:r,onClose:n,components:s,loading:a}){const{t:o}=V(),l=fe(d=>d.breakpoints.down("md"));if(!r)return null;const u=!a&&s.length===0,h=!a&&s.length!==0,f=40;return i.jsxs(X,{title:o("blocklet.component.relatedComponents",{name:t.title}),maxWidth:!1,fullWidth:!1,onClose:(d,x)=>{x!=="backdropClick"&&n(!1)},PaperProps:{style:l?{width:"100%",height:window.innerHeight}:{maxWidth:500,minWidth:300,width:"80%"}},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:[a&&i.jsx(g,{sx:{marginTop:4,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"},children:i.jsx(g,{sx:{fontSize:32},color:"primary.main",component:N,icon:"line-md:loading-loop"})}),u&&i.jsx(g,{sx:{textAlign:"center"},children:o("blocklet.component.noDependencies",{name:t.title})}),h&&i.jsx(g,{sx:{marginBottom:2},children:s.map(d=>{if(!d.meta)return null;const{required:x}=d;let b;return e||x?b=1:b=.5,i.jsxs(g,{sx:{opacity:b,padding:"10px 0px",paddingBottom:.5,marginTop:0,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[i.jsx("img",{style:{width:f,height:f,minWidth:f,minHeight:f},src:Dt(d),alt:d.meta.title}),i.jsxs(g,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",flex:1,marginLeft:2},children:[i.jsxs(g,{sx:{display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"center",fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{var c;window.open(`${((c=d.bundleSource)==null?void 0:c.store)||d.meta.homepage}/blocklets/${d.meta.did}`,"_blank")},children:[d.meta.title,i.jsx(g,{sx:{display:x?"inline-block":"none",fontSize:"12px",fontWeight:"bold",marginLeft:1},children:o("blocklet.component.required")}),i.jsxs(g,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[d.meta.version,i.jsx(g,{className:"link-icon",icon:"fluent:open-20-filled",component:N,sx:{color:"primary.main",fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.1s"}})]})]}),i.jsx(g,{sx:{marginTop:0,opacity:.7},children:d.meta.description})]})]},d.meta.did)})})]})}B.propTypes={meta:m.object,show:m.bool,onClose:m.func.isRequired,installRelated:m.func,components:m.array.isRequired,loading:m.bool.isRequired};B.defaultProps={meta:null,show:!1,installRelated:!1};function Ft(e){return e&&(e.registryUrl||e.homepage)&&e.did?`${e.registryUrl||e.homepage}/api/blocklets/${e==null?void 0:e.did}/blocklet.json`:""}function At(e){const{api:t}=me(),[r]=he(),n=r.get("blocklet_meta_url")||Ft(e),[s,a]=E.useState([]),[o,l]=E.useState(!1);return E.useEffect(()=>{!n||e!=null&&e.inputUrl||(l(!0),t.getDynamicComponents({input:{url:n}}).then(u=>{a(u.components)}).finally(()=>{l(!1)}))},[n]),{components:s,loading:o}}function re({installRelated:e,onChangeInstallRelated:t,meta:r,onClickNext:n,handleDescEle:s}){const a=xe(),{t:o,locale:l}=V(),[u,h]=E.useState(!1),{components:f,loading:d}=At(r),x=n||(()=>{a(`/launch-blocklet/install${window.location.search}`)}),b=()=>{h(!0)},c=()=>{h(!1)};return i.jsxs(It,{children:[i.jsx("div",{className:"app-content",children:i.jsx("div",{className:"agreement",children:i.jsx("div",{className:"agreement-content",children:i.jsx(O,{blockletMeta:{data:r},locale:l,handleDescEle:s})})})}),i.jsxs(g,{className:"agreement-bottom",sx:{"> .agreement-loading":{color:"primary.main"}},children:[d?i.jsx(N,{className:"agreement-loading",icon:"line-md:loading-loop",style:{fontSize:42,transform:"scale(0.6)"}}):null,t&&(f!=null&&f.length)?i.jsxs(g,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"},children:[i.jsx(ge,{sx:{mr:.5},checked:e,onChange:p=>t(p.currentTarget.checked),control:i.jsx(ye,{}),label:i.jsx("span",{children:o("launchBlocklet.installRelatedComponents")})}),i.jsx(g,{sx:{"> button svg":{color:"primary.main"}},children:i.jsx(ve,{size:"small",onClick:b,children:i.jsx(N,{icon:"octicon:package-dependencies-16"})})})]}):null,i.jsx("div",{className:"button-container","data-cy":"agree-all",children:i.jsx(I,{onContinue:x,description:i.jsx(Rt,{}),texts:{listenName:o("launchBlocklet.license"),buttonNext:o("launchBlocklet.next")}})})]}),i.jsx(B,{installRelated:e,meta:r,show:u,onClose:c,components:f,loading:d})]})}re.propTypes={meta:m.object.isRequired,onClickNext:m.func,handleDescEle:m.node,installRelated:m.bool,onChangeInstallRelated:m.func};re.defaultProps={onClickNext:null,handleDescEle:"",installRelated:!0,onChangeInstallRelated:null};const It=k.div`
|
|
156
156
|
display: flex;
|
|
157
157
|
flex-direction: column;
|
|
158
158
|
align-items: center;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{av as a}from"./index-Df-DcHAh.js";a.defaults.timeout=10*1e3;const o=a.create();export{o as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bm as A,b as L,a1 as u,
|
|
1
|
+
import{bm as A,b as L,a1 as u,cX as B,bp as $,P as t,j as m,ce as y}from"./index-Df-DcHAh.js";const d=(s,a)=>{var r;let n="?v=";return a?n+=B(a):n+=`${(r=s==null?void 0:s.meta)==null?void 0:r.version}${$(s==null?void 0:s.status)?"~":""}`,n};function P({blocklet:s}){var p,O,g,v;const{inService:a}=A(),n=(p=((s==null?void 0:s.environments)||[]).find(e=>e.key===L.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE))==null?void 0:p.value,r=(O=((s==null?void 0:s.environments)||[]).find(e=>e.key===L.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))==null?void 0:O.value,o=(g=((s==null?void 0:s.environments)||[]).find(e=>e.key===L.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON))==null?void 0:g.value,i=((v=window.env)==null?void 0:v.apiPrefix)||"/",_=`${u(i,`/blocklet/logo/${a?"":s.meta.did}`)}${d(s,n)}`,f=`${u(i,`/blocklet/logo-rect/${a?"":s.meta.did}`)}${d(s,r)}`,C=`${u(i,`/blocklet/logo-favicon/${a?"":s.meta.did}`)}${d(s,o)}`;return{logoUrl:_,rectLogoUrl:f,faviconUrl:C}}function E({blocklet:s,style:a,size:n,...r}){const{logoUrl:o}=P({blocklet:s}),{variant:i}=r;return m.jsx(y,{variant:i||"square",style:Object.assign({backgroundColor:"transparent",width:n,height:n,borderRadius:10},a),...r,children:m.jsx("img",{src:o,alt:"",style:{width:n}})})}E.propTypes={blocklet:t.object.isRequired,style:t.object,size:t.oneOfType([t.number,t.string])};E.defaultProps={style:{},size:40};export{E as B,P as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bm as N,r as u,j as t,A as
|
|
1
|
+
import{bm as N,r as u,j as t,A as B,q as I,C as M,O as b,S as R,n as W,as as E,m as f,N as S,T as O,fB as z,F}from"./index-Df-DcHAh.js";import{c as U,v as D,p as G,s as C,M as Z}from"./index-B6AJoqpH.js";import{E as H}from"./index-D-cZu7y9.js";import{_ as K}from"./useLocalStorage-DQQZU_hU.js";import{F as X,S as q}from"./Select-DaMjgyJb.js";import{I as J}from"./InputLabel-CFeFXjoo.js";import{P as Q}from"./Pagination-BPEEzqVS.js";import"./LastPage-qq7jFnRY.js";const V=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,Y=/^[a-zA-Z]:\\/;function ee(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return Y.test(e)?!1:V.test(e)}const te=["http","https"],re=["nofollow"],se={};function ae(e){const r=e||se,o=r.protocols||te,n=U(r.test);return function(p){D(p,"element",function(s,i,c){if(s.tagName==="a"&&typeof s.properties.href=="string"&&n(s,i,c)){const a=s.properties.href;if(ee(a)?o.includes(a.slice(0,a.indexOf(":"))):a.startsWith("//")){const l=x(r.content,s),y=l&&!Array.isArray(l)?[l]:l,g=x(r.rel,s)||re,m=typeof g=="string"?G(g):g,d=x(r.target,s),v=x(r.properties,s);if(v&&Object.assign(s.properties,C(v)),m.length>0&&(s.properties.rel=[...m]),d&&(s.properties.target=d),y){const w=x(r.contentProperties,s)||{};s.children.push({type:"element",tagName:"span",properties:C(w),children:C(y)})}}}})}}function x(e,r){return typeof e=="function"?e(r):e}const k=u.createContext({}),{Provider:oe,Consumer:ve}=k;function ne({children:e,scope:r="",categories:o=[],showScope:n,scopeFormatter:p}){const{api:s,info:i}=N(),[c,a]=u.useState([]),[l,y]=u.useState({total:0,pageSize:20,pageCount:0,page:1}),[g,m]=u.useState(!1),[d,v]=K(`audit-log-category-${r}`,"all"),$=[{value:"all",label:"All",description:""},{value:"blocklet",label:"Blocklet Management",description:""},{value:"server",label:"Server Management",description:""},{value:"team",label:"Team Management",description:""},{value:"security",label:"Security",description:""},{value:"certificates",label:"Certificate Management",description:""},{value:"integrations",label:"Integration Management",description:""},{value:"gateway",label:"Gateway",description:""}].filter(j=>o.length?j.value==="all"||o.includes(j.value):!0),L=async({page:j=1,silent:_=!0}={})=>{if(!g){_||m(!0);try{const h=await s.getAuditLogs({input:{paging:{page:j},category:d==="all"?"":d,scope:r}});n&&(h.list||[]).forEach(A=>{A.scope!==i.did&&(A.link=`/blocklets/${A.scope}/components`)}),a(h.list),y(h.paging),m(!1)}catch(h){B.error(h.message),m(!1)}}};u.useEffect(()=>{L({page:1,silent:!1})},[]),u.useEffect(()=>{L({page:1,silent:!1})},[d]);const T={loading:g,fetch:L,filter:{category:d,scope:r},categories:$,setCategory:v,data:c,paging:l,showScope:n,scopeFormatter:p};return t.jsx(oe,{value:{auditLogs:T},children:e})}function P(){const{auditLogs:e}=u.useContext(k);return e}const ie=({log:e,info:r,inService:o})=>o?`${F.WELLKNOWN_BLOCKLET_ADMIN_PATH}/members?did=${e.actor.did}`:e.scope===r.did?`/team/members?did=${e.actor.did}`:`/blocklets/${e.scope}/members?did=${e.actor.did}`;function ce({log:e}){var i,c;const{inService:r,info:o}=N(),{showScope:n,scopeFormatter:p=a=>a}=P();if(!e.actor.did)return null;const s=!["blocklet",""].includes(e.actor.role);return t.jsxs(b,{className:"log-entry","data-cy":"log-entry",children:[t.jsx("div",{className:"log-author",children:s?t.jsx(E,{did:e.actor.did,size:36,shape:"circle"}):t.jsx(E,{did:e.actor.did,size:36})}),t.jsxs("div",{className:"log-body",children:[t.jsxs(f,{className:"log-header",color:"textSecondary",component:"p",gutterBottom:!0,display:"flex",alignItems:"center",children:[n&&t.jsx(S,{to:e.link,children:t.jsx(O,{style:{marginRight:8},children:p(e.scope)})}),s?t.jsxs(S,{to:ie({log:e,inService:r,info:o}),target:"_blank",children:[e.actor.fullName,e.actor.role?`(${e.actor.role})`:""]}):t.jsxs("span",{children:[e.actor.fullName,e.actor.role?`(${e.actor.role})`:""]})," ",t.jsx("span",{style:{margin:"0 4px"},children:"-"})," ",e.action]}),t.jsx(f,{className:"log-content",maxWidth:"lg",color:"textPrimary",component:"div","data-color-mode":"light",gutterBottom:!0,children:t.jsx(Z,{source:e.content,rehypePlugins:[[ae,{target:"_blank"}]]})}),t.jsxs(b,{className:"log-meta",variant:"body2",children:[!!e.ip&&t.jsx(f,{component:"span",color:"textSecondary",children:`IP: ${e.ip}`}),!!((i=e.env.os)!=null&&i.name)&&t.jsxs(f,{component:"span",color:"textSecondary",children:[e.env.os.name,"(",e.env.os.version,")"]}),!!((c=e.env.browser)!=null&&c.name)&&t.jsxs(f,{component:"span",color:"textSecondary",children:[e.env.browser.name,"(",e.env.browser.version,")"]}),t.jsx(f,{component:"span",color:"textSecondary",children:t.jsx(z,{value:e.createdAt})})]})]})]})}function le(){const{t:e}=I(),{data:r,loading:o,paging:n,filter:p,categories:s,setCategory:i,fetch:c}=P();return o?t.jsx("div",{style:{textAlign:"center",marginTop:"50px"},children:t.jsx(M,{})}):t.jsxs(pe,{"data-cy":"audit-logs",children:[t.jsx(b,{className:"log-controls",children:t.jsxs(X,{style:{width:"240px"},variant:"outlined",children:[t.jsx(J,{children:e("common.filter")}),t.jsx(q,{"data-cy":"filter-by-category-trigger",value:p.category,onChange:a=>i(a.target.value),fullWidth:!0,label:e("common.category"),disabled:o,children:s.map(a=>t.jsx(R,{value:a.value,"data-cy":`filter-by-category-${a.value}`,children:t.jsx(b,{children:t.jsx("span",{children:a.label})})},a.label))})]})}),r.length===0&&t.jsx(H,{children:e("common.empty")}),r.length>0&&r.map(a=>t.jsx(ce,{log:a},a.id)),n.pageCount>1&&t.jsx(Q,{page:n.page,count:n.pageCount,onChange:(a,l)=>c({page:l}),showFirstButton:!0,showLastButton:!0})]})}function je({scope:e,categories:r,showScope:o,scopeFormatter:n}){return t.jsx(ne,{scope:e,categories:r,showScope:o,scopeFormatter:n,children:t.jsx(le,{})})}const pe=W.div`
|
|
2
2
|
.log-controls {
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t}from"./index-Df-DcHAh.js";const e=t.createContext({});function r(){return t.useContext(e)}export{e as B,r as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as I}from"./codemirror.es-
|
|
1
|
+
import{a as I}from"./codemirror.es-BDjVt0Cm.js";import"./index-Cakzfu7O.js";import"./index-Df-DcHAh.js";var H=Object.defineProperty,L=(k,m)=>H(k,"name",{value:m,configurable:!0});function j(k,m){return m.forEach(function(e){e&&typeof e!="string"&&!Array.isArray(e)&&Object.keys(e).forEach(function(u){if(u!=="default"&&!(u in k)){var n=Object.getOwnPropertyDescriptor(e,u);Object.defineProperty(k,u,n.get?n:{enumerable:!0,get:function(){return e[u]}})}})}),Object.freeze(k)}L(j,"_mergeNamespaces");var F={exports:{}};(function(k,m){(function(e){e(I.exports)})(function(e){function u(n){return function(o,a){var r=a.line,s=o.getLine(r);function c(i){for(var l,v=a.ch,p=0;;){var b=v<=0?-1:s.lastIndexOf(i[0],v-1);if(b==-1){if(p==1)break;p=1,v=s.length;continue}if(p==1&&b<a.ch)break;if(l=o.getTokenTypeAt(e.Pos(r,b+1)),!/^(comment|string)/.test(l))return{ch:b+1,tokenType:l,pair:i};v=b-1}}L(c,"findOpening");function h(i){var l=1,v=o.lastLine(),p,b=i.ch,A;e:for(var d=r;d<=v;++d)for(var T=o.getLine(d),P=d==r?b:0;;){var O=T.indexOf(i.pair[0],P),_=T.indexOf(i.pair[1],P);if(O<0&&(O=T.length),_<0&&(_=T.length),P=Math.min(O,_),P==T.length)break;if(o.getTokenTypeAt(e.Pos(d,P+1))==i.tokenType){if(P==O)++l;else if(!--l){p=d,A=P;break e}}++P}return p==null||r==p?null:{from:e.Pos(r,b),to:e.Pos(p,A)}}L(h,"findRange");for(var f=[],t=0;t<n.length;t++){var g=c(n[t]);g&&f.push(g)}f.sort(function(i,l){return i.ch-l.ch});for(var t=0;t<f.length;t++){var y=h(f[t]);if(y)return y}return null}}L(u,"bracketFolding"),e.registerHelper("fold","brace",u([["{","}"],["[","]"]])),e.registerHelper("fold","brace-paren",u([["{","}"],["[","]"],["(",")"]])),e.registerHelper("fold","import",function(n,o){function a(t){if(t<n.firstLine()||t>n.lastLine())return null;var g=n.getTokenAt(e.Pos(t,1));if(/\S/.test(g.string)||(g=n.getTokenAt(e.Pos(t,g.end+1))),g.type!="keyword"||g.string!="import")return null;for(var y=t,i=Math.min(n.lastLine(),t+10);y<=i;++y){var l=n.getLine(y),v=l.indexOf(";");if(v!=-1)return{startCh:g.end,end:e.Pos(y,v)}}}L(a,"hasImport");var r=o.line,s=a(r),c;if(!s||a(r-1)||(c=a(r-2))&&c.end.line==r-1)return null;for(var h=s.end;;){var f=a(h.line+1);if(f==null)break;h=f.end}return{from:n.clipPos(e.Pos(r,s.startCh+1)),to:h}}),e.registerHelper("fold","include",function(n,o){function a(f){if(f<n.firstLine()||f>n.lastLine())return null;var t=n.getTokenAt(e.Pos(f,1));if(/\S/.test(t.string)||(t=n.getTokenAt(e.Pos(f,t.end+1))),t.type=="meta"&&t.string.slice(0,8)=="#include")return t.start+8}L(a,"hasInclude");var r=o.line,s=a(r);if(s==null||a(r-1)!=null)return null;for(var c=r;;){var h=a(c+1);if(h==null)break;++c}return{from:e.Pos(r,s+1),to:n.clipPos(e.Pos(c))}})})})();var S=F.exports,E=Object.freeze(j({__proto__:null,[Symbol.toStringTag]:"Module",default:S},[F.exports]));export{E as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bm as x,bG as v,gx as P,a1 as m,aB as $,F as j,gy as E,j as y,as as h,ce as R,P as r}from"./index-
|
|
1
|
+
import{bm as x,bG as v,gx as P,a1 as m,aB as $,F as j,gy as E,j as y,as as h,ce as R,P as r}from"./index-Df-DcHAh.js";function A({blocklet:s,ancestors:p=[]}){var i;const a=x(),{inService:n}=a,o=v(s==null?void 0:s.status)||P(s==null?void 0:s.status),e=`?v=${(i=s==null?void 0:s.meta)==null?void 0:i.version}${o?"~":""}`;let t=n?`${m(E,j.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-bundle")}${e}`:m(a.imgPrefix,"blocklet.png");if(s.source==="registry"&&s.deployedFrom&&s.meta.logo)t=`${m(s.deployedFrom,$(s.meta.bundleDid,s.meta.logo))}${e}`;else{const u=window.env.apiPrefix||"/",d=p.concat(s),g=n?d.slice(1):d;t=`${m(u,`/blocklet/logo-bundle${g.map(c=>`/${c.meta.did}`).join("")}`)}${e}`}return{logoUrl:t,inService:n}}function f({blocklet:s,style:p,size:a,ancestors:n,...o}){const e=x(),{logoUrl:t,inService:i}=A({blocklet:s,ancestors:n}),{variant:u}=o,d=i?()=>{}:c=>{c.target.src=`${e.imgPrefix}/blocklet.png`};let g=y.jsx("img",{src:t,onError:d,alt:s.meta.name,style:{width:a}});return s.meta.logo||(g=y.jsx(h,{did:s.meta.did||"",responsive:!0})),y.jsx(R,{variant:u||"square",style:Object.assign({backgroundColor:"transparent",width:a,height:a,borderRadius:10},p),...o,children:g})}f.propTypes={blocklet:r.object.isRequired,style:r.object,size:r.oneOfType([r.number,r.string]),ancestors:r.array};f.defaultProps={style:{},size:40,ancestors:[]};export{f as B};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u,b3 as H,m as L,O as V,P as a,n as Z,b2 as G,r as j,aO as J,
|
|
1
|
+
import{j as u,b3 as H,m as L,O as V,P as a,n as Z,b2 as G,r as j,aO as J,fn as K}from"./index-Df-DcHAh.js";function O(t,e,n,s){return parseFloat((e-s*e/t+n).toFixed(2))}function Q(t){[...t.querySelectorAll("*")].forEach(e=>t.removeChild(e))}function U(t){return t.value}function C(t,e){const n=document.createElementNS("http://www.w3.org/2000/svg",t);for(const s in e)n.setAttribute(s,e[s]);return n}function _(t,e,n){if(Q(t),e.length<=1)return;n=n||{},typeof e[0]=="number"&&(e=e.map(o=>({value:o})));const{onmousemove:s}=n,{onmouseout:d}=n,R="interactive"in n?n.interactive:!!s,f=n.spotRadius||2,i=f*2,A=n.cursorWidth||2,r=parseFloat(t.attributes["stroke-width"].value),F=n.fetch||U,p=e.map(o=>F(o)),y=parseFloat(t.attributes.width.value)-i*2,x=parseFloat(t.attributes.height.value),S=x-r*2-i,g=Math.max(...p)===0?1:Math.max(...p),l=-1e3,w=p.length-1,D=y/w,k=[],N=O(g,S,r+f,p[0]);let E=`M${i} ${N}`;p.forEach((o,m)=>{const c=m*D+i,h=O(g,S,r+f,o);k.push(Object.assign({},e[m],{index:m,x:c,y:h})),E+=` L ${c} ${h}`});const W=C("path",{class:"sparkline--line",d:E,fill:"none"}),M=`${E} V ${x} L ${i} ${x} Z`,X=C("path",{class:"sparkline--fill",d:M,stroke:"none"});if(t.appendChild(X),t.appendChild(W),!R)return;const b=C("line",{class:"sparkline--cursor",x1:l,x2:l,y1:0,y2:x,"stroke-width":A}),$=C("circle",{class:"sparkline--spot",cx:l,cy:l,r:f});t.appendChild(b),t.appendChild($);const T=C("rect",{width:t.attributes.width.value,height:t.attributes.height.value,style:"fill: transparent; stroke: transparent",class:"sparkline--interaction-layer"});t.appendChild(T),T.addEventListener("mouseout",o=>{b.setAttribute("x1",l),b.setAttribute("x2",l),$.setAttribute("cx",l),d&&d(o)}),T.addEventListener("mousemove",o=>{const m=o.offsetX;let c=k.find(B=>B.x>=m);c||(c=k[w]);const h=k[k.indexOf(c)-1];let v,I;h?(I=h.x+(c.x-h.x)/2,v=m>=I?c:h):v=c;const{x:P}=v,{y:Y}=v;$.setAttribute("cx",P),$.setAttribute("cy",Y),b.setAttribute("x1",P),b.setAttribute("x2",P),s&&s(o,v)})}function q({style:t,title:e,value:n,graph:s,description:d}){return u.jsx(tt,{children:u.jsxs(H,{style:{...t},children:[u.jsx(L,{sx:{fontSize:14},color:"text.secondary",children:e}),u.jsx(L,{variant:"h5",component:"div",mt:1,children:n}),s,!!d&&u.jsx(V,{display:"flex",sx:{fontSize:12,marginTop:3},color:"text.secondary",children:d})]})})}q.propTypes={style:a.object,title:a.node,value:a.node,graph:a.node,description:a.any};q.defaultProps={style:{},title:null,value:null,graph:null,description:null};const tt=Z(G)`
|
|
2
2
|
.card-content {
|
|
3
3
|
height: 150px;
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,f as s,j as t,
|
|
1
|
+
import{r as i,f as s,j as t,d8 as r,P as c}from"./index-Df-DcHAh.js";function n({children:p,...e}){const{t:o}=i.useContext(s);return t.jsx(r,{tip:o("common.copyTip"),copiedTip:o("common.copiedTip"),...e,children:p})}n.propTypes={children:c.any.isRequired};export{n as C};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as G}from"./codemirror.es-
|
|
1
|
+
import{a as G}from"./codemirror.es-BDjVt0Cm.js";import"./index-Cakzfu7O.js";import"./index-Df-DcHAh.js";var H=Object.defineProperty,h=(O,B)=>H(O,"name",{value:B,configurable:!0});function D(O,B){return B.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(d){if(d!=="default"&&!(d in O)){var o=Object.getOwnPropertyDescriptor(n,d);Object.defineProperty(O,d,o.get?o:{enumerable:!0,get:function(){return n[d]}})}})}),Object.freeze(O)}h(D,"_mergeNamespaces");var q={exports:{}};(function(O,B){(function(n){n(G.exports)})(function(n){var d={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},o=n.Pos;n.defineOption("autoCloseBrackets",!1,function(e,t,a){a&&a!=n.Init&&(e.removeKeyMap(y),e.state.closeBrackets=null),t&&(_(b(t,"pairs")),e.state.closeBrackets=t,e.addKeyMap(y))});function b(e,t){return t=="pairs"&&typeof e=="string"?e:typeof e=="object"&&e[t]!=null?e[t]:d[t]}h(b,"getOption");var y={Backspace:$,Enter:z};function _(e){for(var t=0;t<e.length;t++){var a=e.charAt(t),i="'"+a+"'";y[i]||(y[i]=I(a))}}h(_,"ensureBound"),_(d.pairs+"`");function I(e){return function(t){return K(t,e)}}h(I,"handler");function x(e){var t=e.state.closeBrackets;if(!t||t.override)return t;var a=e.getModeAt(e.getCursor());return a.closeBrackets||t}h(x,"getConfig");function $(e){var t=x(e);if(!t||e.getOption("disableInput"))return n.Pass;for(var a=b(t,"pairs"),i=e.listSelections(),r=0;r<i.length;r++){if(!i[r].empty())return n.Pass;var f=j(e,i[r].head);if(!f||a.indexOf(f)%2!=0)return n.Pass}for(var r=i.length-1;r>=0;r--){var l=i[r].head;e.replaceRange("",o(l.line,l.ch-1),o(l.line,l.ch+1),"+delete")}}h($,"handleBackspace");function z(e){var t=x(e),a=t&&b(t,"explode");if(!a||e.getOption("disableInput"))return n.Pass;for(var i=e.listSelections(),r=0;r<i.length;r++){if(!i[r].empty())return n.Pass;var f=j(e,i[r].head);if(!f||a.indexOf(f)%2!=0)return n.Pass}e.operation(function(){var l=e.lineSeparator()||`
|
|
2
2
|
`;e.replaceSelection(l+l,null),P(e,-1),i=e.listSelections();for(var g=0;g<i.length;g++){var k=i[g].head.line;e.indentLine(k,null,!0),e.indentLine(k+1,null,!0)}})}h(z,"handleEnter");function P(e,t){for(var a=[],i=e.listSelections(),r=0,f=0;f<i.length;f++){var l=i[f];l.head==e.getCursor()&&(r=f);var g=l.head.ch||t>0?{line:l.head.line,ch:l.head.ch+t}:{line:l.head.line-1};a.push({anchor:g,head:g})}e.setSelections(a,r)}h(P,"moveSel");function F(e){var t=n.cmpPos(e.anchor,e.head)>0;return{anchor:new o(e.anchor.line,e.anchor.ch+(t?-1:1)),head:new o(e.head.line,e.head.ch+(t?1:-1))}}h(F,"contractSelection");function K(e,t){var a=x(e);if(!a||e.getOption("disableInput"))return n.Pass;var i=b(a,"pairs"),r=i.indexOf(t);if(r==-1)return n.Pass;for(var f=b(a,"closeBefore"),l=b(a,"triples"),g=i.charAt(r+1)==t,k=e.listSelections(),R=r%2==0,c,E=0;E<k.length;E++){var N=k[E],s=N.head,p,A=e.getRange(s,o(s.line,s.ch+1));if(R&&!N.empty())p="surround";else if((g||!R)&&A==t)g&&L(e,s)?p="both":l.indexOf(t)>=0&&e.getRange(s,o(s.line,s.ch+3))==t+t+t?p="skipThree":p="skip";else if(g&&s.ch>1&&l.indexOf(t)>=0&&e.getRange(o(s.line,s.ch-2),s)==t+t){if(s.ch>2&&/\bstring/.test(e.getTokenTypeAt(o(s.line,s.ch-2))))return n.Pass;p="addFour"}else if(g){var W=s.ch==0?" ":e.getRange(o(s.line,s.ch-1),s);if(!n.isWordChar(A)&&W!=t&&!n.isWordChar(W))p="both";else return n.Pass}else if(R&&(A.length===0||/\s/.test(A)||f.indexOf(A)>-1))p="both";else return n.Pass;if(!c)c=p;else if(c!=p)return n.Pass}var S=r%2?i.charAt(r-1):t,w=r%2?t:i.charAt(r+1);e.operation(function(){if(c=="skip")P(e,1);else if(c=="skipThree")P(e,3);else if(c=="surround"){for(var u=e.getSelections(),v=0;v<u.length;v++)u[v]=S+u[v]+w;e.replaceSelections(u,"around"),u=e.listSelections().slice();for(var v=0;v<u.length;v++)u[v]=F(u[v]);e.setSelections(u)}else c=="both"?(e.replaceSelection(S+w,null),e.triggerElectric(S+w),P(e,-1)):c=="addFour"&&(e.replaceSelection(S+S+S+S,"before"),P(e,1))})}h(K,"handleChar");function j(e,t){var a=e.getRange(o(t.line,t.ch-1),o(t.line,t.ch+1));return a.length==2?a:null}h(j,"charsAround");function L(e,t){var a=e.getTokenAt(o(t.line,t.ch+1));return/\bstring/.test(a.type)&&a.start==t.ch&&(t.ch==0||!/\bstring/.test(e.getTokenTypeAt(t)))}h(L,"stringStartsAfter")})})();var J=q.exports,V=Object.freeze(D({__proto__:null,[Symbol.toStringTag]:"Module",default:J},[q.exports]));export{V as c};
|