@synnaxlabs/pluto 0.32.1 → 0.33.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/{Animated-vgeFXXXh.cjs → Animated-BGm8tACN.cjs} +1 -1
- package/dist/{Animated-m1d-q2MY.js → Animated-Cg0ftviS.js} +2 -2
- package/dist/{Item-AKMko1DZ.js → Item-B8JWj3fN.js} +5 -5
- package/dist/{Item-CzgByHQ2.cjs → Item-C89uBEra.cjs} +1 -1
- package/dist/{Keyboard-Dy7Q9I4w.cjs → Keyboard-B1757gtH.cjs} +1 -1
- package/dist/{Keyboard-DWCElMA3.js → Keyboard-BAU1UuVp.js} +2 -2
- package/dist/{LinePlot-CCzgiKg5.js → LinePlot-CgkhTRJT.js} +3531 -3360
- package/dist/LinePlot-oIHuM9Jz.cjs +66 -0
- package/dist/Link-BGZki0c9.cjs +1 -0
- package/dist/Link-Du1lxpym.js +14 -0
- package/dist/{List-CVxaH1Gv.js → List-KmtaD0qw.js} +2 -2
- package/dist/{List-C8Cd_qEK.cjs → List-e1hOSGSX.cjs} +1 -1
- package/dist/{Pack-BrxYNh7B.js → Pack-CxtceW7N.js} +1 -1
- package/dist/{Pack-C_SrDA3a.cjs → Pack-uflj5a28.cjs} +1 -1
- package/dist/{Text-ZWBNDAJX.js → Text-D1VocrR6.js} +5 -5
- package/dist/{Text-DwK7WZwz.cjs → Text-DWBEhfiF.cjs} +1 -1
- package/dist/{Toggle-BQtgHKds.js → Toggle-B96EPQ2x.js} +14472 -14355
- package/dist/Toggle-C5E2dVg4.cjs +143 -0
- package/dist/{Video-DR3tjTFZ.cjs → Video-DKosAU7v.cjs} +1 -1
- package/dist/{Video-DdIv_1Yq.js → Video-o34bcpwh.js} +1 -1
- package/dist/{aggregator-f5OfPmNc.js → aggregator-B36SA-20.js} +5061 -4512
- package/dist/aggregator-CU9VgdUJ.cjs +67 -0
- package/dist/align.cjs +1 -1
- package/dist/align.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/color.cjs +1 -1
- package/dist/color.js +1 -1
- package/dist/css-4MXuPP5v.cjs +1 -0
- package/dist/css-C8qHWSpT.js +1085 -0
- package/dist/css.cjs +1 -1
- package/dist/css.js +2 -2
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/ether.cjs +1 -1
- package/dist/ether.js +53 -51
- package/dist/{external-CCY3TmGe.cjs → external-BHkFTefx.cjs} +1 -1
- package/dist/{external-BVWCSwPk.cjs → external-BRdQZoOL.cjs} +1 -1
- package/dist/external-BSHY-kgQ.cjs +1 -0
- package/dist/{external-BswSNc0P.js → external-BSqwgq7l.js} +2 -2
- package/dist/external-BdZ8kC55.cjs +1 -0
- package/dist/{external-BiVAfJDo.js → external-BpIfVU6K.js} +4 -4
- package/dist/{external-Bcj4ayXg.cjs → external-C-PNFpoV.cjs} +1 -1
- package/dist/{external-B22Cd5L_.js → external-C2PoeTKJ.js} +2 -2
- package/dist/{external-Cl_evqYY.cjs → external-CPTY4-IY.cjs} +1 -1
- package/dist/{external-n_t7VfzS.js → external-Cc1Bqjmm.js} +1 -1
- package/dist/{external-BGO9o6o7.js → external-Ckdd7teZ.js} +17 -17
- package/dist/{external-BIcOl3QR.js → external-CvTy-Tj3.js} +4 -4
- package/dist/external-CxatFj2t.js +1191 -0
- package/dist/{external-0qSQW-rW.js → external-CzrKYxlg.js} +2 -2
- package/dist/{external-Cqh9AY74.cjs → external-DDwIRENP.cjs} +1 -1
- package/dist/{external-Co3i1qex.js → external-DWm3_4ZA.js} +12 -12
- package/dist/{external-CyqJB_UP.js → external-DZhjjzue.js} +64 -64
- package/dist/{external-BxSZ_pLZ.js → external-Dk66psus.js} +20 -20
- package/dist/{external-CR7eRU7I.cjs → external-GtPAaR7c.cjs} +1 -1
- package/dist/external-Icf6LMl2.cjs +1 -0
- package/dist/{external-BAqZitjw.cjs → external-LyF1vgNR.cjs} +1 -1
- package/dist/{external-2HiPz4gN.cjs → external-T318T5Xe.cjs} +1 -1
- package/dist/{external-CWLnWzN8.js → external-uvD747pL.js} +38 -38
- package/dist/{external-DNl6ut74.cjs → external-w5-jxIYn.cjs} +1 -1
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2309 -2214
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/src/aether/main.d.ts +1 -0
- package/dist/src/aether/main.d.ts.map +1 -1
- package/dist/src/button/Button.d.ts +8 -2
- package/dist/src/button/Button.d.ts.map +1 -1
- package/dist/src/button/Link.d.ts.map +1 -1
- package/dist/src/button/Toggle.d.ts +1 -1
- package/dist/src/dropdown/Dropdown.d.ts.map +1 -1
- package/dist/src/form/Form.d.ts +2 -2
- package/dist/src/form/Form.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/input/Numeric.d.ts.map +1 -1
- package/dist/src/input/types.d.ts +1 -1
- package/dist/src/input/types.d.ts.map +1 -1
- package/dist/src/memo/proxyMemo.d.ts +1 -1
- package/dist/src/memo/proxyMemo.d.ts.map +1 -1
- package/dist/src/modal/Modal.d.ts.map +1 -1
- package/dist/src/override/factory.d.ts +3 -0
- package/dist/src/override/factory.d.ts.map +1 -0
- package/dist/src/override/index.d.ts +2 -0
- package/dist/src/override/index.d.ts.map +1 -0
- package/dist/src/pluto/aether/pluto.d.ts.map +1 -1
- package/dist/src/select/Button.d.ts +1 -1
- package/dist/src/select/Button.d.ts.map +1 -1
- package/dist/src/select/Multiple.d.ts.map +1 -1
- package/dist/src/select/Single.d.ts.map +1 -1
- package/dist/src/status/Aggregator.d.ts +2 -6
- package/dist/src/status/Aggregator.d.ts.map +1 -1
- package/dist/src/status/Circle.d.ts.map +1 -1
- package/dist/src/status/aether/aggregator.d.ts.map +1 -1
- package/dist/src/status/aether/types.d.ts.map +1 -1
- package/dist/src/tabs/Tabs.d.ts +8 -8
- package/dist/src/tabs/Tabs.d.ts.map +1 -1
- package/dist/src/telem/aether/convertSeries.d.ts +2 -2
- package/dist/src/telem/aether/convertSeries.d.ts.map +1 -1
- package/dist/src/telem/aether/noop.d.ts +2 -1
- package/dist/src/telem/aether/noop.d.ts.map +1 -1
- package/dist/src/telem/aether/remote.d.ts.map +1 -1
- package/dist/src/telem/aether/static.d.ts +2 -2
- package/dist/src/telem/client/cache/cache.d.ts +1 -1
- package/dist/src/telem/client/cache/cache.d.ts.map +1 -1
- package/dist/src/telem/client/cache/dynamic.d.ts +3 -3
- package/dist/src/telem/client/cache/dynamic.d.ts.map +1 -1
- package/dist/src/telem/client/cache/static.d.ts +1 -1
- package/dist/src/telem/client/cache/static.d.ts.map +1 -1
- package/dist/src/telem/control/aether/chip.d.ts.map +1 -1
- package/dist/src/telem/control/aether/indicator.d.ts.map +1 -1
- package/dist/src/theming/Provider.d.ts.map +1 -1
- package/dist/src/theming/aether/provider.d.ts +5846 -3
- package/dist/src/theming/aether/provider.d.ts.map +1 -1
- package/dist/src/theming/core/fontString.d.ts +1 -1
- package/dist/src/theming/core/fontString.d.ts.map +1 -1
- package/dist/src/theming/core/theme.d.ts +9 -0
- package/dist/src/theming/core/theme.d.ts.map +1 -1
- package/dist/src/theming/css.d.ts.map +1 -1
- package/dist/src/triggers/hooks.d.ts +2 -1
- package/dist/src/triggers/hooks.d.ts.map +1 -1
- package/dist/src/vis/canvas/aether/canvas.d.ts.map +1 -1
- package/dist/src/vis/diagram/aether/Diagram.d.ts +0 -1
- package/dist/src/vis/diagram/aether/Diagram.d.ts.map +1 -1
- package/dist/src/vis/draw2d/index.d.ts +2 -1
- package/dist/src/vis/draw2d/index.d.ts.map +1 -1
- package/dist/src/vis/eraser/aether/eraser.d.ts.map +1 -1
- package/dist/src/vis/line/aether/line.d.ts +3 -1
- package/dist/src/vis/line/aether/line.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/LinePlot.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/axis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/aether/annotation.d.ts.map +1 -1
- package/dist/src/vis/log/Log.d.ts +12 -0
- package/dist/src/vis/log/Log.d.ts.map +1 -0
- package/dist/src/vis/log/aether/Log.d.ts +556 -0
- package/dist/src/vis/log/aether/Log.d.ts.map +1 -0
- package/dist/src/vis/log/aether/index.d.ts +2 -0
- package/dist/src/vis/log/aether/index.d.ts.map +1 -0
- package/dist/src/vis/log/index.d.ts +2 -0
- package/dist/src/vis/log/index.d.ts.map +1 -0
- package/dist/src/vis/render/context.d.ts +3 -1
- package/dist/src/vis/render/context.d.ts.map +1 -1
- package/dist/src/vis/schematic/Forms.d.ts.map +1 -1
- package/dist/src/vis/schematic/primitives/Primitives.d.ts +2 -2
- package/dist/src/vis/schematic/primitives/Primitives.d.ts.map +1 -1
- package/dist/src/vis/schematic/registry.d.ts.map +1 -1
- package/dist/src/vis/value/aether/value.d.ts +1 -0
- package/dist/src/vis/value/aether/value.d.ts.map +1 -1
- package/dist/src/vis/value/use.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text.cjs +1 -1
- package/dist/text.js +2 -2
- package/dist/theming.cjs +1 -1
- package/dist/theming.js +2 -2
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/triggers.cjs +1 -1
- package/dist/triggers.js +1 -1
- package/dist/{units-CnA_yWxx.js → units-CmWU_YzJ.js} +1 -1
- package/dist/{units-CMXTKjnN.cjs → units-DbfWaeE2.cjs} +1 -1
- package/dist/video.cjs +1 -1
- package/dist/video.js +1 -1
- package/package.json +22 -24
- package/dist/LinePlot-BcVyfdeK.cjs +0 -66
- package/dist/Link-BLs4o2WZ.js +0 -11
- package/dist/Link-DAjbmQEI.cjs +0 -1
- package/dist/Toggle-Cu_t9VPe.cjs +0 -143
- package/dist/aggregator-q0CY7-QS.cjs +0 -67
- package/dist/css-B8RwzK24.js +0 -1042
- package/dist/css-LxkguM_s.cjs +0 -1
- package/dist/external-1AgJfGUo.cjs +0 -1
- package/dist/external-BSbQ1fB2.js +0 -1169
- package/dist/external-COZBfuIe.cjs +0 -1
- package/dist/external-CV8q9dy8.cjs +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var dl=Object.defineProperty;var pl=(e,t,n)=>t in e?dl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var he=(e,t,n)=>pl(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./jsx-runtime-Cek9Ww4S.cjs"),d=require("react"),u=require("./Toggle-Cu_t9VPe.cjs"),l=require("./css-LxkguM_s.cjs"),Ke=require("./external-CV8q9dy8.cjs"),C=require("./aggregator-q0CY7-QS.cjs"),D=require("./Pack-C_SrDA3a.cjs"),ml=require("./external-Cl_evqYY.cjs"),ne=require("./external-CCY3TmGe.cjs"),jl=require("./external-BAqZitjw.cjs"),fl=require("./Animated-vgeFXXXh.cjs"),j=require("./LinePlot-BcVyfdeK.cjs"),pe=require("zod"),$t=require("./external-DNl6ut74.cjs"),de=require("./external-1AgJfGUo.cjs"),gl=require("./Text-DwK7WZwz.cjs"),Cs=require("./external-BVWCSwPk.cjs");require("./Item-CzgByHQ2.cjs");const _t=require("react-dom"),Ne=require("./external-COZBfuIe.cjs"),bs=require("./units-CMXTKjnN.cjs"),me=require("./external-Bcj4ayXg.cjs"),hl=require("./external-Cqh9AY74.cjs"),Sl=require("./external-2HiPz4gN.cjs"),El=require("./external-CR7eRU7I.cjs"),Rl=require("./Video-DR3tjTFZ.cjs"),vs=({variant:e,...t})=>s.jsxRuntimeExports.jsx(u.Ut.Circle,{color:u.variantColors[e],...t}),yl=({status:{key:e,time:t,count:n,message:r,description:o,variant:i},silence:c,actions:a,className:x,children:m,...p})=>s.jsxRuntimeExports.jsxs(D.Space,{className:l.CSS(l.CSS.B("notification"),x),direction:"y",empty:!0,...p,children:[s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",justify:"spaceBetween",grow:!0,style:{width:"100%"},children:[s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",align:"center",size:"small",children:[s.jsxRuntimeExports.jsx(vs,{style:{height:"2.25rem",width:"2.5rem"},variant:i}),s.jsxRuntimeExports.jsx(u.Text,{level:"small",shade:7,children:`x${n}`}),s.jsxRuntimeExports.jsx(u.DateTime,{className:l.CSS(l.CSS.BE("notification","time")),level:"small",format:"time",children:t})]}),s.jsxRuntimeExports.jsx(u.Icon,{className:l.CSS(l.CSS.BE("notification","silence")),variant:"outlined",size:"small",onClick:()=>c(e),children:s.jsxRuntimeExports.jsx(u.Ut.Close,{})})]}),s.jsxRuntimeExports.jsxs(D.Space,{direction:"y",align:"start",className:l.CSS(l.CSS.BE("notification","content")),size:"small",children:[m??s.jsxRuntimeExports.jsx(u.Text,{className:l.CSS(l.CSS.BE("notification","message")),level:"p",style:{flexGrow:1},children:r}),o!=null&&s.jsxRuntimeExports.jsx(u.Text,{className:l.CSS(l.CSS.BE("notification","description")),level:"small",style:{flexGrow:1},children:o})]}),a!=null&&s.jsxRuntimeExports.jsx(D.Space,{direction:"x",align:"center",justify:"end",className:l.CSS(l.CSS.BE("notification","actions")),children:C.A(a).map(f=>s.jsxRuntimeExports.jsx(Cl,{action:f},f.key))})]},t.toString()),Cl=({action:e})=>{if(!d.isValidElement(e)){const t=e;return s.jsxRuntimeExports.jsx(u.Button,{...t})}return e},bl=Object.freeze(Object.defineProperty({__proto__:null,Aggregator:u.Aggregator,Circle:vs,Notification:yl,Text:u.Text$2,VARIANTS:C.VARIANTS,specZ:C.specZ$1,useAggregator:u.useAggregator,useContext:u.useContext$2,useNotifications:u.useNotifications,variantZ:C.variantZ},Symbol.toStringTag,{value:"Module"})),vl=Object.freeze(Object.defineProperty({__proto__:null,Config:u.Config,Context:u.Context,Dialog:u.Dialog$1,chooseLocation:u.chooseLocation,formatTip:u.formatTip,useConfig:u.useConfig,wrap:u.wrap},Symbol.toStringTag,{value:"Module"})),et=e=>e.preventDefault(),xt=d.forwardRef(({location:e,style:t,size:n,className:r,children:o,onDragStart:i,sizeUnits:c="px",showHandle:a=!0,...x},m)=>{const p=l.J.construct(e),f=l.J.direction(p),h=l.g.dimension(f);return s.jsxRuntimeExports.jsxs("div",{className:l.CSS(l.CSS.B("resize"),l.CSS.loc(p),l.CSS.dir(f),r),style:{[h]:`${n}${c}`,...t},ref:m,...x,children:[o,a&&s.jsxRuntimeExports.jsx("div",{draggable:!0,className:l.CSS(l.CSS.BE("resize","handle"),l.CSS.bordered(l.J.swap(p))),onDragStart:i,onDrag:et,onDragEnd:et})]})});xt.displayName="Resize.Core";const Bt=({onResize:e,count:t,initialSizes:n=[],minSize:r=100,direction:o="x"})=>{const i=d.useRef(null),[c,a]=d.useState({sizeDistribution:wl(n,t),root:null}),x=d.useCallback((f,h,g)=>{if(i.current==null)return;const E=l.To.dim(l.To.construct(i.current),o);a(R=>Rt(R,E,f,r,h,g))},[r,a,o]);d.useEffect(()=>e==null?void 0:e(c.sizeDistribution),[c.sizeDistribution,e]);const m=d.useCallback((f,h)=>{f.preventDefault();const g=o==="x"?"clientX":"clientY",E=k=>x(h,k[g]),R=()=>{a(k=>({...k,root:null})),document.removeEventListener("mousemove",E)};a(k=>({...k,root:f[g]})),document.addEventListener("mousemove",E),document.addEventListener("mouseup",R,{once:!0})},[a,o,Rt]);return{setSize:d.useCallback((f,h)=>x(f,void 0,h),[Rt]),props:{direction:o,sizeDistribution:c.sizeDistribution,onDragHandle:m,ref:i}}},dt=d.forwardRef(({direction:e="x",children:t,sizeDistribution:n,onDragHandle:r,className:o,...i},c)=>{const a=l.g.construct(e),x=d.Children.toArray(t);return n=Pl(n),s.jsxRuntimeExports.jsx(D.Space,{...i,ref:c,direction:a,className:l.CSS(l.CSS.B("resize-multiple"),o),empty:!0,grow:!0,children:x.map((m,p)=>s.jsxRuntimeExports.jsx(xt,{onDragStart:f=>r(f,p),location:l.g.location(a),size:n[p]*100,sizeUnits:"%",showHandle:p!==x.length-1,children:m},p))})});dt.displayName="Resize.Multiple";const wl=(e,t)=>{const n=e.reduce((o,i)=>o+i,0),r=t-e.length;if(r<=0)return e.slice(0,t).map(o=>o/n);if(e.every(o=>o<=1)){const o=1-n;return[...e,...Array(r).fill(o/r)]}return e.map(()=>1/t)},Et=.001,Pl=e=>e.every(t=>l.C.closeTo(t,1/e.length),Et)?e.map((t,n)=>n%2===0?t+Et:n===e.length-1?t:t-Et):e,Rt=(e,t,n,r,o,i)=>{const c=ws(e,t,n,o,i),[a,x]=kl(e.sizeDistribution,n,c,r/t),m=x?o??null:e.root;return{...e,sizeDistribution:a,root:m}},ws=(e,t,n,r,o)=>{let i;if(o!=null)o>1&&(o=o/t),i=o-e.sizeDistribution[n];else if(r!=null){if(e.root===null)throw new Error("resize root is null during handle drag");i=(r-e.root)/t}else throw new Error("must provide either a MouseEvent or a targetSize");return i},kl=(e,t,n,r)=>{let o=t;for(;o>0&&e[o]+n<=r;)o--;const i=e[o]+n,c=Tl(o,e,r,n),a=e[c]-n;return i<r||a<r?[e,!1]:[e.map((x,m)=>m===o?i:m===c?a:x),!0]},Tl=(e,t,n,r)=>(e===t.length-1?Ml:Ll)(e,t,n,r),Ll=(e,t,n,r)=>{let o=e+1;for(;o<t.length-1&&t[o]-r<=n;)o++;return o},Ml=(e,t,n,r)=>{let o=e-1;for(;o>0&&t[o]-r<=n;)o--;return o},pt=({onMove:e,onStart:t,onEnd:n})=>d.useCallback(r=>{r.preventDefault();const o=l.q.construct(r),i=u.mouseKey(r.button);t==null||t(o,i,r);const c=x=>{if(x.buttons===0)return a(x);const m=l.q.construct(x);e==null||e(l.To.construct(o,m),i,x)};window.addEventListener("mousemove",c);const a=x=>{window.removeEventListener("mousemove",c);const m=l.q.construct(x);n==null||n(l.To.construct(o,m),i,x)};window.addEventListener("mouseup",a,{once:!0})},[e,t,n]),yt=2,Ps=({onCollapse:e,onResize:t,location:n="left",minSize:r=100,maxSize:o=1/0,initialSize:i=200,collapseThreshold:c=1/0,className:a,...x})=>{const[m,p]=d.useState(l.j(i,r,o)),f=d.useRef(null),h=l.J.construct(n),g=d.useCallback(N=>{if(f.current===null)return 0;const P=l.To.dim(N,l.J.direction(h),!0)*(1-2*Number(["bottom","right"].includes(h))),S=f.current+P,v=l.j(S,r,o);return(v-S)/r>c?yt:v},[h,r,o,c]),E=d.useRef(null),R=d.useCallback(N=>{const P=g(N);p(P),E.current!=null&&(t==null||t(P,l.To.construct(E.current)))},[t,g]),k=d.useCallback(()=>p(N=>(f.current=N,N)),[p]),L=d.useCallback(N=>g(N)===yt&&(e==null?void 0:e()),[e,g]);d.useEffect(()=>p(N=>{const P=l.j(N,r,o);return f.current=P,P}),[r,o]);const M=pt({onMove:R,onStart:k,onEnd:L});return s.jsxRuntimeExports.jsx(xt,{ref:E,location:h,size:m,onDragStart:M,className:l.clsx(a,l.CSS.expanded(m!==yt)),...x})},Nl=Object.freeze(Object.defineProperty({__proto__:null,Core:xt,Multiple:dt,Single:Ps,calculateDiffPercentage:ws,useMultiple:Bt},Symbol.toStringTag,{value:"Module"})),Xe="y",us=28,$l=32,_l=40,Bl=.5,Al=({data:e,...t})=>{const{setSize:n,props:{sizeDistribution:r,ref:o,...i}}=Bt({direction:Xe,count:e.length,minSize:us}),c=a=>{if(o.current==null)return;const x=l.To.dim(l.To.construct(o.current),Xe);r[a]<_l/x?n(a,e[a].initialSize??Bl):n(a,us+1)};return s.jsxRuntimeExports.jsx(dt,{empty:!0,className:l.CSS.B("accordion"),sizeDistribution:r,ref:o,...t,...i,children:e.map((a,x)=>d.createElement(Dl,{...a,key:a.key,index:x,direction:Xe,onExpand:c,parent:o,size:r[x]}))})},zl=s.jsxRuntimeExports.jsx(u.Ut.Caret.Down,{"aria-label":"contract"}),Ol=s.jsxRuntimeExports.jsx(u.Ut.Caret.Right,{"aria-label":"expand"}),Dl=({index:e,name:t,content:n,actions:r,size:o,parent:i,onExpand:c})=>{let a=!0;if(i.current!=null){const m=l.To.dim(l.To.construct(i.current),Xe);a=o*m>$l}const x=a?zl:Ol;return s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsxs(Ke.Header,{level:"p",className:l.CSS.expanded(a),empty:!0,children:[s.jsxRuntimeExports.jsx(Ke.ButtonTitle,{startIcon:x,onClick:()=>c(e),children:t}),r!=null&&s.jsxRuntimeExports.jsx(Ke.Actions,{children:r})]}),n]})},Vl=Object.freeze(Object.defineProperty({__proto__:null,Accordion:Al},Symbol.toStringTag,{value:"Module"})),ks=(e,t,n)=>C.A(e).map(i=>i.split(t)).flat().map((i,c)=>[s.jsxRuntimeExports.jsx(u.Ut.Caret.Right,{style:{transform:"scale(0.8) translateY(1px)",color:l.CSS.shade(n)}},`${i}-${c}`),i]).flat(),Il=({children:e,icon:t,shade:n=7,weight:r=450,size:o=.5,url:i,level:c="p",separator:a=".",className:x,hideFirst:m=!1,...p})=>{i!=null&&(e=i);const f=ks(e,a,n);return m&&f.shift(),s.jsxRuntimeExports.jsxs(u.WithIcon,{className:l.CSS(x,l.CSS.B("breadcrumb")),level:c,shade:n,weight:r,size:o,...p,children:[ne.resolve(t),...f]})},Zl=({url:e,className:t,level:n="p",separator:r=".",shade:o=7})=>{const i=ks(e,r,o);return s.jsxRuntimeExports.jsx(D.Space,{className:l.CSS(t,l.CSS.B("breadcrumb")),direction:"x",size:"small",align:"center",children:i.map((c,a)=>{if(u.isValidElement(c))return c;if(c==null)return null;const m=e.split(r).indexOf(c);let p=e.split(r).slice(0,m+1).join("/");return p="/"+p,s.jsxRuntimeExports.jsx(u.Link,{level:n,href:p,children:c.split("-").map(f=>l._.capitalize(f)).join(" ")},a)})})},Fl=Object.freeze(Object.defineProperty({__proto__:null,Breadcrumb:Il,URL:Zl},Symbol.toStringTag,{value:"Module"})),At=d.createContext(j.ZERO_CONTEXT_VALUE),fe=()=>d.useContext(At).synnax,ql=()=>d.useContext(At).state,xs={connected:"success",connecting:"info",disconnected:"info",failed:"error"},Ts="serverVersionMismatch",Ul=(e,t,n)=>`Cluster version ${n!=null?n+" ":""}is ${e?"older":"newer"} than client version ${t}. Compatibility issues may arise.`,Ls=u.wrap$1(j.Provider.TYPE,({aetherKey:e,connParams:t,children:n})=>{const[r,o,i]=u.useCombinedStateAndRef(j.ZERO_CONTEXT_VALUE),[{path:c},,a]=u.use$3({aetherKey:e,type:j.Provider.TYPE,schema:j.Provider.stateZ,initialState:{props:t??null,state:null}}),x=u.useAggregator(),m=d.useCallback(p=>{i.current.state.status!==p.status&&x({variant:xs[p.status],message:p.message??l._.capitalize(p.status)}),o(f=>({...f,state:p}))},[x]);return u.useAsyncEffect(async()=>{if(r.synnax!=null&&r.synnax.close(),t==null)return o(j.ZERO_CONTEXT_VALUE);const p=new C.Vd({...t,connectivityPollFrequency:C.S.seconds(5)});o({synnax:p,state:{clusterKey:"",status:"connecting",message:"Connecting...",clientServerCompatible:!1,clientVersion:p.clientVersion}});const f=await p.connectivity.check();if(o({synnax:p,state:f}),x({variant:xs[f.status],message:f.message??f.status.toUpperCase()}),f.status==="connected"&&!f.clientServerCompatible){const h=f.nodeVersion==null||C.H.semVerOlder(f.nodeVersion,f.clientVersion),g=Ul(h,f.clientVersion,f.nodeVersion);x({variant:"warning",message:"Incompatible cluster version",description:g,data:{type:Ts,oldServer:h,nodeVersion:f.nodeVersion,clientVersion:f.clientVersion}})}return p.connectivity.onChange(m),a({props:t,state:f}),()=>{p.close(),o(j.ZERO_CONTEXT_VALUE),a({props:null,state:null})}},[t,m]),s.jsxRuntimeExports.jsx(At.Provider,{value:r,children:s.jsxRuntimeExports.jsx(u.Composite,{path:c,children:n})})}),Hl=Object.freeze(Object.defineProperty({__proto__:null,Provider:Ls,SERVER_VERSION_MISMATCH:Ts,use:fe,useConnectionState:ql},Symbol.toStringTag,{value:"Module"})),$e=d.createContext({aliases:{},getName:async()=>await Promise.resolve(void 0),setAlias:null}),Ms=()=>d.useContext($e),Ns=e=>{const{aliases:t}=d.useContext($e);return t[e]??null},mt=()=>{const{aliases:e}=d.useContext($e);return e},jt=(e,t="")=>{const{getName:n}=d.useContext($e),[r,o]=d.useState(t);return u.useAsyncEffect(async()=>{const i=await n(e);i!=null&&o(i)},[e,n]),r??t},zt=()=>{const{activeRange:e}=d.useContext($e);return e??void 0},$s=({activeRange:e,children:t})=>{const n=fe(),[r,o]=d.useState({}),i=d.useCallback(x=>{o(m=>{const p={...m};return x.forEach(({variant:f,key:h,value:g})=>{const E=Number(h.split("---")[1]);f==="delete"?delete p[E]:p[g.channel]=g.alias}),p})},[o]),c=d.useCallback(async(x,m)=>{if(n==null||e==null)return;await(await n.ranges.retrieve(e)).setAlias(x,m)},[n,e]),a=d.useCallback(async x=>{if(n==null||x===0)return;const m=r[x];return m??(await n.channels.retrieve(x)).name},[r,n]);return u.useAsyncEffect(async()=>{if(n==null||e==null){o({});return}const x=await n.ranges.retrieve(e),m=await x.listAliases();o(m);const p=await x.openAliasTracker(),f=p.onChange(i);return()=>{f(),p.close()}},[n,e]),s.jsxRuntimeExports.jsx($e.Provider,{value:{aliases:r,activeRange:e,setAlias:e!=null?c:null,getName:a},children:t})},Yl=({channelKey:e,value:t,shadow:n,className:r,...o})=>{const[i,c]=d.useState(!1),{setAlias:a}=Ms(),x=Ns(e),m=jt(e);let p=s.jsxRuntimeExports.jsx(u.Ut.Rename,{});i?p=s.jsxRuntimeExports.jsx(u.Ut.Loading,{}):x===t&&(p=s.jsxRuntimeExports.jsx(u.Ut.Check,{}));const f=a!=null&&!i&&x!==t&&e!==0,h=()=>{f&&(async()=>(c(!0),await a(e,t),c(!1)))()},g=()=>{var R;x!=null&&((R=o.onChange)==null||R.call(o,x))},E=()=>e===0?s.jsxRuntimeExports.jsx(u.Text,{level:"small",children:"Select a channel to enable alias syncing with this label"}):a==null?s.jsxRuntimeExports.jsx(u.Text,{level:"small",children:"Select a range to enable alias syncing with this label"}):t.length===0?s.jsxRuntimeExports.jsx(u.Text,{level:"small",children:"Enter a value to enable alias syncing with this label"}):x===t?s.jsxRuntimeExports.jsx(u.Text,{level:"small",children:"Alias synced with this label"}):s.jsxRuntimeExports.jsxs(u.Text,{level:"small",children:["Sync alias for ",m," with this label"]});return s.jsxRuntimeExports.jsxs(u.Text$1,{value:t,...o,children:[f&&s.jsxRuntimeExports.jsx(u.Icon,{onClick:g,tooltip:s.jsxRuntimeExports.jsxs(u.Text,{level:"small",children:["Set ",m," as label"]}),tooltipLocation:{y:"top"},variant:"outlined",children:s.jsxRuntimeExports.jsx(u.Ut.Sync,{})}),s.jsxRuntimeExports.jsx(u.Icon,{onClick:h,disabled:!f,tooltip:s.jsxRuntimeExports.jsx(E,{}),tooltipLocation:{y:"top"},variant:"outlined",children:p})]})},Se="channel",Gl=Object.freeze(Object.defineProperty({__proto__:null,Canvas:j.Canvas,axisStateZ:j.axisStateZ,newTickFactory:j.newTickFactory,tickFactoryProps:j.tickFactoryProps,tickType:j.tickType},Symbol.toStringTag,{value:"Module"})),Wl=Object.freeze(Object.defineProperty({__proto__:null,AcquireChannelControl:j.AcquireChannelControl,AuthoritySource:j.AuthoritySource,Chip:j.Chip,Controller:j.Controller$1,Indicator:j.Indicator,Legend:j.Legend,REGISTRY:j.REGISTRY$3,STATUSES:j.STATUSES,SetChannelValue:j.SetChannelValue,StateProvider:j.StateProvider,acquireChannelControl:j.acquireChannelControl,acquireChannelControlPropsZ:j.acquireChannelControlPropsZ,authoritySource:j.authoritySource,authoritySourceProps:j.authoritySourceProps,chipStateZ:j.chipStateZ,controllerStateZ:j.controllerStateZ,indicatorStateZ:j.indicatorStateZ,legendStateZ:j.legendStateZ,setChannelValue:j.setChannelValue,setChannelValuePropsZ:j.setChannelValuePropsZ,stateProviderStateZ:j.stateProviderStateZ,statusZ:j.statusZ,sugaredStateZ:j.sugaredStateZ},Symbol.toStringTag,{value:"Module"}));var je;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(je||(je={}));function Kl({color:e,dimensions:t,lineWidth:n}){return d.createElement("path",{stroke:e,strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function Xl({color:e,radius:t}){return d.createElement("circle",{cx:t,cy:t,r:t,fill:e})}const Jl={[je.Dots]:"#91919a",[je.Lines]:"#eee",[je.Cross]:"#e2e2e2"},Ql={[je.Dots]:1,[je.Lines]:1,[je.Cross]:6},ei=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function _s({id:e,variant:t=je.Dots,gap:n=20,size:r,lineWidth:o=1,offset:i=2,color:c,style:a,className:x}){const m=d.useRef(null),{transform:p,patternId:f}=j.useStore(ei,j.shallow$1),h=c||Jl[t],g=r||Ql[t],E=t===je.Dots,R=t===je.Cross,k=Array.isArray(n)?n:[n,n],L=[k[0]*p[2]||1,k[1]*p[2]||1],M=g*p[2],N=R?[M,M]:L,P=E?[M/i,M/i]:[N[0]/i,N[1]/i];return d.createElement("svg",{className:j.cc(["react-flow__background",x]),style:{...a,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:m,"data-testid":"rf__background"},d.createElement("pattern",{id:f+e,x:p[0]%L[0],y:p[1]%L[1],width:L[0],height:L[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${P[0]},-${P[1]})`},E?d.createElement(Xl,{color:h,radius:M/i}):d.createElement(Kl,{dimensions:N,color:h,lineWidth:o})),d.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${f+e})`}))}_s.displayName="Background";var ti=d.memo(_s);const si={region:l.To.ZERO,dpr:1,os:C.w.getOS()},ni={gl:null,lower2d:null,upper2d:null,bootstrapped:!1},ri=u.wrap$1(j.Canvas$1.TYPE,({children:e,resizeDebounce:t=100,aetherKey:n,className:r,...o})=>{const[{path:i},{bootstrapped:c,dpr:a},x]=u.use$3({aetherKey:n,type:j.Canvas$1.TYPE,schema:j.canvasStateZ,initialState:si}),m=d.useRef({...ni}),p=d.useCallback(g=>{m.current.bootstrapped&&x(()=>({bootstrapped:!0,region:g,dpr:window.devicePixelRatio,os:C.w.getOS({default:"Windows"})}))},[x]),f=u.useResize(p,{debounce:t});d.useEffect(()=>{const g=()=>{window.devicePixelRatio!==a&&x(E=>({...E,dpr:window.devicePixelRatio}))};window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`).addEventListener("change",g,{once:!0})},[a]),d.useEffect(()=>{window.addEventListener("focus",()=>x(g=>({...g}))),window.addEventListener("blur",()=>x(g=>({...g})))},[x]);const h=d.useCallback(g=>{if(f(g),g==null)return;g.className.includes("gl")?m.current.gl=g:g.className.includes("upper2d")?m.current.upper2d=g:m.current.lower2d=g;const{gl:E,lower2d:R,upper2d:k,bootstrapped:L}=m.current;if(E==null||R==null||k==null||L)return;m.current.bootstrapped=!0;const M=E.transferControlToOffscreen(),N=k.transferControlToOffscreen(),P=R.transferControlToOffscreen();x({glCanvas:M,upper2dCanvas:N,lower2dCanvas:P,bootstrap:!0,bootstrapped:!1,region:l.To.construct(E),dpr:window.devicePixelRatio,os:C.w.getOS({default:"Windows"})},[M,N,P])},[x]);return s.jsxRuntimeExports.jsxs("div",{className:l.CSS(l.CSS.B("canvas-container"),r),...o,children:[s.jsxRuntimeExports.jsx("canvas",{ref:h,className:l.CSS(l.CSS.B("canvas"),l.CSS.BM("canvas","lower2d"))}),s.jsxRuntimeExports.jsx("canvas",{ref:h,className:l.CSS(l.CSS.B("canvas"),l.CSS.BM("canvas","gl"))}),s.jsxRuntimeExports.jsx("canvas",{ref:h,className:l.CSS(l.CSS.B("canvas"),l.CSS.BM("canvas","upper2d"))}),s.jsxRuntimeExports.jsx(u.Composite,{path:i,children:c&&e})]})}),Ot=(e,t)=>u.useResize(d.useCallback((n,r)=>{const o=document.querySelector(".pluto-canvas--lower2d");o!=null&&e(l.k.XY.translate(l.q.scale(l.To.topLeft(o),-1)).box(n),r)},[e]),t),oi=Object.freeze(Object.defineProperty({__proto__:null,Canvas:ri,useRegion:Ot},Symbol.toStringTag,{value:"Module"})),Bs=d.createContext(null),Ee=e=>{const t=d.useContext(Bs);if(t==null)throw new Error(`Cannot to use ${e} as a non-child of LinePlot.`);return t},As=e=>{const t=Ee("Viewport"),{addViewportHandler:n}=t;d.useEffect(()=>n(e),[n,e])},Ue=(e,t)=>{const{setGridEntry:n,removeGridEntry:r}=Ee(t),{key:o}=e;return u.useEffectCompare(()=>{l.J.outer.parse(e.loc),n(e)},([a],[x])=>C._.equal(a,x),[e]),d.useEffect(()=>()=>r(o),[]),{gridArea:l.g.swap(l.J.direction(e.loc))==="x"?`axis-start-${o} / plot-start / axis-end-${o} / plot-end`:`plot-start / axis-start-${o} / plot-end / axis-end-${o}`}},zs=u.wrap$1("LinePlot",({aetherKey:e,style:t,resizeDebounce:n=0,clearOverScan:r=l.q.ZERO,children:o,hold:i=!1,onHold:c,visible:a,...x})=>{const[m,p]=d.useState([]),f=u.useMemoDeepEqualProps({clearOverScan:r,hold:i,visible:a}),[{path:h},{grid:g},E]=u.use$3({aetherKey:e,type:j.LinePlot.TYPE,schema:j.linePlotStateZ,initialState:{container:l.To.ZERO,viewport:l.To.DECIMAL,grid:{},...f}});d.useEffect(()=>E(w=>({...w,...f})),[f]);const R=d.useRef(new Map),k=d.useCallback(w=>(R.current.set(w,null),()=>R.current.delete(w)),[R]),L=d.useCallback(w=>{const{mode:y,box:_,stage:O}=w;(y==="pan"&&O!=="start"||y==="zoom"||y==="zoomReset"&&O==="start")&&E(Y=>({...Y,viewport:_})),R.current.forEach((Y,I)=>I(w))},[E]),M=d.useCallback(w=>E(y=>({...y,container:w})),[E]),N=Ot(M,{debounce:n}),P=d.useCallback(w=>E(y=>({...y,grid:{...y.grid,[w.key]:w}})),[E]),S=d.useCallback(w=>E(y=>{const{[w]:_,...O}=y.grid;return{...y,grid:O}}),[E]),v=d.useCallback(w=>{p(y=>[...y.filter(({key:_})=>_!==w.key),w])},[p,L]),B=d.useCallback(w=>p(y=>y.filter(({key:_})=>_!==w)),[v]),T=d.useMemo(()=>li(g),[g]),$=d.useCallback(w=>{E(y=>({...y,hold:w})),c==null||c(w)},[E,c]),A=d.useMemo(()=>({lines:m,setGridEntry:P,removeGridEntry:S,setLine:v,removeLine:B,setViewport:L,addViewportHandler:k,setHold:$}),[m,P,S,v,B,L,k,$]);return s.jsxRuntimeExports.jsx("div",{className:l.CSS.B("line-plot"),style:{...t,...T},ref:N,...x,children:s.jsxRuntimeExports.jsx(Bs.Provider,{value:A,children:s.jsxRuntimeExports.jsx(u.Composite,{path:h,children:o})})})}),li=e=>{const t=l.CSS.newGridBuilder();return j.regions("top",e).forEach(({key:n,size:r})=>t.row(`axis-start-${n}`,`axis-end-${n}`,r)),t.row("plot-start","plot-end","minmax(0, 1fr)"),j.regions("bottom",e).reverse().forEach(({key:n,size:r})=>t.row(`axis-start-${n}`,`axis-end-${n}`,r)),j.regions("left",e).forEach(({key:n,size:r})=>t.col(`axis-start-${n}`,`axis-end-${n}`,r)),t.col("plot-start","plot-end","minmax(0, 1fr)"),j.regions("right",e).forEach(({key:n,size:r})=>t.col(`axis-start-${n}`,`axis-end-${n}`,r)),t.build()},Dt=e=>{const t=e==="x"?"bottom":"left",n=e==="x"?j.XAxis.TYPE:j.YAxis.TYPE,r=`${e}-axis`;return u.wrap$1(n,({aetherKey:o,children:i,location:c=t,label:a="",labelLevel:x="small",labelDirection:m=e,onLabelChange:p,color:f,labelSize:h,showGrid:g,type:E,bounds:R,className:k,tickSpacing:L,autoBounds:M,autoBoundUpdateInterval:N,onAutoBoundsChange:P,style:S,...v})=>{const B=((a==null?void 0:a.length)??0)>0,T=u.useMemoDeepEqualProps({location:c,showGrid:g,type:E,bounds:R,label:a,labelDirection:m,tickSpacing:L,autoBounds:M,autoBoundUpdateInterval:N}),[{path:$},{size:A,labelSize:w,...y},_]=u.use$3({aetherKey:o,type:n,schema:j.coreAxisStateZ,initialState:T});d.useEffect(()=>_(G=>({...G,...T})),[T]),d.useEffect(()=>{const{lower:G,upper:z}=j.parseAutoBounds(y.autoBounds);y.bounds!=null&&(G&&(R==null?void 0:R.lower)!==y.bounds.lower||z&&(R==null?void 0:R.upper)!==y.bounds.upper)&&(P==null||P(y.bounds))},[y.autoBounds,y.bounds]);const O=Ue({loc:c,key:`${n}-${o}`,size:A+w,order:1},`${e.toUpperCase()}Axis`),Y=u.useTypography(x).toString(),I=d.useRef(0);return d.useEffect(()=>{if(e==="y"){if(a==null)return;let z=C.dimensions(a,Y)[l.g.dimension(l.g.construct(m))];z>0&&(z+=9),_(te=>({...te,labelSize:z}))}else{let z=C.dimensions(a,Y).height*1.3;z>0&&(z+=12);const te=I.current;j.withinSizeThreshold(te,z)||(I.current=z,_(ce=>({...ce,labelSize:z})))}},[a,m,Y]),s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(D.Space,{className:l.CSS(k,l.CSS.B("axis"),l.CSS.B(r),l.CSS.loc(c)),style:{...S,...O},align:"center",justify:c!=="left"?"end":"start",direction:l.g.swap(e),...v,children:B&&s.jsxRuntimeExports.jsx(u.MaybeEditable,{className:l.CSS(l.CSS.BE("axis","label"),l.CSS.dir(m)),value:a,onChange:p,level:x})}),s.jsxRuntimeExports.jsx(u.Composite,{path:$,children:i})]})})},Os=Dt("x"),Ds=Dt("y"),Vs=l.q.xy.extend({root:l.J.corner,units:pe.z.object({x:pe.z.enum(["px","decimal"]),y:pe.z.enum(["px","decimal"])})}),ii=Vs.partial({root:!0,units:!0}),ci=e=>{var n,r,o,i;const t={};return t[((n=e.root)==null?void 0:n.x)??"left"]=((r=e==null?void 0:e.units)==null?void 0:r.x)==="px"?`${e.x}px`:`${e.x*100}%`,t[((o=e.root)==null?void 0:o.y)??"top"]=((i=e==null?void 0:e.units)==null?void 0:i.y)==="px"?`${e.y}px`:`${e.y*100}%`,t},ai=(e,t)=>{var i,c,a,x,m,p;const n={x:e.x,y:e.y};if(t.current==null)return n;const r=l.To.construct(t.current),o=l.To.construct(t.current.parentElement);return((i=e.units)==null?void 0:i.x)==="decimal"?((c=e.root)==null?void 0:c.x)==="right"&&(n.x=1-e.x):((a=e.root)==null?void 0:a.x)==="right"?n.x=1-(e.x+l.To.width(r))/l.To.width(o):n.x/=l.To.width(o),((x=e.units)==null?void 0:x.y)==="decimal"?((m=e.root)==null?void 0:m.y)==="bottom"&&(n.y=1-e.y):((p=e.root)==null?void 0:p.y)==="bottom"?n.y=1-(e.y+l.To.height(r))/l.To.height(o):n.y/=l.To.height(o),n},Is=(e,t)=>{if(t.current==null)return null;const n=l.To.construct(t.current.parentElement),r=l.To.construct(t.current),o={x:e.x,y:e.y,root:{...l.J.TOP_LEFT},units:{x:"px",y:"px"}};return e.x>.8?(o.x=(1-e.x)*l.To.width(n)-l.To.width(r),o.root.x="right"):e.x<.2?o.x=e.x*l.To.width(n):o.units.x="decimal",e.y>.8?(o.y=(1-e.y)*l.To.height(n)-l.To.height(r),o.root.y="bottom"):e.y<.2?o.y=e.y*l.To.height(n):o.units.y="decimal",o.x=Math.round(o.x*100)/100,{...o,...l.q.truncate(o,3)}},ds=l.To.reRoot(l.To.DECIMAL,l.J.TOP_LEFT),Vt=d.memo(({className:e,value:t,onChange:n,style:r,draggable:o=!0,...i})=>{const[c,a]=C.usePurePassthrough({value:t,onChange:n,initial:{x:.1,y:.1,root:l.J.TOP_LEFT,units:{x:"decimal",y:"decimal"}}}),x=d.useRef(c),m=u.useSyncedRef(o===!1),p=d.useRef(null);c!==null&&(r={...r,...ci(c)});const f=d.useCallback(g=>{var P;if(((P=p.current)==null?void 0:P.parentElement)==null)return x.current;const E=l.To.construct(p.current.parentElement),R=l.k.XY.scale(E).scale(ds),k=R.box(l.To.construct(p.current)),L=l.k.XY.clamp(l.To.construct(l.To.topLeft(ds),{width:1-l.To.width(k),height:1-l.To.height(k)})),M=l.q.translate(l.q.construct(x.current),l.To.signedDims(R.box(g))),N=L.pos(M);return Is(N,p)},[]),h=pt({onStart:d.useCallback(()=>{x.current=ai(x.current,p)},[]),onMove:d.useCallback(g=>{if(m.current)return;const E=f(g);E!==null&&a(E)},[]),onEnd:d.useCallback(g=>{if(m.current)return;const E=f(g);E!==null&&(x.current=E)},[])});return s.jsxRuntimeExports.jsx(D.Space,{className:l.CSS(e,l.CSS.B("legend")),bordered:!0,rounded:!0,style:r,onDragStart:h,draggable:o,ref:p,...i,onDrag:et,onDragEnd:et,empty:!0})});Vt.displayName="Legend.Container";const It=(e,t,n)=>e.sort((r,o)=>r.label.localeCompare(o.label)).map(({key:r,color:o,label:i})=>s.jsxRuntimeExports.jsxs(D.Space,{style:{cursor:"pointer"},direction:"x",align:"center",size:"small",children:[s.jsxRuntimeExports.jsx($t.Swatch,{value:o,onChange:c=>t==null?void 0:t({key:r,color:c,label:i}),onVisibleChange:n,draggable:!1,size:"small"}),s.jsxRuntimeExports.jsx(u.MaybeEditable,{level:"small",value:i,onChange:c=>t==null?void 0:t({key:r,color:o,label:c}),noWrap:!0})]},r)),Zt=({data:e=[],onEntryChange:t,position:n,onPositionChange:r,...o})=>{const[i,c]=d.useState(!1);return e.length===0?null:s.jsxRuntimeExports.jsx(Vt,{...o,draggable:!i,value:n,onChange:r,children:It(e,t,c)})},ui=Object.freeze(Object.defineProperty({__proto__:null,Container:Vt,Simple:Zt,calcStickyPos:Is,completeStickyXYz:Vs,legendSwatches:It,stickyXYz:ii},Symbol.toStringTag,{value:"Module"})),Zs=({className:e,style:t,onLineChange:n,...r})=>{const{lines:o}=Ee("Legend");return Ee("Legend"),s.jsxRuntimeExports.jsx(Zt,{data:o,onEntryChange:n,...r})},xi=({onLineChange:e})=>{const{lines:t}=Ee("Legend"),n=u.useUniqueKey(),r=Ue({key:n,size:t.length>0?36:0,loc:"top",order:5},"Legend");return s.jsxRuntimeExports.jsx(D.Space,{className:l.CSS.BE("legend","container"),align:"center",direction:"x",size:"large",style:{...r,padding:"0 1rem",height:"var(--pluto-height-medium)",margin:"1rem 0 "},children:It(t,e)})},Fs=({variant:e="floating",...t})=>e==="floating"?s.jsxRuntimeExports.jsx(Zs,{...t}):s.jsxRuntimeExports.jsx(xi,{...t}),qs=u.wrap$1("Line",({aetherKey:e,...t})=>{const[,,n]=u.use$3({aetherKey:e,type:j.Line.TYPE,schema:j.stateZ,initialState:t}),r=u.useMemoDeepEqualProps(t);return d.useLayoutEffect(()=>n(r),[r]),null}),di=Object.freeze(Object.defineProperty({__proto__:null,Line:qs},Symbol.toStringTag,{value:"Module"})),Ft=u.wrap$1("Line",({aetherKey:e,color:t,label:n="",...r})=>{const{setLine:o,removeLine:i}=Ee("Line");return d.useEffect(()=>(o({key:e,color:t,label:n}),()=>i(e)),[n,t]),s.jsxRuntimeExports.jsx(qs,{aetherKey:e,color:t,label:n,...r})}),Us=({level:e="h2",...t})=>{const n=u.useUniqueKey(),r=u.useTypography(e),o=Ue({key:n,size:(r.lineHeight+2)*r.baseSize,loc:"top",order:10},"Title");return s.jsxRuntimeExports.jsx(D.Space,{justify:"center",align:"center",style:o,children:s.jsxRuntimeExports.jsx(u.MaybeEditable,{...t,level:e})})},Hs=u.wrap$1("Tooltip",({aetherKey:e})=>{const[,,t]=u.use$3({aetherKey:e,type:j.Tooltip.TYPE,schema:j.tooltipStateZ,initialState:{position:null}}),n=d.useRef(null),r=d.useCallback(i=>{const c=document.querySelector(".pluto-canvas-container");if(c==null)return;const a=l.To.topLeft(c);t({position:l.q.translation(a,l.q.construct(i))})},[t]),o=d.useCallback(()=>t({position:null}),[t]);return d.useEffect(()=>{if(n.current===null)return;const i=n.current.parentElement;if(i!=null)return i.addEventListener("mousemove",r),i.addEventListener("mouseleave",o),()=>{i.removeEventListener("mousemove",r),i.removeEventListener("mouseleave",o)}},[r]),s.jsxRuntimeExports.jsx("span",{ref:n})}),pi=Object.freeze(Object.defineProperty({__proto__:null,Tooltip:Hs},Symbol.toStringTag,{value:"Module"})),mi={select:"pointer",zoom:"crosshair",pan:"grab",zoomReset:"crosshair",click:"pointer"},qt=d.forwardRef(({className:e,mode:t,maskBox:n,children:r,style:o,...i},c)=>s.jsxRuntimeExports.jsxs("div",{ref:c,className:l.CSS(l.CSS.noSelect,l.CSS.BE("viewport-mask","container"),e),style:{cursor:mi[t],...o},...i,children:[s.jsxRuntimeExports.jsx("div",{style:{...l.To.css(n),display:l.To.areaIsZero(n)?"none":"block"},className:l.CSS.BE("viewport-mask","selection")}),r]}));qt.displayName="ZoomPanMask";const ji=[{key:"start",icon:s.jsxRuntimeExports.jsx(u.Ut.TextAlign.Left,{})},{key:"center",icon:s.jsxRuntimeExports.jsx(u.Ut.TextAlign.Center,{})},{key:"end",icon:s.jsxRuntimeExports.jsx(u.Ut.TextAlign.Right,{})}],fi=({key:e,entry:t,onClick:n,selected:r})=>s.jsxRuntimeExports.jsx(u.Icon,{variant:r?"filled":"outlined",onClick:n,children:t.icon},e),Ut=({children:e=fi,...t})=>s.jsxRuntimeExports.jsx(de.Button,{...t,allowMultiple:!1,data:ji,children:e}),gi=new Set([C.h.UUID,C.h.JSON]),hi=C.h.ALL.filter(e=>e!==C.h.UNKNOWN).map(e=>({key:e.toString(),name:gi.has(e)?e.toString().toUpperCase():l._.capitalize(e.toString())})),Si=[{key:"name",name:"Name"}],Ei=e=>s.jsxRuntimeExports.jsx(de.DropdownButton,{...e,data:hi,columns:Si,entryRenderKey:"name"}),Ri=[{key:"x",icon:s.jsxRuntimeExports.jsx(u.Ut.Arrow.Right,{})},{key:"y",icon:s.jsxRuntimeExports.jsx(u.Ut.Arrow.Up,{})}],yi=({key:e,entry:t,onClick:n,selected:r})=>s.jsxRuntimeExports.jsx(u.Icon,{variant:r?"filled":"outlined",onClick:n,children:t.icon},e),Ci=({children:e=yi,...t})=>s.jsxRuntimeExports.jsx(de.Button,{...t,allowMultiple:!1,data:Ri,children:e}),Ys=e=>s.jsxRuntimeExports.jsx(u.Icon,{className:l.CSS.BE("select","clear"),variant:"outlined",...e,children:s.jsxRuntimeExports.jsx(u.Ut.Close,{"aria-label":"clear"})}),be=({onChange:e,value:t,entryRenderKey:n="key",columns:r,data:o,emptyContent:i,inputProps:c,allowNone:a=!0,searcher:x,className:m,variant:p,hideColumnHeader:f=!1,disabled:h,omit:g,children:E,dropdownVariant:R="connected",placeholder:k=ft,inputPlaceholder:L=k,triggerTooltip:M,dropdownZIndex:N,filter:P,actions:S,...v})=>{const{visible:B,open:T,close:$,toggle:A}=u.use$2(),[w,y]=d.useState(null),_=x!=null;u.useAsyncEffect(async()=>{if(u.selectValueIsZero(t))return y(null);if((w==null?void 0:w.key)===t)return;let z=null;if(_)try{[z]=await x.retrieve([t])}finally{z??(z=null)}else o!=null&&(z=o.find(te=>te.key===t)??null);y(z)},[x,t,o]);const O=d.useCallback((z,te)=>{Array.isArray(z)||(y(z==null?null:te.entries[0]),$(),e(z,te))},[e,a]),Y=d.useMemo(()=>_?u.Search:Ne.Filter,[_]),I=s.jsxRuntimeExports.jsx(Y,{searcher:x,filter:P,children:({onChange:z})=>s.jsxRuntimeExports.jsx(bi,{autoFocus:R==="modal",variant:p,onChange:z,onFocus:T,selected:w,entryRenderKey:n,visible:B,allowNone:a,className:m,disabled:h,placeholder:L,children:S})}),G=s.jsxRuntimeExports.jsx(u.Button,{tooltip:M,variant:"outlined",onClick:A,disabled:h,children:w!=null?Gs(n,w):k});return s.jsxRuntimeExports.jsx(de.Core,{close:$,zIndex:N,open:T,data:o,omit:g,emptyContent:i,allowMultiple:!1,visible:B,value:t,hideColumnHeader:f,onChange:O,allowNone:a,columns:r,listItem:E,variant:R,trigger:R!=="modal"?I:G,extraDialogContent:R==="modal"?I:void 0,keepMounted:!1,...v})},ft="Select",Gs=(e,t)=>t==null?"":typeof e=="function"?e(t):t[e].toString(),bi=({entryRenderKey:e,selected:t,visible:n,onChange:r,onFocus:o,allowNone:i=!0,placeholder:c=ft,className:a,disabled:x,...m})=>{const{clear:p}=u.useSelectionUtils(),[f,h]=d.useState("");d.useEffect(()=>{if(!n){if(C.w$1(t==null?void 0:t.key))return h("");t!=null&&h(Gs(e,t))}},[t,n,e]);const g=L=>{r(L),h(L)},E=()=>{f===""&&r(""),h(""),o==null||o()},R=L=>{n||(L.preventDefault(),o==null||o())},k=()=>{h(""),p==null||p()};return s.jsxRuntimeExports.jsx(u.Text$1,{className:l.CSS(l.CSS.BE("select","input"),a),value:f,onChange:g,onFocus:E,onKeyDown:u.matchCallback([["Enter"]],L=>{L.preventDefault(),!n&&(o==null||o())}),style:{flexGrow:1},onClick:R,placeholder:c,disabled:x,...m,children:i&&s.jsxRuntimeExports.jsx(Ys,{onClick:k,disabled:x})})},Ze=({children:e="",size:t="medium",color:n,icon:r,onClose:o,className:i,onDragStart:c,...a})=>{const x=l.cssString(n);r==null&&n!=null&&(r=s.jsxRuntimeExports.jsx(u.Ut.Circle,{fill:x}));const m=o==null?void 0:s.jsxRuntimeExports.jsx(u.Icon,{"aria-label":"close",size:"small",className:l.CSS.BE("tag","close"),onClick:p=>{p.stopPropagation(),o()},children:s.jsxRuntimeExports.jsx(u.Ut.Close,{})});return s.jsxRuntimeExports.jsx(u.WithIcon,{startIcon:r,endIcon:m,className:l.CSS(i,l.CSS.B("tag"),o!=null&&l.CSS.BM("tag","closeable")),level:C.ComponentSizeLevels[t],noWrap:!0,align:"center",onDragStart:c,...a,children:e})},vi=Object.freeze(Object.defineProperty({__proto__:null,Tag:Ze},Symbol.toStringTag,{value:"Module"})),_e=({onChange:e,value:t,className:n,data:r,columns:o=[],entryRenderKey:i="key",emptyContent:c,searcher:a,renderTag:x=u.componentRenderProp(Ws),placeholder:m,onTagDragStart:p,allowMultiple:f,allowNone:h,replaceOnSingle:g,onTagDragEnd:E,style:R,addPlaceholder:k="Add",children:L,dropdownVariant:M="connected",actions:N,...P})=>{const{visible:S,open:v,close:B}=u.use$2(),[T,$]=d.useState([]),[A,w]=d.useState(!1),y=a!=null;u.useAsyncEffect(async()=>{w(!0),u.selectValueIsZero(t)&&$([]);const G=T.map(ce=>ce.key),z=C.A(t);if(C.F.unorderedPrimitiveArrays(G,z)===C.F.EQUAL)return;let te=[];if(y)try{te=await a.retrieve(z)}finally{w(!1)}else r!=null&&(te=r.filter(ce=>z.includes(ce.key)));$(te)},[a,y,t,r]);const _=d.useCallback((G,z)=>{G!=null&&($(z.entries),e(C.A(G),z))},[e]),O=d.useMemo(()=>y?u.Search:Ne.Filter,[y]);let Y,I;if(M==="connected")I=s.jsxRuntimeExports.jsx(O,{searcher:a,children:({onChange:G,value:z})=>s.jsxRuntimeExports.jsx(wi,{value:z,selectedKeys:t,className:n,onChange:G,loading:A,selected:T,onFocus:v,entryRenderKey:i,visible:S,renderTag:x,placeholder:m,onTagDragStart:p,onTagDragEnd:E,style:R,children:N})});else{const G=C.A(t);I=s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",align:"center",grow:!0,style:R,size:"small",children:[G.map(z=>{const te=T.find(ce=>ce.key===z);return x({key:z,entryKey:z,entryRenderKey:i,loading:A,entry:te,onClose:()=>{const ce=G.filter(We=>We!==z);e(ce,{clicked:null,clickedIndex:-1,entries:[]})},onDragStart:ce=>p==null?void 0:p(ce,z),onDragEnd:ce=>E==null?void 0:E(ce,z)})}),G.length>0?s.jsxRuntimeExports.jsx(u.Icon,{onClick:v,children:s.jsxRuntimeExports.jsx(u.Ut.Add,{style:{color:"var(--pluto-gray-l7)"}})}):s.jsxRuntimeExports.jsx(u.Button,{onClick:v,shade:7,startIcon:s.jsxRuntimeExports.jsx(u.Ut.Add,{}),variant:"text",children:k})]}),Y=s.jsxRuntimeExports.jsx(O,{searcher:a,children:z=>s.jsxRuntimeExports.jsx(u.Text$1,{autoFocus:!0,placeholder:"Search",...z,children:N})})}return s.jsxRuntimeExports.jsx(de.Core,{close:B,open:v,data:r,emptyContent:c,visible:S,value:t,onChange:_,allowNone:h,replaceOnSingle:g,columns:o,allowMultiple:!0,listItem:L,trigger:I,extraDialogContent:Y,variant:M,...P})},wi=({selectedKeys:e,loading:t,selected:n,onChange:r,onFocus:o,visible:i,entryRenderKey:c,renderTag:a,placeholder:x=ft,onTagDragStart:m,onTagDragEnd:p,value:f,className:h,children:g,...E})=>{const{onSelect:R,clear:k}=u.useSelectionUtils(),L=d.useRef(null);d.useLayoutEffect(()=>{var S;i&&((S=L.current)==null||S.focus())},[i,n]);const M=()=>{i||r(""),o==null||o()},N=()=>{i||o==null||o()},P=()=>{i||r("")};return s.jsxRuntimeExports.jsxs(u.Text$1,{ref:L,className:l.CSS(l.CSS.BE("select-multiple","input"),l.CSS.visible(i),h),onBlur:P,placeholder:x,value:f,onChange:r,onFocus:M,autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",onClick:N,...E,children:[s.jsxRuntimeExports.jsx(D.Space,{direction:"x",className:l.CSS.BE("select-multiple","tags"),align:"center",grow:!0,size:"small",children:C.A(e).map(S=>{const v=n.find(B=>B.key===S);return a({key:S,entryKey:S,entryRenderKey:c,loading:t,entry:v,onClose:()=>R==null?void 0:R(S),onDragStart:B=>m==null?void 0:m(B,S),onDragEnd:B=>p==null?void 0:p(B,S)})})}),g,s.jsxRuntimeExports.jsx(Ys,{onClick:k})]})},Ws=({entryKey:e,entryRenderKey:t,entry:n,loading:r,...o})=>{let i=e;return n!=null&&(i=typeof t=="function"?t(n):n[t]),d.createElement(Ze,{size:"small",variant:"outlined",className:l.CSS(n==null&&!r&&l.CSS.BEM("select-multiple","tag","invalid")),draggable:!0,...o,key:e.toString()},C.Q(i))},Pi=Object.freeze(Object.defineProperty({__proto__:null,BaseButton:de.BaseButton,Button:de.Button,DEFAULT_PLACEHOLDER:ft,DataType:Ei,Direction:Ci,DropdownButton:de.DropdownButton,Multiple:_e,MultipleTag:Ws,Single:be,TextAlignment:Ut,defaultButton:de.defaultButton},Symbol.toStringTag,{value:"Module"})),Je=6,ki=2,ps=5,Ti=e=>l.To.width(e)<ps&&l.To.height(e)<ps,Li=["zoom","pan","select","zoomReset"],Ie=[...Li,"click"],Mi=pe.z.enum(Ie),Ks=["zoom","select"],Qe={defaultMode:"zoom",zoom:[["MouseLeft"]],zoomReset:[["MouseLeft","Control"]],pan:[["MouseLeft","Shift"]],select:[["MouseLeft","Alt"]]},Xs={defaultMode:"pan",pan:[["MouseLeft"]],zoom:[["MouseLeft","Shift"]],zoomReset:[["MouseLeft","Control"]],select:[["MouseLeft","Alt"]]},Js={defaultMode:"select",select:[["MouseLeft"]],pan:[["MouseLeft","Shift"]],zoom:[["MouseLeft","Alt"]],zoomReset:[["MouseLeft","Control"]]},Ht={zoom:Qe,pan:Xs,select:Js,zoomReset:Qe,click:Qe},Ni=e=>{const t=Object.entries(e);return Object.fromEntries(t.map(([n,r])=>n==="defaultMode"?[n,r]:[n,r.map(o=>o.filter(i=>i!=="MouseLeft")).filter(o=>o.length>0)]))},$i=l.To.construct(0,0,1,1,l.J.TOP_LEFT),_i={width:30,height:50},Qs=({onChange:e,triggers:t,initial:n=$i,threshold:r=_i,ref:o})=>{const i=(t==null?void 0:t.defaultMode)??"zoom",[c,a]=d.useState(l.To.ZERO),[x,m]=d.useState(i),[p,f]=u.useStateRef(n),h=d.useRef(l.q.ZERO),g=d.useRef(null),E=l._$1.construct(r);d.useEffect(()=>f(()=>l.To.truncate(n,Je)),[n]),d.useEffect(()=>m(i),[i]);const[R,k,L,M]=u.useMemoCompare(()=>{const T={...Ht[i],...t},$=u.flattenConfig(T),A=Ni(T);return[T,$,A,u.flattenConfig(A)]},u.compareModeConfigs,[t]),N=d.useCallback(({box:T,triggers:$,stage:A,cursor:w})=>{if(g.current==null)return;const y=u.determineMode(R,$),_=l.To.construct(g.current);if(y==null)return;if(y==="zoomReset")return a(l.To.ZERO),e==null||e({box:l.To.DECIMAL,mode:y,stage:A,cursor:w}),f(l.To.DECIMAL);const O=Ti(T);if(A==="end"){if(O){y==="zoom"&&a(l.To.ZERO),e==null||e({box:p.current,mode:"click",stage:A,cursor:w});return}return f(I=>{if(y==="pan"){const z=ms(T,I,_);return z===null||l.To.equals(z,I)?I:(e==null||e({box:z,mode:y,stage:A,cursor:w}),z)}const G=P(T,I,_);return G===null?I:(e==null||e({box:G,mode:y,stage:A,cursor:w}),y==="zoom"?(a(l.To.ZERO),G):l.To.truncate(I,Je))})}if(Ks.includes(y))return O?void 0:a(l.k.XY.scale(_).clamp(_).translate({x:-l.To.left(_),y:-l.To.top(_)}).box(js(E,T,_)));if(a(I=>l.To.areaIsZero(I)?I:l.To.ZERO),l.q.distance(w,h.current)<ki)return;h.current=w;const Y=ms(T,p.current,_);e==null||e({box:Y,mode:y,stage:A,cursor:w})},[a,m,e,R,r.height,r.width,f,g]);d.useImperativeHandle(o,()=>({reset:()=>{a(l.To.ZERO),f(l.To.DECIMAL),e==null||e({box:l.To.DECIMAL,mode:"zoomReset",stage:"start",cursor:l.q.ZERO})}}),[e]);const P=d.useCallback((T,$,A)=>l.To.truncate(Pt($,A).box(js(E,T,A)),Je),[r]),S=u.useHeldRef({triggers:[["Control"]]}),v=u.useHeldRef({triggers:[["Alt"]]});d.useEffect(()=>{const T=$=>{if(g.current==null)return;let A=1;$.deltaY<0?A-=.035:A+=.035;const w=l.To.construct(g.current),y=l.q.construct($);if(!l.To.contains(w,y)||$.target!==g.current)return;const O=Pt(p.current,l.To.construct(g.current)).pos(l.q.construct($));let I=l.k.XY.magnify({x:S.current.held?1:A,y:v.current.held?1:A}).box(p.current);I=l.To.translate(I,{x:S.current.held?0:O.x*(1-A),y:v.current.held?0:O.y*(1-A)}),f(I),e==null||e({stage:"end",box:I,cursor:l.q.construct($),mode:"zoom"})};return window.addEventListener("wheel",T),()=>window.removeEventListener("wheel",T)},[f,e]),Cs.useDrag({bound:g,onDrag:N,triggers:k,loose:!0});const B=d.useCallback(({triggers:T,stage:$})=>{if($==="end")return m(i);const A=u.determineMode(L,T);A!=null&&m(A)},[L,i,e]);return u.use$1({triggers:M,callback:B,region:g}),{maskBox:c,ref:g,mode:x}},Pt=(e,t)=>l.k.XY.scale(t).clamp(t).scale(e),ms=(e,t,n)=>{let r=l.To.signedDims(Pt(t,n).box(e));return r={signedWidth:-r.signedWidth,signedHeight:-r.signedHeight},l.To.truncate(l.k.XY.translate(l.q.construct(r)).box(t),Je)},js=(e,t,n)=>l.To.height(t)<=e.height?l.To.construct(l.To.left(t),l.To.top(n),l.To.width(t),l.To.height(n)):l.To.width(t)<=e.width?l.To.construct(l.To.left(n),l.To.top(t),l.To.width(n),l.To.height(t)):t,Bi=({mode:e,triggers:t})=>s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",align:"center",children:[s.jsxRuntimeExports.jsx(u.Text,{level:"small",children:l._.capitalize(e)}),s.jsxRuntimeExports.jsx(gl.Text,{trigger:t[0],level:"small"})]}),Ai={zoom:s.jsxRuntimeExports.jsx(u.Ut.Zoom,{}),pan:s.jsxRuntimeExports.jsx(u.Ut.Pan,{}),select:s.jsxRuntimeExports.jsx(u.Ut.Selection,{}),zoomReset:s.jsxRuntimeExports.jsx(u.Ut.Expand,{}),click:s.jsxRuntimeExports.jsx(u.Ut.Bolt,{})},zi=({triggers:e,disable:t=["zoomReset","click"],...n})=>{const r=Object.entries(e).filter(([o])=>!t.includes(o)&&Ie.includes(o)).map(([o,i])=>({key:o,icon:Ai[o],tooltip:s.jsxRuntimeExports.jsx(Bi,{mode:o,triggers:i})})).sort((o,i)=>Ie.indexOf(o.key)-Ie.indexOf(i.key));return s.jsxRuntimeExports.jsx(de.Button,{...n,data:r,entryRenderKey:"icon",children:({title:o,entry:i,...c})=>d.createElement(u.Icon,{...c,key:i.key,variant:c.selected?"filled":"text",size:"medium",tooltip:i.tooltip,tooltipLocation:{x:"right",y:"top"}},i.icon)})},Oi=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_TRIGGERS:Ht,MASK_MODES:Ks,MODES:Ie,Mask:qt,PAN_DEFAULT_TRIGGERS:Xs,SELECT_DEFAULT_TRIGGERS:Js,SelectMode:zi,ZOOM_DEFAULT_TRIGGERS:Qe,modeZ:Mi,use:Qs},Symbol.toStringTag,{value:"Module"})),en=e=>e==null?null:document.querySelectorAll(".pluto-line-plot__viewport")[0]??null,Yt=d.forwardRef(({children:e,initial:t=l.To.DECIMAL,onChange:n,...r},o)=>{const{setViewport:i}=Ee("Viewport");d.useLayoutEffect(()=>{i({box:t,mode:"zoom",cursor:l.q.ZERO,stage:"start"})},[i,t]);const c=d.useCallback(x=>{i(x),n==null||n(x)},[n,i]),a=Qs({onChange:c,initial:t,ref:o,...r});return s.jsxRuntimeExports.jsx(qt,{className:l.CSS.BE("line-plot","viewport"),...a,children:e})});Yt.displayName="Viewport";const Di=Object.freeze(Object.defineProperty({__proto__:null,Floating:Zs,Legend:Fs,Line:Ft,LinePlot:zs,Title:Us,Tooltip:pi,Viewport:Yt,XAxis:Os,YAxis:Ds,axisFactory:Dt,selectViewportEl:en,useContext:Ee,useGridEntry:Ue,useViewport:As},Symbol.toStringTag,{value:"Module"})),Vi=u.wrap$1("Tooltip",({aetherKey:e,...t})=>(u.use$3({aetherKey:e,type:j.Annotation.TYPE,schema:j.annotationStateZ,initialState:t}),null)),tn=u.wrap$1("Annotation.Provider",({aetherKey:e,menu:t,...n})=>{const{setViewport:r,setHold:o}=Ee("Range.Provider"),[,{hovered:i,count:c},a]=u.use$3({aetherKey:e,type:j.Provider$1.TYPE,schema:j.providerStateZ,initialState:{...n,cursor:null,hovered:null,count:0}}),x=Ue({key:e,loc:"top",size:c>0?32:0,order:3},"Annotation.Provider"),m=u.useContextMenu(),p=u.useSyncedRef(m.visible),f=d.useCallback(h=>{const g=R=>{a(k=>({...k,cursor:{x:R.clientX,y:R.clientY}}))},E=h.currentTarget;E.addEventListener("mousemove",g),E.addEventListener("mouseleave",()=>{E.removeEventListener("mousemove",g),p.current||a(R=>({...R,cursor:null}))},{once:!0})},[a]);return s.jsxRuntimeExports.jsx(u.ContextMenu,{style:{...x,cursor:i!=null?"pointer":"default"},...m,menu:()=>t==null||i==null?null:t(i),children:s.jsxRuntimeExports.jsx(D.Space,{style:{width:"100%",height:"100%"},onClick:()=>{i!=null&&(r({box:l.To.construct({x:i.viewport.lower,y:0},{x:i.viewport.upper,y:1}),mode:"zoom",cursor:l.q.ZERO,stage:"start"}),o(!0))},onMouseEnter:f})})}),Ii=Object.freeze(Object.defineProperty({__proto__:null,Annotation:Vi,Provider:tn},Symbol.toStringTag,{value:"Module"})),sn={defaultMode:"empty",one:[["1"]],two:[["2"]],clear:[["Shift"]],empty:[[]]},Zi=u.flattenConfig(sn),nn=u.wrap$1("Measure",({aetherKey:e})=>{const[,,t]=u.use$3({aetherKey:e,type:j.Measure.TYPE,schema:j.measureStateZ,initialState:{hover:null,one:null,two:null}}),n=d.useRef(null),r=u.useHeldRef({triggers:Zi,loose:!0}),o=d.useCallback(({mode:a,cursor:x})=>{if(a==="click"){const m=u.determineMode(sn,r.current.triggers,{loose:!0});if(["one","two"].includes(m))return t(p=>({...p,[m]:x}));t(m==="clear"?p=>({...p,one:null,two:null}):p=>({...p,one:p.one??x,two:p.one!==null?x:p.two}))}},[t,r]);As(o);const i=d.useCallback(a=>t(x=>({...x,hover:l.q.construct(a)})),[t]),c=d.useCallback(()=>{t(a=>({...a,hover:null}))},[t]);return d.useEffect(()=>{if(n.current===null)return;const a=n.current.parentElement;if(a!=null)return a.addEventListener("mousemove",i),a.addEventListener("mouseleave",c),()=>{a.removeEventListener("mousemove",i),a.removeEventListener("mouseleave",c)}},[o]),s.jsxRuntimeExports.jsx("span",{ref:n})}),Fi=Object.freeze(Object.defineProperty({__proto__:null,Measure:nn},Symbol.toStringTag,{value:"Module"})),Gt=u.wrap$1("Rule",({aetherKey:e,label:t,position:n,onLabelChange:r,onPositionChange:o,units:i="",color:c,lineWidth:a,lineDash:x})=>{const[m,p]=C.usePurePassthrough({value:t,onChange:r,initial:""}),[,{position:f,pixelPosition:h},g]=u.use$3({aetherKey:e,type:j.Rule.TYPE,schema:j.ruleStateZ,initialState:{color:c,dragging:!1,position:n,lineWidth:a,lineDash:x}});d.useEffect(()=>{if(f==null)return;if(n==null)return o==null?void 0:o(f);const P=l.R.construct(f+.01,f-.01);n!=null&&!l.R.contains(P,n)&&(o==null||o(Math.trunc(f*100)/100))},[f]);const E=d.useRef(h);h!==E.current&&(E.current=h);const R=d.useRef(h);d.useEffect(()=>{g(P=>({...P,position:n,color:c,lineWidth:a,lineDash:x}))},[n,c,a,x]);const k=pt({onStart:d.useCallback(()=>{g(P=>({...P,dragging:!0})),R.current=E.current},[]),onMove:P=>{g(S=>({...S,pixelPosition:(R.current??0)+l.To.signedHeight(P)}))},onEnd:d.useCallback(()=>{g(P=>({...P,dragging:!1})),R.current=h},[])}),L=d.useRef(null);if(f==null||h==null)return null;const M=en(L==null?void 0:L.current),N=s.jsxRuntimeExports.jsxs("div",{ref:L,className:l.CSS.B("rule"),style:{top:`calc(${h}px - 0.5rem)`},children:[s.jsxRuntimeExports.jsx("div",{className:l.CSS.BE("rule","drag-handle"),onDragStart:k,draggable:!0}),s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",align:"center",style:{marginLeft:"2rem"},children:[s.jsxRuntimeExports.jsx(u.Editable,{level:"p",value:m,onChange:p}),s.jsxRuntimeExports.jsx(u.Text,{level:"p",style:{padding:"0.25rem 0",width:"fit-content"},children:`${f.toFixed(2)} ${i}`})]})]});return M==null?N:_t.createPortal(N,M)}),qi=Object.freeze(Object.defineProperty({__proto__:null,Rule:Gt},Symbol.toStringTag,{value:"Module"})),rn=u.canDropOfType(Se),Ui=({lines:e,axes:t,showTitle:n=!0,title:r="",onTitleChange:o,showLegend:i=!0,legendPosition:c,onLegendPositionChange:a,titleLevel:x="h4",onLineChange:m,onRuleChange:p,onAxisChannelDrop:f,onAxisChange:h,rules:g,enableTooltip:E=!0,enableMeasure:R=!1,initialViewport:k=l.To.DECIMAL,legendVariant:L,onViewportChange:M,viewportTriggers:N,annotationProvider:P,...S})=>{var A;const v=t.filter(({location:w})=>l.J.isY(w)),B=d.useRef(),T=u.usePrevious(e.length),$=u.usePrevious(S.hold);return(T===0&&e.length!==0||$===!0&&S.hold===!1)&&((A=B.current)==null||A.reset()),s.jsxRuntimeExports.jsxs(zs,{...S,children:[v.map((w,y)=>{const _=e.filter(I=>I.axes.x===w.key),O=t.filter(({location:I})=>l.J.isX(I)),Y=g==null?void 0:g.filter(I=>[...O.map(({key:G})=>G),w.key].includes(I.axis));return s.jsxRuntimeExports.jsx(Hi,{axis:w,index:y,lines:_,yAxes:O,rules:Y,onAxisChannelDrop:f,onAxisChange:h,annotationProvider:P},w.key)}),i&&s.jsxRuntimeExports.jsx(Fs,{onLineChange:m,position:c,onPositionChange:a,variant:L}),n&&s.jsxRuntimeExports.jsx(Us,{value:r,onChange:o,level:x}),s.jsxRuntimeExports.jsxs(Yt,{initial:k,onChange:M,triggers:N,ref:B,children:[E&&s.jsxRuntimeExports.jsx(Hs,{}),R&&s.jsxRuntimeExports.jsx(nn,{})]})]})},Hi=({yAxes:e,lines:t,index:n,rules:r,onRuleChange:o,onAxisChannelDrop:i,onAxisChange:c,axis:{location:a,key:x,showGrid:m,...p},annotationProvider:f})=>{const h=u.useDrop({type:"Channel.LinePlot.XAxis",canDrop:rn,onDrop:d.useCallback(({items:R})=>{const k=u.filterByType(Se,R);return i==null||i(x,k.map(({key:L})=>L)),k},[x,i])}),g=r==null?void 0:r.filter(R=>R.axis===x),E=u.useDraggingState();return s.jsxRuntimeExports.jsxs(Os,{...p,...h,location:a,showGrid:m??n===0,className:l.CSS(l.CSS.dropRegion(u.canDropOfType(Se)(E))),onAutoBoundsChange:R=>c==null?void 0:c({key:x,bounds:R}),children:[e.map((R,k)=>{const L=t.filter(N=>N.axes.y===R.key),M=r==null?void 0:r.filter(N=>N.axis===R.key);return s.jsxRuntimeExports.jsx(Gi,{axis:{...R,showGrid:m??(n===0&&k===0)},lines:L,rules:M,onRuleChange:o,onAxisChannelDrop:i,onAxisChange:c},R.key)}),g==null?void 0:g.map(R=>d.createElement(Gt,{aetherKey:R.key,...R,key:R.key,onLabelChange:k=>o==null?void 0:o({key:R.key,label:k}),onPositionChange:k=>o==null?void 0:o({key:R.key,position:k})})),s.jsxRuntimeExports.jsx(tn,{...f})]})},Yi=({channels:{x:e,y:t}})=>`${e??0}-${t}`,Gi=({lines:e,rules:t,onRuleChange:n,onAxisChannelDrop:r,onAxisChange:o,axis:{key:i,location:c,...a}})=>{const x=u.useDrop({type:"Channel.LinePlot.YAxis",canDrop:rn,onDrop:d.useCallback(({items:p})=>{const f=u.filterByType(Se,p);return r==null||r(i,f.map(({key:h})=>h)),f},[i,r])}),m=u.useDraggingState();return s.jsxRuntimeExports.jsxs(Ds,{...a,...x,location:c,className:l.CSS(l.CSS.dropRegion(u.canDropOfType(Se)(m))),onAutoBoundsChange:p=>o==null?void 0:o({key:i,bounds:p}),children:[e.map(p=>s.jsxRuntimeExports.jsx(Wi,{line:p},Yi(p))),t==null?void 0:t.map(p=>d.createElement(Gt,{aetherKey:p.key,...p,key:p.key,onLabelChange:f=>n==null?void 0:n({key:p.key,label:f}),onPositionChange:f=>n==null?void 0:n({key:p.key,position:f})}))]})},Wi=({line:e})=>e.variant==="static"?s.jsxRuntimeExports.jsx(Xi,{line:e}):s.jsxRuntimeExports.jsx(Ki,{line:e}),Ki=({line:{key:e,timeSpan:t,channels:{x:n,y:r},...o}})=>{const i=Number(t.valueOf())*3,c=j.streamChannelData({timeSpan:t,channel:r,keepFor:i}),a=n!=null&&n!==0,x=j.streamChannelData({timeSpan:t,channel:a?n:r,useIndexOfChannel:!a,keepFor:i});return s.jsxRuntimeExports.jsx(Ft,{aetherKey:e,y:c,x,...o})},Xi=({line:{timeRange:e,key:t,channels:{x:n,y:r},...o}})=>{const i=j.channelData({timeRange:e,channel:r}),c=n!=null&&n!==0,a=j.channelData({timeRange:e,channel:c?n:r,useIndexOfChannel:!c});return s.jsxRuntimeExports.jsx(Ft,{aetherKey:t,y:i,x:a,...o})},fs=[{key:"name",name:"Name"},{key:"alias",name:"Alias"},{key:"rate",name:"Rate"},{key:"dataType",name:"Data Type"},{key:"index",name:"Index"},{key:"key",name:"Key"},{key:"isIndex",name:"Is Index"}],tt=({items:e},t)=>{const n=u.filterByType(Se,e);return n.length>0&&!n.every(r=>t.includes(r.key))},on=["name","alias"],ln=e=>{const t=mt();return d.useMemo(()=>e.length===0?fs:fs.filter(n=>e.includes(n.key)),[e,t])},Ji=({columns:e=on,onChange:t,className:n,value:r,searchOptions:o,...i})=>{const c=fe(),a=mt(),x=ln(e),m=zt(),p=u.useMemoDeepEqualProps(o),f=d.useMemo(()=>c==null?void 0:c.channels.newSearcherWithOptions({rangeKey:m,internal:!1,...p}),[c,m,p]),h=c!=null?void 0:s.jsxRuntimeExports.jsx(u.Text$2.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),{startDrag:g,onDragEnd:E,...R}=u.useDragAndDrop({type:"Channel.SelectMultiple",canDrop:d.useCallback(P=>tt(P,C.A(r)),[r]),onDrop:d.useCallback(({items:P})=>{const S=u.filterByType(Se,P);if(S.length===0)return[];const v=C.n([...C.A(r),...S.map(B=>B.key)]);return t(v,{clickedIndex:null,clicked:null,entries:[]}),S},[t,r])}),k=u.useDraggingState(),L=d.useCallback(({dropped:P})=>{t(C.A(r).filter(S=>!P.some(v=>v.key===S)),{clickedIndex:null,clicked:null,entries:[]})},[t,r]),M=d.useCallback((P,S)=>g([{key:S,type:Se}],L),[g,L]),N=d.useCallback(P=>a[P.key]??P.name,[a]);return s.jsxRuntimeExports.jsx(_e,{className:l.CSS(n,l.CSS.dropRegion(tt(k,C.A(r)))),value:r,onTagDragStart:M,onTagDragEnd:E,searcher:f,onChange:t,columns:x,emptyContent:h,entryRenderKey:N,...R,...i})},Ce=({columns:e=on,onChange:t,value:n,className:r,data:o,searchOptions:i,...c})=>{const a=fe(),x=mt(),m=ln(e),p=zt(),f=u.useMemoDeepEqualProps(i),h=d.useMemo(()=>{if(!(o!=null&&o.length>0))return a==null?void 0:a.channels.newSearcherWithOptions({rangeKey:p,internal:!1,...f})},[a,p,o==null?void 0:o.length,f]),g=a!=null?void 0:s.jsxRuntimeExports.jsx(u.Text$2.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),E=d.useId(),R=d.useMemo(()=>({key:E,type:"Channel.SelectMultiple"}),[E]),{startDrag:k,onDragEnd:L,...M}=u.useDragAndDrop({type:"Channel.SelectSingle",canDrop:d.useCallback(v=>tt(v,C.o(n)),[n]),onDrop:d.useCallback(({items:v})=>{const B=u.filterByType(Se,v);return B.length===0?[]:(t(B[0].key,{clickedIndex:null,clicked:null,entries:[]}),B)},[R,t])}),N=u.useDraggingState(),P=d.useCallback(()=>n!=null&&k([{type:Se,key:n}]),[k,n]),S=d.useCallback(v=>x[v.key]??v.name,[x]);return s.jsxRuntimeExports.jsx(be,{data:o,className:l.CSS(r,l.CSS.dropRegion(tt(N,C.o(n)))),value:n,onDragStart:P,onDragEnd:L,onChange:t,searcher:h,columns:m,emptyContent:g,entryRenderKey:S,...M,...c})},Qi=Object.freeze(Object.defineProperty({__proto__:null,AliasInput:Yl,AliasProvider:$s,LinePlot:Ui,SelectMultiple:Ji,SelectSingle:Ce,useActiveRange:zt,useAlias:Ns,useAliases:mt,useContext:Ms,useName:jt},Symbol.toStringTag,{value:"Module"})),ve=({path:e,optional:t=!1,onChange:n})=>{const r=we(),{get:o,bind:i,set:c,setStatus:a}=r,[x,m]=d.useState(o(e,{optional:t}));d.useEffect(()=>(m(o(e,{optional:t})),i({path:e,onChange:m,listenToChildren:!1})),[e,n,i,o]);const p=d.useCallback(g=>{n==null||n(g,{...r,path:e}),c(e,g)},[e,c,n]),f=d.useCallback(g=>a(e,g),[e,a]);if(x==null){if(!t)throw new Error(`Field state is null: ${e}`);return null}let h;return r.mode==="preview"&&(h="preview"),{onChange:p,setStatus:f,variant:h,...x}},cn=(e,t=!1,n)=>{const{get:r,bind:o}=we(n),[,i]=d.useState(0);return d.useEffect(()=>(i(c=>c+1),o({path:e,onChange:()=>i(c=>c+1)})),[e,o]),r(e,{optional:t})??null},ec=(e,t=!1,n)=>{var c;const{get:r,bind:o}=we(n),[,i]=d.useState(0);return d.useEffect(()=>(i(a=>a+1),o({path:e,onChange:()=>i(a=>a+1)})),[e,o]),((c=r(e,{optional:t}))==null?void 0:c.value)??null},tc=e=>{var t,n;return((n=(t=cn(e,!0))==null?void 0:t.status)==null?void 0:n.variant)==="success"},sc=({path:e,ctx:t,onChange:n})=>{const r=we(t);d.useEffect(()=>r.bind({path:e,onChange:o=>n(o,r),listenToChildren:!1}),[e,r])},nc=({path:e,optional:t=!1})=>{const{bind:n,get:r}=we(),[o,i]=d.useState(r(e,{optional:t}));if(d.useEffect(()=>(i(r(e,{optional:t})),n({path:e,onChange:c=>i({...c,value:C.U(c.value)}),listenToChildren:!0})),[e,n,r]),o==null&&!t)throw new Error("Field state is null");return(o==null?void 0:o.value)??null},an=(e,t)=>({add:(n,r)=>{const o=C.U(e.get(t).value);o.splice(r,0,...C.A(n)),e.set(t,o,{validateChildren:!1})},push:(n,r)=>{const o=C.U(e.get(t).value);o.push(...C.A(n)),r!=null&&o.sort(r),e.set(t,o,{validateChildren:!1})},remove:n=>{const r=e.get(t).value,o=new Set(C.A(n));e.set(t,r.filter((i,c)=>!o.has(c)))},keepOnly:n=>{const r=e.get(t).value,o=new Set(C.A(n));e.set(t,r.filter((i,c)=>o.has(c)))},set:n=>e.set(t,C.executeSetter(n,e.get(t).value)),sort:n=>{const r=C.U(e.get(t).value);r.sort(n),e.set(t,r)}}),rc=({path:e,updateOnChildren:t=!1,ctx:n})=>{const r=we(n),{bind:o,get:i}=r,[c,a]=d.useState(i(e).value);return d.useEffect(()=>(a(i(e).value),o({path:e,onChange:x=>{a(C.U(x.value))},listenToChildren:t})),[e,o,i,a]),d.useMemo(()=>({value:c,...an(r,e)}),[c,r,e])},Wt=d.createContext({mode:"normal",bind:()=>()=>{},set:()=>{},reset:()=>{},remove:()=>{},get:()=>({value:void 0,status:{key:"",variant:"success",message:""},touched:!1,required:!1}),validate:()=>!1,validateAsync:()=>Promise.resolve(!1),value:()=>({}),has:()=>!1,setStatus:()=>{},clearStatuses:()=>{}}),we=e=>{const t=d.useContext(Wt);return e??t},gs=e=>({key:e,variant:"success",message:""}),oc=e=>e.code===pe.z.ZodIssueCode.custom&&e.params!=null&&"variant"in e.params?e.params.variant:"error",un=({values:e,sync:t=!1,schema:n,mode:r="normal",onChange:o})=>{const i=d.useRef({state:e,statuses:new Map,touched:new Set,listeners:new Map,parentListeners:new Map}),c=u.useSyncedRef(n),a=u.useSyncedRef(o),x=d.useCallback(({path:S,onChange:v,listenToChildren:B=!1})=>{var w;const{parentListeners:T,listeners:$}=i.current,A=B?T:$;return A.has(S)||A.set(S,new Set),(w=A.get(S))==null||w.add(v),()=>{var y;return(y=A.get(S))==null?void 0:y.delete(v)}},[]),m=d.useCallback((S,{optional:v}={optional:!1})=>{const{state:B,statuses:T,touched:$}=i.current,A=C._.get(B,S,{optional:v});if(A==null)return null;const w={value:A,status:T.get(S)??gs(S),touched:$.has(S),required:!1};if(c.current==null)return w;const y=c.current,_=C.N.getFieldSchema(y,S,{optional:!0});return _==null||(w.required=!_.isOptional()),w},[]),p=d.useCallback(S=>{const{state:v,statuses:B,touched:T,listeners:$,parentListeners:A}=i.current;C._.remove(v,S),B.delete(S),T.delete(S),$.delete(S),A.delete(S)},[]),f=d.useCallback(S=>{const{statuses:v,touched:B}=i.current;i.current.state=S,g(""),v.clear(),B.clear()},[]),h=d.useCallback(S=>{var T;const{listeners:v}=i.current,B=m(S,{optional:!0});B!=null&&((T=v.get(S))==null||T.forEach($=>$(B)))},[]),g=d.useCallback(S=>{const{listeners:v,parentListeners:B}=i.current,T=v.get(S);if(S==""&&([...v.keys()].forEach(w=>{var _;const y=m(w,{optional:!0});y!=null&&((_=v.get(w))==null||_.forEach(O=>{O(y)}))}),[...B.keys()].forEach(w=>{var _;const y=m(w,{optional:!0});y!=null&&((_=B.get(w))==null||_.forEach(O=>{O(y)}))})),T!=null){const $=m(S,{optional:!0});$!=null&&T.forEach(A=>{A($)})}B.forEach(($,A)=>{if(C._.pathsMatch(S,A)){const y=m(A,{optional:!0});y!=null&&$.forEach(_=>{_(y)})}})},[]),E=d.useCallback((S,v="",B=!0)=>{const{statuses:T,listeners:$,touched:A}=i.current;if(S.success){const O=[...T.keys()];return T.clear(),O.forEach(Y=>h(Y)),!0}let w=!0;const y=new Set(S.error.issues.map(O=>O.path.join(".")));let _=(O,Y)=>O===Y;return B&&(_=(O,Y)=>C._.pathsMatch(O,Y)),S.error.issues.forEach(O=>{var te;const{message:Y}=O,I=O.path.join(".");if(!_(I,v))return;const G=oc(O);G!=="warning"&&(w=!1),T.set(I,{key:I,variant:G,message:Y}),A.add(I);let z=m(I,{optional:!0});z==null&&(z={value:void 0,status:T.get(I)??gs(I),touched:!1,required:!1}),(te=$.get(I))==null||te.forEach(ce=>ce(z))}),T.forEach((O,Y)=>{y.has(Y)||(T.delete(Y),h(Y))}),w},[]),R=d.useCallback((S,v)=>{if(c.current==null)return!0;const{state:B}=i.current,T=c.current.safeParse(B);return E(T,S,v)},[E]),k=d.useCallback(async(S,v)=>{if(c.current==null)return!0;const{state:B}=i.current,T=await c.current.safeParseAsync(B);return E(T,S,v)},[E]),L=d.useCallback((S,v,B={})=>{const T=C._.get(i.current.state,S,{optional:!0}),{validateChildren:$=!0}=B,{state:A,touched:w}=i.current;w.add(S),S.length===0?i.current.state=v:C._.set(A,S,v),g(S),(async()=>{var _;let y;try{y=R(S,$)}catch{y=await k(S,$)}(_=a.current)==null||_.call(a,{values:i.current.state,path:S,prev:T,valid:y})})()},[]),M=d.useCallback(S=>C._.has(i.current.state,S),[]),N=d.useCallback((S,v)=>{i.current.statuses.set(S,v),i.current.touched.add(S),h(S)},[]),P=d.useCallback(()=>{const{statuses:S}=i.current;S.clear(),S.forEach((v,B)=>h(B))},[]);return d.useEffect(()=>{if(!t)return;const{listeners:S}=i.current;i.current.state=e,S.forEach((v,B)=>{const T=m(B,{optional:!0});T!=null&&v.forEach($=>$(T))})},[t,e]),d.useMemo(()=>({bind:x,set:L,get:m,mode:r,validate:R,validateAsync:k,value:()=>i.current.state,has:M,remove:p,setStatus:N,clearStatuses:P,reset:f}),[x,L,m,R,k,M,p,N,P,f,r])},lc=e=>s.jsxRuntimeExports.jsx(Wt.Provider,{value:e,children:e.children}),ic=u.componentRenderProp(u.Text$1),se=({path:e,children:t=ic,label:n,padHelpText:r=!0,visible:o=!0,hideIfNull:i=!1,optional:c,onChange:a,className:x,...m})=>{const p=ve({path:e,optional:c??i,onChange:a}),f=we();if(p==null)return null;if(e==null)throw new Error("No path provided to Form Field");if(n==null&&(n=l._.capitalize(C._.element(e,-1))),o=typeof o=="function"?o(p,f):o,!o)return null;const h=p.status.message,{onChange:g,value:E}=p,R={onChange:g,value:E};return p.variant!=null&&(R.variant=p.variant),s.jsxRuntimeExports.jsx(me.Item,{padHelpText:r,helpText:h,helpTextVariant:p.status.variant,label:n,required:p.required,className:l.CSS(x,l.CSS.BE("field",e.split(".").join("-")),l.CSS.M(p.status.variant)),...m,children:t(R)})},Te=e=>({fieldKey:t,fieldProps:n,inputProps:r})=>{const o=({inputProps:i,path:c,fieldKey:a=t,...x})=>s.jsxRuntimeExports.jsx(se,{...n,...x,path:a?`${c}.${a}`:c,children:m=>s.jsxRuntimeExports.jsx(e,{...m,...r,...i})});return o.displayName=e.displayName,o},xn=Te(u.Numeric),Kt=xn({}),dn=Te(u.Text$1),pn=dn({}),mn=Te(u.Switch$1),Xt=mn({}),cc=Te(be),ac=Te(_e),uc=Te(de.DropdownButton),Jt=({key:e,open:t,onChange:n})=>{const r=u.useMemoPrimitiveArray(e);u.useAsyncEffect(async()=>{if(t==null)return;const o=await t();if(o!=null)return o.onChange(n),async()=>await o.close()},[t==null,r])},xc=({fetchInitialValue:e,...t})=>{const[n,r]=d.useState(void 0);return u.useAsyncEffect(async()=>{r(await e())},[e]),Jt({...t,onChange:r}),n},dc=Object.freeze(Object.defineProperty({__proto__:null,useListener:Jt,useState:xc},Symbol.toStringTag,{value:"Module"})),pc=({key:e,name:t,queryFn:n,values:r,openObservable:o,applyChanges:i,applyObservable:c,...a})=>{const x=fe(),m=u.useAggregator(),p=u.useMemoPrimitiveArray(e),f=un({values:r,...a,sync:!1,onChange:E=>{x!=null&&(async()=>{try{await(i==null?void 0:i({...E,client:x}))}catch(R){m({variant:"error",message:`Failed to save ${t}`,description:R.message})}})()}});u.useAsyncEffect(async()=>{if(x!=null)try{const E=await n({client:x});f.set("",E)}catch(E){m({variant:"error",message:`Failed to retrieve ${t}`,description:E.message})}},[p,x==null?void 0:x.key]);const h=d.useCallback(async()=>{if(x!=null)return await(o==null?void 0:o(x))},[p,x==null?void 0:x.key]),g=d.useCallback(E=>c==null?void 0:c({changes:E,ctx:f}),[p,c]);return Jt({key:p,open:h,onChange:g}),f},mc=Object.freeze(Object.defineProperty({__proto__:null,Context:Wt,Field:se,Form:lc,NumericField:Kt,SwitchField:Xt,TextField:pn,buildDropdownButtonSelectField:uc,buildNumericField:xn,buildSelectMultiField:ac,buildSelectSingleField:cc,buildSwitchField:mn,buildTextField:dn,fieldArrayUtils:an,fieldBuilder:Te,use:un,useChildFieldValues:nc,useContext:we,useField:ve,useFieldArray:rc,useFieldListener:sc,useFieldState:cn,useFieldValid:tc,useFieldValue:ec,useSynced:pc},Symbol.toStringTag,{value:"Module"})),jc=[{key:"name",name:"Name"},{key:"location",name:"Location"}],fc=({searchOptions:e,...t})=>{const n=fe();let r=n==null?void 0:n.hardware.devices;return e!=null&&n!=null&&(r=n.hardware.devices.newSearcherWithOptions(e)),s.jsxRuntimeExports.jsx(be,{columns:jc,searcher:r,entryRenderKey:"name",...t})},gc=Object.freeze(Object.defineProperty({__proto__:null,SelectSingle:fc},Symbol.toStringTag,{value:"Module"})),Me="label",Qt=[{key:"color",name:"Color",render:({entry:e})=>s.jsxRuntimeExports.jsx(u.Ut.Circle,{name:"circle",color:e.color,style:{height:"2.5rem",width:"2.5rem"}})},{key:"name",name:"Name"}],st=({items:e},t)=>{const n=u.filterByType(Me,e);return n.length>0&&!n.every(r=>t.includes(r.key))},hc=({entry:e,loading:t,entryKey:n,entryRenderKey:r,...o})=>s.jsxRuntimeExports.jsx(Ze,{color:e==null?void 0:e.color,...o,children:e==null?void 0:e.name}),Sc=u.componentRenderProp(hc),Ec=({onChange:e,className:t,value:n,...r})=>{const o=fe(),i=o!=null?void 0:s.jsxRuntimeExports.jsx(u.Text$2.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),{startDrag:c,onDragEnd:a,...x}=u.useDragAndDrop({type:"Label.SelectMultiple",canDrop:d.useCallback(h=>st(h,C.A(n)),[n]),onDrop:d.useCallback(({items:h})=>{const g=u.filterByType(Me,h);if(g.length===0)return[];const E=C.n([...C.A(n),...g.map(R=>R.key)]);return e(E,{clickedIndex:null,clicked:null,entries:[]}),g},[e,n])}),m=u.useDraggingState(),p=d.useCallback(({dropped:h})=>{e(C.A(n).filter(g=>!h.some(E=>E.key===g)),{clickedIndex:null,clicked:null,entries:[]})},[e,n]),f=d.useCallback((h,g)=>c([{key:g,type:Me}],p),[c,p]);return s.jsxRuntimeExports.jsx(_e,{className:l.CSS(t,l.CSS.dropRegion(st(m,C.A(n)))),value:n,onTagDragStart:f,onTagDragEnd:a,searcher:o==null?void 0:o.labels,onChange:e,columns:Qt,emptyContent:i,renderTag:Sc,addPlaceholder:"Label",...x,...r})},jn=({value:e,onChange:t})=>{const n=fe(),r=n!=null?void 0:s.jsxRuntimeExports.jsx(u.Text$2.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),o=d.useId(),i=d.useMemo(()=>({key:o,type:"Label.SelectMultiple"}),[o]),c=u.useDragAndDrop({type:"Label.SelectSingle",canDrop:d.useCallback(m=>st(m,C.o(e)),[e]),onDrop:d.useCallback(({items:m})=>{const p=u.filterByType(Me,m);return p.length===0?[]:(t(p[0].key,{clickedIndex:null,clicked:null,entries:[]}),p)},[i,t])}),a=u.useDraggingState(),x=d.useCallback(()=>e!=null&&c.startDrag([{type:Me,key:e}]),[c.startDrag,e]);return{emptyContent:r,dragging:a,...c,onDragStart:x,searcher:n==null?void 0:n.labels}},Rc=({onChange:e,value:t,className:n,data:r,...o})=>{const{dragging:i,...c}=jn({value:t,onChange:e});return s.jsxRuntimeExports.jsx(be,{data:r,className:l.CSS(n,l.CSS.dropRegion(st(i,C.o(t)))),value:t,onChange:e,columns:Qt,entryRenderKey:"name",...c,...o})},yc=({data:e,value:t,onChange:n,...r})=>{const{dragging:o,...i}=jn({value:t,onChange:n});return s.jsxRuntimeExports.jsx(be,{data:e,value:t,onChange:n,columns:Qt,entryRenderKey:"name",...i,...r})},Cc=Object.freeze(Object.defineProperty({__proto__:null,HAUL_TYPE:Me,SelectButton:yc,SelectMultiple:Ec,SelectSingle:Rc},Symbol.toStringTag,{value:"Module"})),fn=({children:e,centered:t,visible:n,enabled:r=!0,close:o,style:i,...c})=>{const a=d.useRef(null);return u.useClickOutside({ref:a,exclude:x=>u.findParent(x.target,p=>p.getAttribute("role")==="dialog")!=null,onClickOutside:o}),u.use$1({triggers:[["Escape"]],callback:o,loose:!0}),s.jsxRuntimeExports.jsx(D.Space,{className:l.CSS(l.CSS.BE("modal","bg"),l.CSS.visible(n),r&&l.CSS.M("enabled-modal")),empty:!0,align:"center",children:s.jsxRuntimeExports.jsx(D.Space,{className:l.CSS(l.CSS.BE("modal","dialog"),t&&l.CSS.M("centered")),role:"dialog",empty:!0,ref:a,...c,style:{zIndex:r?11:void 0,...i},children:s.jsxRuntimeExports.jsx(D.Space,{className:l.CSS(l.CSS.BE("modal","content")),empty:!0,children:e})})})},bc=({root:e,...t})=>_t.createPortal(s.jsxRuntimeExports.jsx(fn,{...t}),u.getRootElement(e)),vc=Object.freeze(Object.defineProperty({__proto__:null,Dialog:fn,Modal:bc},Symbol.toStringTag,{value:"Module"})),gt=new Error("Tab not found"),wc=new Error("Invalid Mosaic"),nt=(e,t,n="center",r)=>{var f;if(e=Re(e),r===void 0)return kt(e,t);const o=Tt(e,r);if(n==="center")return(f=o.tabs)==null||f.push(t),o.selected=t.tabKey,e;const i=o.key*2,c=o.key*2+1,a=n==="top"||n==="left"?i:c;if(Tt(e,a).key!==o.key)return nt(e,t,"center",a);if(o.tabs==null||o.tabs.length===0)return nt(e,t,"center",r);const[x,m,p]=Nc(n);if(o.direction=p,o[x]={key:0,tabs:[t],selected:t.tabKey},o[m]={key:0,tabs:o.tabs,selected:o.selected},o.first==null||o.last==null)throw wc;return o.first.key=i,o.last.key=c,o.tabs=void 0,o.size=void 0,o.selected=void 0,e},Pc=(e,t,n)=>{var i;e=Re(e);const[r,o]=Pe(e,t);if(r==null||o==null)throw gt;return o.tabs=(i=o.tabs)==null?void 0:i.map(c=>c.tabKey===t?n(c):c),e},kt=(e,t)=>(e=Re(e),e.tabs!=null?(e.tabs.push(t),e.selected=t.tabKey,e):(e.first!=null?e.first=kt(e.first,t):e.last!=null&&(e.last=kt(e.last,t)),e)),rt=e=>{e=Re(e);const t=[];if(e.tabs!=null&&(e.selected=ne.resetSelection(e.selected,e.tabs),e.selected!=null&&t.push(e.selected)),e.first!=null){const[n,r]=rt(e.first);e.first=n,t.push(...r)}if(e.last!=null){const[n,r]=rt(e.last);e.last=n,t.push(...r)}return[e,t]},es=(e,t)=>{var o;e=Re(e);const[,n]=Pe(e,t);if(n==null)return[e,null];n.tabs=(o=n.tabs)==null?void 0:o.filter(i=>i.tabKey!==t),n.selected=ne.resetSelection(n.selected,n.tabs),e=Mc(e);const r=n.selected??ot(e);return[e,r]},ot=e=>e.selected!=null?e.selected:e.first!=null?ot(e.first):e.last!=null?ot(e.last):null,gn=(e,t)=>{e=Re(e);const[n,r]=Pe(e,t);if(n==null||r==null)throw gt;return r.selected=t,e},hn=(e,t,n,r)=>{e=Re(e);const[o,i]=Pe(e,t);if(o==null||i==null)throw gt;const[c,a]=es(e,t);return[nt(c,o,n,r),a]},Fe=(e,t)=>{if(e.tabs!=null)return e.tabs.some(n=>n.tabKey===t)?e:void 0;if(e.first!=null){const n=Fe(e.first,t);if(n!=null)return n}if(e.last!=null){const n=Fe(e.last,t);if(n!=null)return n}},Sn=(e,t,n)=>{const r=lt(e,t);if(r==null)throw new Error("Node not found");return r.size=n,e},kc=(e,t,n)=>{e=Re(e);const r=Fe(e,t);if(r==null)throw new Error("Tab not found");if(r.tabs==null||r.tabs.length===0)throw new Error("Node has no tabs");const o=r.tabs.findIndex(p=>p.tabKey===t);if(o===-1)throw new Error("Tab not found in node");const i=r.tabs[o];r.tabs=r.tabs.filter(p=>p.tabKey!==t);const c=r.key*2,x={key:r.key*2+1,tabs:[i],selected:i.tabKey},m={key:c,tabs:r.tabs,selected:r.selected};return m.selected=ne.resetSelection(m.selected,m.tabs),r.direction=n,r.first=m,r.last=x,r.tabs=void 0,r.selected=void 0,e},Tc=(e,t)=>{const n=Fe(e,t);return n==null?!1:n.tabs!=null&&n.tabs.length>1},En=(e,t,n)=>{e=Re(e);const[,r]=Pe(e,t);if((r==null?void 0:r.tabs)==null)throw gt;return r.tabs=ne.rename(t,n,(r==null?void 0:r.tabs)??[]),e},Lc=e=>e.tabs!=null?e.tabs.length===0:e.first==null&&e.last==null,Tt=(e,t)=>{const n=lt(e,t);if(n!=null)return n;const r=Math.floor(t/2);return r===0?e:Tt(e,r)},Mc=e=>{let t=!0;for(;t;)[e,t]=Lt(e);return e.first==null&&e.last==null&&(e.key=1),e},Lt=e=>{if(e.first==null||e.last==null)return[e,!1];if(Ss(e.first))return[hs(e.last,!0),!0];if(Ss(e.last))return[hs(e.first,!1),!0];let[t,n]=[!1,!1];return[e.first,t]=Lt(e.first),[e.last,n]=Lt(e.last),[e,t||n]},hs=(e,t)=>(e.size=void 0,e.key=(e.key-Number(t))/2,e),Ss=e=>e.first==null&&e.last==null&&(e.tabs==null||e.tabs.length===0),Pe=(e,t)=>{if(e.tabs!=null){const c=e.tabs.find(a=>a.tabKey===t);if(c!=null)return[c,e]}if(e.first==null||e.last==null)return[void 0,void 0];const[n,r]=Pe(e.first,t);if(n!=null&&r!=null)return[n,r];const[o,i]=Pe(e.last,t);return[o,i]},lt=(e,t)=>{if(e.key===t)return e;if(e.first==null||e.last==null)return;const n=lt(e.first,t);return n??lt(e.last,t)},Nc=e=>{switch(e){case"top":return["first","last","y"];case"left":return["first","last","x"];case"bottom":return["last","first","y"];case"right":return["last","first","x"];case"center":throw new Error("cannot split a center placed tab")}},Re=e=>C._.copy(e),it=(e,t,n=[])=>(n.push(t(e)),e.first!=null&&it(e.first,t,n),e.last!=null&&it(e.last,t,n),n),Mt=(e,t)=>{t(e),e.first!=null&&Mt(e.first,t),e.last!=null&&Mt(e.last,t)};class Rn{constructor(t={}){he(this,"parent");he(this,"stub");he(this,"el");this.el=document.createElement("div"),Object.entries(t).forEach(([n,r])=>this.el.setAttribute(n,r))}mount(t,n){n!==this.stub&&(this.unmount(null),t.replaceChild(this.el,n),this.parent=t,this.stub=n)}unmount(t){t!=null&&t!==this.stub||this.parent==null||this.stub==null||(this.parent.replaceChild(this.stub,this.el),this.parent=void 0,this.stub=void 0)}}const $c=({node:e})=>{const t=d.createRef(),n=d.useRef(e);return d.useEffect(()=>{const r=t.current;if(r==null)return;const o=r.parentNode;if(o!=null)return e.mount(o,r),()=>{t.current!=null&&e.unmount(t.current)}},[]),d.useEffect(()=>{n.current!=null&&e!==n.current&&(n.current.unmount(t.current),n.current=e);const r=t.current;if(r==null)return;const o=r.parentNode;o!=null&&e.mount(o,r)},[e]),s.jsxRuntimeExports.jsx("div",{ref:t})},yn=({node:e,children:t})=>_t.createPortal(t,e.el),_c=Object.freeze(Object.defineProperty({__proto__:null,In:yn,Node:Rn,Out:$c},Symbol.toStringTag,{value:"Module"})),ct=d.memo(e=>{const{onResize:t,...n}=e,{root:{tabs:r,direction:o,first:i,last:c,key:a,size:x},emptyContent:m,...p}=n,f=d.useCallback(([E])=>t(a,E),[t]),{props:h}=Bt({direction:o,onResize:f,count:2,initialSizes:x!=null?[x]:void 0});let g;return r!==void 0?g=s.jsxRuntimeExports.jsx(Cn,{emptyContent:m,...n}):i!=null&&c!=null?g=s.jsxRuntimeExports.jsxs(dt,{id:`mosaic-${a}`,align:"stretch",className:l.CSS.BE("mosaic","resize"),...h,children:[s.jsxRuntimeExports.jsx(ct,{...p,root:i,onResize:t},i.key),s.jsxRuntimeExports.jsx(ct,{...p,root:c,onResize:t},c.key)]}):(g=null,console.warn("Mosaic tree is malformed")),a===1?s.jsxRuntimeExports.jsx(u.Provider$2,{children:g}):g});ct.displayName="Mosaic";const at="pluto-mosaic-tab-drop",ts="pluto-mosaic-tab-create",Bc=(e,t,n)=>{if(u.filterByType(u.FILE_TYPE,t).length>0&&n)return!0;const o=u.filterByType(at,t).map(a=>a.key),i=e.filter(a=>!o.includes(a.tabKey)).length>0;return u.filterByType(ts,t).length>0||o.length>0&&(i||e.length===0)},Cn=d.memo(({root:e,onDrop:t,onCreate:n,activeTab:r,children:o,onFileDrop:i,...c})=>{const{key:a,tabs:x}=e,[m,p]=d.useState(null),f=i!=null,h=d.useCallback(({items:S})=>Bc(x,S,f),[x,f]),g=d.useCallback(({items:S,event:v})=>{if(v==null)return[];p(null);const B=u.filterByType(u.FILE_TYPE,S).length>0,T=x.length===0?"center":Rs(Es(v));if(B)return i==null||i(a,T,v),S;const $=u.filterByType(at,S);if($.length>0){const w=$.map(({key:y})=>y)[0];t(a,w,T)}const A=u.filterByType(ts,S);if(A.length>0){const w=A.map(({key:y})=>y);n==null||n(a,T,w)}return $},[t,x.length]),E=d.useCallback(({event:S})=>{if(S==null)return;const v=x.length===0?"center":Rs(Es(S));p(v)},[x.length]),{startDrag:R,...k}=u.useDragAndDrop({type:"Mosaic",canDrop:h,onDrop:g,onDragOver:E}),L=h(u.useDraggingState()),M=d.useCallback(()=>p(null),[]),N=d.useCallback((S,{tabKey:v})=>{R([{key:v,type:at,elementID:S.currentTarget.id}])},[R]),P=d.useCallback(()=>n==null?void 0:n(a,"center"),[a]);return s.jsxRuntimeExports.jsxs("div",{id:`mosaic-${a}`,className:l.CSS.BE("mosaic","leaf"),children:[s.jsxRuntimeExports.jsxs(ne.Tabs,{id:`tab-${a}`,tabs:x,onDragLeave:M,selected:e.selected,selectedAltColor:r===e.selected,onDragStart:N,onCreate:P,...c,...k,children:[e.selected!=null&&o(x.find(S=>S.tabKey===e.selected)),L&&s.jsxRuntimeExports.jsx("div",{style:{zIndex:1e3,position:"absolute",top:0,left:0,width:"100%",height:"100%"}})]}),m!=null&&s.jsxRuntimeExports.jsx("div",{className:l.CSS.BE("mosaic","mask"),style:Ac[m]})]})});Cn.displayName="MosaicTabLeaf";const Ac={top:{left:"0%",top:"0%",width:"100%",height:"50%"},bottom:{left:"0%",top:"50%",width:"100%",height:"50%"},left:{left:"0%",top:"0%",width:"50%",height:"100%"},right:{left:"50%",top:"0%",width:"50%",height:"100%"},center:{left:"0%",top:"0%",width:"100%",height:"100%"}},Es=e=>{const t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;return r<24?{px:.5,py:.5}:{px:n/t.width,py:r/t.height}},zc=e=>e,Oc=e=>1-e,Rs=({px:e,py:t})=>{if(e>.33&&e<.66&&t>.33&&t<.66)return"center";const[n,r]=[zc(e),Oc(e)];if(t>n&&t>r)return"bottom";if(t<n&&t<r)return"top";if(t>n&&t<r)return"left";if(t<n&&t>r)return"right";throw new Error("[bug] - invalid insert position")},Dc=({root:e,onSelect:t,children:n})=>{const r=d.useRef(new Map),o=new Set,i=it(e,c=>{var a;return(a=c.tabs)==null?void 0:a.map(x=>{let m=r.current.get(x.tabKey);return x==null?null:(m==null&&(m=new Rn({style:"width: 100%; height: 100%; position: relative;"}),m.el.addEventListener("click",()=>t==null?void 0:t(x.tabKey)),r.current.set(x.tabKey,m)),o.add(x.tabKey),s.jsxRuntimeExports.jsx(yn,{node:m,children:n({...x,visible:x.tabKey===c.selected})},x.tabKey))})}).flat().filter(c=>c!=null);return r.current.forEach((c,a)=>!o.has(a)&&r.current.delete(a)),[r,i]},Vc=pe.z.object({key:pe.z.number(),tabs:pe.z.array(ne.tabZ).optional(),selected:pe.z.string().optional(),direction:l.g.direction.optional(),size:pe.z.number().optional()}),Nt=Vc.extend({first:pe.z.lazy(()=>Nt).optional(),last:pe.z.lazy(()=>Nt).optional()}),Ic=({allowRename:e=!1,initialTree:t})=>{const[n,r]=d.useState(t);return d.useEffect(()=>r(rt(t)[0]),[t]),{root:n,onDrop:(m,p,f)=>r(h=>hn(h,p,f,m)[0]),onClose:m=>r(p=>es(p,m)[0]),onSelect:m=>r(p=>gn(p,m)),onResize:(m,p)=>r(f=>Sn(f,m,p)),onRename:e?(m,p)=>r(f=>En(f,m,p)):void 0}},Zc=Object.freeze(Object.defineProperty({__proto__:null,HAUL_CREATE_TYPE:ts,HAUL_DROP_TYPE:at,Mosaic:ct,autoSelectTabs:rt,canSplit:Tc,findSelected:ot,findTabNode:Fe,forEachNode:Mt,insertTab:nt,isEmpty:Lc,mapNodes:it,moveTab:hn,nodeZ:Nt,removeTab:es,renameTab:En,resizeNode:Sn,selectTab:gn,split:kc,updateTab:Pc,use:Ic,usePortal:Dc},Symbol.toStringTag,{value:"Module"})),Fc=({location:e="left",size:t="9rem",className:n,style:r,...o})=>{const i=l.J.construct(e),c=l.J.direction(i),a=l.g.swap(c);return s.jsxRuntimeExports.jsx(D.Space,{className:l.CSS(l.CSS.B("navbar"),l.CSS.bordered(l.J.swap(i)),l.CSS.dir(a),l.CSS.loc(i),n),direction:a,style:{[l.g.dimension(c)]:t,...r},align:"center",empty:!0,...o})},He=e=>({bordered:t=!1,className:n,...r})=>s.jsxRuntimeExports.jsx(D.Space,{className:l.CSS(l.CSS.BE("navbar","content"),e==="absolute-center"?l.CSS.M(e):l.CSS.align(e),e!==""&&t&&l.CSS.bordered(e),n),align:"center",...r}),bn=He("start");bn.displayName="NavbarStart";const vn=He("end");vn.displayName="NavbarEnd";const wn=He("center");wn.displayName="NavbarCenter";const Pn=He("");Pn.displayName="NavbarContent";const kn=He("absolute-center");kn.displayName="NavbarAbsoluteCenter";const Be=Fc;Be.Start=bn;Be.Center=wn;Be.End=vn;Be.AbsoluteCenter=kn;Be.Content=Pn;const ss=({aetherKey:e})=>{const[,{region:t},n]=u.use$3({aetherKey:e,type:j.Eraser$1.TYPE,schema:j.eraserStateZ,initialState:{region:l.To.ZERO,enabled:!0}}),r=u.useSyncedRef(t),o=d.useCallback(c=>{l.To.equals(c,r.current)||n(a=>({...a,region:c}))},[n]);return{setEnabled:d.useCallback(c=>n(a=>({...a,enabled:c})),[n]),erase:o}},qc=u.wrap$1(j.Eraser$1.TYPE,({aetherKey:e,children:t})=>{const{erase:n}=ss({aetherKey:e}),r=u.useResize(n);return s.jsxRuntimeExports.jsx("div",{ref:r,className:l.CSS(l.CSS.inheritDims()),children:t})}),Uc=Object.freeze(Object.defineProperty({__proto__:null,Eraser:qc,use:ss},Symbol.toStringTag,{value:"Module"})),Hc=({items:e,initialKey:t})=>{const[n,r]=d.useState(t),o=c=>r(c===n?void 0:c),i=e.find(c=>c.key===n);return{onSelect:o,activeItem:i}},Yc=u.wrap$1("Nav.Drawer",({aetherKey:e,activeItem:t,children:n,onSelect:r,location:o="left",collapseThreshold:i=.65,className:c,onResize:a,...x})=>{const m=l.J.direction(o),p=d.useCallback(()=>t!=null&&(r==null?void 0:r(t.key)),[r,t==null?void 0:t.key]),{erase:f,setEnabled:h}=ss({aetherKey:e}),g=d.useCallback((L,M)=>{a==null||a(L,M),f(M)},[a,f]);if(d.useLayoutEffect(()=>{h(t!=null)},[t,h]),t==null)return null;const{content:E,key:R,...k}=t;return s.jsxRuntimeExports.jsx(Ps,{className:l.CSS(l.CSS.BE("navdrawer","content"),l.CSS.dir(m),c),collapseThreshold:i,onCollapse:p,location:o,onResize:g,...k,...x,children:t.content},R)}),Gc=Object.freeze(Object.defineProperty({__proto__:null,Bar:Be,Drawer:Yc,useDrawer:Hc},Symbol.toStringTag,{value:"Module"})),Wc=({variant:e,className:t,children:n,...r})=>s.jsxRuntimeExports.jsx(D.Space,{className:l.CSS(t,l.CSS.B("note"),l.CSS.M(e)),align:"stretch",empty:!0,...r,children:n}),Kc=Object.freeze(Object.defineProperty({__proto__:null,Note:Wc},Symbol.toStringTag,{value:"Module"})),Ct={Close:s.jsxRuntimeExports.jsxs("svg",{width:"124",height:"124",viewBox:"0 0 124 124",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsxRuntimeExports.jsx("rect",{x:"26.8701",y:"88.3883",width:"87",height:"11",transform:"rotate(-45 26.8701 88.3883)",fill:"#7E0508"}),s.jsxRuntimeExports.jsx("rect",{x:"26.8701",y:"34.6482",width:"11",height:"87",transform:"rotate(-45 26.8701 34.6482)",fill:"#7E0508"})]}),Minimize:s.jsxRuntimeExports.jsx("svg",{width:"87",height:"11",viewBox:"0 0 87 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsxRuntimeExports.jsx("rect",{x:"15",width:"60",height:"11",fill:"#985712"})}),Maximize:s.jsxRuntimeExports.jsxs("svg",{width:"143",height:"143",viewBox:"0 0 143 143",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsxRuntimeExports.jsx("path",{d:"M108.242 32.8833C108.797 32.8817 109.247 33.3317 109.245 33.8862L109.092 87.5891C109.09 88.4786 108.014 88.9223 107.385 88.2933L53.8351 34.7432C53.2061 34.1142 53.6499 33.0387 54.5394 33.0361L108.242 32.8833Z",fill:"#0B650D"}),s.jsxRuntimeExports.jsx("path",{d:"M33.8862 109.245C33.3317 109.247 32.8818 108.797 32.8833 108.242L33.0361 54.5394C33.0387 53.6499 34.1142 53.2061 34.7432 53.8351L88.2934 107.385C88.9223 108.014 88.4786 109.09 87.5891 109.092L33.8862 109.245Z",fill:"#0B650D"})]})},Xc=({disabled:e=[],className:t,focused:n=!0,onMinimize:r,onMaximize:o,onFullscreen:i,onClose:c,...a})=>s.jsxRuntimeExports.jsxs(D.Space,{size:1.5,direction:"x",className:l.CSS(l.CSS.B("macos-controls"),!n&&l.CSS.BM("macos-controls","blurred"),t),...a,children:[s.jsxRuntimeExports.jsx(bt,{onClick:c,className:l.CSS.BM("macos-control","close"),disabled:e.includes("close"),children:Ct.Close}),s.jsxRuntimeExports.jsx(bt,{onClick:r,className:l.CSS.BM("macos-control","minimize"),disabled:e.includes("minimize"),children:Ct.Minimize}),s.jsxRuntimeExports.jsx(bt,{onClick:i,className:l.CSS.BM("macos-control","maximize"),disabled:e.includes("maximize"),children:Ct.Maximize})]}),bt=({className:e,disabled:t,color:n,...r})=>s.jsxRuntimeExports.jsx("button",{className:l.CSS(l.CSS.B("macos-control"),l.CSS.disabled(t),e),tabIndex:-1,disabled:t,size:"",...r}),vt=({disabled:e=[],onMinimize:t,onMaximize:n,onClose:r,onFullscreen:o,focused:i,...c})=>s.jsxRuntimeExports.jsxs(D.Pack,{...c,children:[s.jsxRuntimeExports.jsx(wt,{className:l.CSS.BM("windows-control","minimize"),onClick:t,disabled:e.includes("minimize"),children:s.jsxRuntimeExports.jsx(u.Ut.Subtract,{})}),s.jsxRuntimeExports.jsx(wt,{className:l.CSS.BM("windows-control","maximize"),onClick:n,disabled:e.includes("maximize"),children:s.jsxRuntimeExports.jsx(u.Ut.Box,{})}),s.jsxRuntimeExports.jsx(wt,{onClick:r,className:l.CSS.BM("windows-control","close"),disabled:e.includes("close"),children:s.jsxRuntimeExports.jsx(u.Ut.Close,{})})]}),wt=({disabled:e=!1,className:t,...n})=>e?null:s.jsxRuntimeExports.jsx(u.Icon,{className:l.CSS(l.CSS.B("windows-control"),t),tabIndex:-1,...n}),Tn=e=>C.w.getOS(e),Jc={MacOS:Xc,Windows:vt,Linux:vt,Docker:vt},Qc="Windows",ea=({forceOS:e,visibleIfOS:t,...n})=>{const r=Tn({force:e,default:Qc}),o=Jc[r];return t!=null&&t!==r?null:s.jsxRuntimeExports.jsx(o,{...n})},ta=Object.freeze(Object.defineProperty({__proto__:null,Controls:ea,use:Tn},Symbol.toStringTag,{value:"Module"}));d.createContext({instrumentation:C.B.NOOP});const sa=u.wrap$1(j.Provider$2.TYPE,({aetherKey:e,children:t,...n})=>{const r=u.useMemoDeepEqualProps(n),[{path:o},,i]=u.use$3({aetherKey:e,type:j.Provider$2.TYPE,schema:j.providerStateZ$1,initialState:r});return d.useEffect(()=>{i(r)},[r,i]),s.jsxRuntimeExports.jsx(u.Composite,{path:o,children:t})}),na="data:video/mp2t;base64,Ly8gQ29weXJpZ2h0IDIwMjQgU3lubmF4IExhYnMsIEluYy4KLy8KLy8gVXNlIG9mIHRoaXMgc29mdHdhcmUgaXMgZ292ZXJuZWQgYnkgdGhlIEJ1c2luZXNzIFNvdXJjZSBMaWNlbnNlIGluY2x1ZGVkIGluIHRoZSBmaWxlCi8vIGxpY2Vuc2VzL0JTTC50eHQuCi8vCi8vIEFzIG9mIHRoZSBDaGFuZ2UgRGF0ZSBzcGVjaWZpZWQgaW4gdGhhdCBmaWxlLCBpbiBhY2NvcmRhbmNlIHdpdGggdGhlIEJ1c2luZXNzIFNvdXJjZQovLyBMaWNlbnNlLCB1c2Ugb2YgdGhpcyBzb2Z0d2FyZSB3aWxsIGJlIGdvdmVybmVkIGJ5IHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAsCi8vIGluY2x1ZGVkIGluIHRoZSBmaWxlIGxpY2Vuc2VzL0FQTC50eHQuCgppbXBvcnQgeyBwbHV0byB9IGZyb20gIkAvcGx1dG8vYWV0aGVyIjsKCnBsdXRvLnJlbmRlcigpOwo=",Ln=u.wrap$1(j.BaseProvider.TYPE,({children:e,aetherKey:t})=>{const[{path:n}]=u.use$3({aetherKey:t,type:j.BaseProvider.TYPE,schema:j.providerStateZ$2,initialState:{}});return s.jsxRuntimeExports.jsx(u.Composite,{path:n,children:e})}),ra=Object.freeze(Object.defineProperty({__proto__:null,Provider:Ln},Symbol.toStringTag,{value:"Module"})),oa=e=>{var t,n;switch(e.variant){case"disabled":return((t=e.data)==null?void 0:t.valid)===!0?{message:"Uncontrolled. Click to take control.",chipColor:"var(--pluto-gray-l10)"}:{message:"No channel connected. This element cannot be controlled.",chipColor:"var(--pluto-gray-l5)",disabled:!0};case"error":return{message:"Not controlled by you. Click to take absolute control.",chipColor:"var(--pluto-error-z)"};case"success":return((n=e.data)==null?void 0:n.authority)===C.Rf.Authority.Absolute.valueOf()?{message:"You have absolute control. Click to release.",chipColor:"var(--pluto-secondary-z)",buttonStyle:{background:"var(--pluto-secondary-z-30)"}}:{message:"You're in control. Release P&ID to release control.",chipColor:"var(--pluto-primary-z)"};default:return{message:"Unexpected status.",chipColor:"var(--pluto-error-z)"}}},Mn=u.wrap$1("Chip",({aetherKey:e,source:t,sink:n,className:r,...o})=>{const i=u.useMemoDeepEqualProps({source:t,sink:n}),[,{status:c},a]=u.use$3({aetherKey:e,type:j.Chip.TYPE,schema:j.chipStateZ,initialState:{triggered:!1,...i,status:{key:"no_chip",variant:"disabled",message:"No chip connected.",time:C.m.now()}}});d.useEffect(()=>{a(g=>({...g,...i}))},[i,a]);const x=d.useCallback(()=>a(g=>({...g,triggered:!g.triggered})),[a]),{message:m,chipColor:p,buttonStyle:f,disabled:h}=oa(c);return s.jsxRuntimeExports.jsx(u.Icon,{variant:"text",className:l.CSS(l.CSS.B("control-chip"),r),disabled:h,onClick:x,tooltip:s.jsxRuntimeExports.jsx(u.Text,{level:"small",children:m}),style:f,...o,children:s.jsxRuntimeExports.jsx(u.Ut.Circle,{color:p})})}),Nn=d.createContext({needsControlOf:[]}),$n=()=>d.useContext(Nn),la=u.wrap$1(j.Controller$1.TYPE,({aetherKey:e,children:t,onStatusChange:n,...r})=>{const o=u.useMemoDeepEqualProps(r),[{path:i},{status:c,needsControlOf:a},x]=u.use$3({aetherKey:e,type:j.Controller$1.TYPE,schema:j.controllerStateZ,initialState:o});return d.useEffect(()=>{c!=null&&(n==null||n(c))},[c,n]),d.useEffect(()=>{x(m=>({...m,...o}))},[o,x]),d.useEffect(()=>()=>n==null?void 0:n("released"),[]),s.jsxRuntimeExports.jsxs(Nn.Provider,{value:{needsControlOf:a},children:[s.jsxRuntimeExports.jsx(u.Composite,{path:i,children:t}),";"]})}),_n=u.wrap$1(j.Indicator.TYPE,({aetherKey:e,colorSource:t,statusSource:n})=>{var x;const r=u.useMemoDeepEqualProps({colorSource:t,statusSource:n}),[,{color:o,status:i},c]=u.use$3({aetherKey:e,type:j.Indicator.TYPE,initialState:{...r,status:{key:"no_chip",variant:"warning",message:"No chip connected.",time:C.m.now()}},schema:j.indicatorStateZ});d.useEffect(()=>{c(m=>({...m,...r}))},[r,c]);let a;return((x=i.data)==null?void 0:x.color)!=null?a=l.Color.z.parse(i.data.color):o!=null&&!o.isZero?a=o:a="var(--pluto-gray-l8)",s.jsxRuntimeExports.jsxs(u.Dialog$1,{location:{x:"center",y:"bottom"},children:[s.jsxRuntimeExports.jsx(u.Text,{level:"p",children:i.message}),s.jsxRuntimeExports.jsx("div",{className:l.CSS.B("indicator"),style:{backgroundColor:l.cssString(a),flexGrow:1}})]})}),ia=u.wrap$1(j.Legend.TYPE,({aetherKey:e,...t})=>{const{needsControlOf:n}=$n(),[,{states:r},o]=u.use$3({aetherKey:e,type:j.Legend.TYPE,schema:j.legendStateZ,initialState:{states:[],needsControlOf:n}});d.useEffect(()=>{o(a=>({...a,needsControlOf:n}))},[n]);const c=C.n(r.map(a=>a.subject.key)).map(a=>{const x=r.find(m=>m.subject.key===a);if(x==null)throw new C.Re("Legend subject not found");return{key:x.subject.key,label:x.subject.name,color:x.subjectColor}});return s.jsxRuntimeExports.jsx(Zt,{data:c,...t})}),Bn=u.wrap$1(j.StateProvider.TYPE,({aetherKey:e,children:t})=>{const[{path:n}]=u.use$3({aetherKey:e,type:j.StateProvider.TYPE,schema:j.stateProviderStateZ,initialState:{}});return s.jsxRuntimeExports.jsx(u.Composite,{path:n,children:t})}),ca=Object.freeze(Object.defineProperty({__proto__:null,Chip:Mn,Controller:la,Indicator:_n,Legend:ia,StateProvider:Bn,useContext:$n},Symbol.toStringTag,{value:"Module"})),An=e=>{const t=({disabled:n=!1,...r})=>n?r.children:s.jsxRuntimeExports.jsx(e,{...r});return t.displayName=e.displayName,t},aa=An(Ln),ua=An(u.Provider$3),xa=({children:e,connParams:t,workerEnabled:n=!0,workerURL:r,theming:o,tooltip:i,triggers:c,alamos:a,haul:x,channelAlias:m,telem:p})=>s.jsxRuntimeExports.jsx(u.Provider$1,{...c,children:s.jsxRuntimeExports.jsx(u.Config,{...i,children:s.jsxRuntimeExports.jsx(u.Provider$2,{...x,children:s.jsxRuntimeExports.jsx(u.Provider$4,{url:r??na,enabled:n,children:s.jsxRuntimeExports.jsx(ua,{workerKey:"vis",children:s.jsxRuntimeExports.jsx(sa,{...a,children:s.jsxRuntimeExports.jsx(u.Aggregator,{children:s.jsxRuntimeExports.jsx(Ls,{connParams:t,children:s.jsxRuntimeExports.jsx($s,{...m,children:s.jsxRuntimeExports.jsx(aa,{...p,children:s.jsxRuntimeExports.jsx(u.Provider,{...o,children:s.jsxRuntimeExports.jsx(Bn,{children:e})})})})})})})})})})})}),da=Object.freeze(Object.defineProperty({__proto__:null,Provider:xa},Symbol.toStringTag,{value:"Module"})),pa=({value:e})=>s.jsxRuntimeExports.jsx("div",{className:l.CSS.B("progress"),children:s.jsxRuntimeExports.jsx("div",{className:l.CSS.B("progress-bar"),style:{width:`${e}%`}})}),ma=Object.freeze(Object.defineProperty({__proto__:null,Progress:pa},Symbol.toStringTag,{value:"Module"})),qe="range",ns=[{key:"name",name:"Name"}],ut=({items:e},t)=>{const n=u.filterByType(qe,e);return n.length>0&&!n.every(r=>t.includes(r.key))},ja=({onChange:e,className:t,value:n,...r})=>{const o=fe(),i=o!=null?void 0:s.jsxRuntimeExports.jsx(u.Text$2.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),{startDrag:c,onDragEnd:a,...x}=u.useDragAndDrop({type:"Ranger.SelectMultiple",canDrop:d.useCallback(h=>ut(h,C.A(n)),[n]),onDrop:d.useCallback(({items:h})=>{const g=u.filterByType(qe,h);if(g.length===0)return[];const E=C.n([...C.A(n),...g.map(R=>R.key)]);return e(E,{clickedIndex:null,clicked:null,entries:[]}),g},[e,n])}),m=u.useDraggingState(),p=d.useCallback(({dropped:h})=>{e(C.A(n).filter(g=>!h.some(E=>E.key===g)),{clickedIndex:null,clicked:null,entries:[]})},[e,n]),f=d.useCallback((h,g)=>c([{key:g,type:qe}],p),[c,p]);return s.jsxRuntimeExports.jsx(_e,{className:l.CSS(t,l.CSS.dropRegion(ut(m,C.A(n)))),value:n,onTagDragStart:f,onTagDragEnd:a,searcher:o==null?void 0:o.ranges,onChange:e,columns:ns,emptyContent:i,entryRenderKey:"name",...x,...r})},zn=({value:e,onChange:t})=>{const n=fe(),r=n!=null?void 0:s.jsxRuntimeExports.jsx(u.Text$2.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),o=d.useId(),i=d.useMemo(()=>({key:o,type:"Ranger.SelectMultiple"}),[o]),{startDrag:c,...a}=u.useDragAndDrop({type:"Ranger.SelectSingle",canDrop:d.useCallback(p=>ut(p,C.o(e)),[e]),onDrop:d.useCallback(({items:p})=>{const f=u.filterByType(qe,p);return f.length===0?[]:(t(f[0].key,{clickedIndex:null,clicked:null,entries:[]}),f)},[i,t])}),x=u.useDraggingState(),m=d.useCallback(()=>e!=null&&c([{type:qe,key:e}]),[c,e]);return{emptyContent:r,dragging:x,...a,onDragStart:m,searcher:n==null?void 0:n.ranges}},fa=({onChange:e,value:t,className:n,data:r,...o})=>{const{dragging:i,...c}=zn({value:t,onChange:e});return s.jsxRuntimeExports.jsx(be,{data:r,className:l.CSS(n,l.CSS.dropRegion(ut(i,C.o(t)))),value:t,onChange:e,columns:ns,entryRenderKey:"name",...c,...o})},ga=({data:e,value:t,onChange:n,...r})=>{const{dragging:o,...i}=zn({value:t,onChange:n});return s.jsxRuntimeExports.jsx(be,{data:e,value:t,onChange:n,columns:ns,entryRenderKey:"name",...i,...r})},ha=[{key:"color",name:"Color",width:50,render:e=>s.jsxRuntimeExports.jsx(u.Ut.Circle,{style:{fontSize:10,marginLeft:10,marginRight:30},color:e.entry.color})},{key:"name",name:"Name"}],Sa=e=>{const t=fe();return s.jsxRuntimeExports.jsx(_e,{...e,searcher:t==null?void 0:t.labels,columns:ha,renderTag:n=>n.entry==null?s.jsxRuntimeExports.jsx(Ze,{color:"gray",children:n.entryKey}):s.jsxRuntimeExports.jsx(Ze,{color:n.entry.color,children:n.entry.name})})},Ea=({timeRange:e,level:t="p",shade:n=7,showSpan:r=!1,...o})=>{const i=new C.m(e.start),c=i.isToday?"time":"dateTime",a=new C.m(e.end),x=a.equals(C.m.MAX),m=a.span(i)<C.y.DAY?"time":"dateTime",p=i.span(a);return s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",size:"small",className:l.CSS(l.CSS.B("time-range-chip")),align:"center",...o,children:[i.isToday&&s.jsxRuntimeExports.jsx(u.Text,{level:t,shade:n,weight:450,children:"Today"}),s.jsxRuntimeExports.jsx(u.DateTime,{level:t,displayTZ:"local",format:c,shade:n,weight:450,children:i}),s.jsxRuntimeExports.jsx(u.Ut.Arrow.Right,{color:"var(--pluto-text-color)"}),x?s.jsxRuntimeExports.jsx(u.Text,{level:t,children:"Now"}):s.jsxRuntimeExports.jsx(u.DateTime,{level:t,displayTZ:"local",format:m,shade:n,weight:450,children:a}),!p.isZero&&r&&s.jsxRuntimeExports.jsxs(u.Text,{level:t,shade:n,weight:450,children:["(",i.span(a).truncate(C.y.MILLISECOND).toString(),")"]})]})},Ra=Object.freeze(Object.defineProperty({__proto__:null,SelectButton:ga,SelectLabels:Sa,SelectMultiple:ja,SelectSingle:fa,TimeRangeChip:Ea},Symbol.toStringTag,{value:"Module"})),ya=({steps:e,value:t,onChange:n,...r})=>{const o=e.findIndex(i=>i.key===t);return s.jsxRuntimeExports.jsx(D.Space,{direction:"x",align:"center",className:l.CSS.B("steps"),...r,children:e.map((i,c)=>s.jsxRuntimeExports.jsxs(d.Fragment,{children:[s.jsxRuntimeExports.jsxs(u.Button,{onClick:()=>n(i.key),variant:"outlined",disabled:c>o,children:[c+1,". ",i.title]},i.key),c!==e.length-1&&s.jsxRuntimeExports.jsx(u.Ut.Arrow.Right,{style:{fontSize:"15px",color:"var(--pluto-gray-l8)"}})]},i.key))})},Ca=Object.freeze(Object.defineProperty({__proto__:null,Steps:ya},Symbol.toStringTag,{value:"Module"})),ba=(e,t="x")=>{if(e.length===0)return[];const n=l.J.construct(t),r=l.J.swap(n);return e.sort((o,i)=>l.To.loc(o.box,n)-l.To.loc(i.box,n)),e.forEach((o,i)=>{if(i===0)return;const a=e[i-1].handles.find(g=>g.orientation===r),x=o.handles.find(g=>g.orientation===n);if(a==null||x==null)return;const m=a.absolutePosition,p=x.absolutePosition,f=l.q.set(l.q.translation(p,m),t,0),h=l.q.translate(l.To.topLeft(o.box),f);o.box=l.To.construct(h,l.To.dims(o.box))}),e},rs=e=>{const t=document.querySelector(`[data-id="${e}"]`);if(t==null)throw new Error(`[diagram] - cannot find node with key: ${e}`);return t},xe=(e,t)=>{const n=rs(t),r=e.getNodes().find(o=>o.id===t);if(r==null)throw new Error(`[diagram] - cannot find node with key: ${t}`);return l.To.construct(r.position,l.q.scale(l.To.dims(l.To.construct(n)),1/e.getZoom()))},va=(e,t)=>ht.fromFlow(e,t);class On{constructor(t,n){he(this,"node_",null);he(this,"position");he(this,"orientation");this.position=t,this.orientation=n}set node(t){this.node_=t}get node(){if(this.node_==null)throw new Error("[schematic] - handle has no node");return this.node_}get absolutePosition(){return l.q.translate(l.To.topLeft(this.node.box),this.position)}}class ht{constructor(t,n,r){he(this,"key");he(this,"box");he(this,"handles");this.key=t,this.box=n,this.handles=r,r.forEach(o=>o.node=this)}static fromFlow(t,n){const r=xe(n,t),o=rs(t),i=o.getElementsByClassName("react-flow__handle"),c=l.To.construct(o),a=Array.from(i).map(x=>{const m=l.To.center(l.To.construct(x)),p=l.q.translation(l.To.topLeft(c),m),f=x.className.match(/react-flow__handle-(\w+)/);if(f==null)throw new Error("[schematic] - cannot find handle orientation");const h=l.J.construct(f[0]);return new On(p,h)});return new ht(t,r,a)}}const wa=({fromX:e,fromY:t,toX:n,toY:r,fromPosition:o,toPosition:i,fromNode:c,connectionLineStyle:a,connectionStatus:x})=>{const m=document.querySelector(".react-flow__handle-connecting"),p=m==null?void 0:m.className.match(/react-flow__handle-(\w+)/);if(p!=null){const E=l.J.outer.safeParse(p[1]);E.success&&(i=E.data)}const f=j.buildNew({sourcePos:l.q.construct(e,t),targetPos:l.q.construct(n,r),sourceOrientation:o,targetOrientation:i,sourceBox:xe(j.useReactFlow(),(c==null?void 0:c.id)??""),targetBox:xe(j.useReactFlow(),(c==null?void 0:c.id)??"")}),h=j.useReactFlow(),g=j.segmentsToPoints(l.q.construct(e,t),f,h.getZoom(),!1);return s.jsxRuntimeExports.jsx(j.BaseEdge,{path:Dn(g),style:{...a,stroke:l.cssString(x==="invalid"?"var(--pluto-error-z)":"var(--pluto-gray-l9)"),strokeWidth:2,fill:"none"}})},Pa=({id:e,source:t,target:n,sourcePosition:r,targetHandleId:o,targetPosition:i,style:c,segments:a=[],onSegmentsChange:x,color:m="var(--pluto-gray-l9)",selected:p=!1,...f})=>{const h=l.q.construct(f.sourceX,f.sourceY),g=d.useRef(h),E=l.q.equals(h,g.current),R=l.q.construct(f.targetX,f.targetY),k=d.useRef(R),L=l.q.equals(R,k.current),M=j.useReactFlow(),[N,P,S]=u.useCombinedStateAndRef(()=>a.length>0?a:j.buildNew({sourcePos:h,targetPos:R,sourceOrientation:r,targetOrientation:i,sourceBox:xe(M,t),targetBox:xe(M,n)})),v=d.useRef(i),B=d.useRef(r),T=u.useDebouncedCallback(x,100,[x]);if(!E||!L){let y=N;const _=l.q.translation(g.current,h),O=l.q.translation(R,k.current);l.q.equals(_,l.q.scale(O,-1),.001)?(g.current=h,k.current=R):(E?L||(y=j.moveTargetNode({delta:O,segments:y}),v.current!==i&&(v.current=i,y=j.buildNew({sourcePos:h,targetPos:R,sourceOrientation:r,targetOrientation:i,sourceBox:xe(M,t),targetBox:xe(M,n)})),j.checkIntegrity({sourcePos:h,targetPos:R,next:y,prev:N})||(y=j.buildNew({sourcePos:h,targetPos:R,sourceOrientation:r,targetOrientation:i,sourceBox:xe(M,t),targetBox:xe(M,n)})),k.current=R):(y=j.moveSourceNode({delta:_,segments:y}),B.current!==r&&(B.current=r,y=j.buildNew({sourcePos:h,targetPos:R,sourceOrientation:r,targetOrientation:i,sourceBox:xe(M,t),targetBox:xe(M,n)})),j.checkIntegrity({sourcePos:h,targetPos:R,next:y,prev:N})||(y=j.buildNew({sourcePos:h,targetPos:R,sourceOrientation:r,targetOrientation:i,sourceBox:xe(M,t),targetBox:xe(M,n)})),g.current=h),T(y),P(y))}const $=d.useRef(null),A=pt({onStart:d.useCallback((y,_,O)=>{$.current={index:Number(O.currentTarget.id.split("-")[1]),segments:[...S.current]}},[]),onMove:d.useCallback(y=>{if($.current==null)return;const _=j.dragSegment({segments:$.current.segments,index:$.current.index,magnitude:l.To.dim(y,l.g.swap($.current.segments[$.current.index].direction),!0)/M.getZoom()});P(_)},[]),onEnd:d.useCallback(()=>x(S.current),[x])}),w=j.segmentsToPoints(h,N,M.getZoom(),!0);return s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(j.BaseEdge,{path:Dn(w),style:{...c,stroke:l.cssString(m)},...f}),p&&ka(w).map((y,_)=>{const O=N[_].direction,Y=l.g.swap(O),I={[l.g.dimension(O)]:"18px",[l.g.dimension(Y)]:"4px"},G={[O]:y[O]-9,[Y]:y[Y]-2};return s.jsxRuntimeExports.jsxs(d.Fragment,{children:[s.jsxRuntimeExports.jsx("rect",{className:l.CSS.BE("diagram-edge-handle","background"),fill:"var(--pluto-gray-l0)",stroke:"var(--pluto-primary-z)",...I,...G,rx:"2px",ry:"2px"}),s.jsxRuntimeExports.jsx("foreignObject",{x:y.x-9,y:y.y-9,width:"18px",height:"18px",children:s.jsxRuntimeExports.jsx("div",{id:`handle-${_}`,className:l.CSS(l.CSS.BE("diagram-edge-handle","dragger"),l.CSS.dir(O)),draggable:!0,onDragStart:A})})]},_)})]})},Dn=e=>{let t="";const r=e.length+-1;for(let o=0;o<r;o++){const i=e[o%e.length],c=e[(o+1)%e.length],a=Math.min(6/Math.hypot(c.x-i.x,c.y-i.y),.5);o>0&&(t+=`Q${i.x},${i.y} ${i.x*(1-a)+c.x*a},${i.y*(1-a)+c.y*a}`),o===0?t+=`M${i.x},${i.y}`:o===0&&(t+=`M${i.x*(1-a)+c.x*a},${i.y*(1-a)+c.y*a}`),o===r-1?t+=`L${c.x},${c.y}`:o<r-1&&(t+=`L${i.x*a+c.x*(1-a)},${i.y*a+c.y*(1-a)}`)}return t},ka=e=>e.slice(1).map((t,n)=>{const r=e[n];return l.q.construct((t.x+r.x)/2,(t.y+r.y)/2)}),Ta=({initialNodes:e,initialEdges:t,allowEdit:n=!0,initialViewport:r={position:l.q.ZERO,zoom:1}})=>{const[o,i]=d.useState(n),[c,a]=d.useState(e),[x,m]=d.useState(t),[p,f]=d.useState(r),[h,g]=d.useState(!1);return{viewport:p,onViewportChange:f,edges:x,nodes:c,onNodesChange:a,onEdgesChange:m,editable:o,onEditableChange:i,fitViewOnResize:h,setFitViewOnResize:g}},La=e=>e.source!==e.target,Ma={nodesDraggable:!0,nodesConnectable:!0,elementsSelectable:!0,zoomOnDoubleClick:!1},Na={connectionRadius:0,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,panOnDrag:!1,panOnScroll:!1,zoomOnScroll:!1,zoomOnDoubleClick:!1,zoomOnPinch:!1,edgesFocusable:!1,edgesUpdatable:!1,nodesFocusable:!1,edgeUpdaterRadius:0},Vn={maxZoom:1,minZoom:.5},$a={hideAttribution:!0},In=d.createContext({editable:!0,onEditableChange:()=>{},registerNodeRenderer:()=>{},fitViewOnResize:!1,setFitViewOnResize:()=>{}}),Ye=()=>d.useContext(In),Zn=d.memo(({children:e})=>{const{registerNodeRenderer:t}=Ye();return d.useEffect(()=>t(e),[t,e]),null});Zn.displayName="NodeRenderer";const _a=["Backspace","Delete"],Ba=u.wrap$1(j.Diagram$1.TYPE,({aetherKey:e,children:t,onNodesChange:n,onEdgesChange:r,nodes:o,edges:i,onEditableChange:c,editable:a,viewport:x,triggers:m,onViewportChange:p,fitViewOnResize:f,setFitViewOnResize:h,visible:g,...E})=>{const R=u.useMemoDeepEqualProps({visible:g}),[{path:k},,L]=u.use$3({aetherKey:e,type:j.Diagram$1.TYPE,schema:j.diagramStateZ,initialState:{position:x.position,region:l.To.ZERO,zoom:x.zoom,...R}});d.useEffect(()=>L(F=>({...F,...R})),[R]);const M=u.use().colors.gray.l9.hex,N=u.useMemoCompare(()=>m??Ht.zoom,u.compareModeConfigs,[m]),{fitView:P}=j.useReactFlow(),S=u.useDebouncedCallback(P,50,[P]),v=Ot(d.useCallback(F=>{f&&S({maxZoom:1}),L(X=>({...X,region:F}))},[L,S,f])),B=d.useRef(null),T=d.useCallback(F=>{const X=B.current;X!=null&&X.x===F.x&&X.y===F.y&&X.zoom===F.zoom||(B.current=F,!(isNaN(F.x)||isNaN(F.y)||isNaN(F.zoom))&&(L(ue=>({...ue,position:F,zoom:F.zoom})),p(j.translateViewportBackward(F))))},[L,p]);j.useOnViewportChange({onStart:T,onChange:T,onEnd:T});const[$,A]=d.useState(()=>()=>null),w=d.useCallback(F=>A(()=>F),[]),y=d.useMemo(()=>({custom:({id:F,xPos:X,yPos:ue,selected:Oe})=>$({symbolKey:F,position:{x:X,y:ue},selected:Oe})}),[$]),_=d.useRef(i),O=d.useMemo(()=>(_.current=i,j.translateEdgesForward(i)),[i]),Y=d.useRef(o),I=d.useMemo(()=>(Y.current=o,j.translateNodesForward(o)),[o]),G=d.useCallback(F=>n(j.nodeConverter(Y.current,X=>j.applyNodeChanges(F,X))),[n]),z=d.useCallback(F=>r(j.edgeConverter(_.current,X=>j.applyEdgeChanges(F,X),M)),[r,M]),te=d.useCallback((F,X)=>r(j.edgeConverter(_.current,ue=>j.updateEdge(F,X,ue),M)),[]),ce=d.useCallback(F=>{r(j.edgeConverter(_.current,X=>j.addEdge(F,X),M))},[r,M]),We=d.useCallback((F,X)=>{const ue=[..._.current],Oe=ue.findIndex(xl=>xl.key===F);Oe!==-1&&(ue[Oe]={...ue[Oe],segments:X},_.current=ue,r(ue))},[r]),ol=a?Ma:Na,ll=d.useMemo(()=>({default:F=>s.jsxRuntimeExports.jsx(Pa,{...F,segments:F.data.segments,color:F.data.color,onSegmentsChange:d.useCallback(X=>We(F.id,X),[F.id])},F.id)}),[We]),is=d.useRef(null);u.use$1({triggers:N.zoomReset,callback:d.useCallback(({stage:F,cursor:X})=>{const ue=is.current;ue==null||F!=="start"||!l.To.contains(ue,X)||P()},[P])});const cs=u.purgeMouse(N.select)[0]??null,as=u.purgeMouse(N.pan)[0]??null,il=u.purgeMouse(N.zoom)[0]??null,cl={selectionOnDrag:cs==null,panOnDrag:as==null,selectionKeyCode:cs,panActivationKeyCode:as,zoomActivationKeyCode:il},al=u.useCombinedRefs(is,v),ul=d.useMemo(()=>({editable:a,onEditableChange:c,registerNodeRenderer:w,fitViewOnResize:f,setFitViewOnResize:h}),[a,c,w,f]);return s.jsxRuntimeExports.jsx(In.Provider,{value:ul,children:s.jsxRuntimeExports.jsx(u.Composite,{path:k,children:g&&s.jsxRuntimeExports.jsx(j.ReactFlow,{...cl,className:l.CSS(l.CSS.B("diagram"),l.CSS.editable(a)),nodes:I,edges:O,nodeTypes:y,edgeTypes:ll,ref:al,fitView:!0,onNodesChange:G,onEdgesChange:z,onConnect:ce,onEdgeUpdate:te,defaultViewport:j.translateViewportForward(x),connectionLineComponent:wa,elevateEdgesOnSelect:!0,minZoom:.5,maxZoom:1.2,isValidConnection:La,connectionMode:j.ConnectionMode.Loose,snapGrid:[3,3],fitViewOptions:Vn,selectionMode:j.SelectionMode.Partial,proOptions:$a,deleteKeyCode:_a,...E,style:{[l.CSS.var("diagram-zoom")]:x.zoom,...E.style},...ol,children:t})})})}),Aa=()=>{const{editable:e}=Ye();return e?s.jsxRuntimeExports.jsx(ti,{}):null},za=({children:e,...t})=>s.jsxRuntimeExports.jsx(D.Pack,{direction:"y",borderShade:4,className:l.CSS.BE("diagram","controls"),...t,children:e}),Oa=({onClick:e,...t})=>{const{editable:n,onEditableChange:r}=Ye();return s.jsxRuntimeExports.jsx(u.ToggleIcon,{onChange:()=>r(!n),value:n,uncheckedVariant:"outlined",checkedVariant:"filled",tooltipLocation:l.J.RIGHT_CENTER,tooltip:n?s.jsxRuntimeExports.jsx(u.Text,{level:"small",children:"Disable edit mode"}):s.jsxRuntimeExports.jsx(u.Text,{level:"small",children:"Enable edit mode"}),...t,children:n?s.jsxRuntimeExports.jsx(u.Ut.EditOff,{}):s.jsxRuntimeExports.jsx(u.Ut.Edit,{})})},Da=({onClick:e,...t})=>{const{fitView:n}=j.useReactFlow(),{fitViewOnResize:r,setFitViewOnResize:o}=Ye();return s.jsxRuntimeExports.jsx(u.ToggleIcon,{onClick:i=>{n(Vn),e==null||e(i)},value:r,onChange:i=>o(i),rightClickToggle:!0,tooltip:s.jsxRuntimeExports.jsx(u.Text,{level:"small",children:"Fit view to contents"}),tooltipLocation:l.J.RIGHT_CENTER,variant:"outlined",...t,children:s.jsxRuntimeExports.jsx(u.Ut.Expand,{})})},Va=e=>s.jsxRuntimeExports.jsx(j.ReactFlowProvider,{children:s.jsxRuntimeExports.jsx(Ba,{...e})}),Ia=Object.freeze(Object.defineProperty({__proto__:null,Background:Aa,Controls:za,Diagram:Va,FitViewControl:Da,HandleLayout:On,NodeLayout:ht,NodeRenderer:Zn,ToggleEditControl:Oa,alignNodes:ba,edgeConverter:j.edgeConverter,edgeZ:j.edgeZ,nodeConverter:j.nodeConverter,nodeZ:j.nodeZ,rfEdgeDataZ:j.rfEdgeDataZ,selectNode:rs,selectNodeBox:xe,selectNodeLayout:va,translateEdgesBackward:j.translateEdgesBackward,translateEdgesForward:j.translateEdgesForward,translateNodesBackward:j.translateNodesBackward,translateNodesForward:j.translateNodesForward,translateViewportBackward:j.translateViewportBackward,translateViewportForward:j.translateViewportForward,use:Ta,useContext:Ye,viewportZ:j.viewportZ},Symbol.toStringTag,{value:"Module"})),Za=({value:e,showOuter:t=!0,showInner:n,onChange:r})=>{const{outer:o}=e,i=c=>()=>r({...e,...c});return t?s.jsxRuntimeExports.jsxs(D.Space,{className:l.CSS.B("orientation-control"),align:"center",justify:"center",size:.5,children:[s.jsxRuntimeExports.jsx(ye,{selected:o==="top",onClick:i({outer:"top"})}),s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",align:"center",justify:"center",size:.5,children:[s.jsxRuntimeExports.jsx(ye,{selected:o==="left",onClick:i({outer:"left"})}),s.jsxRuntimeExports.jsx(ys,{showInner:n,value:e,onChange:r}),s.jsxRuntimeExports.jsx(ye,{selected:o==="right",onClick:i({outer:"right"})})]}),s.jsxRuntimeExports.jsx(ye,{selected:o==="bottom",onClick:i({outer:"bottom"})})]}):s.jsxRuntimeExports.jsx(ys,{className:l.CSS.B("orientation-control"),value:e,onChange:r})},ys=({value:e,onChange:t,className:n,showInner:r=!0,...o})=>{const{inner:i}=e,c=x=>()=>t({...e,...x});let a={};return r||(a={opacity:0,userSelect:"none",width:"1.5rem",height:"1.5rem"}),s.jsxRuntimeExports.jsxs(D.Space,{className:l.CSS(n,l.CSS.B("value")),direction:"y",align:"center",justify:"center",empty:!0,...o,children:[s.jsxRuntimeExports.jsx(ye,{style:a,disabled:!r,className:l.CSS(l.CSS.dir("y")),selected:i==="top",onClick:c({inner:"top"})}),s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",align:"center",justify:"center",children:[s.jsxRuntimeExports.jsx(ye,{style:a,disabled:!r,selected:i==="left",onClick:c({inner:"left"})}),s.jsxRuntimeExports.jsx(ye,{style:a,disabled:!r,selected:i==="right",onClick:c({inner:"right"})})]}),s.jsxRuntimeExports.jsx(ye,{style:a,disabled:!r,className:l.CSS(l.CSS.dir("y")),selected:i==="bottom",onClick:c({inner:"bottom"})})]})},ye=({selected:e,className:t,...n})=>s.jsxRuntimeExports.jsx(u.Icon,{variant:"text",className:l.CSS(t,l.CSS.selected(e)),...n,children:s.jsxRuntimeExports.jsx("div",{className:"symbol"})}),ge=({className:e,direction:t,...n})=>s.jsxRuntimeExports.jsx(D.Space,{direction:t,align:"stretch",className:l.CSS(l.CSS.B("symbol-form"),e),size:t==="x"?"large":"medium",...n}),Ae=({showOuter:e,showInner:t,...n})=>s.jsxRuntimeExports.jsx(se,{label:"Orientation",padHelpText:!1,...n,children:({value:r,onChange:o})=>{var i;return s.jsxRuntimeExports.jsx(Za,{value:{inner:r.orientation??"top",outer:((i=r.label)==null?void 0:i.orientation)??"top"},showInner:t,showOuter:e,onChange:c=>o({...r,orientation:c.inner,label:{...r.label,orientation:c.outer}})})}}),Ge=({path:e,omit:t=[]})=>s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",align:"stretch",grow:!0,children:[s.jsxRuntimeExports.jsx(se,{path:e+".label",label:"Label",padHelpText:!1,grow:!0,children:n=>s.jsxRuntimeExports.jsx(u.Text$1,{selectOnFocus:!0,...n})}),s.jsxRuntimeExports.jsx(Kt,{visible:!t.includes("maxInlineSize"),style:{maxWidth:125},path:e+".maxInlineSize",hideIfNull:!0,label:"Label Wrap Width",inputProps:{endContent:"px"}}),s.jsxRuntimeExports.jsx(se,{hideIfNull:!0,visible:!t.includes("level"),path:e+".level",label:"Label Size",padHelpText:!1,children:n=>s.jsxRuntimeExports.jsx(de.SelectLevel,{...n})}),s.jsxRuntimeExports.jsx(se,{visible:!t.includes("align"),path:e+".align",label:"Label Alignment",padHelpText:!1,hideIfNull:!0,children:n=>s.jsxRuntimeExports.jsx(Ut,{...n})})]}),ke=e=>s.jsxRuntimeExports.jsx(se,{hideIfNull:!0,label:"Color",align:"start",padHelpText:!1,...e,children:({value:t,onChange:n,variant:r,...o})=>s.jsxRuntimeExports.jsx($t.Swatch,{value:t??l.ZERO.setAlpha(1).rgba255,onChange:i=>n(i.rgba255),...o,bordered:!0})}),Fa=e=>s.jsxRuntimeExports.jsx(se,{hideIfNull:!0,label:"Scale",align:"start",padHelpText:!1,...e,children:t=>s.jsxRuntimeExports.jsx(u.Numeric,{dragScale:1,bounds:{lower:.5,upper:15},...t})}),ae=({omit:e})=>s.jsxRuntimeExports.jsxs(ge,{direction:"x",align:"stretch",children:[s.jsxRuntimeExports.jsxs(D.Space,{direction:"y",grow:!0,empty:!0,children:[s.jsxRuntimeExports.jsx(Ge,{omit:e,path:"label"}),s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",grow:!0,children:[s.jsxRuntimeExports.jsx(ke,{path:"color",optional:!0}),s.jsxRuntimeExports.jsx(se,{path:"normallyOpen",label:"Normally Open",padHelpText:!1,hideIfNull:!0,optional:!0,children:t=>s.jsxRuntimeExports.jsx(u.Switch$1,{...t})}),s.jsxRuntimeExports.jsx(Fa,{path:"scale"})]})]}),s.jsxRuntimeExports.jsx(Ae,{path:""})]}),qa=({path:e})=>{var m,p;const{value:t,onChange:n}=ve({path:e}),r=j.sourcePipelinePropsZ.parse((m=t.source)==null?void 0:m.props),o=j.sinkPipelinePropsZ.parse((p=t.sink)==null?void 0:p.props),i=j.streamChannelValuePropsZ.parse(r.segments.valueStream.props),c=j.setChannelValuePropsZ.parse(o.segments.setter.props),a=f=>{f=f??0;const h=j.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:j.streamChannelValue({channel:f}),threshold:j.withinBounds({trueBound:{lower:.9,upper:1.1}})},outlet:"threshold"});n({...t,source:h})},x=f=>{f=f??0;const h=j.sinkPipeline("boolean",{connections:[{from:"setpoint",to:"setter"}],segments:{setter:j.setChannelValue({channel:f}),setpoint:j.setpoint({truthy:1,falsy:0})},inlet:"setpoint"}),g=j.authoritySource({channel:f}),E=j.acquireChannelControl({channel:f,authority:255});n({...t,sink:h,control:{showChip:!0,showIndicator:!0,...t.control,chip:{sink:E,source:g},indicator:{statusSource:g}}})};return s.jsxRuntimeExports.jsxs(ge,{direction:"x",grow:!0,align:"stretch",children:[s.jsxRuntimeExports.jsx(me.Item,{label:"State Channel",grow:!0,children:s.jsxRuntimeExports.jsx(Ce,{value:i.channel,onChange:a})}),s.jsxRuntimeExports.jsx(me.Item,{label:"Command Channel",grow:!0,children:s.jsxRuntimeExports.jsx(Ce,{value:c.channel,onChange:x})}),s.jsxRuntimeExports.jsx(Xt,{path:"control.show",label:"Show Control Chip",hideIfNull:!0,optional:!0})]})},os=[{tabKey:"style",name:"Style"},{tabKey:"control",name:"Control"}],re=()=>{const e=d.useCallback(({tabKey:n})=>{switch(n){case"control":return s.jsxRuntimeExports.jsx(qa,{path:""});default:return s.jsxRuntimeExports.jsx(ae,{})}},[]),t=ne.useStatic({tabs:os,content:e});return s.jsxRuntimeExports.jsx(ne.Tabs,{...t})},De={y:2,x:.25},Ve={lower:0,upper:2e3},Fn=({includeBorderRadius:e=!1})=>s.jsxRuntimeExports.jsxs(ge,{direction:"x",align:"stretch",children:[s.jsxRuntimeExports.jsxs(D.Space,{direction:"y",grow:!0,empty:!0,children:[s.jsxRuntimeExports.jsx(Ge,{path:"label"}),s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",children:[s.jsxRuntimeExports.jsx(ke,{path:"color"}),s.jsxRuntimeExports.jsx(ke,{path:"backgroundColor",label:"Background Color"}),s.jsxRuntimeExports.jsx(se,{path:"borderRadius.x",hideIfNull:!0,optional:!0,label:"X Border Radius",grow:!0,children:({value:t,...n})=>s.jsxRuntimeExports.jsx(u.Numeric,{value:t,dragScale:De,bounds:Ve,endContent:"%",...n})}),s.jsxRuntimeExports.jsx(se,{path:"borderRadius.y",hideIfNull:!0,optional:!0,label:"Y Border Radius",grow:!0,children:({value:t,...n})=>s.jsxRuntimeExports.jsx(u.Numeric,{value:t,dragScale:De,bounds:Ve,endContent:"%",...n})}),e&&s.jsxRuntimeExports.jsx(se,{path:"borderRadius",hideIfNull:!0,optional:!0,label:"Border Radius",grow:!0,children:({value:t,...n})=>s.jsxRuntimeExports.jsx(u.Numeric,{value:t,dragScale:De,bounds:Ve,endContent:"px",...n})}),s.jsxRuntimeExports.jsx(se,{path:"dimensions.width",label:"Width",grow:!0,children:({value:t,...n})=>s.jsxRuntimeExports.jsx(u.Numeric,{value:t??200,dragScale:De,bounds:Ve,endContent:"px",...n})}),s.jsxRuntimeExports.jsx(se,{path:"dimensions.height",label:"Height",grow:!0,children:({value:t,...n})=>s.jsxRuntimeExports.jsx(u.Numeric,{value:t??200,dragScale:De,bounds:Ve,endContent:"px",...n})})]})]}),s.jsxRuntimeExports.jsx(Ae,{path:"",showInner:!1})]}),qn=[{tabKey:"style",name:"Style"},{tabKey:"telemetry",name:"Telemetry"}],Ua=({path:e})=>{var f;const{value:t,onChange:n}=ve({path:e}),r=j.sourcePipelinePropsZ.parse((f=t.telem)==null?void 0:f.props),o=j.streamChannelValuePropsZ.parse(r.segments.valueStream.props),i=j.stringifyNumberProps.parse(r.segments.stringifier.props),c=j.rollingAverageProps.parse(r.segments.rollingAverage.props),a=h=>{const g=j.sourcePipeline("string",{connections:[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],segments:{valueStream:j.streamChannelValue({channel:h??0}),stringifier:j.stringifyNumber({precision:i.precision??2}),rollingAverage:j.rollingAverage({windowSize:c.windowSize??1})},outlet:"stringifier"});n({...t,telem:g})},x=h=>{const g=j.sourcePipeline("string",{connections:[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],segments:{valueStream:j.streamChannelValue({channel:o.channel}),stringifier:j.stringifyNumber({precision:h}),rollingAverage:j.rollingAverage({windowSize:c.windowSize})},outlet:"stringifier"});n({...t,telem:g})},m=h=>{const g=j.sourcePipeline("string",{connections:[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],segments:{stringifier:j.stringifyNumber({precision:i.precision??2}),valueStream:j.streamChannelValue({channel:o.channel}),rollingAverage:j.rollingAverage({windowSize:h})},outlet:"stringifier"});n({...t,telem:g})},p=jt(o.channel);return d.useEffect(()=>{n({...t,tooltip:[p]})},[p]),s.jsxRuntimeExports.jsxs(ge,{direction:"x",align:"stretch",children:[s.jsxRuntimeExports.jsx(me.Item,{label:"Input Channel",grow:!0,children:s.jsxRuntimeExports.jsx(Ce,{value:o.channel,onChange:a})}),s.jsxRuntimeExports.jsx(me.Item,{label:"Precision",align:"start",children:s.jsxRuntimeExports.jsx(u.Numeric,{value:i.precision??2,bounds:{lower:0,upper:10},onChange:x})}),s.jsxRuntimeExports.jsx(me.Item,{label:"Averaging Window",align:"start",children:s.jsxRuntimeExports.jsx(u.Numeric,{value:c.windowSize??1,bounds:{lower:1,upper:100},onChange:m})})]})},Ha=()=>{const e=d.useCallback(({tabKey:n})=>{switch(n){case"telemetry":return s.jsxRuntimeExports.jsx(Ua,{path:""});default:return s.jsxRuntimeExports.jsxs(ge,{direction:"x",children:[s.jsxRuntimeExports.jsxs(D.Space,{direction:"y",grow:!0,empty:!0,children:[s.jsxRuntimeExports.jsx(Ge,{path:"label"}),s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",children:[s.jsxRuntimeExports.jsx(ke,{path:"color"}),s.jsxRuntimeExports.jsx(se,{path:"units",label:"Units",align:"start",padHelpText:!1,children:r=>s.jsxRuntimeExports.jsx(u.Text$1,{...r})}),s.jsxRuntimeExports.jsx(Kt,{path:"inlineSize",label:"Value Width",hideIfNull:!0,inputProps:{dragScale:{x:1,y:.25},bounds:{lower:40,upper:500},endContent:"px"}})]})]}),s.jsxRuntimeExports.jsx(Ae,{path:"",showInner:!1})]})}},[]),t=ne.useStatic({tabs:qn,content:e});return s.jsxRuntimeExports.jsx(ne.Tabs,{...t})},Ya=({path:e})=>{var a;const{value:t,onChange:n}=ve({path:e}),r=j.sourcePipelinePropsZ.parse((a=t.source)==null?void 0:a.props),o=j.streamChannelValuePropsZ.parse(r.segments.valueStream.props),i=x=>{x=x??0;const m=j.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:j.streamChannelValue({channel:x}),threshold:j.withinBounds({trueBound:{lower:.9,upper:1.1}})},outlet:"threshold"});n({...t,source:m})},c=jt(o.channel);return d.useEffect(()=>n({...t}),[c]),s.jsxRuntimeExports.jsx(ge,{direction:"x",align:"stretch",children:s.jsxRuntimeExports.jsx(me.Item,{label:"Input Channel",grow:!0,children:s.jsxRuntimeExports.jsx(Ce,{value:o.channel,onChange:i})})})},Ga=()=>{const e=d.useCallback(({tabKey:n})=>{switch(n){case"telemetry":return s.jsxRuntimeExports.jsx(Ya,{path:""});default:return s.jsxRuntimeExports.jsx(ae,{})}},[]),t=ne.useStatic({tabs:qn,content:e});return s.jsxRuntimeExports.jsx(ne.Tabs,{...t})},Wa=({path:e})=>{var c;const{value:t,onChange:n}=ve({path:e}),r=j.sinkPipelinePropsZ.parse((c=t.sink)==null?void 0:c.props),o=j.setChannelValuePropsZ.parse(r.segments.setter.props),i=a=>{a=a??0;const x=j.sinkPipeline("boolean",{connections:[{from:"setpoint",to:"setter"}],segments:{setter:j.setChannelValue({channel:a}),setpoint:j.setpoint({truthy:1,falsy:0})},inlet:"setpoint"}),m=j.authoritySource({channel:a}),p=j.acquireChannelControl({channel:a,authority:255});n({...t,sink:x,control:{...t.control,showChip:!0,chip:{sink:p,source:m},showIndicator:!0,indicator:{statusSource:m}}})};return s.jsxRuntimeExports.jsxs(ge,{direction:"x",children:[s.jsxRuntimeExports.jsx(me.Item,{label:"Output Channel",grow:!0,children:s.jsxRuntimeExports.jsx(Ce,{value:o.channel,onChange:i})}),s.jsxRuntimeExports.jsx(Xt,{path:"control.show",label:"Show Control Chip",hideIfNull:!0,optional:!0})]})},Ka=()=>{const e=d.useCallback(({tabKey:n})=>{switch(n){case"control":return s.jsxRuntimeExports.jsx(Wa,{path:""});default:return s.jsxRuntimeExports.jsx(ae,{omit:["align","maxInlineSize"]})}},[]),t=ne.useStatic({tabs:os,content:e});return s.jsxRuntimeExports.jsx(ne.Tabs,{...t})},Xa=({path:e})=>{var m,p;const{value:t,onChange:n}=ve({path:e}),r=j.sourcePipelinePropsZ.parse((m=t.source)==null?void 0:m.props),o=j.sinkPipelinePropsZ.parse((p=t.sink)==null?void 0:p.props),i=j.streamChannelValuePropsZ.parse(r.segments.valueStream.props),c=j.setChannelValuePropsZ.parse(o.segments.setter.props),a=f=>{f=f??0;const h=j.sourcePipeline("number",{connections:[],segments:{valueStream:j.streamChannelValue({channel:f})},outlet:"valueStream"});n({...t,source:h})},x=f=>{f=f??0;const h=j.sinkPipeline("number",{connections:[],segments:{setter:j.setChannelValue({channel:f})},inlet:"setter"}),g=j.authoritySource({channel:f}),E=j.acquireChannelControl({channel:f,authority:255});n({...t,sink:h,control:{...t.control,showChip:!0,chip:{sink:E,source:g},showIndicator:!0,indicator:{statusSource:g}}})};return s.jsxRuntimeExports.jsxs(ge,{direction:"x",grow:!0,align:"stretch",children:[s.jsxRuntimeExports.jsx(me.Item,{label:"State Channel",grow:!0,children:s.jsxRuntimeExports.jsx(Ce,{value:i.channel,onChange:a})}),s.jsxRuntimeExports.jsx(me.Item,{label:"Command Channel",grow:!0,children:s.jsxRuntimeExports.jsx(Ce,{value:c.channel,onChange:x})})]})},Ja=()=>{const e=d.useCallback(({tabKey:n})=>{switch(n){case"control":return s.jsxRuntimeExports.jsx(Xa,{path:""});default:return s.jsxRuntimeExports.jsxs(ge,{direction:"x",align:"stretch",children:[s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",align:"stretch",grow:!0,children:[s.jsxRuntimeExports.jsx(Ge,{path:"label"}),s.jsxRuntimeExports.jsx(pn,{path:"units",label:"Units",align:"start",padHelpText:!1}),s.jsxRuntimeExports.jsx(ke,{path:"color"})]}),s.jsxRuntimeExports.jsx(Ae,{path:""})]})}},[]),t=ne.useStatic({tabs:os,content:e});return s.jsxRuntimeExports.jsx(ne.Tabs,{...t})},Qa=()=>{const e=ve({path:"autoFit",optional:!0});return s.jsxRuntimeExports.jsxs(ge,{direction:"x",align:"stretch",grow:!0,children:[s.jsxRuntimeExports.jsxs(D.Space,{direction:"y",grow:!0,children:[s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",align:"stretch",children:[s.jsxRuntimeExports.jsx(se,{path:"text",label:"Text",padHelpText:!1,grow:!0,children:t=>s.jsxRuntimeExports.jsx(u.Text$1,{selectOnFocus:!0,...t})}),s.jsxRuntimeExports.jsx(se,{path:"level",label:"Text Size",padHelpText:!1,children:t=>s.jsxRuntimeExports.jsx(de.SelectLevel,{...t})}),s.jsxRuntimeExports.jsx(se,{path:"align",label:"Alignment",padHelpText:!1,hideIfNull:!0,children:t=>s.jsxRuntimeExports.jsx(Ut,{...t})})]}),s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",children:[s.jsxRuntimeExports.jsx(ke,{path:"color"}),s.jsxRuntimeExports.jsx(se,{onChange:(t,{set:n})=>n("autoFit",!1),path:"width",label:"Wrap Width",padHelpText:!1,children:t=>s.jsxRuntimeExports.jsx(u.Numeric,{...t,bounds:{lower:0,upper:2e3},dragScale:5,endContent:"px",children:s.jsxRuntimeExports.jsx(u.Icon,{onClick:()=>e==null?void 0:e.onChange(!0),disabled:(e==null?void 0:e.value)===!0,variant:"outlined",tooltip:(e==null?void 0:e.value)===!0?"Manually enter value to disable auto fit":"Enable auto fit",children:s.jsxRuntimeExports.jsx(u.Ut.AutoFitWidth,{})})})})]})]}),s.jsxRuntimeExports.jsx(Ae,{path:""})]})},eu=()=>s.jsxRuntimeExports.jsxs(ge,{direction:"x",align:"stretch",children:[s.jsxRuntimeExports.jsxs(D.Space,{direction:"y",grow:!0,empty:!0,children:[s.jsxRuntimeExports.jsx(Ge,{path:"label",omit:["maxInlineSize","align"]}),s.jsxRuntimeExports.jsx(ke,{path:"color"})]}),s.jsxRuntimeExports.jsx(Ae,{path:"",showOuter:!1})]}),V=e=>s.jsxRuntimeExports.jsx("path",{vectorEffect:"non-scaling-stroke",...e}),ze=e=>s.jsxRuntimeExports.jsx("rect",{vectorEffect:"non-scaling-stroke",...e}),Le=e=>s.jsxRuntimeExports.jsx("circle",{vectorEffect:"non-scaling-stroke",...e}),W=e=>s.jsxRuntimeExports.jsx("line",{vectorEffect:"non-scaling-stroke",...e}),tu={left:{left:j.Position.Left,right:j.Position.Right,top:j.Position.Top,bottom:j.Position.Bottom},right:{left:j.Position.Right,right:j.Position.Left,top:j.Position.Bottom,bottom:j.Position.Top},top:{left:j.Position.Bottom,right:j.Position.Top,top:j.Position.Left,bottom:j.Position.Right},bottom:{left:j.Position.Top,right:j.Position.Bottom,top:j.Position.Right,bottom:j.Position.Left}},su=(e,t)=>tu[t][e],nu=(e,t=!1)=>{if(t)return e;switch(e){case j.Position.Left:return j.Position.Right;case j.Position.Right:return j.Position.Left;case j.Position.Top:return j.Position.Bottom;case j.Position.Bottom:return j.Position.Top;default:return j.Position.Top}},ru=(e,t,n,r=!1)=>r?{left:t,top:e}:n==="left"?{top:e,left:t}:n==="right"?{top:100-e,left:100-t}:n==="top"?{top:100-t,left:e}:{top:t,left:100-e},q=({children:e,orientation:t})=>{let n;try{n=j.useUpdateNodeInternals()}catch{return s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{})}const r=d.useRef(null),o=d.useRef(!0);return d.useEffect(()=>{if(r.current==null)return;if(o.current){o.current=!1;return}const i=r.current.closest(".react-flow__node"),c=i==null?void 0:i.getAttribute("data-id");c!=null&&(n==null||n(c))},[t]),s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx("span",{ref:r}),e]})},b=({location:e,orientation:t,preventAutoAdjust:n,left:r,swap:o,top:i,...c})=>{const a=ru(i,r,t,n);return s.jsxRuntimeExports.jsx(j.Handle$1,{position:nu(su(e,t),!o),...c,type:"source",onClick:x=>x.stopPropagation(),className:(l.CSS.B("handle"),l.CSS.BE("handle",c.id)),style:{left:`${a.left}%`,top:`${a.top}%`}})},ie=({className:e,enabled:t=!1,triggered:n=!1,orientation:r="left",color:o,...i})=>s.jsxRuntimeExports.jsx("button",{className:l.CSS(l.CSS.B("symbol-primitive"),l.CSS.B("symbol-primitive-toggle"),r!=null&&l.CSS.loc(r),t&&l.CSS.M("enabled"),n&&l.CSS.M("triggered"),e),color:l.cssString(o),...i}),ee=({className:e,...t})=>s.jsxRuntimeExports.jsx("div",{className:l.CSS(l.CSS.B("symbol-primitive"),e),...t}),ou=.8,K=({dimensions:e,orientation:t="left",children:n,className:r,color:o,style:i={},scale:c=1,...a})=>{e=l.g.construct(t)==="y"?l._$1.swap(e):e;const m=l.cssString(o),p=u.use();return o!=null&&(i[l.CSS.var("symbol-color")]=new l.Color(o).rgbString,i[l.CSS.var("symbol-color-contrast")]=new l.Color(o).pickByContrast(p.colors.gray.l0,p.colors.gray.l10).rgbString),s.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:l._$1.svgViewBox(e),className:l.CSS(l.CSS.loc(t),r),fill:m,stroke:m,...a,style:{aspectRatio:`${e.width} / ${e.height}`,width:l._$1.scale(e,c*ou).width,...i},children:s.jsxRuntimeExports.jsx("g",{children:n})})},Un=({className:e,orientation:t,scale:n,color:r,...o})=>s.jsxRuntimeExports.jsxs(ie,{...o,orientation:t,className:l.CSS(l.CSS.B("four-way-valve"),e),children:[s.jsxRuntimeExports.jsxs(q,{orientation:t,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:"left",left:2.2989,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:"left",left:97.7011,top:50,id:"2"}),s.jsxRuntimeExports.jsx(b,{location:"top",orientation:"left",left:50,top:2.2989,id:"3"}),s.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:"left",left:50,top:97.7011,id:"4"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:87,height:87},color:r,scale:n,children:[s.jsxRuntimeExports.jsx(V,{d:"M43.5 43.5L6.35453 24.7035C4.35901 23.6937 2 25.1438 2 27.3803V59.6197C2 61.8562 4.35901 63.3063 6.35453 62.2965L43.5 43.5ZM43.5 43.5L80.6455 24.7035C82.641 23.6937 85 25.1438 85 27.3803V59.6197C85 61.8562 82.641 63.3063 80.6455 62.2965L43.5 43.5Z"}),s.jsxRuntimeExports.jsx(V,{d:"M43.5 43.5L24.7035 80.6455C23.6937 82.641 25.1438 85 27.3803 85H59.6197C61.8562 85 63.3063 82.641 62.2965 80.6455L43.5 43.5ZM43.5 43.5L24.7035 6.35453C23.6937 4.35901 25.1438 2 27.3803 2H59.6197C61.8562 2 63.3063 4.35901 62.2965 6.35453L43.5 43.5Z"})]})]}),Hn=({color:e,orientation:t="left",scale:n,...r})=>s.jsxRuntimeExports.jsxs(ie,{...r,className:l.CSS(l.CSS.B("three-way-valve")),orientation:t,children:[s.jsxRuntimeExports.jsxs(q,{orientation:t,children:[s.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:t,left:50,top:97.0278,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.2989,top:33.1308,id:"2"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.7011,top:33.1308,id:"3"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:87,height:64},color:e,orientation:t,scale:n,children:[s.jsxRuntimeExports.jsx(V,{d:"M43.5 21L6.35453 2.20349C4.35901 1.19372 2 2.64384 2 4.88029V37.1197C2 39.3562 4.35901 40.8063 6.35453 39.7965L43.5 21ZM43.5 21L80.6455 2.20349C82.641 1.19372 85 2.64384 85 4.8803V37.1197C85 39.3562 82.641 40.8063 80.6455 39.7965L43.5 21Z"}),s.jsxRuntimeExports.jsx(V,{d:"M44.3923 22.3611C44.0222 21.6298 42.9778 21.6298 42.6077 22.3611L24.7035 57.7433C23.6937 59.7388 25.1438 62.0978 27.3803 62.0978L59.6197 62.0978C61.8562 62.0978 63.3063 59.7388 62.2965 57.7433L44.3923 22.3611Z"})]})]}),Yn=({orientation:e="left",color:t,scale:n,...r})=>s.jsxRuntimeExports.jsxs(ie,{...r,children:[s.jsxRuntimeExports.jsxs(q,{orientation:e,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:e,left:2.2989,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:e,left:97.7701,top:50,id:"2"})]}),s.jsxRuntimeExports.jsx(K,{dimensions:{width:87,height:42},color:t,orientation:e,scale:n,children:s.jsxRuntimeExports.jsx(V,{d:"M43.5 21L6.35453 2.20349C4.35901 1.19372 2 2.64384 2 4.88029V37.1197C2 39.3562 4.35901 40.8063 6.35453 39.7965L43.5 21ZM43.5 21L80.6455 2.20349C82.641 1.19372 85 2.64384 85 4.8803V37.1197C85 39.3562 82.641 40.8063 80.6455 39.7965L43.5 21Z"})})]}),Gn=({className:e,color:t,orientation:n="left",normallyOpen:r=!1,scale:o,...i})=>s.jsxRuntimeExports.jsxs(ie,{className:l.CSS(l.CSS.B("solenoid-valve"),r&&l.CSS.M("normally-open"),e),...i,children:[s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:2.2989,top:69.5652,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:97.7011,top:69.5652,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:87,height:69},color:t,orientation:n,scale:o,children:[s.jsxRuntimeExports.jsx(V,{className:l.CSS.B("body"),d:"M43.5 48L6.35453 29.2035C4.35901 28.1937 2 29.6438 2 31.8803V64.1197C2 66.3562 4.35901 67.8063 6.35453 66.7965L43.5 48ZM43.5 48L80.6455 29.2035C82.641 28.1937 85 29.6438 85 31.8803V64.1197C85 66.3562 82.641 67.8063 80.6455 66.7965L43.5 48Z"}),s.jsxRuntimeExports.jsx(W,{x1:43.5,x2:43.5,y1:24.5333,y2:48}),s.jsxRuntimeExports.jsx(ze,{x:"29",y:"2",width:"29",height:"22.5333",rx:"1"})]})]}),Wn=({className:e,orientation:t="left",color:n,scale:r,...o})=>s.jsxRuntimeExports.jsxs(ee,{orientation:t,className:l.CSS(l.CSS.B("relief-valve"),e),...o,children:[s.jsxRuntimeExports.jsxs(q,{orientation:t,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.2989,top:63.7931,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.7011,top:63.7931,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:87,height:58},color:n,orientation:t,scale:r,children:[s.jsxRuntimeExports.jsx(V,{d:"M43.5 37L6.35453 18.2035C4.35901 17.1937 2 18.6438 2 20.8803V53.1197C2 55.3562 4.35901 56.8063 6.35453 55.7965L43.5 37ZM43.5 37L80.6455 18.2035C82.641 17.1937 85 18.6438 85 20.8803V53.1197C85 55.3562 82.641 56.8063 80.6455 55.7965L43.5 37Z"}),s.jsxRuntimeExports.jsx(V,{d:"M43.5 2 L43.5 37",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M31.8011 14.0802L55.1773 4.29611",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M31.8011 20.0802L55.1773 10.2961",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M31.8011 26.0802L55.1773 16.2961",strokeLinecap:"round"})]})]}),Kn=({className:e,orientation:t="left",color:n,scale:r,...o})=>s.jsxRuntimeExports.jsxs(ee,{orientation:t,className:l.CSS(l.CSS.B("check-valve"),e),...o,children:[s.jsxRuntimeExports.jsxs(q,{orientation:t,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:4.2222,top:48.8372,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:94.2038,top:48.8372,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:45,height:43},color:n,orientation:t,scale:r,children:[s.jsxRuntimeExports.jsx(W,{x1:"42.3917",y1:"2",x2:"42.3917",y2:"41",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M41.6607 21.8946C42.3917 21.5238 42.3906 20.4794 41.6589 20.1101L6.25889 2.2412C4.26237 1.23341 1.90481 2.68589 1.90704 4.92235L1.93925 37.1617C1.94148 39.3982 4.30194 40.846 6.29644 39.8342L41.6607 21.8946Z"})]})]}),Xn=({color:e,className:t,orientation:n="left",scale:r,...o})=>s.jsxRuntimeExports.jsxs(ie,{...o,orientation:n,className:l.CSS(l.CSS.B("angled-valve"),t),children:[s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:32.8125,top:97.0278,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:97.0278,top:32.8125,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:64,height:64},color:e,orientation:n,scale:r,children:[s.jsxRuntimeExports.jsx(V,{d:"M22.3611 20.1077C21.6298 20.4778 21.6298 21.5222 22.3611 21.8923L57.7433 39.7965C59.7388 40.8063 62.0978 39.3562 62.0978 37.1197L62.0978 4.88029C62.0978 2.64384 59.7388 1.19372 57.7433 2.2035L22.3611 20.1077Z"}),s.jsxRuntimeExports.jsx(V,{d:"M21.8923 22.3611C21.5222 21.6298 20.4778 21.6298 20.1077 22.3611L2.20349 57.7433C1.19372 59.7388 2.64384 62.0978 4.8803 62.0978L37.1197 62.0978C39.3562 62.0978 40.8063 59.7388 39.7965 57.7433L21.8923 22.3611Z"})]})]}),Jn=({color:e,className:t,orientation:n="left",scale:r,...o})=>s.jsxRuntimeExports.jsxs(ie,{...o,className:l.CSS(l.CSS.B("pump"),t),orientation:n,children:[s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:64,height:64},color:e,orientation:n,scale:r,children:[s.jsxRuntimeExports.jsx(Le,{cx:"32",cy:"32",r:"30"}),s.jsxRuntimeExports.jsx(W,{x1:"32",y1:"2",x2:"62",y2:"32",className:l.CSS(l.CSS.M("detail"),t)}),s.jsxRuntimeExports.jsx(W,{x1:"32",y1:"62",x2:"62",y2:"32",className:l.CSS(l.CSS.M("detail"),t)})]})]}),Qn=({className:e,color:t,orientation:n="left",scale:r,...o})=>{const i=l.cssString(t);return s.jsxRuntimeExports.jsxs(ee,{...o,className:l.CSS(l.CSS.B("symbol"),e),children:[s.jsxRuntimeExports.jsx(q,{orientation:n,children:s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:5,top:50,id:"1"})}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:40,height:48},color:t,orientation:n,scale:r,children:[s.jsxRuntimeExports.jsx(V,{d:"M24 24C24 35.1852 15.2546 44.4725 3.87626 45.8297C2.90571 45.9455 2 45.1407 2 44V4C2 2.85926 2.90571 2.0545 3.87626 2.17027C15.2546 3.52755 24 12.8148 24 24Z"}),s.jsxRuntimeExports.jsx(V,{d:"M37.9706 23.2076C38.4906 23.6079 38.4906 24.3921 37.9706 24.7924L33.86 27.9568C33.2024 28.463 32.25 27.9942 32.25 27.1644V20.8356C32.25 20.0058 33.2024 19.537 33.86 20.0432L37.9706 23.2076Z",fill:i}),s.jsxRuntimeExports.jsx(V,{d:"M33 24H2",strokeLinecap:"round"})]})]})},er=({className:e,orientation:t="left",color:n,scale:r,...o})=>s.jsxRuntimeExports.jsxs(ee,{className:l.CSS(l.CSS.B("cap"),e),...o,children:[s.jsxRuntimeExports.jsx(q,{orientation:t,children:s.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:7.6923,top:50,id:"1"})}),s.jsxRuntimeExports.jsx(K,{color:n,dimensions:{width:26,height:48},orientation:t,scale:r,children:s.jsxRuntimeExports.jsx(V,{d:"M24 24C24 35.1852 15.2546 44.4725 3.87626 45.8297C2.90571 45.9455 2 45.1407 2 44V4C2 2.85926 2.90571 2.0545 3.87626 2.17027C15.2546 3.52755 24 12.8148 24 24Z"})})]}),tr=({className:e,orientation:t="left",color:n,scale:r,...o})=>s.jsxRuntimeExports.jsxs(ee,{className:l.CSS(l.CSS.B("manual-valve"),e),...o,children:[s.jsxRuntimeExports.jsxs(q,{orientation:t,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.2989,top:56.25,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.7011,top:56.25,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:87,height:48},color:n,orientation:t,scale:r,children:[s.jsxRuntimeExports.jsx(W,{x1:"43.5",y1:"27",x2:"43.5",y2:"1"}),s.jsxRuntimeExports.jsx(V,{d:"M19.64 1 L66.68 1",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M43.5 27L6.35453 8.20349C4.35901 7.19372 2 8.64384 2 10.8803V43.1197C2 45.3562 4.35901 46.8063 6.35453 45.7965L43.5 27ZM43.5 27L80.6455 8.20349C82.641 7.19372 85 8.64384 85 10.8803V43.1197C85 45.3562 82.641 46.8063 80.6455 45.7965L43.5 27Z"})]})]}),sr=({className:e,orientation:t="left",color:n,scale:r,...o})=>s.jsxRuntimeExports.jsxs(ee,{className:l.CSS(l.CSS.B("filter"),e),...o,children:[s.jsxRuntimeExports.jsxs(q,{orientation:t,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:11.5385,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:88.4615,top:50,id:"2"})]}),s.jsxRuntimeExports.jsx(K,{dimensions:{width:52,height:34},orientation:t,color:n,scale:r,children:s.jsxRuntimeExports.jsx(V,{d:"M6 17L24.8 2.9C25.5111 2.36667 26.4889 2.36667 27.2 2.9L46 17M6 17L24.8 31.1C25.5111 31.6333 26.4889 31.6333 27.2 31.1L46 17"})})]}),lu=e=>typeof e=="number"?{topLeft:l.q.construct(e),topRight:l.q.construct(e),bottomLeft:l.q.construct(e),bottomRight:l.q.construct(e)}:"x"in e?{topLeft:e,topRight:e,bottomLeft:e,bottomRight:e}:typeof e.bottomLeft=="number"?{topLeft:l.q.construct(e.topLeft),topRight:l.q.construct(e.topRight),bottomLeft:l.q.construct(e.bottomLeft),bottomRight:l.q.construct(e.bottomRight)}:e,iu=e=>{const{topLeft:t,topRight:n,bottomLeft:r,bottomRight:o}=e;return`${t.x}% ${n.x}% ${o.x}% ${r.x}% / ${t.y}% ${n.y}% ${o.y}% ${r.y}%`},cu={width:40,height:80},nr={x:50,y:10},St=({className:e,dimensions:t=cu,borderRadius:n=nr,boxBorderRadius:r,color:o,backgroundColor:i,...c})=>{const a=lu(n),x=r==null,m=u.use();return s.jsxRuntimeExports.jsx(ee,{className:l.CSS(e,l.CSS.B("tank")),style:{...t,borderRadius:r??iu(a),borderColor:l.cssString(o??m.colors.gray.l9),backgroundColor:i==null?void 0:l.cssString(i)},...c,children:s.jsxRuntimeExports.jsxs(q,{children:[s.jsxRuntimeExports.jsx(b,{location:"top",orientation:"left",left:50,top:0,id:"1"}),x&&s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(b,{location:"top",orientation:"left",left:-.5,top:a.topLeft.y-1,id:"2"}),s.jsxRuntimeExports.jsx(b,{location:"top",orientation:"left",left:101,top:a.topRight.y-1,id:"3"})]}),s.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:"left",left:50,top:100,id:"4"}),x&&s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:"left",left:-.5,top:100-a.bottomLeft.y+1,id:"5"}),s.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:"left",left:101,top:100-a.bottomRight.y+1,id:"6"})]}),s.jsxRuntimeExports.jsx(b,{location:"left",orientation:"left",left:-.5,top:50,id:"7"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:"left",left:101,top:50,id:"8"})]})})},rr=({className:e,orientation:t="left",color:n,scale:r,...o})=>s.jsxRuntimeExports.jsxs(ee,{className:l.CSS(e,l.CSS.B("regulator")),...o,children:[s.jsxRuntimeExports.jsxs(q,{orientation:t,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:3.4091,top:66.25,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.7273,top:66.25,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:88,height:80},orientation:t,color:n,scale:r,children:[s.jsxRuntimeExports.jsx(V,{d:"M44.5 53L7.35453 34.2035C5.35901 33.1937 3 34.6438 3 36.8803V69.1197C3 71.3562 5.35901 72.8063 7.35453 71.7965L44.5 53ZM44.5 53L81.6455 34.2035C83.641 33.1937 86 34.6438 86 36.8803V69.1197C86 71.3562 83.641 72.8063 81.6455 71.7965L44.5 53Z"}),s.jsxRuntimeExports.jsx(V,{d:"M61 30C62.6569 30 64.0231 28.6494 63.7755 27.0111C63.141 22.8129 61.181 18.8968 58.1421 15.8579C54.3914 12.1071 49.3043 10 44 10C38.6957 10 33.6086 12.1071 29.8579 15.8579C26.819 18.8968 24.859 22.8129 24.2245 27.0111C23.9769 28.6494 25.3431 30 27 30L44.5 30H61Z"}),s.jsxRuntimeExports.jsx(W,{x1:"44.5",y1:"53",x2:"44.5",y2:"30",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M44.5 10V8C44.5 6.34315 45.3431 5 47 5H80C81.6569 5 83 6.34315 83 8V24.4281C83 25.4126 82.517 26.3344 81.7076 26.8947L44.5 53"})]})]}),or=({className:e,orientation:t="left",scale:n,color:r,...o})=>s.jsxRuntimeExports.jsxs(ee,{className:l.CSS(l.CSS.B("orifice"),e),...o,children:[s.jsxRuntimeExports.jsxs(q,{orientation:t,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.8571,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.1429,top:50,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:70,height:34},orientation:t,color:r,scale:n,children:[s.jsxRuntimeExports.jsx(V,{d:"M2 2.5C27.451 21.3469 60.0915 12.0132 68 2.5",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M2 32.5C27.451 13.6531 60.0915 22.9868 68 32.5",strokeLinecap:"round"})]})]}),lr=({className:e,orientation:t="left",color:n,scale:r,...o})=>s.jsxRuntimeExports.jsxs(ee,{className:l.CSS(l.CSS.B("needle-valve"),e),...o,children:[s.jsxRuntimeExports.jsxs(q,{orientation:t,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.2989,top:51.1905,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.7011,top:51.1905,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:87,height:42},orientation:t,color:n,scale:r,children:[s.jsxRuntimeExports.jsx(V,{d:"M43.0152 21.5391L38.237 2.62245C38.1573 2.30658 38.396 2 38.7218 2L48.2782 2C48.604 2 48.8427 2.30658 48.763 2.62245L43.9848 21.5391C43.8576 22.0425 43.1424 22.0425 43.0152 21.5391Z",fill:l.cssString(n)}),s.jsxRuntimeExports.jsx(V,{d:"M43.5 21.5L6.35453 2.70349C4.35901 1.69372 2 3.14384 2 5.38029V37.6197C2 39.8562 4.35901 41.3063 6.35453 40.2965L43.5 21.5ZM43.5 21.5L80.6455 2.70349C82.641 1.69372 85 3.14384 85 5.3803V37.6197C85 39.8562 82.641 41.3063 80.6455 40.2965L43.5 21.5Z"})]})]}),ir=({className:e,orientation:t="left",color:n,scale:r,...o})=>s.jsxRuntimeExports.jsxs(ee,{orientation:t,className:l.CSS(l.CSS.B("angled-relief-valve"),e),...o,children:[s.jsxRuntimeExports.jsxs(q,{children:[s.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:t,left:32.8125,top:97.5922,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.0278,top:45.5639,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:64,height:79},orientation:t,color:n,scale:r,children:[s.jsxRuntimeExports.jsx(W,{x1:21,y1:2,x2:21,y2:36.7,strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M9.05106 14.0802L32.4273 4.29611",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M9.05106 20.0802L32.4273 10.2961",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M9.05106 26.0802L32.4273 16.2961",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M22.3611 35.1077C21.6298 35.4778 21.6298 36.5222 22.3611 36.8923L57.7433 54.7965C59.7388 55.8063 62.0978 54.3562 62.0978 52.1197L62.0978 19.8803C62.0978 17.6438 59.7388 16.1937 57.7433 17.2035L22.3611 35.1077Z"}),s.jsxRuntimeExports.jsx(V,{d:"M21.8923 37.3611C21.5222 36.6298 20.4778 36.6298 20.1077 37.3611L2.20349 72.7433C1.19372 74.7388 2.64384 77.0978 4.8803 77.0978H37.1197C39.3562 77.0978 40.8063 74.7388 39.7965 72.7433L21.8923 37.3611Z"})]})]}),cr=({className:e,color:t,dimensions:n,orientation:r,units:o="psi",children:i,inlineSize:c=80,...a})=>{const x=l.cssString(t),m=u.use(),p=t==null?"var(--pluto-gray-l0)":l.cssString(new l.Color(t).pickByContrast(m.colors.gray.l0,m.colors.gray.l9)),f=2.5*((n==null?void 0:n.width)??0)/500;return s.jsxRuntimeExports.jsxs(ee,{className:l.CSS(l.CSS.B("value"),e),...a,style:{borderColor:x,height:n==null?void 0:n.height,width:"100%"},children:[s.jsxRuntimeExports.jsx("div",{className:l.CSS.BE("value","content"),style:{flexGrow:1,minWidth:n==null?void 0:n.width,inlineSize:c},children:i}),s.jsxRuntimeExports.jsxs(q,{orientation:r,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:"left",left:-2+f,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:"left",left:102-f,top:50,id:"2"}),s.jsxRuntimeExports.jsx(b,{location:"top",orientation:"left",left:50,top:-2,id:"3"}),s.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:"left",left:50,top:102,id:"4"})]}),s.jsxRuntimeExports.jsx("div",{className:l.CSS.BE("value","units"),style:{background:x},children:s.jsxRuntimeExports.jsx(u.Text,{level:"small",color:p,children:o})})]})},ar=({enabled:e=!1,onClick:t,orientation:n="left"})=>s.jsxRuntimeExports.jsxs(ee,{orientation:n,children:[s.jsxRuntimeExports.jsx(u.Switch$1,{value:e,onClick:t,onChange:()=>{}}),s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:0,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:100,top:50,id:"2"})]})]}),ur=({onClick:e,orientation:t="left",label:n="",color:r,size:o,level:i})=>s.jsxRuntimeExports.jsxs(ee,{orientation:t,children:[s.jsxRuntimeExports.jsx(u.Button,{onClick:e,color:r,size:o,level:i,children:n}),s.jsxRuntimeExports.jsxs(q,{orientation:t,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:0,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:100,top:50,id:"2"}),s.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:50,top:0,id:"3"}),s.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:t,left:50,top:100,id:"4"})]})]}),xr=({className:e,orientation:t="left",text:n="",width:r,color:o,level:i,autoFit:c,align:a="center"})=>{const x=u.use(),m=l.cssString(o??x.colors.gray.l0),p={borderColor:m,textAlign:a};return l.g.construct(t)==="y"?p.height=c?"fit-content":r:p.width=c?"fit-content":r,s.jsxRuntimeExports.jsx(ee,{style:p,orientation:t,className:l.CSS(l.CSS.B("text-box"),l.CSS.loc(t),e),children:s.jsxRuntimeExports.jsx(u.Text,{color:m,level:i,children:n})})},dr=({orientation:e="left",className:t,onClick:n,children:r,value:o,units:i,color:c,onChange:a,...x})=>{const[m,p]=d.useState(o);return s.jsxRuntimeExports.jsxs(ee,{className:l.CSS(l.CSS.B("setpoint"),t),orientation:e,...x,children:[s.jsxRuntimeExports.jsxs(q,{orientation:e,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:e,left:1,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:e,left:100,top:50,id:"2"}),s.jsxRuntimeExports.jsx(b,{location:"top",orientation:e,left:50,top:-2,id:"3"}),s.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:e,left:50,top:102,id:"4"})]}),s.jsxRuntimeExports.jsx(u.Numeric,{size:"small",value:m,onChange:p,showDragHandle:!1,selectOnFocus:!0,endContent:i,color:c,style:{[l.CSS.var("pack-border-shade")]:l.cssString(c)},borderWidth:2,children:s.jsxRuntimeExports.jsx(u.Button,{variant:"outlined",size:"small",onClick:()=>a(m),color:c,children:"Set"})})]})},pr=({color:e,className:t,orientation:n="left",scale:r,...o})=>s.jsxRuntimeExports.jsxs(ie,{...o,className:l.CSS(l.CSS.B("screw-pump"),t),orientation:n,children:[s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:64,height:64},color:e,orientation:n,scale:r,children:[s.jsxRuntimeExports.jsx(Le,{cx:"32",cy:"32",r:"30"}),s.jsxRuntimeExports.jsx(W,{x1:"32",y1:"2",x2:"62",y2:"32",className:l.CSS(l.CSS.M("detail"),t)}),s.jsxRuntimeExports.jsx(W,{x1:"32",y1:"62",x2:"62",y2:"32",className:l.CSS(l.CSS.M("detail"),t)}),s.jsxRuntimeExports.jsx(V,{d:"M 0 0, L -10 -10, M 0 0, L -10 10",transform:"translate(32, 32)",strokeLinecap:"round",className:l.CSS(l.CSS.M("detail"),t)}),s.jsxRuntimeExports.jsx(V,{d:"M 0 0, L -10 -10, M 0 0, L -10 10",transform:"translate(42, 32)",strokeLinecap:"round",className:l.CSS(l.CSS.M("detail"),t)})]})]}),mr=({color:e,className:t,orientation:n="left",scale:r,...o})=>s.jsxRuntimeExports.jsxs(ie,{...o,className:l.CSS(l.CSS.B("vacuum-pump"),t),orientation:n,children:[s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:64,height:64},color:e,orientation:n,scale:r,children:[s.jsxRuntimeExports.jsx(Le,{cx:"32",cy:"32",r:"30"}),s.jsxRuntimeExports.jsx(W,{x1:"17",y1:"6.0192",x2:"57.9808",y2:"17",className:l.CSS(l.CSS.M("detail"),t)}),s.jsxRuntimeExports.jsx(W,{x1:"17",y1:"57.9808",x2:"57.9808",y2:"47",className:l.CSS(l.CSS.M("detail"),t)})]})]}),jr=({color:e,className:t,orientation:n="left",scale:r,...o})=>s.jsxRuntimeExports.jsxs(ie,{...o,className:l.CSS(l.CSS.B("cavity-pump"),t),orientation:n,children:[s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:64,height:64},color:e,orientation:n,scale:r,children:[s.jsxRuntimeExports.jsx(Le,{cx:"32",cy:"32",r:"30"}),s.jsxRuntimeExports.jsx(W,{x1:"32",y1:"2",x2:"62",y2:"32",className:l.CSS(l.CSS.M("detail"),t)}),s.jsxRuntimeExports.jsx(W,{x1:"32",y1:"62",x2:"62",y2:"32",className:l.CSS(l.CSS.M("detail"),t)}),s.jsxRuntimeExports.jsx(V,{d:"M 17 26 C 17 20.6667 23 20.6667 23 26 C 23 31.3333 29 31.3333 29 26 C 29 20.6667 35 20.6667 35 26",strokeLinecap:"round",transform:"translate(6, 6)",className:l.CSS(l.CSS.M("detail"),t)})]})]}),fr=({color:e,className:t,orientation:n="left",scale:r,...o})=>s.jsxRuntimeExports.jsxs(ie,{...o,className:l.CSS(l.CSS.B("piston-pump"),t),orientation:n,children:[s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:64,height:64},color:e,orientation:n,scale:r,children:[s.jsxRuntimeExports.jsx(Le,{cx:"32",cy:"32",r:"30"}),s.jsxRuntimeExports.jsx(W,{x1:"32",y1:"2",x2:"62",y2:"32",className:l.CSS(l.CSS.M("detail"),t)}),s.jsxRuntimeExports.jsx(W,{x1:"32",y1:"62",x2:"62",y2:"32",className:l.CSS(l.CSS.M("detail"),t)}),s.jsxRuntimeExports.jsx(V,{d:"M 23 32, h 16, m 0 -8, v 16",className:l.CSS(l.CSS.M("detail"),t),strokeLinecap:"round"})]})]}),gr=({color:e,className:t,orientation:n="left",scale:r,...o})=>s.jsxRuntimeExports.jsxs(ee,{...o,className:l.CSS(l.CSS.B("static-mixer"),t),orientation:n,children:[s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:1.5152,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98.4848,top:50,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:66,height:30},color:e,orientation:n,scale:r,children:[s.jsxRuntimeExports.jsx(ze,{x:"1",y:"1",width:"64",height:"28",rx:"2",ry:"2"}),s.jsxRuntimeExports.jsx(V,{d:"M17 10C23 10 27 20 33 20C39 20 43 10 49 10",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M17 20C23 20 27 10 33 10C39 10 43 20 49 20",strokeLinecap:"round"})]})]}),hr=({color:e,className:t,orientation:n="left",scale:r,...o})=>s.jsxRuntimeExports.jsxs(ie,{...o,className:l.CSS(l.CSS.B("rotary-mixer"),t),orientation:n,children:[s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:2,top:48.4849,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:97.5,top:48.4849,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:50,height:33},color:e,orientation:n,scale:r,children:[s.jsxRuntimeExports.jsx(V,{d:"M1 30V2C1 1.44772 1.44772 1 2 1H35.4545C35.7434 1 36.0181 1.12487 36.208 1.34247L48.4262 15.3425C48.7549 15.7192 48.7549 16.2808 48.4262 16.6575L36.208 30.6575C36.0181 30.8751 35.7434 31 35.4545 31H2C1.44772 31 1 30.5523 1 30Z"}),s.jsxRuntimeExports.jsx(W,{x1:"32",y1:"16",x2:"40",y2:"16",strokeLinecap:"round",className:l.CSS(l.CSS.M("detail"),t)}),s.jsxRuntimeExports.jsx(W,{x1:"32",y1:"16",x2:"28",y2:"22.9282",strokeLinecap:"round",className:l.CSS(l.CSS.M("detail"),t)}),s.jsxRuntimeExports.jsx(W,{x1:"32",y1:"16",x2:"28",y2:"9.0717",strokeLinecap:"round",className:l.CSS(l.CSS.M("detail"),t)})]})]}),Sr=({className:e,color:t,orientation:n="left",enabled:r,scale:o,...i})=>s.jsxRuntimeExports.jsxs(ee,{...i,orientation:n,className:l.CSS(l.CSS.B("light"),r&&l.CSS.M("enabled"),e),children:[s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),s.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),s.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:96.75,id:"4"})]}),s.jsxRuntimeExports.jsx(K,{dimensions:{width:64,height:64},color:t,orientation:n,scale:o,children:s.jsxRuntimeExports.jsx(Le,{cx:"32",cy:"32",r:"30"})})]}),Er=({className:e,orientation:t="left",color:n,scale:r,...o})=>s.jsxRuntimeExports.jsxs(ee,{className:l.CSS(e,l.CSS.B("regulator")),...o,children:[s.jsxRuntimeExports.jsxs(q,{orientation:t,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:3.4091,top:66.25,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.7273,top:66.25,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:88,height:80},orientation:t,color:n,scale:r,children:[s.jsxRuntimeExports.jsx(V,{d:"M44.5 53L7.35453 34.2035C5.35901 33.1937 3 34.6438 3 36.8803V69.1197C3 71.3562 5.35901 72.8063 7.35453 71.7965L44.5 53ZM44.5 53L81.6455 34.2035C83.641 33.1937 86 34.6438 86 36.8803V69.1197C86 71.3562 83.641 72.8063 81.6455 71.7965L44.5 53Z"}),s.jsxRuntimeExports.jsx(ze,{x:"19",y:"10",width:"51",height:"20",rx:"3",ry:"3"}),s.jsxRuntimeExports.jsx(W,{x1:"44.5",y1:"53",x2:"44.5",y2:"30",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M44.5 10V8C44.5 6.34315 45.3431 5 47 5H80C81.6569 5 83 6.34315 83 8V24.4281C83 25.4126 82.517 26.3344 81.7076 26.8947L44.5 53"})]})]}),Rr=({height:e=86,orientation:t="left",color:n,scale:r,...o})=>s.jsxRuntimeExports.jsxs(ie,{...o,className:l.CSS(l.CSS.B("agitator")),children:[s.jsxRuntimeExports.jsx(q,{children:s.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:t,left:50,top:100,id:"1"})}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:86,height:e},color:n,orientation:t,scale:r,children:[s.jsxRuntimeExports.jsx(V,{d:"M1 85V48.8541C1 46.624 3.34694 45.1735 5.34164 46.1708L80.6584 83.8292 C82.6531 84.8265 85 83.376 85 81.1459 V44",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M43 1L43 65",strokeLinecap:"round"})]})]}),yr=({height:e=86,orientation:t="left",color:n,scale:r,...o})=>s.jsxRuntimeExports.jsxs(ie,{...o,className:l.CSS(l.CSS.B("agitator")),children:[s.jsxRuntimeExports.jsx(q,{children:s.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:51,top:2,id:"4"})}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:86,height:e},color:n,orientation:t,scale:r,children:[s.jsxRuntimeExports.jsx(V,{d:"M43.5 69.573L14.9534 55.6147C8.97428 52.6911 2 57.0443 2 63.6999V75.4462C2 82.1018 8.97429 86.455 14.9534 83.5314L43.5 69.573ZM43.5 69.573L72.0466 55.6147C78.0257 52.6911 85 57.0443 85 63.6999V75.4462C85 82.1018 78.0257 86.455 72.0466 83.5314L43.5 69.573Z"}),s.jsxRuntimeExports.jsx(V,{d:"M43.5 69.6L43.5 2",strokeLinecap:"round"})]})]}),Cr=({height:e=86,orientation:t="left",color:n,scale:r,...o})=>s.jsxRuntimeExports.jsxs(ie,{...o,className:l.CSS(l.CSS.B("agitator")),children:[s.jsxRuntimeExports.jsx(q,{children:s.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:50,top:2,id:"4"})}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:86,height:e},color:n,orientation:t,scale:r,children:[s.jsxRuntimeExports.jsx(W,{x1:"43",y1:"1",x2:"43",y2:"49",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(ze,{x:"3",y:"49",width:"80",height:"34",rx:"3",strokeLinecap:"round"})]})]}),br=({className:e,height:t=86,orientation:n="left",color:r,scale:o,...i})=>s.jsxRuntimeExports.jsxs(ie,{...i,className:l.CSS(l.CSS.B("agitator")),children:[s.jsxRuntimeExports.jsx(q,{children:s.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:2,id:"4"})}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:86,height:t},color:r,orientation:n,scale:o,children:[s.jsxRuntimeExports.jsx(W,{x1:"43",y1:"1",x2:"43",y2:"49",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(ze,{x:"3",y:"49",width:"80",height:"34",rx:"3"}),s.jsxRuntimeExports.jsx(W,{x1:"3.8",y1:"82.1",x2:"43",y2:"49",className:l.CSS(l.CSS.M("detail"),e),strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(W,{x1:"43",y1:"49",x2:"43",y2:"83",className:l.CSS(l.CSS.M("detail"),e),strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(W,{x1:"43",y1:"83",x2:"82.2",y2:"49.9",className:l.CSS(l.CSS.M("detail"),e),strokeLinecap:"round"})]})]}),vr=({className:e,height:t=86,orientation:n="left",color:r,scale:o,...i})=>s.jsxRuntimeExports.jsxs(ie,{...i,className:l.CSS(l.CSS.B("agitator")),children:[s.jsxRuntimeExports.jsx(q,{children:s.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:2,id:"4"})}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:86,height:t},color:r,orientation:n,scale:o,children:[s.jsxRuntimeExports.jsx(W,{x1:"43",y1:"1",x2:"43",y2:"49",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(W,{x1:"3",y1:"49",x2:"83",y2:"49",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(W,{x1:"3",y1:"83",x2:"83",y2:"83",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(W,{x1:"43",y1:"49",x2:"43",y2:"83",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(ze,{x:"3",y:"49",width:"80",height:"34",strokeWidth:0})]})]}),wr=({className:e,height:t=86,orientation:n="left",color:r,scale:o,...i})=>s.jsxRuntimeExports.jsxs(ie,{...i,className:l.CSS(l.CSS.B("agitator")),children:[s.jsxRuntimeExports.jsx(q,{children:s.jsxRuntimeExports.jsx(b,{location:"top",left:50,top:2,id:"4",orientation:n})}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:86,height:t},color:r,orientation:n,scale:o,children:[s.jsxRuntimeExports.jsx(W,{x1:43,y1:1,x2:43,y2:60,strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M5.375 36L70.8204 48.7138C74.0584 49.3428 74.0573 53.9765 70.8189 54.6039L14.7952 65.4584C11.5729 66.0827 11.5494 70.6856 14.7651 71.3429L81.5208 84.9873",strokeLinecap:"round"})]})]}),Pr=({color:e,className:t,orientation:n="left",scale:r,...o})=>s.jsxRuntimeExports.jsxs(ie,{...o,className:l.CSS(l.CSS.B("compressor"),t),orientation:n,children:[s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:1.5,top:41,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:95,top:3,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:68,height:61},color:e,orientation:n,scale:r,children:[s.jsxRuntimeExports.jsx(Le,{cx:"35",cy:"25",r:"23"}),s.jsxRuntimeExports.jsx(V,{d:"M50 41.5L56.7186 50.8314C57.6711 52.1544 56.7257 54 55.0955 54H14.9045C13.2743 54 12.3289 52.1544 13.2814 50.8314L20 41.5"}),s.jsxRuntimeExports.jsx(W,{x1:"35",y1:"2",x2:"65.0167",y2:"2"}),s.jsxRuntimeExports.jsx(W,{x1:"1",y1:"25",x2:"35",y2:"25"})]})]}),kr=({id:e,className:t,orientation:n="right",label:r="text",color:o="black",level:i="p",...c})=>{const a=document.querySelector(`[data-id="${e}"]`);a&&a.classList.add(n);const x=l.g.construct(n)==="y";return s.jsxRuntimeExports.jsxs(ee,{className:l.CSS(l.CSS.B("arrow"),l.CSS.loc(n),t),orientation:n,...c,children:[s.jsxRuntimeExports.jsx("div",{className:"wrapper",children:s.jsxRuntimeExports.jsx("div",{className:"outline",style:{backgroundColor:l.cssString(o)},children:s.jsxRuntimeExports.jsx("div",{className:"bg",children:s.jsxRuntimeExports.jsx(u.Text,{level:i,className:l.CSS.BE("symbol","label"),children:r})})})}),s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,preventAutoAdjust:!0,left:98,top:50,swap:x,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",preventAutoAdjust:!0,orientation:n,left:1,top:50,swap:x,id:"2"})]}),s.jsxRuntimeExports.jsx("svg",{style:{visibility:"hidden",position:"absolute"},width:"0",height:"0",xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:s.jsxRuntimeExports.jsx("defs",{children:s.jsxRuntimeExports.jsxs("filter",{id:"goo",children:[s.jsxRuntimeExports.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"1.5",result:"blur"}),s.jsxRuntimeExports.jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 19 -9",result:"goo"}),s.jsxRuntimeExports.jsx("feComposite",{in:"SourceGraphic",in2:"goo",operator:"atop"})]})})})]})},au=({aetherKey:e,sink:t})=>{const n=u.useMemoDeepEqualProps({sink:t}),[,,r]=u.use$3({aetherKey:e,type:j.Button.TYPE,schema:j.buttonStateZ,initialState:{trigger:0,sink:t}});return d.useEffect(()=>{r(i=>({...i,...n}))},[n]),{click:d.useCallback(()=>{r(i=>({...i,trigger:i.trigger+1}))},[r])}},uu=({aetherKey:e,source:t})=>{const n=u.useMemoDeepEqualProps({source:t}),[,{enabled:r},o]=u.use$3({aetherKey:e,type:j.Light.TYPE,schema:j.lightStateZ,initialState:{enabled:!1,...n}});return d.useEffect(()=>o(i=>({...i,...n})),[n,o]),{enabled:r}},U=d.forwardRef(({label:e="",onChange:t,level:n="p",children:r,orientation:o="top",style:i,className:c,maxInlineSize:a=150,...x},m)=>s.jsxRuntimeExports.jsxs(D.Space,{style:{marginRight:o==="right"?1:0,marginTop:o==="top"?1:0,...i},size:2/3,direction:o,ref:m,className:l.CSS(l.CSS.B("symbol"),c),align:"center",justify:"center",...x,children:[e.length>0&&s.jsxRuntimeExports.jsx(u.Editable,{className:l.CSS.BE("symbol","label"),value:e,style:{maxInlineSize:a},onChange:d.useCallback(p=>t({label:{label:p,level:n,orientation:o}}),[t,n]),level:n}),r]}));U.displayName="Labeled";const xu=({aetherKey:e,source:t,sink:n})=>{const r=u.useMemoDeepEqualProps({source:t,sink:n}),[,{value:o},i]=u.use$3({aetherKey:e,type:j.Setpoint.TYPE,schema:j.setpointStateZ,initialState:{trigger:0,value:0,...r}});return d.useEffect(()=>{i(a=>({...a,...r}))},[r,i]),{set:d.useCallback(a=>i(x=>({...x,trigger:x.trigger+1,command:a})),[i]),value:o}},oe=({aetherKey:e,source:t,sink:n})=>{const r=u.useMemoDeepEqualProps({source:t,sink:n}),[,{triggered:o,enabled:i},c]=u.use$3({aetherKey:e,type:j.Toggle.TYPE,schema:j.toggleStateZ,initialState:{triggered:!1,enabled:!1,...r}});return d.useEffect(()=>{c(x=>({...x,...r}))},[r,c]),{toggle:d.useCallback(()=>c(x=>({...x,triggered:!x.triggered})),[c]),triggered:o,enabled:i}},du=j.Value.z.omit({font:!0}).partial({color:!0}).extend({level:C.levelZ.optional()}),Tr=({aetherKey:e,box:t,telem:n,color:r,precision:o,minWidth:i,level:c="small"})=>{const a=u.useMemoDeepEqualProps({box:t,telem:n,color:r,precision:o,level:c,minWidth:i}),[,x,m]=u.use$3({aetherKey:e,type:j.Value.TYPE,schema:j.Value.z,initialState:a});return d.useLayoutEffect(()=>m(p=>({...p,...a})),[a]),{width:x.width??x.minWidth}},pu=Object.freeze(Object.defineProperty({__proto__:null,corePropsZ:du,use:Tr},Symbol.toStringTag,{value:"Module"})),Lr=e=>l.g.construct(e)==="x"?l.J.swap(e):e,mu=e=>l.g.construct(e)==="y"?l.J.swap(e):e,J=({showChip:e=!0,showIndicator:t=!0,indicator:n,orientation:r="left",chip:o,children:i,show:c=!0,...a})=>s.jsxRuntimeExports.jsxs(D.Space,{direction:l.J.rotate90(r),align:"center",justify:"center",empty:!0,...a,children:[s.jsxRuntimeExports.jsxs(D.Space,{direction:l.g.construct(r),align:"center",className:l.CSS(l.CSS.B("control-state")),size:"small",children:[c&&e&&s.jsxRuntimeExports.jsx(Mn,{size:"small",...o}),c&&t&&s.jsxRuntimeExports.jsx(_n,{...n})]}),i]}),Mr=u.wrap$1("ThreeWayValve",({aetherKey:e,label:t,onChange:n,control:r,source:o,sink:i,orientation:c="left",...a})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:o,sink:i});return s.jsxRuntimeExports.jsx(U,{...t,onChange:n,children:s.jsxRuntimeExports.jsx(J,{...r,orientation:Lr(c),children:s.jsxRuntimeExports.jsx(Hn,{enabled:x,triggered:m,onClick:p,orientation:c,...a})})})}),Nr=e=>s.jsxRuntimeExports.jsx(Hn,{...e}),$r=u.wrap$1("Valve",({control:e,aetherKey:t,label:n,onChange:r,source:o,sink:i,orientation:c,...a})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:t,source:o,sink:i});return s.jsxRuntimeExports.jsx(U,{...n,onChange:r,children:s.jsxRuntimeExports.jsx(J,{...e,orientation:c,children:s.jsxRuntimeExports.jsx(Yn,{enabled:x,triggered:m,onClick:p,orientation:c,...a})})})}),_r=e=>s.jsxRuntimeExports.jsx(Yn,{...e}),Br=u.wrap$1("SolenoidValve",({aetherKey:e,label:t,onChange:n,orientation:r="left",normallyOpen:o,source:i,sink:c,control:a,...x})=>{const{enabled:m,triggered:p,toggle:f}=oe({aetherKey:e,source:i,sink:c});return s.jsxRuntimeExports.jsx(U,{...t,onChange:n,children:s.jsxRuntimeExports.jsx(J,{...a,orientation:mu(r),children:s.jsxRuntimeExports.jsx(Gn,{enabled:m,triggered:p,onClick:f,orientation:r,normallyOpen:o,...x})})})}),Ar=e=>s.jsxRuntimeExports.jsx(Gn,{...e}),zr=u.wrap$1("FourWayValve",({aetherKey:e,control:t,label:n,onChange:r,orientation:o,source:i,sink:c,...a})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:i,sink:c});return s.jsxRuntimeExports.jsx(U,{...n,onChange:r,children:s.jsxRuntimeExports.jsx(J,{...t,orientation:o,children:s.jsxRuntimeExports.jsx(Un,{enabled:x,triggered:m,onClick:p,orientation:o,...a})})})}),Or=e=>s.jsxRuntimeExports.jsx(Un,{...e}),Dr=u.wrap$1("AngleValve",({aetherKey:e,label:t,control:n,onChange:r,orientation:o="left",source:i,sink:c,...a})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:i,sink:c});return s.jsxRuntimeExports.jsx(U,{...t,onChange:r,children:s.jsxRuntimeExports.jsx(J,{...n,orientation:Lr(o),children:s.jsxRuntimeExports.jsx(Xn,{enabled:x,triggered:m,onClick:p,orientation:o,...a})})})}),Vr=e=>s.jsxRuntimeExports.jsx(Xn,{...e}),Ir=u.wrap$1("Pump",({aetherKey:e,label:t,control:n,onChange:r,orientation:o,source:i,sink:c,...a})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:i,sink:c});return s.jsxRuntimeExports.jsx(U,{...t,onChange:r,children:s.jsxRuntimeExports.jsx(J,{...n,orientation:o,children:s.jsxRuntimeExports.jsx(Jn,{enabled:x,triggered:m,onClick:p,orientation:o,...a})})})}),Zr=e=>s.jsxRuntimeExports.jsx(Jn,{...e}),Fr=({backgroundColor:e,label:t,onChange:n,orientation:r,color:o,dimensions:i,borderRadius:c})=>s.jsxRuntimeExports.jsx(U,{...t,onChange:n,children:s.jsxRuntimeExports.jsx(St,{onResize:a=>n({dimensions:a}),orientation:r,color:o,dimensions:i,borderRadius:c,backgroundColor:e})}),qr=e=>s.jsxRuntimeExports.jsx(St,{...e,dimensions:{width:25,height:50}}),Ur=({backgroundColor:e,borderRadius:t,label:n,onChange:r,orientation:o,color:i,dimensions:c})=>s.jsxRuntimeExports.jsx(U,{...n,onChange:r,children:s.jsxRuntimeExports.jsx(St,{onResize:a=>r({dimensions:a}),orientation:o,color:i,dimensions:c,boxBorderRadius:t,backgroundColor:e})}),Hr=e=>s.jsxRuntimeExports.jsx(St,{...e,dimensions:{width:25,height:50},borderRadius:0}),Yr=({label:e,onChange:t,aetherKey:n,...r})=>s.jsxRuntimeExports.jsx(U,{...e,onChange:t,children:s.jsxRuntimeExports.jsx(Wn,{...r})}),Gr=e=>s.jsxRuntimeExports.jsx(Wn,{...e}),Wr=({label:e,onChange:t,aetherKey:n,...r})=>s.jsxRuntimeExports.jsx(U,{...e,onChange:t,children:s.jsxRuntimeExports.jsx(rr,{...r})}),Kr=e=>s.jsxRuntimeExports.jsx(rr,{...e}),Xr=({label:e,onChange:t,aetherKey:n,...r})=>s.jsxRuntimeExports.jsx(U,{...e,onChange:t,children:s.jsxRuntimeExports.jsx(Er,{...r})}),Jr=e=>s.jsxRuntimeExports.jsx(Er,{...e}),Qr=({label:e,onChange:t,aetherKey:n,...r})=>s.jsxRuntimeExports.jsx(U,{...e,onChange:t,children:s.jsxRuntimeExports.jsx(Qn,{...r})}),eo=e=>s.jsxRuntimeExports.jsx(Qn,{...e}),to=({label:e,aetherKey:t,onChange:n,...r})=>s.jsxRuntimeExports.jsx(U,{...e,onChange:n,children:s.jsxRuntimeExports.jsx(er,{...r})}),so=e=>s.jsxRuntimeExports.jsx(er,{...e}),no=({label:e,aetherKey:t,onChange:n,...r})=>s.jsxRuntimeExports.jsx(U,{...e,onChange:n,children:s.jsxRuntimeExports.jsx(tr,{...r})}),ro=e=>s.jsxRuntimeExports.jsx(tr,{...e}),oo=u.wrap$1("Setpoint",({label:e,aetherKey:t,orientation:n,control:r,units:o,source:i,sink:c,color:a,onChange:x})=>{const{value:m,set:p}=xu({aetherKey:t,source:i,sink:c});return s.jsxRuntimeExports.jsx(U,{...e,onChange:x,children:s.jsxRuntimeExports.jsx(J,{...r,className:l.CSS.B("symbol"),orientation:n,children:s.jsxRuntimeExports.jsx(dr,{value:m,onChange:p,units:o,color:a,orientation:n})})})}),lo=e=>s.jsxRuntimeExports.jsx(dr,{value:12,onChange:()=>{},units:"mV",...e,children:s.jsxRuntimeExports.jsx(u.Text,{level:"p",children:"10.0"})}),io=({label:e,aetherKey:t,onChange:n,...r})=>s.jsxRuntimeExports.jsx(U,{...e,onChange:n,children:s.jsxRuntimeExports.jsx(sr,{...r})}),co=e=>s.jsxRuntimeExports.jsx(sr,{...e}),ao=({label:e,onChange:t,aetherKey:n,...r})=>s.jsxRuntimeExports.jsx(U,{...e,onChange:t,children:s.jsxRuntimeExports.jsx(lr,{...r})}),uo=e=>s.jsxRuntimeExports.jsx(lr,{...e}),xo=({label:e,onChange:t,aetherKey:n,...r})=>s.jsxRuntimeExports.jsx(U,{...e,onChange:t,children:s.jsxRuntimeExports.jsx(Kn,{...r})}),po=e=>s.jsxRuntimeExports.jsx(Kn,{...e}),mo=({label:e,onChange:t,aetherKey:n,...r})=>s.jsxRuntimeExports.jsx(U,{...e,onChange:t,children:s.jsxRuntimeExports.jsx(or,{...r})}),jo=e=>s.jsxRuntimeExports.jsx(or,{...e}),fo=({label:e,onChange:t,aetherKey:n,...r})=>s.jsxRuntimeExports.jsx(U,{...e,onChange:t,children:s.jsxRuntimeExports.jsx(ir,{...r})}),go=e=>s.jsxRuntimeExports.jsx(ir,{...e}),ho=u.wrap$1("Value",({aetherKey:e,label:t,level:n="p",position:r,className:o,textColor:i,color:c,telem:a,units:x,onChange:m,tooltip:p,inlineSize:f})=>{const h=u.useTypography(n),[g,E]=d.useState({outerBox:l.To.ZERO,labelBox:l.To.ZERO}),R=(h.lineHeight+.5)*h.baseSize+2,k=u.useResize(d.useCallback(P=>{const S=document.querySelector(`.react-flow__node[data-id="${e}"] .pluto-symbol__label`);let v={...l.To.ZERO};S!=null&&(v=l.To.construct(S),v=l.To.resize(v,{width:l.To.width(v),height:l.To.height(v)})),E({outerBox:P,labelBox:v})},[]),{}),{zoom:L}=j.useInitialViewport(),M=fu({labelOrientation:(t==null?void 0:t.orientation)??"top",hasLabel:(t==null?void 0:t.label)!=null&&(t==null?void 0:t.label.length)>0,valueBoxHeight:R,position:r,zoom:L,...g}),{width:N}=Tr({aetherKey:e,color:i,level:n,box:M,telem:a,minWidth:f});return s.jsxRuntimeExports.jsxs(u.Dialog$1,{location:{y:"top"},hide:p==null||p.length===0,children:[s.jsxRuntimeExports.jsx(D.Space,{direction:"y",children:p==null?void 0:p.map((P,S)=>s.jsxRuntimeExports.jsx(u.Text,{level:"small",children:P},S))}),s.jsxRuntimeExports.jsx(U,{className:l.CSS(o,l.CSS.B("value-labeled")),ref:k,onChange:m,...t,children:s.jsxRuntimeExports.jsx(cr,{color:c,dimensions:{height:R,width:N},inlineSize:f,units:x})})]})}),ju=.9,fu=({labelOrientation:e,outerBox:t,labelBox:n,valueBoxHeight:r,position:o,hasLabel:i,zoom:c})=>{const a=l.q.scale(l.To.dims(n),1/(ju*c));return l.g.construct(e)==="x"&&(o=l.q.translate(o,"y",Math.max((a.y-r)/2-1,0))),i&&e==="left"?o=l.q.translate(o,"x",a.x+4):i&&e==="top"&&(o=l.q.translate(o,"y",a.y+4)),l.To.construct(o.x,o.y,l.To.width(t),r)},So=({color:e})=>s.jsxRuntimeExports.jsx(cr,{color:e,dimensions:{width:60,height:25},units:"psi",children:s.jsxRuntimeExports.jsx(u.Text,{level:"p",children:"50.00"})}),Eo=u.wrap$1("Switch",({aetherKey:e,label:t,control:n,onChange:r,orientation:o,source:i,sink:c,...a})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:i,sink:c});return s.jsxRuntimeExports.jsx(U,{...t,onChange:r,children:s.jsxRuntimeExports.jsx(J,{...n,orientation:o,children:s.jsxRuntimeExports.jsx(ar,{enabled:x,triggered:m,onClick:p,orientation:o,...a})})})}),Ro=e=>s.jsxRuntimeExports.jsx(ar,{...e}),yo=u.wrap$1("Button",({aetherKey:e,label:t,orientation:n,sink:r,control:o,...i})=>{const{click:c}=au({aetherKey:e,sink:r});return s.jsxRuntimeExports.jsx(J,{...o,className:l.CSS.B("symbol"),orientation:n,children:s.jsxRuntimeExports.jsx(ur,{...t,onClick:c,...i})})}),Co=({label:e,...t})=>s.jsxRuntimeExports.jsx(ur,{label:"Button",...t}),bo=u.wrap$1("screwPump",({aetherKey:e,label:t,control:n,onChange:r,orientation:o,source:i,sink:c,...a})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:i,sink:c});return s.jsxRuntimeExports.jsx(U,{...t,onChange:r,children:s.jsxRuntimeExports.jsx(J,{...n,orientation:o,children:s.jsxRuntimeExports.jsx(pr,{enabled:x,triggered:m,onClick:p,orientation:o,...a})})})}),vo=e=>s.jsxRuntimeExports.jsx(pr,{...e}),wo=u.wrap$1("vacuumPump",({aetherKey:e,label:t,control:n,onChange:r,orientation:o,source:i,sink:c,...a})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:i,sink:c});return s.jsxRuntimeExports.jsx(U,{...t,onChange:r,children:s.jsxRuntimeExports.jsx(J,{...n,orientation:o,children:s.jsxRuntimeExports.jsx(mr,{enabled:x,triggered:m,onClick:p,orientation:o,...a})})})}),Po=e=>s.jsxRuntimeExports.jsx(mr,{...e}),ko=u.wrap$1("progressiveCavityPump",({aetherKey:e,label:t,control:n,onChange:r,orientation:o,source:i,sink:c,...a})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:i,sink:c});return s.jsxRuntimeExports.jsx(U,{...t,onChange:r,children:s.jsxRuntimeExports.jsx(J,{...n,orientation:o,children:s.jsxRuntimeExports.jsx(jr,{enabled:x,triggered:m,onClick:p,orientation:o,...a})})})}),To=e=>s.jsxRuntimeExports.jsx(jr,{...e}),Lo=u.wrap$1("pistonPump",({aetherKey:e,label:t,control:n,onChange:r,orientation:o,source:i,sink:c,...a})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:i,sink:c});return s.jsxRuntimeExports.jsx(U,{...t,onChange:r,children:s.jsxRuntimeExports.jsx(J,{...n,orientation:o,children:s.jsxRuntimeExports.jsx(fr,{enabled:x,triggered:m,onClick:p,orientation:o,...a})})})}),Mo=e=>s.jsxRuntimeExports.jsx(fr,{...e}),No=({label:e,onChange:t,aetherKey:n,...r})=>s.jsxRuntimeExports.jsx(U,{...e,onChange:t,children:s.jsxRuntimeExports.jsx(gr,{...r})}),$o=e=>s.jsxRuntimeExports.jsx(gr,{...e}),_o=u.wrap$1("rotaryMixer",({aetherKey:e,label:t,control:n,onChange:r,orientation:o,source:i,sink:c,...a})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:i,sink:c});return s.jsxRuntimeExports.jsx(U,{...t,onChange:r,children:s.jsxRuntimeExports.jsx(J,{...n,orientation:o,children:s.jsxRuntimeExports.jsx(hr,{enabled:x,triggered:m,onClick:p,orientation:o,...a})})})}),Bo=e=>s.jsxRuntimeExports.jsx(hr,{...e}),Ao=u.wrap$1("light",({aetherKey:e,label:t,source:n,onChange:r,...o})=>{const{enabled:i}=uu({aetherKey:e,source:n});return s.jsxRuntimeExports.jsx(U,{...t,onChange:r,children:s.jsxRuntimeExports.jsx(Sr,{enabled:i,...o})})}),zo=e=>s.jsxRuntimeExports.jsx(Sr,{...e}),Oo=u.wrap$1("agitator",({aetherKey:e,label:t,orientation:n="left",source:r,sink:o,onChange:i,control:c,...a})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:r,sink:o});return s.jsxRuntimeExports.jsx(U,{...t,onChange:i,children:s.jsxRuntimeExports.jsx(J,{orientation:n,...c,children:s.jsxRuntimeExports.jsx(Rr,{enabled:x,orientation:n,triggered:m,onClick:p,...a})})})}),Do=e=>s.jsxRuntimeExports.jsx(Rr,{...e}),Vo=u.wrap$1("propellerAgitator",({aetherKey:e,label:t,orientation:n="left",source:r,sink:o,onChange:i,control:c,...a})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:r,sink:o});return s.jsxRuntimeExports.jsx(U,{...t,onChange:i,children:s.jsxRuntimeExports.jsx(J,{orientation:n,...c,children:s.jsxRuntimeExports.jsx(yr,{enabled:x,orientation:n,triggered:m,onClick:p,...a})})})}),Io=e=>s.jsxRuntimeExports.jsx(yr,{...e}),Zo=u.wrap$1("flatBladeAgitator",({aetherKey:e,label:t,orientation:n="left",source:r,sink:o,onChange:i,control:c,...a})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:r,sink:o});return s.jsxRuntimeExports.jsx(U,{...t,onChange:i,children:s.jsxRuntimeExports.jsx(J,{orientation:n,...c,children:s.jsxRuntimeExports.jsx(Cr,{enabled:x,orientation:n,triggered:m,onClick:p,...a})})})}),Fo=e=>s.jsxRuntimeExports.jsx(Cr,{...e}),qo=u.wrap$1("paddleAgitator",({aetherKey:e,label:t,orientation:n="left",source:r,sink:o,onChange:i,control:c,...a})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:r,sink:o});return s.jsxRuntimeExports.jsx(U,{...t,onChange:i,children:s.jsxRuntimeExports.jsx(J,{orientation:n,...c,children:s.jsxRuntimeExports.jsx(br,{enabled:x,orientation:n,triggered:m,onClick:p,...a})})})}),Uo=e=>s.jsxRuntimeExports.jsx(br,{...e}),Ho=u.wrap$1("crossBeamAgitator",({aetherKey:e,label:t,orientation:n="left",source:r,sink:o,onChange:i,control:c,...a})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:r,sink:o});return s.jsxRuntimeExports.jsx(U,{...t,onChange:i,children:s.jsxRuntimeExports.jsx(J,{orientation:n,...c,children:s.jsxRuntimeExports.jsx(vr,{enabled:x,orientation:n,triggered:m,onClick:p,...a})})})}),Yo=e=>s.jsxRuntimeExports.jsx(vr,{...e}),Go=u.wrap$1("helicalAgitator",({aetherKey:e,label:t,orientation:n="left",source:r,sink:o,onChange:i,control:c,...a})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:r,sink:o});return s.jsxRuntimeExports.jsx(U,{...t,onChange:i,children:s.jsxRuntimeExports.jsx(J,{orientation:n,...c,children:s.jsxRuntimeExports.jsx(wr,{enabled:x,orientation:n,triggered:m,onClick:p,...a})})})}),Wo=e=>s.jsxRuntimeExports.jsx(wr,{...e}),Ko=u.wrap$1("compressor",({aetherKey:e,label:t,orientation:n="left",source:r,sink:o,onChange:i,control:c,...a})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:r,sink:o});return s.jsxRuntimeExports.jsx(U,{...t,onChange:i,children:s.jsxRuntimeExports.jsx(J,{orientation:n,...c,children:s.jsxRuntimeExports.jsx(Pr,{enabled:x,orientation:n,triggered:m,onClick:p,...a})})})}),Xo=e=>s.jsxRuntimeExports.jsx(Pr,{...e}),Jo=e=>s.jsxRuntimeExports.jsx(xr,{...e}),Qo=({level:e="p",width:t=100,...n})=>s.jsxRuntimeExports.jsx(xr,{className:l.CSS.B("symbol"),level:e,width:t,...n}),el=({label:{label:e,level:t},aetherKey:n,position:r,...o})=>s.jsxRuntimeExports.jsx(kr,{label:e,level:t,...o,className:l.CSS.B("symbol")}),tl=({label:e,...t})=>s.jsxRuntimeExports.jsx(kr,{label:"Off Page",...t,orientation:"right"}),H=4,sl=2,gu=["agitator","angledReliefValve","angledValve","offPageReference","box","burstDisc","button","cap","cavityPump","checkValve","compressor","crossBeamAgitator","electricRegulator","filter","flatBladeAgitator","fourWayValve","helicalAgitator","light","manualValve","needleValve","orifice","paddleAgitator","propellerAgitator","pistonPump","pump","regulator","reliefValve","rotaryMixer","screwPump","setpoint","solenoidValve","staticMixer","switch","tank","textBox","threeWayValve","vacuumPump","value","valve"],hu=pe.z.enum(gu),Q={orientation:"left",scale:1},Su={...Q,source:j.sourcePipeline("string",{connections:[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],segments:{valueStream:j.streamChannelValue({channel:0}),rollingAverage:j.rollingAverage({windowSize:1}),stringifier:j.stringifyNumber({precision:2})},outlet:"stringifier"})},Eu={...Q,source:j.sourcePipeline("number",{connections:[],segments:{valueStream:j.streamChannelValue({channel:0})},outlet:"valueStream"})},Ru={...Q,sink:j.sinkPipeline("number",{connections:[],segments:{setter:j.setChannelValue({channel:0})},inlet:"setter"})},nl={...Q,source:j.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:j.streamChannelValue({channel:0}),threshold:j.withinBounds({trueBound:{lower:.9,upper:1.1}})},outlet:"threshold"})},rl={...Q,control:{show:!0},sink:j.sinkPipeline("boolean",{connections:[{from:"setpoint",to:"setter"}],segments:{setter:j.setChannelValue({channel:0}),setpoint:j.setpoint({truthy:1,falsy:0})},inlet:"setpoint"})},le={...nl,...rl},Z=e=>({label:{label:e,level:"p",orientation:"top",maxInlineSize:150,align:"center"}}),yu={width:125,height:200},ls={dimensions:yu},Cu=3,bu={name:"Three Way Valve",key:"threeWayValve",Form:re,Symbol:Mr,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Three Way Valve"),...le}),Preview:Nr,zIndex:H},vu={name:"Valve",key:"valve",Form:re,Symbol:$r,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Valve"),...le}),Preview:_r,zIndex:H},wu={name:"Solenoid Valve",key:"solenoidValve",Form:re,Symbol:Br,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Solenoid Valve"),normallyOpen:!1,...le}),Preview:Ar,zIndex:H},Pu={name:"Four Way Valve",key:"fourWayValve",Form:re,Symbol:zr,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Four Way Valve"),...le}),Preview:Or,zIndex:H},ku={name:"Angled Valve",key:"angledValve",Form:re,Symbol:Dr,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Angled Valve"),...le}),Preview:Vr,zIndex:H},Tu={name:"Pump",key:"pump",Form:re,Symbol:Ir,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Pump"),...le}),Preview:Zr,zIndex:H},Lu={name:"Screw Pump",key:"screwPump",Form:re,Symbol:bo,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Screw Pump"),...le}),Preview:vo,zIndex:H},Mu={name:"Tank",key:"tank",Form:Fn,Symbol:Fr,defaultProps:e=>({color:e.colors.gray.l9.rgba255,backgroundColor:e.colors.gray.l1.setAlpha(0).rgba255,...Z("Tank"),borderRadius:nr,...ls,...Q}),Preview:qr,zIndex:sl},Nu={name:"Box",key:"box",Form:()=>Fn({includeBorderRadius:!0}),Symbol:Ur,defaultProps:e=>({color:e.colors.gray.l9.rgba255,backgroundColor:e.colors.gray.l1.setAlpha(0).rgba255,...Z("Box"),borderRadius:Cu,...ls,...Q}),Preview:Hr,zIndex:sl},$u={name:"Relief Valve",key:"reliefValve",Form:ae,Symbol:Yr,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Relief Valve"),...Q}),Preview:Gr,zIndex:H},_u={name:"Regulator",key:"regulator",Form:ae,Symbol:Wr,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Regulator"),...Q}),Preview:Kr,zIndex:H},Bu={name:"Electric Regulator",key:"electricRegulator",Form:ae,Symbol:Xr,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Electric Regulator"),...Q}),Preview:Jr,zIndex:H},Au={name:"Burst Disc",key:"burstDisc",Form:ae,Symbol:Qr,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Burst Disc"),...Q}),Preview:eo,zIndex:H},zu={name:"Cap",key:"cap",Form:ae,Symbol:to,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Cap"),...Q}),Preview:so,zIndex:H},Ou={name:"Manual Valve",key:"manualValve",Form:ae,Symbol:no,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Manual Valve"),...Q}),Preview:ro,zIndex:H},Du={name:"Filter",key:"filter",Form:ae,Symbol:io,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Filter"),...Q}),Preview:co,zIndex:H},Vu={name:"Needle Valve",key:"needleValve",Form:ae,Symbol:ao,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Needle Valve"),...Q}),Preview:uo,zIndex:H},Iu={name:"Check Valve",key:"checkValve",Form:ae,Symbol:xo,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Check Valve"),...Q}),Preview:po,zIndex:H},Zu={name:"Orifice",key:"orifice",Form:ae,Symbol:mo,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Orifice"),...Q}),Preview:jo,zIndex:H},Fu={name:"Angled Relief Valve",key:"angledReliefValve",Form:ae,Symbol:fo,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Angled Relief Valve"),...Q}),Preview:go,zIndex:H},qu={name:"Value",key:"value",Form:Ha,Symbol:ho,Preview:So,defaultProps:e=>({color:e.colors.gray.l9.rgba255,units:"psi",level:"h5",inlineSize:70,...Z("Value"),...Q,telem:Su.source}),zIndex:H},Uu={name:"Button",key:"button",Symbol:yo,Form:Ka,Preview:Co,defaultProps:e=>({color:e.colors.primary.z.rgba255,...Z("Button"),...rl,scale:null}),zIndex:H},Hu={name:"Switch",key:"switch",Symbol:Eo,Preview:Ro,Form:re,defaultProps:()=>({...Z("Switch"),...le,scale:null}),zIndex:H},Yu={name:"Vacuum Pump",key:"vacuumPump",Symbol:wo,Form:re,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Vacuum Pump"),...le}),Preview:Po,zIndex:H},Gu={name:"Cavity Pump",key:"cavityPump",Symbol:ko,Form:re,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Cavity Pump"),...le}),Preview:To,zIndex:H},Wu={name:"Piston Pump",key:"pistonPump",Symbol:Lo,Form:re,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Piston Pump"),...le}),Preview:Mo,zIndex:H},Ku={name:"Static Mixer",key:"staticMixer",Symbol:No,Form:ae,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Static Mixer"),...Q}),Preview:$o,zIndex:H},Xu={name:"Rotary Mixer",key:"rotaryMixer",Symbol:_o,Form:re,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Rotary Mixer"),...le}),Preview:Bo,zIndex:H},Ju={name:"Light",key:"light",Symbol:Ao,Form:Ga,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Light"),...nl}),Preview:zo,zIndex:H},Qu={name:"Setpoint",key:"setpoint",Symbol:oo,Form:Ja,defaultProps:e=>({units:"mV",color:e.colors.gray.l4.rgba255,...Z("Setpoint"),...Eu,...Ru}),Preview:lo,zIndex:H},ex={name:"Agitator",key:"agitator",Symbol:Oo,Form:re,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Agitator"),...le}),Preview:Do,zIndex:H},tx={name:"Propeller Agitator",key:"propellerAgitator",Symbol:Vo,Form:re,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Propeller Agitator"),...le}),Preview:Io,zIndex:H},sx={name:"Flat Blade Agitator",key:"flatBladeAgitator",Symbol:Zo,Form:re,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Flat Blade Agitator"),...le}),Preview:Fo,zIndex:H},nx={name:"Paddle Agitator",key:"paddleAgitator",Symbol:qo,Form:re,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Paddle Agitator"),...le}),Preview:Uo,zIndex:H},rx={name:"Cross Beam Agitator",key:"crossBeamAgitator",Symbol:Ho,Form:re,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Cross Beam Agitator"),...le}),Preview:Yo,zIndex:H},ox={name:"Helical Agitator",key:"helicalAgitator",Symbol:Go,Form:re,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Helical Agitator"),...le}),Preview:Wo,zIndex:H},lx={name:"Compressor",key:"compressor",Symbol:Ko,Form:re,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Compressor"),...le}),Preview:Xo,zIndex:H},ix={name:"Text Box",key:"textBox",Symbol:Jo,Form:Qa,defaultProps:e=>({color:e.colors.gray.l9.rgba255,autoFit:!0,align:"center",...Z("Text Box"),...Q,...ls,level:"p",text:"Text Box",width:75}),Preview:Qo,zIndex:H},cx={name:"Off Page Reference",key:"offPageReference",Form:eu,Symbol:el,defaultProps:e=>({color:e.colors.gray.l9.rgba255,orientation:"right",...Z("Off Page Reference")}),Preview:tl,zIndex:H},ax={value:qu,button:Uu,tank:Mu,switch:Hu,offPageReference:cx,light:Ju,setpoint:Qu,box:Nu,textBox:ix,valve:vu,solenoidValve:wu,threeWayValve:bu,fourWayValve:Pu,angledValve:ku,manualValve:Ou,needleValve:Vu,reliefValve:$u,angledReliefValve:Fu,checkValve:Iu,regulator:_u,electricRegulator:Bu,pump:Tu,pistonPump:Wu,screwPump:Lu,cavityPump:Gu,vacuumPump:Yu,staticMixer:Ku,rotaryMixer:Xu,burstDisc:Au,cap:zu,filter:Du,orifice:Zu,agitator:ex,propellerAgitator:tx,flatBladeAgitator:sx,paddleAgitator:nx,crossBeamAgitator:rx,helicalAgitator:ox,compressor:lx},ux=Object.freeze(Object.defineProperty({__proto__:null,Agitator:Oo,AgitatorPreview:Do,AngledReliefValve:fo,AngledReliefValvePreview:go,AngledValve:Dr,AngledValvePreview:Vr,Box:Ur,BoxPreview:Hr,BurstDisc:Qr,BurstDiscPreview:eo,Button:yo,ButtonPreview:Co,Cap:to,CapPreview:so,CavityPump:ko,CavityPumpPreview:To,CheckValve:xo,CheckValvePreview:po,Compressor:Ko,CompressorPreview:Xo,CrossBeamAgitator:Ho,CrossBeamAgitatorPreview:Yo,ElectricRegulator:Xr,ElectricRegulatorPreview:Jr,Filter:io,FilterPreview:co,FlatBladeAgitator:Zo,FlatBladeAgitatorPreview:Fo,FourWayValve:zr,FourWayValvePreview:Or,HelicalAgitator:Go,HelicalAgitatorPreview:Wo,Light:Ao,LightPreview:zo,ManualValve:no,ManualValvePreview:ro,NeedleValve:ao,NeedleValvePreview:uo,OffPageReference:el,OffPageReferencePreview:tl,Orifice:mo,OrificePreview:jo,PaddleAgitator:qo,PaddleAgitatorPreview:Uo,PistonPump:Lo,PistonPumpPreview:Mo,PropellerAgitator:Vo,PropellerAgitatorPreview:Io,Pump:Ir,PumpPreview:Zr,Regulator:Wr,RegulatorPreview:Kr,ReliefValve:Yr,ReliefValvePreview:Gr,RotaryMixer:_o,RotaryMixerPreview:Bo,SYMBOLS:ax,ScrewPump:bo,ScrewPumpPreview:vo,Setpoint:oo,SetpointPreview:lo,SolenoidValve:Br,SolenoidValvePreview:Ar,StaticMixer:No,StaticMixerPreview:$o,Switch:Eo,SwitchPreview:Ro,Tank:Fr,TankPreview:qr,TextBox:Jo,TextBoxPreview:Qo,ThreeWayValve:Mr,ThreeWayValvePreview:Nr,VacuumPump:wo,VacuumPumpPreview:Po,Value:ho,ValuePreview:So,Valve:$r,ValvePreview:_r,typeZ:hu},Symbol.toStringTag,{value:"Module"}));exports.Aether=u.main;exports.Dialog=u.use$4;exports.Divider=u.Divider$1;exports.Dropdown=u.Dropdown;exports.Haul=u.Haul;exports.Worker=u.Context$1;exports.compareArrayDeps=u.compareArrayDeps;exports.componentRenderProp=u.componentRenderProp;exports.isRenderProp=u.isRenderProp;exports.useAsyncEffect=u.useAsyncEffect;exports.useClickOutside=u.useClickOutside;exports.useCombinedRefs=u.useCombinedRefs;exports.useCombinedStateAndRef=u.useCombinedStateAndRef;exports.useDebouncedCallback=u.useDebouncedCallback;exports.useEffectCompare=u.useEffectCompare;exports.useMemoCompare=u.useMemoCompare;exports.useMemoDeepEqualProps=u.useMemoDeepEqualProps;exports.useMemoPrimitiveArray=u.useMemoPrimitiveArray;exports.usePrevious=u.usePrevious;exports.useResize=u.useResize;exports.useStateRef=u.useStateRef;exports.useSyncedRef=u.useSyncedRef;exports.useTransforms=u.useTransforms;exports.CSS=l.CSS;exports.newBEM=l.newBEM;exports.Header=Ke.external;exports.DataType=C.h;exports.Density=C.b;exports.MultiSeries=C.vt;exports.Rate=C.q;exports.Series=C.x;exports.TimeRange=C.B$1;exports.TimeSpan=C.y;exports.TimeStamp=C.m;exports.state=C.state;exports.Generic=D.Generic;exports.Align=ml.external;exports.Icon=ne.Icon;exports.Tabs=ne.external;exports.Button=jl.external;exports.Caret=fl.Animated$1;exports.telem=j.external;exports.Color=$t.external;exports.Text=de.external;exports.Triggers=Cs.external;exports.List=Ne.external;exports.createFilterTransform=Ne.createFilterTransform;exports.fuseFilter=Ne.fuseFilter;exports.proxyMemo=Ne.proxyMemo;exports.createHexOpacityVariants=bs.createHexOpacityVariants;exports.unitProperty=bs.unitProperty;exports.Input=me.external;exports.Menu=hl.external;exports.Theming=Sl.external;exports.Tree=El.external;exports.Video=Rl.Video;exports.Accordion=Vl;exports.Breadcrumb=Fl;exports.Canvas=oi;exports.Channel=Qi;exports.Control=ca;exports.Device=gc;exports.Diagram=Ia;exports.Eraser=Uc;exports.Form=mc;exports.Label=Cc;exports.Legend=ui;exports.Line=di;exports.LinePlot=Di;exports.Measure=Fi;exports.Modal=vc;exports.Mosaic=Zc;exports.Nav=Gc;exports.Note=Kc;exports.OS=ta;exports.Observe=dc;exports.Pluto=da;exports.Portal=_c;exports.Progress=ma;exports.Range=Ii;exports.Ranger=Ra;exports.Resize=Nl;exports.Rule=qi;exports.Schematic=ux;exports.Select=Pi;exports.Status=bl;exports.Steps=Ca;exports.Synnax=Hl;exports.Tag=vi;exports.Telem=ra;exports.Tooltip=vl;exports.Value=pu;exports.Viewport=Oi;exports.axis=Gl;exports.control=Wl;
|
|
1
|
+
"use strict";var pl=Object.defineProperty;var ml=(e,t,n)=>t in e?pl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var he=(e,t,n)=>ml(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./jsx-runtime-Cek9Ww4S.cjs"),d=require("react"),c=require("./Toggle-C5E2dVg4.cjs"),l=require("./css-4MXuPP5v.cjs"),Ke=require("./external-Icf6LMl2.cjs"),C=require("./aggregator-CU9VgdUJ.cjs"),D=require("./Pack-uflj5a28.cjs"),jl=require("./external-CPTY4-IY.cjs"),ne=require("./external-BHkFTefx.cjs"),gl=require("./external-LyF1vgNR.cjs"),Cs=require("./Animated-BGm8tACN.cjs"),j=require("./LinePlot-oIHuM9Jz.cjs"),pe=require("zod"),Bt=require("./external-w5-jxIYn.cjs"),de=require("./external-BSHY-kgQ.cjs"),fl=require("./Text-DWBEhfiF.cjs"),bs=require("./external-BRdQZoOL.cjs");require("./Item-C89uBEra.cjs");const At=require("react-dom"),$e=require("./external-BdZ8kC55.cjs"),vs=require("./units-DbfWaeE2.cjs"),me=require("./external-C-PNFpoV.cjs"),hl=require("./external-DDwIRENP.cjs"),El=require("./external-T318T5Xe.cjs"),Sl=require("./external-GtPAaR7c.cjs"),Rl=require("./Video-DKosAU7v.cjs"),ws=({variant:e,...t})=>s.jsxRuntimeExports.jsx(c.Qt.Circle,{color:c.variantColors[e],style:{color:c.variantColors[e]},...t}),yl=({status:{key:e,time:t,count:n,message:r,description:o,variant:i},silence:a,actions:u,className:x,children:m,...p})=>s.jsxRuntimeExports.jsxs(D.Space,{className:l.CSS(l.CSS.B("notification"),x),direction:"y",empty:!0,...p,children:[s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",justify:"spaceBetween",grow:!0,style:{width:"100%"},children:[s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",align:"center",size:"small",children:[s.jsxRuntimeExports.jsx(ws,{style:{height:"2.25rem",width:"2.5rem"},variant:i}),s.jsxRuntimeExports.jsx(c.Text,{level:"small",shade:7,children:`x${n}`}),s.jsxRuntimeExports.jsx(c.DateTime,{className:l.CSS(l.CSS.BE("notification","time")),level:"small",format:"time",children:t})]}),s.jsxRuntimeExports.jsx(c.Icon,{className:l.CSS(l.CSS.BE("notification","silence")),variant:"outlined",size:"small",onClick:()=>a(e),children:s.jsxRuntimeExports.jsx(c.Qt.Close,{})})]}),s.jsxRuntimeExports.jsxs(D.Space,{direction:"y",align:"start",className:l.CSS(l.CSS.BE("notification","content")),size:"small",children:[m??s.jsxRuntimeExports.jsx(c.Text,{className:l.CSS(l.CSS.BE("notification","message")),level:"p",style:{flexGrow:1},children:r}),o!=null&&s.jsxRuntimeExports.jsx(c.Text,{className:l.CSS(l.CSS.BE("notification","description")),level:"small",style:{flexGrow:1},children:o})]}),u!=null&&s.jsxRuntimeExports.jsx(D.Space,{direction:"x",align:"center",justify:"end",className:l.CSS(l.CSS.BE("notification","actions")),children:C.A(u).map(g=>s.jsxRuntimeExports.jsx(Cl,{action:g},g.key))})]},t.toString()),Cl=({action:e})=>{if(!d.isValidElement(e)){const t=e;return s.jsxRuntimeExports.jsx(c.Button,{...t})}return e},bl=Object.freeze(Object.defineProperty({__proto__:null,Aggregator:c.Aggregator,Circle:ws,Notification:yl,Text:c.Text$2,VARIANTS:C.VARIANTS,specZ:C.specZ$1,useAggregator:c.useAggregator,useContext:c.useContext$2,useNotifications:c.useNotifications,variantZ:C.variantZ},Symbol.toStringTag,{value:"Module"})),vl=Object.freeze(Object.defineProperty({__proto__:null,Config:c.Config,Context:c.Context,Dialog:c.Dialog$1,chooseLocation:c.chooseLocation,formatTip:c.formatTip,useConfig:c.useConfig,wrap:c.wrap},Symbol.toStringTag,{value:"Module"})),et=e=>e.preventDefault(),xt=d.forwardRef(({location:e,style:t,size:n,className:r,children:o,onDragStart:i,sizeUnits:a="px",showHandle:u=!0,...x},m)=>{const p=l.J.construct(e),g=l.J.direction(p),h=l.g.dimension(g);return s.jsxRuntimeExports.jsxs("div",{className:l.CSS(l.CSS.B("resize"),l.CSS.loc(p),l.CSS.dir(g),r),style:{[h]:`${n}${a}`,...t},ref:m,...x,children:[o,u&&s.jsxRuntimeExports.jsx("div",{draggable:!0,className:l.CSS(l.CSS.BE("resize","handle"),l.CSS.bordered(l.J.swap(p))),onDragStart:i,onDrag:et,onDragEnd:et})]})});xt.displayName="Resize.Core";const Ot=({onResize:e,count:t,initialSizes:n=[],minSize:r=100,direction:o="x"})=>{const i=d.useRef(null),[a,u]=d.useState({sizeDistribution:wl(n,t),root:null}),x=d.useCallback((g,h,f)=>{if(i.current==null)return;const E=l.Eo.dim(l.Eo.construct(i.current),o);u(R=>Ct(R,E,g,r,h,f))},[r,u,o]);d.useEffect(()=>e==null?void 0:e(a.sizeDistribution),[a.sizeDistribution,e]);const m=d.useCallback((g,h)=>{g.preventDefault();const f=o==="x"?"clientX":"clientY",E=k=>x(h,k[f]),R=()=>{u(k=>({...k,root:null})),document.removeEventListener("mousemove",E)};u(k=>({...k,root:g[f]})),document.addEventListener("mousemove",E),document.addEventListener("mouseup",R,{once:!0})},[u,o,Ct]);return{setSize:d.useCallback((g,h)=>x(g,void 0,h),[Ct]),props:{direction:o,sizeDistribution:a.sizeDistribution,onDragHandle:m,ref:i}}},dt=d.forwardRef(({direction:e="x",children:t,sizeDistribution:n,onDragHandle:r,className:o,...i},a)=>{const u=l.g.construct(e),x=d.Children.toArray(t);return n=Pl(n),s.jsxRuntimeExports.jsx(D.Space,{...i,ref:a,direction:u,className:l.CSS(l.CSS.B("resize-multiple"),o),empty:!0,grow:!0,children:x.map((m,p)=>s.jsxRuntimeExports.jsx(xt,{onDragStart:g=>r(g,p),location:l.g.location(u),size:n[p]*100,sizeUnits:"%",showHandle:p!==x.length-1,children:m},p))})});dt.displayName="Resize.Multiple";const wl=(e,t)=>{const n=e.reduce((o,i)=>o+i,0),r=t-e.length;if(r<=0)return e.slice(0,t).map(o=>o/n);if(e.every(o=>o<=1)){const o=1-n;return[...e,...Array(r).fill(o/r)]}return e.map(()=>1/t)},yt=.001,Pl=e=>e.every(t=>l.W.closeTo(t,1/e.length),yt)?e.map((t,n)=>n%2===0?t+yt:n===e.length-1?t:t-yt):e,Ct=(e,t,n,r,o,i)=>{const a=Ps(e,t,n,o,i),[u,x]=kl(e.sizeDistribution,n,a,r/t),m=x?o??null:e.root;return{...e,sizeDistribution:u,root:m}},Ps=(e,t,n,r,o)=>{let i;if(o!=null)o>1&&(o=o/t),i=o-e.sizeDistribution[n];else if(r!=null){if(e.root===null)throw new Error("resize root is null during handle drag");i=(r-e.root)/t}else throw new Error("must provide either a MouseEvent or a targetSize");return i},kl=(e,t,n,r)=>{let o=t;for(;o>0&&e[o]+n<=r;)o--;const i=e[o]+n,a=Ll(o,e,r,n),u=e[a]-n;return i<r||u<r?[e,!1]:[e.map((x,m)=>m===o?i:m===a?u:x),!0]},Ll=(e,t,n,r)=>(e===t.length-1?Ml:Tl)(e,t,n,r),Tl=(e,t,n,r)=>{let o=e+1;for(;o<t.length-1&&t[o]-r<=n;)o++;return o},Ml=(e,t,n,r)=>{let o=e-1;for(;o>0&&t[o]-r<=n;)o--;return o},pt=({onMove:e,onStart:t,onEnd:n})=>d.useCallback(r=>{r.preventDefault();const o=l.q.construct(r),i=c.mouseKey(r.button);t==null||t(o,i,r);const a=x=>{if(x.buttons===0)return u(x);const m=l.q.construct(x);e==null||e(l.Eo.construct(o,m),i,x)};window.addEventListener("mousemove",a);const u=x=>{window.removeEventListener("mousemove",a);const m=l.q.construct(x);n==null||n(l.Eo.construct(o,m),i,x)};window.addEventListener("mouseup",u,{once:!0})},[e,t,n]),bt=2,ks=({onCollapse:e,onResize:t,location:n="left",minSize:r=100,maxSize:o=1/0,initialSize:i=200,collapseThreshold:a=1/0,className:u,...x})=>{const[m,p]=d.useState(l.j(i,r,o)),g=d.useRef(null),h=l.J.construct(n),f=d.useCallback($=>{if(g.current===null)return 0;const P=l.Eo.dim($,l.J.direction(h),!0)*(1-2*Number(["bottom","right"].includes(h))),S=g.current+P,v=l.j(S,r,o);return(v-S)/r>a?bt:v},[h,r,o,a]),E=d.useRef(null),R=d.useCallback($=>{const P=f($);p(P),E.current!=null&&(t==null||t(P,l.Eo.construct(E.current)))},[t,f]),k=d.useCallback(()=>p($=>(g.current=$,$)),[p]),T=d.useCallback($=>f($)===bt&&(e==null?void 0:e()),[e,f]);d.useEffect(()=>p($=>{const P=l.j($,r,o);return g.current=P,P}),[r,o]);const M=pt({onMove:R,onStart:k,onEnd:T});return s.jsxRuntimeExports.jsx(xt,{ref:E,location:h,size:m,onDragStart:M,className:l.clsx(u,l.CSS.expanded(m!==bt)),...x})},$l=Object.freeze(Object.defineProperty({__proto__:null,Core:xt,Multiple:dt,Single:ks,calculateDiffPercentage:Ps,useMultiple:Ot},Symbol.toStringTag,{value:"Module"})),Qe="y",us=28,Nl=32,_l=40,Bl=.5,Al=({data:e,...t})=>{const{setSize:n,props:{sizeDistribution:r,ref:o,...i}}=Ot({direction:Qe,count:e.length,minSize:us}),a=u=>{if(o.current==null)return;const x=l.Eo.dim(l.Eo.construct(o.current),Qe);r[u]<_l/x?n(u,e[u].initialSize??Bl):n(u,us+1)};return s.jsxRuntimeExports.jsx(dt,{empty:!0,className:l.CSS.B("accordion"),sizeDistribution:r,ref:o,...t,...i,children:e.map((u,x)=>d.createElement(Dl,{...u,key:u.key,index:x,direction:Qe,onExpand:a,parent:o,size:r[x]}))})},Ol=s.jsxRuntimeExports.jsx(c.Qt.Caret.Down,{"aria-label":"contract"}),zl=s.jsxRuntimeExports.jsx(c.Qt.Caret.Right,{"aria-label":"expand"}),Dl=({index:e,name:t,content:n,actions:r,size:o,parent:i,onExpand:a})=>{let u=!0;if(i.current!=null){const m=l.Eo.dim(l.Eo.construct(i.current),Qe);u=o*m>Nl}const x=u?Ol:zl;return s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsxs(Ke.Header,{level:"p",className:l.CSS.expanded(u),empty:!0,children:[s.jsxRuntimeExports.jsx(Ke.ButtonTitle,{startIcon:x,onClick:()=>a(e),children:t}),r!=null&&s.jsxRuntimeExports.jsx(Ke.Actions,{children:r})]}),n]})},Vl=Object.freeze(Object.defineProperty({__proto__:null,Accordion:Al},Symbol.toStringTag,{value:"Module"})),Ls=(e,t,n)=>C.A(e).map(i=>i.split(t)).flat().map((i,a)=>[s.jsxRuntimeExports.jsx(c.Qt.Caret.Right,{style:{transform:"scale(0.8) translateY(1px)",color:l.CSS.shade(n)}},`${i}-${a}`),i]).flat(),Il=({children:e,icon:t,shade:n=7,weight:r=450,size:o=.5,url:i,level:a="p",separator:u=".",className:x,hideFirst:m=!1,...p})=>{i!=null&&(e=i);const g=Ls(e,u,n);return m&&g.shift(),s.jsxRuntimeExports.jsxs(c.WithIcon,{className:l.CSS(x,l.CSS.B("breadcrumb")),level:a,shade:n,weight:r,size:o,...p,children:[ne.resolve(t),...g]})},Zl=({url:e,className:t,level:n="p",separator:r=".",shade:o=7})=>{const i=Ls(e,r,o);return s.jsxRuntimeExports.jsx(D.Space,{className:l.CSS(t,l.CSS.B("breadcrumb")),direction:"x",size:"small",align:"center",children:i.map((a,u)=>{if(c.isValidElement(a))return a;if(a==null)return null;const m=e.split(r).indexOf(a);let p=e.split(r).slice(0,m+1).join("/");return p="/"+p,s.jsxRuntimeExports.jsx(c.Link,{level:n,href:p,children:a.split("-").map(g=>l._.capitalize(g)).join(" ")},u)})})},Fl=Object.freeze(Object.defineProperty({__proto__:null,Breadcrumb:Il,URL:Zl},Symbol.toStringTag,{value:"Module"})),zt=d.createContext(j.ZERO_CONTEXT_VALUE),ge=()=>d.useContext(zt).synnax,ql=()=>d.useContext(zt).state,xs={connected:"success",connecting:"info",disconnected:"info",failed:"error"},Ts="serverVersionMismatch",Hl=(e,t,n)=>`Cluster version ${n!=null?n+" ":""}is ${e?"older":"newer"} than client version ${t}. Compatibility issues may arise.`,Ms=c.wrap$1(j.Provider.TYPE,({aetherKey:e,connParams:t,children:n})=>{const[r,o,i]=c.useCombinedStateAndRef(j.ZERO_CONTEXT_VALUE),[{path:a},,u]=c.use$3({aetherKey:e,type:j.Provider.TYPE,schema:j.Provider.stateZ,initialState:{props:t??null,state:null}}),x=c.useAggregator(),m=d.useCallback(p=>{i.current.state.status!==p.status&&x({variant:xs[p.status],message:p.message??l._.capitalize(p.status)}),o(g=>({...g,state:p}))},[x]);return c.useAsyncEffect(async()=>{if(r.synnax!=null&&r.synnax.close(),t==null)return o(j.ZERO_CONTEXT_VALUE);const p=new C.Lf({...t,connectivityPollFrequency:C.k.seconds(5)});o({synnax:p,state:{clusterKey:"",status:"connecting",message:"Connecting...",clientServerCompatible:!1,clientVersion:p.clientVersion}});const g=await p.connectivity.check();if(o({synnax:p,state:g}),x({variant:xs[g.status],message:g.message??g.status.toUpperCase()}),g.status==="connected"&&!g.clientServerCompatible){const h=g.nodeVersion==null||C.H.semVerOlder(g.nodeVersion,g.clientVersion),f=Hl(h,g.clientVersion,g.nodeVersion);x({variant:"warning",message:"Incompatible cluster version",description:f,data:{type:Ts,oldServer:h,nodeVersion:g.nodeVersion,clientVersion:g.clientVersion}})}return p.connectivity.onChange(m),u({props:t,state:g}),()=>{p.close(),o(j.ZERO_CONTEXT_VALUE),u({props:null,state:null})}},[t,m]),s.jsxRuntimeExports.jsx(zt.Provider,{value:r,children:s.jsxRuntimeExports.jsx(c.Composite,{path:a,children:n})})}),Yl=Object.freeze(Object.defineProperty({__proto__:null,Provider:Ms,SERVER_VERSION_MISMATCH:Ts,use:ge,useConnectionState:ql},Symbol.toStringTag,{value:"Module"})),Ne=d.createContext({aliases:{},getName:async()=>await Promise.resolve(void 0),setAlias:null}),$s=()=>d.useContext(Ne),Ns=e=>{const{aliases:t}=d.useContext(Ne);return t[e]??null},mt=()=>{const{aliases:e}=d.useContext(Ne);return e},jt=(e,t="")=>{const{getName:n}=d.useContext(Ne),[r,o]=d.useState(t);return c.useAsyncEffect(async()=>{const i=await n(e);i!=null&&o(i)},[e,n]),r??t},Dt=()=>{const{activeRange:e}=d.useContext(Ne);return e??void 0},_s=({activeRange:e,children:t})=>{const n=ge(),[r,o]=d.useState({}),i=d.useCallback(x=>{o(m=>{const p={...m};return x.forEach(({variant:g,key:h,value:f})=>{const E=Number(h.split("---")[1]);g==="delete"?delete p[E]:p[f.channel]=f.alias}),p})},[o]),a=d.useCallback(async(x,m)=>{if(n==null||e==null)return;await(await n.ranges.retrieve(e)).setAlias(x,m)},[n,e]),u=d.useCallback(async x=>{if(n==null||x===0)return;const m=r[x];return m??(await n.channels.retrieve(x)).name},[r,n]);return c.useAsyncEffect(async()=>{if(n==null||e==null){o({});return}const x=await n.ranges.retrieve(e),m=await x.listAliases();o(m);const p=await x.openAliasTracker(),g=p.onChange(i);return()=>{g(),p.close()}},[n,e]),s.jsxRuntimeExports.jsx(Ne.Provider,{value:{aliases:r,activeRange:e,setAlias:e!=null?a:null,getName:u},children:t})},Ul=({channelKey:e,value:t,shadow:n,className:r,...o})=>{const[i,a]=d.useState(!1),{setAlias:u}=$s(),x=Ns(e),m=jt(e);let p=s.jsxRuntimeExports.jsx(c.Qt.Rename,{});i?p=s.jsxRuntimeExports.jsx(c.Qt.Loading,{}):x===t&&(p=s.jsxRuntimeExports.jsx(c.Qt.Check,{}));const g=u!=null&&!i&&x!==t&&e!==0,h=()=>{g&&(async()=>(a(!0),await u(e,t),a(!1)))()},f=()=>{var R;x!=null&&((R=o.onChange)==null||R.call(o,x))},E=()=>e===0?s.jsxRuntimeExports.jsx(c.Text,{level:"small",children:"Select a channel to enable alias syncing with this label"}):u==null?s.jsxRuntimeExports.jsx(c.Text,{level:"small",children:"Select a range to enable alias syncing with this label"}):t.length===0?s.jsxRuntimeExports.jsx(c.Text,{level:"small",children:"Enter a value to enable alias syncing with this label"}):x===t?s.jsxRuntimeExports.jsx(c.Text,{level:"small",children:"Alias synced with this label"}):s.jsxRuntimeExports.jsxs(c.Text,{level:"small",children:["Sync alias for ",m," with this label"]});return s.jsxRuntimeExports.jsxs(c.Text$1,{value:t,...o,children:[g&&s.jsxRuntimeExports.jsx(c.Icon,{onClick:f,tooltip:s.jsxRuntimeExports.jsxs(c.Text,{level:"small",children:["Set ",m," as label"]}),tooltipLocation:{y:"top"},variant:"outlined",children:s.jsxRuntimeExports.jsx(c.Qt.Sync,{})}),s.jsxRuntimeExports.jsx(c.Icon,{onClick:h,disabled:!g,tooltip:s.jsxRuntimeExports.jsx(E,{}),tooltipLocation:{y:"top"},variant:"outlined",children:p})]})},Ee="channel",Gl=Object.freeze(Object.defineProperty({__proto__:null,Canvas:j.Canvas,axisStateZ:j.axisStateZ,newTickFactory:j.newTickFactory,tickFactoryProps:j.tickFactoryProps,tickType:j.tickType},Symbol.toStringTag,{value:"Module"})),Wl=Object.freeze(Object.defineProperty({__proto__:null,AcquireChannelControl:j.AcquireChannelControl,AuthoritySource:j.AuthoritySource,Chip:j.Chip,Controller:j.Controller$1,Indicator:j.Indicator,Legend:j.Legend,REGISTRY:j.REGISTRY$3,STATUSES:j.STATUSES,SetChannelValue:j.SetChannelValue,StateProvider:j.StateProvider,acquireChannelControl:j.acquireChannelControl,acquireChannelControlPropsZ:j.acquireChannelControlPropsZ,authoritySource:j.authoritySource,authoritySourceProps:j.authoritySourceProps,chipStateZ:j.chipStateZ,controllerStateZ:j.controllerStateZ,indicatorStateZ:j.indicatorStateZ,legendStateZ:j.legendStateZ,setChannelValue:j.setChannelValue,setChannelValuePropsZ:j.setChannelValuePropsZ,stateProviderStateZ:j.stateProviderStateZ,statusZ:j.statusZ,sugaredStateZ:j.sugaredStateZ},Symbol.toStringTag,{value:"Module"}));var je;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(je||(je={}));function Kl({color:e,dimensions:t,lineWidth:n}){return d.createElement("path",{stroke:e,strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function Ql({color:e,radius:t}){return d.createElement("circle",{cx:t,cy:t,r:t,fill:e})}const Xl={[je.Dots]:"#91919a",[je.Lines]:"#eee",[je.Cross]:"#e2e2e2"},Jl={[je.Dots]:1,[je.Lines]:1,[je.Cross]:6},ei=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Bs({id:e,variant:t=je.Dots,gap:n=20,size:r,lineWidth:o=1,offset:i=2,color:a,style:u,className:x}){const m=d.useRef(null),{transform:p,patternId:g}=j.useStore(ei,j.shallow$1),h=a||Xl[t],f=r||Jl[t],E=t===je.Dots,R=t===je.Cross,k=Array.isArray(n)?n:[n,n],T=[k[0]*p[2]||1,k[1]*p[2]||1],M=f*p[2],$=R?[M,M]:T,P=E?[M/i,M/i]:[$[0]/i,$[1]/i];return d.createElement("svg",{className:j.cc(["react-flow__background",x]),style:{...u,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:m,"data-testid":"rf__background"},d.createElement("pattern",{id:g+e,x:p[0]%T[0],y:p[1]%T[1],width:T[0],height:T[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${P[0]},-${P[1]})`},E?d.createElement(Ql,{color:h,radius:M/i}):d.createElement(Kl,{dimensions:$,color:h,lineWidth:o})),d.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${g+e})`}))}Bs.displayName="Background";var ti=d.memo(Bs);const si={region:l.Eo.ZERO,dpr:1,os:C.w.getOS()},ni={gl:null,lower2d:null,upper2d:null,bootstrapped:!1},ri=c.wrap$1(j.Canvas$1.TYPE,({children:e,resizeDebounce:t=100,aetherKey:n,className:r,...o})=>{const[{path:i},{bootstrapped:a,dpr:u},x]=c.use$3({aetherKey:n,type:j.Canvas$1.TYPE,schema:j.canvasStateZ,initialState:si}),m=d.useRef({...ni}),p=d.useCallback(f=>{m.current.bootstrapped&&x(()=>({bootstrapped:!0,region:f,dpr:window.devicePixelRatio,os:C.w.getOS({default:"Windows"})}))},[x]),g=c.useResize(p,{debounce:t});d.useEffect(()=>{const f=()=>{window.devicePixelRatio!==u&&x(E=>({...E,dpr:window.devicePixelRatio}))};window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`).addEventListener("change",f,{once:!0})},[u]),d.useEffect(()=>{window.addEventListener("focus",()=>x(f=>({...f}))),window.addEventListener("blur",()=>x(f=>({...f})))},[x]);const h=d.useCallback(f=>{if(g(f),f==null)return;f.className.includes("gl")?m.current.gl=f:f.className.includes("upper2d")?m.current.upper2d=f:m.current.lower2d=f;const{gl:E,lower2d:R,upper2d:k,bootstrapped:T}=m.current;if(E==null||R==null||k==null||T)return;m.current.bootstrapped=!0;const M=E.transferControlToOffscreen(),$=k.transferControlToOffscreen(),P=R.transferControlToOffscreen();x({glCanvas:M,upper2dCanvas:$,lower2dCanvas:P,bootstrap:!0,bootstrapped:!1,region:l.Eo.construct(E),dpr:window.devicePixelRatio,os:C.w.getOS({default:"Windows"})},[M,$,P])},[x]);return s.jsxRuntimeExports.jsxs("div",{className:l.CSS(l.CSS.B("canvas-container"),r),...o,children:[s.jsxRuntimeExports.jsx("canvas",{ref:h,className:l.CSS(l.CSS.B("canvas"),l.CSS.BM("canvas","lower2d"))}),s.jsxRuntimeExports.jsx("canvas",{ref:h,className:l.CSS(l.CSS.B("canvas"),l.CSS.BM("canvas","gl"))}),s.jsxRuntimeExports.jsx("canvas",{ref:h,className:l.CSS(l.CSS.B("canvas"),l.CSS.BM("canvas","upper2d"))}),s.jsxRuntimeExports.jsx(c.Composite,{path:i,children:a&&e})]})}),gt=(e,t)=>c.useResize(d.useCallback((n,r)=>{const o=document.querySelector(".pluto-canvas--lower2d");o!=null&&e(l.k$2.XY.translate(l.q.scale(l.Eo.topLeft(o),-1)).box(n),r)},[e]),t),oi=Object.freeze(Object.defineProperty({__proto__:null,Canvas:ri,useRegion:gt},Symbol.toStringTag,{value:"Module"})),As=d.createContext(null),Se=e=>{const t=d.useContext(As);if(t==null)throw new Error(`Cannot to use ${e} as a non-child of LinePlot.`);return t},Os=e=>{const t=Se("Viewport"),{addViewportHandler:n}=t;d.useEffect(()=>n(e),[n,e])},He=(e,t)=>{const{setGridEntry:n,removeGridEntry:r}=Se(t),{key:o}=e;return c.useEffectCompare(()=>{l.J.outer.parse(e.loc),n(e)},([u],[x])=>C._.equal(u,x),[e]),d.useEffect(()=>()=>r(o),[]),{gridArea:l.g.swap(l.J.direction(e.loc))==="x"?`axis-start-${o} / plot-start / axis-end-${o} / plot-end`:`plot-start / axis-start-${o} / plot-end / axis-end-${o}`}},zs=c.wrap$1("LinePlot",({aetherKey:e,style:t,resizeDebounce:n=0,clearOverScan:r=l.q.ZERO,children:o,hold:i=!1,onHold:a,visible:u,...x})=>{const[m,p]=d.useState([]),g=c.useMemoDeepEqualProps({clearOverScan:r,hold:i,visible:u}),[{path:h},{grid:f},E]=c.use$3({aetherKey:e,type:j.LinePlot.TYPE,schema:j.linePlotStateZ,initialState:{container:l.Eo.ZERO,viewport:l.Eo.DECIMAL,grid:{},...g}});d.useEffect(()=>E(w=>({...w,...g})),[g]);const R=d.useRef(new Map),k=d.useCallback(w=>(R.current.set(w,null),()=>R.current.delete(w)),[R]),T=d.useCallback(w=>{const{mode:y,box:_,stage:z}=w;(y==="pan"&&z!=="start"||y==="zoom"||y==="zoomReset"&&z==="start")&&E(U=>({...U,viewport:_})),R.current.forEach((U,I)=>I(w))},[E]),M=d.useCallback(w=>E(y=>({...y,container:w})),[E]),$=gt(M,{debounce:n}),P=d.useCallback(w=>E(y=>({...y,grid:{...y.grid,[w.key]:w}})),[E]),S=d.useCallback(w=>E(y=>{const{[w]:_,...z}=y.grid;return{...y,grid:z}}),[E]),v=d.useCallback(w=>{p(y=>[...y.filter(({key:_})=>_!==w.key),w])},[p,T]),B=d.useCallback(w=>p(y=>y.filter(({key:_})=>_!==w)),[v]),L=d.useMemo(()=>li(f),[f]),N=d.useCallback(w=>{E(y=>({...y,hold:w})),a==null||a(w)},[E,a]),A=d.useMemo(()=>({lines:m,setGridEntry:P,removeGridEntry:S,setLine:v,removeLine:B,setViewport:T,addViewportHandler:k,setHold:N}),[m,P,S,v,B,T,k,N]);return s.jsxRuntimeExports.jsx("div",{className:l.CSS.B("line-plot"),style:{...t,...L},ref:$,...x,children:s.jsxRuntimeExports.jsx(As.Provider,{value:A,children:s.jsxRuntimeExports.jsx(c.Composite,{path:h,children:o})})})}),li=e=>{const t=l.CSS.newGridBuilder();return j.regions("top",e).forEach(({key:n,size:r})=>t.row(`axis-start-${n}`,`axis-end-${n}`,r)),t.row("plot-start","plot-end","minmax(0, 1fr)"),j.regions("bottom",e).reverse().forEach(({key:n,size:r})=>t.row(`axis-start-${n}`,`axis-end-${n}`,r)),j.regions("left",e).forEach(({key:n,size:r})=>t.col(`axis-start-${n}`,`axis-end-${n}`,r)),t.col("plot-start","plot-end","minmax(0, 1fr)"),j.regions("right",e).forEach(({key:n,size:r})=>t.col(`axis-start-${n}`,`axis-end-${n}`,r)),t.build()},Vt=e=>{const t=e==="x"?"bottom":"left",n=e==="x"?j.XAxis.TYPE:j.YAxis.TYPE,r=`${e}-axis`;return c.wrap$1(n,({aetherKey:o,children:i,location:a=t,label:u="",labelLevel:x="small",labelDirection:m=e,onLabelChange:p,color:g,labelSize:h,showGrid:f,type:E,bounds:R,className:k,tickSpacing:T,autoBounds:M,autoBoundUpdateInterval:$,onAutoBoundsChange:P,style:S,...v})=>{const B=((u==null?void 0:u.length)??0)>0,L=c.useMemoDeepEqualProps({location:a,showGrid:f,type:E,bounds:R,label:u,labelDirection:m,tickSpacing:T,autoBounds:M,autoBoundUpdateInterval:$}),[{path:N},{size:A,labelSize:w,...y},_]=c.use$3({aetherKey:o,type:n,schema:j.coreAxisStateZ,initialState:L});d.useEffect(()=>_(G=>({...G,...L})),[L]),d.useEffect(()=>{const{lower:G,upper:O}=j.parseAutoBounds(y.autoBounds);y.bounds!=null&&(G&&(R==null?void 0:R.lower)!==y.bounds.lower||O&&(R==null?void 0:R.upper)!==y.bounds.upper)&&(P==null||P(y.bounds))},[y.autoBounds,y.bounds]);const z=He({loc:a,key:`${n}-${o}`,size:A+w,order:1},`${e.toUpperCase()}Axis`),U=c.useTypography(x).toString(),I=d.useRef(0);return d.useEffect(()=>{if(e==="y"){if(u==null)return;let O=C.dimensions(u,U)[l.g.dimension(l.g.construct(m))];O>0&&(O+=9),_(te=>({...te,labelSize:O}))}else{let O=C.dimensions(u,U).height*1.3;O>0&&(O+=12);const te=I.current;j.withinSizeThreshold(te,O)||(I.current=O,_(ce=>({...ce,labelSize:O})))}},[u,m,U]),s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(D.Space,{className:l.CSS(k,l.CSS.B("axis"),l.CSS.B(r),l.CSS.loc(a)),style:{...S,...z},align:"center",justify:a!=="left"?"end":"start",direction:l.g.swap(e),...v,children:B&&s.jsxRuntimeExports.jsx(c.MaybeEditable,{className:l.CSS(l.CSS.BE("axis","label"),l.CSS.dir(m)),value:u,onChange:p,level:x})}),s.jsxRuntimeExports.jsx(c.Composite,{path:N,children:i})]})})},Ds=Vt("x"),Vs=Vt("y"),Is=l.q.xy.extend({root:l.J.corner,units:pe.z.object({x:pe.z.enum(["px","decimal"]),y:pe.z.enum(["px","decimal"])})}),ii=Is.partial({root:!0,units:!0}),ci=e=>{var n,r,o,i;const t={};return t[((n=e.root)==null?void 0:n.x)??"left"]=((r=e==null?void 0:e.units)==null?void 0:r.x)==="px"?`${e.x}px`:`${e.x*100}%`,t[((o=e.root)==null?void 0:o.y)??"top"]=((i=e==null?void 0:e.units)==null?void 0:i.y)==="px"?`${e.y}px`:`${e.y*100}%`,t},ai=(e,t)=>{var i,a,u,x,m,p;const n={x:e.x,y:e.y};if(t.current==null)return n;const r=l.Eo.construct(t.current),o=l.Eo.construct(t.current.parentElement);return((i=e.units)==null?void 0:i.x)==="decimal"?((a=e.root)==null?void 0:a.x)==="right"&&(n.x=1-e.x):((u=e.root)==null?void 0:u.x)==="right"?n.x=1-(e.x+l.Eo.width(r))/l.Eo.width(o):n.x/=l.Eo.width(o),((x=e.units)==null?void 0:x.y)==="decimal"?((m=e.root)==null?void 0:m.y)==="bottom"&&(n.y=1-e.y):((p=e.root)==null?void 0:p.y)==="bottom"?n.y=1-(e.y+l.Eo.height(r))/l.Eo.height(o):n.y/=l.Eo.height(o),n},Zs=(e,t)=>{if(t.current==null)return null;const n=l.Eo.construct(t.current.parentElement),r=l.Eo.construct(t.current),o={x:e.x,y:e.y,root:{...l.J.TOP_LEFT},units:{x:"px",y:"px"}};return e.x>.8?(o.x=(1-e.x)*l.Eo.width(n)-l.Eo.width(r),o.root.x="right"):e.x<.2?o.x=e.x*l.Eo.width(n):o.units.x="decimal",e.y>.8?(o.y=(1-e.y)*l.Eo.height(n)-l.Eo.height(r),o.root.y="bottom"):e.y<.2?o.y=e.y*l.Eo.height(n):o.units.y="decimal",o.x=Math.round(o.x*100)/100,{...o,...l.q.truncate(o,3)}},ds=l.Eo.reRoot(l.Eo.DECIMAL,l.J.TOP_LEFT),It=d.memo(({className:e,value:t,onChange:n,style:r,draggable:o=!0,...i})=>{const[a,u]=C.usePurePassthrough({value:t,onChange:n,initial:{x:.1,y:.1,root:l.J.TOP_LEFT,units:{x:"decimal",y:"decimal"}}}),x=d.useRef(a),m=c.useSyncedRef(o===!1),p=d.useRef(null);a!==null&&(r={...r,...ci(a)});const g=d.useCallback(f=>{var P;if(((P=p.current)==null?void 0:P.parentElement)==null)return x.current;const E=l.Eo.construct(p.current.parentElement),R=l.k$2.XY.scale(E).scale(ds),k=R.box(l.Eo.construct(p.current)),T=l.k$2.XY.clamp(l.Eo.construct(l.Eo.topLeft(ds),{width:1-l.Eo.width(k),height:1-l.Eo.height(k)})),M=l.q.translate(l.q.construct(x.current),l.Eo.signedDims(R.box(f))),$=T.pos(M);return Zs($,p)},[]),h=pt({onStart:d.useCallback(()=>{x.current=ai(x.current,p)},[]),onMove:d.useCallback(f=>{if(m.current)return;const E=g(f);E!==null&&u(E)},[]),onEnd:d.useCallback(f=>{if(m.current)return;const E=g(f);E!==null&&(x.current=E)},[])});return s.jsxRuntimeExports.jsx(D.Space,{className:l.CSS(e,l.CSS.B("legend")),bordered:!0,rounded:!0,style:r,onDragStart:h,draggable:o,ref:p,...i,onDrag:et,onDragEnd:et,empty:!0})});It.displayName="Legend.Container";const Zt=(e,t,n)=>e.sort((r,o)=>r.label.localeCompare(o.label)).map(({key:r,color:o,label:i})=>s.jsxRuntimeExports.jsxs(D.Space,{style:{cursor:"pointer"},direction:"x",align:"center",size:"small",children:[s.jsxRuntimeExports.jsx(Bt.Swatch,{value:o,onChange:a=>t==null?void 0:t({key:r,color:a,label:i}),onVisibleChange:n,draggable:!1,size:"small"}),s.jsxRuntimeExports.jsx(c.MaybeEditable,{level:"small",value:i,onChange:a=>t==null?void 0:t({key:r,color:o,label:a}),noWrap:!0})]},r)),Ft=({data:e=[],onEntryChange:t,position:n,onPositionChange:r,...o})=>{const[i,a]=d.useState(!1);return e.length===0?null:s.jsxRuntimeExports.jsx(It,{...o,draggable:!i,value:n,onChange:r,children:Zt(e,t,a)})},ui=Object.freeze(Object.defineProperty({__proto__:null,Container:It,Simple:Ft,calcStickyPos:Zs,completeStickyXYz:Is,legendSwatches:Zt,stickyXYz:ii},Symbol.toStringTag,{value:"Module"})),Fs=({className:e,style:t,onLineChange:n,...r})=>{const{lines:o}=Se("Legend");return Se("Legend"),s.jsxRuntimeExports.jsx(Ft,{data:o,onEntryChange:n,...r})},xi=({onLineChange:e})=>{const{lines:t}=Se("Legend"),n=c.useUniqueKey(),r=He({key:n,size:t.length>0?36:0,loc:"top",order:5},"Legend");return s.jsxRuntimeExports.jsx(D.Space,{className:l.CSS.BE("legend","container"),align:"center",direction:"x",size:"large",style:{...r,padding:"0 1rem",height:"var(--pluto-height-medium)",margin:"1rem 0 "},children:Zt(t,e)})},qs=({variant:e="floating",...t})=>e==="floating"?s.jsxRuntimeExports.jsx(Fs,{...t}):s.jsxRuntimeExports.jsx(xi,{...t}),Hs=c.wrap$1("Line",({aetherKey:e,...t})=>{const[,,n]=c.use$3({aetherKey:e,type:j.Line.TYPE,schema:j.stateZ,initialState:t}),r=c.useMemoDeepEqualProps(t);return d.useLayoutEffect(()=>n(r),[r]),null}),di=Object.freeze(Object.defineProperty({__proto__:null,Line:Hs},Symbol.toStringTag,{value:"Module"})),qt=c.wrap$1("Line",({aetherKey:e,color:t,label:n="",...r})=>{const{setLine:o,removeLine:i}=Se("Line");return d.useEffect(()=>(o({key:e,color:t,label:n}),()=>i(e)),[n,t]),s.jsxRuntimeExports.jsx(Hs,{aetherKey:e,color:t,label:n,...r})}),Ys=({level:e="h2",...t})=>{const n=c.useUniqueKey(),r=c.useTypography(e),o=He({key:n,size:(r.lineHeight+2)*r.baseSize,loc:"top",order:10},"Title");return s.jsxRuntimeExports.jsx(D.Space,{justify:"center",align:"center",style:o,children:s.jsxRuntimeExports.jsx(c.MaybeEditable,{...t,level:e})})},Us=c.wrap$1("Tooltip",({aetherKey:e})=>{const[,,t]=c.use$3({aetherKey:e,type:j.Tooltip.TYPE,schema:j.tooltipStateZ,initialState:{position:null}}),n=d.useRef(null),r=d.useCallback(i=>{const a=document.querySelector(".pluto-canvas-container");if(a==null)return;const u=l.Eo.topLeft(a);t({position:l.q.translation(u,l.q.construct(i))})},[t]),o=d.useCallback(()=>t({position:null}),[t]);return d.useEffect(()=>{if(n.current===null)return;const i=n.current.parentElement;if(i!=null)return i.addEventListener("mousemove",r),i.addEventListener("mouseleave",o),()=>{i.removeEventListener("mousemove",r),i.removeEventListener("mouseleave",o)}},[r]),s.jsxRuntimeExports.jsx("span",{ref:n})}),pi=Object.freeze(Object.defineProperty({__proto__:null,Tooltip:Us},Symbol.toStringTag,{value:"Module"})),mi={select:"pointer",zoom:"crosshair",pan:"grab",zoomReset:"crosshair",click:"pointer"},Ht=d.forwardRef(({className:e,mode:t,maskBox:n,children:r,style:o,...i},a)=>s.jsxRuntimeExports.jsxs("div",{ref:a,className:l.CSS(l.CSS.noSelect,l.CSS.BE("viewport-mask","container"),e),style:{cursor:mi[t],...o},...i,children:[s.jsxRuntimeExports.jsx("div",{style:{...l.Eo.css(n),display:l.Eo.areaIsZero(n)?"none":"block"},className:l.CSS.BE("viewport-mask","selection")}),r]}));Ht.displayName="ZoomPanMask";const ji=[{key:"start",icon:s.jsxRuntimeExports.jsx(c.Qt.TextAlign.Left,{})},{key:"center",icon:s.jsxRuntimeExports.jsx(c.Qt.TextAlign.Center,{})},{key:"end",icon:s.jsxRuntimeExports.jsx(c.Qt.TextAlign.Right,{})}],gi=({key:e,entry:t,onClick:n,selected:r})=>s.jsxRuntimeExports.jsx(c.Icon,{variant:r?"filled":"outlined",onClick:n,children:t.icon},e),Yt=({children:e=gi,...t})=>s.jsxRuntimeExports.jsx(de.Button,{...t,allowMultiple:!1,data:ji,children:e}),fi=new Set([C.g.UUID,C.g.JSON]),hi=C.g.ALL.filter(e=>e!==C.g.UNKNOWN).map(e=>({key:e.toString(),name:fi.has(e)?e.toString().toUpperCase():l._.capitalize(e.toString())})),Ei=[{key:"name",name:"Name"}],Si=e=>s.jsxRuntimeExports.jsx(de.DropdownButton,{...e,data:hi,columns:Ei,entryRenderKey:"name"}),Ri=[{key:"x",icon:s.jsxRuntimeExports.jsx(c.Qt.Arrow.Right,{})},{key:"y",icon:s.jsxRuntimeExports.jsx(c.Qt.Arrow.Up,{})}],yi=({key:e,entry:t,onClick:n,selected:r})=>s.jsxRuntimeExports.jsx(c.Icon,{variant:r?"filled":"outlined",onClick:n,children:t.icon},e),Ci=({children:e=yi,...t})=>s.jsxRuntimeExports.jsx(de.Button,{...t,allowMultiple:!1,data:Ri,children:e}),Gs=e=>s.jsxRuntimeExports.jsx(c.Icon,{className:l.CSS.BE("select","clear"),variant:"outlined",...e,children:s.jsxRuntimeExports.jsx(c.Qt.Close,{"aria-label":"clear"})}),be=({onChange:e,value:t,entryRenderKey:n="key",columns:r,data:o,emptyContent:i,inputProps:a,allowNone:u=!0,searcher:x,className:m,variant:p="button",hideColumnHeader:g=!1,disabled:h,omit:f,children:E,dropdownVariant:R="connected",placeholder:k=ft,inputPlaceholder:T=k,triggerTooltip:M,dropdownZIndex:$,filter:P,actions:S,...v})=>{const{visible:B,open:L,close:N,toggle:A}=c.use$2(),[w,y]=d.useState(null),_=x!=null;c.useAsyncEffect(async()=>{if(c.selectValueIsZero(t))return y(null);if((w==null?void 0:w.key)===t)return;let O=null;if(_)try{[O]=await x.retrieve([t])}finally{O??(O=null)}else o!=null&&(O=o.find(te=>te.key===t)??null);y(O)},[x,t,o]);const z=d.useCallback((O,te)=>{Array.isArray(O)||(y(O==null?null:te.entries[0]),N(),e(O,te))},[e,u]),U=d.useMemo(()=>_?c.Search:$e.Filter,[_]),I=s.jsxRuntimeExports.jsx(U,{searcher:x,filter:P,children:({onChange:O})=>s.jsxRuntimeExports.jsx(bi,{autoFocus:R==="modal",variant:p,onChange:O,onFocus:L,selected:w,entryRenderKey:n,visible:B,allowNone:u,className:m,disabled:h,placeholder:T,children:S})}),G=s.jsxRuntimeExports.jsx(c.Button,{tooltip:M,variant:"outlined",onClick:A,disabled:h,children:w!=null?Ws(n,w):k});return s.jsxRuntimeExports.jsx(de.Core,{close:N,zIndex:$,open:L,data:o,omit:f,emptyContent:i,allowMultiple:!1,visible:B,value:t,hideColumnHeader:g,onChange:z,allowNone:u,columns:r,listItem:E,variant:R,trigger:R!=="modal"?I:G,extraDialogContent:R==="modal"?I:void 0,keepMounted:!1,...v})},ft="Select",Ws=(e,t)=>t==null?"":typeof e=="function"?e(t):t[e].toString(),bi=({entryRenderKey:e,selected:t,visible:n,onChange:r,onFocus:o,allowNone:i=!0,placeholder:a=ft,className:u,disabled:x,...m})=>{const{clear:p}=c.useSelectionUtils(),[g,h]=d.useState("");d.useEffect(()=>{if(!n){if(C.w$1(t==null?void 0:t.key))return h("");t!=null&&h(Ws(e,t))}},[t,n,e]);const f=T=>{r(T),h(T)},E=()=>{g===""&&r(""),h(""),o==null||o()},R=T=>{n||(T.preventDefault(),o==null||o())},k=()=>{h(""),p==null||p()};return s.jsxRuntimeExports.jsx(c.Text$1,{className:l.CSS(l.CSS.BE("select","input"),u),value:g,onChange:f,onFocus:E,onKeyDown:c.matchCallback([["Enter"]],T=>{T.preventDefault(),!n&&(o==null||o())}),endContent:s.jsxRuntimeExports.jsx(Cs.Animated,{enabledLoc:"bottom",disabledLoc:"left",enabled:n}),style:{flexGrow:1},onClick:R,placeholder:a,disabled:x,...m,children:i&&s.jsxRuntimeExports.jsx(Gs,{onClick:k,disabled:x})})},Ze=({children:e="",size:t="medium",color:n,icon:r,onClose:o,className:i,onDragStart:a,...u})=>{const x=l.cssString(n);r==null&&n!=null&&(r=s.jsxRuntimeExports.jsx(c.Qt.Circle,{fill:x}));const m=o==null?void 0:s.jsxRuntimeExports.jsx(c.Icon,{"aria-label":"close",size:"small",className:l.CSS.BE("tag","close"),onClick:p=>{p.stopPropagation(),o()},children:s.jsxRuntimeExports.jsx(c.Qt.Close,{})});return s.jsxRuntimeExports.jsx(c.WithIcon,{startIcon:r,endIcon:m,className:l.CSS(i,l.CSS.B("tag"),o!=null&&l.CSS.BM("tag","closeable")),level:C.ComponentSizeLevels[t],noWrap:!0,align:"center",onDragStart:a,...u,children:e})},vi=Object.freeze(Object.defineProperty({__proto__:null,Tag:Ze},Symbol.toStringTag,{value:"Module"})),_e=({onChange:e,value:t,className:n,data:r,columns:o=[],entryRenderKey:i="key",emptyContent:a,searcher:u,renderTag:x=c.componentRenderProp(Ks),placeholder:m,onTagDragStart:p,allowMultiple:g,allowNone:h,replaceOnSingle:f,onTagDragEnd:E,style:R,addPlaceholder:k="Add",children:T,dropdownVariant:M="connected",actions:$,...P})=>{const{visible:S,open:v,close:B}=c.use$2(),[L,N]=d.useState([]),[A,w]=d.useState(!1),y=u!=null;c.useAsyncEffect(async()=>{w(!0),c.selectValueIsZero(t)&&N([]);const G=L.map(ce=>ce.key),O=C.A(t);if(C.F.unorderedPrimitiveArrays(G,O)===C.F.EQUAL)return;let te=[];if(y)try{te=await u.retrieve(O)}finally{w(!1)}else r!=null&&(te=r.filter(ce=>O.includes(ce.key)));N(te)},[u,y,t,r]);const _=d.useCallback((G,O)=>{G!=null&&(N(O.entries),e(C.A(G),O))},[e]),z=d.useMemo(()=>y?c.Search:$e.Filter,[y]);let U,I;if(M==="connected")I=s.jsxRuntimeExports.jsx(z,{searcher:u,children:({onChange:G,value:O})=>s.jsxRuntimeExports.jsx(wi,{value:O,selectedKeys:t,className:n,onChange:G,loading:A,selected:L,onFocus:v,entryRenderKey:i,visible:S,renderTag:x,placeholder:m,onTagDragStart:p,onTagDragEnd:E,style:R,children:$})});else{const G=C.A(t);I=s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",align:"center",grow:!0,style:R,size:"small",children:[G.map(O=>{const te=L.find(ce=>ce.key===O);return x({key:O,entryKey:O,entryRenderKey:i,loading:A,entry:te,onClose:()=>{const ce=G.filter(We=>We!==O);e(ce,{clicked:null,clickedIndex:-1,entries:[]})},onDragStart:ce=>p==null?void 0:p(ce,O),onDragEnd:ce=>E==null?void 0:E(ce,O)})}),G.length>0?s.jsxRuntimeExports.jsx(c.Icon,{onClick:v,children:s.jsxRuntimeExports.jsx(c.Qt.Add,{style:{color:"var(--pluto-gray-l7)"}})}):s.jsxRuntimeExports.jsx(c.Button,{onClick:v,shade:7,startIcon:s.jsxRuntimeExports.jsx(c.Qt.Add,{}),variant:"text",children:k})]}),U=s.jsxRuntimeExports.jsx(z,{searcher:u,children:O=>s.jsxRuntimeExports.jsx(c.Text$1,{autoFocus:!0,placeholder:"Search",...O,children:$})})}return s.jsxRuntimeExports.jsx(de.Core,{close:B,open:v,data:r,emptyContent:a,visible:S,value:t,onChange:_,allowNone:h,replaceOnSingle:f,columns:o,allowMultiple:!0,listItem:T,trigger:I,extraDialogContent:U,variant:M,...P})},wi=({selectedKeys:e,loading:t,selected:n,onChange:r,onFocus:o,visible:i,entryRenderKey:a,renderTag:u,placeholder:x=ft,onTagDragStart:m,onTagDragEnd:p,value:g,className:h,children:f,...E})=>{const{onSelect:R,clear:k}=c.useSelectionUtils(),T=d.useRef(null);d.useLayoutEffect(()=>{var S;i&&((S=T.current)==null||S.focus())},[i,n]);const M=()=>{i||r(""),o==null||o()},$=()=>{i||o==null||o()},P=()=>{i||r("")};return s.jsxRuntimeExports.jsxs(c.Text$1,{ref:T,className:l.CSS(l.CSS.BE("select-multiple","input"),l.CSS.visible(i),h),onBlur:P,placeholder:x,value:g,onChange:r,onFocus:M,autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",onClick:$,variant:"button",...E,children:[s.jsxRuntimeExports.jsx(D.Space,{direction:"x",className:l.CSS.BE("select-multiple","tags"),align:"center",grow:!0,size:"small",children:C.A(e).map(S=>{const v=n.find(B=>B.key===S);return u({key:S,entryKey:S,entryRenderKey:a,loading:t,entry:v,onClose:()=>R==null?void 0:R(S),onDragStart:B=>m==null?void 0:m(B,S),onDragEnd:B=>p==null?void 0:p(B,S)})})}),f,s.jsxRuntimeExports.jsx(Gs,{onClick:k})]})},Ks=({entryKey:e,entryRenderKey:t,entry:n,loading:r,...o})=>{let i=e;return n!=null&&(i=typeof t=="function"?t(n):n[t]),d.createElement(Ze,{size:"small",variant:"outlined",className:l.CSS(n==null&&!r&&l.CSS.BEM("select-multiple","tag","invalid")),draggable:!0,...o,key:e.toString()},C.Q(i))},Pi=Object.freeze(Object.defineProperty({__proto__:null,BaseButton:de.BaseButton,Button:de.Button,DEFAULT_PLACEHOLDER:ft,DataType:Si,Direction:Ci,DropdownButton:de.DropdownButton,Multiple:_e,MultipleTag:Ks,Single:be,TextAlignment:Yt,defaultButton:de.defaultButton},Symbol.toStringTag,{value:"Module"})),Xe=6,ki=2,ps=5,Li=e=>l.Eo.width(e)<ps&&l.Eo.height(e)<ps,Ti=["zoom","pan","select","zoomReset"],Ie=[...Ti,"click"],Mi=pe.z.enum(Ie),Qs=["zoom","select"],Je={defaultMode:"zoom",zoom:[["MouseLeft"]],zoomReset:[["MouseLeft","Control"]],pan:[["MouseLeft","Shift"]],select:[["MouseLeft","Alt"]]},Xs={defaultMode:"pan",pan:[["MouseLeft"]],zoom:[["MouseLeft","Shift"]],zoomReset:[["MouseLeft","Control"]],select:[["MouseLeft","Alt"]]},Js={defaultMode:"select",select:[["MouseLeft"]],pan:[["MouseLeft","Shift"]],zoom:[["MouseLeft","Alt"]],zoomReset:[["MouseLeft","Control"]]},Ut={zoom:Je,pan:Xs,select:Js,zoomReset:Je,click:Je},$i=e=>{const t=Object.entries(e);return Object.fromEntries(t.map(([n,r])=>n==="defaultMode"?[n,r]:[n,r.map(o=>o.filter(i=>i!=="MouseLeft")).filter(o=>o.length>0)]))},Ni=l.Eo.construct(0,0,1,1,l.J.TOP_LEFT),_i={width:30,height:50},en=({onChange:e,triggers:t,initial:n=Ni,threshold:r=_i,ref:o})=>{const i=(t==null?void 0:t.defaultMode)??"zoom",[a,u]=d.useState(l.Eo.ZERO),[x,m]=d.useState(i),[p,g]=c.useStateRef(n),h=d.useRef(l.q.ZERO),f=d.useRef(null),E=l._$1.construct(r);d.useEffect(()=>g(()=>l.Eo.truncate(n,Xe)),[n]),d.useEffect(()=>m(i),[i]);const[R,k,T,M]=c.useMemoCompare(()=>{const L={...Ut[i],...t},N=c.flattenConfig(L),A=$i(L);return[L,N,A,c.flattenConfig(A)]},c.compareModeConfigs,[t]),$=d.useCallback(({box:L,triggers:N,stage:A,cursor:w})=>{if(f.current==null)return;const y=c.determineMode(R,N),_=l.Eo.construct(f.current);if(y==null)return;if(y==="zoomReset")return u(l.Eo.ZERO),e==null||e({box:l.Eo.DECIMAL,mode:y,stage:A,cursor:w}),g(l.Eo.DECIMAL);const z=Li(L);if(A==="end"){if(z){y==="zoom"&&u(l.Eo.ZERO),e==null||e({box:p.current,mode:"click",stage:A,cursor:w});return}return g(I=>{if(y==="pan"){const O=ms(L,I,_);return O===null||l.Eo.equals(O,I)?I:(e==null||e({box:O,mode:y,stage:A,cursor:w}),O)}const G=P(L,I,_);return G===null?I:(e==null||e({box:G,mode:y,stage:A,cursor:w}),y==="zoom"?(u(l.Eo.ZERO),G):l.Eo.truncate(I,Xe))})}if(Qs.includes(y))return z?void 0:u(l.k$2.XY.scale(_).clamp(_).translate({x:-l.Eo.left(_),y:-l.Eo.top(_)}).box(js(E,L,_)));if(u(I=>l.Eo.areaIsZero(I)?I:l.Eo.ZERO),l.q.distance(w,h.current)<ki)return;h.current=w;const U=ms(L,p.current,_);e==null||e({box:U,mode:y,stage:A,cursor:w})},[u,m,e,R,r.height,r.width,g,f]);d.useImperativeHandle(o,()=>({reset:()=>{u(l.Eo.ZERO),g(l.Eo.DECIMAL),e==null||e({box:l.Eo.DECIMAL,mode:"zoomReset",stage:"start",cursor:l.q.ZERO})}}),[e]);const P=d.useCallback((L,N,A)=>l.Eo.truncate(Lt(N,A).box(js(E,L,A)),Xe),[r]),S=c.useHeldRef({triggers:[["Control"]]}),v=c.useHeldRef({triggers:[["Alt"]]});d.useEffect(()=>{const L=N=>{if(f.current==null)return;let A=1;N.deltaY<0?A-=.035:A+=.035;const w=l.Eo.construct(f.current),y=l.q.construct(N);if(!l.Eo.contains(w,y)||N.target!==f.current)return;const z=Lt(p.current,l.Eo.construct(f.current)).pos(l.q.construct(N));let I=l.k$2.XY.magnify({x:S.current.held?1:A,y:v.current.held?1:A}).box(p.current);I=l.Eo.translate(I,{x:S.current.held?0:z.x*(1-A),y:v.current.held?0:z.y*(1-A)}),g(I),e==null||e({stage:"end",box:I,cursor:l.q.construct(N),mode:"zoom"})};return window.addEventListener("wheel",L),()=>window.removeEventListener("wheel",L)},[g,e]),bs.useDrag({bound:f,onDrag:$,triggers:k,loose:!0});const B=d.useCallback(({triggers:L,stage:N})=>{if(N==="end")return m(i);const A=c.determineMode(T,L);A!=null&&m(A)},[T,i,e]);return c.use$1({triggers:M,callback:B,region:f}),{maskBox:a,ref:f,mode:x}},Lt=(e,t)=>l.k$2.XY.scale(t).clamp(t).scale(e),ms=(e,t,n)=>{let r=l.Eo.signedDims(Lt(t,n).box(e));return r={signedWidth:-r.signedWidth,signedHeight:-r.signedHeight},l.Eo.truncate(l.k$2.XY.translate(l.q.construct(r)).box(t),Xe)},js=(e,t,n)=>l.Eo.height(t)<=e.height?l.Eo.construct(l.Eo.left(t),l.Eo.top(n),l.Eo.width(t),l.Eo.height(n)):l.Eo.width(t)<=e.width?l.Eo.construct(l.Eo.left(n),l.Eo.top(t),l.Eo.width(n),l.Eo.height(t)):t,Bi=({mode:e,triggers:t})=>s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",align:"center",children:[s.jsxRuntimeExports.jsx(c.Text,{level:"small",children:l._.capitalize(e)}),s.jsxRuntimeExports.jsx(fl.Text,{trigger:t[0],level:"small"})]}),Ai={zoom:s.jsxRuntimeExports.jsx(c.Qt.Zoom,{}),pan:s.jsxRuntimeExports.jsx(c.Qt.Pan,{}),select:s.jsxRuntimeExports.jsx(c.Qt.Selection,{}),zoomReset:s.jsxRuntimeExports.jsx(c.Qt.Expand,{}),click:s.jsxRuntimeExports.jsx(c.Qt.Bolt,{})},Oi=({triggers:e,disable:t=["zoomReset","click"],...n})=>{const r=Object.entries(e).filter(([o])=>!t.includes(o)&&Ie.includes(o)).map(([o,i])=>({key:o,icon:Ai[o],tooltip:s.jsxRuntimeExports.jsx(Bi,{mode:o,triggers:i})})).sort((o,i)=>Ie.indexOf(o.key)-Ie.indexOf(i.key));return s.jsxRuntimeExports.jsx(de.Button,{...n,data:r,entryRenderKey:"icon",children:({title:o,entry:i,...a})=>d.createElement(c.Icon,{...a,key:i.key,variant:a.selected?"filled":"text",size:"medium",tooltip:i.tooltip,tooltipLocation:{x:"right",y:"top"}},i.icon)})},zi=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_TRIGGERS:Ut,MASK_MODES:Qs,MODES:Ie,Mask:Ht,PAN_DEFAULT_TRIGGERS:Xs,SELECT_DEFAULT_TRIGGERS:Js,SelectMode:Oi,ZOOM_DEFAULT_TRIGGERS:Je,modeZ:Mi,use:en},Symbol.toStringTag,{value:"Module"})),tn=e=>e==null?null:document.querySelectorAll(".pluto-line-plot__viewport")[0]??null,Gt=d.forwardRef(({children:e,initial:t=l.Eo.DECIMAL,onChange:n,...r},o)=>{const{setViewport:i}=Se("Viewport");d.useLayoutEffect(()=>{i({box:t,mode:"zoom",cursor:l.q.ZERO,stage:"start"})},[i,t]);const a=d.useCallback(x=>{i(x),n==null||n(x)},[n,i]),u=en({onChange:a,initial:t,ref:o,...r});return s.jsxRuntimeExports.jsx(Ht,{className:l.CSS.BE("line-plot","viewport"),...u,children:e})});Gt.displayName="Viewport";const Di=Object.freeze(Object.defineProperty({__proto__:null,Floating:Fs,Legend:qs,Line:qt,LinePlot:zs,Title:Ys,Tooltip:pi,Viewport:Gt,XAxis:Ds,YAxis:Vs,axisFactory:Vt,selectViewportEl:tn,useContext:Se,useGridEntry:He,useViewport:Os},Symbol.toStringTag,{value:"Module"})),Vi=c.wrap$1("Tooltip",({aetherKey:e,...t})=>(c.use$3({aetherKey:e,type:j.Annotation.TYPE,schema:j.annotationStateZ,initialState:t}),null)),sn=c.wrap$1("Annotation.Provider",({aetherKey:e,menu:t,...n})=>{const{setViewport:r,setHold:o}=Se("Range.Provider"),[,{hovered:i,count:a},u]=c.use$3({aetherKey:e,type:j.Provider$1.TYPE,schema:j.providerStateZ,initialState:{...n,cursor:null,hovered:null,count:0}}),x=He({key:e,loc:"top",size:a>0?32:0,order:3},"Annotation.Provider"),m=c.useContextMenu(),p=c.useSyncedRef(m.visible),g=d.useCallback(h=>{const f=R=>{u(k=>({...k,cursor:{x:R.clientX,y:R.clientY}}))},E=h.currentTarget;E.addEventListener("mousemove",f),E.addEventListener("mouseleave",()=>{E.removeEventListener("mousemove",f),p.current||u(R=>({...R,cursor:null}))},{once:!0})},[u]);return s.jsxRuntimeExports.jsx(c.ContextMenu,{style:{...x,cursor:i!=null?"pointer":"default"},...m,menu:()=>t==null||i==null?null:t(i),children:s.jsxRuntimeExports.jsx(D.Space,{style:{width:"100%",height:"100%"},onClick:()=>{i!=null&&(r({box:l.Eo.construct({x:i.viewport.lower,y:0},{x:i.viewport.upper,y:1}),mode:"zoom",cursor:l.q.ZERO,stage:"start"}),o(!0))},onMouseEnter:g})})}),Ii=Object.freeze(Object.defineProperty({__proto__:null,Annotation:Vi,Provider:sn},Symbol.toStringTag,{value:"Module"})),nn={defaultMode:"empty",one:[["1"]],two:[["2"]],clear:[["Shift"]],empty:[[]]},Zi=c.flattenConfig(nn),rn=c.wrap$1("Measure",({aetherKey:e})=>{const[,,t]=c.use$3({aetherKey:e,type:j.Measure.TYPE,schema:j.measureStateZ,initialState:{hover:null,one:null,two:null}}),n=d.useRef(null),r=c.useHeldRef({triggers:Zi,loose:!0}),o=d.useCallback(({mode:u,cursor:x})=>{if(u==="click"){const m=c.determineMode(nn,r.current.triggers,{loose:!0});if(["one","two"].includes(m))return t(p=>({...p,[m]:x}));t(m==="clear"?p=>({...p,one:null,two:null}):p=>({...p,one:p.one??x,two:p.one!==null?x:p.two}))}},[t,r]);Os(o);const i=d.useCallback(u=>t(x=>({...x,hover:l.q.construct(u)})),[t]),a=d.useCallback(()=>{t(u=>({...u,hover:null}))},[t]);return d.useEffect(()=>{if(n.current===null)return;const u=n.current.parentElement;if(u!=null)return u.addEventListener("mousemove",i),u.addEventListener("mouseleave",a),()=>{u.removeEventListener("mousemove",i),u.removeEventListener("mouseleave",a)}},[o]),s.jsxRuntimeExports.jsx("span",{ref:n})}),Fi=Object.freeze(Object.defineProperty({__proto__:null,Measure:rn},Symbol.toStringTag,{value:"Module"})),Wt=c.wrap$1("Rule",({aetherKey:e,label:t,position:n,onLabelChange:r,onPositionChange:o,units:i="",color:a,lineWidth:u,lineDash:x})=>{const[m,p]=C.usePurePassthrough({value:t,onChange:r,initial:""}),[,{position:g,pixelPosition:h},f]=c.use$3({aetherKey:e,type:j.Rule.TYPE,schema:j.ruleStateZ,initialState:{color:a,dragging:!1,position:n,lineWidth:u,lineDash:x}});d.useEffect(()=>{if(g==null)return;if(n==null)return o==null?void 0:o(g);const P=l.G.construct(g+.01,g-.01);n!=null&&!l.G.contains(P,n)&&(o==null||o(Math.trunc(g*100)/100))},[g]);const E=d.useRef(h);h!==E.current&&(E.current=h);const R=d.useRef(h);d.useEffect(()=>{f(P=>({...P,position:n,color:a,lineWidth:u,lineDash:x}))},[n,a,u,x]);const k=pt({onStart:d.useCallback(()=>{f(P=>({...P,dragging:!0})),R.current=E.current},[]),onMove:P=>{f(S=>({...S,pixelPosition:(R.current??0)+l.Eo.signedHeight(P)}))},onEnd:d.useCallback(()=>{f(P=>({...P,dragging:!1})),R.current=h},[])}),T=d.useRef(null);if(g==null||h==null)return null;const M=tn(T==null?void 0:T.current),$=s.jsxRuntimeExports.jsxs("div",{ref:T,className:l.CSS.B("rule"),style:{top:`calc(${h}px - 0.5rem)`},children:[s.jsxRuntimeExports.jsx("div",{className:l.CSS.BE("rule","drag-handle"),onDragStart:k,draggable:!0}),s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",align:"center",style:{marginLeft:"2rem"},children:[s.jsxRuntimeExports.jsx(c.Editable,{level:"p",value:m,onChange:p}),s.jsxRuntimeExports.jsx(c.Text,{level:"p",style:{padding:"0.25rem 0",width:"fit-content"},children:`${g.toFixed(2)} ${i}`})]})]});return M==null?$:At.createPortal($,M)}),qi=Object.freeze(Object.defineProperty({__proto__:null,Rule:Wt},Symbol.toStringTag,{value:"Module"})),on=c.canDropOfType(Ee),Hi=({lines:e,axes:t,showTitle:n=!0,title:r="",onTitleChange:o,showLegend:i=!0,legendPosition:a,onLegendPositionChange:u,titleLevel:x="h4",onLineChange:m,onRuleChange:p,onAxisChannelDrop:g,onAxisChange:h,rules:f,enableTooltip:E=!0,enableMeasure:R=!1,initialViewport:k=l.Eo.DECIMAL,legendVariant:T,onViewportChange:M,viewportTriggers:$,annotationProvider:P,...S})=>{var A;const v=t.filter(({location:w})=>l.J.isY(w)),B=d.useRef(),L=c.usePrevious(e.length),N=c.usePrevious(S.hold);return(L===0&&e.length!==0||N===!0&&S.hold===!1)&&((A=B.current)==null||A.reset()),s.jsxRuntimeExports.jsxs(zs,{...S,children:[v.map((w,y)=>{const _=e.filter(I=>I.axes.x===w.key),z=t.filter(({location:I})=>l.J.isX(I)),U=f==null?void 0:f.filter(I=>[...z.map(({key:G})=>G),w.key].includes(I.axis));return s.jsxRuntimeExports.jsx(Yi,{axis:w,index:y,lines:_,yAxes:z,rules:U,onAxisChannelDrop:g,onAxisChange:h,annotationProvider:P},w.key)}),i&&s.jsxRuntimeExports.jsx(qs,{onLineChange:m,position:a,onPositionChange:u,variant:T}),n&&s.jsxRuntimeExports.jsx(Ys,{value:r,onChange:o,level:x}),s.jsxRuntimeExports.jsxs(Gt,{initial:k,onChange:M,triggers:$,ref:B,children:[E&&s.jsxRuntimeExports.jsx(Us,{}),R&&s.jsxRuntimeExports.jsx(rn,{})]})]})},Yi=({yAxes:e,lines:t,index:n,rules:r,onRuleChange:o,onAxisChannelDrop:i,onAxisChange:a,axis:{location:u,key:x,showGrid:m,...p},annotationProvider:g})=>{const h=c.useDrop({type:"Channel.LinePlot.XAxis",canDrop:on,onDrop:d.useCallback(({items:R})=>{const k=c.filterByType(Ee,R);return i==null||i(x,k.map(({key:T})=>T)),k},[x,i])}),f=r==null?void 0:r.filter(R=>R.axis===x),E=c.useDraggingState();return s.jsxRuntimeExports.jsxs(Ds,{...p,...h,location:u,showGrid:m??n===0,className:l.CSS(l.CSS.dropRegion(c.canDropOfType(Ee)(E))),onAutoBoundsChange:R=>a==null?void 0:a({key:x,bounds:R}),children:[e.map((R,k)=>{const T=t.filter($=>$.axes.y===R.key),M=r==null?void 0:r.filter($=>$.axis===R.key);return s.jsxRuntimeExports.jsx(Gi,{axis:{...R,showGrid:m??(n===0&&k===0)},lines:T,rules:M,onRuleChange:o,onAxisChannelDrop:i,onAxisChange:a},R.key)}),f==null?void 0:f.map(R=>d.createElement(Wt,{aetherKey:R.key,...R,key:R.key,onLabelChange:k=>o==null?void 0:o({key:R.key,label:k}),onPositionChange:k=>o==null?void 0:o({key:R.key,position:k})})),s.jsxRuntimeExports.jsx(sn,{...g})]})},Ui=({channels:{x:e,y:t}})=>`${e??0}-${t}`,Gi=({lines:e,rules:t,onRuleChange:n,onAxisChannelDrop:r,onAxisChange:o,axis:{key:i,location:a,...u}})=>{const x=c.useDrop({type:"Channel.LinePlot.YAxis",canDrop:on,onDrop:d.useCallback(({items:p})=>{const g=c.filterByType(Ee,p);return r==null||r(i,g.map(({key:h})=>h)),g},[i,r])}),m=c.useDraggingState();return s.jsxRuntimeExports.jsxs(Vs,{...u,...x,location:a,className:l.CSS(l.CSS.dropRegion(c.canDropOfType(Ee)(m))),onAutoBoundsChange:p=>o==null?void 0:o({key:i,bounds:p}),children:[e.map(p=>s.jsxRuntimeExports.jsx(Wi,{line:p},Ui(p))),t==null?void 0:t.map(p=>d.createElement(Wt,{aetherKey:p.key,...p,key:p.key,onLabelChange:g=>n==null?void 0:n({key:p.key,label:g}),onPositionChange:g=>n==null?void 0:n({key:p.key,position:g})}))]})},Wi=({line:e})=>e.variant==="static"?s.jsxRuntimeExports.jsx(Qi,{line:e}):s.jsxRuntimeExports.jsx(Ki,{line:e}),Ki=({line:{key:e,timeSpan:t,channels:{x:n,y:r},...o}})=>{const i=Number(t.valueOf())*3,a=j.streamChannelData({timeSpan:t,channel:r,keepFor:i}),u=n!=null&&n!==0,x=j.streamChannelData({timeSpan:t,channel:u?n:r,useIndexOfChannel:!u,keepFor:i});return s.jsxRuntimeExports.jsx(qt,{aetherKey:e,y:a,x,...o})},Qi=({line:{timeRange:e,key:t,channels:{x:n,y:r},...o}})=>{const i=j.channelData({timeRange:e,channel:r}),a=n!=null&&n!==0,u=j.channelData({timeRange:e,channel:a?n:r,useIndexOfChannel:!a});return s.jsxRuntimeExports.jsx(qt,{aetherKey:t,y:i,x:u,...o})},gs=[{key:"name",name:"Name"},{key:"alias",name:"Alias"},{key:"rate",name:"Rate"},{key:"dataType",name:"Data Type"},{key:"index",name:"Index"},{key:"key",name:"Key"},{key:"isIndex",name:"Is Index"}],tt=({items:e},t)=>{const n=c.filterByType(Ee,e);return n.length>0&&!n.every(r=>t.includes(r.key))},ln=["name","alias"],cn=e=>{const t=mt();return d.useMemo(()=>e.length===0?gs:gs.filter(n=>e.includes(n.key)),[e,t])},Xi=({columns:e=ln,onChange:t,className:n,value:r,searchOptions:o,...i})=>{const a=ge(),u=mt(),x=cn(e),m=Dt(),p=c.useMemoDeepEqualProps(o),g=d.useMemo(()=>a==null?void 0:a.channels.newSearcherWithOptions({rangeKey:m,internal:!1,...p}),[a,m,p]),h=a!=null?void 0:s.jsxRuntimeExports.jsx(c.Text$2.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),{startDrag:f,onDragEnd:E,...R}=c.useDragAndDrop({type:"Channel.SelectMultiple",canDrop:d.useCallback(P=>tt(P,C.A(r)),[r]),onDrop:d.useCallback(({items:P})=>{const S=c.filterByType(Ee,P);if(S.length===0)return[];const v=C.n([...C.A(r),...S.map(B=>B.key)]);return t(v,{clickedIndex:null,clicked:null,entries:[]}),S},[t,r])}),k=c.useDraggingState(),T=d.useCallback(({dropped:P})=>{t(C.A(r).filter(S=>!P.some(v=>v.key===S)),{clickedIndex:null,clicked:null,entries:[]})},[t,r]),M=d.useCallback((P,S)=>f([{key:S,type:Ee}],T),[f,T]),$=d.useCallback(P=>u[P.key]??P.name,[u]);return s.jsxRuntimeExports.jsx(_e,{className:l.CSS(n,l.CSS.dropRegion(tt(k,C.A(r)))),value:r,onTagDragStart:M,onTagDragEnd:E,searcher:g,onChange:t,columns:x,emptyContent:h,entryRenderKey:$,...R,...i})},Ce=({columns:e=ln,onChange:t,value:n,className:r,data:o,searchOptions:i,...a})=>{const u=ge(),x=mt(),m=cn(e),p=Dt(),g=c.useMemoDeepEqualProps(i),h=d.useMemo(()=>{if(!(o!=null&&o.length>0))return u==null?void 0:u.channels.newSearcherWithOptions({rangeKey:p,internal:!1,...g})},[u,p,o==null?void 0:o.length,g]),f=u!=null?void 0:s.jsxRuntimeExports.jsx(c.Text$2.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),E=d.useId(),R=d.useMemo(()=>({key:E,type:"Channel.SelectMultiple"}),[E]),{startDrag:k,onDragEnd:T,...M}=c.useDragAndDrop({type:"Channel.SelectSingle",canDrop:d.useCallback(v=>tt(v,C.o(n)),[n]),onDrop:d.useCallback(({items:v})=>{const B=c.filterByType(Ee,v);return B.length===0?[]:(t(B[0].key,{clickedIndex:null,clicked:null,entries:[]}),B)},[R,t])}),$=c.useDraggingState(),P=d.useCallback(()=>n!=null&&k([{type:Ee,key:n}]),[k,n]),S=d.useCallback(v=>x[v.key]??v.name,[x]);return s.jsxRuntimeExports.jsx(be,{data:o,className:l.CSS(r,l.CSS.dropRegion(tt($,C.o(n)))),value:n,onDragStart:P,onDragEnd:T,onChange:t,searcher:h,columns:m,emptyContent:f,entryRenderKey:S,...M,...a})},Ji=Object.freeze(Object.defineProperty({__proto__:null,AliasInput:Ul,AliasProvider:_s,LinePlot:Hi,SelectMultiple:Xi,SelectSingle:Ce,useActiveRange:Dt,useAlias:Ns,useAliases:mt,useContext:$s,useName:jt},Symbol.toStringTag,{value:"Module"})),ve=({path:e,optional:t=!1,onChange:n})=>{const r=we(),{get:o,bind:i,set:a,setStatus:u}=r,[x,m]=d.useState(o(e,{optional:t}));d.useEffect(()=>(m(o(e,{optional:t})),i({path:e,onChange:m,listenToChildren:!1})),[e,n,i,o]);const p=d.useCallback(f=>{n==null||n(f,{...r,path:e}),a(e,f)},[e,a,n]),g=d.useCallback(f=>u(e,f),[e,u]);if(x==null){if(!t)throw new Error(`Field state is null: ${e}`);return null}let h;return r.mode==="preview"&&(h="preview"),{onChange:p,setStatus:g,variant:h,...x}},an=(e,t=!1,n)=>{const{get:r,bind:o}=we(n),[,i]=d.useState(0);return d.useEffect(()=>(i(a=>a+1),o({path:e,onChange:()=>i(a=>a+1)})),[e,o]),r(e,{optional:t})??null},ec=(e,t=!1,n)=>{var a;const{get:r,bind:o}=we(n),[,i]=d.useState(0);return d.useEffect(()=>(i(u=>u+1),o({path:e,onChange:()=>i(u=>u+1)})),[e,o]),((a=r(e,{optional:t}))==null?void 0:a.value)??null},tc=e=>{var t,n;return((n=(t=an(e,!0))==null?void 0:t.status)==null?void 0:n.variant)==="success"},sc=({path:e,ctx:t,onChange:n})=>{const r=we(t);d.useEffect(()=>r.bind({path:e,onChange:o=>n(o,r),listenToChildren:!1}),[e,r])},nc=({path:e,optional:t=!1})=>{const{bind:n,get:r}=we(),[o,i]=d.useState(r(e,{optional:t}));if(d.useEffect(()=>(i(r(e,{optional:t})),n({path:e,onChange:a=>i({...a,value:C.U(a.value)}),listenToChildren:!0})),[e,n,r]),o==null&&!t)throw new Error("Field state is null");return(o==null?void 0:o.value)??null},un=(e,t)=>({add:(n,r)=>{const o=C.U(e.get(t).value);o.splice(r,0,...C.A(n)),e.set(t,o,{validateChildren:!1})},push:(n,r)=>{const o=C.U(e.get(t).value);o.push(...C.A(n)),r!=null&&o.sort(r),e.set(t,o,{validateChildren:!1})},remove:n=>{const r=e.get(t).value,o=new Set(C.A(n));e.set(t,r.filter((i,a)=>!o.has(a)))},keepOnly:n=>{const r=e.get(t).value,o=new Set(C.A(n));e.set(t,r.filter((i,a)=>o.has(a)))},set:n=>e.set(t,C.executeSetter(n,e.get(t).value)),sort:n=>{const r=C.U(e.get(t).value);r.sort(n),e.set(t,r)}}),rc=({path:e,updateOnChildren:t=!1,ctx:n})=>{const r=we(n),{bind:o,get:i}=r,[a,u]=d.useState(i(e).value);return d.useEffect(()=>(u(i(e).value),o({path:e,onChange:x=>{u(C.U(x.value))},listenToChildren:t})),[e,o,i,u]),d.useMemo(()=>({value:a,...un(r,e)}),[a,r,e])},Kt=d.createContext({mode:"normal",bind:()=>()=>{},set:()=>{},reset:()=>{},remove:()=>{},get:()=>({value:void 0,status:{key:"",variant:"success",message:""},touched:!1,required:!1}),validate:()=>!1,validateAsync:()=>Promise.resolve(!1),value:()=>({}),has:()=>!1,setStatus:()=>{},clearStatuses:()=>{}}),we=e=>{const t=d.useContext(Kt);return e??t},fs=e=>({key:e,variant:"success",message:""}),oc=e=>e.code===pe.z.ZodIssueCode.custom&&e.params!=null&&"variant"in e.params?e.params.variant:"error",xn=({values:e,sync:t=!1,schema:n,mode:r="normal",onChange:o})=>{const i=d.useRef({state:e,statuses:new Map,touched:new Set,listeners:new Map,parentListeners:new Map}),a=c.useSyncedRef(n),u=c.useSyncedRef(o),x=d.useCallback(({path:S,onChange:v,listenToChildren:B=!1})=>{var w;const{parentListeners:L,listeners:N}=i.current,A=B?L:N;return A.has(S)||A.set(S,new Set),(w=A.get(S))==null||w.add(v),()=>{var y;return(y=A.get(S))==null?void 0:y.delete(v)}},[]),m=d.useCallback((S,{optional:v}={optional:!1})=>{const{state:B,statuses:L,touched:N}=i.current,A=C._.get(B,S,{optional:v});if(A==null)return null;const w={value:A,status:L.get(S)??fs(S),touched:N.has(S),required:!1};if(a.current==null)return w;const y=a.current,_=C.N.getFieldSchema(y,S,{optional:!0});return _==null||(w.required=!_.isOptional()),w},[]),p=d.useCallback(S=>{const{state:v,statuses:B,touched:L,listeners:N,parentListeners:A}=i.current;C._.remove(v,S),B.delete(S),L.delete(S),N.delete(S),A.delete(S)},[]),g=d.useCallback(S=>{const{statuses:v,touched:B}=i.current;i.current.state=S,f(""),v.clear(),B.clear()},[]),h=d.useCallback(S=>{var L;const{listeners:v}=i.current,B=m(S,{optional:!0});B!=null&&((L=v.get(S))==null||L.forEach(N=>N(B)))},[]),f=d.useCallback(S=>{const{listeners:v,parentListeners:B}=i.current,L=v.get(S);if(S==""&&([...v.keys()].forEach(w=>{var _;const y=m(w,{optional:!0});y!=null&&((_=v.get(w))==null||_.forEach(z=>{z(y)}))}),[...B.keys()].forEach(w=>{var _;const y=m(w,{optional:!0});y!=null&&((_=B.get(w))==null||_.forEach(z=>{z(y)}))})),L!=null){const N=m(S,{optional:!0});N!=null&&L.forEach(A=>{A(N)})}B.forEach((N,A)=>{if(C._.pathsMatch(S,A)){const y=m(A,{optional:!0});y!=null&&N.forEach(_=>{_(y)})}})},[]),E=d.useCallback((S,v="",B=!0)=>{const{statuses:L,listeners:N,touched:A}=i.current;if(S.success){const z=[...L.keys()];return L.clear(),z.forEach(U=>h(U)),!0}let w=!0;const y=new Set(S.error.issues.map(z=>z.path.join(".")));let _=(z,U)=>z===U;return B&&(_=(z,U)=>C._.pathsMatch(z,U)),S.error.issues.forEach(z=>{var te;const{message:U}=z,I=z.path.join(".");if(!_(I,v))return;const G=oc(z);G!=="warning"&&(w=!1),L.set(I,{key:I,variant:G,message:U}),A.add(I);let O=m(I,{optional:!0});O==null&&(O={value:void 0,status:L.get(I)??fs(I),touched:!1,required:!1}),(te=N.get(I))==null||te.forEach(ce=>ce(O))}),L.forEach((z,U)=>{y.has(U)||(L.delete(U),h(U))}),w},[]),R=d.useCallback((S,v)=>{if(a.current==null)return!0;const{state:B}=i.current,L=a.current.safeParse(B);return E(L,S,v)},[E]),k=d.useCallback(async(S,v)=>{if(a.current==null)return!0;const{state:B}=i.current,L=await a.current.safeParseAsync(B);return E(L,S,v)},[E]),T=d.useCallback((S,v,B={})=>{const L=C._.get(i.current.state,S,{optional:!0}),{validateChildren:N=!0}=B,{state:A,touched:w}=i.current;w.add(S),S.length===0?i.current.state=v:C._.set(A,S,v),f(S),(async()=>{var _;let y;try{y=R(S,N)}catch{y=await k(S,N)}(_=u.current)==null||_.call(u,{values:i.current.state,path:S,prev:L,valid:y})})()},[]),M=d.useCallback(S=>C._.has(i.current.state,S),[]),$=d.useCallback((S,v)=>{i.current.statuses.set(S,v),i.current.touched.add(S),h(S)},[]),P=d.useCallback(()=>{const{statuses:S}=i.current;S.clear(),S.forEach((v,B)=>h(B))},[]);return d.useEffect(()=>{if(!t)return;const{listeners:S}=i.current;i.current.state=e,S.forEach((v,B)=>{const L=m(B,{optional:!0});L!=null&&v.forEach(N=>N(L))})},[t,e]),d.useMemo(()=>({bind:x,set:T,get:m,mode:r,validate:R,validateAsync:k,value:()=>i.current.state,has:M,remove:p,setStatus:$,clearStatuses:P,reset:g}),[x,T,m,R,k,M,p,$,P,g,r])},lc=e=>s.jsxRuntimeExports.jsx(Kt.Provider,{value:e,children:e.children}),ic=c.componentRenderProp(c.Text$1),se=({path:e,children:t=ic,label:n,padHelpText:r=!0,visible:o=!0,hideIfNull:i=!1,optional:a,onChange:u,className:x,...m})=>{const p=ve({path:e,optional:a??i,onChange:u}),g=we();if(p==null)return null;if(e==null)throw new Error("No path provided to Form Field");if(n==null&&(n=l._.capitalize(C._.element(e,-1))),o=typeof o=="function"?o(p,g):o,!o)return null;const h=p.status.message,{onChange:f,value:E}=p,R={onChange:f,value:E};return p.variant!=null&&(R.variant=p.variant),s.jsxRuntimeExports.jsx(me.Item,{padHelpText:r,helpText:h,helpTextVariant:p.status.variant,label:n,required:p.required,className:l.CSS(x,l.CSS.BE("field",e.split(".").join("-")),l.CSS.M(p.status.variant)),...m,children:t(R)})},Le=e=>({fieldKey:t,fieldProps:n,inputProps:r})=>{const o=({inputProps:i,path:a,fieldKey:u=t,...x})=>s.jsxRuntimeExports.jsx(se,{...n,...x,path:u?`${a}.${u}`:a,children:m=>s.jsxRuntimeExports.jsx(e,{...m,...r,...i})});return o.displayName=e.displayName,o},dn=Le(c.Numeric),ht=dn({}),pn=Le(c.Text$1),mn=pn({}),jn=Le(c.Switch$1),Qt=jn({}),cc=Le(be),ac=Le(_e),uc=Le(de.DropdownButton),Xt=({key:e,open:t,onChange:n})=>{const r=c.useMemoPrimitiveArray(e);c.useAsyncEffect(async()=>{if(t==null)return;const o=await t();if(o!=null)return o.onChange(n),async()=>await o.close()},[t==null,r])},xc=({fetchInitialValue:e,...t})=>{const[n,r]=d.useState(void 0);return c.useAsyncEffect(async()=>{r(await e())},[e]),Xt({...t,onChange:r}),n},dc=Object.freeze(Object.defineProperty({__proto__:null,useListener:Xt,useState:xc},Symbol.toStringTag,{value:"Module"})),pc=({key:e,name:t,queryFn:n,values:r,openObservable:o,applyChanges:i,applyObservable:a,...u})=>{const x=ge(),m=c.useAggregator(),p=c.useMemoPrimitiveArray(e),g=xn({values:r,...u,sync:!1,onChange:E=>{x!=null&&(async()=>{try{await(i==null?void 0:i({...E,client:x}))}catch(R){m({variant:"error",message:`Failed to save ${t}`,description:R.message})}})()}});c.useAsyncEffect(async()=>{if(x!=null)try{const E=await n({client:x});g.set("",E)}catch(E){m({variant:"error",message:`Failed to retrieve ${t}`,description:E.message})}},[p,x==null?void 0:x.key]);const h=d.useCallback(async()=>{if(x!=null)return await(o==null?void 0:o(x))},[p,x==null?void 0:x.key]),f=d.useCallback(E=>a==null?void 0:a({changes:E,ctx:g}),[p,a]);return Xt({key:p,open:h,onChange:f}),g},mc=Object.freeze(Object.defineProperty({__proto__:null,Context:Kt,Field:se,Form:lc,NumericField:ht,SwitchField:Qt,TextField:mn,buildDropdownButtonSelectField:uc,buildNumericField:dn,buildSelectMultiField:ac,buildSelectSingleField:cc,buildSwitchField:jn,buildTextField:pn,fieldArrayUtils:un,fieldBuilder:Le,use:xn,useChildFieldValues:nc,useContext:we,useField:ve,useFieldArray:rc,useFieldListener:sc,useFieldState:an,useFieldValid:tc,useFieldValue:ec,useSynced:pc},Symbol.toStringTag,{value:"Module"})),jc=[{key:"name",name:"Name"},{key:"location",name:"Location"}],gc=({searchOptions:e,...t})=>{const n=ge();let r=n==null?void 0:n.hardware.devices;return e!=null&&n!=null&&(r=n.hardware.devices.newSearcherWithOptions(e)),s.jsxRuntimeExports.jsx(be,{columns:jc,searcher:r,entryRenderKey:"name",...t})},fc=Object.freeze(Object.defineProperty({__proto__:null,SelectSingle:gc},Symbol.toStringTag,{value:"Module"})),Me="label",Jt=[{key:"color",name:"Color",render:({entry:e})=>s.jsxRuntimeExports.jsx(c.Qt.Circle,{name:"circle",color:e.color,style:{height:"2.5rem",width:"2.5rem"}})},{key:"name",name:"Name"}],st=({items:e},t)=>{const n=c.filterByType(Me,e);return n.length>0&&!n.every(r=>t.includes(r.key))},hc=({entry:e,loading:t,entryKey:n,entryRenderKey:r,...o})=>s.jsxRuntimeExports.jsx(Ze,{color:e==null?void 0:e.color,...o,children:e==null?void 0:e.name}),Ec=c.componentRenderProp(hc),Sc=({onChange:e,className:t,value:n,...r})=>{const o=ge(),i=o!=null?void 0:s.jsxRuntimeExports.jsx(c.Text$2.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),{startDrag:a,onDragEnd:u,...x}=c.useDragAndDrop({type:"Label.SelectMultiple",canDrop:d.useCallback(h=>st(h,C.A(n)),[n]),onDrop:d.useCallback(({items:h})=>{const f=c.filterByType(Me,h);if(f.length===0)return[];const E=C.n([...C.A(n),...f.map(R=>R.key)]);return e(E,{clickedIndex:null,clicked:null,entries:[]}),f},[e,n])}),m=c.useDraggingState(),p=d.useCallback(({dropped:h})=>{e(C.A(n).filter(f=>!h.some(E=>E.key===f)),{clickedIndex:null,clicked:null,entries:[]})},[e,n]),g=d.useCallback((h,f)=>a([{key:f,type:Me}],p),[a,p]);return s.jsxRuntimeExports.jsx(_e,{className:l.CSS(t,l.CSS.dropRegion(st(m,C.A(n)))),value:n,onTagDragStart:g,onTagDragEnd:u,searcher:o==null?void 0:o.labels,onChange:e,columns:Jt,emptyContent:i,renderTag:Ec,addPlaceholder:"Label",...x,...r})},gn=({value:e,onChange:t})=>{const n=ge(),r=n!=null?void 0:s.jsxRuntimeExports.jsx(c.Text$2.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),o=d.useId(),i=d.useMemo(()=>({key:o,type:"Label.SelectMultiple"}),[o]),a=c.useDragAndDrop({type:"Label.SelectSingle",canDrop:d.useCallback(m=>st(m,C.o(e)),[e]),onDrop:d.useCallback(({items:m})=>{const p=c.filterByType(Me,m);return p.length===0?[]:(t(p[0].key,{clickedIndex:null,clicked:null,entries:[]}),p)},[i,t])}),u=c.useDraggingState(),x=d.useCallback(()=>e!=null&&a.startDrag([{type:Me,key:e}]),[a.startDrag,e]);return{emptyContent:r,dragging:u,...a,onDragStart:x,searcher:n==null?void 0:n.labels}},Rc=({onChange:e,value:t,className:n,data:r,...o})=>{const{dragging:i,...a}=gn({value:t,onChange:e});return s.jsxRuntimeExports.jsx(be,{data:r,className:l.CSS(n,l.CSS.dropRegion(st(i,C.o(t)))),value:t,onChange:e,columns:Jt,entryRenderKey:"name",...a,...o})},yc=({data:e,value:t,onChange:n,...r})=>{const{dragging:o,...i}=gn({value:t,onChange:n});return s.jsxRuntimeExports.jsx(be,{data:e,value:t,onChange:n,columns:Jt,entryRenderKey:"name",...i,...r})},Cc=Object.freeze(Object.defineProperty({__proto__:null,HAUL_TYPE:Me,SelectButton:yc,SelectMultiple:Sc,SelectSingle:Rc},Symbol.toStringTag,{value:"Module"})),fn=({children:e,centered:t,visible:n,enabled:r=!0,close:o,style:i,...a})=>{const u=d.useRef(null),x=d.useRef(n);c.useClickOutside({ref:u,exclude:p=>c.findParent(p.target,h=>h.getAttribute("role")==="dialog")!=null,onClickOutside:o});const m=d.useCallback(p=>{var h;if(!x.current||p.stage!=="start")return;const g=(h=u.current)==null?void 0:h.querySelectorAll(`.${l.CSS.visible(!0)}`);g&&g.length>0||o()},[o]);return c.use$1({triggers:[["Escape"]],callback:m,loose:!0}),s.jsxRuntimeExports.jsx(D.Space,{className:l.CSS(l.CSS.BE("modal","bg"),l.CSS.visible(n),r&&l.CSS.M("enabled-modal")),empty:!0,align:"center",children:s.jsxRuntimeExports.jsx(D.Space,{className:l.CSS(l.CSS.BE("modal","dialog"),t&&l.CSS.M("centered")),role:"dialog",empty:!0,ref:u,...a,style:{zIndex:r?11:void 0,...i},children:s.jsxRuntimeExports.jsx(D.Space,{className:l.CSS(l.CSS.BE("modal","content")),empty:!0,children:e})})})},bc=({root:e,...t})=>At.createPortal(s.jsxRuntimeExports.jsx(fn,{...t}),c.getRootElement(e)),vc=Object.freeze(Object.defineProperty({__proto__:null,Dialog:fn,Modal:bc},Symbol.toStringTag,{value:"Module"})),Et=new Error("Tab not found"),wc=new Error("Invalid Mosaic"),nt=(e,t,n="center",r)=>{var g;if(e=Re(e),r===void 0)return Tt(e,t);const o=Mt(e,r);if(n==="center")return(g=o.tabs)==null||g.push(t),o.selected=t.tabKey,e;const i=o.key*2,a=o.key*2+1,u=n==="top"||n==="left"?i:a;if(Mt(e,u).key!==o.key)return nt(e,t,"center",u);if(o.tabs==null||o.tabs.length===0)return nt(e,t,"center",r);const[x,m,p]=$c(n);if(o.direction=p,o[x]={key:0,tabs:[t],selected:t.tabKey},o[m]={key:0,tabs:o.tabs,selected:o.selected},o.first==null||o.last==null)throw wc;return o.first.key=i,o.last.key=a,o.tabs=void 0,o.size=void 0,o.selected=void 0,e},Pc=(e,t,n)=>{var i;e=Re(e);const[r,o]=Pe(e,t);if(r==null||o==null)throw Et;return o.tabs=(i=o.tabs)==null?void 0:i.map(a=>a.tabKey===t?n(a):a),e},Tt=(e,t)=>(e=Re(e),e.tabs!=null?(e.tabs.push(t),e.selected=t.tabKey,e):(e.first!=null?e.first=Tt(e.first,t):e.last!=null&&(e.last=Tt(e.last,t)),e)),rt=e=>{e=Re(e);const t=[];if(e.tabs!=null&&(e.selected=ne.resetSelection(e.selected,e.tabs),e.selected!=null&&t.push(e.selected)),e.first!=null){const[n,r]=rt(e.first);e.first=n,t.push(...r)}if(e.last!=null){const[n,r]=rt(e.last);e.last=n,t.push(...r)}return[e,t]},es=(e,t)=>{var o;e=Re(e);const[,n]=Pe(e,t);if(n==null)return[e,null];n.tabs=(o=n.tabs)==null?void 0:o.filter(i=>i.tabKey!==t),n.selected=ne.resetSelection(n.selected,n.tabs),e=Mc(e);const r=n.selected??ot(e);return[e,r]},ot=e=>e.selected!=null?e.selected:e.first!=null?ot(e.first):e.last!=null?ot(e.last):null,hn=(e,t)=>{e=Re(e);const[n,r]=Pe(e,t);if(n==null||r==null)throw Et;return r.selected=t,e},En=(e,t,n,r)=>{e=Re(e);const[o,i]=Pe(e,t);if(o==null||i==null)throw Et;const[a,u]=es(e,t);return[nt(a,o,n,r),u]},Fe=(e,t)=>{if(e.tabs!=null)return e.tabs.some(n=>n.tabKey===t)?e:void 0;if(e.first!=null){const n=Fe(e.first,t);if(n!=null)return n}if(e.last!=null){const n=Fe(e.last,t);if(n!=null)return n}},Sn=(e,t,n)=>{const r=lt(e,t);if(r==null)throw new Error("Node not found");return r.size=n,e},kc=(e,t,n)=>{e=Re(e);const r=Fe(e,t);if(r==null)throw new Error("Tab not found");if(r.tabs==null||r.tabs.length===0)throw new Error("Node has no tabs");const o=r.tabs.findIndex(p=>p.tabKey===t);if(o===-1)throw new Error("Tab not found in node");const i=r.tabs[o];r.tabs=r.tabs.filter(p=>p.tabKey!==t);const a=r.key*2,x={key:r.key*2+1,tabs:[i],selected:i.tabKey},m={key:a,tabs:r.tabs,selected:r.selected};return m.selected=ne.resetSelection(m.selected,m.tabs),r.direction=n,r.first=m,r.last=x,r.tabs=void 0,r.selected=void 0,e},Lc=(e,t)=>{const n=Fe(e,t);return n==null?!1:n.tabs!=null&&n.tabs.length>1},Rn=(e,t,n)=>{e=Re(e);const[,r]=Pe(e,t);if((r==null?void 0:r.tabs)==null)throw Et;return r.tabs=ne.rename(t,n,(r==null?void 0:r.tabs)??[]),e},Tc=e=>e.tabs!=null?e.tabs.length===0:e.first==null&&e.last==null,Mt=(e,t)=>{const n=lt(e,t);if(n!=null)return n;const r=Math.floor(t/2);return r===0?e:Mt(e,r)},Mc=e=>{let t=!0;for(;t;)[e,t]=$t(e);return e.first==null&&e.last==null&&(e.key=1),e},$t=e=>{if(e.first==null||e.last==null)return[e,!1];if(Es(e.first))return[hs(e.last,!0),!0];if(Es(e.last))return[hs(e.first,!1),!0];let[t,n]=[!1,!1];return[e.first,t]=$t(e.first),[e.last,n]=$t(e.last),[e,t||n]},hs=(e,t)=>(e.size=void 0,e.key=(e.key-Number(t))/2,e),Es=e=>e.first==null&&e.last==null&&(e.tabs==null||e.tabs.length===0),Pe=(e,t)=>{if(e.tabs!=null){const a=e.tabs.find(u=>u.tabKey===t);if(a!=null)return[a,e]}if(e.first==null||e.last==null)return[void 0,void 0];const[n,r]=Pe(e.first,t);if(n!=null&&r!=null)return[n,r];const[o,i]=Pe(e.last,t);return[o,i]},lt=(e,t)=>{if(e.key===t)return e;if(e.first==null||e.last==null)return;const n=lt(e.first,t);return n??lt(e.last,t)},$c=e=>{switch(e){case"top":return["first","last","y"];case"left":return["first","last","x"];case"bottom":return["last","first","y"];case"right":return["last","first","x"];case"center":throw new Error("cannot split a center placed tab")}},Re=e=>C._.copy(e),it=(e,t,n=[])=>(n.push(t(e)),e.first!=null&&it(e.first,t,n),e.last!=null&&it(e.last,t,n),n),Nt=(e,t)=>{t(e),e.first!=null&&Nt(e.first,t),e.last!=null&&Nt(e.last,t)};class yn{constructor(t={}){he(this,"parent");he(this,"stub");he(this,"el");this.el=document.createElement("div"),Object.entries(t).forEach(([n,r])=>this.el.setAttribute(n,r))}mount(t,n){n!==this.stub&&(this.unmount(null),t.replaceChild(this.el,n),this.parent=t,this.stub=n)}unmount(t){t!=null&&t!==this.stub||this.parent==null||this.stub==null||(this.parent.replaceChild(this.stub,this.el),this.parent=void 0,this.stub=void 0)}}const Nc=({node:e})=>{const t=d.createRef(),n=d.useRef(e);return d.useEffect(()=>{const r=t.current;if(r==null)return;const o=r.parentNode;if(o!=null)return e.mount(o,r),()=>{t.current!=null&&e.unmount(t.current)}},[]),d.useEffect(()=>{n.current!=null&&e!==n.current&&(n.current.unmount(t.current),n.current=e);const r=t.current;if(r==null)return;const o=r.parentNode;o!=null&&e.mount(o,r)},[e]),s.jsxRuntimeExports.jsx("div",{ref:t})},Cn=({node:e,children:t})=>At.createPortal(t,e.el),_c=Object.freeze(Object.defineProperty({__proto__:null,In:Cn,Node:yn,Out:Nc},Symbol.toStringTag,{value:"Module"})),ct=d.memo(e=>{const{onResize:t,...n}=e,{root:{tabs:r,direction:o,first:i,last:a,key:u,size:x},emptyContent:m,...p}=n,g=d.useCallback(([E])=>t(u,E),[t]),{props:h}=Ot({direction:o,onResize:g,count:2,initialSizes:x!=null?[x]:void 0});let f;return r!==void 0?f=s.jsxRuntimeExports.jsx(bn,{emptyContent:m,...n}):i!=null&&a!=null?f=s.jsxRuntimeExports.jsxs(dt,{id:`mosaic-${u}`,align:"stretch",className:l.CSS.BE("mosaic","resize"),...h,children:[s.jsxRuntimeExports.jsx(ct,{...p,root:i,onResize:t},i.key),s.jsxRuntimeExports.jsx(ct,{...p,root:a,onResize:t},a.key)]}):(f=null,console.warn("Mosaic tree is malformed")),u===1?s.jsxRuntimeExports.jsx(c.Provider$2,{children:f}):f});ct.displayName="Mosaic";const at="pluto-mosaic-tab-drop",ts="pluto-mosaic-tab-create",Bc=(e,t,n)=>{if(c.filterByType(c.FILE_TYPE,t).length>0&&n)return!0;const o=c.filterByType(at,t).map(u=>u.key),i=e.filter(u=>!o.includes(u.tabKey)).length>0;return c.filterByType(ts,t).length>0||o.length>0&&(i||e.length===0)},bn=d.memo(({root:e,onDrop:t,onCreate:n,activeTab:r,children:o,onFileDrop:i,...a})=>{const{key:u,tabs:x}=e,[m,p]=d.useState(null),g=i!=null,h=d.useCallback(({items:S})=>Bc(x,S,g),[x,g]),f=d.useCallback(({items:S,event:v})=>{if(v==null)return[];p(null);const B=c.filterByType(c.FILE_TYPE,S).length>0,L=x.length===0?"center":Rs(Ss(v));if(B)return i==null||i(u,L,v),S;const N=c.filterByType(at,S);if(N.length>0){const w=N.map(({key:y})=>y)[0];t(u,w,L)}const A=c.filterByType(ts,S);if(A.length>0){const w=A.map(({key:y})=>y);n==null||n(u,L,w)}return N},[t,x.length]),E=d.useCallback(({event:S})=>{if(S==null)return;const v=x.length===0?"center":Rs(Ss(S));p(v)},[x.length]),{startDrag:R,...k}=c.useDragAndDrop({type:"Mosaic",canDrop:h,onDrop:f,onDragOver:E}),T=h(c.useDraggingState()),M=d.useCallback(()=>p(null),[]),$=d.useCallback((S,{tabKey:v})=>{R([{key:v,type:at,elementID:S.currentTarget.id}])},[R]),P=d.useCallback(()=>n==null?void 0:n(u,"center"),[u]);return s.jsxRuntimeExports.jsxs("div",{id:`mosaic-${u}`,className:l.CSS.BE("mosaic","leaf"),children:[s.jsxRuntimeExports.jsxs(ne.Tabs,{id:`tab-${u}`,tabs:x,onDragLeave:M,selected:e.selected,selectedAltColor:r===e.selected,onDragStart:$,onCreate:P,...a,...k,children:[e.selected!=null&&o(x.find(S=>S.tabKey===e.selected)),T&&s.jsxRuntimeExports.jsx("div",{style:{zIndex:1e3,position:"absolute",top:0,left:0,width:"100%",height:"100%"}})]}),m!=null&&s.jsxRuntimeExports.jsx("div",{className:l.CSS.BE("mosaic","mask"),style:Ac[m]})]})});bn.displayName="MosaicTabLeaf";const Ac={top:{left:"0%",top:"0%",width:"100%",height:"50%"},bottom:{left:"0%",top:"50%",width:"100%",height:"50%"},left:{left:"0%",top:"0%",width:"50%",height:"100%"},right:{left:"50%",top:"0%",width:"50%",height:"100%"},center:{left:"0%",top:"0%",width:"100%",height:"100%"}},Ss=e=>{const t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;return r<24?{px:.5,py:.5}:{px:n/t.width,py:r/t.height}},Oc=e=>e,zc=e=>1-e,Rs=({px:e,py:t})=>{if(e>.33&&e<.66&&t>.33&&t<.66)return"center";const[n,r]=[Oc(e),zc(e)];if(t>n&&t>r)return"bottom";if(t<n&&t<r)return"top";if(t>n&&t<r)return"left";if(t<n&&t>r)return"right";throw new Error("[bug] - invalid insert position")},Dc=({root:e,onSelect:t,children:n})=>{const r=d.useRef(new Map),o=new Set,i=it(e,a=>{var u;return(u=a.tabs)==null?void 0:u.map(x=>{let m=r.current.get(x.tabKey);return x==null?null:(m==null&&(m=new yn({style:"width: 100%; height: 100%; position: relative;"}),m.el.addEventListener("click",()=>t==null?void 0:t(x.tabKey)),r.current.set(x.tabKey,m)),o.add(x.tabKey),s.jsxRuntimeExports.jsx(Cn,{node:m,children:n({...x,visible:x.tabKey===a.selected})},x.tabKey))})}).flat().filter(a=>a!=null);return r.current.forEach((a,u)=>!o.has(u)&&r.current.delete(u)),[r,i]},Vc=pe.z.object({key:pe.z.number(),tabs:pe.z.array(ne.tabZ).optional(),selected:pe.z.string().optional(),direction:l.g.direction.optional(),size:pe.z.number().optional()}),_t=Vc.extend({first:pe.z.lazy(()=>_t).optional(),last:pe.z.lazy(()=>_t).optional()}),Ic=({allowRename:e=!1,initialTree:t})=>{const[n,r]=d.useState(t);return d.useEffect(()=>r(rt(t)[0]),[t]),{root:n,onDrop:(m,p,g)=>r(h=>En(h,p,g,m)[0]),onClose:m=>r(p=>es(p,m)[0]),onSelect:m=>r(p=>hn(p,m)),onResize:(m,p)=>r(g=>Sn(g,m,p)),onRename:e?(m,p)=>r(g=>Rn(g,m,p)):void 0}},Zc=Object.freeze(Object.defineProperty({__proto__:null,HAUL_CREATE_TYPE:ts,HAUL_DROP_TYPE:at,Mosaic:ct,autoSelectTabs:rt,canSplit:Lc,findSelected:ot,findTabNode:Fe,forEachNode:Nt,insertTab:nt,isEmpty:Tc,mapNodes:it,moveTab:En,nodeZ:_t,removeTab:es,renameTab:Rn,resizeNode:Sn,selectTab:hn,split:kc,updateTab:Pc,use:Ic,usePortal:Dc},Symbol.toStringTag,{value:"Module"})),Fc=({location:e="left",size:t="9rem",className:n,style:r,...o})=>{const i=l.J.construct(e),a=l.J.direction(i),u=l.g.swap(a);return s.jsxRuntimeExports.jsx(D.Space,{className:l.CSS(l.CSS.B("navbar"),l.CSS.bordered(l.J.swap(i)),l.CSS.dir(u),l.CSS.loc(i),n),direction:u,style:{[l.g.dimension(a)]:t,...r},align:"center",empty:!0,...o})},Ye=e=>({bordered:t=!1,className:n,...r})=>s.jsxRuntimeExports.jsx(D.Space,{className:l.CSS(l.CSS.BE("navbar","content"),e==="absolute-center"?l.CSS.M(e):l.CSS.align(e),e!==""&&t&&l.CSS.bordered(e),n),align:"center",...r}),vn=Ye("start");vn.displayName="NavbarStart";const wn=Ye("end");wn.displayName="NavbarEnd";const Pn=Ye("center");Pn.displayName="NavbarCenter";const kn=Ye("");kn.displayName="NavbarContent";const Ln=Ye("absolute-center");Ln.displayName="NavbarAbsoluteCenter";const Be=Fc;Be.Start=vn;Be.Center=Pn;Be.End=wn;Be.AbsoluteCenter=Ln;Be.Content=kn;const ss=({aetherKey:e})=>{const[,{region:t},n]=c.use$3({aetherKey:e,type:j.Eraser$1.TYPE,schema:j.eraserStateZ,initialState:{region:l.Eo.ZERO,enabled:!0}}),r=c.useSyncedRef(t),o=d.useCallback(a=>{l.Eo.equals(a,r.current)||n(u=>({...u,region:a}))},[n]);return{setEnabled:d.useCallback(a=>n(u=>({...u,enabled:a})),[n]),erase:o}},qc=c.wrap$1(j.Eraser$1.TYPE,({aetherKey:e,children:t})=>{const{erase:n}=ss({aetherKey:e}),r=c.useResize(n);return s.jsxRuntimeExports.jsx("div",{ref:r,className:l.CSS(l.CSS.inheritDims()),children:t})}),Hc=Object.freeze(Object.defineProperty({__proto__:null,Eraser:qc,use:ss},Symbol.toStringTag,{value:"Module"})),Yc=({items:e,initialKey:t})=>{const[n,r]=d.useState(t),o=a=>r(a===n?void 0:a),i=e.find(a=>a.key===n);return{onSelect:o,activeItem:i}},Uc=c.wrap$1("Nav.Drawer",({aetherKey:e,activeItem:t,children:n,onSelect:r,location:o="left",collapseThreshold:i=.65,className:a,onResize:u,...x})=>{const m=l.J.direction(o),p=d.useCallback(()=>t!=null&&(r==null?void 0:r(t.key)),[r,t==null?void 0:t.key]),{erase:g,setEnabled:h}=ss({aetherKey:e}),f=d.useCallback((T,M)=>{u==null||u(T,M),g(M)},[u,g]);if(d.useLayoutEffect(()=>{h(t!=null)},[t,h]),t==null)return null;const{content:E,key:R,...k}=t;return s.jsxRuntimeExports.jsx(ks,{className:l.CSS(l.CSS.BE("navdrawer","content"),l.CSS.dir(m),a),collapseThreshold:i,onCollapse:p,location:o,onResize:f,...k,...x,children:t.content},R)}),Gc=Object.freeze(Object.defineProperty({__proto__:null,Bar:Be,Drawer:Uc,useDrawer:Yc},Symbol.toStringTag,{value:"Module"})),Wc=({variant:e,className:t,children:n,...r})=>s.jsxRuntimeExports.jsx(D.Space,{className:l.CSS(t,l.CSS.B("note"),l.CSS.M(e)),align:"stretch",empty:!0,...r,children:n}),Kc=Object.freeze(Object.defineProperty({__proto__:null,Note:Wc},Symbol.toStringTag,{value:"Module"})),vt={Close:s.jsxRuntimeExports.jsxs("svg",{width:"124",height:"124",viewBox:"0 0 124 124",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsxRuntimeExports.jsx("rect",{x:"26.8701",y:"88.3883",width:"87",height:"11",transform:"rotate(-45 26.8701 88.3883)",fill:"#7E0508"}),s.jsxRuntimeExports.jsx("rect",{x:"26.8701",y:"34.6482",width:"11",height:"87",transform:"rotate(-45 26.8701 34.6482)",fill:"#7E0508"})]}),Minimize:s.jsxRuntimeExports.jsx("svg",{width:"87",height:"11",viewBox:"0 0 87 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsxRuntimeExports.jsx("rect",{x:"15",width:"60",height:"11",fill:"#985712"})}),Maximize:s.jsxRuntimeExports.jsxs("svg",{width:"143",height:"143",viewBox:"0 0 143 143",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsxRuntimeExports.jsx("path",{d:"M108.242 32.8833C108.797 32.8817 109.247 33.3317 109.245 33.8862L109.092 87.5891C109.09 88.4786 108.014 88.9223 107.385 88.2933L53.8351 34.7432C53.2061 34.1142 53.6499 33.0387 54.5394 33.0361L108.242 32.8833Z",fill:"#0B650D"}),s.jsxRuntimeExports.jsx("path",{d:"M33.8862 109.245C33.3317 109.247 32.8818 108.797 32.8833 108.242L33.0361 54.5394C33.0387 53.6499 34.1142 53.2061 34.7432 53.8351L88.2934 107.385C88.9223 108.014 88.4786 109.09 87.5891 109.092L33.8862 109.245Z",fill:"#0B650D"})]})},Qc=({disabled:e=[],className:t,focused:n=!0,onMinimize:r,onMaximize:o,onFullscreen:i,onClose:a,...u})=>s.jsxRuntimeExports.jsxs(D.Space,{size:1.5,direction:"x",className:l.CSS(l.CSS.B("macos-controls"),!n&&l.CSS.BM("macos-controls","blurred"),t),...u,children:[s.jsxRuntimeExports.jsx(wt,{onClick:a,className:l.CSS.BM("macos-control","close"),disabled:e.includes("close"),children:vt.Close}),s.jsxRuntimeExports.jsx(wt,{onClick:r,className:l.CSS.BM("macos-control","minimize"),disabled:e.includes("minimize"),children:vt.Minimize}),s.jsxRuntimeExports.jsx(wt,{onClick:i,className:l.CSS.BM("macos-control","maximize"),disabled:e.includes("maximize"),children:vt.Maximize})]}),wt=({className:e,disabled:t,color:n,...r})=>s.jsxRuntimeExports.jsx("button",{className:l.CSS(l.CSS.B("macos-control"),l.CSS.disabled(t),e),tabIndex:-1,disabled:t,size:"",...r}),Pt=({disabled:e=[],onMinimize:t,onMaximize:n,onClose:r,onFullscreen:o,focused:i,...a})=>s.jsxRuntimeExports.jsxs(D.Pack,{...a,children:[s.jsxRuntimeExports.jsx(kt,{className:l.CSS.BM("windows-control","minimize"),onClick:t,disabled:e.includes("minimize"),children:s.jsxRuntimeExports.jsx(c.Qt.Subtract,{})}),s.jsxRuntimeExports.jsx(kt,{className:l.CSS.BM("windows-control","maximize"),onClick:n,disabled:e.includes("maximize"),children:s.jsxRuntimeExports.jsx(c.Qt.Box,{})}),s.jsxRuntimeExports.jsx(kt,{onClick:r,className:l.CSS.BM("windows-control","close"),disabled:e.includes("close"),children:s.jsxRuntimeExports.jsx(c.Qt.Close,{})})]}),kt=({disabled:e=!1,className:t,...n})=>e?null:s.jsxRuntimeExports.jsx(c.Icon,{className:l.CSS(l.CSS.B("windows-control"),t),tabIndex:-1,...n}),Tn=e=>C.w.getOS(e),Xc={MacOS:Qc,Windows:Pt,Linux:Pt,Docker:Pt},Jc="Windows",ea=({forceOS:e,visibleIfOS:t,...n})=>{const r=Tn({force:e,default:Jc}),o=Xc[r];return t!=null&&t!==r?null:s.jsxRuntimeExports.jsx(o,{...n})},ta=Object.freeze(Object.defineProperty({__proto__:null,Controls:ea,use:Tn},Symbol.toStringTag,{value:"Module"})),sa=(e,t)=>{const n=r=>s.jsxRuntimeExports.jsx(e,{...t,...r});return n.displayName=e.displayName,n},na=Object.freeze(Object.defineProperty({__proto__:null,createComponent:sa},Symbol.toStringTag,{value:"Module"}));d.createContext({instrumentation:C.B.NOOP});const ra=c.wrap$1(j.Provider$2.TYPE,({aetherKey:e,children:t,...n})=>{const r=c.useMemoDeepEqualProps(n),[{path:o},,i]=c.use$3({aetherKey:e,type:j.Provider$2.TYPE,schema:j.providerStateZ$1,initialState:r});return d.useEffect(()=>{i(r)},[r,i]),s.jsxRuntimeExports.jsx(c.Composite,{path:o,children:t})}),oa="data:video/mp2t;base64,Ly8gQ29weXJpZ2h0IDIwMjQgU3lubmF4IExhYnMsIEluYy4KLy8KLy8gVXNlIG9mIHRoaXMgc29mdHdhcmUgaXMgZ292ZXJuZWQgYnkgdGhlIEJ1c2luZXNzIFNvdXJjZSBMaWNlbnNlIGluY2x1ZGVkIGluIHRoZSBmaWxlCi8vIGxpY2Vuc2VzL0JTTC50eHQuCi8vCi8vIEFzIG9mIHRoZSBDaGFuZ2UgRGF0ZSBzcGVjaWZpZWQgaW4gdGhhdCBmaWxlLCBpbiBhY2NvcmRhbmNlIHdpdGggdGhlIEJ1c2luZXNzIFNvdXJjZQovLyBMaWNlbnNlLCB1c2Ugb2YgdGhpcyBzb2Z0d2FyZSB3aWxsIGJlIGdvdmVybmVkIGJ5IHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAsCi8vIGluY2x1ZGVkIGluIHRoZSBmaWxlIGxpY2Vuc2VzL0FQTC50eHQuCgppbXBvcnQgeyBwbHV0byB9IGZyb20gIkAvcGx1dG8vYWV0aGVyIjsKCnBsdXRvLnJlbmRlcigpOwo=",Mn=c.wrap$1(j.BaseProvider.TYPE,({children:e,aetherKey:t})=>{const[{path:n}]=c.use$3({aetherKey:t,type:j.BaseProvider.TYPE,schema:j.providerStateZ$2,initialState:{}});return s.jsxRuntimeExports.jsx(c.Composite,{path:n,children:e})}),la=Object.freeze(Object.defineProperty({__proto__:null,Provider:Mn},Symbol.toStringTag,{value:"Module"})),ia=e=>{var t,n;switch(e.variant){case"disabled":return((t=e.data)==null?void 0:t.valid)===!0?{message:"Uncontrolled. Click to take control.",chipColor:"var(--pluto-gray-l10)"}:{message:"No channel connected. This element cannot be controlled.",chipColor:"var(--pluto-gray-l5)",disabled:!0};case"error":return{message:"Not controlled by you. Click to take absolute control.",chipColor:"var(--pluto-error-z)"};case"success":return((n=e.data)==null?void 0:n.authority)===C.Og.Authority.Absolute.valueOf()?{message:"You have absolute control. Click to release.",chipColor:"var(--pluto-secondary-z)",buttonStyle:{background:"var(--pluto-secondary-z-30)"}}:{message:"You're in control. Release P&ID to release control.",chipColor:"var(--pluto-primary-z)"};default:return{message:"Unexpected status.",chipColor:"var(--pluto-error-z)"}}},$n=c.wrap$1("Chip",({aetherKey:e,source:t,sink:n,className:r,...o})=>{const i=c.useMemoDeepEqualProps({source:t,sink:n}),[,{status:a},u]=c.use$3({aetherKey:e,type:j.Chip.TYPE,schema:j.chipStateZ,initialState:{triggered:!1,...i,status:{key:"no_chip",variant:"disabled",message:"No chip connected.",time:C.m.now()}}});d.useEffect(()=>{u(f=>({...f,...i}))},[i,u]);const x=d.useCallback(()=>u(f=>({...f,triggered:!f.triggered})),[u]),{message:m,chipColor:p,buttonStyle:g,disabled:h}=ia(a);return s.jsxRuntimeExports.jsx(c.Icon,{variant:"text",className:l.CSS(l.CSS.B("control-chip"),r),disabled:h,onClick:x,tooltip:s.jsxRuntimeExports.jsx(c.Text,{level:"small",children:m}),style:g,...o,children:s.jsxRuntimeExports.jsx(c.Qt.Circle,{color:p})})}),Nn=d.createContext({needsControlOf:[]}),_n=()=>d.useContext(Nn),ca=c.wrap$1(j.Controller$1.TYPE,({aetherKey:e,children:t,onStatusChange:n,...r})=>{const o=c.useMemoDeepEqualProps(r),[{path:i},{status:a,needsControlOf:u},x]=c.use$3({aetherKey:e,type:j.Controller$1.TYPE,schema:j.controllerStateZ,initialState:o});return d.useEffect(()=>{a!=null&&(n==null||n(a))},[a,n]),d.useEffect(()=>{x(m=>({...m,...o}))},[o,x]),d.useEffect(()=>()=>n==null?void 0:n("released"),[]),s.jsxRuntimeExports.jsxs(Nn.Provider,{value:{needsControlOf:u},children:[s.jsxRuntimeExports.jsx(c.Composite,{path:i,children:t}),";"]})}),Bn=c.wrap$1(j.Indicator.TYPE,({aetherKey:e,colorSource:t,statusSource:n})=>{var x;const r=c.useMemoDeepEqualProps({colorSource:t,statusSource:n}),[,{color:o,status:i},a]=c.use$3({aetherKey:e,type:j.Indicator.TYPE,initialState:{...r,status:{key:"no_chip",variant:"warning",message:"No chip connected.",time:C.m.now()}},schema:j.indicatorStateZ});d.useEffect(()=>{a(m=>({...m,...r}))},[r,a]);let u;return((x=i.data)==null?void 0:x.color)!=null?u=l.Color.z.parse(i.data.color):o!=null&&!o.isZero?u=o:u="var(--pluto-gray-l8)",s.jsxRuntimeExports.jsxs(c.Dialog$1,{location:{x:"center",y:"bottom"},children:[s.jsxRuntimeExports.jsx(c.Text,{level:"p",children:i.message}),s.jsxRuntimeExports.jsx("div",{className:l.CSS.B("indicator"),style:{backgroundColor:l.cssString(u),flexGrow:1}})]})}),aa=c.wrap$1(j.Legend.TYPE,({aetherKey:e,...t})=>{const{needsControlOf:n}=_n(),[,{states:r},o]=c.use$3({aetherKey:e,type:j.Legend.TYPE,schema:j.legendStateZ,initialState:{states:[],needsControlOf:n}});d.useEffect(()=>{o(u=>({...u,needsControlOf:n}))},[n]);const a=C.n(r.map(u=>u.subject.key)).map(u=>{const x=r.find(m=>m.subject.key===u);if(x==null)throw new C.Ce("Legend subject not found");return{key:x.subject.key,label:x.subject.name,color:x.subjectColor}});return s.jsxRuntimeExports.jsx(Ft,{data:a,...t})}),An=c.wrap$1(j.StateProvider.TYPE,({aetherKey:e,children:t})=>{const[{path:n}]=c.use$3({aetherKey:e,type:j.StateProvider.TYPE,schema:j.stateProviderStateZ,initialState:{}});return s.jsxRuntimeExports.jsx(c.Composite,{path:n,children:t})}),ua=Object.freeze(Object.defineProperty({__proto__:null,Chip:$n,Controller:ca,Indicator:Bn,Legend:aa,StateProvider:An,useContext:_n},Symbol.toStringTag,{value:"Module"})),On=e=>{const t=({disabled:n=!1,...r})=>n?r.children:s.jsxRuntimeExports.jsx(e,{...r});return t.displayName=e.displayName,t},xa=On(Mn),da=On(c.Provider$3),pa=({children:e,connParams:t,workerEnabled:n=!0,workerURL:r,theming:o,tooltip:i,triggers:a,alamos:u,haul:x,channelAlias:m,telem:p})=>s.jsxRuntimeExports.jsx(c.Provider$1,{...a,children:s.jsxRuntimeExports.jsx(c.Config,{...i,children:s.jsxRuntimeExports.jsx(c.Provider$2,{...x,children:s.jsxRuntimeExports.jsx(c.Provider$4,{url:r??oa,enabled:n,children:s.jsxRuntimeExports.jsx(da,{workerKey:"vis",children:s.jsxRuntimeExports.jsx(ra,{...u,children:s.jsxRuntimeExports.jsx(c.Aggregator,{children:s.jsxRuntimeExports.jsx(Ms,{connParams:t,children:s.jsxRuntimeExports.jsx(_s,{...m,children:s.jsxRuntimeExports.jsx(xa,{...p,children:s.jsxRuntimeExports.jsx(c.Provider,{...o,children:s.jsxRuntimeExports.jsx(An,{children:e})})})})})})})})})})})}),ma=Object.freeze(Object.defineProperty({__proto__:null,Provider:pa},Symbol.toStringTag,{value:"Module"})),ja=({value:e})=>s.jsxRuntimeExports.jsx("div",{className:l.CSS.B("progress"),children:s.jsxRuntimeExports.jsx("div",{className:l.CSS.B("progress-bar"),style:{width:`${e}%`}})}),ga=Object.freeze(Object.defineProperty({__proto__:null,Progress:ja},Symbol.toStringTag,{value:"Module"})),qe="range",ns=[{key:"name",name:"Name"}],ut=({items:e},t)=>{const n=c.filterByType(qe,e);return n.length>0&&!n.every(r=>t.includes(r.key))},fa=({onChange:e,className:t,value:n,...r})=>{const o=ge(),i=o!=null?void 0:s.jsxRuntimeExports.jsx(c.Text$2.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),{startDrag:a,onDragEnd:u,...x}=c.useDragAndDrop({type:"Ranger.SelectMultiple",canDrop:d.useCallback(h=>ut(h,C.A(n)),[n]),onDrop:d.useCallback(({items:h})=>{const f=c.filterByType(qe,h);if(f.length===0)return[];const E=C.n([...C.A(n),...f.map(R=>R.key)]);return e(E,{clickedIndex:null,clicked:null,entries:[]}),f},[e,n])}),m=c.useDraggingState(),p=d.useCallback(({dropped:h})=>{e(C.A(n).filter(f=>!h.some(E=>E.key===f)),{clickedIndex:null,clicked:null,entries:[]})},[e,n]),g=d.useCallback((h,f)=>a([{key:f,type:qe}],p),[a,p]);return s.jsxRuntimeExports.jsx(_e,{className:l.CSS(t,l.CSS.dropRegion(ut(m,C.A(n)))),value:n,onTagDragStart:g,onTagDragEnd:u,searcher:o==null?void 0:o.ranges,onChange:e,columns:ns,emptyContent:i,entryRenderKey:"name",...x,...r})},zn=({value:e,onChange:t})=>{const n=ge(),r=n!=null?void 0:s.jsxRuntimeExports.jsx(c.Text$2.Centered,{variant:"error",level:"h4",style:{height:150},children:"No client available"}),o=d.useId(),i=d.useMemo(()=>({key:o,type:"Ranger.SelectMultiple"}),[o]),{startDrag:a,...u}=c.useDragAndDrop({type:"Ranger.SelectSingle",canDrop:d.useCallback(p=>ut(p,C.o(e)),[e]),onDrop:d.useCallback(({items:p})=>{const g=c.filterByType(qe,p);return g.length===0?[]:(t(g[0].key,{clickedIndex:null,clicked:null,entries:[]}),g)},[i,t])}),x=c.useDraggingState(),m=d.useCallback(()=>e!=null&&a([{type:qe,key:e}]),[a,e]);return{emptyContent:r,dragging:x,...u,onDragStart:m,searcher:n==null?void 0:n.ranges}},ha=({onChange:e,value:t,className:n,data:r,...o})=>{const{dragging:i,...a}=zn({value:t,onChange:e});return s.jsxRuntimeExports.jsx(be,{data:r,className:l.CSS(n,l.CSS.dropRegion(ut(i,C.o(t)))),value:t,onChange:e,columns:ns,entryRenderKey:"name",...a,...o})},Ea=({data:e,value:t,onChange:n,...r})=>{const{dragging:o,...i}=zn({value:t,onChange:n});return s.jsxRuntimeExports.jsx(be,{data:e,value:t,onChange:n,columns:ns,entryRenderKey:"name",...i,...r})},Sa=[{key:"color",name:"Color",width:50,render:e=>s.jsxRuntimeExports.jsx(c.Qt.Circle,{style:{fontSize:10,marginLeft:10,marginRight:30},color:e.entry.color})},{key:"name",name:"Name"}],Ra=e=>{const t=ge();return s.jsxRuntimeExports.jsx(_e,{...e,searcher:t==null?void 0:t.labels,columns:Sa,renderTag:n=>n.entry==null?s.jsxRuntimeExports.jsx(Ze,{color:"gray",children:n.entryKey}):s.jsxRuntimeExports.jsx(Ze,{color:n.entry.color,children:n.entry.name})})},ya=({timeRange:e,level:t="p",shade:n=7,showSpan:r=!1,...o})=>{const i=new C.m(e.start),a=i.isToday?"time":"dateTime",u=new C.m(e.end),x=u.equals(C.m.MAX),m=u.span(i)<C.y.DAY?"time":"dateTime",p=i.span(u);return s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",size:"small",className:l.CSS(l.CSS.B("time-range-chip")),align:"center",...o,children:[i.isToday&&s.jsxRuntimeExports.jsx(c.Text,{level:t,shade:n,weight:450,children:"Today"}),s.jsxRuntimeExports.jsx(c.DateTime,{level:t,displayTZ:"local",format:a,shade:n,weight:450,children:i}),s.jsxRuntimeExports.jsx(c.Qt.Arrow.Right,{color:"var(--pluto-text-color)"}),x?s.jsxRuntimeExports.jsx(c.Text,{level:t,children:"Now"}):s.jsxRuntimeExports.jsx(c.DateTime,{level:t,displayTZ:"local",format:m,shade:n,weight:450,children:u}),!p.isZero&&r&&s.jsxRuntimeExports.jsxs(c.Text,{level:t,shade:n,weight:450,children:["(",i.span(u).truncate(C.y.MILLISECOND).toString(),")"]})]})},Ca=Object.freeze(Object.defineProperty({__proto__:null,SelectButton:Ea,SelectLabels:Ra,SelectMultiple:fa,SelectSingle:ha,TimeRangeChip:ya},Symbol.toStringTag,{value:"Module"})),ba=({steps:e,value:t,onChange:n,...r})=>{const o=e.findIndex(i=>i.key===t);return s.jsxRuntimeExports.jsx(D.Space,{direction:"x",align:"center",className:l.CSS.B("steps"),...r,children:e.map((i,a)=>s.jsxRuntimeExports.jsxs(d.Fragment,{children:[s.jsxRuntimeExports.jsxs(c.Button,{onClick:()=>n(i.key),variant:"outlined",disabled:a>o,children:[a+1,". ",i.title]},i.key),a!==e.length-1&&s.jsxRuntimeExports.jsx(c.Qt.Arrow.Right,{style:{fontSize:"15px",color:"var(--pluto-gray-l8)"}})]},i.key))})},va=Object.freeze(Object.defineProperty({__proto__:null,Steps:ba},Symbol.toStringTag,{value:"Module"})),wa=(e,t="x")=>{if(e.length===0)return[];const n=l.J.construct(t),r=l.J.swap(n);return e.sort((o,i)=>l.Eo.loc(o.box,n)-l.Eo.loc(i.box,n)),e.forEach((o,i)=>{if(i===0)return;const u=e[i-1].handles.find(f=>f.orientation===r),x=o.handles.find(f=>f.orientation===n);if(u==null||x==null)return;const m=u.absolutePosition,p=x.absolutePosition,g=l.q.set(l.q.translation(p,m),t,0),h=l.q.translate(l.Eo.topLeft(o.box),g);o.box=l.Eo.construct(h,l.Eo.dims(o.box))}),e},rs=e=>{const t=document.querySelector(`[data-id="${e}"]`);if(t==null)throw new Error(`[diagram] - cannot find node with key: ${e}`);return t},xe=(e,t)=>{const n=rs(t),r=e.getNodes().find(o=>o.id===t);if(r==null)throw new Error(`[diagram] - cannot find node with key: ${t}`);return l.Eo.construct(r.position,l.q.scale(l.Eo.dims(l.Eo.construct(n)),1/e.getZoom()))},Pa=(e,t)=>St.fromFlow(e,t);class Dn{constructor(t,n){he(this,"node_",null);he(this,"position");he(this,"orientation");this.position=t,this.orientation=n}set node(t){this.node_=t}get node(){if(this.node_==null)throw new Error("[schematic] - handle has no node");return this.node_}get absolutePosition(){return l.q.translate(l.Eo.topLeft(this.node.box),this.position)}}class St{constructor(t,n,r){he(this,"key");he(this,"box");he(this,"handles");this.key=t,this.box=n,this.handles=r,r.forEach(o=>o.node=this)}static fromFlow(t,n){const r=xe(n,t),o=rs(t),i=o.getElementsByClassName("react-flow__handle"),a=l.Eo.construct(o),u=Array.from(i).map(x=>{const m=l.Eo.center(l.Eo.construct(x)),p=l.q.translation(l.Eo.topLeft(a),m),g=x.className.match(/react-flow__handle-(\w+)/);if(g==null)throw new Error("[schematic] - cannot find handle orientation");const h=l.J.construct(g[0]);return new Dn(p,h)});return new St(t,r,u)}}const ka=({fromX:e,fromY:t,toX:n,toY:r,fromPosition:o,toPosition:i,fromNode:a,connectionLineStyle:u,connectionStatus:x})=>{const m=document.querySelector(".react-flow__handle-connecting"),p=m==null?void 0:m.className.match(/react-flow__handle-(\w+)/);if(p!=null){const E=l.J.outer.safeParse(p[1]);E.success&&(i=E.data)}const g=j.buildNew({sourcePos:l.q.construct(e,t),targetPos:l.q.construct(n,r),sourceOrientation:o,targetOrientation:i,sourceBox:xe(j.useReactFlow(),(a==null?void 0:a.id)??""),targetBox:xe(j.useReactFlow(),(a==null?void 0:a.id)??"")}),h=j.useReactFlow(),f=j.segmentsToPoints(l.q.construct(e,t),g,h.getZoom(),!1);return s.jsxRuntimeExports.jsx(j.BaseEdge,{path:Vn(f),style:{...u,stroke:l.cssString(x==="invalid"?"var(--pluto-error-z)":"var(--pluto-gray-l9)"),strokeWidth:2,fill:"none"}})},La=({id:e,source:t,target:n,sourcePosition:r,targetHandleId:o,targetPosition:i,style:a,segments:u=[],onSegmentsChange:x,color:m="var(--pluto-gray-l9)",selected:p=!1,...g})=>{const h=l.q.construct(g.sourceX,g.sourceY),f=d.useRef(h),E=l.q.equals(h,f.current),R=l.q.construct(g.targetX,g.targetY),k=d.useRef(R),T=l.q.equals(R,k.current),M=j.useReactFlow(),[$,P,S]=c.useCombinedStateAndRef(()=>u.length>0?u:j.buildNew({sourcePos:h,targetPos:R,sourceOrientation:r,targetOrientation:i,sourceBox:xe(M,t),targetBox:xe(M,n)})),v=d.useRef(i),B=d.useRef(r),L=c.useDebouncedCallback(x,100,[x]);if(!E||!T){let y=$;const _=l.q.translation(f.current,h),z=l.q.translation(R,k.current);l.q.equals(_,l.q.scale(z,-1),.001)?(f.current=h,k.current=R):(E?T||(y=j.moveTargetNode({delta:z,segments:y}),v.current!==i&&(v.current=i,y=j.buildNew({sourcePos:h,targetPos:R,sourceOrientation:r,targetOrientation:i,sourceBox:xe(M,t),targetBox:xe(M,n)})),j.checkIntegrity({sourcePos:h,targetPos:R,next:y,prev:$})||(y=j.buildNew({sourcePos:h,targetPos:R,sourceOrientation:r,targetOrientation:i,sourceBox:xe(M,t),targetBox:xe(M,n)})),k.current=R):(y=j.moveSourceNode({delta:_,segments:y}),B.current!==r&&(B.current=r,y=j.buildNew({sourcePos:h,targetPos:R,sourceOrientation:r,targetOrientation:i,sourceBox:xe(M,t),targetBox:xe(M,n)})),j.checkIntegrity({sourcePos:h,targetPos:R,next:y,prev:$})||(y=j.buildNew({sourcePos:h,targetPos:R,sourceOrientation:r,targetOrientation:i,sourceBox:xe(M,t),targetBox:xe(M,n)})),f.current=h),L(y),P(y))}const N=d.useRef(null),A=pt({onStart:d.useCallback((y,_,z)=>{N.current={index:Number(z.currentTarget.id.split("-")[1]),segments:[...S.current]}},[]),onMove:d.useCallback(y=>{if(N.current==null)return;const _=j.dragSegment({segments:N.current.segments,index:N.current.index,magnitude:l.Eo.dim(y,l.g.swap(N.current.segments[N.current.index].direction),!0)/M.getZoom()});P(_)},[]),onEnd:d.useCallback(()=>x(S.current),[x])}),w=j.segmentsToPoints(h,$,M.getZoom(),!0);return s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(j.BaseEdge,{path:Vn(w),style:{...a,stroke:l.cssString(m)},...g}),p&&Ta(w).map((y,_)=>{const z=$[_].direction,U=l.g.swap(z),I={[l.g.dimension(z)]:"18px",[l.g.dimension(U)]:"4px"},G={[z]:y[z]-9,[U]:y[U]-2};return s.jsxRuntimeExports.jsxs(d.Fragment,{children:[s.jsxRuntimeExports.jsx("rect",{className:l.CSS.BE("diagram-edge-handle","background"),fill:"var(--pluto-gray-l0)",stroke:"var(--pluto-primary-z)",...I,...G,rx:"2px",ry:"2px"}),s.jsxRuntimeExports.jsx("foreignObject",{x:y.x-9,y:y.y-9,width:"18px",height:"18px",children:s.jsxRuntimeExports.jsx("div",{id:`handle-${_}`,className:l.CSS(l.CSS.BE("diagram-edge-handle","dragger"),l.CSS.dir(z)),draggable:!0,onDragStart:A})})]},_)})]})},Vn=e=>{let t="";const r=e.length+-1;for(let o=0;o<r;o++){const i=e[o%e.length],a=e[(o+1)%e.length],u=Math.min(6/Math.hypot(a.x-i.x,a.y-i.y),.5);o>0&&(t+=`Q${i.x},${i.y} ${i.x*(1-u)+a.x*u},${i.y*(1-u)+a.y*u}`),o===0?t+=`M${i.x},${i.y}`:o===0&&(t+=`M${i.x*(1-u)+a.x*u},${i.y*(1-u)+a.y*u}`),o===r-1?t+=`L${a.x},${a.y}`:o<r-1&&(t+=`L${i.x*u+a.x*(1-u)},${i.y*u+a.y*(1-u)}`)}return t},Ta=e=>e.slice(1).map((t,n)=>{const r=e[n];return l.q.construct((t.x+r.x)/2,(t.y+r.y)/2)}),Ma=({initialNodes:e,initialEdges:t,allowEdit:n=!0,initialViewport:r={position:l.q.ZERO,zoom:1}})=>{const[o,i]=d.useState(n),[a,u]=d.useState(e),[x,m]=d.useState(t),[p,g]=d.useState(r),[h,f]=d.useState(!1);return{viewport:p,onViewportChange:g,edges:x,nodes:a,onNodesChange:u,onEdgesChange:m,editable:o,onEditableChange:i,fitViewOnResize:h,setFitViewOnResize:f}},$a=e=>e.source!==e.target,Na={nodesDraggable:!0,nodesConnectable:!0,elementsSelectable:!0,zoomOnDoubleClick:!1},_a={connectionRadius:0,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,panOnDrag:!1,panOnScroll:!1,zoomOnScroll:!1,zoomOnDoubleClick:!1,zoomOnPinch:!1,edgesFocusable:!1,edgesUpdatable:!1,nodesFocusable:!1,edgeUpdaterRadius:0},In={maxZoom:1,minZoom:.5},Ba={hideAttribution:!0},Zn=d.createContext({editable:!0,onEditableChange:()=>{},registerNodeRenderer:()=>{},fitViewOnResize:!1,setFitViewOnResize:()=>{}}),Ue=()=>d.useContext(Zn),Fn=d.memo(({children:e})=>{const{registerNodeRenderer:t}=Ue();return d.useEffect(()=>t(e),[t,e]),null});Fn.displayName="NodeRenderer";const Aa=["Backspace","Delete"],Oa=c.wrap$1(j.Diagram$1.TYPE,({aetherKey:e,children:t,onNodesChange:n,onEdgesChange:r,nodes:o,edges:i,onEditableChange:a,editable:u,viewport:x,triggers:m,onViewportChange:p,fitViewOnResize:g,setFitViewOnResize:h,visible:f,...E})=>{const R=c.useMemoDeepEqualProps({visible:f}),[{path:k},,T]=c.use$3({aetherKey:e,type:j.Diagram$1.TYPE,schema:j.diagramStateZ,initialState:{position:x.position,region:l.Eo.ZERO,zoom:x.zoom,...R}});d.useEffect(()=>T(F=>({...F,...R})),[R]);const M=c.use().colors.gray.l9.hex,$=c.useMemoCompare(()=>m??Ut.zoom,c.compareModeConfigs,[m]),{fitView:P}=j.useReactFlow(),S=c.useDebouncedCallback(P,50,[P]),v=gt(d.useCallback(F=>{g&&S({maxZoom:1}),T(Q=>({...Q,region:F}))},[T,S,g])),B=d.useRef(null),L=d.useCallback(F=>{const Q=B.current;Q!=null&&Q.x===F.x&&Q.y===F.y&&Q.zoom===F.zoom||(B.current=F,!(isNaN(F.x)||isNaN(F.y)||isNaN(F.zoom))&&(T(ue=>({...ue,position:F,zoom:F.zoom})),p(j.translateViewportBackward(F))))},[T,p]);j.useOnViewportChange({onStart:L,onChange:L,onEnd:L});const[N,A]=d.useState(()=>()=>null),w=d.useCallback(F=>A(()=>F),[]),y=d.useMemo(()=>({custom:({id:F,xPos:Q,yPos:ue,selected:ze})=>N({symbolKey:F,position:{x:Q,y:ue},selected:ze})}),[N]),_=d.useRef(i),z=d.useMemo(()=>(_.current=i,j.translateEdgesForward(i)),[i]),U=d.useRef(o),I=d.useMemo(()=>(U.current=o,j.translateNodesForward(o)),[o]),G=d.useCallback(F=>n(j.nodeConverter(U.current,Q=>j.applyNodeChanges(F,Q))),[n]),O=d.useCallback(F=>r(j.edgeConverter(_.current,Q=>j.applyEdgeChanges(F,Q),M)),[r,M]),te=d.useCallback((F,Q)=>r(j.edgeConverter(_.current,ue=>j.updateEdge(F,Q,ue),M)),[]),ce=d.useCallback(F=>{r(j.edgeConverter(_.current,Q=>j.addEdge(F,Q),M))},[r,M]),We=d.useCallback((F,Q)=>{const ue=[..._.current],ze=ue.findIndex(dl=>dl.key===F);ze!==-1&&(ue[ze]={...ue[ze],segments:Q},_.current=ue,r(ue))},[r]),ll=u?Na:_a,il=d.useMemo(()=>({default:F=>s.jsxRuntimeExports.jsx(La,{...F,segments:F.data.segments,color:F.data.color,onSegmentsChange:d.useCallback(Q=>We(F.id,Q),[F.id])},F.id)}),[We]),is=d.useRef(null);c.use$1({triggers:$.zoomReset,callback:d.useCallback(({stage:F,cursor:Q})=>{const ue=is.current;ue==null||F!=="start"||!l.Eo.contains(ue,Q)||P()},[P])});const cs=c.purgeMouse($.select)[0]??null,as=c.purgeMouse($.pan)[0]??null,cl=c.purgeMouse($.zoom)[0]??null,al={selectionOnDrag:cs==null,panOnDrag:as==null,selectionKeyCode:cs,panActivationKeyCode:as,zoomActivationKeyCode:cl},ul=c.useCombinedRefs(is,v),xl=d.useMemo(()=>({editable:u,onEditableChange:a,registerNodeRenderer:w,fitViewOnResize:g,setFitViewOnResize:h}),[u,a,w,g]);return s.jsxRuntimeExports.jsx(Zn.Provider,{value:xl,children:s.jsxRuntimeExports.jsx(c.Composite,{path:k,children:f&&s.jsxRuntimeExports.jsx(j.ReactFlow,{...al,className:l.CSS(l.CSS.B("diagram"),l.CSS.editable(u)),nodes:I,edges:z,nodeTypes:y,edgeTypes:il,ref:ul,fitView:!0,onNodesChange:G,onEdgesChange:O,onConnect:ce,onEdgeUpdate:te,defaultViewport:j.translateViewportForward(x),connectionLineComponent:ka,elevateEdgesOnSelect:!0,minZoom:.5,maxZoom:1.2,isValidConnection:$a,connectionMode:j.ConnectionMode.Loose,snapGrid:[3,3],fitViewOptions:In,selectionMode:j.SelectionMode.Partial,proOptions:Ba,deleteKeyCode:Aa,...E,style:{[l.CSS.var("diagram-zoom")]:x.zoom,...E.style},...ll,children:t})})})}),za=()=>{const{editable:e}=Ue();return e?s.jsxRuntimeExports.jsx(ti,{}):null},Da=({children:e,...t})=>s.jsxRuntimeExports.jsx(D.Pack,{direction:"y",borderShade:4,className:l.CSS.BE("diagram","controls"),...t,children:e}),Va=({onClick:e,...t})=>{const{editable:n,onEditableChange:r}=Ue();return s.jsxRuntimeExports.jsx(c.ToggleIcon,{onChange:()=>r(!n),value:n,uncheckedVariant:"outlined",checkedVariant:"filled",tooltipLocation:l.J.RIGHT_CENTER,tooltip:n?s.jsxRuntimeExports.jsx(c.Text,{level:"small",children:"Disable edit mode"}):s.jsxRuntimeExports.jsx(c.Text,{level:"small",children:"Enable edit mode"}),...t,children:n?s.jsxRuntimeExports.jsx(c.Qt.EditOff,{}):s.jsxRuntimeExports.jsx(c.Qt.Edit,{})})},Ia=({onClick:e,...t})=>{const{fitView:n}=j.useReactFlow(),{fitViewOnResize:r,setFitViewOnResize:o}=Ue();return s.jsxRuntimeExports.jsx(c.ToggleIcon,{onClick:i=>{n(In),e==null||e(i)},value:r,onChange:i=>o(i),rightClickToggle:!0,tooltip:s.jsxRuntimeExports.jsx(c.Text,{level:"small",children:"Fit view to contents"}),tooltipLocation:l.J.RIGHT_CENTER,variant:"outlined",...t,children:s.jsxRuntimeExports.jsx(c.Qt.Expand,{})})},Za=e=>s.jsxRuntimeExports.jsx(j.ReactFlowProvider,{children:s.jsxRuntimeExports.jsx(Oa,{...e})}),Fa=Object.freeze(Object.defineProperty({__proto__:null,Background:za,Controls:Da,Diagram:Za,FitViewControl:Ia,HandleLayout:Dn,NodeLayout:St,NodeRenderer:Fn,ToggleEditControl:Va,alignNodes:wa,edgeConverter:j.edgeConverter,edgeZ:j.edgeZ,nodeConverter:j.nodeConverter,nodeZ:j.nodeZ,rfEdgeDataZ:j.rfEdgeDataZ,selectNode:rs,selectNodeBox:xe,selectNodeLayout:Pa,translateEdgesBackward:j.translateEdgesBackward,translateEdgesForward:j.translateEdgesForward,translateNodesBackward:j.translateNodesBackward,translateNodesForward:j.translateNodesForward,translateViewportBackward:j.translateViewportBackward,translateViewportForward:j.translateViewportForward,use:Ma,useContext:Ue,viewportZ:j.viewportZ},Symbol.toStringTag,{value:"Module"})),qa=c.wrap$1("Log",({aetherKey:e,font:t,className:n,visible:r=!0,emptyContent:o=s.jsxRuntimeExports.jsx(c.Text$2.Centered,{level:"h3",variant:"disabled",hideIcon:!0,children:"Empty Log"}),color:i,telem:a,...u})=>{const x=c.useMemoDeepEqualProps({font:t,color:i,telem:a,visible:r}),[,{scrolling:m,empty:p},g]=c.use$3({aetherKey:e,type:j.Log.TYPE,schema:j.logState,initialState:{empty:!0,region:l.Eo.ZERO,scrolling:!1,wheelPos:0,...x}});d.useEffect(()=>{g(f=>({...f,...x}))},[x,g]);const h=gt(d.useCallback(f=>g(E=>({...E,region:f})),[g]));return s.jsxRuntimeExports.jsx("div",{ref:h,className:l.CSS(l.CSS.B("log"),n),onWheel:f=>{g(E=>({...E,wheelPos:E.wheelPos-f.deltaY,scrolling:E.scrolling?E.scrolling:f.deltaY<0}))},...u,children:p?o:s.jsxRuntimeExports.jsx(c.Icon,{className:l.CSS(l.CSS.BE("log","live"),m&&l.CSS.M("active")),variant:"outlined",onClick:()=>g(f=>({...f,scrolling:!f.scrolling})),tooltip:m?"Resume Scrolling":"Pause Scrolling",children:s.jsxRuntimeExports.jsx(c.Qt.Dynamic,{})})})}),Ha=Object.freeze(Object.defineProperty({__proto__:null,Log:qa},Symbol.toStringTag,{value:"Module"})),Ya=({value:e,showOuter:t=!0,showInner:n,onChange:r})=>{const{outer:o}=e,i=a=>()=>r({...e,...a});return t?s.jsxRuntimeExports.jsxs(D.Space,{className:l.CSS.B("orientation-control"),align:"center",justify:"center",size:.5,children:[s.jsxRuntimeExports.jsx(ye,{selected:o==="top",onClick:i({outer:"top"})}),s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",align:"center",justify:"center",size:.5,children:[s.jsxRuntimeExports.jsx(ye,{selected:o==="left",onClick:i({outer:"left"})}),s.jsxRuntimeExports.jsx(ys,{showInner:n,value:e,onChange:r}),s.jsxRuntimeExports.jsx(ye,{selected:o==="right",onClick:i({outer:"right"})})]}),s.jsxRuntimeExports.jsx(ye,{selected:o==="bottom",onClick:i({outer:"bottom"})})]}):s.jsxRuntimeExports.jsx(ys,{className:l.CSS.B("orientation-control"),value:e,onChange:r})},ys=({value:e,onChange:t,className:n,showInner:r=!0,...o})=>{const{inner:i}=e,a=x=>()=>t({...e,...x});let u={};return r||(u={opacity:0,userSelect:"none",width:"1.5rem",height:"1.5rem"}),s.jsxRuntimeExports.jsxs(D.Space,{className:l.CSS(n,l.CSS.B("value")),direction:"y",align:"center",justify:"center",empty:!0,...o,children:[s.jsxRuntimeExports.jsx(ye,{style:u,disabled:!r,className:l.CSS(l.CSS.dir("y")),selected:i==="top",onClick:a({inner:"top"})}),s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",align:"center",justify:"center",children:[s.jsxRuntimeExports.jsx(ye,{style:u,disabled:!r,selected:i==="left",onClick:a({inner:"left"})}),s.jsxRuntimeExports.jsx(ye,{style:u,disabled:!r,selected:i==="right",onClick:a({inner:"right"})})]}),s.jsxRuntimeExports.jsx(ye,{style:u,disabled:!r,className:l.CSS(l.CSS.dir("y")),selected:i==="bottom",onClick:a({inner:"bottom"})})]})},ye=({selected:e,className:t,...n})=>s.jsxRuntimeExports.jsx(c.Icon,{variant:"text",className:l.CSS(t,l.CSS.selected(e)),...n,children:s.jsxRuntimeExports.jsx("div",{className:"symbol"})}),fe=({className:e,direction:t,...n})=>s.jsxRuntimeExports.jsx(D.Space,{direction:t,align:"stretch",className:l.CSS(l.CSS.B("symbol-form"),e),size:t==="x"?"large":"medium",...n}),Ae=({showOuter:e,showInner:t,...n})=>s.jsxRuntimeExports.jsx(se,{label:"Orientation",padHelpText:!1,...n,children:({value:r,onChange:o})=>{var i;return s.jsxRuntimeExports.jsx(Ya,{value:{inner:r.orientation??"top",outer:((i=r.label)==null?void 0:i.orientation)??"top"},showInner:t,showOuter:e,onChange:a=>o({...r,orientation:a.inner,label:{...r.label,orientation:a.outer}})})}}),Ge=({path:e,omit:t=[]})=>s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",align:"stretch",grow:!0,children:[s.jsxRuntimeExports.jsx(se,{path:e+".label",label:"Label",padHelpText:!1,grow:!0,children:n=>s.jsxRuntimeExports.jsx(c.Text$1,{selectOnFocus:!0,...n})}),s.jsxRuntimeExports.jsx(ht,{visible:!t.includes("maxInlineSize"),style:{maxWidth:125},path:e+".maxInlineSize",hideIfNull:!0,label:"Label Wrap Width",inputProps:{endContent:"px"}}),s.jsxRuntimeExports.jsx(se,{hideIfNull:!0,visible:!t.includes("level"),path:e+".level",label:"Label Size",padHelpText:!1,children:n=>s.jsxRuntimeExports.jsx(de.SelectLevel,{...n})}),s.jsxRuntimeExports.jsx(se,{visible:!t.includes("align"),path:e+".align",label:"Label Alignment",padHelpText:!1,hideIfNull:!0,children:n=>s.jsxRuntimeExports.jsx(Yt,{...n})})]}),ke=e=>s.jsxRuntimeExports.jsx(se,{hideIfNull:!0,label:"Color",align:"start",padHelpText:!1,...e,children:({value:t,onChange:n,variant:r,...o})=>s.jsxRuntimeExports.jsx(Bt.Swatch,{value:t??l.ZERO.setAlpha(1).rgba255,onChange:i=>n(i.rgba255),...o,bordered:!0})}),Ua=e=>s.jsxRuntimeExports.jsx(se,{hideIfNull:!0,label:"Scale",align:"start",padHelpText:!1,...e,children:t=>s.jsxRuntimeExports.jsx(c.Numeric,{dragScale:1,bounds:{lower:.5,upper:15},...t})}),ae=({omit:e})=>s.jsxRuntimeExports.jsxs(fe,{direction:"x",align:"stretch",children:[s.jsxRuntimeExports.jsxs(D.Space,{direction:"y",grow:!0,empty:!0,children:[s.jsxRuntimeExports.jsx(Ge,{omit:e,path:"label"}),s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",grow:!0,children:[s.jsxRuntimeExports.jsx(ke,{path:"color",optional:!0}),s.jsxRuntimeExports.jsx(se,{path:"normallyOpen",label:"Normally Open",padHelpText:!1,hideIfNull:!0,optional:!0,children:t=>s.jsxRuntimeExports.jsx(c.Switch$1,{...t})}),s.jsxRuntimeExports.jsx(Ua,{path:"scale"})]})]}),s.jsxRuntimeExports.jsx(Ae,{path:""})]}),Ga=({path:e})=>{var m,p;const{value:t,onChange:n}=ve({path:e}),r=j.sourcePipelinePropsZ.parse((m=t.source)==null?void 0:m.props),o=j.sinkPipelinePropsZ.parse((p=t.sink)==null?void 0:p.props),i=j.streamChannelValuePropsZ.parse(r.segments.valueStream.props),a=j.setChannelValuePropsZ.parse(o.segments.setter.props),u=g=>{g=g??0;const h=j.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:j.streamChannelValue({channel:g}),threshold:j.withinBounds({trueBound:{lower:.9,upper:1.1}})},outlet:"threshold"});n({...t,source:h})},x=g=>{g=g??0;const h=j.sinkPipeline("boolean",{connections:[{from:"setpoint",to:"setter"}],segments:{setter:j.setChannelValue({channel:g}),setpoint:j.setpoint({truthy:1,falsy:0})},inlet:"setpoint"}),f=j.authoritySource({channel:g}),E=j.acquireChannelControl({channel:g,authority:255});n({...t,sink:h,control:{showChip:!0,showIndicator:!0,...t.control,chip:{sink:E,source:f},indicator:{statusSource:f}}})};return s.jsxRuntimeExports.jsxs(fe,{direction:"x",grow:!0,align:"stretch",children:[s.jsxRuntimeExports.jsx(me.Item,{label:"State Channel",grow:!0,children:s.jsxRuntimeExports.jsx(Ce,{value:i.channel,onChange:u})}),s.jsxRuntimeExports.jsx(me.Item,{label:"Command Channel",grow:!0,children:s.jsxRuntimeExports.jsx(Ce,{value:a.channel,onChange:x})}),s.jsxRuntimeExports.jsx(Qt,{path:"control.show",label:"Show Control Chip",hideIfNull:!0,optional:!0})]})},os=[{tabKey:"style",name:"Style"},{tabKey:"control",name:"Control"}],re=()=>{const e=d.useCallback(({tabKey:n})=>{switch(n){case"control":return s.jsxRuntimeExports.jsx(Ga,{path:""});default:return s.jsxRuntimeExports.jsx(ae,{})}},[]),t=ne.useStatic({tabs:os,content:e});return s.jsxRuntimeExports.jsx(ne.Tabs,{...t})},De={y:2,x:.25},Ve={lower:0,upper:2e3},qn=({includeBorderRadius:e=!1})=>s.jsxRuntimeExports.jsxs(fe,{direction:"x",align:"stretch",children:[s.jsxRuntimeExports.jsxs(D.Space,{direction:"y",grow:!0,empty:!0,children:[s.jsxRuntimeExports.jsx(Ge,{path:"label"}),s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",children:[s.jsxRuntimeExports.jsx(ke,{path:"color"}),s.jsxRuntimeExports.jsx(ke,{path:"backgroundColor",label:"Background Color"}),s.jsxRuntimeExports.jsx(se,{path:"borderRadius.x",hideIfNull:!0,optional:!0,label:"X Border Radius",grow:!0,children:({value:t,...n})=>s.jsxRuntimeExports.jsx(c.Numeric,{value:t,dragScale:De,bounds:Ve,endContent:"%",...n})}),s.jsxRuntimeExports.jsx(se,{path:"borderRadius.y",hideIfNull:!0,optional:!0,label:"Y Border Radius",grow:!0,children:({value:t,...n})=>s.jsxRuntimeExports.jsx(c.Numeric,{value:t,dragScale:De,bounds:Ve,endContent:"%",...n})}),e&&s.jsxRuntimeExports.jsx(se,{path:"borderRadius",hideIfNull:!0,optional:!0,label:"Border Radius",grow:!0,children:({value:t,...n})=>s.jsxRuntimeExports.jsx(c.Numeric,{value:t,dragScale:De,bounds:Ve,endContent:"px",...n})}),s.jsxRuntimeExports.jsx(se,{path:"dimensions.width",label:"Width",grow:!0,children:({value:t,...n})=>s.jsxRuntimeExports.jsx(c.Numeric,{value:t??200,dragScale:De,bounds:Ve,endContent:"px",...n})}),s.jsxRuntimeExports.jsx(se,{path:"dimensions.height",label:"Height",grow:!0,children:({value:t,...n})=>s.jsxRuntimeExports.jsx(c.Numeric,{value:t??200,dragScale:De,bounds:Ve,endContent:"px",...n})})]})]}),s.jsxRuntimeExports.jsx(Ae,{path:"",showInner:!1})]}),Hn=[{tabKey:"style",name:"Style"},{tabKey:"telemetry",name:"Telemetry"}],Wa=({path:e})=>{var g;const{value:t,onChange:n}=ve({path:e}),r=j.sourcePipelinePropsZ.parse((g=t.telem)==null?void 0:g.props),o=j.streamChannelValuePropsZ.parse(r.segments.valueStream.props),i=j.stringifyNumberProps.parse(r.segments.stringifier.props),a=j.rollingAverageProps.parse(r.segments.rollingAverage.props),u=h=>{const f=j.sourcePipeline("string",{connections:[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],segments:{valueStream:j.streamChannelValue({channel:h??0}),stringifier:j.stringifyNumber({precision:i.precision??2}),rollingAverage:j.rollingAverage({windowSize:a.windowSize??1})},outlet:"stringifier"});n({...t,telem:f})},x=h=>{const f=j.sourcePipeline("string",{connections:[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],segments:{valueStream:j.streamChannelValue({channel:o.channel}),stringifier:j.stringifyNumber({precision:h}),rollingAverage:j.rollingAverage({windowSize:a.windowSize})},outlet:"stringifier"});n({...t,telem:f})},m=h=>{const f=j.sourcePipeline("string",{connections:[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],segments:{stringifier:j.stringifyNumber({precision:i.precision??2}),valueStream:j.streamChannelValue({channel:o.channel}),rollingAverage:j.rollingAverage({windowSize:h})},outlet:"stringifier"});n({...t,telem:f})},p=jt(o.channel);return d.useEffect(()=>{n({...t,tooltip:[p]})},[p]),s.jsxRuntimeExports.jsxs(fe,{direction:"x",align:"stretch",children:[s.jsxRuntimeExports.jsx(me.Item,{label:"Input Channel",grow:!0,children:s.jsxRuntimeExports.jsx(Ce,{value:o.channel,onChange:u})}),s.jsxRuntimeExports.jsx(me.Item,{label:"Precision",align:"start",children:s.jsxRuntimeExports.jsx(c.Numeric,{value:i.precision??2,bounds:{lower:0,upper:10},onChange:x})}),s.jsxRuntimeExports.jsx(me.Item,{label:"Averaging Window",align:"start",children:s.jsxRuntimeExports.jsx(c.Numeric,{value:a.windowSize??1,bounds:{lower:1,upper:100},onChange:m})})]})},Ka=()=>{const e=d.useCallback(({tabKey:n})=>{switch(n){case"telemetry":return s.jsxRuntimeExports.jsx(Wa,{path:""});default:return s.jsxRuntimeExports.jsxs(fe,{direction:"x",children:[s.jsxRuntimeExports.jsxs(D.Space,{direction:"y",grow:!0,empty:!0,children:[s.jsxRuntimeExports.jsx(Ge,{path:"label"}),s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",children:[s.jsxRuntimeExports.jsx(ke,{path:"color"}),s.jsxRuntimeExports.jsx(se,{path:"units",label:"Units",align:"start",padHelpText:!1,children:r=>s.jsxRuntimeExports.jsx(c.Text$1,{...r})}),s.jsxRuntimeExports.jsx(ht,{path:"inlineSize",label:"Value Width",hideIfNull:!0,inputProps:{dragScale:{x:1,y:.25},bounds:{lower:40,upper:500},endContent:"px"}})]})]}),s.jsxRuntimeExports.jsx(Ae,{path:"",showInner:!1})]})}},[]),t=ne.useStatic({tabs:Hn,content:e});return s.jsxRuntimeExports.jsx(ne.Tabs,{...t})},Qa=({path:e})=>{var u;const{value:t,onChange:n}=ve({path:e}),r=j.sourcePipelinePropsZ.parse((u=t.source)==null?void 0:u.props),o=j.streamChannelValuePropsZ.parse(r.segments.valueStream.props),i=x=>{x=x??0;const m=j.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:j.streamChannelValue({channel:x}),threshold:j.withinBounds({trueBound:{lower:.9,upper:1.1}})},outlet:"threshold"});n({...t,source:m})},a=jt(o.channel);return d.useEffect(()=>n({...t}),[a]),s.jsxRuntimeExports.jsx(fe,{direction:"x",align:"stretch",children:s.jsxRuntimeExports.jsx(me.Item,{label:"Input Channel",grow:!0,children:s.jsxRuntimeExports.jsx(Ce,{value:o.channel,onChange:i})})})},Xa=()=>{const e=d.useCallback(({tabKey:n})=>{switch(n){case"telemetry":return s.jsxRuntimeExports.jsx(Qa,{path:""});default:return s.jsxRuntimeExports.jsx(ae,{})}},[]),t=ne.useStatic({tabs:Hn,content:e});return s.jsxRuntimeExports.jsx(ne.Tabs,{...t})},Ja=({path:e})=>{var a;const{value:t,onChange:n}=ve({path:e}),r=j.sinkPipelinePropsZ.parse((a=t.sink)==null?void 0:a.props),o=j.setChannelValuePropsZ.parse(r.segments.setter.props),i=u=>{u=u??0;const x=j.sinkPipeline("boolean",{connections:[{from:"setpoint",to:"setter"}],segments:{setter:j.setChannelValue({channel:u}),setpoint:j.setpoint({truthy:1,falsy:0})},inlet:"setpoint"}),m=j.authoritySource({channel:u}),p=j.acquireChannelControl({channel:u,authority:255});n({...t,sink:x,control:{...t.control,showChip:!0,chip:{sink:p,source:m},showIndicator:!0,indicator:{statusSource:m}}})};return s.jsxRuntimeExports.jsxs(fe,{direction:"x",children:[s.jsxRuntimeExports.jsx(me.Item,{label:"Output Channel",grow:!0,children:s.jsxRuntimeExports.jsx(Ce,{value:o.channel,onChange:i})}),s.jsxRuntimeExports.jsx(ht,{label:"Activation Delay",path:"onClickDelay",inputProps:{endContent:"ms"},hideIfNull:!0}),s.jsxRuntimeExports.jsx(Qt,{path:"control.show",label:"Show Control Chip",hideIfNull:!0,optional:!0})]})},eu=()=>{const e=d.useCallback(({tabKey:n})=>{switch(n){case"control":return s.jsxRuntimeExports.jsx(Ja,{path:""});default:return s.jsxRuntimeExports.jsx(ae,{omit:["align","maxInlineSize"]})}},[]),t=ne.useStatic({tabs:os,content:e});return s.jsxRuntimeExports.jsx(ne.Tabs,{...t})},tu=({path:e})=>{var m,p;const{value:t,onChange:n}=ve({path:e}),r=j.sourcePipelinePropsZ.parse((m=t.source)==null?void 0:m.props),o=j.sinkPipelinePropsZ.parse((p=t.sink)==null?void 0:p.props),i=j.streamChannelValuePropsZ.parse(r.segments.valueStream.props),a=j.setChannelValuePropsZ.parse(o.segments.setter.props),u=g=>{g=g??0;const h=j.sourcePipeline("number",{connections:[],segments:{valueStream:j.streamChannelValue({channel:g})},outlet:"valueStream"});n({...t,source:h})},x=g=>{g=g??0;const h=j.sinkPipeline("number",{connections:[],segments:{setter:j.setChannelValue({channel:g})},inlet:"setter"}),f=j.authoritySource({channel:g}),E=j.acquireChannelControl({channel:g,authority:255});n({...t,sink:h,control:{...t.control,showChip:!0,chip:{sink:E,source:f},showIndicator:!0,indicator:{statusSource:f}}})};return s.jsxRuntimeExports.jsxs(fe,{direction:"x",grow:!0,align:"stretch",children:[s.jsxRuntimeExports.jsx(me.Item,{label:"State Channel",grow:!0,children:s.jsxRuntimeExports.jsx(Ce,{value:i.channel,onChange:u})}),s.jsxRuntimeExports.jsx(me.Item,{label:"Command Channel",grow:!0,children:s.jsxRuntimeExports.jsx(Ce,{value:a.channel,onChange:x})})]})},su=()=>{const e=d.useCallback(({tabKey:n})=>{switch(n){case"control":return s.jsxRuntimeExports.jsx(tu,{path:""});default:return s.jsxRuntimeExports.jsxs(fe,{direction:"x",align:"stretch",children:[s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",align:"stretch",grow:!0,children:[s.jsxRuntimeExports.jsx(Ge,{path:"label"}),s.jsxRuntimeExports.jsx(mn,{path:"units",label:"Units",align:"start",padHelpText:!1}),s.jsxRuntimeExports.jsx(ke,{path:"color"})]}),s.jsxRuntimeExports.jsx(Ae,{path:""})]})}},[]),t=ne.useStatic({tabs:os,content:e});return s.jsxRuntimeExports.jsx(ne.Tabs,{...t})},nu=()=>{const e=ve({path:"autoFit",optional:!0});return s.jsxRuntimeExports.jsxs(fe,{direction:"x",align:"stretch",grow:!0,children:[s.jsxRuntimeExports.jsxs(D.Space,{direction:"y",grow:!0,children:[s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",align:"stretch",children:[s.jsxRuntimeExports.jsx(se,{path:"text",label:"Text",padHelpText:!1,grow:!0,children:t=>s.jsxRuntimeExports.jsx(c.Text$1,{selectOnFocus:!0,...t})}),s.jsxRuntimeExports.jsx(se,{path:"level",label:"Text Size",padHelpText:!1,children:t=>s.jsxRuntimeExports.jsx(de.SelectLevel,{...t})}),s.jsxRuntimeExports.jsx(se,{path:"align",label:"Alignment",padHelpText:!1,hideIfNull:!0,children:t=>s.jsxRuntimeExports.jsx(Yt,{...t})})]}),s.jsxRuntimeExports.jsxs(D.Space,{direction:"x",children:[s.jsxRuntimeExports.jsx(ke,{path:"color"}),s.jsxRuntimeExports.jsx(se,{onChange:(t,{set:n})=>n("autoFit",!1),path:"width",label:"Wrap Width",padHelpText:!1,children:t=>s.jsxRuntimeExports.jsx(c.Numeric,{...t,bounds:{lower:0,upper:2e3},dragScale:5,endContent:"px",children:s.jsxRuntimeExports.jsx(c.Icon,{onClick:()=>e==null?void 0:e.onChange(!0),disabled:(e==null?void 0:e.value)===!0,variant:"outlined",tooltip:(e==null?void 0:e.value)===!0?"Manually enter value to disable auto fit":"Enable auto fit",children:s.jsxRuntimeExports.jsx(c.Qt.AutoFitWidth,{})})})})]})]}),s.jsxRuntimeExports.jsx(Ae,{path:""})]})},ru=()=>s.jsxRuntimeExports.jsxs(fe,{direction:"x",align:"stretch",children:[s.jsxRuntimeExports.jsxs(D.Space,{direction:"y",grow:!0,children:[s.jsxRuntimeExports.jsx(Ge,{path:"label",omit:["maxInlineSize","align"]}),s.jsxRuntimeExports.jsx(ke,{path:"color"})]}),s.jsxRuntimeExports.jsx(Ae,{path:"",showOuter:!1})]}),V=e=>s.jsxRuntimeExports.jsx("path",{vectorEffect:"non-scaling-stroke",...e}),Oe=e=>s.jsxRuntimeExports.jsx("rect",{vectorEffect:"non-scaling-stroke",...e}),Te=e=>s.jsxRuntimeExports.jsx("circle",{vectorEffect:"non-scaling-stroke",...e}),W=e=>s.jsxRuntimeExports.jsx("line",{vectorEffect:"non-scaling-stroke",...e}),ou={left:{left:j.Position.Left,right:j.Position.Right,top:j.Position.Top,bottom:j.Position.Bottom},right:{left:j.Position.Right,right:j.Position.Left,top:j.Position.Bottom,bottom:j.Position.Top},top:{left:j.Position.Bottom,right:j.Position.Top,top:j.Position.Left,bottom:j.Position.Right},bottom:{left:j.Position.Top,right:j.Position.Bottom,top:j.Position.Right,bottom:j.Position.Left}},lu=(e,t)=>ou[t][e],iu=(e,t=!1)=>{if(t)return e;switch(e){case j.Position.Left:return j.Position.Right;case j.Position.Right:return j.Position.Left;case j.Position.Top:return j.Position.Bottom;case j.Position.Bottom:return j.Position.Top;default:return j.Position.Top}},cu=(e,t,n,r=!1)=>r?{left:t,top:e}:n==="left"?{top:e,left:t}:n==="right"?{top:100-e,left:100-t}:n==="top"?{top:100-t,left:e}:{top:t,left:100-e},q=({children:e,orientation:t})=>{let n;try{n=j.useUpdateNodeInternals()}catch{return s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{})}const r=d.useRef(null),o=d.useRef(!0);return d.useEffect(()=>{if(r.current==null)return;if(o.current){o.current=!1;return}const i=r.current.closest(".react-flow__node"),a=i==null?void 0:i.getAttribute("data-id");a!=null&&(n==null||n(a))},[t]),s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx("span",{ref:r}),e]})},b=({location:e,orientation:t,preventAutoAdjust:n,left:r,swap:o,top:i,...a})=>{const u=cu(i,r,t,n);return s.jsxRuntimeExports.jsx(j.Handle$1,{position:iu(lu(e,t),!o),...a,type:"source",onClick:x=>x.stopPropagation(),className:(l.CSS.B("handle"),l.CSS.BE("handle",a.id)),style:{left:`${u.left}%`,top:`${u.top}%`}})},ie=({className:e,enabled:t=!1,triggered:n=!1,orientation:r="left",color:o,...i})=>s.jsxRuntimeExports.jsx("button",{className:l.CSS(l.CSS.B("symbol-primitive"),l.CSS.B("symbol-primitive-toggle"),r!=null&&l.CSS.loc(r),t&&l.CSS.M("enabled"),n&&l.CSS.M("triggered"),e),color:l.cssString(o),...i}),ee=({className:e,...t})=>s.jsxRuntimeExports.jsx("div",{className:l.CSS(l.CSS.B("symbol-primitive"),e),...t}),au=.8,K=({dimensions:e,orientation:t="left",children:n,className:r,color:o,style:i={},scale:a=1,...u})=>{e=l.g.construct(t)==="y"?l._$1.swap(e):e;const m=l.cssString(o),p=c.use();return o!=null&&(i[l.CSS.var("symbol-color")]=new l.Color(o).rgbString,i[l.CSS.var("symbol-color-contrast")]=new l.Color(o).pickByContrast(p.colors.gray.l0,p.colors.gray.l10).rgbString),s.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:l._$1.svgViewBox(e),className:l.CSS(l.CSS.loc(t),r),fill:m,stroke:m,...u,style:{aspectRatio:`${e.width} / ${e.height}`,width:l._$1.scale(e,a*au).width,...i},children:s.jsxRuntimeExports.jsx("g",{children:n})})},Yn=({className:e,orientation:t,scale:n,color:r,...o})=>s.jsxRuntimeExports.jsxs(ie,{...o,orientation:t,className:l.CSS(l.CSS.B("four-way-valve"),e),children:[s.jsxRuntimeExports.jsxs(q,{orientation:t,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:"left",left:2.2989,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:"left",left:97.7011,top:50,id:"2"}),s.jsxRuntimeExports.jsx(b,{location:"top",orientation:"left",left:50,top:2.2989,id:"3"}),s.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:"left",left:50,top:97.7011,id:"4"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:87,height:87},color:r,scale:n,children:[s.jsxRuntimeExports.jsx(V,{d:"M43.5 43.5L6.35453 24.7035C4.35901 23.6937 2 25.1438 2 27.3803V59.6197C2 61.8562 4.35901 63.3063 6.35453 62.2965L43.5 43.5ZM43.5 43.5L80.6455 24.7035C82.641 23.6937 85 25.1438 85 27.3803V59.6197C85 61.8562 82.641 63.3063 80.6455 62.2965L43.5 43.5Z"}),s.jsxRuntimeExports.jsx(V,{d:"M43.5 43.5L24.7035 80.6455C23.6937 82.641 25.1438 85 27.3803 85H59.6197C61.8562 85 63.3063 82.641 62.2965 80.6455L43.5 43.5ZM43.5 43.5L24.7035 6.35453C23.6937 4.35901 25.1438 2 27.3803 2H59.6197C61.8562 2 63.3063 4.35901 62.2965 6.35453L43.5 43.5Z"})]})]}),Un=({color:e,orientation:t="left",scale:n,...r})=>s.jsxRuntimeExports.jsxs(ie,{...r,className:l.CSS(l.CSS.B("three-way-valve")),orientation:t,children:[s.jsxRuntimeExports.jsxs(q,{orientation:t,children:[s.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:t,left:50,top:97.0278,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.2989,top:33.1308,id:"2"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.7011,top:33.1308,id:"3"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:87,height:64},color:e,orientation:t,scale:n,children:[s.jsxRuntimeExports.jsx(V,{d:"M43.5 21L6.35453 2.20349C4.35901 1.19372 2 2.64384 2 4.88029V37.1197C2 39.3562 4.35901 40.8063 6.35453 39.7965L43.5 21ZM43.5 21L80.6455 2.20349C82.641 1.19372 85 2.64384 85 4.8803V37.1197C85 39.3562 82.641 40.8063 80.6455 39.7965L43.5 21Z"}),s.jsxRuntimeExports.jsx(V,{d:"M44.3923 22.3611C44.0222 21.6298 42.9778 21.6298 42.6077 22.3611L24.7035 57.7433C23.6937 59.7388 25.1438 62.0978 27.3803 62.0978L59.6197 62.0978C61.8562 62.0978 63.3063 59.7388 62.2965 57.7433L44.3923 22.3611Z"})]})]}),Gn=({orientation:e="left",color:t,scale:n,...r})=>s.jsxRuntimeExports.jsxs(ie,{...r,children:[s.jsxRuntimeExports.jsxs(q,{orientation:e,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:e,left:2.2989,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:e,left:97.7701,top:50,id:"2"})]}),s.jsxRuntimeExports.jsx(K,{dimensions:{width:87,height:42},color:t,orientation:e,scale:n,children:s.jsxRuntimeExports.jsx(V,{d:"M43.5 21L6.35453 2.20349C4.35901 1.19372 2 2.64384 2 4.88029V37.1197C2 39.3562 4.35901 40.8063 6.35453 39.7965L43.5 21ZM43.5 21L80.6455 2.20349C82.641 1.19372 85 2.64384 85 4.8803V37.1197C85 39.3562 82.641 40.8063 80.6455 39.7965L43.5 21Z"})})]}),Wn=({className:e,color:t,orientation:n="left",normallyOpen:r=!1,scale:o,...i})=>s.jsxRuntimeExports.jsxs(ie,{className:l.CSS(l.CSS.B("solenoid-valve"),r&&l.CSS.M("normally-open"),e),...i,children:[s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:2.2989,top:69.5652,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:97.7011,top:69.5652,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:87,height:69},color:t,orientation:n,scale:o,children:[s.jsxRuntimeExports.jsx(V,{className:l.CSS.B("body"),d:"M43.5 48L6.35453 29.2035C4.35901 28.1937 2 29.6438 2 31.8803V64.1197C2 66.3562 4.35901 67.8063 6.35453 66.7965L43.5 48ZM43.5 48L80.6455 29.2035C82.641 28.1937 85 29.6438 85 31.8803V64.1197C85 66.3562 82.641 67.8063 80.6455 66.7965L43.5 48Z"}),s.jsxRuntimeExports.jsx(W,{x1:43.5,x2:43.5,y1:24.5333,y2:48}),s.jsxRuntimeExports.jsx(Oe,{x:"29",y:"2",width:"29",height:"22.5333",rx:"1"})]})]}),Kn=({className:e,orientation:t="left",color:n,scale:r,...o})=>s.jsxRuntimeExports.jsxs(ee,{orientation:t,className:l.CSS(l.CSS.B("relief-valve"),e),...o,children:[s.jsxRuntimeExports.jsxs(q,{orientation:t,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.2989,top:63.7931,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.7011,top:63.7931,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:87,height:58},color:n,orientation:t,scale:r,children:[s.jsxRuntimeExports.jsx(V,{d:"M43.5 37L6.35453 18.2035C4.35901 17.1937 2 18.6438 2 20.8803V53.1197C2 55.3562 4.35901 56.8063 6.35453 55.7965L43.5 37ZM43.5 37L80.6455 18.2035C82.641 17.1937 85 18.6438 85 20.8803V53.1197C85 55.3562 82.641 56.8063 80.6455 55.7965L43.5 37Z"}),s.jsxRuntimeExports.jsx(V,{d:"M43.5 2 L43.5 37",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M31.8011 14.0802L55.1773 4.29611",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M31.8011 20.0802L55.1773 10.2961",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M31.8011 26.0802L55.1773 16.2961",strokeLinecap:"round"})]})]}),Qn=({className:e,orientation:t="left",color:n,scale:r,...o})=>s.jsxRuntimeExports.jsxs(ee,{orientation:t,className:l.CSS(l.CSS.B("check-valve"),e),...o,children:[s.jsxRuntimeExports.jsxs(q,{orientation:t,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:4.2222,top:48.8372,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:94.2038,top:48.8372,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:45,height:43},color:n,orientation:t,scale:r,children:[s.jsxRuntimeExports.jsx(W,{x1:"42.3917",y1:"2",x2:"42.3917",y2:"41",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M41.6607 21.8946C42.3917 21.5238 42.3906 20.4794 41.6589 20.1101L6.25889 2.2412C4.26237 1.23341 1.90481 2.68589 1.90704 4.92235L1.93925 37.1617C1.94148 39.3982 4.30194 40.846 6.29644 39.8342L41.6607 21.8946Z"})]})]}),Xn=({color:e,className:t,orientation:n="left",scale:r,...o})=>s.jsxRuntimeExports.jsxs(ie,{...o,orientation:n,className:l.CSS(l.CSS.B("angled-valve"),t),children:[s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:32.8125,top:97.0278,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:97.0278,top:32.8125,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:64,height:64},color:e,orientation:n,scale:r,children:[s.jsxRuntimeExports.jsx(V,{d:"M22.3611 20.1077C21.6298 20.4778 21.6298 21.5222 22.3611 21.8923L57.7433 39.7965C59.7388 40.8063 62.0978 39.3562 62.0978 37.1197L62.0978 4.88029C62.0978 2.64384 59.7388 1.19372 57.7433 2.2035L22.3611 20.1077Z"}),s.jsxRuntimeExports.jsx(V,{d:"M21.8923 22.3611C21.5222 21.6298 20.4778 21.6298 20.1077 22.3611L2.20349 57.7433C1.19372 59.7388 2.64384 62.0978 4.8803 62.0978L37.1197 62.0978C39.3562 62.0978 40.8063 59.7388 39.7965 57.7433L21.8923 22.3611Z"})]})]}),Jn=({color:e,className:t,orientation:n="left",scale:r,...o})=>s.jsxRuntimeExports.jsxs(ie,{...o,className:l.CSS(l.CSS.B("pump"),t),orientation:n,children:[s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:64,height:64},color:e,orientation:n,scale:r,children:[s.jsxRuntimeExports.jsx(Te,{cx:"32",cy:"32",r:"30"}),s.jsxRuntimeExports.jsx(W,{x1:"32",y1:"2",x2:"62",y2:"32",className:l.CSS(l.CSS.M("detail"),t)}),s.jsxRuntimeExports.jsx(W,{x1:"32",y1:"62",x2:"62",y2:"32",className:l.CSS(l.CSS.M("detail"),t)})]})]}),er=({className:e,color:t,orientation:n="left",scale:r,...o})=>{const i=l.cssString(t);return s.jsxRuntimeExports.jsxs(ee,{...o,className:l.CSS(l.CSS.B("symbol"),e),children:[s.jsxRuntimeExports.jsx(q,{orientation:n,children:s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:5,top:50,id:"1"})}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:40,height:48},color:t,orientation:n,scale:r,children:[s.jsxRuntimeExports.jsx(V,{d:"M24 24C24 35.1852 15.2546 44.4725 3.87626 45.8297C2.90571 45.9455 2 45.1407 2 44V4C2 2.85926 2.90571 2.0545 3.87626 2.17027C15.2546 3.52755 24 12.8148 24 24Z"}),s.jsxRuntimeExports.jsx(V,{d:"M37.9706 23.2076C38.4906 23.6079 38.4906 24.3921 37.9706 24.7924L33.86 27.9568C33.2024 28.463 32.25 27.9942 32.25 27.1644V20.8356C32.25 20.0058 33.2024 19.537 33.86 20.0432L37.9706 23.2076Z",fill:i}),s.jsxRuntimeExports.jsx(V,{d:"M33 24H2",strokeLinecap:"round"})]})]})},tr=({className:e,orientation:t="left",color:n,scale:r,...o})=>s.jsxRuntimeExports.jsxs(ee,{className:l.CSS(l.CSS.B("cap"),e),...o,children:[s.jsxRuntimeExports.jsx(q,{orientation:t,children:s.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:7.6923,top:50,id:"1"})}),s.jsxRuntimeExports.jsx(K,{color:n,dimensions:{width:26,height:48},orientation:t,scale:r,children:s.jsxRuntimeExports.jsx(V,{d:"M24 24C24 35.1852 15.2546 44.4725 3.87626 45.8297C2.90571 45.9455 2 45.1407 2 44V4C2 2.85926 2.90571 2.0545 3.87626 2.17027C15.2546 3.52755 24 12.8148 24 24Z"})})]}),sr=({className:e,orientation:t="left",color:n,scale:r,...o})=>s.jsxRuntimeExports.jsxs(ee,{className:l.CSS(l.CSS.B("manual-valve"),e),...o,children:[s.jsxRuntimeExports.jsxs(q,{orientation:t,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.2989,top:56.25,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.7011,top:56.25,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:87,height:48},color:n,orientation:t,scale:r,children:[s.jsxRuntimeExports.jsx(W,{x1:"43.5",y1:"27",x2:"43.5",y2:"1"}),s.jsxRuntimeExports.jsx(V,{d:"M19.64 1 L66.68 1",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M43.5 27L6.35453 8.20349C4.35901 7.19372 2 8.64384 2 10.8803V43.1197C2 45.3562 4.35901 46.8063 6.35453 45.7965L43.5 27ZM43.5 27L80.6455 8.20349C82.641 7.19372 85 8.64384 85 10.8803V43.1197C85 45.3562 82.641 46.8063 80.6455 45.7965L43.5 27Z"})]})]}),nr=({className:e,orientation:t="left",color:n,scale:r,...o})=>s.jsxRuntimeExports.jsxs(ee,{className:l.CSS(l.CSS.B("filter"),e),...o,children:[s.jsxRuntimeExports.jsxs(q,{orientation:t,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:11.5385,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:88.4615,top:50,id:"2"})]}),s.jsxRuntimeExports.jsx(K,{dimensions:{width:52,height:34},orientation:t,color:n,scale:r,children:s.jsxRuntimeExports.jsx(V,{d:"M6 17L24.8 2.9C25.5111 2.36667 26.4889 2.36667 27.2 2.9L46 17M6 17L24.8 31.1C25.5111 31.6333 26.4889 31.6333 27.2 31.1L46 17"})})]}),uu=e=>typeof e=="number"?{topLeft:l.q.construct(e),topRight:l.q.construct(e),bottomLeft:l.q.construct(e),bottomRight:l.q.construct(e)}:"x"in e?{topLeft:e,topRight:e,bottomLeft:e,bottomRight:e}:typeof e.bottomLeft=="number"?{topLeft:l.q.construct(e.topLeft),topRight:l.q.construct(e.topRight),bottomLeft:l.q.construct(e.bottomLeft),bottomRight:l.q.construct(e.bottomRight)}:e,xu=e=>{const{topLeft:t,topRight:n,bottomLeft:r,bottomRight:o}=e;return`${t.x}% ${n.x}% ${o.x}% ${r.x}% / ${t.y}% ${n.y}% ${o.y}% ${r.y}%`},du={width:40,height:80},rr={x:50,y:10},Rt=({className:e,dimensions:t=du,borderRadius:n=rr,boxBorderRadius:r,color:o,backgroundColor:i,...a})=>{const u=uu(n),x=r==null,m=c.use();return s.jsxRuntimeExports.jsx(ee,{className:l.CSS(e,l.CSS.B("tank")),style:{...t,borderRadius:r??xu(u),borderColor:l.cssString(o??m.colors.gray.l9),backgroundColor:i==null?void 0:l.cssString(i)},...a,children:s.jsxRuntimeExports.jsxs(q,{children:[s.jsxRuntimeExports.jsx(b,{location:"top",orientation:"left",left:50,top:0,id:"1"}),x&&s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(b,{location:"top",orientation:"left",left:-.5,top:u.topLeft.y-1,id:"2"}),s.jsxRuntimeExports.jsx(b,{location:"top",orientation:"left",left:101,top:u.topRight.y-1,id:"3"})]}),s.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:"left",left:50,top:100,id:"4"}),x&&s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:"left",left:-.5,top:100-u.bottomLeft.y+1,id:"5"}),s.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:"left",left:101,top:100-u.bottomRight.y+1,id:"6"})]}),s.jsxRuntimeExports.jsx(b,{location:"left",orientation:"left",left:-.5,top:50,id:"7"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:"left",left:101,top:50,id:"8"})]})})},or=({className:e,orientation:t="left",color:n,scale:r,...o})=>s.jsxRuntimeExports.jsxs(ee,{className:l.CSS(e,l.CSS.B("regulator")),...o,children:[s.jsxRuntimeExports.jsxs(q,{orientation:t,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:3.4091,top:66.25,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.7273,top:66.25,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:88,height:80},orientation:t,color:n,scale:r,children:[s.jsxRuntimeExports.jsx(V,{d:"M44.5 53L7.35453 34.2035C5.35901 33.1937 3 34.6438 3 36.8803V69.1197C3 71.3562 5.35901 72.8063 7.35453 71.7965L44.5 53ZM44.5 53L81.6455 34.2035C83.641 33.1937 86 34.6438 86 36.8803V69.1197C86 71.3562 83.641 72.8063 81.6455 71.7965L44.5 53Z"}),s.jsxRuntimeExports.jsx(V,{d:"M61 30C62.6569 30 64.0231 28.6494 63.7755 27.0111C63.141 22.8129 61.181 18.8968 58.1421 15.8579C54.3914 12.1071 49.3043 10 44 10C38.6957 10 33.6086 12.1071 29.8579 15.8579C26.819 18.8968 24.859 22.8129 24.2245 27.0111C23.9769 28.6494 25.3431 30 27 30L44.5 30H61Z"}),s.jsxRuntimeExports.jsx(W,{x1:"44.5",y1:"53",x2:"44.5",y2:"30",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M44.5 10V8C44.5 6.34315 45.3431 5 47 5H80C81.6569 5 83 6.34315 83 8V24.4281C83 25.4126 82.517 26.3344 81.7076 26.8947L44.5 53"})]})]}),lr=({className:e,orientation:t="left",scale:n,color:r,...o})=>s.jsxRuntimeExports.jsxs(ee,{className:l.CSS(l.CSS.B("orifice"),e),...o,children:[s.jsxRuntimeExports.jsxs(q,{orientation:t,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.8571,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.1429,top:50,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:70,height:34},orientation:t,color:r,scale:n,children:[s.jsxRuntimeExports.jsx(V,{d:"M2 2.5C27.451 21.3469 60.0915 12.0132 68 2.5",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M2 32.5C27.451 13.6531 60.0915 22.9868 68 32.5",strokeLinecap:"round"})]})]}),ir=({className:e,orientation:t="left",color:n,scale:r,...o})=>s.jsxRuntimeExports.jsxs(ee,{className:l.CSS(l.CSS.B("needle-valve"),e),...o,children:[s.jsxRuntimeExports.jsxs(q,{orientation:t,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:2.2989,top:51.1905,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.7011,top:51.1905,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:87,height:42},orientation:t,color:n,scale:r,children:[s.jsxRuntimeExports.jsx(V,{d:"M43.0152 21.5391L38.237 2.62245C38.1573 2.30658 38.396 2 38.7218 2L48.2782 2C48.604 2 48.8427 2.30658 48.763 2.62245L43.9848 21.5391C43.8576 22.0425 43.1424 22.0425 43.0152 21.5391Z",fill:l.cssString(n)}),s.jsxRuntimeExports.jsx(V,{d:"M43.5 21.5L6.35453 2.70349C4.35901 1.69372 2 3.14384 2 5.38029V37.6197C2 39.8562 4.35901 41.3063 6.35453 40.2965L43.5 21.5ZM43.5 21.5L80.6455 2.70349C82.641 1.69372 85 3.14384 85 5.3803V37.6197C85 39.8562 82.641 41.3063 80.6455 40.2965L43.5 21.5Z"})]})]}),cr=({className:e,orientation:t="left",color:n,scale:r,...o})=>s.jsxRuntimeExports.jsxs(ee,{orientation:t,className:l.CSS(l.CSS.B("angled-relief-valve"),e),...o,children:[s.jsxRuntimeExports.jsxs(q,{children:[s.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:t,left:32.8125,top:97.5922,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.0278,top:45.5639,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:64,height:79},orientation:t,color:n,scale:r,children:[s.jsxRuntimeExports.jsx(W,{x1:21,y1:2,x2:21,y2:36.7,strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M9.05106 14.0802L32.4273 4.29611",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M9.05106 20.0802L32.4273 10.2961",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M9.05106 26.0802L32.4273 16.2961",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M22.3611 35.1077C21.6298 35.4778 21.6298 36.5222 22.3611 36.8923L57.7433 54.7965C59.7388 55.8063 62.0978 54.3562 62.0978 52.1197L62.0978 19.8803C62.0978 17.6438 59.7388 16.1937 57.7433 17.2035L22.3611 35.1077Z"}),s.jsxRuntimeExports.jsx(V,{d:"M21.8923 37.3611C21.5222 36.6298 20.4778 36.6298 20.1077 37.3611L2.20349 72.7433C1.19372 74.7388 2.64384 77.0978 4.8803 77.0978H37.1197C39.3562 77.0978 40.8063 74.7388 39.7965 72.7433L21.8923 37.3611Z"})]})]}),ar=({className:e,color:t,dimensions:n,orientation:r,units:o="psi",children:i,inlineSize:a=80,...u})=>{const x=l.cssString(t),m=c.use(),p=t==null?"var(--pluto-gray-l0)":l.cssString(new l.Color(t).pickByContrast(m.colors.gray.l0,m.colors.gray.l9)),g=2.5*((n==null?void 0:n.width)??0)/500;return s.jsxRuntimeExports.jsxs(ee,{className:l.CSS(l.CSS.B("value"),e),...u,style:{borderColor:x,height:n==null?void 0:n.height,width:"100%"},children:[s.jsxRuntimeExports.jsx("div",{className:l.CSS.BE("value","content"),style:{flexGrow:1,minWidth:n==null?void 0:n.width,inlineSize:a},children:i}),s.jsxRuntimeExports.jsxs(q,{orientation:r,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:"left",left:-2+g,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:"left",left:102-g,top:50,id:"2"}),s.jsxRuntimeExports.jsx(b,{location:"top",orientation:"left",left:50,top:-2,id:"3"}),s.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:"left",left:50,top:102,id:"4"})]}),s.jsxRuntimeExports.jsx("div",{className:l.CSS.BE("value","units"),style:{background:x},children:s.jsxRuntimeExports.jsx(c.Text,{level:"small",color:p,children:o})})]})},ur=({enabled:e=!1,onClick:t,orientation:n="left"})=>s.jsxRuntimeExports.jsxs(ee,{orientation:n,children:[s.jsxRuntimeExports.jsx(c.Switch$1,{value:e,onClick:t,onChange:()=>{}}),s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:0,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:100,top:50,id:"2"})]})]}),xr=({onClick:e,orientation:t="left",label:n="",color:r,size:o,level:i,onClickDelay:a})=>s.jsxRuntimeExports.jsxs(ee,{orientation:t,children:[s.jsxRuntimeExports.jsx(c.Button,{onClick:e,color:r,size:o,level:i,onClickDelay:a,children:n}),s.jsxRuntimeExports.jsxs(q,{orientation:t,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:0,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:100,top:50,id:"2"}),s.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:50,top:0,id:"3"}),s.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:t,left:50,top:100,id:"4"})]})]}),dr=({className:e,orientation:t="left",text:n="",width:r,color:o,level:i,autoFit:a,align:u="center"})=>{const x=c.use(),m=l.cssString(o??x.colors.gray.l0),p={borderColor:m,textAlign:u};return l.g.construct(t)==="y"?p.height=a?"fit-content":r:p.width=a?"fit-content":r,s.jsxRuntimeExports.jsx(ee,{style:p,orientation:t,className:l.CSS(l.CSS.B("text-box"),l.CSS.loc(t),e),children:s.jsxRuntimeExports.jsx(c.Text,{color:m,level:i,children:n})})},pr=({orientation:e="left",className:t,onClick:n,children:r,value:o,units:i,color:a,onChange:u,...x})=>{const[m,p]=d.useState(o);return s.jsxRuntimeExports.jsxs(ee,{className:l.CSS(l.CSS.B("setpoint"),t),orientation:e,...x,children:[s.jsxRuntimeExports.jsxs(q,{orientation:e,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:e,left:1,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:e,left:100,top:50,id:"2"}),s.jsxRuntimeExports.jsx(b,{location:"top",orientation:e,left:50,top:-2,id:"3"}),s.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:e,left:50,top:102,id:"4"})]}),s.jsxRuntimeExports.jsx(c.Numeric,{size:"small",value:m,onChange:p,showDragHandle:!1,selectOnFocus:!0,endContent:i,color:a,style:{[l.CSS.var("pack-border-shade")]:l.cssString(a)},borderWidth:2,children:s.jsxRuntimeExports.jsx(c.Button,{variant:"outlined",size:"small",onClick:()=>u(m),color:a,children:"Set"})})]})},mr=({color:e,className:t,orientation:n="left",scale:r,...o})=>s.jsxRuntimeExports.jsxs(ie,{...o,className:l.CSS(l.CSS.B("screw-pump"),t),orientation:n,children:[s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:64,height:64},color:e,orientation:n,scale:r,children:[s.jsxRuntimeExports.jsx(Te,{cx:"32",cy:"32",r:"30"}),s.jsxRuntimeExports.jsx(W,{x1:"32",y1:"2",x2:"62",y2:"32",className:l.CSS(l.CSS.M("detail"),t)}),s.jsxRuntimeExports.jsx(W,{x1:"32",y1:"62",x2:"62",y2:"32",className:l.CSS(l.CSS.M("detail"),t)}),s.jsxRuntimeExports.jsx(V,{d:"M 0 0, L -10 -10, M 0 0, L -10 10",transform:"translate(32, 32)",strokeLinecap:"round",className:l.CSS(l.CSS.M("detail"),t)}),s.jsxRuntimeExports.jsx(V,{d:"M 0 0, L -10 -10, M 0 0, L -10 10",transform:"translate(42, 32)",strokeLinecap:"round",className:l.CSS(l.CSS.M("detail"),t)})]})]}),jr=({color:e,className:t,orientation:n="left",scale:r,...o})=>s.jsxRuntimeExports.jsxs(ie,{...o,className:l.CSS(l.CSS.B("vacuum-pump"),t),orientation:n,children:[s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:64,height:64},color:e,orientation:n,scale:r,children:[s.jsxRuntimeExports.jsx(Te,{cx:"32",cy:"32",r:"30"}),s.jsxRuntimeExports.jsx(W,{x1:"17",y1:"6.0192",x2:"57.9808",y2:"17",className:l.CSS(l.CSS.M("detail"),t)}),s.jsxRuntimeExports.jsx(W,{x1:"17",y1:"57.9808",x2:"57.9808",y2:"47",className:l.CSS(l.CSS.M("detail"),t)})]})]}),gr=({color:e,className:t,orientation:n="left",scale:r,...o})=>s.jsxRuntimeExports.jsxs(ie,{...o,className:l.CSS(l.CSS.B("cavity-pump"),t),orientation:n,children:[s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:64,height:64},color:e,orientation:n,scale:r,children:[s.jsxRuntimeExports.jsx(Te,{cx:"32",cy:"32",r:"30"}),s.jsxRuntimeExports.jsx(W,{x1:"32",y1:"2",x2:"62",y2:"32",className:l.CSS(l.CSS.M("detail"),t)}),s.jsxRuntimeExports.jsx(W,{x1:"32",y1:"62",x2:"62",y2:"32",className:l.CSS(l.CSS.M("detail"),t)}),s.jsxRuntimeExports.jsx(V,{d:"M 17 26 C 17 20.6667 23 20.6667 23 26 C 23 31.3333 29 31.3333 29 26 C 29 20.6667 35 20.6667 35 26",strokeLinecap:"round",transform:"translate(6, 6)",className:l.CSS(l.CSS.M("detail"),t)})]})]}),fr=({color:e,className:t,orientation:n="left",scale:r,...o})=>s.jsxRuntimeExports.jsxs(ie,{...o,className:l.CSS(l.CSS.B("piston-pump"),t),orientation:n,children:[s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:64,height:64},color:e,orientation:n,scale:r,children:[s.jsxRuntimeExports.jsx(Te,{cx:"32",cy:"32",r:"30"}),s.jsxRuntimeExports.jsx(W,{x1:"32",y1:"2",x2:"62",y2:"32",className:l.CSS(l.CSS.M("detail"),t)}),s.jsxRuntimeExports.jsx(W,{x1:"32",y1:"62",x2:"62",y2:"32",className:l.CSS(l.CSS.M("detail"),t)}),s.jsxRuntimeExports.jsx(V,{d:"M 23 32, h 16, m 0 -8, v 16",className:l.CSS(l.CSS.M("detail"),t),strokeLinecap:"round"})]})]}),hr=({color:e,className:t,orientation:n="left",scale:r,...o})=>s.jsxRuntimeExports.jsxs(ee,{...o,className:l.CSS(l.CSS.B("static-mixer"),t),orientation:n,children:[s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:1.5152,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:98.4848,top:50,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:66,height:30},color:e,orientation:n,scale:r,children:[s.jsxRuntimeExports.jsx(Oe,{x:"1",y:"1",width:"64",height:"28",rx:"2",ry:"2"}),s.jsxRuntimeExports.jsx(V,{d:"M17 10C23 10 27 20 33 20C39 20 43 10 49 10",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M17 20C23 20 27 10 33 10C39 10 43 20 49 20",strokeLinecap:"round"})]})]}),Er=({color:e,className:t,orientation:n="left",scale:r,...o})=>s.jsxRuntimeExports.jsxs(ie,{...o,className:l.CSS(l.CSS.B("rotary-mixer"),t),orientation:n,children:[s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:2,top:48.4849,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:97.5,top:48.4849,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:50,height:33},color:e,orientation:n,scale:r,children:[s.jsxRuntimeExports.jsx(V,{d:"M1 30V2C1 1.44772 1.44772 1 2 1H35.4545C35.7434 1 36.0181 1.12487 36.208 1.34247L48.4262 15.3425C48.7549 15.7192 48.7549 16.2808 48.4262 16.6575L36.208 30.6575C36.0181 30.8751 35.7434 31 35.4545 31H2C1.44772 31 1 30.5523 1 30Z"}),s.jsxRuntimeExports.jsx(W,{x1:"32",y1:"16",x2:"40",y2:"16",strokeLinecap:"round",className:l.CSS(l.CSS.M("detail"),t)}),s.jsxRuntimeExports.jsx(W,{x1:"32",y1:"16",x2:"28",y2:"22.9282",strokeLinecap:"round",className:l.CSS(l.CSS.M("detail"),t)}),s.jsxRuntimeExports.jsx(W,{x1:"32",y1:"16",x2:"28",y2:"9.0717",strokeLinecap:"round",className:l.CSS(l.CSS.M("detail"),t)})]})]}),Sr=({className:e,color:t,orientation:n="left",enabled:r,scale:o,...i})=>s.jsxRuntimeExports.jsxs(ee,{...i,orientation:n,className:l.CSS(l.CSS.B("light"),r&&l.CSS.M("enabled"),e),children:[s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:3.125,top:50,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:96.875,top:50,id:"2"}),s.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:3.125,id:"3"}),s.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:n,left:50,top:96.75,id:"4"})]}),s.jsxRuntimeExports.jsx(K,{dimensions:{width:64,height:64},color:t,orientation:n,scale:o,children:s.jsxRuntimeExports.jsx(Te,{cx:"32",cy:"32",r:"30"})})]}),Rr=({className:e,orientation:t="left",color:n,scale:r,...o})=>s.jsxRuntimeExports.jsxs(ee,{className:l.CSS(e,l.CSS.B("regulator")),...o,children:[s.jsxRuntimeExports.jsxs(q,{orientation:t,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:t,left:3.4091,top:66.25,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:t,left:97.7273,top:66.25,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:88,height:80},orientation:t,color:n,scale:r,children:[s.jsxRuntimeExports.jsx(V,{d:"M44.5 53L7.35453 34.2035C5.35901 33.1937 3 34.6438 3 36.8803V69.1197C3 71.3562 5.35901 72.8063 7.35453 71.7965L44.5 53ZM44.5 53L81.6455 34.2035C83.641 33.1937 86 34.6438 86 36.8803V69.1197C86 71.3562 83.641 72.8063 81.6455 71.7965L44.5 53Z"}),s.jsxRuntimeExports.jsx(Oe,{x:"19",y:"10",width:"51",height:"20",rx:"3",ry:"3"}),s.jsxRuntimeExports.jsx(W,{x1:"44.5",y1:"53",x2:"44.5",y2:"30",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M44.5 10V8C44.5 6.34315 45.3431 5 47 5H80C81.6569 5 83 6.34315 83 8V24.4281C83 25.4126 82.517 26.3344 81.7076 26.8947L44.5 53"})]})]}),yr=({height:e=86,orientation:t="left",color:n,scale:r,...o})=>s.jsxRuntimeExports.jsxs(ie,{...o,className:l.CSS(l.CSS.B("agitator")),children:[s.jsxRuntimeExports.jsx(q,{children:s.jsxRuntimeExports.jsx(b,{location:"bottom",orientation:t,left:50,top:100,id:"1"})}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:86,height:e},color:n,orientation:t,scale:r,children:[s.jsxRuntimeExports.jsx(V,{d:"M1 85V48.8541C1 46.624 3.34694 45.1735 5.34164 46.1708L80.6584 83.8292 C82.6531 84.8265 85 83.376 85 81.1459 V44",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M43 1L43 65",strokeLinecap:"round"})]})]}),Cr=({height:e=86,orientation:t="left",color:n,scale:r,...o})=>s.jsxRuntimeExports.jsxs(ie,{...o,className:l.CSS(l.CSS.B("agitator")),children:[s.jsxRuntimeExports.jsx(q,{children:s.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:51,top:2,id:"4"})}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:86,height:e},color:n,orientation:t,scale:r,children:[s.jsxRuntimeExports.jsx(V,{d:"M43.5 69.573L14.9534 55.6147C8.97428 52.6911 2 57.0443 2 63.6999V75.4462C2 82.1018 8.97429 86.455 14.9534 83.5314L43.5 69.573ZM43.5 69.573L72.0466 55.6147C78.0257 52.6911 85 57.0443 85 63.6999V75.4462C85 82.1018 78.0257 86.455 72.0466 83.5314L43.5 69.573Z"}),s.jsxRuntimeExports.jsx(V,{d:"M43.5 69.6L43.5 2",strokeLinecap:"round"})]})]}),br=({height:e=86,orientation:t="left",color:n,scale:r,...o})=>s.jsxRuntimeExports.jsxs(ie,{...o,className:l.CSS(l.CSS.B("agitator")),children:[s.jsxRuntimeExports.jsx(q,{children:s.jsxRuntimeExports.jsx(b,{location:"top",orientation:t,left:50,top:2,id:"4"})}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:86,height:e},color:n,orientation:t,scale:r,children:[s.jsxRuntimeExports.jsx(W,{x1:"43",y1:"1",x2:"43",y2:"49",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(Oe,{x:"3",y:"49",width:"80",height:"34",rx:"3",strokeLinecap:"round"})]})]}),vr=({className:e,height:t=86,orientation:n="left",color:r,scale:o,...i})=>s.jsxRuntimeExports.jsxs(ie,{...i,className:l.CSS(l.CSS.B("agitator")),children:[s.jsxRuntimeExports.jsx(q,{children:s.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:2,id:"4"})}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:86,height:t},color:r,orientation:n,scale:o,children:[s.jsxRuntimeExports.jsx(W,{x1:"43",y1:"1",x2:"43",y2:"49",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(Oe,{x:"3",y:"49",width:"80",height:"34",rx:"3"}),s.jsxRuntimeExports.jsx(W,{x1:"3.8",y1:"82.1",x2:"43",y2:"49",className:l.CSS(l.CSS.M("detail"),e),strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(W,{x1:"43",y1:"49",x2:"43",y2:"83",className:l.CSS(l.CSS.M("detail"),e),strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(W,{x1:"43",y1:"83",x2:"82.2",y2:"49.9",className:l.CSS(l.CSS.M("detail"),e),strokeLinecap:"round"})]})]}),wr=({className:e,height:t=86,orientation:n="left",color:r,scale:o,...i})=>s.jsxRuntimeExports.jsxs(ie,{...i,className:l.CSS(l.CSS.B("agitator")),children:[s.jsxRuntimeExports.jsx(q,{children:s.jsxRuntimeExports.jsx(b,{location:"top",orientation:n,left:50,top:2,id:"4"})}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:86,height:t},color:r,orientation:n,scale:o,children:[s.jsxRuntimeExports.jsx(W,{x1:"43",y1:"1",x2:"43",y2:"49",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(W,{x1:"3",y1:"49",x2:"83",y2:"49",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(W,{x1:"3",y1:"83",x2:"83",y2:"83",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(W,{x1:"43",y1:"49",x2:"43",y2:"83",strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(Oe,{x:"3",y:"49",width:"80",height:"34",strokeWidth:0})]})]}),Pr=({className:e,height:t=86,orientation:n="left",color:r,scale:o,...i})=>s.jsxRuntimeExports.jsxs(ie,{...i,className:l.CSS(l.CSS.B("agitator")),children:[s.jsxRuntimeExports.jsx(q,{children:s.jsxRuntimeExports.jsx(b,{location:"top",left:50,top:2,id:"4",orientation:n})}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:86,height:t},color:r,orientation:n,scale:o,children:[s.jsxRuntimeExports.jsx(W,{x1:43,y1:1,x2:43,y2:60,strokeLinecap:"round"}),s.jsxRuntimeExports.jsx(V,{d:"M5.375 36L70.8204 48.7138C74.0584 49.3428 74.0573 53.9765 70.8189 54.6039L14.7952 65.4584C11.5729 66.0827 11.5494 70.6856 14.7651 71.3429L81.5208 84.9873",strokeLinecap:"round"})]})]}),kr=({color:e,className:t,orientation:n="left",scale:r,...o})=>s.jsxRuntimeExports.jsxs(ie,{...o,className:l.CSS(l.CSS.B("compressor"),t),orientation:n,children:[s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,left:1.5,top:41,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",orientation:n,left:95,top:3,id:"2"})]}),s.jsxRuntimeExports.jsxs(K,{dimensions:{width:68,height:61},color:e,orientation:n,scale:r,children:[s.jsxRuntimeExports.jsx(Te,{cx:"35",cy:"25",r:"23"}),s.jsxRuntimeExports.jsx(V,{d:"M50 41.5L56.7186 50.8314C57.6711 52.1544 56.7257 54 55.0955 54H14.9045C13.2743 54 12.3289 52.1544 13.2814 50.8314L20 41.5"}),s.jsxRuntimeExports.jsx(W,{x1:"35",y1:"2",x2:"65.0167",y2:"2"}),s.jsxRuntimeExports.jsx(W,{x1:"1",y1:"25",x2:"35",y2:"25"})]})]}),Lr=({id:e,className:t,orientation:n="right",label:r="text",color:o="black",level:i="p",...a})=>{const u=document.querySelector(`[data-id="${e}"]`);u&&u.classList.add(n);const x=l.g.construct(n)==="y";return s.jsxRuntimeExports.jsxs(ee,{className:l.CSS(l.CSS.B("arrow"),l.CSS.loc(n),t),orientation:n,...a,children:[s.jsxRuntimeExports.jsx("div",{className:"wrapper",children:s.jsxRuntimeExports.jsx("div",{className:"outline",style:{backgroundColor:l.cssString(o)},children:s.jsxRuntimeExports.jsx("div",{className:"bg",children:s.jsxRuntimeExports.jsx(c.Text,{level:i,className:l.CSS.BE("symbol","label"),children:r})})})}),s.jsxRuntimeExports.jsxs(q,{orientation:n,children:[s.jsxRuntimeExports.jsx(b,{location:"left",orientation:n,preventAutoAdjust:!0,left:98,top:50,swap:x,id:"1"}),s.jsxRuntimeExports.jsx(b,{location:"right",preventAutoAdjust:!0,orientation:n,left:1,top:50,swap:x,id:"2"})]}),s.jsxRuntimeExports.jsx("svg",{style:{visibility:"hidden",position:"absolute"},width:"0",height:"0",xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:s.jsxRuntimeExports.jsx("defs",{children:s.jsxRuntimeExports.jsxs("filter",{id:"goo",children:[s.jsxRuntimeExports.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"1.5",result:"blur"}),s.jsxRuntimeExports.jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 19 -9",result:"goo"}),s.jsxRuntimeExports.jsx("feComposite",{in:"SourceGraphic",in2:"goo",operator:"atop"})]})})})]})},pu=({aetherKey:e,sink:t})=>{const n=c.useMemoDeepEqualProps({sink:t}),[,,r]=c.use$3({aetherKey:e,type:j.Button.TYPE,schema:j.buttonStateZ,initialState:{trigger:0,sink:t}});return d.useEffect(()=>{r(i=>({...i,...n}))},[n]),{click:d.useCallback(()=>{r(i=>({...i,trigger:i.trigger+1}))},[r])}},mu=({aetherKey:e,source:t})=>{const n=c.useMemoDeepEqualProps({source:t}),[,{enabled:r},o]=c.use$3({aetherKey:e,type:j.Light.TYPE,schema:j.lightStateZ,initialState:{enabled:!1,...n}});return d.useEffect(()=>o(i=>({...i,...n})),[n,o]),{enabled:r}},H=d.forwardRef(({label:e="",onChange:t,level:n="p",children:r,orientation:o="top",style:i,className:a,maxInlineSize:u=150,...x},m)=>s.jsxRuntimeExports.jsxs(D.Space,{style:{marginRight:o==="right"?1:0,marginTop:o==="top"?1:0,...i},size:2/3,direction:o,ref:m,className:l.CSS(l.CSS.B("symbol"),a),align:"center",justify:"center",...x,children:[e.length>0&&s.jsxRuntimeExports.jsx(c.Editable,{className:l.CSS.BE("symbol","label"),value:e,style:{maxInlineSize:u},onChange:d.useCallback(p=>t({label:{label:p,level:n,orientation:o}}),[t,n]),level:n}),r]}));H.displayName="Labeled";const ju=({aetherKey:e,source:t,sink:n})=>{const r=c.useMemoDeepEqualProps({source:t,sink:n}),[,{value:o},i]=c.use$3({aetherKey:e,type:j.Setpoint.TYPE,schema:j.setpointStateZ,initialState:{trigger:0,value:0,...r}});return d.useEffect(()=>{i(u=>({...u,...r}))},[r,i]),{set:d.useCallback(u=>i(x=>({...x,trigger:x.trigger+1,command:u})),[i]),value:o}},oe=({aetherKey:e,source:t,sink:n})=>{const r=c.useMemoDeepEqualProps({source:t,sink:n}),[,{triggered:o,enabled:i},a]=c.use$3({aetherKey:e,type:j.Toggle.TYPE,schema:j.toggleStateZ,initialState:{triggered:!1,enabled:!1,...r}});return d.useEffect(()=>{a(x=>({...x,...r}))},[r,a]),{toggle:d.useCallback(()=>a(x=>({...x,triggered:!x.triggered})),[a]),triggered:o,enabled:i}},gu=j.Value.z.omit({font:!0}).partial({color:!0}).extend({level:C.levelZ.optional()}),Tr=({aetherKey:e,box:t,telem:n,color:r,precision:o,minWidth:i,level:a="small"})=>{const u=c.useMemoDeepEqualProps({box:t,telem:n,color:r,precision:o,level:a,minWidth:i}),[,x,m]=c.use$3({aetherKey:e,type:j.Value.TYPE,schema:j.Value.z,initialState:u});return d.useLayoutEffect(()=>m(p=>({...p,...u})),[u]),{width:x.width??x.minWidth}},fu=Object.freeze(Object.defineProperty({__proto__:null,corePropsZ:gu,use:Tr},Symbol.toStringTag,{value:"Module"})),Mr=e=>l.g.construct(e)==="x"?l.J.swap(e):e,hu=e=>l.g.construct(e)==="y"?l.J.swap(e):e,X=({showChip:e=!0,showIndicator:t=!0,indicator:n,orientation:r="left",chip:o,children:i,show:a=!0,...u})=>s.jsxRuntimeExports.jsxs(D.Space,{direction:l.J.rotate90(r),align:"center",justify:"center",empty:!0,...u,children:[s.jsxRuntimeExports.jsxs(D.Space,{direction:l.g.construct(r),align:"center",className:l.CSS(l.CSS.B("control-state")),size:"small",children:[a&&e&&s.jsxRuntimeExports.jsx($n,{size:"small",...o}),a&&t&&s.jsxRuntimeExports.jsx(Bn,{...n})]}),i]}),$r=c.wrap$1("ThreeWayValve",({aetherKey:e,label:t,onChange:n,control:r,source:o,sink:i,orientation:a="left",...u})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:o,sink:i});return s.jsxRuntimeExports.jsx(H,{...t,onChange:n,children:s.jsxRuntimeExports.jsx(X,{...r,orientation:Mr(a),children:s.jsxRuntimeExports.jsx(Un,{enabled:x,triggered:m,onClick:p,orientation:a,...u})})})}),Nr=e=>s.jsxRuntimeExports.jsx(Un,{...e}),_r=c.wrap$1("Valve",({control:e,aetherKey:t,label:n,onChange:r,source:o,sink:i,orientation:a,...u})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:t,source:o,sink:i});return s.jsxRuntimeExports.jsx(H,{...n,onChange:r,children:s.jsxRuntimeExports.jsx(X,{...e,orientation:a,children:s.jsxRuntimeExports.jsx(Gn,{enabled:x,triggered:m,onClick:p,orientation:a,...u})})})}),Br=e=>s.jsxRuntimeExports.jsx(Gn,{...e}),Ar=c.wrap$1("SolenoidValve",({aetherKey:e,label:t,onChange:n,orientation:r="left",normallyOpen:o,source:i,sink:a,control:u,...x})=>{const{enabled:m,triggered:p,toggle:g}=oe({aetherKey:e,source:i,sink:a});return s.jsxRuntimeExports.jsx(H,{...t,onChange:n,children:s.jsxRuntimeExports.jsx(X,{...u,orientation:hu(r),children:s.jsxRuntimeExports.jsx(Wn,{enabled:m,triggered:p,onClick:g,orientation:r,normallyOpen:o,...x})})})}),Or=e=>s.jsxRuntimeExports.jsx(Wn,{...e}),zr=c.wrap$1("FourWayValve",({aetherKey:e,control:t,label:n,onChange:r,orientation:o,source:i,sink:a,...u})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:i,sink:a});return s.jsxRuntimeExports.jsx(H,{...n,onChange:r,children:s.jsxRuntimeExports.jsx(X,{...t,orientation:o,children:s.jsxRuntimeExports.jsx(Yn,{enabled:x,triggered:m,onClick:p,orientation:o,...u})})})}),Dr=e=>s.jsxRuntimeExports.jsx(Yn,{...e}),Vr=c.wrap$1("AngleValve",({aetherKey:e,label:t,control:n,onChange:r,orientation:o="left",source:i,sink:a,...u})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:i,sink:a});return s.jsxRuntimeExports.jsx(H,{...t,onChange:r,children:s.jsxRuntimeExports.jsx(X,{...n,orientation:Mr(o),children:s.jsxRuntimeExports.jsx(Xn,{enabled:x,triggered:m,onClick:p,orientation:o,...u})})})}),Ir=e=>s.jsxRuntimeExports.jsx(Xn,{...e}),Zr=c.wrap$1("Pump",({aetherKey:e,label:t,control:n,onChange:r,orientation:o,source:i,sink:a,...u})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:i,sink:a});return s.jsxRuntimeExports.jsx(H,{...t,onChange:r,children:s.jsxRuntimeExports.jsx(X,{...n,orientation:o,children:s.jsxRuntimeExports.jsx(Jn,{enabled:x,triggered:m,onClick:p,orientation:o,...u})})})}),Fr=e=>s.jsxRuntimeExports.jsx(Jn,{...e}),qr=({backgroundColor:e,label:t,onChange:n,orientation:r,color:o,dimensions:i,borderRadius:a})=>s.jsxRuntimeExports.jsx(H,{...t,onChange:n,children:s.jsxRuntimeExports.jsx(Rt,{onResize:u=>n({dimensions:u}),orientation:r,color:o,dimensions:i,borderRadius:a,backgroundColor:e})}),Hr=e=>s.jsxRuntimeExports.jsx(Rt,{...e,dimensions:{width:25,height:50}}),Yr=({backgroundColor:e,borderRadius:t,label:n,onChange:r,orientation:o,color:i,dimensions:a})=>s.jsxRuntimeExports.jsx(H,{...n,onChange:r,children:s.jsxRuntimeExports.jsx(Rt,{onResize:u=>r({dimensions:u}),orientation:o,color:i,dimensions:a,boxBorderRadius:t,backgroundColor:e})}),Ur=e=>s.jsxRuntimeExports.jsx(Rt,{...e,dimensions:{width:25,height:50},borderRadius:0}),Gr=({label:e,onChange:t,aetherKey:n,...r})=>s.jsxRuntimeExports.jsx(H,{...e,onChange:t,children:s.jsxRuntimeExports.jsx(Kn,{...r})}),Wr=e=>s.jsxRuntimeExports.jsx(Kn,{...e}),Kr=({label:e,onChange:t,aetherKey:n,...r})=>s.jsxRuntimeExports.jsx(H,{...e,onChange:t,children:s.jsxRuntimeExports.jsx(or,{...r})}),Qr=e=>s.jsxRuntimeExports.jsx(or,{...e}),Xr=({label:e,onChange:t,aetherKey:n,...r})=>s.jsxRuntimeExports.jsx(H,{...e,onChange:t,children:s.jsxRuntimeExports.jsx(Rr,{...r})}),Jr=e=>s.jsxRuntimeExports.jsx(Rr,{...e}),eo=({label:e,onChange:t,aetherKey:n,...r})=>s.jsxRuntimeExports.jsx(H,{...e,onChange:t,children:s.jsxRuntimeExports.jsx(er,{...r})}),to=e=>s.jsxRuntimeExports.jsx(er,{...e}),so=({label:e,aetherKey:t,onChange:n,...r})=>s.jsxRuntimeExports.jsx(H,{...e,onChange:n,children:s.jsxRuntimeExports.jsx(tr,{...r})}),no=e=>s.jsxRuntimeExports.jsx(tr,{...e}),ro=({label:e,aetherKey:t,onChange:n,...r})=>s.jsxRuntimeExports.jsx(H,{...e,onChange:n,children:s.jsxRuntimeExports.jsx(sr,{...r})}),oo=e=>s.jsxRuntimeExports.jsx(sr,{...e}),lo=c.wrap$1("Setpoint",({label:e,aetherKey:t,orientation:n,control:r,units:o,source:i,sink:a,color:u,onChange:x})=>{const{value:m,set:p}=ju({aetherKey:t,source:i,sink:a});return s.jsxRuntimeExports.jsx(H,{...e,onChange:x,children:s.jsxRuntimeExports.jsx(X,{...r,className:l.CSS.B("symbol"),orientation:n,children:s.jsxRuntimeExports.jsx(pr,{value:m,onChange:p,units:o,color:u,orientation:n})})})}),io=e=>s.jsxRuntimeExports.jsx(pr,{value:12,onChange:()=>{},units:"mV",...e,children:s.jsxRuntimeExports.jsx(c.Text,{level:"p",children:"10.0"})}),co=({label:e,aetherKey:t,onChange:n,...r})=>s.jsxRuntimeExports.jsx(H,{...e,onChange:n,children:s.jsxRuntimeExports.jsx(nr,{...r})}),ao=e=>s.jsxRuntimeExports.jsx(nr,{...e}),uo=({label:e,onChange:t,aetherKey:n,...r})=>s.jsxRuntimeExports.jsx(H,{...e,onChange:t,children:s.jsxRuntimeExports.jsx(ir,{...r})}),xo=e=>s.jsxRuntimeExports.jsx(ir,{...e}),po=({label:e,onChange:t,aetherKey:n,...r})=>s.jsxRuntimeExports.jsx(H,{...e,onChange:t,children:s.jsxRuntimeExports.jsx(Qn,{...r})}),mo=e=>s.jsxRuntimeExports.jsx(Qn,{...e}),jo=({label:e,onChange:t,aetherKey:n,...r})=>s.jsxRuntimeExports.jsx(H,{...e,onChange:t,children:s.jsxRuntimeExports.jsx(lr,{...r})}),go=e=>s.jsxRuntimeExports.jsx(lr,{...e}),fo=({label:e,onChange:t,aetherKey:n,...r})=>s.jsxRuntimeExports.jsx(H,{...e,onChange:t,children:s.jsxRuntimeExports.jsx(cr,{...r})}),ho=e=>s.jsxRuntimeExports.jsx(cr,{...e}),Eo=c.wrap$1("Value",({aetherKey:e,label:t,level:n="p",position:r,className:o,textColor:i,color:a,telem:u,units:x,onChange:m,tooltip:p,inlineSize:g})=>{const h=c.useTypography(n),[f,E]=d.useState({outerBox:l.Eo.ZERO,labelBox:l.Eo.ZERO}),R=(h.lineHeight+.5)*h.baseSize+2,k=c.useResize(d.useCallback(P=>{const S=document.querySelector(`.react-flow__node[data-id="${e}"] .pluto-symbol__label`);let v={...l.Eo.ZERO};S!=null&&(v=l.Eo.construct(S),v=l.Eo.resize(v,{width:l.Eo.width(v),height:l.Eo.height(v)})),E({outerBox:P,labelBox:v})},[]),{}),{zoom:T}=j.useInitialViewport(),M=Su({labelOrientation:(t==null?void 0:t.orientation)??"top",hasLabel:(t==null?void 0:t.label)!=null&&(t==null?void 0:t.label.length)>0,valueBoxHeight:R,position:r,zoom:T,...f}),{width:$}=Tr({aetherKey:e,color:i,level:n,box:M,telem:u,minWidth:g});return s.jsxRuntimeExports.jsxs(c.Dialog$1,{location:{y:"top"},hide:p==null||p.length===0,children:[s.jsxRuntimeExports.jsx(D.Space,{direction:"y",children:p==null?void 0:p.map((P,S)=>s.jsxRuntimeExports.jsx(c.Text,{level:"small",children:P},S))}),s.jsxRuntimeExports.jsx(H,{className:l.CSS(o,l.CSS.B("value-labeled")),ref:k,onChange:m,...t,children:s.jsxRuntimeExports.jsx(ar,{color:a,dimensions:{height:R,width:$},inlineSize:g,units:x})})]})}),Eu=.9,Su=({labelOrientation:e,outerBox:t,labelBox:n,valueBoxHeight:r,position:o,hasLabel:i,zoom:a})=>{const u=l.q.scale(l.Eo.dims(n),1/(Eu*a));return l.g.construct(e)==="x"&&(o=l.q.translate(o,"y",Math.max((u.y-r)/2-1,0))),i&&e==="left"?o=l.q.translate(o,"x",u.x+4):i&&e==="top"&&(o=l.q.translate(o,"y",u.y+4)),l.Eo.construct(o.x,o.y,l.Eo.width(t),r)},So=({color:e})=>s.jsxRuntimeExports.jsx(ar,{color:e,dimensions:{width:60,height:25},units:"psi",children:s.jsxRuntimeExports.jsx(c.Text,{level:"p",children:"50.00"})}),Ro=c.wrap$1("Switch",({aetherKey:e,label:t,control:n,onChange:r,orientation:o,source:i,sink:a,...u})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:i,sink:a});return s.jsxRuntimeExports.jsx(H,{...t,onChange:r,children:s.jsxRuntimeExports.jsx(X,{...n,orientation:o,children:s.jsxRuntimeExports.jsx(ur,{enabled:x,triggered:m,onClick:p,orientation:o,...u})})})}),yo=e=>s.jsxRuntimeExports.jsx(ur,{...e}),Co=c.wrap$1("Button",({aetherKey:e,label:t,orientation:n,sink:r,control:o,...i})=>{const{click:a}=pu({aetherKey:e,sink:r});return s.jsxRuntimeExports.jsx(X,{...o,className:l.CSS.B("symbol"),orientation:n,children:s.jsxRuntimeExports.jsx(xr,{...t,onClick:a,...i})})}),bo=({label:e,...t})=>s.jsxRuntimeExports.jsx(xr,{label:"Button",...t}),vo=c.wrap$1("screwPump",({aetherKey:e,label:t,control:n,onChange:r,orientation:o,source:i,sink:a,...u})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:i,sink:a});return s.jsxRuntimeExports.jsx(H,{...t,onChange:r,children:s.jsxRuntimeExports.jsx(X,{...n,orientation:o,children:s.jsxRuntimeExports.jsx(mr,{enabled:x,triggered:m,onClick:p,orientation:o,...u})})})}),wo=e=>s.jsxRuntimeExports.jsx(mr,{...e}),Po=c.wrap$1("vacuumPump",({aetherKey:e,label:t,control:n,onChange:r,orientation:o,source:i,sink:a,...u})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:i,sink:a});return s.jsxRuntimeExports.jsx(H,{...t,onChange:r,children:s.jsxRuntimeExports.jsx(X,{...n,orientation:o,children:s.jsxRuntimeExports.jsx(jr,{enabled:x,triggered:m,onClick:p,orientation:o,...u})})})}),ko=e=>s.jsxRuntimeExports.jsx(jr,{...e}),Lo=c.wrap$1("progressiveCavityPump",({aetherKey:e,label:t,control:n,onChange:r,orientation:o,source:i,sink:a,...u})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:i,sink:a});return s.jsxRuntimeExports.jsx(H,{...t,onChange:r,children:s.jsxRuntimeExports.jsx(X,{...n,orientation:o,children:s.jsxRuntimeExports.jsx(gr,{enabled:x,triggered:m,onClick:p,orientation:o,...u})})})}),To=e=>s.jsxRuntimeExports.jsx(gr,{...e}),Mo=c.wrap$1("pistonPump",({aetherKey:e,label:t,control:n,onChange:r,orientation:o,source:i,sink:a,...u})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:i,sink:a});return s.jsxRuntimeExports.jsx(H,{...t,onChange:r,children:s.jsxRuntimeExports.jsx(X,{...n,orientation:o,children:s.jsxRuntimeExports.jsx(fr,{enabled:x,triggered:m,onClick:p,orientation:o,...u})})})}),$o=e=>s.jsxRuntimeExports.jsx(fr,{...e}),No=({label:e,onChange:t,aetherKey:n,...r})=>s.jsxRuntimeExports.jsx(H,{...e,onChange:t,children:s.jsxRuntimeExports.jsx(hr,{...r})}),_o=e=>s.jsxRuntimeExports.jsx(hr,{...e}),Bo=c.wrap$1("rotaryMixer",({aetherKey:e,label:t,control:n,onChange:r,orientation:o,source:i,sink:a,...u})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:i,sink:a});return s.jsxRuntimeExports.jsx(H,{...t,onChange:r,children:s.jsxRuntimeExports.jsx(X,{...n,orientation:o,children:s.jsxRuntimeExports.jsx(Er,{enabled:x,triggered:m,onClick:p,orientation:o,...u})})})}),Ao=e=>s.jsxRuntimeExports.jsx(Er,{...e}),Oo=c.wrap$1("light",({aetherKey:e,label:t,source:n,onChange:r,...o})=>{const{enabled:i}=mu({aetherKey:e,source:n});return s.jsxRuntimeExports.jsx(H,{...t,onChange:r,children:s.jsxRuntimeExports.jsx(Sr,{enabled:i,...o})})}),zo=e=>s.jsxRuntimeExports.jsx(Sr,{...e}),Do=c.wrap$1("agitator",({aetherKey:e,label:t,orientation:n="left",source:r,sink:o,onChange:i,control:a,...u})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:r,sink:o});return s.jsxRuntimeExports.jsx(H,{...t,onChange:i,children:s.jsxRuntimeExports.jsx(X,{orientation:n,...a,children:s.jsxRuntimeExports.jsx(yr,{enabled:x,orientation:n,triggered:m,onClick:p,...u})})})}),Vo=e=>s.jsxRuntimeExports.jsx(yr,{...e}),Io=c.wrap$1("propellerAgitator",({aetherKey:e,label:t,orientation:n="left",source:r,sink:o,onChange:i,control:a,...u})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:r,sink:o});return s.jsxRuntimeExports.jsx(H,{...t,onChange:i,children:s.jsxRuntimeExports.jsx(X,{orientation:n,...a,children:s.jsxRuntimeExports.jsx(Cr,{enabled:x,orientation:n,triggered:m,onClick:p,...u})})})}),Zo=e=>s.jsxRuntimeExports.jsx(Cr,{...e}),Fo=c.wrap$1("flatBladeAgitator",({aetherKey:e,label:t,orientation:n="left",source:r,sink:o,onChange:i,control:a,...u})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:r,sink:o});return s.jsxRuntimeExports.jsx(H,{...t,onChange:i,children:s.jsxRuntimeExports.jsx(X,{orientation:n,...a,children:s.jsxRuntimeExports.jsx(br,{enabled:x,orientation:n,triggered:m,onClick:p,...u})})})}),qo=e=>s.jsxRuntimeExports.jsx(br,{...e}),Ho=c.wrap$1("paddleAgitator",({aetherKey:e,label:t,orientation:n="left",source:r,sink:o,onChange:i,control:a,...u})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:r,sink:o});return s.jsxRuntimeExports.jsx(H,{...t,onChange:i,children:s.jsxRuntimeExports.jsx(X,{orientation:n,...a,children:s.jsxRuntimeExports.jsx(vr,{enabled:x,orientation:n,triggered:m,onClick:p,...u})})})}),Yo=e=>s.jsxRuntimeExports.jsx(vr,{...e}),Uo=c.wrap$1("crossBeamAgitator",({aetherKey:e,label:t,orientation:n="left",source:r,sink:o,onChange:i,control:a,...u})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:r,sink:o});return s.jsxRuntimeExports.jsx(H,{...t,onChange:i,children:s.jsxRuntimeExports.jsx(X,{orientation:n,...a,children:s.jsxRuntimeExports.jsx(wr,{enabled:x,orientation:n,triggered:m,onClick:p,...u})})})}),Go=e=>s.jsxRuntimeExports.jsx(wr,{...e}),Wo=c.wrap$1("helicalAgitator",({aetherKey:e,label:t,orientation:n="left",source:r,sink:o,onChange:i,control:a,...u})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:r,sink:o});return s.jsxRuntimeExports.jsx(H,{...t,onChange:i,children:s.jsxRuntimeExports.jsx(X,{orientation:n,...a,children:s.jsxRuntimeExports.jsx(Pr,{enabled:x,orientation:n,triggered:m,onClick:p,...u})})})}),Ko=e=>s.jsxRuntimeExports.jsx(Pr,{...e}),Qo=c.wrap$1("compressor",({aetherKey:e,label:t,orientation:n="left",source:r,sink:o,onChange:i,control:a,...u})=>{const{enabled:x,triggered:m,toggle:p}=oe({aetherKey:e,source:r,sink:o});return s.jsxRuntimeExports.jsx(H,{...t,onChange:i,children:s.jsxRuntimeExports.jsx(X,{orientation:n,...a,children:s.jsxRuntimeExports.jsx(kr,{enabled:x,orientation:n,triggered:m,onClick:p,...u})})})}),Xo=e=>s.jsxRuntimeExports.jsx(kr,{...e}),Jo=e=>s.jsxRuntimeExports.jsx(dr,{...e}),el=({level:e="p",width:t=100,...n})=>s.jsxRuntimeExports.jsx(dr,{className:l.CSS.B("symbol"),level:e,width:t,...n}),tl=({label:{label:e,level:t},aetherKey:n,position:r,...o})=>s.jsxRuntimeExports.jsx(Lr,{label:e,level:t,...o,className:l.CSS.B("symbol")}),sl=({label:e,...t})=>s.jsxRuntimeExports.jsx(Lr,{label:"Off Page",...t,orientation:"right"}),Y=4,nl=2,Ru=["agitator","angledReliefValve","angledValve","offPageReference","box","burstDisc","button","cap","cavityPump","checkValve","compressor","crossBeamAgitator","electricRegulator","filter","flatBladeAgitator","fourWayValve","helicalAgitator","light","manualValve","needleValve","orifice","paddleAgitator","propellerAgitator","pistonPump","pump","regulator","reliefValve","rotaryMixer","screwPump","setpoint","solenoidValve","staticMixer","switch","tank","textBox","threeWayValve","vacuumPump","value","valve"],yu=pe.z.enum(Ru),J={orientation:"left",scale:1},Cu={...J,source:j.sourcePipeline("string",{connections:[{from:"valueStream",to:"rollingAverage"},{from:"rollingAverage",to:"stringifier"}],segments:{valueStream:j.streamChannelValue({channel:0}),rollingAverage:j.rollingAverage({windowSize:1}),stringifier:j.stringifyNumber({precision:2})},outlet:"stringifier"})},bu={...J,source:j.sourcePipeline("number",{connections:[],segments:{valueStream:j.streamChannelValue({channel:0})},outlet:"valueStream"})},vu={...J,sink:j.sinkPipeline("number",{connections:[],segments:{setter:j.setChannelValue({channel:0})},inlet:"setter"})},rl={...J,source:j.sourcePipeline("boolean",{connections:[{from:"valueStream",to:"threshold"}],segments:{valueStream:j.streamChannelValue({channel:0}),threshold:j.withinBounds({trueBound:{lower:.9,upper:1.1}})},outlet:"threshold"})},ol={...J,control:{show:!0},sink:j.sinkPipeline("boolean",{connections:[{from:"setpoint",to:"setter"}],segments:{setter:j.setChannelValue({channel:0}),setpoint:j.setpoint({truthy:1,falsy:0})},inlet:"setpoint"})},le={...rl,...ol},Z=e=>({label:{label:e,level:"p",orientation:"top",maxInlineSize:150,align:"center"}}),wu={width:125,height:200},ls={dimensions:wu},Pu=3,ku={name:"Three Way Valve",key:"threeWayValve",Form:re,Symbol:$r,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Three Way Valve"),...le}),Preview:Nr,zIndex:Y},Lu={name:"Valve",key:"valve",Form:re,Symbol:_r,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Valve"),...le}),Preview:Br,zIndex:Y},Tu={name:"Solenoid Valve",key:"solenoidValve",Form:re,Symbol:Ar,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Solenoid Valve"),normallyOpen:!1,...le}),Preview:Or,zIndex:Y},Mu={name:"Four Way Valve",key:"fourWayValve",Form:re,Symbol:zr,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Four Way Valve"),...le}),Preview:Dr,zIndex:Y},$u={name:"Angled Valve",key:"angledValve",Form:re,Symbol:Vr,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Angled Valve"),...le}),Preview:Ir,zIndex:Y},Nu={name:"Pump",key:"pump",Form:re,Symbol:Zr,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Pump"),...le}),Preview:Fr,zIndex:Y},_u={name:"Screw Pump",key:"screwPump",Form:re,Symbol:vo,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Screw Pump"),...le}),Preview:wo,zIndex:Y},Bu={name:"Tank",key:"tank",Form:qn,Symbol:qr,defaultProps:e=>({color:e.colors.gray.l9.rgba255,backgroundColor:e.colors.gray.l1.setAlpha(0).rgba255,...Z("Tank"),borderRadius:rr,...ls,...J}),Preview:Hr,zIndex:nl},Au={name:"Box",key:"box",Form:()=>qn({includeBorderRadius:!0}),Symbol:Yr,defaultProps:e=>({color:e.colors.gray.l9.rgba255,backgroundColor:e.colors.gray.l1.setAlpha(0).rgba255,...Z("Box"),borderRadius:Pu,...ls,...J}),Preview:Ur,zIndex:nl},Ou={name:"Relief Valve",key:"reliefValve",Form:ae,Symbol:Gr,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Relief Valve"),...J}),Preview:Wr,zIndex:Y},zu={name:"Regulator",key:"regulator",Form:ae,Symbol:Kr,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Regulator"),...J}),Preview:Qr,zIndex:Y},Du={name:"Electric Regulator",key:"electricRegulator",Form:ae,Symbol:Xr,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Electric Regulator"),...J}),Preview:Jr,zIndex:Y},Vu={name:"Burst Disc",key:"burstDisc",Form:ae,Symbol:eo,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Burst Disc"),...J}),Preview:to,zIndex:Y},Iu={name:"Cap",key:"cap",Form:ae,Symbol:so,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Cap"),...J}),Preview:no,zIndex:Y},Zu={name:"Manual Valve",key:"manualValve",Form:ae,Symbol:ro,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Manual Valve"),...J}),Preview:oo,zIndex:Y},Fu={name:"Filter",key:"filter",Form:ae,Symbol:co,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Filter"),...J}),Preview:ao,zIndex:Y},qu={name:"Needle Valve",key:"needleValve",Form:ae,Symbol:uo,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Needle Valve"),...J}),Preview:xo,zIndex:Y},Hu={name:"Check Valve",key:"checkValve",Form:ae,Symbol:po,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Check Valve"),...J}),Preview:mo,zIndex:Y},Yu={name:"Orifice",key:"orifice",Form:ae,Symbol:jo,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Orifice"),...J}),Preview:go,zIndex:Y},Uu={name:"Angled Relief Valve",key:"angledReliefValve",Form:ae,Symbol:fo,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Angled Relief Valve"),...J}),Preview:ho,zIndex:Y},Gu={name:"Value",key:"value",Form:Ka,Symbol:Eo,Preview:So,defaultProps:e=>({color:e.colors.gray.l9.rgba255,units:"psi",level:"h5",inlineSize:70,...Z("Value"),...J,telem:Cu.source}),zIndex:Y},Wu={name:"Button",key:"button",Symbol:Co,Form:eu,Preview:bo,defaultProps:e=>({color:e.colors.primary.z.rgba255,...Z("Button"),...ol,onClickDelay:0,scale:null}),zIndex:Y},Ku={name:"Switch",key:"switch",Symbol:Ro,Preview:yo,Form:re,defaultProps:()=>({...Z("Switch"),...le,scale:null}),zIndex:Y},Qu={name:"Vacuum Pump",key:"vacuumPump",Symbol:Po,Form:re,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Vacuum Pump"),...le}),Preview:ko,zIndex:Y},Xu={name:"Cavity Pump",key:"cavityPump",Symbol:Lo,Form:re,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Cavity Pump"),...le}),Preview:To,zIndex:Y},Ju={name:"Piston Pump",key:"pistonPump",Symbol:Mo,Form:re,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Piston Pump"),...le}),Preview:$o,zIndex:Y},ex={name:"Static Mixer",key:"staticMixer",Symbol:No,Form:ae,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Static Mixer"),...J}),Preview:_o,zIndex:Y},tx={name:"Rotary Mixer",key:"rotaryMixer",Symbol:Bo,Form:re,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Rotary Mixer"),...le}),Preview:Ao,zIndex:Y},sx={name:"Light",key:"light",Symbol:Oo,Form:Xa,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Light"),...rl}),Preview:zo,zIndex:Y},nx={name:"Setpoint",key:"setpoint",Symbol:lo,Form:su,defaultProps:e=>({units:"mV",color:e.colors.gray.l4.rgba255,...Z("Setpoint"),...bu,...vu}),Preview:io,zIndex:Y},rx={name:"Agitator",key:"agitator",Symbol:Do,Form:re,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Agitator"),...le}),Preview:Vo,zIndex:Y},ox={name:"Propeller Agitator",key:"propellerAgitator",Symbol:Io,Form:re,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Propeller Agitator"),...le}),Preview:Zo,zIndex:Y},lx={name:"Flat Blade Agitator",key:"flatBladeAgitator",Symbol:Fo,Form:re,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Flat Blade Agitator"),...le}),Preview:qo,zIndex:Y},ix={name:"Paddle Agitator",key:"paddleAgitator",Symbol:Ho,Form:re,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Paddle Agitator"),...le}),Preview:Yo,zIndex:Y},cx={name:"Cross Beam Agitator",key:"crossBeamAgitator",Symbol:Uo,Form:re,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Cross Beam Agitator"),...le}),Preview:Go,zIndex:Y},ax={name:"Helical Agitator",key:"helicalAgitator",Symbol:Wo,Form:re,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Helical Agitator"),...le}),Preview:Ko,zIndex:Y},ux={name:"Compressor",key:"compressor",Symbol:Qo,Form:re,defaultProps:e=>({color:e.colors.gray.l9.rgba255,...Z("Compressor"),...le}),Preview:Xo,zIndex:Y},xx={name:"Text Box",key:"textBox",Symbol:Jo,Form:nu,defaultProps:e=>({color:e.colors.gray.l9.rgba255,autoFit:!0,align:"center",...Z("Text Box"),...J,...ls,level:"p",text:"Text Box",width:75}),Preview:el,zIndex:Y},dx={name:"Off Page Reference",key:"offPageReference",Form:ru,Symbol:tl,defaultProps:e=>({color:e.colors.gray.l9.rgba255,orientation:"right",...Z("Off Page Reference")}),Preview:sl,zIndex:Y},px={value:Gu,button:Wu,tank:Bu,switch:Ku,offPageReference:dx,light:sx,setpoint:nx,box:Au,textBox:xx,valve:Lu,solenoidValve:Tu,threeWayValve:ku,fourWayValve:Mu,angledValve:$u,manualValve:Zu,needleValve:qu,reliefValve:Ou,angledReliefValve:Uu,checkValve:Hu,regulator:zu,electricRegulator:Du,pump:Nu,pistonPump:Ju,screwPump:_u,cavityPump:Xu,vacuumPump:Qu,staticMixer:ex,rotaryMixer:tx,burstDisc:Vu,cap:Iu,filter:Fu,orifice:Yu,agitator:rx,propellerAgitator:ox,flatBladeAgitator:lx,paddleAgitator:ix,crossBeamAgitator:cx,helicalAgitator:ax,compressor:ux},mx=Object.freeze(Object.defineProperty({__proto__:null,Agitator:Do,AgitatorPreview:Vo,AngledReliefValve:fo,AngledReliefValvePreview:ho,AngledValve:Vr,AngledValvePreview:Ir,Box:Yr,BoxPreview:Ur,BurstDisc:eo,BurstDiscPreview:to,Button:Co,ButtonPreview:bo,Cap:so,CapPreview:no,CavityPump:Lo,CavityPumpPreview:To,CheckValve:po,CheckValvePreview:mo,Compressor:Qo,CompressorPreview:Xo,CrossBeamAgitator:Uo,CrossBeamAgitatorPreview:Go,ElectricRegulator:Xr,ElectricRegulatorPreview:Jr,Filter:co,FilterPreview:ao,FlatBladeAgitator:Fo,FlatBladeAgitatorPreview:qo,FourWayValve:zr,FourWayValvePreview:Dr,HelicalAgitator:Wo,HelicalAgitatorPreview:Ko,Light:Oo,LightPreview:zo,ManualValve:ro,ManualValvePreview:oo,NeedleValve:uo,NeedleValvePreview:xo,OffPageReference:tl,OffPageReferencePreview:sl,Orifice:jo,OrificePreview:go,PaddleAgitator:Ho,PaddleAgitatorPreview:Yo,PistonPump:Mo,PistonPumpPreview:$o,PropellerAgitator:Io,PropellerAgitatorPreview:Zo,Pump:Zr,PumpPreview:Fr,Regulator:Kr,RegulatorPreview:Qr,ReliefValve:Gr,ReliefValvePreview:Wr,RotaryMixer:Bo,RotaryMixerPreview:Ao,SYMBOLS:px,ScrewPump:vo,ScrewPumpPreview:wo,Setpoint:lo,SetpointPreview:io,SolenoidValve:Ar,SolenoidValvePreview:Or,StaticMixer:No,StaticMixerPreview:_o,Switch:Ro,SwitchPreview:yo,Tank:qr,TankPreview:Hr,TextBox:Jo,TextBoxPreview:el,ThreeWayValve:$r,ThreeWayValvePreview:Nr,VacuumPump:Po,VacuumPumpPreview:ko,Value:Eo,ValuePreview:So,Valve:_r,ValvePreview:Br,typeZ:yu},Symbol.toStringTag,{value:"Module"}));exports.Aether=c.main;exports.Dialog=c.use$4;exports.Divider=c.Divider$1;exports.Dropdown=c.Dropdown;exports.Haul=c.Haul;exports.Worker=c.Context$1;exports.compareArrayDeps=c.compareArrayDeps;exports.componentRenderProp=c.componentRenderProp;exports.isRenderProp=c.isRenderProp;exports.useAsyncEffect=c.useAsyncEffect;exports.useClickOutside=c.useClickOutside;exports.useCombinedRefs=c.useCombinedRefs;exports.useCombinedStateAndRef=c.useCombinedStateAndRef;exports.useDebouncedCallback=c.useDebouncedCallback;exports.useEffectCompare=c.useEffectCompare;exports.useMemoCompare=c.useMemoCompare;exports.useMemoDeepEqualProps=c.useMemoDeepEqualProps;exports.useMemoPrimitiveArray=c.useMemoPrimitiveArray;exports.usePrevious=c.usePrevious;exports.useResize=c.useResize;exports.useStateRef=c.useStateRef;exports.useSyncedRef=c.useSyncedRef;exports.useTransforms=c.useTransforms;exports.CSS=l.CSS;exports.newBEM=l.newBEM;exports.Header=Ke.external;exports.DataType=C.g;exports.Density=C.b;exports.MultiSeries=C.Ct;exports.Rate=C.P;exports.Series=C.V;exports.TimeRange=C.E;exports.TimeSpan=C.y;exports.TimeStamp=C.m;exports.state=C.state;exports.Generic=D.Generic;exports.Align=jl.external;exports.Icon=ne.Icon;exports.Tabs=ne.external;exports.Button=gl.external;exports.Caret=Cs.Animated$1;exports.telem=j.external;exports.Color=Bt.external;exports.Text=de.external;exports.Triggers=bs.external;exports.List=$e.external;exports.createFilterTransform=$e.createFilterTransform;exports.fuseFilter=$e.fuseFilter;exports.proxyMemo=$e.proxyMemo;exports.createHexOpacityVariants=vs.createHexOpacityVariants;exports.unitProperty=vs.unitProperty;exports.Input=me.external;exports.Menu=hl.external;exports.Theming=El.external;exports.Tree=Sl.external;exports.Video=Rl.Video;exports.Accordion=Vl;exports.Breadcrumb=Fl;exports.Canvas=oi;exports.Channel=Ji;exports.Control=ua;exports.Device=fc;exports.Diagram=Fa;exports.Eraser=Hc;exports.Form=mc;exports.Label=Cc;exports.Legend=ui;exports.Line=di;exports.LinePlot=Di;exports.Log=Ha;exports.Measure=Fi;exports.Modal=vc;exports.Mosaic=Zc;exports.Nav=Gc;exports.Note=Kc;exports.OS=ta;exports.Observe=dc;exports.Override=na;exports.Pluto=ma;exports.Portal=_c;exports.Progress=ga;exports.Range=Ii;exports.Ranger=Ca;exports.Resize=$l;exports.Rule=qi;exports.Schematic=mx;exports.Select=Pi;exports.Status=bl;exports.Steps=va;exports.Synnax=Yl;exports.Tag=vi;exports.Telem=la;exports.Tooltip=vl;exports.Value=fu;exports.Viewport=zi;exports.axis=Gl;exports.control=Wl;
|