openc3-cosmos-tool-cmdtlmserver 7.4.0 → 7.5.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.
- checksums.yaml +4 -4
- data/tools/cmdtlmserver/{ArrayWidget-CIDdZjk3-e93771de14c32c248c92.js → ArrayWidget-9OSo49r--717a71fa5a93a4306ec7.js} +2 -2
- data/tools/cmdtlmserver/{ArrayplotWidget-BfO1atvG-8b8fb63663cdcaf7deb3.js → ArrayplotWidget-D5C_WTX2-8ef1f79db3f1944b9c0b.js} +1 -1
- data/tools/cmdtlmserver/{BarColumn-CHX_3ye3-bd438bf972b67e4ed46c.js → BarColumn-CvHnnifr-c4951578f3fd3f76bfc6.js} +1 -1
- data/tools/cmdtlmserver/{BlockWidget-DSbunlY_-8140c3fc46c60895b065.js → BlockWidget-DuEDZ4dJ-967eda15c1451fca34fa.js} +2 -2
- data/tools/cmdtlmserver/{ButtonWidget-BB4ZOCI8-877b51169cdd22a77791.js → ButtonWidget-CZIUtd9z-61acef92520109286c0d.js} +1 -1
- data/tools/cmdtlmserver/CanvasWidget-C4-pXiKY-264004bbfd5904f1e69d.js +1 -0
- data/tools/cmdtlmserver/CanvasdotWidget-Bh0HHx67-b6476c69d59257ab08bc.js +1 -0
- data/tools/cmdtlmserver/{CanvasimageWidget-DY1DDf0a-a34fd029ec2d25c17273.js → CanvasimageWidget-Bu5NmsDs-cda2f1f9742ea195853b.js} +1 -1
- data/tools/cmdtlmserver/{CanvasimagevalueWidget-0lc2cCPV-2e9d2826ca46f991f111.js → CanvasimagevalueWidget-Dv8dQrnj-0b0689a4caece450db22.js} +1 -1
- data/tools/cmdtlmserver/CanvaslabelWidget-68IeeM3a-d8ee974f80ae555b6320.js +1 -0
- data/tools/cmdtlmserver/{CanvaslabelvalueWidget-Cf_dcDW2-bdf8b368fdb1fa71ebca.js → CanvaslabelvalueWidget-C6j_A4z6-2d9163c26db0115868c1.js} +1 -1
- data/tools/cmdtlmserver/{CanvaslineWidget-jg2ozQ0N-eb531c51bbb4d3dc6a91.js → CanvaslineWidget-BgQ6wLDv-6f3059055f7afe642488.js} +1 -1
- data/tools/cmdtlmserver/{CanvaslinevalueWidget-CKpjqlKA-17dde2a6a449ad806015.js → CanvaslinevalueWidget-C6-HkTJp-5717f7b45d0b57a344a4.js} +1 -1
- data/tools/cmdtlmserver/CheckbuttonWidget-DJmT73t9-dc118daa630bbe52aa2d.js +1 -0
- data/tools/cmdtlmserver/{CmdPacketsTab-f0d7bb17079717aaa76e.js → CmdPacketsTab-6f0b12d43c14a7da6718.js} +1 -1
- data/tools/cmdtlmserver/{CmdTlmServer-32bff3fcc4b2ce263346.js → CmdTlmServer-af3b7b8e2ea9bae2b3bd.js} +2 -2
- data/tools/cmdtlmserver/{ComboboxWidget-BzKkyRDT-d2609655726e617e6140.js → ComboboxWidget-vTtsjxRm-a15e957bce84abaae94e.js} +1 -1
- data/tools/cmdtlmserver/{DataFlowsTab-f8fa7ccddb2e11c0f4bd.js → DataFlowsTab-11ed530e003aefd013b6.js} +1 -1
- data/tools/cmdtlmserver/DateWidget-BjKIDtsf-a0a25d555d3032f182ea.js +1 -0
- data/tools/cmdtlmserver/{DetailsDialog-CLPj0nP0-a923096c03a16ab24ce5.js → DetailsDialog-S1nw1d0h-f0e9c707fdcfdc375368.js} +1 -1
- data/tools/cmdtlmserver/{DynamicWidget-yna_ejyc-67de1a2e4d3ca8e77d13.js → DynamicWidget-yna_ejyc-303515b4f32d2d98c6ee.js} +1 -1
- data/tools/cmdtlmserver/{FilechecksumWidget-DqNThsOX-9a244d23a05ba0cd4bc2.js → FilechecksumWidget-obppYSP4-700a6df90c74ce721080.js} +1 -1
- data/tools/cmdtlmserver/{FiledisplayWidget-BRhhiVEs-8aee77b81ad52706adde.js → FiledisplayWidget-BstroKFo-1648b09c912608be064e.js} +1 -1
- data/tools/cmdtlmserver/{FormatvalueWidget-pEjAh0h2-a8635e2292e64cf5e39f.js → FormatvalueWidget-MJIJg6Bf-0cd3eaea15a6bcd3ae72.js} +1 -1
- data/tools/cmdtlmserver/Graph-BL-czUPp-f5cc2eb30bdaad73b5ea.js +1 -0
- data/tools/cmdtlmserver/{GraphWidget-BZjBkefj-d9dcbf0fe719cf812d83.js → GraphWidget-C8KRp-QN-c0cd6dae0bf948656c58.js} +1 -1
- data/tools/cmdtlmserver/{HorizontalWidget-Brag6E4y-48ed7a3d841d69afb943.js → HorizontalWidget-Cn9qnYVh-badf3d172451b91a6d6f.js} +1 -1
- data/tools/cmdtlmserver/{HorizontalboxWidget-BnkH4cVq-a81cc9f7c04e629754a0.js → HorizontalboxWidget-gz8uYYFZ-96c1c64165978ab6eb9e.js} +1 -1
- data/tools/cmdtlmserver/HorizontallineWidget-CrDua5-L-debe3a4eea3dca880b37.js +1 -0
- data/tools/cmdtlmserver/{IframeWidget-Ciu5u58E-f35e28d26845c9ce425c.js → IframeWidget-CtS7MjKL-d9da1888b15c35e9c70b.js} +1 -1
- data/tools/cmdtlmserver/ImageLoader-Vpn27aUN-3490506bebda6aeb65a9.js +1 -0
- data/tools/cmdtlmserver/{ImageviewerWidget-vWMGPveb-3e068b180f6cf32ccd24.js → ImageviewerWidget-Kmzt8wuP-cc3b7e2f8ed939331fe4.js} +1 -1
- data/tools/cmdtlmserver/InterfaceFlowChart-50ef94018198e0750f4e.js +27 -0
- data/tools/cmdtlmserver/InterfacesTab-06eb69d86c8c7763e5cf.js +1 -0
- data/tools/cmdtlmserver/{LabelWidget-DVp0CmFH-97b4d14caae36b2b70fe.js → LabelWidget-DIZpHxYX-271eae93ef3508c18934.js} +1 -1
- data/tools/cmdtlmserver/LabelledWidget-CGxDI8XZ-eaf078ad95a37f4eeb80.js +1 -0
- data/tools/cmdtlmserver/{LabelprogressbarWidget-DME-BrZe-03f95b34969c5b14cff6.js → LabelprogressbarWidget-CXOc5p8G-b43b9d95abd873ade105.js} +1 -1
- data/tools/cmdtlmserver/LabelsparklineWidget-B_LuqFcA-1606a15bb9d50691d10e.js +1 -0
- data/tools/cmdtlmserver/LabelvalueWidget--G4wHMZL-160516ab83399994b95e.js +1 -0
- data/tools/cmdtlmserver/{LabelvaluedescWidget-c5BUCRxB-2656a7bcfe6096dc52cd.js → LabelvaluedescWidget-DqLK0wvi-b6d7c8ef799c34a4fb16.js} +1 -1
- data/tools/cmdtlmserver/LabelvaluelimitsbarWidget-BWOQJkLP-e669bc66e0d31684a5b1.js +1 -0
- data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-BfF73Y2F-191505c7e8b4e463139d.js +1 -0
- data/tools/cmdtlmserver/LabelvaluerangebarWidget-CKsFRW6t-5d1f6dbda4b998ccdabd.js +1 -0
- data/tools/cmdtlmserver/{Layout-Df-lJgpB-914d505c295d7f5a9791.js → Layout-CGL1JfeU-73de442baff32d7d5e6d.js} +1 -1
- data/tools/cmdtlmserver/{LedWidget-C97EJXBo-ce386ba85aedd75e9d27.js → LedWidget-DrAJ8_fN-c3588bb9b46e0569d22d.js} +1 -1
- data/tools/cmdtlmserver/{LimitsBar-DNV39okL-cd07952d9c04ed1affbf.js → LimitsBar-CxPzG0Zv-7f26c239a2c59217ec3d.js} +1 -1
- data/tools/cmdtlmserver/{LimitsbarWidget-BIO6xztx-28058ac54835f172dbaf.js → LimitsbarWidget-1IayV5D7-e6979d0bff067d206a17.js} +1 -1
- data/tools/cmdtlmserver/{LimitscolorWidget-BGrNA65J-a076cfb171ef2babaa50.js → LimitscolorWidget-C7LY3BQ7-a99b7c32677dc6dd0e0c.js} +1 -1
- data/tools/cmdtlmserver/{LimitscolumnWidget-Bw6EXJs9-d6e1e239d7c084c9f7bf.js → LimitscolumnWidget-JhIc5Sjl-3b17971ca7ecfc14b21e.js} +1 -1
- data/tools/cmdtlmserver/{LinegraphWidget-Drf9tTPN-7c9a449d8dd3306582bf.js → LinegraphWidget-BaROxuUn-59d99dd742687e40b25c.js} +1 -1
- data/tools/cmdtlmserver/{MatrixbycolumnsWidget-C33-g7kK-76c56ce004a1c3313336.js → MatrixbycolumnsWidget-i0gGPMOV-10eb0a46073fb0d00269.js} +1 -1
- data/tools/cmdtlmserver/{OpenC3TimePicker-cOr0aOVn-5ffe76ce1ab1f7ec0439.js → OpenC3TimePicker-DDTLwTEw-8a687401b8e481dd9f49.js} +1 -1
- data/tools/cmdtlmserver/{ProgressbarWidget-DqfSMI10-ce9c22710e61dc0b0e7c.js → ProgressbarWidget-QxEq8C4A-6708ed1493b466f3ad73.js} +1 -1
- data/tools/cmdtlmserver/{RadiobuttonWidget-CSQeEacF-29953a844e8a06d304b9.js → RadiobuttonWidget-DYf3qvBq-c45fbd59c85839b1c318.js} +1 -1
- data/tools/cmdtlmserver/RadiogroupWidget-C0b_ckej-49f9b3ab6551820edc3b.js +1 -0
- data/tools/cmdtlmserver/{RangebarWidget-CJSUof1--8b45d597a2fa911a953e.js → RangebarWidget-DcSEHktI-3e039851d9a494b6e2ae.js} +1 -1
- data/tools/cmdtlmserver/{RawBuffer-d28de8d99b97e4d9e74a.js → RawBuffer-20fcdaa013d70717df58.js} +1 -1
- data/tools/cmdtlmserver/{RawDialog-d0bdc67425dd15985b00.js → RawDialog-6255b78ac1df55878a41.js} +1 -1
- data/tools/cmdtlmserver/{RollupWidget-C977Lkcx-5ea74809c15bc60824cc.js → RollupWidget-AVS4drYX-b0a691257195289fcde6.js} +1 -1
- data/tools/cmdtlmserver/RoutersTab-516132811cc284689266.js +1 -0
- data/tools/cmdtlmserver/{ScrollwindowWidget-BFxz61oW-6a02d29fb76c6bc1625a.js → ScrollwindowWidget-Dpf3BScA-1f5fbe37bb33cad8cf87.js} +1 -1
- data/tools/cmdtlmserver/{SignalWidget-BT6AcbBx-2f3a2c5e5b84c96df438.js → SignalWidget-Q1YtPsNw-e755da3f6cb293fbfb21.js} +1 -1
- data/tools/cmdtlmserver/SpacerWidget-DGEOqhu_-b6e91ca4474e9fced162.js +1 -0
- data/tools/cmdtlmserver/SparklineWidget-DbNWbNzY-7b515c109437aabe3fd7.js +1 -0
- data/tools/cmdtlmserver/{StatusTab-575b3032342d08db5f96.js → StatusTab-8631fd8a07a20ba8efba.js} +1 -1
- data/tools/cmdtlmserver/TabbookWidget-CrkPPZIF-e6f81964bd00b58621c6.js +1 -0
- data/tools/cmdtlmserver/{TargetsTab-b9f1a2b988ce8badd79d.js → TargetsTab-266cdd09e5f9024e2e14.js} +1 -1
- data/tools/cmdtlmserver/TextboxWidget-CfQEzaRr-e866fabef32754083217.js +1 -0
- data/tools/cmdtlmserver/TextfieldWidget-BQL8dOTg-c36896326e3dd7157a9b.js +1 -0
- data/tools/cmdtlmserver/{TimeWidget-BTaXBxVm-c61be141d1e5cc25062c.js → TimeWidget-DiE_oc7J-bb6ed7460bd103205f07.js} +1 -1
- data/tools/cmdtlmserver/TitleWidget-C5a_ZsqM-2cd2d562e7df0e7c2632.js +1 -0
- data/tools/cmdtlmserver/{TlmPacketsTab-f24389ab30f97699f498.js → TlmPacketsTab-a593eaef44a42f06465a.js} +1 -1
- data/tools/cmdtlmserver/{Updater-f4069804660e1d2bb1fb.js → Updater-72956875f00bf04ede7a.js} +1 -1
- data/tools/cmdtlmserver/VWidget-D4ipW0SF-3c58c7bbca21ca655106.js +1 -0
- data/tools/cmdtlmserver/ValueWidget-9JNo-Sk8-ad0f7e86109c8aa425a5.js +1 -0
- data/tools/cmdtlmserver/{ValuelimitsbarWidget-CqRkPwWS-51f01694576524ab034a.js → ValuelimitsbarWidget-CqiFVnaT-548886eac7b4e05b16a7.js} +1 -1
- data/tools/cmdtlmserver/ValuelimitscolumnWidget-DWDFVRNg-27123b8e5c3ac13ee8c8.js +1 -0
- data/tools/cmdtlmserver/ValuerangebarWidget-BAVMrD0L-ab4e3bf7f05c9ddde140.js +1 -0
- data/tools/cmdtlmserver/{VerticalWidget-CoJiy2TT-aaba0f3431f867ad36d1.js → VerticalWidget-Dw0j42K2-a0e847b1aea8f4d4919f.js} +1 -1
- data/tools/cmdtlmserver/{VerticalboxWidget-BD5Eq3BH-8de3b73d0af06049b633.js → VerticalboxWidget-xusQtXo0-16edecad2b21c8c04312.js} +1 -1
- data/tools/cmdtlmserver/{Widget-ClRi417b-9e12a24a4c1c96620549.js → Widget-Dy-YgkeU-68b553c0438f37998671.js} +1 -1
- data/tools/cmdtlmserver/main-19e35e0fd00beb1bdc37.js +1493 -0
- data/tools/cmdtlmserver/main.js +1 -1
- data/tools/cmdtlmserver/services-31b16a6b1924df6608ce.js +10 -0
- metadata +84 -84
- data/tools/cmdtlmserver/CanvasWidget-DsyMt7xW-7cfb9d7eaec179010426.js +0 -1
- data/tools/cmdtlmserver/CanvasdotWidget-BZpkCAoH-adf05ba917ad02a80cab.js +0 -1
- data/tools/cmdtlmserver/CanvaslabelWidget-C6TDW9WO-da217b5f77c7ca2537f1.js +0 -1
- data/tools/cmdtlmserver/CheckbuttonWidget-BWXinMaT-a54626829bc2de216d16.js +0 -1
- data/tools/cmdtlmserver/DateWidget-qUbLzQsX-b058fb471e3fcd797726.js +0 -1
- data/tools/cmdtlmserver/Graph-GVQZltap-916f8970fd5d42822d89.js +0 -1
- data/tools/cmdtlmserver/HorizontallineWidget-k7fL4EPN-3583b50d2753936758e5.js +0 -1
- data/tools/cmdtlmserver/ImageLoader-DH5e4lg8-3426a1c0f41a2bf44392.js +0 -1
- data/tools/cmdtlmserver/InterfaceFlowChart-9ca67c593f3f2b877ee3.js +0 -27
- data/tools/cmdtlmserver/InterfacesTab-b3f53afb2ca5b30d2920.js +0 -1
- data/tools/cmdtlmserver/LabelledWidget-1DeE1-6G-12aab221c27e077c7d31.js +0 -1
- data/tools/cmdtlmserver/LabelsparklineWidget-4iDHGnPL-f5ce9a4673c260d290c5.js +0 -1
- data/tools/cmdtlmserver/LabelvalueWidget-C6NQSHTb-84fc8a12ee8e4f0de54c.js +0 -1
- data/tools/cmdtlmserver/LabelvaluelimitsbarWidget-DBKZLpXJ-af39812293b33f70b279.js +0 -1
- data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-NdEu06go-fef2aa9ed08cdf93d61d.js +0 -1
- data/tools/cmdtlmserver/LabelvaluerangebarWidget-CL5HLK0t-5e27588fee9cb4b7e9b8.js +0 -1
- data/tools/cmdtlmserver/RadiogroupWidget-DlQN9z-Z-bf4604885d001ad1f14f.js +0 -1
- data/tools/cmdtlmserver/RoutersTab-06e215b54b2908b15301.js +0 -1
- data/tools/cmdtlmserver/SpacerWidget-B_f09KAi-d35a958be49dff620492.js +0 -1
- data/tools/cmdtlmserver/SparklineWidget-Bji9DILO-bc83a95dc405fc0453c5.js +0 -1
- data/tools/cmdtlmserver/TabbookWidget-B74U8t2i-9274e9ec55c4292f274e.js +0 -1
- data/tools/cmdtlmserver/TextboxWidget-CbKE9aSW-41ad0a5667b4b674d749.js +0 -1
- data/tools/cmdtlmserver/TextfieldWidget-CpdmfNk5-5fd1754fbc27b848e303.js +0 -1
- data/tools/cmdtlmserver/TitleWidget-ulO_gdVY-db3241f7de1f3c57a698.js +0 -1
- data/tools/cmdtlmserver/VWidget-C4VLQ7-b-4ba9d3f0cbd835b6e437.js +0 -1
- data/tools/cmdtlmserver/ValueWidget-B3-Jjoux-a1da92404f65428e9c38.js +0 -1
- data/tools/cmdtlmserver/ValuelimitscolumnWidget-CF4CN14a-7d5d1d7a571bb56f6f9b.js +0 -1
- data/tools/cmdtlmserver/ValuerangebarWidget-DJtrknKH-4e5ab6bdc8c7135368d5.js +0 -1
- data/tools/cmdtlmserver/main-c7bd98cfab79a58efd19.js +0 -1493
- data/tools/cmdtlmserver/services-cd44604ec0d9ce785778.js +0 -10
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
System.register(["vue","./Updater-72956875f00bf04ede7a.js","./RawBuffer-20fcdaa013d70717df58.js","./main-19e35e0fd00beb1bdc37.js","./services-31b16a6b1924df6608ce.js"],(function(fa,fm){"use strict";var to,it,no,we,ht,ke,or,rr,Q,he,K,te,ge,Ce,ir,Ne,ye,pe,je,Ve,gt,lr,Rt,ze,ar,Le,de,Be,cn,Pe,dn,sr,$e,Ie,be,fn,ur,cr,ve,me,xe,dr,hn,pt,Me,Bt,fr,hr,gr,pr,Xe,vr;return{setters:[ue=>{to=ue.getCurrentScope,it=ue.inject,no=ue.effectScope,we=ue.watch,ht=ue.provide,ke=ue.defineComponent,or=ue.useSlots,rr=ue.onUnmounted,Q=ue.openBlock,he=ue.createElementBlock,K=ue.unref,te=ue.createVNode,ge=ue.withCtx,Ce=ue.renderSlot,ir=ue.createPropsRestProxy,Ne=ue.toRef,ye=ue.ref,pe=ue.computed,je=ue.onMounted,Ve=ue.normalizeClass,gt=ue.getCurrentInstance,lr=ue.reactive,Rt=ue.onScopeDispose,ze=ue.nextTick,ar=ue.onBeforeMount,Le=ue.shallowRef,de=ue.createElementVNode,Be=ue.Fragment,cn=ue.renderList,Pe=ue.normalizeStyle,dn=ue.onBeforeUnmount,sr=ue.isMemoSame,$e=ue.createBlock,Ie=ue.createCommentVNode,be=ue.toDisplayString,fn=ue.isRef,ur=ue.toRefs,cr=ue.customRef,ve=ue.toValue,me=ue.resolveComponent,xe=ue.h,dr=ue.useAttrs,hn=ue.mergeProps,pt=ue.resolveDynamicComponent,Me=ue.createTextVNode,Bt=ue.markRaw,fr=ue.readonly,hr=ue.withModifiers},ue=>{gr=ue.U},ue=>{pr=ue.R},ue=>{Xe=ue._},ue=>{vr=ue.r}],execute:(function(){var ue=document.createElement("style");ue.textContent=`.metric-value[data-v-8552a4d2]{white-space:nowrap;font-variant-numeric:tabular-nums}.details-table[data-v-56438e40]{width:100%;overflow-x:hidden;overflow-y:hidden}.details-properties[data-v-56438e40]{flex:1 1 0;min-width:250px}.details-raw[data-v-56438e40]{flex:0 1 820px;min-width:0}.flow-health[data-v-3c87b8fe]{position:absolute;bottom:4px;left:50%;transform:translate(-50%);display:flex;align-items:center;gap:3px;padding:0 6px;border-radius:4px;white-space:nowrap;font-size:11px;line-height:16px;cursor:pointer;color:#374151;background:#f3f4f6}.flow-health--warning[data-v-3c87b8fe],.flow-health--stale[data-v-3c87b8fe],.flow-health--unavailable[data-v-3c87b8fe]{background:#fff3cd;color:#713f12}.flow-health--critical[data-v-3c87b8fe]{background:#fee2e2;color:#991b1b}.flow-health[data-v-3c87b8fe]:focus-visible{outline:2px solid #1d85e1;outline-offset:2px}.interface-node[data-v-130ef132]{position:relative;background:#fff;border:2px solid #1d85e1;border-radius:8px;text-align:center;padding:10px;box-shadow:0 2px 8px #0000001a;cursor:pointer}.node-label[data-v-130ef132]{font-weight:500;margin:4px 0;font-size:14px;color:#1f2937}.router-node[data-v-9aa41d46]{position:relative;background:#fff;border:2px solid #ba1de1;border-radius:8px;text-align:center;padding:10px;box-shadow:0 2px 8px #0000001a;cursor:pointer}.node-label[data-v-9aa41d46]{font-weight:500;margin:4px 0;font-size:14px;color:#1f2937}.cosmos-node[data-v-db9eea3b]{position:relative;cursor:pointer;background:#fff;border:2px solid #10b981;border-radius:8px;padding:10px;text-align:center;box-shadow:0 2px 8px #0000001a;height:212px;width:200px}.node-label[data-v-db9eea3b]{font-weight:500;margin:4px 0;font-size:14px;color:#1f2937}.target-node[data-v-8461d607]{background:#fff;border:2px solid #10b981;border-radius:8px;padding:10px;text-align:center;box-shadow:0 2px 8px #0000001a;height:212px;width:200px}.node-label[data-v-8461d607]{font-weight:500;margin:4px 0;font-size:14px;color:#1f2937}.write-protocol-node[data-v-1bec9d38]{background:#fff7ed;border:2px solid #f97316;border-radius:4px;box-sizing:border-box;padding:4px 6px;text-align:center;font-size:10px;box-shadow:0 2px 4px #0003;position:absolute;z-index:10;display:flex;align-items:center;justify-content:center;visibility:visible!important;cursor:pointer}.protocol-label[data-v-1bec9d38]{font-weight:500;font-size:10px;margin:2px 0;color:#374151;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.read-protocol-node[data-v-c903bd6c]{background:#ecfeff;border:2px solid #06b6d4;border-radius:4px;box-sizing:border-box;padding:4px 6px;text-align:center;font-size:10px;box-shadow:0 2px 4px #0003;position:absolute;z-index:10;display:flex;align-items:center;justify-content:center;visibility:visible!important;cursor:pointer}.protocol-label[data-v-c903bd6c]{font-weight:500;font-size:10px;margin:2px 0;color:#374151;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.vue-flow{position:relative;width:100%;height:100%;overflow:hidden;z-index:0;direction:ltr}.vue-flow__container{position:absolute;height:100%;width:100%;left:0;top:0}.vue-flow__pane{z-index:1}.vue-flow__pane.draggable{cursor:grab}.vue-flow__pane.selection{cursor:pointer}.vue-flow__pane.dragging{cursor:grabbing}.vue-flow__transformationpane{transform-origin:0 0;z-index:2;pointer-events:none}.vue-flow__viewport{z-index:4;overflow:clip}.vue-flow__selection{z-index:6}.vue-flow__edge-labels{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vue-flow__nodesselection-rect:focus,.vue-flow__nodesselection-rect:focus-visible{outline:none}.vue-flow .vue-flow__edges{pointer-events:none;overflow:visible}.vue-flow__edge-path,.vue-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.vue-flow__edge{pointer-events:visibleStroke;cursor:pointer}.vue-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.vue-flow__edge.animated path.vue-flow__edge-interaction{stroke-dasharray:none;animation:none}.vue-flow__edge.inactive{pointer-events:none}.vue-flow__edge.selected,.vue-flow__edge:focus,.vue-flow__edge:focus-visible{outline:none}.vue-flow__edge.selected .vue-flow__edge-path,.vue-flow__edge:focus .vue-flow__edge-path,.vue-flow__edge:focus-visible .vue-flow__edge-path{stroke:#555}.vue-flow__edge-textwrapper{pointer-events:all}.vue-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vue-flow__connection{pointer-events:none}.vue-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.vue-flow__connectionline{z-index:1001}.vue-flow__nodes{pointer-events:none;transform-origin:0 0}.vue-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default}.vue-flow__node.draggable{cursor:grab;pointer-events:all}.vue-flow__node.draggable.dragging{cursor:grabbing}.vue-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.vue-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.vue-flow__nodesselection-rect.dragging{cursor:grabbing}.vue-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px}.vue-flow__handle.connectable{pointer-events:all;cursor:crosshair}.vue-flow__handle-bottom{left:50%;bottom:0;transform:translate(-50%,50%)}.vue-flow__handle-top{left:50%;top:0;transform:translate(-50%,-50%)}.vue-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.vue-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.vue-flow__edgeupdater{cursor:move;pointer-events:all}.vue-flow__panel{position:absolute;z-index:5;margin:15px}.vue-flow__panel.top{top:0}.vue-flow__panel.bottom{bottom:0}.vue-flow__panel.left{left:0}.vue-flow__panel.right{right:0}.vue-flow__panel.center{left:50%;transform:translate(-50%)}@keyframes dashdraw{0%{stroke-dashoffset:10}}.vue-flow__controls{box-shadow:0 0 2px 1px #00000014}.vue-flow__controls-button{background:#fefefe;border:none;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;user-select:none;padding:5px}.vue-flow__controls-button svg{width:100%;max-width:12px;max-height:12px}.vue-flow__controls-button:hover{background:#f4f4f4}.vue-flow__controls-button:disabled{pointer-events:none}.vue-flow__controls-button:disabled svg{fill-opacity:.4}:root{--vf-node-bg: #fff;--vf-node-text: #222;--vf-connection-path: #b1b1b7;--vf-handle: #555}.vue-flow__edge.updating .vue-flow__edge-path{stroke:#777}.vue-flow__edge-text{font-size:10px}.vue-flow__edge-textbg{fill:#fff}.vue-flow__connection-path{stroke:var(--vf-connection-path)}.vue-flow__node{cursor:grab}.vue-flow__node.selectable:focus,.vue-flow__node.selectable:focus-visible{outline:none}.vue-flow__node-default,.vue-flow__node-input,.vue-flow__node-output{padding:10px;border-radius:3px;width:150px;font-size:12px;text-align:center;border-width:1px;border-style:solid;color:var(--vf-node-text);background-color:var(--vf-node-bg);border-color:var(--vf-node-color)}.vue-flow__node-default.selected,.vue-flow__node-default.selected:hover,.vue-flow__node-input.selected,.vue-flow__node-input.selected:hover,.vue-flow__node-output.selected,.vue-flow__node-output.selected:hover{box-shadow:0 0 0 .5px var(--vf-box-shadow)}.vue-flow__node-default.selected,.vue-flow__node-default:focus,.vue-flow__node-default:focus-visible,.vue-flow__node-input.selected,.vue-flow__node-input:focus,.vue-flow__node-input:focus-visible,.vue-flow__node-output.selected,.vue-flow__node-output:focus,.vue-flow__node-output:focus-visible{outline:none;border:1px solid #555}.vue-flow__node-default .vue-flow__handle,.vue-flow__node-input .vue-flow__handle,.vue-flow__node-output .vue-flow__handle{background:var(--vf-handle)}.vue-flow__node-default.selectable:hover,.vue-flow__node-input.selectable:hover,.vue-flow__node-output.selectable:hover{box-shadow:0 1px 4px 1px #00000014}.vue-flow__node-input{--vf-node-color: var(--vf-node-color, #0041d0);--vf-handle: var(--vf-node-color, #0041d0);--vf-box-shadow: var(--vf-node-color, #0041d0);background:var(--vf-node-bg);border-color:var(--vf-node-color, #0041d0)}.vue-flow__node-input.selected,.vue-flow__node-input:focus,.vue-flow__node-input:focus-visible{outline:none;border:1px solid var(--vf-node-color, #0041d0)}.vue-flow__node-default{--vf-handle: var(--vf-node-color, #1a192b);--vf-box-shadow: var(--vf-node-color, #1a192b);background:var(--vf-node-bg);border-color:var(--vf-node-color, #1a192b)}.vue-flow__node-default.selected,.vue-flow__node-default:focus,.vue-flow__node-default:focus-visible{outline:none;border:1px solid var(--vf-node-color, #1a192b)}.vue-flow__node-output{--vf-handle: var(--vf-node-color, #ff0072);--vf-box-shadow: var(--vf-node-color, #ff0072);background:var(--vf-node-bg);border-color:var(--vf-node-color, #ff0072)}.vue-flow__node-output.selected,.vue-flow__node-output:focus,.vue-flow__node-output:focus-visible{outline:none;border:1px solid var(--vf-node-color, #ff0072)}.vue-flow__nodesselection-rect,.vue-flow__selection{background:#0059dc14;border:1px dotted rgba(0,89,220,.8)}.vue-flow__nodesselection-rect:focus,.vue-flow__nodesselection-rect:focus-visible,.vue-flow__selection:focus,.vue-flow__selection:focus-visible{outline:none}.vue-flow__handle{width:6px;height:6px;background:var(--vf-handle);border:1px solid #fff;border-radius:100%}.interface-flow-chart{height:100%;width:100%}.vue-flow-container{height:100%;width:100%;background-color:#172635;border-radius:4px}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:#6b7280}.vue-flow__handle{height:24px;width:10px;background:#aaa;border-radius:4px}.vue-flow__node{background-color:#172635}.interface-flow-chart .flow-node--warning,.interface-flow-chart .flow-node--stale,.interface-flow-chart .flow-node--unavailable{border-color:#b45309;box-shadow:0 0 0 2px #fbbf24}.interface-flow-chart .flow-node--critical{border-color:#b91c1c;box-shadow:0 0 0 2px #f87171}.vue-flow__edges path{stroke-width:2}.docs-overlay{position:absolute;top:10px;left:10px;z-index:5}.docs-link{display:inline-flex;align-items:center;padding:4px 10px;background-color:#1e3246d9;border:1px solid rgba(255,255,255,.2);border-radius:4px;color:#fffc;text-decoration:none;font-size:13px;transition:background-color .2s,color .2s}.docs-link:hover{background-color:#284664f2;color:#fff}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(ue);function Vt(e){return to()?(Rt(e),!0):!1}function et(e){return typeof e=="function"?e():K(e)}const ha=typeof window<"u"&&typeof document<"u",ga=e=>typeof e<"u",pa=Object.prototype.toString,va=e=>pa.call(e)==="[object Object]",ma=()=>{};function _a(e,t){function n(...o){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(r).catch(i)})}return n}const mr=e=>e();function ya(e=mr){const t=ye(!0);function n(){t.value=!1}function o(){t.value=!0}const r=(...i)=>{t.value&&e(...i)};return{isActive:fr(t),pause:n,resume:o,eventFilter:r}}function _r(e,t=!1,n="Timeout"){return new Promise((o,r)=>{setTimeout(t?()=>r(n):o,e)})}function wa(e,t,n={}){const{eventFilter:o=mr,...r}=n;return we(e,_a(o,t),r)}function St(e,t,n={}){const{eventFilter:o,...r}=n,{eventFilter:i,pause:l,resume:a,isActive:u}=ya(o);return{stop:wa(e,t,{...r,eventFilter:i}),pause:l,resume:a,isActive:u}}function ba(e,t={}){if(!fn(e))return ur(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const o in e.value)n[o]=cr(()=>({get(){return e.value[o]},set(r){var i;if((i=et(t.replaceRef))!=null?i:!0)if(Array.isArray(e.value)){const a=[...e.value];a[o]=r,e.value=a}else{const a={...e.value,[o]:r};Object.setPrototypeOf(a,Object.getPrototypeOf(e.value)),e.value=a}else e.value[o]=r}}));return n}function oo(e,t=!1){function n(d,{flush:f="sync",deep:h=!1,timeout:v,throwOnTimeout:y}={}){let b=null;const E=[new Promise(g=>{b=we(e,x=>{d(x)!==t&&(b?.(),g(x))},{flush:f,deep:h,immediate:!0})})];return v!=null&&E.push(_r(v,y).then(()=>et(e)).finally(()=>b?.())),Promise.race(E)}function o(d,f){if(!fn(d))return n(x=>x===d,f);const{flush:h="sync",deep:v=!1,timeout:y,throwOnTimeout:b}=f??{};let w=null;const g=[new Promise(x=>{w=we([e,d],([O,B])=>{t!==(O===B)&&(w?.(),x(O))},{flush:h,deep:v,immediate:!0})})];return y!=null&&g.push(_r(y,b).then(()=>et(e)).finally(()=>(w?.(),et(e)))),Promise.race(g)}function r(d){return n(f=>!!f,d)}function i(d){return o(null,d)}function l(d){return o(void 0,d)}function a(d){return n(Number.isNaN,d)}function u(d,f){return n(h=>{const v=Array.from(h);return v.includes(d)||v.includes(et(d))},f)}function s(d){return c(1,d)}function c(d=1,f){let h=-1;return n(()=>(h+=1,h>=d),f)}return Array.isArray(et(e))?{toMatch:n,toContains:u,changed:s,changedTimes:c,get not(){return oo(e,!t)}}:{toMatch:n,toBe:o,toBeTruthy:r,toBeNull:i,toBeNaN:a,toBeUndefined:l,changed:s,changedTimes:c,get not(){return oo(e,!t)}}}function ro(e){return oo(e)}function xa(e){var t;const n=et(e);return(t=n?.$el)!=null?t:n}const yr=ha?window:void 0;function wr(...e){let t,n,o,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,r]=e,t=yr):[t,n,o,r]=e,!t)return ma;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const i=[],l=()=>{i.forEach(c=>c()),i.length=0},a=(c,d,f,h)=>(c.addEventListener(d,f,h),()=>c.removeEventListener(d,f,h)),u=we(()=>[xa(t),et(r)],([c,d])=>{if(l(),!c)return;const f=va(d)?{...d}:d;i.push(...n.flatMap(h=>o.map(v=>a(c,h,v,f))))},{immediate:!0,flush:"post"}),s=()=>{u(),l()};return Vt(s),s}function Ea(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function br(...e){let t,n,o={};e.length===3?(t=e[0],n=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],o=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:r=yr,eventName:i="keydown",passive:l=!1,dedupe:a=!1}=o,u=Ea(t);return wr(r,i,c=>{c.repeat&&et(a)||u(c)&&n(c)},l)}function Na(e){return JSON.parse(JSON.stringify(e))}function io(e,t,n,o={}){var r,i,l;const{clone:a=!1,passive:u=!1,eventName:s,deep:c=!1,defaultValue:d,shouldEmit:f}=o,h=gt(),v=n||h?.emit||((r=h?.$emit)==null?void 0:r.bind(h))||((l=(i=h?.proxy)==null?void 0:i.$emit)==null?void 0:l.bind(h?.proxy));let y=s;t||(t="modelValue"),y=y||`update:${t.toString()}`;const b=g=>a?typeof a=="function"?a(g):Na(g):g,w=()=>ga(e[t])?b(e[t]):d,E=g=>{f?f(g)&&v(y,g):v(y,g)};if(u){const g=w(),x=ye(g);let O=!1;return we(()=>e[t],B=>{O||(O=!0,x.value=b(B),ze(()=>O=!1))}),we(x,B=>{!O&&(B!==e[t]||c)&&E(B)},{deep:c}),x}else return pe({get(){return w()},set(g){E(g)}})}var Sa={value:()=>{}};function gn(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new pn(n)}function pn(e){this._=e}function ka(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",r=n.indexOf(".");if(r>=0&&(o=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}pn.prototype=gn.prototype={constructor:pn,on:function(e,t){var n=this._,o=ka(e+"",n),r,i=-1,l=o.length;if(arguments.length<2){for(;++i<l;)if((r=(e=o[i]).type)&&(r=Ca(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<l;)if(r=(e=o[i]).type)n[r]=xr(n[r],e.name,t);else if(t==null)for(r in n)n[r]=xr(n[r],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new pn(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),o=0,r,i;o<r;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],o=0,r=i.length;o<r;++o)i[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)}};function Ca(e,t){for(var n=0,o=e.length,r;n<o;++n)if((r=e[n]).name===t)return r.value}function xr(e,t,n){for(var o=0,r=e.length;o<r;++o)if(e[o].name===t){e[o]=Sa,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var lo="http://www.w3.org/1999/xhtml";const Er={svg:"http://www.w3.org/2000/svg",xhtml:lo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function vn(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Er.hasOwnProperty(t)?{space:Er[t],local:e}:e}function $a(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===lo&&t.documentElement.namespaceURI===lo?t.createElement(e):t.createElementNS(n,e)}}function Ia(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Nr(e){var t=vn(e);return(t.local?Ia:$a)(t)}function Ma(){}function ao(e){return e==null?Ma:function(){return this.querySelector(e)}}function Oa(e){typeof e!="function"&&(e=ao(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],l=i.length,a=o[r]=new Array(l),u,s,c=0;c<l;++c)(u=i[c])&&(s=e.call(u,u.__data__,c,i))&&("__data__"in u&&(s.__data__=u.__data__),a[c]=s);return new Re(o,this._parents)}function Da(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Ta(){return[]}function Sr(e){return e==null?Ta:function(){return this.querySelectorAll(e)}}function Pa(e){return function(){return Da(e.apply(this,arguments))}}function Aa(e){typeof e=="function"?e=Pa(e):e=Sr(e);for(var t=this._groups,n=t.length,o=[],r=[],i=0;i<n;++i)for(var l=t[i],a=l.length,u,s=0;s<a;++s)(u=l[s])&&(o.push(e.call(u,u.__data__,s,l)),r.push(u));return new Re(o,r)}function kr(e){return function(){return this.matches(e)}}function Cr(e){return function(t){return t.matches(e)}}var za=Array.prototype.find;function Ra(e){return function(){return za.call(this.children,e)}}function Ba(){return this.firstElementChild}function Va(e){return this.select(e==null?Ba:Ra(typeof e=="function"?e:Cr(e)))}var La=Array.prototype.filter;function Ha(){return Array.from(this.children)}function Fa(e){return function(){return La.call(this.children,e)}}function Ya(e){return this.selectAll(e==null?Ha:Fa(typeof e=="function"?e:Cr(e)))}function Ga(e){typeof e!="function"&&(e=kr(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],l=i.length,a=o[r]=[],u,s=0;s<l;++s)(u=i[s])&&e.call(u,u.__data__,s,i)&&a.push(u);return new Re(o,this._parents)}function $r(e){return new Array(e.length)}function ja(){return new Re(this._enter||this._groups.map($r),this._parents)}function mn(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}mn.prototype={constructor:mn,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Xa(e){return function(){return e}}function Ua(e,t,n,o,r,i){for(var l=0,a,u=t.length,s=i.length;l<s;++l)(a=t[l])?(a.__data__=i[l],o[l]=a):n[l]=new mn(e,i[l]);for(;l<u;++l)(a=t[l])&&(r[l]=a)}function Wa(e,t,n,o,r,i,l){var a,u,s=new Map,c=t.length,d=i.length,f=new Array(c),h;for(a=0;a<c;++a)(u=t[a])&&(f[a]=h=l.call(u,u.__data__,a,t)+"",s.has(h)?r[a]=u:s.set(h,u));for(a=0;a<d;++a)h=l.call(e,i[a],a,i)+"",(u=s.get(h))?(o[a]=u,u.__data__=i[a],s.delete(h)):n[a]=new mn(e,i[a]);for(a=0;a<c;++a)(u=t[a])&&s.get(f[a])===u&&(r[a]=u)}function Za(e){return e.__data__}function Ka(e,t){if(!arguments.length)return Array.from(this,Za);var n=t?Wa:Ua,o=this._parents,r=this._groups;typeof e!="function"&&(e=Xa(e));for(var i=r.length,l=new Array(i),a=new Array(i),u=new Array(i),s=0;s<i;++s){var c=o[s],d=r[s],f=d.length,h=qa(e.call(c,c&&c.__data__,s,o)),v=h.length,y=a[s]=new Array(v),b=l[s]=new Array(v),w=u[s]=new Array(f);n(c,d,y,b,w,h,t);for(var E=0,g=0,x,O;E<v;++E)if(x=y[E]){for(E>=g&&(g=E+1);!(O=b[g])&&++g<v;);x._next=O||null}}return l=new Re(l,o),l._enter=a,l._exit=u,l}function qa(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Ja(){return new Re(this._exit||this._groups.map($r),this._parents)}function Qa(e,t,n){var o=this.enter(),r=this,i=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(r=t(r),r&&(r=r.selection())),n==null?i.remove():n(i),o&&r?o.merge(r).order():r}function es(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,r=n.length,i=o.length,l=Math.min(r,i),a=new Array(r),u=0;u<l;++u)for(var s=n[u],c=o[u],d=s.length,f=a[u]=new Array(d),h,v=0;v<d;++v)(h=s[v]||c[v])&&(f[v]=h);for(;u<r;++u)a[u]=n[u];return new Re(a,this._parents)}function ts(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],r=o.length-1,i=o[r],l;--r>=0;)(l=o[r])&&(i&&l.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(l,i),i=l);return this}function ns(e){e||(e=os);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,o=n.length,r=new Array(o),i=0;i<o;++i){for(var l=n[i],a=l.length,u=r[i]=new Array(a),s,c=0;c<a;++c)(s=l[c])&&(u[c]=s);u.sort(t)}return new Re(r,this._parents).order()}function os(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function rs(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function is(){return Array.from(this)}function ls(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,i=o.length;r<i;++r){var l=o[r];if(l)return l}return null}function as(){let e=0;for(const t of this)++e;return e}function ss(){return!this.node()}function us(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var r=t[n],i=0,l=r.length,a;i<l;++i)(a=r[i])&&e.call(a,a.__data__,i,r);return this}function cs(e){return function(){this.removeAttribute(e)}}function ds(e){return function(){this.removeAttributeNS(e.space,e.local)}}function fs(e,t){return function(){this.setAttribute(e,t)}}function hs(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function gs(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function ps(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function vs(e,t){var n=vn(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?ds:cs:typeof t=="function"?n.local?ps:gs:n.local?hs:fs)(n,t))}function Ir(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function ms(e){return function(){this.style.removeProperty(e)}}function _s(e,t,n){return function(){this.style.setProperty(e,t,n)}}function ys(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function ws(e,t,n){return arguments.length>1?this.each((t==null?ms:typeof t=="function"?ys:_s)(e,t,n??"")):kt(this.node(),e)}function kt(e,t){return e.style.getPropertyValue(t)||Ir(e).getComputedStyle(e,null).getPropertyValue(t)}function bs(e){return function(){delete this[e]}}function xs(e,t){return function(){this[e]=t}}function Es(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Ns(e,t){return arguments.length>1?this.each((t==null?bs:typeof t=="function"?Es:xs)(e,t)):this.node()[e]}function Mr(e){return e.trim().split(/^|\s+/)}function so(e){return e.classList||new Or(e)}function Or(e){this._node=e,this._names=Mr(e.getAttribute("class")||"")}Or.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Dr(e,t){for(var n=so(e),o=-1,r=t.length;++o<r;)n.add(t[o])}function Tr(e,t){for(var n=so(e),o=-1,r=t.length;++o<r;)n.remove(t[o])}function Ss(e){return function(){Dr(this,e)}}function ks(e){return function(){Tr(this,e)}}function Cs(e,t){return function(){(t.apply(this,arguments)?Dr:Tr)(this,e)}}function $s(e,t){var n=Mr(e+"");if(arguments.length<2){for(var o=so(this.node()),r=-1,i=n.length;++r<i;)if(!o.contains(n[r]))return!1;return!0}return this.each((typeof t=="function"?Cs:t?Ss:ks)(n,t))}function Is(){this.textContent=""}function Ms(e){return function(){this.textContent=e}}function Os(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Ds(e){return arguments.length?this.each(e==null?Is:(typeof e=="function"?Os:Ms)(e)):this.node().textContent}function Ts(){this.innerHTML=""}function Ps(e){return function(){this.innerHTML=e}}function As(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function zs(e){return arguments.length?this.each(e==null?Ts:(typeof e=="function"?As:Ps)(e)):this.node().innerHTML}function Rs(){this.nextSibling&&this.parentNode.appendChild(this)}function Bs(){return this.each(Rs)}function Vs(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ls(){return this.each(Vs)}function Hs(e){var t=typeof e=="function"?e:Nr(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Fs(){return null}function Ys(e,t){var n=typeof e=="function"?e:Nr(e),o=t==null?Fs:typeof t=="function"?t:ao(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function Gs(){var e=this.parentNode;e&&e.removeChild(this)}function js(){return this.each(Gs)}function Xs(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Us(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ws(e){return this.select(e?Us:Xs)}function Zs(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Ks(e){return function(t){e.call(this,t,this.__data__)}}function qs(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function Js(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,r=t.length,i;n<r;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++o]=i;++o?t.length=o:delete this.__on}}}function Qs(e,t,n){return function(){var o=this.__on,r,i=Ks(t);if(o){for(var l=0,a=o.length;l<a;++l)if((r=o[l]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),r.value=t;return}}this.addEventListener(e.type,i,n),r={type:e.type,name:e.name,value:t,listener:i,options:n},o?o.push(r):this.__on=[r]}}function eu(e,t,n){var o=qs(e+""),r,i=o.length,l;if(arguments.length<2){var a=this.node().__on;if(a){for(var u=0,s=a.length,c;u<s;++u)for(r=0,c=a[u];r<i;++r)if((l=o[r]).type===c.type&&l.name===c.name)return c.value}return}for(a=t?Qs:Js,r=0;r<i;++r)this.each(a(o[r],t,n));return this}function Pr(e,t,n){var o=Ir(e),r=o.CustomEvent;typeof r=="function"?r=new r(t,n):(r=o.document.createEvent("Event"),n?(r.initEvent(t,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(t,!1,!1)),e.dispatchEvent(r)}function tu(e,t){return function(){return Pr(this,e,t)}}function nu(e,t){return function(){return Pr(this,e,t.apply(this,arguments))}}function ou(e,t){return this.each((typeof t=="function"?nu:tu)(e,t))}function*ru(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,i=o.length,l;r<i;++r)(l=o[r])&&(yield l)}var Ar=[null];function Re(e,t){this._groups=e,this._parents=t}function Lt(){return new Re([[document.documentElement]],Ar)}function iu(){return this}Re.prototype=Lt.prototype={constructor:Re,select:Oa,selectAll:Aa,selectChild:Va,selectChildren:Ya,filter:Ga,data:Ka,enter:ja,exit:Ja,join:Qa,merge:es,selection:iu,order:ts,sort:ns,call:rs,nodes:is,node:ls,size:as,empty:ss,each:us,attr:vs,style:ws,property:Ns,classed:$s,text:Ds,html:zs,raise:Bs,lower:Ls,append:Hs,insert:Ys,remove:js,clone:Ws,datum:Zs,on:eu,dispatch:ou,[Symbol.iterator]:ru};function He(e){return typeof e=="string"?new Re([[document.querySelector(e)]],[document.documentElement]):new Re([[e]],Ar)}function lu(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ue(e,t){if(e=lu(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]}}return[e.pageX,e.pageY]}const au={passive:!1},Ht={capture:!0,passive:!1};function uo(e){e.stopImmediatePropagation()}function Ct(e){e.preventDefault(),e.stopImmediatePropagation()}function zr(e){var t=e.document.documentElement,n=He(e).on("dragstart.drag",Ct,Ht);"onselectstart"in t?n.on("selectstart.drag",Ct,Ht):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Rr(e,t){var n=e.document.documentElement,o=He(e).on("dragstart.drag",null);t&&(o.on("click.drag",Ct,Ht),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const _n=e=>()=>e;function co(e,{sourceEvent:t,subject:n,target:o,identifier:r,active:i,x:l,y:a,dx:u,dy:s,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:s,enumerable:!0,configurable:!0},_:{value:c}})}co.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function su(e){return!e.ctrlKey&&!e.button}function uu(){return this.parentNode}function cu(e,t){return t??{x:e.x,y:e.y}}function du(){return navigator.maxTouchPoints||"ontouchstart"in this}function fu(){var e=su,t=uu,n=cu,o=du,r={},i=gn("start","drag","end"),l=0,a,u,s,c,d=0;function f(x){x.on("mousedown.drag",h).filter(o).on("touchstart.drag",b).on("touchmove.drag",w,au).on("touchend.drag touchcancel.drag",E).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(x,O){if(!(c||!e.call(this,x,O))){var B=g(this,t.call(this,x,O),x,O,"mouse");B&&(He(x.view).on("mousemove.drag",v,Ht).on("mouseup.drag",y,Ht),zr(x.view),uo(x),s=!1,a=x.clientX,u=x.clientY,B("start",x))}}function v(x){if(Ct(x),!s){var O=x.clientX-a,B=x.clientY-u;s=O*O+B*B>d}r.mouse("drag",x)}function y(x){He(x.view).on("mousemove.drag mouseup.drag",null),Rr(x.view,s),Ct(x),r.mouse("end",x)}function b(x,O){if(e.call(this,x,O)){var B=x.changedTouches,G=t.call(this,x,O),T=B.length,j,X;for(j=0;j<T;++j)(X=g(this,G,x,O,B[j].identifier,B[j]))&&(uo(x),X("start",x,B[j]))}}function w(x){var O=x.changedTouches,B=O.length,G,T;for(G=0;G<B;++G)(T=r[O[G].identifier])&&(Ct(x),T("drag",x,O[G]))}function E(x){var O=x.changedTouches,B=O.length,G,T;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),G=0;G<B;++G)(T=r[O[G].identifier])&&(uo(x),T("end",x,O[G]))}function g(x,O,B,G,T,j){var X=i.copy(),P=Ue(j||B,O),S,Y,m;if((m=n.call(x,new co("beforestart",{sourceEvent:B,target:f,identifier:T,active:l,x:P[0],y:P[1],dx:0,dy:0,dispatch:X}),G))!=null)return S=m.x-P[0]||0,Y=m.y-P[1]||0,function M(k,z,C){var D=P,A;switch(k){case"start":r[T]=M,A=l++;break;case"end":delete r[T],--l;case"drag":P=Ue(C||z,O),A=l;break}X.call(k,x,new co(k,{sourceEvent:z,subject:m,target:f,identifier:T,active:A,x:P[0]+S,y:P[1]+Y,dx:P[0]-D[0],dy:P[1]-D[1],dispatch:X}),G)}}return f.filter=function(x){return arguments.length?(e=typeof x=="function"?x:_n(!!x),f):e},f.container=function(x){return arguments.length?(t=typeof x=="function"?x:_n(x),f):t},f.subject=function(x){return arguments.length?(n=typeof x=="function"?x:_n(x),f):n},f.touchable=function(x){return arguments.length?(o=typeof x=="function"?x:_n(!!x),f):o},f.on=function(){var x=i.on.apply(i,arguments);return x===i?f:x},f.clickDistance=function(x){return arguments.length?(d=(x=+x)*x,f):Math.sqrt(d)},f}function fo(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Br(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function Ft(){}var Yt=.7,yn=1/Yt,$t="\\s*([+-]?\\d+)\\s*",Gt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",We="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",hu=/^#([0-9a-f]{3,8})$/,gu=new RegExp(`^rgb\\(${$t},${$t},${$t}\\)$`),pu=new RegExp(`^rgb\\(${We},${We},${We}\\)$`),vu=new RegExp(`^rgba\\(${$t},${$t},${$t},${Gt}\\)$`),mu=new RegExp(`^rgba\\(${We},${We},${We},${Gt}\\)$`),_u=new RegExp(`^hsl\\(${Gt},${We},${We}\\)$`),yu=new RegExp(`^hsla\\(${Gt},${We},${We},${Gt}\\)$`),Vr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};fo(Ft,vt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Lr,formatHex:Lr,formatHex8:wu,formatHsl:bu,formatRgb:Hr,toString:Hr});function Lr(){return this.rgb().formatHex()}function wu(){return this.rgb().formatHex8()}function bu(){return Xr(this).formatHsl()}function Hr(){return this.rgb().formatRgb()}function vt(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=hu.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Fr(t):n===3?new Ae(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?wn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?wn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=gu.exec(e))?new Ae(t[1],t[2],t[3],1):(t=pu.exec(e))?new Ae(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=vu.exec(e))?wn(t[1],t[2],t[3],t[4]):(t=mu.exec(e))?wn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=_u.exec(e))?jr(t[1],t[2]/100,t[3]/100,1):(t=yu.exec(e))?jr(t[1],t[2]/100,t[3]/100,t[4]):Vr.hasOwnProperty(e)?Fr(Vr[e]):e==="transparent"?new Ae(NaN,NaN,NaN,0):null}function Fr(e){return new Ae(e>>16&255,e>>8&255,e&255,1)}function wn(e,t,n,o){return o<=0&&(e=t=n=NaN),new Ae(e,t,n,o)}function xu(e){return e instanceof Ft||(e=vt(e)),e?(e=e.rgb(),new Ae(e.r,e.g,e.b,e.opacity)):new Ae}function ho(e,t,n,o){return arguments.length===1?xu(e):new Ae(e,t,n,o??1)}function Ae(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}fo(Ae,ho,Br(Ft,{brighter(e){return e=e==null?yn:Math.pow(yn,e),new Ae(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Yt:Math.pow(Yt,e),new Ae(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ae(mt(this.r),mt(this.g),mt(this.b),bn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yr,formatHex:Yr,formatHex8:Eu,formatRgb:Gr,toString:Gr}));function Yr(){return`#${_t(this.r)}${_t(this.g)}${_t(this.b)}`}function Eu(){return`#${_t(this.r)}${_t(this.g)}${_t(this.b)}${_t((isNaN(this.opacity)?1:this.opacity)*255)}`}function Gr(){const e=bn(this.opacity);return`${e===1?"rgb(":"rgba("}${mt(this.r)}, ${mt(this.g)}, ${mt(this.b)}${e===1?")":`, ${e})`}`}function bn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function mt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function _t(e){return e=mt(e),(e<16?"0":"")+e.toString(16)}function jr(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Fe(e,t,n,o)}function Xr(e){if(e instanceof Fe)return new Fe(e.h,e.s,e.l,e.opacity);if(e instanceof Ft||(e=vt(e)),!e)return new Fe;if(e instanceof Fe)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,r=Math.min(t,n,o),i=Math.max(t,n,o),l=NaN,a=i-r,u=(i+r)/2;return a?(t===i?l=(n-o)/a+(n<o)*6:n===i?l=(o-t)/a+2:l=(t-n)/a+4,a/=u<.5?i+r:2-i-r,l*=60):a=u>0&&u<1?0:l,new Fe(l,a,u,e.opacity)}function Nu(e,t,n,o){return arguments.length===1?Xr(e):new Fe(e,t,n,o??1)}function Fe(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}fo(Fe,Nu,Br(Ft,{brighter(e){return e=e==null?yn:Math.pow(yn,e),new Fe(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Yt:Math.pow(Yt,e),new Fe(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,r=2*n-o;return new Ae(go(e>=240?e-240:e+120,r,o),go(e,r,o),go(e<120?e+240:e-120,r,o),this.opacity)},clamp(){return new Fe(Ur(this.h),xn(this.s),xn(this.l),bn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=bn(this.opacity);return`${e===1?"hsl(":"hsla("}${Ur(this.h)}, ${xn(this.s)*100}%, ${xn(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Ur(e){return e=(e||0)%360,e<0?e+360:e}function xn(e){return Math.max(0,Math.min(1,e||0))}function go(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const po=e=>()=>e;function Su(e,t){return function(n){return e+n*t}}function ku(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function Cu(e){return(e=+e)==1?Wr:function(t,n){return n-t?ku(t,n,e):po(isNaN(t)?n:t)}}function Wr(e,t){var n=t-e;return n?Su(e,n):po(isNaN(e)?t:e)}const En=(function e(t){var n=Cu(t);function o(r,i){var l=n((r=ho(r)).r,(i=ho(i)).r),a=n(r.g,i.g),u=n(r.b,i.b),s=Wr(r.opacity,i.opacity);return function(c){return r.r=l(c),r.g=a(c),r.b=u(c),r.opacity=s(c),r+""}}return o.gamma=e,o})(1);function $u(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),r;return function(i){for(r=0;r<n;++r)o[r]=e[r]*(1-i)+t[r]*i;return o}}function Iu(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Mu(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,r=new Array(o),i=new Array(n),l;for(l=0;l<o;++l)r[l]=jt(e[l],t[l]);for(;l<n;++l)i[l]=t[l];return function(a){for(l=0;l<o;++l)i[l]=r[l](a);return i}}function Ou(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function Ze(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Du(e,t){var n={},o={},r;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(r in t)r in e?n[r]=jt(e[r],t[r]):o[r]=t[r];return function(i){for(r in n)o[r]=n[r](i);return o}}var vo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,mo=new RegExp(vo.source,"g");function Tu(e){return function(){return e}}function Pu(e){return function(t){return e(t)+""}}function Zr(e,t){var n=vo.lastIndex=mo.lastIndex=0,o,r,i,l=-1,a=[],u=[];for(e=e+"",t=t+"";(o=vo.exec(e))&&(r=mo.exec(t));)(i=r.index)>n&&(i=t.slice(n,i),a[l]?a[l]+=i:a[++l]=i),(o=o[0])===(r=r[0])?a[l]?a[l]+=r:a[++l]=r:(a[++l]=null,u.push({i:l,x:Ze(o,r)})),n=mo.lastIndex;return n<t.length&&(i=t.slice(n),a[l]?a[l]+=i:a[++l]=i),a.length<2?u[0]?Pu(u[0].x):Tu(t):(t=u.length,function(s){for(var c=0,d;c<t;++c)a[(d=u[c]).i]=d.x(s);return a.join("")})}function jt(e,t){var n=typeof t,o;return t==null||n==="boolean"?po(t):(n==="number"?Ze:n==="string"?(o=vt(t))?(t=o,En):Zr:t instanceof vt?En:t instanceof Date?Ou:Iu(t)?$u:Array.isArray(t)?Mu:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Du:Ze)(e,t)}var Kr=180/Math.PI,_o={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function qr(e,t,n,o,r,i){var l,a,u;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(u=e*n+t*o)&&(n-=e*u,o-=t*u),(a=Math.sqrt(n*n+o*o))&&(n/=a,o/=a,u/=a),e*o<t*n&&(e=-e,t=-t,u=-u,l=-l),{translateX:r,translateY:i,rotate:Math.atan2(t,e)*Kr,skewX:Math.atan(u)*Kr,scaleX:l,scaleY:a}}var Nn;function Au(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?_o:qr(t.a,t.b,t.c,t.d,t.e,t.f)}function zu(e){return e==null||(Nn||(Nn=document.createElementNS("http://www.w3.org/2000/svg","g")),Nn.setAttribute("transform",e),!(e=Nn.transform.baseVal.consolidate()))?_o:(e=e.matrix,qr(e.a,e.b,e.c,e.d,e.e,e.f))}function Jr(e,t,n,o){function r(s){return s.length?s.pop()+" ":""}function i(s,c,d,f,h,v){if(s!==d||c!==f){var y=h.push("translate(",null,t,null,n);v.push({i:y-4,x:Ze(s,d)},{i:y-2,x:Ze(c,f)})}else(d||f)&&h.push("translate("+d+t+f+n)}function l(s,c,d,f){s!==c?(s-c>180?c+=360:c-s>180&&(s+=360),f.push({i:d.push(r(d)+"rotate(",null,o)-2,x:Ze(s,c)})):c&&d.push(r(d)+"rotate("+c+o)}function a(s,c,d,f){s!==c?f.push({i:d.push(r(d)+"skewX(",null,o)-2,x:Ze(s,c)}):c&&d.push(r(d)+"skewX("+c+o)}function u(s,c,d,f,h,v){if(s!==d||c!==f){var y=h.push(r(h)+"scale(",null,",",null,")");v.push({i:y-4,x:Ze(s,d)},{i:y-2,x:Ze(c,f)})}else(d!==1||f!==1)&&h.push(r(h)+"scale("+d+","+f+")")}return function(s,c){var d=[],f=[];return s=e(s),c=e(c),i(s.translateX,s.translateY,c.translateX,c.translateY,d,f),l(s.rotate,c.rotate,d,f),a(s.skewX,c.skewX,d,f),u(s.scaleX,s.scaleY,c.scaleX,c.scaleY,d,f),s=c=null,function(h){for(var v=-1,y=f.length,b;++v<y;)d[(b=f[v]).i]=b.x(h);return d.join("")}}}var Ru=Jr(Au,"px, ","px)","deg)"),Bu=Jr(zu,", ",")",")"),Vu=1e-12;function Qr(e){return((e=Math.exp(e))+1/e)/2}function Lu(e){return((e=Math.exp(e))-1/e)/2}function Hu(e){return((e=Math.exp(2*e))-1)/(e+1)}const Sn=(function e(t,n,o){function r(i,l){var a=i[0],u=i[1],s=i[2],c=l[0],d=l[1],f=l[2],h=c-a,v=d-u,y=h*h+v*v,b,w;if(y<Vu)w=Math.log(f/s)/t,b=function(G){return[a+G*h,u+G*v,s*Math.exp(t*G*w)]};else{var E=Math.sqrt(y),g=(f*f-s*s+o*y)/(2*s*n*E),x=(f*f-s*s-o*y)/(2*f*n*E),O=Math.log(Math.sqrt(g*g+1)-g),B=Math.log(Math.sqrt(x*x+1)-x);w=(B-O)/t,b=function(G){var T=G*w,j=Qr(O),X=s/(n*E)*(j*Hu(t*T+O)-Lu(O));return[a+X*h,u+X*v,s*j/Qr(t*T+O)]}}return b.duration=w*1e3*t/Math.SQRT2,b}return r.rho=function(i){var l=Math.max(.001,+i),a=l*l,u=a*a;return e(l,a,u)},r})(Math.SQRT2,2,4);var It=0,Xt=0,Ut=0,ei=1e3,kn,Wt,Cn=0,yt=0,$n=0,Zt=typeof performance=="object"&&performance.now?performance:Date,ti=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function yo(){return yt||(ti(Fu),yt=Zt.now()+$n)}function Fu(){yt=0}function In(){this._call=this._time=this._next=null}In.prototype=ni.prototype={constructor:In,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?yo():+n)+(t==null?0:+t),!this._next&&Wt!==this&&(Wt?Wt._next=this:kn=this,Wt=this),this._call=e,this._time=n,wo()},stop:function(){this._call&&(this._call=null,this._time=1/0,wo())}};function ni(e,t,n){var o=new In;return o.restart(e,t,n),o}function Yu(){yo(),++It;for(var e=kn,t;e;)(t=yt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--It}function oi(){yt=(Cn=Zt.now())+$n,It=Xt=0;try{Yu()}finally{It=0,ju(),yt=0}}function Gu(){var e=Zt.now(),t=e-Cn;t>ei&&($n-=t,Cn=e)}function ju(){for(var e,t=kn,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:kn=n);Wt=e,wo(o)}function wo(e){if(!It){Xt&&(Xt=clearTimeout(Xt));var t=e-yt;t>24?(e<1/0&&(Xt=setTimeout(oi,e-Zt.now()-$n)),Ut&&(Ut=clearInterval(Ut))):(Ut||(Cn=Zt.now(),Ut=setInterval(Gu,ei)),It=1,ti(oi))}}function ri(e,t,n){var o=new In;return t=t==null?0:+t,o.restart(r=>{o.stop(),e(r+t)},t,n),o}var Xu=gn("start","end","cancel","interrupt"),Uu=[],ii=0,li=1,bo=2,Mn=3,ai=4,xo=5,On=6;function Dn(e,t,n,o,r,i){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;Wu(e,n,{name:t,index:o,group:r,on:Xu,tween:Uu,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:ii})}function Eo(e,t){var n=Ye(e,t);if(n.state>ii)throw new Error("too late; already scheduled");return n}function Ke(e,t){var n=Ye(e,t);if(n.state>Mn)throw new Error("too late; already running");return n}function Ye(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Wu(e,t,n){var o=e.__transition,r;o[t]=n,n.timer=ni(i,0,n.time);function i(s){n.state=li,n.timer.restart(l,n.delay,n.time),n.delay<=s&&l(s-n.delay)}function l(s){var c,d,f,h;if(n.state!==li)return u();for(c in o)if(h=o[c],h.name===n.name){if(h.state===Mn)return ri(l);h.state===ai?(h.state=On,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[c]):+c<t&&(h.state=On,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete o[c])}if(ri(function(){n.state===Mn&&(n.state=ai,n.timer.restart(a,n.delay,n.time),a(s))}),n.state=bo,n.on.call("start",e,e.__data__,n.index,n.group),n.state===bo){for(n.state=Mn,r=new Array(f=n.tween.length),c=0,d=-1;c<f;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(r[++d]=h);r.length=d+1}}function a(s){for(var c=s<n.duration?n.ease.call(null,s/n.duration):(n.timer.restart(u),n.state=xo,1),d=-1,f=r.length;++d<f;)r[d].call(e,c);n.state===xo&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=On,n.timer.stop(),delete o[t];for(var s in o)return;delete e.__transition}}function Tn(e,t){var n=e.__transition,o,r,i=!0,l;if(n){t=t==null?null:t+"";for(l in n){if((o=n[l]).name!==t){i=!1;continue}r=o.state>bo&&o.state<xo,o.state=On,o.timer.stop(),o.on.call(r?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[l]}i&&delete e.__transition}}function Zu(e){return this.each(function(){Tn(this,e)})}function Ku(e,t){var n,o;return function(){var r=Ke(this,e),i=r.tween;if(i!==n){o=n=i;for(var l=0,a=o.length;l<a;++l)if(o[l].name===t){o=o.slice(),o.splice(l,1);break}}r.tween=o}}function qu(e,t,n){var o,r;if(typeof n!="function")throw new Error;return function(){var i=Ke(this,e),l=i.tween;if(l!==o){r=(o=l).slice();for(var a={name:t,value:n},u=0,s=r.length;u<s;++u)if(r[u].name===t){r[u]=a;break}u===s&&r.push(a)}i.tween=r}}function Ju(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=Ye(this.node(),n).tween,r=0,i=o.length,l;r<i;++r)if((l=o[r]).name===e)return l.value;return null}return this.each((t==null?Ku:qu)(n,e,t))}function No(e,t,n){var o=e._id;return e.each(function(){var r=Ke(this,o);(r.value||(r.value={}))[t]=n.apply(this,arguments)}),function(r){return Ye(r,o).value[t]}}function si(e,t){var n;return(typeof t=="number"?Ze:t instanceof vt?En:(n=vt(t))?(t=n,En):Zr)(e,t)}function Qu(e){return function(){this.removeAttribute(e)}}function ec(e){return function(){this.removeAttributeNS(e.space,e.local)}}function tc(e,t,n){var o,r=n+"",i;return function(){var l=this.getAttribute(e);return l===r?null:l===o?i:i=t(o=l,n)}}function nc(e,t,n){var o,r=n+"",i;return function(){var l=this.getAttributeNS(e.space,e.local);return l===r?null:l===o?i:i=t(o=l,n)}}function oc(e,t,n){var o,r,i;return function(){var l,a=n(this),u;return a==null?void this.removeAttribute(e):(l=this.getAttribute(e),u=a+"",l===u?null:l===o&&u===r?i:(r=u,i=t(o=l,a)))}}function rc(e,t,n){var o,r,i;return function(){var l,a=n(this),u;return a==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),u=a+"",l===u?null:l===o&&u===r?i:(r=u,i=t(o=l,a)))}}function ic(e,t){var n=vn(e),o=n==="transform"?Bu:si;return this.attrTween(e,typeof t=="function"?(n.local?rc:oc)(n,o,No(this,"attr."+e,t)):t==null?(n.local?ec:Qu)(n):(n.local?nc:tc)(n,o,t))}function lc(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function ac(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function sc(e,t){var n,o;function r(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&ac(e,i)),n}return r._value=t,r}function uc(e,t){var n,o;function r(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&lc(e,i)),n}return r._value=t,r}function cc(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=vn(e);return this.tween(n,(o.local?sc:uc)(o,t))}function dc(e,t){return function(){Eo(this,e).delay=+t.apply(this,arguments)}}function fc(e,t){return t=+t,function(){Eo(this,e).delay=t}}function hc(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?dc:fc)(t,e)):Ye(this.node(),t).delay}function gc(e,t){return function(){Ke(this,e).duration=+t.apply(this,arguments)}}function pc(e,t){return t=+t,function(){Ke(this,e).duration=t}}function vc(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?gc:pc)(t,e)):Ye(this.node(),t).duration}function mc(e,t){if(typeof t!="function")throw new Error;return function(){Ke(this,e).ease=t}}function _c(e){var t=this._id;return arguments.length?this.each(mc(t,e)):Ye(this.node(),t).ease}function yc(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Ke(this,e).ease=n}}function wc(e){if(typeof e!="function")throw new Error;return this.each(yc(this._id,e))}function bc(e){typeof e!="function"&&(e=kr(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],l=i.length,a=o[r]=[],u,s=0;s<l;++s)(u=i[s])&&e.call(u,u.__data__,s,i)&&a.push(u);return new tt(o,this._parents,this._name,this._id)}function xc(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,r=n.length,i=Math.min(o,r),l=new Array(o),a=0;a<i;++a)for(var u=t[a],s=n[a],c=u.length,d=l[a]=new Array(c),f,h=0;h<c;++h)(f=u[h]||s[h])&&(d[h]=f);for(;a<o;++a)l[a]=t[a];return new tt(l,this._parents,this._name,this._id)}function Ec(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function Nc(e,t,n){var o,r,i=Ec(t)?Eo:Ke;return function(){var l=i(this,e),a=l.on;a!==o&&(r=(o=a).copy()).on(t,n),l.on=r}}function Sc(e,t){var n=this._id;return arguments.length<2?Ye(this.node(),n).on.on(e):this.each(Nc(n,e,t))}function kc(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Cc(){return this.on("end.remove",kc(this._id))}function $c(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ao(e));for(var o=this._groups,r=o.length,i=new Array(r),l=0;l<r;++l)for(var a=o[l],u=a.length,s=i[l]=new Array(u),c,d,f=0;f<u;++f)(c=a[f])&&(d=e.call(c,c.__data__,f,a))&&("__data__"in c&&(d.__data__=c.__data__),s[f]=d,Dn(s[f],t,n,f,s,Ye(c,n)));return new tt(i,this._parents,t,n)}function Ic(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Sr(e));for(var o=this._groups,r=o.length,i=[],l=[],a=0;a<r;++a)for(var u=o[a],s=u.length,c,d=0;d<s;++d)if(c=u[d]){for(var f=e.call(c,c.__data__,d,u),h,v=Ye(c,n),y=0,b=f.length;y<b;++y)(h=f[y])&&Dn(h,t,n,y,f,v);i.push(f),l.push(c)}return new tt(i,l,t,n)}var Mc=Lt.prototype.constructor;function Oc(){return new Mc(this._groups,this._parents)}function Dc(e,t){var n,o,r;return function(){var i=kt(this,e),l=(this.style.removeProperty(e),kt(this,e));return i===l?null:i===n&&l===o?r:r=t(n=i,o=l)}}function ui(e){return function(){this.style.removeProperty(e)}}function Tc(e,t,n){var o,r=n+"",i;return function(){var l=kt(this,e);return l===r?null:l===o?i:i=t(o=l,n)}}function Pc(e,t,n){var o,r,i;return function(){var l=kt(this,e),a=n(this),u=a+"";return a==null&&(u=a=(this.style.removeProperty(e),kt(this,e))),l===u?null:l===o&&u===r?i:(r=u,i=t(o=l,a))}}function Ac(e,t){var n,o,r,i="style."+t,l="end."+i,a;return function(){var u=Ke(this,e),s=u.on,c=u.value[i]==null?a||(a=ui(t)):void 0;(s!==n||r!==c)&&(o=(n=s).copy()).on(l,r=c),u.on=o}}function zc(e,t,n){var o=(e+="")=="transform"?Ru:si;return t==null?this.styleTween(e,Dc(e,o)).on("end.style."+e,ui(e)):typeof t=="function"?this.styleTween(e,Pc(e,o,No(this,"style."+e,t))).each(Ac(this._id,e)):this.styleTween(e,Tc(e,o,t),n).on("end.style."+e,null)}function Rc(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function Bc(e,t,n){var o,r;function i(){var l=t.apply(this,arguments);return l!==r&&(o=(r=l)&&Rc(e,l,n)),o}return i._value=t,i}function Vc(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,Bc(e,t,n??""))}function Lc(e){return function(){this.textContent=e}}function Hc(e){return function(){var t=e(this);this.textContent=t??""}}function Fc(e){return this.tween("text",typeof e=="function"?Hc(No(this,"text",e)):Lc(e==null?"":e+""))}function Yc(e){return function(t){this.textContent=e.call(this,t)}}function Gc(e){var t,n;function o(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Yc(r)),t}return o._value=e,o}function jc(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Gc(e))}function Xc(){for(var e=this._name,t=this._id,n=ci(),o=this._groups,r=o.length,i=0;i<r;++i)for(var l=o[i],a=l.length,u,s=0;s<a;++s)if(u=l[s]){var c=Ye(u,t);Dn(u,e,n,s,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new tt(o,this._parents,e,n)}function Uc(){var e,t,n=this,o=n._id,r=n.size();return new Promise(function(i,l){var a={value:l},u={value:function(){--r===0&&i()}};n.each(function(){var s=Ke(this,o),c=s.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(u)),s.on=t}),r===0&&i()})}var Wc=0;function tt(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function ci(){return++Wc}var nt=Lt.prototype;tt.prototype={constructor:tt,select:$c,selectAll:Ic,selectChild:nt.selectChild,selectChildren:nt.selectChildren,filter:bc,merge:xc,selection:Oc,transition:Xc,call:nt.call,nodes:nt.nodes,node:nt.node,size:nt.size,empty:nt.empty,each:nt.each,on:Sc,attr:ic,attrTween:cc,style:zc,styleTween:Vc,text:Fc,textTween:jc,remove:Cc,tween:Ju,delay:hc,duration:vc,ease:_c,easeVarying:wc,end:Uc,[Symbol.iterator]:nt[Symbol.iterator]};function Zc(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Kc={time:null,delay:0,duration:250,ease:Zc};function qc(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Jc(e){var t,n;e instanceof tt?(t=e._id,e=e._name):(t=ci(),(n=Kc).time=yo(),e=e==null?null:e+"");for(var o=this._groups,r=o.length,i=0;i<r;++i)for(var l=o[i],a=l.length,u,s=0;s<a;++s)(u=l[s])&&Dn(u,e,t,s,l,n||qc(u,t));return new tt(o,this._parents,e,t)}Lt.prototype.interrupt=Zu,Lt.prototype.transition=Jc;const Pn=e=>()=>e;function Qc(e,{sourceEvent:t,target:n,transform:o,dispatch:r}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:r}})}function ot(e,t,n){this.k=e,this.x=t,this.y=n}ot.prototype={constructor:ot,scale:function(e){return e===1?this:new ot(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ot(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Mt=new ot(1,0,0);ot.prototype;function So(e){e.stopImmediatePropagation()}function Kt(e){e.preventDefault(),e.stopImmediatePropagation()}function ed(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function td(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function di(){return this.__zoom||Mt}function nd(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function od(){return navigator.maxTouchPoints||"ontouchstart"in this}function rd(e,t,n){var o=e.invertX(t[0][0])-n[0][0],r=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],l=e.invertY(t[1][1])-n[1][1];return e.translate(r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r),l>i?(i+l)/2:Math.min(0,i)||Math.max(0,l))}function id(){var e=ed,t=td,n=rd,o=nd,r=od,i=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],a=250,u=Sn,s=gn("start","zoom","end"),c,d,f,h=500,v=150,y=0,b=10;function w(m){m.property("__zoom",di).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",j).on("dblclick.zoom",X).filter(r).on("touchstart.zoom",P).on("touchmove.zoom",S).on("touchend.zoom touchcancel.zoom",Y).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(m,M,k,z){var C=m.selection?m.selection():m;C.property("__zoom",di),m!==C?O(m,M,k,z):C.interrupt().each(function(){B(this,arguments).event(z).start().zoom(null,typeof M=="function"?M.apply(this,arguments):M).end()})},w.scaleBy=function(m,M,k,z){w.scaleTo(m,function(){var C=this.__zoom.k,D=typeof M=="function"?M.apply(this,arguments):M;return C*D},k,z)},w.scaleTo=function(m,M,k,z){w.transform(m,function(){var C=t.apply(this,arguments),D=this.__zoom,A=k==null?x(C):typeof k=="function"?k.apply(this,arguments):k,L=D.invert(A),V=typeof M=="function"?M.apply(this,arguments):M;return n(g(E(D,V),A,L),C,l)},k,z)},w.translateBy=function(m,M,k,z){w.transform(m,function(){return n(this.__zoom.translate(typeof M=="function"?M.apply(this,arguments):M,typeof k=="function"?k.apply(this,arguments):k),t.apply(this,arguments),l)},null,z)},w.translateTo=function(m,M,k,z,C){w.transform(m,function(){var D=t.apply(this,arguments),A=this.__zoom,L=z==null?x(D):typeof z=="function"?z.apply(this,arguments):z;return n(Mt.translate(L[0],L[1]).scale(A.k).translate(typeof M=="function"?-M.apply(this,arguments):-M,typeof k=="function"?-k.apply(this,arguments):-k),D,l)},z,C)};function E(m,M){return M=Math.max(i[0],Math.min(i[1],M)),M===m.k?m:new ot(M,m.x,m.y)}function g(m,M,k){var z=M[0]-k[0]*m.k,C=M[1]-k[1]*m.k;return z===m.x&&C===m.y?m:new ot(m.k,z,C)}function x(m){return[(+m[0][0]+ +m[1][0])/2,(+m[0][1]+ +m[1][1])/2]}function O(m,M,k,z){m.on("start.zoom",function(){B(this,arguments).event(z).start()}).on("interrupt.zoom end.zoom",function(){B(this,arguments).event(z).end()}).tween("zoom",function(){var C=this,D=arguments,A=B(C,D).event(z),L=t.apply(C,D),V=k==null?x(L):typeof k=="function"?k.apply(C,D):k,ne=Math.max(L[1][0]-L[0][0],L[1][1]-L[0][1]),le=C.__zoom,H=typeof M=="function"?M.apply(C,D):M,W=u(le.invert(V).concat(ne/le.k),H.invert(V).concat(ne/H.k));return function(ie){if(ie===1)ie=H;else{var R=W(ie),F=ne/R[2];ie=new ot(F,V[0]-R[0]*F,V[1]-R[1]*F)}A.zoom(null,ie)}})}function B(m,M,k){return!k&&m.__zooming||new G(m,M)}function G(m,M){this.that=m,this.args=M,this.active=0,this.sourceEvent=null,this.extent=t.apply(m,M),this.taps=0}G.prototype={event:function(m){return m&&(this.sourceEvent=m),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(m,M){return this.mouse&&m!=="mouse"&&(this.mouse[1]=M.invert(this.mouse[0])),this.touch0&&m!=="touch"&&(this.touch0[1]=M.invert(this.touch0[0])),this.touch1&&m!=="touch"&&(this.touch1[1]=M.invert(this.touch1[0])),this.that.__zoom=M,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(m){var M=He(this.that).datum();s.call(m,this.that,new Qc(m,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:s}),M)}};function T(m,...M){if(!e.apply(this,arguments))return;var k=B(this,M).event(m),z=this.__zoom,C=Math.max(i[0],Math.min(i[1],z.k*Math.pow(2,o.apply(this,arguments)))),D=Ue(m);if(k.wheel)(k.mouse[0][0]!==D[0]||k.mouse[0][1]!==D[1])&&(k.mouse[1]=z.invert(k.mouse[0]=D)),clearTimeout(k.wheel);else{if(z.k===C)return;k.mouse=[D,z.invert(D)],Tn(this),k.start()}Kt(m),k.wheel=setTimeout(A,v),k.zoom("mouse",n(g(E(z,C),k.mouse[0],k.mouse[1]),k.extent,l));function A(){k.wheel=null,k.end()}}function j(m,...M){if(f||!e.apply(this,arguments))return;var k=m.currentTarget,z=B(this,M,!0).event(m),C=He(m.view).on("mousemove.zoom",V,!0).on("mouseup.zoom",ne,!0),D=Ue(m,k),A=m.clientX,L=m.clientY;zr(m.view),So(m),z.mouse=[D,this.__zoom.invert(D)],Tn(this),z.start();function V(le){if(Kt(le),!z.moved){var H=le.clientX-A,W=le.clientY-L;z.moved=H*H+W*W>y}z.event(le).zoom("mouse",n(g(z.that.__zoom,z.mouse[0]=Ue(le,k),z.mouse[1]),z.extent,l))}function ne(le){C.on("mousemove.zoom mouseup.zoom",null),Rr(le.view,z.moved),Kt(le),z.event(le).end()}}function X(m,...M){if(e.apply(this,arguments)){var k=this.__zoom,z=Ue(m.changedTouches?m.changedTouches[0]:m,this),C=k.invert(z),D=k.k*(m.shiftKey?.5:2),A=n(g(E(k,D),z,C),t.apply(this,M),l);Kt(m),a>0?He(this).transition().duration(a).call(O,A,z,m):He(this).call(w.transform,A,z,m)}}function P(m,...M){if(e.apply(this,arguments)){var k=m.touches,z=k.length,C=B(this,M,m.changedTouches.length===z).event(m),D,A,L,V;for(So(m),A=0;A<z;++A)L=k[A],V=Ue(L,this),V=[V,this.__zoom.invert(V),L.identifier],C.touch0?!C.touch1&&C.touch0[2]!==V[2]&&(C.touch1=V,C.taps=0):(C.touch0=V,D=!0,C.taps=1+!!c);c&&(c=clearTimeout(c)),D&&(C.taps<2&&(d=V[0],c=setTimeout(function(){c=null},h)),Tn(this),C.start())}}function S(m,...M){if(this.__zooming){var k=B(this,M).event(m),z=m.changedTouches,C=z.length,D,A,L,V;for(Kt(m),D=0;D<C;++D)A=z[D],L=Ue(A,this),k.touch0&&k.touch0[2]===A.identifier?k.touch0[0]=L:k.touch1&&k.touch1[2]===A.identifier&&(k.touch1[0]=L);if(A=k.that.__zoom,k.touch1){var ne=k.touch0[0],le=k.touch0[1],H=k.touch1[0],W=k.touch1[1],ie=(ie=H[0]-ne[0])*ie+(ie=H[1]-ne[1])*ie,R=(R=W[0]-le[0])*R+(R=W[1]-le[1])*R;A=E(A,Math.sqrt(ie/R)),L=[(ne[0]+H[0])/2,(ne[1]+H[1])/2],V=[(le[0]+W[0])/2,(le[1]+W[1])/2]}else if(k.touch0)L=k.touch0[0],V=k.touch0[1];else return;k.zoom("touch",n(g(A,L,V),k.extent,l))}}function Y(m,...M){if(this.__zooming){var k=B(this,M).event(m),z=m.changedTouches,C=z.length,D,A;for(So(m),f&&clearTimeout(f),f=setTimeout(function(){f=null},h),D=0;D<C;++D)A=z[D],k.touch0&&k.touch0[2]===A.identifier?delete k.touch0:k.touch1&&k.touch1[2]===A.identifier&&delete k.touch1;if(k.touch1&&!k.touch0&&(k.touch0=k.touch1,delete k.touch1),k.touch0)k.touch0[1]=this.__zoom.invert(k.touch0[0]);else if(k.end(),k.taps===2&&(A=Ue(A,this),Math.hypot(d[0]-A[0],d[1]-A[1])<b)){var L=He(this).on("dblclick.zoom");L&&L.apply(this,arguments)}}}return w.wheelDelta=function(m){return arguments.length?(o=typeof m=="function"?m:Pn(+m),w):o},w.filter=function(m){return arguments.length?(e=typeof m=="function"?m:Pn(!!m),w):e},w.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:Pn(!!m),w):r},w.extent=function(m){return arguments.length?(t=typeof m=="function"?m:Pn([[+m[0][0],+m[0][1]],[+m[1][0],+m[1][1]]]),w):t},w.scaleExtent=function(m){return arguments.length?(i[0]=+m[0],i[1]=+m[1],w):[i[0],i[1]]},w.translateExtent=function(m){return arguments.length?(l[0][0]=+m[0][0],l[1][0]=+m[1][0],l[0][1]=+m[0][1],l[1][1]=+m[1][1],w):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},w.constrain=function(m){return arguments.length?(n=m,w):n},w.duration=function(m){return arguments.length?(a=+m,w):a},w.interpolate=function(m){return arguments.length?(u=m,w):u},w.on=function(){var m=s.on.apply(s,arguments);return m===s?w:m},w.clickDistance=function(m){return arguments.length?(y=(m=+m)*m,w):Math.sqrt(y)},w.tapDistance=function(m){return arguments.length?(b=+m,w):b},w}var re=(e=>(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(re||{}),ko=(e=>(e.Partial="partial",e.Full="full",e))(ko||{}),wt=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(wt||{}),lt=(e=>(e.Strict="strict",e.Loose="loose",e))(lt||{}),Co=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(Co||{}),qt=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(qt||{}),fi=(e=>(e.TopLeft="top-left",e.TopCenter="top-center",e.TopRight="top-right",e.BottomLeft="bottom-left",e.BottomCenter="bottom-center",e.BottomRight="bottom-right",e))(fi||{});const ld=["INPUT","SELECT","TEXTAREA"],ad=typeof document<"u"?document:null;function $o(e){var t,n;const o=((n=(t=e.composedPath)==null?void 0:t.call(e))==null?void 0:n[0])||e.target,r=typeof o?.hasAttribute=="function"?o.hasAttribute("contenteditable"):!1,i=typeof o?.closest=="function"?o.closest(".nokey"):null;return ld.includes(o?.nodeName)||r||!!i}function sd(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function hi(e,t,n,o){const r=t.replace("+",`
|
|
3
|
+
`).replace(`
|
|
4
|
+
|
|
5
|
+
`,`
|
|
6
|
+
+`).split(`
|
|
7
|
+
`).map(l=>l.trim().toLowerCase());if(r.length===1)return e.toLowerCase()===t.toLowerCase();o||n.add(e.toLowerCase());const i=r.every((l,a)=>n.has(l)&&Array.from(n.values())[a]===r[a]);return o&&n.delete(e.toLowerCase()),i}function ud(e,t){return n=>{if(!n.code&&!n.key)return!1;const o=cd(n.code,e);return Array.isArray(e)?e.some(r=>hi(n[o],r,t,n.type==="keyup")):hi(n[o],e,t,n.type==="keyup")}}function cd(e,t){return t.includes(e)?"code":"key"}function Jt(e,t){const n=pe(()=>ve(t?.target)??ad),o=Le(ve(e)===!0);let r=!1;const i=new Set;let l=u(ve(e));we(()=>ve(e),(s,c)=>{typeof c=="boolean"&&typeof s!="boolean"&&a(),l=u(s)},{immediate:!0}),wr(["blur","contextmenu"],a),br((...s)=>l(...s),s=>{var c,d;const f=ve(t?.actInsideInputWithModifier)??!0,h=ve(t?.preventDefault)??!1;if(r=sd(s),(!r||r&&!f)&&$o(s))return;const y=((d=(c=s.composedPath)==null?void 0:c.call(s))==null?void 0:d[0])||s.target,b=y?.nodeName==="BUTTON"||y?.nodeName==="A";!h&&(r||!b)&&s.preventDefault(),o.value=!0},{eventName:"keydown",target:n}),br((...s)=>l(...s),s=>{const c=ve(t?.actInsideInputWithModifier)??!0;if(o.value){if((!r||r&&!c)&&$o(s))return;r=!1,o.value=!1}},{eventName:"keyup",target:n});function a(){r=!1,i.clear(),o.value=ve(e)===!0}function u(s){return s===null?(a(),()=>!1):typeof s=="boolean"?(a(),o.value=s,()=>!1):Array.isArray(s)||typeof s=="string"?ud(s,i):s}return o}const gi="vue-flow__node-desc",pi="vue-flow__edge-desc",dd="vue-flow__aria-live",vi=["Enter"," ","Escape"],Ot={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function An(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function zn(e,t){const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)}function Rn(e){return{width:e.offsetWidth,height:e.offsetHeight}}function bt(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function mi(e,t){return{x:bt(e.x,t[0][0],t[1][0]),y:bt(e.y,t[0][1],t[1][1])}}function _i(e){const t=e.getRootNode();return"elementFromPoint"in t?t:window.document}function at(e){return e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e}function xt(e){return e&&typeof e=="object"&&"id"in e&&"position"in e&&!at(e)}function Qt(e){return xt(e)&&"computedPosition"in e}function Bn(e){return!Number.isNaN(e)&&Number.isFinite(e)}function fd(e){return Bn(e.width)&&Bn(e.height)&&Bn(e.x)&&Bn(e.y)}function hd(e,t,n){const o={id:e.id.toString(),type:e.type??"default",dimensions:Bt({width:0,height:0}),computedPosition:Bt({z:0,...e.position}),handleBounds:{source:[],target:[]},draggable:void 0,selectable:void 0,connectable:void 0,focusable:void 0,selected:!1,dragging:!1,resizing:!1,initialized:!1,isParent:!1,position:{x:0,y:0},data:De(e.data)?e.data:{},events:Bt(De(e.events)?e.events:{})};return Object.assign(t??o,e,{id:e.id.toString(),parentNode:n})}function yi(e,t,n){var o,r;const i={id:e.id.toString(),type:e.type??t?.type??"default",source:e.source.toString(),target:e.target.toString(),sourceHandle:(o=e.sourceHandle)==null?void 0:o.toString(),targetHandle:(r=e.targetHandle)==null?void 0:r.toString(),updatable:e.updatable??n?.updatable,selectable:e.selectable??n?.selectable,focusable:e.focusable??n?.focusable,data:De(e.data)?e.data:{},events:Bt(De(e.events)?e.events:{}),label:e.label??"",interactionWidth:e.interactionWidth??n?.interactionWidth,...n??{}};return Object.assign(t??i,e,{id:e.id.toString()})}function wi(e,t,n,o){const r=typeof e=="string"?e:e.id,i=new Set,l=o==="source"?"target":"source";for(const a of n)a[l]===r&&i.add(a[o]);return t.filter(a=>i.has(a.id))}function gd(...e){if(e.length===3){const[i,l,a]=e;return wi(i,l,a,"target")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(i=>at(i)&&i.source===o).map(i=>n.find(l=>xt(l)&&l.id===i.target))}function pd(...e){if(e.length===3){const[i,l,a]=e;return wi(i,l,a,"source")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(i=>at(i)&&i.target===o).map(i=>n.find(l=>xt(l)&&l.id===i.source))}function bi({source:e,sourceHandle:t,target:n,targetHandle:o}){return`vueflow__edge-${e}${t??""}-${n}${o??""}`}function vd(e,t){return t.some(n=>at(n)&&n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle))}function en({x:e,y:t},{x:n,y:o,zoom:r}){return{x:e*r+n,y:t*r+o}}function tn({x:e,y:t},{x:n,y:o,zoom:r},i=!1,l=[1,1]){const a={x:(e-n)/r,y:(t-o)/r};return i?Ln(a,l):a}function md(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}}function xi({x:e,y:t,width:n,height:o}){return{x:e,y:t,x2:e+n,y2:t+o}}function _d({x:e,y:t,x2:n,y2:o}){return{x:e,y:t,width:n-e,height:o-t}}function Ei(e){let t={x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY,x2:Number.NEGATIVE_INFINITY,y2:Number.NEGATIVE_INFINITY};for(let n=0;n<e.length;n++){const o=e[n];t=md(t,xi({...o.computedPosition,...o.dimensions}))}return _d(t)}function Ni(e,t,n={x:0,y:0,zoom:1},o=!1,r=!1){const i={...tn(t,n),width:t.width/n.zoom,height:t.height/n.zoom},l=[];for(const a of e){const{dimensions:u,selectable:s=!0,hidden:c=!1}=a,d=u.width??a.width??null,f=u.height??a.height??null;if(r&&!s||c)continue;const h=zn(i,An(a)),v=d===null||f===null,y=o&&h>0,b=(d??0)*(f??0);(v||y||h>=b||a.dragging)&&l.push(a)}return l}function Si(e,t){const n=new Set;if(typeof e=="string")n.add(e);else if(e.length>=1)for(const o of e)n.add(o.id);return t.filter(o=>n.has(o.source)||n.has(o.target))}function Dt(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=Number.parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=Number.parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return on(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function yd(e,t,n){if(typeof e=="string"||typeof e=="number"){const o=Dt(e,n),r=Dt(e,t);return{top:o,right:r,bottom:o,left:r,x:r*2,y:o*2}}if(typeof e=="object"){const o=Dt(e.top??e.y??0,n),r=Dt(e.bottom??e.y??0,n),i=Dt(e.left??e.x??0,t),l=Dt(e.right??e.x??0,t);return{top:o,right:l,bottom:r,left:i,x:i+l,y:o+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function wd(e,t,n,o,r,i){const{x:l,y:a}=en(e,{x:t,y:n,zoom:o}),{x:u,y:s}=en({x:e.x+e.width,y:e.y+e.height},{x:t,y:n,zoom:o}),c=r-u,d=i-s;return{left:Math.floor(l),top:Math.floor(a),right:Math.floor(c),bottom:Math.floor(d)}}function ki(e,t,n,o,r,i=.1){const l=yd(i,t,n),a=(t-l.x)/e.width,u=(n-l.y)/e.height,s=Math.min(a,u),c=bt(s,o,r),d=e.x+e.width/2,f=e.y+e.height/2,h=t/2-d*c,v=n/2-f*c,y=wd(e,h,v,c,t,n),b={left:Math.min(y.left-l.left,0),top:Math.min(y.top-l.top,0),right:Math.min(y.right-l.right,0),bottom:Math.min(y.bottom-l.bottom,0)};return{x:h-b.left+b.right,y:v-b.top+b.bottom,zoom:c}}function bd(e,t){return{x:t.x+e.x,y:t.y+e.y,z:(e.z>t.z?e.z:t.z)+1}}function Ci(e,t){if(!e.parentNode)return!1;const n=t.get(e.parentNode);return n?n.selected?!0:Ci(n,t):!1}function nn(e,t){return typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`}function $i(e){const t=e.ctrlKey&&Vn()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t}function Ii(e,t,n){return e<t?bt(Math.abs(e-t),1,t)/t:e>n?-bt(Math.abs(e-n),1,t)/t:0}function Mi(e,t,n=15,o=40){const r=Ii(e.x,o,t.width-o)*n,i=Ii(e.y,o,t.height-o)*n;return[r,i]}function Io(e,t){if(t){const n=e.position.x+e.dimensions.width-t.dimensions.width,o=e.position.y+e.dimensions.height-t.dimensions.height;if(n>0||o>0||e.position.x<0||e.position.y<0){let r={};if(typeof t.style=="function"?r={...t.style(t)}:t.style&&(r={...t.style}),r.width=r.width??`${t.dimensions.width}px`,r.height=r.height??`${t.dimensions.height}px`,n>0)if(typeof r.width=="string"){const i=Number(r.width.replace("px",""));r.width=`${i+n}px`}else r.width+=n;if(o>0)if(typeof r.height=="string"){const i=Number(r.height.replace("px",""));r.height=`${i+o}px`}else r.height+=o;if(e.position.x<0){const i=Math.abs(e.position.x);if(t.position.x=t.position.x-i,typeof r.width=="string"){const l=Number(r.width.replace("px",""));r.width=`${l+i}px`}else r.width+=i;e.position.x=0}if(e.position.y<0){const i=Math.abs(e.position.y);if(t.position.y=t.position.y-i,typeof r.height=="string"){const l=Number(r.height.replace("px",""));r.height=`${l+i}px`}else r.height+=i;e.position.y=0}t.dimensions.width=Number(r.width.toString().replace("px","")),t.dimensions.height=Number(r.height.toString().replace("px","")),typeof t.style=="function"?t.style=i=>{const l=t.style;return{...l(i),...r}}:t.style={...t.style,...r}}}}function Oi(e,t){var n,o;const r=e.filter(l=>l.type==="add"||l.type==="remove");for(const l of r)if(l.type==="add")t.findIndex(u=>u.id===l.item.id)===-1&&t.push(l.item);else if(l.type==="remove"){const a=t.findIndex(u=>u.id===l.id);a!==-1&&t.splice(a,1)}const i=t.map(l=>l.id);for(const l of t)for(const a of e)if(a.id===l.id)switch(a.type){case"select":l.selected=a.selected;break;case"position":if(Qt(l)&&(typeof a.position<"u"&&(l.position=a.position),typeof a.dragging<"u"&&(l.dragging=a.dragging),l.expandParent&&l.parentNode)){const u=t[i.indexOf(l.parentNode)];u&&Qt(u)&&Io(l,u)}break;case"dimensions":if(Qt(l)&&(typeof a.dimensions<"u"&&(l.dimensions=a.dimensions),typeof a.updateStyle<"u"&&a.updateStyle&&(l.style={...l.style||{},width:`${(n=a.dimensions)==null?void 0:n.width}px`,height:`${(o=a.dimensions)==null?void 0:o.height}px`}),typeof a.resizing<"u"&&(l.resizing=a.resizing),l.expandParent&&l.parentNode)){const u=t[i.indexOf(l.parentNode)];u&&Qt(u)&&(!!u.dimensions.width&&!!u.dimensions.height?Io(l,u):ze(()=>{Io(l,u)}))}break}return t}function st(e,t){return{id:e,type:"select",selected:t}}function Di(e){return{item:e,type:"add"}}function Ti(e){return{id:e,type:"remove"}}function Pi(e,t,n,o,r){return{id:e,source:t,target:n,sourceHandle:o||null,targetHandle:r||null,type:"remove"}}function ut(e,t=new Set,n=!1){const o=[];for(const[r,i]of e){const l=t.has(r);!(i.selected===void 0&&!l)&&i.selected!==l&&(n&&(i.selected=l),o.push(st(i.id,l)))}return o}const Ai=()=>{};function q(e){const t=new Set;let n=Ai,o=()=>!1;const r=()=>t.size>0||o(),i=f=>{n=f},l=()=>{n=Ai},a=f=>{o=f},u=()=>{o=()=>!1},s=f=>{t.delete(f)};return{on:f=>{t.add(f);const h=()=>s(f);return Vt(h),{off:h}},off:s,trigger:f=>{const h=[n];return r()?h.push(...t):e&&h.push(e),Promise.allSettled(h.map(v=>v(f)))},hasListeners:r,listeners:t,setEmitter:i,removeEmitter:l,setHasEmitListeners:a,removeHasEmitListeners:u}}function zi(e,t,n){let o=e;do{if(o&&o.matches(t))return!0;if(o===n)return!1;o=o.parentElement}while(o);return!1}function xd(e,t,n,o){var r,i;const l=new Map;for(const[a,u]of e)(u.selected||u.id===o)&&(!u.parentNode||!Ci(u,e))&&(u.draggable||t&&typeof u.draggable>"u")&&e.get(a)&&l.set(a,{id:u.id,position:u.position||{x:0,y:0},distance:{x:n.x-((r=u.computedPosition)==null?void 0:r.x)||0,y:n.y-((i=u.computedPosition)==null?void 0:i.y)||0},from:{x:u.computedPosition.x,y:u.computedPosition.y},extent:u.extent,parentNode:u.parentNode,dimensions:{...u.dimensions},expandParent:u.expandParent});return Array.from(l.values())}function Mo({id:e,dragItems:t,findNode:n}){const o=[];for(const r of t){const i=n(r.id);i&&o.push(i)}return[e?o.find(r=>r.id===e):o[0],o]}function Ri(e){if(Array.isArray(e))switch(e.length){case 1:return[e[0],e[0],e[0],e[0]];case 2:return[e[0],e[1],e[0],e[1]];case 3:return[e[0],e[1],e[2],e[1]];case 4:return e;default:return[0,0,0,0]}return[e,e,e,e]}function Ed(e,t,n){const[o,r,i,l]=typeof e!="string"?Ri(e.padding):[0,0,0,0];return n&&typeof n.computedPosition.x<"u"&&typeof n.computedPosition.y<"u"&&typeof n.dimensions.width<"u"&&typeof n.dimensions.height<"u"?[[n.computedPosition.x+l,n.computedPosition.y+o],[n.computedPosition.x+n.dimensions.width-r,n.computedPosition.y+n.dimensions.height-i]]:!1}function Nd(e,t,n,o){let r=e.extent||n;if((r==="parent"||!Array.isArray(r)&&r?.range==="parent")&&!e.expandParent)if(e.parentNode&&o&&e.dimensions.width&&e.dimensions.height){const i=Ed(r,e,o);i&&(r=i)}else t(new Te(Oe.NODE_EXTENT_INVALID,e.id)),r=n;else if(Array.isArray(r)){const i=o?.computedPosition.x||0,l=o?.computedPosition.y||0;r=[[r[0][0]+i,r[0][1]+l],[r[1][0]+i,r[1][1]+l]]}else if(r!=="parent"&&r?.range&&Array.isArray(r.range)){const[i,l,a,u]=Ri(r.padding),s=o?.computedPosition.x||0,c=o?.computedPosition.y||0;r=[[r.range[0][0]+s+u,r.range[0][1]+c+i],[r.range[1][0]+s-l,r.range[1][1]+c-a]]}return r==="parent"?[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]]:r}function Sd({width:e,height:t},n){return[n[0],[n[1][0]-(e||0),n[1][1]-(t||0)]]}function Oo(e,t,n,o,r){const i=Sd(e.dimensions,Nd(e,n,o,r)),l=mi(t,i);return{position:{x:l.x-(r?.computedPosition.x||0),y:l.y-(r?.computedPosition.y||0)},computedPosition:l}}function Tt(e,t,n=re.Left,o=!1){const r=(t?.x??0)+e.computedPosition.x,i=(t?.y??0)+e.computedPosition.y,{width:l,height:a}=t??Id(e);if(o)return{x:r+l/2,y:i+a/2};switch(t?.position??n){case re.Top:return{x:r+l/2,y:i};case re.Right:return{x:r+l,y:i+a/2};case re.Bottom:return{x:r+l/2,y:i+a};case re.Left:return{x:r,y:i+a/2}}}function Bi(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function kd({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:o,targetWidth:r,targetHeight:i,width:l,height:a,viewport:u}){const s={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+r),y2:Math.max(e.y+o,t.y+i)};s.x===s.x2&&(s.x2+=1),s.y===s.y2&&(s.y2+=1);const c=xi({x:(0-u.x)/u.zoom,y:(0-u.y)/u.zoom,width:l/u.zoom,height:a/u.zoom}),d=Math.max(0,Math.min(c.x2,s.x2)-Math.max(c.x,s.x)),f=Math.max(0,Math.min(c.y2,s.y2)-Math.max(c.y,s.y));return Math.ceil(d*f)>0}function Cd(e,t,n=!1){const o=typeof e.zIndex=="number";let r=o?e.zIndex:0;const i=t(e.source),l=t(e.target);return!i||!l?0:(n&&(r=o?e.zIndex:Math.max(i.computedPosition.z||0,l.computedPosition.z||0)),r)}var Oe=(e=>(e.MISSING_STYLES="MISSING_STYLES",e.MISSING_VIEWPORT_DIMENSIONS="MISSING_VIEWPORT_DIMENSIONS",e.NODE_INVALID="NODE_INVALID",e.NODE_NOT_FOUND="NODE_NOT_FOUND",e.NODE_MISSING_PARENT="NODE_MISSING_PARENT",e.NODE_TYPE_MISSING="NODE_TYPE_MISSING",e.NODE_EXTENT_INVALID="NODE_EXTENT_INVALID",e.EDGE_INVALID="EDGE_INVALID",e.EDGE_NOT_FOUND="EDGE_NOT_FOUND",e.EDGE_SOURCE_MISSING="EDGE_SOURCE_MISSING",e.EDGE_TARGET_MISSING="EDGE_TARGET_MISSING",e.EDGE_TYPE_MISSING="EDGE_TYPE_MISSING",e.EDGE_SOURCE_TARGET_SAME="EDGE_SOURCE_TARGET_SAME",e.EDGE_SOURCE_TARGET_MISSING="EDGE_SOURCE_TARGET_MISSING",e.EDGE_ORPHANED="EDGE_ORPHANED",e.USEVUEFLOW_OPTIONS="USEVUEFLOW_OPTIONS",e))(Oe||{});const Vi={MISSING_STYLES:()=>"It seems that you haven't loaded the necessary styles. Please import '@vue-flow/core/dist/style.css' to ensure that the graph is rendered correctly",MISSING_VIEWPORT_DIMENSIONS:()=>"The Vue Flow parent container needs a width and a height to render the graph",NODE_INVALID:e=>`Node is invalid
|
|
8
|
+
Node: ${e}`,NODE_NOT_FOUND:e=>`Node not found
|
|
9
|
+
Node: ${e}`,NODE_MISSING_PARENT:(e,t)=>`Node is missing a parent
|
|
10
|
+
Node: ${e}
|
|
11
|
+
Parent: ${t}`,NODE_TYPE_MISSING:e=>`Node type is missing
|
|
12
|
+
Type: ${e}`,NODE_EXTENT_INVALID:e=>`Only child nodes can use a parent extent
|
|
13
|
+
Node: ${e}`,EDGE_INVALID:e=>`An edge needs a source and a target
|
|
14
|
+
Edge: ${e}`,EDGE_SOURCE_MISSING:(e,t)=>`Edge source is missing
|
|
15
|
+
Edge: ${e}
|
|
16
|
+
Source: ${t}`,EDGE_TARGET_MISSING:(e,t)=>`Edge target is missing
|
|
17
|
+
Edge: ${e}
|
|
18
|
+
Target: ${t}`,EDGE_TYPE_MISSING:e=>`Edge type is missing
|
|
19
|
+
Type: ${e}`,EDGE_SOURCE_TARGET_SAME:(e,t,n)=>`Edge source and target are the same
|
|
20
|
+
Edge: ${e}
|
|
21
|
+
Source: ${t}
|
|
22
|
+
Target: ${n}`,EDGE_SOURCE_TARGET_MISSING:(e,t,n)=>`Edge source or target is missing
|
|
23
|
+
Edge: ${e}
|
|
24
|
+
Source: ${t}
|
|
25
|
+
Target: ${n}`,EDGE_ORPHANED:e=>`Edge was orphaned (suddenly missing source or target) and has been removed
|
|
26
|
+
Edge: ${e}`,EDGE_NOT_FOUND:e=>`Edge not found
|
|
27
|
+
Edge: ${e}`,USEVUEFLOW_OPTIONS:()=>"The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead"};class Te extends Error{constructor(t,...n){var o;super((o=Vi[t])==null?void 0:o.call(Vi,...n)),this.name="VueFlowError",this.code=t,this.args=n}}function Do(e){return"clientX"in e}function $d(e){return"sourceEvent"in e}function qe(e,t){const n=Do(e);let o,r;return n?(o=e.clientX,r=e.clientY):"touches"in e&&e.touches.length>0?(o=e.touches[0].clientX,r=e.touches[0].clientY):"changedTouches"in e&&e.changedTouches.length>0?(o=e.changedTouches[0].clientX,r=e.changedTouches[0].clientY):(o=0,r=0),{x:o-(t?.left??0),y:r-(t?.top??0)}}const Vn=()=>{var e;return typeof navigator<"u"&&((e=navigator?.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Id(e){var t,n;return{width:((t=e.dimensions)==null?void 0:t.width)??e.width??0,height:((n=e.dimensions)==null?void 0:n.height)??e.height??0}}function Ln(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}const Md=()=>!0;function To(e){e?.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function Od(e,t,n){const o=[],r={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())zn(r,An(i))>0&&o.push(i);return o}const Dd=250;function Td(e,t,n,o){var r,i;let l=[],a=Number.POSITIVE_INFINITY;const u=Od(e,n,t+Dd);for(const s of u){const c=[...((r=s.handleBounds)==null?void 0:r.source)??[],...((i=s.handleBounds)==null?void 0:i.target)??[]];for(const d of c){if(o.nodeId===d.nodeId&&o.type===d.type&&o.id===d.id)continue;const{x:f,y:h}=Tt(s,d,d.position,!0),v=Math.sqrt((f-e.x)**2+(h-e.y)**2);v>t||(v<a?(l=[{...d,x:f,y:h}],a=v):v===a&&l.push({...d,x:f,y:h}))}}if(!l.length)return null;if(l.length>1){const s=o.type==="source"?"target":"source";return l.find(c=>c.type===s)??l[0]}return l[0]}function Li(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:r,fromType:i,doc:l,lib:a,flowId:u,isValidConnection:s=Md},c,d,f,h){const v=i==="target",y=t?l.querySelector(`.${a}-flow__handle[data-id="${u}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:b,y:w}=qe(e),E=l.elementFromPoint(b,w),g=E?.classList.contains(`${a}-flow__handle`)?E:y,x={handleDomNode:g,isValid:!1,connection:null,toHandle:null};if(g){const O=Hi(void 0,g),B=g.getAttribute("data-nodeid"),G=g.getAttribute("data-handleid"),T=g.classList.contains("connectable"),j=g.classList.contains("connectableend");if(!B||!O)return x;const X={source:v?B:o,sourceHandle:v?G:r,target:v?o:B,targetHandle:v?r:G};x.connection=X;const S=T&&j&&(n===lt.Strict?v&&O==="source"||!v&&O==="target":B!==o||G!==r);x.isValid=S&&s(X,{nodes:d,edges:c,sourceNode:f(X.source),targetNode:f(X.target)}),x.toHandle=Fi(B,O,G,h,n,!0)}return x}function Hi(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function Pd(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function Ad(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function Fi(e,t,n,o,r,i=!1){var l,a,u;const s=o.get(e);if(!s)return null;const c=r===lt.Strict?(l=s.handleBounds)==null?void 0:l[t]:[...((a=s.handleBounds)==null?void 0:a.source)??[],...((u=s.handleBounds)==null?void 0:u.target)??[]],d=(n?c?.find(f=>f.id===n):c?.[0])??null;return d&&i?{...d,...Tt(s,d,d.position,!0)}:d}const Po={[re.Left]:re.Right,[re.Right]:re.Left,[re.Top]:re.Bottom,[re.Bottom]:re.Top},zd=["production","prod"];function on(e,...t){Yi()&&console.warn(`[Vue Flow]: ${e}`,...t)}function Yi(){return!zd.includes("production")}function Gi(e,t,n,o,r){const i=t.querySelectorAll(`.vue-flow__handle.${e}`);return i?.length?Array.from(i).map(l=>{const a=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),type:e,nodeId:r,position:l.getAttribute("data-handlepos"),x:(a.left-n.left)/o,y:(a.top-n.top)/o,...Rn(l)}}):null}function Ao(e,t,n,o,r,i=!1,l){r.value=!1,e.selected?(i||e.selected&&t)&&(o([e]),ze(()=>{l.blur()})):n([e])}function De(e){return typeof K(e)<"u"}function Rd(e,t,n,o){if(!e||!e.source||!e.target)return n(new Te(Oe.EDGE_INVALID,e?.id??"[ID UNKNOWN]")),!1;let r;return at(e)?r=e:r={...e,id:bi(e)},r=yi(r,void 0,o),vd(r,t)?!1:r}function Bd(e,t,n,o,r){if(!t.source||!t.target)return r(new Te(Oe.EDGE_INVALID,e.id)),!1;if(!n)return r(new Te(Oe.EDGE_NOT_FOUND,e.id)),!1;const{id:i,...l}=e;return{...l,id:o?bi(t):i,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function ji(e,t,n){const o={},r=[];for(let i=0;i<e.length;++i){const l=e[i];if(!xt(l)){n(new Te(Oe.NODE_INVALID,l?.id)||`[ID UNKNOWN|INDEX ${i}]`);continue}const a=hd(l,t(l.id),l.parentNode);l.parentNode&&(o[l.parentNode]=!0),r[i]=a}for(const i of r){const l=t(i.parentNode)||r.find(a=>a.id===i.parentNode);i.parentNode&&!l&&n(new Te(Oe.NODE_MISSING_PARENT,i.id,i.parentNode)),(i.parentNode||o[i.id])&&(o[i.id]&&(i.isParent=!0),l&&(l.isParent=!0))}return r}function Xi(e,t,n,o,r,i){let l=r;const a=o.get(l)||new Map;o.set(l,a.set(n,t)),l=`${r}-${e}`;const u=o.get(l)||new Map;if(o.set(l,u.set(n,t)),i){l=`${r}-${e}-${i}`;const s=o.get(l)||new Map;o.set(l,s.set(n,t))}}function zo(e,t,n){e.clear();for(const o of n){const{source:r,target:i,sourceHandle:l=null,targetHandle:a=null}=o,u={edgeId:o.id,source:r,target:i,sourceHandle:l,targetHandle:a},s=`${r}-${l}--${i}-${a}`,c=`${i}-${a}--${r}-${l}`;Xi("source",u,c,e,r,l),Xi("target",u,s,e,i,a)}}function Ui(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Ro(e,t,n,o,r,i,l,a){const u=[];for(const s of e){const c=at(s)?s:Rd(s,a,r,i);if(!c)continue;const d=n(c.source),f=n(c.target);if(!d||!f){r(new Te(Oe.EDGE_SOURCE_TARGET_MISSING,c.id,c.source,c.target));continue}if(!d){r(new Te(Oe.EDGE_SOURCE_MISSING,c.id,c.source));continue}if(!f){r(new Te(Oe.EDGE_TARGET_MISSING,c.id,c.target));continue}if(t&&!t(c,{edges:a,nodes:l,sourceNode:d,targetNode:f})){r(new Te(Oe.EDGE_INVALID,c.id));continue}const h=o(c.id);u.push({...yi(c,h,i),sourceNode:d,targetNode:f})}return u}const Wi=Symbol("vueFlow"),Zi=Symbol("nodeId"),Ki=Symbol("nodeRef"),Vd=Symbol("edgeId"),Ld=Symbol("edgeRef"),Hn=Symbol("slots");function qi(e){const{vueFlowRef:t,snapToGrid:n,snapGrid:o,noDragClassName:r,nodeLookup:i,nodeExtent:l,nodeDragThreshold:a,viewport:u,autoPanOnNodeDrag:s,autoPanSpeed:c,nodesDraggable:d,panBy:f,findNode:h,multiSelectionActive:v,nodesSelectionActive:y,selectNodesOnDrag:b,removeSelectedElements:w,addSelectedNodes:E,updateNodePositions:g,emits:x}=Se(),{onStart:O,onDrag:B,onStop:G,onClick:T,el:j,disabled:X,id:P,selectable:S,dragHandle:Y}=e,m=Le(!1);let M=[],k,z=null,C={x:void 0,y:void 0},D={x:0,y:0},A=null,L=!1,V=!1,ne=0,le=!1;const H=Yd(),W=({x:Z,y:ae})=>{C={x:Z,y:ae};let _=!1;if(M=M.map(p=>{const N={x:Z-p.distance.x,y:ae-p.distance.y},{computedPosition:I}=Oo(p,n.value?Ln(N,o.value):N,x.error,l.value,p.parentNode?h(p.parentNode):void 0);return _=_||p.position.x!==I.x||p.position.y!==I.y,p.position=I,p}),V=V||_,!!_&&(g(M,!0,!0),m.value=!0,A)){const[p,N]=Mo({id:P,dragItems:M,findNode:h});B({event:A,node:p,nodes:N})}},ie=()=>{if(!z)return;const[Z,ae]=Mi(D,z,c.value);if(Z!==0||ae!==0){const _={x:(C.x??0)-Z/u.value.zoom,y:(C.y??0)-ae/u.value.zoom};f({x:Z,y:ae})&&W(_)}ne=requestAnimationFrame(ie)},R=(Z,ae)=>{L=!0;const _=h(P);!b.value&&!v.value&&_&&(_.selected||w()),_&&ve(S)&&b.value&&Ao(_,v.value,E,w,y,!1,ae);const p=H(Z.sourceEvent);if(C=p,M=xd(i.value,d.value,p,P),M.length){const[N,I]=Mo({id:P,dragItems:M,findNode:h});O({event:Z.sourceEvent,node:N,nodes:I})}},F=(Z,ae)=>{var _;Z.sourceEvent.type==="touchmove"&&Z.sourceEvent.touches.length>1||(V=!1,a.value===0&&R(Z,ae),C=H(Z.sourceEvent),z=((_=t.value)==null?void 0:_.getBoundingClientRect())||null,D=qe(Z.sourceEvent,z))},oe=(Z,ae)=>{const _=H(Z.sourceEvent);if(!le&&L&&s.value&&(le=!0,ie()),!L){const p=_.xSnapped-(C.x??0),N=_.ySnapped-(C.y??0);Math.sqrt(p*p+N*N)>a.value&&R(Z,ae)}(C.x!==_.xSnapped||C.y!==_.ySnapped)&&M.length&&L&&(A=Z.sourceEvent,D=qe(Z.sourceEvent,z),W(_))},U=Z=>{let ae=!1;if(!L&&!m.value&&!v.value){const _=Z.sourceEvent,p=H(_),N=p.xSnapped-(C.x??0),I=p.ySnapped-(C.y??0),$=Math.sqrt(N*N+I*I);$!==0&&$<=a.value&&(T?.(_),ae=!0)}if(M.length&&!ae){V&&(g(M,!1,!1),V=!1);const[_,p]=Mo({id:P,dragItems:M,findNode:h});G({event:Z.sourceEvent,node:_,nodes:p})}M=[],m.value=!1,le=!1,L=!1,C={x:void 0,y:void 0},cancelAnimationFrame(ne)};return we([()=>ve(X),j],([Z,ae],_,p)=>{if(ae){const N=He(ae);Z||(k=fu().on("start",I=>F(I,ae)).on("drag",I=>oe(I,ae)).on("end",I=>U(I)).filter(I=>{const $=I.target,J=ve(Y);return!I.button&&(!r.value||!zi($,`.${r.value}`,ae)&&(!J||zi($,J,ae)))}),N.call(k)),p(()=>{N.on(".drag",null),k&&(k.on("start",null),k.on("drag",null),k.on("end",null))})}}),m}function Hd(){return{doubleClick:q(),click:q(),mouseEnter:q(),mouseMove:q(),mouseLeave:q(),contextMenu:q(),updateStart:q(),update:q(),updateEnd:q()}}function Fd(e,t){const n=Hd();return n.doubleClick.on(o=>{var r,i;t.edgeDoubleClick(o),(i=(r=e.events)==null?void 0:r.doubleClick)==null||i.call(r,o)}),n.click.on(o=>{var r,i;t.edgeClick(o),(i=(r=e.events)==null?void 0:r.click)==null||i.call(r,o)}),n.mouseEnter.on(o=>{var r,i;t.edgeMouseEnter(o),(i=(r=e.events)==null?void 0:r.mouseEnter)==null||i.call(r,o)}),n.mouseMove.on(o=>{var r,i;t.edgeMouseMove(o),(i=(r=e.events)==null?void 0:r.mouseMove)==null||i.call(r,o)}),n.mouseLeave.on(o=>{var r,i;t.edgeMouseLeave(o),(i=(r=e.events)==null?void 0:r.mouseLeave)==null||i.call(r,o)}),n.contextMenu.on(o=>{var r,i;t.edgeContextMenu(o),(i=(r=e.events)==null?void 0:r.contextMenu)==null||i.call(r,o)}),n.updateStart.on(o=>{var r,i;t.edgeUpdateStart(o),(i=(r=e.events)==null?void 0:r.updateStart)==null||i.call(r,o)}),n.update.on(o=>{var r,i;t.edgeUpdate(o),(i=(r=e.events)==null?void 0:r.update)==null||i.call(r,o)}),n.updateEnd.on(o=>{var r,i;t.edgeUpdateEnd(o),(i=(r=e.events)==null?void 0:r.updateEnd)==null||i.call(r,o)}),Object.entries(n).reduce((o,[r,i])=>(o.emit[r]=i.trigger,o.on[r]=i.on,o),{emit:{},on:{}})}function Yd(){const{viewport:e,snapGrid:t,snapToGrid:n,vueFlowRef:o}=Se();return r=>{var i;const l=((i=o.value)==null?void 0:i.getBoundingClientRect())??{left:0,top:0},a=$d(r)?r.sourceEvent:r,{x:u,y:s}=qe(a,l),c=tn({x:u,y:s},e.value),{x:d,y:f}=n.value?Ln(c,t.value):c;return{xSnapped:d,ySnapped:f,...c}}}function Fn(){return!0}function Ji({handleId:e,nodeId:t,type:n,isValidConnection:o,edgeUpdaterType:r,onEdgeUpdate:i,onEdgeUpdateEnd:l}){const{id:a,vueFlowRef:u,connectionMode:s,connectionRadius:c,connectOnClick:d,connectionClickStartHandle:f,nodesConnectable:h,autoPanOnConnect:v,autoPanSpeed:y,findNode:b,panBy:w,startConnection:E,updateConnection:g,endConnection:x,emits:O,viewport:B,edges:G,nodes:T,isValidConnection:j,nodeLookup:X}=Se();let P=null,S=!1,Y=null;function m(k){var z;const C=ve(n)==="target",D=Do(k),A=_i(k.target),L=k.currentTarget;if(L&&(D&&k.button===0||!D)){let V=function(se){_=qe(se,U),W=Td(tn(_,B.value,!1,[1,1]),c.value,X.value,I),p||(N(),p=!0);const fe=Li(se,{handle:W,connectionMode:s.value,fromNodeId:ve(t),fromHandleId:ve(e),fromType:C?"target":"source",isValidConnection:H,doc:A,lib:"vue",flowId:a,nodeLookup:X.value},G.value,T.value,b,X.value);Y=fe.handleDomNode,P=fe.connection,S=Ad(!!W,fe.isValid);const _e={...ce,isValid:S,to:fe.toHandle&&S?en({x:fe.toHandle.x,y:fe.toHandle.y},B.value):_,toHandle:fe.toHandle,toPosition:S&&fe.toHandle?fe.toHandle.position:Po[I.position],toNode:fe.toHandle?X.value.get(fe.toHandle.nodeId):null};if(S&&W&&ce?.toHandle&&_e.toHandle&&ce.toHandle.type===_e.toHandle.type&&ce.toHandle.nodeId===_e.toHandle.nodeId&&ce.toHandle.id===_e.toHandle.id&&ce.to.x===_e.to.x&&ce.to.y===_e.to.y)return;const Ee=W??fe.toHandle;if(g(Ee&&S?en({x:Ee.x,y:Ee.y},B.value):_,Ee,Pd(!!Ee,S)),ce=_e,!W&&!S&&!Y)return To(ae);P&&P.source!==P.target&&Y&&(To(ae),ae=Y,Y.classList.add("connecting","vue-flow__handle-connecting"),Y.classList.toggle("valid",!!S),Y.classList.toggle("vue-flow__handle-valid",!!S))},ne=function(se){"touches"in se&&se.touches.length>0||((W||Y)&&P&&S&&(i?i(se,P):O.connect(P)),O.connectEnd(se),r&&l?.(se),To(ae),cancelAnimationFrame(ie),x(se),p=!1,S=!1,P=null,Y=null,A.removeEventListener("mousemove",V),A.removeEventListener("mouseup",ne),A.removeEventListener("touchmove",V),A.removeEventListener("touchend",ne))};const le=b(ve(t));let H=ve(o)||j.value||Fn;!H&&le&&(H=(C?le.isValidSourcePos:le.isValidTargetPos)||Fn);let W,ie=0;const{x:R,y:F}=qe(k),oe=Hi(ve(r),L),U=(z=u.value)==null?void 0:z.getBoundingClientRect();if(!U||!oe)return;const Z=Fi(ve(t),oe,ve(e),X.value,s.value);if(!Z)return;let ae,_=qe(k,U),p=!1;const N=()=>{if(!v.value)return;const[se,fe]=Mi(_,U,y.value);w({x:se,y:fe}),ie=requestAnimationFrame(N)},I={...Z,nodeId:ve(t),type:oe,position:Z.position},$=X.value.get(ve(t)),ee={inProgress:!0,isValid:null,from:Tt($,I,re.Left,!0),fromHandle:I,fromPosition:I.position,fromNode:$,to:_,toHandle:null,toPosition:Po[I.position],toNode:null};E({nodeId:ve(t),id:ve(e),type:oe,position:L?.getAttribute("data-handlepos")||re.Top,..._},{x:R-U.left,y:F-U.top}),O.connectStart({event:k,nodeId:ve(t),handleId:ve(e),handleType:oe});let ce=ee;A.addEventListener("mousemove",V),A.addEventListener("mouseup",ne),A.addEventListener("touchmove",V),A.addEventListener("touchend",ne)}}function M(k){var z,C;if(!d.value)return;const D=ve(n)==="target";if(!f.value){O.clickConnectStart({event:k,nodeId:ve(t),handleId:ve(e)}),E({nodeId:ve(t),type:ve(n),id:ve(e),position:re.Top,...qe(k)},void 0,!0);return}let A=ve(o)||j.value||Fn;const L=b(ve(t));if(!A&&L&&(A=(D?L.isValidSourcePos:L.isValidTargetPos)||Fn),L&&(typeof L.connectable>"u"?h.value:L.connectable)===!1)return;const V=_i(k.target),ne=Li(k,{handle:{nodeId:ve(t),id:ve(e),type:ve(n),position:re.Top,...qe(k)},connectionMode:s.value,fromNodeId:f.value.nodeId,fromHandleId:f.value.id??null,fromType:f.value.type,isValidConnection:A,doc:V,lib:"vue",flowId:a,nodeLookup:X.value},G.value,T.value,b,X.value),le=((z=ne.connection)==null?void 0:z.source)===((C=ne.connection)==null?void 0:C.target);ne.isValid&&ne.connection&&!le&&O.connect(ne.connection),O.clickConnectEnd(k),x(k,!0)}return{handlePointerDown:m,handleClick:M}}function Gd(){return it(Zi,"")}function Qi(e){const t=e??Gd()??"",n=it(Ki,ye(null)),{findNode:o,edges:r,emits:i}=Se(),l=o(t);return l||i.error(new Te(Oe.NODE_NOT_FOUND,t)),{id:t,nodeEl:n,node:l,parentNode:pe(()=>o(l.parentNode)),connectedEdges:pe(()=>Si([l],r.value))}}function jd(){return{doubleClick:q(),click:q(),mouseEnter:q(),mouseMove:q(),mouseLeave:q(),contextMenu:q(),dragStart:q(),drag:q(),dragStop:q()}}function Xd(e,t){const n=jd();return n.doubleClick.on(o=>{var r,i;t.nodeDoubleClick(o),(i=(r=e.events)==null?void 0:r.doubleClick)==null||i.call(r,o)}),n.click.on(o=>{var r,i;t.nodeClick(o),(i=(r=e.events)==null?void 0:r.click)==null||i.call(r,o)}),n.mouseEnter.on(o=>{var r,i;t.nodeMouseEnter(o),(i=(r=e.events)==null?void 0:r.mouseEnter)==null||i.call(r,o)}),n.mouseMove.on(o=>{var r,i;t.nodeMouseMove(o),(i=(r=e.events)==null?void 0:r.mouseMove)==null||i.call(r,o)}),n.mouseLeave.on(o=>{var r,i;t.nodeMouseLeave(o),(i=(r=e.events)==null?void 0:r.mouseLeave)==null||i.call(r,o)}),n.contextMenu.on(o=>{var r,i;t.nodeContextMenu(o),(i=(r=e.events)==null?void 0:r.contextMenu)==null||i.call(r,o)}),n.dragStart.on(o=>{var r,i;t.nodeDragStart(o),(i=(r=e.events)==null?void 0:r.dragStart)==null||i.call(r,o)}),n.drag.on(o=>{var r,i;t.nodeDrag(o),(i=(r=e.events)==null?void 0:r.drag)==null||i.call(r,o)}),n.dragStop.on(o=>{var r,i;t.nodeDragStop(o),(i=(r=e.events)==null?void 0:r.dragStop)==null||i.call(r,o)}),Object.entries(n).reduce((o,[r,i])=>(o.emit[r]=i.trigger,o.on[r]=i.on,o),{emit:{},on:{}})}function el(){const{getSelectedNodes:e,nodeExtent:t,updateNodePositions:n,findNode:o,snapGrid:r,snapToGrid:i,nodesDraggable:l,emits:a}=Se();return(u,s=!1)=>{const c=i.value?r.value[0]:5,d=i.value?r.value[1]:5,f=s?4:1,h=u.x*c*f,v=u.y*d*f,y=[];for(const b of e.value)if(b.draggable||l&&typeof b.draggable>"u"){const w={x:b.computedPosition.x+h,y:b.computedPosition.y+v},{position:E}=Oo(b,w,a.error,t.value,b.parentNode?o(b.parentNode):void 0);y.push({id:b.id,position:E,from:b.position,distance:{x:u.x,y:u.y},dimensions:b.dimensions})}n(y,!0,!1)}}const Yn=.1,Ud=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2;function ct(){return on("Viewport not initialized yet."),Promise.resolve(!1)}const Wd={zoomIn:ct,zoomOut:ct,zoomTo:ct,fitView:ct,setCenter:ct,fitBounds:ct,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:ct,setTransform:ct,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function Zd(e){function t(o,r){return new Promise(i=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(r?.interpolate==="linear"?jt:Sn).scaleBy(Bo(e.d3Selection,r?.duration,r?.ease,()=>{i(!0)}),o):i(!1)})}function n(o,r,i,l){return new Promise(a=>{var u;const{x:s,y:c}=mi({x:-o,y:-r},e.translateExtent),d=Mt.translate(-s,-c).scale(i);e.d3Selection&&e.d3Zoom?(u=e.d3Zoom)==null||u.interpolate(l?.interpolate==="linear"?jt:Sn).transform(Bo(e.d3Selection,l?.duration,l?.ease,()=>{a(!0)}),d):a(!1)})}return pe(()=>e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height?{viewportInitialized:!0,zoomIn:r=>t(1.2,r),zoomOut:r=>t(1/1.2,r),zoomTo:(r,i)=>new Promise(l=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(i?.interpolate==="linear"?jt:Sn).scaleTo(Bo(e.d3Selection,i?.duration,i?.ease,()=>{l(!0)}),r):l(!1)}),setViewport:(r,i)=>n(r.x,r.y,r.zoom,i),setTransform:(r,i)=>n(r.x,r.y,r.zoom,i),getViewport:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),getTransform:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),fitView:(r={padding:Yn,includeHiddenNodes:!1,duration:0})=>{var i,l;const a=[];for(const f of e.nodes)f.dimensions.width&&f.dimensions.height&&(r?.includeHiddenNodes||!f.hidden)&&(!((i=r.nodes)!=null&&i.length)||(l=r.nodes)!=null&&l.length&&r.nodes.includes(f.id))&&a.push(f);if(!a.length)return Promise.resolve(!1);const u=Ei(a),{x:s,y:c,zoom:d}=ki(u,e.dimensions.width,e.dimensions.height,r.minZoom??e.minZoom,r.maxZoom??e.maxZoom,r.padding??Yn);return n(s,c,d,r)},setCenter:(r,i,l)=>{const a=typeof l?.zoom<"u"?l.zoom:e.maxZoom,u=e.dimensions.width/2-r*a,s=e.dimensions.height/2-i*a;return n(u,s,a,l)},fitBounds:(r,i={padding:Yn})=>{const{x:l,y:a,zoom:u}=ki(r,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,i.padding??Yn);return n(l,a,u,i)},project:r=>tn(r,e.viewport,e.snapToGrid,e.snapGrid),screenToFlowCoordinate:r=>{if(e.vueFlowRef){const{x:i,y:l}=e.vueFlowRef.getBoundingClientRect(),a={x:r.x-i,y:r.y-l};return tn(a,e.viewport,e.snapToGrid,e.snapGrid)}return{x:0,y:0}},flowToScreenCoordinate:r=>{if(e.vueFlowRef){const{x:i,y:l}=e.vueFlowRef.getBoundingClientRect(),a={x:r.x+i,y:r.y+l};return en(a,e.viewport)}return{x:0,y:0}}}:Wd)}function Bo(e,t=0,n=Ud,o=()=>{}){const r=typeof t=="number"&&t>0;return r||o(),r?e.transition().duration(t).ease(n).on("end",o):e}function Kd(e,t,n){const o=no(!0);return o.run(()=>{const r=()=>{o.run(()=>{let y,b,w=!!(n.nodes.value.length||n.edges.value.length);y=St([e.modelValue,()=>{var E,g;return(g=(E=e.modelValue)==null?void 0:E.value)==null?void 0:g.length}],([E])=>{E&&Array.isArray(E)&&(b?.pause(),n.setElements(E),!b&&!w&&E.length?w=!0:b?.resume())}),b=St([n.nodes,n.edges,()=>n.edges.value.length,()=>n.nodes.value.length],([E,g])=>{var x;(x=e.modelValue)!=null&&x.value&&Array.isArray(e.modelValue.value)&&(y?.pause(),e.modelValue.value=[...E,...g],ze(()=>{y?.resume()}))},{immediate:w}),Rt(()=>{y?.stop(),b?.stop()})})},i=()=>{o.run(()=>{let y,b,w=!!n.nodes.value.length;y=St([e.nodes,()=>{var E,g;return(g=(E=e.nodes)==null?void 0:E.value)==null?void 0:g.length}],([E])=>{E&&Array.isArray(E)&&(b?.pause(),n.setNodes(E),!b&&!w&&E.length?w=!0:b?.resume())}),b=St([n.nodes,()=>n.nodes.value.length],([E])=>{var g;(g=e.nodes)!=null&&g.value&&Array.isArray(e.nodes.value)&&(y?.pause(),e.nodes.value=[...E],ze(()=>{y?.resume()}))},{immediate:w}),Rt(()=>{y?.stop(),b?.stop()})})},l=()=>{o.run(()=>{let y,b,w=!!n.edges.value.length;y=St([e.edges,()=>{var E,g;return(g=(E=e.edges)==null?void 0:E.value)==null?void 0:g.length}],([E])=>{E&&Array.isArray(E)&&(b?.pause(),n.setEdges(E),!b&&!w&&E.length?w=!0:b?.resume())}),b=St([n.edges,()=>n.edges.value.length],([E])=>{var g;(g=e.edges)!=null&&g.value&&Array.isArray(e.edges.value)&&(y?.pause(),e.edges.value=[...E],ze(()=>{y?.resume()}))},{immediate:w}),Rt(()=>{y?.stop(),b?.stop()})})},a=()=>{o.run(()=>{we(()=>t.maxZoom,()=>{t.maxZoom&&De(t.maxZoom)&&n.setMaxZoom(t.maxZoom)},{immediate:!0})})},u=()=>{o.run(()=>{we(()=>t.minZoom,()=>{t.minZoom&&De(t.minZoom)&&n.setMinZoom(t.minZoom)},{immediate:!0})})},s=()=>{o.run(()=>{we(()=>t.translateExtent,()=>{t.translateExtent&&De(t.translateExtent)&&n.setTranslateExtent(t.translateExtent)},{immediate:!0})})},c=()=>{o.run(()=>{we(()=>t.nodeExtent,()=>{t.nodeExtent&&De(t.nodeExtent)&&n.setNodeExtent(t.nodeExtent)},{immediate:!0})})},d=()=>{o.run(()=>{we(()=>t.applyDefault,()=>{De(t.applyDefault)&&(n.applyDefault.value=t.applyDefault)},{immediate:!0})})},f=()=>{o.run(()=>{const y=async b=>{let w=b;typeof t.autoConnect=="function"&&(w=await t.autoConnect(b)),w!==!1&&n.addEdges([w])};we(()=>t.autoConnect,()=>{De(t.autoConnect)&&(n.autoConnect.value=t.autoConnect)},{immediate:!0}),we(n.autoConnect,(b,w,E)=>{b?n.onConnect(y):n.hooks.value.connect.off(y),E(()=>{n.hooks.value.connect.off(y)})},{immediate:!0})})},h=()=>{const y=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const b of Object.keys(t)){const w=b;if(!y.includes(w)){const E=Ne(()=>t[w]),g=n[w];fn(g)&&o.run(()=>{we(E,x=>{De(x)&&(g.value=x)},{immediate:!0})})}}};r(),i(),l(),u(),a(),s(),c(),d(),f(),h()}),()=>o.stop()}function qd(){return{edgesChange:q(),nodesChange:q(),nodeDoubleClick:q(),nodeClick:q(),nodeMouseEnter:q(),nodeMouseMove:q(),nodeMouseLeave:q(),nodeContextMenu:q(),nodeDragStart:q(),nodeDrag:q(),nodeDragStop:q(),nodesInitialized:q(),miniMapNodeClick:q(),miniMapNodeDoubleClick:q(),miniMapNodeMouseEnter:q(),miniMapNodeMouseMove:q(),miniMapNodeMouseLeave:q(),connect:q(),connectStart:q(),connectEnd:q(),clickConnectStart:q(),clickConnectEnd:q(),paneReady:q(),init:q(),move:q(),moveStart:q(),moveEnd:q(),selectionDragStart:q(),selectionDrag:q(),selectionDragStop:q(),selectionContextMenu:q(),selectionStart:q(),selectionEnd:q(),viewportChangeStart:q(),viewportChange:q(),viewportChangeEnd:q(),paneScroll:q(),paneClick:q(),paneContextMenu:q(),paneMouseEnter:q(),paneMouseMove:q(),paneMouseLeave:q(),edgeContextMenu:q(),edgeMouseEnter:q(),edgeMouseMove:q(),edgeMouseLeave:q(),edgeDoubleClick:q(),edgeClick:q(),edgeUpdateStart:q(),edgeUpdate:q(),edgeUpdateEnd:q(),updateNodeInternals:q(),error:q(e=>on(e.message))}}function Jd(e,t){const n=gt();ar(()=>{for(const[r,i]of Object.entries(t.value)){const l=a=>{e(r,a)};i.setEmitter(l),Vt(i.removeEmitter),i.setHasEmitListeners(()=>o(r)),Vt(i.removeHasEmitListeners)}});function o(r){var i;const l=Qd(r);return!!((i=n?.vnode.props)==null?void 0:i[l])}}function Qd(e){const[t,...n]=e.split(":");return`on${t.replace(/(?:^|-)(\w)/g,(r,i)=>i.toUpperCase())}${n.length?`:${n.join(":")}`:""}`}function tl(){return{vueFlowRef:null,viewportRef:null,nodes:[],edges:[],connectionLookup:new Map,nodeTypes:{},edgeTypes:{},initialized:!1,dimensions:{width:0,height:0},viewport:{x:0,y:0,zoom:1},d3Zoom:null,d3Selection:null,d3ZoomHandler:null,minZoom:.5,maxZoom:2,translateExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodeExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],selectionMode:ko.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:qt.Free,paneClickDistance:0,panOnDrag:!0,edgeUpdaterRadius:10,onlyRenderVisibleElements:!1,defaultViewport:{x:0,y:0,zoom:1},nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,defaultMarkerColor:"#b1b1b7",connectionLineStyle:{},connectionLineType:null,connectionLineOptions:{type:wt.Bezier,style:{}},connectionMode:lt.Loose,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectionPosition:{x:Number.NaN,y:Number.NaN},connectionRadius:20,connectOnClick:!0,connectionStatus:null,isValidConnection:null,snapGrid:[15,15],snapToGrid:!1,edgesUpdatable:!1,edgesFocusable:!0,nodesFocusable:!0,nodesConnectable:!0,nodesDraggable:!0,nodeDragThreshold:1,elementsSelectable:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,selectionKeyCode:"Shift",multiSelectionKeyCode:Vn()?"Meta":"Control",zoomActivationKeyCode:Vn()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:qd(),applyDefault:!0,autoConnect:!1,fitViewOnInit:!1,fitViewOnInitDone:!1,noDragClassName:"nodrag",noWheelClassName:"nowheel",noPanClassName:"nopan",defaultEdgeOptions:void 0,elevateEdgesOnSelect:!1,elevateNodesOnSelect:!0,autoPanOnNodeDrag:!0,autoPanOnConnect:!0,autoPanSpeed:15,disableKeyboardA11y:!1,ariaLiveMessage:""}}const ef=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function tf(e,t,n){const o=Zd(e),r=_=>{const p=_??[];e.hooks.updateNodeInternals.trigger(p)},i=_=>pd(_,e.nodes,e.edges),l=_=>gd(_,e.nodes,e.edges),a=_=>Si(_,e.edges),u=({id:_,type:p,nodeId:N})=>{var I;const $=_?`-${p}-${_}`:`-${p}`;return Array.from(((I=e.connectionLookup.get(`${N}${$}`))==null?void 0:I.values())??[])},s=_=>{if(_)return t.value.get(_)},c=_=>{if(_)return n.value.get(_)},d=(_,p,N)=>{var I,$;const J=[];for(const ee of _){const ce={id:ee.id,type:"position",dragging:N,from:ee.from};if(p&&(ce.position=ee.position,ee.parentNode)){const se=s(ee.parentNode);ce.position={x:ce.position.x-(((I=se?.computedPosition)==null?void 0:I.x)??0),y:ce.position.y-((($=se?.computedPosition)==null?void 0:$.y)??0)}}J.push(ce)}J?.length&&e.hooks.nodesChange.trigger(J)},f=_=>{if(!e.vueFlowRef)return;const p=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!p)return;const N=window.getComputedStyle(p),{m22:I}=new window.DOMMatrixReadOnly(N.transform),$=[];for(const J of _){const ee=J,ce=s(ee.id);if(ce){const se=Rn(ee.nodeElement);if(!!(se.width&&se.height&&(ce.dimensions.width!==se.width||ce.dimensions.height!==se.height||ee.forceUpdate))){const _e=ee.nodeElement.getBoundingClientRect();ce.dimensions=se,ce.handleBounds.source=Gi("source",ee.nodeElement,_e,I,ce.id),ce.handleBounds.target=Gi("target",ee.nodeElement,_e,I,ce.id),$.push({id:ce.id,type:"dimensions",dimensions:se})}}}!e.fitViewOnInitDone&&e.fitViewOnInit&&o.value.fitView().then(()=>{e.fitViewOnInitDone=!0}),$.length&&e.hooks.nodesChange.trigger($)},h=(_,p)=>{const N=new Set,I=new Set;for(const ee of _)xt(ee)?N.add(ee.id):at(ee)&&I.add(ee.id);const $=ut(t.value,N,!0),J=ut(n.value,I);if(e.multiSelectionActive){for(const ee of N)$.push(st(ee,p));for(const ee of I)J.push(st(ee,p))}$.length&&e.hooks.nodesChange.trigger($),J.length&&e.hooks.edgesChange.trigger(J)},v=_=>{if(e.multiSelectionActive){const p=_.map(N=>st(N.id,!0));e.hooks.nodesChange.trigger(p);return}e.hooks.nodesChange.trigger(ut(t.value,new Set(_.map(p=>p.id)),!0)),e.hooks.edgesChange.trigger(ut(n.value))},y=_=>{if(e.multiSelectionActive){const p=_.map(N=>st(N.id,!0));e.hooks.edgesChange.trigger(p);return}e.hooks.edgesChange.trigger(ut(n.value,new Set(_.map(p=>p.id)))),e.hooks.nodesChange.trigger(ut(t.value,new Set,!0))},b=_=>{h(_,!0)},w=_=>{const N=(_||e.nodes).map(I=>(I.selected=!1,st(I.id,!1)));e.hooks.nodesChange.trigger(N)},E=_=>{const N=(_||e.edges).map(I=>(I.selected=!1,st(I.id,!1)));e.hooks.edgesChange.trigger(N)},g=_=>{if(!_||!_.length)return h([],!1);const p=_.reduce((N,I)=>{const $=st(I.id,!1);return xt(I)?N.nodes.push($):N.edges.push($),N},{nodes:[],edges:[]});p.nodes.length&&e.hooks.nodesChange.trigger(p.nodes),p.edges.length&&e.hooks.edgesChange.trigger(p.edges)},x=_=>{var p;(p=e.d3Zoom)==null||p.scaleExtent([_,e.maxZoom]),e.minZoom=_},O=_=>{var p;(p=e.d3Zoom)==null||p.scaleExtent([e.minZoom,_]),e.maxZoom=_},B=_=>{var p;(p=e.d3Zoom)==null||p.translateExtent(_),e.translateExtent=_},G=_=>{e.nodeExtent=_,r()},T=_=>{var p;(p=e.d3Zoom)==null||p.clickDistance(_)},j=_=>{e.nodesDraggable=_,e.nodesConnectable=_,e.elementsSelectable=_},X=_=>{const p=_ instanceof Function?_(e.nodes):_;!e.initialized&&!p.length||(e.nodes=ji(p,s,e.hooks.error.trigger))},P=_=>{const p=_ instanceof Function?_(e.edges):_;if(!e.initialized&&!p.length)return;const N=Ro(p,e.isValidConnection,s,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);zo(e.connectionLookup,n.value,N),e.edges=N},S=_=>{const p=_ instanceof Function?_([...e.nodes,...e.edges]):_;!e.initialized&&!p.length||(X(p.filter(xt)),P(p.filter(at)))},Y=_=>{let p=_ instanceof Function?_(e.nodes):_;p=Array.isArray(p)?p:[p];const N=ji(p,s,e.hooks.error.trigger),I=[];for(const $ of N)I.push(Di($));I.length&&e.hooks.nodesChange.trigger(I)},m=_=>{let p=_ instanceof Function?_(e.edges):_;p=Array.isArray(p)?p:[p];const N=Ro(p,e.isValidConnection,s,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),I=[];for(const $ of N)I.push(Di($));I.length&&e.hooks.edgesChange.trigger(I)},M=(_,p=!0,N=!1)=>{const I=_ instanceof Function?_(e.nodes):_,$=Array.isArray(I)?I:[I],J=[],ee=[];function ce(fe){const _e=a(fe);for(const Ee of _e)(!De(Ee.deletable)||Ee.deletable)&&ee.push(Pi(Ee.id,Ee.source,Ee.target,Ee.sourceHandle,Ee.targetHandle))}function se(fe){const _e=[];for(const Ee of e.nodes)Ee.parentNode===fe&&_e.push(Ee);if(_e.length){for(const Ee of _e)J.push(Ti(Ee.id));p&&ce(_e);for(const Ee of _e)se(Ee.id)}}for(const fe of $){const _e=typeof fe=="string"?s(fe):fe;_e&&(De(_e.deletable)&&!_e.deletable||(J.push(Ti(_e.id)),p&&ce([_e]),N&&se(_e.id)))}ee.length&&e.hooks.edgesChange.trigger(ee),J.length&&e.hooks.nodesChange.trigger(J)},k=_=>{const p=_ instanceof Function?_(e.edges):_,N=Array.isArray(p)?p:[p],I=[];for(const $ of N){const J=typeof $=="string"?c($):$;J&&(De(J.deletable)&&!J.deletable||I.push(Pi(typeof $=="string"?$:$.id,J.source,J.target,J.sourceHandle,J.targetHandle)))}e.hooks.edgesChange.trigger(I)},z=(_,p,N=!0)=>{const I=c(_.id);if(!I)return!1;const $=e.edges.indexOf(I),J=Bd(_,p,I,N,e.hooks.error.trigger);if(J){const[ee]=Ro([J],e.isValidConnection,s,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);return e.edges=e.edges.map((ce,se)=>se===$?ee:ce),zo(e.connectionLookup,n.value,[ee]),ee}return!1},C=(_,p,N={replace:!1})=>{const I=c(_);if(!I)return;const $=typeof p=="function"?p(I):p;I.data=N.replace?$:{...I.data,...$}},D=_=>Oi(_,e.nodes),A=_=>{const p=Oi(_,e.edges);return zo(e.connectionLookup,n.value,p),p},L=(_,p,N={replace:!1})=>{const I=s(_);if(!I)return;const $=typeof p=="function"?p(I):p;N.replace?e.nodes.splice(e.nodes.indexOf(I),1,$):Object.assign(I,$)},V=(_,p,N={replace:!1})=>{const I=s(_);if(!I)return;const $=typeof p=="function"?p(I):p;I.data=N.replace?$:{...I.data,...$}},ne=(_,p,N=!1)=>{N?e.connectionClickStartHandle=_:e.connectionStartHandle=_,e.connectionEndHandle=null,e.connectionStatus=null,p&&(e.connectionPosition=p)},le=(_,p=null,N=null)=>{e.connectionStartHandle&&(e.connectionPosition=_,e.connectionEndHandle=p,e.connectionStatus=N)},H=(_,p)=>{e.connectionPosition={x:Number.NaN,y:Number.NaN},e.connectionEndHandle=null,e.connectionStatus=null,p?e.connectionClickStartHandle=null:e.connectionStartHandle=null},W=_=>{const p=fd(_),N=p?null:Qt(_)?_:s(_.id);return!p&&!N?[null,null,p]:[p?_:An(N),N,p]},ie=(_,p=!0,N=e.nodes)=>{const[I,$,J]=W(_);if(!I)return[];const ee=[];for(const ce of N||e.nodes){if(!J&&(ce.id===$.id||!ce.computedPosition))continue;const se=An(ce),fe=zn(se,I);(p&&fe>0||fe>=se.width*se.height||fe>=Number(I.width)*Number(I.height))&&ee.push(ce)}return ee},R=(_,p,N=!0)=>{const[I]=W(_);if(!I)return!1;const $=zn(I,p);return N&&$>0||$>=Number(I.width)*Number(I.height)},F=_=>{const{viewport:p,dimensions:N,d3Zoom:I,d3Selection:$,translateExtent:J}=e;if(!I||!$||!_.x&&!_.y)return!1;const ee=Mt.translate(p.x+_.x,p.y+_.y).scale(p.zoom),ce=[[0,0],[N.width,N.height]],se=I.constrain()(ee,ce,J),fe=e.viewport.x!==se.x||e.viewport.y!==se.y||e.viewport.zoom!==se.k;return I.transform($,se),fe},oe=_=>{const p=_ instanceof Function?_(e):_,N=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];De(p.defaultEdgeOptions)&&(e.defaultEdgeOptions=p.defaultEdgeOptions);const I=p.modelValue||p.nodes||p.edges?[]:void 0;I&&(p.modelValue&&I.push(...p.modelValue),p.nodes&&I.push(...p.nodes),p.edges&&I.push(...p.edges),S(I));const $=()=>{De(p.maxZoom)&&O(p.maxZoom),De(p.minZoom)&&x(p.minZoom),De(p.translateExtent)&&B(p.translateExtent)};for(const J of Object.keys(p)){const ee=J,ce=p[ee];![...ef,...N].includes(ee)&&De(ce)&&(e[ee]=ce)}ro(()=>e.d3Zoom).not.toBeNull().then($),e.initialized||(e.initialized=!0)};return{updateNodePositions:d,updateNodeDimensions:f,setElements:S,setNodes:X,setEdges:P,addNodes:Y,addEdges:m,removeNodes:M,removeEdges:k,findNode:s,findEdge:c,updateEdge:z,updateEdgeData:C,updateNode:L,updateNodeData:V,applyEdgeChanges:A,applyNodeChanges:D,addSelectedElements:b,addSelectedNodes:v,addSelectedEdges:y,setMinZoom:x,setMaxZoom:O,setTranslateExtent:B,setNodeExtent:G,setPaneClickDistance:T,removeSelectedElements:g,removeSelectedNodes:w,removeSelectedEdges:E,startConnection:ne,updateConnection:le,endConnection:H,setInteractive:j,setState:oe,getIntersectingNodes:ie,getIncomers:i,getOutgoers:l,getConnectedEdges:a,getHandleConnections:u,isNodeIntersecting:R,panBy:F,fitView:_=>o.value.fitView(_),zoomIn:_=>o.value.zoomIn(_),zoomOut:_=>o.value.zoomOut(_),zoomTo:(_,p)=>o.value.zoomTo(_,p),setViewport:(_,p)=>o.value.setViewport(_,p),setTransform:(_,p)=>o.value.setTransform(_,p),getViewport:()=>o.value.getViewport(),getTransform:()=>o.value.getTransform(),setCenter:(_,p,N)=>o.value.setCenter(_,p,N),fitBounds:(_,p)=>o.value.fitBounds(_,p),project:_=>o.value.project(_),screenToFlowCoordinate:_=>o.value.screenToFlowCoordinate(_),flowToScreenCoordinate:_=>o.value.flowToScreenCoordinate(_),toObject:()=>{const _=[],p=[];for(const N of e.nodes){const{computedPosition:I,handleBounds:$,selected:J,dimensions:ee,isParent:ce,resizing:se,dragging:fe,events:_e,...Ee}=N;_.push(Ee)}for(const N of e.edges){const{selected:I,sourceNode:$,targetNode:J,events:ee,...ce}=N;p.push(ce)}return JSON.parse(JSON.stringify({nodes:_,edges:p,position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom,viewport:e.viewport}))},fromObject:_=>new Promise(p=>{const{nodes:N,edges:I,position:$,zoom:J,viewport:ee}=_;N&&X(N),I&&P(I);const[ce,se]=ee?.x&&ee?.y?[ee.x,ee.y]:$??[null,null];if(ce&&se){const fe=ee?.zoom||J||e.viewport.zoom;return ro(()=>o.value.viewportInitialized).toBe(!0).then(()=>{o.value.setViewport({x:ce,y:se,zoom:fe}).then(()=>{p(!0)})})}else p(!0)}),updateNodeInternals:r,viewportHelper:o,$reset:()=>{const _=tl();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){const p=Mt.translate(_.defaultViewport.x??0,_.defaultViewport.y??0).scale(bt(_.defaultViewport.zoom??1,_.minZoom,_.maxZoom)),N=e.viewportRef.getBoundingClientRect(),I=[[0,0],[N.width,N.height]],$=e.d3Zoom.constrain()(p,I,_.translateExtent);e.d3Zoom.transform(e.d3Selection,$)}oe(_)},$destroy:()=>{}}}const nf=["data-id","data-handleid","data-nodeid","data-handlepos"],dt=ke({...{name:"Handle",compatConfig:{MODE:3}},props:{id:{default:null},type:{},position:{default:()=>re.Top},isValidConnection:{type:Function},connectable:{type:[Boolean,Number,String,Function],default:void 0},connectableStart:{type:Boolean,default:!0},connectableEnd:{type:Boolean,default:!0}},setup(e,{expose:t}){const n=ir(e,["position","connectable","connectableStart","connectableEnd","id"]),o=Ne(()=>n.type??"source"),r=Ne(()=>n.isValidConnection??null),{id:i,connectionStartHandle:l,connectionClickStartHandle:a,connectionEndHandle:u,vueFlowRef:s,nodesConnectable:c,noDragClassName:d,noPanClassName:f}=Se(),{id:h,node:v,nodeEl:y,connectedEdges:b}=Qi(),w=ye(),E=Ne(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),g=Ne(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),x=Ne(()=>{var P,S,Y,m,M,k;return((P=l.value)==null?void 0:P.nodeId)===h&&((S=l.value)==null?void 0:S.id)===e.id&&((Y=l.value)==null?void 0:Y.type)===o.value||((m=u.value)==null?void 0:m.nodeId)===h&&((M=u.value)==null?void 0:M.id)===e.id&&((k=u.value)==null?void 0:k.type)===o.value}),O=Ne(()=>{var P,S,Y;return((P=a.value)==null?void 0:P.nodeId)===h&&((S=a.value)==null?void 0:S.id)===e.id&&((Y=a.value)==null?void 0:Y.type)===o.value}),{handlePointerDown:B,handleClick:G}=Ji({nodeId:h,handleId:e.id,isValidConnection:r,type:o}),T=pe(()=>typeof e.connectable=="string"&&e.connectable==="single"?!b.value.some(P=>{const S=P[`${o.value}Handle`];return P[o.value]!==h?!1:S?S===e.id:!0}):typeof e.connectable=="number"?b.value.filter(P=>{const S=P[`${o.value}Handle`];return P[o.value]!==h?!1:S?S===e.id:!0}).length<e.connectable:typeof e.connectable=="function"?e.connectable(v,b.value):De(e.connectable)?e.connectable:c.value);je(()=>{var P;if(!v.dimensions.width||!v.dimensions.height)return;const S=(P=v.handleBounds[o.value])==null?void 0:P.find(D=>D.id===e.id);if(!s.value||S)return;const Y=s.value.querySelector(".vue-flow__transformationpane");if(!y.value||!w.value||!Y||!e.id)return;const m=y.value.getBoundingClientRect(),M=w.value.getBoundingClientRect(),k=window.getComputedStyle(Y),{m22:z}=new window.DOMMatrixReadOnly(k.transform),C={id:e.id,position:e.position,x:(M.left-m.left)/z,y:(M.top-m.top)/z,type:o.value,nodeId:h,...Rn(w.value)};v.handleBounds[o.value]=[...v.handleBounds[o.value]??[],C]});function j(P){const S=Do(P);T.value&&E.value&&(S&&P.button===0||!S)&&B(P)}function X(P){!h||!a.value&&!E.value||T.value&&G(P)}return t({handleClick:G,handlePointerDown:B,onClick:X,onPointerDown:j}),(P,S)=>(Q(),he("div",{ref_key:"handle",ref:w,"data-id":`${K(i)}-${K(h)}-${e.id}-${o.value}`,"data-handleid":e.id,"data-nodeid":K(h),"data-handlepos":P.position,class:Ve(["vue-flow__handle",[`vue-flow__handle-${P.position}`,`vue-flow__handle-${e.id}`,K(d),K(f),o.value,{connectable:T.value,connecting:O.value,connectablestart:E.value,connectableend:g.value,connectionindicator:T.value&&(E.value&&!x.value||g.value&&x.value)}]]),onMousedown:j,onTouchstartPassive:j,onClick:X},[Ce(P.$slots,"default",{id:P.id})],42,nf))}}),Gn=function({sourcePosition:e=re.Bottom,targetPosition:t=re.Top,label:n,connectable:o=!0,isValidTargetPos:r,isValidSourcePos:i,data:l}){const a=l.label??n;return[xe(dt,{type:"target",position:t,connectable:o,isValidConnection:r}),typeof a!="string"&&a?xe(a):xe(Be,[a]),xe(dt,{type:"source",position:e,connectable:o,isValidConnection:i})]};Gn.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"],Gn.inheritAttrs=!1,Gn.compatConfig={MODE:3};const of=Gn,jn=function({targetPosition:e=re.Top,label:t,connectable:n=!0,isValidTargetPos:o,data:r}){const i=r.label??t;return[xe(dt,{type:"target",position:e,connectable:n,isValidConnection:o}),typeof i!="string"&&i?xe(i):xe(Be,[i])]};jn.props=["targetPosition","label","isValidTargetPos","connectable","data"],jn.inheritAttrs=!1,jn.compatConfig={MODE:3};const rf=jn,Xn=function({sourcePosition:e=re.Bottom,label:t,connectable:n=!0,isValidSourcePos:o,data:r}){const i=r.label??t;return[typeof i!="string"&&i?xe(i):xe(Be,[i]),xe(dt,{type:"source",position:e,connectable:n,isValidConnection:o})]};Xn.props=["sourcePosition","label","isValidSourcePos","connectable","data"],Xn.inheritAttrs=!1,Xn.compatConfig={MODE:3};const lf=Xn,af=["transform"],sf=["width","height","x","y","rx","ry"],uf=["y"],cf=ke({...{name:"EdgeText",compatConfig:{MODE:3}},props:{x:{},y:{},label:{},labelStyle:{default:()=>({})},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:()=>({})},labelBgPadding:{default:()=>[2,4]},labelBgBorderRadius:{default:2}},setup(e){const t=ye({x:0,y:0,width:0,height:0}),n=ye(null),o=pe(()=>`translate(${e.x-t.value.width/2} ${e.y-t.value.height/2})`);je(r),we([()=>e.x,()=>e.y,n,()=>e.label],r);function r(){if(!n.value)return;const i=n.value.getBBox();(i.width!==t.value.width||i.height!==t.value.height)&&(t.value=i)}return(i,l)=>(Q(),he("g",{transform:o.value,class:"vue-flow__edge-textwrapper"},[i.labelShowBg?(Q(),he("rect",{key:0,class:"vue-flow__edge-textbg",width:`${t.value.width+2*i.labelBgPadding[0]}px`,height:`${t.value.height+2*i.labelBgPadding[1]}px`,x:-i.labelBgPadding[0],y:-i.labelBgPadding[1],style:Pe(i.labelBgStyle),rx:i.labelBgBorderRadius,ry:i.labelBgBorderRadius},null,12,sf)):Ie("",!0),de("text",hn(i.$attrs,{ref_key:"el",ref:n,class:"vue-flow__edge-text",y:t.value.height/2,dy:"0.3em",style:i.labelStyle}),[Ce(i.$slots,"default",{},()=>[typeof i.label!="string"?(Q(),$e(pt(i.label),{key:0})):(Q(),he(Be,{key:1},[Me(be(i.label),1)],64))])],16,uf)],8,af))}}),df=["id","d","marker-end","marker-start"],ff=["d","stroke-width"],Un=ke({...{name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3}},props:{id:{},labelX:{},labelY:{},path:{},label:{},markerStart:{},markerEnd:{},interactionWidth:{default:20},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{}},setup(e,{expose:t}){const n=ye(null),o=ye(null),r=ye(null),i=dr();return t({pathEl:n,interactionEl:o,labelEl:r}),(l,a)=>(Q(),he(Be,null,[de("path",hn(K(i),{id:l.id,ref_key:"pathEl",ref:n,d:l.path,class:"vue-flow__edge-path","marker-end":l.markerEnd,"marker-start":l.markerStart}),null,16,df),l.interactionWidth?(Q(),he("path",{key:0,ref_key:"interactionEl",ref:o,fill:"none",d:l.path,"stroke-width":l.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,ff)):Ie("",!0),l.label&&l.labelX&&l.labelY?(Q(),$e(cf,{key:1,ref_key:"labelEl",ref:r,x:l.labelX,y:l.labelY,label:l.label,"label-show-bg":l.labelShowBg,"label-bg-style":l.labelBgStyle,"label-bg-padding":l.labelBgPadding,"label-bg-border-radius":l.labelBgBorderRadius,"label-style":l.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):Ie("",!0)],64))}});function nl({sourceX:e,sourceY:t,targetX:n,targetY:o}){const r=Math.abs(n-e)/2,i=n<e?n+r:n-r,l=Math.abs(o-t)/2,a=o<t?o+l:o-l;return[i,a,r,l]}function ol({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:r,sourceControlY:i,targetControlX:l,targetControlY:a}){const u=e*.125+r*.375+l*.375+n*.125,s=t*.125+i*.375+a*.375+o*.125,c=Math.abs(u-e),d=Math.abs(s-t);return[u,s,c,d]}function Wn(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function rl({pos:e,x1:t,y1:n,x2:o,y2:r,c:i}){let l,a;switch(e){case re.Left:l=t-Wn(t-o,i),a=n;break;case re.Right:l=t+Wn(o-t,i),a=n;break;case re.Top:l=t,a=n-Wn(n-r,i);break;case re.Bottom:l=t,a=n+Wn(r-n,i);break}return[l,a]}function il(e){const{sourceX:t,sourceY:n,sourcePosition:o=re.Bottom,targetX:r,targetY:i,targetPosition:l=re.Top,curvature:a=.25}=e,[u,s]=rl({pos:o,x1:t,y1:n,x2:r,y2:i,c:a}),[c,d]=rl({pos:l,x1:r,y1:i,x2:t,y2:n,c:a}),[f,h,v,y]=ol({sourceX:t,sourceY:n,targetX:r,targetY:i,sourceControlX:u,sourceControlY:s,targetControlX:c,targetControlY:d});return[`M${t},${n} C${u},${s} ${c},${d} ${r},${i}`,f,h,v,y]}function ll({pos:e,x1:t,y1:n,x2:o,y2:r}){let i,l;switch(e){case re.Left:case re.Right:i=.5*(t+o),l=n;break;case re.Top:case re.Bottom:i=t,l=.5*(n+r);break}return[i,l]}function al(e){const{sourceX:t,sourceY:n,sourcePosition:o=re.Bottom,targetX:r,targetY:i,targetPosition:l=re.Top}=e,[a,u]=ll({pos:o,x1:t,y1:n,x2:r,y2:i}),[s,c]=ll({pos:l,x1:r,y1:i,x2:t,y2:n}),[d,f,h,v]=ol({sourceX:t,sourceY:n,targetX:r,targetY:i,sourceControlX:a,sourceControlY:u,targetControlX:s,targetControlY:c});return[`M${t},${n} C${a},${u} ${s},${c} ${r},${i}`,d,f,h,v]}const sl={[re.Left]:{x:-1,y:0},[re.Right]:{x:1,y:0},[re.Top]:{x:0,y:-1},[re.Bottom]:{x:0,y:1}};function hf({source:e,sourcePosition:t=re.Bottom,target:n}){return t===re.Left||t===re.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1}}function ul(e,t){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function gf({source:e,sourcePosition:t=re.Bottom,target:n,targetPosition:o=re.Top,center:r,offset:i}){const l=sl[t],a=sl[o],u={x:e.x+l.x*i,y:e.y+l.y*i},s={x:n.x+a.x*i,y:n.y+a.y*i},c=hf({source:u,sourcePosition:t,target:s}),d=c.x!==0?"x":"y",f=c[d];let h,v,y;const b={x:0,y:0},w={x:0,y:0},[E,g,x,O]=nl({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[d]*a[d]===-1){v=r.x??E,y=r.y??g;const G=[{x:v,y:u.y},{x:v,y:s.y}],T=[{x:u.x,y},{x:s.x,y}];l[d]===f?h=d==="x"?G:T:h=d==="x"?T:G}else{const G=[{x:u.x,y:s.y}],T=[{x:s.x,y:u.y}];if(d==="x"?h=l.x===f?T:G:h=l.y===f?G:T,t===o){const Y=Math.abs(e[d]-n[d]);if(Y<=i){const m=Math.min(i-1,i-Y);l[d]===f?b[d]=(u[d]>e[d]?-1:1)*m:w[d]=(s[d]>n[d]?-1:1)*m}}if(t!==o){const Y=d==="x"?"y":"x",m=l[d]===a[Y],M=u[Y]>s[Y],k=u[Y]<s[Y];(l[d]===1&&(!m&&M||m&&k)||l[d]!==1&&(!m&&k||m&&M))&&(h=d==="x"?G:T)}const j={x:u.x+b.x,y:u.y+b.y},X={x:s.x+w.x,y:s.y+w.y},P=Math.max(Math.abs(j.x-h[0].x),Math.abs(X.x-h[0].x)),S=Math.max(Math.abs(j.y-h[0].y),Math.abs(X.y-h[0].y));P>=S?(v=(j.x+X.x)/2,y=h[0].y):(v=h[0].x,y=(j.y+X.y)/2)}return[[e,{x:u.x+b.x,y:u.y+b.y},...h,{x:s.x+w.x,y:s.y+w.y},n],v,y,x,O]}function pf(e,t,n,o){const r=Math.min(ul(e,t)/2,ul(t,n)/2,o),{x:i,y:l}=t;if(e.x===i&&i===n.x||e.y===l&&l===n.y)return`L${i} ${l}`;if(e.y===l){const s=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return`L ${i+r*s},${l}Q ${i},${l} ${i},${l+r*c}`}const a=e.x<n.x?1:-1,u=e.y<n.y?-1:1;return`L ${i},${l+r*u}Q ${i},${l} ${i+r*a},${l}`}function Vo(e){const{sourceX:t,sourceY:n,sourcePosition:o=re.Bottom,targetX:r,targetY:i,targetPosition:l=re.Top,borderRadius:a=5,centerX:u,centerY:s,offset:c=20}=e,[d,f,h,v,y]=gf({source:{x:t,y:n},sourcePosition:o,target:{x:r,y:i},targetPosition:l,center:{x:u,y:s},offset:c});return[d.reduce((w,E,g)=>{let x;return g>0&&g<d.length-1?x=pf(d[g-1],E,d[g+1],a):x=`${g===0?"M":"L"}${E.x} ${E.y}`,w+=x,w},""),f,h,v,y]}function vf(e){const{sourceX:t,sourceY:n,targetX:o,targetY:r}=e,[i,l,a,u]=nl({sourceX:t,sourceY:n,targetX:o,targetY:r});return[`M ${t},${n}L ${o},${r}`,i,l,a,u]}const mf=ke({name:"StraightEdge",props:["label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,r]=vf(e);return xe(Un,{path:n,labelX:o,labelY:r,...t,...e})}}}),cl=ke({name:"SmoothStepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","borderRadius","markerEnd","markerStart","interactionWidth","offset"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,r]=Vo({...e,sourcePosition:e.sourcePosition??re.Bottom,targetPosition:e.targetPosition??re.Top});return xe(Un,{path:n,labelX:o,labelY:r,...t,...e})}}}),_f=ke({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(e,{attrs:t}){return()=>xe(cl,{...e,...t,borderRadius:0})}}),yf=ke({name:"BezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","curvature","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,r]=il({...e,sourcePosition:e.sourcePosition??re.Bottom,targetPosition:e.targetPosition??re.Top});return xe(Un,{path:n,labelX:o,labelY:r,...t,...e})}}}),wf=ke({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,r]=al({...e,sourcePosition:e.sourcePosition??re.Bottom,targetPosition:e.targetPosition??re.Top});return xe(Un,{path:n,labelX:o,labelY:r,...t,...e})}}}),bf={input:lf,default:of,output:rf},xf={default:yf,straight:mf,step:_f,smoothstep:cl,simplebezier:wf};function Ef(e,t,n){const o=pe(()=>y=>t.value.get(y)),r=pe(()=>y=>n.value.get(y)),i=pe(()=>{const y={...xf,...e.edgeTypes},b=Object.keys(y);for(const w of e.edges)w.type&&!b.includes(w.type)&&(y[w.type]=w.type);return y}),l=pe(()=>{const y={...bf,...e.nodeTypes},b=Object.keys(y);for(const w of e.nodes)w.type&&!b.includes(w.type)&&(y[w.type]=w.type);return y}),a=pe(()=>e.onlyRenderVisibleElements?Ni(e.nodes,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):e.nodes),u=pe(()=>{if(e.onlyRenderVisibleElements){const y=[];for(const b of e.edges){const w=t.value.get(b.source),E=t.value.get(b.target);kd({sourcePos:w.computedPosition||{x:0,y:0},targetPos:E.computedPosition||{x:0,y:0},sourceWidth:w.dimensions.width,sourceHeight:w.dimensions.height,targetWidth:E.dimensions.width,targetHeight:E.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&y.push(b)}return y}return e.edges}),s=pe(()=>[...a.value,...u.value]),c=pe(()=>{const y=[];for(const b of e.nodes)b.selected&&y.push(b);return y}),d=pe(()=>{const y=[];for(const b of e.edges)b.selected&&y.push(b);return y}),f=pe(()=>[...c.value,...d.value]),h=pe(()=>{const y=[];for(const b of e.nodes)b.dimensions.width&&b.dimensions.height&&b.handleBounds!==void 0&&y.push(b);return y}),v=pe(()=>a.value.length>0&&h.value.length===a.value.length);return{getNode:o,getEdge:r,getElements:s,getEdgeTypes:i,getNodeTypes:l,getEdges:u,getNodes:a,getSelectedElements:f,getSelectedNodes:c,getSelectedEdges:d,getNodesInitialized:h,areNodesInitialized:v}}class Et{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){var t;const n=(t=gt())==null?void 0:t.appContext.app,o=n?.config.globalProperties.$vueFlowStorage??Et.instance;return Et.instance=o??new Et,n&&(n.config.globalProperties.$vueFlowStorage=Et.instance),Et.instance}set(t,n){return this.flows.set(t,n)}get(t){return this.flows.get(t)}remove(t){return this.flows.delete(t)}create(t,n){const o=tl(),r=lr(o),i={};for(const[f,h]of Object.entries(r.hooks)){const v=`on${f.charAt(0).toUpperCase()+f.slice(1)}`;i[v]=h.on}const l={};for(const[f,h]of Object.entries(r.hooks))l[f]=h.trigger;const a=pe(()=>{const f=new Map;for(const h of r.nodes)f.set(h.id,h);return f}),u=pe(()=>{const f=new Map;for(const h of r.edges)f.set(h.id,h);return f}),s=Ef(r,a,u),c=tf(r,a,u);c.setState({...r,...n});const d={...i,...s,...c,...ba(r),nodeLookup:a,edgeLookup:u,emits:l,id:t,vueFlowVersion:"1.48.2",$destroy:()=>{this.remove(t)}};return this.set(t,d),d}getId(){return`vue-flow-${this.currentId++}`}}function Se(e){const t=Et.getInstance(),n=to(),o=typeof e=="object",r=o?e:{id:e},i=r.id,l=i??n?.vueFlowId;let a;if(n){const u=it(Wi,null);typeof u<"u"&&u!==null&&(!l||u.id===l)&&(a=u)}if(a||l&&(a=t.get(l)),!a||l&&a.id!==l){const u=i??t.getId(),s=t.create(u,r);a=s,(n??no(!0)).run(()=>{we(s.applyDefault,(d,f,h)=>{const v=b=>{s.applyNodeChanges(b)},y=b=>{s.applyEdgeChanges(b)};d?(s.onNodesChange(v),s.onEdgesChange(y)):(s.hooks.value.nodesChange.off(v),s.hooks.value.edgesChange.off(y)),h(()=>{s.hooks.value.nodesChange.off(v),s.hooks.value.edgesChange.off(y)})},{immediate:!0}),Vt(()=>{if(a){const d=t.get(a.id);d?d.$destroy():on(`No store instance found for id ${a.id} in storage.`)}})})}else o&&a.setState(r);if(n&&(ht(Wi,a),n.vueFlowId=a.id),o){const u=gt();u?.type.name!=="VueFlow"&&a.emits.error(new Te(Oe.USEVUEFLOW_OPTIONS))}return a}function Nf(e){const{emits:t,dimensions:n}=Se();let o;je(()=>{const r=()=>{var i,l;if(!e.value||!(((l=(i=e.value).checkVisibility)==null?void 0:l.call(i))??!0))return;const a=Rn(e.value);(a.width===0||a.height===0)&&t.error(new Te(Oe.MISSING_VIEWPORT_DIMENSIONS)),n.value={width:a.width||500,height:a.height||500}};r(),window.addEventListener("resize",r),e.value&&(o=new ResizeObserver(()=>r()),o.observe(e.value)),dn(()=>{window.removeEventListener("resize",r),o&&e.value&&o.unobserve(e.value)})})}const Sf=ke({...{name:"UserSelection",compatConfig:{MODE:3}},props:{userSelectionRect:{}},setup(e){return(t,n)=>(Q(),he("div",{class:"vue-flow__selection vue-flow__container",style:Pe({width:`${t.userSelectionRect.width}px`,height:`${t.userSelectionRect.height}px`,transform:`translate(${t.userSelectionRect.x}px, ${t.userSelectionRect.y}px)`})},null,4))}}),kf=["tabIndex"],Cf=ke({...{name:"NodesSelection",compatConfig:{MODE:3}},setup(e){const{emits:t,viewport:n,getSelectedNodes:o,noPanClassName:r,disableKeyboardA11y:i,userSelectionActive:l}=Se(),a=el(),u=ye(null),s=qi({el:u,onStart(v){t.selectionDragStart(v),t.nodeDragStart(v)},onDrag(v){t.selectionDrag(v),t.nodeDrag(v)},onStop(v){t.selectionDragStop(v),t.nodeDragStop(v)}});je(()=>{var v;i.value||(v=u.value)==null||v.focus({preventScroll:!0})});const c=pe(()=>Ei(o.value)),d=pe(()=>({width:`${c.value.width}px`,height:`${c.value.height}px`,top:`${c.value.y}px`,left:`${c.value.x}px`}));function f(v){t.selectionContextMenu({event:v,nodes:o.value})}function h(v){i.value||Ot[v.key]&&(v.preventDefault(),a({x:Ot[v.key].x,y:Ot[v.key].y},v.shiftKey))}return(v,y)=>!K(l)&&c.value.width&&c.value.height?(Q(),he("div",{key:0,class:Ve(["vue-flow__nodesselection vue-flow__container",K(r)]),style:Pe({transform:`translate(${K(n).x}px,${K(n).y}px) scale(${K(n).zoom})`})},[de("div",{ref_key:"el",ref:u,class:Ve([{dragging:K(s)},"vue-flow__nodesselection-rect"]),style:Pe(d.value),tabIndex:K(i)?void 0:-1,onContextmenu:f,onKeydown:h},null,46,kf)],6)):Ie("",!0)}});function $f(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}const If=ke({...{name:"Pane",compatConfig:{MODE:3}},props:{isSelecting:{type:Boolean},selectionKeyPressed:{type:Boolean}},setup(e){const{vueFlowRef:t,nodes:n,viewport:o,emits:r,userSelectionActive:i,removeSelectedElements:l,userSelectionRect:a,elementsSelectable:u,nodesSelectionActive:s,getSelectedEdges:c,getSelectedNodes:d,removeNodes:f,removeEdges:h,selectionMode:v,deleteKeyCode:y,multiSelectionKeyCode:b,multiSelectionActive:w,edgeLookup:E,nodeLookup:g,connectionLookup:x,defaultEdgeOptions:O,connectionStartHandle:B,panOnDrag:G}=Se(),T=Le(null),j=Le(new Set),X=Le(new Set),P=Le(null),S=Ne(()=>u.value&&(e.isSelecting||i.value)),Y=Ne(()=>B.value!==null);let m=!1,M=!1;const k=Jt(y,{actInsideInputWithModifier:!1}),z=Jt(b);we(k,H=>{H&&(f(d.value),h(c.value),s.value=!1)}),we(z,H=>{w.value=H});function C(H,W){return ie=>{ie.target===W&&H?.(ie)}}function D(H){if(m||Y.value){m=!1;return}r.paneClick(H),l(),s.value=!1}function A(H){var W;if(Array.isArray(G.value)&&((W=G.value)!=null&&W.includes(2))){H.preventDefault();return}r.paneContextMenu(H)}function L(H){r.paneScroll(H)}function V(H){var W,ie,R;if(P.value=((W=t.value)==null?void 0:W.getBoundingClientRect())??null,!u.value||!e.isSelecting||H.button!==0||H.target!==T.value||!P.value)return;(R=(ie=H.target)==null?void 0:ie.setPointerCapture)==null||R.call(ie,H.pointerId);const{x:F,y:oe}=$f(H,P.value);M=!0,m=!1,l(),a.value={width:0,height:0,startX:F,startY:oe,x:F,y:oe},r.selectionStart(H)}function ne(H){var W;if(!P.value||!a.value)return;m=!0;const{x:ie,y:R}=qe(H,P.value),{startX:F=0,startY:oe=0}=a.value,U={startX:F,startY:oe,x:ie<F?ie:F,y:R<oe?R:oe,width:Math.abs(ie-F),height:Math.abs(R-oe)},Z=j.value,ae=X.value;j.value=new Set(Ni(n.value,U,o.value,v.value===ko.Partial,!0).map(p=>p.id)),X.value=new Set;const _=((W=O.value)==null?void 0:W.selectable)??!0;for(const p of j.value){const N=x.value.get(p);if(N)for(const{edgeId:I}of N.values()){const $=E.value.get(I);$&&($.selectable??_)&&X.value.add(I)}}if(!Ui(Z,j.value)){const p=ut(g.value,j.value,!0);r.nodesChange(p)}if(!Ui(ae,X.value)){const p=ut(E.value,X.value);r.edgesChange(p)}a.value=U,i.value=!0,s.value=!1}function le(H){var W;H.button!==0||!M||((W=H.target)==null||W.releasePointerCapture(H.pointerId),!i.value&&a.value&&H.target===T.value&&D(H),i.value=!1,a.value=null,s.value=j.value.size>0,r.selectionEnd(H),e.selectionKeyPressed&&(m=!1),M=!1)}return(H,W)=>(Q(),he("div",{ref_key:"container",ref:T,class:Ve(["vue-flow__pane vue-flow__container",{selection:H.isSelecting}]),onClick:W[0]||(W[0]=ie=>S.value?void 0:C(D,T.value)(ie)),onContextmenu:W[1]||(W[1]=ie=>C(A,T.value)(ie)),onWheelPassive:W[2]||(W[2]=ie=>C(L,T.value)(ie)),onPointerenter:W[3]||(W[3]=ie=>S.value?void 0:K(r).paneMouseEnter(ie)),onPointerdown:W[4]||(W[4]=ie=>S.value?V(ie):K(r).paneMouseMove(ie)),onPointermove:W[5]||(W[5]=ie=>S.value?ne(ie):K(r).paneMouseMove(ie)),onPointerup:W[6]||(W[6]=ie=>S.value?le(ie):void 0),onPointerleave:W[7]||(W[7]=ie=>K(r).paneMouseLeave(ie))},[Ce(H.$slots,"default"),K(i)&&K(a)?(Q(),$e(Sf,{key:0,"user-selection-rect":K(a)},null,8,["user-selection-rect"])):Ie("",!0),K(s)&&K(d).length?(Q(),$e(Cf,{key:1})):Ie("",!0)],34))}}),Mf=ke({...{name:"Transform",compatConfig:{MODE:3}},setup(e){const{viewport:t,fitViewOnInit:n,fitViewOnInitDone:o}=Se(),r=pe(()=>n.value?!o.value:!1),i=pe(()=>`translate(${t.value.x}px,${t.value.y}px) scale(${t.value.zoom})`);return(l,a)=>(Q(),he("div",{class:"vue-flow__transformationpane vue-flow__container",style:Pe({transform:i.value,opacity:r.value?0:void 0})},[Ce(l.$slots,"default")],4))}}),Of=ke({...{name:"Viewport",compatConfig:{MODE:3}},setup(e){const{minZoom:t,maxZoom:n,defaultViewport:o,translateExtent:r,zoomActivationKeyCode:i,selectionKeyCode:l,panActivationKeyCode:a,panOnScroll:u,panOnScrollMode:s,panOnScrollSpeed:c,panOnDrag:d,zoomOnDoubleClick:f,zoomOnPinch:h,zoomOnScroll:v,preventScrolling:y,noWheelClassName:b,noPanClassName:w,emits:E,connectionStartHandle:g,userSelectionActive:x,paneDragging:O,d3Zoom:B,d3Selection:G,d3ZoomHandler:T,viewport:j,viewportRef:X,paneClickDistance:P}=Se();Nf(X);const S=Le(!1),Y=Le(!1);let m=null,M=!1,k=0,z={x:0,y:0,zoom:0};const C=Jt(a),D=Jt(l),A=Jt(i),L=Ne(()=>(!D.value||D.value&&l.value===!0)&&(C.value||d.value)),V=Ne(()=>C.value||u.value),ne=Ne(()=>l.value===!0&&L.value!==!0),le=Ne(()=>D.value&&l.value!==!0||x.value||ne.value),H=Ne(()=>g.value!==null);je(()=>{if(!X.value){on("Viewport element is missing");return}const oe=X.value,U=oe.getBoundingClientRect(),Z=id().clickDistance(P.value).scaleExtent([t.value,n.value]).translateExtent(r.value),ae=He(oe).call(Z),_=ae.on("wheel.zoom"),p=Mt.translate(o.value.x??0,o.value.y??0).scale(bt(o.value.zoom??1,t.value,n.value)),N=[[0,0],[U.width,U.height]],I=Z.constrain()(p,N,r.value);Z.transform(ae,I),Z.wheelDelta($i),B.value=Z,G.value=ae,T.value=_,j.value={x:I.x,y:I.y,zoom:I.k},Z.on("start",$=>{var J;if(!$.sourceEvent)return null;k=$.sourceEvent.button,S.value=!0;const ee=R($.transform);((J=$.sourceEvent)==null?void 0:J.type)==="mousedown"&&(O.value=!0),z=ee,E.viewportChangeStart(ee),E.moveStart({event:$,flowTransform:ee})}),Z.on("end",$=>{if(!$.sourceEvent)return null;if(S.value=!1,O.value=!1,W(L.value,k??0)&&!M&&E.paneContextMenu($.sourceEvent),M=!1,ie(z,$.transform)){const J=R($.transform);z=J,E.viewportChangeEnd(J),E.moveEnd({event:$,flowTransform:J})}}),Z.filter($=>{var J;const ee=A.value||v.value,ce=h.value&&$.ctrlKey,se=$.button,fe=$.type==="wheel";if(se===1&&$.type==="mousedown"&&(F($,"vue-flow__node")||F($,"vue-flow__edge")))return!0;if(!L.value&&!ee&&!V.value&&!f.value&&!h.value||x.value||H.value&&!fe||!f.value&&$.type==="dblclick"||F($,b.value)&&fe||F($,w.value)&&(!fe||V.value&&fe&&!A.value)||!h.value&&$.ctrlKey&&fe||!ee&&!V.value&&!ce&&fe)return!1;if(!h&&$.type==="touchstart"&&((J=$.touches)==null?void 0:J.length)>1)return $.preventDefault(),!1;if(!L.value&&($.type==="mousedown"||$.type==="touchstart")||ne.value&&Array.isArray(d.value)&&d.value.includes(0)&&se===0||Array.isArray(d.value)&&!d.value.includes(se)&&($.type==="mousedown"||$.type==="touchstart"))return!1;const _e=Array.isArray(d.value)&&d.value.includes(se)||l.value===!0&&Array.isArray(d.value)&&!d.value.includes(0)||!se||se<=1;return(!$.ctrlKey||C.value||fe)&&_e}),we([x,L],()=>{x.value&&!S.value?Z.on("zoom",null):x.value||Z.on("zoom",$=>{j.value={x:$.transform.x,y:$.transform.y,zoom:$.transform.k};const J=R($.transform);M=W(L.value,k??0),E.viewportChange(J),E.move({event:$,flowTransform:J})})},{immediate:!0}),we([x,V,s,A,h,y,b],()=>{V.value&&!A.value&&!x.value?ae.on("wheel.zoom",$=>{if(F($,b.value))return!1;const J=A.value||v.value,ee=h.value&&$.ctrlKey;if(!(!y.value||V.value||J||ee))return!1;$.preventDefault(),$.stopImmediatePropagation();const se=ae.property("__zoom").k||1,fe=Vn();if(!C.value&&$.ctrlKey&&h.value&&fe){const um=Ue($),cm=$i($),dm=se*2**cm;Z.scaleTo(ae,dm,um,$);return}const _e=$.deltaMode===1?20:1;let Ee=s.value===qt.Vertical?0:$.deltaX*_e,ft=s.value===qt.Horizontal?0:$.deltaY*_e;!fe&&$.shiftKey&&s.value!==qt.Vertical&&!Ee&&ft&&(Ee=ft,ft=0),Z.translateBy(ae,-(Ee/se)*c.value,-(ft/se)*c.value);const Qe=R(ae.property("__zoom"));m&&clearTimeout(m),Y.value?(E.move({event:$,flowTransform:Qe}),E.viewportChange(Qe),m=setTimeout(()=>{E.moveEnd({event:$,flowTransform:Qe}),E.viewportChangeEnd(Qe),Y.value=!1},150)):(Y.value=!0,E.moveStart({event:$,flowTransform:Qe}),E.viewportChangeStart(Qe))},{passive:!1}):typeof _<"u"&&ae.on("wheel.zoom",function($,J){const ee=!y.value&&$.type==="wheel"&&!$.ctrlKey,ce=A.value||v.value,se=h.value&&$.ctrlKey;if(!ce&&!u.value&&!se&&$.type==="wheel"||ee||F($,b.value))return null;$.preventDefault(),_.call(this,$,J)},{passive:!1})},{immediate:!0})});function W(oe,U){return U===2&&Array.isArray(oe)&&oe.includes(2)}function ie(oe,U){return oe.x!==U.x&&!Number.isNaN(U.x)||oe.y!==U.y&&!Number.isNaN(U.y)||oe.zoom!==U.k&&!Number.isNaN(U.k)}function R(oe){return{x:oe.x,y:oe.y,zoom:oe.k}}function F(oe,U){return oe.target.closest(`.${U}`)}return(oe,U)=>(Q(),he("div",{ref_key:"viewportRef",ref:X,class:"vue-flow__viewport vue-flow__container"},[te(If,{"is-selecting":le.value,"selection-key-pressed":K(D),class:Ve({connecting:H.value,dragging:K(O),draggable:K(d)===!0||Array.isArray(K(d))&&K(d).includes(0)})},{default:ge(()=>[te(Mf,null,{default:ge(()=>[Ce(oe.$slots,"default")]),_:3})]),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}}),Df=["id"],Tf=["id"],Pf=["id"],Af=ke({...{name:"A11yDescriptions",compatConfig:{MODE:3}},setup(e){const{id:t,disableKeyboardA11y:n,ariaLiveMessage:o}=Se();return(r,i)=>(Q(),he(Be,null,[de("div",{id:`${K(gi)}-${K(t)}`,style:{display:"none"}}," Press enter or space to select a node. "+be(K(n)?"":"You can then use the arrow keys to move the node around.")+" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ",9,Df),de("div",{id:`${K(pi)}-${K(t)}`,style:{display:"none"}}," Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ",8,Tf),K(n)?Ie("",!0):(Q(),he("div",{key:0,id:`${K(dd)}-${K(t)}`,"aria-live":"assertive","aria-atomic":"true",style:{position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(100%)"}},be(K(o)),9,Pf))],64))}});function zf(){const e=Se();we(()=>e.viewportHelper.value.viewportInitialized,t=>{t&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function Rf(e,t,n){return n===re.Left?e-t:n===re.Right?e+t:e}function Bf(e,t,n){return n===re.Top?e-t:n===re.Bottom?e+t:e}const Lo=function({radius:e=10,centerX:t=0,centerY:n=0,position:o=re.Top,type:r}){return xe("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${r}`,cx:Rf(t,e,o),cy:Bf(n,e,o),r:e,stroke:"transparent",fill:"transparent"})};Lo.props=["radius","centerX","centerY","position","type"],Lo.compatConfig={MODE:3};const dl=Lo,Vf=ke({name:"Edge",compatConfig:{MODE:3},props:["id"],setup(e){const{id:t,addSelectedEdges:n,connectionMode:o,edgeUpdaterRadius:r,emits:i,nodesSelectionActive:l,noPanClassName:a,getEdgeTypes:u,removeSelectedEdges:s,findEdge:c,findNode:d,isValidConnection:f,multiSelectionActive:h,disableKeyboardA11y:v,elementsSelectable:y,edgesUpdatable:b,edgesFocusable:w,hooks:E}=Se(),g=pe(()=>c(e.id)),{emit:x,on:O}=Fd(g.value,i),B=it(Hn),G=gt(),T=ye(!1),j=ye(!1),X=ye(""),P=ye(null),S=ye("source"),Y=ye(null),m=Ne(()=>typeof g.value.selectable>"u"?y.value:g.value.selectable),M=Ne(()=>typeof g.value.updatable>"u"?b.value:g.value.updatable),k=Ne(()=>typeof g.value.focusable>"u"?w.value:g.value.focusable);ht(Vd,e.id),ht(Ld,Y);const z=pe(()=>g.value.class instanceof Function?g.value.class(g.value):g.value.class),C=pe(()=>g.value.style instanceof Function?g.value.style(g.value):g.value.style),D=pe(()=>{const p=g.value.type||"default",N=B?.[`edge-${p}`];if(N)return N;let I=g.value.template??u.value[p];if(typeof I=="string"&&G){const $=Object.keys(G.appContext.components);$&&$.includes(p)&&(I=me(p,!1))}return I&&typeof I!="string"?I:(i.error(new Te(Oe.EDGE_TYPE_MISSING,I)),!1)}),{handlePointerDown:A}=Ji({nodeId:X,handleId:P,type:S,isValidConnection:f,edgeUpdaterType:S,onEdgeUpdate:ne,onEdgeUpdateEnd:le});return()=>{const p=d(g.value.source),N=d(g.value.target),I="pathOptions"in g.value?g.value.pathOptions:{};if(!p&&!N)return i.error(new Te(Oe.EDGE_SOURCE_TARGET_MISSING,g.value.id,g.value.source,g.value.target)),null;if(!p)return i.error(new Te(Oe.EDGE_SOURCE_MISSING,g.value.id,g.value.source)),null;if(!N)return i.error(new Te(Oe.EDGE_TARGET_MISSING,g.value.id,g.value.target)),null;if(!g.value||g.value.hidden||p.hidden||N.hidden)return null;let $;o.value===lt.Strict?$=p.handleBounds.source:$=[...p.handleBounds.source||[],...p.handleBounds.target||[]];const J=Bi($,g.value.sourceHandle);let ee;o.value===lt.Strict?ee=N.handleBounds.target:ee=[...N.handleBounds.target||[],...N.handleBounds.source||[]];const ce=Bi(ee,g.value.targetHandle),se=J?.position||re.Bottom,fe=ce?.position||re.Top,{x:_e,y:Ee}=Tt(p,J,se),{x:ft,y:Qe}=Tt(N,ce,fe);return g.value.sourceX=_e,g.value.sourceY=Ee,g.value.targetX=ft,g.value.targetY=Qe,xe("g",{ref:Y,key:e.id,"data-id":e.id,class:["vue-flow__edge",`vue-flow__edge-${D.value===!1?"default":g.value.type||"default"}`,a.value,z.value,{updating:T.value,selected:g.value.selected,animated:g.value.animated,inactive:!m.value&&!E.value.edgeClick.hasListeners()}],tabIndex:k.value?0:void 0,"aria-label":g.value.ariaLabel===null?void 0:g.value.ariaLabel??`Edge from ${g.value.source} to ${g.value.target}`,"aria-describedby":k.value?`${pi}-${t}`:void 0,"aria-roledescription":"edge",role:k.value?"group":"img",...g.value.domAttributes,onClick:W,onContextmenu:ie,onDblclick:R,onMouseenter:F,onMousemove:oe,onMouseleave:U,onKeyDown:k.value?_:void 0},[j.value?null:xe(D.value===!1?u.value.default:D.value,{id:e.id,sourceNode:p,targetNode:N,source:g.value.source,target:g.value.target,type:g.value.type,updatable:M.value,selected:g.value.selected,animated:g.value.animated,label:g.value.label,labelStyle:g.value.labelStyle,labelShowBg:g.value.labelShowBg,labelBgStyle:g.value.labelBgStyle,labelBgPadding:g.value.labelBgPadding,labelBgBorderRadius:g.value.labelBgBorderRadius,data:g.value.data,events:{...g.value.events,...O},style:C.value,markerStart:`url('#${nn(g.value.markerStart,t)}')`,markerEnd:`url('#${nn(g.value.markerEnd,t)}')`,sourcePosition:se,targetPosition:fe,sourceX:_e,sourceY:Ee,targetX:ft,targetY:Qe,sourceHandleId:g.value.sourceHandle,targetHandleId:g.value.targetHandle,interactionWidth:g.value.interactionWidth,...I}),[M.value==="source"||M.value===!0?[xe("g",{onMousedown:Z,onMouseenter:L,onMouseout:V},xe(dl,{position:se,centerX:_e,centerY:Ee,radius:r.value,type:"source","data-type":"source"}))]:null,M.value==="target"||M.value===!0?[xe("g",{onMousedown:ae,onMouseenter:L,onMouseout:V},xe(dl,{position:fe,centerX:ft,centerY:Qe,radius:r.value,type:"target","data-type":"target"}))]:null]])};function L(){T.value=!0}function V(){T.value=!1}function ne(p,N){x.update({event:p,edge:g.value,connection:N})}function le(p){x.updateEnd({event:p,edge:g.value}),j.value=!1}function H(p,N){p.button===0&&(j.value=!0,X.value=N?g.value.target:g.value.source,P.value=(N?g.value.targetHandle:g.value.sourceHandle)??null,S.value=N?"target":"source",x.updateStart({event:p,edge:g.value}),A(p))}function W(p){var N;const I={event:p,edge:g.value};m.value&&(l.value=!1,g.value.selected&&h.value?(s([g.value]),(N=Y.value)==null||N.blur()):n([g.value])),x.click(I)}function ie(p){x.contextMenu({event:p,edge:g.value})}function R(p){x.doubleClick({event:p,edge:g.value})}function F(p){x.mouseEnter({event:p,edge:g.value})}function oe(p){x.mouseMove({event:p,edge:g.value})}function U(p){x.mouseLeave({event:p,edge:g.value})}function Z(p){H(p,!0)}function ae(p){H(p,!1)}function _(p){var N;!v.value&&vi.includes(p.key)&&m.value&&(p.key==="Escape"?((N=Y.value)==null||N.blur(),s([c(e.id)])):n([c(e.id)]))}}}),Lf=ke({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var e;const{id:t,connectionMode:n,connectionStartHandle:o,connectionEndHandle:r,connectionPosition:i,connectionLineType:l,connectionLineStyle:a,connectionLineOptions:u,connectionStatus:s,viewport:c,findNode:d}=Se(),f=(e=it(Hn))==null?void 0:e["connection-line"],h=pe(()=>{var E;return d((E=o.value)==null?void 0:E.nodeId)}),v=pe(()=>{var E;return d((E=r.value)==null?void 0:E.nodeId)??null}),y=pe(()=>({x:(i.value.x-c.value.x)/c.value.zoom,y:(i.value.y-c.value.y)/c.value.zoom})),b=pe(()=>u.value.markerStart?`url(#${nn(u.value.markerStart,t)})`:""),w=pe(()=>u.value.markerEnd?`url(#${nn(u.value.markerEnd,t)})`:"");return()=>{var E,g,x;if(!h.value||!o.value)return null;const O=o.value.id,B=o.value.type,G=h.value.handleBounds;let T=G?.[B]??[];if(n.value===lt.Loose){const C=G?.[B==="source"?"target":"source"]??[];T=[...T,...C]}if(!T)return null;const j=(O?T.find(C=>C.id===O):T[0])??null,X=j?.position??re.Top,{x:P,y:S}=Tt(h.value,j,X);let Y=null;v.value&&(n.value===lt.Strict?Y=((E=v.value.handleBounds[B==="source"?"target":"source"])==null?void 0:E.find(C=>{var D;return C.id===((D=r.value)==null?void 0:D.id)}))||null:Y=((g=[...v.value.handleBounds.source??[],...v.value.handleBounds.target??[]])==null?void 0:g.find(C=>{var D;return C.id===((D=r.value)==null?void 0:D.id)}))||null);const m=((x=r.value)==null?void 0:x.position)??(X?Po[X]:null);if(!X||!m)return null;const M=l.value??u.value.type??wt.Bezier;let k="";const z={sourceX:P,sourceY:S,sourcePosition:X,targetX:y.value.x,targetY:y.value.y,targetPosition:m};return M===wt.Bezier?[k]=il(z):M===wt.Step?[k]=Vo({...z,borderRadius:0}):M===wt.SmoothStep?[k]=Vo(z):M===wt.SimpleBezier?[k]=al(z):k=`M${P},${S} ${y.value.x},${y.value.y}`,xe("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},xe("g",{class:"vue-flow__connection"},f?xe(f,{sourceX:P,sourceY:S,sourcePosition:X,targetX:y.value.x,targetY:y.value.y,targetPosition:m,sourceNode:h.value,sourceHandle:j,targetNode:v.value,targetHandle:Y,markerEnd:w.value,markerStart:b.value,connectionStatus:s.value}):xe("path",{d:k,class:[u.value.class,s.value,"vue-flow__connection-path"],style:{...a.value,...u.value.style},"marker-end":w.value,"marker-start":b.value})))}}}),Hf=["id","markerWidth","markerHeight","markerUnits","orient"],Ff=ke({...{name:"MarkerType",compatConfig:{MODE:3}},props:{id:{},type:{},color:{default:"none"},width:{default:12.5},height:{default:12.5},markerUnits:{default:"strokeWidth"},orient:{default:"auto-start-reverse"},strokeWidth:{default:1}},setup(e){return(t,n)=>(Q(),he("marker",{id:t.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:`${t.width}`,markerHeight:`${t.height}`,markerUnits:t.markerUnits,orient:t.orient},[t.type===K(Co).ArrowClosed?(Q(),he("polyline",{key:0,style:Pe({stroke:t.color,fill:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",points:"-5,-4 0,0 -5,4 -5,-4"},null,4)):Ie("",!0),t.type===K(Co).Arrow?(Q(),he("polyline",{key:1,style:Pe({stroke:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):Ie("",!0)],8,Hf))}}),Yf={class:"vue-flow__marker vue-flow__container","aria-hidden":"true"},Gf=ke({...{name:"MarkerDefinitions",compatConfig:{MODE:3}},setup(e){const{id:t,edges:n,connectionLineOptions:o,defaultMarkerColor:r}=Se(),i=pe(()=>{const l=new Set,a=[],u=s=>{if(s){const c=nn(s,t);l.has(c)||(typeof s=="object"?a.push({...s,id:c,color:s.color||r.value}):a.push({id:c,color:r.value,type:s}),l.add(c))}};for(const s of[o.value.markerEnd,o.value.markerStart])u(s);for(const s of n.value)for(const c of[s.markerStart,s.markerEnd])u(c);return a.sort((s,c)=>s.id.localeCompare(c.id))});return(l,a)=>(Q(),he("svg",Yf,[de("defs",null,[(Q(!0),he(Be,null,cn(i.value,u=>(Q(),$e(Ff,{id:u.id,key:u.id,type:u.type,color:u.color,width:u.width,height:u.height,markerUnits:u.markerUnits,"stroke-width":u.strokeWidth,orient:u.orient},null,8,["id","type","color","width","height","markerUnits","stroke-width","orient"]))),128))])]))}}),jf=ke({...{name:"Edges",compatConfig:{MODE:3}},setup(e){const{findNode:t,getEdges:n,elevateEdgesOnSelect:o}=Se();return(r,i)=>(Q(),he(Be,null,[te(Gf),(Q(!0),he(Be,null,cn(K(n),l=>(Q(),he("svg",{key:l.id,class:"vue-flow__edges vue-flow__container",style:Pe({zIndex:K(Cd)(l,K(t),K(o))})},[te(K(Vf),{id:l.id},null,8,["id"])],4))),128)),te(K(Lf))],64))}}),Xf=ke({name:"Node",compatConfig:{MODE:3},props:["id","resizeObserver"],setup(e){const{id:t,noPanClassName:n,selectNodesOnDrag:o,nodesSelectionActive:r,multiSelectionActive:i,emits:l,removeSelectedNodes:a,addSelectedNodes:u,updateNodeDimensions:s,onUpdateNodeInternals:c,getNodeTypes:d,nodeExtent:f,elevateNodesOnSelect:h,disableKeyboardA11y:v,ariaLiveMessage:y,snapToGrid:b,snapGrid:w,nodeDragThreshold:E,nodesDraggable:g,elementsSelectable:x,nodesConnectable:O,nodesFocusable:B,hooks:G}=Se(),T=ye(null);ht(Ki,T),ht(Zi,e.id);const j=it(Hn),X=gt(),P=el(),{node:S,parentNode:Y}=Qi(e.id),{emit:m,on:M}=Xd(S,l),k=Ne(()=>typeof S.draggable>"u"?g.value:S.draggable),z=Ne(()=>typeof S.selectable>"u"?x.value:S.selectable),C=Ne(()=>typeof S.connectable>"u"?O.value:S.connectable),D=Ne(()=>typeof S.focusable>"u"?B.value:S.focusable),A=pe(()=>z.value||k.value||G.value.nodeClick.hasListeners()||G.value.nodeDoubleClick.hasListeners()||G.value.nodeMouseEnter.hasListeners()||G.value.nodeMouseMove.hasListeners()||G.value.nodeMouseLeave.hasListeners()),L=Ne(()=>!!S.dimensions.width&&!!S.dimensions.height),V=pe(()=>{const N=S.type||"default",I=j?.[`node-${N}`];if(I)return I;let $=S.template||d.value[N];if(typeof $=="string"&&X){const J=Object.keys(X.appContext.components);J&&J.includes(N)&&($=me(N,!1))}return $&&typeof $!="string"?$:(l.error(new Te(Oe.NODE_TYPE_MISSING,$)),!1)}),ne=qi({id:e.id,el:T,disabled:()=>!k.value,selectable:z,dragHandle:()=>S.dragHandle,onStart(N){m.dragStart(N)},onDrag(N){m.drag(N)},onStop(N){m.dragStop(N)},onClick(N){_(N)}}),le=pe(()=>S.class instanceof Function?S.class(S):S.class),H=pe(()=>{const N=(S.style instanceof Function?S.style(S):S.style)||{},I=S.width instanceof Function?S.width(S):S.width,$=S.height instanceof Function?S.height(S):S.height;return!N.width&&I&&(N.width=typeof I=="string"?I:`${I}px`),!N.height&&$&&(N.height=typeof $=="string"?$:`${$}px`),N}),W=Ne(()=>Number(S.zIndex??H.value.zIndex??0));return c(N=>{(N.includes(e.id)||!N.length)&&R()}),je(()=>{we(()=>S.hidden,(N=!1,I,$)=>{!N&&T.value&&(e.resizeObserver.observe(T.value),$(()=>{T.value&&e.resizeObserver.unobserve(T.value)}))},{immediate:!0,flush:"post"})}),we([()=>S.type,()=>S.sourcePosition,()=>S.targetPosition],()=>{ze(()=>{s([{id:e.id,nodeElement:T.value,forceUpdate:!0}])})}),we([()=>S.position.x,()=>S.position.y,()=>{var N;return(N=Y.value)==null?void 0:N.computedPosition.x},()=>{var N;return(N=Y.value)==null?void 0:N.computedPosition.y},()=>{var N;return(N=Y.value)==null?void 0:N.computedPosition.z},W,()=>S.selected,()=>S.dimensions.height,()=>S.dimensions.width,()=>{var N;return(N=Y.value)==null?void 0:N.dimensions.height},()=>{var N;return(N=Y.value)==null?void 0:N.dimensions.width}],([N,I,$,J,ee,ce])=>{const se={x:N,y:I,z:ce+(h.value&&S.selected?1e3:0)};typeof $<"u"&&typeof J<"u"?S.computedPosition=bd({x:$,y:J,z:ee},se):S.computedPosition=se},{flush:"post",immediate:!0}),we([()=>S.extent,f],([N,I],[$,J])=>{(N!==$||I!==J)&&ie()}),S.extent==="parent"||typeof S.extent=="object"&&"range"in S.extent&&S.extent.range==="parent"?ro(()=>L).toBe(!0).then(ie):ie(),()=>S.hidden?null:xe("div",{ref:T,"data-id":S.id,class:["vue-flow__node",`vue-flow__node-${V.value===!1?"default":S.type||"default"}`,{[n.value]:k.value,dragging:ne?.value,draggable:k.value,selected:S.selected,selectable:z.value,parent:S.isParent},le.value],style:{visibility:L.value?"visible":"hidden",zIndex:S.computedPosition.z??W.value,transform:`translate(${S.computedPosition.x}px,${S.computedPosition.y}px)`,pointerEvents:A.value?"all":"none",...H.value},tabIndex:D.value?0:void 0,role:D.value?"group":void 0,"aria-describedby":v.value?void 0:`${gi}-${t}`,"aria-label":S.ariaLabel,"aria-roledescription":"node",...S.domAttributes,onMouseenter:F,onMousemove:oe,onMouseleave:U,onContextmenu:Z,onClick:_,onDblclick:ae,onKeydown:p},[xe(V.value===!1?d.value.default:V.value,{id:S.id,type:S.type,data:S.data,events:{...S.events,...M},selected:S.selected,resizing:S.resizing,dragging:ne.value,connectable:C.value,position:S.computedPosition,dimensions:S.dimensions,isValidTargetPos:S.isValidTargetPos,isValidSourcePos:S.isValidSourcePos,parent:S.parentNode,parentNodeId:S.parentNode,zIndex:S.computedPosition.z??W.value,targetPosition:S.targetPosition,sourcePosition:S.sourcePosition,label:S.label,dragHandle:S.dragHandle,onUpdateNodeInternals:R})]);function ie(){const N=S.computedPosition,{computedPosition:I,position:$}=Oo(S,b.value?Ln(N,w.value):N,l.error,f.value,Y.value);(S.computedPosition.x!==I.x||S.computedPosition.y!==I.y)&&(S.computedPosition={...S.computedPosition,...I}),(S.position.x!==$.x||S.position.y!==$.y)&&(S.position=$)}function R(){T.value&&s([{id:e.id,nodeElement:T.value,forceUpdate:!0}])}function F(N){ne?.value||m.mouseEnter({event:N,node:S})}function oe(N){ne?.value||m.mouseMove({event:N,node:S})}function U(N){ne?.value||m.mouseLeave({event:N,node:S})}function Z(N){return m.contextMenu({event:N,node:S})}function ae(N){return m.doubleClick({event:N,node:S})}function _(N){z.value&&(!o.value||!k.value||E.value>0)&&Ao(S,i.value,u,a,r,!1,T.value),m.click({event:N,node:S})}function p(N){if(!($o(N)||v.value))if(vi.includes(N.key)&&z.value){const I=N.key==="Escape";Ao(S,i.value,u,a,r,I,T.value)}else k.value&&S.selected&&Ot[N.key]&&(N.preventDefault(),y.value=`Moved selected node ${N.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~S.position.x}, y: ${~~S.position.y}`,P({x:Ot[N.key].x,y:Ot[N.key].y},N.shiftKey))}}});function Uf(e={includeHiddenNodes:!1}){const{nodes:t}=Se();return pe(()=>{if(t.value.length===0)return!1;for(const n of t.value)if((e.includeHiddenNodes||!n.hidden)&&(n?.handleBounds===void 0||n.dimensions.width===0||n.dimensions.height===0))return!1;return!0})}const Wf={class:"vue-flow__nodes vue-flow__container"},Zf=ke({...{name:"Nodes",compatConfig:{MODE:3}},setup(e){const{getNodes:t,updateNodeDimensions:n,emits:o}=Se(),r=Uf(),i=ye();return we(r,l=>{l&&ze(()=>{o.nodesInitialized(t.value)})},{immediate:!0}),je(()=>{i.value=new ResizeObserver(l=>{const a=l.map(u=>({id:u.target.getAttribute("data-id"),nodeElement:u.target,forceUpdate:!0}));ze(()=>n(a))})}),dn(()=>{var l;return(l=i.value)==null?void 0:l.disconnect()}),(l,a)=>(Q(),he("div",Wf,[i.value?(Q(!0),he(Be,{key:0},cn(K(t),(u,s,c,d)=>{const f=[u.id];if(d&&d.key===u.id&&sr(d,f))return d;const h=(Q(),$e(K(Xf),{id:u.id,key:u.id,"resize-observer":i.value},null,8,["id","resize-observer"]));return h.memo=f,h},a,0),128)):Ie("",!0)]))}});function Kf(){const{emits:e}=Se();je(()=>{if(Yi()){const t=document.querySelector(".vue-flow__pane");t&&window.getComputedStyle(t).zIndex!=="1"&&e.error(new Te(Oe.MISSING_STYLES))}})}const qf=de("div",{class:"vue-flow__edge-labels"},null,-1),Jf=ke({...{name:"VueFlow",compatConfig:{MODE:3}},props:{id:{},modelValue:{},nodes:{},edges:{},edgeTypes:{},nodeTypes:{},connectionMode:{},connectionLineType:{},connectionLineStyle:{default:void 0},connectionLineOptions:{default:void 0},connectionRadius:{},isValidConnection:{type:[Function,null],default:void 0},deleteKeyCode:{default:void 0},selectionKeyCode:{type:[Boolean,null],default:void 0},multiSelectionKeyCode:{default:void 0},zoomActivationKeyCode:{default:void 0},panActivationKeyCode:{default:void 0},snapToGrid:{type:Boolean,default:void 0},snapGrid:{},onlyRenderVisibleElements:{type:Boolean,default:void 0},edgesUpdatable:{type:[Boolean,String],default:void 0},nodesDraggable:{type:Boolean,default:void 0},nodesConnectable:{type:Boolean,default:void 0},nodeDragThreshold:{},elementsSelectable:{type:Boolean,default:void 0},selectNodesOnDrag:{type:Boolean,default:void 0},panOnDrag:{type:[Boolean,Array],default:void 0},minZoom:{},maxZoom:{},defaultViewport:{},translateExtent:{},nodeExtent:{},defaultMarkerColor:{},zoomOnScroll:{type:Boolean,default:void 0},zoomOnPinch:{type:Boolean,default:void 0},panOnScroll:{type:Boolean,default:void 0},panOnScrollSpeed:{},panOnScrollMode:{},paneClickDistance:{},zoomOnDoubleClick:{type:Boolean,default:void 0},preventScrolling:{type:Boolean,default:void 0},selectionMode:{},edgeUpdaterRadius:{},fitViewOnInit:{type:Boolean,default:void 0},connectOnClick:{type:Boolean,default:void 0},applyDefault:{type:Boolean,default:void 0},autoConnect:{type:[Boolean,Function],default:void 0},noDragClassName:{},noWheelClassName:{},noPanClassName:{},defaultEdgeOptions:{},elevateEdgesOnSelect:{type:Boolean,default:void 0},elevateNodesOnSelect:{type:Boolean,default:void 0},disableKeyboardA11y:{type:Boolean,default:void 0},edgesFocusable:{type:Boolean,default:void 0},nodesFocusable:{type:Boolean,default:void 0},autoPanOnConnect:{type:Boolean,default:void 0},autoPanOnNodeDrag:{type:Boolean,default:void 0},autoPanSpeed:{}},emits:["nodesChange","edgesChange","nodesInitialized","paneReady","init","updateNodeInternals","error","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","edgeUpdate","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdateEnd","nodeContextMenu","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeDoubleClick","nodeClick","nodeDragStart","nodeDrag","nodeDragStop","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","update:modelValue","update:nodes","update:edges"],setup(e,{expose:t,emit:n}){const o=e,r=or(),i=io(o,"modelValue",n),l=io(o,"nodes",n),a=io(o,"edges",n),u=Se(o),s=Kd({modelValue:i,nodes:l,edges:a},o,u);return Jd(n,u.hooks),zf(),Kf(),ht(Hn,r),rr(s),t(u),(c,d)=>(Q(),he("div",{ref:K(u).vueFlowRef,class:"vue-flow"},[te(Of,null,{default:ge(()=>[te(jf),qf,te(Zf),Ce(c.$slots,"zoom-pane")]),_:3}),Ce(c.$slots,"default"),te(Af)],512))}}),Qf=ke({...{name:"Panel",compatConfig:{MODE:3}},props:{position:{}},setup(e){const t=e,{userSelectionActive:n}=Se(),o=pe(()=>`${t.position}`.split("-"));return(r,i)=>(Q(),he("div",{class:Ve(["vue-flow__panel",o.value]),style:Pe({pointerEvents:K(n)?"none":"all"})},[Ce(r.$slots,"default")],6))}}),eh={name:"ControlButton",compatConfig:{MODE:3}},th=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},nh={type:"button",class:"vue-flow__controls-button"};function oh(e,t,n,o,r,i){return Q(),he("button",nh,[Ce(e.$slots,"default")])}const rn=th(eh,[["render",oh]]),rh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},ih=[de("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1)];function lh(e,t){return Q(),he("svg",rh,ih)}const ah={render:lh},sh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},uh=[de("path",{d:"M0 0h32v4.2H0z"},null,-1)];function ch(e,t){return Q(),he("svg",sh,uh)}const dh={render:ch},fh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},hh=[de("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1)];function gh(e,t){return Q(),he("svg",fh,hh)}const ph={render:gh},vh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},mh=[de("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"},null,-1)];function _h(e,t){return Q(),he("svg",vh,mh)}const yh={render:_h},wh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},bh=[de("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1)];function xh(e,t){return Q(),he("svg",wh,bh)}const Eh={render:xh},Nh=ke({...{name:"Controls",compatConfig:{MODE:3}},props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:{},position:{default:()=>fi.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(e,{emit:t}){const{nodesDraggable:n,nodesConnectable:o,elementsSelectable:r,setInteractive:i,zoomIn:l,zoomOut:a,fitView:u,viewport:s,minZoom:c,maxZoom:d}=Se(),f=Ne(()=>n.value||o.value||r.value),h=Ne(()=>s.value.zoom<=c.value),v=Ne(()=>s.value.zoom>=d.value);function y(){l(),t("zoomIn")}function b(){a(),t("zoomOut")}function w(){u(e.fitViewParams),t("fitView")}function E(){i(!f.value),t("interactionChange",!f.value)}return(g,x)=>(Q(),$e(K(Qf),{class:"vue-flow__controls",position:g.position},{default:ge(()=>[Ce(g.$slots,"top"),g.showZoom?(Q(),he(Be,{key:0},[Ce(g.$slots,"control-zoom-in",{},()=>[te(rn,{class:"vue-flow__controls-zoomin",disabled:v.value,onClick:y},{default:ge(()=>[Ce(g.$slots,"icon-zoom-in",{},()=>[(Q(),$e(pt(K(ah))))])]),_:3},8,["disabled"])]),Ce(g.$slots,"control-zoom-out",{},()=>[te(rn,{class:"vue-flow__controls-zoomout",disabled:h.value,onClick:b},{default:ge(()=>[Ce(g.$slots,"icon-zoom-out",{},()=>[(Q(),$e(pt(K(dh))))])]),_:3},8,["disabled"])])],64)):Ie("",!0),g.showFitView?Ce(g.$slots,"control-fit-view",{key:1},()=>[te(rn,{class:"vue-flow__controls-fitview",onClick:w},{default:ge(()=>[Ce(g.$slots,"icon-fit-view",{},()=>[(Q(),$e(pt(K(ph))))])]),_:3})]):Ie("",!0),g.showInteractive?Ce(g.$slots,"control-interactive",{key:2},()=>[g.showInteractive?(Q(),$e(rn,{key:0,class:"vue-flow__controls-interactive",onClick:E},{default:ge(()=>[f.value?Ce(g.$slots,"icon-unlock",{key:0},()=>[(Q(),$e(pt(K(Eh))))]):Ie("",!0),f.value?Ie("",!0):Ce(g.$slots,"icon-lock",{key:1},()=>[(Q(),$e(pt(K(yh))))])]),_:3})):Ie("",!0)]):Ie("",!0),Ce(g.$slots,"default")]),_:3},8,["position"]))}});var rt=(e=>(e.Lines="lines",e.Dots="dots",e))(rt||{});const fl=function({dimensions:e,size:t,color:n}){return xe("path",{stroke:n,"stroke-width":t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},hl=function({radius:e,color:t}){return xe("circle",{cx:e,cy:e,r:e,fill:t})};rt.Lines+"",rt.Dots+"";const Sh={[rt.Dots]:"#81818a",[rt.Lines]:"#eee"},kh=["id","x","y","width","height","patternTransform"],Ch={key:2,height:"100",width:"100"},$h=["fill"],Ih=["x","y","fill"],Mh=ke({...{name:"Background",compatConfig:{MODE:3}},props:{id:{},variant:{default:()=>rt.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:{},color:{},bgColor:{},height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:0}},setup(e){const{id:t,viewport:n}=Se(),o=pe(()=>{const l=n.value.zoom,[a,u]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],s=[a*l||1,u*l||1],c=e.size*l,[d,f]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],h=[d*l||1+s[0]/2,f*l||1+s[1]/2];return{scaledGap:s,offset:h,size:c}}),r=Ne(()=>`pattern-${t}${e.id?`-${e.id}`:""}`),i=Ne(()=>e.color||e.patternColor||Sh[e.variant||rt.Dots]);return(l,a)=>(Q(),he("svg",{class:"vue-flow__background vue-flow__container",style:Pe({height:`${l.height>100?100:l.height}%`,width:`${l.width>100?100:l.width}%`})},[Ce(l.$slots,"pattern-container",{id:r.value},()=>[de("pattern",{id:r.value,x:K(n).x%o.value.scaledGap[0],y:K(n).y%o.value.scaledGap[1],width:o.value.scaledGap[0],height:o.value.scaledGap[1],patternTransform:`translate(-${o.value.offset[0]},-${o.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[Ce(l.$slots,"pattern",{},()=>[l.variant===K(rt).Lines?(Q(),$e(K(fl),{key:0,size:l.lineWidth,color:i.value,dimensions:o.value.scaledGap},null,8,["size","color","dimensions"])):l.variant===K(rt).Dots?(Q(),$e(K(hl),{key:1,color:i.value,radius:o.value.size/2},null,8,["color","radius"])):Ie("",!0),l.bgColor?(Q(),he("svg",Ch,[de("rect",{width:"100%",height:"100%",fill:l.bgColor},null,8,$h)])):Ie("",!0)])],8,kh)]),de("rect",{x:l.x,y:l.y,width:"100%",height:"100%",fill:`url(#${r.value})`},null,8,Ih),Ce(l.$slots,"default",{id:r.value})],4))}}),gl=30,pl=Object.freeze({warning:5,critical:30}),vl=1,ml=5,Oh=1024*1024,Dh=10*1024*1024,Ho={ok:{label:"Within thresholds",color:"success",icon:"mdi-check-circle"},warning:{label:"Falling behind",color:"warning",icon:"mdi-alert"},critical:{label:"Falling behind",color:"error",icon:"mdi-alert-circle"},stale:{label:"Stale metrics",color:"warning",icon:"mdi-clock-alert-outline"},unknown:{label:"No delay samples",color:"grey",icon:"mdi-help-circle-outline"},unavailable:{label:"Metrics unavailable",color:"warning",icon:"mdi-alert-outline"}},Th={interface_topic_delta_seconds:"Command queue delay",router_topic_delta_seconds:"Telemetry queue delay",decom_topic_delta_seconds:"Decommutation queue delay",log_topic_delta_seconds:"Logging queue delay",text_log_topic_delta_seconds:"Text logging queue delay",tsdb_ingest_topic_delta_seconds:"Database ingestion queue delay",decom_duration_seconds:"Decommutation duration",tsdb_ingest_duration_seconds:"Database ingestion duration",tsdb_flush_duration_seconds:"Database flush duration",interface_read_queue_bytes:"Buffered input",router_read_queue_bytes:"Buffered input",interface_cmd_total:"Commands sent",interface_tlm_total:"Telemetry packets received",interface_directive_total:"Interface directives processed",router_cmd_total:"Commands received",router_tlm_total:"Telemetry packets sent",router_directive_total:"Router directives processed",decom_total:"Packets decommutated",decom_error_total:"Decommutation errors",log_total:"Packets logged",log_error_total:"Logging errors",text_log_total:"Text messages logged",text_log_error_total:"Text logging errors",text_error_total:"Text logging errors",tsdb_ingest_total:"Packets ingested",tsdb_ingest_error_total:"Database ingestion errors",limits_response_total:"Limits responses processed",limits_response_error_total:"Limits response errors"};function ln(e){if(!["number","bigint","string"].includes(typeof e)||typeof e=="string"&&e.trim()==="")return null;const t=Number(e);return Number.isFinite(t)&&t>=0?t:null}function Ph(e,t){const n=ln(e);return n===null?"Not reported":t==="seconds"?n>0&&n<.001?"< 0.001 s":`${n.toLocaleString(void 0,{maximumFractionDigits:3})} s`:t==="bytes"?n>=1024*1024?`${(n/(1024*1024)).toFixed(2)} MiB`:n>=1024?`${(n/1024).toFixed(2)} KiB`:`${n.toLocaleString()} B`:typeof e=="bigint"?e.toLocaleString():n.toLocaleString()}function Ah(e){const t=ln(e?.warning),n=ln(e?.critical);return!t||n===null||n<t?pl:{warning:t,critical:n}}function zh(e,t){return e.endsWith("_read_queue_bytes")?[Oh,Dh]:e.endsWith("_topic_delta_seconds")?[t.warning,t.critical]:[vl,ml]}function Rh(e,t,n,o,r){const i=ln(n?.value),l=t.endsWith("_topic_delta_seconds"),a=t.endsWith("_duration_seconds"),u=t.endsWith("_read_queue_bytes"),s=l||a||u;if(!s&&!t.endsWith("_total"))return null;let c=s?"ok":"info";if(i===null||o===null)c="unknown";else if(o>gl)c="stale";else if(s){const[h,v]=zh(t,r);i>=v?c="critical":i>=h&&(c="warning")}let d=null;u?d="bytes":(l||a)&&(d="seconds");const f=Th[t]||t.replaceAll("_"," ");return{id:`${e}:${t}`,service:e,metric:t,label:f,help:n?.help||(t.endsWith("_total")?"Cumulative count for this service; resets when the service restarts.":f),value:Ph(n?.value,d),state:c,monitored:s,age:o,status:c==="info"?"Total":Ho[c].label,color:c==="info"?"grey":Ho[c].color}}function Pt(e=[],t=!1,n=pl){let o="unknown";return t?o="unavailable":e.some(r=>r.state==="critical")?o="critical":e.some(r=>r.state==="warning")?o="warning":e.some(r=>r.state==="stale")?o="stale":!e.some(r=>r.monitored&&r.state==="unknown")&&e.some(r=>r.monitored&&r.state==="ok")&&(o="ok"),{state:o,...Ho[o],rows:e,lag:n}}const Bh=/^(MULTI|DECOM|COMMANDLOG|PACKETLOG|TSDB|CLEANUP)\d*$/;function _l(e,t=!1,n=Date.now()){const o=Ah(e?.lag_thresholds),r={interface:{},router:{},target:{},lag:o};for(const[i,l]of Object.entries(e?.services||{})){const[,a,...u]=i.split("__"),s=u.join("__");if(!s||!a)continue;let c;if(a==="INTERFACE")c="interface";else if(a==="ROUTER")c="router";else if(Bh.test(a))c="target";else continue;const d=ln(l?.updated_at),f=d===null?null:Math.max(0,(n-d/1e6)/1e3),h=Object.entries(l?.values||{}).map(([v,y])=>Rh(i,v,y,f,o)).filter(Boolean);h.length&&(r[c][s]||=[],r[c][s].push(...h))}for(const i of[r.interface,r.router,r.target])for(const[l,a]of Object.entries(i))a.sort((u,s)=>u.service.localeCompare(s.service)||Number(s.monitored)-Number(u.monitored)||u.metric.localeCompare(s.metric)),i[l]=Pt(a,t,o);return r}const Vh={class:"pa-4","data-test":"flow-metrics"},Lh={class:"d-flex align-center flex-wrap ga-2 mb-3"},Hh={class:"text-body-2 mb-3"},Fh={class:"text-break"},Yh=["title"],Gh={class:"metric-value"},yl=Xe({__name:"FlowMetricsPanel",props:{health:{type:Object,required:!0}},setup(e){const t=vl,n=ml,o=gl,r=[{title:"Service",key:"service"},{title:"Metric",key:"label"},{title:"Value",key:"value",sortable:!1},{title:"Status",key:"status"},{title:"Report age",key:"age"}];return(i,l)=>{const a=me("v-chip"),u=me("v-alert"),s=me("v-data-table");return Q(),he("section",Vh,[de("div",Lh,[l[0]||(l[0]=de("h3",{class:"text-subtitle-1"},"Processing metrics",-1)),te(a,{color:e.health.color,"prepend-icon":e.health.icon,size:"small"},{default:ge(()=>[Me(be(e.health.label),1)]),_:1},8,["color","prepend-icon"])]),e.health.state==="unavailable"?(Q(),$e(u,{key:0,type:"warning",variant:"tonal",density:"compact",class:"mb-3"},{default:ge(()=>[...l[1]||(l[1]=[Me(" Unable to refresh metrics. Any values below are from the last successful request. Retrying automatically. ",-1)])]),_:1})):Ie("",!0),de("p",Hh," Latest reported measurements; services publish about every 5 seconds. Queue delay warnings start at "+be(e.health.lag.warning)+" s (red at "+be(e.health.lag.critical)+" s), matching the server's falling behind notifications. Duration warnings start at "+be(K(t))+" s (red at "+be(K(n))+" s). Buffered input warnings start at 1 MiB (red at 10 MiB). Reports older than "+be(K(o))+" seconds are stale. Idle services retain their last measurement. Totals reset on restart. ",1),te(s,{headers:r,items:e.health.rows,"items-per-page":-1,"item-value":"id",density:"compact","hide-default-footer":"","no-data-text":"No metrics reported yet for this node."},{"item.service":ge(({item:c})=>[de("span",Fh,be(c.service),1)]),"item.label":ge(({item:c})=>[de("span",{title:`${c.metric}: ${c.help}`},be(c.label),9,Yh)]),"item.value":ge(({item:c})=>[de("span",Gh,be(c.value),1)]),"item.status":ge(({item:c})=>[te(a,{color:e.health.state==="unavailable"?"warning":c.color,size:"small",variant:"tonal"},{default:ge(()=>[Me(be(e.health.state==="unavailable"?"Unavailable":c.status),1)]),_:2},1032,["color"])]),"item.age":ge(({item:c})=>[Me(be(c.age===null?"Unknown":`${Math.floor(c.age)} s ago`),1)]),_:1},8,["items"])])}}},[["__scopeId","data-v-8552a4d2"]]),jh={name:"DetailsTable",components:{RawBuffer:pr,FlowMetricsPanel:yl},mixins:[gr],props:{health:{type:Object,default:null},mode:{type:String,default:"Interface"},details:{type:Object,default:null},readProtocolIndex:{type:Number,default:null},writeProtocolIndex:{type:Number,default:null}},emits:["close"],data(){return{api:null,headers:[{title:"Property",key:"key",width:"30%"},{title:"Value",key:"value",width:"70%"}],paused:!1,pausedHealth:null,updatedDetails:null}},computed:{shownDetails(){return this.updatedDetails?this.updatedDetails:this.details},upperData(){let e={};if(!this.shownDetails)return e;if(this.readProtocolIndex!==null){let t=this.shownDetails.read_protocols[this.readProtocolIndex];e.data=t.read_data_input,e.label="Read Data Input",e.time=t.read_data_input_time}else if(this.writeProtocolIndex!==null){let t=this.shownDetails.write_protocols[this.writeProtocolIndex];e.data=t.write_data_input,e.label="Write Data Input",e.time=t.write_data_input_time}else{let t=this.shownDetails;e.data=t.written_raw_data,e.label="Written Raw Data",e.time=t.written_raw_data_time}return e},lowerData(){let e={};if(!this.shownDetails)return e;if(this.readProtocolIndex!==null){let t=this.shownDetails.read_protocols[this.readProtocolIndex];e.data=t.read_data_output,e.label="Read Data Output",e.time=t.read_data_output_time}else if(this.writeProtocolIndex!==null){let t=this.shownDetails.write_protocols[this.writeProtocolIndex];e.data=t.write_data_output,e.label="Write Data Output",e.time=t.write_data_output_time}else{let t=this.shownDetails;e.data=t.read_raw_data,e.label="Read Raw Data",e.time=t.read_raw_data_time}return e},detailsItems(){if(!this.shownDetails)return[];const e=new Set(["written_raw_data","read_raw_data","written_raw_data_time","read_raw_data_time","read_protocols","write_protocols","read_data_input","read_data_output","write_data_input","write_data_output","read_data_input_time","read_data_output_time","write_data_input_time","write_data_output_time"]);let t=null;return this.readProtocolIndex!==null?t=this.shownDetails.read_protocols[this.readProtocolIndex]:this.writeProtocolIndex!==null?t=this.shownDetails.write_protocols[this.writeProtocolIndex]:t=this.shownDetails,Object.entries(t).filter(([n,o])=>!e.has(n)).map(([n,o])=>({key:this.formatKey(n),value:this.formatValue(o)}))},buttonIcon:function(){return this.paused?"mdi-play":"mdi-pause"}},methods:{pause:function(){this.pausedHealth=this.health,this.paused=!this.paused},closeClick:function(){this.$emit("close")},update:function(){this.paused||this.details&&this.updateDetails(this.details.name)},updateDetails(e){this.mode=="Interface"?this.api.interface_details(e).then(t=>{this.updatedDetails=t}):this.api.router_details(e).then(t=>{this.updatedDetails=t})},formatKey(e){return e.replaceAll("_"," ").replace(/\b\w/g,t=>t.toUpperCase())},formatValue(e){return e==null?"null":typeof e=="object"?JSON.stringify(e,null,2):String(e)}}},Xh={class:"details-table d-flex"},Uh={class:"details-properties"},Wh={class:"text-wrap"},Zh={key:1,class:"d-flex justify-center align-center pa-4"},Kh={class:"details-raw pa-3"};function qh(e,t,n,o,r,i){const l=me("v-btn"),a=me("v-spacer"),u=me("v-card-title"),s=me("v-data-table"),c=me("v-progress-circular"),d=me("raw-buffer"),f=me("FlowMetricsPanel"),h=me("v-card-text"),v=me("v-card");return Q(),$e(v,{"max-height":"80vh",class:"d-flex flex-column"},{default:ge(()=>[te(u,{class:"d-flex align-center flex-shrink-0"},{default:ge(()=>[Me(be(n.mode)+" Properties: "+be(i.shownDetails.name)+" ",1),te(l,{icon:i.buttonIcon,variant:"text","data-test":"pause",onClick:i.pause},null,8,["icon","onClick"]),te(a),te(l,{icon:"mdi-close",variant:"text","data-test":"close",onClick:i.closeClick},null,8,["onClick"])]),_:1}),te(h,{class:"overflow-y-auto flex-grow-1 pa-0"},{default:ge(()=>[de("div",Xh,[de("div",Uh,[i.shownDetails?(Q(),$e(s,{key:0,headers:r.headers,items:i.detailsItems,"items-per-page":-1,"hide-default-footer":"",density:"compact",class:"details-table"},{"item.value":ge(({item:y})=>[de("span",Wh,be(y.value),1)]),_:1},8,["headers","items"])):(Q(),he("div",Zh,[te(c,{indeterminate:"",color:"primary"})]))]),de("div",Kh,[de("div",null,be(i.upperData.label)+": "+be(i.upperData.time),1),te(d,{modelValue:i.upperData.data,"onUpdate:modelValue":t[0]||(t[0]=y=>i.upperData.data=y)},null,8,["modelValue"]),de("div",null,be(i.lowerData.label)+": "+be(i.lowerData.time),1),te(d,{modelValue:i.lowerData.data,"onUpdate:modelValue":t[1]||(t[1]=y=>i.lowerData.data=y)},null,8,["modelValue"])])]),n.health&&n.readProtocolIndex===null&&n.writeProtocolIndex===null?(Q(),$e(f,{key:0,health:r.paused?r.pausedHealth:n.health},null,8,["health"])):Ie("",!0)]),_:1})]),_:1})}const Jh=Xe(jh,[["render",qh],["__scopeId","data-v-56438e40"]]),Qh={__name:"TargetProcessingDetails",props:{name:{type:String,required:!0},health:{type:Object,required:!0}},emits:["close"],setup(e){const t=e,n=ye(!1),o=ye(null);function r(){o.value=t.health,n.value=!n.value}return(i,l)=>{const a=me("v-btn"),u=me("v-spacer"),s=me("v-card-title"),c=me("v-card-text"),d=me("v-card");return Q(),$e(d,{"max-height":"80vh",class:"d-flex flex-column","data-test":"target-processing-details"},{default:ge(()=>[te(s,{class:"d-flex align-center flex-shrink-0"},{default:ge(()=>[Me(" Target Processing: "+be(e.name)+" ",1),te(a,{icon:n.value?"mdi-play":"mdi-pause","aria-label":n.value?"Resume metrics":"Pause metrics",variant:"text","data-test":"pause",onClick:r},null,8,["icon","aria-label"]),te(u),te(a,{icon:"mdi-close","aria-label":"Close",variant:"text","data-test":"close",onClick:l[0]||(l[0]=f=>i.$emit("close"))})]),_:1}),te(c,{class:"overflow-y-auto pa-0"},{default:ge(()=>[te(yl,{health:n.value?o.value:e.health},null,8,["health"])]),_:1})]),_:1})}}},eg=5e3;function tg(e){const t=Le(_l(null)),n=Le(Pt());let o=null,r=!1,i,l=!1;async function a(){if(l)return;l=!0;let u=!1;try{o=await e.get_metrics(!0)}catch(s){u=!0,console.error(s)}finally{l=!1}r&&(t.value=_l(o,u),n.value=Pt([],u,t.value.lag))}return je(()=>{r=!0,a(),i=setInterval(a,eg)}),dn(()=>{r=!1,clearInterval(i)}),(u,s)=>t.value[u][s]||n.value}const ng=["title","aria-label"],Fo=Xe({__name:"FlowHealthIndicator",props:{health:{type:Object,required:!0},name:{type:String,required:!0}},emits:["details"],setup(e){return(t,n)=>{const o=me("v-icon");return Q(),he("button",{type:"button",class:Ve(["flow-health nodrag nopan",`flow-health--${e.health.state}`]),title:`${e.health.label}. Click for processing metrics.`,"aria-label":`${e.name}: ${e.health.label}. View processing metrics`,"data-test":"flow-health",onClick:n[0]||(n[0]=hr(r=>t.$emit("details"),["stop"]))},[te(o,{size:"14",color:e.health.state==="ok"?"success":void 0},{default:ge(()=>[Me(be(e.health.icon),1)]),_:1},8,["color"]),Me(" "+be(e.health.state==="ok"?"View metrics":e.health.label)+" ",1),te(o,{size:"14"},{default:ge(()=>[...n[1]||(n[1]=[Me("mdi-chevron-right",-1)])]),_:1})],10,ng)}}},[["__scopeId","data-v-3c87b8fe"]]),og={name:"InterfaceNode",components:{Handle:dt,FlowHealthIndicator:Fo},props:{health:{type:Object,default:()=>Pt()},data:{type:Object,required:!0}},emits:["details"],data(){return{}},computed:{interfaceStyle(){return{width:`${this.data.width}px`,height:`${this.data.height}px`}}}},rg={class:"node-label"};function ig(e,t,n,o,r,i){const l=me("v-icon"),a=me("FlowHealthIndicator"),u=me("Handle");return Q(),he("div",{class:Ve(["interface-node",`flow-node--${n.health.state}`]),style:Pe(i.interfaceStyle)},[te(l,{color:"#1d85e1"},{default:ge(()=>[...t[1]||(t[1]=[Me("mdi-swap-horizontal-bold",-1)])]),_:1}),de("div",rg,be(n.data.label),1),t[2]||(t[2]=de("div",{class:"node-label"},"Interface",-1)),te(a,{health:n.health,name:n.data.label,onDetails:t[0]||(t[0]=s=>e.$emit("details"))},null,8,["health","name"]),te(u,{id:"interface__cmd__input",type:"target",position:"left",style:{top:"112px"}}),te(u,{id:"interface__tlm__input",type:"target",position:"left",style:{top:"162px"}}),te(u,{id:"interface__cmd__output",type:"source",position:"right",style:{top:"112px"}}),te(u,{id:"interface__tlm__output",type:"source",position:"right",style:{top:"162px"}}),t[3]||(t[3]=de("div",{style:{position:"absolute",top:"102px",left:"8px",color:"black"}}," CMD ",-1)),t[4]||(t[4]=de("div",{style:{position:"absolute",top:"152px",left:"8px",color:"black"}}," TLM ",-1)),t[5]||(t[5]=de("div",{style:{position:"absolute",top:"102px",right:"8px",color:"black"}}," CMD ",-1)),t[6]||(t[6]=de("div",{style:{position:"absolute",top:"152px",right:"8px",color:"black"}}," TLM ",-1))],6)}const lg=Xe(og,[["render",ig],["__scopeId","data-v-130ef132"]]),ag={name:"RouterNode",components:{Handle:dt,FlowHealthIndicator:Fo},props:{health:{type:Object,default:()=>Pt()},data:{type:Object,required:!0}},emits:["details"],data(){return{}},computed:{routerStyle(){return{width:`${this.data.width}px`,height:`${this.data.height}px`}}}},sg={class:"node-label"};function ug(e,t,n,o,r,i){const l=me("v-icon"),a=me("FlowHealthIndicator"),u=me("Handle");return Q(),he("div",{class:Ve(["router-node",`flow-node--${n.health.state}`]),style:Pe(i.routerStyle)},[te(l,{color:"#ba1de1"},{default:ge(()=>[...t[1]||(t[1]=[Me("mdi-call-split",-1)])]),_:1}),de("div",sg,be(n.data.label),1),t[2]||(t[2]=de("div",{class:"node-label"},"Router",-1)),te(a,{health:n.health,name:n.data.label,onDetails:t[0]||(t[0]=s=>e.$emit("details"))},null,8,["health","name"]),te(u,{id:"router__cmd__input",type:"target",position:"left",style:{top:"112px"}}),te(u,{id:"router__tlm__input",type:"target",position:"left",style:{top:"162px"}}),te(u,{id:"router__cmd__output",type:"source",position:"right",style:{top:"112px"}}),te(u,{id:"router__tlm__output",type:"source",position:"right",style:{top:"162px"}}),t[3]||(t[3]=de("div",{style:{position:"absolute",top:"102px",left:"8px",color:"black"}}," CMD ",-1)),t[4]||(t[4]=de("div",{style:{position:"absolute",top:"152px",left:"8px",color:"black"}}," TLM ",-1)),t[5]||(t[5]=de("div",{style:{position:"absolute",top:"102px",right:"8px",color:"black"}}," CMD ",-1)),t[6]||(t[6]=de("div",{style:{position:"absolute",top:"152px",right:"8px",color:"black"}}," TLM ",-1))],6)}const cg=Xe(ag,[["render",ug],["__scopeId","data-v-9aa41d46"]]),dg={name:"CosmosNode",components:{Handle:dt,FlowHealthIndicator:Fo},props:{health:{type:Object,default:()=>Pt()},data:{type:Object,required:!0}},emits:["details"]},fg={class:"node-label"};function hg(e,t,n,o,r,i){const l=me("Handle"),a=me("v-icon"),u=me("FlowHealthIndicator");return Q(),he("div",{class:Ve(["cosmos-node",`flow-node--${n.health.state}`])},[te(l,{id:"cosmos__cmd",type:"target",position:"right",style:{top:"114px"}}),te(l,{id:"cosmos__tlm",type:"target",position:"right",style:{top:"164px"}}),t[2]||(t[2]=de("div",{style:{position:"absolute",top:"104px",right:"8px",color:"black"}}," CMD ",-1)),t[3]||(t[3]=de("div",{style:{position:"absolute",top:"154px",right:"8px",color:"black"}}," TLM ",-1)),te(a,{color:"#10b981"},{default:ge(()=>[...t[1]||(t[1]=[Me("mdi-rocket-launch",-1)])]),_:1}),de("div",fg,be(n.data.label),1),t[4]||(t[4]=de("div",{class:"node-label"},"Processing",-1)),te(u,{health:n.health,name:n.data.label,onDetails:t[0]||(t[0]=s=>e.$emit("details"))},null,8,["health","name"])],2)}const gg=Xe(dg,[["render",hg],["__scopeId","data-v-db9eea3b"]]),pg={name:"TargetNode",components:{Handle:dt},props:{data:{type:Object,required:!0}}},vg={class:"target-node"},mg={class:"node-label"};function _g(e,t,n,o,r,i){const l=me("Handle"),a=me("v-icon");return Q(),he("div",vg,[te(l,{id:"target__cmd",type:"target",position:"left",style:{top:"114px"}}),te(l,{id:"target__tlm",type:"target",position:"left",style:{top:"164px"}}),t[1]||(t[1]=de("div",{style:{position:"absolute",top:"104px",left:"8px",color:"black"}}," CMD ",-1)),t[2]||(t[2]=de("div",{style:{position:"absolute",top:"154px",left:"8px",color:"black"}}," TLM ",-1)),te(a,{color:"#10b981"},{default:ge(()=>[...t[0]||(t[0]=[Me("mdi-target",-1)])]),_:1}),de("div",mg,be(n.data.label),1),t[3]||(t[3]=de("div",{class:"node-label"},"Target",-1))])}const yg=Xe(pg,[["render",_g],["__scopeId","data-v-8461d607"]]),wg={name:"WriteProtocolNode",props:{data:{type:Object,required:!0}},computed:{protocolStyle(){return this.data.width?{width:`${this.data.width}px`}:{}}}},bg={class:"protocol-label"};function xg(e,t,n,o,r,i){const l=me("v-icon");return Q(),he("div",{class:"write-protocol-node",style:Pe(i.protocolStyle)},[te(l,{color:"#f97316",size:"small"},{default:ge(()=>[...t[0]||(t[0]=[Me("mdi-arrow-right-bold",-1)])]),_:1}),de("div",bg,be(n.data.label),1)],4)}const Eg=Xe(wg,[["render",xg],["__scopeId","data-v-1bec9d38"]]),Ng={name:"ReadProtocolNode",props:{data:{type:Object,required:!0}},computed:{protocolStyle(){return this.data.width?{width:`${this.data.width}px`}:{}}}},Sg={class:"protocol-label"};function kg(e,t,n,o,r,i){const l=me("v-icon");return Q(),he("div",{class:"read-protocol-node",style:Pe(i.protocolStyle)},[te(l,{color:"#06b6d4",size:"small"},{default:ge(()=>[...t[0]||(t[0]=[Me("mdi-arrow-left-bold",-1)])]),_:1}),de("div",Sg,be(n.data.label),1)],4)}const Cg=Xe(Ng,[["render",kg],["__scopeId","data-v-c903bd6c"]]);var wl=Object.defineProperty,$g=(e,t,n)=>t in e?wl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ig=(e,t)=>{for(var n in t)wl(e,n,{get:t[n],enumerable:!0})},Mg=(e,t,n)=>$g(e,t+"",n),bl={};Ig(bl,{Graph:()=>Ge,alg:()=>jo});var Og=Object.defineProperty,xl=(e,t)=>{for(var n in t)Og(e,n,{get:t[n],enumerable:!0})},Yo=class{constructor(e){this._isDirected=!0,this._isMultigraph=!1,this._isCompound=!1,this._nodes={},this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={},this._nodeCount=0,this._edgeCount=0,this._defaultNodeLabelFn=()=>{},this._defaultEdgeLabelFn=()=>{},e&&(this._isDirected="directed"in e?e.directed:!0,this._isMultigraph="multigraph"in e?e.multigraph:!1,this._isCompound="compound"in e?e.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children["\0"]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return typeof e!="function"?this._defaultNodeLabelFn=()=>e:this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){return this.nodes().filter(e=>Object.keys(this._in[e]).length===0)}sinks(){return this.nodes().filter(e=>Object.keys(this._out[e]).length===0)}setNodes(e,t){return e.forEach(n=>{t!==void 0?this.setNode(n,t):this.setNode(n)}),this}setNode(e,t){return e in this._nodes?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return e in this._nodes}removeNode(e){if(e in this._nodes){let t=n=>this.removeEdge(this._edgeObjs[n]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(n=>{this.setParent(n)}),delete this._children[e]),Object.keys(this._in[e]).forEach(t),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(t===void 0)t="\0";else{t+="";for(let n=t;n!==void 0;n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}parent(e){if(this._isCompound){let t=this._parent[e];if(t!=="\0")return t}}children(e="\0"){if(this._isCompound){let t=this._children[e];if(t)return Object.keys(t)}else{if(e==="\0")return this.nodes();if(this.hasNode(e))return[]}return[]}predecessors(e){let t=this._preds[e];if(t)return Object.keys(t)}successors(e){let t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){let t=this.predecessors(e);if(t){let n=new Set(t),o=this.successors(e);if(o)for(let r of o)n.add(r);return Array.from(n.values())}}isLeaf(e){var t;let n;return this.isDirected()?n=this.successors(e):n=this.neighbors(e),((t=n?.length)!=null?t:0)===0}filterNodes(e){let t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph()),Object.entries(this._nodes).forEach(([r,i])=>{e(r)&&t.setNode(r,i)}),Object.values(this._edgeObjs).forEach(r=>{t.hasNode(r.v)&&t.hasNode(r.w)&&t.setEdge(r,this.edge(r))});let n={},o=r=>{let i=this.parent(r);return!i||t.hasNode(i)?(n[r]=i,i):i in n?n[i]:o(i)};return this._isCompound&&t.nodes().forEach(r=>t.setParent(r,o(r))),t}setDefaultEdgeLabel(e){return typeof e!="function"?this._defaultEdgeLabelFn=()=>e:this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){return e.reduce((n,o)=>(t!==void 0?this.setEdge(n,o,t):this.setEdge(n,o),o)),this}setEdge(e,t,n,o){let r,i,l,a,u=!1;typeof e=="object"&&e!==null&&"v"in e?(r=e.v,i=e.w,l=e.name,arguments.length===2&&(a=t,u=!0)):(r=e,i=t,l=o,arguments.length>2&&(a=n,u=!0)),r=""+r,i=""+i,l!==void 0&&(l=""+l);let s=an(this._isDirected,r,i,l);if(s in this._edgeLabels)return u&&(this._edgeLabels[s]=a),this;if(l!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(r),this.setNode(i),this._edgeLabels[s]=u?a:this._defaultEdgeLabelFn(r,i,l);let c=Dg(this._isDirected,r,i,l);return r=c.v,i=c.w,Object.freeze(c),this._edgeObjs[s]=c,El(this._preds[i],r),El(this._sucs[r],i),this._in[i][s]=c,this._out[r][s]=c,this._edgeCount++,this}edge(e,t,n){let o=arguments.length===1?Go(this._isDirected,e):an(this._isDirected,e,t,n);return this._edgeLabels[o]}edgeAsObj(e,t,n){let o=arguments.length===1?this.edge(e):this.edge(e,t,n);return typeof o!="object"||o===null?{label:o}:o}hasEdge(e,t,n){return(arguments.length===1?Go(this._isDirected,e):an(this._isDirected,e,t,n))in this._edgeLabels}removeEdge(e,t,n){let o=arguments.length===1?Go(this._isDirected,e):an(this._isDirected,e,t,n),r=this._edgeObjs[o];if(r){let i=r.v,l=r.w;delete this._edgeLabels[o],delete this._edgeObjs[o],Nl(this._preds[l],i),Nl(this._sucs[i],l),delete this._in[l][o],delete this._out[i][o],this._edgeCount--}return this}inEdges(e,t){return this.isDirected()?this.filterEdges(this._in[e],e,t):this.nodeEdges(e,t)}outEdges(e,t){return this.isDirected()?this.filterEdges(this._out[e],e,t):this.nodeEdges(e,t)}nodeEdges(e,t){if(e in this._nodes)return this.filterEdges({...this._in[e],...this._out[e]},e,t)}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}filterEdges(e,t,n){if(!e)return;let o=Object.values(e);return n?o.filter(r=>r.v===t&&r.w===n||r.v===n&&r.w===t):o}};function El(e,t){e[t]?e[t]++:e[t]=1}function Nl(e,t){e[t]!==void 0&&!--e[t]&&delete e[t]}function an(e,t,n,o){let r=""+t,i=""+n;if(!e&&r>i){let l=r;r=i,i=l}return r+""+i+""+(o===void 0?"\0":o)}function Dg(e,t,n,o){let r=""+t,i=""+n;if(!e&&r>i){let a=r;r=i,i=a}let l={v:r,w:i};return o&&(l.name=o),l}function Go(e,t){return an(e,t.v,t.w,t.name)}var Tg={};xl(Tg,{read:()=>Rg,write:()=>Pg});function Pg(e){let t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:Ag(e),edges:zg(e)},n=e.graph();return n!==void 0&&(t.value=structuredClone(n)),t}function Ag(e){return e.nodes().map(t=>{let n=e.node(t),o=e.parent(t),r={v:t};return n!==void 0&&(r.value=n),o!==void 0&&(r.parent=o),r})}function zg(e){return e.edges().map(t=>{let n=e.edge(t),o={v:t.v,w:t.w};return t.name!==void 0&&(o.name=t.name),n!==void 0&&(o.value=n),o})}function Rg(e){let t=new Yo(e.options);return e.value!==void 0&&t.setGraph(e.value),e.nodes.forEach(n=>{t.setNode(n.v,n.value),n.parent&&t.setParent(n.v,n.parent)}),e.edges.forEach(n=>{t.setEdge({v:n.v,w:n.w,name:n.name},n.value)}),t}var jo={};xl(jo,{CycleException:()=>Kn,bellmanFord:()=>Sl,components:()=>Lg,dijkstra:()=>Zn,dijkstraAll:()=>Yg,findCycles:()=>Gg,floydWarshall:()=>Xg,isAcyclic:()=>Wg,postorder:()=>Kg,preorder:()=>qg,prim:()=>Jg,shortestPaths:()=>Qg,tarjan:()=>Cl,topsort:()=>$l});var Bg=()=>1;function Sl(e,t,n,o){return Vg(e,String(t),n||Bg,o||function(r){var i;return(i=e.outEdges(r))!=null?i:[]})}function Vg(e,t,n,o){let r={},i,l=0,a=e.nodes(),u=function(d){let f=r[d.v],h=r[d.w];if(!f||!h)return;let v=n(d);f.distance+v<h.distance&&(r[d.w]={distance:f.distance+v,predecessor:d.v},i=!0)},s=function(){a.forEach(function(d){o(d).forEach(function(f){let h=f.v===d?f.v:f.w,v=h===f.v?f.w:f.v;u({v:h,w:v})})})};a.forEach(function(d){let f=d===t?0:Number.POSITIVE_INFINITY;r[d]={distance:f,predecessor:""}});let c=a.length;for(let d=1;d<c&&(i=!1,l++,s(),!!i);d++);if(l===c-1&&(i=!1,s(),i))throw new Error("The graph contains a negative weight cycle");return r}function Lg(e){let t={},n=[],o;function r(i){var l,a;i in t||(t[i]=!0,o.push(i),(l=e.successors(i))==null||l.forEach(r),(a=e.predecessors(i))==null||a.forEach(r))}return e.nodes().forEach(function(i){o=[],r(i),o.length&&n.push(o)}),n}var kl=class{constructor(){this._arr=[],this._keyIndices={}}size(){return this._arr.length}keys(){return this._arr.map(e=>e.key)}has(e){return e in this._keyIndices}priority(e){let t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(e,t){let n=this._keyIndices,o=String(e);if(!(o in n)){let r=this._arr,i=r.length;return n[o]=i,r.push({key:o,priority:t}),this._decrease(i),!0}return!1}removeMin(){if(this.size()===0)throw new Error("Queue underflow");this._swap(0,this._arr.length-1);let e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){let n=this._keyIndices[e];if(n===void 0)throw new Error(`Key not found: ${e}`);let o=this._arr[n].priority;if(t>o)throw new Error(`New priority is greater than current priority. Key: ${e} Old: ${o} New: ${t}`);this._arr[n].priority=t,this._decrease(n)}_heapify(e){let t=this._arr,n=2*e,o=n+1,r=e;n<t.length&&(r=t[n].priority<t[r].priority?n:r,o<t.length&&(r=t[o].priority<t[r].priority?o:r),r!==e&&(this._swap(e,r),this._heapify(r)))}_decrease(e){let t=this._arr,n=t[e].priority,o;for(;e!==0&&(o=e>>1,!(t[o].priority<n));)this._swap(e,o),e=o}_swap(e,t){let n=this._arr,o=this._keyIndices,r=n[e],i=n[t];n[e]=i,n[t]=r,o[i.key]=e,o[r.key]=t}},Hg=()=>1;function Zn(e,t,n,o){let r=function(i){var l;return(l=e.outEdges(i))!=null?l:[]};return Fg(e,String(t),n||Hg,o||r)}function Fg(e,t,n,o){let r={},i=new kl,l,a,u=function(s){let c=s.v!==l?s.v:s.w,d=r[c];if(!d)return;let f=n(s),h=a.distance+f;if(f<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+s+" Weight: "+f);h<d.distance&&(d.distance=h,d.predecessor=l,i.decrease(c,h))};for(e.nodes().forEach(function(s){let c=s===t?0:Number.POSITIVE_INFINITY;r[s]={distance:c,predecessor:""},i.add(s,c)});i.size()>0;){l=i.removeMin();let s=r[l];if(!s||s.distance===Number.POSITIVE_INFINITY)break;a=s,o(l).forEach(u)}return r}function Yg(e,t,n){return e.nodes().reduce(function(o,r){return o[r]=Zn(e,r,t,n),o},{})}function Cl(e){let t=0,n=[],o={},r=[];function i(l){var a;let u=o[l]={onStack:!0,lowlink:t,index:t++};if(n.push(l),(a=e.successors(l))==null||a.forEach(function(s){if(s in o){let c=o[s];c!=null&&c.onStack&&(u.lowlink=Math.min(u.lowlink,c.index))}else{i(s);let c=o[s];c&&(u.lowlink=Math.min(u.lowlink,c.lowlink))}}),u.lowlink===u.index){let s=[],c;do{c=n.pop();let d=o[c];d&&(d.onStack=!1),s.push(c)}while(l!==c);r.push(s)}}return e.nodes().forEach(function(l){l in o||i(l)}),r}function Gg(e){return Cl(e).filter(function(t){var n;let o=t[0];return o?t.length>1||t.length===1&&((n=e.outEdges(o,o))!=null?n:[]).length>0:!1})}var jg=()=>1;function Xg(e,t,n){return Ug(e,t||jg,n||function(o){var r;return(r=e.outEdges(o))!=null?r:[]})}function Ug(e,t,n){let o={},r=e.nodes();return r.forEach(function(i){let l={};o[i]=l,l[i]={distance:0,predecessor:""},r.forEach(function(a){i!==a&&(l[a]={distance:Number.POSITIVE_INFINITY,predecessor:""})}),n(i).forEach(function(a){let u=a.v===i?a.w:a.v,s=t(a);l[u]={distance:s,predecessor:i}})}),r.forEach(function(i){let l=o[i];l&&r.forEach(function(a){let u=o[a];u&&r.forEach(function(s){let c=u[i],d=l[s],f=u[s];if(c&&d&&f){let h=c.distance+d.distance;h<f.distance&&(f.distance=h,f.predecessor=d.predecessor)}})})}),o}var Kn=class extends Error{constructor(e){super(e),this.name="CycleException"}};function $l(e){let t={},n={},o=[];function r(i){var l;if(i in n)throw new Kn;i in t||(n[i]=!0,t[i]=!0,(l=e.predecessors(i))==null||l.forEach(r),delete n[i],o.push(i))}if(e.sinks().forEach(r),Object.keys(t).length!==e.nodeCount())throw new Kn;return o}function Wg(e){try{$l(e)}catch(t){if(t instanceof Kn)return!1;throw t}return!0}function Zg(e,t,n,o,r){Array.isArray(t)||(t=[t]);let i=(a=>{var u;return(u=e.isDirected()?e.successors(a):e.neighbors(a))!=null?u:[]}),l={};return t.forEach(function(a){if(!e.hasNode(a))throw new Error("Graph does not have node: "+a);r=Il(e,a,n==="post",l,i,o,r)}),r}function Il(e,t,n,o,r,i,l){return t in o||(o[t]=!0,n||(l=i(l,t)),r(t).forEach(function(a){l=Il(e,a,n,o,r,i,l)}),n&&(l=i(l,t))),l}function Ml(e,t,n){return Zg(e,t,n,function(o,r){return o.push(r),o},[])}function Kg(e,t){return Ml(e,t,"post")}function qg(e,t){return Ml(e,t,"pre")}function Jg(e,t){var n;let o=new Yo,r={},i=new kl,l;function a(c){let d=c.v===l?c.w:c.v,f=i.priority(d);if(f!==void 0){let h=t(c);h<f&&(r[d]=l,i.decrease(d,h))}}if(e.nodeCount()===0)return o;e.nodes().forEach(function(c){i.add(c,Number.POSITIVE_INFINITY),o.setNode(c)});let u=e.nodes()[0];u!==void 0&&i.decrease(u,0);let s=!1;for(;i.size()>0;){if(l=i.removeMin(),l in r)o.setEdge(l,r[l]);else{if(s)throw new Error("Input graph is not connected: "+e);s=!0}(n=e.nodeEdges(l))==null||n.forEach(a)}return o}function Qg(e,t,n,o){return ep(e,t,n,o??(r=>{var i;return(i=e.outEdges(r))!=null?i:[]}))}function ep(e,t,n,o){if(n===void 0)return Zn(e,t,n,o);let r=!1,i=e.nodes();for(let l=0;l<i.length;l++){let a=i[l];if(a===void 0)continue;let u=o(a);for(let s=0;s<u.length;s++){let c=u[s];if(!c)continue;let d=c.v===a?c.v:c.w,f=d===c.v?c.w:c.v;n({v:d,w:f})<0&&(r=!0)}if(r)return Sl(e,t,n,o)}return Zn(e,t,n,o)}var Ge=Yo;function At(e,t,n,o){let r=o;for(;e.hasNode(r);)r=Xo(o);return n.dummy=t,e.setNode(r,n),r}function tp(e){let t=new Ge().setGraph(e.graph());return e.nodes().forEach(n=>t.setNode(n,e.node(n))),e.edges().forEach(n=>{let o=t.edge(n.v,n.w)||{weight:0,minlen:1},r=e.edge(n);t.setEdge(n.v,n.w,{weight:o.weight+r.weight,minlen:Math.max(o.minlen,r.minlen)})}),t}function Ol(e){let t=new Ge({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function Dl(e,t){let n=e.x,o=e.y,r=t.x-n,i=t.y-o,l=e.width/2,a=e.height/2;if(!r&&!i)throw new Error("Not possible to find intersection inside of the rectangle");let u,s;return Math.abs(i)*l>Math.abs(r)*a?(i<0&&(a=-a),u=a*r/i,s=a):(r<0&&(l=-l),u=l,s=l*i/r),{x:n+u,y:o+s}}function sn(e){let t=un(Al(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let o=e.node(n),r=o.rank;r!==void 0&&(t[r]||(t[r]=[]),t[r][o.order]=n)}),t}function np(e){let t=e.nodes().map(o=>{let r=e.node(o).rank;return r===void 0?Number.MAX_VALUE:r}),n=Je(Math.min,t);e.nodes().forEach(o=>{let r=e.node(o);Object.hasOwn(r,"rank")&&(r.rank-=n)})}function op(e){let t=e.nodes().map(l=>e.node(l).rank).filter(l=>l!==void 0),n=Je(Math.min,t),o=[];e.nodes().forEach(l=>{let a=e.node(l).rank-n;o[a]||(o[a]=[]),o[a].push(l)});let r=0,i=e.graph().nodeRankFactor;Array.from(o).forEach((l,a)=>{l===void 0&&a%i!==0?--r:l!==void 0&&r&&l.forEach(u=>e.node(u).rank+=r)})}function Tl(e,t,n,o){let r={width:0,height:0};return arguments.length>=4&&(r.rank=n,r.order=o),At(e,"border",r,t)}function rp(e,t=Pl){let n=[];for(let o=0;o<e.length;o+=t){let r=e.slice(o,o+t);n.push(r)}return n}var Pl=65535;function Je(e,t){if(t.length>Pl){let n=rp(t);return e(...n.map(o=>e(...o)))}else return e(...t)}function Al(e){let t=e.nodes().map(n=>{let o=e.node(n).rank;return o===void 0?Number.MIN_VALUE:o});return Je(Math.max,t)}function ip(e,t){let n={lhs:[],rhs:[]};return e.forEach(o=>{t(o)?n.lhs.push(o):n.rhs.push(o)}),n}function lp(e,t){let n=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-n)+"ms")}}function zl(e,t){return t()}var ap=0;function Xo(e){let t=++ap;return e+(""+t)}function un(e,t,n=1){t==null&&(t=e,e=0);let o=i=>i<t;n<0&&(o=i=>t<i);let r=[];for(let i=e;o(i);i+=n)r.push(i);return r}function qn(e,t){let n={};for(let o of t)e[o]!==void 0&&(n[o]=e[o]);return n}function Jn(e,t){let n;return typeof t=="string"?n=o=>o[t]:n=t,Object.entries(e).reduce((o,[r,i])=>(o[r]=n(i,r),o),{})}function sp(e,t){return e.reduce((n,o,r)=>(n[o]=t[r],n),{})}var Qn="\0";function Rl(e,t,n){var o,r,i,l,a,u;if(!(e&&t&&n&&t.dummy==="edge"&&n.dummy==="edge"&&t.edgeObj&&n.edgeObj&&e[t.edgeObj.v]&&e[n.edgeObj.v]&&e[t.edgeObj.w]&&e[n.edgeObj.w]))return 0;let s=!0;t.edgeObj.w===n.edgeObj.w&&(s=!1);let c=s?(r=(o=e[t.edgeObj.v])==null?void 0:o.rank)!=null?r:NaN+1:(l=(i=e[t.edgeObj.w])==null?void 0:i.rank)!=null?l:NaN-1,d=Object.entries(e).find(y=>{var b,w;return((b=y[1].edgeObj)==null?void 0:b.v)===t.edgeObj.v&&((w=y[1].edgeObj)==null?void 0:w.w)===t.edgeObj.w&&y[1].rank===c}),f=Object.entries(e).find(y=>{var b,w;return((b=y[1].edgeObj)==null?void 0:b.v)===n.edgeObj.v&&((w=y[1].edgeObj)==null?void 0:w.w)===n.edgeObj.w&&y[1].rank===c});if(!d||!f)return 0;let h=(a=d[1].order)!=null?a:NaN,v=(u=f[1].order)!=null?u:NaN;return isNaN(h-v)?0:h-v}var up="3.1.1",cp=class{constructor(){Mg(this,"_sentinel");let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return Bl(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&Bl(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,n=t._prev;for(;n!==t;)e.push(JSON.stringify(n,dp)),n=n._prev;return"["+e.join(", ")+"]"}};function Bl(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function dp(e,t){if(e!=="_next"&&e!=="_prev")return t}var fp=cp,hp=()=>1;function gp(e,t){if(e.nodeCount()<=1)return[];let n=vp(e,t||hp);return pp(n.graph,n.buckets,n.zeroIdx).flatMap(o=>e.outEdges(o.v,o.w)||[])}function pp(e,t,n){var o;let r=[],i=t[t.length-1],l=t[0],a;for(;e.nodeCount();){for(;a=l.dequeue();)Uo(e,t,n,a);for(;a=i.dequeue();)Uo(e,t,n,a);if(e.nodeCount()){for(let u=t.length-2;u>0;--u)if(a=(o=t[u])==null?void 0:o.dequeue(),a){r=r.concat(Uo(e,t,n,a,!0)||[]);break}}}return r}function Uo(e,t,n,o,r){let i=[],l=r?i:void 0;return(e.inEdges(o.v)||[]).forEach(a=>{let u=e.edge(a),s=e.node(a.v);r&&i.push({v:a.v,w:a.w}),s.out-=u,Wo(t,n,s)}),(e.outEdges(o.v)||[]).forEach(a=>{let u=e.edge(a),s=a.w,c=e.node(s);c.in-=u,Wo(t,n,c)}),e.removeNode(o.v),l}function vp(e,t){let n=new Ge,o=0,r=0;e.nodes().forEach(a=>{n.setNode(a,{v:a,in:0,out:0})}),e.edges().forEach(a=>{let u=n.edge(a.v,a.w)||0,s=t(a),c=u+s;n.setEdge(a.v,a.w,c);let d=n.node(a.v),f=n.node(a.w);r=Math.max(r,d.out+=s),o=Math.max(o,f.in+=s)});let i=mp(r+o+3).map(()=>new fp),l=o+1;return n.nodes().forEach(a=>{Wo(i,l,n.node(a))}),{graph:n,buckets:i,zeroIdx:l}}function Wo(e,t,n){var o,r,i;n.out?n.in?(i=e[n.out-n.in+t])==null||i.enqueue(n):(r=e[e.length-1])==null||r.enqueue(n):(o=e[0])==null||o.enqueue(n)}function mp(e){let t=[];for(let n=0;n<e;n++)t.push(n);return t}function _p(e,t){(e.graph().acyclicer==="greedy"?gp(e,n(e)):yp(e,t??null)).forEach(o=>{let r=e.edge(o);e.removeEdge(o),r.forwardName=o.name,r.reversed=!0,e.setEdge(o.w,o.v,r,Xo("rev"))});function n(o){return r=>o.edge(r).weight}}function yp(e,t){let n=[],o={},r={};function i(u){Object.hasOwn(r,u)||(r[u]=!0,o[u]=!0,e.outEdges(u).forEach(s=>{Object.hasOwn(o,s.w)?n.push(s):i(s.w)}),delete o[u])}function l(u){var s;Object.hasOwn(r,u)||(r[u]=!0,o[u]=!0,(s=e.outEdges(u))==null||s.forEach(c=>{var d,f;Object.hasOwn(o,c.w)||((d=t.node(u))==null?void 0:d.rank)>((f=t.node(c.w))==null?void 0:f.rank)&&bp(e,c.w,c)?n.push(c):l(c.w)}),delete o[u])}let a=i;return t&&typeof t.node=="function"&&(a=l),e.sources().forEach(a),e.nodes().forEach(a),n}function wp(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let o=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,o)}})}function bp(e,t,n){let o=new Set;function r(i){var l;if(e.sources().includes(i))return!0;o.add(i);for(let a of(l=e.inEdges(i))!=null?l:[])if(!(a.v===n.v&&a.w===n.w)&&!o.has(a.v)&&r(a.v))return!0;return!1}return r(t)}function xp(e){e.graph().dummyChains=[],e.edges().forEach(t=>Ep(e,t))}function Ep(e,t){let n=t.v,o=e.node(n).rank,r=t.w,i=e.node(r).rank,l=t.name,a=e.edge(t),u=a.labelRank;if(i===o+1)return;e.removeEdge(t);let s,c,d;for(d=0,++o;o<i;++d,++o)a.points=[],c={width:0,height:0,edgeLabel:a,edgeObj:t,rank:o},s=At(e,"edge",c,"_d"),o===u&&(c.width=a.width,c.height=a.height,c.dummy="edge-label",c.labelpos=a.labelpos),e.setEdge(n,s,{weight:a.weight},l),d===0&&e.graph().dummyChains.push(s),n=s;e.setEdge(n,r,{weight:a.weight},l)}function Np(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),o=n.edgeLabel,r;for(e.setEdge(n.edgeObj,o);n.dummy;)r=e.successors(t)[0],e.removeNode(t),o.points.push({x:n.x,y:n.y}),n.dummy==="edge-label"&&(o.x=n.x,o.y=n.y,o.width=n.width,o.height=n.height),t=r,n=e.node(t)})}function Zo(e){let t={};function n(o){let r=e.node(o);if(Object.hasOwn(t,o))return r.rank;t[o]=!0;let i=e.outEdges(o),l=i?i.map(u=>u==null?Number.POSITIVE_INFINITY:n(u.w)-e.edge(u).minlen):[],a=Je(Math.min,l);return a===Number.POSITIVE_INFINITY&&(a=0),r.rank=a}e.sources().forEach(n)}function zt(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var Vl=Sp;function Sp(e){let t=new Ge({directed:!1}),n=e.nodes();if(n.length===0)throw new Error("Graph must have at least one node");let o=n[0],r=e.nodeCount();t.setNode(o,{});let i,l;for(;kp(t,e)<r&&(i=Cp(t,e),!!i);)l=t.hasNode(i.v)?zt(e,i):-zt(e,i),$p(t,e,l);return t}function kp(e,t){function n(o){let r=t.nodeEdges(o);r&&r.forEach(i=>{let l=i.v,a=o===l?i.w:l;!e.hasNode(a)&&!zt(t,i)&&(e.setNode(a,{}),e.setEdge(o,a,{}),n(a))})}return e.nodes().forEach(n),e.nodeCount()}function Cp(e,t){return t.edges().reduce((n,o)=>{let r=Number.POSITIVE_INFINITY;return e.hasNode(o.v)!==e.hasNode(o.w)&&(r=zt(t,o)),r<n[0]?[r,o]:n},[Number.POSITIVE_INFINITY,null])[1]}function $p(e,t,n){e.nodes().forEach(o=>t.node(o).rank+=n)}var{preorder:Ip,postorder:Mp}=jo,Op=Nt;Nt.initLowLimValues=qo,Nt.initCutValues=Ko,Nt.calcCutValue=Ll,Nt.leaveEdge=Fl,Nt.enterEdge=Yl,Nt.exchangeEdges=Gl;function Nt(e){e=tp(e),Zo(e);let t=Vl(e);qo(t),Ko(t,e);let n,o;for(;n=Fl(t);)o=Yl(t,e,n),Gl(t,e,n,o)}function Ko(e,t){let n=Mp(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(o=>Dp(e,t,o))}function Dp(e,t,n){let o=e.node(n).parent,r=e.edge(n,o);r.cutvalue=Ll(e,t,n)}function Ll(e,t,n){let o=e.node(n).parent,r=!0,i=t.edge(n,o),l=0;i||(r=!1,i=t.edge(o,n)),l=i.weight;let a=t.nodeEdges(n);return a&&a.forEach(u=>{let s=u.v===n,c=s?u.w:u.v;if(c!==o){let d=s===r,f=t.edge(u).weight;if(l+=d?f:-f,Pp(e,n,c)){let h=e.edge(n,c).cutvalue;l+=d?-h:h}}}),l}function qo(e,t){arguments.length<2&&(t=e.nodes()[0]),Hl(e,{},1,t)}function Hl(e,t,n,o,r){let i=n,l=e.node(o);t[o]=!0;let a=e.neighbors(o);return a&&a.forEach(u=>{Object.hasOwn(t,u)||(n=Hl(e,t,n,u,o))}),l.low=i,l.lim=n++,r?l.parent=r:delete l.parent,n}function Fl(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function Yl(e,t,n){let o=n.v,r=n.w;t.hasEdge(o,r)||(o=n.w,r=n.v);let i=e.node(o),l=e.node(r),a=i,u=!1;return i.lim>l.lim&&(a=l,u=!0),t.edges().filter(s=>u===jl(e,e.node(s.v),a)&&u!==jl(e,e.node(s.w),a)).reduce((s,c)=>zt(t,c)<zt(t,s)?c:s)}function Gl(e,t,n,o){let r=n.v,i=n.w;e.removeEdge(r,i),e.setEdge(o.v,o.w,{}),qo(e),Ko(e,t),Tp(e,t)}function Tp(e,t){let n=e.nodes().find(r=>!e.node(r).parent);if(!n)return;let o=Ip(e,[n]);o=o.slice(1),o.forEach(r=>{let i=e.node(r).parent,l=t.edge(r,i),a=!1;l||(l=t.edge(i,r),a=!0),t.node(r).rank=t.node(i).rank+(a?l.minlen:-l.minlen)})}function Pp(e,t,n){return e.hasEdge(t,n)}function jl(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var Ap=zp;function zp(e){let t=e.graph().ranker;if(typeof t=="function")return t(e);switch(t){case"network-simplex":Xl(e);break;case"tight-tree":Bp(e);break;case"longest-path":Rp(e);break;case"none":break;default:Xl(e)}}var Rp=Zo;function Bp(e){Zo(e),Vl(e)}function Xl(e){Op(e)}var Vp=Lp;function Lp(e){let t=Fp(e),n=e.graph();Array.isArray(n.dummyChains)&&n.dummyChains.forEach(o=>{let r=e.node(o),i=r.edgeObj,l=Hp(e,t,i.v,i.w),a=l.path,u=l.lca,s=0,c=a[s],d=!0;for(;o!==i.w;){if(r=e.node(o),d){for(;(c=a[s])!==u&&e.node(c).maxRank<r.rank;)s++;c===u&&(d=!1)}if(!d){for(;s<a.length-1&&e.node(a[s+1]).minRank<=r.rank;)s++;c=a[s]}c!==void 0&&e.setParent(o,c),o=e.successors(o)[0]}})}function Hp(e,t,n,o){let r=[],i=[],l=Math.min(t[n].low,t[o].low),a=Math.max(t[n].lim,t[o].lim),u;u=n;do u=e.parent(u),r.push(u);while(u&&(t[u].low>l||a>t[u].lim));let s=u,c=o;for(;(c=e.parent(c))!==s;)i.push(c);return{path:r.concat(i.reverse()),lca:s}}function Fp(e){let t={},n=0;function o(r){let i=n;e.children(r).forEach(o),t[r]={low:i,lim:n++}}return e.children(Qn).forEach(o),t}function Yp(e){let t=At(e,"root",{},"_root"),n=Gp(e),o=Object.values(n),r=Je(Math.max,o)-1,i=2*r+1;e.graph().nestingRoot=t,e.edges().forEach(a=>e.edge(a).minlen*=i);let l=jp(e)+1;e.children(Qn).forEach(a=>{Ul(e,t,i,l,r,n,a)}),e.graph().nodeRankFactor=i}function Ul(e,t,n,o,r,i,l){var a;let u=e.children(l);if(!u.length){l!==t&&e.setEdge(t,l,{weight:0,minlen:n});return}let s=Tl(e,"_bt"),c=Tl(e,"_bb"),d=e.node(l);e.setParent(s,l),d.borderTop=s,e.setParent(c,l),d.borderBottom=c,u.forEach(f=>{var h;Ul(e,t,n,o,r,i,f);let v=e.node(f),y=v.borderTop?v.borderTop:f,b=v.borderBottom?v.borderBottom:f,w=v.borderTop?o:2*o,E=y!==b?1:r-((h=i[l])!=null?h:0)+1;e.setEdge(s,y,{weight:w,minlen:E,nestingEdge:!0}),e.setEdge(b,c,{weight:w,minlen:E,nestingEdge:!0})}),e.parent(l)||e.setEdge(t,s,{weight:0,minlen:r+((a=i[l])!=null?a:0)})}function Gp(e){let t={};function n(o,r){let i=e.children(o);i&&i.length&&i.forEach(l=>n(l,r+1)),t[o]=r}return e.children(Qn).forEach(o=>n(o,1)),t}function jp(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function Xp(e){let t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(n=>{e.edge(n).nestingEdge&&e.removeEdge(n)})}var Up=Wp;function Wp(e){function t(n){let o=e.children(n),r=e.node(n);if(o.length&&o.forEach(t),r&&Object.hasOwn(r,"minRank")){r.borderLeft=[],r.borderRight=[];for(let i=r.minRank,l=r.maxRank+1;i<l;++i)Wl(e,"borderLeft","_bl",n,r,i),Wl(e,"borderRight","_br",n,r,i)}}e.children(Qn).forEach(t)}function Wl(e,t,n,o,r,i){let l={width:0,height:0,rank:i,borderType:t},a=r[t][i-1],u=At(e,"border",l,n);r[t][i]=u,e.setParent(u,o),a&&e.setEdge(a,u,{weight:1})}function Zp(e){var t;let n=(t=e.graph().rankdir)==null?void 0:t.toLowerCase();(n==="lr"||n==="rl")&&Zl(e)}function Kp(e){var t;let n=(t=e.graph().rankdir)==null?void 0:t.toLowerCase();(n==="bt"||n==="rl")&&qp(e),(n==="lr"||n==="rl")&&(Jp(e),Zl(e))}function Zl(e){e.nodes().forEach(t=>Kl(e.node(t))),e.edges().forEach(t=>Kl(e.edge(t)))}function Kl(e){let t=e.width;e.width=e.height,e.height=t}function qp(e){e.nodes().forEach(t=>Jo(e.node(t))),e.edges().forEach(t=>{var n;let o=e.edge(t);(n=o.points)==null||n.forEach(Jo),Object.hasOwn(o,"y")&&Jo(o)})}function Jo(e){e.y=-e.y}function Jp(e){e.nodes().forEach(t=>Qo(e.node(t))),e.edges().forEach(t=>{var n;let o=e.edge(t);(n=o.points)==null||n.forEach(Qo),Object.hasOwn(o,"x")&&Qo(o)})}function Qo(e){let t=e.x;e.x=e.y,e.y=t}function Qp(e,t=null){let n={},o=e.nodes().filter(s=>!e.children(s).length),r=o.map(s=>e.node(s).rank),i=Je(Math.max,r),l=un(i+1).map(()=>[]);function a(s){if(n[s])return;n[s]=!0;let c=e.node(s);l[c.rank].push(s);let d=e.successors(s);d&&[...d].sort((f,h)=>u(f,h)).forEach(a)}o.sort((s,c)=>e.node(s).rank-e.node(c).rank).forEach(a);function u(s,c){let d=e.node(s),f=e.node(c);return Rl(t,d,f)}return l}function ev(e,t){let n=0;for(let o=1;o<t.length;++o)n+=tv(e,t[o-1],t[o]);return n}function tv(e,t,n){let o=sp(n,n.map((s,c)=>c)),r=t.flatMap(s=>{let c=e.outEdges(s);return c?c.map(d=>({pos:o[d.w],weight:e.edge(d).weight})).sort((d,f)=>d.pos-f.pos):[]}),i=1;for(;i<n.length;)i<<=1;let l=2*i-1;i-=1;let a=new Array(l).fill(0),u=0;return r.forEach(s=>{let c=s.pos+i;a[c]+=s.weight;let d=0;for(;c>0;)c%2&&(d+=a[c+1]),c=c-1>>1,a[c]+=s.weight;u+=s.weight*d}),u}function nv(e,t=[]){return t.map(n=>{let o=e.inEdges(n);if(!o||!o.length)return{v:n};{let r=o.reduce((i,l)=>{let a=e.edge(l),u=e.node(l.v);return{sum:i.sum+a.weight*u.order,weight:i.weight+a.weight}},{sum:0,weight:0});return{v:n,barycenter:r.sum/r.weight,weight:r.weight}}})}function ov(e,t){let n={};e.forEach((r,i)=>{let l={indegree:0,in:[],out:[],vs:[r.v],i};r.barycenter!==void 0&&(l.barycenter=r.barycenter,l.weight=r.weight),n[r.v]=l}),t.edges().forEach(r=>{let i=n[r.v],l=n[r.w];i!==void 0&&l!==void 0&&(l.indegree++,i.out.push(l))});let o=Object.values(n).filter(r=>!r.indegree);return rv(o)}function rv(e){let t=[];function n(r){return i=>{i.merged||(i.barycenter===void 0||r.barycenter===void 0||i.barycenter>=r.barycenter)&&iv(r,i)}}function o(r){return i=>{i.in.push(r),--i.indegree===0&&e.push(i)}}for(;e.length;){let r=e.pop();t.push(r),r.in.reverse().forEach(n(r)),r.out.forEach(o(r))}return t.filter(r=>!r.merged).map(r=>qn(r,["vs","i","barycenter","weight"]))}function iv(e,t){let n=0,o=0;e.weight&&(n+=e.barycenter*e.weight,o+=e.weight),t.weight&&(n+=t.barycenter*t.weight,o+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/o,e.weight=o,e.i=Math.min(t.i,e.i),t.merged=!0}function lv(e,t,n,o,r){let i={},l=null,a=null,u=r;typeof t=="boolean"?(u=t,i={}):t&&(i=t,l=n??null,a=o??null);let s=ip(e,w=>Object.hasOwn(w,"barycenter")),c=s.lhs,d=s.rhs.sort((w,E)=>E.i-w.i),f=[],h=0,v=0,y=0;c.sort(av(a,l,!!u));for(let[w,E]of Object.entries(i)){let g=c.findIndex(x=>x.vs[0]===w);c.splice(g+1,0,E)}y=ql(f,d,y),c.forEach(w=>{y+=w.vs.length,f.push(w.vs),h+=w.barycenter*w.weight,v+=w.weight,y=ql(f,d,y)});let b={vs:f.flat(1)};return v&&(b.barycenter=h/v,b.weight=v),b}function ql(e,t,n){let o;for(;t.length&&(o=t[t.length-1]).i<=n;)t.pop(),e.push(o.vs),n++;return n}function av(e,t,n){return(o,r)=>{if(o.barycenter<r.barycenter)return-1;if(o.barycenter>r.barycenter)return 1;if(e&&(typeof o.vs[0]=="string"||typeof r.vs[0]=="string")){let i=e.node(o.vs[0]),l=e.node(r.vs[0]),a=Rl(t,i,l);if(a!==0)return a}return n?r.i-o.i:o.i-r.i}}function Jl(e,t,n,o,r){var i,l,a,u,s,c,d,f,h,v,y;let b=null,w=r;typeof o=="boolean"?(w=o,b=null):o!==void 0&&(b=o);let E=e.children(t),g=e.node(t),x=g?g.borderLeft:void 0,O=g?g.borderRight:void 0,B={};x&&(E=E.filter(S=>S!==x&&S!==O));let G=nv(e,E);G.forEach(S=>{if(e.children(S.v).length){let{result:Y}=Jl(e,S.v,n,b,w);B[S.v]=Y,Object.hasOwn(Y,"barycenter")&&uv(S,Y)}});let T=ov(G,n);sv(T,B);let j={},X=!1;for(let S=0;S<T.length;S++)for(let Y=S+1;Y<T.length;Y++)if(!(!T[S]||!T[Y]||!((i=T[S])!=null&&i.barycenter)||!((l=T[Y])!=null&&l.barycenter))&&((a=T[S])==null?void 0:a.barycenter)===T[Y].barycenter){let m=(s=(u=T[S])==null?void 0:u.vs[0])!=null?s:"",M=(d=(c=T[Y])==null?void 0:c.vs[0])!=null?d:"",k=e.node(m),z=e.node(M);if(k.dummy==="edge"&&z.dummy==="edge"&&((f=k.edgeObj)==null?void 0:f.v)===((h=z.edgeObj)==null?void 0:h.v)&&((v=k.edgeObj)==null?void 0:v.w)===((y=z.edgeObj)==null?void 0:y.w))if(k.edgeLabel.reversed){j[M]=T[S],T.splice(S,1),S--;break}else j[m]=T[Y],T.splice(Y,1),Y--;else X=!0}let P=lv(T,j,b,e,w);if(x&&O){P.vs=[x,P.vs,O].flat(1);let S=e.predecessors(x);if(S&&S.length){let Y=e.node(S[0]),m=e.predecessors(O),M=e.node(m[0]);Object.hasOwn(P,"barycenter")||(P.barycenter=0,P.weight=0),P.barycenter=(P.barycenter*P.weight+Y.order+M.order)/(P.weight+2),P.weight+=2}}return Object.defineProperty(P,"result",{value:P,enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(P,"usedBias",{value:X,enumerable:!1,configurable:!0,writable:!0}),P}function sv(e,t){e.forEach(n=>{n.vs=n.vs.flatMap(o=>t[o]?t[o].vs:o)})}function uv(e,t){e.barycenter!==void 0?(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight):(e.barycenter=t.barycenter,e.weight=t.weight)}function cv(e,t,n,o){o||(o=e.nodes());let r=dv(e),i=new Ge({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(l=>e.node(l));return o.forEach(l=>{let a=e.node(l),u=e.parent(l);if(a.rank===t||a.minRank<=t&&t<=a.maxRank){i.setNode(l),i.setParent(l,u||r);let s=e[n](l);s&&s.forEach(c=>{let d=c.v===l?c.w:c.v,f=i.edge(d,l),h=f!==void 0?f.weight:0;i.setEdge(d,l,{weight:e.edge(c).weight+h})}),Object.hasOwn(a,"minRank")&&i.setNode(l,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]})}}),i}function dv(e){let t;for(;e.hasNode(t=Xo("_root")););return t}function fv(e,t,n){let o={},r;n.forEach(i=>{let l=e.parent(i),a,u;for(;l;){if(a=e.parent(l),a?(u=o[a],o[a]=l):(u=r,r=l),u&&u!==l){t.setEdge(u,l);return}l=a}})}function Ql(e,t={},n=null){if(typeof t.customOrder=="function"){t.customOrder(e,Ql);return}let o=Al(e),r=ea(e,un(1,o+1),"inEdges"),i=ea(e,un(o-1,-1,-1),"outEdges"),l=Qp(e,n);if(ta(e,l),t.disableOptimalOrderHeuristic)return;let a=Number.POSITIVE_INFINITY,u,s=t.constraints||[];for(let c=0,d=0;d<4;++c,++d){hv(c%2?r:i,c%4>=2,s,n),l=sn(e);let f=ev(e,l);f<a?(d=0,u=Object.assign({},l),a=f):f===a&&(u=structuredClone(l))}ta(e,u)}function ea(e,t,n){let o=new Map,r=(i,l)=>{o.has(i)||o.set(i,[]),o.get(i).push(l)};for(let i of e.nodes()){let l=e.node(i);if(typeof l.rank=="number"&&r(l.rank,i),typeof l.minRank=="number"&&typeof l.maxRank=="number")for(let a=l.minRank;a<=l.maxRank;a++)a!==l.rank&&r(a,i)}return t.map(function(i){return cv(e,i,n,o.get(i)||[])})}function hv(e,t,n,o){let r=!0,i=new Ge;e.forEach(function(l){n.forEach(c=>i.setEdge(c.left,c.right));let a=l.graph().root,{result:u,usedBias:s}=Jl(l,a,i,o,r);t&&s&&(r=!r),u.vs.forEach((c,d)=>l.node(c).order=d),fv(l,i,u.vs)})}function ta(e,t){Object.values(t).forEach(n=>n.forEach((o,r)=>e.node(o).order=r))}function gv(e,t){let n={};function o(r,i){let l=0,a=0,u=r.length,s=i[i.length-1];return i.forEach((c,d)=>{let f=vv(e,c),h=f?e.node(f).order:u;(f||c===s)&&(i.slice(a,d+1).forEach(v=>{let y=e.predecessors(v);y&&y.forEach(b=>{let w=e.node(b),E=w.order;(E<l||h<E)&&!(w.dummy&&e.node(v).dummy)&&na(n,b,v)})}),a=d+1,l=h)}),i}return t.length&&t.reduce(o),n}function pv(e,t){let n={};function o(i,l,a,u,s){un(l,a).forEach(c=>{let d=i[c];if(d!==void 0&&e.node(d).dummy){let f=e.predecessors(d);f&&f.forEach(h=>{if(h===void 0)return;let v=e.node(h);v.dummy&&(v.order<u||v.order>s)&&na(n,h,d)})}})}function r(i,l){let a=-1,u=-1,s=0;return l.forEach((c,d)=>{if(e.node(c).dummy==="border"){let f=e.predecessors(c);if(f&&f.length){let h=f[0];if(h===void 0)return;u=e.node(h).order,o(l,s,d,a,u),s=d,a=u}}o(l,s,l.length,u,i.length)}),l}return t.length&&t.reduce(r),n}function vv(e,t){if(e.node(t).dummy){let n=e.predecessors(t);if(n)return n.find(o=>e.node(o).dummy)}}function na(e,t,n){if(t>n){let r=t;t=n,n=r}let o=e[t];o||(e[t]=o={}),o[n]=!0}function mv(e,t,n){if(t>n){let r=t;t=n,n=r}let o=e[t];return o!==void 0&&Object.hasOwn(o,n)}function _v(e,t,n,o,r){let i={},l={},a={};return t.forEach(u=>{u.forEach((s,c)=>{i[s]=s,l[s]=s,a[s]=c})}),t.forEach(u=>{let s=-1,c=-1,d=!1,f=u,h=u.findIndex(v=>r?.includes(v)||oa(v,e,r));h>0&&(f=[u[h],...u.slice(0,h),...u.slice(h+1)],d=!0),f.forEach(v=>{var y;let b=o(v);if(b&&b.length){r!=null&&r.includes(v)&&(b=b.filter(g=>oa(g,e,r)));let w=b.sort((g,x)=>{let O=a[g],B=a[x];return(O!==void 0?O:0)-(B!==void 0?B:0)}),E=(w.length-1)/2;for(let g=Math.floor(E),x=Math.ceil(E);g<=x;++g){let O=w[g];if(O===void 0)continue;let B=a[O];if(B!==void 0&&l[v]===v&&s<B&&a[O]!==c&&!mv(n,v,O)){let G=i[O];G!==void 0&&(l[O]=v,l[v]=i[v]=G,s=B,d&&(s=-1,c=(y=a[O])!=null?y:-1,d=!1))}}}})}),{root:i,align:l}}function yv(e,t,n,o,r=!1){let i={},l=wv(e,t,n,r),a=r?"borderLeft":"borderRight";function u(h,v){let y=l.nodes().slice(),b={},w=y.pop();for(;w;){if(b[w])h(w);else{b[w]=!0,y.push(w);for(let E of v(w))y.push(E)}w=y.pop()}}function s(h){let v=l.inEdges(h);v?i[h]=v.reduce((y,b)=>{var w;let E=(w=i[b.v])!=null?w:0,g=l.edge(b);return Math.max(y,E+(g!==void 0?g:0))},0):i[h]=0}function c(h){let v=l.outEdges(h),y=Number.POSITIVE_INFINITY;v&&(y=v.reduce((w,E)=>{let g=i[E.w],x=l.edge(E);return Math.min(w,(g!==void 0?g:0)-(x!==void 0?x:0))},Number.POSITIVE_INFINITY));let b=e.node(h);y!==Number.POSITIVE_INFINITY&&b.borderType!==a&&(i[h]=Math.max(i[h]!==void 0?i[h]:0,y))}function d(h){return l.predecessors(h)||[]}function f(h){return l.successors(h)||[]}return u(s,d),u(c,f),Object.keys(o).forEach(h=>{var v;let y=n[h];y!==void 0&&(i[h]=(v=i[y])!=null?v:0)}),i}function wv(e,t,n,o){let r=new Ge,i=e.graph(),l=Sv(i.nodesep,i.edgesep,o);return t.forEach(a=>{let u;a.forEach(s=>{let c=n[s];if(c!==void 0){if(r.setNode(c),u!==void 0){let d=n[u];if(d!==void 0){let f=r.edge(d,c);r.setEdge(d,c,Math.max(l(e,s,u),f||0))}}u=s}})}),r}function bv(e,t){return Object.values(t).reduce((n,o)=>{let r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;Object.entries(o).forEach(([a,u])=>{let s=kv(e,a)/2;r=Math.max(u+s,r),i=Math.min(u-s,i)});let l=r-i;return l<n[0]&&(n=[l,o]),n},[Number.POSITIVE_INFINITY,null])[1]}function xv(e,t){let n=Object.values(t),o=Je(Math.min,n),r=Je(Math.max,n);["u","d"].forEach(i=>{["l","r"].forEach(l=>{let a=i+l,u=e[a];if(!u||u===t)return;let s=Object.values(u),c=o-Je(Math.min,s);l!=="l"&&(c=r-Je(Math.max,s)),c&&(e[a]=Jn(u,d=>d+c))})})}function Ev(e,t=void 0){let n=e.ul;return n?Jn(n,(o,r)=>{var i,l;if(t){let u=t.toLowerCase(),s=e[u];if(s&&s[r]!==void 0)return s[r]}let a=Object.values(e).map(u=>{let s=u[r];return s!==void 0?s:0}).sort((u,s)=>u-s);return(((i=a[1])!=null?i:0)+((l=a[2])!=null?l:0))/2}):{}}function Nv(e,t){let n=sn(e),o=Object.assign(gv(e,n),pv(e,n)),r={},i;["u","d"].forEach(a=>{i=a==="u"?n:Object.values(n).reverse(),["l","r"].forEach(u=>{u==="r"&&(i=i.map(d=>Object.values(d).reverse()));let s=_v(e,i,o,d=>(a==="u"?e.predecessors(d):e.successors(d))||[],t),c=yv(e,i,s.root,s.align,u==="r");u==="r"&&(c=Jn(c,d=>-d)),r[a+u]=c})});let l=bv(e,r);return xv(r,l),Ev(r,e.graph().align)}function Sv(e,t,n){return(o,r,i)=>{let l=o.node(r),a=o.node(i),u=0,s;if(u+=l.width/2,Object.hasOwn(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":s=-l.width/2;break;case"r":s=l.width/2;break}if(s&&(u+=n?s:-s),s=void 0,u+=(l.dummy?t:e)/2,u+=(a.dummy?t:e)/2,u+=a.width/2,Object.hasOwn(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":s=a.width/2;break;case"r":s=-a.width/2;break}return s&&(u+=n?s:-s),u}}function kv(e,t){return e.node(t).width}function oa(e,t,n){var o;if(!n)return!1;let r=(o=t.node(e))==null?void 0:o.edgeObj;if(!r||t.node(e).edgeLabel.reversed)return!1;let i=n.indexOf(r?.v),l=n.indexOf(r?.w);return i!==-1&&l!==-1&&i===(l+1)%n.length||i===(l-1)%n.length}function Cv(e,t){e=Ol(e),$v(e),Object.entries(Nv(e,t)).forEach(([n,o])=>e.node(n).x=o)}function $v(e){let t=sn(e),n=e.graph(),o=n.ranksep,r=n.rankalign,i=0;t.forEach(l=>{let a=l.reduce((u,s)=>{var c;let d=(c=e.node(s).height)!=null?c:0;return u>d?u:d},0);l.forEach(u=>{let s=e.node(u);r==="top"?s.y=i+s.height/2:r==="bottom"?s.y=i+a-s.height/2:s.y=i+a/2}),i+=a+o})}var ra=new WeakMap;function Iv(e,t={}){return la(e,zl,t),e}function ia(e,t,n){let o=t;for(;o!==void 0;){let r=e.parent(o);if(r===n)return o;o=r}}function la(e,t,n){var o;let r=e.nodes().filter(E=>e.children(E).length),i={};r.forEach(E=>{let g=e.node(E);if(g&&g.rankdir){let x=new Ge({multigraph:!0,compound:!0});x.setGraph({rankdir:g.rankdir});let O=e.children(E);O.forEach(m=>{let M={...e.node(m)};x.setNode(m,M);let k=e.parent(m);k&&k!==E&&O.includes(k)&&x.setParent(m,k)});let B=new Set;e.edges().forEach(m=>{let M=ia(e,m.v,E),k=ia(e,m.w,E);if(M&&k&&M!==k){let z=`${M}\0${k}`;B.has(z)||(B.add(z),x.setEdge(M,k,{...e.edge(m)}))}}),la(x,t,n);let G=ca(x);aa(G,t,n,null),sa(x,G);let T=1/0,j=1/0,X=-1/0,P=-1/0;x.nodes().forEach(m=>{if(m===E)return;let M=x.node(m);M&&typeof M.x=="number"&&typeof M.y=="number"&&typeof M.width=="number"&&typeof M.height=="number"&&(T=Math.min(T,M.x-M.width/2),X=Math.max(X,M.x+M.width/2),j=Math.min(j,M.y-M.height/2),P=Math.max(P,M.y+M.height/2))}),(!isFinite(T)||!isFinite(j)||!isFinite(X)||!isFinite(P))&&(T=j=0,X=P=0);let S=X-T,Y=P-j;i[E]={minX:T,minY:j,maxX:X,maxY:P,width:S,height:Y,offsetX:T,offsetY:j},g._dagreClusterSubgraph=x}});let l=[],a=E=>{let g=[],x=(e.children(E)||[]).filter(O=>O!==E);for(;x.length>0;){let O=x.shift();g.push(O),(e.children(O)||[]).filter(B=>B!==O).forEach(B=>x.push(B))}return g},u=new Map;r.forEach(E=>{let g=e.node(E);g&&g.rankdir&&i[E]&&u.set(E,(e.children(E)||[]).filter(x=>x!==E))});let s=new Set([...u.values()].flat()),c=new Map;u.forEach((E,g)=>{s.has(g)||c.set(g,a(g))});let d=new Set([...c.values()].flat()),f=E=>{for(let[g,x]of c)if(x.includes(E))return g;return E},h=[];e.edges().forEach(E=>{(d.has(E.v)||d.has(E.w))&&h.push({edge:E,label:e.edge(E)})});let v=new Map;d.forEach(E=>{let g=e.parent(E);v.set(E,typeof g=="string"?g:void 0)}),c.forEach((E,g)=>{let x=e.node(g),O=[];E.forEach(T=>{let j=e.node(T);j&&(O.push({id:T,node:j,parent:v.get(T)}),e.removeNode(T))});let B=h.filter(({edge:T})=>E.includes(T.v)||E.includes(T.w)),G=i[g];x&&(l.push({clusterId:g,subgraph:x._dagreClusterSubgraph,bounds:G,children:E,removedNodes:O,removedEdges:B}),x.width=G.width,x.height=G.height)});let y=new Set;h.forEach(({edge:E,label:g})=>{let x=f(E.v),O=f(E.w);if(x!==O&&e.hasNode(x)&&e.hasNode(O)){let B=`${x}\0${O}`;y.has(B)||(y.add(B),e.setEdge(x,O,{...g,width:0,height:0}))}});let b=ca(e),w=aa(b,t,n,(o=ra.get(e))!=null?o:null);ra.set(e,w),sa(e,b),y.forEach(E=>{let g=E.indexOf("\0"),x=E.slice(0,g),O=E.slice(g+1);e.hasEdge(x,O)&&e.removeEdge(x,O)}),l.forEach(({clusterId:E,subgraph:g,bounds:x,removedNodes:O,removedEdges:B})=>{var G,T;let j=e.node(E),X=(G=j?.x)!=null?G:0,P=(T=j?.y)!=null?T:0,S=(x.minX+x.maxX)/2,Y=(x.minY+x.maxY)/2;O.forEach(({id:m,node:M,parent:k})=>{e.setNode(m,M),k!==void 0&&e.setParent(m,k)}),B.forEach(({edge:m,label:M})=>{e.setEdge(m,M)}),g.nodes().forEach(m=>{if(m===E)return;let M=g.node(m),k=e.node(m);k&&M&&typeof M.x=="number"&&typeof M.y=="number"&&(k.x=X+(M.x-S),k.y=P+(M.y-Y))}),delete j._dagreClusterSubgraph}),r.forEach(E=>{var g,x;let O=e.node(E),B=i[E];if(O&&O.rankdir&&O._dagreClusterSubgraph&&B){let G=O._dagreClusterSubgraph,T=(g=O.x)!=null?g:0,j=(x=O.y)!=null?x:0,X=(B.minX+B.maxX)/2,P=(B.minY+B.maxY)/2;G.nodes().forEach(S=>{if(S===E)return;let Y=G.node(S),m=e.node(S);if(m&&Y&&typeof Y.x=="number"&&typeof Y.y=="number"){let M=Y.x-X,k=Y.y-P;m.x=T+M,m.y=j+k}}),delete O._dagreClusterSubgraph}})}function aa(e,t,n,o=null){var r,i;let l=n?.useDynamic!==!1,a=l&&(r=o?.graph)!=null?r:null,u=l&&(i=o?.rawNodes)!=null?i:null;t(" makeSpaceForEdgeLabels",()=>Rv(e)),t(" removeSelfEdges",()=>Xv(e)),t(" acyclic",()=>_p(e,a)),t(" nestingGraph.run",()=>Yp(e)),t(" rank",()=>Ap(Ol(e))),t(" injectEdgeLabelProxies",()=>Bv(e)),t(" removeEmptyRanks",()=>op(e)),t(" nestingGraph.cleanup",()=>Xp(e)),t(" normalizeRanks",()=>np(e)),t(" assignRankMinMax",()=>Vv(e)),t(" removeEdgeLabelProxies",()=>Lv(e)),t(" normalize.run",()=>xp(e)),t(" parentDummyChains",()=>Vp(e)),t(" addBorderSegments",()=>Up(e)),t(" order",()=>Ql(e,n,u)),t(" insertSelfEdges",()=>Uv(e)),t(" adjustCoordinateSystem",()=>Zp(e)),t(" position",()=>Cv(e,n.corePath)),t(" positionSelfEdges",()=>Wv(e));let s=JSON.parse(JSON.stringify(e._nodes));return t(" removeBorderNodes",()=>jv(e)),t(" normalize.undo",()=>Np(e)),t(" fixupEdgeLabelCoords",()=>Yv(e)),t(" undoCoordinateSystem",()=>Kp(e)),t(" translateGraph",()=>Hv(e)),t(" assignNodeIntersects",()=>Fv(e)),t(" reversePoints",()=>Gv(e)),t(" acyclic.undo",()=>wp(e)),{graph:e,rawNodes:s}}function sa(e,t){e.nodes().forEach(n=>{let o=e.node(n),r=t.node(n);o&&(o.x=r.x,o.y=r.y,o.order=r.order,o.rank=r.rank,t.children(n).length&&(o.width=r.width,o.height=r.height))}),e.edges().forEach(n=>{let o=e.edge(n),r=t.edge(n);o.points=r.points,Object.hasOwn(r,"x")&&(o.x=r.x,o.y=r.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var Mv=["nodesep","edgesep","ranksep","marginx","marginy"],Ov={ranksep:50,edgesep:20,nodesep:50,rankdir:"TB",rankalign:"center"},Dv=["acyclicer","ranker","rankdir","align","rankalign"],Tv=["width","height","rank"],ua={width:0,height:0},Pv=["minlen","weight","width","height","labeloffset"],Av={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},zv=["labelpos"];function ca(e){let t=new Ge({multigraph:!0,compound:!0}),n=tr(e.graph());return t.setGraph(Object.assign({},Ov,er(n,Mv),qn(n,Dv))),e.nodes().forEach(o=>{let r=tr(e.node(o)),i=er(r,Tv);Object.keys(ua).forEach(a=>{i[a]===void 0&&(i[a]=ua[a])}),t.setNode(o,i);let l=e.parent(o);l!==void 0&&t.setParent(o,l)}),e.edges().forEach(o=>{let r=tr(e.edge(o));t.setEdge(o,Object.assign({},Av,er(r,Pv),qn(r,zv)))}),t}function Rv(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{var o;let r=e.edge(n);r.minlen*=2,((o=r.labelpos)!=null?o:"r").toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function Bv(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let o=e.node(t.v),r={rank:(e.node(t.w).rank-o.rank)/2+o.rank,e:t};At(e,"edge-proxy",r,"_ep")}})}function Vv(e){let t=0;e.nodes().forEach(n=>{let o=e.node(n);o.borderTop&&(o.minRank=e.node(o.borderTop).rank,o.maxRank=e.node(o.borderBottom).rank,t=Math.max(t,o.maxRank))}),e.graph().maxRank=t}function Lv(e){e.nodes().forEach(t=>{let n=e.node(t);if(n.dummy==="edge-proxy"){let o=n;e.edge(o.e).labelRank=n.rank,e.removeNode(t)}})}function Hv(e){let t=Number.POSITIVE_INFINITY,n=0,o=Number.POSITIVE_INFINITY,r=0,i=e.graph(),l=i.marginx||0,a=i.marginy||0;function u(s){let c=s.x,d=s.y,f=s.width,h=s.height;t=Math.min(t,c-f/2),n=Math.max(n,c+f/2),o=Math.min(o,d-h/2),r=Math.max(r,d+h/2)}e.nodes().forEach(s=>u(e.node(s))),e.edges().forEach(s=>{let c=e.edge(s);Object.hasOwn(c,"x")&&u(c)}),t-=l,o-=a,e.nodes().forEach(s=>{let c=e.node(s);c.x-=t,c.y-=o}),e.edges().forEach(s=>{let c=e.edge(s);c.points.forEach(d=>{d.x-=t,d.y-=o}),Object.hasOwn(c,"x")&&(c.x-=t),Object.hasOwn(c,"y")&&(c.y-=o)}),i.width=n-t+l,i.height=r-o+a}function Fv(e){e.edges().forEach(t=>{if(t.v===t.w)return;let n=e.edge(t),o=e.node(t.v),r=e.node(t.w),i,l;n.points?(i=n.points[0],l=n.points[n.points.length-1]):(n.points=[],i=r,l=o),n.points.unshift(Dl(o,i)),n.points.push(Dl(r,l))})}function Yv(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,"x"))switch((n.labelpos==="l"||n.labelpos==="r")&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}})}function Gv(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function jv(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),o=e.node(n.borderTop),r=e.node(n.borderBottom),i=e.node(n.borderLeft[n.borderLeft.length-1]),l=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(l.x-i.x),n.height=Math.abs(r.y-o.y),n.x=i.x+n.width/2,n.y=o.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy==="border"&&e.removeNode(t)})}function Xv(e){e.edges().forEach(t=>{if(t.v===t.w){let n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function Uv(e){sn(e).forEach(t=>{let n=0;t.forEach((o,r)=>{let i=e.node(o);typeof i.rank!="number"&&(i.rank=0),i.order=r+n,(i.selfEdges||[]).forEach(l=>{At(e,"selfedge",{width:l.label.width,height:l.label.height,rank:i.rank,order:r+ ++n,e:l.e,edgeLabel:l.label},"_se"),(!Array.isArray(l.label.points)||l.label.points.length!==7)&&(l.label.points=[{x:0,y:-10},{x:0,y:-10},{x:0,y:0},{x:0,y:10},{x:0,y:10},{x:0,y:0},{x:0,y:0}])}),delete i.selfEdges})})}function Wv(e){e.nodes().forEach(t=>{let n=e.node(t),o=r=>typeof r=="number"&&isFinite(r);if(n.dummy==="selfedge"){let r=n,i=e.node(r.e.v),l=o(i?.x)?i.x:0,a=o(i?.y)?i.y:0,u=o(i?.width)?i.width:0,s=o(i?.height)?i.height:0,c=o(n.x)?n.x:l,d=o(n.y)?n.y:a,f=u/2,h=s/2;r.edgeLabel.points=[{x:c+f,y:d-h},{x:c+f,y:d-h},{x:c,y:d},{x:c-f,y:d+h},{x:c-f,y:d+h},{x:c,y:d},{x:c,y:d}],r.edgeLabel.x=c,r.edgeLabel.y=d,e.setEdge(r.e,r.edgeLabel),e.removeNode(t)}else n&&Array.isArray(n.selfEdges)&&n.selfEdges.forEach(r=>{if(!Array.isArray(r.label.points)||r.label.points.length!==7){let i=o(n.x)?n.x:0,l=o(n.y)?n.y:0,a=o(n.width)?n.width:0,u=o(n.height)?n.height:0,s=a/2,c=u/2;r.label.points=[{x:i+s,y:l-c},{x:i+s,y:l-c},{x:i,y:l},{x:i-s,y:l+c},{x:i-s,y:l+c},{x:i,y:l},{x:i,y:l}]}})})}function er(e,t){return Jn(qn(e,t),Number)}function tr(e){let t={};return e&&Object.entries(e).forEach(([n,o])=>{typeof n=="string"&&(n=n.toLowerCase()),t[n]=o}),t}function Zv(e){let t=sn(e),n=new Ge({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(o=>{n.setNode(o,{label:o}),n.setParent(o,"layer"+e.node(o).rank)}),e.edges().forEach(o=>n.setEdge(o.v,o.w,{},o.name)),t.forEach((o,r)=>{let i="layer"+r;n.setNode(i,{rank:"same"}),o.reduce((l,a)=>(n.setEdge(l,a,{style:"invis"}),a))}),n}var Kv={graphlib:bl,version:up,layout:Iv,debug:Zv,util:{time:lp,notime:zl}},nr=Kv;function qv(){const{findNode:e}=Se(),t=ye(new nr.graphlib.Graph),n=ye("LR");function o(r,i,l){const a=new nr.graphlib.Graph;t.value=a,a.setDefaultEdgeLabel(()=>({}));const u=l==="LR";a.setGraph({rankdir:l}),n.value=l;for(const s of r){if(s.parentNode)continue;const c=e(s.id);c&&a.setNode(s.id,{width:c.dimensions.width,height:c.dimensions.height})}for(const s of i)a.setEdge(s.source,s.target);return a.graph().ranksep=200,nr.layout(a),r.map(s=>{const c=a.node(s.id);return c?{...s,targetPosition:u?re.Left:re.Top,sourcePosition:u?re.Right:re.Bottom,position:{x:c.x-c.width/2,y:c.y-c.height/2}}:s})}return{graph:t,layout:o,previousDirection:n}}const Jv={class:"interface-flow-chart"},Qv={class:"docs-overlay"},em={href:"/tools/staticdocs/docs/tools/cmd-tlm-server#data-flows-tab",target:"_blank",class:"docs-link"},tm={key:1,class:"empty-state"},nm=50,da=50,om=10,rm=6.5,im=40,lm=60,am=98,sm=148,eo=212,jm=fa("_",{__name:"InterfaceFlowChart",props:{interfaceDetails:{type:Object,default:()=>({})},routerDetails:{type:Object,default:()=>({})}},setup(e){const{layout:t}=qv(),{onConnect:n,addEdges:o,onNodesChange:r,applyNodeChanges:i,onEdgesChange:l,applyEdgeChanges:a,fitView:u,findNode:s,getViewport:c,setViewport:d}=Se(),f=it("dialog"),h=new vr,v=e,y=tg(h),b=ye([]),w=ye([]);let E=!1,g=!1;function x(C,D=!1){(E||D)&&(b.value=t(b.value,w.value,C),E=!1,g=!1,ze(()=>{u()}))}n(C=>{let D=C.source.startsWith("interface__"),A=C.target.startsWith("interface__"),L=C.source.startsWith("router__"),V=C.target.startsWith("router__"),ne=C.source.startsWith("cosmos__"),le=C.target.startsWith("cosmos__"),H=C.source.startsWith("target__"),W=C.target.startsWith("target__"),ie=C.sourceHandle.split("__")[1],R=C.targetHandle.split("__")[1];if(ie!==R||D&&A||L&&V||L&&A||D&&V||ne&&le||H&&W||ne&&W||H&&le)return;let F="";ne&&(F=F+`cosmos__${C.source.split("__")[1]}`),le&&(F=F+`cosmos__${C.target.split("__")[1]}`),F.length==0&&(D&&(F=F+`interface__${C.source.split("__")[1]}`),A&&(F=F+`interface__${C.target.split("__")[1]}`),L&&(F=F+`router__${C.source.split("__")[1]}`),V&&(F=F+`router__${C.target.split("__")[1]}`)),F.startsWith("cosmos__")&&(D&&(F=F+`__interface__${C.source.split("__")[1]}`),A&&(F=F+`__interface__${C.target.split("__")[1]}`),L&&(F=F+`__router__${C.source.split("__")[1]}`),V&&(F=F+`__router__${C.target.split("__")[1]}`)),H&&(F=F+`__target__${C.source.split("__")[1]}`),W&&(F=F+`__target__${C.target.split("__")[1]}`),F=F+`__${ie}`,C.id=F;let oe=!1;if(w.value.forEach(I=>{I.id===F&&(oe=!0)}),oe)return;let U="",Z="",ae="",_=F.split("__"),p=_[0],N=_[4];p==="cosmos"?(Z=_[1],U=_[2],ae=_[3],N=="cmd"?(C.type="default",C.label="CMD Enable",C.markerStart={type:"arrowclosed"}):(C.type="default",C.label="Tlm Enable",C.markerEnd={type:"arrowclosed"}),U==="interface"?h.interface_target_enable(ae,Z,N==="cmd",N==="tlm").then(I=>{o(C),w.value.push(C)}):h.router_target_enable(ae,Z,N==="cmd",N==="tlm").then(I=>{o(C),w.value.push(C)})):(U=_[0],ae=_[1],Z=_[3],N=="cmd"?(C.type="default",C.label="CMD Map",C.markerStart={type:"arrowclosed"}):(C.type="default",C.label="Tlm Map",C.markerEnd={type:"arrowclosed"}),U==="interface"?f.confirm(`${C.label} target ${Z} to interface ${ae}? Note this will cause the interface to restart.`,{okText:"Map",cancelText:"Cancel"}).then(()=>{h.map_target_to_interface(Z,ae,N==="cmd",N==="tlm",!1).then(I=>{o(C),w.value.push(C)})}):f.confirm(`${C.label} target ${Z} to router ${ae}? Note this will cause the router to restart.`,{okText:"Map",cancelText:"Cancel"}).then(()=>{h.map_target_to_router(Z,ae,N==="cmd",N==="tlm",!1).then(()=>{o(C),w.value.push(C)})}))}),r(C=>{const D=[];for(const A of C)A.type!=="remove"&&D.push(A),A.type==="dimensions"&&g&&(E=!0,ze(()=>{x("LR")}));i(D)}),l(C=>{const D=[];for(const A of C)if(A.type!=="remove")D.push(A);else{let L="",V="",ne="",le="",H="",W=A.id.split("__"),ie=W[0],R=W[4];ie==="cosmos"?(ne=W[1],le=W[2],H=W[3],L=`Disable ${ne} ${R} with ${le} ${H}?`,V="Disable"):(le=W[0],H=W[1],ne=W[3],L=`Unmap ${ne} ${R} with ${le} ${H}? Note this will cause the ${le} to restart.`,V="Unmap"),f.confirm(L,{okText:V,cancelText:"Cancel"}).then(()=>{ie=="cosmos"?le=="interface"?h.interface_target_disable(H,ne,R==="cmd",R==="tlm").then(()=>{a([A]),w.value.forEach((F,oe)=>{F.id===A.id&&w.value.splice(oe,1)})}):h.router_target_disable(H,ne,R==="cmd",R==="tlm").then(()=>{a([A]),w.value.forEach((F,oe)=>{F.id===A.id&&w.value.splice(oe,1)})}):le=="interface"?h.unmap_target_from_interface(ne,H,R==="cmd",R==="tlm").then(()=>{a([A]),w.value.forEach((F,oe)=>{F.id===A.id&&w.value.splice(oe,1)})}):h.unmap_target_from_router(ne,H,R==="cmd",R==="tlm").then(()=>{a([A]),w.value.forEach((F,oe)=>{F.id===A.id&&w.value.splice(oe,1)})})})}a(D)});function O(C,D=!1){const A=C.map((V,ne)=>{let le=V.name;le.slice(-8)==="Protocol"&&(le=le.slice(0,-8));const H=Math.ceil(Math.max(lm,im+le.length*rm));return{label:le,width:H,index:ne}});D&&A.reverse();let L=nm;return A.forEach(V=>{V.x=L,L+=V.width+om}),A}function B(C){if(C.length===0)return 0;const D=C[C.length-1];return D.x+D.width}function G(C){const D=O(C.write_protocols||[]),A=O(C.read_protocols||[],!0),L=Math.max(200,B(D)+da,B(A)+da);return{writeRow:D,readRow:A,width:L}}function T(C,D,A){[{type:"write-protocol",row:A.writeRow,y:am},{type:"read-protocol",row:A.readRow,y:sm}].forEach(({type:V,row:ne,y:le})=>{ne.forEach(H=>{b.value.push({id:`${V}__${C}__${D}__${H.index}`,type:V,position:{x:H.x,y:le},data:{index:H.index,[C]:D,label:H.label,width:H.width},draggable:!1,parentNode:`${C}__${D}`,extent:"parent"})})})}const j=ye(!1),X=ye(null),P=ye(null),S=ye(null),Y=ye(null),m=ye(!1),M=ye("");function k(C){C.node.type==="cosmos"?(M.value=C.node.data.label,m.value=!0):C.node.type==="interface"?(X.value="Interface",P.value=v.interfaceDetails[C.node.data.label],S.value=null,Y.value=null,j.value=!0):C.node.type=="router"?(X.value="Router",P.value=v.routerDetails[C.node.data.label],S.value=null,Y.value=null,j.value=!0):(C.node.type==="read-protocol"||C.node.type=="write-protocol")&&(C.node.data.interface?(X.value="Interface",P.value=v.interfaceDetails[C.node.data.interface]):(X.value="Router",P.value=v.routerDetails[C.node.data.router]),C.node.type==="write-protocol"?(S.value=C.node.data.index,Y.value=null):(S.value=null,Y.value=C.node.data.index),j.value=!0)}function z(){const C=new Set(b.value.map(R=>R.id)),D=new Map,A=C.size>0?c():null;b.value.forEach(R=>{const F=s(R.id);F&&D.set(R.id,{x:F.position.x,y:F.position.y})}),b.value=[],w.value=[];const L=[];let V=v.interfaceDetails||{};for(const R in V){(v.interfaceDetails[R].cmd_target_names||[]).forEach(U=>{L.includes(U)||L.push(U);const Z={id:`interface__${R}__target__${U}__cmd`,source:`interface__${R}`,target:`target__${U}`,sourceHandle:"interface__cmd__output",targetHandle:"target__cmd",type:"default",label:"CMD Map",markerEnd:{type:"arrowclosed"}};w.value.push(Z)});for(const[U,Z]of Object.entries(v.interfaceDetails[R].cmd_target_enabled)){if(U==="UNKNOWN"||!Z)continue;const ae={id:`cosmos__${U}__interface__${R}__cmd`,target:`interface__${R}`,source:`cosmos__${U}`,sourceHandle:"cosmos__cmd",targetHandle:"interface__cmd__input",type:"default",label:"CMD Enable",markerEnd:{type:"arrowclosed"}};w.value.push(ae)}(v.interfaceDetails[R].tlm_target_names||[]).forEach(U=>{L.includes(U)||L.push(U);const Z={id:`interface__${R}__target__${U}__tlm`,source:`interface__${R}`,target:`target__${U}`,sourceHandle:"interface__tlm__output",targetHandle:"target__tlm",type:"default",label:"TLM Map",markerStart:{type:"arrowclosed"}};w.value.push(Z)});for(const[U,Z]of Object.entries(v.interfaceDetails[R].tlm_target_enabled)){if(U==="UNKNOWN"||!Z)continue;const ae={id:`cosmos__${U}__interface__${R}__tlm`,target:`interface__${R}`,source:`cosmos__${U}`,sourceHandle:"cosmos__tlm",targetHandle:"interface__tlm__input",type:"default",label:"TLM Enable",markerStart:{type:"arrowclosed"}};w.value.push(ae)}}let ne=v.routerDetails||{};for(const R in ne){(v.routerDetails[R].cmd_target_names||[]).forEach(U=>{L.includes(U)||L.push(U);const Z={id:`router__${R}__target__${U}__cmd`,source:`router__${R}`,target:`target__${U}`,sourceHandle:"router__cmd__output",targetHandle:"target__cmd",type:"default",label:"CMD Map",markerEnd:{type:"arrowclosed"}};w.value.push(Z)});for(const[U,Z]of Object.entries(v.routerDetails[R].cmd_target_enabled)){if(U==="UNKNOWN"||!Z)continue;const ae={id:`cosmos__${U}__router__${R}__cmd`,target:`router__${R}`,source:`cosmos__${U}`,sourceHandle:"cosmos__cmd",targetHandle:"router__cmd__input",type:"default",label:"CMD Enable",markerEnd:{type:"arrowclosed"}};w.value.push(ae)}(v.routerDetails[R].tlm_target_names||[]).forEach(U=>{L.includes(U)||L.push(U);const Z={id:`router__${R}__target__${U}__tlm`,source:`router__${R}`,target:`target__${U}`,sourceHandle:"router__tlm__output",targetHandle:"target__tlm",type:"default",label:"TLM Map",markerStart:{type:"arrowclosed"}};w.value.push(Z)});for(const[U,Z]of Object.entries(v.routerDetails[R].tlm_target_enabled)){if(U==="UNKNOWN"||!Z)continue;const ae={id:`cosmos__${U}__router__${R}__tlm`,target:`router__${R}`,source:`cosmos__${U}`,sourceHandle:"cosmos__tlm",targetHandle:"router__tlm__input",type:"default",label:"TLM Enable",markerStart:{type:"arrowclosed"}};w.value.push(ae)}}L.forEach((R,F)=>{let oe,U;oe=0,U=F*(eo+50);const Z={id:`cosmos__${R}`,type:"cosmos",position:{x:oe,y:U},data:{label:R},draggable:!0};b.value.push(Z)});let le=0,H=200;for(const R in V){const F=G(v.interfaceDetails[R]);F.width>H&&(H=F.width);const oe=eo,U={id:`interface__${R}`,type:"interface",position:{x:400,y:(oe+50)*le},data:{label:R,width:F.width,height:oe},draggable:!0};b.value.push(U),le+=1,T("interface",R,F)}for(const R in ne){const F=G(v.routerDetails[R]);F.width>H&&(H=F.width);const oe=eo,U={id:`router__${R}`,type:"router",position:{x:400,y:(oe+50)*le},data:{label:R,width:F.width,height:oe},draggable:!0};b.value.push(U),le+=1,T("router",R,F)}L.forEach((R,F)=>{let oe,U;oe=400+H+200,U=F*(eo+50);const Z={id:`target__${R}`,type:"target",position:{x:oe,y:U},data:{label:R},draggable:!0};b.value.push(Z)});const W=new Set(b.value.map(R=>R.id));C.size===0||C.size!==W.size||[...W].some(R=>!C.has(R))||[...C].some(R=>!W.has(R))?(g=!0,E=!0):g||(b.value=b.value.map(R=>{const F=D.get(R.id);return F?{...R,position:F}:R}),A&&ze(()=>{d(A)}))}return we(()=>v.interfaceDetails,()=>{v.interfaceDetails!==null&&z()},{immediate:!0}),we(()=>v.routerDetails,()=>{v.routerDetails!==null&&z()},{immediate:!0}),(C,D)=>{const A=me("v-icon"),L=me("v-dialog");return Q(),he("div",Jv,[b.value.length>0?(Q(),$e(K(Jf),{key:0,nodes:b.value,edges:w.value,"max-zoom":4,"min-zoom":.01,class:"vue-flow-container","elevate-edges-on-select":"","apply-default":!1,onNodeClick:k},{"node-interface":ge(({data:V})=>[te(lg,{data:V,health:K(y)("interface",V.label),onDetails:ne=>k({node:{type:"interface",data:V}})},null,8,["data","health","onDetails"])]),"node-router":ge(({data:V})=>[te(cg,{data:V,health:K(y)("router",V.label),onDetails:ne=>k({node:{type:"router",data:V}})},null,8,["data","health","onDetails"])]),"node-target":ge(({data:V})=>[te(yg,{data:V},null,8,["data"])]),"node-cosmos":ge(V=>[te(gg,hn(V,{health:K(y)("target",V.data.label),onDetails:ne=>k({node:{type:"cosmos",data:V.data}})}),null,16,["health","onDetails"])]),"node-write-protocol":ge(({data:V})=>[te(Eg,{data:V},null,8,["data"])]),"node-read-protocol":ge(({data:V})=>[te(Cg,{data:V},null,8,["data"])]),default:ge(()=>[te(K(Mh),{"pattern-color":"#aaa",gap:16}),de("div",Qv,[de("a",em,[te(A,{size:"small",class:"mr-1"},{default:ge(()=>[...D[5]||(D[5]=[Me("mdi-file-document-outline",-1)])]),_:1}),D[6]||(D[6]=Me(" Docs ",-1))])]),te(K(Nh),null,{default:ge(()=>[te(K(rn),{title:"Reset",onClick:D[0]||(D[0]=V=>x("LR",!0))},{default:ge(()=>[...D[7]||(D[7]=[de("svg",{width:"16",height:"16",viewBox:"0 0 32 32"},[de("path",{d:"M18 28A12 12 0 1 0 6 16v6.2l-3.6-3.6L1 20l6 6l6-6l-1.4-1.4L8 22.2V16a10 10 0 1 1 10 10Z"})],-1)])]),_:1})]),_:1})]),_:1},8,["nodes","edges"])):(Q(),he("div",tm,[te(A,{size:"large",color:"grey"},{default:ge(()=>[...D[8]||(D[8]=[Me("mdi-lan-disconnect",-1)])]),_:1}),D[9]||(D[9]=de("div",{class:"text-grey mt-2"},"Nothing to show",-1))])),te(L,{modelValue:j.value,"onUpdate:modelValue":D[2]||(D[2]=V=>j.value=V),"max-width":"80vw","max-height":"80vh"},{default:ge(()=>[j.value&&P.value?(Q(),$e(Jh,{key:0,mode:X.value,details:P.value,health:K(y)(X.value.toLowerCase(),P.value.name),"read-protocol-index":Y.value,"write-protocol-index":S.value,onClose:D[1]||(D[1]=V=>j.value=!1)},null,8,["mode","details","health","read-protocol-index","write-protocol-index"])):Ie("",!0)]),_:1},8,["modelValue"]),te(L,{modelValue:m.value,"onUpdate:modelValue":D[4]||(D[4]=V=>m.value=V),"max-width":"1100","max-height":"80vh"},{default:ge(()=>[m.value?(Q(),$e(Qh,{key:0,name:M.value,health:K(y)("target",M.value),onClose:D[3]||(D[3]=V=>m.value=!1)},null,8,["name","health"])):Ie("",!0)]),_:1},8,["modelValue"])])}}})})}}));
|