@abtnode/webapp 1.16.29-beta-cbfd116d → 1.16.29-next-680cf137
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-DiqSqlhj.js → Add-CBlI6OP_.js} +1 -1
- package/dist/assets/{ArrowDropDown-9DQuvaIf.js → ArrowDropDown-_NUZMAs3.js} +1 -1
- package/dist/assets/{Autocomplete-DAPdBU_C.js → Autocomplete-B72ZNhpa.js} +1 -1
- package/dist/assets/{Breadcrumbs-JY-AOJsc.js → Breadcrumbs-D-zIyMgq.js} +1 -1
- package/dist/assets/{ButtonGroup-CnSZJdO-.js → ButtonGroup-By_ymyXi.js} +1 -1
- package/dist/assets/{CheckCircle-BcIXmxwL.js → CheckCircle-DFcLtmlR.js} +1 -1
- package/dist/assets/{ChevronLeft-GdOz3FFz.js → ChevronLeft-fo4GMv_v.js} +1 -1
- package/dist/assets/{ChevronRight-DTSbdiO9.js → ChevronRight-CTMwG0CZ.js} +1 -1
- package/dist/assets/{Close-DSPV3CNA.js → Close-C7JfjION.js} +1 -1
- package/dist/assets/{Delete-C5xn6WBN.js → Delete-DP2Kbw6K.js} +1 -1
- package/dist/assets/DeleteOutline-B8oYxNwP.js +1 -0
- package/dist/assets/DeleteOutline-DRdvA-Zf.js +1 -0
- package/dist/assets/{Done-Bj8_3suh.js → Done-tC1zTTTI.js} +1 -1
- package/dist/assets/{Edit-eEaW9uQd.js → Edit-BE1ZZ-Tm.js} +1 -1
- package/dist/assets/{EditIcon-CwmNryz4.js → EditIcon-8lCGiLnt.js} +1 -1
- package/dist/assets/{ExpandMore-B-eh--rZ.js → ExpandMore-3RzpbVTz.js} +1 -1
- package/dist/assets/{FilterList-BdSdHr3_.js → FilterList-Do3l0qfw.js} +1 -1
- package/dist/assets/{Google-WY0BO4_p.js → Google-CIgaEutQ.js} +1 -1
- package/dist/assets/{Https-2PaIz1Mj.js → Https-BE0YR8cf.js} +1 -1
- package/dist/assets/{InputAdornment-DDTwW0WR.js → InputAdornment-DwuVDGhs.js} +1 -1
- package/dist/assets/{InputLabel-kl4d4Afd.js → InputLabel-D6AZ_TXn.js} +1 -1
- package/dist/assets/{LastPage-erHk2ZH1.js → LastPage-DFR_wWVB.js} +1 -1
- package/dist/assets/{Launch-CAo1lLU6.js → Launch-CouSgez_.js} +1 -1
- package/dist/assets/{Link-DXUHsj8a.js → Link-DyVx2epM.js} +1 -1
- package/dist/assets/{LoadingButton-aHGLPfZ-.js → LoadingButton-CXpu1MEX.js} +1 -1
- package/dist/assets/{LockIcon-1DSaApOb.js → LockIcon-DVrS5iFD.js} +1 -1
- package/dist/assets/{Loop-CuMM_YqO.js → Loop-BALLXtEO.js} +1 -1
- package/dist/assets/{MoreVert-pFjb7TqH.js → MoreVert-B3whUcSg.js} +1 -1
- package/dist/assets/{Pagination-BHNfBA4C.js → Pagination-DDYKKK02.js} +1 -1
- package/dist/assets/{Public-BmojyP-T.js → Public-CNDJTj5P.js} +1 -1
- package/dist/assets/{SchemaReference.es-ajHOOp8o.js → SchemaReference.es-cc9zlDut.js} +1 -1
- package/dist/assets/{Search-raLlCMJk.js → Search-B8Ey1Xi7.js} +1 -1
- package/dist/assets/{Select-cp6_ZHE7.js → Select-BFdUN7Gy.js} +1 -1
- package/dist/assets/{Skeleton-D5UyHItu.js → Skeleton-Bq-LHi-2.js} +1 -1
- package/dist/assets/{Slider-ecnPtLPj.js → Slider-DJ5A6VX9.js} +1 -1
- package/dist/assets/{Stepper-D7Rp4vlm.js → Stepper-piTxdKQU.js} +1 -1
- package/dist/assets/{TextField-De1OeNfZ.js → TextField-DMD0bhJ9.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-Bdg3Invr.js → ToggleButtonGroup-6WK6LBLt.js} +1 -1
- package/dist/assets/{ViewList-C83zj7rF.js → ViewList-CJj9MHYa.js} +1 -1
- package/dist/assets/{actions-7_FKWiUA.js → actions-B8oxTC01.js} +1 -1
- package/dist/assets/{actions-C-0J_ddu.js → actions-CXBa1BBO.js} +1 -1
- package/dist/assets/{agreement-CnVZqe64.js → agreement-831LxBXw.js} +1 -1
- package/dist/assets/api-UR4kvn9E.js +1 -0
- package/dist/assets/{app-avatar-g5Pn3nvf.js → app-avatar-BQQaDhpx.js} +1 -1
- package/dist/assets/{audit-logs-if1tZvua.js → audit-logs-M6VjO6ZY.js} +1 -1
- package/dist/assets/blocklet-ChPmEIKa.js +1 -0
- package/dist/assets/{brace-fold.es-DUo6FtkK.js → brace-fold.es-CRJ6R1Jd.js} +1 -1
- package/dist/assets/{bundle-avatar-CHZNUrui.js → bundle-avatar-CELq2peD.js} +1 -1
- package/dist/assets/{chart-BqdlHAIk.js → chart-XLU84wBc.js} +1 -1
- package/dist/assets/{click-to-copy-Ci6mXYLS.js → click-to-copy-Crhp_-Y4.js} +1 -1
- package/dist/assets/{closebrackets.es-B_3eQLj6.js → closebrackets.es-CG2CDdUo.js} +1 -1
- package/dist/assets/{codemirror.es-CxmI1MZI.js → codemirror.es-C8dnT91E.js} +1 -1
- package/dist/assets/{comment.es-CzvTeML6.js → comment.es-jAc-u026.js} +1 -1
- package/dist/assets/{config-navigation-CVUMcunz.js → config-navigation-DPgP8Sak.js} +1 -1
- package/dist/assets/{delete-confirm-BvJrJyBD.js → delete-confirm-lQkwnGTS.js} +1 -1
- package/dist/assets/{detail-CbKNMHOv.js → detail-U0KQ2egr.js} +3 -3
- package/dist/assets/{dialog.es-BJ41s4Cl.js → dialog.es-Dclyb7Pn.js} +1 -1
- package/dist/assets/{download-9ooqNiDB.js → download-CQ8vxrab.js} +1 -1
- package/dist/assets/{foldgutter.es-D-hc2eHU.js → foldgutter.es-DkUp93ad.js} +1 -1
- package/dist/assets/getValidReactChildren-5uFkq4GS.js +1 -0
- package/dist/assets/{hint.es-CxW18Lnu.js → hint.es-BsuiAFA7.js} +1 -1
- package/dist/assets/{hint.es2-CpBfqvnT.js → hint.es2-CkrTTZi4.js} +1 -1
- package/dist/assets/{iframe-dtu0sSkn.js → iframe-CVrBSWYD.js} +1 -1
- package/dist/assets/{index-Col2kLJU.js → index-5FtPkeAB.js} +1 -1
- package/dist/assets/{index-SA9KFCJd.js → index-5SVf0tFY.js} +1 -1
- package/dist/assets/{index-BK9uVuLM.js → index-B3Zt0_35.js} +10 -10
- package/dist/assets/{index-CY_rOxjZ.js → index-B8C4pOOu.js} +1 -1
- package/dist/assets/{index-Cvt_EuXc.js → index-B9dsKJcE.js} +1 -1
- package/dist/assets/{index-8Fg683El.js → index-BHOFu69h.js} +1 -1
- package/dist/assets/{index-B_svRTuF.js → index-BNjhH_d8.js} +1 -1
- package/dist/assets/{index-QHILeAPv.js → index-BO1fRvMf.js} +1 -1
- package/dist/assets/{index-BBOgCzBo.js → index-BOuMxb3Q.js} +1 -1
- package/dist/assets/{index-1ouNgxgi.js → index-BPnSwJ1l.js} +1 -1
- package/dist/assets/{index-BWhWAS_S.js → index-BTZWTFSn.js} +1 -1
- package/dist/assets/{index-DX3JXbQb.js → index-BXNB-HAQ.js} +1 -1
- package/dist/assets/{index-ApUKcTB6.js → index-B_IM460j.js} +1 -1
- package/dist/assets/{index-B5t-vzvI.js → index-BcX9aNO0.js} +1 -1
- package/dist/assets/{index-D5PxJp2e.js → index-BsBUGa5J.js} +1 -1
- package/dist/assets/{index-B37qKP2B.js → index-Bxr0QU8m.js} +1 -1
- package/dist/assets/{index-CPTaSMMt.js → index-C-ESGRv-.js} +1 -1
- package/dist/assets/{index-DeyjciFW.js → index-C2a0vC_a.js} +1 -1
- package/dist/assets/index-C9KBqEgO.js +21 -0
- package/dist/assets/{index-DQYRaCdB.js → index-CC1ndwks.js} +2 -2
- package/dist/assets/{index-BsaVztdp.js → index-CC1qLncJ.js} +1 -1
- package/dist/assets/{index-Clb1BN1w.js → index-CF5rsCOW.js} +1 -1
- package/dist/assets/{index-BCE3QRG4.js → index-CRb7tyay.js} +1 -1
- package/dist/assets/{index-DJ0BZ1f0.js → index-CXyn4xMF.js} +5 -5
- package/dist/assets/{index-aG_TZ2ao.js → index-C_6P8rFc.js} +1 -1
- package/dist/assets/{index-DkHucXVl.js → index-CgdUe9yu.js} +1 -1
- package/dist/assets/index-Cgk3wbOm.js +54 -0
- package/dist/assets/{index-dn7DkX5z.js → index-CmhE_K0y.js} +1 -1
- package/dist/assets/{index-2GizaExc.js → index-CnrdD6WK.js} +1 -1
- package/dist/assets/{index-Cwul5-Ge.js → index-Cuo7-0Cq.js} +1 -1
- package/dist/assets/{index-B9bBENg5.js → index-D1iFHNgi.js} +1 -1
- package/dist/assets/{index-Cy0-aW7U.js → index-DS6F_SJ9.js} +1 -1
- package/dist/assets/{index-BLWTCfoo.js → index-DVV4MjHu.js} +1 -1
- package/dist/assets/{index-C_RXntkM.js → index-DVdaomTJ.js} +3 -3
- package/dist/assets/{index-B340bMPK.js → index-DXsbagZE.js} +1 -1
- package/dist/assets/{index-C5ovAp04.js → index-DYd4EkOT.js} +1 -1
- package/dist/assets/{index-D3BjUmxN.js → index-DYnnB-61.js} +1 -1
- package/dist/assets/{index-Dml7jmrq.js → index-DujqUEqx.js} +2 -2
- package/dist/assets/{index-BeNQNQmg.js → index-DwxhJUlf.js} +3 -3
- package/dist/assets/{index-Dpb6wQjU.js → index-DzxtBPCC.js} +1 -1
- package/dist/assets/{index-BK64HUrZ.js → index-HzScigWU.js} +1 -1
- package/dist/assets/{index-DU8rbzfp.js → index-m_K8eAfk.js} +1 -1
- package/dist/assets/{index-DfnZyC-Q.js → index-xOV9jJH3.js} +1 -1
- package/dist/assets/{index-QOcfFwdi.js → index-yKeCR3QS.js} +1 -1
- package/dist/assets/{index-WfxCd25J.js → index-yzdWHDuH.js} +1 -1
- package/dist/assets/{index.es-BDInjNfg.js → index.es-Cn8AWkE8.js} +1 -1
- package/dist/assets/{index.esm-BU72PdQQ.js → index.esm-BTj_KCwg.js} +1 -1
- package/dist/assets/{info-addon.es-Xn3SUOrf.js → info-addon.es-CLwqL8YZ.js} +1 -1
- package/dist/assets/{info.es-B1u_NGqd.js → info.es-CnFozSp1.js} +1 -1
- package/dist/assets/{install-from-url-CH7lpg1m.js → install-from-url-BARZDCTT.js} +1 -1
- package/dist/assets/{invitation-BsnKeELU.js → invitation-BVEDeXPr.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-t1z6fh3o.js → is-path-prefix-equal-Cbnwy2Yf.js} +1 -1
- package/dist/assets/{isEqual-Da-RbHn4.js → isEqual-BbNuqCAe.js} +1 -1
- package/dist/assets/{item-CV3h78Bc.js → item-BCeOssCF.js} +1 -1
- package/dist/assets/{javascript.es-OqtW_UTL.js → javascript.es-z17Y7cic.js} +1 -1
- package/dist/assets/{jump-to-line.es-zSveRTL4.js → jump-to-line.es-CG-VsgE6.js} +1 -1
- package/dist/assets/{jump.es-D9HErZw4.js → jump.es-CQ4ic2oQ.js} +1 -1
- package/dist/assets/{line-3LuKyLyu.js → line-C1QR7BHZ.js} +3 -3
- package/dist/assets/{lint.es-BwS4nEkH.js → lint.es-D-MQT4TZ.js} +1 -1
- package/dist/assets/{lint.es2-kWn9droA.js → lint.es2-DXCGvGBZ.js} +1 -1
- package/dist/assets/{lint.es3-DqCXv9QX.js → lint.es3-g-aPmIS2.js} +1 -1
- package/dist/assets/{list-header-B7OR53lN.js → list-header-C-NFaGBI.js} +1 -1
- package/dist/assets/{log-B3I8TEBI.js → log-T5nWDHZg.js} +1 -1
- package/dist/assets/{lottie-CpmMaK50.js → lottie-DR63dhlr.js} +1 -1
- package/dist/assets/{matchbrackets.es-CwQH4b4x.js → matchbrackets.es-BHV7ImE9.js} +1 -1
- package/dist/assets/{memory-Dcz53oCr.js → memory-C2Ggp1ds.js} +1 -1
- package/dist/assets/{mode.es-B9Ou3L_t.js → mode.es-DjMjtDNl.js} +1 -1
- package/dist/assets/{mode.es2-Y9WZpOUZ.js → mode.es2-DTrAq6aA.js} +1 -1
- package/dist/assets/{mode.es3-BDsxnz5X.js → mode.es3-CeaHK4Cx.js} +1 -1
- package/dist/assets/{onlineParser.es-CZYol-HK.js → onlineParser.es-EXxvS9b3.js} +1 -1
- package/dist/assets/{overview-CqH7N4Bl.js → overview-B4FZNinL.js} +1 -1
- package/dist/assets/{react-igFgRd_9.js → react-DCf5_sK9.js} +3 -3
- package/dist/assets/{redux-BffWKrDO.js → redux-CBs4zzpF.js} +1 -1
- package/dist/assets/{runtime-CEr1Nvlj.js → runtime-OYXEkxpl.js} +1 -1
- package/dist/assets/{search.es-Dr95-rca.js → search.es-BgquH9xr.js} +1 -1
- package/dist/assets/{searchcursor.es-BOckckbU.js → searchcursor.es-CQvA3zpZ.js} +1 -1
- package/dist/assets/service-C2bAs8-4.js +1 -0
- package/dist/assets/{shorten-label-Cwua8w8y.js → shorten-label-u7BOpbFf.js} +1 -1
- package/dist/assets/{show-hint.es-DC1xY__9.js → show-hint.es-DS02BUMX.js} +1 -1
- package/dist/assets/{slicedToArray-CS-bonDA.js → slicedToArray-CXKCCuoW.js} +1 -1
- package/dist/assets/{spaces-Cy0WiDqw.js → spaces-DAIyizkR.js} +1 -1
- package/dist/assets/{sublime.es-DpA2RzKn.js → sublime.es-CNkJDB7Y.js} +1 -1
- package/dist/assets/{switch-control-NaEEozhc.js → switch-control-B17GyPSA.js} +1 -1
- package/dist/assets/{table-icons-B0kRJbTK.js → table-icons-C9acqBAz.js} +2 -2
- package/dist/assets/{tag-Z7mPKVvq.js → tag-CCXE4PlV.js} +1 -1
- package/dist/assets/{team-BJ7ItRYP.js → team-BSlyvC6c.js} +1 -1
- package/dist/assets/{toUpper-BIRWGc_f.js → toUpper-BVSXWMpU.js} +1 -1
- package/dist/assets/{traffic-BUI5AcsC.js → traffic-CQoQSkkE.js} +1 -1
- package/dist/assets/{ua-parser-C8b57cGC.js → ua-parser-CxBhcPmn.js} +1 -1
- package/dist/assets/{url-evaluation-BmTdICYl.js → url-evaluation-l10Af9J1.js} +1 -1
- package/dist/assets/{url-join-CzgNur4y.js → url-join-Byro3u2f.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-DmO4dvo0.js → use-blocklet-info-for-connect-did-spaces-1vbzgKN4.js} +1 -1
- package/dist/assets/{useLocalStorage-BV7bkq7L.js → useLocalStorage-CBI6wbJu.js} +1 -1
- package/dist/assets/{util-ClcVo8u2.js → util-BO7B0GFb.js} +1 -1
- package/dist/assets/{wait-container-Bo2u9r31.js → wait-container-DNpXoa46.js} +1 -1
- package/dist/assets/{withStyles-gQ2FYysM.js → withStyles-CDKZ5MjH.js} +1 -1
- package/dist/assets/{wrap-locale-DgOTHwBu.js → wrap-locale-CjBWx_ua.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-CvnGFYQc.js +0 -1
- package/dist/assets/api-Ds0tawHV.js +0 -1
- package/dist/assets/blocklet-CAvqFbwn.js +0 -1
- package/dist/assets/getValidReactChildren-CSpxXCOO.js +0 -1
- package/dist/assets/index-BKS0pysx.js +0 -21
- package/dist/assets/index-BVm7HRmN.js +0 -54
- package/dist/assets/service-uk6SebUo.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bQ as vt,bR as mt,bL as X,bM as jt,bY as Ht,bN as p,r as d,bS as St,bP as at,bU as $,j as u,bV as gt,d1 as se,d2 as Ot,d3 as At,d4 as Xt,bT as st,bc as ae,d5 as ft,d6 as ie,s as ce,d7 as L,P as z}from"./index-DQYRaCdB.js";import{K as de,a as ue}from"./Delete-C5xn6WBN.js";let Y;function _t(){if(Y)return Y;const t=document.createElement("div"),e=document.createElement("div");return e.style.width="10px",e.style.height="1px",t.appendChild(e),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),Y="reverse",t.scrollLeft>0?Y="default":(t.scrollLeft=1,t.scrollLeft===0&&(Y="negative")),document.body.removeChild(t),Y}function be(t,e){const l=t.scrollLeft;if(e!=="rtl")return l;switch(_t()){case"negative":return t.scrollWidth-t.clientWidth+l;case"reverse":return t.scrollWidth-t.clientWidth-l;default:return l}}function pe(t){return mt("MuiTab",t)}const fe=vt("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),k=fe,he=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],ve=t=>{const{classes:e,textColor:l,fullWidth:s,wrapped:n,icon:a,label:v,selected:h,disabled:b}=t,g={root:["root",a&&v&&"labelIcon",`textColor${Ht(l)}`,s&&"fullWidth",n&&"wrapped",h&&"selected",b&&"disabled"],iconWrapper:["iconWrapper"]};return gt(g,pe,e)},me=X(jt,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.root,l.label&&l.icon&&e.labelIcon,e[`textColor${Ht(l.textColor)}`],l.fullWidth&&e.fullWidth,l.wrapped&&e.wrapped,{[`& .${k.iconWrapper}`]:e.iconWrapper}]}})(({theme:t,ownerState:e})=>p({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${k.iconWrapper}`]:p({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${k.selected}`]:{opacity:1},[`&.${k.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${k.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${k.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${k.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${k.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),Se=d.forwardRef(function(e,l){const s=St({props:e,name:"MuiTab"}),{className:n,disabled:a=!1,disableFocusRipple:v=!1,fullWidth:h,icon:b,iconPosition:g="top",indicator:B,label:C,onChange:m,onClick:T,onFocus:F,selected:w,selectionFollowsFocus:x,textColor:_="inherit",value:I,wrapped:it=!1}=s,D=at(s,he),K=p({},s,{disabled:a,disableFocusRipple:v,selected:w,icon:!!b,iconPosition:g,label:!!C,fullWidth:h,textColor:_,wrapped:it}),q=ve(K),j=b&&C&&d.isValidElement(b)?d.cloneElement(b,{className:$(q.iconWrapper,b.props.className)}):b,tt=E=>{!w&&m&&m(E,I),T&&T(E)},U=E=>{x&&!w&&m&&m(E,I),F&&F(E)};return u.jsxs(me,p({focusRipple:!v,className:$(q.root,n),ref:l,role:"tab","aria-selected":w,disabled:a,onClick:tt,onFocus:U,ownerState:K,tabIndex:w?0:-1},D,{children:[g==="top"||g==="start"?u.jsxs(d.Fragment,{children:[j,C]}):u.jsxs(d.Fragment,{children:[C,j]}),B]}))}),xt=Se;function ge(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function xe(t,e,l,s={},n=()=>{}){const{ease:a=ge,duration:v=300}=s;let h=null;const b=e[t];let g=!1;const B=()=>{g=!0},C=m=>{if(g){n(new Error("Animation cancelled"));return}h===null&&(h=m);const T=Math.min(1,(m-h)/v);if(e[t]=a(T)*(l-b)+b,T>=1){requestAnimationFrame(()=>{n(null)});return}requestAnimationFrame(C)};return b===l?(n(new Error("Element already at target position")),B):(requestAnimationFrame(C),B)}const Ce=["onChange"],ye={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Be(t){const{onChange:e}=t,l=at(t,Ce),s=d.useRef(),n=d.useRef(null),a=()=>{s.current=n.current.offsetHeight-n.current.clientHeight};return se(()=>{const v=Ot(()=>{const b=s.current;a(),b!==s.current&&e(s.current)}),h=At(n.current);return h.addEventListener("resize",v),()=>{v.clear(),h.removeEventListener("resize",v)}},[e]),d.useEffect(()=>{a(),e(s.current)},[e]),u.jsx("div",p({style:ye,ref:n},l))}function Te(t){return mt("MuiTabScrollButton",t)}const we=vt("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Me=we,Re=["className","slots","slotProps","direction","orientation","disabled"],Ie=t=>{const{classes:e,orientation:l,disabled:s}=t;return gt({root:["root",l,s&&"disabled"]},Te,e)},Ee=X(jt,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.root,l.orientation&&e[l.orientation]]}})(({ownerState:t})=>p({width:40,flexShrink:0,opacity:.8,[`&.${Me.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),We=d.forwardRef(function(e,l){var s,n;const a=St({props:e,name:"MuiTabScrollButton"}),{className:v,slots:h={},slotProps:b={},direction:g}=a,B=at(a,Re),C=Xt(),m=p({isRtl:C},a),T=Ie(m),F=(s=h.StartScrollButtonIcon)!=null?s:de,w=(n=h.EndScrollButtonIcon)!=null?n:ue,x=st({elementType:F,externalSlotProps:b.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m}),_=st({elementType:w,externalSlotProps:b.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m});return u.jsx(Ee,p({component:"div",className:$(T.root,v),ref:l,role:null,ownerState:m,tabIndex:null},B,{children:g==="left"?u.jsx(F,p({},x)):u.jsx(w,p({},_))}))}),ze=We;function Pe(t){return mt("MuiTabs",t)}const Ne=vt("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),ht=Ne,ke=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],kt=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,$t=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,nt=(t,e,l)=>{let s=!1,n=l(t,e);for(;n;){if(n===t.firstChild){if(s)return;s=!0}const a=n.disabled||n.getAttribute("aria-disabled")==="true";if(!n.hasAttribute("tabindex")||a)n=l(t,n);else{n.focus();return}}},$e=t=>{const{vertical:e,fixed:l,hideScrollbar:s,scrollableX:n,scrollableY:a,centered:v,scrollButtonsHideMobile:h,classes:b}=t;return gt({root:["root",e&&"vertical"],scroller:["scroller",l&&"fixed",s&&"hideScrollbar",n&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",v&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",h&&"scrollButtonsHideMobile"],scrollableX:[n&&"scrollableX"],hideScrollbar:[s&&"hideScrollbar"]},Pe,b)},Le=X("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[{[`& .${ht.scrollButtons}`]:e.scrollButtons},{[`& .${ht.scrollButtons}`]:l.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,l.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>p({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${ht.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),Fe=X("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.scroller,l.fixed&&e.fixed,l.hideScrollbar&&e.hideScrollbar,l.scrollableX&&e.scrollableX,l.scrollableY&&e.scrollableY]}})(({ownerState:t})=>p({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),je=X("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.flexContainer,l.vertical&&e.flexContainerVertical,l.centered&&e.centered]}})(({ownerState:t})=>p({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),He=X("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>p({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),Oe=X(Be)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Lt={},Ae=d.forwardRef(function(e,l){const s=St({props:e,name:"MuiTabs"}),n=ae(),a=Xt(),{"aria-label":v,"aria-labelledby":h,action:b,centered:g=!1,children:B,className:C,component:m="div",allowScrollButtonsMobile:T=!1,indicatorColor:F="primary",onChange:w,orientation:x="horizontal",ScrollButtonComponent:_=ze,scrollButtons:I="auto",selectionFollowsFocus:it,slots:D={},slotProps:K={},TabIndicatorProps:q={},TabScrollButtonProps:j={},textColor:tt="primary",value:U,variant:E="standard",visibleScrollbar:ct=!1}=s,Ut=at(s,ke),M=E==="scrollable",y=x==="vertical",G=y?"scrollTop":"scrollLeft",et=y?"top":"left",ot=y?"bottom":"right",dt=y?"clientHeight":"clientWidth",Q=y?"height":"width",H=p({},s,{component:m,allowScrollButtonsMobile:T,indicatorColor:F,orientation:x,vertical:y,scrollButtons:I,textColor:tt,variant:E,visibleScrollbar:ct,fixed:!M,hideScrollbar:M&&!ct,scrollableX:M&&!y,scrollableY:M&&y,centered:g&&!M,scrollButtonsHideMobile:!T}),P=$e(H),Yt=st({elementType:D.StartScrollButtonIcon,externalSlotProps:K.startScrollButtonIcon,ownerState:H}),Vt=st({elementType:D.EndScrollButtonIcon,externalSlotProps:K.endScrollButtonIcon,ownerState:H}),[yt,Kt]=d.useState(!1),[O,Bt]=d.useState(Lt),[Tt,Gt]=d.useState(!1),[wt,Qt]=d.useState(!1),[Mt,Jt]=d.useState(!1),[Rt,Zt]=d.useState({overflow:"hidden",scrollbarWidth:0}),It=new Map,W=d.useRef(null),A=d.useRef(null),Et=()=>{const o=W.current;let r;if(o){const i=o.getBoundingClientRect();r={clientWidth:o.clientWidth,scrollLeft:o.scrollLeft,scrollTop:o.scrollTop,scrollLeftNormalized:be(o,a?"rtl":"ltr"),scrollWidth:o.scrollWidth,top:i.top,bottom:i.bottom,left:i.left,right:i.right}}let c;if(o&&U!==!1){const i=A.current.children;if(i.length>0){const f=i[It.get(U)];c=f?f.getBoundingClientRect():null}}return{tabsMeta:r,tabMeta:c}},J=ft(()=>{const{tabsMeta:o,tabMeta:r}=Et();let c=0,i;if(y)i="top",r&&o&&(c=r.top-o.top+o.scrollTop);else if(i=a?"right":"left",r&&o){const S=a?o.scrollLeftNormalized+o.clientWidth-o.scrollWidth:o.scrollLeft;c=(a?-1:1)*(r[i]-o[i]+S)}const f={[i]:c,[Q]:r?r[Q]:0};if(isNaN(O[i])||isNaN(O[Q]))Bt(f);else{const S=Math.abs(O[i]-f[i]),R=Math.abs(O[Q]-f[Q]);(S>=1||R>=1)&&Bt(f)}}),ut=(o,{animation:r=!0}={})=>{r?xe(G,W.current,o,{duration:n.transitions.duration.standard}):W.current[G]=o},Wt=o=>{let r=W.current[G];y?r+=o:(r+=o*(a?-1:1),r*=a&&_t()==="reverse"?-1:1),ut(r)},zt=()=>{const o=W.current[dt];let r=0;const c=Array.from(A.current.children);for(let i=0;i<c.length;i+=1){const f=c[i];if(r+f[dt]>o){i===0&&(r=o);break}r+=f[dt]}return r},te=()=>{Wt(-1*zt())},ee=()=>{Wt(zt())},oe=d.useCallback(o=>{Zt({overflow:null,scrollbarWidth:o})},[]),le=()=>{const o={};o.scrollbarSizeListener=M?u.jsx(Oe,{onChange:oe,className:$(P.scrollableX,P.hideScrollbar)}):null;const c=M&&(I==="auto"&&(Tt||wt)||I===!0);return o.scrollButtonStart=c?u.jsx(_,p({slots:{StartScrollButtonIcon:D.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:Yt},orientation:x,direction:a?"right":"left",onClick:te,disabled:!Tt},j,{className:$(P.scrollButtons,j.className)})):null,o.scrollButtonEnd=c?u.jsx(_,p({slots:{EndScrollButtonIcon:D.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Vt},orientation:x,direction:a?"left":"right",onClick:ee,disabled:!wt},j,{className:$(P.scrollButtons,j.className)})):null,o},Pt=ft(o=>{const{tabsMeta:r,tabMeta:c}=Et();if(!(!c||!r)){if(c[et]<r[et]){const i=r[G]+(c[et]-r[et]);ut(i,{animation:o})}else if(c[ot]>r[ot]){const i=r[G]+(c[ot]-r[ot]);ut(i,{animation:o})}}}),lt=ft(()=>{M&&I!==!1&&Jt(!Mt)});d.useEffect(()=>{const o=Ot(()=>{W.current&&J()});let r;const c=S=>{S.forEach(R=>{R.removedNodes.forEach(Z=>{var N;(N=r)==null||N.unobserve(Z)}),R.addedNodes.forEach(Z=>{var N;(N=r)==null||N.observe(Z)})}),o(),lt()},i=At(W.current);i.addEventListener("resize",o);let f;return typeof ResizeObserver<"u"&&(r=new ResizeObserver(o),Array.from(A.current.children).forEach(S=>{r.observe(S)})),typeof MutationObserver<"u"&&(f=new MutationObserver(c),f.observe(A.current,{childList:!0})),()=>{var S,R;o.clear(),i.removeEventListener("resize",o),(S=f)==null||S.disconnect(),(R=r)==null||R.disconnect()}},[J,lt]),d.useEffect(()=>{const o=Array.from(A.current.children),r=o.length;if(typeof IntersectionObserver<"u"&&r>0&&M&&I!==!1){const c=o[0],i=o[r-1],f={root:W.current,threshold:.99},S=pt=>{Gt(!pt[0].isIntersecting)},R=new IntersectionObserver(S,f);R.observe(c);const Z=pt=>{Qt(!pt[0].isIntersecting)},N=new IntersectionObserver(Z,f);return N.observe(i),()=>{R.disconnect(),N.disconnect()}}},[M,I,Mt,B==null?void 0:B.length]),d.useEffect(()=>{Kt(!0)},[]),d.useEffect(()=>{J()}),d.useEffect(()=>{Pt(Lt!==O)},[Pt,O]),d.useImperativeHandle(b,()=>({updateIndicator:J,updateScrollButtons:lt}),[J,lt]);const Nt=u.jsx(He,p({},q,{className:$(P.indicator,q.className),ownerState:H,style:p({},O,q.style)}));let rt=0;const re=d.Children.map(B,o=>{if(!d.isValidElement(o))return null;const r=o.props.value===void 0?rt:o.props.value;It.set(r,rt);const c=r===U;return rt+=1,d.cloneElement(o,p({fullWidth:E==="fullWidth",indicator:c&&!yt&&Nt,selected:c,selectionFollowsFocus:it,onChange:w,textColor:tt,value:r},rt===1&&U===!1&&!o.props.tabIndex?{tabIndex:0}:{}))}),ne=o=>{const r=A.current,c=ie(r).activeElement;if(c.getAttribute("role")!=="tab")return;let f=x==="horizontal"?"ArrowLeft":"ArrowUp",S=x==="horizontal"?"ArrowRight":"ArrowDown";switch(x==="horizontal"&&a&&(f="ArrowRight",S="ArrowLeft"),o.key){case f:o.preventDefault(),nt(r,c,$t);break;case S:o.preventDefault(),nt(r,c,kt);break;case"Home":o.preventDefault(),nt(r,null,kt);break;case"End":o.preventDefault(),nt(r,null,$t);break}},bt=le();return u.jsxs(Le,p({className:$(P.root,C),ownerState:H,ref:l,as:m},Ut,{children:[bt.scrollButtonStart,bt.scrollbarSizeListener,u.jsxs(Fe,{className:P.scroller,ownerState:H,style:{overflow:Rt.overflow,[y?`margin${a?"Left":"Right"}`:"marginBottom"]:ct?void 0:-Rt.scrollbarWidth},ref:W,children:[u.jsx(je,{"aria-label":v,"aria-labelledby":h,"aria-orientation":x==="vertical"?"vertical":null,className:P.flexContainer,ownerState:H,onKeyDown:ne,ref:A,role:"tablist",children:re}),yt&&Nt]}),bt.scrollButtonEnd]}))}),Ct=Ae,Ft="index",V={tabs:`${Ft}-tabs`,tab:`${Ft}-tab`},Xe=ce(Ct)(({theme:t})=>({[`& .${V.tabs}`]:{},[`& .${V.tab}`]:{fontSize:"0.875rem",[t.breakpoints.up("md")]:{fontSize:"1rem"}}}));function Dt({tabs:t,current:e,onChange:l,...s}){return u.jsx(Ct,{scrollButtons:"auto",value:e,onChange:(n,a)=>l(a),...s,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{borderRadius:"100vw"},".MuiTabs-flexContainer":{borderRadius:"100vw",backgroundColor:L.backgroundsBgComponent,padding:.5,display:"inline-flex",columnGap:.25,maxWidth:"100%",overflowX:"auto"},".MuiTab-root":{borderRadius:"100vw",border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,color:L.foregroundsFgSubtile,fontSize:"13px",fontWeight:"normal",textTransform:"capitalize",transition:"background-color 0.2s ease","&.Mui-selected, &:hover":{backgroundColor:"white",borderColor:L.lineBorderBase,color:L.foregroundsFgBase}},".MuiTabs-indicator":{display:"none"},...s.sx},children:t.map(n=>u.jsx(xt,{className:V.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}Dt.propTypes={tabs:z.array.isRequired,current:z.string.isRequired,onChange:z.func.isRequired};function qt({tabs:t,current:e,onChange:l,...s}){return u.jsx(Ct,{scrollButtons:"auto",value:e,onChange:(n,a)=>l(a),...s,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{"&::after":{content:'""',display:"block",width:"100%",height:"1px",backgroundColor:L.strokeBorderStrong,bottom:0}},".MuiTabs-flexContainer":{display:"inline-flex",columnGap:2.5,px:0,pb:.5},".MuiTab-root":{border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,px:0,color:L.foregroundsFgSubtile,fontSize:"14px",fontWeight:500,textTransform:"capitalize",minWidth:"auto","&.Mui-selected, &:hover":{color:L.foregroundsFgBase}},".MuiTabs-indicator":{height:"1px",backgroundColor:L.foregroundsFgBase},...s.sx},children:t.map(n=>u.jsx(xt,{className:V.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}qt.propTypes={tabs:z.array.isRequired,current:z.string.isRequired,onChange:z.func.isRequired};function _e({tabs:t,current:e,onChange:l,...s}){return s.variant==="card"?u.jsx(Dt,{...s,tabs:t,current:e,onChange:l}):s.variant==="line"?u.jsx(qt,{...s,tabs:t,current:e,onChange:l}):u.jsx(Xe,{scrollButtons:"auto",variant:"scrollable",value:e,onChange:(n,a)=>l(a),indicatorColor:"primary",...s,className:[V.tabs,s.className||""].join(" "),children:t.map(n=>u.jsx(xt,{className:V.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}_e.propTypes={tabs:z.array.isRequired,current:z.string.isRequired,onChange:z.func.isRequired};export{_e as T,Ct as a,xt as b,ht as t};
|
|
1
|
+
import{bQ as vt,bR as mt,bL as X,bM as jt,bY as Ht,bN as p,r as d,bS as St,bP as at,bU as $,j as u,bV as gt,d1 as se,d2 as Ot,d3 as At,d4 as Xt,bT as st,bc as ae,d5 as ft,d6 as ie,s as ce,d7 as L,P as z}from"./index-CC1ndwks.js";import{K as de,a as ue}from"./Delete-DP2Kbw6K.js";let Y;function _t(){if(Y)return Y;const t=document.createElement("div"),e=document.createElement("div");return e.style.width="10px",e.style.height="1px",t.appendChild(e),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),Y="reverse",t.scrollLeft>0?Y="default":(t.scrollLeft=1,t.scrollLeft===0&&(Y="negative")),document.body.removeChild(t),Y}function be(t,e){const l=t.scrollLeft;if(e!=="rtl")return l;switch(_t()){case"negative":return t.scrollWidth-t.clientWidth+l;case"reverse":return t.scrollWidth-t.clientWidth-l;default:return l}}function pe(t){return mt("MuiTab",t)}const fe=vt("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),k=fe,he=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],ve=t=>{const{classes:e,textColor:l,fullWidth:s,wrapped:n,icon:a,label:v,selected:h,disabled:b}=t,g={root:["root",a&&v&&"labelIcon",`textColor${Ht(l)}`,s&&"fullWidth",n&&"wrapped",h&&"selected",b&&"disabled"],iconWrapper:["iconWrapper"]};return gt(g,pe,e)},me=X(jt,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.root,l.label&&l.icon&&e.labelIcon,e[`textColor${Ht(l.textColor)}`],l.fullWidth&&e.fullWidth,l.wrapped&&e.wrapped,{[`& .${k.iconWrapper}`]:e.iconWrapper}]}})(({theme:t,ownerState:e})=>p({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${k.iconWrapper}`]:p({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${k.selected}`]:{opacity:1},[`&.${k.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${k.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${k.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${k.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${k.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),Se=d.forwardRef(function(e,l){const s=St({props:e,name:"MuiTab"}),{className:n,disabled:a=!1,disableFocusRipple:v=!1,fullWidth:h,icon:b,iconPosition:g="top",indicator:B,label:C,onChange:m,onClick:T,onFocus:F,selected:w,selectionFollowsFocus:x,textColor:_="inherit",value:I,wrapped:it=!1}=s,D=at(s,he),K=p({},s,{disabled:a,disableFocusRipple:v,selected:w,icon:!!b,iconPosition:g,label:!!C,fullWidth:h,textColor:_,wrapped:it}),q=ve(K),j=b&&C&&d.isValidElement(b)?d.cloneElement(b,{className:$(q.iconWrapper,b.props.className)}):b,tt=E=>{!w&&m&&m(E,I),T&&T(E)},U=E=>{x&&!w&&m&&m(E,I),F&&F(E)};return u.jsxs(me,p({focusRipple:!v,className:$(q.root,n),ref:l,role:"tab","aria-selected":w,disabled:a,onClick:tt,onFocus:U,ownerState:K,tabIndex:w?0:-1},D,{children:[g==="top"||g==="start"?u.jsxs(d.Fragment,{children:[j,C]}):u.jsxs(d.Fragment,{children:[C,j]}),B]}))}),xt=Se;function ge(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function xe(t,e,l,s={},n=()=>{}){const{ease:a=ge,duration:v=300}=s;let h=null;const b=e[t];let g=!1;const B=()=>{g=!0},C=m=>{if(g){n(new Error("Animation cancelled"));return}h===null&&(h=m);const T=Math.min(1,(m-h)/v);if(e[t]=a(T)*(l-b)+b,T>=1){requestAnimationFrame(()=>{n(null)});return}requestAnimationFrame(C)};return b===l?(n(new Error("Element already at target position")),B):(requestAnimationFrame(C),B)}const Ce=["onChange"],ye={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Be(t){const{onChange:e}=t,l=at(t,Ce),s=d.useRef(),n=d.useRef(null),a=()=>{s.current=n.current.offsetHeight-n.current.clientHeight};return se(()=>{const v=Ot(()=>{const b=s.current;a(),b!==s.current&&e(s.current)}),h=At(n.current);return h.addEventListener("resize",v),()=>{v.clear(),h.removeEventListener("resize",v)}},[e]),d.useEffect(()=>{a(),e(s.current)},[e]),u.jsx("div",p({style:ye,ref:n},l))}function Te(t){return mt("MuiTabScrollButton",t)}const we=vt("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Me=we,Re=["className","slots","slotProps","direction","orientation","disabled"],Ie=t=>{const{classes:e,orientation:l,disabled:s}=t;return gt({root:["root",l,s&&"disabled"]},Te,e)},Ee=X(jt,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.root,l.orientation&&e[l.orientation]]}})(({ownerState:t})=>p({width:40,flexShrink:0,opacity:.8,[`&.${Me.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),We=d.forwardRef(function(e,l){var s,n;const a=St({props:e,name:"MuiTabScrollButton"}),{className:v,slots:h={},slotProps:b={},direction:g}=a,B=at(a,Re),C=Xt(),m=p({isRtl:C},a),T=Ie(m),F=(s=h.StartScrollButtonIcon)!=null?s:de,w=(n=h.EndScrollButtonIcon)!=null?n:ue,x=st({elementType:F,externalSlotProps:b.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m}),_=st({elementType:w,externalSlotProps:b.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m});return u.jsx(Ee,p({component:"div",className:$(T.root,v),ref:l,role:null,ownerState:m,tabIndex:null},B,{children:g==="left"?u.jsx(F,p({},x)):u.jsx(w,p({},_))}))}),ze=We;function Pe(t){return mt("MuiTabs",t)}const Ne=vt("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),ht=Ne,ke=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],kt=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,$t=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,nt=(t,e,l)=>{let s=!1,n=l(t,e);for(;n;){if(n===t.firstChild){if(s)return;s=!0}const a=n.disabled||n.getAttribute("aria-disabled")==="true";if(!n.hasAttribute("tabindex")||a)n=l(t,n);else{n.focus();return}}},$e=t=>{const{vertical:e,fixed:l,hideScrollbar:s,scrollableX:n,scrollableY:a,centered:v,scrollButtonsHideMobile:h,classes:b}=t;return gt({root:["root",e&&"vertical"],scroller:["scroller",l&&"fixed",s&&"hideScrollbar",n&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",v&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",h&&"scrollButtonsHideMobile"],scrollableX:[n&&"scrollableX"],hideScrollbar:[s&&"hideScrollbar"]},Pe,b)},Le=X("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[{[`& .${ht.scrollButtons}`]:e.scrollButtons},{[`& .${ht.scrollButtons}`]:l.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,l.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>p({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${ht.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),Fe=X("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.scroller,l.fixed&&e.fixed,l.hideScrollbar&&e.hideScrollbar,l.scrollableX&&e.scrollableX,l.scrollableY&&e.scrollableY]}})(({ownerState:t})=>p({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),je=X("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.flexContainer,l.vertical&&e.flexContainerVertical,l.centered&&e.centered]}})(({ownerState:t})=>p({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),He=X("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>p({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),Oe=X(Be)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Lt={},Ae=d.forwardRef(function(e,l){const s=St({props:e,name:"MuiTabs"}),n=ae(),a=Xt(),{"aria-label":v,"aria-labelledby":h,action:b,centered:g=!1,children:B,className:C,component:m="div",allowScrollButtonsMobile:T=!1,indicatorColor:F="primary",onChange:w,orientation:x="horizontal",ScrollButtonComponent:_=ze,scrollButtons:I="auto",selectionFollowsFocus:it,slots:D={},slotProps:K={},TabIndicatorProps:q={},TabScrollButtonProps:j={},textColor:tt="primary",value:U,variant:E="standard",visibleScrollbar:ct=!1}=s,Ut=at(s,ke),M=E==="scrollable",y=x==="vertical",G=y?"scrollTop":"scrollLeft",et=y?"top":"left",ot=y?"bottom":"right",dt=y?"clientHeight":"clientWidth",Q=y?"height":"width",H=p({},s,{component:m,allowScrollButtonsMobile:T,indicatorColor:F,orientation:x,vertical:y,scrollButtons:I,textColor:tt,variant:E,visibleScrollbar:ct,fixed:!M,hideScrollbar:M&&!ct,scrollableX:M&&!y,scrollableY:M&&y,centered:g&&!M,scrollButtonsHideMobile:!T}),P=$e(H),Yt=st({elementType:D.StartScrollButtonIcon,externalSlotProps:K.startScrollButtonIcon,ownerState:H}),Vt=st({elementType:D.EndScrollButtonIcon,externalSlotProps:K.endScrollButtonIcon,ownerState:H}),[yt,Kt]=d.useState(!1),[O,Bt]=d.useState(Lt),[Tt,Gt]=d.useState(!1),[wt,Qt]=d.useState(!1),[Mt,Jt]=d.useState(!1),[Rt,Zt]=d.useState({overflow:"hidden",scrollbarWidth:0}),It=new Map,W=d.useRef(null),A=d.useRef(null),Et=()=>{const o=W.current;let r;if(o){const i=o.getBoundingClientRect();r={clientWidth:o.clientWidth,scrollLeft:o.scrollLeft,scrollTop:o.scrollTop,scrollLeftNormalized:be(o,a?"rtl":"ltr"),scrollWidth:o.scrollWidth,top:i.top,bottom:i.bottom,left:i.left,right:i.right}}let c;if(o&&U!==!1){const i=A.current.children;if(i.length>0){const f=i[It.get(U)];c=f?f.getBoundingClientRect():null}}return{tabsMeta:r,tabMeta:c}},J=ft(()=>{const{tabsMeta:o,tabMeta:r}=Et();let c=0,i;if(y)i="top",r&&o&&(c=r.top-o.top+o.scrollTop);else if(i=a?"right":"left",r&&o){const S=a?o.scrollLeftNormalized+o.clientWidth-o.scrollWidth:o.scrollLeft;c=(a?-1:1)*(r[i]-o[i]+S)}const f={[i]:c,[Q]:r?r[Q]:0};if(isNaN(O[i])||isNaN(O[Q]))Bt(f);else{const S=Math.abs(O[i]-f[i]),R=Math.abs(O[Q]-f[Q]);(S>=1||R>=1)&&Bt(f)}}),ut=(o,{animation:r=!0}={})=>{r?xe(G,W.current,o,{duration:n.transitions.duration.standard}):W.current[G]=o},Wt=o=>{let r=W.current[G];y?r+=o:(r+=o*(a?-1:1),r*=a&&_t()==="reverse"?-1:1),ut(r)},zt=()=>{const o=W.current[dt];let r=0;const c=Array.from(A.current.children);for(let i=0;i<c.length;i+=1){const f=c[i];if(r+f[dt]>o){i===0&&(r=o);break}r+=f[dt]}return r},te=()=>{Wt(-1*zt())},ee=()=>{Wt(zt())},oe=d.useCallback(o=>{Zt({overflow:null,scrollbarWidth:o})},[]),le=()=>{const o={};o.scrollbarSizeListener=M?u.jsx(Oe,{onChange:oe,className:$(P.scrollableX,P.hideScrollbar)}):null;const c=M&&(I==="auto"&&(Tt||wt)||I===!0);return o.scrollButtonStart=c?u.jsx(_,p({slots:{StartScrollButtonIcon:D.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:Yt},orientation:x,direction:a?"right":"left",onClick:te,disabled:!Tt},j,{className:$(P.scrollButtons,j.className)})):null,o.scrollButtonEnd=c?u.jsx(_,p({slots:{EndScrollButtonIcon:D.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Vt},orientation:x,direction:a?"left":"right",onClick:ee,disabled:!wt},j,{className:$(P.scrollButtons,j.className)})):null,o},Pt=ft(o=>{const{tabsMeta:r,tabMeta:c}=Et();if(!(!c||!r)){if(c[et]<r[et]){const i=r[G]+(c[et]-r[et]);ut(i,{animation:o})}else if(c[ot]>r[ot]){const i=r[G]+(c[ot]-r[ot]);ut(i,{animation:o})}}}),lt=ft(()=>{M&&I!==!1&&Jt(!Mt)});d.useEffect(()=>{const o=Ot(()=>{W.current&&J()});let r;const c=S=>{S.forEach(R=>{R.removedNodes.forEach(Z=>{var N;(N=r)==null||N.unobserve(Z)}),R.addedNodes.forEach(Z=>{var N;(N=r)==null||N.observe(Z)})}),o(),lt()},i=At(W.current);i.addEventListener("resize",o);let f;return typeof ResizeObserver<"u"&&(r=new ResizeObserver(o),Array.from(A.current.children).forEach(S=>{r.observe(S)})),typeof MutationObserver<"u"&&(f=new MutationObserver(c),f.observe(A.current,{childList:!0})),()=>{var S,R;o.clear(),i.removeEventListener("resize",o),(S=f)==null||S.disconnect(),(R=r)==null||R.disconnect()}},[J,lt]),d.useEffect(()=>{const o=Array.from(A.current.children),r=o.length;if(typeof IntersectionObserver<"u"&&r>0&&M&&I!==!1){const c=o[0],i=o[r-1],f={root:W.current,threshold:.99},S=pt=>{Gt(!pt[0].isIntersecting)},R=new IntersectionObserver(S,f);R.observe(c);const Z=pt=>{Qt(!pt[0].isIntersecting)},N=new IntersectionObserver(Z,f);return N.observe(i),()=>{R.disconnect(),N.disconnect()}}},[M,I,Mt,B==null?void 0:B.length]),d.useEffect(()=>{Kt(!0)},[]),d.useEffect(()=>{J()}),d.useEffect(()=>{Pt(Lt!==O)},[Pt,O]),d.useImperativeHandle(b,()=>({updateIndicator:J,updateScrollButtons:lt}),[J,lt]);const Nt=u.jsx(He,p({},q,{className:$(P.indicator,q.className),ownerState:H,style:p({},O,q.style)}));let rt=0;const re=d.Children.map(B,o=>{if(!d.isValidElement(o))return null;const r=o.props.value===void 0?rt:o.props.value;It.set(r,rt);const c=r===U;return rt+=1,d.cloneElement(o,p({fullWidth:E==="fullWidth",indicator:c&&!yt&&Nt,selected:c,selectionFollowsFocus:it,onChange:w,textColor:tt,value:r},rt===1&&U===!1&&!o.props.tabIndex?{tabIndex:0}:{}))}),ne=o=>{const r=A.current,c=ie(r).activeElement;if(c.getAttribute("role")!=="tab")return;let f=x==="horizontal"?"ArrowLeft":"ArrowUp",S=x==="horizontal"?"ArrowRight":"ArrowDown";switch(x==="horizontal"&&a&&(f="ArrowRight",S="ArrowLeft"),o.key){case f:o.preventDefault(),nt(r,c,$t);break;case S:o.preventDefault(),nt(r,c,kt);break;case"Home":o.preventDefault(),nt(r,null,kt);break;case"End":o.preventDefault(),nt(r,null,$t);break}},bt=le();return u.jsxs(Le,p({className:$(P.root,C),ownerState:H,ref:l,as:m},Ut,{children:[bt.scrollButtonStart,bt.scrollbarSizeListener,u.jsxs(Fe,{className:P.scroller,ownerState:H,style:{overflow:Rt.overflow,[y?`margin${a?"Left":"Right"}`:"marginBottom"]:ct?void 0:-Rt.scrollbarWidth},ref:W,children:[u.jsx(je,{"aria-label":v,"aria-labelledby":h,"aria-orientation":x==="vertical"?"vertical":null,className:P.flexContainer,ownerState:H,onKeyDown:ne,ref:A,role:"tablist",children:re}),yt&&Nt]}),bt.scrollButtonEnd]}))}),Ct=Ae,Ft="index",V={tabs:`${Ft}-tabs`,tab:`${Ft}-tab`},Xe=ce(Ct)(({theme:t})=>({[`& .${V.tabs}`]:{},[`& .${V.tab}`]:{fontSize:"0.875rem",[t.breakpoints.up("md")]:{fontSize:"1rem"}}}));function Dt({tabs:t,current:e,onChange:l,...s}){return u.jsx(Ct,{scrollButtons:"auto",value:e,onChange:(n,a)=>l(a),...s,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{borderRadius:"100vw"},".MuiTabs-flexContainer":{borderRadius:"100vw",backgroundColor:L.backgroundsBgComponent,padding:.5,display:"inline-flex",columnGap:.25,maxWidth:"100%",overflowX:"auto"},".MuiTab-root":{borderRadius:"100vw",border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,color:L.foregroundsFgSubtile,fontSize:"13px",fontWeight:"normal",textTransform:"capitalize",transition:"background-color 0.2s ease","&.Mui-selected, &:hover":{backgroundColor:"white",borderColor:L.lineBorderBase,color:L.foregroundsFgBase}},".MuiTabs-indicator":{display:"none"},...s.sx},children:t.map(n=>u.jsx(xt,{className:V.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}Dt.propTypes={tabs:z.array.isRequired,current:z.string.isRequired,onChange:z.func.isRequired};function qt({tabs:t,current:e,onChange:l,...s}){return u.jsx(Ct,{scrollButtons:"auto",value:e,onChange:(n,a)=>l(a),...s,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{"&::after":{content:'""',display:"block",width:"100%",height:"1px",backgroundColor:L.strokeBorderStrong,bottom:0}},".MuiTabs-flexContainer":{display:"inline-flex",columnGap:2.5,px:0,pb:.5},".MuiTab-root":{border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,px:0,color:L.foregroundsFgSubtile,fontSize:"14px",fontWeight:500,textTransform:"capitalize",minWidth:"auto","&.Mui-selected, &:hover":{color:L.foregroundsFgBase}},".MuiTabs-indicator":{height:"1px",backgroundColor:L.foregroundsFgBase},...s.sx},children:t.map(n=>u.jsx(xt,{className:V.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}qt.propTypes={tabs:z.array.isRequired,current:z.string.isRequired,onChange:z.func.isRequired};function _e({tabs:t,current:e,onChange:l,...s}){return s.variant==="card"?u.jsx(Dt,{...s,tabs:t,current:e,onChange:l}):s.variant==="line"?u.jsx(qt,{...s,tabs:t,current:e,onChange:l}):u.jsx(Xe,{scrollButtons:"auto",variant:"scrollable",value:e,onChange:(n,a)=>l(a),indicatorColor:"primary",...s,className:[V.tabs,s.className||""].join(" "),children:t.map(n=>u.jsx(xt,{className:V.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}_e.propTypes={tabs:z.array.isRequired,current:z.string.isRequired,onChange:z.func.isRequired};export{_e as T,Ct as a,xt as b,ht as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as y}from"./index-
|
|
1
|
+
import{g as y}from"./index-CC1ndwks.js";var c={};function u(e,i){typeof i=="boolean"&&(i={forever:i}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=i||{},this._maxRetryTime=i&&i.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}var T=u;u.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};u.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};u.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var i=new Date().getTime();if(e&&i-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var t=this._timeouts.shift();if(t===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),t=this._cachedTimeouts.slice(-1);else return!1;var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},t),this._options.unref&&this._timer.unref(),!0};u.prototype.attempt=function(e,i){this._fn=e,i&&(i.timeout&&(this._operationTimeout=i.timeout),i.cb&&(this._operationTimeoutCb=i.cb));var t=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){t._operationTimeoutCb()},t._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};u.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};u.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};u.prototype.start=u.prototype.try;u.prototype.errors=function(){return this._errors};u.prototype.attempts=function(){return this._attempts};u.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},i=null,t=0,r=0;r<this._errors.length;r++){var n=this._errors[r],o=n.message,a=(e[o]||0)+1;e[o]=a,a>=t&&(i=n,t=a)}return i};(function(e){var i=T;e.operation=function(t){var r=e.timeouts(t);return new i(r,{forever:t&&(t.forever||t.retries===1/0),unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})},e.timeouts=function(t){if(t instanceof Array)return[].concat(t);var r={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var n in t)r[n]=t[n];if(r.minTimeout>r.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var o=[],a=0;a<r.retries;a++)o.push(this.createTimeout(a,r));return t&&t.forever&&!o.length&&o.push(this.createTimeout(a,r)),o.sort(function(s,m){return s-m}),o},e.createTimeout=function(t,r){var n=r.randomize?Math.random()+1:1,o=Math.round(n*Math.max(r.minTimeout,1)*Math.pow(r.factor,t));return o=Math.min(o,r.maxTimeout),o},e.wrap=function(t,r,n){if(r instanceof Array&&(n=r,r=null),!n){n=[];for(var o in t)typeof t[o]=="function"&&n.push(o)}for(var a=0;a<n.length;a++){var s=n[a],m=t[s];t[s]=(function(p){var f=e.operation(r),h=Array.prototype.slice.call(arguments,1),l=h.pop();h.push(function(_){f.retry(_)||(_&&(arguments[0]=f.mainError()),l.apply(this,arguments))}),f.attempt(function(){p.apply(t,h)})}).bind(t,m),t[s].options=r}}})(c);var v=c;const R=y(v);export{R as a,v as r};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as p,c as ue,u as J,e as Pe,aE as Tr,j as e,F as T,aF as ln,aG as Mn,aH as Er,aI as cn,aJ as _t,aK as he,aL as xe,P as u,n as V,q as N,ad as ne,aM as dn,aN as Pr,aO as Ar,aP as Ir,A as le,Q as un,m as O,U as te,ax as pe,C as Y,J as ge,B as G,aQ as zn,K as de,O as ee,f as Dt,R as Bn,aR as Lr,aS as Or,aa as kr,aT as Fr,aU as Nr,aV as Ur,z as Wn,W as mn,T as fn,k as Q,aW as Rt,a as xt,S as ie,b as Je,aX as qn,aY as Hn,aZ as Kn,a_ as $r,a2 as Mr,a$ as zr,b0 as Br,b1 as Wr,b2 as qr,b3 as Hr,b4 as ze,a8 as Kr,d as Gn,M as Gr,b5 as Yr,aD as ut,a9 as mt,a6 as ft,b6 as Vr,a7 as yt,i as Yn,N as Xr,b7 as Qr,b8 as we,b9 as _e,ba as Jr,bb as Zr,D as Vn,w as vt,bc as ei,h as ti,at as pn,bd as ni,be as gn,aj as ri,bf as ii,bg as oi,bh as ai}from"./index-
|
|
1
|
+
import{r as p,c as ue,u as J,e as Pe,aE as Tr,j as e,F as T,aF as ln,aG as Mn,aH as Er,aI as cn,aJ as _t,aK as he,aL as xe,P as u,n as V,q as N,ad as ne,aM as dn,aN as Pr,aO as Ar,aP as Ir,A as le,Q as un,m as O,U as te,ax as pe,C as Y,J as ge,B as G,aQ as zn,K as de,O as ee,f as Dt,R as Bn,aR as Lr,aS as Or,aa as kr,aT as Fr,aU as Nr,aV as Ur,z as Wn,W as mn,T as fn,k as Q,aW as Rt,a as xt,S as ie,b as Je,aX as qn,aY as Hn,aZ as Kn,a_ as $r,a2 as Mr,a$ as zr,b0 as Br,b1 as Wr,b2 as qr,b3 as Hr,b4 as ze,a8 as Kr,d as Gn,M as Gr,b5 as Yr,aD as ut,a9 as mt,a6 as ft,b6 as Vr,a7 as yt,i as Yn,N as Xr,b7 as Qr,b8 as we,b9 as _e,ba as Jr,bb as Zr,D as Vn,w as vt,bc as ei,h as ti,at as pn,bd as ni,be as gn,aj as ri,bf as ii,bg as oi,bh as ai}from"./index-CC1ndwks.js";import{T as si}from"./index-Bxr0QU8m.js";import{d as li}from"./ArrowDropDown-_NUZMAs3.js";import{u as Tt,C as re,a as hn}from"./index.esm-BTj_KCwg.js";import{S as Ce}from"./switch-control-B17GyPSA.js";import{d as Xn,i as ci}from"./is-path-prefix-equal-Cbnwy2Yf.js";import{T as K,F as di}from"./TextField-DMD0bhJ9.js";import{D as Qn,g as ui}from"./index-BXNB-HAQ.js";import{d as Jn}from"./Link-DyVx2epM.js";import{d as Ae}from"./Delete-DP2Kbw6K.js";import{C as Et}from"./delete-confirm-lQkwnGTS.js";import{I as Be}from"./index-5SVf0tFY.js";import{s as mi}from"./logo-BKA11TRi.js";import{_ as fi}from"./useLocalStorage-CBI6wbJu.js";import{L as pi}from"./LoadingButton-CXpu1MEX.js";import{C as gi,d as Zn}from"./Public-CNDJTj5P.js";import{d as Pt}from"./Add-CBlI6OP_.js";import{a as hi,B as er,D as xn,R as xi,b as yi}from"./url-evaluation-l10Af9J1.js";import{d as vi}from"./CheckCircle-DFcLtmlR.js";import{d as bi}from"./ExpandMore-3RzpbVTz.js";import{d as ji}from"./ChevronRight-CTMwG0CZ.js";import{d as Ci}from"./MoreVert-B3whUcSg.js";import{d as tr}from"./Edit-BE1ZZ-Tm.js";import{d as Si,a as nr}from"./Https-BE0YR8cf.js";import{W as $e}from"./tag-CCXE4PlV.js";import{w as wi}from"./withStyles-CDKZ5MjH.js";import{S as _i}from"./Slider-DJ5A6VX9.js";import"./index-CgdUe9yu.js";import"./Select-BFdUN7Gy.js";import"./InputLabel-D6AZ_TXn.js";import"./FilterList-Do3l0qfw.js";import"./LastPage-DFR_wWVB.js";import"./index-CF5rsCOW.js";import"./redux-CBs4zzpF.js";import"./Search-B8Ey1Xi7.js";import"./index-DVV4MjHu.js";import"./click-to-copy-Crhp_-Y4.js";import"./shorten-label-u7BOpbFf.js";const fe="Dashboard",rr=p.createContext({}),{Provider:Di,Consumer:cs}=rr,yn=[fe,T.DOMAIN_FOR_IP_SITE,T.DOMAIN_FOR_IP_SITE_REGEXP],Ri=(t,n)=>{if(t.name===T.DOMAIN_FOR_DEFAULT_SITE)return-1;if(n.name===T.DOMAIN_FOR_DEFAULT_SITE)return 1;const r=yn.includes(t.name),i=yn.includes(n.name);return r&&i?cn(t.name,n.name):r?-1:i?1:cn(t.name,n.name)},Ti=({sites:t,nodePort:n})=>{const r=window.location.host,o=(t||[]).map(a=>{const{id:l,rules:c=[],corsAllowedOrigins:h=[]}=a;let{domain:d,domainAliases:m}=a;m=m||[],[T.DOMAIN_FOR_IP_SITE,T.DOMAIN_FOR_IP_SITE_REGEXP].includes(d)&&(d=fe,m.find(f=>f.value===r)||m.unshift({protected:!1,value:r}));const g={id:l,name:d,type:"domain",items:[],domainAliases:m,isProtected:a.isProtected,corsAllowedOrigins:h};return(c||[]).forEach(f=>{const{id:y,isProtected:b,from:{pathPrefix:v},to:C}=f;if(C.type===T.ROUTING_RULE_TYPES.BLOCKLET){let R="";Number.parseInt(C.port,10)===Number.parseInt(n,10)?(R="Blocklet Server Dashboard",C.type=T.ROUTING_RULE_TYPES.DAEMON):R=C.did,g.items.push({id:y,name:ln(v||"/"),title:R,type:"rule",isProtected:b,pathPrefix:v,to:C})}else g.items.push({id:y,pathPrefix:v,name:ln(v||"/"),title:"Blocklet Server Dashboard",type:"rule",isProtected:b,to:C})}),g.items=Mn(g.items,f=>f.name),g}).sort(Ri),s=o.reduce((a,l)=>{let{name:c}=l;return c.endsWith(T.BLOCKLET_SITE_GROUP_SUFFIX)&&([c]=c.split(".")),a[c]={...l,rules:l.items},a},{});return{sites:o,siteMap:s}},Ei=({did:t,domain:n,mountPoint:r,siteMap:i,params:o}={})=>{if(!i)return null;const s=i[t];if(!s)return null;const a=n||(s.domainAliases||[])[0];if(!a)return null;let l=r;if(!l){const c=s.rules.filter(h=>!h.name.startsWith(T.WELLKNOWN_PATH_PREFIX))[0];l=c?c.name:"/"}return _t(a.value,l,o)},Pi=({did:t,mountPoint:n,siteMap:r,params:i}={})=>{if(!r)return[];const o=r[t];if(!o)return[];const s=o.domainAliases||[];if(!s.length)return[];let a=n;if(!a){const l=o.rules.filter(c=>!c.name.startsWith(T.WELLKNOWN_PATH_PREFIX))[0];a=l?l.name:"/"}return s.map(l=>_t(l.value,a,i))},Ai=t=>{const n=t.map(i=>i.domain).filter(i=>![T.DOMAIN_FOR_IP_SITE_REGEXP,T.DOMAIN_FOR_DEFAULT_SITE].includes(i));let r=[];return t.forEach(i=>r.push(...i.domainAliases||[])),r=r.map(i=>typeof i=="string"?{value:i,isProtected:!1}:i),{domains:n,domainsAliases:r}};function vn({children:t}){const n=ue(),{info:r}=J(),[i,o]=p.useState([]),[s,a]=p.useState([]),[l,c]=p.useState([]),h=Pe(async()=>{const{sites:S}=await n.getRoutingSites({input:{snapshotHash:""}}),E=S||[];await Promise.all(E.map(async w=>(w.domainAliases=await Tr(w.domainAliases,{getIP:Er}),w)));const L=Ai(E);o(E),a(L.domains),c([window.location.hostname,...L.domains,...L.domainsAliases.map(w=>w.value)])},[r]),d=(S,E)=>{o(L=>L.map(w=>w.id===S?E.domain?E:{...E,domain:w.domain}:w))},m=S=>n.takeRoutingSnapshot({input:{dryRun:!1,message:encodeURIComponent(S)}}),g=async S=>{const E=await n.addRoutingSite({input:S});o(i.concat(E.site))},f=async(S,E)=>{const L=await n.updateRoutingSite({input:{id:S,...E}});if(L.site&&L.site.id){const w=i.findIndex(P=>P.id===L.site.id);w!==-1&&(i.splice(w,1,L.site),o([].concat(i)))}},y=async S=>{await n.deleteRoutingSite({input:{id:S}}),o(i.filter(E=>E.id!==S))},b=async(S,E,L)=>{const w=await n.addDomainAlias({input:{id:S,domainAlias:E,force:L}});d(S,w.site)},v=async(S,E)=>{const L=await n.deleteDomainAlias({input:{id:S,domainAlias:E}});d(S,L.site)},C=async(S,E)=>{const{site:L}=await n.addRoutingRule({input:{id:S,rule:E}});d(S,L)},R=async(S,E)=>{const{site:L}=await n.updateRoutingRule({input:{id:S,rule:E}});d(S,L)},j=async(S,E)=>{const{site:L}=await n.deleteRoutingRule({input:{id:S,ruleId:E}});d(S,L)},x={loading:h.loading,error:h.error,refresh:h.retry,api:n,actions:{addSite:g,updateSite:f,deleteSite:y,addDomainAlias:b,deleteDomainAlias:v,takeSnapshot:m,addRule:C,updateRule:R,deleteRule:j}},{sites:I,siteMap:D}=Ti({sites:i,nodePort:r.port});return x.sites=I,x.siteMap=D,x.domains=s,x.allDomains=l,x.getBlockletUrl=({did:S,domain:E,mountPoint:L,params:w})=>Ei({did:S,domain:E,mountPoint:L,siteMap:x.siteMap,params:w}),x.getBlockletUrls=({did:S,mountPoint:E,params:L})=>Pi({did:S,mountPoint:E,siteMap:x.siteMap,params:L}),e.jsx(Di,{value:{routing:x},children:t})}function ae(){const{routing:t}=p.useContext(rr);return t}function At(t){const n=[T.DOMAIN_FOR_IP_SITE_REGEXP,T.DOMAIN_FOR_DEFAULT_SITE,T.DOMAIN_FOR_IP_SITE];return typeof window<"u"&&typeof window.location<"u"&&n.push(window.location.hostname),n.includes(t)}var It={},Ii=xe;Object.defineProperty(It,"__esModule",{value:!0});var ir=It.default=void 0,Li=Ii(he()),Oi=e;ir=It.default=(0,Li.default)((0,Oi.jsx)("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp");function ki(){return null}function Lt({confirm:t}){const[n,r]=p.useState(null),{t:i}=N(),o=()=>{r(null)},s=async l=>{if(l){let c=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";c==="/"?dn.push(`${l.pathname}`):(c.endsWith("/")&&(c=c.substring(0,c.length-1)),dn.push(`${c}${l.pathname}`)),window.location.reload()}},a=(l,...c)=>{let h=typeof t=="function"?t(l,...c):t;return h?(typeof h=="string"&&(h={description:h}),r({title:i("common.noticeTitle"),description:i("common.leavePageTip"),confirm:i("common.confirm"),cancel:i("common.cancel"),onConfirm:()=>s(l),onCancel:()=>o(),...h}),!1):!0};return e.jsxs(Fi,{children:[e.jsx(ki,{message:a}),n&&e.jsx(ne,{title:n.title,description:n.description,confirm:n.confirm,cancel:n.cancel,params:n.params,onConfirm:n.onConfirm,onCancel:n.onCancel})]})}Lt.propTypes={confirm:u.oneOfType([u.object,u.string,u.func])};Lt.defaultProps={confirm:null};const Fi=V.div`
|
|
2
2
|
margin-bottom: 24px;
|
|
3
3
|
.top-btns-alert {
|
|
4
4
|
@media (max-width: ${t=>t.theme.breakpoints.values.sm}px) {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{aj as X,z as $,r as p,a as Z,b as ee,P as x,q as j,u as P,y as te,au as N,M as _,j as t,x as q,av as se,a1 as S,m as v,D as M,aw as oe,U as O,ax as re,B as W,C as z,ay as ne,A as K,K as V,az as ae,aA as ie,aB as le,F as ce,aC as B,i as ue,n as G,aa as de,a4 as pe,a7 as he,a8 as fe,aD as me,a9 as ge,O as xe}from"./index-CC1ndwks.js";import{_ as D}from"./useLocalStorage-CBI6wbJu.js";import{c as be,C as ke,A as ye,D as Se,B as je,S as H,a as Pe,b as we}from"./item-BCeOssCF.js";import{d as Re}from"./ArrowDropDown-_NUZMAs3.js";import{B as ve}from"./Breadcrumbs-D-zIyMgq.js";import"./index-DzxtBPCC.js";import"./index-ZG7jWpak.js";import"./index-DVV4MjHu.js";import"./Search-B8Ey1Xi7.js";import"./index-CgdUe9yu.js";import"./Select-BFdUN7Gy.js";import"./InputAdornment-DwuVDGhs.js";import"./preact.module-B1z5cdvs.js";import"./Add-CBlI6OP_.js";import"./TextField-DMD0bhJ9.js";import"./InputLabel-D6AZ_TXn.js";import"./Launch-CouSgez_.js";import"./Done-tC1zTTTI.js";import"./DeleteOutline-B8oYxNwP.js";import"./DeleteOutline-DRdvA-Zf.js";import"./delete-confirm-lQkwnGTS.js";import"./click-to-copy-Crhp_-Y4.js";import"./shorten-label-u7BOpbFf.js";import"./blocklet-ChPmEIKa.js";import"./MoreVert-B3whUcSg.js";import"./ButtonGroup-By_ymyXi.js";import"./getValidReactChildren-5uFkq4GS.js";function Ce(e){const n=X(),c=$(),[s,o]=D(`sid:blocklet:purchase:${e}`),[l,u]=p.useState(!1),[h,a]=p.useState(null),d=()=>{const{pathname:r,searchParams:m}=new URL(window.location.href),b=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";m.get("sid")&&(o(""),c(r.replace(b,"/"),{replace:!0}))},i=!!(n.get("assetDid")&&s&&n.get("sid")===s);return Z(ee.BlockletEvents.purchaseChange,r=>{r.did===e&&(a(r.session),["declined","confirmed","error"].includes(r.session.status)&&(u(!0),setTimeout(d,2e3)))}),p.useEffect(()=>{h&&h.id!==s&&o(h.id)},[h]),{hasCompleted:l,hasPurchased:i,session:h,setSession:a,doRedirect:d}}function E({meta:e,onCancel:n,handlePaySuccess:c,storeUrl:s}){const{t:o}=j(),{info:l}=P(),[u,h]=p.useState("both"),[a,d]=p.useState(1),i=te(l),r=N(e,l,s),m=R=>{R!==u&&h(R)},b=()=>{u&&(d(2),u==="verify"&&(window.location.href=r))},k=(R,L)=>{L!=="backdropClick"&&n()},w=()=>{c(r)},f=_.getDisplayName({meta:e});if(u==="purchase"&&a===2)return t.jsx(q,{open:!0,popup:!0,baseUrl:s,action:"acquire-asset",checkFn:se.create({baseURL:S(s,"/store")}).get,onSuccess:w,onClose:n,checkTimeout:60*5e3,extraParams:{factory:e.nftFactory},webWalletUrl:i,disableClose:!0,saveConnect:!1,showDownload:!1,messages:{title:o("store.purchase.auth.title",{name:f}),scan:o("store.purchase.auth.scan"),confirm:o("store.purchase.auth.confirm"),success:t.jsxs(t.Fragment,{children:[t.jsx(v,{gutterBottom:!0,children:o("store.purchase.auth.success")}),t.jsxs(v,{variant:"subtitle2",children:[" ",o("store.purchase.autoLaunch",{name:f})]})]})}});const g=M;return t.jsx(g,{title:o("store.purchase.title",{name:f}),disableEscapeKeyDown:!0,open:!0,fullWidth:!0,onClose:k,children:t.jsx("div",{style:{marginBottom:16},children:t.jsx(ke,{action:u,onNext:b,onSelect:m})})})}E.propTypes={...be,storeUrl:x.string.isRequired,handlePaySuccess:x.func};E.defaultProps={handlePaySuccess:e=>{setTimeout(()=>{window.location.href=e},1e3)}};function U({meta:e,buttonText:n,storeUrl:c,isResource:s}){const{t:o}=j(),l=$(),{info:u}=P(),{api:h}=oe(),a=_.isFreeBlocklet(e)===!1,[d,i]=p.useState(!1),{hasPurchased:r}=Ce(e.did),[m,b]=p.useState(!1),[k]=D("instant-blocklet-install",!1),[w,f]=p.useState(!1),g=p.useMemo(()=>d?o(a?"blocklet.status.purchasing":"blocklet.status.waiting"):"",[d,o,a]),R=p.useMemo(()=>s?o("blocklet.status.resource"):a?n.purchase:n.launch,[a,n,s]),L=y=>{y.preventDefault(),y.stopPropagation();try{if(i(!0),a){b(!0);return}if(k){f(!0);return}if(!a){const C=N(e,u,c);window.location.href=C}}catch(C){K.error(V(C),{autoHideDuration:5e3}),console.error("Blocklet installed failed",C)}finally{i(!1)}},Q=()=>{i(!1),b(!1)},Y=y=>{i(!1),f(!1),l(`/blocklets/${y.appDid}/components`)},J=()=>{i(!1),f(!1)};return t.jsxs(t.Fragment,{children:[t.jsx(ye,{children:t.jsx(O,{permission:"mutate_blocklets",children:y=>t.jsx(re,{title:s?o("launchBlocklet.error.resourceBlocklet"):"",children:t.jsx(W,{onClick:L,size:"small",sx:{cursor:s?"not-allowed":"pointer"},disabled:!!(g||!y),variant:"outlined",color:"primary","data-cy":"install-blocklet",children:g?t.jsxs(t.Fragment,{children:[t.jsx(z,{size:16,style:{marginRight:3}}),g]}):R},e.did)})})}),(r||m)&&t.jsx(E,{method:"launch",meta:e,mode:"both",onCancel:Q,storeUrl:c}),w&&t.jsx(q,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:h.get,checkTimeout:5*60*1e3,onSuccess:Y,extraParams:{title:e.title,blockletMetaUrl:decodeURIComponent(ne(c,e.did).trim())},messages:{title:o("setup.keyPair.title"),scan:o("setup.keyPair.scan"),confirm:o("setup.keyPair.confirm"),success:o("setup.keyPair.success")},onClose:J})]})}U.propTypes={isResource:x.bool,meta:x.object.isRequired,buttonText:x.shape({purchase:x.string.isRequired,launch:x.string.isRequired}).isRequired,storeUrl:x.string.isRequired};U.defaultProps={isResource:!1};const De=(e,n,c)=>{const s=de(n);return S(c,`/blocklets/${e.did}/?server-url=${s}`)},A=({meta:e,attribute:n,value:c})=>e._formatted?e._formatted[n]:c;function T({blocklet:e,endpoint:n}){const{t:c}=j(),s=P();let o=S(s.imgPrefix,"blocklet.png");const l=n;if(l.startsWith("http")&&e.logo)o=S(l,le(e.did,e.logo,e.version));else{let r=(window.env.apiPrefix||"/").replace(/^\/+/,"").replace(/\/+$/,"");r&&(r=`/${r}`),o=S(r,`/blocklet/logo/${e.did}`)}try{const i=new URL(o);i.searchParams.set("v",e.version||+new Date),o=i.href}catch{}const u=(s==null?void 0:s.info.mode)!==ce.NODE_MODES.SERVERLESS,h=i=>i.currentTarget.contains(i.target)?!0:(i.preventDefault(),!1),a={meta:e,buttonText:{purchase:c("common.purchase"),launch:c("common.launch")},storeUrl:l};let d=null;return u&&(d=t.jsx("div",{style:{display:"flex",alignItems:"center"},children:t.jsx(U,{isResource:!(B.hasStartEngine(e)||B.isGatewayBlocklet(e)||B.isPackBlocklet(e)),...a})})),t.jsx(ue,{href:De(e,s.info,n),style:{color:"initial",textDecoration:"none"},onClick:h,target:"_blank",children:t.jsx(Le,{title:A({meta:e,attribute:"title",value:e.title||e.name}),did:e.did,description:A({meta:e,attribute:"description",value:e.description}),cover:e.logo?o:"",version:e.version,button:d})})}T.propTypes={blocklet:x.object.isRequired,endpoint:x.string};T.defaultProps={endpoint:""};function I({storeUrl:e,handleSearchSelect:n,extraFilter:c,...s}){var r;const{locale:o}=j(),l=P(),[u,h]=p.useState({}),a=m=>{h(m)},d=e,i=(r=l==null?void 0:l.info)==null?void 0:r.version;return p.useEffect(()=>{h({})},[d]),t.jsx(ae,{FallbackComponent:ie,resetKeys:[d],children:t.jsx("div",{...s,children:t.jsx(Se,{blockletRender:m=>{const b={...m,endpoint:d};return t.jsx(T,{...b})},baseSearch:!0,endpoint:d,locale:o,onFilterChange:a,onSearchSelect:n,filters:u,extraFilter:c,serverVersion:i})})})}I.propTypes={storeUrl:x.string.isRequired,handleSearchSelect:x.func,extraFilter:x.func};I.defaultProps={handleSearchSelect:null,extraFilter:void 0};const Le=G(je)`
|
|
2
|
+
.ms-highlight {
|
|
3
|
+
color: ${e=>e.theme.palette.primary.main};
|
|
4
|
+
}
|
|
5
|
+
`,Be=pe(()=>({buttonText:{textTransform:"none !important"},iconRoot:{minWidth:24},menuName:{display:"flex",flexDirection:"column",marginRight:"100px","& span":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})),F=p.forwardRef(({onChange:e,onDelete:n},c)=>{const{info:s}=P(),{t:o}=j(),[l,u]=p.useState(!1),[h,a]=p.useState(!1),[d,i]=p.useState(-1),r=Be(),[m,b]=D(H),k=Math.max(s.blockletRegistryList.findIndex(f=>f.url===m),0),w=f=>{try{u(!0),i(f);const g=s.blockletRegistryList[f];b(g.url),e(g.url),a(!1)}catch(g){console.error(g),K.error(`${o("store.blockletRegistry.changeFailed")} ${V(g)}`)}finally{u(!1)}};return p.useImperativeHandle(c,()=>({setOpen:a})),t.jsxs(t.Fragment,{children:[t.jsx(O,{permission:"mutate_node",children:f=>t.jsx(W,{disabled:!f,classes:{text:r.buttonText},color:"secondary","data-cy":"store-toggle",onClick:()=>{a(!0)},endIcon:t.jsx(Re,{}),children:t.jsx(v,{color:"secondary",children:s.blockletRegistryList[k].name})})}),t.jsx(M,{title:o("store.blockletRegistry.switchRegistry"),disableEscapeKeyDown:!0,disablePortal:!1,fullWidth:!0,open:h,onClose:()=>a(!1),children:t.jsxs(he,{className:r.tabPanel,children:[s.blockletRegistryList.map((f,g)=>t.jsxs(fe,{button:!0,disabled:l,selected:k===g,"data-cy":"store-switch",onClick:()=>{if(!l){if(g===k){a(!1);return}w(g)}},children:[d===g&&l&&t.jsx(me,{className:r.iconRoot,children:t.jsx(z,{size:16})}),t.jsx(ge,{children:t.jsx(Pe,{teamDid:s.did,store:f,onDelete:()=>n(f.url)})})]},f.url)),t.jsx(we,{disabled:l,onAdd:e,teamDid:s.did,blockletRegistryList:s.blockletRegistryList})]})})]})});F.propTypes={onChange:x.func,onDelete:x.func};F.defaultProps={onChange:()=>{},onDelete:()=>{}};const Ee=F;function at(){const{t:e}=j(),{info:n}=P(),[c]=D(H),{blockletRegistryList:s}=n,o=s.find(r=>c===r.url)||s[0],[l,u]=p.useState(o.url),h=n.routing.adminPath,a=S(window.location.origin,h),d=({detailUrl:r})=>{const m=new URL(r);m.searchParams.set("server-url",a);const b=document.createElement("a");b.setAttribute("target","_blank"),b.setAttribute("href",m.href),b.click()},i=p.useRef(null);return t.jsxs(Ue,{children:[t.jsxs(ve,{separator:"›","aria-label":"breadcrumb",className:"page-breadcrumb",children:[t.jsx(v,{color:"textPrimary",children:e("common.store")}),t.jsx(Ee,{ref:i,onChange:r=>u(r),onDelete:r=>{var m;l===r&&u((m=n.blockletRegistryList[0])==null?void 0:m.url)}})]}),t.jsx(xe,{className:"store-header",display:"flex",justifyContent:"space-between",p:0,m:0,children:t.jsx(v,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:e("store.headerDescription")})}),t.jsx(I,{className:"blocklet-list",handleSearchSelect:d,storeUrl:l})]})}const Ue=G.main`
|
|
6
|
+
@media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
|
|
7
|
+
.store-header {
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
margin-bottom: 32px !important;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.page-header {
|
|
13
|
+
margin-bottom: 16px !important;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
.blocklet-list {
|
|
17
|
+
aside:hover {
|
|
18
|
+
height: calc(100vh - 235px);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
`;export{at as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__fileDeps=["./index-
|
|
1
|
+
const __vite__fileDeps=["./index-yzdWHDuH.js","./index-D9k2I5J1.js","./index-5SVf0tFY.js","./click-to-copy-Crhp_-Y4.js","./withStyles-CDKZ5MjH.js","./index-DXsbagZE.js","./useLocalStorage-CBI6wbJu.js","./index-BXNB-HAQ.js","./FilterList-Do3l0qfw.js","./Select-BFdUN7Gy.js","./Delete-DP2Kbw6K.js","./InputLabel-D6AZ_TXn.js","./TextField-DMD0bhJ9.js","./LastPage-DFR_wWVB.js","./index-CF5rsCOW.js","./redux-CBs4zzpF.js","./Search-B8Ey1Xi7.js","./index-DVV4MjHu.js","./MoreVert-B3whUcSg.js","./url-evaluation-l10Af9J1.js","./tag-CCXE4PlV.js","./actions-CXBa1BBO.js","./ButtonGroup-By_ymyXi.js","./getValidReactChildren-5uFkq4GS.js","./index-Cuo7-0Cq.js","./isEqual-BbNuqCAe.js","./install-from-url-BARZDCTT.js","./Stepper-piTxdKQU.js","./app-avatar-BQQaDhpx.js","./Add-CBlI6OP_.js","./index-BPnSwJ1l.js","./ExpandMore-3RzpbVTz.js","./index-B3Zt0_35.js","./index-C_6P8rFc.js","./url-join-Byro3u2f.js","./Skeleton-Bq-LHi-2.js","./Close-C7JfjION.js","./lottie-DR63dhlr.js","./wait-container-DNpXoa46.js","./Launch-CouSgez_.js","./DeleteOutline-B8oYxNwP.js","./DeleteOutline-DRdvA-Zf.js","./spaces-DAIyizkR.js","./api-UR4kvn9E.js","./index-C9KBqEgO.js","./item-BCeOssCF.js","./index-DzxtBPCC.js","./index-ZG7jWpak.js","./index-CgdUe9yu.js","./InputAdornment-DwuVDGhs.js","./preact.module-B1z5cdvs.js","./Done-tC1zTTTI.js","./delete-confirm-lQkwnGTS.js","./shorten-label-u7BOpbFf.js","./blocklet-ChPmEIKa.js","./item-CxkJY_14.css","./ArrowDropDown-_NUZMAs3.js","./Breadcrumbs-D-zIyMgq.js","./index-C2a0vC_a.js","./index-Bxr0QU8m.js","./index.esm-BTj_KCwg.js","./switch-control-B17GyPSA.js","./is-path-prefix-equal-Cbnwy2Yf.js","./Link-DyVx2epM.js","./logo-BKA11TRi.js","./LoadingButton-CXpu1MEX.js","./Public-CNDJTj5P.js","./CheckCircle-DFcLtmlR.js","./ChevronRight-CTMwG0CZ.js","./Edit-BE1ZZ-Tm.js","./Https-BE0YR8cf.js","./Slider-DJ5A6VX9.js","./index-BO1fRvMf.js","./download-CQ8vxrab.js","./download-D33dFtt_.css","./index-5FtPkeAB.js","./audit-logs-M6VjO6ZY.js","./index-B8C4pOOu.js","./index-D4PP6P2d.css","./Pagination-DDYKKK02.js","./index-CC1qLncJ.js","./index-B9dsKJcE.js","./Loop-BALLXtEO.js","./ViewList-CJj9MHYa.js","./list-header-C-NFaGBI.js","./index-BOuMxb3Q.js","./index-BTZWTFSn.js","./ua-parser-CxBhcPmn.js","./index-CmhE_K0y.js","./team-BSlyvC6c.js","./actions-B8oxTC01.js","./index-yKeCR3QS.js","./EditIcon-8lCGiLnt.js","./LockIcon-DVrS5iFD.js","./Google-CIgaEutQ.js","./ToggleButtonGroup-6WK6LBLt.js","./detail-U0KQ2egr.js","./index-CRb7tyay.js","./index-D1iFHNgi.js","./invitation-BVEDeXPr.js","./index-HzScigWU.js","./index-BHOFu69h.js","./wrap-locale-CjBWx_ua.js","./index-DVdaomTJ.js","./index-CnrdD6WK.js","./index-BNjhH_d8.js","./agreement-831LxBXw.js","./index-xOV9jJH3.js","./index-BsBUGa5J.js","./index-DYd4EkOT.js","./index-CXyn4xMF.js","./index-C7igR7se.css","./index-B_IM460j.js","./traffic-CQoQSkkE.js","./iframe-CVrBSWYD.js","./ChevronLeft-fo4GMv_v.js","./chart-XLU84wBc.js","./bundle-avatar-CELq2peD.js","./memory-C2Ggp1ds.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
2
|
var QT=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var mn=(e,t,n)=>(QT(e,t,"read from private field"),n?n.call(e):t.get(e)),fo=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Gi=(e,t,n,r)=>(QT(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var ex=(e,t,n,r)=>({set _(i){Gi(e,t,i,n)},get _(){return mn(e,t,r)}}),Nr=(e,t,n)=>(QT(e,t,"access private method"),n);function dG(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var ht=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Kt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function wi(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var pG={exports:{}},I4={},hG={exports:{}},Wn={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react.production.min.js
|
|
@@ -2490,4 +2490,4 @@ ${r}
|
|
|
2490
2490
|
${e=>e.scrollable?"":"overflow: hidden"};
|
|
2491
2491
|
}
|
|
2492
2492
|
`;function GCt(){const{t:e}=vo(),{session:t}=k0(),{info:n,refresh:r}=Ol();return Qi(oi.TeamEvents.userUpdated,({teamDid:i,user:o})=>{i===n.did&&o&&!o.approved&&t&&t.user&&t.user.did===o.did&&(gi.warning(e("session.forbidLogin"),{autoHideDuration:10*1e3}),t.logout())}),Qi(rn.EVENTS.NOTIFICATION_CREATE,i=>{i.entityType==="node"&&r({silent:!0})}),Qi(rn.EVENTS.NODE_UPDATED,()=>{r({silent:!0})}),null}var Ls={},KCt=Gie;function JCt(e){return e&&e.length?KCt(e):[]}var Rue=JCt;const _Et=Kt(Rue),YCt=wi(SHe);class ZCt{constructor(t){this.value=t,this.next=void 0}}let XCt=class{constructor(){this.clear()}enqueue(t){const n=new ZCt(t);this._head?(this._tail.next=n,this._tail=n):(this._head=n,this._tail=n),this._size++}dequeue(){const t=this._head;if(t)return this._head=this._head.next,this._size--,t.value}clear(){this._head=void 0,this._tail=void 0,this._size=0}get size(){return this._size}*[Symbol.iterator](){let t=this._head;for(;t;)yield t.value,t=t.next}};var QCt=XCt;const eAt=QCt,tAt=e=>{if(!((Number.isInteger(e)||e===1/0)&&e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const t=new eAt;let n=0;const r=()=>{n--,t.size>0&&t.dequeue()()},i=async(s,l,...c)=>{n++;const u=(async()=>s(...c))();l(u);try{await u}catch{}r()},o=(s,l,...c)=>{t.enqueue(i.bind(null,s,l,...c)),(async()=>(await Promise.resolve(),n<e&&t.size>0&&t.dequeue()()))()},a=(s,...l)=>new Promise(c=>{o(s,c,...l)});return Object.defineProperties(a,{activeCount:{get:()=>n},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),a};var nAt=tAt,kue={},Oi={};Oi.endianness=function(){return"LE"};Oi.hostname=function(){return typeof location<"u"?location.hostname:""};Oi.loadavg=function(){return[]};Oi.uptime=function(){return 0};Oi.freemem=function(){return Number.MAX_VALUE};Oi.totalmem=function(){return Number.MAX_VALUE};Oi.cpus=function(){return[]};Oi.type=function(){return"Browser"};Oi.release=function(){return typeof navigator<"u"?navigator.appVersion:""};Oi.networkInterfaces=Oi.getNetworkInterfaces=function(){return{}};Oi.arch=function(){return"javascript"};Oi.platform=function(){return"browser"};Oi.tmpdir=Oi.tmpDir=function(){return"/tmp"};Oi.EOL=`
|
|
2493
|
-
`;Oi.homedir=function(){return"/"};(function(e){var t=ht&&ht.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.hasMountPoint=e.hasStartEngine=e.isPackBlocklet=e.isGatewayBlocklet=e.getBlockletEngine=void 0;const n=t(Oi),r=oi,i=c=>{if(c===void 0)throw new Error("blocklet meta param is required");const{engine:u}=c;if(!u)return{interpreter:"node",source:""};if(!Array.isArray(u))return u;const d=n.default.platform(),p=u.find(m=>m.platform===d);if(!p)throw new Error(`can not find a proper engine interpreter on ${d}`);return p};e.getBlockletEngine=i;const o=c=>(c==null?void 0:c.group)===r.BlockletGroup.gateway;e.isGatewayBlocklet=o;const a=c=>(c==null?void 0:c.group)===r.BlockletGroup.pack;e.isPackBlocklet=a;const s=c=>!!(c!=null&&c.main)||(0,e.getBlockletEngine)(c||{}).interpreter==="blocklet";e.hasStartEngine=s;const l=c=>((0,e.hasStartEngine)(c)||((c==null?void 0:c.interfaces)||[]).find(u=>u.type===r.BLOCKLET_INTERFACE_TYPE_WEB))&&(0,e.isGatewayBlocklet)(c)===!1;e.hasMountPoint=l})(kue);(function(e){var t=ht&&ht.__importDefault||function(te){return te&&te.__esModule?te:{default:te}};Object.defineProperty(e,"__esModule",{value:!0}),e.isPackBlocklet=e.isGatewayBlocklet=e.isAccessible=e.isRunning=e.isBeforeInstalled=e.isInProgress=e.getBlockletServices=e.getBlockletAppIdList=e.getRolesFromAuthConfig=e.isPreferenceKey=e.isExternalBlocklet=e.getBlockletChainInfo=e.getChainInfo=e.getConnectAppUrl=e.getParentComponentName=e.filterComponentsV2=e.findComponentByIdV2=e.findComponentV2=e.findComponentById=e.findComponent=e.getComponentBundleId=e.getComponentName=e.getComponentId=e.replaceSlotToIp=e.getComponentWhoCanAccess=e.getWhoCanAccess=e.findServiceFromMeta=e.findWebInterfacePort=e.findWebInterface=e.fixBlockletStatus=e.getAppDescription=e.getDisplayName=e.getAppName=e.hasRunnableComponent=e.wipeSensitiveData=e.isEnvShareable=e.isEnvShareableToClient=e.getComponentMissingConfigs=e.getAppMissingConfigs=e.getSharedConfigObj=e.isDeletableBlocklet=e.forEachComponentV2Sync=e.forEachComponentV2=e.forEachChildSync=e.forEachChild=e.forEachBlockletSync=e.forEachBlocklet=e.isFreeComponent=e.isFreeBlocklet=e.getAppUrl=void 0,e.hasResourceType=e.hasStartEngine=void 0;const n=t(Gw),r=t(Rue),i=YCt,o=t(nAt),a=t(rn),s=oi,l=kue;Object.defineProperty(e,"hasStartEngine",{enumerable:!0,get:function(){return l.hasStartEngine}}),Object.defineProperty(e,"isGatewayBlocklet",{enumerable:!0,get:function(){return l.isGatewayBlocklet}}),Object.defineProperty(e,"isPackBlocklet",{enumerable:!0,get:function(){return l.isPackBlocklet}});const{NODE_SERVICES:c,SLOT_FOR_IP_DNS_SITE:u,WHO_CAN_ACCESS:d,WHO_CAN_ACCESS_PREFIX_ROLES:p}=a.default,m=(te,we=[])=>`${we.map(Be=>Be&&Be.meta?Be.meta.did:"").join("/")}${we.length?"/":""}${te&&te.meta?te.meta.did:""}`;e.getComponentId=m;const y=(te,we=[])=>`${we.map(Be=>Be&&Be.meta?Be.meta.name:"").join("/")}${we.length?"/":""}${te&&te.meta?te.meta.name:""}`;e.getComponentName=y;const b=te=>`${te.meta.bundleName}@${te.meta.version}`;e.getComponentBundleId=b;const C=te=>{if(!te)return"";const we=te.split("/");return we.pop(),!we.length||(we[we.length-1].startsWith("@")&&we.pop(),!we.length)?"":we.join("/")};e.getParentComponentName=C;const x=(te,we,{parallel:Be=!1,concurrencyLimit:ke=5,sync:re,params:V,_parent:W,_root:ce,_level:Re=0,_tasks:_e,_ancestors:De=[],_limit:Ve}={})=>{const Fe=ce||W||te,je=m(te,De),ot=De.concat(te);if(re){const Le=we(te,{parent:W,root:Fe,level:Re,params:V,ancestors:De,id:je});if(te.children)for(const Oe of te.children)x(Oe,we,{sync:re,params:Le,_parent:te,_root:Fe,_level:Re+1,_ancestors:ot});return null}if(!Be)return new Promise(async(Le,Oe)=>{try{const Ie=await we(te,{parent:W,root:Fe,level:Re,ancestors:De,params:V,id:je});if(te.children)for(const nt of te.children)await x(nt,we,{params:Ie,_parent:te,_root:Fe,_level:Re+1,_ancestors:ot});Le(null)}catch(Ie){Oe(Ie)}});const Ze=Ve||(0,o.default)(ke),Je=_e||[];if(Je.push(Ze(()=>we(te,{parent:W,root:Fe,level:Re,ancestors:De,id:je}))),te.children)for(const Le of te.children)x(Le,we,{parallel:Be,_parent:te,_root:Fe,_level:Re+1,_tasks:Je,_ancestors:ot,_limit:Ze});return _e?null:Promise.all(Je)};e.forEachBlocklet=x;const D=(te,we)=>x(te,we,{sync:!0});e.forEachBlockletSync=D;const L=(te,we,{parallel:Be=!1,concurrencyLimit:ke=5,sync:re}={})=>{if(re){if(te.children)for(const ce of te.children)we(ce);return null}if(!Be)return new Promise(async(ce,Re)=>{try{if(te.children)for(const _e of te.children)await we(_e);ce(null)}catch(_e){Re(_e)}});const V=(0,o.default)(ke),W=[];if(te.children)for(const ce of te.children)W.push(V(()=>we(ce)));return Promise.all(W)};e.forEachComponentV2=L;const P=(te,we)=>L(te,we,{sync:!0});e.forEachComponentV2Sync=P;const q=(te,we,Be)=>x(te,(ke,re)=>re.level===0?{}:we(ke,re),Be);e.forEachChild=q;const B=(te,we)=>q(te,we,{sync:!0});e.forEachChildSync=B;const j=(te,we,{_ancestors:Be=[],returnAncestors:ke=!1}={})=>{if(!we)return null;if(we(te,{ancestors:Be}))return ke?{component:te,ancestors:Be}:te;for(const re of te.children||[]){const V=Be.concat(te),W=j(re,we,{_ancestors:V,returnAncestors:ke});if(W)return W}return null};e.findComponent=j;const K=(te,we,{returnAncestors:Be=!1}={})=>(Array.isArray(we)&&(we=we.join("/")),j(te,(ke,{ancestors:re})=>{const V=m(ke,re);return we===V},{returnAncestors:Be}));e.findComponentById=K;const oe=(te,we)=>{if(!we)return null;for(const Be of te.children||[])if(we(Be,te))return Be;return null};e.findComponentV2=oe;const ue=(te,we)=>we?(Array.isArray(we)&&(we=we.join("/")),oe(te,(Be,ke)=>{if(we.includes("/")){const re=m(Be,[ke]);return we===re}return we===Be.meta.did})):null;e.findComponentByIdV2=ue;const G=(te,we)=>{if(!we)return[];const Be=[];for(const ke of te.children||[])we(ke,te)&&Be.push(ke);return Be};e.filterComponentsV2=G;const M=te=>!!te&&!!(te.key||te.name)&&!te.secure&&te.shared!==!1&&!s.BLOCKLET_CONFIGURABLE_KEY[te.key||te.name];e.isEnvShareableToClient=M;const T=te=>!!te&&!!(te.key||te.name)&&!te.secure&&!!te.shared&&!s.BLOCKLET_CONFIGURABLE_KEY[te.key||te.name];e.isEnvShareable=T;const f=(te,we)=>{const Be={};return!te||!we||(Array.isArray(te.configs)&&te.configs.forEach(({key:ke,value:re,secure:V})=>{if(!T({key:ke,secure:V,shared:!0}))return;const W=(te.configObj||{})[ke]||re,ce=(we.configs||[]).find(Re=>Re.key===ke);(!ce||T(ce)||!ce.value&&!(we.configObj||{})[ce.key])&&(Be[ke]=W)}),(te.configs||[]).forEach(({key:ke,value:re})=>{[s.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_HOST,s.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_ID,s.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_TYPE].includes(ke)&&(Be[s.CHAIN_PROP_MAP[ke]]=re)})),Be};e.getSharedConfigObj=f;const h=te=>te.key.startsWith(s.BLOCKLET_PREFERENCE_PREFIX)===!0;e.isPreferenceKey=h;const w=(te,we)=>!!(te.required&&(!te.value&&!we[te.key]||Object.values(s.CHAIN_PROP_MAP).includes(te.key)&&Object.keys(we).includes(te.key)&&!we[te.key])),_=(te={})=>{const we=[];return P(te,Be=>{var V;if(((V=Be.meta)==null?void 0:V.group)===s.BlockletGroup.gateway)return;const ke=Be.configs||[],re=f(te,Be);ke.forEach(W=>{w(W,re)&&we.push({did:Be.meta.did,key:W.key,description:W.description})})}),we.filter(Be=>!h(Be))};e.getAppMissingConfigs=_;const R=(te={},we={})=>{const Be=[],ke=te.configs||[],re=f(we,te);return ke.forEach(V=>{w(V,re)&&Be.push({did:te.meta.did,key:V.key,description:V.description})}),Be};e.getComponentMissingConfigs=R;const k=te=>te.payment?(te.payment.price||[]).map(Be=>Be.value||0).every(Be=>Be===0):!0;e.isFreeBlocklet=k;const A=te=>!te.payment||!te.payment.componentPrice?!0:!te.payment.componentPrice.length;e.isFreeComponent=A;const E=te=>te&&(x(te,we=>{we.configs&&(we.configs=we.configs.filter(Be=>!h(Be)),we.configs.forEach(Be=>{Be.secure&&(Be.value=Be.value?"__encrypted__":"")})),(we.environments||[]).forEach(Be=>{["BLOCKLET_APP_SK","BLOCKLET_APP_PSK"].includes(Be.key)&&(Be.value="__encrypted__")}),(we.migratedFrom||[]).forEach(Be=>{Be.appSk="__encrypted__"}),delete te.configObj,delete te.environmentObj},{sync:!0}),te);e.wipeSensitiveData=E;const v=te=>{if(!te)return!1;const we=te.environments.find(Be=>Be.key==="BLOCKLET_DELETABLE");return we?we.value==="yes":!0};e.isDeletableBlocklet=v;const O=te=>{let we=!1;return D(te,Be=>{Be.meta.group!==s.BlockletGroup.gateway&&(we=!0)}),we};e.hasRunnableComponent=O;const ne=(te,we=!1)=>{if(!te)return"";const{meta:Be}=te;let ke;if(!we&&te.environments){const re=te.environments.find(V=>V.key==="BLOCKLET_APP_NAME");re&&re.value&&(ke=re.value)}return ke||Be.title||Be.name};e.getAppName=ne,e.getDisplayName=ne;const F=(te,we=!1)=>{if(!te)return"";const{meta:Be}=te;let ke;if(!we&&te.environments){const re=te.environments.find(V=>V.key==="BLOCKLET_APP_DESCRIPTION");re&&re.value&&(ke=re.value)}return ke||Be.description||Be.name};e.getAppDescription=F;function J(te){var ke,re,V;const we=(V=(re=(ke=te==null?void 0:te.site)==null?void 0:ke.domainAliases)==null?void 0:re.sort((W,ce)=>{var Re,_e,De,Ve;return(Re=W.accessibility)!=null&&Re.accessible&&((_e=ce.accessibility)!=null&&_e.accessible)?+W.isProtected-+ce.isProtected:+((De=ce.accessibility)==null?void 0:De.accessible)-+((Ve=W.accessibility)==null?void 0:Ve.accessible)}))==null?void 0:V.map(W=>{var _e;const ce=(_e=W==null?void 0:W.domainStatus)!=null&&_e.isHttps?"https://":"http://",Re=W==null?void 0:W.value;return`${ce}${Re}`}).filter(Boolean);return we==null?void 0:we[0]}e.getAppUrl=J;const se=te=>{te&&(D(te,we=>{we.status=(0,s.fromBlockletStatus)(we.status),we.source!==void 0&&(we.source=(0,s.fromBlockletSource)(we.source))}),te.settings&&(te.settings.children||[]).forEach(we=>{D(we,Be=>{Be.status=(0,s.fromBlockletStatus)(Be.status),Be.source!==void 0&&(Be.source=(0,s.fromBlockletSource)(Be.source))})}))};e.fixBlockletStatus=se;const pe=te=>{if(!te)return null;const we=te.meta||te||{},{interfaces:Be=[]}=we;return Array.isArray(Be)?Be.find(ke=>ke.type===s.BLOCKLET_INTERFACE_TYPE_WEB):null};e.findWebInterface=pe;const be=te=>{if(!te)return null;const we=pe(te),{ports:Be}=te;return!we||!Be?null:Be[we.port]};e.findWebInterfacePort=be;const Ee=(te,we)=>{const Be=[we];we===c.AUTH&&Be.push(c.AUTH_SERVICE);const ke=pe(te);return ke?(ke.services||[]).find(re=>Be.includes(re.name)):null};e.findServiceFromMeta=Ee;const H=te=>{if(!te)return d.ALL;if((0,n.default)(te,"settings.whoCanAccess"))return te.settings.whoCanAccess;const we=Ee(te.meta,c.AUTH);return(0,n.default)(we,"config.whoCanAccess")?we.config.whoCanAccess:d.ALL};e.getWhoCanAccess=H;const $=(te,we)=>{const Be=(te.configs||[]).find(re=>re.key===s.BLOCKLET_CONFIGURABLE_KEY.COMPONENT_ACCESS_WHO);if(Be)return Be.value;if(we&&(0,n.default)(we,"settings.whoCanAccess")&&(0,n.default)(we,"settings.whoCanAccess")!==d.ALL)return(0,n.default)(we,"settings.whoCanAccess");const ke=Ee(te.meta,c.AUTH);return(0,n.default)(ke,"config.whoCanAccess")?ke.config.whoCanAccess:d.ALL};e.getComponentWhoCanAccess=$;const Z=({request:te,baseUrl:we})=>{const Be=te.headers["x-blocklet-did"]||"",ke=te.headers["x-blocklet-real-did"]||"",re=te.headers["x-path-prefix"]||"/",V=te.headers["x-group-path-prefix"]||"/";let W=we;return Be!==ke&&re!==V&&(W=(0,i.joinURL)(W,"/").replace(re,V)),W};e.getConnectAppUrl=Z;const Y=(te,we)=>{const Be=(we||"").includes(":")?":":/\./;return(te||"").replace(u,(we||"").replace(new RegExp(Be,"g"),"-"))};e.replaceSlotToIp=Y;const ie=te=>{const we=Object.entries(s.CHAIN_INFO_CONFIG).reduce((Be,ke)=>{const[re,[V,W]]=ke;return Be[V]=(0,n.default)(te,re)||W,Be},{});return we.type==="ethereum"&&we.id==="none"&&(we.id="1"),we};e.getChainInfo=ie;const Te=te=>{const we=ie({});if(!te)return we;const Be=ie(te.configObj);if(Be.host!=="none")return Be;let ke;return B(te,re=>{if(ke&&ke.host!=="none")return;const V=ie(re.configObj);V.host!=="none"&&(ke=V)}),ke||we};e.getBlockletChainInfo=Te;const me=te=>!!(te!=null&&te.controller);e.isExternalBlocklet=me;const le=te=>te.whoCanAccess.startsWith(p)?te.whoCanAccess.substring(p.length).split(","):[];e.getRolesFromAuthConfig=le;const ve=te=>{const we=Array.isArray(te.migratedFrom)?te.migratedFrom.map(Be=>Be.appDid):[];return(0,r.default)([te.appDid,te.appPid,...we].filter(Boolean))};e.getBlockletAppIdList=ve;const Ae=te=>{const we=[];return te&&D(te,Be=>{var re;(((re=Be.meta)==null?void 0:re.interfaces)||[]).filter(V=>V.type===s.BLOCKLET_INTERFACE_TYPE_SERVICE).forEach(V=>{const W=V.port||{};we.push({name:V.name,protocol:V.protocol,port:Number(W.external),upstreamPort:Number((Be.ports||{})[W.internal])})})}),we};e.getBlockletServices=Ae;const xe=te=>[s.BlockletStatus.downloading,s.BlockletStatus.waiting,s.BlockletStatus.starting,s.BlockletStatus.installing,s.BlockletStatus.stopping,s.BlockletStatus.upgrading,"downloading","waiting","starting","installing","extracting","stopping","upgrading","restarting","deleting"].includes(te);e.isInProgress=xe;const He=te=>[s.BlockletStatus.added,s.BlockletStatus.waiting,s.BlockletStatus.downloading,s.BlockletStatus.installing,"added","waiting","downloading","installing"].includes(te);e.isBeforeInstalled=He;const Ye=te=>[s.BlockletStatus.running,"running"].includes(te);e.isRunning=Ye;const ge=te=>[s.BlockletStatus.running,s.BlockletStatus.waiting,s.BlockletStatus.downloading,"running","waiting","downloading"].includes(te);e.isAccessible=ge;const Pe=(te,{type:we,did:Be}={type:"",did:""})=>{var ke,re,V;return te?!(0,l.hasStartEngine)(te.meta)&&((V=(re=(ke=te.meta)==null?void 0:ke.resource)==null?void 0:re.bundles)==null?void 0:V.length)>0&&(te.meta.resource.bundles||[]).some(W=>W.type===we&&W.did===Be):!1};e.hasResourceType=Pe,e.default={isFreeBlocklet:k,isFreeComponent:A,forEachBlocklet:x,forEachBlockletSync:D,forEachChild:q,forEachChildSync:B,forEachComponentV2:L,forEachComponentV2Sync:P,isDeletableBlocklet:v,getSharedConfigObj:f,getAppMissingConfigs:_,getComponentMissingConfigs:R,isEnvShareableToClient:M,isEnvShareable:T,wipeSensitiveData:E,hasRunnableComponent:O,getAppName:ne,getAppDescription:F,getAppUrl:J,getDisplayName:ne,fixBlockletStatus:se,findWebInterface:pe,findWebInterfacePort:be,findServiceFromMeta:Ee,getWhoCanAccess:H,getComponentWhoCanAccess:$,replaceSlotToIp:Y,getComponentId:m,getComponentName:y,getComponentBundleId:b,findComponent:j,findComponentById:K,findComponentV2:oe,findComponentByIdV2:ue,filterComponentsV2:G,getParentComponentName:C,getConnectAppUrl:Z,getChainInfo:ie,getBlockletChainInfo:Te,isExternalBlocklet:me,isPreferenceKey:h,getRolesFromAuthConfig:le,getBlockletServices:Ae,isInProgress:xe,isBeforeInstalled:He,isRunning:Ye,isAccessible:ge,isGatewayBlocklet:l.isGatewayBlocklet,isPackBlocklet:l.isPackBlocklet,hasStartEngine:l.hasStartEngine,hasResourceType:Pe}})(Ls);const Due=(e,t=!1)=>{const n=e.routing.adminPath;return t?encodeURIComponent(An(window.location.origin,n)):An(window.location.origin,n)},REt=(e,t,n)=>{const r=Due(t),i=An(n,`/api/blocklets/${e.did}/blocklet.json`),o=new URL(An(r,"/launch-blocklet/agreement"));return o.searchParams.set("blocklet_meta_url",i),o.searchParams.set("from",window.location.href),o.href},rAt=async(e,{getIP:t}={})=>{if(!e||!e.length)return[];if(!t||!e.some(r=>r.value.includes(rn.SLOT_FOR_IP_DNS_SITE)))return e;const n=await t();return n?e.map(r=>{try{return r.value=Ls.replaceSlotToIp(r.value,n),r}catch{return r}}).filter(Boolean):e},iAt=e=>{const t={didSpace:null};return Ls.forEachBlockletSync(e,n=>{var r,i;t.didSpace===oi.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||t.didSpace===oi.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP||(i=(r=n==null?void 0:n.meta)==null?void 0:r.capabilities)!=null&&i.didSpace&&(t.didSpace=n.meta.capabilities.didSpace)}),t},aG=async(e,{fixRuntime:t=!0,oldBlocklet:n,getIP:r}={})=>{if(e.site||(e.site={domainAliases:[],rules:[]}),e.site.rules.forEach(i=>{i.from.pathPrefix=AL(i.from.pathPrefix||"/")}),e.site.rules=Yie(e.site.rules,i=>i.from.pathPrefix),t===!0)e.site.domainAliases=await rAt(e.site.domainAliases,{getIP:r}),e.appRuntimeInfo&&(e.appRuntimeInfo.startAt=new Date-e.appRuntimeInfo.uptime),Ls.forEachBlockletSync(e,i=>{i.runtimeInfo&&(i.runtimeInfo.startAt=new Date-i.runtimeInfo.uptime)});else if(t==="merge-old"&&n){e.site.domainAliases=n.site.domainAliases,e.appRuntimeInfo=n.appRuntimeInfo;const i={};Ls.forEachBlockletSync(n,(o,{id:a})=>{i[a]=o}),Ls.forEachBlockletSync(e,(o,{id:a})=>{const s=i[a];s&&(o.runtimeInfo=s.runtimeInfo,o.diskInfo=s.diskInfo,o.engine=s.engine)})}else e.site.domainAliases=[];e.capabilities=iAt(e)},sG="arcblock",kEt=(e,t=!1)=>{let n;return t?(n=(e.configs||[]).find(r=>r.key==="BLOCKLET_APP_CHAIN_TYPE"),n&&n.value||(n=(e.environments||[]).find(r=>["CHAIN_TYPE","BLOCKLET_APP_CHAIN_TYPE"].includes(r.key)),n&&n.value)?n.value:sG):(n=(e.environments||[]).find(r=>["CHAIN_TYPE","BLOCKLET_APP_CHAIN_TYPE"].includes(r.name)),n&&n.default?n.default:sG)},DEt=e=>!dD(e==null?void 0:e.controller);let fA=null;const oAt=async()=>{const e=window.env.apiPrefix||"/",t=An(e,"/api/dns-resolve?accessible=1");try{return(await Mr.get(t)).data.address}catch{return null}},lG=()=>(fA||(fA=oAt()),fA),Lue=U.createContext({}),{Provider:aAt,Consumer:LEt}=Lue,uG=(e,t,n)=>n?e.map(r=>{const i={...r},o=t.find(a=>a.meta.did===r.meta.did);return o&&n.forEach(a=>{i[a]=o[a]}),i}):t;function sAt({children:e}){const t=Ol(),n=P5(),[r,i]=U.useState(null),[o,a]=U.useState(!1),[s,l]=U.useState([]),[c,u]=U.useState([]),[d,p]=U.useState(!1),m=(P,q)=>{Ls.isExternalBlocklet(P)?u(q):l(q)},y=4,b=async({silent:P=!0,retries:q=y,updates:B,useCache:j=!0}={})=>{P||a(!0);try{i(null);const{blocklets:K}=await n.getBlocklets({input:{useCache:j}});for(const G of K)await aG(G,{getIP:lG});const oe=K.filter(G=>!Ls.isExternalBlocklet(G)),ue=K.filter(Ls.isExternalBlocklet);l(G=>uG(G,oe,B)),u(G=>uG(G,ue,B)),a(!1),p(!0)}catch(K){q>0?setTimeout(()=>b({silent:P,retries:q-1,useCache:j}),1e3):(a(!1),i(K))}},C=async P=>{try{const{blocklet:q}=await t.api.getBlocklet({input:{did:P.meta.did,attachRuntimeInfo:!0}});await aG(q,{getIP:lG}),m(q,B=>B.some(j=>j.meta.did===q.meta.did)?B.map(j=>j.meta.did===q.meta.did?q:j):[...B,q])}catch(q){i(q)}},x=P=>{t.refresh(),C(P)};U.useEffect(()=>{b({silent:!1})},[]);const D=P=>{const q={};Ls.forEachBlockletSync(P,(B,{id:j})=>{q[j]=oi.fromBlockletStatus(B.status)}),m(P,B=>B.map(j=>(j.meta.did===P.meta.did&&Ls.forEachBlockletSync(j,(K,{id:oe})=>{q[oe]&&(K.status=q[oe])}),j)))};Qi(oi.BlockletEvents.added,P=>{P.status=oi.fromBlockletStatus(P.status),m(P,q=>[...q,P])}),Qi(oi.BlockletEvents.removed,P=>{t.refresh(),m(P,q=>q.filter(B=>B.meta.did!==P.meta.did))}),Qi(oi.BlockletEvents.statusChange,D),Qi(oi.BlockletEvents.installed,x),Qi(oi.BlockletEvents.upgraded,x),Qi(oi.BlockletEvents.updated,C),Qi(oi.BlockletEvents.startFailed,C),Qi(oi.BlockletEvents.reloaded,C);const L={loading:o,error:r,data:s,externalData:c,refresh:b,initialized:d,api:n};return I.jsx(aAt,{value:{blocklets:L},children:e})}function OEt(){const{blocklets:e}=U.useContext(Lue);return e}const lAt=({user:e,launchType:t,nftId:n})=>{var r;if(!e)return!1;if(t==="serverless"){if(!n)throw new Error("nftId is required");return((r=e==null?void 0:e.controller)==null?void 0:r.nftId)===n}return(e.permissions||[]).includes("mutate_blocklets")},IEt=e=>{var t,n;return e.isGetBlocklet&&((n=(t=e.runtimeBlocklet)==null?void 0:t.controller)==null?void 0:n.consumedAt)},PEt=async e=>{const t=hpt({blocklet:e});let n="";return n=t.find(r=>{try{const{hostname:i}=new URL(r);return hae.isSlpDomain(i)}catch(i){return console.error(i),!1}}),n||(n=await vpt(t)),n},Oue=U.createContext({}),{Provider:uAt,Consumer:MEt}=Oue;function cAt({children:e}){const{session:t}=k0(),{t:n}=vo(),{api:r,info:i}=Ol(),[o]=gY(),a=P5(),s=o.get("launchType"),l=o.get("fromLauncher"),c=o.get("blocklet_meta_url")||"",u=o.get("nftId")||"",d=o.get("launcherSessionId")||"",p=o.get("launcherUrl")||"",m=new URL(c).origin,[y,b]=U.useState({meta:null,appDid:o.get("appDid")||null,sessionId:o.get("sessionId")||null,isFree:!0,isExternal:!1,isInstalling:!1,isInstalled:!1,isRunning:!1,launcherSession:null,registryUrl:""}),C=(ue,G)=>b(M=>({...M,appDid:ue,sessionId:G})),x=lAt({user:t.user,launchType:s,nftId:u}),[D,L]=U.useState(null),[P,q]=U.useState(!0),B=U.useMemo(()=>i?Due(i):"",[i]),j=async ue=>{if(!ue)throw new Error("appDid should not be empty");const{blocklet:G}=await r.getBlocklet({input:{did:ue,attachConfig:!1}});if(!G)return null;const M=oi.BlockletStatus[G.status],T=!!u,f=M<oi.BlockletStatus.installed,h=M===oi.BlockletStatus.installed,w=M===oi.BlockletStatus.running;return b(_=>({..._,isInstalled:h,isRunning:w,isExternal:T,isInstalling:f})),{isInstalled:h,isRunning:w,isExternal:T,isInstalling:f}},K=async()=>{q(!0);try{if(!c)throw new Error(n("common.invalidParam"));const[{meta:ue,isFree:G,registryUrl:M},{launcherSession:T,error:f}]=await Promise.all([r.getBlockletMetaFromUrl({input:{url:c,checkPrice:!0}}),d?r.getLauncherSession({input:{launcherSessionId:d,launcherUrl:p}}):Promise.resolve({})]);if(d&&!T)throw new Error(`Launch session invalid: ${f}`);if(!ue)throw new Error(n("LaunchBlockletBlocklet.error.loadMetaFailed"));let h={};x&&y.appDid&&(h=await j(y.appDid)),b(w=>({...w,...h,meta:ue,isFree:G,registryUrl:M,launcherSession:T}))}catch(ue){console.error(ue),L(ue.message)}finally{q(!1)}};U.useEffect(()=>{var ue,G,M;((ue=t==null?void 0:t.user)==null?void 0:ue.role)===rn.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&((M=(G=t==null?void 0:t.user)==null?void 0:G.controller)==null?void 0:M.nftId)!==u&&t.logout(),K()},[]),U.useEffect(()=>{P||!y.meta||(x?y.appDid&&j(y.appDid).catch(ue=>{gi.error(ue.message)}):(b(ue=>({...ue,isInstalled:!1,isRunning:!1,isExternal:!1})),L(null)))},[x]);const oe={meta:y.meta,isFree:y.isFree,appDid:y.appDid,sessionId:y.sessionId,isInstalling:y.isInstalling,isInstalled:y.isInstalled,isExternal:y.isExternal,isRunning:y.isRunning,serverUrl:B,storeUrl:y.registryUrl||m,blockletMetaUrl:c,fromLauncher:l,loading:P,error:D,api:a,getBlocklet:j,setAppDid:C,launcherUrl:p,launcherSession:y.launcherSession,launcherSessionId:d};return I.jsx(uAt,{value:oe,children:e})}function BEt(){return U.useContext(Oue)}function Iue(){return new URLSearchParams(Ti().search)}const Pue=U.createContext(),{Provider:fAt,Consumer:NEt}=Pue;function Mue({children:e}){const n=Iue().get("blocklet_meta_url"),r=hCt(async()=>{const{data:o}=await CL.get(n);return o});if(r.loading)return I.jsx(aa,{children:I.jsx(ca,{})});const i={meta:r.value,error:r.error};return I.jsx(fAt,{value:i,children:e})}Mue.propTypes={children:Q.any.isRequired};function $Et(){return U.useContext(Pue)}const dAt=U.lazy(()=>yn(()=>import("./index-WfxCd25J.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),pAt=U.lazy(()=>yn(()=>import("./index-B340bMPK.js"),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,2,27,28,29,30,31]),import.meta.url)),hAt=U.lazy(()=>yn(()=>import("./index-BK9uVuLM.js"),__vite__mapDeps([32,33,34,35,36,37,38,6,39,40,41,42,12,9,11,25,18,17]),import.meta.url)),mAt=U.lazy(()=>yn(()=>import("./index-BKS0pysx.js"),__vite__mapDeps([43,6,44,45,46,17,16,47,9,48,49,29,12,11,39,50,40,51,3,52,53,18,22,23,54,55,56]),import.meta.url)),gAt=U.lazy(()=>yn(()=>import("./index-DeyjciFW.js"),__vite__mapDeps([57,58,10,55,59,60,47,61,12,9,11,7,8,13,14,15,16,17,18,62,51,3,52,2,63,6,64,65,29,19,20,66,31,67,68,69,4,70]),import.meta.url)),yAt=U.lazy(()=>yn(()=>import("./index-QHILeAPv.js"),__vite__mapDeps([71,72,22,23,9,73]),import.meta.url)),vAt=U.lazy(()=>yn(()=>import("./index-Col2kLJU.js"),__vite__mapDeps([74,58,10,75,76,77,17,6,9,11,78,13,79,80,29,81,82,83,16,12,7,8,14,15,18,84,31,85,86,47,87,24,25,46,20,88,53,3,2,89,52,90,30,22,23,91,92,93,45,48,94,1,51,68]),import.meta.url)),bAt=U.lazy(()=>yn(()=>import("./detail-CbKNMHOv.js"),__vite__mapDeps([95,58,10,19,20,21,6,18,22,23,28,53,88,56]),import.meta.url)),wAt=U.lazy(()=>yn(()=>import("./index-Cy0-aW7U.js"),[],import.meta.url)),TAt=U.lazy(()=>yn(()=>import("./index-BCE3QRG4.js"),__vite__mapDeps([96,1,78,13]),import.meta.url)),xAt=U.lazy(()=>yn(()=>import("./index-B9bBENg5.js"),__vite__mapDeps([97,98,99,100,66,101]),import.meta.url)),SAt=U.lazy(()=>yn(()=>import("./index-C_RXntkM.js"),__vite__mapDeps([102,66,82,50,101,27]),import.meta.url)),CAt=U.lazy(()=>yn(()=>import("./index-2GizaExc.js"),__vite__mapDeps([103,101]),import.meta.url)),AAt=U.lazy(()=>yn(()=>import("./index-B_svRTuF.js"),__vite__mapDeps([104,33,34,35,36,37,38,105,76,77,42,25,6,24,106,63]),import.meta.url)),_At=U.lazy(()=>yn(()=>import("./index-D5PxJp2e.js"),__vite__mapDeps([107,99]),import.meta.url)),EAt=U.lazy(()=>yn(()=>import("./index-C5ovAp04.js"),__vite__mapDeps([108,98,99,100,66,101]),import.meta.url)),RAt=U.lazy(()=>yn(()=>import("./index-DJ0BZ1f0.js").then(e=>e.a2),__vite__mapDeps([109,110]),import.meta.url)),kAt=U.lazy(()=>yn(()=>import("./index-ApUKcTB6.js"),__vite__mapDeps([111,58,10,112,113,114,67,9,115,12,11,48,7,8,13,14,15,16,17,18,28,116,117,4,6,94,23]),import.meta.url));function Bue(){const e=Ol(),{session:t}=k0(),{wallet:n}=r0(),r=t.user&&t.user.did;return U.useEffect(()=>{const i=j5();return r?i.connect():i.isConnected()&&i.disconnect(),()=>{i.isConnected()&&i.disconnect()}},[r]),U.useEffect(()=>{if(n)return()=>{};const i=()=>{document.visibilityState==="visible"&&t.refresh()};return document.addEventListener("visibilitychange",i),()=>{document.removeEventListener("visibilitychange",i)}},[]),{node:e,session:t}}function DAt(){var a;const{t:e}=vo(),{node:t,session:n}=Bue(),r=Ti();U.useEffect(()=>{window.tracker&&typeof window.tracker.pageView=="function"&&window.tracker.pageView(`${r.pathname}${r.search}`)},[r]),U.useEffect(()=>{var s;((s=n==null?void 0:n.user)==null?void 0:s.role)===rn.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&n.logout()},[(a=n==null?void 0:n.user)==null?void 0:a.role]);const i=I.jsx(ca,{});if(t.loading||n.loading)return I.jsx(aa,{children:i});if(!t.info.initialized)return iCe.getServerAuthMethod(t.info)==="nft"?I.jsx(RO,{action:"verify-owner"}):I.jsx(aa,{children:I.jsx(d5t,{})});if(t.info.upgradeSessionId)return I.jsx(aa,{children:I.jsx(Cle,{})});if(!n.user)return I.jsx(DO,{loadingEle:i});const o=I.jsx(aa,{children:I.jsx(ca,{})});return I.jsx(zCt,{children:I.jsxs(sAt,{children:[I.jsx(T5t,{}),I.jsx(kxt,{}),I.jsx(GCt,{}),I.jsx(U.Suspense,{fallback:o,children:I.jsxs(ew,{children:[I.jsx(ir,{path:"/dashboard",element:I.jsx(ea,{fullWidth:!0,title:"Dashboard",children:I.jsx(dAt,{})})}),I.jsx(ir,{path:"/blocklets",element:I.jsx(ea,{fullWidth:!0,title:e("common.blocklets"),children:I.jsx(pAt,{})})}),I.jsx(ir,{path:"/blocklets/:did/:tab",element:I.jsx(ea,{fullWidth:!0,title:"Blocklets",children:I.jsx(bAt,{})})}),I.jsx(ir,{path:"/settings/:tab",element:I.jsx(ea,{fullWidth:!0,title:e("common.setting"),children:I.jsx(gAt,{})})}),I.jsx(ir,{path:"/eula",element:I.jsx(ea,{fullWidth:!0,title:e("setup.steps.eula"),children:I.jsx(wAt,{})})}),I.jsx(ir,{path:"/store",element:I.jsx(ea,{fullWidth:!0,title:e("common.store"),children:I.jsx(mAt,{})})}),I.jsx(ir,{path:"/console",element:I.jsx(ea,{title:`GraphQL ${e("common.console")}`,scrollable:!1,fullWidth:!0,children:I.jsx(RAt,{})})}),I.jsx(ir,{path:"/notifications",element:I.jsx(ea,{children:I.jsx(TAt,{})})}),I.jsx(ir,{path:"/team/:tab",element:I.jsx(ea,{fullWidth:!0,title:e("common.team"),children:I.jsx(vAt,{})})}),I.jsx(ir,{path:"/logs/:name",element:I.jsx(ea,{scrollable:!1,fullWidth:!0,title:e("common.logs"),children:I.jsx(yAt,{})})}),I.jsx(ir,{path:"/analytics/:tab",element:I.jsx(ea,{fullWidth:!0,title:e("common.analytics"),children:I.jsx(kAt,{})})}),I.jsx(ir,{path:"/",element:I.jsx(nl,{to:"/dashboard",replace:!0})}),I.jsx(ir,{path:"/team",element:I.jsx(nl,{to:"/team/members",replace:!0})}),I.jsx(ir,{path:"/analytics",element:I.jsx(nl,{to:"/analytics/traffic",replace:!0})}),I.jsx(ir,{path:"/logs",element:I.jsx(nl,{to:"/logs/abtnode",replace:!0})}),I.jsx(ir,{path:"/router",element:I.jsx(nl,{to:"/router/rules",replace:!0})}),I.jsx(ir,{path:"/settings",element:I.jsx(nl,{to:"/settings/basic",replace:!0})}),I.jsx(ir,{path:"/marketplace",element:I.jsx(nl,{to:"/store",replace:!0})}),I.jsx(ir,{path:"/marketplace/:did",element:I.jsx(nl,{to:"/store/:did",replace:!0})}),I.jsx(ir,{path:"*",element:I.jsx(_At,{})})]})})]})})}function lf({children:e}){const{node:t,session:n}=Bue();return t.loading||!n.initialized&&n.loading?I.jsx(aa,{children:I.jsx(ca,{})}):t.info.upgradeSessionId?I.jsx(aa,{children:I.jsx(Cle,{})}):e}function LAt(){const{changeLocale:e}=vo(),t=Iue();U.useEffect(()=>{const r=t.get("locale");r&&["zh","en"].includes(r)&&e(r)},[]);const n=I.jsx(aa,{children:I.jsx(ca,{})});return I.jsx(U.Suspense,{fallback:n,children:I.jsxs(ew,{children:[I.jsx(ir,{path:`${rn.WELLKNOWN_SERVICE_PATH_PREFIX}/issue-passport`,element:I.jsx(lf,{children:I.jsx(xAt,{})})}),I.jsx(ir,{path:`${rn.WELLKNOWN_SERVICE_PATH_PREFIX}/lost-passport`,element:I.jsx(lf,{children:I.jsx(SAt,{})})}),I.jsx(ir,{path:`${rn.WELLKNOWN_SERVICE_PATH_PREFIX}/exchange-passport`,element:I.jsx(lf,{children:I.jsx(CAt,{})})}),I.jsx(ir,{path:"/accept-server",element:I.jsx(lf,{children:I.jsx(RO,{action:"accept-server"})})}),I.jsx(ir,{path:"/launch-blocklet/*",element:I.jsx(lf,{children:I.jsx(cAt,{children:I.jsx(AAt,{})})})}),I.jsx(ir,{path:"/blocklets/restore/*",element:I.jsx(lf,{children:I.jsx(Mue,{children:I.jsx(hAt,{})})})}),I.jsx(ir,{path:`${rn.WELLKNOWN_SERVICE_PATH_PREFIX}/invite`,element:I.jsx(lf,{children:I.jsx(EAt,{})})}),I.jsx(ir,{path:"/*",element:I.jsx(DAt,{})})]})})}function OAt(){const e=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";return I.jsxs(I.Fragment,{children:[I.jsx(bk,{}),I.jsx(dY,{history:jCe,basename:e,children:I.jsx(Uxt,{children:I.jsx(LAt,{})})})]})}const IAt=_J(document.getElementById("root"));IAt.render(I.jsx(OAt,{}));const cG=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";oye(`${cG}/service-worker.js`.replace(/\/+/g,"/"),{registrationOptions:{scope:cG},registered(){console.info("Service worker has been registered.")},ready(){console.info("Service worker is active.")},cached(){console.info("Content has been cached for offline use.")},updatefound(){console.info("New content is downloading.")},updated(){console.info("New content is available; please refresh.")},offline(){console.info("No internet connection found. App is running in offline mode.")},error(e){console.error("Error during service worker registration:",e)}});export{oh as $,gi as A,Ns as B,ca as C,I9 as D,gY as E,rn as F,Gx as G,Vs as H,tI as I,t6 as J,jft as K,cQ as L,Ls as M,bl as N,ct as O,Q as P,dD as Q,y9 as R,tg as S,gue as T,W5 as U,aa as V,NO as W,Bc as X,c2e as Y,d9 as Z,zlt as _,Qi as a,qLe as a$,ML as a0,An as a1,so as a2,r5 as a3,_xt as a4,mEt as a5,J9e as a6,Qk as a7,rLe as a8,pQ as a9,Qle as aA,gpt as aB,kue as aC,gLe as aD,rAt as aE,AL as aF,Yie as aG,lG as aH,z_t as aI,_ae as aJ,Hs as aK,ga as aL,jCe as aM,JH as aN,ui as aO,FQ as aP,ppt as aQ,U_t as aR,bDe as aS,eEt as aT,hCt as aU,CL as aV,V_t as aW,lEt as aX,dpt as aY,oQ as aZ,ZX as a_,Due as aa,$Et as ab,iCe as ac,BO as ad,PL as ae,PEt as af,x_t as ag,IEt as ah,j5 as ai,Iue as aj,Z_t as ak,CI as al,_O as am,rk as an,ew as ao,ir as ap,nl as aq,bu as ar,_l as as,vz as at,REt as au,Mr as av,k0 as aw,Fo as ax,nEt as ay,X6 as az,oi as b,yk as b$,q_t as b0,eD as b1,A7e as b2,N7e as b3,mpt as b4,sEt as b5,cAe as b6,oft as b7,u6 as b8,c6 as b9,Gie as bA,my as bB,kQe as bC,Oie as bD,k9 as bE,Kle as bF,N_t as bG,SEt as bH,L_t as bI,Q_t as bJ,ao as bK,kt as bL,_c as bM,ye as bN,M3e as bO,Bt as bP,un as bQ,an as bR,hn as bS,wl as bT,Pt as bU,sn as bV,wu as bW,eke as bX,pt as bY,Jn as bZ,h_ as b_,TQ as ba,en as bb,Jr as bc,rc as bd,Sh as be,X_t as bf,d5 as bg,QJ as bh,ra as bi,xQ as bj,dg as bk,pEt as bl,uoe as bm,kEt as bn,yn as bo,B_t as bp,r7e as bq,pY as br,hEt as bs,E9 as bt,Qh as bu,ry as bv,Qre as bw,eie as bx,R9 as by,N9 as bz,P5 as c,Xbe as c$,jr as c0,gk as c1,QAt as c2,E_t as c3,hpt as c4,hae as c5,Hle as c6,oEt as c7,s5 as c8,aG as c9,aKe as cA,lAt as cB,rEt as cC,vpt as cD,Y_t as cE,$f as cF,Ti as cG,pre as cH,Xg as cI,i9 as cJ,vi as cK,M_t as cL,O_t as cM,I_t as cN,zle as cO,Bxt as cP,Bk as cQ,ZAt as cR,Fm as cS,Zp as cT,Vct as cU,Mre as cV,BAt as cW,n_t as cX,yft as cY,b5 as cZ,CCt as c_,f7e as ca,p7e as cb,wpt as cc,uLe as cd,URe as ce,Aue as cf,HCt as cg,CIe as ch,St as ci,MOe as cj,Rr as ck,ed as cl,fu as cm,r0 as cn,Zg as co,oc as cp,w5t as cq,V5 as cr,BEt as cs,dn as ct,wi as cu,Qt as cv,Roe as cw,_u as cx,ht as cy,Bh as cz,OEt as d,zAt as d$,fEt as d0,rs as d1,mk as d2,Sc as d3,Uw as d4,Ha as d5,ki as d6,Rt as d7,KX as d8,ERe as d9,XAt as dA,ah as dB,oX as dC,uL as dD,vXe as dE,j_t as dF,kRe as dG,L3 as dH,Iwe as dI,Tc as dJ,Oo as dK,CZ as dL,i6e as dM,i6 as dN,cs as dO,i0 as dP,s6 as dQ,o0 as dR,vk as dS,oZ as dT,gwe as dU,vwe as dV,_2e as dW,MY as dX,Ug as dY,qAt as dZ,HAt as d_,qa as da,C_t as db,A_t as dc,h9 as dd,RDe as de,eg as df,P3 as dg,mQ as dh,DLe as di,_F as dj,AF as dk,ALe as dl,u_t as dm,FAt as dn,$At as dp,NAt as dq,UAt as dr,jh as ds,u9 as dt,l5 as du,Td as dv,gy as dw,oYe as dx,iX as dy,Zn as dz,yCt as e,wk as e$,VAt as e0,N3e as e1,Pg as e2,qh as e3,o$ as e4,jAt as e5,Yf as e6,d4e as e7,ik as e8,OZ as e9,Mp as eA,wRe as eB,Hv as eC,l7e as eD,Hx as eE,ike as eF,jm as eG,wDe as eH,yLe as eI,M3 as eJ,zLe as eK,dm as eL,fOe as eM,tu as eN,x3 as eO,T3 as eP,AOe as eQ,bOe as eR,f_t as eS,Bie as eT,Fs as eU,tZ as eV,J7 as eW,es as eX,Nwe as eY,$we as eZ,X_ as e_,JAt as ea,WAt as eb,G4e as ec,xc as ed,gZ as ee,v4e as ef,J4e as eg,KAt as eh,p_ as ei,z4e as ej,W4e as ek,El as el,K4e as em,L3e as en,Nw as eo,w6e as ep,GAt as eq,m6e as er,Qc as es,fAe as et,o_t as eu,VAe as ev,qAe as ew,a_e as ex,a_t as ey,er as ez,$c as f,jse as f$,nZ as f0,lQ as f1,SKe as f2,t4 as f3,zh as f4,xZ as f5,Aw as f6,Fg as f7,sk as f8,N3 as f9,MAt as fA,Yn as fB,Nc as fC,Cd as fD,mI as fE,r6 as fF,Cc as fG,bZe as fH,vd as fI,bD as fJ,pFe as fK,dFe as fL,Mn as fM,ay as fN,fy as fO,gne as fP,DD as fQ,Gw as fR,ld as fS,H_t as fT,G_t as fU,__t as fV,J_t as fW,coe as fX,Qoe as fY,X6t as fZ,W9 as f_,OF as fa,Qf as fb,si as fc,Oat as fd,zo as fe,v0 as ff,Xt as fg,od as fh,EIe as fi,_J as fj,wd as fk,dr as fl,ete as fm,Zee as fn,Xw as fo,qft as fp,uZ as fq,Fw as fr,O3 as fs,F7 as ft,MQ as fu,Cee as fv,m5t as fw,P_t as fx,II as fy,$Q as fz,Kt as g,Zbe as g$,Aae as g0,ybt as g1,zie as g2,IZ as g3,Tk as g4,bI as g5,vI as g6,c5 as g7,b_t as g8,sI as g9,Kg as gA,YCe as gB,Qw as gC,Xre as gD,_k as gE,e8e as gF,Ek as gG,lft as gH,kk as gI,D_t as gJ,YCt as gK,Bft as gL,p9 as gM,DEt as gN,cEt as gO,UJe as gP,F_t as gQ,W_t as gR,K_t as gS,o5 as gT,sie as gU,lie as gV,aie as gW,wie as gX,_Z as gY,C3 as gZ,XAe as g_,Ly as ga,cI as gb,z9e as gc,Lk as gd,Z8e as ge,t_t as gf,n5 as gg,iat as gh,mat as gi,Ane as gj,rD as gk,Wit as gl,aoe as gm,i5 as gn,Y1 as go,o6 as gp,Wx as gq,a6 as gr,$_e as gs,QX as gt,nAe as gu,LX as gv,Jve as gw,$_t as gx,iEt as gy,RSt as gz,MO as h,lTt as h0,hTt as h1,yTt as h2,TTt as h3,CTt as h4,oxt as h5,axt as h6,Dle as h7,Lle as h8,Eze as h9,A_ as hA,E_ as hB,Ale as hC,f9 as hD,HN as hE,tEt as hF,k3t as hG,dEt as hH,aEt as hI,w_t as hJ,gft as hK,CEt as hL,eQ as hM,fat as hN,P9 as hO,NQ as hP,_3t as hQ,bEt as hR,vEt as hS,BQ as hT,lCe as hU,_Et as hV,JX as hW,qnt as ha,sg as hb,Ize as hc,R_t as hd,p_t as he,uEt as hf,jq as hg,g1 as hh,PIe as hi,jQ as hj,B3 as hk,d_t as hl,ng as hm,YAt as hn,o6e as ho,i_t as hp,rAe as hq,o7e as hr,s9e as hs,n9e as ht,s_t as hu,l9e as hv,l_t as hw,OLe as hx,c_t as hy,ETt as hz,Ch as i,I as j,If as k,k_t as l,tn as m,ts as n,v5 as o,xR as p,vo as q,U as r,or as s,DCt as t,Ol as u,bCt as v,Kke as w,rL as x,IL as y,Ic as z};
|
|
2493
|
+
`;Oi.homedir=function(){return"/"};(function(e){var t=ht&&ht.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.hasMountPoint=e.hasStartEngine=e.isPackBlocklet=e.isGatewayBlocklet=e.getBlockletEngine=void 0;const n=t(Oi),r=oi,i=c=>{if(c===void 0)throw new Error("blocklet meta param is required");const{engine:u}=c;if(!u)return{interpreter:"node",source:""};if(!Array.isArray(u))return u;const d=n.default.platform(),p=u.find(m=>m.platform===d);if(!p)throw new Error(`can not find a proper engine interpreter on ${d}`);return p};e.getBlockletEngine=i;const o=c=>(c==null?void 0:c.group)===r.BlockletGroup.gateway;e.isGatewayBlocklet=o;const a=c=>(c==null?void 0:c.group)===r.BlockletGroup.pack;e.isPackBlocklet=a;const s=c=>!!(c!=null&&c.main)||(0,e.getBlockletEngine)(c||{}).interpreter==="blocklet";e.hasStartEngine=s;const l=c=>((0,e.hasStartEngine)(c)||((c==null?void 0:c.interfaces)||[]).find(u=>u.type===r.BLOCKLET_INTERFACE_TYPE_WEB))&&(0,e.isGatewayBlocklet)(c)===!1;e.hasMountPoint=l})(kue);(function(e){var t=ht&&ht.__importDefault||function(te){return te&&te.__esModule?te:{default:te}};Object.defineProperty(e,"__esModule",{value:!0}),e.isPackBlocklet=e.isGatewayBlocklet=e.isAccessible=e.isRunning=e.isBeforeInstalled=e.isInProgress=e.getBlockletServices=e.getBlockletAppIdList=e.getRolesFromAuthConfig=e.isPreferenceKey=e.isExternalBlocklet=e.getBlockletChainInfo=e.getChainInfo=e.getConnectAppUrl=e.getParentComponentName=e.filterComponentsV2=e.findComponentByIdV2=e.findComponentV2=e.findComponentById=e.findComponent=e.getComponentBundleId=e.getComponentName=e.getComponentId=e.replaceSlotToIp=e.getComponentWhoCanAccess=e.getWhoCanAccess=e.findServiceFromMeta=e.findWebInterfacePort=e.findWebInterface=e.fixBlockletStatus=e.getAppDescription=e.getDisplayName=e.getAppName=e.hasRunnableComponent=e.wipeSensitiveData=e.isEnvShareable=e.isEnvShareableToClient=e.getComponentMissingConfigs=e.getAppMissingConfigs=e.getSharedConfigObj=e.isDeletableBlocklet=e.forEachComponentV2Sync=e.forEachComponentV2=e.forEachChildSync=e.forEachChild=e.forEachBlockletSync=e.forEachBlocklet=e.isFreeComponent=e.isFreeBlocklet=e.getAppUrl=void 0,e.hasResourceType=e.hasStartEngine=void 0;const n=t(Gw),r=t(Rue),i=YCt,o=t(nAt),a=t(rn),s=oi,l=kue;Object.defineProperty(e,"hasStartEngine",{enumerable:!0,get:function(){return l.hasStartEngine}}),Object.defineProperty(e,"isGatewayBlocklet",{enumerable:!0,get:function(){return l.isGatewayBlocklet}}),Object.defineProperty(e,"isPackBlocklet",{enumerable:!0,get:function(){return l.isPackBlocklet}});const{NODE_SERVICES:c,SLOT_FOR_IP_DNS_SITE:u,WHO_CAN_ACCESS:d,WHO_CAN_ACCESS_PREFIX_ROLES:p}=a.default,m=(te,we=[])=>`${we.map(Be=>Be&&Be.meta?Be.meta.did:"").join("/")}${we.length?"/":""}${te&&te.meta?te.meta.did:""}`;e.getComponentId=m;const y=(te,we=[])=>`${we.map(Be=>Be&&Be.meta?Be.meta.name:"").join("/")}${we.length?"/":""}${te&&te.meta?te.meta.name:""}`;e.getComponentName=y;const b=te=>`${te.meta.bundleName}@${te.meta.version}`;e.getComponentBundleId=b;const C=te=>{if(!te)return"";const we=te.split("/");return we.pop(),!we.length||(we[we.length-1].startsWith("@")&&we.pop(),!we.length)?"":we.join("/")};e.getParentComponentName=C;const x=(te,we,{parallel:Be=!1,concurrencyLimit:ke=5,sync:re,params:V,_parent:W,_root:ce,_level:Re=0,_tasks:_e,_ancestors:De=[],_limit:Ve}={})=>{const Fe=ce||W||te,je=m(te,De),ot=De.concat(te);if(re){const Le=we(te,{parent:W,root:Fe,level:Re,params:V,ancestors:De,id:je});if(te.children)for(const Oe of te.children)x(Oe,we,{sync:re,params:Le,_parent:te,_root:Fe,_level:Re+1,_ancestors:ot});return null}if(!Be)return new Promise(async(Le,Oe)=>{try{const Ie=await we(te,{parent:W,root:Fe,level:Re,ancestors:De,params:V,id:je});if(te.children)for(const nt of te.children)await x(nt,we,{params:Ie,_parent:te,_root:Fe,_level:Re+1,_ancestors:ot});Le(null)}catch(Ie){Oe(Ie)}});const Ze=Ve||(0,o.default)(ke),Je=_e||[];if(Je.push(Ze(()=>we(te,{parent:W,root:Fe,level:Re,ancestors:De,id:je}))),te.children)for(const Le of te.children)x(Le,we,{parallel:Be,_parent:te,_root:Fe,_level:Re+1,_tasks:Je,_ancestors:ot,_limit:Ze});return _e?null:Promise.all(Je)};e.forEachBlocklet=x;const D=(te,we)=>x(te,we,{sync:!0});e.forEachBlockletSync=D;const L=(te,we,{parallel:Be=!1,concurrencyLimit:ke=5,sync:re}={})=>{if(re){if(te.children)for(const ce of te.children)we(ce);return null}if(!Be)return new Promise(async(ce,Re)=>{try{if(te.children)for(const _e of te.children)await we(_e);ce(null)}catch(_e){Re(_e)}});const V=(0,o.default)(ke),W=[];if(te.children)for(const ce of te.children)W.push(V(()=>we(ce)));return Promise.all(W)};e.forEachComponentV2=L;const P=(te,we)=>L(te,we,{sync:!0});e.forEachComponentV2Sync=P;const q=(te,we,Be)=>x(te,(ke,re)=>re.level===0?{}:we(ke,re),Be);e.forEachChild=q;const B=(te,we)=>q(te,we,{sync:!0});e.forEachChildSync=B;const j=(te,we,{_ancestors:Be=[],returnAncestors:ke=!1}={})=>{if(!we)return null;if(we(te,{ancestors:Be}))return ke?{component:te,ancestors:Be}:te;for(const re of te.children||[]){const V=Be.concat(te),W=j(re,we,{_ancestors:V,returnAncestors:ke});if(W)return W}return null};e.findComponent=j;const K=(te,we,{returnAncestors:Be=!1}={})=>(Array.isArray(we)&&(we=we.join("/")),j(te,(ke,{ancestors:re})=>{const V=m(ke,re);return we===V},{returnAncestors:Be}));e.findComponentById=K;const oe=(te,we)=>{if(!we)return null;for(const Be of te.children||[])if(we(Be,te))return Be;return null};e.findComponentV2=oe;const ue=(te,we)=>we?(Array.isArray(we)&&(we=we.join("/")),oe(te,(Be,ke)=>{if(we.includes("/")){const re=m(Be,[ke]);return we===re}return we===Be.meta.did})):null;e.findComponentByIdV2=ue;const G=(te,we)=>{if(!we)return[];const Be=[];for(const ke of te.children||[])we(ke,te)&&Be.push(ke);return Be};e.filterComponentsV2=G;const M=te=>!!te&&!!(te.key||te.name)&&!te.secure&&te.shared!==!1&&!s.BLOCKLET_CONFIGURABLE_KEY[te.key||te.name];e.isEnvShareableToClient=M;const T=te=>!!te&&!!(te.key||te.name)&&!te.secure&&!!te.shared&&!s.BLOCKLET_CONFIGURABLE_KEY[te.key||te.name];e.isEnvShareable=T;const f=(te,we)=>{const Be={};return!te||!we||(Array.isArray(te.configs)&&te.configs.forEach(({key:ke,value:re,secure:V})=>{if(!T({key:ke,secure:V,shared:!0}))return;const W=(te.configObj||{})[ke]||re,ce=(we.configs||[]).find(Re=>Re.key===ke);(!ce||T(ce)||!ce.value&&!(we.configObj||{})[ce.key])&&(Be[ke]=W)}),(te.configs||[]).forEach(({key:ke,value:re})=>{[s.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_HOST,s.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_ID,s.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_TYPE].includes(ke)&&(Be[s.CHAIN_PROP_MAP[ke]]=re)})),Be};e.getSharedConfigObj=f;const h=te=>te.key.startsWith(s.BLOCKLET_PREFERENCE_PREFIX)===!0;e.isPreferenceKey=h;const w=(te,we)=>!!(te.required&&(!te.value&&!we[te.key]||Object.values(s.CHAIN_PROP_MAP).includes(te.key)&&Object.keys(we).includes(te.key)&&!we[te.key])),_=(te={})=>{const we=[];return P(te,Be=>{var V;if(((V=Be.meta)==null?void 0:V.group)===s.BlockletGroup.gateway)return;const ke=Be.configs||[],re=f(te,Be);ke.forEach(W=>{w(W,re)&&we.push({did:Be.meta.did,key:W.key,description:W.description})})}),we.filter(Be=>!h(Be))};e.getAppMissingConfigs=_;const R=(te={},we={})=>{const Be=[],ke=te.configs||[],re=f(we,te);return ke.forEach(V=>{w(V,re)&&Be.push({did:te.meta.did,key:V.key,description:V.description})}),Be};e.getComponentMissingConfigs=R;const k=te=>te.payment?(te.payment.price||[]).map(Be=>Be.value||0).every(Be=>Be===0):!0;e.isFreeBlocklet=k;const A=te=>!te.payment||!te.payment.componentPrice?!0:!te.payment.componentPrice.length;e.isFreeComponent=A;const E=te=>te&&(x(te,we=>{we.configs&&(we.configs=we.configs.filter(Be=>!h(Be)),we.configs.forEach(Be=>{Be.secure&&(Be.value=Be.value?"__encrypted__":"")})),(we.environments||[]).forEach(Be=>{["BLOCKLET_APP_SK","BLOCKLET_APP_PSK"].includes(Be.key)&&(Be.value="__encrypted__")}),(we.migratedFrom||[]).forEach(Be=>{Be.appSk="__encrypted__"}),delete te.configObj,delete te.environmentObj},{sync:!0}),te);e.wipeSensitiveData=E;const v=te=>{if(!te)return!1;const we=te.environments.find(Be=>Be.key==="BLOCKLET_DELETABLE");return we?we.value==="yes":!0};e.isDeletableBlocklet=v;const O=te=>{let we=!1;return D(te,Be=>{Be.meta.group!==s.BlockletGroup.gateway&&(we=!0)}),we};e.hasRunnableComponent=O;const ne=(te,we=!1)=>{if(!te)return"";const{meta:Be}=te;let ke;if(!we&&te.environments){const re=te.environments.find(V=>V.key==="BLOCKLET_APP_NAME");re&&re.value&&(ke=re.value)}return ke||Be.title||Be.name};e.getAppName=ne,e.getDisplayName=ne;const F=(te,we=!1)=>{if(!te)return"";const{meta:Be}=te;let ke;if(!we&&te.environments){const re=te.environments.find(V=>V.key==="BLOCKLET_APP_DESCRIPTION");re&&re.value&&(ke=re.value)}return ke||Be.description||Be.name};e.getAppDescription=F;function J(te){var ke,re,V;const we=(V=(re=(ke=te==null?void 0:te.site)==null?void 0:ke.domainAliases)==null?void 0:re.sort((W,ce)=>{var Re,_e,De,Ve;return(Re=W.accessibility)!=null&&Re.accessible&&((_e=ce.accessibility)!=null&&_e.accessible)?+W.isProtected-+ce.isProtected:+((De=ce.accessibility)==null?void 0:De.accessible)-+((Ve=W.accessibility)==null?void 0:Ve.accessible)}))==null?void 0:V.map(W=>{var _e;const ce=(_e=W==null?void 0:W.domainStatus)!=null&&_e.isHttps?"https://":"http://",Re=W==null?void 0:W.value;return`${ce}${Re}`}).filter(Boolean);return we==null?void 0:we[0]}e.getAppUrl=J;const se=te=>{te&&(D(te,we=>{we.status=(0,s.fromBlockletStatus)(we.status),we.source!==void 0&&(we.source=(0,s.fromBlockletSource)(we.source))}),te.settings&&(te.settings.children||[]).forEach(we=>{D(we,Be=>{Be.status=(0,s.fromBlockletStatus)(Be.status),Be.source!==void 0&&(Be.source=(0,s.fromBlockletSource)(Be.source))})}))};e.fixBlockletStatus=se;const pe=te=>{if(!te)return null;const we=te.meta||te||{},{interfaces:Be=[]}=we;return Array.isArray(Be)?Be.find(ke=>ke.type===s.BLOCKLET_INTERFACE_TYPE_WEB):null};e.findWebInterface=pe;const be=te=>{if(!te)return null;const we=pe(te),{ports:Be}=te;return!we||!Be?null:Be[we.port]};e.findWebInterfacePort=be;const Ee=(te,we)=>{const Be=[we];we===c.AUTH&&Be.push(c.AUTH_SERVICE);const ke=pe(te);return ke?(ke.services||[]).find(re=>Be.includes(re.name)):null};e.findServiceFromMeta=Ee;const H=te=>{if(!te)return d.ALL;if((0,n.default)(te,"settings.whoCanAccess"))return te.settings.whoCanAccess;const we=Ee(te.meta,c.AUTH);return(0,n.default)(we,"config.whoCanAccess")?we.config.whoCanAccess:d.ALL};e.getWhoCanAccess=H;const $=(te,we)=>{const Be=(te.configs||[]).find(re=>re.key===s.BLOCKLET_CONFIGURABLE_KEY.COMPONENT_ACCESS_WHO);if(Be)return Be.value;if(we&&(0,n.default)(we,"settings.whoCanAccess")&&(0,n.default)(we,"settings.whoCanAccess")!==d.ALL)return(0,n.default)(we,"settings.whoCanAccess");const ke=Ee(te.meta,c.AUTH);return(0,n.default)(ke,"config.whoCanAccess")?ke.config.whoCanAccess:d.ALL};e.getComponentWhoCanAccess=$;const Z=({request:te,baseUrl:we})=>{const Be=te.headers["x-blocklet-did"]||"",ke=te.headers["x-blocklet-real-did"]||"",re=te.headers["x-path-prefix"]||"/",V=te.headers["x-group-path-prefix"]||"/";let W=we;return Be!==ke&&re!==V&&(W=(0,i.joinURL)(W,"/").replace(re,V)),W};e.getConnectAppUrl=Z;const Y=(te,we)=>{const Be=(we||"").includes(":")?":":/\./;return(te||"").replace(u,(we||"").replace(new RegExp(Be,"g"),"-"))};e.replaceSlotToIp=Y;const ie=te=>{const we=Object.entries(s.CHAIN_INFO_CONFIG).reduce((Be,ke)=>{const[re,[V,W]]=ke;return Be[V]=(0,n.default)(te,re)||W,Be},{});return we.type==="ethereum"&&we.id==="none"&&(we.id="1"),we};e.getChainInfo=ie;const Te=te=>{const we=ie({});if(!te)return we;const Be=ie(te.configObj);if(Be.host!=="none")return Be;let ke;return B(te,re=>{if(ke&&ke.host!=="none")return;const V=ie(re.configObj);V.host!=="none"&&(ke=V)}),ke||we};e.getBlockletChainInfo=Te;const me=te=>!!(te!=null&&te.controller);e.isExternalBlocklet=me;const le=te=>te.whoCanAccess.startsWith(p)?te.whoCanAccess.substring(p.length).split(","):[];e.getRolesFromAuthConfig=le;const ve=te=>{const we=Array.isArray(te.migratedFrom)?te.migratedFrom.map(Be=>Be.appDid):[];return(0,r.default)([te.appDid,te.appPid,...we].filter(Boolean))};e.getBlockletAppIdList=ve;const Ae=te=>{const we=[];return te&&D(te,Be=>{var re;(((re=Be.meta)==null?void 0:re.interfaces)||[]).filter(V=>V.type===s.BLOCKLET_INTERFACE_TYPE_SERVICE).forEach(V=>{const W=V.port||{};we.push({name:V.name,protocol:V.protocol,port:Number(W.external),upstreamPort:Number((Be.ports||{})[W.internal])})})}),we};e.getBlockletServices=Ae;const xe=te=>[s.BlockletStatus.downloading,s.BlockletStatus.waiting,s.BlockletStatus.starting,s.BlockletStatus.installing,s.BlockletStatus.stopping,s.BlockletStatus.upgrading,"downloading","waiting","starting","installing","extracting","stopping","upgrading","restarting","deleting"].includes(te);e.isInProgress=xe;const He=te=>[s.BlockletStatus.added,s.BlockletStatus.waiting,s.BlockletStatus.downloading,s.BlockletStatus.installing,"added","waiting","downloading","installing"].includes(te);e.isBeforeInstalled=He;const Ye=te=>[s.BlockletStatus.running,"running"].includes(te);e.isRunning=Ye;const ge=te=>[s.BlockletStatus.running,s.BlockletStatus.waiting,s.BlockletStatus.downloading,"running","waiting","downloading"].includes(te);e.isAccessible=ge;const Pe=(te,{type:we,did:Be}={type:"",did:""})=>{var ke,re,V;return te?!(0,l.hasStartEngine)(te.meta)&&((V=(re=(ke=te.meta)==null?void 0:ke.resource)==null?void 0:re.bundles)==null?void 0:V.length)>0&&(te.meta.resource.bundles||[]).some(W=>W.type===we&&W.did===Be):!1};e.hasResourceType=Pe,e.default={isFreeBlocklet:k,isFreeComponent:A,forEachBlocklet:x,forEachBlockletSync:D,forEachChild:q,forEachChildSync:B,forEachComponentV2:L,forEachComponentV2Sync:P,isDeletableBlocklet:v,getSharedConfigObj:f,getAppMissingConfigs:_,getComponentMissingConfigs:R,isEnvShareableToClient:M,isEnvShareable:T,wipeSensitiveData:E,hasRunnableComponent:O,getAppName:ne,getAppDescription:F,getAppUrl:J,getDisplayName:ne,fixBlockletStatus:se,findWebInterface:pe,findWebInterfacePort:be,findServiceFromMeta:Ee,getWhoCanAccess:H,getComponentWhoCanAccess:$,replaceSlotToIp:Y,getComponentId:m,getComponentName:y,getComponentBundleId:b,findComponent:j,findComponentById:K,findComponentV2:oe,findComponentByIdV2:ue,filterComponentsV2:G,getParentComponentName:C,getConnectAppUrl:Z,getChainInfo:ie,getBlockletChainInfo:Te,isExternalBlocklet:me,isPreferenceKey:h,getRolesFromAuthConfig:le,getBlockletServices:Ae,isInProgress:xe,isBeforeInstalled:He,isRunning:Ye,isAccessible:ge,isGatewayBlocklet:l.isGatewayBlocklet,isPackBlocklet:l.isPackBlocklet,hasStartEngine:l.hasStartEngine,hasResourceType:Pe}})(Ls);const Due=(e,t=!1)=>{const n=e.routing.adminPath;return t?encodeURIComponent(An(window.location.origin,n)):An(window.location.origin,n)},REt=(e,t,n)=>{const r=Due(t),i=An(n,`/api/blocklets/${e.did}/blocklet.json`),o=new URL(An(r,"/launch-blocklet/agreement"));return o.searchParams.set("blocklet_meta_url",i),o.searchParams.set("from",window.location.href),o.href},rAt=async(e,{getIP:t}={})=>{if(!e||!e.length)return[];if(!t||!e.some(r=>r.value.includes(rn.SLOT_FOR_IP_DNS_SITE)))return e;const n=await t();return n?e.map(r=>{try{return r.value=Ls.replaceSlotToIp(r.value,n),r}catch{return r}}).filter(Boolean):e},iAt=e=>{const t={didSpace:null};return Ls.forEachBlockletSync(e,n=>{var r,i;t.didSpace===oi.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||t.didSpace===oi.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP||(i=(r=n==null?void 0:n.meta)==null?void 0:r.capabilities)!=null&&i.didSpace&&(t.didSpace=n.meta.capabilities.didSpace)}),t},aG=async(e,{fixRuntime:t=!0,oldBlocklet:n,getIP:r}={})=>{if(e.site||(e.site={domainAliases:[],rules:[]}),e.site.rules.forEach(i=>{i.from.pathPrefix=AL(i.from.pathPrefix||"/")}),e.site.rules=Yie(e.site.rules,i=>i.from.pathPrefix),t===!0)e.site.domainAliases=await rAt(e.site.domainAliases,{getIP:r}),e.appRuntimeInfo&&(e.appRuntimeInfo.startAt=new Date-e.appRuntimeInfo.uptime),Ls.forEachBlockletSync(e,i=>{i.runtimeInfo&&(i.runtimeInfo.startAt=new Date-i.runtimeInfo.uptime)});else if(t==="merge-old"&&n){e.site.domainAliases=n.site.domainAliases,e.appRuntimeInfo=n.appRuntimeInfo;const i={};Ls.forEachBlockletSync(n,(o,{id:a})=>{i[a]=o}),Ls.forEachBlockletSync(e,(o,{id:a})=>{const s=i[a];s&&(o.runtimeInfo=s.runtimeInfo,o.diskInfo=s.diskInfo,o.engine=s.engine)})}else e.site.domainAliases=[];e.capabilities=iAt(e)},sG="arcblock",kEt=(e,t=!1)=>{let n;return t?(n=(e.configs||[]).find(r=>r.key==="BLOCKLET_APP_CHAIN_TYPE"),n&&n.value||(n=(e.environments||[]).find(r=>["CHAIN_TYPE","BLOCKLET_APP_CHAIN_TYPE"].includes(r.key)),n&&n.value)?n.value:sG):(n=(e.environments||[]).find(r=>["CHAIN_TYPE","BLOCKLET_APP_CHAIN_TYPE"].includes(r.name)),n&&n.default?n.default:sG)},DEt=e=>!dD(e==null?void 0:e.controller);let fA=null;const oAt=async()=>{const e=window.env.apiPrefix||"/",t=An(e,"/api/dns-resolve?accessible=1");try{return(await Mr.get(t)).data.address}catch{return null}},lG=()=>(fA||(fA=oAt()),fA),Lue=U.createContext({}),{Provider:aAt,Consumer:LEt}=Lue,uG=(e,t,n)=>n?e.map(r=>{const i={...r},o=t.find(a=>a.meta.did===r.meta.did);return o&&n.forEach(a=>{i[a]=o[a]}),i}):t;function sAt({children:e}){const t=Ol(),n=P5(),[r,i]=U.useState(null),[o,a]=U.useState(!1),[s,l]=U.useState([]),[c,u]=U.useState([]),[d,p]=U.useState(!1),m=(P,q)=>{Ls.isExternalBlocklet(P)?u(q):l(q)},y=4,b=async({silent:P=!0,retries:q=y,updates:B,useCache:j=!0}={})=>{P||a(!0);try{i(null);const{blocklets:K}=await n.getBlocklets({input:{useCache:j}});for(const G of K)await aG(G,{getIP:lG});const oe=K.filter(G=>!Ls.isExternalBlocklet(G)),ue=K.filter(Ls.isExternalBlocklet);l(G=>uG(G,oe,B)),u(G=>uG(G,ue,B)),a(!1),p(!0)}catch(K){q>0?setTimeout(()=>b({silent:P,retries:q-1,useCache:j}),1e3):(a(!1),i(K))}},C=async P=>{try{const{blocklet:q}=await t.api.getBlocklet({input:{did:P.meta.did,attachRuntimeInfo:!0}});await aG(q,{getIP:lG}),m(q,B=>B.some(j=>j.meta.did===q.meta.did)?B.map(j=>j.meta.did===q.meta.did?q:j):[...B,q])}catch(q){i(q)}},x=P=>{t.refresh(),C(P)};U.useEffect(()=>{b({silent:!1})},[]);const D=P=>{const q={};Ls.forEachBlockletSync(P,(B,{id:j})=>{q[j]=oi.fromBlockletStatus(B.status)}),m(P,B=>B.map(j=>(j.meta.did===P.meta.did&&Ls.forEachBlockletSync(j,(K,{id:oe})=>{q[oe]&&(K.status=q[oe])}),j)))};Qi(oi.BlockletEvents.added,P=>{P.status=oi.fromBlockletStatus(P.status),m(P,q=>[...q,P])}),Qi(oi.BlockletEvents.removed,P=>{t.refresh(),m(P,q=>q.filter(B=>B.meta.did!==P.meta.did))}),Qi(oi.BlockletEvents.statusChange,D),Qi(oi.BlockletEvents.installed,x),Qi(oi.BlockletEvents.upgraded,x),Qi(oi.BlockletEvents.updated,C),Qi(oi.BlockletEvents.startFailed,C),Qi(oi.BlockletEvents.reloaded,C);const L={loading:o,error:r,data:s,externalData:c,refresh:b,initialized:d,api:n};return I.jsx(aAt,{value:{blocklets:L},children:e})}function OEt(){const{blocklets:e}=U.useContext(Lue);return e}const lAt=({user:e,launchType:t,nftId:n})=>{var r;if(!e)return!1;if(t==="serverless"){if(!n)throw new Error("nftId is required");return((r=e==null?void 0:e.controller)==null?void 0:r.nftId)===n}return(e.permissions||[]).includes("mutate_blocklets")},IEt=e=>{var t,n;return e.isGetBlocklet&&((n=(t=e.runtimeBlocklet)==null?void 0:t.controller)==null?void 0:n.consumedAt)},PEt=async e=>{const t=hpt({blocklet:e});let n="";return n=t.find(r=>{try{const{hostname:i}=new URL(r);return hae.isSlpDomain(i)}catch(i){return console.error(i),!1}}),n||(n=await vpt(t)),n},Oue=U.createContext({}),{Provider:uAt,Consumer:MEt}=Oue;function cAt({children:e}){const{session:t}=k0(),{t:n}=vo(),{api:r,info:i}=Ol(),[o]=gY(),a=P5(),s=o.get("launchType"),l=o.get("fromLauncher"),c=o.get("blocklet_meta_url")||"",u=o.get("nftId")||"",d=o.get("launcherSessionId")||"",p=o.get("launcherUrl")||"",m=new URL(c).origin,[y,b]=U.useState({meta:null,appDid:o.get("appDid")||null,sessionId:o.get("sessionId")||null,isFree:!0,isExternal:!1,isInstalling:!1,isInstalled:!1,isRunning:!1,launcherSession:null,registryUrl:""}),C=(ue,G)=>b(M=>({...M,appDid:ue,sessionId:G})),x=lAt({user:t.user,launchType:s,nftId:u}),[D,L]=U.useState(null),[P,q]=U.useState(!0),B=U.useMemo(()=>i?Due(i):"",[i]),j=async ue=>{if(!ue)throw new Error("appDid should not be empty");const{blocklet:G}=await r.getBlocklet({input:{did:ue,attachConfig:!1}});if(!G)return null;const M=oi.BlockletStatus[G.status],T=!!u,f=M<oi.BlockletStatus.installed,h=M===oi.BlockletStatus.installed,w=M===oi.BlockletStatus.running;return b(_=>({..._,isInstalled:h,isRunning:w,isExternal:T,isInstalling:f})),{isInstalled:h,isRunning:w,isExternal:T,isInstalling:f}},K=async()=>{q(!0);try{if(!c)throw new Error(n("common.invalidParam"));const[{meta:ue,isFree:G,registryUrl:M},{launcherSession:T,error:f}]=await Promise.all([r.getBlockletMetaFromUrl({input:{url:c,checkPrice:!0}}),d?r.getLauncherSession({input:{launcherSessionId:d,launcherUrl:p}}):Promise.resolve({})]);if(d&&!T)throw new Error(`Launch session invalid: ${f}`);if(!ue)throw new Error(n("LaunchBlockletBlocklet.error.loadMetaFailed"));let h={};x&&y.appDid&&(h=await j(y.appDid)),b(w=>({...w,...h,meta:ue,isFree:G,registryUrl:M,launcherSession:T}))}catch(ue){console.error(ue),L(ue.message)}finally{q(!1)}};U.useEffect(()=>{var ue,G,M;((ue=t==null?void 0:t.user)==null?void 0:ue.role)===rn.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&((M=(G=t==null?void 0:t.user)==null?void 0:G.controller)==null?void 0:M.nftId)!==u&&t.logout(),K()},[]),U.useEffect(()=>{P||!y.meta||(x?y.appDid&&j(y.appDid).catch(ue=>{gi.error(ue.message)}):(b(ue=>({...ue,isInstalled:!1,isRunning:!1,isExternal:!1})),L(null)))},[x]);const oe={meta:y.meta,isFree:y.isFree,appDid:y.appDid,sessionId:y.sessionId,isInstalling:y.isInstalling,isInstalled:y.isInstalled,isExternal:y.isExternal,isRunning:y.isRunning,serverUrl:B,storeUrl:y.registryUrl||m,blockletMetaUrl:c,fromLauncher:l,loading:P,error:D,api:a,getBlocklet:j,setAppDid:C,launcherUrl:p,launcherSession:y.launcherSession,launcherSessionId:d};return I.jsx(uAt,{value:oe,children:e})}function BEt(){return U.useContext(Oue)}function Iue(){return new URLSearchParams(Ti().search)}const Pue=U.createContext(),{Provider:fAt,Consumer:NEt}=Pue;function Mue({children:e}){const n=Iue().get("blocklet_meta_url"),r=hCt(async()=>{const{data:o}=await CL.get(n);return o});if(r.loading)return I.jsx(aa,{children:I.jsx(ca,{})});const i={meta:r.value,error:r.error};return I.jsx(fAt,{value:i,children:e})}Mue.propTypes={children:Q.any.isRequired};function $Et(){return U.useContext(Pue)}const dAt=U.lazy(()=>yn(()=>import("./index-yzdWHDuH.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),pAt=U.lazy(()=>yn(()=>import("./index-DXsbagZE.js"),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,2,27,28,29,30,31]),import.meta.url)),hAt=U.lazy(()=>yn(()=>import("./index-B3Zt0_35.js"),__vite__mapDeps([32,33,34,35,36,37,38,6,39,40,41,42,43,12,9,11,25,18,17]),import.meta.url)),mAt=U.lazy(()=>yn(()=>import("./index-C9KBqEgO.js"),__vite__mapDeps([44,6,45,46,47,17,16,48,9,49,50,29,12,11,39,51,40,41,52,3,53,54,18,22,23,55,56,57]),import.meta.url)),gAt=U.lazy(()=>yn(()=>import("./index-C2a0vC_a.js"),__vite__mapDeps([58,59,10,56,60,61,48,62,12,9,11,7,8,13,14,15,16,17,18,63,52,3,53,2,64,6,65,66,29,19,20,67,31,68,69,70,4,71]),import.meta.url)),yAt=U.lazy(()=>yn(()=>import("./index-BO1fRvMf.js"),__vite__mapDeps([72,73,22,23,9,74]),import.meta.url)),vAt=U.lazy(()=>yn(()=>import("./index-5FtPkeAB.js"),__vite__mapDeps([75,59,10,76,77,78,17,6,9,11,79,13,80,81,29,82,83,84,16,12,7,8,14,15,18,85,31,86,87,48,88,24,25,47,20,89,54,3,2,90,53,91,30,22,23,92,93,94,46,49,95,1,52,69]),import.meta.url)),bAt=U.lazy(()=>yn(()=>import("./detail-U0KQ2egr.js"),__vite__mapDeps([96,59,10,19,20,21,6,18,22,23,28,54,89,57]),import.meta.url)),wAt=U.lazy(()=>yn(()=>import("./index-DS6F_SJ9.js"),[],import.meta.url)),TAt=U.lazy(()=>yn(()=>import("./index-CRb7tyay.js"),__vite__mapDeps([97,1,79,13]),import.meta.url)),xAt=U.lazy(()=>yn(()=>import("./index-D1iFHNgi.js"),__vite__mapDeps([98,99,100,101,67,102]),import.meta.url)),SAt=U.lazy(()=>yn(()=>import("./index-DVdaomTJ.js"),__vite__mapDeps([103,67,83,51,102,27]),import.meta.url)),CAt=U.lazy(()=>yn(()=>import("./index-CnrdD6WK.js"),__vite__mapDeps([104,102]),import.meta.url)),AAt=U.lazy(()=>yn(()=>import("./index-BNjhH_d8.js"),__vite__mapDeps([105,33,34,35,36,37,38,106,77,78,43,25,6,24,107,64]),import.meta.url)),_At=U.lazy(()=>yn(()=>import("./index-BsBUGa5J.js"),__vite__mapDeps([108,100]),import.meta.url)),EAt=U.lazy(()=>yn(()=>import("./index-DYd4EkOT.js"),__vite__mapDeps([109,99,100,101,67,102]),import.meta.url)),RAt=U.lazy(()=>yn(()=>import("./index-CXyn4xMF.js").then(e=>e.a2),__vite__mapDeps([110,111]),import.meta.url)),kAt=U.lazy(()=>yn(()=>import("./index-B_IM460j.js"),__vite__mapDeps([112,59,10,113,114,115,68,9,116,12,11,49,7,8,13,14,15,16,17,18,28,117,118,4,6,95,23]),import.meta.url));function Bue(){const e=Ol(),{session:t}=k0(),{wallet:n}=r0(),r=t.user&&t.user.did;return U.useEffect(()=>{const i=j5();return r?i.connect():i.isConnected()&&i.disconnect(),()=>{i.isConnected()&&i.disconnect()}},[r]),U.useEffect(()=>{if(n)return()=>{};const i=()=>{document.visibilityState==="visible"&&t.refresh()};return document.addEventListener("visibilitychange",i),()=>{document.removeEventListener("visibilitychange",i)}},[]),{node:e,session:t}}function DAt(){var a;const{t:e}=vo(),{node:t,session:n}=Bue(),r=Ti();U.useEffect(()=>{window.tracker&&typeof window.tracker.pageView=="function"&&window.tracker.pageView(`${r.pathname}${r.search}`)},[r]),U.useEffect(()=>{var s;((s=n==null?void 0:n.user)==null?void 0:s.role)===rn.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&n.logout()},[(a=n==null?void 0:n.user)==null?void 0:a.role]);const i=I.jsx(ca,{});if(t.loading||n.loading)return I.jsx(aa,{children:i});if(!t.info.initialized)return iCe.getServerAuthMethod(t.info)==="nft"?I.jsx(RO,{action:"verify-owner"}):I.jsx(aa,{children:I.jsx(d5t,{})});if(t.info.upgradeSessionId)return I.jsx(aa,{children:I.jsx(Cle,{})});if(!n.user)return I.jsx(DO,{loadingEle:i});const o=I.jsx(aa,{children:I.jsx(ca,{})});return I.jsx(zCt,{children:I.jsxs(sAt,{children:[I.jsx(T5t,{}),I.jsx(kxt,{}),I.jsx(GCt,{}),I.jsx(U.Suspense,{fallback:o,children:I.jsxs(ew,{children:[I.jsx(ir,{path:"/dashboard",element:I.jsx(ea,{fullWidth:!0,title:"Dashboard",children:I.jsx(dAt,{})})}),I.jsx(ir,{path:"/blocklets",element:I.jsx(ea,{fullWidth:!0,title:e("common.blocklets"),children:I.jsx(pAt,{})})}),I.jsx(ir,{path:"/blocklets/:did/:tab",element:I.jsx(ea,{fullWidth:!0,title:"Blocklets",children:I.jsx(bAt,{})})}),I.jsx(ir,{path:"/settings/:tab",element:I.jsx(ea,{fullWidth:!0,title:e("common.setting"),children:I.jsx(gAt,{})})}),I.jsx(ir,{path:"/eula",element:I.jsx(ea,{fullWidth:!0,title:e("setup.steps.eula"),children:I.jsx(wAt,{})})}),I.jsx(ir,{path:"/store",element:I.jsx(ea,{fullWidth:!0,title:e("common.store"),children:I.jsx(mAt,{})})}),I.jsx(ir,{path:"/console",element:I.jsx(ea,{title:`GraphQL ${e("common.console")}`,scrollable:!1,fullWidth:!0,children:I.jsx(RAt,{})})}),I.jsx(ir,{path:"/notifications",element:I.jsx(ea,{children:I.jsx(TAt,{})})}),I.jsx(ir,{path:"/team/:tab",element:I.jsx(ea,{fullWidth:!0,title:e("common.team"),children:I.jsx(vAt,{})})}),I.jsx(ir,{path:"/logs/:name",element:I.jsx(ea,{scrollable:!1,fullWidth:!0,title:e("common.logs"),children:I.jsx(yAt,{})})}),I.jsx(ir,{path:"/analytics/:tab",element:I.jsx(ea,{fullWidth:!0,title:e("common.analytics"),children:I.jsx(kAt,{})})}),I.jsx(ir,{path:"/",element:I.jsx(nl,{to:"/dashboard",replace:!0})}),I.jsx(ir,{path:"/team",element:I.jsx(nl,{to:"/team/members",replace:!0})}),I.jsx(ir,{path:"/analytics",element:I.jsx(nl,{to:"/analytics/traffic",replace:!0})}),I.jsx(ir,{path:"/logs",element:I.jsx(nl,{to:"/logs/abtnode",replace:!0})}),I.jsx(ir,{path:"/router",element:I.jsx(nl,{to:"/router/rules",replace:!0})}),I.jsx(ir,{path:"/settings",element:I.jsx(nl,{to:"/settings/basic",replace:!0})}),I.jsx(ir,{path:"/marketplace",element:I.jsx(nl,{to:"/store",replace:!0})}),I.jsx(ir,{path:"/marketplace/:did",element:I.jsx(nl,{to:"/store/:did",replace:!0})}),I.jsx(ir,{path:"*",element:I.jsx(_At,{})})]})})]})})}function lf({children:e}){const{node:t,session:n}=Bue();return t.loading||!n.initialized&&n.loading?I.jsx(aa,{children:I.jsx(ca,{})}):t.info.upgradeSessionId?I.jsx(aa,{children:I.jsx(Cle,{})}):e}function LAt(){const{changeLocale:e}=vo(),t=Iue();U.useEffect(()=>{const r=t.get("locale");r&&["zh","en"].includes(r)&&e(r)},[]);const n=I.jsx(aa,{children:I.jsx(ca,{})});return I.jsx(U.Suspense,{fallback:n,children:I.jsxs(ew,{children:[I.jsx(ir,{path:`${rn.WELLKNOWN_SERVICE_PATH_PREFIX}/issue-passport`,element:I.jsx(lf,{children:I.jsx(xAt,{})})}),I.jsx(ir,{path:`${rn.WELLKNOWN_SERVICE_PATH_PREFIX}/lost-passport`,element:I.jsx(lf,{children:I.jsx(SAt,{})})}),I.jsx(ir,{path:`${rn.WELLKNOWN_SERVICE_PATH_PREFIX}/exchange-passport`,element:I.jsx(lf,{children:I.jsx(CAt,{})})}),I.jsx(ir,{path:"/accept-server",element:I.jsx(lf,{children:I.jsx(RO,{action:"accept-server"})})}),I.jsx(ir,{path:"/launch-blocklet/*",element:I.jsx(lf,{children:I.jsx(cAt,{children:I.jsx(AAt,{})})})}),I.jsx(ir,{path:"/blocklets/restore/*",element:I.jsx(lf,{children:I.jsx(Mue,{children:I.jsx(hAt,{})})})}),I.jsx(ir,{path:`${rn.WELLKNOWN_SERVICE_PATH_PREFIX}/invite`,element:I.jsx(lf,{children:I.jsx(EAt,{})})}),I.jsx(ir,{path:"/*",element:I.jsx(DAt,{})})]})})}function OAt(){const e=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";return I.jsxs(I.Fragment,{children:[I.jsx(bk,{}),I.jsx(dY,{history:jCe,basename:e,children:I.jsx(Uxt,{children:I.jsx(LAt,{})})})]})}const IAt=_J(document.getElementById("root"));IAt.render(I.jsx(OAt,{}));const cG=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";oye(`${cG}/service-worker.js`.replace(/\/+/g,"/"),{registrationOptions:{scope:cG},registered(){console.info("Service worker has been registered.")},ready(){console.info("Service worker is active.")},cached(){console.info("Content has been cached for offline use.")},updatefound(){console.info("New content is downloading.")},updated(){console.info("New content is available; please refresh.")},offline(){console.info("No internet connection found. App is running in offline mode.")},error(e){console.error("Error during service worker registration:",e)}});export{oh as $,gi as A,Ns as B,ca as C,I9 as D,gY as E,rn as F,Gx as G,Vs as H,tI as I,t6 as J,jft as K,cQ as L,Ls as M,bl as N,ct as O,Q as P,dD as Q,y9 as R,tg as S,gue as T,W5 as U,aa as V,NO as W,Bc as X,c2e as Y,d9 as Z,zlt as _,Qi as a,qLe as a$,ML as a0,An as a1,so as a2,r5 as a3,_xt as a4,mEt as a5,J9e as a6,Qk as a7,rLe as a8,pQ as a9,Qle as aA,gpt as aB,kue as aC,gLe as aD,rAt as aE,AL as aF,Yie as aG,lG as aH,z_t as aI,_ae as aJ,Hs as aK,ga as aL,jCe as aM,JH as aN,ui as aO,FQ as aP,ppt as aQ,U_t as aR,bDe as aS,eEt as aT,hCt as aU,CL as aV,V_t as aW,lEt as aX,dpt as aY,oQ as aZ,ZX as a_,Due as aa,$Et as ab,iCe as ac,BO as ad,PL as ae,PEt as af,x_t as ag,IEt as ah,j5 as ai,Iue as aj,Z_t as ak,CI as al,_O as am,rk as an,ew as ao,ir as ap,nl as aq,bu as ar,_l as as,vz as at,REt as au,Mr as av,k0 as aw,Fo as ax,nEt as ay,X6 as az,oi as b,yk as b$,q_t as b0,eD as b1,A7e as b2,N7e as b3,mpt as b4,sEt as b5,cAe as b6,oft as b7,u6 as b8,c6 as b9,Gie as bA,my as bB,kQe as bC,Oie as bD,k9 as bE,Kle as bF,N_t as bG,SEt as bH,L_t as bI,Q_t as bJ,ao as bK,kt as bL,_c as bM,ye as bN,M3e as bO,Bt as bP,un as bQ,an as bR,hn as bS,wl as bT,Pt as bU,sn as bV,wu as bW,eke as bX,pt as bY,Jn as bZ,h_ as b_,TQ as ba,en as bb,Jr as bc,rc as bd,Sh as be,X_t as bf,d5 as bg,QJ as bh,ra as bi,xQ as bj,dg as bk,pEt as bl,uoe as bm,kEt as bn,yn as bo,B_t as bp,r7e as bq,pY as br,hEt as bs,E9 as bt,Qh as bu,ry as bv,Qre as bw,eie as bx,R9 as by,N9 as bz,P5 as c,Xbe as c$,jr as c0,gk as c1,QAt as c2,E_t as c3,hpt as c4,hae as c5,Hle as c6,oEt as c7,s5 as c8,aG as c9,aKe as cA,lAt as cB,rEt as cC,vpt as cD,Y_t as cE,$f as cF,Ti as cG,pre as cH,Xg as cI,i9 as cJ,vi as cK,M_t as cL,O_t as cM,I_t as cN,zle as cO,Bxt as cP,Bk as cQ,ZAt as cR,Fm as cS,Zp as cT,Vct as cU,Mre as cV,BAt as cW,n_t as cX,yft as cY,b5 as cZ,CCt as c_,f7e as ca,p7e as cb,wpt as cc,uLe as cd,URe as ce,Aue as cf,HCt as cg,CIe as ch,St as ci,MOe as cj,Rr as ck,ed as cl,fu as cm,r0 as cn,Zg as co,oc as cp,w5t as cq,V5 as cr,BEt as cs,dn as ct,wi as cu,Qt as cv,Roe as cw,_u as cx,ht as cy,Bh as cz,OEt as d,zAt as d$,fEt as d0,rs as d1,mk as d2,Sc as d3,Uw as d4,Ha as d5,ki as d6,Rt as d7,KX as d8,ERe as d9,XAt as dA,ah as dB,oX as dC,uL as dD,vXe as dE,j_t as dF,kRe as dG,L3 as dH,Iwe as dI,Tc as dJ,Oo as dK,CZ as dL,i6e as dM,i6 as dN,cs as dO,i0 as dP,s6 as dQ,o0 as dR,vk as dS,oZ as dT,gwe as dU,vwe as dV,_2e as dW,MY as dX,Ug as dY,qAt as dZ,HAt as d_,qa as da,C_t as db,A_t as dc,h9 as dd,RDe as de,eg as df,P3 as dg,mQ as dh,DLe as di,_F as dj,AF as dk,ALe as dl,u_t as dm,FAt as dn,$At as dp,NAt as dq,UAt as dr,jh as ds,u9 as dt,l5 as du,Td as dv,gy as dw,oYe as dx,iX as dy,Zn as dz,yCt as e,wk as e$,VAt as e0,N3e as e1,Pg as e2,qh as e3,o$ as e4,jAt as e5,Yf as e6,d4e as e7,ik as e8,OZ as e9,Mp as eA,wRe as eB,Hv as eC,l7e as eD,Hx as eE,ike as eF,jm as eG,wDe as eH,yLe as eI,M3 as eJ,zLe as eK,dm as eL,fOe as eM,tu as eN,x3 as eO,T3 as eP,AOe as eQ,bOe as eR,f_t as eS,Bie as eT,Fs as eU,tZ as eV,J7 as eW,es as eX,Nwe as eY,$we as eZ,X_ as e_,JAt as ea,WAt as eb,G4e as ec,xc as ed,gZ as ee,v4e as ef,J4e as eg,KAt as eh,p_ as ei,z4e as ej,W4e as ek,El as el,K4e as em,L3e as en,Nw as eo,w6e as ep,GAt as eq,m6e as er,Qc as es,fAe as et,o_t as eu,VAe as ev,qAe as ew,a_e as ex,a_t as ey,er as ez,$c as f,jse as f$,nZ as f0,lQ as f1,SKe as f2,t4 as f3,zh as f4,xZ as f5,Aw as f6,Fg as f7,sk as f8,N3 as f9,MAt as fA,Yn as fB,Nc as fC,Cd as fD,mI as fE,r6 as fF,Cc as fG,bZe as fH,vd as fI,bD as fJ,pFe as fK,dFe as fL,Mn as fM,ay as fN,fy as fO,gne as fP,DD as fQ,Gw as fR,ld as fS,H_t as fT,G_t as fU,__t as fV,J_t as fW,coe as fX,Qoe as fY,X6t as fZ,W9 as f_,OF as fa,Qf as fb,si as fc,Oat as fd,zo as fe,v0 as ff,Xt as fg,od as fh,EIe as fi,_J as fj,wd as fk,dr as fl,ete as fm,Zee as fn,Xw as fo,qft as fp,uZ as fq,Fw as fr,O3 as fs,F7 as ft,MQ as fu,Cee as fv,m5t as fw,P_t as fx,II as fy,$Q as fz,Kt as g,Zbe as g$,Aae as g0,ybt as g1,zie as g2,IZ as g3,Tk as g4,bI as g5,vI as g6,c5 as g7,b_t as g8,sI as g9,Kg as gA,YCe as gB,Qw as gC,Xre as gD,_k as gE,e8e as gF,Ek as gG,lft as gH,kk as gI,D_t as gJ,YCt as gK,Bft as gL,p9 as gM,DEt as gN,cEt as gO,UJe as gP,F_t as gQ,W_t as gR,K_t as gS,o5 as gT,sie as gU,lie as gV,aie as gW,wie as gX,_Z as gY,C3 as gZ,XAe as g_,Ly as ga,cI as gb,z9e as gc,Lk as gd,Z8e as ge,t_t as gf,n5 as gg,iat as gh,mat as gi,Ane as gj,rD as gk,Wit as gl,aoe as gm,i5 as gn,Y1 as go,o6 as gp,Wx as gq,a6 as gr,$_e as gs,QX as gt,nAe as gu,LX as gv,Jve as gw,$_t as gx,iEt as gy,RSt as gz,MO as h,lTt as h0,hTt as h1,yTt as h2,TTt as h3,CTt as h4,oxt as h5,axt as h6,Dle as h7,Lle as h8,Eze as h9,A_ as hA,E_ as hB,Ale as hC,f9 as hD,HN as hE,tEt as hF,k3t as hG,dEt as hH,aEt as hI,w_t as hJ,gft as hK,CEt as hL,eQ as hM,fat as hN,P9 as hO,NQ as hP,_3t as hQ,bEt as hR,vEt as hS,BQ as hT,lCe as hU,_Et as hV,JX as hW,qnt as ha,sg as hb,Ize as hc,R_t as hd,p_t as he,uEt as hf,jq as hg,g1 as hh,PIe as hi,jQ as hj,B3 as hk,d_t as hl,ng as hm,YAt as hn,o6e as ho,i_t as hp,rAe as hq,o7e as hr,s9e as hs,n9e as ht,s_t as hu,l9e as hv,l_t as hw,OLe as hx,c_t as hy,ETt as hz,Ch as i,I as j,If as k,k_t as l,tn as m,ts as n,v5 as o,xR as p,vo as q,U as r,or as s,DCt as t,Ol as u,bCt as v,Kke as w,rL as x,IL as y,Ic as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as z,j as o,fz as vo,ci as ke,fA as xo,P as B,O as K,d7 as Ce,fB as jt,dN as dt,a1 as pt,cK as wo,q as Ne,fC as Nn,fD as Ln,fE as Eo,dP as jo,fF as So,dO as Io,a2 as lr,ff as ur,cH as Ao,av as kn,n as Se,fg as ut,as as wr,ax as Ye,m as De,eA as Po,fG as Oo,fH as Er,aG as Ro,ch as To,R as St,cI as Bn,fI as Co,cx as qn,cw as Ct,fJ as mt,ct as Re,fK as Do,fL as _o,fn as Un,fM as jr,fN as No,fO as Lo,fP as ko,fQ as Bo,cv as fr,g as qo,cy as Zr,fR as Uo,M as Fo,bm as Le,aO as Fn,S as It,fS as Ko,fT as Sr,at as ht,D as Ve,B as je,C as nt,w as Ir,J as rt,K as Ge,k as dr,aU as Mo,x as $o,y as zo,f as gt,ad as Dt,U as Fe,cc as Ze,A as ot,fU as Wo,aK as Kn,aL as Mn,b as He,db as Vo,t as $n,F as Ee,W as Ar,ce as Ho,fV as zn,aQ as Yo,aD as Go,a9 as Zo,bq as Jo,aZ as Xo,a_ as Qo,Q as ei}from"./index-DQYRaCdB.js";import{c as ti}from"./index-Cvt_EuXc.js";import{d as At}from"./Add-DiqSqlhj.js";import{d as ri}from"./Loop-CuMM_YqO.js";import{d as ni}from"./ViewList-C83zj7rF.js";import{L as oi,S as ii,d as Wn}from"./list-header-B7OR53lN.js";import{D as Pr,g as si}from"./index-DX3JXbQb.js";import"./index-BBOgCzBo.js";import"./index-BWhWAS_S.js";import{T as ai}from"./index-B37qKP2B.js";import{E as Vn}from"./index-BLWTCfoo.js";import{U as Ft,d as Hn}from"./ua-parser-C8b57cGC.js";import"./index-DkHucXVl.js";import"./index-dn7DkX5z.js";import{l as Yn}from"./index-Cwul5-Ge.js";import{o as ci}from"./index-ZG7jWpak.js";import{W as Gn}from"./tag-Z7mPKVvq.js";import{a as Me}from"./team-BJ7ItRYP.js";import{u as Zn}from"./blocklet-CAvqFbwn.js";import{C as _t}from"./click-to-copy-Ci6mXYLS.js";import{F as pr,S as mr}from"./Select-cp6_ZHE7.js";import{I as hr}from"./InputLabel-kl4d4Afd.js";import{T as Jn}from"./TextField-De1OeNfZ.js";import{I as gr}from"./index-SA9KFCJd.js";import{d as li}from"./Delete-C5xn6WBN.js";import{A as ui}from"./actions-7_FKWiUA.js";import{S as fi}from"./shorten-label-Cwua8w8y.js";var Or={};Object.defineProperty(Or,"__esModule",{value:!0});var Xn=Or.default=void 0;di(z);var et=o;function di(e){return e&&e.__esModule?e:{default:e}}function Jr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Xr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jr(Object(r),!0).forEach(function(n){pi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pi(e,t,r){return t=mi(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mi(e){var t=hi(e,"string");return typeof t=="symbol"?t:String(t)}function hi(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rr=function(t){return(0,et.jsxs)("svg",Xr(Xr({},t),{},{children:[(0,et.jsx)("g",{clipPath:"url(#clip0)",children:(0,et.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1.598A4.092 4.092 0 1 0 9 9.78a4.092 4.092 0 0 0 0-8.183zM7.274 3.964a2.44 2.44 0 1 1 3.452 3.451 2.44 2.44 0 0 1-3.452-3.451zm.093 6.343A4.091 4.091 0 0 0 3.275 14.4v2.722c0 .155.126.281.281.281h1.09a.281.281 0 0 0 .28-.281v-2.722a2.44 2.44 0 0 1 2.44-2.44h3.267a2.442 2.442 0 0 1 2.44 2.44v2.722c0 .155.127.281.282.281h1.088a.281.281 0 0 0 .282-.281v-2.722a4.091 4.091 0 0 0-4.092-4.091H7.367z"})}),(0,et.jsx)("defs",{children:(0,et.jsx)("clipPath",{id:"clip0",children:(0,et.jsx)("path",{transform:"translate(0 .5)",d:"M0 0h18v18H0z"})})})]}))};Rr.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};Rr.displayName="person";Xn=Or.default=Rr;var Et={},gi=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Qn="%[a-f0-9]{2}",Qr=new RegExp("("+Qn+")|([^%]+?)","gi"),en=new RegExp("("+Qn+")+","gi");function yr(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],yr(r),yr(n))}function yi(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(Qr)||[],r=1;r<t.length;r++)e=yr(t,r).join(""),t=e.match(Qr)||[];return e}}function bi(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=en.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=yi(r[0]);n!==r[0]&&(t[r[0]]=n)}r=en.exec(e)}t["%C2"]="�";for(var s=Object.keys(t),l=0;l<s.length;l++){var v=s[l];e=e.replace(new RegExp(v,"g"),t[v])}return e}var vi=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return bi(e)}},xi=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},wi=function(e,t){for(var r={},n=Object.keys(e),s=Array.isArray(t),l=0;l<n.length;l++){var v=n[l],y=e[v];(s?t.indexOf(v)!==-1:t(v,y,e))&&(r[v]=y)}return r};(function(e){const t=gi,r=vi,n=xi,s=wi,l=i=>i==null;function v(i){switch(i.arrayFormat){case"index":return a=>(f,m)=>{const d=f.length;return m===void 0||i.skipNull&&m===null||i.skipEmptyString&&m===""?f:m===null?[...f,[E(a,i),"[",d,"]"].join("")]:[...f,[E(a,i),"[",E(d,i),"]=",E(m,i)].join("")]};case"bracket":return a=>(f,m)=>m===void 0||i.skipNull&&m===null||i.skipEmptyString&&m===""?f:m===null?[...f,[E(a,i),"[]"].join("")]:[...f,[E(a,i),"[]=",E(m,i)].join("")];case"comma":case"separator":return a=>(f,m)=>m==null||m.length===0?f:f.length===0?[[E(a,i),"=",E(m,i)].join("")]:[[f,E(m,i)].join(i.arrayFormatSeparator)];default:return a=>(f,m)=>m===void 0||i.skipNull&&m===null||i.skipEmptyString&&m===""?f:m===null?[...f,E(a,i)]:[...f,[E(a,i),"=",E(m,i)].join("")]}}function y(i){let a;switch(i.arrayFormat){case"index":return(f,m,d)=>{if(a=/\[(\d*)\]$/.exec(f),f=f.replace(/\[\d*\]$/,""),!a){d[f]=m;return}d[f]===void 0&&(d[f]={}),d[f][a[1]]=m};case"bracket":return(f,m,d)=>{if(a=/(\[\])$/.exec(f),f=f.replace(/\[\]$/,""),!a){d[f]=m;return}if(d[f]===void 0){d[f]=[m];return}d[f]=[].concat(d[f],m)};case"comma":case"separator":return(f,m,d)=>{const T=typeof m=="string"&&m.includes(i.arrayFormatSeparator),P=typeof m=="string"&&!T&&u(m,i).includes(i.arrayFormatSeparator);m=P?u(m,i):m;const _=T||P?m.split(i.arrayFormatSeparator).map(X=>u(X,i)):m===null?m:u(m,i);d[f]=_};default:return(f,m,d)=>{if(d[f]===void 0){d[f]=m;return}d[f]=[].concat(d[f],m)}}}function h(i){if(typeof i!="string"||i.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function E(i,a){return a.encode?a.strict?t(i):encodeURIComponent(i):i}function u(i,a){return a.decode?r(i):i}function O(i){return Array.isArray(i)?i.sort():typeof i=="object"?O(Object.keys(i)).sort((a,f)=>Number(a)-Number(f)).map(a=>i[a]):i}function x(i){const a=i.indexOf("#");return a!==-1&&(i=i.slice(0,a)),i}function I(i){let a="";const f=i.indexOf("#");return f!==-1&&(a=i.slice(f)),a}function j(i){i=x(i);const a=i.indexOf("?");return a===-1?"":i.slice(a+1)}function w(i,a){return a.parseNumbers&&!Number.isNaN(Number(i))&&typeof i=="string"&&i.trim()!==""?i=Number(i):a.parseBooleans&&i!==null&&(i.toLowerCase()==="true"||i.toLowerCase()==="false")&&(i=i.toLowerCase()==="true"),i}function p(i,a){a=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},a),h(a.arrayFormatSeparator);const f=y(a),m=Object.create(null);if(typeof i!="string"||(i=i.trim().replace(/^[?#&]/,""),!i))return m;for(const d of i.split("&")){if(d==="")continue;let[T,P]=n(a.decode?d.replace(/\+/g," "):d,"=");P=P===void 0?null:["comma","separator"].includes(a.arrayFormat)?P:u(P,a),f(u(T,a),P,m)}for(const d of Object.keys(m)){const T=m[d];if(typeof T=="object"&&T!==null)for(const P of Object.keys(T))T[P]=w(T[P],a);else m[d]=w(T,a)}return a.sort===!1?m:(a.sort===!0?Object.keys(m).sort():Object.keys(m).sort(a.sort)).reduce((d,T)=>{const P=m[T];return P&&typeof P=="object"&&!Array.isArray(P)?d[T]=O(P):d[T]=P,d},Object.create(null))}e.extract=j,e.parse=p,e.stringify=(i,a)=>{if(!i)return"";a=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},a),h(a.arrayFormatSeparator);const f=P=>a.skipNull&&l(i[P])||a.skipEmptyString&&i[P]==="",m=v(a),d={};for(const P of Object.keys(i))f(P)||(d[P]=i[P]);const T=Object.keys(d);return a.sort!==!1&&T.sort(a.sort),T.map(P=>{const _=i[P];return _===void 0?"":_===null?E(P,a):Array.isArray(_)?_.reduce(m(P),[]).join("&"):E(P,a)+"="+E(_,a)}).filter(P=>P.length>0).join("&")},e.parseUrl=(i,a)=>{a=Object.assign({decode:!0},a);const[f,m]=n(i,"#");return Object.assign({url:f.split("?")[0]||"",query:p(j(i),a)},a&&a.parseFragmentIdentifier&&m?{fragmentIdentifier:u(m,a)}:{})},e.stringifyUrl=(i,a)=>{a=Object.assign({encode:!0,strict:!0},a);const f=x(i.url).split("?")[0]||"",m=e.extract(i.url),d=e.parse(m,{sort:!1}),T=Object.assign(d,i.query);let P=e.stringify(T,a);P&&(P=`?${P}`);let _=I(i.url);return i.fragmentIdentifier&&(_=`#${E(i.fragmentIdentifier,a)}`),`${f}${P}${_}`},e.pick=(i,a,f)=>{f=Object.assign({parseFragmentIdentifier:!0},f);const{url:m,query:d,fragmentIdentifier:T}=e.parseUrl(i,f);return e.stringifyUrl({url:m,query:s(d,a),fragmentIdentifier:T},f)},e.exclude=(i,a,f)=>{const m=Array.isArray(a)?d=>!a.includes(d):(d,T)=>!a(d,T);return e.pick(i,m,f)}})(Et);const ct=xo,Ei={parseNumbers:!1,parseBooleans:!1},ji={skipNull:!1,skipEmptyString:!1},Si=(e,t)=>{var r,n;const{navigateMode:s="push",parseOptions:l,stringifyOptions:v}=t||{},y=Object.assign(Object.assign({},Ei),l),h=Object.assign(Object.assign({},ji),v),E=ct.useLocation(),u=(r=ct.useHistory)===null||r===void 0?void 0:r.call(ct),O=(n=ct.useNavigate)===null||n===void 0?void 0:n.call(ct),x=vo(),I=z.useRef(typeof e=="function"?e():e||{}),j=z.useMemo(()=>Et.parse(E.search,y),[E.search]),w=z.useMemo(()=>Object.assign(Object.assign({},I.current),j),[j]);return[w,ke(i=>{const a=typeof i=="function"?i(w):i;x(),u&&u[s]({hash:E.hash,search:Et.stringify(Object.assign(Object.assign({},j),a),h)||"?"},E.state),O&&O({hash:E.hash,search:Et.stringify(Object.assign(Object.assign({},j),a),h)||"?"},{replace:s==="replace",state:E.state})})]},Ii=Si;function Tr({optionalComponent:e,index:t,installStatus:r,hasPermission:n,t:s}){const l=()=>{window.open(e==null?void 0:e.installUrl,"_blank")},v=()=>{window.open(e==null?void 0:e.storeUrl,"_blank")},y=()=>{window.location.reload()},h=r==="stopped"||r==="running",E=60;return o.jsxs(K,{children:[t===0?null:o.jsx(K,{sx:{width:"100%",height:"1px",backgroundColor:Ce.gray6}}),o.jsxs(K,{sx:{padding:"20px 24px",paddingTop:.5,marginTop:2,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[o.jsx("img",{style:{width:E,height:E,minWidth:E,minHeight:E},src:e.logoUrl,alt:e.meta.title}),o.jsxs(K,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",marginLeft:2},children:[o.jsxs(K,{sx:{fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{var u;return v((u=e.meta)==null?void 0:u.did)},children:[e.meta.title,o.jsxs(K,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[e.meta.version,o.jsx(jt,{className:"link-icon",icon:"fluent:open-20-filled",style:{color:Ce.primaryBase,fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.3s"}})]})]}),o.jsx(K,{sx:{marginTop:0,opacity:.7},children:e.meta.description}),o.jsx(K,{sx:{display:n?"flex":"none",flexDirection:"row",gap:1},children:r?o.jsx(K,{sx:{marginTop:2,opacity:.7},children:h?o.jsx(dt,{variant:"contained",onClick:y,children:s("componentInstallerRefresh")},"refresh"):o.jsx(dt,{disabled:!0,sx:{color:"#333"},startIcon:o.jsx(jt,{icon:"line-md:loading-loop",style:{color:"#333",fontSize:16}}),variant:"contained",children:r},"status")}):o.jsx(dt,{sx:{marginTop:2},variant:"contained",className:"button",onClick:()=>{var u;return l((u=e.meta)==null?void 0:u.did)},children:s("componentInstallerInstall")},"install")}),h?o.jsx(K,{sx:{marginTop:2,opacity:.7},children:s("componentInstallerSuccessInstalled")}):null]})]})]})}Tr.propTypes={t:B.func.isRequired,optionalComponent:B.object.isRequired,index:B.number.isRequired,installStatus:B.string,hasPermission:B.bool.isRequired};Tr.defaultProps={installStatus:""};const Ai={zh:{componentInstallerTitle:"缺少组件",componentInstallerInstall:"安装",componentInstallerClose:"关闭",componentInstallerRefresh:"重载页面",componentInstallerSuccessInstalled:"安装成功,请重载页面查看变化。",componentInstallerSuggestions:"请联系系统管理员安装该组件。",componentInstallerNoDefinedInBlockletYML:"组件未在 blocklet.yml 中定义"},en:{componentInstallerTitle:"Missing component",componentInstallerInstall:"Install",componentInstallerClose:"Close",componentInstallerRefresh:"Refresh",componentInstallerSuccessInstalled:"Successfully installed, please refresh the page to see the changes.",componentInstallerSuggestions:"Please contact the system administrator to install the component.",componentInstallerNoDefinedInBlockletYML:"The component is not defined in blocklet.yml"}},Kt=e=>typeof e=="string"?new Set(e.split(";;")):new Set(e);function Pi({did:e,onInstalled:t,onError:r}){const n=Array.isArray(e)?e.join(";;"):e,[s,l]=z.useState({}),v=z.useRef({onInstalled:t,onError:r});v.current={onInstalled:t,onError:r};const{optionalComponents:y,componentMountPoints:h}=window.blocklet,E=z.useMemo(()=>{var I;if(!y||!y.length)return[];const O=Kt(n),x=y.filter(j=>O.has(j.meta.did));return(I=x?v.current.onError:v.current.onInstalled)==null||I(x),x},[n,y]),u=z.useMemo(()=>{if(E.length)return!0;const O=Kt(n);return(h||[]).find(x=>O.has(x.did))},[E,h,n]);return E.forEach(O=>{O.storeUrl=pt(O.meta.homepage,"blocklets",O.meta.did),O.installUrl=pt(window.blocklet.appUrl,wo,`/admin/components?install-component=${O.meta.did}`)}),z.useEffect(()=>{const O=x=>{var I,j,w,p,i;if(x.origin===window.blocklet.appUrl&&((I=x.data)==null?void 0:I.kind)==="component-installer"&&(w=(j=x.data)==null?void 0:j.blocklet)!=null&&w.children){let a=!1;const f=Kt(n);(i=(p=x.data)==null?void 0:p.blocklet)==null||i.children.forEach(m=>{var d;f.has((d=m.meta)==null?void 0:d.did)&&(a=!0,l(T=>{var P;return{...T,[(P=m.meta)==null?void 0:P.did]:m.status||"waiting"}}))}),a||l({})}};return window.addEventListener("message",O),()=>{window.removeEventListener("message",O)}},[n]),{optComponents:E,installed:!E.length&&u,installStatus:s,setInstallStatus:l,definedInBlockletYML:u}}function Nt({warnIcon:e,did:t,noPermissionMute:r,onInstalled:n,onError:s,children:l,closeByOutSize:v,onClose:y,fallback:h,disabled:E,roles:u=["owner","admin"]}){const{locale:O}=Ne(),x=ke((f,m={})=>Nn(Ai,f,O,"en",m)),{installed:I,optComponents:j,installStatus:w,definedInBlockletYML:p}=Pi({did:t,onInstalled:n,onError:s}),i=z.useContext(Ln),a=()=>{y==null||y(!1)};return E?l:o.jsx(Eo,{session:i==null?void 0:i.session,roles:u,children:({hasPermission:f})=>I?l:r&&!f?h||null:typeof l=="function"?o.jsxs(o.Fragment,{children:[h,l({hasPermission:f,optComponents:j,installStatus:w})]}):o.jsxs(o.Fragment,{children:[h,o.jsx(jo,{onClickAway:m=>{m.preventDefault(),m.stopPropagation(),v&&a()},children:o.jsx(So,{in:!0,timeout:350,children:o.jsx(Io,{variant:"outlined",sx:{position:"fixed",top:20,right:20,zIndex:3e3,borderRadius:3,width:400,maxWidth:"90vw",borderColor:Ce.lineStep,border:"0 !important",fontSize:"14px",textAlign:"left",boxShadow:`0px 8px 16px 0px ${Ce.gray6}, 0px 0px 0px 1px ${Ce.gray6}`},children:p?o.jsxs(K,{sx:{display:"flex",flexDirection:"column"},children:[o.jsxs(K,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},children:[e||o.jsx(jt,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),o.jsx(K,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:x("componentInstallerTitle")}),o.jsx(K,{sx:{flex:1}}),y?o.jsx(lr,{variant:"outlined",className:"button",onClick:a,children:o.jsx(ur,{})}):null]}),o.jsx(K,{sx:{width:"100%",height:"1px",backgroundColor:Ce.gray6}}),o.jsx(K,{sx:{maxHeight:"70vh",overflowY:"auto"},children:j.map((m,d)=>{var T,P;return o.jsx(Tr,{t:x,hasPermission:f,index:d,optionalComponent:m,installStatus:w[(T=m.meta)==null?void 0:T.did]},((P=m.meta)==null?void 0:P.did)||d)})}),f?null:o.jsxs(o.Fragment,{children:[o.jsx(K,{sx:{width:"100%",height:"1px",backgroundColor:Ce.gray6}}),o.jsx(K,{sx:{padding:"20px 24px"},children:o.jsx(K,{sx:{opacity:1},children:x("componentInstallerSuggestions")})})]})]}):o.jsxs(K,{sx:{display:"flex",flexDirection:"column"},children:[o.jsxs(K,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"flex-start"},children:[e||o.jsx(jt,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),o.jsx(K,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:x("componentInstallerTitle")}),o.jsx(K,{sx:{flex:1}}),y?o.jsx(lr,{variant:"outlined",className:"button",onClick:a,children:o.jsx(ur,{})}):null]}),o.jsx(K,{sx:{width:"100%",height:"1px",backgroundColor:Ce.gray6}}),o.jsxs(K,{sx:{padding:"20px 24px",marginTop:0},children:[x("componentInstallerNoDefinedInBlockletYML"),": ",t]})]})})})})]})})}Nt.propTypes={disabled:B.bool,warnIcon:B.node,did:B.oneOfType([B.string,B.arrayOf(B.string)]).isRequired,noPermissionMute:B.bool,onInstalled:B.func,onError:B.func,children:B.any.isRequired,closeByOutSize:B.bool,onClose:B.func,fallback:B.node,roles:B.array};Nt.defaultProps={disabled:!1,warnIcon:null,noPermissionMute:!1,onInstalled:null,onError:null,closeByOutSize:!1,onClose:null,fallback:null,roles:["owner","admin"]};({...Nt.propTypes,children:B.any.isRequired});({...Nt.defaultProps});z.createContext({});const Mt=new Ao;kn.defaults.timeout=10*1e3;kn.create();Se(K)`
|
|
1
|
+
import{r as z,j as o,fz as vo,ci as ke,fA as xo,P as B,O as K,d7 as Ce,fB as jt,dN as dt,a1 as pt,cK as wo,q as Ne,fC as Nn,fD as Ln,fE as Eo,dP as jo,fF as So,dO as Io,a2 as lr,ff as ur,cH as Ao,av as kn,n as Se,fg as ut,as as wr,ax as Ye,m as De,eA as Po,fG as Oo,fH as Er,aG as Ro,ch as To,R as St,cI as Bn,fI as Co,cx as qn,cw as Ct,fJ as mt,ct as Re,fK as Do,fL as _o,fn as Un,fM as jr,fN as No,fO as Lo,fP as ko,fQ as Bo,cv as fr,g as qo,cy as Zr,fR as Uo,M as Fo,bm as Le,aO as Fn,S as It,fS as Ko,fT as Sr,at as ht,D as Ve,B as je,C as nt,w as Ir,J as rt,K as Ge,k as dr,aU as Mo,x as $o,y as zo,f as gt,ad as Dt,U as Fe,cc as Ze,A as ot,fU as Wo,aK as Kn,aL as Mn,b as He,db as Vo,t as $n,F as Ee,W as Ar,ce as Ho,fV as zn,aQ as Yo,aD as Go,a9 as Zo,bq as Jo,aZ as Xo,a_ as Qo,Q as ei}from"./index-CC1ndwks.js";import{c as ti}from"./index-B9dsKJcE.js";import{d as At}from"./Add-CBlI6OP_.js";import{d as ri}from"./Loop-BALLXtEO.js";import{d as ni}from"./ViewList-CJj9MHYa.js";import{L as oi,S as ii,d as Wn}from"./list-header-C-NFaGBI.js";import{D as Pr,g as si}from"./index-BXNB-HAQ.js";import"./index-BOuMxb3Q.js";import"./index-BTZWTFSn.js";import{T as ai}from"./index-Bxr0QU8m.js";import{E as Vn}from"./index-DVV4MjHu.js";import{U as Ft,d as Hn}from"./ua-parser-CxBhcPmn.js";import"./index-CgdUe9yu.js";import"./index-CmhE_K0y.js";import{l as Yn}from"./index-Cuo7-0Cq.js";import{o as ci}from"./index-ZG7jWpak.js";import{W as Gn}from"./tag-CCXE4PlV.js";import{a as Me}from"./team-BSlyvC6c.js";import{u as Zn}from"./blocklet-ChPmEIKa.js";import{C as _t}from"./click-to-copy-Crhp_-Y4.js";import{F as pr,S as mr}from"./Select-BFdUN7Gy.js";import{I as hr}from"./InputLabel-D6AZ_TXn.js";import{T as Jn}from"./TextField-DMD0bhJ9.js";import{I as gr}from"./index-5SVf0tFY.js";import{d as li}from"./Delete-DP2Kbw6K.js";import{A as ui}from"./actions-B8oxTC01.js";import{S as fi}from"./shorten-label-u7BOpbFf.js";var Or={};Object.defineProperty(Or,"__esModule",{value:!0});var Xn=Or.default=void 0;di(z);var et=o;function di(e){return e&&e.__esModule?e:{default:e}}function Jr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Xr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jr(Object(r),!0).forEach(function(n){pi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pi(e,t,r){return t=mi(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mi(e){var t=hi(e,"string");return typeof t=="symbol"?t:String(t)}function hi(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rr=function(t){return(0,et.jsxs)("svg",Xr(Xr({},t),{},{children:[(0,et.jsx)("g",{clipPath:"url(#clip0)",children:(0,et.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1.598A4.092 4.092 0 1 0 9 9.78a4.092 4.092 0 0 0 0-8.183zM7.274 3.964a2.44 2.44 0 1 1 3.452 3.451 2.44 2.44 0 0 1-3.452-3.451zm.093 6.343A4.091 4.091 0 0 0 3.275 14.4v2.722c0 .155.126.281.281.281h1.09a.281.281 0 0 0 .28-.281v-2.722a2.44 2.44 0 0 1 2.44-2.44h3.267a2.442 2.442 0 0 1 2.44 2.44v2.722c0 .155.127.281.282.281h1.088a.281.281 0 0 0 .282-.281v-2.722a4.091 4.091 0 0 0-4.092-4.091H7.367z"})}),(0,et.jsx)("defs",{children:(0,et.jsx)("clipPath",{id:"clip0",children:(0,et.jsx)("path",{transform:"translate(0 .5)",d:"M0 0h18v18H0z"})})})]}))};Rr.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};Rr.displayName="person";Xn=Or.default=Rr;var Et={},gi=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Qn="%[a-f0-9]{2}",Qr=new RegExp("("+Qn+")|([^%]+?)","gi"),en=new RegExp("("+Qn+")+","gi");function yr(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],yr(r),yr(n))}function yi(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(Qr)||[],r=1;r<t.length;r++)e=yr(t,r).join(""),t=e.match(Qr)||[];return e}}function bi(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=en.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=yi(r[0]);n!==r[0]&&(t[r[0]]=n)}r=en.exec(e)}t["%C2"]="�";for(var s=Object.keys(t),l=0;l<s.length;l++){var v=s[l];e=e.replace(new RegExp(v,"g"),t[v])}return e}var vi=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return bi(e)}},xi=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},wi=function(e,t){for(var r={},n=Object.keys(e),s=Array.isArray(t),l=0;l<n.length;l++){var v=n[l],y=e[v];(s?t.indexOf(v)!==-1:t(v,y,e))&&(r[v]=y)}return r};(function(e){const t=gi,r=vi,n=xi,s=wi,l=i=>i==null;function v(i){switch(i.arrayFormat){case"index":return a=>(f,m)=>{const d=f.length;return m===void 0||i.skipNull&&m===null||i.skipEmptyString&&m===""?f:m===null?[...f,[E(a,i),"[",d,"]"].join("")]:[...f,[E(a,i),"[",E(d,i),"]=",E(m,i)].join("")]};case"bracket":return a=>(f,m)=>m===void 0||i.skipNull&&m===null||i.skipEmptyString&&m===""?f:m===null?[...f,[E(a,i),"[]"].join("")]:[...f,[E(a,i),"[]=",E(m,i)].join("")];case"comma":case"separator":return a=>(f,m)=>m==null||m.length===0?f:f.length===0?[[E(a,i),"=",E(m,i)].join("")]:[[f,E(m,i)].join(i.arrayFormatSeparator)];default:return a=>(f,m)=>m===void 0||i.skipNull&&m===null||i.skipEmptyString&&m===""?f:m===null?[...f,E(a,i)]:[...f,[E(a,i),"=",E(m,i)].join("")]}}function y(i){let a;switch(i.arrayFormat){case"index":return(f,m,d)=>{if(a=/\[(\d*)\]$/.exec(f),f=f.replace(/\[\d*\]$/,""),!a){d[f]=m;return}d[f]===void 0&&(d[f]={}),d[f][a[1]]=m};case"bracket":return(f,m,d)=>{if(a=/(\[\])$/.exec(f),f=f.replace(/\[\]$/,""),!a){d[f]=m;return}if(d[f]===void 0){d[f]=[m];return}d[f]=[].concat(d[f],m)};case"comma":case"separator":return(f,m,d)=>{const T=typeof m=="string"&&m.includes(i.arrayFormatSeparator),P=typeof m=="string"&&!T&&u(m,i).includes(i.arrayFormatSeparator);m=P?u(m,i):m;const _=T||P?m.split(i.arrayFormatSeparator).map(X=>u(X,i)):m===null?m:u(m,i);d[f]=_};default:return(f,m,d)=>{if(d[f]===void 0){d[f]=m;return}d[f]=[].concat(d[f],m)}}}function h(i){if(typeof i!="string"||i.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function E(i,a){return a.encode?a.strict?t(i):encodeURIComponent(i):i}function u(i,a){return a.decode?r(i):i}function O(i){return Array.isArray(i)?i.sort():typeof i=="object"?O(Object.keys(i)).sort((a,f)=>Number(a)-Number(f)).map(a=>i[a]):i}function x(i){const a=i.indexOf("#");return a!==-1&&(i=i.slice(0,a)),i}function I(i){let a="";const f=i.indexOf("#");return f!==-1&&(a=i.slice(f)),a}function j(i){i=x(i);const a=i.indexOf("?");return a===-1?"":i.slice(a+1)}function w(i,a){return a.parseNumbers&&!Number.isNaN(Number(i))&&typeof i=="string"&&i.trim()!==""?i=Number(i):a.parseBooleans&&i!==null&&(i.toLowerCase()==="true"||i.toLowerCase()==="false")&&(i=i.toLowerCase()==="true"),i}function p(i,a){a=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},a),h(a.arrayFormatSeparator);const f=y(a),m=Object.create(null);if(typeof i!="string"||(i=i.trim().replace(/^[?#&]/,""),!i))return m;for(const d of i.split("&")){if(d==="")continue;let[T,P]=n(a.decode?d.replace(/\+/g," "):d,"=");P=P===void 0?null:["comma","separator"].includes(a.arrayFormat)?P:u(P,a),f(u(T,a),P,m)}for(const d of Object.keys(m)){const T=m[d];if(typeof T=="object"&&T!==null)for(const P of Object.keys(T))T[P]=w(T[P],a);else m[d]=w(T,a)}return a.sort===!1?m:(a.sort===!0?Object.keys(m).sort():Object.keys(m).sort(a.sort)).reduce((d,T)=>{const P=m[T];return P&&typeof P=="object"&&!Array.isArray(P)?d[T]=O(P):d[T]=P,d},Object.create(null))}e.extract=j,e.parse=p,e.stringify=(i,a)=>{if(!i)return"";a=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},a),h(a.arrayFormatSeparator);const f=P=>a.skipNull&&l(i[P])||a.skipEmptyString&&i[P]==="",m=v(a),d={};for(const P of Object.keys(i))f(P)||(d[P]=i[P]);const T=Object.keys(d);return a.sort!==!1&&T.sort(a.sort),T.map(P=>{const _=i[P];return _===void 0?"":_===null?E(P,a):Array.isArray(_)?_.reduce(m(P),[]).join("&"):E(P,a)+"="+E(_,a)}).filter(P=>P.length>0).join("&")},e.parseUrl=(i,a)=>{a=Object.assign({decode:!0},a);const[f,m]=n(i,"#");return Object.assign({url:f.split("?")[0]||"",query:p(j(i),a)},a&&a.parseFragmentIdentifier&&m?{fragmentIdentifier:u(m,a)}:{})},e.stringifyUrl=(i,a)=>{a=Object.assign({encode:!0,strict:!0},a);const f=x(i.url).split("?")[0]||"",m=e.extract(i.url),d=e.parse(m,{sort:!1}),T=Object.assign(d,i.query);let P=e.stringify(T,a);P&&(P=`?${P}`);let _=I(i.url);return i.fragmentIdentifier&&(_=`#${E(i.fragmentIdentifier,a)}`),`${f}${P}${_}`},e.pick=(i,a,f)=>{f=Object.assign({parseFragmentIdentifier:!0},f);const{url:m,query:d,fragmentIdentifier:T}=e.parseUrl(i,f);return e.stringifyUrl({url:m,query:s(d,a),fragmentIdentifier:T},f)},e.exclude=(i,a,f)=>{const m=Array.isArray(a)?d=>!a.includes(d):(d,T)=>!a(d,T);return e.pick(i,m,f)}})(Et);const ct=xo,Ei={parseNumbers:!1,parseBooleans:!1},ji={skipNull:!1,skipEmptyString:!1},Si=(e,t)=>{var r,n;const{navigateMode:s="push",parseOptions:l,stringifyOptions:v}=t||{},y=Object.assign(Object.assign({},Ei),l),h=Object.assign(Object.assign({},ji),v),E=ct.useLocation(),u=(r=ct.useHistory)===null||r===void 0?void 0:r.call(ct),O=(n=ct.useNavigate)===null||n===void 0?void 0:n.call(ct),x=vo(),I=z.useRef(typeof e=="function"?e():e||{}),j=z.useMemo(()=>Et.parse(E.search,y),[E.search]),w=z.useMemo(()=>Object.assign(Object.assign({},I.current),j),[j]);return[w,ke(i=>{const a=typeof i=="function"?i(w):i;x(),u&&u[s]({hash:E.hash,search:Et.stringify(Object.assign(Object.assign({},j),a),h)||"?"},E.state),O&&O({hash:E.hash,search:Et.stringify(Object.assign(Object.assign({},j),a),h)||"?"},{replace:s==="replace",state:E.state})})]},Ii=Si;function Tr({optionalComponent:e,index:t,installStatus:r,hasPermission:n,t:s}){const l=()=>{window.open(e==null?void 0:e.installUrl,"_blank")},v=()=>{window.open(e==null?void 0:e.storeUrl,"_blank")},y=()=>{window.location.reload()},h=r==="stopped"||r==="running",E=60;return o.jsxs(K,{children:[t===0?null:o.jsx(K,{sx:{width:"100%",height:"1px",backgroundColor:Ce.gray6}}),o.jsxs(K,{sx:{padding:"20px 24px",paddingTop:.5,marginTop:2,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[o.jsx("img",{style:{width:E,height:E,minWidth:E,minHeight:E},src:e.logoUrl,alt:e.meta.title}),o.jsxs(K,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",marginLeft:2},children:[o.jsxs(K,{sx:{fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{var u;return v((u=e.meta)==null?void 0:u.did)},children:[e.meta.title,o.jsxs(K,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[e.meta.version,o.jsx(jt,{className:"link-icon",icon:"fluent:open-20-filled",style:{color:Ce.primaryBase,fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.3s"}})]})]}),o.jsx(K,{sx:{marginTop:0,opacity:.7},children:e.meta.description}),o.jsx(K,{sx:{display:n?"flex":"none",flexDirection:"row",gap:1},children:r?o.jsx(K,{sx:{marginTop:2,opacity:.7},children:h?o.jsx(dt,{variant:"contained",onClick:y,children:s("componentInstallerRefresh")},"refresh"):o.jsx(dt,{disabled:!0,sx:{color:"#333"},startIcon:o.jsx(jt,{icon:"line-md:loading-loop",style:{color:"#333",fontSize:16}}),variant:"contained",children:r},"status")}):o.jsx(dt,{sx:{marginTop:2},variant:"contained",className:"button",onClick:()=>{var u;return l((u=e.meta)==null?void 0:u.did)},children:s("componentInstallerInstall")},"install")}),h?o.jsx(K,{sx:{marginTop:2,opacity:.7},children:s("componentInstallerSuccessInstalled")}):null]})]})]})}Tr.propTypes={t:B.func.isRequired,optionalComponent:B.object.isRequired,index:B.number.isRequired,installStatus:B.string,hasPermission:B.bool.isRequired};Tr.defaultProps={installStatus:""};const Ai={zh:{componentInstallerTitle:"缺少组件",componentInstallerInstall:"安装",componentInstallerClose:"关闭",componentInstallerRefresh:"重载页面",componentInstallerSuccessInstalled:"安装成功,请重载页面查看变化。",componentInstallerSuggestions:"请联系系统管理员安装该组件。",componentInstallerNoDefinedInBlockletYML:"组件未在 blocklet.yml 中定义"},en:{componentInstallerTitle:"Missing component",componentInstallerInstall:"Install",componentInstallerClose:"Close",componentInstallerRefresh:"Refresh",componentInstallerSuccessInstalled:"Successfully installed, please refresh the page to see the changes.",componentInstallerSuggestions:"Please contact the system administrator to install the component.",componentInstallerNoDefinedInBlockletYML:"The component is not defined in blocklet.yml"}},Kt=e=>typeof e=="string"?new Set(e.split(";;")):new Set(e);function Pi({did:e,onInstalled:t,onError:r}){const n=Array.isArray(e)?e.join(";;"):e,[s,l]=z.useState({}),v=z.useRef({onInstalled:t,onError:r});v.current={onInstalled:t,onError:r};const{optionalComponents:y,componentMountPoints:h}=window.blocklet,E=z.useMemo(()=>{var I;if(!y||!y.length)return[];const O=Kt(n),x=y.filter(j=>O.has(j.meta.did));return(I=x?v.current.onError:v.current.onInstalled)==null||I(x),x},[n,y]),u=z.useMemo(()=>{if(E.length)return!0;const O=Kt(n);return(h||[]).find(x=>O.has(x.did))},[E,h,n]);return E.forEach(O=>{O.storeUrl=pt(O.meta.homepage,"blocklets",O.meta.did),O.installUrl=pt(window.blocklet.appUrl,wo,`/admin/components?install-component=${O.meta.did}`)}),z.useEffect(()=>{const O=x=>{var I,j,w,p,i;if(x.origin===window.blocklet.appUrl&&((I=x.data)==null?void 0:I.kind)==="component-installer"&&(w=(j=x.data)==null?void 0:j.blocklet)!=null&&w.children){let a=!1;const f=Kt(n);(i=(p=x.data)==null?void 0:p.blocklet)==null||i.children.forEach(m=>{var d;f.has((d=m.meta)==null?void 0:d.did)&&(a=!0,l(T=>{var P;return{...T,[(P=m.meta)==null?void 0:P.did]:m.status||"waiting"}}))}),a||l({})}};return window.addEventListener("message",O),()=>{window.removeEventListener("message",O)}},[n]),{optComponents:E,installed:!E.length&&u,installStatus:s,setInstallStatus:l,definedInBlockletYML:u}}function Nt({warnIcon:e,did:t,noPermissionMute:r,onInstalled:n,onError:s,children:l,closeByOutSize:v,onClose:y,fallback:h,disabled:E,roles:u=["owner","admin"]}){const{locale:O}=Ne(),x=ke((f,m={})=>Nn(Ai,f,O,"en",m)),{installed:I,optComponents:j,installStatus:w,definedInBlockletYML:p}=Pi({did:t,onInstalled:n,onError:s}),i=z.useContext(Ln),a=()=>{y==null||y(!1)};return E?l:o.jsx(Eo,{session:i==null?void 0:i.session,roles:u,children:({hasPermission:f})=>I?l:r&&!f?h||null:typeof l=="function"?o.jsxs(o.Fragment,{children:[h,l({hasPermission:f,optComponents:j,installStatus:w})]}):o.jsxs(o.Fragment,{children:[h,o.jsx(jo,{onClickAway:m=>{m.preventDefault(),m.stopPropagation(),v&&a()},children:o.jsx(So,{in:!0,timeout:350,children:o.jsx(Io,{variant:"outlined",sx:{position:"fixed",top:20,right:20,zIndex:3e3,borderRadius:3,width:400,maxWidth:"90vw",borderColor:Ce.lineStep,border:"0 !important",fontSize:"14px",textAlign:"left",boxShadow:`0px 8px 16px 0px ${Ce.gray6}, 0px 0px 0px 1px ${Ce.gray6}`},children:p?o.jsxs(K,{sx:{display:"flex",flexDirection:"column"},children:[o.jsxs(K,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},children:[e||o.jsx(jt,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),o.jsx(K,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:x("componentInstallerTitle")}),o.jsx(K,{sx:{flex:1}}),y?o.jsx(lr,{variant:"outlined",className:"button",onClick:a,children:o.jsx(ur,{})}):null]}),o.jsx(K,{sx:{width:"100%",height:"1px",backgroundColor:Ce.gray6}}),o.jsx(K,{sx:{maxHeight:"70vh",overflowY:"auto"},children:j.map((m,d)=>{var T,P;return o.jsx(Tr,{t:x,hasPermission:f,index:d,optionalComponent:m,installStatus:w[(T=m.meta)==null?void 0:T.did]},((P=m.meta)==null?void 0:P.did)||d)})}),f?null:o.jsxs(o.Fragment,{children:[o.jsx(K,{sx:{width:"100%",height:"1px",backgroundColor:Ce.gray6}}),o.jsx(K,{sx:{padding:"20px 24px"},children:o.jsx(K,{sx:{opacity:1},children:x("componentInstallerSuggestions")})})]})]}):o.jsxs(K,{sx:{display:"flex",flexDirection:"column"},children:[o.jsxs(K,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"flex-start"},children:[e||o.jsx(jt,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),o.jsx(K,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:x("componentInstallerTitle")}),o.jsx(K,{sx:{flex:1}}),y?o.jsx(lr,{variant:"outlined",className:"button",onClick:a,children:o.jsx(ur,{})}):null]}),o.jsx(K,{sx:{width:"100%",height:"1px",backgroundColor:Ce.gray6}}),o.jsxs(K,{sx:{padding:"20px 24px",marginTop:0},children:[x("componentInstallerNoDefinedInBlockletYML"),": ",t]})]})})})})]})})}Nt.propTypes={disabled:B.bool,warnIcon:B.node,did:B.oneOfType([B.string,B.arrayOf(B.string)]).isRequired,noPermissionMute:B.bool,onInstalled:B.func,onError:B.func,children:B.any.isRequired,closeByOutSize:B.bool,onClose:B.func,fallback:B.node,roles:B.array};Nt.defaultProps={disabled:!1,warnIcon:null,noPermissionMute:!1,onInstalled:null,onError:null,closeByOutSize:!1,onClose:null,fallback:null,roles:["owner","admin"]};({...Nt.propTypes,children:B.any.isRequired});({...Nt.defaultProps});z.createContext({});const Mt=new Ao;kn.defaults.timeout=10*1e3;kn.create();Se(K)`
|
|
2
2
|
.selected-container {
|
|
3
3
|
position: absolute;
|
|
4
4
|
right: 0px;
|