openc3-cosmos-tool-cmdtlmserver 6.10.1 → 6.10.3
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-Bc-Awsbn-ae1dcbdeb86ad8c866f4.js +2 -0
- data/tools/cmdtlmserver/{ArrayplotWidget-BeSfz3MR-7a56b97ea5bbac39037a.js → ArrayplotWidget-B9UGCr4--b363e0b14a4743f68db1.js} +1 -1
- data/tools/cmdtlmserver/BarColumn-ClLBRGll-d1af11b9b12bef64b4e5.js +1 -0
- data/tools/cmdtlmserver/BlockWidget-CoQp-LZM-824c10a4bf94eef66292.js +2 -0
- data/tools/cmdtlmserver/ButtonWidget-CTTwpFec-22253a1217b7678e5df9.js +2 -0
- data/tools/cmdtlmserver/CanvasWidget-jFarbJ3t-e36b4fa3e251cd49de9f.js +1 -0
- data/tools/cmdtlmserver/CanvasdotWidget-BoyUcwiB-d4e47decc576fde26dee.js +1 -0
- data/tools/cmdtlmserver/CanvasimageWidget-DmyCSnuQ-30f807021fe82fdf584a.js +1 -0
- data/tools/cmdtlmserver/CanvasimagevalueWidget-CmbngMqv-7e1815b1cfb8ae4aa535.js +1 -0
- data/tools/cmdtlmserver/CanvaslabelWidget-D8NzLKqi-6b9c58710c42efe47210.js +1 -0
- data/tools/cmdtlmserver/CanvaslabelvalueWidget-DOybGI9D-a7f4c23044d7b68a2abf.js +1 -0
- data/tools/cmdtlmserver/CanvaslineWidget-D2NEei7j-381bf783b6108ea5fd2b.js +1 -0
- data/tools/cmdtlmserver/CanvaslinevalueWidget-Ctvv9owf-3135f9b96323733582a2.js +1 -0
- data/tools/cmdtlmserver/CheckbuttonWidget-CQeR0BMF-2e10a124b25454137fac.js +1 -0
- data/tools/cmdtlmserver/{CmdPacketsTab-3bf324378cc5053fae84.js → CmdPacketsTab-871ee11f49909b77633f.js} +1 -1
- data/tools/cmdtlmserver/{CmdTlmServer-be8d10fa10641805ff41.js → CmdTlmServer-592451ca763900ae0d6f.js} +1 -1
- data/tools/cmdtlmserver/ComboboxWidget-4N-MagvN-5c6b314508fb29709f51.js +1 -0
- data/tools/cmdtlmserver/{DataFlowsTab-c0d1d592eaacc73a8f92.js → DataFlowsTab-68d7d60b2e813a1aef9d.js} +1 -1
- data/tools/cmdtlmserver/{DateWidget-BpnMzSBn-ea6f5f41e4d0dbc4b7ce.js → DateWidget-rYTjwUdb-7a6fac2d1d3176f2aff7.js} +1 -1
- data/tools/cmdtlmserver/DetailsDialog-p_vutijL-a15357c6a56b9c3eb046.js +1 -0
- data/tools/cmdtlmserver/DynamicWidget-DEHWYr8i-66d6952b19bf3e4146df.js +1 -0
- data/tools/cmdtlmserver/FilechecksumWidget-gcmXxJHl-5dd6f965e71b6312bdf0.js +1 -0
- data/tools/cmdtlmserver/FiledisplayWidget-CqM549A4-39e3b674e56d223c50d2.js +1 -0
- data/tools/cmdtlmserver/FormatvalueWidget-BEwH0C7S-24df4c9acfc97a399c4d.js +1 -0
- data/tools/cmdtlmserver/Graph-CbjlChwf-9eceb21aa4450f944433.js +1 -0
- data/tools/cmdtlmserver/{GraphWidget-CAADBFV--248abfce9cccc4fe88df.js → GraphWidget-CjxnC0Dc-2f2b5a46b97f6fc4aa4a.js} +1 -1
- data/tools/cmdtlmserver/HorizontalWidget-Dt8bkM3k-55ceb75da45dc576a1e1.js +1 -0
- data/tools/cmdtlmserver/HorizontalboxWidget-CdAZ5Sa6-b4641623be26b7b4ebf4.js +1 -0
- data/tools/cmdtlmserver/{HorizontallineWidget-Cu2dDt7k-5245e229a85767e68094.js → HorizontallineWidget-CXZJTeU2-c4665101e178220d8fb8.js} +1 -1
- data/tools/cmdtlmserver/{IframeWidget-BBU3MkSq-f0490f3eef79e1a0521b.js → IframeWidget-CrcWiAVE-7723865cd0e70ac2398e.js} +1 -1
- data/tools/cmdtlmserver/{ImageLoader-XAGgjKkq-e7c973572e5e4bb6f563.js → ImageLoader-DPqax8yu-fa4af996a283fc0843b3.js} +1 -1
- data/tools/cmdtlmserver/ImageviewerWidget-CTEl6iPg-13f0b01ce67eb1a9adb6.js +1 -0
- data/tools/cmdtlmserver/InterfaceFlowChart-ddecdc28c8d4e15abb30.js +27 -0
- data/tools/cmdtlmserver/InterfacesTab-ce1e57198ca5c50cde9a.js +1 -0
- data/tools/cmdtlmserver/{LabelWidget-BsOpolUL-e57548068be4d8479e60.js → LabelWidget-CPqKGMx0-df193aea43edf70a434e.js} +1 -1
- data/tools/cmdtlmserver/LabelledWidget-BHYzRMFd-dfa0ab9c74bcb8df7a66.js +1 -0
- data/tools/cmdtlmserver/LabelprogressbarWidget-D9deeUo7-c940ced74e23eb3112d7.js +1 -0
- data/tools/cmdtlmserver/LabelsparklineWidget-7mYre3CP-a4a10431fc308bb53e5a.js +1 -0
- data/tools/cmdtlmserver/LabelvalueWidget-NLsD60n4-aebbc86767e02a2c47ca.js +1 -0
- data/tools/cmdtlmserver/LabelvaluedescWidget-DXROG4Gs-6387c4b6d1dd6b1af085.js +1 -0
- data/tools/cmdtlmserver/LabelvaluelimitsbarWidget-DqVqHF4W-aa643e9c370afbe56ab1.js +1 -0
- data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-BK6_31pC-99a225c4229453037391.js +1 -0
- data/tools/cmdtlmserver/LabelvaluerangebarWidget-DR7C8gqw-252832e2799a5ae68ab7.js +1 -0
- data/tools/cmdtlmserver/Layout-B_Hgw3gd-d434277ed76372d24e85.js +1 -0
- data/tools/cmdtlmserver/LedWidget-CiAVs2tj-f9bd5d7104db3c1c85cb.js +1 -0
- data/tools/cmdtlmserver/LimitsBar-_UQG-M6e-b707ba94157e770d08ae.js +1 -0
- data/tools/cmdtlmserver/LimitsbarWidget-CIwcOhC8-e1219a584b6815795cd9.js +1 -0
- data/tools/cmdtlmserver/LimitscolorWidget-CGPfJwvT-22ceabbcd0c28dbe80cf.js +1 -0
- data/tools/cmdtlmserver/{LimitscolumnWidget-DSsz36tT-dea3480aa38760f9cdee.js → LimitscolumnWidget-Bj_UPEC8-24eecc165bd4d2cfa5e4.js} +1 -1
- data/tools/cmdtlmserver/{LinegraphWidget-CeBijgDo-67fd1624529512322762.js → LinegraphWidget-DccnHbWa-ea8fa4c009f6c0ade6da.js} +1 -1
- data/tools/cmdtlmserver/MatrixbycolumnsWidget-U_NZ6aW--d59455409c9ca0f31680.js +1 -0
- data/tools/cmdtlmserver/ProgressbarWidget-D4JtVzyk-547a8b3b16596e8b2f0d.js +1 -0
- data/tools/cmdtlmserver/RadiobuttonWidget-BUaW7pRx-30001a75af3c968bf07f.js +1 -0
- data/tools/cmdtlmserver/RadiogroupWidget-NIv4CaUQ-f2b5a26ed6f5ec1b9871.js +1 -0
- data/tools/cmdtlmserver/RangebarWidget-1-CsFpcl-dda553e29dd32ab7de54.js +1 -0
- data/tools/cmdtlmserver/{RawBuffer-cccb79b877d7a7d027ae.js → RawBuffer-5f9994d31fc01670ab0d.js} +4 -4
- data/tools/cmdtlmserver/{RawDialog-ceb6e42c59fe0adfb1ef.js → RawDialog-ac73f0b03e7e706a3297.js} +1 -1
- data/tools/cmdtlmserver/RollupWidget-ChasTJYP-a6daff556a2b9fd6bdd7.js +1 -0
- data/tools/cmdtlmserver/RoutersTab-416cd06115e84634781c.js +1 -0
- data/tools/cmdtlmserver/ScrollwindowWidget-Y2J758y6-ae27b0c1e6d6adf6a87a.js +1 -0
- data/tools/cmdtlmserver/SignalWidget-DFhHDicI-64af896a2569f8ebcafb.js +1 -0
- data/tools/cmdtlmserver/{SpacerWidget-CaWx41K7-24a22551304012ee55af.js → SpacerWidget-D4KojaGb-3d6e2a2ed9777911f848.js} +1 -1
- data/tools/cmdtlmserver/SparklineWidget-DMHFzw8L-a7d791d79f313d5c0b6a.js +1 -0
- data/tools/cmdtlmserver/StatusTab-2d87ad6941b134c4fdbb.js +1 -0
- data/tools/cmdtlmserver/TabbookWidget-NVLYMdFG-37969a0fe5a93dea8990.js +1 -0
- data/tools/cmdtlmserver/TargetsTab-b06ed15105a307a97895.js +1 -0
- data/tools/cmdtlmserver/TextboxWidget-CrMYPQIF-6615ac9260d33ab3ee3b.js +1 -0
- data/tools/cmdtlmserver/TextfieldWidget-DMBQwtnb-b433f36561cf507c040a.js +1 -0
- data/tools/cmdtlmserver/{TimeWidget-BHybAfg8-2a3fdda019ac11ba0234.js → TimeWidget-CWLJZ2bt-da92521adb700939c3b0.js} +1 -1
- data/tools/cmdtlmserver/TitleWidget-V1FGI8l3-baff1e6ac30c4b6c72de.js +1 -0
- data/tools/cmdtlmserver/{TlmPacketsTab-21f2ae12b6b1065ef51d.js → TlmPacketsTab-156eb34fd224d69953bb.js} +1 -1
- data/tools/cmdtlmserver/{VWidget-D06LY-Yc-a61e456754f3a2974de1.js → VWidget-rAFU-0vj-1230bdba7ee2b31d5480.js} +1 -1
- data/tools/cmdtlmserver/ValueWidget-BI3uXmda-cb330a679e04b79554b9.js +1 -0
- data/tools/cmdtlmserver/ValuelimitsbarWidget-BGSJLpw4-3ba6d3857ec33ba4563f.js +1 -0
- data/tools/cmdtlmserver/ValuelimitscolumnWidget-CaNjHy4v-dbbfbd54adabfd9ddd35.js +1 -0
- data/tools/cmdtlmserver/ValuerangebarWidget-Do40-aaL-9aed89a3031278b6c4fb.js +1 -0
- data/tools/cmdtlmserver/VerticalWidget-DZqghqIm-8c27d9ede859db236f36.js +1 -0
- data/tools/cmdtlmserver/VerticalboxWidget-CQ__4FcS-d612fe5932cc106fb65f.js +1 -0
- data/tools/cmdtlmserver/Widget-6-Nvewdp-e7bf8074fba5fca800c3.js +1 -0
- data/tools/cmdtlmserver/{main-14f121a4ebc6fc306ca1.js → main-d31f4fd11a243448b35c.js} +81 -81
- data/tools/cmdtlmserver/main.js +1 -1
- metadata +81 -78
- data/tools/cmdtlmserver/ArrayWidget-DQRQ7dPa-32b61d76530621722572.js +0 -2
- data/tools/cmdtlmserver/BarColumn-BdIaQfOz-c7830367e783872ea1ce.js +0 -1
- data/tools/cmdtlmserver/BlockWidget-DSFKrUxl-95339dcf2952b370f163.js +0 -2
- data/tools/cmdtlmserver/ButtonWidget-CFbjdxSr-bef39130626037620706.js +0 -2
- data/tools/cmdtlmserver/CanvasWidget-BloYxuKE-80969a9c374686934749.js +0 -1
- data/tools/cmdtlmserver/CanvasdotWidget-CZxUOPRd-3a3d48ea53fa059e8f32.js +0 -1
- data/tools/cmdtlmserver/CanvasimageWidget-ULQq3nqZ-909bb80515b48d2e71dc.js +0 -1
- data/tools/cmdtlmserver/CanvasimagevalueWidget-jFCVXYhi-5575222a4323c7485dc4.js +0 -1
- data/tools/cmdtlmserver/CanvaslabelWidget-DQhBI1vZ-d87b11e9b31556dd29db.js +0 -1
- data/tools/cmdtlmserver/CanvaslabelvalueWidget-C4REgztL-45da328b78c6bf4b4308.js +0 -1
- data/tools/cmdtlmserver/CanvaslineWidget-S4PCEvZM-28dcb953f20bd7cb4647.js +0 -1
- data/tools/cmdtlmserver/CanvaslinevalueWidget-597khOSA-c652e625ca97dc92da79.js +0 -1
- data/tools/cmdtlmserver/CheckbuttonWidget-BcblKat3-565f8ee1b897988e4048.js +0 -1
- data/tools/cmdtlmserver/ComboboxWidget-BMcHS4g5-f4681e5e15d49b1cba4a.js +0 -1
- data/tools/cmdtlmserver/DetailsDialog-q9piPmHq-1def7fd6a368b27b09aa.js +0 -1
- data/tools/cmdtlmserver/DynamicWidget-DHL7pbgW-14b18524247f48271cbe.js +0 -1
- data/tools/cmdtlmserver/FormatvalueWidget-Cm-HmAmw-1d77547c65f83327b6c3.js +0 -1
- data/tools/cmdtlmserver/Graph-BEodMaxQ-b8114e2d242d3a9fe54f.js +0 -1
- data/tools/cmdtlmserver/HorizontalWidget-NcXIXxh7-e8667359d77d3e87a063.js +0 -1
- data/tools/cmdtlmserver/HorizontalboxWidget-CW9XX4uH-371c9dbe917b9ab51374.js +0 -1
- data/tools/cmdtlmserver/ImageviewerWidget-UByjeO63-afef74a37a42e2dc3a28.js +0 -1
- data/tools/cmdtlmserver/InterfaceFlowChart-ce0b0842d428f141fb10.js +0 -27
- data/tools/cmdtlmserver/InterfacesTab-98c7f6a0c9ab234a78f3.js +0 -1
- data/tools/cmdtlmserver/LabelledWidget-DVOGpgZ--e24a9c2bd02eb2608420.js +0 -1
- data/tools/cmdtlmserver/LabelprogressbarWidget-BeE9fDs6-36d8ae7b5fba888b1c23.js +0 -1
- data/tools/cmdtlmserver/LabelsparklineWidget-Bj7trKML-5788b21256972ec598a6.js +0 -1
- data/tools/cmdtlmserver/LabelvalueWidget-Dwqsh5o2-cd58afc0c6f83ccb71d3.js +0 -1
- data/tools/cmdtlmserver/LabelvaluedescWidget-Cfu2vuja-9f4695dbb5f6455fcf9b.js +0 -1
- data/tools/cmdtlmserver/LabelvaluelimitsbarWidget-DYV68AJ_-ee78838496e699dea39b.js +0 -1
- data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-CtaoTixt-2c576192ec2b1596659b.js +0 -1
- data/tools/cmdtlmserver/LabelvaluerangebarWidget-3EaUB6E6-6aba4287a9719284f8dc.js +0 -1
- data/tools/cmdtlmserver/Layout-DNR3xnku-34141297d190f14e00e4.js +0 -1
- data/tools/cmdtlmserver/LedWidget-Gi6GXtrW-d33481b5c5d4329c398b.js +0 -1
- data/tools/cmdtlmserver/LimitsbarWidget-BTZQY9XQ-c70d78a09c0a452573b2.js +0 -1
- data/tools/cmdtlmserver/LimitscolorWidget-CFnmvlrA-5c50083fd95f86412d31.js +0 -1
- data/tools/cmdtlmserver/MatrixbycolumnsWidget-DX9uhjAv-b6dc305f5b8dd8ca4892.js +0 -1
- data/tools/cmdtlmserver/ProgressbarWidget-DJepvOip-b11c1ddffdff5dd4c10a.js +0 -1
- data/tools/cmdtlmserver/RadiobuttonWidget-4e8ROIfg-0c8a9e6bfba2f4950058.js +0 -1
- data/tools/cmdtlmserver/RadiogroupWidget-CUucj6aT-78de49e21a6b13024b64.js +0 -1
- data/tools/cmdtlmserver/RangebarWidget-Bu4rqlrx-2c346709f4b1b35d3774.js +0 -1
- data/tools/cmdtlmserver/RollupWidget-ByLvEEau-bf925f6491999bd4dd94.js +0 -1
- data/tools/cmdtlmserver/RoutersTab-68c87e2a36e938ef4b17.js +0 -1
- data/tools/cmdtlmserver/ScrollwindowWidget-CXJ9QGN1-1a026ea64f3ac2ef355e.js +0 -1
- data/tools/cmdtlmserver/SignalWidget-qvL2YZJA-93a70bc899dfbbbe9453.js +0 -1
- data/tools/cmdtlmserver/SparklineWidget-BkNSRypJ-d51121cdc8b3170fd1f1.js +0 -1
- data/tools/cmdtlmserver/StatusTab-7052917fd7fe7f14ac5e.js +0 -1
- data/tools/cmdtlmserver/TabbookWidget-MsrRG1vn-943cbf258dc72cdee84f.js +0 -1
- data/tools/cmdtlmserver/TargetsTab-47a9d296026df09b1a89.js +0 -1
- data/tools/cmdtlmserver/TextboxWidget-DbwpPVGB-89ca76b61eaea0e8435c.js +0 -1
- data/tools/cmdtlmserver/TextfieldWidget-DzMlTMYW-6f16bba1dca9d85b5427.js +0 -1
- data/tools/cmdtlmserver/TitleWidget-DL_sE5YE-58d46477f1bd2375c0ca.js +0 -1
- data/tools/cmdtlmserver/ValueWidget-CGT0LV_n-36237e7706445829a3cc.js +0 -1
- data/tools/cmdtlmserver/ValuelimitsbarWidget-CmpyPO-1-cd558bce07411aa7ed8c.js +0 -1
- data/tools/cmdtlmserver/ValuelimitscolumnWidget-jzxrQd-f-c6a0c020716b66d054b7.js +0 -1
- data/tools/cmdtlmserver/ValuerangebarWidget-C8ckuAeh-bf46dfa98828cc5d9e02.js +0 -1
- data/tools/cmdtlmserver/VerticalWidget-qN82km_m-4a2d46bca6228142ff35.js +0 -1
- data/tools/cmdtlmserver/VerticalboxWidget-CiJZDlHJ-d3ab89f5451eb45157f0.js +0 -1
- data/tools/cmdtlmserver/Widget-DXvVFSH5-a1f2327db30cd8726e79.js +0 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var Sv=Object.defineProperty;var kv=(ht,rt,_e)=>rt in ht?Sv(ht,rt,{enumerable:!0,configurable:!0,writable:!0,value:_e}):ht[rt]=_e;var Me=(ht,rt,_e)=>kv(ht,typeof rt!="symbol"?rt+"":rt,_e);System.register(["vue","./Updater-71ca8068ee5f6c21c44c.js","./RawBuffer-5f9994d31fc01670ab0d.js","./main-d31f4fd11a243448b35c.js","./services-44f970948da944fde95a.js"],function(ht,rt){"use strict";var _e,Gn,it,Yn,ye,pt,kr,Cr,de,te,Z,se,ke,ge,ce,$r,xe,Ee,fe,Ke,vt,gt,Ir,At,Ae,Mr,Qe,Ve,rn,ze,qn,De,Dr,Oe,Pe,an,Or,Tr,pe,Se,we,Pr,jn,mt,Ye,Rt,Ar,Rr,zr,Br,Vr,at,Lr;return{setters:[re=>{_e=re.defineComponent,Gn=re.getCurrentScope,it=re.inject,Yn=re.effectScope,ye=re.watch,pt=re.provide,kr=re.useSlots,Cr=re.onUnmounted,de=re.createElementBlock,te=re.openBlock,Z=re.unref,se=re.createVNode,ke=re.renderSlot,ge=re.withCtx,ce=re.createElementVNode,$r=re.createPropsRestProxy,xe=re.toRef,Ee=re.ref,fe=re.computed,Ke=re.onMounted,vt=re.normalizeClass,gt=re.getCurrentInstance,Ir=re.reactive,At=re.onScopeDispose,Ae=re.nextTick,Mr=re.onBeforeMount,Qe=re.shallowRef,Ve=re.Fragment,rn=re.renderList,ze=re.normalizeStyle,qn=re.onBeforeUnmount,De=re.createCommentVNode,Dr=re.isMemoSame,Oe=re.createBlock,Pe=re.toDisplayString,an=re.isRef,Or=re.toRefs,Tr=re.customRef,pe=re.toValue,Se=re.resolveComponent,we=re.h,Pr=re.useAttrs,jn=re.mergeProps,mt=re.resolveDynamicComponent,Ye=re.createTextVNode,Rt=re.markRaw,Ar=re.readonly,Rr=re.normalizeProps,zr=re.guardReactiveProps},re=>{Br=re.U},re=>{Vr=re.R},re=>{at=re._},re=>{Lr=re.y}],execute:function(){var re=document.createElement("style");re.textContent=`.details-table[data-v-fdda8d7a]{width:100%;overflow-x:hidden;overflow-y:hidden}.interface-node[data-v-a870651d]{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-a870651d]{font-weight:500;margin:4px 0;font-size:14px;color:#1f2937}.router-node[data-v-55c74126]{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-55c74126]{font-weight:500;margin:4px 0;font-size:14px;color:#1f2937}.cosmos-node[data-v-6332ae7d]{background:#fff;border:2px solid #10b981;border-radius:8px;padding:10px;text-align:center;box-shadow:0 2px 8px #0000001a;height:200px;width:200px}.node-label[data-v-6332ae7d]{font-weight:500;margin:4px 0;font-size:14px;color:#1f2937}.target-node[data-v-1fe9eeb4]{background:#fff;border:2px solid #10b981;border-radius:8px;padding:10px;text-align:center;box-shadow:0 2px 8px #0000001a;height:200px;width:200px}.node-label[data-v-1fe9eeb4]{font-weight:500;margin:4px 0;font-size:14px;color:#1f2937}.write-protocol-node[data-v-027ef719]{background:#fff7ed;border:2px solid #f97316;border-radius:4px;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-027ef719]{font-weight:500;font-size:10px;margin:2px 0;color:#374151}.read-protocol-node[data-v-e3d15e81]{background:#ecfeff;border:2px solid #06b6d4;border-radius:4px;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-e3d15e81]{font-weight:500;font-size:10px;margin:2px 0;color:#374151}.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}.vue-flow__edges path{stroke-width:2}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(re);function zt(e){return Gn()?(At(e),!0):!1}function Je(e){return typeof e=="function"?e():Z(e)}const zs=typeof window<"u"&&typeof document<"u",Bs=e=>typeof e<"u",Vs=Object.prototype.toString,Ls=e=>Vs.call(e)==="[object Object]",Hs=()=>{};function Fs(e,t){function n(...r){return new Promise((o,a)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(o).catch(a)})}return n}const Hr=e=>e();function Gs(e=Hr){const t=Ee(!0);function n(){t.value=!1}function r(){t.value=!0}const o=(...a)=>{t.value&&e(...a)};return{isActive:Ar(t),pause:n,resume:r,eventFilter:o}}function Fr(e,t=!1,n="Timeout"){return new Promise((r,o)=>{setTimeout(t?()=>o(n):r,e)})}function Ys(e,t,n={}){const{eventFilter:r=Hr,...o}=n;return ye(e,Fs(r,t),o)}function kt(e,t,n={}){const{eventFilter:r,...o}=n,{eventFilter:a,pause:i,resume:s,isActive:l}=Gs(r);return{stop:Ys(e,t,{...o,eventFilter:a}),pause:i,resume:s,isActive:l}}function qs(e,t={}){if(!an(e))return Or(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const r in e.value)n[r]=Tr(()=>({get(){return e.value[r]},set(o){var a;if((a=Je(t.replaceRef))!=null?a:!0)if(Array.isArray(e.value)){const s=[...e.value];s[r]=o,e.value=s}else{const s={...e.value,[r]:o};Object.setPrototypeOf(s,Object.getPrototypeOf(e.value)),e.value=s}else e.value[r]=o}}));return n}function Wn(e,t=!1){function n(d,{flush:f="sync",deep:h=!1,timeout:m,throwOnTimeout:w}={}){let v=null;const _=[new Promise(g=>{v=ye(e,E=>{d(E)!==t&&(v==null||v(),g(E))},{flush:f,deep:h,immediate:!0})})];return m!=null&&_.push(Fr(m,w).then(()=>Je(e)).finally(()=>v==null?void 0:v())),Promise.race(_)}function r(d,f){if(!an(d))return n(E=>E===d,f);const{flush:h="sync",deep:m=!1,timeout:w,throwOnTimeout:v}=f??{};let x=null;const g=[new Promise(E=>{x=ye([e,d],([R,z])=>{t!==(R===z)&&(x==null||x(),E(R))},{flush:h,deep:m,immediate:!0})})];return w!=null&&g.push(Fr(w,v).then(()=>Je(e)).finally(()=>(x==null||x(),Je(e)))),Promise.race(g)}function o(d){return n(f=>!!f,d)}function a(d){return r(null,d)}function i(d){return r(void 0,d)}function s(d){return n(Number.isNaN,d)}function l(d,f){return n(h=>{const m=Array.from(h);return m.includes(d)||m.includes(Je(d))},f)}function c(d){return u(1,d)}function u(d=1,f){let h=-1;return n(()=>(h+=1,h>=d),f)}return Array.isArray(Je(e))?{toMatch:n,toContains:l,changed:c,changedTimes:u,get not(){return Wn(e,!t)}}:{toMatch:n,toBe:r,toBeTruthy:o,toBeNull:a,toBeNaN:s,toBeUndefined:i,changed:c,changedTimes:u,get not(){return Wn(e,!t)}}}function Xn(e){return Wn(e)}function js(e){var t;const n=Je(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Gr=zs?window:void 0;function Yr(...e){let t,n,r,o;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,o]=e,t=Gr):[t,n,r,o]=e,!t)return Hs;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const a=[],i=()=>{a.forEach(u=>u()),a.length=0},s=(u,d,f,h)=>(u.addEventListener(d,f,h),()=>u.removeEventListener(d,f,h)),l=ye(()=>[js(t),Je(o)],([u,d])=>{if(i(),!u)return;const f=Ls(d)?{...d}:d;a.push(...n.flatMap(h=>r.map(m=>s(u,h,m,f))))},{immediate:!0,flush:"post"}),c=()=>{l(),i()};return zt(c),c}function Ws(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function qr(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:o=Gr,eventName:a="keydown",passive:i=!1,dedupe:s=!1}=r,l=Ws(t);return Yr(o,a,u=>{u.repeat&&Je(s)||l(u)&&n(u)},i)}function Xs(e){return JSON.parse(JSON.stringify(e))}function Un(e,t,n,r={}){var o,a,i;const{clone:s=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:d,shouldEmit:f}=r,h=gt(),m=n||(h==null?void 0:h.emit)||((o=h==null?void 0:h.$emit)==null?void 0:o.bind(h))||((i=(a=h==null?void 0:h.proxy)==null?void 0:a.$emit)==null?void 0:i.bind(h==null?void 0:h.proxy));let w=c;t||(t="modelValue"),w=w||`update:${t.toString()}`;const v=g=>s?typeof s=="function"?s(g):Xs(g):g,x=()=>Bs(e[t])?v(e[t]):d,_=g=>{f?f(g)&&m(w,g):m(w,g)};if(l){const g=x(),E=Ee(g);let R=!1;return ye(()=>e[t],z=>{R||(R=!0,E.value=v(z),Ae(()=>R=!1))}),ye(E,z=>{!R&&(z!==e[t]||u)&&_(z)},{deep:u}),E}else return fe({get(){return x()},set(g){_(g)}})}var Us={value:()=>{}};function sn(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new ln(n)}function ln(e){this._=e}function Zs(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}ln.prototype=sn.prototype={constructor:ln,on:function(e,t){var n=this._,r=Zs(e+"",n),o,a=-1,i=r.length;if(arguments.length<2){for(;++a<i;)if((o=(e=r[a]).type)&&(o=Ks(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<i;)if(o=(e=r[a]).type)n[o]=jr(n[o],e.name,t);else if(t==null)for(o in n)n[o]=jr(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new ln(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,a;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],r=0,o=a.length;r<o;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,a=r.length;o<a;++o)r[o].value.apply(t,n)}};function Ks(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function jr(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=Us,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Zn="http://www.w3.org/1999/xhtml";const Wr={svg:"http://www.w3.org/2000/svg",xhtml:Zn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function un(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Wr.hasOwnProperty(t)?{space:Wr[t],local:e}:e}function Qs(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Zn&&t.documentElement.namespaceURI===Zn?t.createElement(e):t.createElementNS(n,e)}}function Js(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Xr(e){var t=un(e);return(t.local?Js:Qs)(t)}function el(){}function Kn(e){return e==null?el:function(){return this.querySelector(e)}}function tl(e){typeof e!="function"&&(e=Kn(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var a=t[o],i=a.length,s=r[o]=new Array(i),l,c,u=0;u<i;++u)(l=a[u])&&(c=e.call(l,l.__data__,u,a))&&("__data__"in l&&(c.__data__=l.__data__),s[u]=c);return new Be(r,this._parents)}function nl(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function ol(){return[]}function Ur(e){return e==null?ol:function(){return this.querySelectorAll(e)}}function rl(e){return function(){return nl(e.apply(this,arguments))}}function il(e){typeof e=="function"?e=rl(e):e=Ur(e);for(var t=this._groups,n=t.length,r=[],o=[],a=0;a<n;++a)for(var i=t[a],s=i.length,l,c=0;c<s;++c)(l=i[c])&&(r.push(e.call(l,l.__data__,c,i)),o.push(l));return new Be(r,o)}function Zr(e){return function(){return this.matches(e)}}function Kr(e){return function(t){return t.matches(e)}}var al=Array.prototype.find;function sl(e){return function(){return al.call(this.children,e)}}function ll(){return this.firstElementChild}function ul(e){return this.select(e==null?ll:sl(typeof e=="function"?e:Kr(e)))}var cl=Array.prototype.filter;function dl(){return Array.from(this.children)}function fl(e){return function(){return cl.call(this.children,e)}}function hl(e){return this.selectAll(e==null?dl:fl(typeof e=="function"?e:Kr(e)))}function pl(e){typeof e!="function"&&(e=Zr(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var a=t[o],i=a.length,s=r[o]=[],l,c=0;c<i;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&s.push(l);return new Be(r,this._parents)}function Qr(e){return new Array(e.length)}function vl(){return new Be(this._enter||this._groups.map(Qr),this._parents)}function cn(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}cn.prototype={constructor:cn,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 gl(e){return function(){return e}}function ml(e,t,n,r,o,a){for(var i=0,s,l=t.length,c=a.length;i<c;++i)(s=t[i])?(s.__data__=a[i],r[i]=s):n[i]=new cn(e,a[i]);for(;i<l;++i)(s=t[i])&&(o[i]=s)}function _l(e,t,n,r,o,a,i){var s,l,c=new Map,u=t.length,d=a.length,f=new Array(u),h;for(s=0;s<u;++s)(l=t[s])&&(f[s]=h=i.call(l,l.__data__,s,t)+"",c.has(h)?o[s]=l:c.set(h,l));for(s=0;s<d;++s)h=i.call(e,a[s],s,a)+"",(l=c.get(h))?(r[s]=l,l.__data__=a[s],c.delete(h)):n[s]=new cn(e,a[s]);for(s=0;s<u;++s)(l=t[s])&&c.get(f[s])===l&&(o[s]=l)}function yl(e){return e.__data__}function wl(e,t){if(!arguments.length)return Array.from(this,yl);var n=t?_l:ml,r=this._parents,o=this._groups;typeof e!="function"&&(e=gl(e));for(var a=o.length,i=new Array(a),s=new Array(a),l=new Array(a),c=0;c<a;++c){var u=r[c],d=o[c],f=d.length,h=bl(e.call(u,u&&u.__data__,c,r)),m=h.length,w=s[c]=new Array(m),v=i[c]=new Array(m),x=l[c]=new Array(f);n(u,d,w,v,x,h,t);for(var _=0,g=0,E,R;_<m;++_)if(E=w[_]){for(_>=g&&(g=_+1);!(R=v[g])&&++g<m;);E._next=R||null}}return i=new Be(i,r),i._enter=s,i._exit=l,i}function bl(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function xl(){return new Be(this._exit||this._groups.map(Qr),this._parents)}function El(e,t,n){var r=this.enter(),o=this,a=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?a.remove():n(a),r&&o?r.merge(o).order():o}function Nl(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,a=r.length,i=Math.min(o,a),s=new Array(o),l=0;l<i;++l)for(var c=n[l],u=r[l],d=c.length,f=s[l]=new Array(d),h,m=0;m<d;++m)(h=c[m]||u[m])&&(f[m]=h);for(;l<o;++l)s[l]=n[l];return new Be(s,this._parents)}function Sl(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],o=r.length-1,a=r[o],i;--o>=0;)(i=r[o])&&(a&&i.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(i,a),a=i);return this}function kl(e){e||(e=Cl);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,r=n.length,o=new Array(r),a=0;a<r;++a){for(var i=n[a],s=i.length,l=o[a]=new Array(s),c,u=0;u<s;++u)(c=i[u])&&(l[u]=c);l.sort(t)}return new Be(o,this._parents).order()}function Cl(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function $l(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Il(){return Array.from(this)}function Ml(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,a=r.length;o<a;++o){var i=r[o];if(i)return i}return null}function Dl(){let e=0;for(const t of this)++e;return e}function Ol(){return!this.node()}function Tl(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],a=0,i=o.length,s;a<i;++a)(s=o[a])&&e.call(s,s.__data__,a,o);return this}function Pl(e){return function(){this.removeAttribute(e)}}function Al(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Rl(e,t){return function(){this.setAttribute(e,t)}}function zl(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Bl(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Vl(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 Ll(e,t){var n=un(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Al:Pl:typeof t=="function"?n.local?Vl:Bl:n.local?zl:Rl)(n,t))}function Jr(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Hl(e){return function(){this.style.removeProperty(e)}}function Fl(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Gl(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Yl(e,t,n){return arguments.length>1?this.each((t==null?Hl:typeof t=="function"?Gl:Fl)(e,t,n??"")):Ct(this.node(),e)}function Ct(e,t){return e.style.getPropertyValue(t)||Jr(e).getComputedStyle(e,null).getPropertyValue(t)}function ql(e){return function(){delete this[e]}}function jl(e,t){return function(){this[e]=t}}function Wl(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Xl(e,t){return arguments.length>1?this.each((t==null?ql:typeof t=="function"?Wl:jl)(e,t)):this.node()[e]}function ei(e){return e.trim().split(/^|\s+/)}function Qn(e){return e.classList||new ti(e)}function ti(e){this._node=e,this._names=ei(e.getAttribute("class")||"")}ti.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 ni(e,t){for(var n=Qn(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function oi(e,t){for(var n=Qn(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function Ul(e){return function(){ni(this,e)}}function Zl(e){return function(){oi(this,e)}}function Kl(e,t){return function(){(t.apply(this,arguments)?ni:oi)(this,e)}}function Ql(e,t){var n=ei(e+"");if(arguments.length<2){for(var r=Qn(this.node()),o=-1,a=n.length;++o<a;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?Kl:t?Ul:Zl)(n,t))}function Jl(){this.textContent=""}function eu(e){return function(){this.textContent=e}}function tu(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function nu(e){return arguments.length?this.each(e==null?Jl:(typeof e=="function"?tu:eu)(e)):this.node().textContent}function ou(){this.innerHTML=""}function ru(e){return function(){this.innerHTML=e}}function iu(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function au(e){return arguments.length?this.each(e==null?ou:(typeof e=="function"?iu:ru)(e)):this.node().innerHTML}function su(){this.nextSibling&&this.parentNode.appendChild(this)}function lu(){return this.each(su)}function uu(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function cu(){return this.each(uu)}function du(e){var t=typeof e=="function"?e:Xr(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function fu(){return null}function hu(e,t){var n=typeof e=="function"?e:Xr(e),r=t==null?fu:typeof t=="function"?t:Kn(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function pu(){var e=this.parentNode;e&&e.removeChild(this)}function vu(){return this.each(pu)}function gu(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function mu(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function _u(e){return this.select(e?mu:gu)}function yu(e){return arguments.length?this.property("__data__",e):this.node().__data__}function wu(e){return function(t){e.call(this,t,this.__data__)}}function bu(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function xu(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,a;n<o;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function Eu(e,t,n){return function(){var r=this.__on,o,a=wu(t);if(r){for(var i=0,s=r.length;i<s;++i)if((o=r[i]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=n),o.value=t;return}}this.addEventListener(e.type,a,n),o={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(o):this.__on=[o]}}function Nu(e,t,n){var r=bu(e+""),o,a=r.length,i;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,c=s.length,u;l<c;++l)for(o=0,u=s[l];o<a;++o)if((i=r[o]).type===u.type&&i.name===u.name)return u.value}return}for(s=t?Eu:xu,o=0;o<a;++o)this.each(s(r[o],t,n));return this}function ri(e,t,n){var r=Jr(e),o=r.CustomEvent;typeof o=="function"?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function Su(e,t){return function(){return ri(this,e,t)}}function ku(e,t){return function(){return ri(this,e,t.apply(this,arguments))}}function Cu(e,t){return this.each((typeof t=="function"?ku:Su)(e,t))}function*$u(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,a=r.length,i;o<a;++o)(i=r[o])&&(yield i)}var ii=[null];function Be(e,t){this._groups=e,this._parents=t}function Bt(){return new Be([[document.documentElement]],ii)}function Iu(){return this}Be.prototype=Bt.prototype={constructor:Be,select:tl,selectAll:il,selectChild:ul,selectChildren:hl,filter:pl,data:wl,enter:vl,exit:xl,join:El,merge:Nl,selection:Iu,order:Sl,sort:kl,call:$l,nodes:Il,node:Ml,size:Dl,empty:Ol,each:Tl,attr:Ll,style:Yl,property:Xl,classed:Ql,text:nu,html:au,raise:lu,lower:cu,append:du,insert:hu,remove:vu,clone:_u,datum:yu,on:Nu,dispatch:Cu,[Symbol.iterator]:$u};function Le(e){return typeof e=="string"?new Be([[document.querySelector(e)]],[document.documentElement]):new Be([[e]],ii)}function Mu(e){let t;for(;t=e.sourceEvent;)e=t;return e}function qe(e,t){if(e=Mu(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const Du={passive:!1},Vt={capture:!0,passive:!1};function Jn(e){e.stopImmediatePropagation()}function $t(e){e.preventDefault(),e.stopImmediatePropagation()}function ai(e){var t=e.document.documentElement,n=Le(e).on("dragstart.drag",$t,Vt);"onselectstart"in t?n.on("selectstart.drag",$t,Vt):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function si(e,t){var n=e.document.documentElement,r=Le(e).on("dragstart.drag",null);t&&(r.on("click.drag",$t,Vt),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const dn=e=>()=>e;function eo(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:a,x:i,y:s,dx:l,dy:c,dispatch:u}){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:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:i,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:u}})}eo.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Ou(e){return!e.ctrlKey&&!e.button}function Tu(){return this.parentNode}function Pu(e,t){return t??{x:e.x,y:e.y}}function Au(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ru(){var e=Ou,t=Tu,n=Pu,r=Au,o={},a=sn("start","drag","end"),i=0,s,l,c,u,d=0;function f(E){E.on("mousedown.drag",h).filter(r).on("touchstart.drag",v).on("touchmove.drag",x,Du).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(E,R){if(!(u||!e.call(this,E,R))){var z=g(this,t.call(this,E,R),E,R,"mouse");z&&(Le(E.view).on("mousemove.drag",m,Vt).on("mouseup.drag",w,Vt),ai(E.view),Jn(E),c=!1,s=E.clientX,l=E.clientY,z("start",E))}}function m(E){if($t(E),!c){var R=E.clientX-s,z=E.clientY-l;c=R*R+z*z>d}o.mouse("drag",E)}function w(E){Le(E.view).on("mousemove.drag mouseup.drag",null),si(E.view,c),$t(E),o.mouse("end",E)}function v(E,R){if(e.call(this,E,R)){var z=E.changedTouches,M=t.call(this,E,R),b=z.length,$,T;for($=0;$<b;++$)(T=g(this,M,E,R,z[$].identifier,z[$]))&&(Jn(E),T("start",E,z[$]))}}function x(E){var R=E.changedTouches,z=R.length,M,b;for(M=0;M<z;++M)(b=o[R[M].identifier])&&($t(E),b("drag",E,R[M]))}function _(E){var R=E.changedTouches,z=R.length,M,b;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),M=0;M<z;++M)(b=o[R[M].identifier])&&(Jn(E),b("end",E,R[M]))}function g(E,R,z,M,b,$){var T=a.copy(),S=qe($||z,R),p,L,y;if((y=n.call(E,new eo("beforestart",{sourceEvent:z,target:f,identifier:b,active:i,x:S[0],y:S[1],dx:0,dy:0,dispatch:T}),M))!=null)return p=y.x-S[0]||0,L=y.y-S[1]||0,function O(I,H,F){var j=S,Y;switch(I){case"start":o[b]=O,Y=i++;break;case"end":delete o[b],--i;case"drag":S=qe(F||H,R),Y=i;break}T.call(I,E,new eo(I,{sourceEvent:H,subject:y,target:f,identifier:b,active:Y,x:S[0]+p,y:S[1]+L,dx:S[0]-j[0],dy:S[1]-j[1],dispatch:T}),M)}}return f.filter=function(E){return arguments.length?(e=typeof E=="function"?E:dn(!!E),f):e},f.container=function(E){return arguments.length?(t=typeof E=="function"?E:dn(E),f):t},f.subject=function(E){return arguments.length?(n=typeof E=="function"?E:dn(E),f):n},f.touchable=function(E){return arguments.length?(r=typeof E=="function"?E:dn(!!E),f):r},f.on=function(){var E=a.on.apply(a,arguments);return E===a?f:E},f.clickDistance=function(E){return arguments.length?(d=(E=+E)*E,f):Math.sqrt(d)},f}function to(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function li(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Lt(){}var Ht=.7,fn=1/Ht,It="\\s*([+-]?\\d+)\\s*",Ft="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",je="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",zu=/^#([0-9a-f]{3,8})$/,Bu=new RegExp(`^rgb\\(${It},${It},${It}\\)$`),Vu=new RegExp(`^rgb\\(${je},${je},${je}\\)$`),Lu=new RegExp(`^rgba\\(${It},${It},${It},${Ft}\\)$`),Hu=new RegExp(`^rgba\\(${je},${je},${je},${Ft}\\)$`),Fu=new RegExp(`^hsl\\(${Ft},${je},${je}\\)$`),Gu=new RegExp(`^hsla\\(${Ft},${je},${je},${Ft}\\)$`),ui={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};to(Lt,_t,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ci,formatHex:ci,formatHex8:Yu,formatHsl:qu,formatRgb:di,toString:di});function ci(){return this.rgb().formatHex()}function Yu(){return this.rgb().formatHex8()}function qu(){return gi(this).formatHsl()}function di(){return this.rgb().formatRgb()}function _t(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=zu.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?fi(t):n===3?new Re(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?hn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?hn(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=Bu.exec(e))?new Re(t[1],t[2],t[3],1):(t=Vu.exec(e))?new Re(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Lu.exec(e))?hn(t[1],t[2],t[3],t[4]):(t=Hu.exec(e))?hn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Fu.exec(e))?vi(t[1],t[2]/100,t[3]/100,1):(t=Gu.exec(e))?vi(t[1],t[2]/100,t[3]/100,t[4]):ui.hasOwnProperty(e)?fi(ui[e]):e==="transparent"?new Re(NaN,NaN,NaN,0):null}function fi(e){return new Re(e>>16&255,e>>8&255,e&255,1)}function hn(e,t,n,r){return r<=0&&(e=t=n=NaN),new Re(e,t,n,r)}function ju(e){return e instanceof Lt||(e=_t(e)),e?(e=e.rgb(),new Re(e.r,e.g,e.b,e.opacity)):new Re}function no(e,t,n,r){return arguments.length===1?ju(e):new Re(e,t,n,r??1)}function Re(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}to(Re,no,li(Lt,{brighter(e){return e=e==null?fn:Math.pow(fn,e),new Re(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ht:Math.pow(Ht,e),new Re(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Re(yt(this.r),yt(this.g),yt(this.b),pn(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:hi,formatHex:hi,formatHex8:Wu,formatRgb:pi,toString:pi}));function hi(){return`#${wt(this.r)}${wt(this.g)}${wt(this.b)}`}function Wu(){return`#${wt(this.r)}${wt(this.g)}${wt(this.b)}${wt((isNaN(this.opacity)?1:this.opacity)*255)}`}function pi(){const e=pn(this.opacity);return`${e===1?"rgb(":"rgba("}${yt(this.r)}, ${yt(this.g)}, ${yt(this.b)}${e===1?")":`, ${e})`}`}function pn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function yt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function wt(e){return e=yt(e),(e<16?"0":"")+e.toString(16)}function vi(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new He(e,t,n,r)}function gi(e){if(e instanceof He)return new He(e.h,e.s,e.l,e.opacity);if(e instanceof Lt||(e=_t(e)),!e)return new He;if(e instanceof He)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),a=Math.max(t,n,r),i=NaN,s=a-o,l=(a+o)/2;return s?(t===a?i=(n-r)/s+(n<r)*6:n===a?i=(r-t)/s+2:i=(t-n)/s+4,s/=l<.5?a+o:2-a-o,i*=60):s=l>0&&l<1?0:i,new He(i,s,l,e.opacity)}function Xu(e,t,n,r){return arguments.length===1?gi(e):new He(e,t,n,r??1)}function He(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}to(He,Xu,li(Lt,{brighter(e){return e=e==null?fn:Math.pow(fn,e),new He(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ht:Math.pow(Ht,e),new He(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,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Re(oo(e>=240?e-240:e+120,o,r),oo(e,o,r),oo(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new He(mi(this.h),vn(this.s),vn(this.l),pn(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=pn(this.opacity);return`${e===1?"hsl(":"hsla("}${mi(this.h)}, ${vn(this.s)*100}%, ${vn(this.l)*100}%${e===1?")":`, ${e})`}`}}));function mi(e){return e=(e||0)%360,e<0?e+360:e}function vn(e){return Math.max(0,Math.min(1,e||0))}function oo(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 ro=e=>()=>e;function Uu(e,t){return function(n){return e+n*t}}function Zu(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Ku(e){return(e=+e)==1?_i:function(t,n){return n-t?Zu(t,n,e):ro(isNaN(t)?n:t)}}function _i(e,t){var n=t-e;return n?Uu(e,n):ro(isNaN(e)?t:e)}const gn=function e(t){var n=Ku(t);function r(o,a){var i=n((o=no(o)).r,(a=no(a)).r),s=n(o.g,a.g),l=n(o.b,a.b),c=_i(o.opacity,a.opacity);return function(u){return o.r=i(u),o.g=s(u),o.b=l(u),o.opacity=c(u),o+""}}return r.gamma=e,r}(1);function Qu(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(a){for(o=0;o<n;++o)r[o]=e[o]*(1-a)+t[o]*a;return r}}function Ju(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ec(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),a=new Array(n),i;for(i=0;i<r;++i)o[i]=Gt(e[i],t[i]);for(;i<n;++i)a[i]=t[i];return function(s){for(i=0;i<r;++i)a[i]=o[i](s);return a}}function tc(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function We(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function nc(e,t){var n={},r={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?n[o]=Gt(e[o],t[o]):r[o]=t[o];return function(a){for(o in n)r[o]=n[o](a);return r}}var io=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ao=new RegExp(io.source,"g");function oc(e){return function(){return e}}function rc(e){return function(t){return e(t)+""}}function yi(e,t){var n=io.lastIndex=ao.lastIndex=0,r,o,a,i=-1,s=[],l=[];for(e=e+"",t=t+"";(r=io.exec(e))&&(o=ao.exec(t));)(a=o.index)>n&&(a=t.slice(n,a),s[i]?s[i]+=a:s[++i]=a),(r=r[0])===(o=o[0])?s[i]?s[i]+=o:s[++i]=o:(s[++i]=null,l.push({i,x:We(r,o)})),n=ao.lastIndex;return n<t.length&&(a=t.slice(n),s[i]?s[i]+=a:s[++i]=a),s.length<2?l[0]?rc(l[0].x):oc(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)s[(d=l[u]).i]=d.x(c);return s.join("")})}function Gt(e,t){var n=typeof t,r;return t==null||n==="boolean"?ro(t):(n==="number"?We:n==="string"?(r=_t(t))?(t=r,gn):yi:t instanceof _t?gn:t instanceof Date?tc:Ju(t)?Qu:Array.isArray(t)?ec:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?nc:We)(e,t)}var wi=180/Math.PI,so={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function bi(e,t,n,r,o,a){var i,s,l;return(i=Math.sqrt(e*e+t*t))&&(e/=i,t/=i),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,i=-i),{translateX:o,translateY:a,rotate:Math.atan2(t,e)*wi,skewX:Math.atan(l)*wi,scaleX:i,scaleY:s}}var mn;function ic(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?so:bi(t.a,t.b,t.c,t.d,t.e,t.f)}function ac(e){return e==null||(mn||(mn=document.createElementNS("http://www.w3.org/2000/svg","g")),mn.setAttribute("transform",e),!(e=mn.transform.baseVal.consolidate()))?so:(e=e.matrix,bi(e.a,e.b,e.c,e.d,e.e,e.f))}function xi(e,t,n,r){function o(c){return c.length?c.pop()+" ":""}function a(c,u,d,f,h,m){if(c!==d||u!==f){var w=h.push("translate(",null,t,null,n);m.push({i:w-4,x:We(c,d)},{i:w-2,x:We(u,f)})}else(d||f)&&h.push("translate("+d+t+f+n)}function i(c,u,d,f){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),f.push({i:d.push(o(d)+"rotate(",null,r)-2,x:We(c,u)})):u&&d.push(o(d)+"rotate("+u+r)}function s(c,u,d,f){c!==u?f.push({i:d.push(o(d)+"skewX(",null,r)-2,x:We(c,u)}):u&&d.push(o(d)+"skewX("+u+r)}function l(c,u,d,f,h,m){if(c!==d||u!==f){var w=h.push(o(h)+"scale(",null,",",null,")");m.push({i:w-4,x:We(c,d)},{i:w-2,x:We(u,f)})}else(d!==1||f!==1)&&h.push(o(h)+"scale("+d+","+f+")")}return function(c,u){var d=[],f=[];return c=e(c),u=e(u),a(c.translateX,c.translateY,u.translateX,u.translateY,d,f),i(c.rotate,u.rotate,d,f),s(c.skewX,u.skewX,d,f),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,f),c=u=null,function(h){for(var m=-1,w=f.length,v;++m<w;)d[(v=f[m]).i]=v.x(h);return d.join("")}}}var sc=xi(ic,"px, ","px)","deg)"),lc=xi(ac,", ",")",")"),uc=1e-12;function Ei(e){return((e=Math.exp(e))+1/e)/2}function cc(e){return((e=Math.exp(e))-1/e)/2}function dc(e){return((e=Math.exp(2*e))-1)/(e+1)}const _n=function e(t,n,r){function o(a,i){var s=a[0],l=a[1],c=a[2],u=i[0],d=i[1],f=i[2],h=u-s,m=d-l,w=h*h+m*m,v,x;if(w<uc)x=Math.log(f/c)/t,v=function(M){return[s+M*h,l+M*m,c*Math.exp(t*M*x)]};else{var _=Math.sqrt(w),g=(f*f-c*c+r*w)/(2*c*n*_),E=(f*f-c*c-r*w)/(2*f*n*_),R=Math.log(Math.sqrt(g*g+1)-g),z=Math.log(Math.sqrt(E*E+1)-E);x=(z-R)/t,v=function(M){var b=M*x,$=Ei(R),T=c/(n*_)*($*dc(t*b+R)-cc(R));return[s+T*h,l+T*m,c*$/Ei(t*b+R)]}}return v.duration=x*1e3*t/Math.SQRT2,v}return o.rho=function(a){var i=Math.max(.001,+a),s=i*i,l=s*s;return e(i,s,l)},o}(Math.SQRT2,2,4);var Mt=0,Yt=0,qt=0,Ni=1e3,yn,jt,wn=0,bt=0,bn=0,Wt=typeof performance=="object"&&performance.now?performance:Date,Si=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function lo(){return bt||(Si(fc),bt=Wt.now()+bn)}function fc(){bt=0}function xn(){this._call=this._time=this._next=null}xn.prototype=ki.prototype={constructor:xn,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?lo():+n)+(t==null?0:+t),!this._next&&jt!==this&&(jt?jt._next=this:yn=this,jt=this),this._call=e,this._time=n,uo()},stop:function(){this._call&&(this._call=null,this._time=1/0,uo())}};function ki(e,t,n){var r=new xn;return r.restart(e,t,n),r}function hc(){lo(),++Mt;for(var e=yn,t;e;)(t=bt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Mt}function Ci(){bt=(wn=Wt.now())+bn,Mt=Yt=0;try{hc()}finally{Mt=0,vc(),bt=0}}function pc(){var e=Wt.now(),t=e-wn;t>Ni&&(bn-=t,wn=e)}function vc(){for(var e,t=yn,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:yn=n);jt=e,uo(r)}function uo(e){if(!Mt){Yt&&(Yt=clearTimeout(Yt));var t=e-bt;t>24?(e<1/0&&(Yt=setTimeout(Ci,e-Wt.now()-bn)),qt&&(qt=clearInterval(qt))):(qt||(wn=Wt.now(),qt=setInterval(pc,Ni)),Mt=1,Si(Ci))}}function $i(e,t,n){var r=new xn;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var gc=sn("start","end","cancel","interrupt"),mc=[],Ii=0,Mi=1,co=2,En=3,Di=4,fo=5,Nn=6;function Sn(e,t,n,r,o,a){var i=e.__transition;if(!i)e.__transition={};else if(n in i)return;_c(e,n,{name:t,index:r,group:o,on:gc,tween:mc,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Ii})}function ho(e,t){var n=Fe(e,t);if(n.state>Ii)throw new Error("too late; already scheduled");return n}function Xe(e,t){var n=Fe(e,t);if(n.state>En)throw new Error("too late; already running");return n}function Fe(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function _c(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=ki(a,0,n.time);function a(c){n.state=Mi,n.timer.restart(i,n.delay,n.time),n.delay<=c&&i(c-n.delay)}function i(c){var u,d,f,h;if(n.state!==Mi)return l();for(u in r)if(h=r[u],h.name===n.name){if(h.state===En)return $i(i);h.state===Di?(h.state=Nn,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[u]):+u<t&&(h.state=Nn,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete r[u])}if($i(function(){n.state===En&&(n.state=Di,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=co,n.on.call("start",e,e.__data__,n.index,n.group),n.state===co){for(n.state=En,o=new Array(f=n.tween.length),u=0,d=-1;u<f;++u)(h=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(o[++d]=h);o.length=d+1}}function s(c){for(var u=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=fo,1),d=-1,f=o.length;++d<f;)o[d].call(e,u);n.state===fo&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Nn,n.timer.stop(),delete r[t];for(var c in r)return;delete e.__transition}}function kn(e,t){var n=e.__transition,r,o,a=!0,i;if(n){t=t==null?null:t+"";for(i in n){if((r=n[i]).name!==t){a=!1;continue}o=r.state>co&&r.state<fo,r.state=Nn,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[i]}a&&delete e.__transition}}function yc(e){return this.each(function(){kn(this,e)})}function wc(e,t){var n,r;return function(){var o=Xe(this,e),a=o.tween;if(a!==n){r=n=a;for(var i=0,s=r.length;i<s;++i)if(r[i].name===t){r=r.slice(),r.splice(i,1);break}}o.tween=r}}function bc(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var a=Xe(this,e),i=a.tween;if(i!==r){o=(r=i).slice();for(var s={name:t,value:n},l=0,c=o.length;l<c;++l)if(o[l].name===t){o[l]=s;break}l===c&&o.push(s)}a.tween=o}}function xc(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Fe(this.node(),n).tween,o=0,a=r.length,i;o<a;++o)if((i=r[o]).name===e)return i.value;return null}return this.each((t==null?wc:bc)(n,e,t))}function po(e,t,n){var r=e._id;return e.each(function(){var o=Xe(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return Fe(o,r).value[t]}}function Oi(e,t){var n;return(typeof t=="number"?We:t instanceof _t?gn:(n=_t(t))?(t=n,gn):yi)(e,t)}function Ec(e){return function(){this.removeAttribute(e)}}function Nc(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Sc(e,t,n){var r,o=n+"",a;return function(){var i=this.getAttribute(e);return i===o?null:i===r?a:a=t(r=i,n)}}function kc(e,t,n){var r,o=n+"",a;return function(){var i=this.getAttributeNS(e.space,e.local);return i===o?null:i===r?a:a=t(r=i,n)}}function Cc(e,t,n){var r,o,a;return function(){var i,s=n(this),l;return s==null?void this.removeAttribute(e):(i=this.getAttribute(e),l=s+"",i===l?null:i===r&&l===o?a:(o=l,a=t(r=i,s)))}}function $c(e,t,n){var r,o,a;return function(){var i,s=n(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(i=this.getAttributeNS(e.space,e.local),l=s+"",i===l?null:i===r&&l===o?a:(o=l,a=t(r=i,s)))}}function Ic(e,t){var n=un(e),r=n==="transform"?lc:Oi;return this.attrTween(e,typeof t=="function"?(n.local?$c:Cc)(n,r,po(this,"attr."+e,t)):t==null?(n.local?Nc:Ec)(n):(n.local?kc:Sc)(n,r,t))}function Mc(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Dc(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Oc(e,t){var n,r;function o(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&Dc(e,a)),n}return o._value=t,o}function Tc(e,t){var n,r;function o(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&Mc(e,a)),n}return o._value=t,o}function Pc(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 r=un(e);return this.tween(n,(r.local?Oc:Tc)(r,t))}function Ac(e,t){return function(){ho(this,e).delay=+t.apply(this,arguments)}}function Rc(e,t){return t=+t,function(){ho(this,e).delay=t}}function zc(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Ac:Rc)(t,e)):Fe(this.node(),t).delay}function Bc(e,t){return function(){Xe(this,e).duration=+t.apply(this,arguments)}}function Vc(e,t){return t=+t,function(){Xe(this,e).duration=t}}function Lc(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Bc:Vc)(t,e)):Fe(this.node(),t).duration}function Hc(e,t){if(typeof t!="function")throw new Error;return function(){Xe(this,e).ease=t}}function Fc(e){var t=this._id;return arguments.length?this.each(Hc(t,e)):Fe(this.node(),t).ease}function Gc(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Xe(this,e).ease=n}}function Yc(e){if(typeof e!="function")throw new Error;return this.each(Gc(this._id,e))}function qc(e){typeof e!="function"&&(e=Zr(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var a=t[o],i=a.length,s=r[o]=[],l,c=0;c<i;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&s.push(l);return new et(r,this._parents,this._name,this._id)}function jc(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,a=Math.min(r,o),i=new Array(r),s=0;s<a;++s)for(var l=t[s],c=n[s],u=l.length,d=i[s]=new Array(u),f,h=0;h<u;++h)(f=l[h]||c[h])&&(d[h]=f);for(;s<r;++s)i[s]=t[s];return new et(i,this._parents,this._name,this._id)}function Wc(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 Xc(e,t,n){var r,o,a=Wc(t)?ho:Xe;return function(){var i=a(this,e),s=i.on;s!==r&&(o=(r=s).copy()).on(t,n),i.on=o}}function Uc(e,t){var n=this._id;return arguments.length<2?Fe(this.node(),n).on.on(e):this.each(Xc(n,e,t))}function Zc(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Kc(){return this.on("end.remove",Zc(this._id))}function Qc(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Kn(e));for(var r=this._groups,o=r.length,a=new Array(o),i=0;i<o;++i)for(var s=r[i],l=s.length,c=a[i]=new Array(l),u,d,f=0;f<l;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&("__data__"in u&&(d.__data__=u.__data__),c[f]=d,Sn(c[f],t,n,f,c,Fe(u,n)));return new et(a,this._parents,t,n)}function Jc(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Ur(e));for(var r=this._groups,o=r.length,a=[],i=[],s=0;s<o;++s)for(var l=r[s],c=l.length,u,d=0;d<c;++d)if(u=l[d]){for(var f=e.call(u,u.__data__,d,l),h,m=Fe(u,n),w=0,v=f.length;w<v;++w)(h=f[w])&&Sn(h,t,n,w,f,m);a.push(f),i.push(u)}return new et(a,i,t,n)}var ed=Bt.prototype.constructor;function td(){return new ed(this._groups,this._parents)}function nd(e,t){var n,r,o;return function(){var a=Ct(this,e),i=(this.style.removeProperty(e),Ct(this,e));return a===i?null:a===n&&i===r?o:o=t(n=a,r=i)}}function Ti(e){return function(){this.style.removeProperty(e)}}function od(e,t,n){var r,o=n+"",a;return function(){var i=Ct(this,e);return i===o?null:i===r?a:a=t(r=i,n)}}function rd(e,t,n){var r,o,a;return function(){var i=Ct(this,e),s=n(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Ct(this,e))),i===l?null:i===r&&l===o?a:(o=l,a=t(r=i,s))}}function id(e,t){var n,r,o,a="style."+t,i="end."+a,s;return function(){var l=Xe(this,e),c=l.on,u=l.value[a]==null?s||(s=Ti(t)):void 0;(c!==n||o!==u)&&(r=(n=c).copy()).on(i,o=u),l.on=r}}function ad(e,t,n){var r=(e+="")=="transform"?sc:Oi;return t==null?this.styleTween(e,nd(e,r)).on("end.style."+e,Ti(e)):typeof t=="function"?this.styleTween(e,rd(e,r,po(this,"style."+e,t))).each(id(this._id,e)):this.styleTween(e,od(e,r,t),n).on("end.style."+e,null)}function sd(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function ld(e,t,n){var r,o;function a(){var i=t.apply(this,arguments);return i!==o&&(r=(o=i)&&sd(e,i,n)),r}return a._value=t,a}function ud(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,ld(e,t,n??""))}function cd(e){return function(){this.textContent=e}}function dd(e){return function(){var t=e(this);this.textContent=t??""}}function fd(e){return this.tween("text",typeof e=="function"?dd(po(this,"text",e)):cd(e==null?"":e+""))}function hd(e){return function(t){this.textContent=e.call(this,t)}}function pd(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&hd(o)),t}return r._value=e,r}function vd(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,pd(e))}function gd(){for(var e=this._name,t=this._id,n=Pi(),r=this._groups,o=r.length,a=0;a<o;++a)for(var i=r[a],s=i.length,l,c=0;c<s;++c)if(l=i[c]){var u=Fe(l,t);Sn(l,e,n,c,i,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new et(r,this._parents,e,n)}function md(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(a,i){var s={value:i},l={value:function(){--o===0&&a()}};n.each(function(){var c=Xe(this,r),u=c.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),c.on=t}),o===0&&a()})}var _d=0;function et(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Pi(){return++_d}var tt=Bt.prototype;et.prototype={constructor:et,select:Qc,selectAll:Jc,selectChild:tt.selectChild,selectChildren:tt.selectChildren,filter:qc,merge:jc,selection:td,transition:gd,call:tt.call,nodes:tt.nodes,node:tt.node,size:tt.size,empty:tt.empty,each:tt.each,on:Uc,attr:Ic,attrTween:Pc,style:ad,styleTween:ud,text:fd,textTween:vd,remove:Kc,tween:xc,delay:zc,duration:Lc,ease:Fc,easeVarying:Yc,end:md,[Symbol.iterator]:tt[Symbol.iterator]};function yd(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var wd={time:null,delay:0,duration:250,ease:yd};function bd(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 xd(e){var t,n;e instanceof et?(t=e._id,e=e._name):(t=Pi(),(n=wd).time=lo(),e=e==null?null:e+"");for(var r=this._groups,o=r.length,a=0;a<o;++a)for(var i=r[a],s=i.length,l,c=0;c<s;++c)(l=i[c])&&Sn(l,e,t,c,i,n||bd(l,t));return new et(r,this._parents,e,t)}Bt.prototype.interrupt=yc,Bt.prototype.transition=xd;const Cn=e=>()=>e;function Ed(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){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:r,enumerable:!0,configurable:!0},_:{value:o}})}function nt(e,t,n){this.k=e,this.x=t,this.y=n}nt.prototype={constructor:nt,scale:function(e){return e===1?this:new nt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new nt(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 Dt=new nt(1,0,0);nt.prototype;function vo(e){e.stopImmediatePropagation()}function Xt(e){e.preventDefault(),e.stopImmediatePropagation()}function Nd(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Sd(){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 Ai(){return this.__zoom||Dt}function kd(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Cd(){return navigator.maxTouchPoints||"ontouchstart"in this}function $d(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],i=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),i>a?(a+i)/2:Math.min(0,a)||Math.max(0,i))}function Id(){var e=Nd,t=Sd,n=$d,r=kd,o=Cd,a=[0,1/0],i=[[-1/0,-1/0],[1/0,1/0]],s=250,l=_n,c=sn("start","zoom","end"),u,d,f,h=500,m=150,w=0,v=10;function x(y){y.property("__zoom",Ai).on("wheel.zoom",b,{passive:!1}).on("mousedown.zoom",$).on("dblclick.zoom",T).filter(o).on("touchstart.zoom",S).on("touchmove.zoom",p).on("touchend.zoom touchcancel.zoom",L).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}x.transform=function(y,O,I,H){var F=y.selection?y.selection():y;F.property("__zoom",Ai),y!==F?R(y,O,I,H):F.interrupt().each(function(){z(this,arguments).event(H).start().zoom(null,typeof O=="function"?O.apply(this,arguments):O).end()})},x.scaleBy=function(y,O,I,H){x.scaleTo(y,function(){var F=this.__zoom.k,j=typeof O=="function"?O.apply(this,arguments):O;return F*j},I,H)},x.scaleTo=function(y,O,I,H){x.transform(y,function(){var F=t.apply(this,arguments),j=this.__zoom,Y=I==null?E(F):typeof I=="function"?I.apply(this,arguments):I,W=j.invert(Y),X=typeof O=="function"?O.apply(this,arguments):O;return n(g(_(j,X),Y,W),F,i)},I,H)},x.translateBy=function(y,O,I,H){x.transform(y,function(){return n(this.__zoom.translate(typeof O=="function"?O.apply(this,arguments):O,typeof I=="function"?I.apply(this,arguments):I),t.apply(this,arguments),i)},null,H)},x.translateTo=function(y,O,I,H,F){x.transform(y,function(){var j=t.apply(this,arguments),Y=this.__zoom,W=H==null?E(j):typeof H=="function"?H.apply(this,arguments):H;return n(Dt.translate(W[0],W[1]).scale(Y.k).translate(typeof O=="function"?-O.apply(this,arguments):-O,typeof I=="function"?-I.apply(this,arguments):-I),j,i)},H,F)};function _(y,O){return O=Math.max(a[0],Math.min(a[1],O)),O===y.k?y:new nt(O,y.x,y.y)}function g(y,O,I){var H=O[0]-I[0]*y.k,F=O[1]-I[1]*y.k;return H===y.x&&F===y.y?y:new nt(y.k,H,F)}function E(y){return[(+y[0][0]+ +y[1][0])/2,(+y[0][1]+ +y[1][1])/2]}function R(y,O,I,H){y.on("start.zoom",function(){z(this,arguments).event(H).start()}).on("interrupt.zoom end.zoom",function(){z(this,arguments).event(H).end()}).tween("zoom",function(){var F=this,j=arguments,Y=z(F,j).event(H),W=t.apply(F,j),X=I==null?E(W):typeof I=="function"?I.apply(F,j):I,P=Math.max(W[1][0]-W[0][0],W[1][1]-W[0][1]),B=F.__zoom,A=typeof O=="function"?O.apply(F,j):O,V=l(B.invert(X).concat(P/B.k),A.invert(X).concat(P/A.k));return function(q){if(q===1)q=A;else{var ne=V(q),ee=P/ne[2];q=new nt(ee,X[0]-ne[0]*ee,X[1]-ne[1]*ee)}Y.zoom(null,q)}})}function z(y,O,I){return!I&&y.__zooming||new M(y,O)}function M(y,O){this.that=y,this.args=O,this.active=0,this.sourceEvent=null,this.extent=t.apply(y,O),this.taps=0}M.prototype={event:function(y){return y&&(this.sourceEvent=y),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(y,O){return this.mouse&&y!=="mouse"&&(this.mouse[1]=O.invert(this.mouse[0])),this.touch0&&y!=="touch"&&(this.touch0[1]=O.invert(this.touch0[0])),this.touch1&&y!=="touch"&&(this.touch1[1]=O.invert(this.touch1[0])),this.that.__zoom=O,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(y){var O=Le(this.that).datum();c.call(y,this.that,new Ed(y,{sourceEvent:this.sourceEvent,target:x,transform:this.that.__zoom,dispatch:c}),O)}};function b(y,...O){if(!e.apply(this,arguments))return;var I=z(this,O).event(y),H=this.__zoom,F=Math.max(a[0],Math.min(a[1],H.k*Math.pow(2,r.apply(this,arguments)))),j=qe(y);if(I.wheel)(I.mouse[0][0]!==j[0]||I.mouse[0][1]!==j[1])&&(I.mouse[1]=H.invert(I.mouse[0]=j)),clearTimeout(I.wheel);else{if(H.k===F)return;I.mouse=[j,H.invert(j)],kn(this),I.start()}Xt(y),I.wheel=setTimeout(Y,m),I.zoom("mouse",n(g(_(H,F),I.mouse[0],I.mouse[1]),I.extent,i));function Y(){I.wheel=null,I.end()}}function $(y,...O){if(f||!e.apply(this,arguments))return;var I=y.currentTarget,H=z(this,O,!0).event(y),F=Le(y.view).on("mousemove.zoom",X,!0).on("mouseup.zoom",P,!0),j=qe(y,I),Y=y.clientX,W=y.clientY;ai(y.view),vo(y),H.mouse=[j,this.__zoom.invert(j)],kn(this),H.start();function X(B){if(Xt(B),!H.moved){var A=B.clientX-Y,V=B.clientY-W;H.moved=A*A+V*V>w}H.event(B).zoom("mouse",n(g(H.that.__zoom,H.mouse[0]=qe(B,I),H.mouse[1]),H.extent,i))}function P(B){F.on("mousemove.zoom mouseup.zoom",null),si(B.view,H.moved),Xt(B),H.event(B).end()}}function T(y,...O){if(e.apply(this,arguments)){var I=this.__zoom,H=qe(y.changedTouches?y.changedTouches[0]:y,this),F=I.invert(H),j=I.k*(y.shiftKey?.5:2),Y=n(g(_(I,j),H,F),t.apply(this,O),i);Xt(y),s>0?Le(this).transition().duration(s).call(R,Y,H,y):Le(this).call(x.transform,Y,H,y)}}function S(y,...O){if(e.apply(this,arguments)){var I=y.touches,H=I.length,F=z(this,O,y.changedTouches.length===H).event(y),j,Y,W,X;for(vo(y),Y=0;Y<H;++Y)W=I[Y],X=qe(W,this),X=[X,this.__zoom.invert(X),W.identifier],F.touch0?!F.touch1&&F.touch0[2]!==X[2]&&(F.touch1=X,F.taps=0):(F.touch0=X,j=!0,F.taps=1+!!u);u&&(u=clearTimeout(u)),j&&(F.taps<2&&(d=X[0],u=setTimeout(function(){u=null},h)),kn(this),F.start())}}function p(y,...O){if(this.__zooming){var I=z(this,O).event(y),H=y.changedTouches,F=H.length,j,Y,W,X;for(Xt(y),j=0;j<F;++j)Y=H[j],W=qe(Y,this),I.touch0&&I.touch0[2]===Y.identifier?I.touch0[0]=W:I.touch1&&I.touch1[2]===Y.identifier&&(I.touch1[0]=W);if(Y=I.that.__zoom,I.touch1){var P=I.touch0[0],B=I.touch0[1],A=I.touch1[0],V=I.touch1[1],q=(q=A[0]-P[0])*q+(q=A[1]-P[1])*q,ne=(ne=V[0]-B[0])*ne+(ne=V[1]-B[1])*ne;Y=_(Y,Math.sqrt(q/ne)),W=[(P[0]+A[0])/2,(P[1]+A[1])/2],X=[(B[0]+V[0])/2,(B[1]+V[1])/2]}else if(I.touch0)W=I.touch0[0],X=I.touch0[1];else return;I.zoom("touch",n(g(Y,W,X),I.extent,i))}}function L(y,...O){if(this.__zooming){var I=z(this,O).event(y),H=y.changedTouches,F=H.length,j,Y;for(vo(y),f&&clearTimeout(f),f=setTimeout(function(){f=null},h),j=0;j<F;++j)Y=H[j],I.touch0&&I.touch0[2]===Y.identifier?delete I.touch0:I.touch1&&I.touch1[2]===Y.identifier&&delete I.touch1;if(I.touch1&&!I.touch0&&(I.touch0=I.touch1,delete I.touch1),I.touch0)I.touch0[1]=this.__zoom.invert(I.touch0[0]);else if(I.end(),I.taps===2&&(Y=qe(Y,this),Math.hypot(d[0]-Y[0],d[1]-Y[1])<v)){var W=Le(this).on("dblclick.zoom");W&&W.apply(this,arguments)}}}return x.wheelDelta=function(y){return arguments.length?(r=typeof y=="function"?y:Cn(+y),x):r},x.filter=function(y){return arguments.length?(e=typeof y=="function"?y:Cn(!!y),x):e},x.touchable=function(y){return arguments.length?(o=typeof y=="function"?y:Cn(!!y),x):o},x.extent=function(y){return arguments.length?(t=typeof y=="function"?y:Cn([[+y[0][0],+y[0][1]],[+y[1][0],+y[1][1]]]),x):t},x.scaleExtent=function(y){return arguments.length?(a[0]=+y[0],a[1]=+y[1],x):[a[0],a[1]]},x.translateExtent=function(y){return arguments.length?(i[0][0]=+y[0][0],i[1][0]=+y[1][0],i[0][1]=+y[0][1],i[1][1]=+y[1][1],x):[[i[0][0],i[0][1]],[i[1][0],i[1][1]]]},x.constrain=function(y){return arguments.length?(n=y,x):n},x.duration=function(y){return arguments.length?(s=+y,x):s},x.interpolate=function(y){return arguments.length?(l=y,x):l},x.on=function(){var y=c.on.apply(c,arguments);return y===c?x:y},x.clickDistance=function(y){return arguments.length?(w=(y=+y)*y,x):Math.sqrt(w)},x.tapDistance=function(y){return arguments.length?(v=+y,x):v},x}var Q=(e=>(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(Q||{}),go=(e=>(e.Partial="partial",e.Full="full",e))(go||{}),xt=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(xt||{}),st=(e=>(e.Strict="strict",e.Loose="loose",e))(st||{}),mo=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(mo||{}),Ut=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(Ut||{}),Ri=(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))(Ri||{});const Md=["INPUT","SELECT","TEXTAREA"],Dd=typeof document<"u"?document:null;function _o(e){var t,n;const r=((n=(t=e.composedPath)==null?void 0:t.call(e))==null?void 0:n[0])||e.target,o=typeof(r==null?void 0:r.hasAttribute)=="function"?r.hasAttribute("contenteditable"):!1,a=typeof(r==null?void 0:r.closest)=="function"?r.closest(".nokey"):null;return Md.includes(r==null?void 0:r.nodeName)||o||!!a}function Od(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function zi(e,t,n,r){const o=t.replace("+",`
|
|
3
|
+
`).replace(`
|
|
4
|
+
|
|
5
|
+
`,`
|
|
6
|
+
+`).split(`
|
|
7
|
+
`).map(i=>i.trim().toLowerCase());if(o.length===1)return e.toLowerCase()===t.toLowerCase();r||n.add(e.toLowerCase());const a=o.every((i,s)=>n.has(i)&&Array.from(n.values())[s]===o[s]);return r&&n.delete(e.toLowerCase()),a}function Td(e,t){return n=>{if(!n.code&&!n.key)return!1;const r=Pd(n.code,e);return Array.isArray(e)?e.some(o=>zi(n[r],o,t,n.type==="keyup")):zi(n[r],e,t,n.type==="keyup")}}function Pd(e,t){return t.includes(e)?"code":"key"}function Zt(e,t){const n=fe(()=>pe(t==null?void 0:t.target)??Dd),r=Qe(pe(e)===!0);let o=!1;const a=new Set;let i=l(pe(e));ye(()=>pe(e),(c,u)=>{typeof u=="boolean"&&typeof c!="boolean"&&s(),i=l(c)},{immediate:!0}),Yr(["blur","contextmenu"],s),qr((...c)=>i(...c),c=>{var u,d;const f=pe(t==null?void 0:t.actInsideInputWithModifier)??!0,h=pe(t==null?void 0:t.preventDefault)??!1;if(o=Od(c),(!o||o&&!f)&&_o(c))return;const w=((d=(u=c.composedPath)==null?void 0:u.call(c))==null?void 0:d[0])||c.target,v=(w==null?void 0:w.nodeName)==="BUTTON"||(w==null?void 0:w.nodeName)==="A";!h&&(o||!v)&&c.preventDefault(),r.value=!0},{eventName:"keydown",target:n}),qr((...c)=>i(...c),c=>{const u=pe(t==null?void 0:t.actInsideInputWithModifier)??!0;if(r.value){if((!o||o&&!u)&&_o(c))return;o=!1,r.value=!1}},{eventName:"keyup",target:n});function s(){o=!1,a.clear(),r.value=pe(e)===!0}function l(c){return c===null?(s(),()=>!1):typeof c=="boolean"?(s(),r.value=c,()=>!1):Array.isArray(c)||typeof c=="string"?Td(c,a):c}return r}const Bi="vue-flow__node-desc",Vi="vue-flow__edge-desc",Ad="vue-flow__aria-live",Li=["Enter"," ","Escape"],Ot={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function $n(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function In(e,t){const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)}function Mn(e){return{width:e.offsetWidth,height:e.offsetHeight}}function Et(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function Hi(e,t){return{x:Et(e.x,t[0][0],t[1][0]),y:Et(e.y,t[0][1],t[1][1])}}function Fi(e){const t=e.getRootNode();return"elementFromPoint"in t?t:window.document}function lt(e){return e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e}function Nt(e){return e&&typeof e=="object"&&"id"in e&&"position"in e&&!lt(e)}function Kt(e){return Nt(e)&&"computedPosition"in e}function Dn(e){return!Number.isNaN(e)&&Number.isFinite(e)}function Rd(e){return Dn(e.width)&&Dn(e.height)&&Dn(e.x)&&Dn(e.y)}function zd(e,t,n){const r={id:e.id.toString(),type:e.type??"default",dimensions:Rt({width:0,height:0}),computedPosition:Rt({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:$e(e.data)?e.data:{},events:Rt($e(e.events)?e.events:{})};return Object.assign(t??r,e,{id:e.id.toString(),parentNode:n})}function Gi(e,t,n){var r,o;const a={id:e.id.toString(),type:e.type??(t==null?void 0:t.type)??"default",source:e.source.toString(),target:e.target.toString(),sourceHandle:(r=e.sourceHandle)==null?void 0:r.toString(),targetHandle:(o=e.targetHandle)==null?void 0:o.toString(),updatable:e.updatable??(n==null?void 0:n.updatable),selectable:e.selectable??(n==null?void 0:n.selectable),focusable:e.focusable??(n==null?void 0:n.focusable),data:$e(e.data)?e.data:{},events:Rt($e(e.events)?e.events:{}),label:e.label??"",interactionWidth:e.interactionWidth??(n==null?void 0:n.interactionWidth),...n??{}};return Object.assign(t??a,e,{id:e.id.toString()})}function Yi(e,t,n,r){const o=typeof e=="string"?e:e.id,a=new Set,i=r==="source"?"target":"source";for(const s of n)s[i]===o&&a.add(s[r]);return t.filter(s=>a.has(s.id))}function Bd(...e){if(e.length===3){const[a,i,s]=e;return Yi(a,i,s,"target")}const[t,n]=e,r=typeof t=="string"?t:t.id;return n.filter(a=>lt(a)&&a.source===r).map(a=>n.find(i=>Nt(i)&&i.id===a.target))}function Vd(...e){if(e.length===3){const[a,i,s]=e;return Yi(a,i,s,"source")}const[t,n]=e,r=typeof t=="string"?t:t.id;return n.filter(a=>lt(a)&&a.target===r).map(a=>n.find(i=>Nt(i)&&i.id===a.source))}function qi({source:e,sourceHandle:t,target:n,targetHandle:r}){return`vueflow__edge-${e}${t??""}-${n}${r??""}`}function Ld(e,t){return t.some(n=>lt(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 Qt({x:e,y:t},{x:n,y:r,zoom:o}){return{x:e*o+n,y:t*o+r}}function Jt({x:e,y:t},{x:n,y:r,zoom:o},a=!1,i=[1,1]){const s={x:(e-n)/o,y:(t-r)/o};return a?Tn(s,i):s}function Hd(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 ji({x:e,y:t,width:n,height:r}){return{x:e,y:t,x2:e+n,y2:t+r}}function Fd({x:e,y:t,x2:n,y2:r}){return{x:e,y:t,width:n-e,height:r-t}}function Wi(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 r=e[n];t=Hd(t,ji({...r.computedPosition,...r.dimensions}))}return Fd(t)}function Xi(e,t,n={x:0,y:0,zoom:1},r=!1,o=!1){const a={...Jt(t,n),width:t.width/n.zoom,height:t.height/n.zoom},i=[];for(const s of e){const{dimensions:l,selectable:c=!0,hidden:u=!1}=s,d=l.width??s.width??null,f=l.height??s.height??null;if(o&&!c||u)continue;const h=In(a,$n(s)),m=d===null||f===null,w=r&&h>0,v=(d??0)*(f??0);(m||w||h>=v||s.dragging)&&i.push(s)}return i}function Ui(e,t){const n=new Set;if(typeof e=="string")n.add(e);else if(e.length>=1)for(const r of e)n.add(r.id);return t.filter(r=>n.has(r.source)||n.has(r.target))}function Tt(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 tn(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Gd(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=Tt(e,n),o=Tt(e,t);return{top:r,right:o,bottom:r,left:o,x:o*2,y:r*2}}if(typeof e=="object"){const r=Tt(e.top??e.y??0,n),o=Tt(e.bottom??e.y??0,n),a=Tt(e.left??e.x??0,t),i=Tt(e.right??e.x??0,t);return{top:r,right:i,bottom:o,left:a,x:a+i,y:r+o}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Yd(e,t,n,r,o,a){const{x:i,y:s}=Qt(e,{x:t,y:n,zoom:r}),{x:l,y:c}=Qt({x:e.x+e.width,y:e.y+e.height},{x:t,y:n,zoom:r}),u=o-l,d=a-c;return{left:Math.floor(i),top:Math.floor(s),right:Math.floor(u),bottom:Math.floor(d)}}function Zi(e,t,n,r,o,a=.1){const i=Gd(a,t,n),s=(t-i.x)/e.width,l=(n-i.y)/e.height,c=Math.min(s,l),u=Et(c,r,o),d=e.x+e.width/2,f=e.y+e.height/2,h=t/2-d*u,m=n/2-f*u,w=Yd(e,h,m,u,t,n),v={left:Math.min(w.left-i.left,0),top:Math.min(w.top-i.top,0),right:Math.min(w.right-i.right,0),bottom:Math.min(w.bottom-i.bottom,0)};return{x:h-v.left+v.right,y:m-v.top+v.bottom,zoom:u}}function qd(e,t){return{x:t.x+e.x,y:t.y+e.y,z:(e.z>t.z?e.z:t.z)+1}}function Ki(e,t){if(!e.parentNode)return!1;const n=t.get(e.parentNode);return n?n.selected?!0:Ki(n,t):!1}function en(e,t){return typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`}function Qi(e){const t=e.ctrlKey&&On()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t}function Ji(e,t,n){return e<t?Et(Math.abs(e-t),1,t)/t:e>n?-Et(Math.abs(e-n),1,t)/t:0}function ea(e,t,n=15,r=40){const o=Ji(e.x,r,t.width-r)*n,a=Ji(e.y,r,t.height-r)*n;return[o,a]}function yo(e,t){if(t){const n=e.position.x+e.dimensions.width-t.dimensions.width,r=e.position.y+e.dimensions.height-t.dimensions.height;if(n>0||r>0||e.position.x<0||e.position.y<0){let o={};if(typeof t.style=="function"?o={...t.style(t)}:t.style&&(o={...t.style}),o.width=o.width??`${t.dimensions.width}px`,o.height=o.height??`${t.dimensions.height}px`,n>0)if(typeof o.width=="string"){const a=Number(o.width.replace("px",""));o.width=`${a+n}px`}else o.width+=n;if(r>0)if(typeof o.height=="string"){const a=Number(o.height.replace("px",""));o.height=`${a+r}px`}else o.height+=r;if(e.position.x<0){const a=Math.abs(e.position.x);if(t.position.x=t.position.x-a,typeof o.width=="string"){const i=Number(o.width.replace("px",""));o.width=`${i+a}px`}else o.width+=a;e.position.x=0}if(e.position.y<0){const a=Math.abs(e.position.y);if(t.position.y=t.position.y-a,typeof o.height=="string"){const i=Number(o.height.replace("px",""));o.height=`${i+a}px`}else o.height+=a;e.position.y=0}t.dimensions.width=Number(o.width.toString().replace("px","")),t.dimensions.height=Number(o.height.toString().replace("px","")),typeof t.style=="function"?t.style=a=>{const i=t.style;return{...i(a),...o}}:t.style={...t.style,...o}}}}function ta(e,t){var n,r;const o=e.filter(i=>i.type==="add"||i.type==="remove");for(const i of o)if(i.type==="add")t.findIndex(l=>l.id===i.item.id)===-1&&t.push(i.item);else if(i.type==="remove"){const s=t.findIndex(l=>l.id===i.id);s!==-1&&t.splice(s,1)}const a=t.map(i=>i.id);for(const i of t)for(const s of e)if(s.id===i.id)switch(s.type){case"select":i.selected=s.selected;break;case"position":if(Kt(i)&&(typeof s.position<"u"&&(i.position=s.position),typeof s.dragging<"u"&&(i.dragging=s.dragging),i.expandParent&&i.parentNode)){const l=t[a.indexOf(i.parentNode)];l&&Kt(l)&&yo(i,l)}break;case"dimensions":if(Kt(i)&&(typeof s.dimensions<"u"&&(i.dimensions=s.dimensions),typeof s.updateStyle<"u"&&s.updateStyle&&(i.style={...i.style||{},width:`${(n=s.dimensions)==null?void 0:n.width}px`,height:`${(r=s.dimensions)==null?void 0:r.height}px`}),typeof s.resizing<"u"&&(i.resizing=s.resizing),i.expandParent&&i.parentNode)){const l=t[a.indexOf(i.parentNode)];l&&Kt(l)&&(!!l.dimensions.width&&!!l.dimensions.height?yo(i,l):Ae(()=>{yo(i,l)}))}break}return t}function ut(e,t){return{id:e,type:"select",selected:t}}function na(e){return{item:e,type:"add"}}function oa(e){return{id:e,type:"remove"}}function ra(e,t,n,r,o){return{id:e,source:t,target:n,sourceHandle:r||null,targetHandle:o||null,type:"remove"}}function ct(e,t=new Set,n=!1){const r=[];for(const[o,a]of e){const i=t.has(o);!(a.selected===void 0&&!i)&&a.selected!==i&&(n&&(a.selected=i),r.push(ut(a.id,i)))}return r}const ia=()=>{};function U(e){const t=new Set;let n=ia,r=()=>!1;const o=()=>t.size>0||r(),a=f=>{n=f},i=()=>{n=ia},s=f=>{r=f},l=()=>{r=()=>!1},c=f=>{t.delete(f)};return{on:f=>{t.add(f);const h=()=>c(f);return zt(h),{off:h}},off:c,trigger:f=>{const h=[n];return o()?h.push(...t):e&&h.push(e),Promise.allSettled(h.map(m=>m(f)))},hasListeners:o,listeners:t,setEmitter:a,removeEmitter:i,setHasEmitListeners:s,removeHasEmitListeners:l}}function aa(e,t,n){let r=e;do{if(r&&r.matches(t))return!0;if(r===n)return!1;r=r.parentElement}while(r);return!1}function jd(e,t,n,r){var o,a;const i=new Map;for(const[s,l]of e)(l.selected||l.id===r)&&(!l.parentNode||!Ki(l,e))&&(l.draggable||t&&typeof l.draggable>"u")&&e.get(s)&&i.set(s,{id:l.id,position:l.position||{x:0,y:0},distance:{x:n.x-((o=l.computedPosition)==null?void 0:o.x)||0,y:n.y-((a=l.computedPosition)==null?void 0:a.y)||0},from:{x:l.computedPosition.x,y:l.computedPosition.y},extent:l.extent,parentNode:l.parentNode,dimensions:{...l.dimensions},expandParent:l.expandParent});return Array.from(i.values())}function wo({id:e,dragItems:t,findNode:n}){const r=[];for(const o of t){const a=n(o.id);a&&r.push(a)}return[e?r.find(o=>o.id===e):r[0],r]}function sa(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 Wd(e,t,n){const[r,o,a,i]=typeof e!="string"?sa(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+i,n.computedPosition.y+r],[n.computedPosition.x+n.dimensions.width-o,n.computedPosition.y+n.dimensions.height-a]]:!1}function Xd(e,t,n,r){let o=e.extent||n;if((o==="parent"||!Array.isArray(o)&&(o==null?void 0:o.range)==="parent")&&!e.expandParent)if(e.parentNode&&r&&e.dimensions.width&&e.dimensions.height){const a=Wd(o,e,r);a&&(o=a)}else t(new Te(Ce.NODE_EXTENT_INVALID,e.id)),o=n;else if(Array.isArray(o)){const a=(r==null?void 0:r.computedPosition.x)||0,i=(r==null?void 0:r.computedPosition.y)||0;o=[[o[0][0]+a,o[0][1]+i],[o[1][0]+a,o[1][1]+i]]}else if(o!=="parent"&&(o!=null&&o.range)&&Array.isArray(o.range)){const[a,i,s,l]=sa(o.padding),c=(r==null?void 0:r.computedPosition.x)||0,u=(r==null?void 0:r.computedPosition.y)||0;o=[[o.range[0][0]+c+l,o.range[0][1]+u+a],[o.range[1][0]+c-i,o.range[1][1]+u-s]]}return o==="parent"?[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]]:o}function Ud({width:e,height:t},n){return[n[0],[n[1][0]-(e||0),n[1][1]-(t||0)]]}function bo(e,t,n,r,o){const a=Ud(e.dimensions,Xd(e,n,r,o)),i=Hi(t,a);return{position:{x:i.x-((o==null?void 0:o.computedPosition.x)||0),y:i.y-((o==null?void 0:o.computedPosition.y)||0)},computedPosition:i}}function Pt(e,t,n=Q.Left,r=!1){const o=((t==null?void 0:t.x)??0)+e.computedPosition.x,a=((t==null?void 0:t.y)??0)+e.computedPosition.y,{width:i,height:s}=t??Jd(e);if(r)return{x:o+i/2,y:a+s/2};switch((t==null?void 0:t.position)??n){case Q.Top:return{x:o+i/2,y:a};case Q.Right:return{x:o+i,y:a+s/2};case Q.Bottom:return{x:o+i/2,y:a+s};case Q.Left:return{x:o,y:a+s/2}}}function la(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Zd({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:r,targetWidth:o,targetHeight:a,width:i,height:s,viewport:l}){const c={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+o),y2:Math.max(e.y+r,t.y+a)};c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const u=ji({x:(0-l.x)/l.zoom,y:(0-l.y)/l.zoom,width:i/l.zoom,height:s/l.zoom}),d=Math.max(0,Math.min(u.x2,c.x2)-Math.max(u.x,c.x)),f=Math.max(0,Math.min(u.y2,c.y2)-Math.max(u.y,c.y));return Math.ceil(d*f)>0}function Kd(e,t,n=!1){const r=typeof e.zIndex=="number";let o=r?e.zIndex:0;const a=t(e.source),i=t(e.target);return!a||!i?0:(n&&(o=r?e.zIndex:Math.max(a.computedPosition.z||0,i.computedPosition.z||0)),o)}var Ce=(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))(Ce||{});const ua={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 r;super((r=ua[t])==null?void 0:r.call(ua,...n)),this.name="VueFlowError",this.code=t,this.args=n}}function xo(e){return"clientX"in e}function Qd(e){return"sourceEvent"in e}function Ue(e,t){const n=xo(e);let r,o;return n?(r=e.clientX,o=e.clientY):"touches"in e&&e.touches.length>0?(r=e.touches[0].clientX,o=e.touches[0].clientY):"changedTouches"in e&&e.changedTouches.length>0?(r=e.changedTouches[0].clientX,o=e.changedTouches[0].clientY):(r=0,o=0),{x:r-((t==null?void 0:t.left)??0),y:o-((t==null?void 0:t.top)??0)}}const On=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Jd(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 Tn(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}const ef=()=>!0;function Eo(e){e==null||e.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function tf(e,t,n){const r=[],o={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const a of t.values())In(o,$n(a))>0&&r.push(a);return r}const nf=250;function of(e,t,n,r){var o,a;let i=[],s=Number.POSITIVE_INFINITY;const l=tf(e,n,t+nf);for(const c of l){const u=[...((o=c.handleBounds)==null?void 0:o.source)??[],...((a=c.handleBounds)==null?void 0:a.target)??[]];for(const d of u){if(r.nodeId===d.nodeId&&r.type===d.type&&r.id===d.id)continue;const{x:f,y:h}=Pt(c,d,d.position,!0),m=Math.sqrt((f-e.x)**2+(h-e.y)**2);m>t||(m<s?(i=[{...d,x:f,y:h}],s=m):m===s&&i.push({...d,x:f,y:h}))}}if(!i.length)return null;if(i.length>1){const c=r.type==="source"?"target":"source";return i.find(u=>u.type===c)??i[0]}return i[0]}function ca(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:o,fromType:a,doc:i,lib:s,flowId:l,isValidConnection:c=ef},u,d,f,h){const m=a==="target",w=t?i.querySelector(`.${s}-flow__handle[data-id="${l}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:v,y:x}=Ue(e),_=i.elementFromPoint(v,x),g=_!=null&&_.classList.contains(`${s}-flow__handle`)?_:w,E={handleDomNode:g,isValid:!1,connection:null,toHandle:null};if(g){const R=da(void 0,g),z=g.getAttribute("data-nodeid"),M=g.getAttribute("data-handleid"),b=g.classList.contains("connectable"),$=g.classList.contains("connectableend");if(!z||!R)return E;const T={source:m?z:r,sourceHandle:m?M:o,target:m?r:z,targetHandle:m?o:M};E.connection=T;const p=b&&$&&(n===st.Strict?m&&R==="source"||!m&&R==="target":z!==r||M!==o);E.isValid=p&&c(T,{nodes:d,edges:u,sourceNode:f(T.source),targetNode:f(T.target)}),E.toHandle=fa(z,R,M,h,n,!0)}return E}function da(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function rf(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function af(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function fa(e,t,n,r,o,a=!1){var i,s,l;const c=r.get(e);if(!c)return null;const u=o===st.Strict?(i=c.handleBounds)==null?void 0:i[t]:[...((s=c.handleBounds)==null?void 0:s.source)??[],...((l=c.handleBounds)==null?void 0:l.target)??[]],d=(n?u==null?void 0:u.find(f=>f.id===n):u==null?void 0:u[0])??null;return d&&a?{...d,...Pt(c,d,d.position,!0)}:d}const No={[Q.Left]:Q.Right,[Q.Right]:Q.Left,[Q.Top]:Q.Bottom,[Q.Bottom]:Q.Top},sf=["production","prod"];function tn(e,...t){ha()&&console.warn(`[Vue Flow]: ${e}`,...t)}function ha(){return!sf.includes("production")}function pa(e,t,n,r,o){const a=t.querySelectorAll(`.vue-flow__handle.${e}`);return a!=null&&a.length?Array.from(a).map(i=>{const s=i.getBoundingClientRect();return{id:i.getAttribute("data-handleid"),type:e,nodeId:o,position:i.getAttribute("data-handlepos"),x:(s.left-n.left)/r,y:(s.top-n.top)/r,...Mn(i)}}):null}function So(e,t,n,r,o,a=!1,i){o.value=!1,e.selected?(a||e.selected&&t)&&(r([e]),Ae(()=>{i.blur()})):n([e])}function $e(e){return typeof Z(e)<"u"}function lf(e,t,n,r){if(!e||!e.source||!e.target)return n(new Te(Ce.EDGE_INVALID,(e==null?void 0:e.id)??"[ID UNKNOWN]")),!1;let o;return lt(e)?o=e:o={...e,id:qi(e)},o=Gi(o,void 0,r),Ld(o,t)?!1:o}function uf(e,t,n,r,o){if(!t.source||!t.target)return o(new Te(Ce.EDGE_INVALID,e.id)),!1;if(!n)return o(new Te(Ce.EDGE_NOT_FOUND,e.id)),!1;const{id:a,...i}=e;return{...i,id:r?qi(t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function va(e,t,n){const r={},o=[];for(let a=0;a<e.length;++a){const i=e[a];if(!Nt(i)){n(new Te(Ce.NODE_INVALID,i==null?void 0:i.id)||`[ID UNKNOWN|INDEX ${a}]`);continue}const s=zd(i,t(i.id),i.parentNode);i.parentNode&&(r[i.parentNode]=!0),o[a]=s}for(const a of o){const i=t(a.parentNode)||o.find(s=>s.id===a.parentNode);a.parentNode&&!i&&n(new Te(Ce.NODE_MISSING_PARENT,a.id,a.parentNode)),(a.parentNode||r[a.id])&&(r[a.id]&&(a.isParent=!0),i&&(i.isParent=!0))}return o}function ga(e,t,n,r,o,a){let i=o;const s=r.get(i)||new Map;r.set(i,s.set(n,t)),i=`${o}-${e}`;const l=r.get(i)||new Map;if(r.set(i,l.set(n,t)),a){i=`${o}-${e}-${a}`;const c=r.get(i)||new Map;r.set(i,c.set(n,t))}}function ko(e,t,n){e.clear();for(const r of n){const{source:o,target:a,sourceHandle:i=null,targetHandle:s=null}=r,l={edgeId:r.id,source:o,target:a,sourceHandle:i,targetHandle:s},c=`${o}-${i}--${a}-${s}`,u=`${a}-${s}--${o}-${i}`;ga("source",l,u,e,o,i),ga("target",l,c,e,a,s)}}function ma(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Co(e,t,n,r,o,a,i,s){const l=[];for(const c of e){const u=lt(c)?c:lf(c,s,o,a);if(!u)continue;const d=n(u.source),f=n(u.target);if(!d||!f){o(new Te(Ce.EDGE_SOURCE_TARGET_MISSING,u.id,u.source,u.target));continue}if(!d){o(new Te(Ce.EDGE_SOURCE_MISSING,u.id,u.source));continue}if(!f){o(new Te(Ce.EDGE_TARGET_MISSING,u.id,u.target));continue}if(t&&!t(u,{edges:s,nodes:i,sourceNode:d,targetNode:f})){o(new Te(Ce.EDGE_INVALID,u.id));continue}const h=r(u.id);l.push({...Gi(u,h,a),sourceNode:d,targetNode:f})}return l}const _a=Symbol("vueFlow"),ya=Symbol("nodeId"),wa=Symbol("nodeRef"),cf=Symbol("edgeId"),df=Symbol("edgeRef"),Pn=Symbol("slots");function ba(e){const{vueFlowRef:t,snapToGrid:n,snapGrid:r,noDragClassName:o,nodeLookup:a,nodeExtent:i,nodeDragThreshold:s,viewport:l,autoPanOnNodeDrag:c,autoPanSpeed:u,nodesDraggable:d,panBy:f,findNode:h,multiSelectionActive:m,nodesSelectionActive:w,selectNodesOnDrag:v,removeSelectedElements:x,addSelectedNodes:_,updateNodePositions:g,emits:E}=Ne(),{onStart:R,onDrag:z,onStop:M,onClick:b,el:$,disabled:T,id:S,selectable:p,dragHandle:L}=e,y=Qe(!1);let O=[],I,H=null,F={x:void 0,y:void 0},j={x:0,y:0},Y=null,W=!1,X=!1,P=0,B=!1;const A=pf(),V=({x:ae,y:le})=>{F={x:ae,y:le};let k=!1;if(O=O.map(N=>{const D={x:ae-N.distance.x,y:le-N.distance.y},{computedPosition:C}=bo(N,n.value?Tn(D,r.value):D,E.error,i.value,N.parentNode?h(N.parentNode):void 0);return k=k||N.position.x!==C.x||N.position.y!==C.y,N.position=C,N}),X=X||k,!!k&&(g(O,!0,!0),y.value=!0,Y)){const[N,D]=wo({id:S,dragItems:O,findNode:h});z({event:Y,node:N,nodes:D})}},q=()=>{if(!H)return;const[ae,le]=ea(j,H,u.value);if(ae!==0||le!==0){const k={x:(F.x??0)-ae/l.value.zoom,y:(F.y??0)-le/l.value.zoom};f({x:ae,y:le})&&V(k)}P=requestAnimationFrame(q)},ne=(ae,le)=>{W=!0;const k=h(S);!v.value&&!m.value&&k&&(k.selected||x()),k&&pe(p)&&v.value&&So(k,m.value,_,x,w,!1,le);const N=A(ae.sourceEvent);if(F=N,O=jd(a.value,d.value,N,S),O.length){const[D,C]=wo({id:S,dragItems:O,findNode:h});R({event:ae.sourceEvent,node:D,nodes:C})}},ee=(ae,le)=>{var k;ae.sourceEvent.type==="touchmove"&&ae.sourceEvent.touches.length>1||(X=!1,s.value===0&&ne(ae,le),F=A(ae.sourceEvent),H=((k=t.value)==null?void 0:k.getBoundingClientRect())||null,j=Ue(ae.sourceEvent,H))},ue=(ae,le)=>{const k=A(ae.sourceEvent);if(!B&&W&&c.value&&(B=!0,q()),!W){const N=k.xSnapped-(F.x??0),D=k.ySnapped-(F.y??0);Math.sqrt(N*N+D*D)>s.value&&ne(ae,le)}(F.x!==k.xSnapped||F.y!==k.ySnapped)&&O.length&&W&&(Y=ae.sourceEvent,j=Ue(ae.sourceEvent,H),V(k))},me=ae=>{let le=!1;if(!W&&!y.value&&!m.value){const k=ae.sourceEvent,N=A(k),D=N.xSnapped-(F.x??0),C=N.ySnapped-(F.y??0),G=Math.sqrt(D*D+C*C);G!==0&&G<=s.value&&(b==null||b(k),le=!0)}if(O.length&&!le){X&&(g(O,!1,!1),X=!1);const[k,N]=wo({id:S,dragItems:O,findNode:h});M({event:ae.sourceEvent,node:k,nodes:N})}O=[],y.value=!1,B=!1,W=!1,F={x:void 0,y:void 0},cancelAnimationFrame(P)};return ye([()=>pe(T),$],([ae,le],k,N)=>{if(le){const D=Le(le);ae||(I=Ru().on("start",C=>ee(C,le)).on("drag",C=>ue(C,le)).on("end",C=>me(C)).filter(C=>{const G=C.target,J=pe(L);return!C.button&&(!o.value||!aa(G,`.${o.value}`,le)&&(!J||aa(G,J,le)))}),D.call(I)),N(()=>{D.on(".drag",null),I&&(I.on("start",null),I.on("drag",null),I.on("end",null))})}}),y}function ff(){return{doubleClick:U(),click:U(),mouseEnter:U(),mouseMove:U(),mouseLeave:U(),contextMenu:U(),updateStart:U(),update:U(),updateEnd:U()}}function hf(e,t){const n=ff();return n.doubleClick.on(r=>{var o,a;t.edgeDoubleClick(r),(a=(o=e.events)==null?void 0:o.doubleClick)==null||a.call(o,r)}),n.click.on(r=>{var o,a;t.edgeClick(r),(a=(o=e.events)==null?void 0:o.click)==null||a.call(o,r)}),n.mouseEnter.on(r=>{var o,a;t.edgeMouseEnter(r),(a=(o=e.events)==null?void 0:o.mouseEnter)==null||a.call(o,r)}),n.mouseMove.on(r=>{var o,a;t.edgeMouseMove(r),(a=(o=e.events)==null?void 0:o.mouseMove)==null||a.call(o,r)}),n.mouseLeave.on(r=>{var o,a;t.edgeMouseLeave(r),(a=(o=e.events)==null?void 0:o.mouseLeave)==null||a.call(o,r)}),n.contextMenu.on(r=>{var o,a;t.edgeContextMenu(r),(a=(o=e.events)==null?void 0:o.contextMenu)==null||a.call(o,r)}),n.updateStart.on(r=>{var o,a;t.edgeUpdateStart(r),(a=(o=e.events)==null?void 0:o.updateStart)==null||a.call(o,r)}),n.update.on(r=>{var o,a;t.edgeUpdate(r),(a=(o=e.events)==null?void 0:o.update)==null||a.call(o,r)}),n.updateEnd.on(r=>{var o,a;t.edgeUpdateEnd(r),(a=(o=e.events)==null?void 0:o.updateEnd)==null||a.call(o,r)}),Object.entries(n).reduce((r,[o,a])=>(r.emit[o]=a.trigger,r.on[o]=a.on,r),{emit:{},on:{}})}function pf(){const{viewport:e,snapGrid:t,snapToGrid:n,vueFlowRef:r}=Ne();return o=>{var a;const i=((a=r.value)==null?void 0:a.getBoundingClientRect())??{left:0,top:0},s=Qd(o)?o.sourceEvent:o,{x:l,y:c}=Ue(s,i),u=Jt({x:l,y:c},e.value),{x:d,y:f}=n.value?Tn(u,t.value):u;return{xSnapped:d,ySnapped:f,...u}}}function An(){return!0}function xa({handleId:e,nodeId:t,type:n,isValidConnection:r,edgeUpdaterType:o,onEdgeUpdate:a,onEdgeUpdateEnd:i}){const{id:s,vueFlowRef:l,connectionMode:c,connectionRadius:u,connectOnClick:d,connectionClickStartHandle:f,nodesConnectable:h,autoPanOnConnect:m,autoPanSpeed:w,findNode:v,panBy:x,startConnection:_,updateConnection:g,endConnection:E,emits:R,viewport:z,edges:M,nodes:b,isValidConnection:$,nodeLookup:T}=Ne();let S=null,p=!1,L=null;function y(I){var H;const F=pe(n)==="target",j=xo(I),Y=Fi(I.target),W=I.currentTarget;if(W&&(j&&I.button===0||!j)){let X=function(ie){k=Ue(ie,me),V=of(Jt(k,z.value,!1,[1,1]),u.value,T.value,C),N||(D(),N=!0);const he=ca(ie,{handle:V,connectionMode:c.value,fromNodeId:pe(t),fromHandleId:pe(e),fromType:F?"target":"source",isValidConnection:A,doc:Y,lib:"vue",flowId:s,nodeLookup:T.value},M.value,b.value,v,T.value);L=he.handleDomNode,S=he.connection,p=af(!!V,he.isValid);const ve={...K,isValid:p,to:he.toHandle&&p?Qt({x:he.toHandle.x,y:he.toHandle.y},z.value):k,toHandle:he.toHandle,toPosition:p&&he.toHandle?he.toHandle.position:No[C.position],toNode:he.toHandle?T.value.get(he.toHandle.nodeId):null};if(p&&V&&(K!=null&&K.toHandle)&&ve.toHandle&&K.toHandle.type===ve.toHandle.type&&K.toHandle.nodeId===ve.toHandle.nodeId&&K.toHandle.id===ve.toHandle.id&&K.to.x===ve.to.x&&K.to.y===ve.to.y)return;const be=V??he.toHandle;if(g(be&&p?Qt({x:be.x,y:be.y},z.value):k,be,rf(!!be,p)),K=ve,!V&&!p&&!L)return Eo(le);S&&S.source!==S.target&&L&&(Eo(le),le=L,L.classList.add("connecting","vue-flow__handle-connecting"),L.classList.toggle("valid",!!p),L.classList.toggle("vue-flow__handle-valid",!!p))},P=function(ie){"touches"in ie&&ie.touches.length>0||((V||L)&&S&&p&&(a?a(ie,S):R.connect(S)),R.connectEnd(ie),o&&(i==null||i(ie)),Eo(le),cancelAnimationFrame(q),E(ie),N=!1,p=!1,S=null,L=null,Y.removeEventListener("mousemove",X),Y.removeEventListener("mouseup",P),Y.removeEventListener("touchmove",X),Y.removeEventListener("touchend",P))};const B=v(pe(t));let A=pe(r)||$.value||An;!A&&B&&(A=(F?B.isValidSourcePos:B.isValidTargetPos)||An);let V,q=0;const{x:ne,y:ee}=Ue(I),ue=da(pe(o),W),me=(H=l.value)==null?void 0:H.getBoundingClientRect();if(!me||!ue)return;const ae=fa(pe(t),ue,pe(e),T.value,c.value);if(!ae)return;let le,k=Ue(I,me),N=!1;const D=()=>{if(!m.value)return;const[ie,he]=ea(k,me,w.value);x({x:ie,y:he}),q=requestAnimationFrame(D)},C={...ae,nodeId:pe(t),type:ue,position:ae.position},G=T.value.get(pe(t)),oe={inProgress:!0,isValid:null,from:Pt(G,C,Q.Left,!0),fromHandle:C,fromPosition:C.position,fromNode:G,to:k,toHandle:null,toPosition:No[C.position],toNode:null};_({nodeId:pe(t),id:pe(e),type:ue,position:(W==null?void 0:W.getAttribute("data-handlepos"))||Q.Top,...k},{x:ne-me.left,y:ee-me.top}),R.connectStart({event:I,nodeId:pe(t),handleId:pe(e),handleType:ue});let K=oe;Y.addEventListener("mousemove",X),Y.addEventListener("mouseup",P),Y.addEventListener("touchmove",X),Y.addEventListener("touchend",P)}}function O(I){var H,F;if(!d.value)return;const j=pe(n)==="target";if(!f.value){R.clickConnectStart({event:I,nodeId:pe(t),handleId:pe(e)}),_({nodeId:pe(t),type:pe(n),id:pe(e),position:Q.Top,...Ue(I)},void 0,!0);return}let Y=pe(r)||$.value||An;const W=v(pe(t));if(!Y&&W&&(Y=(j?W.isValidSourcePos:W.isValidTargetPos)||An),W&&(typeof W.connectable>"u"?h.value:W.connectable)===!1)return;const X=Fi(I.target),P=ca(I,{handle:{nodeId:pe(t),id:pe(e),type:pe(n),position:Q.Top,...Ue(I)},connectionMode:c.value,fromNodeId:f.value.nodeId,fromHandleId:f.value.id??null,fromType:f.value.type,isValidConnection:Y,doc:X,lib:"vue",flowId:s,nodeLookup:T.value},M.value,b.value,v,T.value),B=((H=P.connection)==null?void 0:H.source)===((F=P.connection)==null?void 0:F.target);P.isValid&&P.connection&&!B&&R.connect(P.connection),R.clickConnectEnd(I),E(I,!0)}return{handlePointerDown:y,handleClick:O}}function vf(){return it(ya,"")}function Ea(e){const t=e??vf()??"",n=it(wa,Ee(null)),{findNode:r,edges:o,emits:a}=Ne(),i=r(t);return i||a.error(new Te(Ce.NODE_NOT_FOUND,t)),{id:t,nodeEl:n,node:i,parentNode:fe(()=>r(i.parentNode)),connectedEdges:fe(()=>Ui([i],o.value))}}function gf(){return{doubleClick:U(),click:U(),mouseEnter:U(),mouseMove:U(),mouseLeave:U(),contextMenu:U(),dragStart:U(),drag:U(),dragStop:U()}}function mf(e,t){const n=gf();return n.doubleClick.on(r=>{var o,a;t.nodeDoubleClick(r),(a=(o=e.events)==null?void 0:o.doubleClick)==null||a.call(o,r)}),n.click.on(r=>{var o,a;t.nodeClick(r),(a=(o=e.events)==null?void 0:o.click)==null||a.call(o,r)}),n.mouseEnter.on(r=>{var o,a;t.nodeMouseEnter(r),(a=(o=e.events)==null?void 0:o.mouseEnter)==null||a.call(o,r)}),n.mouseMove.on(r=>{var o,a;t.nodeMouseMove(r),(a=(o=e.events)==null?void 0:o.mouseMove)==null||a.call(o,r)}),n.mouseLeave.on(r=>{var o,a;t.nodeMouseLeave(r),(a=(o=e.events)==null?void 0:o.mouseLeave)==null||a.call(o,r)}),n.contextMenu.on(r=>{var o,a;t.nodeContextMenu(r),(a=(o=e.events)==null?void 0:o.contextMenu)==null||a.call(o,r)}),n.dragStart.on(r=>{var o,a;t.nodeDragStart(r),(a=(o=e.events)==null?void 0:o.dragStart)==null||a.call(o,r)}),n.drag.on(r=>{var o,a;t.nodeDrag(r),(a=(o=e.events)==null?void 0:o.drag)==null||a.call(o,r)}),n.dragStop.on(r=>{var o,a;t.nodeDragStop(r),(a=(o=e.events)==null?void 0:o.dragStop)==null||a.call(o,r)}),Object.entries(n).reduce((r,[o,a])=>(r.emit[o]=a.trigger,r.on[o]=a.on,r),{emit:{},on:{}})}function Na(){const{getSelectedNodes:e,nodeExtent:t,updateNodePositions:n,findNode:r,snapGrid:o,snapToGrid:a,nodesDraggable:i,emits:s}=Ne();return(l,c=!1)=>{const u=a.value?o.value[0]:5,d=a.value?o.value[1]:5,f=c?4:1,h=l.x*u*f,m=l.y*d*f,w=[];for(const v of e.value)if(v.draggable||i&&typeof v.draggable>"u"){const x={x:v.computedPosition.x+h,y:v.computedPosition.y+m},{position:_}=bo(v,x,s.error,t.value,v.parentNode?r(v.parentNode):void 0);w.push({id:v.id,position:_,from:v.position,distance:{x:l.x,y:l.y},dimensions:v.dimensions})}n(w,!0,!1)}}const Rn=.1,_f=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2;function dt(){return tn("Viewport not initialized yet."),Promise.resolve(!1)}const yf={zoomIn:dt,zoomOut:dt,zoomTo:dt,fitView:dt,setCenter:dt,fitBounds:dt,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:dt,setTransform:dt,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function wf(e){function t(r,o){return new Promise(a=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate((o==null?void 0:o.interpolate)==="linear"?Gt:_n).scaleBy($o(e.d3Selection,o==null?void 0:o.duration,o==null?void 0:o.ease,()=>{a(!0)}),r):a(!1)})}function n(r,o,a,i){return new Promise(s=>{var l;const{x:c,y:u}=Hi({x:-r,y:-o},e.translateExtent),d=Dt.translate(-c,-u).scale(a);e.d3Selection&&e.d3Zoom?(l=e.d3Zoom)==null||l.interpolate((i==null?void 0:i.interpolate)==="linear"?Gt:_n).transform($o(e.d3Selection,i==null?void 0:i.duration,i==null?void 0:i.ease,()=>{s(!0)}),d):s(!1)})}return fe(()=>e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height?{viewportInitialized:!0,zoomIn:o=>t(1.2,o),zoomOut:o=>t(1/1.2,o),zoomTo:(o,a)=>new Promise(i=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate((a==null?void 0:a.interpolate)==="linear"?Gt:_n).scaleTo($o(e.d3Selection,a==null?void 0:a.duration,a==null?void 0:a.ease,()=>{i(!0)}),o):i(!1)}),setViewport:(o,a)=>n(o.x,o.y,o.zoom,a),setTransform:(o,a)=>n(o.x,o.y,o.zoom,a),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:(o={padding:Rn,includeHiddenNodes:!1,duration:0})=>{var a,i;const s=[];for(const f of e.nodes)f.dimensions.width&&f.dimensions.height&&((o==null?void 0:o.includeHiddenNodes)||!f.hidden)&&(!((a=o.nodes)!=null&&a.length)||(i=o.nodes)!=null&&i.length&&o.nodes.includes(f.id))&&s.push(f);if(!s.length)return Promise.resolve(!1);const l=Wi(s),{x:c,y:u,zoom:d}=Zi(l,e.dimensions.width,e.dimensions.height,o.minZoom??e.minZoom,o.maxZoom??e.maxZoom,o.padding??Rn);return n(c,u,d,o)},setCenter:(o,a,i)=>{const s=typeof(i==null?void 0:i.zoom)<"u"?i.zoom:e.maxZoom,l=e.dimensions.width/2-o*s,c=e.dimensions.height/2-a*s;return n(l,c,s,i)},fitBounds:(o,a={padding:Rn})=>{const{x:i,y:s,zoom:l}=Zi(o,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,a.padding??Rn);return n(i,s,l,a)},project:o=>Jt(o,e.viewport,e.snapToGrid,e.snapGrid),screenToFlowCoordinate:o=>{if(e.vueFlowRef){const{x:a,y:i}=e.vueFlowRef.getBoundingClientRect(),s={x:o.x-a,y:o.y-i};return Jt(s,e.viewport,e.snapToGrid,e.snapGrid)}return{x:0,y:0}},flowToScreenCoordinate:o=>{if(e.vueFlowRef){const{x:a,y:i}=e.vueFlowRef.getBoundingClientRect(),s={x:o.x+a,y:o.y+i};return Qt(s,e.viewport)}return{x:0,y:0}}}:yf)}function $o(e,t=0,n=_f,r=()=>{}){const o=typeof t=="number"&&t>0;return o||r(),o?e.transition().duration(t).ease(n).on("end",r):e}function bf(e,t,n){const r=Yn(!0);return r.run(()=>{const o=()=>{r.run(()=>{let w,v,x=!!(n.nodes.value.length||n.edges.value.length);w=kt([e.modelValue,()=>{var _,g;return(g=(_=e.modelValue)==null?void 0:_.value)==null?void 0:g.length}],([_])=>{_&&Array.isArray(_)&&(v==null||v.pause(),n.setElements(_),!v&&!x&&_.length?x=!0:v==null||v.resume())}),v=kt([n.nodes,n.edges,()=>n.edges.value.length,()=>n.nodes.value.length],([_,g])=>{var E;(E=e.modelValue)!=null&&E.value&&Array.isArray(e.modelValue.value)&&(w==null||w.pause(),e.modelValue.value=[..._,...g],Ae(()=>{w==null||w.resume()}))},{immediate:x}),At(()=>{w==null||w.stop(),v==null||v.stop()})})},a=()=>{r.run(()=>{let w,v,x=!!n.nodes.value.length;w=kt([e.nodes,()=>{var _,g;return(g=(_=e.nodes)==null?void 0:_.value)==null?void 0:g.length}],([_])=>{_&&Array.isArray(_)&&(v==null||v.pause(),n.setNodes(_),!v&&!x&&_.length?x=!0:v==null||v.resume())}),v=kt([n.nodes,()=>n.nodes.value.length],([_])=>{var g;(g=e.nodes)!=null&&g.value&&Array.isArray(e.nodes.value)&&(w==null||w.pause(),e.nodes.value=[..._],Ae(()=>{w==null||w.resume()}))},{immediate:x}),At(()=>{w==null||w.stop(),v==null||v.stop()})})},i=()=>{r.run(()=>{let w,v,x=!!n.edges.value.length;w=kt([e.edges,()=>{var _,g;return(g=(_=e.edges)==null?void 0:_.value)==null?void 0:g.length}],([_])=>{_&&Array.isArray(_)&&(v==null||v.pause(),n.setEdges(_),!v&&!x&&_.length?x=!0:v==null||v.resume())}),v=kt([n.edges,()=>n.edges.value.length],([_])=>{var g;(g=e.edges)!=null&&g.value&&Array.isArray(e.edges.value)&&(w==null||w.pause(),e.edges.value=[..._],Ae(()=>{w==null||w.resume()}))},{immediate:x}),At(()=>{w==null||w.stop(),v==null||v.stop()})})},s=()=>{r.run(()=>{ye(()=>t.maxZoom,()=>{t.maxZoom&&$e(t.maxZoom)&&n.setMaxZoom(t.maxZoom)},{immediate:!0})})},l=()=>{r.run(()=>{ye(()=>t.minZoom,()=>{t.minZoom&&$e(t.minZoom)&&n.setMinZoom(t.minZoom)},{immediate:!0})})},c=()=>{r.run(()=>{ye(()=>t.translateExtent,()=>{t.translateExtent&&$e(t.translateExtent)&&n.setTranslateExtent(t.translateExtent)},{immediate:!0})})},u=()=>{r.run(()=>{ye(()=>t.nodeExtent,()=>{t.nodeExtent&&$e(t.nodeExtent)&&n.setNodeExtent(t.nodeExtent)},{immediate:!0})})},d=()=>{r.run(()=>{ye(()=>t.applyDefault,()=>{$e(t.applyDefault)&&(n.applyDefault.value=t.applyDefault)},{immediate:!0})})},f=()=>{r.run(()=>{const w=async v=>{let x=v;typeof t.autoConnect=="function"&&(x=await t.autoConnect(v)),x!==!1&&n.addEdges([x])};ye(()=>t.autoConnect,()=>{$e(t.autoConnect)&&(n.autoConnect.value=t.autoConnect)},{immediate:!0}),ye(n.autoConnect,(v,x,_)=>{v?n.onConnect(w):n.hooks.value.connect.off(w),_(()=>{n.hooks.value.connect.off(w)})},{immediate:!0})})},h=()=>{const w=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const v of Object.keys(t)){const x=v;if(!w.includes(x)){const _=xe(()=>t[x]),g=n[x];an(g)&&r.run(()=>{ye(_,E=>{$e(E)&&(g.value=E)},{immediate:!0})})}}};(()=>{o(),a(),i(),l(),s(),c(),u(),d(),f(),h()})()}),()=>r.stop()}function xf(){return{edgesChange:U(),nodesChange:U(),nodeDoubleClick:U(),nodeClick:U(),nodeMouseEnter:U(),nodeMouseMove:U(),nodeMouseLeave:U(),nodeContextMenu:U(),nodeDragStart:U(),nodeDrag:U(),nodeDragStop:U(),nodesInitialized:U(),miniMapNodeClick:U(),miniMapNodeDoubleClick:U(),miniMapNodeMouseEnter:U(),miniMapNodeMouseMove:U(),miniMapNodeMouseLeave:U(),connect:U(),connectStart:U(),connectEnd:U(),clickConnectStart:U(),clickConnectEnd:U(),paneReady:U(),init:U(),move:U(),moveStart:U(),moveEnd:U(),selectionDragStart:U(),selectionDrag:U(),selectionDragStop:U(),selectionContextMenu:U(),selectionStart:U(),selectionEnd:U(),viewportChangeStart:U(),viewportChange:U(),viewportChangeEnd:U(),paneScroll:U(),paneClick:U(),paneContextMenu:U(),paneMouseEnter:U(),paneMouseMove:U(),paneMouseLeave:U(),edgeContextMenu:U(),edgeMouseEnter:U(),edgeMouseMove:U(),edgeMouseLeave:U(),edgeDoubleClick:U(),edgeClick:U(),edgeUpdateStart:U(),edgeUpdate:U(),edgeUpdateEnd:U(),updateNodeInternals:U(),error:U(e=>tn(e.message))}}function Ef(e,t){const n=gt();Mr(()=>{for(const[o,a]of Object.entries(t.value)){const i=s=>{e(o,s)};a.setEmitter(i),zt(a.removeEmitter),a.setHasEmitListeners(()=>r(o)),zt(a.removeHasEmitListeners)}});function r(o){var a;const i=Nf(o);return!!((a=n==null?void 0:n.vnode.props)==null?void 0:a[i])}}function Nf(e){const[t,...n]=e.split(":");return`on${t.replace(/(?:^|-)(\w)/g,(o,a)=>a.toUpperCase())}${n.length?`:${n.join(":")}`:""}`}function Sa(){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:go.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:Ut.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:xt.Bezier,style:{}},connectionMode:st.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:On()?"Meta":"Control",zoomActivationKeyCode:On()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:xf(),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 Sf=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function kf(e,t,n){const r=wf(e),o=k=>{const N=k??[];e.hooks.updateNodeInternals.trigger(N)},a=k=>Vd(k,e.nodes,e.edges),i=k=>Bd(k,e.nodes,e.edges),s=k=>Ui(k,e.edges),l=({id:k,type:N,nodeId:D})=>{var C;const G=k?`-${N}-${k}`:`-${N}`;return Array.from(((C=e.connectionLookup.get(`${D}${G}`))==null?void 0:C.values())??[])},c=k=>{if(k)return t.value.get(k)},u=k=>{if(k)return n.value.get(k)},d=(k,N,D)=>{var C,G;const J=[];for(const oe of k){const K={id:oe.id,type:"position",dragging:D,from:oe.from};if(N&&(K.position=oe.position,oe.parentNode)){const ie=c(oe.parentNode);K.position={x:K.position.x-(((C=ie==null?void 0:ie.computedPosition)==null?void 0:C.x)??0),y:K.position.y-(((G=ie==null?void 0:ie.computedPosition)==null?void 0:G.y)??0)}}J.push(K)}J!=null&&J.length&&e.hooks.nodesChange.trigger(J)},f=k=>{if(!e.vueFlowRef)return;const N=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!N)return;const D=window.getComputedStyle(N),{m22:C}=new window.DOMMatrixReadOnly(D.transform),G=[];for(const J of k){const oe=J,K=c(oe.id);if(K){const ie=Mn(oe.nodeElement);if(!!(ie.width&&ie.height&&(K.dimensions.width!==ie.width||K.dimensions.height!==ie.height||oe.forceUpdate))){const ve=oe.nodeElement.getBoundingClientRect();K.dimensions=ie,K.handleBounds.source=pa("source",oe.nodeElement,ve,C,K.id),K.handleBounds.target=pa("target",oe.nodeElement,ve,C,K.id),G.push({id:K.id,type:"dimensions",dimensions:ie})}}}!e.fitViewOnInitDone&&e.fitViewOnInit&&r.value.fitView().then(()=>{e.fitViewOnInitDone=!0}),G.length&&e.hooks.nodesChange.trigger(G)},h=(k,N)=>{const D=new Set,C=new Set;for(const oe of k)Nt(oe)?D.add(oe.id):lt(oe)&&C.add(oe.id);const G=ct(t.value,D,!0),J=ct(n.value,C);if(e.multiSelectionActive){for(const oe of D)G.push(ut(oe,N));for(const oe of C)J.push(ut(oe,N))}G.length&&e.hooks.nodesChange.trigger(G),J.length&&e.hooks.edgesChange.trigger(J)},m=k=>{if(e.multiSelectionActive){const N=k.map(D=>ut(D.id,!0));e.hooks.nodesChange.trigger(N);return}e.hooks.nodesChange.trigger(ct(t.value,new Set(k.map(N=>N.id)),!0)),e.hooks.edgesChange.trigger(ct(n.value))},w=k=>{if(e.multiSelectionActive){const N=k.map(D=>ut(D.id,!0));e.hooks.edgesChange.trigger(N);return}e.hooks.edgesChange.trigger(ct(n.value,new Set(k.map(N=>N.id)))),e.hooks.nodesChange.trigger(ct(t.value,new Set,!0))},v=k=>{h(k,!0)},x=k=>{const D=(k||e.nodes).map(C=>(C.selected=!1,ut(C.id,!1)));e.hooks.nodesChange.trigger(D)},_=k=>{const D=(k||e.edges).map(C=>(C.selected=!1,ut(C.id,!1)));e.hooks.edgesChange.trigger(D)},g=k=>{if(!k||!k.length)return h([],!1);const N=k.reduce((D,C)=>{const G=ut(C.id,!1);return Nt(C)?D.nodes.push(G):D.edges.push(G),D},{nodes:[],edges:[]});N.nodes.length&&e.hooks.nodesChange.trigger(N.nodes),N.edges.length&&e.hooks.edgesChange.trigger(N.edges)},E=k=>{var N;(N=e.d3Zoom)==null||N.scaleExtent([k,e.maxZoom]),e.minZoom=k},R=k=>{var N;(N=e.d3Zoom)==null||N.scaleExtent([e.minZoom,k]),e.maxZoom=k},z=k=>{var N;(N=e.d3Zoom)==null||N.translateExtent(k),e.translateExtent=k},M=k=>{e.nodeExtent=k,o()},b=k=>{var N;(N=e.d3Zoom)==null||N.clickDistance(k)},$=k=>{e.nodesDraggable=k,e.nodesConnectable=k,e.elementsSelectable=k},T=k=>{const N=k instanceof Function?k(e.nodes):k;!e.initialized&&!N.length||(e.nodes=va(N,c,e.hooks.error.trigger))},S=k=>{const N=k instanceof Function?k(e.edges):k;if(!e.initialized&&!N.length)return;const D=Co(N,e.isValidConnection,c,u,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);ko(e.connectionLookup,n.value,D),e.edges=D},p=k=>{const N=k instanceof Function?k([...e.nodes,...e.edges]):k;!e.initialized&&!N.length||(T(N.filter(Nt)),S(N.filter(lt)))},L=k=>{let N=k instanceof Function?k(e.nodes):k;N=Array.isArray(N)?N:[N];const D=va(N,c,e.hooks.error.trigger),C=[];for(const G of D)C.push(na(G));C.length&&e.hooks.nodesChange.trigger(C)},y=k=>{let N=k instanceof Function?k(e.edges):k;N=Array.isArray(N)?N:[N];const D=Co(N,e.isValidConnection,c,u,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),C=[];for(const G of D)C.push(na(G));C.length&&e.hooks.edgesChange.trigger(C)},O=(k,N=!0,D=!1)=>{const C=k instanceof Function?k(e.nodes):k,G=Array.isArray(C)?C:[C],J=[],oe=[];function K(he){const ve=s(he);for(const be of ve)(!$e(be.deletable)||be.deletable)&&oe.push(ra(be.id,be.source,be.target,be.sourceHandle,be.targetHandle))}function ie(he){const ve=[];for(const be of e.nodes)be.parentNode===he&&ve.push(be);if(ve.length){for(const be of ve)J.push(oa(be.id));N&&K(ve);for(const be of ve)ie(be.id)}}for(const he of G){const ve=typeof he=="string"?c(he):he;ve&&($e(ve.deletable)&&!ve.deletable||(J.push(oa(ve.id)),N&&K([ve]),D&&ie(ve.id)))}oe.length&&e.hooks.edgesChange.trigger(oe),J.length&&e.hooks.nodesChange.trigger(J)},I=k=>{const N=k instanceof Function?k(e.edges):k,D=Array.isArray(N)?N:[N],C=[];for(const G of D){const J=typeof G=="string"?u(G):G;J&&($e(J.deletable)&&!J.deletable||C.push(ra(typeof G=="string"?G:G.id,J.source,J.target,J.sourceHandle,J.targetHandle)))}e.hooks.edgesChange.trigger(C)},H=(k,N,D=!0)=>{const C=u(k.id);if(!C)return!1;const G=e.edges.indexOf(C),J=uf(k,N,C,D,e.hooks.error.trigger);if(J){const[oe]=Co([J],e.isValidConnection,c,u,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);return e.edges=e.edges.map((K,ie)=>ie===G?oe:K),ko(e.connectionLookup,n.value,[oe]),oe}return!1},F=(k,N,D={replace:!1})=>{const C=u(k);if(!C)return;const G=typeof N=="function"?N(C):N;C.data=D.replace?G:{...C.data,...G}},j=k=>ta(k,e.nodes),Y=k=>{const N=ta(k,e.edges);return ko(e.connectionLookup,n.value,N),N},W=(k,N,D={replace:!1})=>{const C=c(k);if(!C)return;const G=typeof N=="function"?N(C):N;D.replace?e.nodes.splice(e.nodes.indexOf(C),1,G):Object.assign(C,G)},X=(k,N,D={replace:!1})=>{const C=c(k);if(!C)return;const G=typeof N=="function"?N(C):N;C.data=D.replace?G:{...C.data,...G}},P=(k,N,D=!1)=>{D?e.connectionClickStartHandle=k:e.connectionStartHandle=k,e.connectionEndHandle=null,e.connectionStatus=null,N&&(e.connectionPosition=N)},B=(k,N=null,D=null)=>{e.connectionStartHandle&&(e.connectionPosition=k,e.connectionEndHandle=N,e.connectionStatus=D)},A=(k,N)=>{e.connectionPosition={x:Number.NaN,y:Number.NaN},e.connectionEndHandle=null,e.connectionStatus=null,N?e.connectionClickStartHandle=null:e.connectionStartHandle=null},V=k=>{const N=Rd(k),D=N?null:Kt(k)?k:c(k.id);return!N&&!D?[null,null,N]:[N?k:$n(D),D,N]},q=(k,N=!0,D=e.nodes)=>{const[C,G,J]=V(k);if(!C)return[];const oe=[];for(const K of D||e.nodes){if(!J&&(K.id===G.id||!K.computedPosition))continue;const ie=$n(K),he=In(ie,C);(N&&he>0||he>=ie.width*ie.height||he>=Number(C.width)*Number(C.height))&&oe.push(K)}return oe},ne=(k,N,D=!0)=>{const[C]=V(k);if(!C)return!1;const G=In(C,N);return D&&G>0||G>=Number(C.width)*Number(C.height)},ee=k=>{const{viewport:N,dimensions:D,d3Zoom:C,d3Selection:G,translateExtent:J}=e;if(!C||!G||!k.x&&!k.y)return!1;const oe=Dt.translate(N.x+k.x,N.y+k.y).scale(N.zoom),K=[[0,0],[D.width,D.height]],ie=C.constrain()(oe,K,J),he=e.viewport.x!==ie.x||e.viewport.y!==ie.y||e.viewport.zoom!==ie.k;return C.transform(G,ie),he},ue=k=>{const N=k instanceof Function?k(e):k,D=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];$e(N.defaultEdgeOptions)&&(e.defaultEdgeOptions=N.defaultEdgeOptions);const C=N.modelValue||N.nodes||N.edges?[]:void 0;C&&(N.modelValue&&C.push(...N.modelValue),N.nodes&&C.push(...N.nodes),N.edges&&C.push(...N.edges),p(C));const G=()=>{$e(N.maxZoom)&&R(N.maxZoom),$e(N.minZoom)&&E(N.minZoom),$e(N.translateExtent)&&z(N.translateExtent)};for(const J of Object.keys(N)){const oe=J,K=N[oe];![...Sf,...D].includes(oe)&&$e(K)&&(e[oe]=K)}Xn(()=>e.d3Zoom).not.toBeNull().then(G),e.initialized||(e.initialized=!0)};return{updateNodePositions:d,updateNodeDimensions:f,setElements:p,setNodes:T,setEdges:S,addNodes:L,addEdges:y,removeNodes:O,removeEdges:I,findNode:c,findEdge:u,updateEdge:H,updateEdgeData:F,updateNode:W,updateNodeData:X,applyEdgeChanges:Y,applyNodeChanges:j,addSelectedElements:v,addSelectedNodes:m,addSelectedEdges:w,setMinZoom:E,setMaxZoom:R,setTranslateExtent:z,setNodeExtent:M,setPaneClickDistance:b,removeSelectedElements:g,removeSelectedNodes:x,removeSelectedEdges:_,startConnection:P,updateConnection:B,endConnection:A,setInteractive:$,setState:ue,getIntersectingNodes:q,getIncomers:a,getOutgoers:i,getConnectedEdges:s,getHandleConnections:l,isNodeIntersecting:ne,panBy:ee,fitView:k=>r.value.fitView(k),zoomIn:k=>r.value.zoomIn(k),zoomOut:k=>r.value.zoomOut(k),zoomTo:(k,N)=>r.value.zoomTo(k,N),setViewport:(k,N)=>r.value.setViewport(k,N),setTransform:(k,N)=>r.value.setTransform(k,N),getViewport:()=>r.value.getViewport(),getTransform:()=>r.value.getTransform(),setCenter:(k,N,D)=>r.value.setCenter(k,N,D),fitBounds:(k,N)=>r.value.fitBounds(k,N),project:k=>r.value.project(k),screenToFlowCoordinate:k=>r.value.screenToFlowCoordinate(k),flowToScreenCoordinate:k=>r.value.flowToScreenCoordinate(k),toObject:()=>{const k=[],N=[];for(const D of e.nodes){const{computedPosition:C,handleBounds:G,selected:J,dimensions:oe,isParent:K,resizing:ie,dragging:he,events:ve,...be}=D;k.push(be)}for(const D of e.edges){const{selected:C,sourceNode:G,targetNode:J,events:oe,...K}=D;N.push(K)}return JSON.parse(JSON.stringify({nodes:k,edges:N,position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom,viewport:e.viewport}))},fromObject:k=>new Promise(N=>{const{nodes:D,edges:C,position:G,zoom:J,viewport:oe}=k;D&&T(D),C&&S(C);const[K,ie]=oe!=null&&oe.x&&(oe!=null&&oe.y)?[oe.x,oe.y]:G??[null,null];if(K&&ie){const he=(oe==null?void 0:oe.zoom)||J||e.viewport.zoom;return Xn(()=>r.value.viewportInitialized).toBe(!0).then(()=>{r.value.setViewport({x:K,y:ie,zoom:he}).then(()=>{N(!0)})})}else N(!0)}),updateNodeInternals:o,viewportHelper:r,$reset:()=>{const k=Sa();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){const N=Dt.translate(k.defaultViewport.x??0,k.defaultViewport.y??0).scale(Et(k.defaultViewport.zoom??1,k.minZoom,k.maxZoom)),D=e.viewportRef.getBoundingClientRect(),C=[[0,0],[D.width,D.height]],G=e.d3Zoom.constrain()(N,C,k.translateExtent);e.d3Zoom.transform(e.d3Selection,G)}ue(k)},$destroy:()=>{}}}const Cf=["data-id","data-handleid","data-nodeid","data-handlepos"],ft=_e({...{name:"Handle",compatConfig:{MODE:3}},props:{id:{default:null},type:{},position:{default:()=>Q.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=$r(e,["position","connectable","connectableStart","connectableEnd","id"]),r=xe(()=>n.type??"source"),o=xe(()=>n.isValidConnection??null),{id:a,connectionStartHandle:i,connectionClickStartHandle:s,connectionEndHandle:l,vueFlowRef:c,nodesConnectable:u,noDragClassName:d,noPanClassName:f}=Ne(),{id:h,node:m,nodeEl:w,connectedEdges:v}=Ea(),x=Ee(),_=xe(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),g=xe(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),E=xe(()=>{var S,p,L,y,O,I;return((S=i.value)==null?void 0:S.nodeId)===h&&((p=i.value)==null?void 0:p.id)===e.id&&((L=i.value)==null?void 0:L.type)===r.value||((y=l.value)==null?void 0:y.nodeId)===h&&((O=l.value)==null?void 0:O.id)===e.id&&((I=l.value)==null?void 0:I.type)===r.value}),R=xe(()=>{var S,p,L;return((S=s.value)==null?void 0:S.nodeId)===h&&((p=s.value)==null?void 0:p.id)===e.id&&((L=s.value)==null?void 0:L.type)===r.value}),{handlePointerDown:z,handleClick:M}=xa({nodeId:h,handleId:e.id,isValidConnection:o,type:r}),b=fe(()=>typeof e.connectable=="string"&&e.connectable==="single"?!v.value.some(S=>{const p=S[`${r.value}Handle`];return S[r.value]!==h?!1:p?p===e.id:!0}):typeof e.connectable=="number"?v.value.filter(S=>{const p=S[`${r.value}Handle`];return S[r.value]!==h?!1:p?p===e.id:!0}).length<e.connectable:typeof e.connectable=="function"?e.connectable(m,v.value):$e(e.connectable)?e.connectable:u.value);Ke(()=>{var S;if(!m.dimensions.width||!m.dimensions.height)return;const p=(S=m.handleBounds[r.value])==null?void 0:S.find(j=>j.id===e.id);if(!c.value||p)return;const L=c.value.querySelector(".vue-flow__transformationpane");if(!w.value||!x.value||!L||!e.id)return;const y=w.value.getBoundingClientRect(),O=x.value.getBoundingClientRect(),I=window.getComputedStyle(L),{m22:H}=new window.DOMMatrixReadOnly(I.transform),F={id:e.id,position:e.position,x:(O.left-y.left)/H,y:(O.top-y.top)/H,type:r.value,nodeId:h,...Mn(x.value)};m.handleBounds[r.value]=[...m.handleBounds[r.value]??[],F]});function $(S){const p=xo(S);b.value&&_.value&&(p&&S.button===0||!p)&&z(S)}function T(S){!h||!s.value&&!_.value||b.value&&M(S)}return t({handleClick:M,handlePointerDown:z,onClick:T,onPointerDown:$}),(S,p)=>(te(),de("div",{ref_key:"handle",ref:x,"data-id":`${Z(a)}-${Z(h)}-${e.id}-${r.value}`,"data-handleid":e.id,"data-nodeid":Z(h),"data-handlepos":S.position,class:vt(["vue-flow__handle",[`vue-flow__handle-${S.position}`,`vue-flow__handle-${e.id}`,Z(d),Z(f),r.value,{connectable:b.value,connecting:R.value,connectablestart:_.value,connectableend:g.value,connectionindicator:b.value&&(_.value&&!E.value||g.value&&E.value)}]]),onMousedown:$,onTouchstartPassive:$,onClick:T},[ke(S.$slots,"default",{id:S.id})],42,Cf))}}),zn=function({sourcePosition:e=Q.Bottom,targetPosition:t=Q.Top,label:n,connectable:r=!0,isValidTargetPos:o,isValidSourcePos:a,data:i}){const s=i.label??n;return[we(ft,{type:"target",position:t,connectable:r,isValidConnection:o}),typeof s!="string"&&s?we(s):we(Ve,[s]),we(ft,{type:"source",position:e,connectable:r,isValidConnection:a})]};zn.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"],zn.inheritAttrs=!1,zn.compatConfig={MODE:3};const $f=zn,Bn=function({targetPosition:e=Q.Top,label:t,connectable:n=!0,isValidTargetPos:r,data:o}){const a=o.label??t;return[we(ft,{type:"target",position:e,connectable:n,isValidConnection:r}),typeof a!="string"&&a?we(a):we(Ve,[a])]};Bn.props=["targetPosition","label","isValidTargetPos","connectable","data"],Bn.inheritAttrs=!1,Bn.compatConfig={MODE:3};const If=Bn,Vn=function({sourcePosition:e=Q.Bottom,label:t,connectable:n=!0,isValidSourcePos:r,data:o}){const a=o.label??t;return[typeof a!="string"&&a?we(a):we(Ve,[a]),we(ft,{type:"source",position:e,connectable:n,isValidConnection:r})]};Vn.props=["sourcePosition","label","isValidSourcePos","connectable","data"],Vn.inheritAttrs=!1,Vn.compatConfig={MODE:3};const Mf=Vn,Df=["transform"],Of=["width","height","x","y","rx","ry"],Tf=["y"],Pf=_e({...{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=Ee({x:0,y:0,width:0,height:0}),n=Ee(null),r=fe(()=>`translate(${e.x-t.value.width/2} ${e.y-t.value.height/2})`);Ke(o),ye([()=>e.x,()=>e.y,n,()=>e.label],o);function o(){if(!n.value)return;const a=n.value.getBBox();(a.width!==t.value.width||a.height!==t.value.height)&&(t.value=a)}return(a,i)=>(te(),de("g",{transform:r.value,class:"vue-flow__edge-textwrapper"},[a.labelShowBg?(te(),de("rect",{key:0,class:"vue-flow__edge-textbg",width:`${t.value.width+2*a.labelBgPadding[0]}px`,height:`${t.value.height+2*a.labelBgPadding[1]}px`,x:-a.labelBgPadding[0],y:-a.labelBgPadding[1],style:ze(a.labelBgStyle),rx:a.labelBgBorderRadius,ry:a.labelBgBorderRadius},null,12,Of)):De("",!0),ce("text",jn(a.$attrs,{ref_key:"el",ref:n,class:"vue-flow__edge-text",y:t.value.height/2,dy:"0.3em",style:a.labelStyle}),[ke(a.$slots,"default",{},()=>[typeof a.label!="string"?(te(),Oe(mt(a.label),{key:0})):(te(),de(Ve,{key:1},[Ye(Pe(a.label),1)],64))])],16,Tf)],8,Df))}}),Af=["id","d","marker-end","marker-start"],Rf=["d","stroke-width"],Ln=_e({...{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=Ee(null),r=Ee(null),o=Ee(null),a=Pr();return t({pathEl:n,interactionEl:r,labelEl:o}),(i,s)=>(te(),de(Ve,null,[ce("path",jn(Z(a),{id:i.id,ref_key:"pathEl",ref:n,d:i.path,class:"vue-flow__edge-path","marker-end":i.markerEnd,"marker-start":i.markerStart}),null,16,Af),i.interactionWidth?(te(),de("path",{key:0,ref_key:"interactionEl",ref:r,fill:"none",d:i.path,"stroke-width":i.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,Rf)):De("",!0),i.label&&i.labelX&&i.labelY?(te(),Oe(Pf,{key:1,ref_key:"labelEl",ref:o,x:i.labelX,y:i.labelY,label:i.label,"label-show-bg":i.labelShowBg,"label-bg-style":i.labelBgStyle,"label-bg-padding":i.labelBgPadding,"label-bg-border-radius":i.labelBgBorderRadius,"label-style":i.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):De("",!0)],64))}});function ka({sourceX:e,sourceY:t,targetX:n,targetY:r}){const o=Math.abs(n-e)/2,a=n<e?n+o:n-o,i=Math.abs(r-t)/2,s=r<t?r+i:r-i;return[a,s,o,i]}function Ca({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:a,targetControlX:i,targetControlY:s}){const l=e*.125+o*.375+i*.375+n*.125,c=t*.125+a*.375+s*.375+r*.125,u=Math.abs(l-e),d=Math.abs(c-t);return[l,c,u,d]}function Hn(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function $a({pos:e,x1:t,y1:n,x2:r,y2:o,c:a}){let i,s;switch(e){case Q.Left:i=t-Hn(t-r,a),s=n;break;case Q.Right:i=t+Hn(r-t,a),s=n;break;case Q.Top:i=t,s=n-Hn(n-o,a);break;case Q.Bottom:i=t,s=n+Hn(o-n,a);break}return[i,s]}function Ia(e){const{sourceX:t,sourceY:n,sourcePosition:r=Q.Bottom,targetX:o,targetY:a,targetPosition:i=Q.Top,curvature:s=.25}=e,[l,c]=$a({pos:r,x1:t,y1:n,x2:o,y2:a,c:s}),[u,d]=$a({pos:i,x1:o,y1:a,x2:t,y2:n,c:s}),[f,h,m,w]=Ca({sourceX:t,sourceY:n,targetX:o,targetY:a,sourceControlX:l,sourceControlY:c,targetControlX:u,targetControlY:d});return[`M${t},${n} C${l},${c} ${u},${d} ${o},${a}`,f,h,m,w]}function Ma({pos:e,x1:t,y1:n,x2:r,y2:o}){let a,i;switch(e){case Q.Left:case Q.Right:a=.5*(t+r),i=n;break;case Q.Top:case Q.Bottom:a=t,i=.5*(n+o);break}return[a,i]}function Da(e){const{sourceX:t,sourceY:n,sourcePosition:r=Q.Bottom,targetX:o,targetY:a,targetPosition:i=Q.Top}=e,[s,l]=Ma({pos:r,x1:t,y1:n,x2:o,y2:a}),[c,u]=Ma({pos:i,x1:o,y1:a,x2:t,y2:n}),[d,f,h,m]=Ca({sourceX:t,sourceY:n,targetX:o,targetY:a,sourceControlX:s,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${t},${n} C${s},${l} ${c},${u} ${o},${a}`,d,f,h,m]}const Oa={[Q.Left]:{x:-1,y:0},[Q.Right]:{x:1,y:0},[Q.Top]:{x:0,y:-1},[Q.Bottom]:{x:0,y:1}};function zf({source:e,sourcePosition:t=Q.Bottom,target:n}){return t===Q.Left||t===Q.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 Ta(e,t){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function Bf({source:e,sourcePosition:t=Q.Bottom,target:n,targetPosition:r=Q.Top,center:o,offset:a}){const i=Oa[t],s=Oa[r],l={x:e.x+i.x*a,y:e.y+i.y*a},c={x:n.x+s.x*a,y:n.y+s.y*a},u=zf({source:l,sourcePosition:t,target:c}),d=u.x!==0?"x":"y",f=u[d];let h,m,w;const v={x:0,y:0},x={x:0,y:0},[_,g,E,R]=ka({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(i[d]*s[d]===-1){m=o.x??_,w=o.y??g;const M=[{x:m,y:l.y},{x:m,y:c.y}],b=[{x:l.x,y:w},{x:c.x,y:w}];i[d]===f?h=d==="x"?M:b:h=d==="x"?b:M}else{const M=[{x:l.x,y:c.y}],b=[{x:c.x,y:l.y}];if(d==="x"?h=i.x===f?b:M:h=i.y===f?M:b,t===r){const L=Math.abs(e[d]-n[d]);if(L<=a){const y=Math.min(a-1,a-L);i[d]===f?v[d]=(l[d]>e[d]?-1:1)*y:x[d]=(c[d]>n[d]?-1:1)*y}}if(t!==r){const L=d==="x"?"y":"x",y=i[d]===s[L],O=l[L]>c[L],I=l[L]<c[L];(i[d]===1&&(!y&&O||y&&I)||i[d]!==1&&(!y&&I||y&&O))&&(h=d==="x"?M:b)}const $={x:l.x+v.x,y:l.y+v.y},T={x:c.x+x.x,y:c.y+x.y},S=Math.max(Math.abs($.x-h[0].x),Math.abs(T.x-h[0].x)),p=Math.max(Math.abs($.y-h[0].y),Math.abs(T.y-h[0].y));S>=p?(m=($.x+T.x)/2,w=h[0].y):(m=h[0].x,w=($.y+T.y)/2)}return[[e,{x:l.x+v.x,y:l.y+v.y},...h,{x:c.x+x.x,y:c.y+x.y},n],m,w,E,R]}function Vf(e,t,n,r){const o=Math.min(Ta(e,t)/2,Ta(t,n)/2,r),{x:a,y:i}=t;if(e.x===a&&a===n.x||e.y===i&&i===n.y)return`L${a} ${i}`;if(e.y===i){const c=e.x<n.x?-1:1,u=e.y<n.y?1:-1;return`L ${a+o*c},${i}Q ${a},${i} ${a},${i+o*u}`}const s=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${a},${i+o*l}Q ${a},${i} ${a+o*s},${i}`}function Io(e){const{sourceX:t,sourceY:n,sourcePosition:r=Q.Bottom,targetX:o,targetY:a,targetPosition:i=Q.Top,borderRadius:s=5,centerX:l,centerY:c,offset:u=20}=e,[d,f,h,m,w]=Bf({source:{x:t,y:n},sourcePosition:r,target:{x:o,y:a},targetPosition:i,center:{x:l,y:c},offset:u});return[d.reduce((x,_,g)=>{let E;return g>0&&g<d.length-1?E=Vf(d[g-1],_,d[g+1],s):E=`${g===0?"M":"L"}${_.x} ${_.y}`,x+=E,x},""),f,h,m,w]}function Lf(e){const{sourceX:t,sourceY:n,targetX:r,targetY:o}=e,[a,i,s,l]=ka({sourceX:t,sourceY:n,targetX:r,targetY:o});return[`M ${t},${n}L ${r},${o}`,a,i,s,l]}const Hf=_e({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,r,o]=Lf(e);return we(Ln,{path:n,labelX:r,labelY:o,...t,...e})}}}),Pa=_e({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,r,o]=Io({...e,sourcePosition:e.sourcePosition??Q.Bottom,targetPosition:e.targetPosition??Q.Top});return we(Ln,{path:n,labelX:r,labelY:o,...t,...e})}}}),Ff=_e({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(e,{attrs:t}){return()=>we(Pa,{...e,...t,borderRadius:0})}}),Gf=_e({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,r,o]=Ia({...e,sourcePosition:e.sourcePosition??Q.Bottom,targetPosition:e.targetPosition??Q.Top});return we(Ln,{path:n,labelX:r,labelY:o,...t,...e})}}}),Yf=_e({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,r,o]=Da({...e,sourcePosition:e.sourcePosition??Q.Bottom,targetPosition:e.targetPosition??Q.Top});return we(Ln,{path:n,labelX:r,labelY:o,...t,...e})}}}),qf={input:Mf,default:$f,output:If},jf={default:Gf,straight:Hf,step:Ff,smoothstep:Pa,simplebezier:Yf};function Wf(e,t,n){const r=fe(()=>w=>t.value.get(w)),o=fe(()=>w=>n.value.get(w)),a=fe(()=>{const w={...jf,...e.edgeTypes},v=Object.keys(w);for(const x of e.edges)x.type&&!v.includes(x.type)&&(w[x.type]=x.type);return w}),i=fe(()=>{const w={...qf,...e.nodeTypes},v=Object.keys(w);for(const x of e.nodes)x.type&&!v.includes(x.type)&&(w[x.type]=x.type);return w}),s=fe(()=>e.onlyRenderVisibleElements?Xi(e.nodes,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):e.nodes),l=fe(()=>{if(e.onlyRenderVisibleElements){const w=[];for(const v of e.edges){const x=t.value.get(v.source),_=t.value.get(v.target);Zd({sourcePos:x.computedPosition||{x:0,y:0},targetPos:_.computedPosition||{x:0,y:0},sourceWidth:x.dimensions.width,sourceHeight:x.dimensions.height,targetWidth:_.dimensions.width,targetHeight:_.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&w.push(v)}return w}return e.edges}),c=fe(()=>[...s.value,...l.value]),u=fe(()=>{const w=[];for(const v of e.nodes)v.selected&&w.push(v);return w}),d=fe(()=>{const w=[];for(const v of e.edges)v.selected&&w.push(v);return w}),f=fe(()=>[...u.value,...d.value]),h=fe(()=>{const w=[];for(const v of e.nodes)v.dimensions.width&&v.dimensions.height&&v.handleBounds!==void 0&&w.push(v);return w}),m=fe(()=>s.value.length>0&&h.value.length===s.value.length);return{getNode:r,getEdge:o,getElements:c,getEdgeTypes:a,getNodeTypes:i,getEdges:l,getNodes:s,getSelectedElements:f,getSelectedNodes:u,getSelectedEdges:d,getNodesInitialized:h,areNodesInitialized:m}}class St{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){var t;const n=(t=gt())==null?void 0:t.appContext.app,r=(n==null?void 0:n.config.globalProperties.$vueFlowStorage)??St.instance;return St.instance=r??new St,n&&(n.config.globalProperties.$vueFlowStorage=St.instance),St.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 r=Sa(),o=Ir(r),a={};for(const[f,h]of Object.entries(o.hooks)){const m=`on${f.charAt(0).toUpperCase()+f.slice(1)}`;a[m]=h.on}const i={};for(const[f,h]of Object.entries(o.hooks))i[f]=h.trigger;const s=fe(()=>{const f=new Map;for(const h of o.nodes)f.set(h.id,h);return f}),l=fe(()=>{const f=new Map;for(const h of o.edges)f.set(h.id,h);return f}),c=Wf(o,s,l),u=kf(o,s,l);u.setState({...o,...n});const d={...a,...c,...u,...qs(o),nodeLookup:s,edgeLookup:l,emits:i,id:t,vueFlowVersion:"1.48.1",$destroy:()=>{this.remove(t)}};return this.set(t,d),d}getId(){return`vue-flow-${this.currentId++}`}}function Ne(e){const t=St.getInstance(),n=Gn(),r=typeof e=="object",o=r?e:{id:e},a=o.id,i=a??(n==null?void 0:n.vueFlowId);let s;if(n){const l=it(_a,null);typeof l<"u"&&l!==null&&(!i||l.id===i)&&(s=l)}if(s||i&&(s=t.get(i)),!s||i&&s.id!==i){const l=a??t.getId(),c=t.create(l,o);s=c,(n??Yn(!0)).run(()=>{ye(c.applyDefault,(d,f,h)=>{const m=v=>{c.applyNodeChanges(v)},w=v=>{c.applyEdgeChanges(v)};d?(c.onNodesChange(m),c.onEdgesChange(w)):(c.hooks.value.nodesChange.off(m),c.hooks.value.edgesChange.off(w)),h(()=>{c.hooks.value.nodesChange.off(m),c.hooks.value.edgesChange.off(w)})},{immediate:!0}),zt(()=>{if(s){const d=t.get(s.id);d?d.$destroy():tn(`No store instance found for id ${s.id} in storage.`)}})})}else r&&s.setState(o);if(n&&(pt(_a,s),n.vueFlowId=s.id),r){const l=gt();(l==null?void 0:l.type.name)!=="VueFlow"&&s.emits.error(new Te(Ce.USEVUEFLOW_OPTIONS))}return s}function Xf(e){const{emits:t,dimensions:n}=Ne();let r;Ke(()=>{const o=()=>{var a,i;if(!e.value||!(((i=(a=e.value).checkVisibility)==null?void 0:i.call(a))??!0))return;const s=Mn(e.value);(s.width===0||s.height===0)&&t.error(new Te(Ce.MISSING_VIEWPORT_DIMENSIONS)),n.value={width:s.width||500,height:s.height||500}};o(),window.addEventListener("resize",o),e.value&&(r=new ResizeObserver(()=>o()),r.observe(e.value)),qn(()=>{window.removeEventListener("resize",o),r&&e.value&&r.unobserve(e.value)})})}const Uf=_e({...{name:"UserSelection",compatConfig:{MODE:3}},props:{userSelectionRect:{}},setup(e){return(t,n)=>(te(),de("div",{class:"vue-flow__selection vue-flow__container",style:ze({width:`${t.userSelectionRect.width}px`,height:`${t.userSelectionRect.height}px`,transform:`translate(${t.userSelectionRect.x}px, ${t.userSelectionRect.y}px)`})},null,4))}}),Zf=["tabIndex"],Kf=_e({...{name:"NodesSelection",compatConfig:{MODE:3}},setup(e){const{emits:t,viewport:n,getSelectedNodes:r,noPanClassName:o,disableKeyboardA11y:a,userSelectionActive:i}=Ne(),s=Na(),l=Ee(null),c=ba({el:l,onStart(m){t.selectionDragStart(m),t.nodeDragStart(m)},onDrag(m){t.selectionDrag(m),t.nodeDrag(m)},onStop(m){t.selectionDragStop(m),t.nodeDragStop(m)}});Ke(()=>{var m;a.value||(m=l.value)==null||m.focus({preventScroll:!0})});const u=fe(()=>Wi(r.value)),d=fe(()=>({width:`${u.value.width}px`,height:`${u.value.height}px`,top:`${u.value.y}px`,left:`${u.value.x}px`}));function f(m){t.selectionContextMenu({event:m,nodes:r.value})}function h(m){a.value||Ot[m.key]&&(m.preventDefault(),s({x:Ot[m.key].x,y:Ot[m.key].y},m.shiftKey))}return(m,w)=>!Z(i)&&u.value.width&&u.value.height?(te(),de("div",{key:0,class:vt(["vue-flow__nodesselection vue-flow__container",Z(o)]),style:ze({transform:`translate(${Z(n).x}px,${Z(n).y}px) scale(${Z(n).zoom})`})},[ce("div",{ref_key:"el",ref:l,class:vt([{dragging:Z(c)},"vue-flow__nodesselection-rect"]),style:ze(d.value),tabIndex:Z(a)?void 0:-1,onContextmenu:f,onKeydown:h},null,46,Zf)],6)):De("",!0)}});function Qf(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}const Jf=_e({...{name:"Pane",compatConfig:{MODE:3}},props:{isSelecting:{type:Boolean},selectionKeyPressed:{type:Boolean}},setup(e){const{vueFlowRef:t,nodes:n,viewport:r,emits:o,userSelectionActive:a,removeSelectedElements:i,userSelectionRect:s,elementsSelectable:l,nodesSelectionActive:c,getSelectedEdges:u,getSelectedNodes:d,removeNodes:f,removeEdges:h,selectionMode:m,deleteKeyCode:w,multiSelectionKeyCode:v,multiSelectionActive:x,edgeLookup:_,nodeLookup:g,connectionLookup:E,defaultEdgeOptions:R,connectionStartHandle:z,panOnDrag:M}=Ne(),b=Qe(null),$=Qe(new Set),T=Qe(new Set),S=Qe(null),p=xe(()=>l.value&&(e.isSelecting||a.value)),L=xe(()=>z.value!==null);let y=!1,O=!1;const I=Zt(w,{actInsideInputWithModifier:!1}),H=Zt(v);ye(I,A=>{A&&(f(d.value),h(u.value),c.value=!1)}),ye(H,A=>{x.value=A});function F(A,V){return q=>{q.target===V&&(A==null||A(q))}}function j(A){if(y||L.value){y=!1;return}o.paneClick(A),i(),c.value=!1}function Y(A){var V;if(Array.isArray(M.value)&&((V=M.value)!=null&&V.includes(2))){A.preventDefault();return}o.paneContextMenu(A)}function W(A){o.paneScroll(A)}function X(A){var V,q,ne;if(S.value=((V=t.value)==null?void 0:V.getBoundingClientRect())??null,!l.value||!e.isSelecting||A.button!==0||A.target!==b.value||!S.value)return;(ne=(q=A.target)==null?void 0:q.setPointerCapture)==null||ne.call(q,A.pointerId);const{x:ee,y:ue}=Qf(A,S.value);O=!0,y=!1,i(),s.value={width:0,height:0,startX:ee,startY:ue,x:ee,y:ue},o.selectionStart(A)}function P(A){var V;if(!S.value||!s.value)return;y=!0;const{x:q,y:ne}=Ue(A,S.value),{startX:ee=0,startY:ue=0}=s.value,me={startX:ee,startY:ue,x:q<ee?q:ee,y:ne<ue?ne:ue,width:Math.abs(q-ee),height:Math.abs(ne-ue)},ae=$.value,le=T.value;$.value=new Set(Xi(n.value,me,r.value,m.value===go.Partial,!0).map(N=>N.id)),T.value=new Set;const k=((V=R.value)==null?void 0:V.selectable)??!0;for(const N of $.value){const D=E.value.get(N);if(D)for(const{edgeId:C}of D.values()){const G=_.value.get(C);G&&(G.selectable??k)&&T.value.add(C)}}if(!ma(ae,$.value)){const N=ct(g.value,$.value,!0);o.nodesChange(N)}if(!ma(le,T.value)){const N=ct(_.value,T.value);o.edgesChange(N)}s.value=me,a.value=!0,c.value=!1}function B(A){var V;A.button!==0||!O||((V=A.target)==null||V.releasePointerCapture(A.pointerId),!a.value&&s.value&&A.target===b.value&&j(A),a.value=!1,s.value=null,c.value=$.value.size>0,o.selectionEnd(A),e.selectionKeyPressed&&(y=!1),O=!1)}return(A,V)=>(te(),de("div",{ref_key:"container",ref:b,class:vt(["vue-flow__pane vue-flow__container",{selection:A.isSelecting}]),onClick:V[0]||(V[0]=q=>p.value?void 0:F(j,b.value)(q)),onContextmenu:V[1]||(V[1]=q=>F(Y,b.value)(q)),onWheelPassive:V[2]||(V[2]=q=>F(W,b.value)(q)),onPointerenter:V[3]||(V[3]=q=>p.value?void 0:Z(o).paneMouseEnter(q)),onPointerdown:V[4]||(V[4]=q=>p.value?X(q):Z(o).paneMouseMove(q)),onPointermove:V[5]||(V[5]=q=>p.value?P(q):Z(o).paneMouseMove(q)),onPointerup:V[6]||(V[6]=q=>p.value?B(q):void 0),onPointerleave:V[7]||(V[7]=q=>Z(o).paneMouseLeave(q))},[ke(A.$slots,"default"),Z(a)&&Z(s)?(te(),Oe(Uf,{key:0,"user-selection-rect":Z(s)},null,8,["user-selection-rect"])):De("",!0),Z(c)&&Z(d).length?(te(),Oe(Kf,{key:1})):De("",!0)],34))}}),eh=_e({...{name:"Transform",compatConfig:{MODE:3}},setup(e){const{viewport:t,fitViewOnInit:n,fitViewOnInitDone:r}=Ne(),o=fe(()=>n.value?!r.value:!1),a=fe(()=>`translate(${t.value.x}px,${t.value.y}px) scale(${t.value.zoom})`);return(i,s)=>(te(),de("div",{class:"vue-flow__transformationpane vue-flow__container",style:ze({transform:a.value,opacity:o.value?0:void 0})},[ke(i.$slots,"default")],4))}}),th=_e({...{name:"Viewport",compatConfig:{MODE:3}},setup(e){const{minZoom:t,maxZoom:n,defaultViewport:r,translateExtent:o,zoomActivationKeyCode:a,selectionKeyCode:i,panActivationKeyCode:s,panOnScroll:l,panOnScrollMode:c,panOnScrollSpeed:u,panOnDrag:d,zoomOnDoubleClick:f,zoomOnPinch:h,zoomOnScroll:m,preventScrolling:w,noWheelClassName:v,noPanClassName:x,emits:_,connectionStartHandle:g,userSelectionActive:E,paneDragging:R,d3Zoom:z,d3Selection:M,d3ZoomHandler:b,viewport:$,viewportRef:T,paneClickDistance:S}=Ne();Xf(T);const p=Qe(!1),L=Qe(!1);let y=null,O=!1,I=0,H={x:0,y:0,zoom:0};const F=Zt(s),j=Zt(i),Y=Zt(a),W=xe(()=>(!j.value||j.value&&i.value===!0)&&(F.value||d.value)),X=xe(()=>F.value||l.value),P=xe(()=>j.value||i.value===!0&&W.value!==!0),B=xe(()=>g.value!==null);Ke(()=>{if(!T.value){tn("Viewport element is missing");return}const ee=T.value,ue=ee.getBoundingClientRect(),me=Id().clickDistance(S.value).scaleExtent([t.value,n.value]).translateExtent(o.value),ae=Le(ee).call(me),le=ae.on("wheel.zoom"),k=Dt.translate(r.value.x??0,r.value.y??0).scale(Et(r.value.zoom??1,t.value,n.value)),N=[[0,0],[ue.width,ue.height]],D=me.constrain()(k,N,o.value);me.transform(ae,D),me.wheelDelta(Qi),z.value=me,M.value=ae,b.value=le,$.value={x:D.x,y:D.y,zoom:D.k},me.on("start",C=>{var G;if(!C.sourceEvent)return null;I=C.sourceEvent.button,p.value=!0;const J=q(C.transform);((G=C.sourceEvent)==null?void 0:G.type)==="mousedown"&&(R.value=!0),H=J,_.viewportChangeStart(J),_.moveStart({event:C,flowTransform:J})}),me.on("end",C=>{if(!C.sourceEvent)return null;if(p.value=!1,R.value=!1,A(W.value,I??0)&&!O&&_.paneContextMenu(C.sourceEvent),O=!1,V(H,C.transform)){const G=q(C.transform);H=G,_.viewportChangeEnd(G),_.moveEnd({event:C,flowTransform:G})}}),me.filter(C=>{var G;const J=Y.value||m.value,oe=h.value&&C.ctrlKey,K=C.button,ie=C.type==="wheel";if(K===1&&C.type==="mousedown"&&(ne(C,"vue-flow__node")||ne(C,"vue-flow__edge")))return!0;if(!W.value&&!J&&!X.value&&!f.value&&!h.value||E.value||B.value&&!ie||!f.value&&C.type==="dblclick"||ne(C,v.value)&&ie||ne(C,x.value)&&(!ie||X.value&&ie&&!Y.value)||!h.value&&C.ctrlKey&&ie||!J&&!X.value&&!oe&&ie)return!1;if(!h&&C.type==="touchstart"&&((G=C.touches)==null?void 0:G.length)>1)return C.preventDefault(),!1;if(!W.value&&(C.type==="mousedown"||C.type==="touchstart")||i.value===!0&&Array.isArray(d.value)&&d.value.includes(0)&&K===0||Array.isArray(d.value)&&!d.value.includes(K)&&(C.type==="mousedown"||C.type==="touchstart"))return!1;const he=Array.isArray(d.value)&&d.value.includes(K)||i.value===!0&&Array.isArray(d.value)&&!d.value.includes(0)||!K||K<=1;return(!C.ctrlKey||F.value||ie)&&he}),ye([E,W],()=>{E.value&&!p.value?me.on("zoom",null):E.value||me.on("zoom",C=>{$.value={x:C.transform.x,y:C.transform.y,zoom:C.transform.k};const G=q(C.transform);O=A(W.value,I??0),_.viewportChange(G),_.move({event:C,flowTransform:G})})},{immediate:!0}),ye([E,X,c,Y,h,w,v],()=>{X.value&&!Y.value&&!E.value?ae.on("wheel.zoom",C=>{if(ne(C,v.value))return!1;const G=Y.value||m.value,J=h.value&&C.ctrlKey;if(!(!w.value||X.value||G||J))return!1;C.preventDefault(),C.stopImmediatePropagation();const K=ae.property("__zoom").k||1,ie=On();if(!F.value&&C.ctrlKey&&h.value&&ie){const on=qe(C),Ev=Qi(C),Nv=K*2**Ev;me.scaleTo(ae,Nv,on,C);return}const he=C.deltaMode===1?20:1;let ve=c.value===Ut.Vertical?0:C.deltaX*he,be=c.value===Ut.Horizontal?0:C.deltaY*he;!ie&&C.shiftKey&&c.value!==Ut.Vertical&&!ve&&be&&(ve=be,be=0),me.translateBy(ae,-(ve/K)*u.value,-(be/K)*u.value);const Ze=q(ae.property("__zoom"));y&&clearTimeout(y),L.value?(_.move({event:C,flowTransform:Ze}),_.viewportChange(Ze),y=setTimeout(()=>{_.moveEnd({event:C,flowTransform:Ze}),_.viewportChangeEnd(Ze),L.value=!1},150)):(L.value=!0,_.moveStart({event:C,flowTransform:Ze}),_.viewportChangeStart(Ze))},{passive:!1}):typeof le<"u"&&ae.on("wheel.zoom",function(C,G){const J=!w.value&&C.type==="wheel"&&!C.ctrlKey,oe=Y.value||m.value,K=h.value&&C.ctrlKey;if(!oe&&!l.value&&!K&&C.type==="wheel"||J||ne(C,v.value))return null;C.preventDefault(),le.call(this,C,G)},{passive:!1})},{immediate:!0})});function A(ee,ue){return ue===2&&Array.isArray(ee)&&ee.includes(2)}function V(ee,ue){return ee.x!==ue.x&&!Number.isNaN(ue.x)||ee.y!==ue.y&&!Number.isNaN(ue.y)||ee.zoom!==ue.k&&!Number.isNaN(ue.k)}function q(ee){return{x:ee.x,y:ee.y,zoom:ee.k}}function ne(ee,ue){return ee.target.closest(`.${ue}`)}return(ee,ue)=>(te(),de("div",{ref_key:"viewportRef",ref:T,class:"vue-flow__viewport vue-flow__container"},[se(Jf,{"is-selecting":P.value,"selection-key-pressed":Z(j),class:vt({connecting:B.value,dragging:Z(R),draggable:Z(d)===!0||Array.isArray(Z(d))&&Z(d).includes(0)})},{default:ge(()=>[se(eh,null,{default:ge(()=>[ke(ee.$slots,"default")]),_:3})]),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}}),nh=["id"],oh=["id"],rh=["id"],ih=_e({...{name:"A11yDescriptions",compatConfig:{MODE:3}},setup(e){const{id:t,disableKeyboardA11y:n,ariaLiveMessage:r}=Ne();return(o,a)=>(te(),de(Ve,null,[ce("div",{id:`${Z(Bi)}-${Z(t)}`,style:{display:"none"}}," Press enter or space to select a node. "+Pe(Z(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,nh),ce("div",{id:`${Z(Vi)}-${Z(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,oh),Z(n)?De("",!0):(te(),de("div",{key:0,id:`${Z(Ad)}-${Z(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%)"}},Pe(Z(r)),9,rh))],64))}});function ah(){const e=Ne();ye(()=>e.viewportHelper.value.viewportInitialized,t=>{t&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function sh(e,t,n){return n===Q.Left?e-t:n===Q.Right?e+t:e}function lh(e,t,n){return n===Q.Top?e-t:n===Q.Bottom?e+t:e}const Mo=function({radius:e=10,centerX:t=0,centerY:n=0,position:r=Q.Top,type:o}){return we("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${o}`,cx:sh(t,e,r),cy:lh(n,e,r),r:e,stroke:"transparent",fill:"transparent"})};Mo.props=["radius","centerX","centerY","position","type"],Mo.compatConfig={MODE:3};const Aa=Mo,uh=_e({name:"Edge",compatConfig:{MODE:3},props:["id"],setup(e){const{id:t,addSelectedEdges:n,connectionMode:r,edgeUpdaterRadius:o,emits:a,nodesSelectionActive:i,noPanClassName:s,getEdgeTypes:l,removeSelectedEdges:c,findEdge:u,findNode:d,isValidConnection:f,multiSelectionActive:h,disableKeyboardA11y:m,elementsSelectable:w,edgesUpdatable:v,edgesFocusable:x,hooks:_}=Ne(),g=fe(()=>u(e.id)),{emit:E,on:R}=hf(g.value,a),z=it(Pn),M=gt(),b=Ee(!1),$=Ee(!1),T=Ee(""),S=Ee(null),p=Ee("source"),L=Ee(null),y=xe(()=>typeof g.value.selectable>"u"?w.value:g.value.selectable),O=xe(()=>typeof g.value.updatable>"u"?v.value:g.value.updatable),I=xe(()=>typeof g.value.focusable>"u"?x.value:g.value.focusable);pt(cf,e.id),pt(df,L);const H=fe(()=>g.value.class instanceof Function?g.value.class(g.value):g.value.class),F=fe(()=>g.value.style instanceof Function?g.value.style(g.value):g.value.style),j=fe(()=>{const N=g.value.type||"default",D=z==null?void 0:z[`edge-${N}`];if(D)return D;let C=g.value.template??l.value[N];if(typeof C=="string"&&M){const G=Object.keys(M.appContext.components);G&&G.includes(N)&&(C=Se(N,!1))}return C&&typeof C!="string"?C:(a.error(new Te(Ce.EDGE_TYPE_MISSING,C)),!1)}),{handlePointerDown:Y}=xa({nodeId:T,handleId:S,type:p,isValidConnection:f,edgeUpdaterType:p,onEdgeUpdate:P,onEdgeUpdateEnd:B});return()=>{const N=d(g.value.source),D=d(g.value.target),C="pathOptions"in g.value?g.value.pathOptions:{};if(!N&&!D)return a.error(new Te(Ce.EDGE_SOURCE_TARGET_MISSING,g.value.id,g.value.source,g.value.target)),null;if(!N)return a.error(new Te(Ce.EDGE_SOURCE_MISSING,g.value.id,g.value.source)),null;if(!D)return a.error(new Te(Ce.EDGE_TARGET_MISSING,g.value.id,g.value.target)),null;if(!g.value||g.value.hidden||N.hidden||D.hidden)return null;let G;r.value===st.Strict?G=N.handleBounds.source:G=[...N.handleBounds.source||[],...N.handleBounds.target||[]];const J=la(G,g.value.sourceHandle);let oe;r.value===st.Strict?oe=D.handleBounds.target:oe=[...D.handleBounds.target||[],...D.handleBounds.source||[]];const K=la(oe,g.value.targetHandle),ie=(J==null?void 0:J.position)||Q.Bottom,he=(K==null?void 0:K.position)||Q.Top,{x:ve,y:be}=Pt(N,J,ie),{x:Ze,y:on}=Pt(D,K,he);return g.value.sourceX=ve,g.value.sourceY=be,g.value.targetX=Ze,g.value.targetY=on,we("g",{ref:L,key:e.id,"data-id":e.id,class:["vue-flow__edge",`vue-flow__edge-${j.value===!1?"default":g.value.type||"default"}`,s.value,H.value,{updating:b.value,selected:g.value.selected,animated:g.value.animated,inactive:!y.value&&!_.value.edgeClick.hasListeners()}],tabIndex:I.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":I.value?`${Vi}-${t}`:void 0,"aria-roledescription":"edge",role:I.value?"group":"img",...g.value.domAttributes,onClick:V,onContextmenu:q,onDblclick:ne,onMouseenter:ee,onMousemove:ue,onMouseleave:me,onKeyDown:I.value?k:void 0},[$.value?null:we(j.value===!1?l.value.default:j.value,{id:e.id,sourceNode:N,targetNode:D,source:g.value.source,target:g.value.target,type:g.value.type,updatable:O.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,...R},style:F.value,markerStart:`url('#${en(g.value.markerStart,t)}')`,markerEnd:`url('#${en(g.value.markerEnd,t)}')`,sourcePosition:ie,targetPosition:he,sourceX:ve,sourceY:be,targetX:Ze,targetY:on,sourceHandleId:g.value.sourceHandle,targetHandleId:g.value.targetHandle,interactionWidth:g.value.interactionWidth,...C}),[O.value==="source"||O.value===!0?[we("g",{onMousedown:ae,onMouseenter:W,onMouseout:X},we(Aa,{position:ie,centerX:ve,centerY:be,radius:o.value,type:"source","data-type":"source"}))]:null,O.value==="target"||O.value===!0?[we("g",{onMousedown:le,onMouseenter:W,onMouseout:X},we(Aa,{position:he,centerX:Ze,centerY:on,radius:o.value,type:"target","data-type":"target"}))]:null]])};function W(){b.value=!0}function X(){b.value=!1}function P(N,D){E.update({event:N,edge:g.value,connection:D})}function B(N){E.updateEnd({event:N,edge:g.value}),$.value=!1}function A(N,D){N.button===0&&($.value=!0,T.value=D?g.value.target:g.value.source,S.value=(D?g.value.targetHandle:g.value.sourceHandle)??null,p.value=D?"target":"source",E.updateStart({event:N,edge:g.value}),Y(N))}function V(N){var D;const C={event:N,edge:g.value};y.value&&(i.value=!1,g.value.selected&&h.value?(c([g.value]),(D=L.value)==null||D.blur()):n([g.value])),E.click(C)}function q(N){E.contextMenu({event:N,edge:g.value})}function ne(N){E.doubleClick({event:N,edge:g.value})}function ee(N){E.mouseEnter({event:N,edge:g.value})}function ue(N){E.mouseMove({event:N,edge:g.value})}function me(N){E.mouseLeave({event:N,edge:g.value})}function ae(N){A(N,!0)}function le(N){A(N,!1)}function k(N){var D;!m.value&&Li.includes(N.key)&&y.value&&(N.key==="Escape"?((D=L.value)==null||D.blur(),c([u(e.id)])):n([u(e.id)]))}}}),ch=_e({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var e;const{id:t,connectionMode:n,connectionStartHandle:r,connectionEndHandle:o,connectionPosition:a,connectionLineType:i,connectionLineStyle:s,connectionLineOptions:l,connectionStatus:c,viewport:u,findNode:d}=Ne(),f=(e=it(Pn))==null?void 0:e["connection-line"],h=fe(()=>{var _;return d((_=r.value)==null?void 0:_.nodeId)}),m=fe(()=>{var _;return d((_=o.value)==null?void 0:_.nodeId)??null}),w=fe(()=>({x:(a.value.x-u.value.x)/u.value.zoom,y:(a.value.y-u.value.y)/u.value.zoom})),v=fe(()=>l.value.markerStart?`url(#${en(l.value.markerStart,t)})`:""),x=fe(()=>l.value.markerEnd?`url(#${en(l.value.markerEnd,t)})`:"");return()=>{var _,g,E;if(!h.value||!r.value)return null;const R=r.value.id,z=r.value.type,M=h.value.handleBounds;let b=(M==null?void 0:M[z])??[];if(n.value===st.Loose){const F=(M==null?void 0:M[z==="source"?"target":"source"])??[];b=[...b,...F]}if(!b)return null;const $=(R?b.find(F=>F.id===R):b[0])??null,T=($==null?void 0:$.position)??Q.Top,{x:S,y:p}=Pt(h.value,$,T);let L=null;m.value&&(n.value===st.Strict?L=((_=m.value.handleBounds[z==="source"?"target":"source"])==null?void 0:_.find(F=>{var j;return F.id===((j=o.value)==null?void 0:j.id)}))||null:L=((g=[...m.value.handleBounds.source??[],...m.value.handleBounds.target??[]])==null?void 0:g.find(F=>{var j;return F.id===((j=o.value)==null?void 0:j.id)}))||null);const y=((E=o.value)==null?void 0:E.position)??(T?No[T]:null);if(!T||!y)return null;const O=i.value??l.value.type??xt.Bezier;let I="";const H={sourceX:S,sourceY:p,sourcePosition:T,targetX:w.value.x,targetY:w.value.y,targetPosition:y};return O===xt.Bezier?[I]=Ia(H):O===xt.Step?[I]=Io({...H,borderRadius:0}):O===xt.SmoothStep?[I]=Io(H):O===xt.SimpleBezier?[I]=Da(H):I=`M${S},${p} ${w.value.x},${w.value.y}`,we("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},we("g",{class:"vue-flow__connection"},f?we(f,{sourceX:S,sourceY:p,sourcePosition:T,targetX:w.value.x,targetY:w.value.y,targetPosition:y,sourceNode:h.value,sourceHandle:$,targetNode:m.value,targetHandle:L,markerEnd:x.value,markerStart:v.value,connectionStatus:c.value}):we("path",{d:I,class:[l.value.class,c.value,"vue-flow__connection-path"],style:{...s.value,...l.value.style},"marker-end":x.value,"marker-start":v.value})))}}}),dh=["id","markerWidth","markerHeight","markerUnits","orient"],fh=_e({...{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)=>(te(),de("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===Z(mo).ArrowClosed?(te(),de("polyline",{key:0,style:ze({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)):De("",!0),t.type===Z(mo).Arrow?(te(),de("polyline",{key:1,style:ze({stroke:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):De("",!0)],8,dh))}}),hh={class:"vue-flow__marker vue-flow__container","aria-hidden":"true"},ph=_e({...{name:"MarkerDefinitions",compatConfig:{MODE:3}},setup(e){const{id:t,edges:n,connectionLineOptions:r,defaultMarkerColor:o}=Ne(),a=fe(()=>{const i=new Set,s=[],l=c=>{if(c){const u=en(c,t);i.has(u)||(typeof c=="object"?s.push({...c,id:u,color:c.color||o.value}):s.push({id:u,color:o.value,type:c}),i.add(u))}};for(const c of[r.value.markerEnd,r.value.markerStart])l(c);for(const c of n.value)for(const u of[c.markerStart,c.markerEnd])l(u);return s.sort((c,u)=>c.id.localeCompare(u.id))});return(i,s)=>(te(),de("svg",hh,[ce("defs",null,[(te(!0),de(Ve,null,rn(a.value,l=>(te(),Oe(fh,{id:l.id,key:l.id,type:l.type,color:l.color,width:l.width,height:l.height,markerUnits:l.markerUnits,"stroke-width":l.strokeWidth,orient:l.orient},null,8,["id","type","color","width","height","markerUnits","stroke-width","orient"]))),128))])]))}}),vh=_e({...{name:"Edges",compatConfig:{MODE:3}},setup(e){const{findNode:t,getEdges:n,elevateEdgesOnSelect:r}=Ne();return(o,a)=>(te(),de(Ve,null,[se(ph),(te(!0),de(Ve,null,rn(Z(n),i=>(te(),de("svg",{key:i.id,class:"vue-flow__edges vue-flow__container",style:ze({zIndex:Z(Kd)(i,Z(t),Z(r))})},[se(Z(uh),{id:i.id},null,8,["id"])],4))),128)),se(Z(ch))],64))}}),gh=_e({name:"Node",compatConfig:{MODE:3},props:["id","resizeObserver"],setup(e){const{id:t,noPanClassName:n,selectNodesOnDrag:r,nodesSelectionActive:o,multiSelectionActive:a,emits:i,removeSelectedNodes:s,addSelectedNodes:l,updateNodeDimensions:c,onUpdateNodeInternals:u,getNodeTypes:d,nodeExtent:f,elevateNodesOnSelect:h,disableKeyboardA11y:m,ariaLiveMessage:w,snapToGrid:v,snapGrid:x,nodeDragThreshold:_,nodesDraggable:g,elementsSelectable:E,nodesConnectable:R,nodesFocusable:z,hooks:M}=Ne(),b=Ee(null);pt(wa,b),pt(ya,e.id);const $=it(Pn),T=gt(),S=Na(),{node:p,parentNode:L}=Ea(e.id),{emit:y,on:O}=mf(p,i),I=xe(()=>typeof p.draggable>"u"?g.value:p.draggable),H=xe(()=>typeof p.selectable>"u"?E.value:p.selectable),F=xe(()=>typeof p.connectable>"u"?R.value:p.connectable),j=xe(()=>typeof p.focusable>"u"?z.value:p.focusable),Y=fe(()=>H.value||I.value||M.value.nodeClick.hasListeners()||M.value.nodeDoubleClick.hasListeners()||M.value.nodeMouseEnter.hasListeners()||M.value.nodeMouseMove.hasListeners()||M.value.nodeMouseLeave.hasListeners()),W=xe(()=>!!p.dimensions.width&&!!p.dimensions.height),X=fe(()=>{const D=p.type||"default",C=$==null?void 0:$[`node-${D}`];if(C)return C;let G=p.template||d.value[D];if(typeof G=="string"&&T){const J=Object.keys(T.appContext.components);J&&J.includes(D)&&(G=Se(D,!1))}return G&&typeof G!="string"?G:(i.error(new Te(Ce.NODE_TYPE_MISSING,G)),!1)}),P=ba({id:e.id,el:b,disabled:()=>!I.value,selectable:H,dragHandle:()=>p.dragHandle,onStart(D){y.dragStart(D)},onDrag(D){y.drag(D)},onStop(D){y.dragStop(D)},onClick(D){k(D)}}),B=fe(()=>p.class instanceof Function?p.class(p):p.class),A=fe(()=>{const D=(p.style instanceof Function?p.style(p):p.style)||{},C=p.width instanceof Function?p.width(p):p.width,G=p.height instanceof Function?p.height(p):p.height;return!D.width&&C&&(D.width=typeof C=="string"?C:`${C}px`),!D.height&&G&&(D.height=typeof G=="string"?G:`${G}px`),D}),V=xe(()=>Number(p.zIndex??A.value.zIndex??0));return u(D=>{(D.includes(e.id)||!D.length)&&ne()}),Ke(()=>{ye(()=>p.hidden,(D=!1,C,G)=>{!D&&b.value&&(e.resizeObserver.observe(b.value),G(()=>{b.value&&e.resizeObserver.unobserve(b.value)}))},{immediate:!0,flush:"post"})}),ye([()=>p.type,()=>p.sourcePosition,()=>p.targetPosition],()=>{Ae(()=>{c([{id:e.id,nodeElement:b.value,forceUpdate:!0}])})}),ye([()=>p.position.x,()=>p.position.y,()=>{var D;return(D=L.value)==null?void 0:D.computedPosition.x},()=>{var D;return(D=L.value)==null?void 0:D.computedPosition.y},()=>{var D;return(D=L.value)==null?void 0:D.computedPosition.z},V,()=>p.selected,()=>p.dimensions.height,()=>p.dimensions.width,()=>{var D;return(D=L.value)==null?void 0:D.dimensions.height},()=>{var D;return(D=L.value)==null?void 0:D.dimensions.width}],([D,C,G,J,oe,K])=>{const ie={x:D,y:C,z:K+(h.value&&p.selected?1e3:0)};typeof G<"u"&&typeof J<"u"?p.computedPosition=qd({x:G,y:J,z:oe},ie):p.computedPosition=ie},{flush:"post",immediate:!0}),ye([()=>p.extent,f],([D,C],[G,J])=>{(D!==G||C!==J)&&q()}),p.extent==="parent"||typeof p.extent=="object"&&"range"in p.extent&&p.extent.range==="parent"?Xn(()=>W).toBe(!0).then(q):q(),()=>p.hidden?null:we("div",{ref:b,"data-id":p.id,class:["vue-flow__node",`vue-flow__node-${X.value===!1?"default":p.type||"default"}`,{[n.value]:I.value,dragging:P==null?void 0:P.value,draggable:I.value,selected:p.selected,selectable:H.value,parent:p.isParent},B.value],style:{visibility:W.value?"visible":"hidden",zIndex:p.computedPosition.z??V.value,transform:`translate(${p.computedPosition.x}px,${p.computedPosition.y}px)`,pointerEvents:Y.value?"all":"none",...A.value},tabIndex:j.value?0:void 0,role:j.value?"group":void 0,"aria-describedby":m.value?void 0:`${Bi}-${t}`,"aria-label":p.ariaLabel,"aria-roledescription":"node",...p.domAttributes,onMouseenter:ee,onMousemove:ue,onMouseleave:me,onContextmenu:ae,onClick:k,onDblclick:le,onKeydown:N},[we(X.value===!1?d.value.default:X.value,{id:p.id,type:p.type,data:p.data,events:{...p.events,...O},selected:p.selected,resizing:p.resizing,dragging:P.value,connectable:F.value,position:p.computedPosition,dimensions:p.dimensions,isValidTargetPos:p.isValidTargetPos,isValidSourcePos:p.isValidSourcePos,parent:p.parentNode,parentNodeId:p.parentNode,zIndex:p.computedPosition.z??V.value,targetPosition:p.targetPosition,sourcePosition:p.sourcePosition,label:p.label,dragHandle:p.dragHandle,onUpdateNodeInternals:ne})]);function q(){const D=p.computedPosition,{computedPosition:C,position:G}=bo(p,v.value?Tn(D,x.value):D,i.error,f.value,L.value);(p.computedPosition.x!==C.x||p.computedPosition.y!==C.y)&&(p.computedPosition={...p.computedPosition,...C}),(p.position.x!==G.x||p.position.y!==G.y)&&(p.position=G)}function ne(){b.value&&c([{id:e.id,nodeElement:b.value,forceUpdate:!0}])}function ee(D){P!=null&&P.value||y.mouseEnter({event:D,node:p})}function ue(D){P!=null&&P.value||y.mouseMove({event:D,node:p})}function me(D){P!=null&&P.value||y.mouseLeave({event:D,node:p})}function ae(D){return y.contextMenu({event:D,node:p})}function le(D){return y.doubleClick({event:D,node:p})}function k(D){H.value&&(!r.value||!I.value||_.value>0)&&So(p,a.value,l,s,o,!1,b.value),y.click({event:D,node:p})}function N(D){if(!(_o(D)||m.value))if(Li.includes(D.key)&&H.value){const C=D.key==="Escape";So(p,a.value,l,s,o,C,b.value)}else I.value&&p.selected&&Ot[D.key]&&(D.preventDefault(),w.value=`Moved selected node ${D.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~p.position.x}, y: ${~~p.position.y}`,S({x:Ot[D.key].x,y:Ot[D.key].y},D.shiftKey))}}});function mh(e={includeHiddenNodes:!1}){const{nodes:t}=Ne();return fe(()=>{if(t.value.length===0)return!1;for(const n of t.value)if((e.includeHiddenNodes||!n.hidden)&&((n==null?void 0:n.handleBounds)===void 0||n.dimensions.width===0||n.dimensions.height===0))return!1;return!0})}const _h={class:"vue-flow__nodes vue-flow__container"},yh=_e({...{name:"Nodes",compatConfig:{MODE:3}},setup(e){const{getNodes:t,updateNodeDimensions:n,emits:r}=Ne(),o=mh(),a=Ee();return ye(o,i=>{i&&Ae(()=>{r.nodesInitialized(t.value)})},{immediate:!0}),Ke(()=>{a.value=new ResizeObserver(i=>{const s=i.map(l=>({id:l.target.getAttribute("data-id"),nodeElement:l.target,forceUpdate:!0}));Ae(()=>n(s))})}),qn(()=>{var i;return(i=a.value)==null?void 0:i.disconnect()}),(i,s)=>(te(),de("div",_h,[a.value?(te(!0),de(Ve,{key:0},rn(Z(t),(l,c,u,d)=>{const f=[l.id];if(d&&d.key===l.id&&Dr(d,f))return d;const h=(te(),Oe(Z(gh),{id:l.id,key:l.id,"resize-observer":a.value},null,8,["id","resize-observer"]));return h.memo=f,h},s,0),128)):De("",!0)]))}});function wh(){const{emits:e}=Ne();Ke(()=>{if(ha()){const t=document.querySelector(".vue-flow__pane");t&&window.getComputedStyle(t).zIndex!=="1"&&e.error(new Te(Ce.MISSING_STYLES))}})}const bh=ce("div",{class:"vue-flow__edge-labels"},null,-1),xh=_e({...{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 r=e,o=kr(),a=Un(r,"modelValue",n),i=Un(r,"nodes",n),s=Un(r,"edges",n),l=Ne(r),c=bf({modelValue:a,nodes:i,edges:s},r,l);return Ef(n,l.hooks),ah(),wh(),pt(Pn,o),Cr(c),t(l),(u,d)=>(te(),de("div",{ref:Z(l).vueFlowRef,class:"vue-flow"},[se(th,null,{default:ge(()=>[se(vh),bh,se(yh),ke(u.$slots,"zoom-pane")]),_:3}),ke(u.$slots,"default"),se(ih)],512))}}),Eh=_e({...{name:"Panel",compatConfig:{MODE:3}},props:{position:{}},setup(e){const t=e,{userSelectionActive:n}=Ne(),r=fe(()=>`${t.position}`.split("-"));return(o,a)=>(te(),de("div",{class:vt(["vue-flow__panel",r.value]),style:ze({pointerEvents:Z(n)?"none":"all"})},[ke(o.$slots,"default")],6))}}),Nh={name:"ControlButton",compatConfig:{MODE:3}},Sh=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},kh={type:"button",class:"vue-flow__controls-button"};function Ch(e,t,n,r,o,a){return te(),de("button",kh,[ke(e.$slots,"default")])}const nn=Sh(Nh,[["render",Ch]]),$h={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},Ih=[ce("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1)];function Mh(e,t){return te(),de("svg",$h,Ih)}const Dh={render:Mh},Oh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},Th=[ce("path",{d:"M0 0h32v4.2H0z"},null,-1)];function Ph(e,t){return te(),de("svg",Oh,Th)}const Ah={render:Ph},Rh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},zh=[ce("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 Bh(e,t){return te(),de("svg",Rh,zh)}const Vh={render:Bh},Lh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},Hh=[ce("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 Fh(e,t){return te(),de("svg",Lh,Hh)}const Gh={render:Fh},Yh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},qh=[ce("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 jh(e,t){return te(),de("svg",Yh,qh)}const Wh={render:jh},Xh=_e({...{name:"Controls",compatConfig:{MODE:3}},props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:{},position:{default:()=>Ri.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(e,{emit:t}){const{nodesDraggable:n,nodesConnectable:r,elementsSelectable:o,setInteractive:a,zoomIn:i,zoomOut:s,fitView:l,viewport:c,minZoom:u,maxZoom:d}=Ne(),f=xe(()=>n.value||r.value||o.value),h=xe(()=>c.value.zoom<=u.value),m=xe(()=>c.value.zoom>=d.value);function w(){i(),t("zoomIn")}function v(){s(),t("zoomOut")}function x(){l(e.fitViewParams),t("fitView")}function _(){a(!f.value),t("interactionChange",!f.value)}return(g,E)=>(te(),Oe(Z(Eh),{class:"vue-flow__controls",position:g.position},{default:ge(()=>[ke(g.$slots,"top"),g.showZoom?(te(),de(Ve,{key:0},[ke(g.$slots,"control-zoom-in",{},()=>[se(nn,{class:"vue-flow__controls-zoomin",disabled:m.value,onClick:w},{default:ge(()=>[ke(g.$slots,"icon-zoom-in",{},()=>[(te(),Oe(mt(Z(Dh))))])]),_:3},8,["disabled"])]),ke(g.$slots,"control-zoom-out",{},()=>[se(nn,{class:"vue-flow__controls-zoomout",disabled:h.value,onClick:v},{default:ge(()=>[ke(g.$slots,"icon-zoom-out",{},()=>[(te(),Oe(mt(Z(Ah))))])]),_:3},8,["disabled"])])],64)):De("",!0),g.showFitView?ke(g.$slots,"control-fit-view",{key:1},()=>[se(nn,{class:"vue-flow__controls-fitview",onClick:x},{default:ge(()=>[ke(g.$slots,"icon-fit-view",{},()=>[(te(),Oe(mt(Z(Vh))))])]),_:3})]):De("",!0),g.showInteractive?ke(g.$slots,"control-interactive",{key:2},()=>[g.showInteractive?(te(),Oe(nn,{key:0,class:"vue-flow__controls-interactive",onClick:_},{default:ge(()=>[f.value?ke(g.$slots,"icon-unlock",{key:0},()=>[(te(),Oe(mt(Z(Wh))))]):De("",!0),f.value?De("",!0):ke(g.$slots,"icon-lock",{key:1},()=>[(te(),Oe(mt(Z(Gh))))])]),_:3})):De("",!0)]):De("",!0),ke(g.$slots,"default")]),_:3},8,["position"]))}});var ot=(e=>(e.Lines="lines",e.Dots="dots",e))(ot||{});const Ra=function({dimensions:e,size:t,color:n}){return we("path",{stroke:n,"stroke-width":t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},za=function({radius:e,color:t}){return we("circle",{cx:e,cy:e,r:e,fill:t})};ot.Lines+"",ot.Dots+"";const Uh={[ot.Dots]:"#81818a",[ot.Lines]:"#eee"},Zh=["id","x","y","width","height","patternTransform"],Kh={key:2,height:"100",width:"100"},Qh=["fill"],Jh=["x","y","fill"],ep=_e({...{name:"Background",compatConfig:{MODE:3}},props:{id:{},variant:{default:()=>ot.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}=Ne(),r=fe(()=>{const i=n.value.zoom,[s,l]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],c=[s*i||1,l*i||1],u=e.size*i,[d,f]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],h=[d*i||1+c[0]/2,f*i||1+c[1]/2];return{scaledGap:c,offset:h,size:u}}),o=xe(()=>`pattern-${t}${e.id?`-${e.id}`:""}`),a=xe(()=>e.color||e.patternColor||Uh[e.variant||ot.Dots]);return(i,s)=>(te(),de("svg",{class:"vue-flow__background vue-flow__container",style:ze({height:`${i.height>100?100:i.height}%`,width:`${i.width>100?100:i.width}%`})},[ke(i.$slots,"pattern-container",{id:o.value},()=>[ce("pattern",{id:o.value,x:Z(n).x%r.value.scaledGap[0],y:Z(n).y%r.value.scaledGap[1],width:r.value.scaledGap[0],height:r.value.scaledGap[1],patternTransform:`translate(-${r.value.offset[0]},-${r.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[ke(i.$slots,"pattern",{},()=>[i.variant===Z(ot).Lines?(te(),Oe(Z(Ra),{key:0,size:i.lineWidth,color:a.value,dimensions:r.value.scaledGap},null,8,["size","color","dimensions"])):i.variant===Z(ot).Dots?(te(),Oe(Z(za),{key:1,color:a.value,radius:r.value.size/2},null,8,["color","radius"])):De("",!0),i.bgColor?(te(),de("svg",Kh,[ce("rect",{width:"100%",height:"100%",fill:i.bgColor},null,8,Qh)])):De("",!0)])],8,Zh)]),ce("rect",{x:i.x,y:i.y,width:"100%",height:"100%",fill:`url(#${o.value})`},null,8,Jh),ke(i.$slots,"default",{id:o.value})],4))}}),tp={name:"DetailsTable",components:{RawBuffer:Vr},mixins:[Br],props:{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,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=["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,r])=>!e.includes(n)).map(([n,r])=>({key:this.formatKey(n),value:this.formatValue(r)}))},buttonIcon:function(){return this.paused?"mdi-play":"mdi-pause"}},methods:{pause:function(){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.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())},formatValue(e){return e==null?"null":typeof e=="object"?JSON.stringify(e,null,2):String(e)}}},np={class:"details-table"},op={class:"text-wrap"},rp={key:1,class:"d-flex justify-center align-center pa-4"};function ip(e,t,n,r,o,a){const i=Se("v-btn"),s=Se("v-spacer"),l=Se("v-card-title"),c=Se("v-data-table"),u=Se("v-progress-circular"),d=Se("v-col"),f=Se("raw-buffer"),h=Se("v-row"),m=Se("v-card-text"),w=Se("v-card");return te(),Oe(w,{"max-height":"80vh",class:"d-flex flex-column"},{default:ge(()=>[se(l,{class:"d-flex align-center flex-shrink-0"},{default:ge(()=>[Ye(Pe(n.mode)+" Properties: "+Pe(a.shownDetails.name)+" ",1),se(i,{icon:a.buttonIcon,variant:"text","data-test":"pause",onClick:a.pause},null,8,["icon","onClick"]),se(s),se(i,{icon:"mdi-close",variant:"text","data-test":"close",onClick:a.closeClick},null,8,["onClick"])]),_:1}),se(m,{class:"overflow-y-auto flex-grow-1 pa-0"},{default:ge(()=>[ce("div",np,[se(h,null,{default:ge(()=>[se(d,{cols:"4"},{default:ge(()=>[a.shownDetails?(te(),Oe(c,{key:0,headers:o.headers,items:a.detailsItems,"items-per-page":-1,"hide-default-footer":"",density:"compact",class:"details-table"},{"item.value":ge(({item:v})=>[ce("span",op,Pe(v.value),1)]),_:1},8,["headers","items"])):(te(),de("div",rp,[se(u,{indeterminate:"",color:"primary"})]))]),_:1}),se(d,{cols:"8"},{default:ge(()=>[ce("div",null,Pe(a.upperData.label)+": "+Pe(a.upperData.time),1),se(f,{modelValue:a.upperData.data,"onUpdate:modelValue":t[0]||(t[0]=v=>a.upperData.data=v)},null,8,["modelValue"]),ce("div",null,Pe(a.lowerData.label)+": "+Pe(a.lowerData.time),1),se(f,{modelValue:a.lowerData.data,"onUpdate:modelValue":t[1]||(t[1]=v=>a.lowerData.data=v)},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})]),_:1})}const ap=at(tp,[["render",ip],["__scopeId","data-v-fdda8d7a"]]),sp={name:"InterfaceNode",components:{Handle:ft},props:{data:{type:Object,required:!0}},data(){return{}},computed:{interfaceStyle(){return{width:`${this.data.width}px`,height:`${this.data.height}px`}}}},lp={class:"node-label"};function up(e,t,n,r,o,a){const i=Se("v-icon"),s=Se("Handle");return te(),de("div",{class:"interface-node",style:ze(a.interfaceStyle)},[se(i,{color:"#1d85e1"},{default:ge(()=>[...t[0]||(t[0]=[Ye("mdi-swap-horizontal-bold",-1)])]),_:1}),ce("div",lp,Pe(n.data.label),1),t[1]||(t[1]=ce("div",{class:"node-label"},"Interface",-1)),se(s,{id:"interface__cmd__input",type:"target",position:"left",style:{top:"112px"}}),se(s,{id:"interface__tlm__input",type:"target",position:"left",style:{top:"162px"}}),se(s,{id:"interface__cmd__output",type:"source",position:"right",style:{top:"112px"}}),se(s,{id:"interface__tlm__output",type:"source",position:"right",style:{top:"162px"}}),t[2]||(t[2]=ce("div",{style:{position:"absolute",top:"102px",left:"8px",color:"black"}}," CMD ",-1)),t[3]||(t[3]=ce("div",{style:{position:"absolute",top:"152px",left:"8px",color:"black"}}," TLM ",-1)),t[4]||(t[4]=ce("div",{style:{position:"absolute",top:"102px",right:"8px",color:"black"}}," CMD ",-1)),t[5]||(t[5]=ce("div",{style:{position:"absolute",top:"152px",right:"8px",color:"black"}}," TLM ",-1))],4)}const cp=at(sp,[["render",up],["__scopeId","data-v-a870651d"]]),dp={name:"RouterNode",components:{Handle:ft},props:{data:{type:Object,required:!0}},data(){return{}},computed:{routerStyle(){return{width:`${this.data.width}px`,height:`${this.data.height}px`}}}},fp={class:"node-label"};function hp(e,t,n,r,o,a){const i=Se("v-icon"),s=Se("Handle");return te(),de("div",{class:"router-node",style:ze(a.routerStyle)},[se(i,{color:"#ba1de1"},{default:ge(()=>[...t[0]||(t[0]=[Ye("mdi-call-split",-1)])]),_:1}),ce("div",fp,Pe(n.data.label),1),t[1]||(t[1]=ce("div",{class:"node-label"},"Router",-1)),se(s,{id:"router__cmd__input",type:"target",position:"left",style:{top:"112px"}}),se(s,{id:"router__tlm__input",type:"target",position:"left",style:{top:"162px"}}),se(s,{id:"router__cmd__output",type:"source",position:"right",style:{top:"112px"}}),se(s,{id:"router__tlm__output",type:"source",position:"right",style:{top:"162px"}}),t[2]||(t[2]=ce("div",{style:{position:"absolute",top:"102px",left:"8px",color:"black"}}," CMD ",-1)),t[3]||(t[3]=ce("div",{style:{position:"absolute",top:"152px",left:"8px",color:"black"}}," TLM ",-1)),t[4]||(t[4]=ce("div",{style:{position:"absolute",top:"102px",right:"8px",color:"black"}}," CMD ",-1)),t[5]||(t[5]=ce("div",{style:{position:"absolute",top:"152px",right:"8px",color:"black"}}," TLM ",-1))],4)}const pp=at(dp,[["render",hp],["__scopeId","data-v-55c74126"]]),vp={name:"TargetNode",components:{Handle:ft},props:{data:{type:Object,required:!0}}},gp={class:"cosmos-node"},mp={class:"node-label"};function _p(e,t,n,r,o,a){const i=Se("Handle"),s=Se("v-icon");return te(),de("div",gp,[se(i,{id:"cosmos__cmd",type:"target",position:"right",style:{top:"114px"}}),se(i,{id:"cosmos__tlm",type:"target",position:"right",style:{top:"164px"}}),t[1]||(t[1]=ce("div",{style:{position:"absolute",top:"104px",right:"8px",color:"black"}}," CMD ",-1)),t[2]||(t[2]=ce("div",{style:{position:"absolute",top:"154px",right:"8px",color:"black"}}," TLM ",-1)),se(s,{color:"#10b981"},{default:ge(()=>[...t[0]||(t[0]=[Ye("mdi-rocket-launch",-1)])]),_:1}),ce("div",mp,Pe(n.data.label),1),t[3]||(t[3]=ce("div",{class:"node-label"},"Processing",-1))])}const yp=at(vp,[["render",_p],["__scopeId","data-v-6332ae7d"]]),wp={name:"TargetNode",components:{Handle:ft},props:{data:{type:Object,required:!0}}},bp={class:"target-node"},xp={class:"node-label"};function Ep(e,t,n,r,o,a){const i=Se("Handle"),s=Se("v-icon");return te(),de("div",bp,[se(i,{id:"target__cmd",type:"target",position:"left",style:{top:"114px"}}),se(i,{id:"target__tlm",type:"target",position:"left",style:{top:"164px"}}),t[1]||(t[1]=ce("div",{style:{position:"absolute",top:"104px",left:"8px",color:"black"}}," CMD ",-1)),t[2]||(t[2]=ce("div",{style:{position:"absolute",top:"154px",left:"8px",color:"black"}}," TLM ",-1)),se(s,{color:"#10b981"},{default:ge(()=>[...t[0]||(t[0]=[Ye("mdi-target",-1)])]),_:1}),ce("div",xp,Pe(n.data.label),1),t[3]||(t[3]=ce("div",{class:"node-label"},"Target",-1))])}const Np=at(wp,[["render",Ep],["__scopeId","data-v-1fe9eeb4"]]),Sp={name:"WriteProtocolNode",props:{data:{type:Object,required:!0}}},kp={class:"write-protocol-node"},Cp={class:"protocol-label"};function $p(e,t,n,r,o,a){const i=Se("v-icon");return te(),de("div",kp,[se(i,{color:"#f97316",size:"small"},{default:ge(()=>[...t[0]||(t[0]=[Ye("mdi-arrow-right-bold",-1)])]),_:1}),ce("div",Cp,Pe(n.data.label),1)])}const Ip=at(Sp,[["render",$p],["__scopeId","data-v-027ef719"]]),Mp={name:"ReadProtocolNode",props:{data:{type:Object,required:!0}}},Dp={class:"read-protocol-node"},Op={class:"protocol-label"};function Tp(e,t,n,r,o,a){const i=Se("v-icon");return te(),de("div",Dp,[se(i,{color:"#06b6d4",size:"small"},{default:ge(()=>[...t[0]||(t[0]=[Ye("mdi-arrow-left-bold",-1)])]),_:1}),ce("div",Op,Pe(n.data.label),1)])}const Pp=at(Mp,[["render",Tp],["__scopeId","data-v-e3d15e81"]]);function Ap(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Do,Ba;function Oo(){if(Ba)return Do;Ba=1;var e="\0",t="\0",n="";class r{constructor(u){Me(this,"_isDirected",!0);Me(this,"_isMultigraph",!1);Me(this,"_isCompound",!1);Me(this,"_label");Me(this,"_defaultNodeLabelFn",()=>{});Me(this,"_defaultEdgeLabelFn",()=>{});Me(this,"_nodes",{});Me(this,"_in",{});Me(this,"_preds",{});Me(this,"_out",{});Me(this,"_sucs",{});Me(this,"_edgeObjs",{});Me(this,"_edgeLabels",{});Me(this,"_nodeCount",0);Me(this,"_edgeCount",0);Me(this,"_parent");Me(this,"_children");u&&(this._isDirected=Object.hasOwn(u,"directed")?u.directed:!0,this._isMultigraph=Object.hasOwn(u,"multigraph")?u.multigraph:!1,this._isCompound=Object.hasOwn(u,"compound")?u.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[t]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(u){return this._label=u,this}graph(){return this._label}setDefaultNodeLabel(u){return this._defaultNodeLabelFn=u,typeof u!="function"&&(this._defaultNodeLabelFn=()=>u),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var u=this;return this.nodes().filter(d=>Object.keys(u._in[d]).length===0)}sinks(){var u=this;return this.nodes().filter(d=>Object.keys(u._out[d]).length===0)}setNodes(u,d){var f=arguments,h=this;return u.forEach(function(m){f.length>1?h.setNode(m,d):h.setNode(m)}),this}setNode(u,d){return Object.hasOwn(this._nodes,u)?(arguments.length>1&&(this._nodes[u]=d),this):(this._nodes[u]=arguments.length>1?d:this._defaultNodeLabelFn(u),this._isCompound&&(this._parent[u]=t,this._children[u]={},this._children[t][u]=!0),this._in[u]={},this._preds[u]={},this._out[u]={},this._sucs[u]={},++this._nodeCount,this)}node(u){return this._nodes[u]}hasNode(u){return Object.hasOwn(this._nodes,u)}removeNode(u){var d=this;if(Object.hasOwn(this._nodes,u)){var f=h=>d.removeEdge(d._edgeObjs[h]);delete this._nodes[u],this._isCompound&&(this._removeFromParentsChildList(u),delete this._parent[u],this.children(u).forEach(function(h){d.setParent(h)}),delete this._children[u]),Object.keys(this._in[u]).forEach(f),delete this._in[u],delete this._preds[u],Object.keys(this._out[u]).forEach(f),delete this._out[u],delete this._sucs[u],--this._nodeCount}return this}setParent(u,d){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(d===void 0)d=t;else{d+="";for(var f=d;f!==void 0;f=this.parent(f))if(f===u)throw new Error("Setting "+d+" as parent of "+u+" would create a cycle");this.setNode(d)}return this.setNode(u),this._removeFromParentsChildList(u),this._parent[u]=d,this._children[d][u]=!0,this}_removeFromParentsChildList(u){delete this._children[this._parent[u]][u]}parent(u){if(this._isCompound){var d=this._parent[u];if(d!==t)return d}}children(u=t){if(this._isCompound){var d=this._children[u];if(d)return Object.keys(d)}else{if(u===t)return this.nodes();if(this.hasNode(u))return[]}}predecessors(u){var d=this._preds[u];if(d)return Object.keys(d)}successors(u){var d=this._sucs[u];if(d)return Object.keys(d)}neighbors(u){var d=this.predecessors(u);if(d){const h=new Set(d);for(var f of this.successors(u))h.add(f);return Array.from(h.values())}}isLeaf(u){var d;return this.isDirected()?d=this.successors(u):d=this.neighbors(u),d.length===0}filterNodes(u){var d=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});d.setGraph(this.graph());var f=this;Object.entries(this._nodes).forEach(function([w,v]){u(w)&&d.setNode(w,v)}),Object.values(this._edgeObjs).forEach(function(w){d.hasNode(w.v)&&d.hasNode(w.w)&&d.setEdge(w,f.edge(w))});var h={};function m(w){var v=f.parent(w);return v===void 0||d.hasNode(v)?(h[w]=v,v):v in h?h[v]:m(v)}return this._isCompound&&d.nodes().forEach(w=>d.setParent(w,m(w))),d}setDefaultEdgeLabel(u){return this._defaultEdgeLabelFn=u,typeof u!="function"&&(this._defaultEdgeLabelFn=()=>u),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(u,d){var f=this,h=arguments;return u.reduce(function(m,w){return h.length>1?f.setEdge(m,w,d):f.setEdge(m,w),w}),this}setEdge(){var u,d,f,h,m=!1,w=arguments[0];typeof w=="object"&&w!==null&&"v"in w?(u=w.v,d=w.w,f=w.name,arguments.length===2&&(h=arguments[1],m=!0)):(u=w,d=arguments[1],f=arguments[3],arguments.length>2&&(h=arguments[2],m=!0)),u=""+u,d=""+d,f!==void 0&&(f=""+f);var v=i(this._isDirected,u,d,f);if(Object.hasOwn(this._edgeLabels,v))return m&&(this._edgeLabels[v]=h),this;if(f!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(u),this.setNode(d),this._edgeLabels[v]=m?h:this._defaultEdgeLabelFn(u,d,f);var x=s(this._isDirected,u,d,f);return u=x.v,d=x.w,Object.freeze(x),this._edgeObjs[v]=x,o(this._preds[d],u),o(this._sucs[u],d),this._in[d][v]=x,this._out[u][v]=x,this._edgeCount++,this}edge(u,d,f){var h=arguments.length===1?l(this._isDirected,arguments[0]):i(this._isDirected,u,d,f);return this._edgeLabels[h]}edgeAsObj(){const u=this.edge(...arguments);return typeof u!="object"?{label:u}:u}hasEdge(u,d,f){var h=arguments.length===1?l(this._isDirected,arguments[0]):i(this._isDirected,u,d,f);return Object.hasOwn(this._edgeLabels,h)}removeEdge(u,d,f){var h=arguments.length===1?l(this._isDirected,arguments[0]):i(this._isDirected,u,d,f),m=this._edgeObjs[h];return m&&(u=m.v,d=m.w,delete this._edgeLabels[h],delete this._edgeObjs[h],a(this._preds[d],u),a(this._sucs[u],d),delete this._in[d][h],delete this._out[u][h],this._edgeCount--),this}inEdges(u,d){var f=this._in[u];if(f){var h=Object.values(f);return d?h.filter(m=>m.v===d):h}}outEdges(u,d){var f=this._out[u];if(f){var h=Object.values(f);return d?h.filter(m=>m.w===d):h}}nodeEdges(u,d){var f=this.inEdges(u,d);if(f)return f.concat(this.outEdges(u,d))}}function o(c,u){c[u]?c[u]++:c[u]=1}function a(c,u){--c[u]||delete c[u]}function i(c,u,d,f){var h=""+u,m=""+d;if(!c&&h>m){var w=h;h=m,m=w}return h+n+m+n+(f===void 0?e:f)}function s(c,u,d,f){var h=""+u,m=""+d;if(!c&&h>m){var w=h;h=m,m=w}var v={v:h,w:m};return f&&(v.name=f),v}function l(c,u){return i(c,u.v,u.w,u.name)}return Do=r,Do}var To,Va;function Rp(){return Va||(Va=1,To="2.2.4"),To}var Po,La;function zp(){return La||(La=1,Po={Graph:Oo(),version:Rp()}),Po}var Ao,Ha;function Bp(){if(Ha)return Ao;Ha=1;var e=Oo();Ao={write:t,read:o};function t(a){var i={options:{directed:a.isDirected(),multigraph:a.isMultigraph(),compound:a.isCompound()},nodes:n(a),edges:r(a)};return a.graph()!==void 0&&(i.value=structuredClone(a.graph())),i}function n(a){return a.nodes().map(function(i){var s=a.node(i),l=a.parent(i),c={v:i};return s!==void 0&&(c.value=s),l!==void 0&&(c.parent=l),c})}function r(a){return a.edges().map(function(i){var s=a.edge(i),l={v:i.v,w:i.w};return i.name!==void 0&&(l.name=i.name),s!==void 0&&(l.value=s),l})}function o(a){var i=new e(a.options).setGraph(a.value);return a.nodes.forEach(function(s){i.setNode(s.v,s.value),s.parent&&i.setParent(s.v,s.parent)}),a.edges.forEach(function(s){i.setEdge({v:s.v,w:s.w,name:s.name},s.value)}),i}return Ao}var Ro,Fa;function Vp(){if(Fa)return Ro;Fa=1,Ro=e;function e(t){var n={},r=[],o;function a(i){Object.hasOwn(n,i)||(n[i]=!0,o.push(i),t.successors(i).forEach(a),t.predecessors(i).forEach(a))}return t.nodes().forEach(function(i){o=[],a(i),o.length&&r.push(o)}),r}return Ro}var zo,Ga;function Ya(){if(Ga)return zo;Ga=1;class e{constructor(){Me(this,"_arr",[]);Me(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(n){return n.key})}has(n){return Object.hasOwn(this._keyIndices,n)}priority(n){var r=this._keyIndices[n];if(r!==void 0)return this._arr[r].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(n,r){var o=this._keyIndices;if(n=String(n),!Object.hasOwn(o,n)){var a=this._arr,i=a.length;return o[n]=i,a.push({key:n,priority:r}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key}decrease(n,r){var o=this._keyIndices[n];if(r>this._arr[o].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[o].priority+" New: "+r);this._arr[o].priority=r,this._decrease(o)}_heapify(n){var r=this._arr,o=2*n,a=o+1,i=n;o<r.length&&(i=r[o].priority<r[i].priority?o:i,a<r.length&&(i=r[a].priority<r[i].priority?a:i),i!==n&&(this._swap(n,i),this._heapify(i)))}_decrease(n){for(var r=this._arr,o=r[n].priority,a;n!==0&&(a=n>>1,!(r[a].priority<o));)this._swap(n,a),n=a}_swap(n,r){var o=this._arr,a=this._keyIndices,i=o[n],s=o[r];o[n]=s,o[r]=i,a[s.key]=n,a[i.key]=r}}return zo=e,zo}var Bo,qa;function ja(){if(qa)return Bo;qa=1;var e=Ya();Bo=n;var t=()=>1;function n(o,a,i,s){return r(o,String(a),i||t,s||function(l){return o.outEdges(l)})}function r(o,a,i,s){var l={},c=new e,u,d,f=function(h){var m=h.v!==u?h.v:h.w,w=l[m],v=i(h),x=d.distance+v;if(v<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+h+" Weight: "+v);x<w.distance&&(w.distance=x,w.predecessor=u,c.decrease(m,x))};for(o.nodes().forEach(function(h){var m=h===a?0:Number.POSITIVE_INFINITY;l[h]={distance:m},c.add(h,m)});c.size()>0&&(u=c.removeMin(),d=l[u],d.distance!==Number.POSITIVE_INFINITY);)s(u).forEach(f);return l}return Bo}var Vo,Wa;function Lp(){if(Wa)return Vo;Wa=1;var e=ja();Vo=t;function t(n,r,o){return n.nodes().reduce(function(a,i){return a[i]=e(n,i,r,o),a},{})}return Vo}var Lo,Xa;function Ua(){if(Xa)return Lo;Xa=1,Lo=e;function e(t){var n=0,r=[],o={},a=[];function i(s){var l=o[s]={onStack:!0,lowlink:n,index:n++};if(r.push(s),t.successors(s).forEach(function(d){Object.hasOwn(o,d)?o[d].onStack&&(l.lowlink=Math.min(l.lowlink,o[d].index)):(i(d),l.lowlink=Math.min(l.lowlink,o[d].lowlink))}),l.lowlink===l.index){var c=[],u;do u=r.pop(),o[u].onStack=!1,c.push(u);while(s!==u);a.push(c)}}return t.nodes().forEach(function(s){Object.hasOwn(o,s)||i(s)}),a}return Lo}var Ho,Za;function Hp(){if(Za)return Ho;Za=1;var e=Ua();Ho=t;function t(n){return e(n).filter(function(r){return r.length>1||r.length===1&&n.hasEdge(r[0],r[0])})}return Ho}var Fo,Ka;function Fp(){if(Ka)return Fo;Ka=1,Fo=t;var e=()=>1;function t(r,o,a){return n(r,o||e,a||function(i){return r.outEdges(i)})}function n(r,o,a){var i={},s=r.nodes();return s.forEach(function(l){i[l]={},i[l][l]={distance:0},s.forEach(function(c){l!==c&&(i[l][c]={distance:Number.POSITIVE_INFINITY})}),a(l).forEach(function(c){var u=c.v===l?c.w:c.v,d=o(c);i[l][u]={distance:d,predecessor:l}})}),s.forEach(function(l){var c=i[l];s.forEach(function(u){var d=i[u];s.forEach(function(f){var h=d[l],m=c[f],w=d[f],v=h.distance+m.distance;v<w.distance&&(w.distance=v,w.predecessor=m.predecessor)})})}),i}return Fo}var Go,Qa;function Ja(){if(Qa)return Go;Qa=1;function e(n){var r={},o={},a=[];function i(s){if(Object.hasOwn(o,s))throw new t;Object.hasOwn(r,s)||(o[s]=!0,r[s]=!0,n.predecessors(s).forEach(i),delete o[s],a.push(s))}if(n.sinks().forEach(i),Object.keys(r).length!==n.nodeCount())throw new t;return a}class t extends Error{constructor(){super(...arguments)}}return Go=e,e.CycleException=t,Go}var Yo,es;function Gp(){if(es)return Yo;es=1;var e=Ja();Yo=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return Yo}var qo,ts;function ns(){if(ts)return qo;ts=1,qo=e;function e(o,a,i){Array.isArray(a)||(a=[a]);var s=o.isDirected()?d=>o.successors(d):d=>o.neighbors(d),l=i==="post"?t:n,c=[],u={};return a.forEach(d=>{if(!o.hasNode(d))throw new Error("Graph does not have node: "+d);l(d,s,u,c)}),c}function t(o,a,i,s){for(var l=[[o,!1]];l.length>0;){var c=l.pop();c[1]?s.push(c[0]):Object.hasOwn(i,c[0])||(i[c[0]]=!0,l.push([c[0],!0]),r(a(c[0]),u=>l.push([u,!1])))}}function n(o,a,i,s){for(var l=[o];l.length>0;){var c=l.pop();Object.hasOwn(i,c)||(i[c]=!0,s.push(c),r(a(c),u=>l.push(u)))}}function r(o,a){for(var i=o.length;i--;)a(o[i],i,o);return o}return qo}var jo,os;function Yp(){if(os)return jo;os=1;var e=ns();jo=t;function t(n,r){return e(n,r,"post")}return jo}var Wo,rs;function qp(){if(rs)return Wo;rs=1;var e=ns();Wo=t;function t(n,r){return e(n,r,"pre")}return Wo}var Xo,is;function jp(){if(is)return Xo;is=1;var e=Oo(),t=Ya();Xo=n;function n(r,o){var a=new e,i={},s=new t,l;function c(d){var f=d.v===l?d.w:d.v,h=s.priority(f);if(h!==void 0){var m=o(d);m<h&&(i[f]=l,s.decrease(f,m))}}if(r.nodeCount()===0)return a;r.nodes().forEach(function(d){s.add(d,Number.POSITIVE_INFINITY),a.setNode(d)}),s.decrease(r.nodes()[0],0);for(var u=!1;s.size()>0;){if(l=s.removeMin(),Object.hasOwn(i,l))a.setEdge(l,i[l]);else{if(u)throw new Error("Input graph is not connected: "+r);u=!0}r.nodeEdges(l).forEach(c)}return a}return Xo}var Uo,as;function Wp(){return as||(as=1,Uo={components:Vp(),dijkstra:ja(),dijkstraAll:Lp(),findCycles:Hp(),floydWarshall:Fp(),isAcyclic:Gp(),postorder:Yp(),preorder:qp(),prim:jp(),tarjan:Ua(),topsort:Ja()}),Uo}var Zo,ss;function Ge(){if(ss)return Zo;ss=1;var e=zp();return Zo={Graph:e.Graph,json:Bp(),alg:Wp(),version:e.version},Zo}var Ko,ls;function Xp(){if(ls)return Ko;ls=1;class e{constructor(){let o={};o._next=o._prev=o,this._sentinel=o}dequeue(){let o=this._sentinel,a=o._prev;if(a!==o)return t(a),a}enqueue(o){let a=this._sentinel;o._prev&&o._next&&t(o),o._next=a._next,a._next._prev=o,a._next=o,o._prev=a}toString(){let o=[],a=this._sentinel,i=a._prev;for(;i!==a;)o.push(JSON.stringify(i,n)),i=i._prev;return"["+o.join(", ")+"]"}}function t(r){r._prev._next=r._next,r._next._prev=r._prev,delete r._next,delete r._prev}function n(r,o){if(r!=="_next"&&r!=="_prev")return o}return Ko=e,Ko}var Qo,us;function Up(){if(us)return Qo;us=1;let e=Ge().Graph,t=Xp();Qo=r;let n=()=>1;function r(c,u){if(c.nodeCount()<=1)return[];let d=i(c,u||n);return o(d.graph,d.buckets,d.zeroIdx).flatMap(h=>c.outEdges(h.v,h.w))}function o(c,u,d){let f=[],h=u[u.length-1],m=u[0],w;for(;c.nodeCount();){for(;w=m.dequeue();)a(c,u,d,w);for(;w=h.dequeue();)a(c,u,d,w);if(c.nodeCount()){for(let v=u.length-2;v>0;--v)if(w=u[v].dequeue(),w){f=f.concat(a(c,u,d,w,!0));break}}}return f}function a(c,u,d,f,h){let m=h?[]:void 0;return c.inEdges(f.v).forEach(w=>{let v=c.edge(w),x=c.node(w.v);h&&m.push({v:w.v,w:w.w}),x.out-=v,s(u,d,x)}),c.outEdges(f.v).forEach(w=>{let v=c.edge(w),x=w.w,_=c.node(x);_.in-=v,s(u,d,_)}),c.removeNode(f.v),m}function i(c,u){let d=new e,f=0,h=0;c.nodes().forEach(v=>{d.setNode(v,{v,in:0,out:0})}),c.edges().forEach(v=>{let x=d.edge(v.v,v.w)||0,_=u(v),g=x+_;d.setEdge(v.v,v.w,g),h=Math.max(h,d.node(v.v).out+=_),f=Math.max(f,d.node(v.w).in+=_)});let m=l(h+f+3).map(()=>new t),w=f+1;return d.nodes().forEach(v=>{s(m,w,d.node(v))}),{graph:d,buckets:m,zeroIdx:w}}function s(c,u,d){d.out?d.in?c[d.out-d.in+u].enqueue(d):c[c.length-1].enqueue(d):c[0].enqueue(d)}function l(c){const u=[];for(let d=0;d<c;d++)u.push(d);return u}return Qo}var Jo,cs;function Ie(){if(cs)return Jo;cs=1;let e=Ge().Graph;Jo={addBorderNode:u,addDummyNode:t,applyWithChunking:h,asNonCompoundGraph:r,buildLayerMatrix:s,intersectRect:i,mapValues:z,maxRank:m,normalizeRanks:l,notime:x,partition:w,pick:R,predecessorWeights:a,range:E,removeEmptyRanks:c,simplify:n,successorWeights:o,time:v,uniqueId:g,zipObject:M};function t(b,$,T,S){for(var p=S;b.hasNode(p);)p=g(S);return T.dummy=$,b.setNode(p,T),p}function n(b){let $=new e().setGraph(b.graph());return b.nodes().forEach(T=>$.setNode(T,b.node(T))),b.edges().forEach(T=>{let S=$.edge(T.v,T.w)||{weight:0,minlen:1},p=b.edge(T);$.setEdge(T.v,T.w,{weight:S.weight+p.weight,minlen:Math.max(S.minlen,p.minlen)})}),$}function r(b){let $=new e({multigraph:b.isMultigraph()}).setGraph(b.graph());return b.nodes().forEach(T=>{b.children(T).length||$.setNode(T,b.node(T))}),b.edges().forEach(T=>{$.setEdge(T,b.edge(T))}),$}function o(b){let $=b.nodes().map(T=>{let S={};return b.outEdges(T).forEach(p=>{S[p.w]=(S[p.w]||0)+b.edge(p).weight}),S});return M(b.nodes(),$)}function a(b){let $=b.nodes().map(T=>{let S={};return b.inEdges(T).forEach(p=>{S[p.v]=(S[p.v]||0)+b.edge(p).weight}),S});return M(b.nodes(),$)}function i(b,$){let T=b.x,S=b.y,p=$.x-T,L=$.y-S,y=b.width/2,O=b.height/2;if(!p&&!L)throw new Error("Not possible to find intersection inside of the rectangle");let I,H;return Math.abs(L)*y>Math.abs(p)*O?(L<0&&(O=-O),I=O*p/L,H=O):(p<0&&(y=-y),I=y,H=y*L/p),{x:T+I,y:S+H}}function s(b){let $=E(m(b)+1).map(()=>[]);return b.nodes().forEach(T=>{let S=b.node(T),p=S.rank;p!==void 0&&($[p][S.order]=T)}),$}function l(b){let $=b.nodes().map(S=>{let p=b.node(S).rank;return p===void 0?Number.MAX_VALUE:p}),T=h(Math.min,$);b.nodes().forEach(S=>{let p=b.node(S);Object.hasOwn(p,"rank")&&(p.rank-=T)})}function c(b){let $=b.nodes().map(y=>b.node(y).rank),T=h(Math.min,$),S=[];b.nodes().forEach(y=>{let O=b.node(y).rank-T;S[O]||(S[O]=[]),S[O].push(y)});let p=0,L=b.graph().nodeRankFactor;Array.from(S).forEach((y,O)=>{y===void 0&&O%L!==0?--p:y!==void 0&&p&&y.forEach(I=>b.node(I).rank+=p)})}function u(b,$,T,S){let p={width:0,height:0};return arguments.length>=4&&(p.rank=T,p.order=S),t(b,"border",p,$)}function d(b,$=f){const T=[];for(let S=0;S<b.length;S+=$){const p=b.slice(S,S+$);T.push(p)}return T}const f=65535;function h(b,$){if($.length>f){const T=d($);return b.apply(null,T.map(S=>b.apply(null,S)))}else return b.apply(null,$)}function m(b){const T=b.nodes().map(S=>{let p=b.node(S).rank;return p===void 0?Number.MIN_VALUE:p});return h(Math.max,T)}function w(b,$){let T={lhs:[],rhs:[]};return b.forEach(S=>{$(S)?T.lhs.push(S):T.rhs.push(S)}),T}function v(b,$){let T=Date.now();try{return $()}finally{console.log(b+" time: "+(Date.now()-T)+"ms")}}function x(b,$){return $()}let _=0;function g(b){var $=++_;return b+(""+$)}function E(b,$,T=1){$==null&&($=b,b=0);let S=L=>L<$;T<0&&(S=L=>$<L);const p=[];for(let L=b;S(L);L+=T)p.push(L);return p}function R(b,$){const T={};for(const S of $)b[S]!==void 0&&(T[S]=b[S]);return T}function z(b,$){let T=$;return typeof $=="string"&&(T=S=>S[$]),Object.entries(b).reduce((S,[p,L])=>(S[p]=T(L,p),S),{})}function M(b,$){return b.reduce((T,S,p)=>(T[S]=$[p],T),{})}return Jo}var er,ds;function Zp(){if(ds)return er;ds=1;let e=Up(),t=Ie().uniqueId;er={run:n,undo:o};function n(a){(a.graph().acyclicer==="greedy"?e(a,s(a)):r(a)).forEach(l=>{let c=a.edge(l);a.removeEdge(l),c.forwardName=l.name,c.reversed=!0,a.setEdge(l.w,l.v,c,t("rev"))});function s(l){return c=>l.edge(c).weight}}function r(a){let i=[],s={},l={};function c(u){Object.hasOwn(l,u)||(l[u]=!0,s[u]=!0,a.outEdges(u).forEach(d=>{Object.hasOwn(s,d.w)?i.push(d):c(d.w)}),delete s[u])}return a.nodes().forEach(c),i}function o(a){a.edges().forEach(i=>{let s=a.edge(i);if(s.reversed){a.removeEdge(i);let l=s.forwardName;delete s.reversed,delete s.forwardName,a.setEdge(i.w,i.v,s,l)}})}return er}var tr,fs;function Kp(){if(fs)return tr;fs=1;let e=Ie();tr={run:t,undo:r};function t(o){o.graph().dummyChains=[],o.edges().forEach(a=>n(o,a))}function n(o,a){let i=a.v,s=o.node(i).rank,l=a.w,c=o.node(l).rank,u=a.name,d=o.edge(a),f=d.labelRank;if(c===s+1)return;o.removeEdge(a);let h,m,w;for(w=0,++s;s<c;++w,++s)d.points=[],m={width:0,height:0,edgeLabel:d,edgeObj:a,rank:s},h=e.addDummyNode(o,"edge",m,"_d"),s===f&&(m.width=d.width,m.height=d.height,m.dummy="edge-label",m.labelpos=d.labelpos),o.setEdge(i,h,{weight:d.weight},u),w===0&&o.graph().dummyChains.push(h),i=h;o.setEdge(i,l,{weight:d.weight},u)}function r(o){o.graph().dummyChains.forEach(a=>{let i=o.node(a),s=i.edgeLabel,l;for(o.setEdge(i.edgeObj,s);i.dummy;)l=o.successors(a)[0],o.removeNode(a),s.points.push({x:i.x,y:i.y}),i.dummy==="edge-label"&&(s.x=i.x,s.y=i.y,s.width=i.width,s.height=i.height),a=l,i=o.node(a)})}return tr}var nr,hs;function Fn(){if(hs)return nr;hs=1;const{applyWithChunking:e}=Ie();nr={longestPath:t,slack:n};function t(r){var o={};function a(i){var s=r.node(i);if(Object.hasOwn(o,i))return s.rank;o[i]=!0;let l=r.outEdges(i).map(u=>u==null?Number.POSITIVE_INFINITY:a(u.w)-r.edge(u).minlen);var c=e(Math.min,l);return c===Number.POSITIVE_INFINITY&&(c=0),s.rank=c}r.sources().forEach(a)}function n(r,o){return r.node(o.w).rank-r.node(o.v).rank-r.edge(o).minlen}return nr}var or,ps;function vs(){if(ps)return or;ps=1;var e=Ge().Graph,t=Fn().slack;or=n;function n(i){var s=new e({directed:!1}),l=i.nodes()[0],c=i.nodeCount();s.setNode(l,{});for(var u,d;r(s,i)<c;)u=o(s,i),d=s.hasNode(u.v)?t(i,u):-t(i,u),a(s,i,d);return s}function r(i,s){function l(c){s.nodeEdges(c).forEach(u=>{var d=u.v,f=c===d?u.w:d;!i.hasNode(f)&&!t(s,u)&&(i.setNode(f,{}),i.setEdge(c,f,{}),l(f))})}return i.nodes().forEach(l),i.nodeCount()}function o(i,s){return s.edges().reduce((c,u)=>{let d=Number.POSITIVE_INFINITY;return i.hasNode(u.v)!==i.hasNode(u.w)&&(d=t(s,u)),d<c[0]?[d,u]:c},[Number.POSITIVE_INFINITY,null])[1]}function a(i,s,l){i.nodes().forEach(c=>s.node(c).rank+=l)}return or}var rr,gs;function Qp(){if(gs)return rr;gs=1;var e=vs(),t=Fn().slack,n=Fn().longestPath,r=Ge().alg.preorder,o=Ge().alg.postorder,a=Ie().simplify;rr=i,i.initLowLimValues=u,i.initCutValues=s,i.calcCutValue=c,i.leaveEdge=f,i.enterEdge=h,i.exchangeEdges=m;function i(_){_=a(_),n(_);var g=e(_);u(g),s(g,_);for(var E,R;E=f(g);)R=h(g,_,E),m(g,_,E,R)}function s(_,g){var E=o(_,_.nodes());E=E.slice(0,E.length-1),E.forEach(R=>l(_,g,R))}function l(_,g,E){var R=_.node(E),z=R.parent;_.edge(E,z).cutvalue=c(_,g,E)}function c(_,g,E){var R=_.node(E),z=R.parent,M=!0,b=g.edge(E,z),$=0;return b||(M=!1,b=g.edge(z,E)),$=b.weight,g.nodeEdges(E).forEach(T=>{var S=T.v===E,p=S?T.w:T.v;if(p!==z){var L=S===M,y=g.edge(T).weight;if($+=L?y:-y,v(_,E,p)){var O=_.edge(E,p).cutvalue;$+=L?-O:O}}}),$}function u(_,g){arguments.length<2&&(g=_.nodes()[0]),d(_,{},1,g)}function d(_,g,E,R,z){var M=E,b=_.node(R);return g[R]=!0,_.neighbors(R).forEach($=>{Object.hasOwn(g,$)||(E=d(_,g,E,$,R))}),b.low=M,b.lim=E++,z?b.parent=z:delete b.parent,E}function f(_){return _.edges().find(g=>_.edge(g).cutvalue<0)}function h(_,g,E){var R=E.v,z=E.w;g.hasEdge(R,z)||(R=E.w,z=E.v);var M=_.node(R),b=_.node(z),$=M,T=!1;M.lim>b.lim&&($=b,T=!0);var S=g.edges().filter(p=>T===x(_,_.node(p.v),$)&&T!==x(_,_.node(p.w),$));return S.reduce((p,L)=>t(g,L)<t(g,p)?L:p)}function m(_,g,E,R){var z=E.v,M=E.w;_.removeEdge(z,M),_.setEdge(R.v,R.w,{}),u(_),s(_,g),w(_,g)}function w(_,g){var E=_.nodes().find(z=>!g.node(z).parent),R=r(_,E);R=R.slice(1),R.forEach(z=>{var M=_.node(z).parent,b=g.edge(z,M),$=!1;b||(b=g.edge(M,z),$=!0),g.node(z).rank=g.node(M).rank+($?b.minlen:-b.minlen)})}function v(_,g,E){return _.hasEdge(g,E)}function x(_,g,E){return E.low<=g.lim&&g.lim<=E.lim}return rr}var ir,ms;function Jp(){if(ms)return ir;ms=1;var e=Fn(),t=e.longestPath,n=vs(),r=Qp();ir=o;function o(l){var c=l.graph().ranker;if(c instanceof Function)return c(l);switch(l.graph().ranker){case"network-simplex":s(l);break;case"tight-tree":i(l);break;case"longest-path":a(l);break;case"none":break;default:s(l)}}var a=t;function i(l){t(l),n(l)}function s(l){r(l)}return ir}var ar,_s;function ev(){if(_s)return ar;_s=1,ar=e;function e(r){let o=n(r);r.graph().dummyChains.forEach(a=>{let i=r.node(a),s=i.edgeObj,l=t(r,o,s.v,s.w),c=l.path,u=l.lca,d=0,f=c[d],h=!0;for(;a!==s.w;){if(i=r.node(a),h){for(;(f=c[d])!==u&&r.node(f).maxRank<i.rank;)d++;f===u&&(h=!1)}if(!h){for(;d<c.length-1&&r.node(f=c[d+1]).minRank<=i.rank;)d++;f=c[d]}r.setParent(a,f),a=r.successors(a)[0]}})}function t(r,o,a,i){let s=[],l=[],c=Math.min(o[a].low,o[i].low),u=Math.max(o[a].lim,o[i].lim),d,f;d=a;do d=r.parent(d),s.push(d);while(d&&(o[d].low>c||u>o[d].lim));for(f=d,d=i;(d=r.parent(d))!==f;)l.push(d);return{path:s.concat(l.reverse()),lca:f}}function n(r){let o={},a=0;function i(s){let l=a;r.children(s).forEach(i),o[s]={low:l,lim:a++}}return r.children().forEach(i),o}return ar}var sr,ys;function tv(){if(ys)return sr;ys=1;let e=Ie();sr={run:t,cleanup:a};function t(i){let s=e.addDummyNode(i,"root",{},"_root"),l=r(i),c=Object.values(l),u=e.applyWithChunking(Math.max,c)-1,d=2*u+1;i.graph().nestingRoot=s,i.edges().forEach(h=>i.edge(h).minlen*=d);let f=o(i)+1;i.children().forEach(h=>n(i,s,d,f,u,l,h)),i.graph().nodeRankFactor=d}function n(i,s,l,c,u,d,f){let h=i.children(f);if(!h.length){f!==s&&i.setEdge(s,f,{weight:0,minlen:l});return}let m=e.addBorderNode(i,"_bt"),w=e.addBorderNode(i,"_bb"),v=i.node(f);i.setParent(m,f),v.borderTop=m,i.setParent(w,f),v.borderBottom=w,h.forEach(x=>{n(i,s,l,c,u,d,x);let _=i.node(x),g=_.borderTop?_.borderTop:x,E=_.borderBottom?_.borderBottom:x,R=_.borderTop?c:2*c,z=g!==E?1:u-d[f]+1;i.setEdge(m,g,{weight:R,minlen:z,nestingEdge:!0}),i.setEdge(E,w,{weight:R,minlen:z,nestingEdge:!0})}),i.parent(f)||i.setEdge(s,m,{weight:0,minlen:u+d[f]})}function r(i){var s={};function l(c,u){var d=i.children(c);d&&d.length&&d.forEach(f=>l(f,u+1)),s[c]=u}return i.children().forEach(c=>l(c,1)),s}function o(i){return i.edges().reduce((s,l)=>s+i.edge(l).weight,0)}function a(i){var s=i.graph();i.removeNode(s.nestingRoot),delete s.nestingRoot,i.edges().forEach(l=>{var c=i.edge(l);c.nestingEdge&&i.removeEdge(l)})}return sr}var lr,ws;function nv(){if(ws)return lr;ws=1;let e=Ie();lr=t;function t(r){function o(a){let i=r.children(a),s=r.node(a);if(i.length&&i.forEach(o),Object.hasOwn(s,"minRank")){s.borderLeft=[],s.borderRight=[];for(let l=s.minRank,c=s.maxRank+1;l<c;++l)n(r,"borderLeft","_bl",a,s,l),n(r,"borderRight","_br",a,s,l)}}r.children().forEach(o)}function n(r,o,a,i,s,l){let c={width:0,height:0,rank:l,borderType:o},u=s[o][l-1],d=e.addDummyNode(r,"border",c,a);s[o][l]=d,r.setParent(d,i),u&&r.setEdge(u,d,{weight:1})}return lr}var ur,bs;function ov(){if(bs)return ur;bs=1,ur={adjust:e,undo:t};function e(l){let c=l.graph().rankdir.toLowerCase();(c==="lr"||c==="rl")&&n(l)}function t(l){let c=l.graph().rankdir.toLowerCase();(c==="bt"||c==="rl")&&o(l),(c==="lr"||c==="rl")&&(i(l),n(l))}function n(l){l.nodes().forEach(c=>r(l.node(c))),l.edges().forEach(c=>r(l.edge(c)))}function r(l){let c=l.width;l.width=l.height,l.height=c}function o(l){l.nodes().forEach(c=>a(l.node(c))),l.edges().forEach(c=>{let u=l.edge(c);u.points.forEach(a),Object.hasOwn(u,"y")&&a(u)})}function a(l){l.y=-l.y}function i(l){l.nodes().forEach(c=>s(l.node(c))),l.edges().forEach(c=>{let u=l.edge(c);u.points.forEach(s),Object.hasOwn(u,"x")&&s(u)})}function s(l){let c=l.x;l.x=l.y,l.y=c}return ur}var cr,xs;function rv(){if(xs)return cr;xs=1;let e=Ie();cr=t;function t(n){let r={},o=n.nodes().filter(u=>!n.children(u).length),a=o.map(u=>n.node(u).rank),i=e.applyWithChunking(Math.max,a),s=e.range(i+1).map(()=>[]);function l(u){if(r[u])return;r[u]=!0;let d=n.node(u);s[d.rank].push(u),n.successors(u).forEach(l)}return o.sort((u,d)=>n.node(u).rank-n.node(d).rank).forEach(l),s}return cr}var dr,Es;function iv(){if(Es)return dr;Es=1;let e=Ie().zipObject;dr=t;function t(r,o){let a=0;for(let i=1;i<o.length;++i)a+=n(r,o[i-1],o[i]);return a}function n(r,o,a){let i=e(a,a.map((f,h)=>h)),s=o.flatMap(f=>r.outEdges(f).map(h=>({pos:i[h.w],weight:r.edge(h).weight})).sort((h,m)=>h.pos-m.pos)),l=1;for(;l<a.length;)l<<=1;let c=2*l-1;l-=1;let u=new Array(c).fill(0),d=0;return s.forEach(f=>{let h=f.pos+l;u[h]+=f.weight;let m=0;for(;h>0;)h%2&&(m+=u[h+1]),h=h-1>>1,u[h]+=f.weight;d+=f.weight*m}),d}return dr}var fr,Ns;function av(){if(Ns)return fr;Ns=1,fr=e;function e(t,n=[]){return n.map(r=>{let o=t.inEdges(r);if(o.length){let a=o.reduce((i,s)=>{let l=t.edge(s),c=t.node(s.v);return{sum:i.sum+l.weight*c.order,weight:i.weight+l.weight}},{sum:0,weight:0});return{v:r,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:r}})}return fr}var hr,Ss;function sv(){if(Ss)return hr;Ss=1;let e=Ie();hr=t;function t(o,a){let i={};o.forEach((l,c)=>{let u=i[l.v]={indegree:0,in:[],out:[],vs:[l.v],i:c};l.barycenter!==void 0&&(u.barycenter=l.barycenter,u.weight=l.weight)}),a.edges().forEach(l=>{let c=i[l.v],u=i[l.w];c!==void 0&&u!==void 0&&(u.indegree++,c.out.push(i[l.w]))});let s=Object.values(i).filter(l=>!l.indegree);return n(s)}function n(o){let a=[];function i(l){return c=>{c.merged||(c.barycenter===void 0||l.barycenter===void 0||c.barycenter>=l.barycenter)&&r(l,c)}}function s(l){return c=>{c.in.push(l),--c.indegree===0&&o.push(c)}}for(;o.length;){let l=o.pop();a.push(l),l.in.reverse().forEach(i(l)),l.out.forEach(s(l))}return a.filter(l=>!l.merged).map(l=>e.pick(l,["vs","i","barycenter","weight"]))}function r(o,a){let i=0,s=0;o.weight&&(i+=o.barycenter*o.weight,s+=o.weight),a.weight&&(i+=a.barycenter*a.weight,s+=a.weight),o.vs=a.vs.concat(o.vs),o.barycenter=i/s,o.weight=s,o.i=Math.min(a.i,o.i),a.merged=!0}return hr}var pr,ks;function lv(){if(ks)return pr;ks=1;let e=Ie();pr=t;function t(o,a){let i=e.partition(o,m=>Object.hasOwn(m,"barycenter")),s=i.lhs,l=i.rhs.sort((m,w)=>w.i-m.i),c=[],u=0,d=0,f=0;s.sort(r(!!a)),f=n(c,l,f),s.forEach(m=>{f+=m.vs.length,c.push(m.vs),u+=m.barycenter*m.weight,d+=m.weight,f=n(c,l,f)});let h={vs:c.flat(!0)};return d&&(h.barycenter=u/d,h.weight=d),h}function n(o,a,i){let s;for(;a.length&&(s=a[a.length-1]).i<=i;)a.pop(),o.push(s.vs),i++;return i}function r(o){return(a,i)=>a.barycenter<i.barycenter?-1:a.barycenter>i.barycenter?1:o?i.i-a.i:a.i-i.i}return pr}var vr,Cs;function uv(){if(Cs)return vr;Cs=1;let e=av(),t=sv(),n=lv();vr=r;function r(i,s,l,c){let u=i.children(s),d=i.node(s),f=d?d.borderLeft:void 0,h=d?d.borderRight:void 0,m={};f&&(u=u.filter(_=>_!==f&&_!==h));let w=e(i,u);w.forEach(_=>{if(i.children(_.v).length){let g=r(i,_.v,l,c);m[_.v]=g,Object.hasOwn(g,"barycenter")&&a(_,g)}});let v=t(w,l);o(v,m);let x=n(v,c);if(f&&(x.vs=[f,x.vs,h].flat(!0),i.predecessors(f).length)){let _=i.node(i.predecessors(f)[0]),g=i.node(i.predecessors(h)[0]);Object.hasOwn(x,"barycenter")||(x.barycenter=0,x.weight=0),x.barycenter=(x.barycenter*x.weight+_.order+g.order)/(x.weight+2),x.weight+=2}return x}function o(i,s){i.forEach(l=>{l.vs=l.vs.flatMap(c=>s[c]?s[c].vs:c)})}function a(i,s){i.barycenter!==void 0?(i.barycenter=(i.barycenter*i.weight+s.barycenter*s.weight)/(i.weight+s.weight),i.weight+=s.weight):(i.barycenter=s.barycenter,i.weight=s.weight)}return vr}var gr,$s;function cv(){if($s)return gr;$s=1;let e=Ge().Graph,t=Ie();gr=n;function n(o,a,i,s){s||(s=o.nodes());let l=r(o),c=new e({compound:!0}).setGraph({root:l}).setDefaultNodeLabel(u=>o.node(u));return s.forEach(u=>{let d=o.node(u),f=o.parent(u);(d.rank===a||d.minRank<=a&&a<=d.maxRank)&&(c.setNode(u),c.setParent(u,f||l),o[i](u).forEach(h=>{let m=h.v===u?h.w:h.v,w=c.edge(m,u),v=w!==void 0?w.weight:0;c.setEdge(m,u,{weight:o.edge(h).weight+v})}),Object.hasOwn(d,"minRank")&&c.setNode(u,{borderLeft:d.borderLeft[a],borderRight:d.borderRight[a]}))}),c}function r(o){for(var a;o.hasNode(a=t.uniqueId("_root")););return a}return gr}var mr,Is;function dv(){if(Is)return mr;Is=1,mr=e;function e(t,n,r){let o={},a;r.forEach(i=>{let s=t.parent(i),l,c;for(;s;){if(l=t.parent(s),l?(c=o[l],o[l]=s):(c=a,a=s),c&&c!==s){n.setEdge(c,s);return}s=l}})}return mr}var _r,Ms;function fv(){if(Ms)return _r;Ms=1;let e=rv(),t=iv(),n=uv(),r=cv(),o=dv(),a=Ge().Graph,i=Ie();_r=s;function s(d,f){if(f&&typeof f.customOrder=="function"){f.customOrder(d,s);return}let h=i.maxRank(d),m=l(d,i.range(1,h+1),"inEdges"),w=l(d,i.range(h-1,-1,-1),"outEdges"),v=e(d);if(u(d,v),f&&f.disableOptimalOrderHeuristic)return;let x=Number.POSITIVE_INFINITY,_;for(let g=0,E=0;E<4;++g,++E){c(g%2?m:w,g%4>=2),v=i.buildLayerMatrix(d);let R=t(d,v);R<x&&(E=0,_=Object.assign({},v),x=R)}u(d,_)}function l(d,f,h){const m=new Map,w=(v,x)=>{m.has(v)||m.set(v,[]),m.get(v).push(x)};for(const v of d.nodes()){const x=d.node(v);if(typeof x.rank=="number"&&w(x.rank,v),typeof x.minRank=="number"&&typeof x.maxRank=="number")for(let _=x.minRank;_<=x.maxRank;_++)_!==x.rank&&w(_,v)}return f.map(function(v){return r(d,v,h,m.get(v)||[])})}function c(d,f){let h=new a;d.forEach(function(m){let w=m.graph().root,v=n(m,w,h,f);v.vs.forEach((x,_)=>m.node(x).order=_),o(m,h,v.vs)})}function u(d,f){Object.values(f).forEach(h=>h.forEach((m,w)=>d.node(m).order=w))}return _r}var yr,Ds;function hv(){if(Ds)return yr;Ds=1;let e=Ge().Graph,t=Ie();yr={positionX:h,findType1Conflicts:n,findType2Conflicts:r,addConflict:a,hasConflict:i,verticalAlignment:s,horizontalCompaction:l,alignCoordinates:d,findSmallestWidthAlignment:u,balance:f};function n(v,x){let _={};function g(E,R){let z=0,M=0,b=E.length,$=R[R.length-1];return R.forEach((T,S)=>{let p=o(v,T),L=p?v.node(p).order:b;(p||T===$)&&(R.slice(M,S+1).forEach(y=>{v.predecessors(y).forEach(O=>{let I=v.node(O),H=I.order;(H<z||L<H)&&!(I.dummy&&v.node(y).dummy)&&a(_,O,y)})}),M=S+1,z=L)}),R}return x.length&&x.reduce(g),_}function r(v,x){let _={};function g(R,z,M,b,$){let T;t.range(z,M).forEach(S=>{T=R[S],v.node(T).dummy&&v.predecessors(T).forEach(p=>{let L=v.node(p);L.dummy&&(L.order<b||L.order>$)&&a(_,p,T)})})}function E(R,z){let M=-1,b,$=0;return z.forEach((T,S)=>{if(v.node(T).dummy==="border"){let p=v.predecessors(T);p.length&&(b=v.node(p[0]).order,g(z,$,S,M,b),$=S,M=b)}g(z,$,z.length,b,R.length)}),z}return x.length&&x.reduce(E),_}function o(v,x){if(v.node(x).dummy)return v.predecessors(x).find(_=>v.node(_).dummy)}function a(v,x,_){if(x>_){let E=x;x=_,_=E}let g=v[x];g||(v[x]=g={}),g[_]=!0}function i(v,x,_){if(x>_){let g=x;x=_,_=g}return!!v[x]&&Object.hasOwn(v[x],_)}function s(v,x,_,g){let E={},R={},z={};return x.forEach(M=>{M.forEach((b,$)=>{E[b]=b,R[b]=b,z[b]=$})}),x.forEach(M=>{let b=-1;M.forEach($=>{let T=g($);if(T.length){T=T.sort((p,L)=>z[p]-z[L]);let S=(T.length-1)/2;for(let p=Math.floor(S),L=Math.ceil(S);p<=L;++p){let y=T[p];R[$]===$&&b<z[y]&&!i(_,$,y)&&(R[y]=$,R[$]=E[$]=E[y],b=z[y])}}})}),{root:E,align:R}}function l(v,x,_,g,E){let R={},z=c(v,x,_,E),M=E?"borderLeft":"borderRight";function b(S,p){let L=z.nodes(),y=L.pop(),O={};for(;y;)O[y]?S(y):(O[y]=!0,L.push(y),L=L.concat(p(y))),y=L.pop()}function $(S){R[S]=z.inEdges(S).reduce((p,L)=>Math.max(p,R[L.v]+z.edge(L)),0)}function T(S){let p=z.outEdges(S).reduce((y,O)=>Math.min(y,R[O.w]-z.edge(O)),Number.POSITIVE_INFINITY),L=v.node(S);p!==Number.POSITIVE_INFINITY&&L.borderType!==M&&(R[S]=Math.max(R[S],p))}return b($,z.predecessors.bind(z)),b(T,z.successors.bind(z)),Object.keys(g).forEach(S=>R[S]=R[_[S]]),R}function c(v,x,_,g){let E=new e,R=v.graph(),z=m(R.nodesep,R.edgesep,g);return x.forEach(M=>{let b;M.forEach($=>{let T=_[$];if(E.setNode(T),b){var S=_[b],p=E.edge(S,T);E.setEdge(S,T,Math.max(z(v,$,b),p||0))}b=$})}),E}function u(v,x){return Object.values(x).reduce((_,g)=>{let E=Number.NEGATIVE_INFINITY,R=Number.POSITIVE_INFINITY;Object.entries(g).forEach(([M,b])=>{let $=w(v,M)/2;E=Math.max(b+$,E),R=Math.min(b-$,R)});const z=E-R;return z<_[0]&&(_=[z,g]),_},[Number.POSITIVE_INFINITY,null])[1]}function d(v,x){let _=Object.values(x),g=t.applyWithChunking(Math.min,_),E=t.applyWithChunking(Math.max,_);["u","d"].forEach(R=>{["l","r"].forEach(z=>{let M=R+z,b=v[M];if(b===x)return;let $=Object.values(b),T=g-t.applyWithChunking(Math.min,$);z!=="l"&&(T=E-t.applyWithChunking(Math.max,$)),T&&(v[M]=t.mapValues(b,S=>S+T))})})}function f(v,x){return t.mapValues(v.ul,(_,g)=>{if(x)return v[x.toLowerCase()][g];{let E=Object.values(v).map(R=>R[g]).sort((R,z)=>R-z);return(E[1]+E[2])/2}})}function h(v){let x=t.buildLayerMatrix(v),_=Object.assign(n(v,x),r(v,x)),g={},E;["u","d"].forEach(z=>{E=z==="u"?x:Object.values(x).reverse(),["l","r"].forEach(M=>{M==="r"&&(E=E.map(S=>Object.values(S).reverse()));let b=(z==="u"?v.predecessors:v.successors).bind(v),$=s(v,E,_,b),T=l(v,E,$.root,$.align,M==="r");M==="r"&&(T=t.mapValues(T,S=>-S)),g[z+M]=T})});let R=u(v,g);return d(g,R),f(g,v.graph().align)}function m(v,x,_){return(g,E,R)=>{let z=g.node(E),M=g.node(R),b=0,$;if(b+=z.width/2,Object.hasOwn(z,"labelpos"))switch(z.labelpos.toLowerCase()){case"l":$=-z.width/2;break;case"r":$=z.width/2;break}if($&&(b+=_?$:-$),$=0,b+=(z.dummy?x:v)/2,b+=(M.dummy?x:v)/2,b+=M.width/2,Object.hasOwn(M,"labelpos"))switch(M.labelpos.toLowerCase()){case"l":$=M.width/2;break;case"r":$=-M.width/2;break}return $&&(b+=_?$:-$),$=0,b}}function w(v,x){return v.node(x).width}return yr}var wr,Os;function pv(){if(Os)return wr;Os=1;let e=Ie(),t=hv().positionX;wr=n;function n(o){o=e.asNonCompoundGraph(o),r(o),Object.entries(t(o)).forEach(([a,i])=>o.node(a).x=i)}function r(o){let a=e.buildLayerMatrix(o),i=o.graph().ranksep,s=0;a.forEach(l=>{const c=l.reduce((u,d)=>{const f=o.node(d).height;return u>f?u:f},0);l.forEach(u=>o.node(u).y=s+c/2),s+=c+i})}return wr}var br,Ts;function vv(){if(Ts)return br;Ts=1;let e=Zp(),t=Kp(),n=Jp(),r=Ie().normalizeRanks,o=ev(),a=Ie().removeEmptyRanks,i=tv(),s=nv(),l=ov(),c=fv(),u=pv(),d=Ie(),f=Ge().Graph;br=h;function h(P,B){let A=B&&B.debugTiming?d.time:d.notime;A("layout",()=>{let V=A(" buildLayoutGraph",()=>b(P));A(" runLayout",()=>m(V,A,B)),A(" updateInputGraph",()=>w(P,V))})}function m(P,B,A){B(" makeSpaceForEdgeLabels",()=>$(P)),B(" removeSelfEdges",()=>F(P)),B(" acyclic",()=>e.run(P)),B(" nestingGraph.run",()=>i.run(P)),B(" rank",()=>n(d.asNonCompoundGraph(P))),B(" injectEdgeLabelProxies",()=>T(P)),B(" removeEmptyRanks",()=>a(P)),B(" nestingGraph.cleanup",()=>i.cleanup(P)),B(" normalizeRanks",()=>r(P)),B(" assignRankMinMax",()=>S(P)),B(" removeEdgeLabelProxies",()=>p(P)),B(" normalize.run",()=>t.run(P)),B(" parentDummyChains",()=>o(P)),B(" addBorderSegments",()=>s(P)),B(" order",()=>c(P,A)),B(" insertSelfEdges",()=>j(P)),B(" adjustCoordinateSystem",()=>l.adjust(P)),B(" position",()=>u(P)),B(" positionSelfEdges",()=>Y(P)),B(" removeBorderNodes",()=>H(P)),B(" normalize.undo",()=>t.undo(P)),B(" fixupEdgeLabelCoords",()=>O(P)),B(" undoCoordinateSystem",()=>l.undo(P)),B(" translateGraph",()=>L(P)),B(" assignNodeIntersects",()=>y(P)),B(" reversePoints",()=>I(P)),B(" acyclic.undo",()=>e.undo(P))}function w(P,B){P.nodes().forEach(A=>{let V=P.node(A),q=B.node(A);V&&(V.x=q.x,V.y=q.y,V.rank=q.rank,B.children(A).length&&(V.width=q.width,V.height=q.height))}),P.edges().forEach(A=>{let V=P.edge(A),q=B.edge(A);V.points=q.points,Object.hasOwn(q,"x")&&(V.x=q.x,V.y=q.y)}),P.graph().width=B.graph().width,P.graph().height=B.graph().height}let v=["nodesep","edgesep","ranksep","marginx","marginy"],x={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_=["acyclicer","ranker","rankdir","align"],g=["width","height","rank"],E={width:0,height:0},R=["minlen","weight","width","height","labeloffset"],z={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},M=["labelpos"];function b(P){let B=new f({multigraph:!0,compound:!0}),A=X(P.graph());return B.setGraph(Object.assign({},x,W(A,v),d.pick(A,_))),P.nodes().forEach(V=>{let q=X(P.node(V));const ne=W(q,g);Object.keys(E).forEach(ee=>{ne[ee]===void 0&&(ne[ee]=E[ee])}),B.setNode(V,ne),B.setParent(V,P.parent(V))}),P.edges().forEach(V=>{let q=X(P.edge(V));B.setEdge(V,Object.assign({},z,W(q,R),d.pick(q,M)))}),B}function $(P){let B=P.graph();B.ranksep/=2,P.edges().forEach(A=>{let V=P.edge(A);V.minlen*=2,V.labelpos.toLowerCase()!=="c"&&(B.rankdir==="TB"||B.rankdir==="BT"?V.width+=V.labeloffset:V.height+=V.labeloffset)})}function T(P){P.edges().forEach(B=>{let A=P.edge(B);if(A.width&&A.height){let V=P.node(B.v),ne={rank:(P.node(B.w).rank-V.rank)/2+V.rank,e:B};d.addDummyNode(P,"edge-proxy",ne,"_ep")}})}function S(P){let B=0;P.nodes().forEach(A=>{let V=P.node(A);V.borderTop&&(V.minRank=P.node(V.borderTop).rank,V.maxRank=P.node(V.borderBottom).rank,B=Math.max(B,V.maxRank))}),P.graph().maxRank=B}function p(P){P.nodes().forEach(B=>{let A=P.node(B);A.dummy==="edge-proxy"&&(P.edge(A.e).labelRank=A.rank,P.removeNode(B))})}function L(P){let B=Number.POSITIVE_INFINITY,A=0,V=Number.POSITIVE_INFINITY,q=0,ne=P.graph(),ee=ne.marginx||0,ue=ne.marginy||0;function me(ae){let le=ae.x,k=ae.y,N=ae.width,D=ae.height;B=Math.min(B,le-N/2),A=Math.max(A,le+N/2),V=Math.min(V,k-D/2),q=Math.max(q,k+D/2)}P.nodes().forEach(ae=>me(P.node(ae))),P.edges().forEach(ae=>{let le=P.edge(ae);Object.hasOwn(le,"x")&&me(le)}),B-=ee,V-=ue,P.nodes().forEach(ae=>{let le=P.node(ae);le.x-=B,le.y-=V}),P.edges().forEach(ae=>{let le=P.edge(ae);le.points.forEach(k=>{k.x-=B,k.y-=V}),Object.hasOwn(le,"x")&&(le.x-=B),Object.hasOwn(le,"y")&&(le.y-=V)}),ne.width=A-B+ee,ne.height=q-V+ue}function y(P){P.edges().forEach(B=>{let A=P.edge(B),V=P.node(B.v),q=P.node(B.w),ne,ee;A.points?(ne=A.points[0],ee=A.points[A.points.length-1]):(A.points=[],ne=q,ee=V),A.points.unshift(d.intersectRect(V,ne)),A.points.push(d.intersectRect(q,ee))})}function O(P){P.edges().forEach(B=>{let A=P.edge(B);if(Object.hasOwn(A,"x"))switch((A.labelpos==="l"||A.labelpos==="r")&&(A.width-=A.labeloffset),A.labelpos){case"l":A.x-=A.width/2+A.labeloffset;break;case"r":A.x+=A.width/2+A.labeloffset;break}})}function I(P){P.edges().forEach(B=>{let A=P.edge(B);A.reversed&&A.points.reverse()})}function H(P){P.nodes().forEach(B=>{if(P.children(B).length){let A=P.node(B),V=P.node(A.borderTop),q=P.node(A.borderBottom),ne=P.node(A.borderLeft[A.borderLeft.length-1]),ee=P.node(A.borderRight[A.borderRight.length-1]);A.width=Math.abs(ee.x-ne.x),A.height=Math.abs(q.y-V.y),A.x=ne.x+A.width/2,A.y=V.y+A.height/2}}),P.nodes().forEach(B=>{P.node(B).dummy==="border"&&P.removeNode(B)})}function F(P){P.edges().forEach(B=>{if(B.v===B.w){var A=P.node(B.v);A.selfEdges||(A.selfEdges=[]),A.selfEdges.push({e:B,label:P.edge(B)}),P.removeEdge(B)}})}function j(P){var B=d.buildLayerMatrix(P);B.forEach(A=>{var V=0;A.forEach((q,ne)=>{var ee=P.node(q);ee.order=ne+V,(ee.selfEdges||[]).forEach(ue=>{d.addDummyNode(P,"selfedge",{width:ue.label.width,height:ue.label.height,rank:ee.rank,order:ne+ ++V,e:ue.e,label:ue.label},"_se")}),delete ee.selfEdges})})}function Y(P){P.nodes().forEach(B=>{var A=P.node(B);if(A.dummy==="selfedge"){var V=P.node(A.e.v),q=V.x+V.width/2,ne=V.y,ee=A.x-q,ue=V.height/2;P.setEdge(A.e,A.label),P.removeNode(B),A.label.points=[{x:q+2*ee/3,y:ne-ue},{x:q+5*ee/6,y:ne-ue},{x:q+ee,y:ne},{x:q+5*ee/6,y:ne+ue},{x:q+2*ee/3,y:ne+ue}],A.label.x=A.x,A.label.y=A.y}})}function W(P,B){return d.mapValues(d.pick(P,B),Number)}function X(P){var B={};return P&&Object.entries(P).forEach(([A,V])=>{typeof A=="string"&&(A=A.toLowerCase()),B[A]=V}),B}return br}var xr,Ps;function gv(){if(Ps)return xr;Ps=1;let e=Ie(),t=Ge().Graph;xr={debugOrdering:n};function n(r){let o=e.buildLayerMatrix(r),a=new t({compound:!0,multigraph:!0}).setGraph({});return r.nodes().forEach(i=>{a.setNode(i,{label:i}),a.setParent(i,"layer"+r.node(i).rank)}),r.edges().forEach(i=>a.setEdge(i.v,i.w,{},i.name)),o.forEach((i,s)=>{let l="layer"+s;a.setNode(l,{rank:"same"}),i.reduce((c,u)=>(a.setEdge(c,u,{style:"invis"}),u))}),a}return xr}var Er,As;function mv(){return As||(As=1,Er="1.1.8"),Er}var Nr,Rs;function _v(){return Rs||(Rs=1,Nr={graphlib:Ge(),layout:vv(),debug:gv(),util:{time:Ie().time,notime:Ie().notime},version:mv()}),Nr}var yv=_v();const Sr=Ap(yv);function wv(){const{findNode:e}=Ne(),t=Ee(new Sr.graphlib.Graph),n=Ee("LR");function r(o,a,i){const s=new Sr.graphlib.Graph;t.value=s,s.setDefaultEdgeLabel(()=>({}));const l=i==="LR";s.setGraph({rankdir:i}),n.value=i;for(const c of o){const u=e(c.id);s.setNode(c.id,{width:u.dimensions.width,height:u.dimensions.height})}for(const c of a)s.setEdge(c.source,c.target);return s.graph().ranksep=200,Sr.layout(s),o.map(c=>{const u=s.node(c.id);return c.type=="cosmos"||c.type=="interface"||c.type=="router"||c.type=="target"?{...c,targetPosition:l?Q.Left:Q.Top,sourcePosition:l?Q.Right:Q.Bottom,position:{x:u.x,y:u.y}}:c})}return{graph:t,layout:r,previousDirection:n}}const bv={class:"interface-flow-chart"},xv={key:1,class:"empty-state"},og=ht("_",{__name:"InterfaceFlowChart",props:{interfaceDetails:{type:Array,default:()=>[]},routerDetails:{type:Array,default:()=>[]}},setup(e){const{layout:t}=wv(),{onConnect:n,addEdges:r,onNodesChange:o,applyNodeChanges:a,onEdgesChange:i,applyEdgeChanges:s,fitView:l}=Ne(),c=it("dialog"),u=new Lr,d=e,f=Ee([]),h=Ee([]);let m=!1;async function w(M,b=!1){(m||b)&&(f.value=t(f.value,h.value,M),m=!1,Ae(()=>{l()}))}n(M=>{let b=M.source.startsWith("interface__"),$=M.target.startsWith("interface__"),T=M.source.startsWith("router__"),S=M.target.startsWith("router__"),p=M.source.startsWith("cosmos__"),L=M.target.startsWith("cosmos__"),y=M.source.startsWith("target__"),O=M.target.startsWith("target__"),I=M.sourceHandle.split("__")[1],H=M.targetHandle.split("__")[1];if(I!==H||b&&$||T&&S||T&&$||b&&S||p&&L||y&&O||p&&O||y&&L)return;let F="";p&&(F=F+`cosmos__${M.source.split("__")[1]}`),L&&(F=F+`cosmos__${M.target.split("__")[1]}`),F.length==0&&(b&&(F=F+`interface__${M.source.split("__")[1]}`),$&&(F=F+`interface__${M.target.split("__")[1]}`),T&&(F=F+`router__${M.source.split("__")[1]}`),S&&(F=F+`router__${M.target.split("__")[1]}`)),F.startsWith("cosmos__")&&(b&&(F=F+`__interface__${M.source.split("__")[1]}`),$&&(F=F+`__interface__${M.target.split("__")[1]}`),T&&(F=F+`__router__${M.source.split("__")[1]}`),S&&(F=F+`__router__${M.target.split("__")[1]}`)),y&&(F=F+`__target__${M.source.split("__")[1]}`),O&&(F=F+`__target__${M.target.split("__")[1]}`),F=F+`__${I}`,M.id=F;let j=!1;if(h.value.forEach(V=>{if(V.id===F){j=!0;return}}),j)return;let Y="",W="",X="",P=F.split("__"),B=P[0],A=P[4];B==="cosmos"?(W=P[1],Y=P[2],X=P[3],A=="cmd"?(M.type="default",M.label="CMD Enable",M.markerStart={type:"arrowclosed"}):(M.type="default",M.label="Tlm Enable",M.markerEnd={type:"arrowclosed"}),Y==="interface"?u.interface_target_enable(X,W,A==="cmd",A==="tlm").then(V=>{r(M),h.value.push(M)}):u.router_target_enable(X,W,A==="cmd",A==="tlm").then(V=>{r(M),h.value.push(M)})):(Y=P[0],X=P[1],W=P[3],A=="cmd"?(M.type="default",M.label="CMD Map",M.markerStart={type:"arrowclosed"}):(M.type="default",M.label="Tlm Map",M.markerEnd={type:"arrowclosed"}),Y==="interface"?c.confirm(`${M.label} target ${W} to interface ${X}? Note this will cause the interface to restart.`,{okText:"Map",cancelText:"Cancel"}).then(()=>{u.map_target_to_interface(W,X,A==="cmd",A==="tlm",!1).then(V=>{r(M),h.value.push(M)})}):c.confirm(`${M.label} target ${W} to router ${X}? Note this will cause the router to restart.`,{okText:"Map",cancelText:"Cancel"}).then(()=>{u.map_target_to_router(W,X,A==="cmd",A==="tlm",!1).then(V=>{r(M),h.value.push(M)})}))}),o(async M=>{const b=[];for(const $ of M)$.type!=="remove"&&b.push($),$.type==="dimensions"&&(m=!0,Ae(()=>{w("LR")}));a(b)}),i(async M=>{const b=[];for(const $ of M)if($.type!=="remove")b.push($);else{let T="",S="",p="",L="",y="",O=$.id.split("__"),I=O[0],H=O[4];I==="cosmos"?(p=O[1],L=O[2],y=O[3],T=`Disable ${p} ${H} with ${L} ${y}?`,S="Disable"):(L=O[0],y=O[1],p=O[3],T=`Unmap ${p} ${H} with ${L} ${y}? Note this will cause the ${L} to restart.`,S="Unmap"),c.confirm(T,{okText:S,cancelText:"Cancel"}).then(()=>{I=="cosmos"?L=="interface"?u.interface_target_disable(y,p,H==="cmd",H==="tlm").then(F=>{s([$]),h.value.forEach((j,Y)=>{if(j.id===$.id){h.value.splice(Y,1);return}})}):u.router_target_disable(y,p,H==="cmd",H==="tlm").then(F=>{s([$]),h.value.forEach((j,Y)=>{if(j.id===$.id){h.value.splice(Y,1);return}})}):L=="interface"?u.unmap_target_from_interface(p,y,H==="cmd",H==="tlm").then(F=>{s([$]),h.value.forEach((j,Y)=>{if(j.id===$.id){h.value.splice(Y,1);return}})}):u.unmap_target_from_router(p,y,H==="cmd",H==="tlm").then(F=>{s([$]),h.value.forEach((j,Y)=>{if(j.id===$.id){h.value.splice(Y,1);return}})})})}s(b)});const v=Ee(!1),x=Ee(null),_=Ee(null),g=Ee(null),E=Ee(null);function R(M){M.node.type==="interface"?(x.value="Interface",_.value=d.interfaceDetails[M.node.data.label],g.value=null,E.value=null,v.value=!0):M.node.type=="router"?(x.value="Router",_.value=d.routerDetails[M.node.data.label],g.value=null,E.value=null,v.value=!0):(M.node.type==="read-protocol"||M.node.type=="write-protocol")&&(M.node.data.interface?(x.value="Interface",_.value=d.interfaceDetails[M.node.data.interface]):(x.value="Router",_.value=d.routerDetails[M.node.data.router]),g.value=null,E.value=M.node.data.index,v.value=!0)}function z(){f.value=[],h.value=[];const M=[];let b=d.interfaceDetails||{};for(const p in b){(d.interfaceDetails[p].cmd_target_names||[]).forEach(O=>{M.includes(O)||M.push(O);const I={id:`interface__${p}__target__${O}__cmd`,source:`interface__${p}`,target:`target__${O}`,sourceHandle:"interface__cmd__output",targetHandle:"target__cmd",type:"default",label:"CMD Map",markerEnd:{type:"arrowclosed"}};h.value.push(I)});for(const[O,I]of Object.entries(d.interfaceDetails[p].cmd_target_enabled)){if(O==="UNKNOWN"||!I)continue;const H={id:`cosmos__${O}__interface__${p}__cmd`,target:`interface__${p}`,source:`cosmos__${O}`,sourceHandle:"cosmos__cmd",targetHandle:"interface__cmd__input",type:"default",label:"CMD Enable",markerEnd:{type:"arrowclosed"}};h.value.push(H)}(d.interfaceDetails[p].tlm_target_names||[]).forEach(O=>{M.includes(O)||M.push(O);const I={id:`interface__${p}__target__${O}__tlm`,source:`interface__${p}`,target:`target__${O}`,sourceHandle:"interface__tlm__output",targetHandle:"target__tlm",type:"default",label:"TLM Map",markerStart:{type:"arrowclosed"}};h.value.push(I)});for(const[O,I]of Object.entries(d.interfaceDetails[p].tlm_target_enabled)){if(O==="UNKNOWN"||!I)continue;const H={id:`cosmos__${O}__interface__${p}__tlm`,target:`interface__${p}`,source:`cosmos__${O}`,sourceHandle:"cosmos__tlm",targetHandle:"interface__tlm__input",type:"default",label:"TLM Enable",markerStart:{type:"arrowclosed"}};h.value.push(H)}}let $=d.routerDetails||{};for(const p in $){(d.routerDetails[p].cmd_target_names||[]).forEach(O=>{M.includes(O)||M.push(O);const I={id:`router__${p}__target__${O}__cmd`,source:`router__${p}`,target:`target__${O}`,sourceHandle:"router__cmd__output",targetHandle:"target__cmd",type:"default",label:"CMD Map",markerEnd:{type:"arrowclosed"}};h.value.push(I)});for(const[O,I]of Object.entries(d.routerDetails[p].cmd_target_enabled)){if(O==="UNKNOWN"||!I)continue;const H={id:`cosmos__${O}__router__${p}__cmd`,target:`router__${p}`,source:`cosmos__${O}`,sourceHandle:"cosmos__cmd",targetHandle:"router__cmd__input",type:"default",label:"CMD Enable",markerEnd:{type:"arrowclosed"}};h.value.push(H)}(d.routerDetails[p].tlm_target_names||[]).forEach(O=>{M.includes(O)||M.push(O);const I={id:`router__${p}__target__${O}__tlm`,source:`router__${p}`,target:`target__${O}`,sourceHandle:"router__tlm__output",targetHandle:"target__tlm",type:"default",label:"TLM Map",markerStart:{type:"arrowclosed"}};h.value.push(I)});for(const[O,I]of Object.entries(d.routerDetails[p].tlm_target_enabled)){if(O==="UNKNOWN"||!I)continue;const H={id:`cosmos__${O}__router__${p}__tlm`,target:`router__${p}`,source:`cosmos__${O}`,sourceHandle:"cosmos__tlm",targetHandle:"router__tlm__input",type:"default",label:"TLM Enable",markerStart:{type:"arrowclosed"}};h.value.push(H)}}M.forEach((p,L)=>{let y,O;y=0,O=L*250;const I={id:`cosmos__${p}`,type:"cosmos",position:{x:y,y:O},data:{label:p},draggable:!0};f.value.push(I)});let T=0,S=200;for(const p in b){let L=d.interfaceDetails[p].write_protocols||[],y=d.interfaceDetails[p].read_protocols||[];const O=Math.max(L.length,y.length,1),I=Math.max(200,80+O*70);I>S&&(S=I);const H=200,F={id:`interface__${p}`,type:"interface",position:{x:400,y:(H+50)*T},data:{label:p,width:I,height:H},draggable:!0};f.value.push(F),T+=1;const j=50;L.forEach((Y,W)=>{let X=Y.name;Y.name.slice(-8)==="Protocol"&&(X=Y.name.slice(0,-8));const P={id:`write-protocol__interface__${p}__${W}`,type:"write-protocol",position:{x:j+W*70,y:98},data:{index:W,interface:p,label:X},draggable:!1,parentNode:`interface__${p}`,extent:"parent"};f.value.push(P)}),y.forEach((Y,W)=>{let X=Y.name;Y.name.slice(-8)==="Protocol"&&(X=Y.name.slice(0,-8));const P={id:`read-protocol__interface__${p}__${W}`,type:"read-protocol",position:{x:j+W*70,y:148},data:{index:W,interface:p,label:X},draggable:!1,parentNode:`interface__${p}`,extent:"parent"};f.value.push(P)})}for(const p in $){let L=d.routerDetails[p].write_protocols||[],y=d.routerDetails[p].read_protocols||[];const O=Math.max(L.length,y.length,1),I=Math.max(200,80+O*70);I>S&&(S=I);const H=200,F={id:`router__${p}`,type:"router",position:{x:400,y:(H+50)*T},data:{label:p,width:I,height:H},draggable:!0};f.value.push(F),T+=1;const j=50;L.forEach((Y,W)=>{let X=Y.name;Y.name.slice(-8)==="Protocol"&&(X=Y.name.slice(0,-8));const P={id:`write-protocol__router__${p}__${W}`,type:"write-protocol",position:{x:j+W*70,y:98},data:{index:W,router:p,label:X},draggable:!1,parentNode:`router__${p}`,extent:"parent"};f.value.push(P)}),y.forEach((Y,W)=>{let X=Y.name;Y.name.slice(-8)==="Protocol"&&(X=Y.name.slice(0,-8));const P={id:`read-protocol__router__${p}__${W}`,type:"read-protocol",position:{x:j+W*70,y:148},data:{index:W,router:p,label:X},draggable:!1,parentNode:`router__${p}`,extent:"parent"};f.value.push(P)})}M.forEach((p,L)=>{let y,O;y=400+S+200,O=L*250;const I={id:`target__${p}`,type:"target",position:{x:y,y:O},data:{label:p},draggable:!0};f.value.push(I)}),m=!0}return ye(()=>d.interfaceDetails,async()=>{d.interfaceDetails!==null&&(z(),Ae(()=>{w("LR")}))},{immediate:!0}),ye(()=>d.routerDetails,async()=>{d.routerDetails!==null&&(z(),Ae(()=>{w("LR")}))},{immediate:!0}),(M,b)=>{const $=Se("v-icon"),T=Se("v-dialog");return te(),de("div",bv,[f.value.length>0?(te(),Oe(Z(xh),{key:0,nodes:f.value,edges:h.value,"max-zoom":4,"min-zoom":.01,class:"vue-flow-container","elevate-edges-on-select":"","apply-default":!1,onNodeClick:R},{"node-interface":ge(({data:S})=>[se(cp,{data:S},null,8,["data"])]),"node-router":ge(({data:S})=>[se(pp,{data:S},null,8,["data"])]),"node-target":ge(({data:S})=>[se(Np,{data:S},null,8,["data"])]),"node-cosmos":ge(S=>[se(yp,Rr(zr(S)),null,16)]),"node-write-protocol":ge(({data:S})=>[se(Ip,{data:S},null,8,["data"])]),"node-read-protocol":ge(({data:S})=>[se(Pp,{data:S},null,8,["data"])]),default:ge(()=>[se(Z(ep),{"pattern-color":"#aaa",gap:16}),se(Z(Xh),null,{default:ge(()=>[se(Z(nn),{title:"Reset",onClick:b[0]||(b[0]=S=>w("LR",!0))},{default:ge(()=>[...b[3]||(b[3]=[ce("svg",{width:"16",height:"16",viewBox:"0 0 32 32"},[ce("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"])):(te(),de("div",xv,[se($,{size:"large",color:"grey"},{default:ge(()=>[...b[4]||(b[4]=[Ye("mdi-lan-disconnect",-1)])]),_:1}),b[5]||(b[5]=ce("div",{class:"text-grey mt-2"},"Nothing to show",-1))])),se(T,{modelValue:v.value,"onUpdate:modelValue":b[2]||(b[2]=S=>v.value=S),"max-width":"80vw","max-height":"80vh"},{default:ge(()=>[se(ap,{mode:x.value,details:_.value,"read-protocol-index":E.value,"write-protocol-index":g.value,onClose:b[1]||(b[1]=S=>v.value=!1)},null,8,["mode","details","read-protocol-index","write-protocol-index"])]),_:1},8,["modelValue"])])}}})}}});
|