@omnitron-dev/omnitron 0.1.2 → 0.2.0
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/dist/cli/omnitron.js +32 -1
- package/dist/cli/omnitron.js.map +1 -1
- package/dist/cluster/leader-election.d.ts.map +1 -1
- package/dist/cluster/leader-election.js +0 -2
- package/dist/cluster/leader-election.js.map +1 -1
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/env.js +10 -2
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/health.d.ts.map +1 -1
- package/dist/commands/health.js +10 -2
- package/dist/commands/health.js.map +1 -1
- package/dist/commands/inspect-graph.d.ts +20 -0
- package/dist/commands/inspect-graph.d.ts.map +1 -0
- package/dist/commands/inspect-graph.js +78 -0
- package/dist/commands/inspect-graph.js.map +1 -0
- package/dist/commands/inspect.d.ts.map +1 -1
- package/dist/commands/inspect.js +10 -2
- package/dist/commands/inspect.js.map +1 -1
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +11 -1
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/logs.d.ts.map +1 -1
- package/dist/commands/logs.js +17 -3
- package/dist/commands/logs.js.map +1 -1
- package/dist/commands/metrics.d.ts.map +1 -1
- package/dist/commands/metrics.js +10 -2
- package/dist/commands/metrics.js.map +1 -1
- package/dist/commands/monit.d.ts.map +1 -1
- package/dist/commands/monit.js +9 -0
- package/dist/commands/monit.js.map +1 -1
- package/dist/commands/output.d.ts +35 -0
- package/dist/commands/output.d.ts.map +1 -0
- package/dist/commands/output.js +63 -0
- package/dist/commands/output.js.map +1 -0
- package/dist/commands/stack.d.ts.map +1 -1
- package/dist/commands/stack.js +22 -7
- package/dist/commands/stack.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +17 -0
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/tor.d.ts +13 -0
- package/dist/commands/tor.d.ts.map +1 -0
- package/dist/commands/tor.js +100 -0
- package/dist/commands/tor.js.map +1 -0
- package/dist/commands/up.js +1 -1
- package/dist/commands/up.js.map +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +29 -5
- package/dist/config/loader.js.map +1 -1
- package/dist/config/types.d.ts +14 -0
- package/dist/config/types.d.ts.map +1 -1
- package/dist/daemon/daemon-client.d.ts +14 -0
- package/dist/daemon/daemon-client.d.ts.map +1 -1
- package/dist/daemon/daemon-client.js +4 -0
- package/dist/daemon/daemon-client.js.map +1 -1
- package/dist/daemon/daemon-entry.js +17 -23
- package/dist/daemon/daemon-entry.js.map +1 -1
- package/dist/daemon/daemon.d.ts +2 -0
- package/dist/daemon/daemon.d.ts.map +1 -1
- package/dist/daemon/daemon.js +118 -7
- package/dist/daemon/daemon.js.map +1 -1
- package/dist/daemon/daemon.module.d.ts.map +1 -1
- package/dist/daemon/daemon.module.js +41 -14
- package/dist/daemon/daemon.module.js.map +1 -1
- package/dist/daemon/daemon.rpc-service.d.ts +19 -0
- package/dist/daemon/daemon.rpc-service.d.ts.map +1 -1
- package/dist/daemon/daemon.rpc-service.js +14 -0
- package/dist/daemon/daemon.rpc-service.js.map +1 -1
- package/dist/daemon/pid-manager.d.ts +55 -4
- package/dist/daemon/pid-manager.d.ts.map +1 -1
- package/dist/daemon/pid-manager.js +123 -16
- package/dist/daemon/pid-manager.js.map +1 -1
- package/dist/daemon/state-store.d.ts.map +1 -1
- package/dist/daemon/state-store.js +43 -1
- package/dist/daemon/state-store.js.map +1 -1
- package/dist/infrastructure/container-runtime.d.ts +10 -0
- package/dist/infrastructure/container-runtime.d.ts.map +1 -1
- package/dist/infrastructure/container-runtime.js +111 -36
- package/dist/infrastructure/container-runtime.js.map +1 -1
- package/dist/infrastructure/infrastructure.service.d.ts +41 -0
- package/dist/infrastructure/infrastructure.service.d.ts.map +1 -1
- package/dist/infrastructure/infrastructure.service.js +157 -8
- package/dist/infrastructure/infrastructure.service.js.map +1 -1
- package/dist/infrastructure/phantom-endpoint-janitor.d.ts +72 -0
- package/dist/infrastructure/phantom-endpoint-janitor.d.ts.map +1 -0
- package/dist/infrastructure/phantom-endpoint-janitor.js +149 -0
- package/dist/infrastructure/phantom-endpoint-janitor.js.map +1 -0
- package/dist/infrastructure/presets/index.d.ts.map +1 -1
- package/dist/infrastructure/presets/index.js +2 -0
- package/dist/infrastructure/presets/index.js.map +1 -1
- package/dist/infrastructure/presets/postgres.d.ts.map +1 -1
- package/dist/infrastructure/presets/postgres.js +9 -3
- package/dist/infrastructure/presets/postgres.js.map +1 -1
- package/dist/infrastructure/presets/redis.d.ts.map +1 -1
- package/dist/infrastructure/presets/redis.js +10 -4
- package/dist/infrastructure/presets/redis.js.map +1 -1
- package/dist/infrastructure/presets/registry.d.ts.map +1 -1
- package/dist/infrastructure/presets/registry.js +12 -0
- package/dist/infrastructure/presets/registry.js.map +1 -1
- package/dist/infrastructure/presets/tor.d.ts +74 -0
- package/dist/infrastructure/presets/tor.d.ts.map +1 -0
- package/dist/infrastructure/presets/tor.js +176 -0
- package/dist/infrastructure/presets/tor.js.map +1 -0
- package/dist/infrastructure/service-resolver.d.ts +31 -0
- package/dist/infrastructure/service-resolver.d.ts.map +1 -1
- package/dist/infrastructure/service-resolver.js +60 -9
- package/dist/infrastructure/service-resolver.js.map +1 -1
- package/dist/infrastructure/stack-infra-manager.d.ts +1 -1
- package/dist/infrastructure/stack-infra-manager.js +1 -1
- package/dist/infrastructure/types.d.ts +17 -0
- package/dist/infrastructure/types.d.ts.map +1 -1
- package/dist/observability/index.d.ts +4 -0
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/index.js +3 -0
- package/dist/observability/index.js.map +1 -0
- package/dist/observability/metrics-bridge.d.ts +87 -0
- package/dist/observability/metrics-bridge.d.ts.map +1 -0
- package/dist/observability/metrics-bridge.js +295 -0
- package/dist/observability/metrics-bridge.js.map +1 -0
- package/dist/observability/metrics-server.d.ts +68 -0
- package/dist/observability/metrics-server.d.ts.map +1 -0
- package/dist/observability/metrics-server.js +146 -0
- package/dist/observability/metrics-server.js.map +1 -0
- package/dist/orchestrator/app-handle.d.ts +13 -1
- package/dist/orchestrator/app-handle.d.ts.map +1 -1
- package/dist/orchestrator/app-handle.js +12 -0
- package/dist/orchestrator/app-handle.js.map +1 -1
- package/dist/orchestrator/bootstrap-process.d.ts +49 -0
- package/dist/orchestrator/bootstrap-process.d.ts.map +1 -1
- package/dist/orchestrator/bootstrap-process.js +167 -0
- package/dist/orchestrator/bootstrap-process.js.map +1 -1
- package/dist/orchestrator/build-service.d.ts +50 -3
- package/dist/orchestrator/build-service.d.ts.map +1 -1
- package/dist/orchestrator/build-service.js +357 -85
- package/dist/orchestrator/build-service.js.map +1 -1
- package/dist/orchestrator/file-watcher.d.ts.map +1 -1
- package/dist/orchestrator/file-watcher.js +60 -38
- package/dist/orchestrator/file-watcher.js.map +1 -1
- package/dist/orchestrator/orchestrator.service.d.ts +176 -3
- package/dist/orchestrator/orchestrator.service.d.ts.map +1 -1
- package/dist/orchestrator/orchestrator.service.js +587 -56
- package/dist/orchestrator/orchestrator.service.js.map +1 -1
- package/dist/orchestrator/process-janitor.d.ts +153 -0
- package/dist/orchestrator/process-janitor.d.ts.map +1 -0
- package/dist/orchestrator/process-janitor.js +279 -0
- package/dist/orchestrator/process-janitor.js.map +1 -0
- package/dist/project/config-resolver.d.ts.map +1 -1
- package/dist/project/config-resolver.js +38 -12
- package/dist/project/config-resolver.js.map +1 -1
- package/dist/project/registry.d.ts +1 -0
- package/dist/project/registry.d.ts.map +1 -1
- package/dist/project/registry.js +30 -0
- package/dist/project/registry.js.map +1 -1
- package/dist/services/auth.service.d.ts.map +1 -1
- package/dist/services/auth.service.js +9 -2
- package/dist/services/auth.service.js.map +1 -1
- package/dist/services/netron-telemetry-transport.d.ts.map +1 -1
- package/dist/services/netron-telemetry-transport.js +0 -4
- package/dist/services/netron-telemetry-transport.js.map +1 -1
- package/dist/services/node-manager.service.js +1 -1
- package/dist/services/node-manager.service.js.map +1 -1
- package/dist/services/pipeline.service.d.ts +15 -0
- package/dist/services/pipeline.service.d.ts.map +1 -1
- package/dist/services/pipeline.service.js +53 -2
- package/dist/services/pipeline.service.js.map +1 -1
- package/dist/services/project.rpc-service.d.ts +4 -0
- package/dist/services/project.rpc-service.d.ts.map +1 -1
- package/dist/services/project.rpc-service.js +9 -0
- package/dist/services/project.rpc-service.js.map +1 -1
- package/dist/services/project.service.d.ts +9 -0
- package/dist/services/project.service.d.ts.map +1 -1
- package/dist/services/project.service.js +148 -21
- package/dist/services/project.service.js.map +1 -1
- package/dist/shared/dto/project.d.ts +1 -1
- package/dist/shared/dto/project.d.ts.map +1 -1
- package/dist/shared/dto/services.d.ts +24 -0
- package/dist/shared/dto/services.d.ts.map +1 -1
- package/dist/workers/health-monitor.service.d.ts.map +1 -1
- package/dist/workers/health-monitor.service.js +4 -1
- package/dist/workers/health-monitor.service.js.map +1 -1
- package/dist/workers/types.d.ts +3 -0
- package/dist/workers/types.d.ts.map +1 -1
- package/package.json +19 -18
- package/webapp/dist/assets/Badge-D2ZBP5iK.js +1 -0
- package/webapp/dist/assets/Card-vO88g06B.js +1 -0
- package/webapp/dist/assets/CardActions-C9h7Q2wW.js +1 -0
- package/webapp/dist/assets/CardContent-BA_Xmmhk.js +1 -0
- package/webapp/dist/assets/CardHeader-ceIs__6x.js +1 -0
- package/webapp/dist/assets/Chip-Ckk0xUhK.js +1 -0
- package/webapp/dist/assets/DialogActions-BhHM7hov.js +1 -0
- package/webapp/dist/assets/DialogContentText-BT2JQRmK.js +1 -0
- package/webapp/dist/assets/FormControlLabel-CcQByVS8.js +1 -0
- package/webapp/dist/assets/Grid-14PETRQW.js +1 -0
- package/webapp/dist/assets/InputAdornment-B8aHIsQ7.js +1 -0
- package/webapp/dist/assets/Skeleton-B74-Ds6O.js +37 -0
- package/webapp/dist/assets/Switch-DvWD2wh4.js +1 -0
- package/webapp/dist/assets/SwitchBase-CDU4nY8O.js +1 -0
- package/webapp/dist/assets/Tab-DcCOYYp5.js +1 -0
- package/webapp/dist/assets/TableContainer-CzTh4mu-.js +1 -0
- package/webapp/dist/assets/TableRow-BySEreZR.js +2 -0
- package/webapp/dist/assets/TextField-BLf-BHz2.js +1 -0
- package/webapp/dist/assets/alerts-DnRbT41C.js +1 -0
- package/webapp/dist/assets/apps-CdR0VH2d.js +1 -0
- package/webapp/dist/assets/chunk-DtcAfS_W.js +1 -0
- package/webapp/dist/assets/client-DU8I_lDc.js +2 -0
- package/webapp/dist/assets/containers-Dw-rRXV1.js +1 -0
- package/webapp/dist/assets/dashboard-CzgB0uZz.js +1 -0
- package/webapp/dist/assets/dashboard-builder-DsA0yg33.js +1 -0
- package/webapp/dist/assets/deployments-DtQAoIcQ.js +1 -0
- package/webapp/dist/assets/detail-BJR-G7JG.js +1 -0
- package/webapp/dist/assets/detail-nlCeSltl.js +8 -0
- package/webapp/dist/assets/index-ByQDwp2r.js +566 -0
- package/webapp/dist/assets/isMuiElement-DwF2naaF.js +1 -0
- package/webapp/dist/assets/logs-Kn8o4H7k.js +11 -0
- package/webapp/dist/assets/metrics-DN8Zu5wT.js +2 -0
- package/webapp/dist/assets/nodes-Bgch7AtN.js +7 -0
- package/webapp/dist/assets/pipelines-Cry3qm-S.js +4 -0
- package/webapp/dist/assets/popper-BJFSj6rc.js +1 -0
- package/webapp/dist/assets/preload-helper-DSXbuxSR.js +1 -0
- package/webapp/dist/assets/projects-Dym2GI1U.js +1 -0
- package/webapp/dist/assets/react-apexcharts.esm-CSGK5Cxn.js +958 -0
- package/webapp/dist/assets/react-apexcharts.esm-DEAWOwx5.js +1003 -0
- package/webapp/dist/assets/settings-va3zTcow.js +1 -0
- package/webapp/dist/assets/sign-in-ik35umbp.js +1 -0
- package/webapp/dist/assets/stacks-CVFOnxbF.js +1 -0
- package/webapp/dist/assets/system-info-npIXAjX2.js +1 -0
- package/webapp/dist/assets/topology-bDe70vLs.js +12 -0
- package/webapp/dist/assets/traces-DIIcT8DF.js +1 -0
- package/webapp/dist/assets/use-stack-context-DHLwZv1r.js +1 -0
- package/webapp/dist/index.html +5 -6
- package/webapp/dist/assets/Chip-BySxTjyN.js +0 -1
- package/webapp/dist/assets/DialogContentText-YQWiAVrU.js +0 -1
- package/webapp/dist/assets/DialogTitle-CDkgUIwp.js +0 -1
- package/webapp/dist/assets/FormControlLabel-Bu3CCsBM.js +0 -1
- package/webapp/dist/assets/Grid-BFY8hAzL.js +0 -1
- package/webapp/dist/assets/InputAdornment-_Dayk-3y.js +0 -3
- package/webapp/dist/assets/Skeleton-BGj6Sw8m.js +0 -37
- package/webapp/dist/assets/Switch-CA6682vv.js +0 -1
- package/webapp/dist/assets/TableContainer-4epq10KJ.js +0 -1
- package/webapp/dist/assets/TextField-C73KHMVN.js +0 -1
- package/webapp/dist/assets/alerts-JEQALS7Y.js +0 -1
- package/webapp/dist/assets/apps-DMPysEKB.js +0 -1
- package/webapp/dist/assets/client-DlGPter5.js +0 -110
- package/webapp/dist/assets/containers-CvkC7do8.js +0 -1
- package/webapp/dist/assets/dashboard-C0Fre9pC.js +0 -1
- package/webapp/dist/assets/dashboard-builder-DAghqdpE.js +0 -1
- package/webapp/dist/assets/deployments-Cg1lI1uT.js +0 -1
- package/webapp/dist/assets/detail-CyFtEson.js +0 -1
- package/webapp/dist/assets/detail-DqoSGKT1.js +0 -8
- package/webapp/dist/assets/icons-ynIWYfBP.js +0 -3
- package/webapp/dist/assets/index-vKrDmEA_.js +0 -259
- package/webapp/dist/assets/isMuiElement-BRL3YuCT.js +0 -1
- package/webapp/dist/assets/logs-IovIij1C.js +0 -11
- package/webapp/dist/assets/metrics-Dufwtwjq.js +0 -1
- package/webapp/dist/assets/nodes-Brvu8W3j.js +0 -7
- package/webapp/dist/assets/pipelines-t40X4MuC.js +0 -4
- package/webapp/dist/assets/prop-types-CvVtHxp4.js +0 -1
- package/webapp/dist/assets/react-apexcharts.esm-CLO6gala.js +0 -954
- package/webapp/dist/assets/settings-DTAIST3v.js +0 -1
- package/webapp/dist/assets/sign-in-DQEAkJum.js +0 -1
- package/webapp/dist/assets/stacks-BjM1f45N.js +0 -1
- package/webapp/dist/assets/system-info-BQSbSEK-.js +0 -1
- package/webapp/dist/assets/topology-6N8-Az_Z.js +0 -12
- package/webapp/dist/assets/traces-DVXyb-4m.js +0 -1
- package/webapp/dist/assets/use-stack-context-CbE8fxBA.js +0 -1
- /package/webapp/dist/assets/{constants-DqFQJ27U.js → constants-BgnT-Xdy.js} +0 -0
- /package/webapp/dist/assets/{formatters-J3Xqn6BQ.js → formatters-Do41SRmE.js} +0 -0
- /package/webapp/dist/assets/{fs-uP8eiZAR.js → fs-CgZLtHiQ.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t}from"./prop-types-CvVtHxp4.js";var n=t(e());function r(e,t){return n.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}export{r as t};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t}from"./prop-types-CvVtHxp4.js";import{D as n,F as r,N as i,T as a,at as o,k as s,ot as c,s as l,st as u}from"./icons-ynIWYfBP.js";import{t as d}from"./InputAdornment-_Dayk-3y.js";import{$ as f,Ft as p,Nt as m,P as h,S as g,St as _,V as v,X as y,Z as b,a as x,b as S,bt as C,c as ee,ct as w,d as T,et as E,j as te,pt as D,tt as ne,x as re,xt as O,y as k}from"./client-DlGPter5.js";import{t as ie}from"./Skeleton-BGj6Sw8m.js";import{t as A}from"./TextField-C73KHMVN.js";import{t as ae}from"./Chip-BySxTjyN.js";import{N as oe,S as j,V as se,b as M,l as ce}from"./index-vKrDmEA_.js";import{t as le}from"./use-stack-context-CbE8fxBA.js";import{t as ue}from"./constants-DqFQJ27U.js";var N=t(e());function P(e){return N.Children.toArray(e).filter(e=>N.isValidElement(e))}function de(e){return O(`MuiButtonGroup`,e)}var F=C(`MuiButtonGroup`,`root.contained.outlined.text.disableElevation.disabled.firstButton.fullWidth.horizontal.vertical.colorPrimary.colorSecondary.grouped.groupedHorizontal.groupedVertical.groupedText.groupedTextHorizontal.groupedTextVertical.groupedTextPrimary.groupedTextSecondary.groupedOutlined.groupedOutlinedHorizontal.groupedOutlinedVertical.groupedOutlinedPrimary.groupedOutlinedSecondary.groupedContained.groupedContainedHorizontal.groupedContainedVertical.groupedContainedPrimary.groupedContainedSecondary.lastButton.middleButton`.split(`.`)),I=m(),fe=(e,t)=>{let{ownerState:n}=e;return[{[`& .${F.grouped}`]:t.grouped},{[`& .${F.grouped}`]:t[`grouped${f(n.orientation)}`]},{[`& .${F.grouped}`]:t[`grouped${f(n.variant)}`]},{[`& .${F.grouped}`]:t[`grouped${f(n.variant)}${f(n.orientation)}`]},{[`& .${F.grouped}`]:t[`grouped${f(n.variant)}${f(n.color)}`]},{[`& .${F.firstButton}`]:t.firstButton},{[`& .${F.lastButton}`]:t.lastButton},{[`& .${F.middleButton}`]:t.middleButton},t.root,t[n.variant],n.disableElevation===!0&&t.disableElevation,n.fullWidth&&t.fullWidth,n.orientation===`vertical`&&t.vertical]},L=e=>{let{classes:t,color:n,disabled:r,disableElevation:i,fullWidth:a,orientation:o,variant:s}=e;return w({root:[`root`,s,o,a&&`fullWidth`,i&&`disableElevation`,`color${f(n)}`],grouped:[`grouped`,`grouped${f(o)}`,`grouped${f(s)}`,`grouped${f(s)}${f(o)}`,`grouped${f(s)}${f(n)}`,r&&`disabled`],firstButton:[`firstButton`],lastButton:[`lastButton`],middleButton:[`middleButton`]},de,t)},pe=E(`div`,{name:`MuiButtonGroup`,slot:`Root`,overridesResolver:fe})(b(({theme:e})=>({display:`inline-flex`,borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{variant:`contained`},style:{boxShadow:(e.vars||e).shadows[2],[`& .${F.grouped}`]:{boxShadow:`none`,"&:hover":{boxShadow:`none`}}}},{props:{disableElevation:!0},style:{boxShadow:`none`}},{props:{fullWidth:!0},style:{width:`100%`}},{props:{orientation:`vertical`},style:{flexDirection:`column`,[`& .${F.lastButton},& .${F.middleButton}`]:{borderTopRightRadius:0,borderTopLeftRadius:0},[`& .${F.firstButton},& .${F.middleButton}`]:{borderBottomRightRadius:0,borderBottomLeftRadius:0}}},{props:{orientation:`horizontal`},style:{[`& .${F.firstButton},& .${F.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${F.lastButton},& .${F.middleButton}`]:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}},{props:{variant:`text`,orientation:`horizontal`},style:{[`& .${F.firstButton},& .${F.middleButton}`]:{borderRight:e.vars?`1px solid ${e.alpha(e.vars.palette.common.onBackground,.23)}`:`1px solid ${e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`}`,[`&.${F.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:`text`,orientation:`vertical`},style:{[`& .${F.firstButton},& .${F.middleButton}`]:{borderBottom:e.vars?`1px solid ${e.alpha(e.vars.palette.common.onBackground,.23)}`:`1px solid ${e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`}`,[`&.${F.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter(v()).flatMap(([t])=>[{props:{variant:`text`,color:t},style:{[`& .${F.firstButton},& .${F.middleButton}`]:{borderColor:e.alpha((e.vars||e).palette[t].main,.5)}}}]),{props:{variant:`outlined`,orientation:`horizontal`},style:{[`& .${F.firstButton},& .${F.middleButton}`]:{borderRightColor:`transparent`,"&:hover":{borderRightColor:`currentColor`}},[`& .${F.lastButton},& .${F.middleButton}`]:{marginLeft:-1}}},{props:{variant:`outlined`,orientation:`vertical`},style:{[`& .${F.firstButton},& .${F.middleButton}`]:{borderBottomColor:`transparent`,"&:hover":{borderBottomColor:`currentColor`}},[`& .${F.lastButton},& .${F.middleButton}`]:{marginTop:-1}}},{props:{variant:`contained`,orientation:`horizontal`},style:{[`& .${F.firstButton},& .${F.middleButton}`]:{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${F.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:`contained`,orientation:`vertical`},style:{[`& .${F.firstButton},& .${F.middleButton}`]:{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${F.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter(v([`dark`])).map(([t])=>({props:{variant:`contained`,color:t},style:{[`& .${F.firstButton},& .${F.middleButton}`]:{borderColor:(e.vars||e).palette[t].dark}}}))],[`& .${F.grouped}`]:{minWidth:40}}))),me=N.forwardRef(function(e,t){let n=y({props:e,name:`MuiButtonGroup`}),{children:r,className:i,color:a=`primary`,component:o=`div`,disabled:s=!1,disableElevation:l=!1,disableFocusRipple:d=!1,disableRipple:f=!1,fullWidth:p=!1,orientation:m=`horizontal`,size:h=`medium`,variant:g=`outlined`,...v}=n,b={...n,color:a,component:o,disabled:s,disableElevation:l,disableFocusRipple:d,disableRipple:f,fullWidth:p,orientation:m,size:h,variant:g},x=L(b),S=N.useMemo(()=>({className:x.grouped,color:a,disabled:s,disableElevation:l,disableFocusRipple:d,disableRipple:f,fullWidth:p,size:h,variant:g}),[a,s,l,d,f,p,h,g,x.grouped]),C=P(r),ee=C.length,w=e=>{let t=e===0,n=e===ee-1;return t&&n?``:t?x.firstButton:n?x.lastButton:x.middleButton};return(0,I.jsx)(pe,{as:o,role:`group`,className:_(x.root,i),ref:t,ownerState:b,...v,children:(0,I.jsx)(u.Provider,{value:S,children:C.map((e,t)=>(0,I.jsx)(c.Provider,{value:w(t),children:e},t))})})});function R(e){return O(`MuiFab`,e)}var z=C(`MuiFab`,[`root`,`primary`,`secondary`,`extended`,`circular`,`focusVisible`,`disabled`,`colorInherit`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`info`,`error`,`warning`,`success`]),B=e=>{let{color:t,variant:n,classes:r,size:i}=e,a=w({root:[`root`,n,`size${f(i)}`,t===`inherit`?`colorInherit`:t]},R,r);return{...r,...a}},he=E(h,{name:`MuiFab`,slot:`Root`,shouldForwardProp:e=>ne(e)||e===`classes`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${f(n.size)}`],n.color===`inherit`&&t.colorInherit,t[f(n.size)],t[n.color]]}})(b(({theme:e})=>({...e.typography.button,minHeight:36,transition:e.transitions.create([`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),borderRadius:`50%`,padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.grey[900]:e.palette.getContrastText?.(e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:`none`},[`&.${z.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},variants:[{props:{size:`small`},style:{width:40,height:40}},{props:{size:`medium`},style:{width:48,height:48}},{props:{variant:`extended`},style:{borderRadius:48/2,padding:`0 16px`,width:`auto`,minHeight:`auto`,minWidth:48,height:48}},{props:{variant:`extended`,size:`small`},style:{width:`auto`,padding:`0 8px`,borderRadius:34/2,minWidth:34,height:34}},{props:{variant:`extended`,size:`medium`},style:{width:`auto`,padding:`0 16px`,borderRadius:40/2,minWidth:40,height:40}},{props:{color:`inherit`},style:{color:`inherit`}}]})),b(({theme:e})=>({variants:[...Object.entries(e.palette).filter(v([`dark`,`contrastText`])).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}}}}))]})),b(({theme:e})=>({[`&.${z.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),ge=N.forwardRef(function(e,t){let n=y({props:e,name:`MuiFab`}),{children:r,className:i,color:a=`default`,component:o=`button`,disabled:s=!1,disableFocusRipple:c=!1,focusVisibleClassName:l,size:u=`large`,variant:d=`circular`,...f}=n,p={...n,color:a,component:o,disabled:s,disableFocusRipple:c,size:u,variant:d},m=B(p);return(0,I.jsx)(he,{className:_(m.root,i),component:o,disabled:s,focusRipple:!c,focusVisibleClassName:_(m.focusVisible,l),ownerState:p,ref:t,...f,classes:m,children:r})}),_e=[`trace`,`debug`,`info`,`warn`,`error`,`fatal`],ve={trace:`TRC`,debug:`DBG`,info:`INF`,warn:`WRN`,error:`ERR`,fatal:`FTL`},ye={fatal:`rgba(220,38,38,0.08)`,error:`rgba(239,68,68,0.05)`,warn:`rgba(245,158,11,0.04)`,info:`transparent`,debug:`transparent`,trace:`transparent`},V=`'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SF Mono', monospace`,be=[{key:`live`,label:`Live`,minutes:0},{key:`15m`,label:`15m`,minutes:15},{key:`1h`,label:`1h`,minutes:60},{key:`6h`,label:`6h`,minutes:360},{key:`24h`,label:`24h`,minutes:1440},{key:`custom`,label:`Custom`,minutes:-1}],xe=100,Se=2e3,Ce=300,we=80,Te=p`
|
|
2
|
-
from { opacity: 0; transform: translateY(8px); }
|
|
3
|
-
to { opacity: 1; transform: translateY(0); }
|
|
4
|
-
`,Ee=p`
|
|
5
|
-
0%, 100% { opacity: 1; }
|
|
6
|
-
50% { opacity: 0.5; }
|
|
7
|
-
`;function H(e){let t=typeof e==`string`?new Date(e):e;return`${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}.${String(t.getMilliseconds()).padStart(3,`0`)}`}function De(e){let t=typeof e==`string`?new Date(e):e;return`${t.toLocaleString(`en-US`,{year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1})}.${String(t.getMilliseconds()).padStart(3,`0`)}`}function Oe(e){if(!e.trim())return;let t={};for(let n of e.split(`,`)){let[e,r]=n.split(`=`).map(e=>e.trim());e&&r&&(t[e]=r)}return Object.keys(t).length>0?t:void 0}function ke({log:e,isNew:t}){let[n,r]=(0,N.useState)(!1),i=ue[e.level]??`#6b7280`,a=ye[e.level]??`transparent`,o=e.labels||e.traceId||e.spanId||e.metadata;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(S,{onClick:()=>o&&r(e=>!e),sx:{display:`grid`,gridTemplateColumns:`90px 72px 36px 1fr`,gap:1,alignItems:`baseline`,px:1.5,py:`3px`,bgcolor:n?`rgba(255,255,255,0.04)`:a,borderLeft:`2px solid ${n?i:`transparent`}`,cursor:o?`pointer`:`default`,transition:`background-color 0.15s ease`,animation:t?`${Te} 0.3s ease-out`:void 0,"&:hover":{bgcolor:`rgba(255,255,255,0.04)`}},children:[(0,I.jsx)(M,{title:De(e.timestamp),placement:`top-start`,arrow:!0,enterDelay:400,children:(0,I.jsx)(g,{component:`span`,sx:{fontFamily:V,fontSize:11,color:`#5a6270`,lineHeight:`20px`,whiteSpace:`nowrap`,letterSpacing:`-0.02em`},children:H(e.timestamp)})}),(0,I.jsx)(g,{component:`span`,sx:{fontFamily:V,fontSize:11,color:`#58a6ff`,lineHeight:`20px`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,fontWeight:500},children:e.app}),(0,I.jsx)(g,{component:`span`,sx:{fontFamily:V,fontSize:10,fontWeight:700,color:i,lineHeight:`20px`,textTransform:`uppercase`,letterSpacing:`0.04em`},children:ve[e.level]??e.level.slice(0,3).toUpperCase()}),(0,I.jsx)(g,{component:`span`,sx:{fontFamily:V,fontSize:11.5,color:e.level===`error`||e.level===`fatal`?`#fca5a5`:`#c9d1d9`,lineHeight:`20px`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:n?`pre-wrap`:`nowrap`,wordBreak:n?`break-all`:void 0},children:e.message})]}),(0,I.jsx)(se,{in:n,unmountOnExit:!0,children:(0,I.jsx)(S,{sx:{ml:`14px`,mr:1.5,mb:.5,p:1.5,bgcolor:`rgba(255,255,255,0.025)`,borderRadius:1,borderLeft:`2px solid ${D(i,.3)}`},children:(0,I.jsxs)(S,{component:`pre`,sx:{fontFamily:V,fontSize:11,color:`#8b949e`,m:0,whiteSpace:`pre-wrap`,wordBreak:`break-all`,lineHeight:1.7},children:[e.traceId&&(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`span`,{style:{color:`#7c8493`},children:`traceId: `}),(0,I.jsx)(`span`,{style:{color:`#d2a8ff`},children:e.traceId}),`
|
|
8
|
-
`]}),e.spanId&&(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`span`,{style:{color:`#7c8493`},children:`spanId: `}),(0,I.jsx)(`span`,{style:{color:`#d2a8ff`},children:e.spanId}),`
|
|
9
|
-
`]}),e.labels&&(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`span`,{style:{color:`#7c8493`},children:`labels: `}),(0,I.jsx)(`span`,{style:{color:`#7ee787`},children:JSON.stringify(e.labels,null,2)}),`
|
|
10
|
-
`]}),e.metadata&&(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`span`,{style:{color:`#7c8493`},children:`metadata:`}),`
|
|
11
|
-
`,(0,I.jsx)(`span`,{style:{color:`#e6edf3`},children:JSON.stringify(e.metadata,null,2)})]})]})})})]})}function U(){let{activeProject:e,filterApps:t,displayName:c}=le(),u=!e,[f,p]=(0,N.useState)(u?`omnitron`:``),[m,h]=(0,N.useState)(``),[_,v]=(0,N.useState)([]),[y,b]=(0,N.useState)([]),[C,w]=(0,N.useState)(``),[E,ne]=(0,N.useState)(``),[O,se]=(0,N.useState)(``),[P,de]=(0,N.useState)(u?`live`:`1h`),[F,fe]=(0,N.useState)(``),[L,pe]=(0,N.useState)(``),[R,z]=(0,N.useState)([]),[B,he]=(0,N.useState)(null),[ve,ye]=(0,N.useState)([]),[Te,H]=(0,N.useState)(0),[De,U]=(0,N.useState)(!1),[Ae,W]=(0,N.useState)(!0),[je,Me]=(0,N.useState)(!1),[Ne,G]=(0,N.useState)(null),[Pe,Fe]=(0,N.useState)(!1),[K,Ie]=(0,N.useState)(!1),[Le,Re]=(0,N.useState)(0),q=(0,N.useRef)(null),J=(0,N.useRef)(null),Y=(0,N.useRef)(new Set),X=(0,N.useRef)(null),[ze,Be]=(0,N.useState)(!0),Ve=(0,N.useRef)(!0),Z=(0,N.useRef)(null);(0,N.useEffect)(()=>(Z.current&&clearTimeout(Z.current),Z.current=setTimeout(()=>{ne(C)},Ce),()=>{Z.current&&clearTimeout(Z.current)}),[C]);let Q=P===`live`;(0,N.useEffect)(()=>{Fe(!!(Q&&!K))},[Q,K]),(0,N.useEffect)(()=>{(async()=>{try{let e=t(await x.list());ye([...new Set(e.map(e=>c(e.name)))])}catch{}try{let e=await ee.listNodes();Array.isArray(e)&&e.length>0&&v(e.map(e=>({id:e.id,hostname:e.hostname})))}catch{}})()},[]);let $=(0,N.useCallback)(async()=>{try{let e=await T.getLogStats();he(e),e.byApp.length>0&&ye(t=>{let n=new Set([...t,...e.byApp.map(e=>e.app)]);return Array.from(n).sort()})}catch{}},[]);(0,N.useEffect)(()=>{$()},[$]);let He=(0,N.useCallback)((e=0)=>{let t={limit:xe,offset:e};f&&(t.app=f),y.length>0&&(t.level=y),E.trim()&&(t.search=E.trim());let n=Oe(O)??{};if(m&&(n.nodeId=m),Object.keys(n).length>0&&(t.labels=n),P===`custom`)F&&(t.from=new Date(F).toISOString()),L&&(t.to=new Date(L).toISOString());else if(P!==`live`){let e=be.find(e=>e.key===P);e&&e.minutes>0&&(t.from=new Date(Date.now()-e.minutes*60*1e3).toISOString())}return t},[f,m,y,E,O,P,F,L]),Ue=(0,N.useCallback)(async()=>{try{W(!0);let e=await T.queryLogs(He(0));z(e.entries),H(e.total),U(e.hasMore),G(null),Y.current.clear(),e.entries.length>0&&(J.current=new Date(e.entries[0].timestamp).toISOString())}catch(e){G(e?.message??`Failed to query logs`)}finally{W(!1)}},[He]),We=async()=>{Me(!0);try{let e=await T.queryLogs(He(R.length));z(t=>[...t,...e.entries]),U(e.hasMore)}catch(e){G(e?.message??`Failed to load more`)}finally{Me(!1)}};(0,N.useEffect)(()=>{Q||Ue()},[Ue,Q]);let Ge=(0,N.useMemo)(()=>{let e={tail:100};return f&&(e.app=f),y.length>0&&(e.level=y),E.trim()&&(e.search=E.trim()),e},[f,y,E]);(0,N.useEffect)(()=>{Q&&(async()=>{try{W(!0);let e=await T.streamLogs(Ge);z([...e].reverse()),H(e.length),U(!1),G(null),Y.current.clear(),e.length>0&&(J.current=new Date(e[e.length-1].timestamp).toISOString())}catch(e){G(e?.message??`Failed to stream logs`)}finally{W(!1)}})()},[Q,Ge]),(0,N.useEffect)(()=>{if(q.current&&=(clearInterval(q.current),null),!(!Pe||K))return q.current=setInterval(async()=>{try{let e=J.current,t={...Ge,tail:50};e&&(t.since=e);let n=await T.streamLogs(t);if(n.length===0)return;let r=new Set(R.map(e=>e.id)),i=n.filter(e=>!r.has(e.id));if(i.length===0)return;i.forEach(e=>Y.current.add(e.id)),setTimeout(()=>{i.forEach(e=>Y.current.delete(e.id))},2e3),J.current=new Date(i[i.length-1].timestamp).toISOString(),z(e=>{let t=[...i.reverse(),...e];return t.length>2e3?t.slice(0,2e3):t}),H(e=>e+i.length),Ve.current||Re(e=>e+i.length)}catch{}},Se),()=>{q.current&&clearInterval(q.current)}},[Pe,K,Ge,R]),(0,N.useEffect)(()=>{if(Ve.current&&X.current){let e=X.current;requestAnimationFrame(()=>{e.scrollTop=0})}},[R]);let Ke=(0,N.useCallback)(()=>{let e=X.current;if(!e)return;let t=e.scrollTop<we;Ve.current=t,Be(t),t&&Re(0)},[]),qe=(0,N.useCallback)(()=>{let e=X.current;e&&(e.scrollTo({top:0,behavior:`smooth`}),Re(0))},[]),Je=e=>{b(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},Ye=()=>{p(``),h(``),b([]),w(``),ne(``),se(``),de(`1h`),fe(``),pe(``)},Xe=f!==``||y.length>0||E!==``||O!==``,Ze=(0,N.useMemo)(()=>{if(!B)return null;let e=new Map;if(Q)for(let t of R)e.set(t.level,(e.get(t.level)??0)+1);else for(let t of B.byLevel)e.set(t.level,t.count);return _e.filter(t=>e.has(t)).map(t=>({level:t,count:e.get(t)}))},[B,R,Q]);return(0,N.useEffect)(()=>{Q||$()},[He,Q,$]),(0,I.jsxs)(S,{sx:{display:`flex`,flexDirection:`column`,height:`100%`,minHeight:0},children:[(0,I.jsxs)(S,{sx:{position:`sticky`,top:0,zIndex:10,mb:2,p:2,borderRadius:2,bgcolor:D(`#0a0a0f`,.85),backdropFilter:`blur(16px)`,border:`1px solid`,borderColor:D(`#fff`,.06)},children:[(0,I.jsx)(ce,{links:[{name:u?`Daemon Logs`:`Logs`}],sx:{mb:1.5},action:(0,I.jsxs)(k,{direction:`row`,spacing:.5,alignItems:`center`,children:[Q&&(0,I.jsx)(ae,{label:K?`PAUSED`:`LIVE`,size:`small`,sx:{height:20,fontSize:10,fontWeight:700,fontFamily:V,letterSpacing:`0.08em`,bgcolor:D(K?`#f59e0b`:`#22c55e`,.15),color:K?`#f59e0b`:`#22c55e`,animation:K?void 0:`${Ee} 2s ease-in-out infinite`,border:`1px solid`,borderColor:D(K?`#f59e0b`:`#22c55e`,.3)}}),Q&&(0,I.jsx)(M,{title:K?`Resume streaming`:`Pause streaming`,children:(0,I.jsx)(te,{size:`small`,onClick:()=>Ie(e=>!e),sx:{color:K?`#f59e0b`:`#22c55e`},children:K?(0,I.jsx)(a,{}):(0,I.jsx)(i,{})})}),(0,I.jsx)(M,{title:`Refresh`,children:(0,I.jsx)(te,{size:`small`,onClick:()=>{Q&&(J.current=null),Ue(),$()},children:(0,I.jsx)(n,{})})}),Xe&&(0,I.jsx)(M,{title:`Clear all filters`,children:(0,I.jsx)(te,{size:`small`,onClick:Ye,sx:{color:`#ef4444`},children:(0,I.jsx)(l,{})})})]})}),(0,I.jsxs)(k,{direction:`row`,spacing:1.5,sx:{mb:1.5},flexWrap:`wrap`,useFlexGap:!0,children:[!u&&(0,I.jsxs)(A,{select:!0,size:`small`,label:`Application`,value:f,onChange:e=>p(e.target.value),sx:{minWidth:150,"& .MuiInputBase-root":{fontFamily:V,fontSize:12},"& .MuiInputLabel-root":{fontSize:12}},children:[(0,I.jsx)(j,{value:``,children:(0,I.jsx)(`em`,{children:`All Apps`})}),ve.map(e=>(0,I.jsx)(j,{value:e,sx:{fontFamily:V,fontSize:12},children:e},e))]}),!u&&_.length>0&&(0,I.jsxs)(A,{select:!0,size:`small`,label:`Node`,value:m,onChange:e=>h(e.target.value),sx:{minWidth:140,"& .MuiInputBase-root":{fontFamily:V,fontSize:12},"& .MuiInputLabel-root":{fontSize:12}},children:[(0,I.jsx)(j,{value:``,children:(0,I.jsx)(`em`,{children:`All Nodes`})}),_.map(e=>(0,I.jsx)(j,{value:e.id,sx:{fontFamily:V,fontSize:12},children:e.hostname},e.id))]}),(0,I.jsx)(A,{size:`small`,placeholder:`Search messages...`,value:C,onChange:e=>w(e.target.value),slotProps:{input:{startAdornment:(0,I.jsx)(d,{position:`start`,children:(0,I.jsx)(s,{sx:{fontSize:16,color:`#5a6270`}})})}},sx:{flex:1,minWidth:200,"& .MuiInputBase-root":{fontFamily:V,fontSize:12}}}),!u&&(0,I.jsx)(A,{size:`small`,placeholder:`Labels: key=val, key2=val2`,value:O,onChange:e=>se(e.target.value),sx:{minWidth:200,"& .MuiInputBase-root":{fontFamily:V,fontSize:12}}})]}),(0,I.jsxs)(k,{direction:`row`,spacing:2,alignItems:`center`,flexWrap:`wrap`,useFlexGap:!0,children:[(0,I.jsx)(k,{direction:`row`,spacing:.5,alignItems:`center`,children:_e.map(e=>{let t=y.includes(e),n=ue[e]??`#6b7280`;return(0,I.jsx)(ae,{size:`small`,label:(0,I.jsxs)(k,{direction:`row`,spacing:.5,alignItems:`center`,children:[(0,I.jsx)(S,{sx:{width:6,height:6,borderRadius:`50%`,bgcolor:n,flexShrink:0,boxShadow:t?`0 0 6px ${n}`:void 0}}),(0,I.jsx)(`span`,{children:e})]}),variant:t?`filled`:`outlined`,onClick:()=>Je(e),sx:{fontFamily:V,fontSize:10,fontWeight:600,textTransform:`uppercase`,letterSpacing:`0.04em`,height:24,borderColor:t?n:D(n,.3),color:t?`#fff`:n,bgcolor:t?D(n,.8):`transparent`,"&:hover":{bgcolor:t?D(n,.9):D(n,.12)},transition:`all 0.15s ease`}},e)})}),(0,I.jsx)(S,{sx:{width:1,height:20,bgcolor:D(`#fff`,.08),mx:.5}}),(0,I.jsx)(me,{size:`small`,variant:`outlined`,sx:{height:28},children:be.map(e=>{let t=P===e.key;return(0,I.jsx)(o,{onClick:()=>de(e.key),variant:t?`contained`:`outlined`,sx:{minWidth:e.key===`live`?52:36,px:1,fontSize:11,fontFamily:V,fontWeight:t?700:400,...e.key===`live`&&t?{bgcolor:D(`#22c55e`,.2),color:`#22c55e`,borderColor:D(`#22c55e`,.4),"&:hover":{bgcolor:D(`#22c55e`,.3)}}:{}},children:e.label},e.key)})}),P===`custom`&&(0,I.jsxs)(k,{direction:`row`,spacing:1,alignItems:`center`,children:[(0,I.jsx)(A,{type:`datetime-local`,size:`small`,value:F,onChange:e=>fe(e.target.value),label:`From`,sx:{width:200,"& .MuiInputBase-root":{fontSize:11,fontFamily:V},"& .MuiInputLabel-root":{fontSize:11}},slotProps:{inputLabel:{shrink:!0}}}),(0,I.jsx)(A,{type:`datetime-local`,size:`small`,value:L,onChange:e=>pe(e.target.value),label:`To`,sx:{width:200,"& .MuiInputBase-root":{fontSize:11,fontFamily:V},"& .MuiInputLabel-root":{fontSize:11}},slotProps:{inputLabel:{shrink:!0}}})]})]})]}),(0,I.jsxs)(k,{direction:`row`,alignItems:`center`,justifyContent:`space-between`,sx:{mb:1,px:.5},children:[(0,I.jsxs)(k,{direction:`row`,spacing:2,alignItems:`center`,children:[(0,I.jsx)(g,{variant:`caption`,sx:{fontFamily:V,fontSize:11,color:`#5a6270`},children:Ae?`Loading...`:Q?`${R.length.toLocaleString()} entries`:`Showing ${R.length.toLocaleString()} of ${Te.toLocaleString()}`}),Ze&&Ze.length>0&&(0,I.jsxs)(k,{direction:`row`,spacing:1.5,alignItems:`center`,children:[(0,I.jsx)(S,{sx:{width:1,height:12,bgcolor:D(`#fff`,.06)}}),Ze.map(e=>(0,I.jsxs)(k,{direction:`row`,spacing:.5,alignItems:`center`,children:[(0,I.jsx)(S,{sx:{width:5,height:5,borderRadius:`50%`,bgcolor:ue[e.level]??`#6b7280`}}),(0,I.jsxs)(g,{variant:`caption`,sx:{fontFamily:V,fontSize:10,color:`#5a6270`},children:[e.level,`: `,e.count.toLocaleString()]})]},e.level))]})]}),Pe&&!K&&(0,I.jsx)(g,{variant:`caption`,sx:{fontFamily:V,fontSize:10,color:D(`#22c55e`,.6),animation:`${Ee} 2s ease-in-out infinite`},children:`streaming every 2s`})]}),Ne&&(0,I.jsx)(re,{severity:`error`,variant:`outlined`,onClose:()=>G(null),sx:{mb:1,fontFamily:V,fontSize:12},children:Ne}),(0,I.jsxs)(S,{sx:{position:`relative`,flex:1,minHeight:400,borderRadius:2,overflow:`hidden`,border:`1px solid`,borderColor:D(`#fff`,.06),bgcolor:`#0a0a0f`},children:[(0,I.jsxs)(S,{sx:{display:`flex`,alignItems:`center`,height:32,px:1.5,bgcolor:D(`#fff`,.03),borderBottom:`1px solid`,borderColor:D(`#fff`,.05)},children:[(0,I.jsxs)(k,{direction:`row`,spacing:.5,sx:{mr:1.5},children:[(0,I.jsx)(S,{sx:{width:8,height:8,borderRadius:`50%`,bgcolor:`#ef4444`}}),(0,I.jsx)(S,{sx:{width:8,height:8,borderRadius:`50%`,bgcolor:`#f59e0b`}}),(0,I.jsx)(S,{sx:{width:8,height:8,borderRadius:`50%`,bgcolor:`#22c55e`}})]}),(0,I.jsxs)(g,{variant:`caption`,sx:{fontFamily:V,fontSize:10,color:`#5a6270`,letterSpacing:`0.04em`},children:[u?`omnitron-daemon`:`omnitron-logs`,f?` — ${f}`:``]})]}),(0,I.jsx)(S,{ref:X,onScroll:Ke,sx:{height:`calc(100% - 32px)`,overflowY:`auto`,overflowX:`hidden`,py:.5,"&::-webkit-scrollbar":{width:6},"&::-webkit-scrollbar-track":{bgcolor:`transparent`},"&::-webkit-scrollbar-thumb":{bgcolor:D(`#fff`,.1),borderRadius:3,"&:hover":{bgcolor:D(`#fff`,.2)}}},children:Ae?(0,I.jsx)(k,{spacing:.25,sx:{p:1.5},children:Array.from({length:20},(e,t)=>(0,I.jsx)(ie,{height:18,sx:{bgcolor:D(`#fff`,.03),borderRadius:.5,animationDuration:`${1.5+t%5*.2}s`}},t))}):R.length===0?(0,I.jsxs)(k,{alignItems:`center`,justifyContent:`center`,sx:{height:`100%`,py:8},children:[(0,I.jsx)(r,{sx:{fontSize:40,color:D(`#fff`,.08),mb:1.5}}),(0,I.jsx)(g,{sx:{fontFamily:V,fontSize:12,color:`#5a6270`,textAlign:`center`},children:`No log entries match the current filters.`}),(0,I.jsx)(g,{sx:{fontFamily:V,fontSize:11,color:D(`#fff`,.15),mt:.5},children:Xe?`Try adjusting your filters.`:`Waiting for log data...`})]}):(0,I.jsxs)(I.Fragment,{children:[De&&!Q&&(0,I.jsx)(k,{alignItems:`center`,sx:{py:1},children:(0,I.jsx)(o,{size:`small`,variant:`text`,onClick:We,disabled:je,sx:{fontFamily:V,fontSize:10,color:`#58a6ff`,textTransform:`none`,"&:hover":{bgcolor:D(`#58a6ff`,.08)}},children:je?`Loading...`:`Load older entries (${(Te-R.length).toLocaleString()} remaining)`})}),R.map(e=>(0,I.jsx)(ke,{log:e,isNew:Y.current.has(e.id)},e.id))]})}),Q&&!ze&&(0,I.jsx)(ge,{size:`small`,onClick:qe,sx:{position:`absolute`,top:48,right:16,bgcolor:D(`#58a6ff`,.15),color:`#58a6ff`,backdropFilter:`blur(8px)`,border:`1px solid`,borderColor:D(`#58a6ff`,.2),"&:hover":{bgcolor:D(`#58a6ff`,.25)},width:36,height:36},children:(0,I.jsx)(oe,{badgeContent:Le>0?Le:void 0,color:`primary`,sx:{"& .MuiBadge-badge":{fontFamily:V,fontSize:9,minWidth:16,height:16}},children:(0,I.jsx)(S,{sx:{width:0,height:0,borderLeft:`5px solid transparent`,borderRight:`5px solid transparent`,borderBottom:`6px solid currentColor`}})})})]})]})}export{U as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t}from"./prop-types-CvVtHxp4.js";import{D as n,S as r,n as i,x as a}from"./icons-ynIWYfBP.js";import{Nt as o,S as s,a as c,b as l,f as u,j as d,pt as f,x as p,y as m}from"./client-DlGPter5.js";import{t as h}from"./Grid-BFY8hAzL.js";import{t as g}from"./Skeleton-BGj6Sw8m.js";import{t as _}from"./Switch-CA6682vv.js";import{A as v,M as y,k as b,l as x}from"./index-vKrDmEA_.js";import{t as S}from"./use-stack-context-CbE8fxBA.js";import C from"./react-apexcharts.esm-CLO6gala.js";var w=t(e(),1),T=o();function E(e,t,n,r){let i=Date.now(),a=[],o=t+Math.random()*(n-t)*.5;for(let s=e-1;s>=0;s--)o+=(Math.random()-.5)*(n-t)*.1,o=Math.max(t,Math.min(n,o)),a.push({x:i-s*r,y:Math.round(o*10)/10});return a}function D(e,t){let n=Date.now(),r=[`info`,`warn`,`error`,`debug`],i={info:[20,80],warn:[2,15],error:[0,5],debug:[10,40]};return Object.fromEntries(r.map(r=>{let[a,o]=i[r],s=[];for(let r=e-1;r>=0;r--)s.push({x:n-r*t,y:Math.round(a+Math.random()*(o-a))});return[r,s]}))}var O={chart:{background:`transparent`,toolbar:{show:!1}},theme:{mode:`dark`},grid:{borderColor:`rgba(255,255,255,0.1)`},xaxis:{type:`datetime`,labels:{style:{colors:`#999`},datetimeUTC:!1}},yaxis:{labels:{style:{colors:`#999`}}},stroke:{curve:`smooth`,width:2},tooltip:{theme:`dark`,x:{format:`HH:mm:ss`}},legend:{labels:{colors:`#ccc`}}};function k({title:e,value:t,suffix:n,icon:r,color:i,loading:a}){return(0,T.jsx)(y,{variant:`outlined`,children:(0,T.jsx)(v,{children:(0,T.jsxs)(m,{direction:`row`,alignItems:`center`,justifyContent:`space-between`,spacing:2,children:[(0,T.jsxs)(m,{spacing:.5,children:[(0,T.jsx)(s,{variant:`body2`,color:`text.secondary`,children:e}),a?(0,T.jsx)(g,{width:60,height:40}):(0,T.jsxs)(s,{variant:`h4`,children:[t,n&&(0,T.jsx)(s,{component:`span`,variant:`body2`,color:`text.secondary`,sx:{ml:.5},children:n})]})]}),(0,T.jsx)(l,{sx:{p:1.5,borderRadius:2,bgcolor:e=>f(e.palette[i].main,.12),color:`${i}.main`,display:`flex`},children:r})]})})})}var A=[`main`,`storage`,`worker`],j=30,M=1e4;function N(){let{displayName:e,namespacePrefix:t}=S(),[o,l]=(0,w.useState)(null),[f,N]=(0,w.useState)(!0),[P,F]=(0,w.useState)(null),[I,L]=(0,w.useState)(!0),[R,z]=(0,w.useState)([]),[B,V]=(0,w.useState)([]),[H,U]=(0,w.useState)([]),W=(0,w.useCallback)(async()=>{try{let e=null;try{e=await u.getSnapshot()}catch{}if(e?.totals)l({totalCpuPercent:Math.round(e.totals.cpu),totalMemoryPercent:Math.round(e.totals.memory/(1024*1024)),activeApps:e.totals.onlineApps??0,logIngestionRate:0});else{let e=(await c.status())?.apps??[],t=Array.isArray(e)?e.filter(e=>e.status===`online`).length:0,n=Array.isArray(e)?e.reduce((e,t)=>e+(t.cpu??0),0):0,r=Array.isArray(e)?e.reduce((e,t)=>e+(t.memory??0),0):0;l({totalCpuPercent:Math.round(n),totalMemoryPercent:Math.round(r/(1024*1024)),activeApps:t,logIngestionRate:0})}let n=new Date(Date.now()-5*6e4).toISOString(),r=[],i=[];try{r=await u.querySeries({names:[`cpu_percent`],from:n,interval:`30s`}),i=await u.querySeries({names:[`memory_bytes`],from:n,interval:`30s`})}catch{}if(r.length>0){let e=e=>e.filter(e=>!t||e.app.startsWith(t)||!e.app.includes(`/`)).map(e=>({...e,app:e.app.includes(`/`)?e.app.split(`/`).pop():e.app})),n=e(r),a=e(i);z(n.map(e=>({name:e.app,data:e.points.map(e=>({x:new Date(e.timestamp).getTime(),y:Number(e.value.toFixed(1))}))}))),V(a.map(e=>({name:e.app,data:e.points.map(e=>({x:new Date(e.timestamp).getTime(),y:Math.round(e.value/(1024*1024))}))})))}else z(A.map(e=>({name:e,data:E(j,5,60,M)}))),V(A.map(e=>({name:e,data:E(j,50,500,M)})));let a=D(j,M);U(Object.entries(a).map(([e,t])=>({name:e,data:t}))),F(null)}catch(e){F(e?.message??`Failed to fetch metrics`)}finally{N(!1)}},[]);(0,w.useEffect)(()=>{if(W(),!I)return;let e=setInterval(W,1e4);return()=>clearInterval(e)},[W,I]);let G=(0,w.useMemo)(()=>({...O,yaxis:{...O.yaxis,title:{text:`CPU %`,style:{color:`#999`}},max:100},colors:[`#6366f1`,`#22d3ee`,`#f97316`]}),[]),K=(0,w.useMemo)(()=>({...O,yaxis:{...O.yaxis,title:{text:`Memory (MB)`,style:{color:`#999`}}},colors:[`#a78bfa`,`#34d399`,`#fb923c`]}),[]),q=(0,w.useMemo)(()=>({...O,chart:{...O.chart,type:`bar`,stacked:!0},plotOptions:{bar:{columnWidth:`60%`,borderRadius:2}},yaxis:{...O.yaxis,title:{text:`Lines / interval`,style:{color:`#999`}}},colors:[`#3b82f6`,`#f59e0b`,`#ef4444`,`#6b7280`]}),[]);return(0,T.jsxs)(m,{spacing:3,children:[(0,T.jsx)(x,{links:[{name:`Metrics`}],action:(0,T.jsxs)(m,{direction:`row`,alignItems:`center`,spacing:1,children:[(0,T.jsx)(s,{variant:`body2`,color:`text.secondary`,children:`Auto-refresh`}),(0,T.jsx)(_,{size:`small`,checked:I,onChange:(e,t)=>L(t)}),(0,T.jsx)(d,{size:`small`,onClick:W,title:`Refresh`,children:(0,T.jsx)(n,{})})]})}),P&&(0,T.jsx)(p,{severity:`warning`,variant:`outlined`,onClose:()=>F(null),children:P}),(0,T.jsxs)(h,{container:!0,spacing:3,children:[(0,T.jsx)(h,{size:{xs:12,sm:6,md:3},children:(0,T.jsx)(k,{title:`Total CPU`,value:o?.totalCpuPercent??0,suffix:`%`,icon:(0,T.jsx)(r,{}),color:(o?.totalCpuPercent??0)>80?`error`:(o?.totalCpuPercent??0)>60?`warning`:`success`,loading:f})}),(0,T.jsx)(h,{size:{xs:12,sm:6,md:3},children:(0,T.jsx)(k,{title:`Total Memory`,value:o?.totalMemoryPercent??0,suffix:`%`,icon:(0,T.jsx)(r,{}),color:(o?.totalMemoryPercent??0)>80?`error`:(o?.totalMemoryPercent??0)>60?`warning`:`success`,loading:f})}),(0,T.jsx)(h,{size:{xs:12,sm:6,md:3},children:(0,T.jsx)(k,{title:`Active Apps`,value:o?.activeApps??0,icon:(0,T.jsx)(i,{}),color:`primary`,loading:f})}),(0,T.jsx)(h,{size:{xs:12,sm:6,md:3},children:(0,T.jsx)(k,{title:`Log Ingestion`,value:o?.logIngestionRate??0,suffix:`lines/s`,icon:(0,T.jsx)(a,{}),color:`info`,loading:f})})]}),(0,T.jsxs)(y,{variant:`outlined`,children:[(0,T.jsx)(b,{title:`CPU Usage`,titleTypographyProps:{variant:`subtitle1`,fontWeight:600},subheader:`Per-application CPU usage (last 5 minutes)`,subheaderTypographyProps:{variant:`caption`}}),(0,T.jsx)(v,{sx:{pt:0},children:f?(0,T.jsx)(g,{variant:`rectangular`,height:300}):(0,T.jsx)(C,{type:`area`,height:300,options:G,series:R})})]}),(0,T.jsxs)(y,{variant:`outlined`,children:[(0,T.jsx)(b,{title:`Memory Usage`,titleTypographyProps:{variant:`subtitle1`,fontWeight:600},subheader:`Per-application memory consumption (MB)`,subheaderTypographyProps:{variant:`caption`}}),(0,T.jsx)(v,{sx:{pt:0},children:f?(0,T.jsx)(g,{variant:`rectangular`,height:300}):(0,T.jsx)(C,{type:`area`,height:300,options:K,series:B})})]}),(0,T.jsxs)(y,{variant:`outlined`,children:[(0,T.jsx)(b,{title:`Log Volume`,titleTypographyProps:{variant:`subtitle1`,fontWeight:600},subheader:`Log lines grouped by level`,subheaderTypographyProps:{variant:`caption`}}),(0,T.jsx)(v,{sx:{pt:0},children:f?(0,T.jsx)(g,{variant:`rectangular`,height:300}):(0,T.jsx)(C,{type:`bar`,height:300,options:q,series:H})})]})]})}export{N as default};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t}from"./prop-types-CvVtHxp4.js";import{B as n,C as r,D as i,E as a,a as o,at as s,d as c,j as l}from"./icons-ynIWYfBP.js";import{Ft as u,Nt as d,S as f,b as p,j as m,p as h,rt as g,y as _}from"./client-DlGPter5.js";import{t as v}from"./Grid-BFY8hAzL.js";import{n as y,t as b}from"./Skeleton-BGj6Sw8m.js";import{n as x,r as S,t as C}from"./TextField-C73KHMVN.js";import{t as w}from"./Chip-BySxTjyN.js";import{n as T,r as E,t as D}from"./DialogTitle-CDkgUIwp.js";import{A as O,D as k,M as A,S as j,b as M,f as N,l as P}from"./index-vKrDmEA_.js";var F=t(e(),1),I=d(),L=864e5,R=u`
|
|
2
|
-
from { transform: rotate(0deg); }
|
|
3
|
-
to { transform: rotate(360deg); }
|
|
4
|
-
`,z=u`
|
|
5
|
-
0%, 100% { opacity: 1; }
|
|
6
|
-
50% { opacity: 0.3; }
|
|
7
|
-
`;function B({state:e,label:t,tooltip:n}){let r={online:`success.main`,offline:`error.main`,unchecked:`text.disabled`,checking:`warning.main`,"not-installed":`text.disabled`};return(0,I.jsx)(M,{title:n??{online:`Connected`,offline:`Offline`,unchecked:`Not checked`,checking:`Checking...`,"not-installed":`Not installed`}[e],arrow:!0,children:(0,I.jsxs)(_,{direction:`row`,alignItems:`center`,spacing:.5,children:[(0,I.jsx)(p,{sx:{width:8,height:8,borderRadius:`50%`,bgcolor:r[e],flexShrink:0,...e===`checking`&&{animation:`${z} 1s ease-in-out infinite`},...e===`not-installed`&&{border:`1px dashed`,borderColor:`text.disabled`,bgcolor:`transparent`}}}),(0,I.jsx)(f,{variant:`caption`,color:`text.secondary`,noWrap:!0,children:t})]})})}function V(e,t){if(e<0)return t.palette.action.disabledBackground;let n=H(t.palette.success.main),r=H(t.palette.error.main),i=r[0]+(n[0]-r[0])*e,a=r[1]+(n[1]-r[1])*e,o=r[2]+(n[2]-r[2])*e;return`hsl(${Math.round(i)}, ${Math.round(a)}%, ${Math.round(o)}%)`}function H(e){let t=e.replace(`#`,``),n=parseInt(t.slice(0,2),16)/255,r=parseInt(t.slice(2,4),16)/255,i=parseInt(t.slice(4,6),16)/255,a=Math.max(n,r,i),o=Math.min(n,r,i),s=(a+o)/2;if(a===o)return[0,0,s*100];let c=a-o,l=s>.5?c/(2-a-o):c/(a+o),u=0;return u=a===n?(r-i)/c+(r<i?6:0):a===r?(i-n)/c+2:(n-r)/c+4,u*=60,[u,l*100,s*100]}function U({data:e,metric:t,label:n,segWidth:r=6,gap:i=4,height:a=10}){let o=g(),s=(0,F.useRef)(null),[c,l]=(0,F.useState)(0);(0,F.useEffect)(()=>{let e=s.current;if(!e)return;let t=()=>{let t=e.clientWidth;l(Math.max(1,Math.floor((t+i)/(r+i))))};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[r,i]);let u=[];if(c>0){let n=e.slice(-c);for(let e=0;e<c-n.length;e++)u.push({val:-1,time:``});for(let e of n){let n=e[t],r=e.t?new Date(e.t).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):``;u.push({val:n,time:r,checks:e.checks})}}let d=u.filter(e=>e.val>=0),m=d.length>0?Math.round(d.reduce((e,t)=>e+t.val,0)/d.length*100):-1;return(0,I.jsxs)(_,{spacing:.25,children:[(0,I.jsxs)(_,{direction:`row`,justifyContent:`space-between`,alignItems:`center`,children:[(0,I.jsx)(f,{variant:`caption`,color:`text.disabled`,sx:{fontSize:9,textTransform:`uppercase`,letterSpacing:.5},children:n}),m>=0&&(0,I.jsxs)(f,{variant:`caption`,sx:{fontSize:9,color:m>=95?`success.main`:m>=50?`warning.main`:`error.main`},children:[m,`%`]})]}),(0,I.jsx)(_,{ref:s,direction:`row`,sx:{height:a,gap:`${i}px`},children:u.map((e,t)=>{let n=V(e.val,o);return(0,I.jsx)(M,{title:e.val<0?e.time?`${e.time} — no data`:`No data`:`${e.time} — ${Math.round(e.val*100)}% up${e.checks==null?``:` (${e.checks} checks)`}`,arrow:!0,children:(0,I.jsx)(p,{sx:{width:r,minWidth:r,height:`100%`,bgcolor:n,borderRadius:`2px`,transition:`opacity 0.15s`,"&:hover":{opacity:.6}}})},t)})})]})}function W(e,t){if(!e)return{state:`unchecked`,tooltip:`Not checked`};if(t)return e.omnitronConnected?{state:`online`,tooltip:`v${e.omnitronVersion??`?`} PID ${e.omnitronPid??`?`}`}:{state:`offline`,tooltip:e.omnitronError??`Not running`};if(e.omnitronConnected)return{state:`online`,tooltip:`v${e.omnitronVersion??`?`} (${e.omnitronRole??`?`})`};if(!e.sshConnected)return{state:`unchecked`,tooltip:`Waiting for SSH connection`};let n=e.omnitronError??``;return/not found|command not found|no such file|ENOENT/i.test(n)?{state:`not-installed`,tooltip:`Not installed on this node`}:{state:`offline`,tooltip:n||`Not running`}}var G=6,K=4,q=10;function J({node:e,onEdit:t,onRemove:n,onCheckSsh:a,checking:s,uptimeData:u}){let{status:d}=e,h=W(d,e.isLocal),g=d?.pingReachable==null?`unchecked`:d.pingReachable?`online`:`offline`;return(0,I.jsx)(A,{sx:{height:`100%`,display:`flex`,flexDirection:`column`,transition:`box-shadow 0.2s`,"&:hover":{boxShadow:e=>e.shadows[8]}},children:(0,I.jsxs)(O,{sx:{pb:`12px !important`,flexGrow:1,display:`flex`,flexDirection:`column`},children:[(0,I.jsxs)(_,{direction:`row`,alignItems:`flex-start`,justifyContent:`space-between`,mb:1.5,children:[(0,I.jsxs)(_,{direction:`row`,alignItems:`center`,spacing:1,sx:{minWidth:0},children:[e.isLocal?(0,I.jsx)(o,{sx:{fontSize:24,color:`primary.main`,flexShrink:0}}):(0,I.jsx)(r,{sx:{fontSize:24,color:`text.secondary`,flexShrink:0}}),(0,I.jsxs)(p,{sx:{minWidth:0},children:[(0,I.jsx)(f,{variant:`subtitle2`,noWrap:!0,children:e.name}),(0,I.jsxs)(f,{variant:`caption`,color:`text.disabled`,noWrap:!0,children:[e.host,e.isLocal?``:`:${e.sshPort}`]})]})]}),(0,I.jsxs)(_,{direction:`row`,spacing:0,children:[!e.isLocal&&(0,I.jsx)(M,{title:s?`Checking...`:`Check SSH connection`,children:(0,I.jsx)(`span`,{children:(0,I.jsx)(m,{size:`small`,onClick:()=>a(e.id),disabled:s,children:(0,I.jsx)(i,{sx:{fontSize:18,...s&&{animation:`${R} 1s linear infinite`}}})})})}),!e.isLocal&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(M,{title:`Edit`,children:(0,I.jsx)(m,{size:`small`,onClick:()=>t(e),children:(0,I.jsx)(l,{sx:{fontSize:18}})})}),(0,I.jsx)(M,{title:`Remove`,children:(0,I.jsx)(m,{size:`small`,onClick:()=>n(e.id),color:`error`,children:(0,I.jsx)(c,{sx:{fontSize:18}})})})]})]})]}),(0,I.jsx)(_,{direction:`row`,spacing:2,mb:1.5,children:e.isLocal?(0,I.jsx)(B,{state:h.state,label:`OMNITRON`,tooltip:h.tooltip}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(B,{state:g,label:`PING`,tooltip:d?.pingReachable?`${d.pingLatencyMs??`?`}ms`:d?.pingError??`Not checked`}),(0,I.jsx)(B,{state:h.state,label:`OMNITRON`,tooltip:h.tooltip})]})}),(0,I.jsx)(y,{sx:{mb:1.5}}),(0,I.jsxs)(_,{spacing:.5,children:[(0,I.jsx)(Y,{label:`Runtime`,value:e.runtime}),(0,I.jsx)(Y,{label:`Daemon Port`,value:String(e.daemonPort)}),!e.isLocal&&(0,I.jsx)(Y,{label:`SSH User`,value:e.sshUser}),d?.os&&(0,I.jsx)(Y,{label:`OS`,value:`${d.os.platform} ${d.os.arch}`}),d?.omnitronUptime!=null&&d.omnitronUptime>0&&(0,I.jsx)(Y,{label:`Uptime`,value:X(d.omnitronUptime)})]}),e.tags.length>0&&(0,I.jsx)(_,{direction:`row`,spacing:.5,mt:1.5,flexWrap:`wrap`,useFlexGap:!0,children:e.tags.map(e=>(0,I.jsx)(w,{label:e,size:`small`,variant:`outlined`,sx:{height:22,fontSize:11}},e))}),!e.isLocal&&(0,I.jsx)(p,{sx:{mt:`auto`,pt:1.5},children:(0,I.jsxs)(_,{spacing:.75,children:[(0,I.jsx)(U,{data:u,metric:`ping`,label:`PING`,segWidth:G,gap:K,height:q}),(0,I.jsx)(U,{data:u,metric:`omnitron`,label:`OMNITRON`,segWidth:G,gap:K,height:q})]})})]})})}function Y({label:e,value:t}){return(0,I.jsxs)(_,{direction:`row`,justifyContent:`space-between`,alignItems:`center`,children:[(0,I.jsx)(f,{variant:`caption`,color:`text.disabled`,children:e}),(0,I.jsx)(f,{variant:`caption`,fontWeight:500,children:t})]})}function X(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);if(n<60)return`${n}m`;let r=Math.floor(n/60);return r<24?`${r}h ${n%60}m`:`${Math.floor(r/24)}d ${r%24}h`}var Z={name:``,host:``,sshPort:22,sshUser:`root`,sshAuthMethod:`key`,sshPrivateKey:``,sshPassphrase:``,sshPassword:``,runtime:`node`,daemonPort:9700,tags:``};function Q({open:e,onClose:t,onSubmit:r,editNode:i,sshKeys:a,loading:o}){let[c,l]=(0,F.useState)(Z);(0,F.useEffect)(()=>{e&&l(i?{name:i.name,host:i.host,sshPort:i.sshPort,sshUser:i.sshUser,sshAuthMethod:i.sshAuthMethod,sshPrivateKey:i.sshPrivateKey??``,sshPassphrase:``,sshPassword:``,runtime:i.runtime,daemonPort:i.daemonPort,tags:i.tags.join(`, `)}:{...Z,sshPrivateKey:a[0]?.path??``})},[i,a,e]);let u=(e,t)=>l(n=>({...n,[e]:t})),d=!!i,p=c.name.trim()&&c.host.trim();return(0,I.jsxs)(k,{open:e,onClose:t,maxWidth:`sm`,fullWidth:!0,children:[(0,I.jsx)(D,{children:d?`Edit "${i.name}"`:`Add Node`}),(0,I.jsx)(T,{sx:{pt:`8px !important`},children:(0,I.jsxs)(_,{spacing:2.5,mt:1,children:[(0,I.jsx)(C,{label:`Name`,value:c.name,onChange:e=>u(`name`,e.target.value),fullWidth:!0,placeholder:`production-server-1`,autoFocus:!0}),(0,I.jsxs)(_,{direction:`row`,spacing:2,children:[(0,I.jsx)(C,{label:`Host`,value:c.host,onChange:e=>u(`host`,e.target.value),fullWidth:!0,placeholder:`192.168.1.100`}),(0,I.jsx)(C,{label:`SSH Port`,value:c.sshPort,onChange:e=>u(`sshPort`,parseInt(e.target.value,10)||22),sx:{width:120},type:`number`})]}),(0,I.jsxs)(_,{direction:`row`,spacing:2,children:[(0,I.jsx)(C,{label:`SSH User`,value:c.sshUser,onChange:e=>u(`sshUser`,e.target.value),fullWidth:!0}),(0,I.jsxs)(x,{sx:{minWidth:160},children:[(0,I.jsx)(S,{children:`Auth Method`}),(0,I.jsxs)(n,{value:c.sshAuthMethod,label:`Auth Method`,onChange:e=>u(`sshAuthMethod`,e.target.value),children:[(0,I.jsx)(j,{value:`key`,children:`SSH Key`}),(0,I.jsx)(j,{value:`password`,children:`Password`})]})]})]}),c.sshAuthMethod===`key`?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(x,{fullWidth:!0,children:[(0,I.jsx)(S,{children:`SSH Private Key`}),(0,I.jsxs)(n,{value:c.sshPrivateKey,label:`SSH Private Key`,onChange:e=>u(`sshPrivateKey`,e.target.value),children:[a.map(e=>(0,I.jsx)(j,{value:e.path,children:(0,I.jsxs)(_,{direction:`row`,spacing:1,alignItems:`center`,sx:{width:`100%`},children:[(0,I.jsx)(f,{variant:`body2`,fontWeight:500,children:e.name}),(0,I.jsx)(w,{label:e.type,size:`small`,sx:{height:20,fontSize:11}}),(0,I.jsx)(f,{variant:`caption`,color:`text.disabled`,sx:{ml:`auto !important`},noWrap:!0,children:e.path})]})},e.path)),a.length===0&&(0,I.jsx)(j,{disabled:!0,children:(0,I.jsx)(f,{variant:`body2`,color:`text.secondary`,children:`No SSH keys found`})})]})]}),(0,I.jsx)(C,{label:`Key Passphrase`,value:c.sshPassphrase,onChange:e=>u(`sshPassphrase`,e.target.value),fullWidth:!0,type:`password`,placeholder:i?.hasPassphrase?`Encrypted — leave empty to keep`:`Leave empty if key is not encrypted`,size:`small`,helperText:i?.hasPassphrase?`Passphrase is stored encrypted. Enter new value to change.`:void 0})]}):(0,I.jsx)(C,{label:`SSH Password`,value:c.sshPassword,onChange:e=>u(`sshPassword`,e.target.value),fullWidth:!0,type:`password`}),(0,I.jsx)(y,{}),(0,I.jsxs)(_,{direction:`row`,spacing:2,children:[(0,I.jsxs)(x,{sx:{minWidth:140},children:[(0,I.jsx)(S,{children:`Runtime`}),(0,I.jsxs)(n,{value:c.runtime,label:`Runtime`,onChange:e=>u(`runtime`,e.target.value),children:[(0,I.jsx)(j,{value:`node`,children:`Node.js`}),(0,I.jsx)(j,{value:`bun`,children:`Bun`})]})]}),(0,I.jsx)(C,{label:`Daemon Port`,value:c.daemonPort,onChange:e=>u(`daemonPort`,parseInt(e.target.value,10)||9700),sx:{width:140},type:`number`}),(0,I.jsx)(C,{label:`Tags`,value:c.tags,onChange:e=>u(`tags`,e.target.value),fullWidth:!0,placeholder:`production, gpu`,helperText:`Comma-separated`})]})]})}),(0,I.jsxs)(E,{sx:{px:3,pb:2},children:[(0,I.jsx)(s,{onClick:t,color:`inherit`,children:`Cancel`}),(0,I.jsx)(s,{variant:`contained`,onClick:()=>r(c),disabled:!p||o,children:d?`Save`:`Add Node`})]})]})}function $(){let[e,t]=(0,F.useState)([]),[n,r]=(0,F.useState)([]),[o,c]=(0,F.useState)(!0),[l,u]=(0,F.useState)(null),[d,p]=(0,F.useState)(!1),[m,g]=(0,F.useState)(null),[y,x]=(0,F.useState)(!1),[S,C]=(0,F.useState)({}),w=(0,F.useCallback)(async()=>{try{let e=await h.listNodes();return t(e),e}catch{return t([]),[]}finally{c(!1)}},[]),O=(0,F.useCallback)(async e=>{let t={};await Promise.allSettled(e.map(async e=>{try{t[e.id]=await h.getUptimeBar({nodeId:e.id,bucketCount:200,intervalMs:L})}catch{t[e.id]=[]}})),C(t)},[]),A=(0,F.useCallback)(async()=>{try{r(await h.listSshKeys())}catch{r([])}},[]);(0,F.useEffect)(()=>{(async()=>{await O(await w())})(),A();let e=setInterval(async()=>{await O(await w())},3e4);return()=>clearInterval(e)},[w,O,A]);let j=N(),M=(0,F.useCallback)(async t=>{let n=e.find(e=>e.id===t)?.name??t;u(t);try{let e=await h.checkNodeStatus({id:t});if(e.sshConnected){let t=e.sshLatencyMs==null?``:` (${e.sshLatencyMs}ms)`;j.success(`${n}: SSH connected${t}`)}else j.error(`${n}: SSH failed — ${e.sshError??`Connection refused`}`)}catch(e){j.error(`${n}: ${e?.message??`Check failed`}`)}finally{u(null)}},[e,j]),[R,z]=(0,F.useState)(null),B=e.find(e=>e.id===R),V=(0,F.useCallback)(async()=>{if(R)try{await h.removeNode({id:R}),await w()}catch(e){console.error(`Failed to remove node:`,e)}finally{z(null)}},[R,w]),H=(0,F.useCallback)(()=>{g(null),p(!0)},[]),U=(0,F.useCallback)(e=>{g(e),p(!0)},[]),W=(0,F.useCallback)(()=>{p(!1),g(null)},[]),G=(0,F.useCallback)(async e=>{x(!0);try{let t={name:e.name.trim(),host:e.host.trim(),sshPort:e.sshPort,sshUser:e.sshUser.trim(),sshAuthMethod:e.sshAuthMethod,sshPrivateKey:e.sshAuthMethod===`key`?e.sshPrivateKey:void 0,sshPassphrase:e.sshAuthMethod===`key`&&e.sshPassphrase?e.sshPassphrase:void 0,sshPassword:e.sshAuthMethod===`password`?e.sshPassword:void 0,runtime:e.runtime,daemonPort:e.daemonPort,tags:e.tags.split(`,`).map(e=>e.trim()).filter(Boolean)};m?await h.updateNode({id:m.id,...t}):await h.addNode(t),W(),await w()}catch(e){console.error(`Failed to save node:`,e)}finally{x(!1)}},[m,w,W]),K=[...e].sort((e,t)=>e.isLocal===t.isLocal?e.name.localeCompare(t.name):e.isLocal?-1:1);return(0,I.jsxs)(_,{spacing:3,children:[(0,I.jsx)(P,{links:[{name:`Nodes`}],action:(0,I.jsxs)(_,{direction:`row`,spacing:1,children:[(0,I.jsx)(s,{variant:`outlined`,size:`small`,startIcon:(0,I.jsx)(i,{sx:{fontSize:18}}),onClick:async()=>{await O(await w())},children:`Refresh`}),(0,I.jsx)(s,{variant:`contained`,size:`small`,startIcon:(0,I.jsx)(a,{sx:{fontSize:18}}),onClick:H,children:`Add Node`})]})}),o?(0,I.jsx)(v,{container:!0,spacing:3,children:[1,2,3].map(e=>(0,I.jsx)(v,{size:{xs:12,sm:6,md:4},children:(0,I.jsx)(b,{variant:`rounded`,height:300})},e))}):(0,I.jsx)(v,{container:!0,spacing:3,children:K.map(e=>(0,I.jsx)(v,{size:{xs:12,sm:6,md:4},children:(0,I.jsx)(J,{node:e,onEdit:U,onRemove:z,onCheckSsh:M,checking:l===e.id,uptimeData:S[e.id]??[]})},e.id))}),(0,I.jsxs)(k,{open:!!R,onClose:()=>z(null),maxWidth:`xs`,fullWidth:!0,children:[(0,I.jsx)(D,{children:`Remove Node`}),(0,I.jsx)(T,{children:(0,I.jsxs)(f,{variant:`body2`,children:[`Remove `,(0,I.jsx)(`strong`,{children:B?.name??R}),`? This cannot be undone.`]})}),(0,I.jsxs)(E,{children:[(0,I.jsx)(s,{onClick:()=>z(null),color:`inherit`,children:`Cancel`}),(0,I.jsx)(s,{onClick:V,color:`error`,variant:`contained`,children:`Remove`})]})]}),(0,I.jsx)(Q,{open:d,onClose:W,onSubmit:G,editNode:m,sshKeys:n,loading:y})]})}export{$ as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t}from"./prop-types-CvVtHxp4.js";import{D as n,E as r,T as i,at as a,s as o,w as s}from"./icons-ynIWYfBP.js";import{Nt as c,S as l,b as u,j as d,m as f,x as p,y as m}from"./client-DlGPter5.js";import{t as h}from"./Skeleton-BGj6Sw8m.js";import{t as g}from"./TextField-C73KHMVN.js";import{t as _}from"./Chip-BySxTjyN.js";import{n as v,r as y,t as b}from"./DialogTitle-CDkgUIwp.js";import{t as x}from"./TableContainer-4epq10KJ.js";import{B as S,D as C,M as w,T,V as E,_ as D,k as O,l as k,v as A,y as j,z as M}from"./index-vKrDmEA_.js";import{t as N}from"./formatters-J3Xqn6BQ.js";var P=t(e(),1),F=c(),I={success:`success`,failed:`error`,running:`info`,pending:`warning`,cancelled:`default`};function L(e){if(e<=0)return`--`;let t=Math.floor(e/1e3);return t<60?`${t}s`:`${Math.floor(t/60)}m ${t%60}s`}function R({open:e,onClose:t,onCreated:n}){let[r,i]=(0,P.useState)(``),[o,s]=(0,P.useState)(``),[c,l]=(0,P.useState)(`[
|
|
2
|
-
{ "name": "build", "run": "echo building..." },
|
|
3
|
-
{ "name": "test", "run": "echo testing...", "dependsOn": ["build"] }
|
|
4
|
-
]`),[u,d]=(0,P.useState)(null);return(0,F.jsxs)(C,{open:e,onClose:t,maxWidth:`sm`,fullWidth:!0,children:[(0,F.jsx)(b,{children:`Create Pipeline`}),(0,F.jsx)(v,{children:(0,F.jsxs)(m,{spacing:2.5,sx:{mt:1},children:[u&&(0,F.jsx)(p,{severity:`error`,variant:`outlined`,children:u}),(0,F.jsx)(g,{label:`Name`,value:r,onChange:e=>i(e.target.value),size:`small`,fullWidth:!0}),(0,F.jsx)(g,{label:`Description`,value:o,onChange:e=>s(e.target.value),size:`small`,fullWidth:!0}),(0,F.jsx)(g,{label:`Steps (JSON)`,value:c,onChange:e=>l(e.target.value),size:`small`,fullWidth:!0,multiline:!0,rows:6,slotProps:{input:{sx:{fontFamily:`monospace`,fontSize:12}}}})]})}),(0,F.jsxs)(y,{children:[(0,F.jsx)(a,{onClick:t,size:`small`,children:`Cancel`}),(0,F.jsx)(a,{variant:`contained`,onClick:async()=>{try{let e=JSON.parse(c);await f.createPipeline({name:r,description:o||void 0,steps:e}),i(``),s(``),d(null),n(),t()}catch(e){d(e?.message??`Failed to create pipeline`)}},size:`small`,disabled:!r,children:`Create`})]})]})}function z({run:e}){return(0,F.jsxs)(u,{sx:{pl:4,pr:2,pb:2},children:[e.status===`running`&&(0,F.jsx)(T,{sx:{mb:1}}),(0,F.jsxs)(l,{variant:`caption`,color:`text.secondary`,sx:{mb:1,display:`block`},children:[`Triggered by: `,e.triggeredBy,` | Started: `,N(e.startedAt),e.completedAt&&` | Completed: ${N(e.completedAt)}`]}),e.steps.map((e,t)=>(0,F.jsxs)(m,{direction:`row`,alignItems:`center`,spacing:1,sx:{py:.5},children:[(0,F.jsx)(_,{label:e.status,size:`small`,color:I[e.status]??`default`,variant:`filled`,sx:{minWidth:70,fontWeight:600,fontSize:11}}),(0,F.jsx)(l,{variant:`body2`,fontWeight:500,children:e.name}),(0,F.jsx)(l,{variant:`caption`,color:`text.secondary`,sx:{fontFamily:`monospace`},children:L(e.duration)}),e.error&&(0,F.jsx)(l,{variant:`caption`,color:`error.main`,sx:{fontFamily:`monospace`},children:e.error})]},t))]})}function B(){let[e,t]=(0,P.useState)([]),[c,g]=(0,P.useState)([]),[v,y]=(0,P.useState)(!0),[b,C]=(0,P.useState)(null),[T,L]=(0,P.useState)(!1),[B,V]=(0,P.useState)(null),H=(0,P.useCallback)(async()=>{try{let[e,n]=await Promise.allSettled([f.listPipelines(),f.listRuns({limit:50})]);e.status===`fulfilled`&&t(Array.isArray(e.value)?e.value:[]),n.status===`fulfilled`&&g(Array.isArray(n.value)?n.value:[]),C(null)}catch(e){C(e?.message??`Failed to fetch pipelines`)}finally{y(!1)}},[]);(0,P.useEffect)(()=>{H();let e=setInterval(H,1e4);return()=>clearInterval(e)},[H]);let U=async e=>{try{await f.executePipeline({id:e}),H()}catch(e){C(e?.message??`Failed to execute pipeline`)}},W=async e=>{try{await f.deletePipeline({id:e}),H()}catch(e){C(e?.message??`Failed to delete pipeline`)}};return(0,F.jsxs)(m,{spacing:3,children:[(0,F.jsx)(k,{links:[{name:`Pipelines`}],action:(0,F.jsxs)(m,{direction:`row`,spacing:1,children:[(0,F.jsx)(d,{size:`small`,onClick:H,title:`Refresh`,children:(0,F.jsx)(n,{})}),(0,F.jsx)(a,{variant:`contained`,size:`small`,startIcon:(0,F.jsx)(r,{}),onClick:()=>L(!0),children:`New Pipeline`})]})}),b&&(0,F.jsx)(p,{severity:`warning`,variant:`outlined`,onClose:()=>C(null),children:b}),(0,F.jsxs)(w,{variant:`outlined`,children:[(0,F.jsx)(O,{title:`Pipeline Definitions`,titleTypographyProps:{variant:`subtitle1`,fontWeight:600},avatar:(0,F.jsx)(s,{})}),(0,F.jsx)(x,{children:(0,F.jsxs)(j,{size:`small`,children:[(0,F.jsx)(D,{children:(0,F.jsxs)(S,{children:[(0,F.jsx)(M,{children:`Name`}),(0,F.jsx)(M,{children:`Description`}),(0,F.jsx)(M,{children:`Steps`}),(0,F.jsx)(M,{children:`Triggers`}),(0,F.jsx)(M,{children:`Created`}),(0,F.jsx)(M,{align:`right`,children:`Actions`})]})}),(0,F.jsx)(A,{children:v?[...[,,]].map((e,t)=>(0,F.jsx)(S,{children:[...[,,,,,,]].map((e,t)=>(0,F.jsx)(M,{children:(0,F.jsx)(h,{width:80,height:20})},t))},t)):e.length===0?(0,F.jsx)(S,{children:(0,F.jsx)(M,{colSpan:6,sx:{textAlign:`center`,py:6},children:(0,F.jsx)(l,{variant:`body2`,color:`text.secondary`,children:`No pipelines defined`})})}):e.map(e=>(0,F.jsxs)(S,{hover:!0,children:[(0,F.jsx)(M,{children:(0,F.jsx)(l,{variant:`body2`,fontWeight:600,children:e.name})}),(0,F.jsx)(M,{children:(0,F.jsx)(l,{variant:`caption`,color:`text.secondary`,children:e.description??`--`})}),(0,F.jsx)(M,{children:e.steps.length}),(0,F.jsx)(M,{children:e.triggers.length}),(0,F.jsx)(M,{children:(0,F.jsx)(l,{variant:`caption`,color:`text.secondary`,children:N(e.createdAt)})}),(0,F.jsx)(M,{align:`right`,children:(0,F.jsxs)(m,{direction:`row`,spacing:.5,justifyContent:`flex-end`,children:[(0,F.jsx)(d,{size:`small`,color:`error`,onClick:()=>W(e.id),title:`Delete`,children:(0,F.jsx)(o,{})}),(0,F.jsx)(d,{size:`small`,onClick:()=>U(e.id),title:`Run`,children:(0,F.jsx)(i,{})})]})})]},e.id))})]})})]}),(0,F.jsxs)(w,{variant:`outlined`,children:[(0,F.jsx)(O,{title:`Run History`,titleTypographyProps:{variant:`subtitle1`,fontWeight:600}}),(0,F.jsx)(x,{children:(0,F.jsxs)(j,{size:`small`,children:[(0,F.jsx)(D,{children:(0,F.jsxs)(S,{children:[(0,F.jsx)(M,{children:`Pipeline`}),(0,F.jsx)(M,{children:`Status`}),(0,F.jsx)(M,{children:`Started`}),(0,F.jsx)(M,{children:`Completed`}),(0,F.jsx)(M,{children:`Triggered By`})]})}),(0,F.jsx)(A,{children:v?[...[,,,]].map((e,t)=>(0,F.jsx)(S,{children:[...[,,,,,]].map((e,t)=>(0,F.jsx)(M,{children:(0,F.jsx)(h,{width:80,height:20})},t))},t)):c.length===0?(0,F.jsx)(S,{children:(0,F.jsx)(M,{colSpan:5,sx:{textAlign:`center`,py:6},children:(0,F.jsx)(l,{variant:`body2`,color:`text.secondary`,children:`No pipeline runs yet`})})}):c.map(t=>(0,F.jsx)(S,{children:(0,F.jsxs)(M,{colSpan:5,sx:{p:0},children:[(0,F.jsx)(u,{sx:{cursor:`pointer`,px:2,py:1},onClick:()=>V(B===t.id?null:t.id),children:(0,F.jsxs)(m,{direction:`row`,spacing:2,alignItems:`center`,children:[(0,F.jsx)(l,{variant:`body2`,fontWeight:600,sx:{minWidth:120},children:e.find(e=>e.id===t.pipelineId)?.name??t.pipelineId.slice(0,8)}),(0,F.jsx)(_,{label:t.status,size:`small`,color:I[t.status]??`default`,variant:`filled`,sx:{fontWeight:600}}),(0,F.jsx)(l,{variant:`caption`,color:`text.secondary`,children:N(t.startedAt)}),(0,F.jsx)(l,{variant:`caption`,color:`text.secondary`,children:t.completedAt?N(t.completedAt):`--`}),(0,F.jsx)(l,{variant:`caption`,color:`text.secondary`,children:t.triggeredBy})]})}),(0,F.jsx)(E,{in:B===t.id,children:(0,F.jsx)(z,{run:t})})]})},t.id))})]})})]}),(0,F.jsx)(R,{open:T,onClose:()=>L(!1),onCreated:H})]})}export{B as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.4`})),f=s(((e,t)=>{t.exports=d()})),p=s(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),m=s(((e,t)=>{var n=p();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),h=s(((e,t)=>{t.exports=m()()}));export{c as a,o as i,f as n,u as o,s as r,h as t};
|